@quillsql/react 2.16.19 → 2.16.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -19976,6 +19976,7 @@ async function cleanDashboardItem({
19976
19976
  pivotRows: pivotTable ? pivotTable.rows : void 0,
19977
19977
  pivotColumns: pivotTable ? pivotTable.columns : void 0,
19978
19978
  compareRows: item.compareRows,
19979
+ showLegend: item.showLegend ?? false,
19979
19980
  columns: processedColumns.map((column) => {
19980
19981
  return {
19981
19982
  field: column.field,
@@ -20242,6 +20243,7 @@ function createInitialFormData(columns) {
20242
20243
  ],
20243
20244
  xAxisLabel: "",
20244
20245
  chartType: firstNumberColumn ? "line" : "table",
20246
+ showLegend: false,
20245
20247
  pivot: null,
20246
20248
  template: true,
20247
20249
  referenceLines: []
@@ -20329,7 +20331,8 @@ function extractAllReportValuesFromQuillInternalReport(reportInternal) {
20329
20331
  pivotRows: reportInternal.pivotRows,
20330
20332
  pivotColumns: reportInternal.pivotColumns,
20331
20333
  pivotRowCount: reportInternal.pivotRowCount,
20332
- filterMap: reportInternal.filterMap
20334
+ filterMap: reportInternal.filterMap,
20335
+ showLegend: reportInternal.showLegend
20333
20336
  };
20334
20337
  }
20335
20338
  async function fetchReportRows({
@@ -24294,14 +24297,12 @@ var useDashboard = (dashboardName, config) => {
24294
24297
  const reportRequestIds = (0, import_react2.useRef)({});
24295
24298
  const lastDashboardName = (0, import_react2.useRef)(null);
24296
24299
  const pendingNameChangeReload = (0, import_react2.useRef)(false);
24297
- const shouldReloadOnNameChange = (0, import_react2.useRef)(false);
24298
24300
  (0, import_react2.useEffect)(() => {
24299
24301
  customFiltersRef.current = customReportFilters;
24300
24302
  }, [customReportFilters]);
24301
24303
  (0, import_react2.useEffect)(() => {
24302
24304
  const nameChanged = dashboardName !== lastDashboardName.current;
24303
24305
  if (nameChanged) {
24304
- shouldReloadOnNameChange.current = lastDashboardName.current !== null;
24305
24306
  lastDashboardName.current = dashboardName ?? null;
24306
24307
  initialLoad.current = true;
24307
24308
  fetchedInitialReports.current = false;
@@ -24313,10 +24314,6 @@ var useDashboard = (dashboardName, config) => {
24313
24314
  if (pendingNameChangeReload.current && data) {
24314
24315
  pendingNameChangeReload.current = false;
24315
24316
  initialLoad.current = false;
24316
- if (shouldReloadOnNameChange.current) {
24317
- shouldReloadOnNameChange.current = false;
24318
- reload(dashboardName, true);
24319
- }
24320
24317
  return;
24321
24318
  }
24322
24319
  if (pendingNameChangeReload.current && !isLoading && !data && initialLoad.current) {
@@ -25513,7 +25510,7 @@ var BarList = import_react4.default.forwardRef((props, ref) => {
25513
25510
  var BarList_default = BarList;
25514
25511
 
25515
25512
  // src/components/Chart/PieChart.tsx
25516
- var import_react5 = __toESM(require("react"), 1);
25513
+ var import_react13 = __toESM(require("react"), 1);
25517
25514
  var import_recharts = require("recharts");
25518
25515
 
25519
25516
  // src/utils/color.ts
@@ -25873,529 +25870,62 @@ function HSLtoRGB(h, s, l) {
25873
25870
  // src/components/Chart/PieChart.tsx
25874
25871
  init_util();
25875
25872
  init_valueFormatter();
25876
- var import_jsx_runtime4 = require("react/jsx-runtime");
25877
- var defaultValueFormatter = (value) => (value * 1).toFixed(1) + "%";
25878
- var parseData2 = (data, colors, categoryKey, valueKey) => {
25879
- const maxItems = 20;
25880
- const slicedData = deepCopy(data).slice(0, maxItems);
25881
- const totalValue = slicedData.reduce(
25882
- (acc, dataPoint) => (
25883
- // Big(acc)
25884
- // .add(Big(Number(dataPoint[valueKey]) ?? 0))
25885
- // .toNumber(),
25886
- acc + parseFloat(dataPoint[valueKey] ?? "0")
25887
- ),
25888
- 0
25889
- );
25890
- slicedData.forEach((dataPoint) => {
25891
- const rawValue = parseFloat(dataPoint[valueKey] ?? "0");
25892
- dataPoint[valueKey] = totalValue ? rawValue * 100 / totalValue : data.length > maxItems ? 100 / (maxItems + 1) : 100 / slicedData.length;
25893
- dataPoint[`raw_${valueKey}`] = parseFloat(rawValue.toFixed(2));
25894
- });
25895
- const parsedData = slicedData.map((dataPoint, idx) => {
25896
- const baseColor = colors.length > 0 ? idx < colors.length ? colors[idx] : colors[colors.length - 1] : "#808080";
25897
- return {
25898
- ...dataPoint,
25899
- color: baseColor,
25900
- fill: baseColor
25901
- };
25902
- });
25903
- if (data.length > maxItems) {
25904
- const otherData = data.slice(maxItems);
25905
- const otherSum = otherData.reduce(
25906
- (acc, dataPoint) => (
25907
- // Big(acc)
25908
- // .add(Big(Number(dataPoint[valueKey])) ?? 0)
25909
- // .toNumber(),
25910
- acc + parseFloat(dataPoint[valueKey] ?? "0")
25911
- ),
25912
- 0
25913
- );
25914
- const otherColor = colors.length > 0 ? colors[colors.length - 1] : "#808080";
25915
- const normalizedOtherSum = totalValue ? otherSum * 100 / totalValue : 100 / (maxItems + 1);
25916
- parsedData.push({
25917
- [categoryKey]: "Other",
25918
- [valueKey]: normalizedOtherSum,
25919
- [`raw_${valueKey}`]: parseFloat(otherSum.toFixed(2)),
25920
- color: otherColor,
25921
- fill: otherColor
25922
- });
25923
- }
25924
- return parsedData;
25925
- };
25926
- var ChartTooltipFrame = ({
25927
- children,
25928
- theme
25929
- }) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
25930
- "div",
25931
- {
25932
- style: {
25933
- borderStyle: "solid",
25934
- borderColor: theme?.borderColor || "#E5E7EB",
25935
- borderWidth: 1,
25936
- background: theme?.backgroundColor || "#ffffff",
25937
- fontSize: theme?.fontSize || "14px",
25938
- borderRadius: "6px",
25939
- boxShadow: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)"
25940
- },
25941
- children
25942
- }
25943
- );
25944
- var ChartTooltipRow = ({
25945
- value,
25946
- rawValue,
25947
- valueKey,
25948
- valueKeyLabel,
25949
- name: name2,
25950
- // color,
25951
- theme
25952
- }) => /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
25953
- "div",
25954
- {
25955
- style: {
25956
- display: "flex",
25957
- flexDirection: "column",
25958
- gap: 2,
25959
- minWidth: 150,
25960
- position: "relative"
25961
- },
25962
- children: [
25963
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
25964
- "div",
25965
- {
25966
- style: {
25967
- display: "flex",
25968
- alignItems: "center",
25969
- width: "100%"
25970
- // paddingLeft: '24px',
25971
- },
25972
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
25973
- "span",
25974
- {
25975
- style: {
25976
- flex: 1,
25977
- display: "flex",
25978
- alignItems: "center",
25979
- justifyContent: "space-between"
25980
- },
25981
- children: [
25982
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
25983
- "p",
25984
- {
25985
- style: {
25986
- marginTop: 0,
25987
- marginBottom: 0,
25988
- marginRight: "24px",
25989
- fontFamily: theme?.fontFamily,
25990
- color: theme?.primaryTextColor,
25991
- fontSize: theme?.fontSizeSmall || "14px",
25992
- fontWeight: theme?.fontWeightMedium || "500",
25993
- minWidth: "60px"
25994
- },
25995
- children: name2
25996
- }
25997
- ),
25998
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
25999
- "p",
26000
- {
26001
- style: {
26002
- marginTop: 0,
26003
- marginBottom: 0,
26004
- fontFamily: theme?.fontFamily,
26005
- color: theme?.primaryTextColor,
26006
- fontSize: theme?.fontSizeSmall || "14px",
26007
- fontWeight: theme?.fontWeightMedium || "500",
26008
- minWidth: "40px",
26009
- textAlign: "right"
26010
- },
26011
- children: value
26012
- }
26013
- )
26014
- ]
26015
- }
26016
- )
26017
- }
26018
- ),
26019
- (rawValue || valueKey) && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
26020
- "div",
26021
- {
26022
- style: {
26023
- display: "flex",
26024
- alignItems: "center",
26025
- width: "100%",
26026
- // paddingLeft: '24px',
26027
- justifyContent: "space-between"
26028
- },
26029
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
26030
- "span",
26031
- {
26032
- style: {
26033
- flex: 1,
26034
- display: "flex",
26035
- alignItems: "center",
26036
- justifyContent: "space-between"
26037
- },
26038
- children: [
26039
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
26040
- "p",
26041
- {
26042
- style: {
26043
- marginTop: 0,
26044
- marginBottom: 0,
26045
- marginRight: "24px",
26046
- fontFamily: theme?.fontFamily,
26047
- color: theme?.primaryTextColor,
26048
- fontSize: theme?.fontSizeSmall || "14px",
26049
- fontWeight: theme?.fontWeightMedium || "500",
26050
- minWidth: "60px"
26051
- },
26052
- children: valueKeyLabel || valueKey
26053
- }
26054
- ),
26055
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
26056
- "p",
26057
- {
26058
- style: {
26059
- marginTop: 0,
26060
- marginBottom: 0,
26061
- fontFamily: theme?.fontFamily,
26062
- color: theme?.primaryTextColor,
26063
- fontSize: theme?.fontSizeSmall || "14px",
26064
- fontWeight: theme?.fontWeightMedium || "500",
26065
- minWidth: "40px",
26066
- textAlign: "right"
26067
- },
26068
- children: rawValue
26069
- }
26070
- )
26071
- ]
26072
- }
26073
- )
26074
- }
26075
- )
26076
- ]
26077
- }
26078
- );
26079
- var DonutChartTooltip = ({
26080
- active,
26081
- payload,
26082
- valueFormatter: valueFormatter2,
26083
- theme,
26084
- yAxisFields
26085
- }) => {
26086
- if (active && payload[0]) {
26087
- const payloadRow = payload[0];
26088
- const rawValue = payloadRow.payload[`raw_${payloadRow.dataKey}`];
26089
- const field = yAxisFields?.find((f) => f.field === payloadRow.dataKey);
26090
- const formattedRawValue = quillFormat({
26091
- value: rawValue?.toString() || "",
26092
- format: field?.format || "string"
26093
- });
26094
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ChartTooltipFrame, { theme, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
26095
- "div",
26096
- {
26097
- style: {
26098
- paddingLeft: "1rem",
26099
- paddingRight: "1rem",
26100
- paddingTop: "8px",
26101
- paddingBottom: "8px"
26102
- },
26103
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
26104
- ChartTooltipRow,
26105
- {
26106
- value: valueFormatter2(payloadRow.value),
26107
- rawValue: rawValue ? formattedRawValue : void 0,
26108
- valueKey: payloadRow.dataKey,
26109
- valueKeyLabel: field?.label,
26110
- name: payloadRow.name,
26111
- color: payloadRow.payload.color,
26112
- theme
26113
- }
26114
- )
26115
- }
26116
- ) });
26117
- }
26118
- return null;
26119
- };
26120
- var renderCustomizedLabel = ({
26121
- cx,
26122
- cy,
26123
- name: name2,
26124
- midAngle,
26125
- outerRadius,
26126
- percent,
26127
- tooltipPayload,
26128
- theme,
26129
- yAxisFields
26130
- }) => {
26131
- const RADIAN = Math.PI / 180;
26132
- const radius = outerRadius + 25;
26133
- const x = cx + radius * Math.cos(-midAngle * RADIAN);
26134
- const y = cy + radius * Math.sin(-midAngle * RADIAN);
26135
- const category = tooltipPayload?.[0]?.dataKey;
26136
- const rawValue = tooltipPayload?.[0]?.payload?.[`raw_${category}`];
26137
- const displayValue = rawValue ? `${rawValue}` : `${(percent * 100).toFixed(0)}%`;
26138
- const isRightSide = x > cx;
26139
- const isTopSide = y < cy;
26140
- const field = yAxisFields?.find(
26141
- (f) => f.field === tooltipPayload?.[0]?.dataKey
26142
- );
26143
- const formattedDisplayValue = quillFormat({
26144
- value: displayValue?.toString() || "",
26145
- format: field?.format || "string"
26146
- });
26147
- const padding = 10;
26148
- let textX;
26149
- if (isRightSide) {
26150
- textX = x + padding;
26151
- } else {
26152
- const longestText = name2.length > displayValue.length ? name2 : displayValue;
26153
- const estimatedTextWidth = longestText.length * 7;
26154
- textX = x - padding - estimatedTextWidth;
26155
- }
26156
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("g", { children: isTopSide ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
26157
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
26158
- "text",
26159
- {
26160
- x: textX,
26161
- y: y - 8,
26162
- fill: theme?.secondaryTextColor,
26163
- textAnchor: "start",
26164
- dominantBaseline: "central",
26165
- fontSize: theme?.fontSize || "14px",
26166
- fontWeight: "500",
26167
- fontFamily: theme?.fontFamily,
26168
- children: name2
26169
- }
26170
- ),
26171
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
26172
- "text",
26173
- {
26174
- x: textX,
26175
- y: y + 8,
26176
- fill: theme?.secondaryTextColor,
26177
- textAnchor: "start",
26178
- dominantBaseline: "central",
26179
- fontSize: theme?.fontSize || "14px",
26180
- fontWeight: "400",
26181
- fontFamily: theme?.fontFamily,
26182
- children: formattedDisplayValue
26183
- }
26184
- )
26185
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
26186
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
26187
- "text",
26188
- {
26189
- x: textX,
26190
- y: y + 8,
26191
- fill: theme?.secondaryTextColor,
26192
- textAnchor: "start",
26193
- dominantBaseline: "central",
26194
- fontSize: theme?.fontSize || "14px",
26195
- fontWeight: "400",
26196
- fontFamily: theme?.fontFamily,
26197
- children: formattedDisplayValue
26198
- }
26199
- ),
26200
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
26201
- "text",
26202
- {
26203
- x: textX,
26204
- y: y - 8,
26205
- fill: theme?.secondaryTextColor,
26206
- textAnchor: "start",
26207
- dominantBaseline: "central",
26208
- fontSize: theme?.fontSize || "14px",
26209
- fontWeight: "500",
26210
- fontFamily: theme?.fontFamily,
26211
- children: name2
26212
- }
26213
- )
26214
- ] }) });
26215
- };
26216
- var PieChartWrapper = import_react5.default.forwardRef(
26217
- (props, ref) => {
26218
- const {
26219
- category = "pct_of_the_total",
26220
- index = "status",
26221
- data,
26222
- colors = [],
26223
- colorMap = {},
26224
- variant = "donut",
26225
- valueFormatter: valueFormatter2 = defaultValueFormatter,
26226
- className,
26227
- containerStyle,
26228
- theme,
26229
- onClickChartElement,
26230
- yAxisFields,
26231
- showLegend = false,
26232
- ...other
26233
- } = props;
26234
- const isDonut = variant == "donut";
26235
- if (!data || data.length === 0) {
26236
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
26237
- "div",
26238
- {
26239
- style: {
26240
- display: "flex",
26241
- flex: "1 0 auto",
26242
- // height: '100%',
26243
- margin: "auto",
26244
- justifyContent: "center",
26245
- alignItems: "center",
26246
- fontSize: 13,
26247
- fontFamily: theme?.fontFamily,
26248
- color: theme.secondaryTextColor,
26249
- ...containerStyle
26250
- },
26251
- className,
26252
- children: "No results"
26253
- }
26254
- );
26255
- }
26256
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
26257
- "div",
26258
- {
26259
- ref,
26260
- className,
26261
- style: {
26262
- width: "100%",
26263
- display: "flex",
26264
- flexDirection: "row",
26265
- alignItems: "center",
26266
- justifyContent: "center",
26267
- boxSizing: "content-box",
26268
- ...containerStyle
26269
- },
26270
- ...other,
26271
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
26272
- import_recharts.ResponsiveContainer,
26273
- {
26274
- width: "100%",
26275
- height: "100%",
26276
- minWidth: 0,
26277
- minHeight: 0,
26278
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_recharts.PieChart, { children: [
26279
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
26280
- import_recharts.Pie,
26281
- {
26282
- data: parseData2(
26283
- data,
26284
- (() => {
26285
- const colorArray = colorMap[category] && colorMap[category]["primary"] && colorMap[category]["primary"] || colors;
26286
- const containsCssVars = colorArray.some(
26287
- (color2) => typeof color2 === "string" && color2.includes("var(")
26288
- );
26289
- if (containsCssVars) {
26290
- return Array.from({ length: data.length }).map(
26291
- (_, idx) => colorArray[idx % colorArray.length] ?? colorArray[colorArray.length - 1] ?? "#808080"
26292
- );
26293
- }
26294
- return colorArray.length >= data.length ? colorArray.slice(0, data.length) : generateArrayFromColor(colorArray, data.length);
26295
- })(),
26296
- index,
26297
- category
26298
- ),
26299
- cx: "50%",
26300
- cy: "50%",
26301
- startAngle: 90,
26302
- endAngle: -270,
26303
- innerRadius: isDonut ? showLegend ? "50%" : "70%" : "0%",
26304
- outerRadius: showLegend ? "70%" : "100%",
26305
- paddingAngle: 0,
26306
- dataKey: category,
26307
- nameKey: index,
26308
- isAnimationActive: true,
26309
- onClick: onClickChartElement,
26310
- labelLine: false,
26311
- label: showLegend ? (props2) => renderCustomizedLabel({ ...props2, theme, yAxisFields }) : void 0
26312
- }
26313
- ),
26314
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
26315
- import_recharts.Tooltip,
26316
- {
26317
- wrapperStyle: {
26318
- outline: "none"
26319
- },
26320
- content: ({ active, payload }) => {
26321
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
26322
- DonutChartTooltip,
26323
- {
26324
- active,
26325
- payload,
26326
- valueFormatter: valueFormatter2,
26327
- theme,
26328
- yAxisFields
26329
- }
26330
- );
26331
- }
26332
- }
26333
- )
26334
- ] })
26335
- }
26336
- )
26337
- }
26338
- );
26339
- }
26340
- );
26341
- var PieChart_default = PieChartWrapper;
26342
25873
 
26343
- // src/components/QuillTable.tsx
26344
- var import_react13 = require("react");
26345
- init_valueFormatter();
25874
+ // src/components/Chart/CustomLegend.tsx
25875
+ var import_react12 = require("react");
26346
25876
 
26347
25877
  // src/components/UiComponents.tsx
26348
- var import_react12 = require("react");
25878
+ var import_react11 = require("react");
26349
25879
 
26350
25880
  // src/assets/ArrowDownHeadIcon.tsx
26351
- var import_jsx_runtime5 = require("react/jsx-runtime");
25881
+ var import_jsx_runtime4 = require("react/jsx-runtime");
26352
25882
 
26353
25883
  // src/assets/ArrowDownRightIcon.tsx
26354
- var import_jsx_runtime6 = require("react/jsx-runtime");
25884
+ var import_jsx_runtime5 = require("react/jsx-runtime");
26355
25885
 
26356
25886
  // src/assets/ArrowDownIcon.tsx
26357
- var import_jsx_runtime7 = require("react/jsx-runtime");
25887
+ var import_jsx_runtime6 = require("react/jsx-runtime");
26358
25888
 
26359
25889
  // src/assets/ArrowRightIcon.tsx
26360
- var import_jsx_runtime8 = require("react/jsx-runtime");
25890
+ var import_jsx_runtime7 = require("react/jsx-runtime");
26361
25891
 
26362
25892
  // src/assets/ArrowRightHeadIcon.tsx
26363
- var import_jsx_runtime9 = require("react/jsx-runtime");
25893
+ var import_jsx_runtime8 = require("react/jsx-runtime");
26364
25894
 
26365
25895
  // src/assets/ArrowLeftHeadIcon.tsx
26366
- var import_jsx_runtime10 = require("react/jsx-runtime");
25896
+ var import_jsx_runtime9 = require("react/jsx-runtime");
26367
25897
 
26368
25898
  // src/assets/DoubleArrowLeftHeadIcon.tsx
26369
- var import_jsx_runtime11 = require("react/jsx-runtime");
25899
+ var import_jsx_runtime10 = require("react/jsx-runtime");
26370
25900
 
26371
25901
  // src/assets/DoubleArrowRightHeadIcon.tsx
26372
- var import_jsx_runtime12 = require("react/jsx-runtime");
25902
+ var import_jsx_runtime11 = require("react/jsx-runtime");
26373
25903
 
26374
25904
  // src/assets/ArrowUpHeadIcon.tsx
26375
- var import_jsx_runtime13 = require("react/jsx-runtime");
25905
+ var import_jsx_runtime12 = require("react/jsx-runtime");
26376
25906
 
26377
25907
  // src/assets/ArrowUpIcon.tsx
26378
- var import_jsx_runtime14 = require("react/jsx-runtime");
25908
+ var import_jsx_runtime13 = require("react/jsx-runtime");
26379
25909
 
26380
25910
  // src/assets/ArrowUpRightIcon.tsx
26381
- var import_jsx_runtime15 = require("react/jsx-runtime");
25911
+ var import_jsx_runtime14 = require("react/jsx-runtime");
26382
25912
 
26383
25913
  // src/assets/CalendarIcon.tsx
26384
- var import_jsx_runtime16 = require("react/jsx-runtime");
25914
+ var import_jsx_runtime15 = require("react/jsx-runtime");
26385
25915
 
26386
25916
  // src/assets/CalendarNormalIcon.tsx
26387
- var import_jsx_runtime17 = require("react/jsx-runtime");
25917
+ var import_jsx_runtime16 = require("react/jsx-runtime");
26388
25918
 
26389
25919
  // src/assets/ExclamationFilledIcon.tsx
26390
- var import_jsx_runtime18 = require("react/jsx-runtime");
26391
- var ExclamationFilledIcon = ({ ...props }) => /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
25920
+ var import_jsx_runtime17 = require("react/jsx-runtime");
25921
+ var ExclamationFilledIcon = ({ ...props }) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
26392
25922
  "svg",
26393
25923
  {
26394
25924
  ...props,
26395
25925
  xmlns: "http://www.w3.org/2000/svg",
26396
25926
  viewBox: "0 0 24 24",
26397
25927
  fill: "currentColor",
26398
- children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
25928
+ children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
26399
25929
  "path",
26400
25930
  {
26401
25931
  fillRule: "evenodd",
@@ -26408,20 +25938,20 @@ var ExclamationFilledIcon = ({ ...props }) => /* @__PURE__ */ (0, import_jsx_run
26408
25938
  var ExclamationFilledIcon_default = ExclamationFilledIcon;
26409
25939
 
26410
25940
  // src/assets/SearchIcon.tsx
26411
- var import_jsx_runtime19 = require("react/jsx-runtime");
25941
+ var import_jsx_runtime18 = require("react/jsx-runtime");
26412
25942
 
26413
25943
  // src/assets/XCircleIcon.tsx
26414
- var import_jsx_runtime20 = require("react/jsx-runtime");
25944
+ var import_jsx_runtime19 = require("react/jsx-runtime");
26415
25945
 
26416
25946
  // src/assets/RefreshIcon.tsx
26417
- var import_jsx_runtime21 = require("react/jsx-runtime");
25947
+ var import_jsx_runtime20 = require("react/jsx-runtime");
26418
25948
 
26419
25949
  // src/assets/FilterIcon.tsx
26420
- var import_jsx_runtime22 = require("react/jsx-runtime");
25950
+ var import_jsx_runtime21 = require("react/jsx-runtime");
26421
25951
 
26422
25952
  // src/assets/MoreIcon.tsx
26423
- var import_jsx_runtime23 = require("react/jsx-runtime");
26424
- var MoreIcon = ({ ...props }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
25953
+ var import_jsx_runtime22 = require("react/jsx-runtime");
25954
+ var MoreIcon = ({ ...props }) => /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(
26425
25955
  "svg",
26426
25956
  {
26427
25957
  width: "24",
@@ -26431,20 +25961,20 @@ var MoreIcon = ({ ...props }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
26431
25961
  xmlns: "http://www.w3.org/2000/svg",
26432
25962
  ...props,
26433
25963
  children: [
26434
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("circle", { cx: "5", cy: "12", r: "2", fill: "currentColor" }),
26435
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("circle", { cx: "12", cy: "12", r: "2", fill: "currentColor" }),
26436
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("circle", { cx: "19", cy: "12", r: "2", fill: "currentColor" })
25964
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("circle", { cx: "5", cy: "12", r: "2", fill: "currentColor" }),
25965
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("circle", { cx: "12", cy: "12", r: "2", fill: "currentColor" }),
25966
+ /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("circle", { cx: "19", cy: "12", r: "2", fill: "currentColor" })
26437
25967
  ]
26438
25968
  }
26439
25969
  );
26440
25970
  var MoreIcon_default = MoreIcon;
26441
25971
 
26442
25972
  // src/assets/UpLeftArrowsIcon.tsx
26443
- var import_jsx_runtime24 = require("react/jsx-runtime");
25973
+ var import_jsx_runtime23 = require("react/jsx-runtime");
26444
25974
 
26445
25975
  // src/assets/XIcon.tsx
26446
- var import_jsx_runtime25 = require("react/jsx-runtime");
26447
- var XIcon = ({ ...props }) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
25976
+ var import_jsx_runtime24 = require("react/jsx-runtime");
25977
+ var XIcon = ({ ...props }) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
26448
25978
  "svg",
26449
25979
  {
26450
25980
  ...props,
@@ -26452,7 +25982,7 @@ var XIcon = ({ ...props }) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
26452
25982
  viewBox: "0 0 24 24",
26453
25983
  height: "20",
26454
25984
  width: "20",
26455
- children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
25985
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
26456
25986
  "path",
26457
25987
  {
26458
25988
  fillRule: "evenodd",
@@ -26465,15 +25995,15 @@ var XIcon = ({ ...props }) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
26465
25995
  var XIcon_default = XIcon;
26466
25996
 
26467
25997
  // src/components/Chart/ChartSkeleton.tsx
26468
- var import_react6 = require("react");
26469
- var import_jsx_runtime26 = require("react/jsx-runtime");
26470
- var QuillLoadingSkeleton = () => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(ChartSkeleton, {});
25998
+ var import_react5 = require("react");
25999
+ var import_jsx_runtime25 = require("react/jsx-runtime");
26000
+ var QuillLoadingSkeleton = () => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ChartSkeleton, {});
26471
26001
  function ChartSkeleton({
26472
26002
  className,
26473
26003
  containerStyle
26474
26004
  }) {
26475
- const [theme] = (0, import_react6.useContext)(ThemeContext);
26476
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
26005
+ const [theme] = (0, import_react5.useContext)(ThemeContext);
26006
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
26477
26007
  "div",
26478
26008
  {
26479
26009
  style: {
@@ -26483,7 +26013,7 @@ function ChartSkeleton({
26483
26013
  ...containerStyle
26484
26014
  },
26485
26015
  className,
26486
- children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
26016
+ children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
26487
26017
  "div",
26488
26018
  {
26489
26019
  style: {
@@ -26493,7 +26023,7 @@ function ChartSkeleton({
26493
26023
  borderRadius: 8,
26494
26024
  overflow: "hidden"
26495
26025
  },
26496
- children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
26026
+ children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
26497
26027
  "svg",
26498
26028
  {
26499
26029
  width: "100%",
@@ -26501,7 +26031,7 @@ function ChartSkeleton({
26501
26031
  xmlns: "http://www.w3.org/2000/svg",
26502
26032
  xmlnsXlink: "http://www.w3.org/1999/xlink",
26503
26033
  children: [
26504
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
26034
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
26505
26035
  "rect",
26506
26036
  {
26507
26037
  width: "100%",
@@ -26509,7 +26039,7 @@ function ChartSkeleton({
26509
26039
  fill: theme?.loadingStateBackgroundColor || "#F9F9FA"
26510
26040
  }
26511
26041
  ),
26512
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("defs", { fill: theme?.loadingStateBackgroundColor || "#F9F9FA", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
26042
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("defs", { fill: theme?.loadingStateBackgroundColor || "#F9F9FA", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
26513
26043
  "linearGradient",
26514
26044
  {
26515
26045
  id: "skeletonGradient",
@@ -26519,10 +26049,10 @@ function ChartSkeleton({
26519
26049
  y2: "0%",
26520
26050
  gradientUnits: "userSpaceOnUse",
26521
26051
  children: [
26522
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("stop", { offset: "0%", stopColor: "rgba(255,255,255,0)" }),
26523
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("stop", { offset: "50%", stopColor: "#FEFEFE" }),
26524
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("stop", { offset: "100%", stopColor: "rgba(255,255,255,0)" }),
26525
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
26052
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("stop", { offset: "0%", stopColor: "rgba(255,255,255,0)" }),
26053
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("stop", { offset: "50%", stopColor: "#FEFEFE" }),
26054
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("stop", { offset: "100%", stopColor: "rgba(255,255,255,0)" }),
26055
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
26526
26056
  "animate",
26527
26057
  {
26528
26058
  attributeName: "x1",
@@ -26532,7 +26062,7 @@ function ChartSkeleton({
26532
26062
  repeatCount: "indefinite"
26533
26063
  }
26534
26064
  ),
26535
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
26065
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
26536
26066
  "animate",
26537
26067
  {
26538
26068
  attributeName: "x2",
@@ -26545,7 +26075,7 @@ function ChartSkeleton({
26545
26075
  ]
26546
26076
  }
26547
26077
  ) }),
26548
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("rect", { width: "50%", height: "100%", fill: "url(#skeletonGradient)", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
26078
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("rect", { width: "50%", height: "100%", fill: "url(#skeletonGradient)", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
26549
26079
  "animate",
26550
26080
  {
26551
26081
  attributeName: "x",
@@ -26565,12 +26095,12 @@ function ChartSkeleton({
26565
26095
  }
26566
26096
 
26567
26097
  // src/hooks/useInternalState.tsx
26568
- var import_react7 = require("react");
26098
+ var import_react6 = require("react");
26569
26099
 
26570
26100
  // src/hooks/useOnClickOutside.tsx
26571
- var import_react8 = require("react");
26101
+ var import_react7 = require("react");
26572
26102
  var useOnClickOutside = (ref, handler, listening) => {
26573
- (0, import_react8.useEffect)(() => {
26103
+ (0, import_react7.useEffect)(() => {
26574
26104
  const listener = (event) => {
26575
26105
  if (!ref.current || ref.current.contains(event.target)) {
26576
26106
  return;
@@ -26611,13 +26141,13 @@ var createsStackingContext = (computedStyle) => {
26611
26141
  var useOnClickOutside_default = useOnClickOutside;
26612
26142
 
26613
26143
  // src/hooks/useOnWindowResize.tsx
26614
- var import_react9 = require("react");
26144
+ var import_react8 = require("react");
26615
26145
 
26616
26146
  // src/hooks/useSelectOnKeyDown.tsx
26617
- var import_react10 = require("react");
26147
+ var import_react9 = require("react");
26618
26148
 
26619
26149
  // src/hooks/useResponsiveFirstChildWidth.ts
26620
- var import_react11 = require("react");
26150
+ var import_react10 = require("react");
26621
26151
  var DEFAULT_MIN_WIDTH = 0;
26622
26152
  var parseNumericValue = (value) => {
26623
26153
  if (!value) {
@@ -26665,7 +26195,7 @@ var calculateFirstChildWidth = (element, options) => {
26665
26195
  const clampedWidth = max2 !== void 0 ? Math.min(Math.max(rawWidth, min2), max2) : Math.max(rawWidth, min2);
26666
26196
  return Math.floor(clampedWidth);
26667
26197
  };
26668
- var useIsomorphicLayoutEffect = typeof window !== "undefined" ? import_react11.useLayoutEffect : import_react11.useEffect;
26198
+ var useIsomorphicLayoutEffect = typeof window !== "undefined" ? import_react10.useLayoutEffect : import_react10.useEffect;
26669
26199
  var useResponsiveFirstChildWidth = (containerRef, options = {}) => {
26670
26200
  const {
26671
26201
  gap,
@@ -26673,8 +26203,8 @@ var useResponsiveFirstChildWidth = (containerRef, options = {}) => {
26673
26203
  minWidth = DEFAULT_MIN_WIDTH,
26674
26204
  maxWidth
26675
26205
  } = options;
26676
- const [width, setWidth] = (0, import_react11.useState)(initialWidth);
26677
- const previousWidthRef = (0, import_react11.useRef)(initialWidth);
26206
+ const [width, setWidth] = (0, import_react10.useState)(initialWidth);
26207
+ const previousWidthRef = (0, import_react10.useRef)(initialWidth);
26678
26208
  useIsomorphicLayoutEffect(() => {
26679
26209
  const element = containerRef?.current ?? null;
26680
26210
  if (!element || typeof window === "undefined") {
@@ -26770,8 +26300,8 @@ var getScrollableParent = (element) => {
26770
26300
  };
26771
26301
 
26772
26302
  // src/components/UiComponents.tsx
26773
- var import_jsx_runtime27 = require("react/jsx-runtime");
26774
- var QuillTextInput = (0, import_react12.forwardRef)(
26303
+ var import_jsx_runtime26 = require("react/jsx-runtime");
26304
+ var QuillTextInput = (0, import_react11.forwardRef)(
26775
26305
  ({
26776
26306
  id: id2,
26777
26307
  value,
@@ -26781,10 +26311,10 @@ var QuillTextInput = (0, import_react12.forwardRef)(
26781
26311
  onChange,
26782
26312
  disabled
26783
26313
  }, ref) => {
26784
- const [theme] = (0, import_react12.useContext)(ThemeContext);
26314
+ const [theme] = (0, import_react11.useContext)(ThemeContext);
26785
26315
  const isNumericWidth = typeof width === "number";
26786
26316
  const resolvedWidth = typeof width === "string" ? width : isNumericWidth ? width : "100%";
26787
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
26317
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
26788
26318
  "label",
26789
26319
  {
26790
26320
  style: {
@@ -26797,7 +26327,7 @@ var QuillTextInput = (0, import_react12.forwardRef)(
26797
26327
  flex: isNumericWidth ? "0 0 auto" : "1 1 auto"
26798
26328
  },
26799
26329
  children: [
26800
- label && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
26330
+ label && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
26801
26331
  "div",
26802
26332
  {
26803
26333
  style: {
@@ -26810,7 +26340,7 @@ var QuillTextInput = (0, import_react12.forwardRef)(
26810
26340
  children: label
26811
26341
  }
26812
26342
  ),
26813
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
26343
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
26814
26344
  "input",
26815
26345
  {
26816
26346
  ref,
@@ -26851,13 +26381,13 @@ var MemoizedButton = ({
26851
26381
  tooltipText,
26852
26382
  isLoading
26853
26383
  }) => {
26854
- const [theme] = (0, import_react12.useContext)(ThemeContext);
26855
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
26384
+ const [theme] = (0, import_react11.useContext)(ThemeContext);
26385
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
26856
26386
  QuillToolTipPortal,
26857
26387
  {
26858
26388
  enabled: !!tooltipText && tooltipText !== "",
26859
26389
  text: tooltipText ?? "",
26860
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
26390
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
26861
26391
  "button",
26862
26392
  {
26863
26393
  className: disabled ? "quill-button-disabled" : "quill-button",
@@ -26883,7 +26413,7 @@ var MemoizedButton = ({
26883
26413
  justifyContent: "center"
26884
26414
  },
26885
26415
  children: [
26886
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("style", { children: `
26416
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("style", { children: `
26887
26417
  .quill-button {
26888
26418
  background-color: ${theme?.primaryButtonColor};
26889
26419
  color: ${theme?.primaryButtonTextColor ?? "white"};
@@ -26897,8 +26427,8 @@ var MemoizedButton = ({
26897
26427
  background-color: ${theme?.hoverPrimaryButtonColor};
26898
26428
  color: ${theme?.hoverPrimaryButtonTextColor ?? "white"};
26899
26429
  }` }),
26900
- isLoading ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { style: { position: "absolute" }, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(LoadingSpinner, {}) }) : null,
26901
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
26430
+ isLoading ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { style: { position: "absolute" }, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(LoadingSpinner, {}) }) : null,
26431
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
26902
26432
  "div",
26903
26433
  {
26904
26434
  style: {
@@ -26924,13 +26454,13 @@ var MemoizedSecondaryButton = ({
26924
26454
  tooltipText,
26925
26455
  width
26926
26456
  }) => {
26927
- const [theme] = (0, import_react12.useContext)(ThemeContext);
26928
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
26457
+ const [theme] = (0, import_react11.useContext)(ThemeContext);
26458
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
26929
26459
  QuillToolTip,
26930
26460
  {
26931
26461
  enabled: !!tooltipText && tooltipText !== "",
26932
26462
  text: tooltipText ?? "",
26933
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
26463
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
26934
26464
  "button",
26935
26465
  {
26936
26466
  className: "quill-secondary-button",
@@ -26957,7 +26487,7 @@ var MemoizedSecondaryButton = ({
26957
26487
  },
26958
26488
  disabled,
26959
26489
  children: [
26960
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("style", { children: `
26490
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("style", { children: `
26961
26491
  .quill-secondary-button {
26962
26492
  background-color: white;
26963
26493
  }
@@ -26977,8 +26507,8 @@ var MemoizedSecondaryButton = ({
26977
26507
  flex-shrink: 0;
26978
26508
  }
26979
26509
  ` }),
26980
- icon && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "icon-container", children: icon }),
26981
- label && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
26510
+ icon && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "icon-container", children: icon }),
26511
+ label && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
26982
26512
  "span",
26983
26513
  {
26984
26514
  style: {
@@ -26998,8 +26528,8 @@ var MemoizedSecondaryButton = ({
26998
26528
  );
26999
26529
  };
27000
26530
  var MemoizedHeader = ({ label }) => {
27001
- const [theme] = (0, import_react12.useContext)(ThemeContext);
27002
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
26531
+ const [theme] = (0, import_react11.useContext)(ThemeContext);
26532
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
27003
26533
  "h1",
27004
26534
  {
27005
26535
  style: {
@@ -27016,8 +26546,8 @@ var MemoizedHeader = ({ label }) => {
27016
26546
  );
27017
26547
  };
27018
26548
  var MemoizedSubHeader = ({ label }) => {
27019
- const [theme] = (0, import_react12.useContext)(ThemeContext);
27020
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
26549
+ const [theme] = (0, import_react11.useContext)(ThemeContext);
26550
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
27021
26551
  "h2",
27022
26552
  {
27023
26553
  style: {
@@ -27035,8 +26565,8 @@ var MemoizedSubHeader = ({ label }) => {
27035
26565
  );
27036
26566
  };
27037
26567
  var MemoizedLabel = ({ label }) => {
27038
- const [theme] = (0, import_react12.useContext)(ThemeContext);
27039
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
26568
+ const [theme] = (0, import_react11.useContext)(ThemeContext);
26569
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
27040
26570
  "h1",
27041
26571
  {
27042
26572
  style: {
@@ -27058,8 +26588,8 @@ var MemoizedCheckbox = ({
27058
26588
  containerStyle,
27059
26589
  disabled
27060
26590
  }) => {
27061
- const [theme] = (0, import_react12.useContext)(ThemeContext);
27062
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
26591
+ const [theme] = (0, import_react11.useContext)(ThemeContext);
26592
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
27063
26593
  "label",
27064
26594
  {
27065
26595
  style: {
@@ -27072,7 +26602,7 @@ var MemoizedCheckbox = ({
27072
26602
  ...containerStyle
27073
26603
  },
27074
26604
  children: [
27075
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
26605
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
27076
26606
  "input",
27077
26607
  {
27078
26608
  type: "checkbox",
@@ -27087,7 +26617,7 @@ var MemoizedCheckbox = ({
27087
26617
  }
27088
26618
  }
27089
26619
  ),
27090
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
26620
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
27091
26621
  "span",
27092
26622
  {
27093
26623
  style: {
@@ -27116,7 +26646,7 @@ var QuillTabs = ({
27116
26646
  options = DEFAULT_TAB_OPTIONS,
27117
26647
  value,
27118
26648
  onChange
27119
- }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
26649
+ }) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
27120
26650
  "div",
27121
26651
  {
27122
26652
  style: {
@@ -27127,7 +26657,7 @@ var QuillTabs = ({
27127
26657
  background: "#F9FAFB",
27128
26658
  padding: "5px"
27129
26659
  },
27130
- children: options.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
26660
+ children: options.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
27131
26661
  "button",
27132
26662
  {
27133
26663
  onClick: () => {
@@ -27167,8 +26697,8 @@ var QuillTabs = ({
27167
26697
  }
27168
26698
  );
27169
26699
  var MemoizedText = ({ label }) => {
27170
- const [theme] = (0, import_react12.useContext)(ThemeContext);
27171
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
26700
+ const [theme] = (0, import_react11.useContext)(ThemeContext);
26701
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
27172
26702
  "p",
27173
26703
  {
27174
26704
  style: {
@@ -27198,11 +26728,11 @@ var MemoizedPopover = ({
27198
26728
  horizontalPadding = 20,
27199
26729
  titlePaddingLeft = 0
27200
26730
  }) => {
27201
- const [theme] = (0, import_react12.useContext)(ThemeContext);
27202
- const [rightAlignment, setRightAlignment] = (0, import_react12.useState)("auto");
27203
- const modalRef = (0, import_react12.useRef)(null);
27204
- const popoverRef = (0, import_react12.useRef)(null);
27205
- (0, import_react12.useEffect)(() => {
26731
+ const [theme] = (0, import_react11.useContext)(ThemeContext);
26732
+ const [rightAlignment, setRightAlignment] = (0, import_react11.useState)("auto");
26733
+ const modalRef = (0, import_react11.useRef)(null);
26734
+ const popoverRef = (0, import_react11.useRef)(null);
26735
+ (0, import_react11.useEffect)(() => {
27206
26736
  const listener = (event) => {
27207
26737
  const target = event.target;
27208
26738
  if (modalRef.current?.contains(target) || target.closest("[data-portal-ignore]") || ignoredRefs?.some(
@@ -27221,7 +26751,7 @@ var MemoizedPopover = ({
27221
26751
  document.removeEventListener("mousedown", listener);
27222
26752
  };
27223
26753
  }, [isOpen, ignoredRefs, setIsOpen, modalRef]);
27224
- (0, import_react12.useEffect)(() => {
26754
+ (0, import_react11.useEffect)(() => {
27225
26755
  updatePopoverPosition();
27226
26756
  window.addEventListener("resize", updatePopoverPosition);
27227
26757
  return () => {
@@ -27239,15 +26769,15 @@ var MemoizedPopover = ({
27239
26769
  }
27240
26770
  }
27241
26771
  };
27242
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { style: containerStyle, children: [
26772
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { style: containerStyle, children: [
27243
26773
  triggerLabel,
27244
- !disabled && isOpen && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
26774
+ !disabled && isOpen && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
27245
26775
  "div",
27246
26776
  {
27247
26777
  id: "quill-popover-modal",
27248
26778
  ref: modalRef,
27249
26779
  style: { position: "relative" },
27250
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
26780
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
27251
26781
  "div",
27252
26782
  {
27253
26783
  ref: popoverRef,
@@ -27264,7 +26794,7 @@ var MemoizedPopover = ({
27264
26794
  right: rightAlignment
27265
26795
  },
27266
26796
  children: [
27267
- popoverTitle && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
26797
+ popoverTitle && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
27268
26798
  "h1",
27269
26799
  {
27270
26800
  style: {
@@ -27296,12 +26826,12 @@ function MemoizedModal({
27296
26826
  width,
27297
26827
  height
27298
26828
  }) {
27299
- const [theme] = (0, import_react12.useContext)(ThemeContext);
26829
+ const [theme] = (0, import_react11.useContext)(ThemeContext);
27300
26830
  if (!isOpen) {
27301
26831
  return null;
27302
26832
  }
27303
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
27304
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
26833
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
26834
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
27305
26835
  "div",
27306
26836
  {
27307
26837
  style: {
@@ -27317,7 +26847,7 @@ function MemoizedModal({
27317
26847
  onClick: () => setIsOpen(false)
27318
26848
  }
27319
26849
  ),
27320
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
26850
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
27321
26851
  "div",
27322
26852
  {
27323
26853
  style: {
@@ -27340,7 +26870,7 @@ function MemoizedModal({
27340
26870
  maxWidth: "calc(100vw - 82px)",
27341
26871
  maxHeight: "calc(100vh - 82px)"
27342
26872
  },
27343
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
26873
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
27344
26874
  "div",
27345
26875
  {
27346
26876
  style: {
@@ -27354,7 +26884,7 @@ function MemoizedModal({
27354
26884
  fontFamily: theme?.fontFamily
27355
26885
  },
27356
26886
  children: [
27357
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
26887
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
27358
26888
  "div",
27359
26889
  {
27360
26890
  id: "quill-modal-header",
@@ -27369,7 +26899,7 @@ function MemoizedModal({
27369
26899
  borderBottom: "1px solid #E7E7E7"
27370
26900
  },
27371
26901
  children: [
27372
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
26902
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
27373
26903
  "h2",
27374
26904
  {
27375
26905
  style: {
@@ -27383,11 +26913,11 @@ function MemoizedModal({
27383
26913
  children: title
27384
26914
  }
27385
26915
  ),
27386
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(MemoizedDeleteButton, { onClick: () => setIsOpen(false) })
26916
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(MemoizedDeleteButton, { onClick: () => setIsOpen(false) })
27387
26917
  ]
27388
26918
  }
27389
26919
  ),
27390
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
26920
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
27391
26921
  "div",
27392
26922
  {
27393
26923
  style: {
@@ -27408,7 +26938,7 @@ function MemoizedModal({
27408
26938
  }
27409
26939
  var MemoizedDeleteButton = ({
27410
26940
  onClick
27411
- }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
26941
+ }) => /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
27412
26942
  "button",
27413
26943
  {
27414
26944
  className: "quill-delete-button",
@@ -27425,18 +26955,18 @@ var MemoizedDeleteButton = ({
27425
26955
  borderRadius: 6
27426
26956
  },
27427
26957
  children: [
27428
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("style", { children: `
26958
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("style", { children: `
27429
26959
  .quill-delete-button {
27430
26960
  background-color: white;
27431
26961
  }
27432
26962
  .quill-delete-button:hover {
27433
26963
  background-color: #F4F4F5;
27434
26964
  }` }),
27435
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(XIcon_default, { height: "20", width: "20", fill: "#6C727F" })
26965
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(XIcon_default, { height: "20", width: "20", fill: "#6C727F" })
27436
26966
  ]
27437
26967
  }
27438
26968
  );
27439
- var LoadingSpinner = () => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
26969
+ var LoadingSpinner = () => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
27440
26970
  "div",
27441
26971
  {
27442
26972
  style: {
@@ -27447,8 +26977,8 @@ var LoadingSpinner = () => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
27447
26977
  justifyContent: "center",
27448
26978
  alignItems: "center"
27449
26979
  },
27450
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("svg", { width: "24", height: "24", children: [
27451
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
26980
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("svg", { width: "24", height: "24", children: [
26981
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
27452
26982
  "circle",
27453
26983
  {
27454
26984
  cx: "12",
@@ -27460,7 +26990,7 @@ var LoadingSpinner = () => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
27460
26990
  stroke: "#364153",
27461
26991
  fill: "none",
27462
26992
  transform: "rotate(-90 12 12)",
27463
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
26993
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
27464
26994
  "animateTransform",
27465
26995
  {
27466
26996
  attributeName: "transform",
@@ -27474,7 +27004,7 @@ var LoadingSpinner = () => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
27474
27004
  )
27475
27005
  }
27476
27006
  ),
27477
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
27007
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
27478
27008
  "circle",
27479
27009
  {
27480
27010
  cx: "12",
@@ -27486,7 +27016,7 @@ var LoadingSpinner = () => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
27486
27016
  stroke: "#ADB1B9",
27487
27017
  fill: "none",
27488
27018
  transform: "rotate(90 12 12)",
27489
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
27019
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
27490
27020
  "animateTransform",
27491
27021
  {
27492
27022
  attributeName: "transform",
@@ -27503,7 +27033,7 @@ var LoadingSpinner = () => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
27503
27033
  ] })
27504
27034
  }
27505
27035
  );
27506
- var QuillEmptyDashboardComponent = () => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", {});
27036
+ var QuillEmptyDashboardComponent = () => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", {});
27507
27037
  var defaultFilterContainerStyles = {
27508
27038
  display: "flex",
27509
27039
  width: "100%",
@@ -27515,9 +27045,9 @@ var QuillLoadingDashboardComponent = ({
27515
27045
  chartContainerStyle,
27516
27046
  LoadingComponent = QuillLoadingSkeleton
27517
27047
  }) => {
27518
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { style: { ...containerStyle, overflow: "hidden" }, children: [
27519
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { style: defaultFilterContainerStyles, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(LoadingComponent, {}) }),
27520
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
27048
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { style: { ...containerStyle, overflow: "hidden" }, children: [
27049
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { style: defaultFilterContainerStyles, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(LoadingComponent, {}) }),
27050
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
27521
27051
  "div",
27522
27052
  {
27523
27053
  style: {
@@ -27526,7 +27056,7 @@ var QuillLoadingDashboardComponent = ({
27526
27056
  gridTemplateRows: `repeat(${170}px)`,
27527
27057
  gap: 40
27528
27058
  },
27529
- children: Array.from({ length: 4 }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { style: chartContainerStyle, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(LoadingComponent, {}, index) }, index))
27059
+ children: Array.from({ length: 4 }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { style: chartContainerStyle, children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(LoadingComponent, {}, index) }, index))
27530
27060
  }
27531
27061
  )
27532
27062
  ] });
@@ -27534,7 +27064,7 @@ var QuillLoadingDashboardComponent = ({
27534
27064
  var QuillChartBuilderInputRowContainer = ({
27535
27065
  children
27536
27066
  }) => {
27537
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
27067
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
27538
27068
  "div",
27539
27069
  {
27540
27070
  style: {
@@ -27549,7 +27079,7 @@ var QuillChartBuilderInputRowContainer = ({
27549
27079
  var QuillChartBuilderInputColumnContainer = ({
27550
27080
  children
27551
27081
  }) => {
27552
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
27082
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
27553
27083
  "div",
27554
27084
  {
27555
27085
  style: {
@@ -27564,7 +27094,7 @@ var QuillChartBuilderInputColumnContainer = ({
27564
27094
  var QuillPivotRowContainer = ({
27565
27095
  children
27566
27096
  }) => {
27567
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
27097
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
27568
27098
  "div",
27569
27099
  {
27570
27100
  style: {
@@ -27579,7 +27109,7 @@ var QuillPivotRowContainer = ({
27579
27109
  var QuillPivotColumnContainer = ({
27580
27110
  children
27581
27111
  }) => {
27582
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
27112
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
27583
27113
  "div",
27584
27114
  {
27585
27115
  style: {
@@ -27594,7 +27124,7 @@ var QuillPivotColumnContainer = ({
27594
27124
  var QuillFilterContainerComponent = ({
27595
27125
  children
27596
27126
  }) => {
27597
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
27127
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
27598
27128
  "div",
27599
27129
  {
27600
27130
  style: {
@@ -27617,11 +27147,11 @@ var QuillModalComponent = ({
27617
27147
  triggerLabel,
27618
27148
  title
27619
27149
  }) => {
27620
- const [theme] = (0, import_react12.useContext)(ThemeContext);
27621
- const [rightAlignment, setRightAlignment] = (0, import_react12.useState)("auto");
27622
- const modalRef = (0, import_react12.useRef)(null);
27623
- const popoverRef = (0, import_react12.useRef)(null);
27624
- (0, import_react12.useEffect)(() => {
27150
+ const [theme] = (0, import_react11.useContext)(ThemeContext);
27151
+ const [rightAlignment, setRightAlignment] = (0, import_react11.useState)("auto");
27152
+ const modalRef = (0, import_react11.useRef)(null);
27153
+ const popoverRef = (0, import_react11.useRef)(null);
27154
+ (0, import_react11.useEffect)(() => {
27625
27155
  const listener = (event) => {
27626
27156
  if (modalRef?.current && !modalRef?.current?.contains(event.target)) {
27627
27157
  if (setIsOpen) setIsOpen(false);
@@ -27636,7 +27166,7 @@ var QuillModalComponent = ({
27636
27166
  document.removeEventListener("mousedown", listener);
27637
27167
  };
27638
27168
  }, [modalRef, setIsOpen, isOpen]);
27639
- (0, import_react12.useEffect)(() => {
27169
+ (0, import_react11.useEffect)(() => {
27640
27170
  updatePopoverPosition();
27641
27171
  window.addEventListener("resize", updatePopoverPosition);
27642
27172
  return () => {
@@ -27654,8 +27184,8 @@ var QuillModalComponent = ({
27654
27184
  }
27655
27185
  }
27656
27186
  };
27657
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { style: { position: "relative" }, ref: modalRef, children: [
27658
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
27187
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { style: { position: "relative" }, ref: modalRef, children: [
27188
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
27659
27189
  MemoizedSecondaryButton,
27660
27190
  {
27661
27191
  onClick: () => {
@@ -27664,12 +27194,12 @@ var QuillModalComponent = ({
27664
27194
  label: triggerLabel || ""
27665
27195
  }
27666
27196
  ),
27667
- title && title === "Filters" ? isOpen && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
27197
+ title && title === "Filters" ? isOpen && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
27668
27198
  "div",
27669
27199
  {
27670
27200
  id: "quill-popover-modal",
27671
27201
  style: { position: "relative", top: 10 },
27672
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
27202
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
27673
27203
  "div",
27674
27204
  {
27675
27205
  ref: popoverRef,
@@ -27686,7 +27216,7 @@ var QuillModalComponent = ({
27686
27216
  right: rightAlignment
27687
27217
  },
27688
27218
  children: [
27689
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
27219
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
27690
27220
  "h1",
27691
27221
  {
27692
27222
  style: {
@@ -27706,8 +27236,8 @@ var QuillModalComponent = ({
27706
27236
  }
27707
27237
  )
27708
27238
  }
27709
- ) : isOpen && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { children: [
27710
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
27239
+ ) : isOpen && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { children: [
27240
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
27711
27241
  "div",
27712
27242
  {
27713
27243
  style: {
@@ -27725,7 +27255,7 @@ var QuillModalComponent = ({
27725
27255
  }
27726
27256
  }
27727
27257
  ),
27728
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
27258
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
27729
27259
  "div",
27730
27260
  {
27731
27261
  style: {
@@ -27746,7 +27276,7 @@ var QuillModalComponent = ({
27746
27276
  padding: 30,
27747
27277
  overflow: "auto"
27748
27278
  },
27749
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
27279
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
27750
27280
  "div",
27751
27281
  {
27752
27282
  style: {
@@ -27755,7 +27285,7 @@ var QuillModalComponent = ({
27755
27285
  minWidth: "60vw"
27756
27286
  },
27757
27287
  children: [
27758
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
27288
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
27759
27289
  "h1",
27760
27290
  {
27761
27291
  style: {
@@ -27782,7 +27312,7 @@ var QuillModalComponent = ({
27782
27312
  var QuillChartBuilderFormContainer = ({
27783
27313
  children
27784
27314
  }) => {
27785
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
27315
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
27786
27316
  "div",
27787
27317
  {
27788
27318
  style: {
@@ -27804,8 +27334,8 @@ var QuillErrorMessageComponent = ({
27804
27334
  errorMessage,
27805
27335
  containerStyle
27806
27336
  }) => {
27807
- const [theme] = (0, import_react12.useContext)(ThemeContext);
27808
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
27337
+ const [theme] = (0, import_react11.useContext)(ThemeContext);
27338
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
27809
27339
  "div",
27810
27340
  {
27811
27341
  style: {
@@ -27823,7 +27353,7 @@ var QuillErrorMessageComponent = ({
27823
27353
  ...containerStyle
27824
27354
  },
27825
27355
  children: [
27826
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
27356
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
27827
27357
  "svg",
27828
27358
  {
27829
27359
  xmlns: "http://www.w3.org/2000/svg",
@@ -27837,7 +27367,7 @@ var QuillErrorMessageComponent = ({
27837
27367
  marginRight: 8,
27838
27368
  color: "#D32F2F"
27839
27369
  },
27840
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
27370
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
27841
27371
  "path",
27842
27372
  {
27843
27373
  strokeLinecap: "round",
@@ -27853,12 +27383,12 @@ var QuillErrorMessageComponent = ({
27853
27383
  );
27854
27384
  };
27855
27385
  var QuillColumnSearchEmptyState = () => {
27856
- const [theme] = (0, import_react12.useContext)(ThemeContext);
27857
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { style: { fontFamily: theme?.fontFamily }, children: "No results found" });
27386
+ const [theme] = (0, import_react11.useContext)(ThemeContext);
27387
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { style: { fontFamily: theme?.fontFamily }, children: "No results found" });
27858
27388
  };
27859
27389
  var QuillLoadingComponent = () => {
27860
- const [theme] = (0, import_react12.useContext)(ThemeContext);
27861
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
27390
+ const [theme] = (0, import_react11.useContext)(ThemeContext);
27391
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
27862
27392
  "div",
27863
27393
  {
27864
27394
  style: {
@@ -27873,9 +27403,9 @@ var QuillLoadingComponent = () => {
27873
27403
  justifyContent: "center"
27874
27404
  },
27875
27405
  children: [
27876
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { style: { height: 100 } }),
27877
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("svg", { width: "24", height: "24", children: [
27878
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
27406
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { style: { height: 100 } }),
27407
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("svg", { width: "24", height: "24", children: [
27408
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
27879
27409
  "circle",
27880
27410
  {
27881
27411
  cx: "12",
@@ -27887,7 +27417,7 @@ var QuillLoadingComponent = () => {
27887
27417
  stroke: theme?.primaryTextColor || "#364153",
27888
27418
  fill: "none",
27889
27419
  transform: "rotate(-90 12 12)",
27890
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
27420
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
27891
27421
  "animateTransform",
27892
27422
  {
27893
27423
  attributeName: "transform",
@@ -27901,7 +27431,7 @@ var QuillLoadingComponent = () => {
27901
27431
  )
27902
27432
  }
27903
27433
  ),
27904
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
27434
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
27905
27435
  "circle",
27906
27436
  {
27907
27437
  cx: "12",
@@ -27913,7 +27443,7 @@ var QuillLoadingComponent = () => {
27913
27443
  stroke: "#ADB1B9",
27914
27444
  fill: "none",
27915
27445
  transform: "rotate(90 12 12)",
27916
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
27446
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
27917
27447
  "animateTransform",
27918
27448
  {
27919
27449
  attributeName: "transform",
@@ -27936,9 +27466,9 @@ var OverflowContainer = ({
27936
27466
  children,
27937
27467
  style: style2
27938
27468
  }) => {
27939
- const containerRef = (0, import_react12.useRef)(null);
27940
- const [showTopShadow, setShowTopShadow] = (0, import_react12.useState)(false);
27941
- const [showBottomShadow, setShowBottomShadow] = (0, import_react12.useState)(false);
27469
+ const containerRef = (0, import_react11.useRef)(null);
27470
+ const [showTopShadow, setShowTopShadow] = (0, import_react11.useState)(false);
27471
+ const [showBottomShadow, setShowBottomShadow] = (0, import_react11.useState)(false);
27942
27472
  const checkOverflow = () => {
27943
27473
  const container = containerRef.current;
27944
27474
  if (container) {
@@ -27949,7 +27479,7 @@ var OverflowContainer = ({
27949
27479
  );
27950
27480
  }
27951
27481
  };
27952
- (0, import_react12.useEffect)(() => {
27482
+ (0, import_react11.useEffect)(() => {
27953
27483
  const container = containerRef.current;
27954
27484
  if (container) {
27955
27485
  checkOverflow();
@@ -28003,7 +27533,7 @@ var OverflowContainer = ({
28003
27533
  opacity: showBottomShadow ? 1 : 0,
28004
27534
  ...shadowStyle
28005
27535
  };
28006
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
27536
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
28007
27537
  "div",
28008
27538
  {
28009
27539
  style: containerStyle,
@@ -28012,9 +27542,9 @@ var OverflowContainer = ({
28012
27542
  onTouchMove: checkOverflow,
28013
27543
  onMouseMove: checkOverflow,
28014
27544
  children: [
28015
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { style: topShadowStyle }),
27545
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { style: topShadowStyle }),
28016
27546
  children,
28017
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { style: bottomShadowStyle })
27547
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { style: bottomShadowStyle })
28018
27548
  ]
28019
27549
  }
28020
27550
  );
@@ -28027,9 +27557,9 @@ var QuillToolTip = ({
28027
27557
  textStyle = {},
28028
27558
  displayBelow = false
28029
27559
  }) => {
28030
- const [theme] = (0, import_react12.useContext)(ThemeContext);
28031
- return enabled ? /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { className: "tooltip-container", style: { ...containerStyle }, children: [
28032
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("style", { children: `
27560
+ const [theme] = (0, import_react11.useContext)(ThemeContext);
27561
+ return enabled ? /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "tooltip-container", style: { ...containerStyle }, children: [
27562
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("style", { children: `
28033
27563
  .tooltip-container {
28034
27564
  position: relative;
28035
27565
  display: inline-block;
@@ -28091,7 +27621,7 @@ var QuillToolTip = ({
28091
27621
  opacity: 1;
28092
27622
  }` }),
28093
27623
  children,
28094
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { className: "tooltip-text", style: { ...textStyle }, children: text })
27624
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "tooltip-text", style: { ...textStyle }, children: text })
28095
27625
  ] }) : children;
28096
27626
  };
28097
27627
  var QuillToolTipPortal = ({
@@ -28102,11 +27632,11 @@ var QuillToolTipPortal = ({
28102
27632
  textStyle = {},
28103
27633
  mirror = false
28104
27634
  }) => {
28105
- const [theme] = (0, import_react12.useContext)(ThemeContext);
28106
- const [isOpen, setIsOpen] = (0, import_react12.useState)(false);
28107
- const tooltipRef = (0, import_react12.useRef)(null);
28108
- const triggerRef = (0, import_react12.useRef)(null);
28109
- const [tooltipPosition, setTooltipPosition] = (0, import_react12.useState)(void 0);
27635
+ const [theme] = (0, import_react11.useContext)(ThemeContext);
27636
+ const [isOpen, setIsOpen] = (0, import_react11.useState)(false);
27637
+ const tooltipRef = (0, import_react11.useRef)(null);
27638
+ const triggerRef = (0, import_react11.useRef)(null);
27639
+ const [tooltipPosition, setTooltipPosition] = (0, import_react11.useState)(void 0);
28110
27640
  const updatePosition = () => {
28111
27641
  if (triggerRef.current && tooltipRef.current) {
28112
27642
  const rect = triggerRef.current.getBoundingClientRect();
@@ -28131,7 +27661,7 @@ var QuillToolTipPortal = ({
28131
27661
  setTooltipPosition({ top, left });
28132
27662
  }
28133
27663
  };
28134
- (0, import_react12.useEffect)(() => {
27664
+ (0, import_react11.useEffect)(() => {
28135
27665
  if (isOpen) {
28136
27666
  const timer2 = setTimeout(() => {
28137
27667
  updatePosition();
@@ -28146,9 +27676,9 @@ var QuillToolTipPortal = ({
28146
27676
  }
28147
27677
  }, [isOpen]);
28148
27678
  if (!enabled) {
28149
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_jsx_runtime27.Fragment, { children });
27679
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jsx_runtime26.Fragment, { children });
28150
27680
  }
28151
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
27681
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
28152
27682
  "div",
28153
27683
  {
28154
27684
  ref: triggerRef,
@@ -28162,7 +27692,7 @@ var QuillToolTipPortal = ({
28162
27692
  children: [
28163
27693
  children,
28164
27694
  isOpen && (0, import_react_dom2.createPortal)(
28165
- /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
27695
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
28166
27696
  "div",
28167
27697
  {
28168
27698
  ref: tooltipRef,
@@ -28189,7 +27719,7 @@ var QuillToolTipPortal = ({
28189
27719
  },
28190
27720
  children: [
28191
27721
  text,
28192
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
27722
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
28193
27723
  "div",
28194
27724
  {
28195
27725
  style: {
@@ -28204,7 +27734,7 @@ var QuillToolTipPortal = ({
28204
27734
  }
28205
27735
  }
28206
27736
  ),
28207
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
27737
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
28208
27738
  "div",
28209
27739
  {
28210
27740
  style: {
@@ -28235,8 +27765,8 @@ var QuillChartBuilderCheckboxComponent = ({
28235
27765
  disabled,
28236
27766
  containerStyle
28237
27767
  }) => {
28238
- const [theme] = (0, import_react12.useContext)(ThemeContext);
28239
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
27768
+ const [theme] = (0, import_react11.useContext)(ThemeContext);
27769
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
28240
27770
  "div",
28241
27771
  {
28242
27772
  style: {
@@ -28245,7 +27775,7 @@ var QuillChartBuilderCheckboxComponent = ({
28245
27775
  paddingBottom: 4,
28246
27776
  paddingLeft: 8,
28247
27777
  paddingRight: 8,
28248
- border: "1px solid #E7E7E7",
27778
+ // border: '1px solid #E7E7E7',
28249
27779
  borderRadius: 4,
28250
27780
  display: "flex",
28251
27781
  alignItems: "center",
@@ -28254,7 +27784,7 @@ var QuillChartBuilderCheckboxComponent = ({
28254
27784
  pointerEvents: disabled ? "none" : "auto",
28255
27785
  ...containerStyle
28256
27786
  },
28257
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
27787
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
28258
27788
  MemoizedCheckbox,
28259
27789
  {
28260
27790
  isChecked,
@@ -28274,10 +27804,10 @@ var QuillPortal = ({
28274
27804
  showModal,
28275
27805
  setShowModal
28276
27806
  }) => {
28277
- const modalRef = (0, import_react12.useRef)(null);
28278
- const [popoverPosition, setPopoverPosition] = (0, import_react12.useState)(void 0);
28279
- const [z, setZ] = (0, import_react12.useState)(10);
28280
- const scrollableParentRef = (0, import_react12.useRef)(document.body);
27807
+ const modalRef = (0, import_react11.useRef)(null);
27808
+ const [popoverPosition, setPopoverPosition] = (0, import_react11.useState)(void 0);
27809
+ const [z, setZ] = (0, import_react11.useState)(10);
27810
+ const scrollableParentRef = (0, import_react11.useRef)(document.body);
28281
27811
  const updatePosition = () => {
28282
27812
  if (anchorRef.current) {
28283
27813
  requestAnimationFrame(() => {
@@ -28295,7 +27825,7 @@ var QuillPortal = ({
28295
27825
  });
28296
27826
  }
28297
27827
  };
28298
- (0, import_react12.useEffect)(() => {
27828
+ (0, import_react11.useEffect)(() => {
28299
27829
  let resizeObserver;
28300
27830
  let mutationObserver;
28301
27831
  if (showModal && anchorRef.current) {
@@ -28334,7 +27864,7 @@ var QuillPortal = ({
28334
27864
  showModal
28335
27865
  );
28336
27866
  return (0, import_react_dom2.createPortal)(
28337
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
27867
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
28338
27868
  "div",
28339
27869
  {
28340
27870
  style: {
@@ -28369,8 +27899,645 @@ var QuillPortal = ({
28369
27899
  );
28370
27900
  };
28371
27901
 
28372
- // src/components/QuillTable.tsx
27902
+ // src/components/Chart/CustomLegend.tsx
27903
+ var import_jsx_runtime27 = require("react/jsx-runtime");
27904
+ var getLegendLabel = (entry) => {
27905
+ const label = entry?.payload?.name ?? entry?.value ?? entry?.dataKey ?? "";
27906
+ return typeof label === "string" ? label : String(label ?? "");
27907
+ };
27908
+ var LegendItem = ({
27909
+ entry,
27910
+ index,
27911
+ theme
27912
+ }) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
27913
+ "div",
27914
+ {
27915
+ style: {
27916
+ display: "flex",
27917
+ alignItems: "baseline",
27918
+ marginRight: "1rem"
27919
+ },
27920
+ children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("div", { style: { display: "flex", flexDirection: "row", alignItems: "center" }, children: [
27921
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
27922
+ "svg",
27923
+ {
27924
+ style: { marginRight: "0.5rem" },
27925
+ width: "16",
27926
+ height: "16",
27927
+ viewBox: "0 0 16 16",
27928
+ children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("rect", { width: "16", height: "16", rx: "3", fill: entry?.color })
27929
+ }
27930
+ ),
27931
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
27932
+ "span",
27933
+ {
27934
+ style: {
27935
+ color: theme?.secondaryTextColor,
27936
+ fontFamily: theme?.fontFamily,
27937
+ fontSize: theme?.fontSizeMedium || "14px",
27938
+ whiteSpace: "nowrap"
27939
+ },
27940
+ children: getLegendLabel(entry)
27941
+ }
27942
+ )
27943
+ ] })
27944
+ },
27945
+ `legend-${index}`
27946
+ );
27947
+ var getOuterWidth = (element) => {
27948
+ if (!element) return 0;
27949
+ const rect = element.getBoundingClientRect();
27950
+ const styles = window.getComputedStyle(element);
27951
+ const marginLeft = Number.parseFloat(styles.marginLeft || "0");
27952
+ const marginRight = Number.parseFloat(styles.marginRight || "0");
27953
+ return rect.width + marginLeft + marginRight;
27954
+ };
27955
+ var RenderLegend = ({
27956
+ payload,
27957
+ limit
27958
+ }) => {
27959
+ const [theme] = (0, import_react12.useContext)(ThemeContext);
27960
+ const [isOpen, setIsOpen] = (0, import_react12.useState)(false);
27961
+ const [showSeeAll, setShowSeeAll] = (0, import_react12.useState)(false);
27962
+ const [visibleCount, setVisibleCount] = (0, import_react12.useState)(null);
27963
+ const containerRef = (0, import_react12.useRef)(null);
27964
+ const seeAllMeasureRef = (0, import_react12.useRef)(null);
27965
+ const seeAllTriggerRef = (0, import_react12.useRef)(null);
27966
+ const itemRefs = (0, import_react12.useRef)([]);
27967
+ if (!payload || payload.length === 0) return null;
27968
+ const maxItems = limit ?? payload.length;
27969
+ const measuredLimit = visibleCount ?? maxItems;
27970
+ const visiblePayload = payload.slice(0, Math.min(maxItems, measuredLimit));
27971
+ const handleOpen = () => setIsOpen(true);
27972
+ const handleClose = () => setIsOpen(false);
27973
+ (0, import_react12.useLayoutEffect)(() => {
27974
+ if (!containerRef.current) return;
27975
+ if (!payload.length) return;
27976
+ const updateVisibleCount = () => {
27977
+ const containerWidth = containerRef.current?.offsetWidth ?? 0;
27978
+ if (!containerWidth) return;
27979
+ const maxCount = Math.min(maxItems, payload.length);
27980
+ const seeAllWidth = getOuterWidth(seeAllMeasureRef.current);
27981
+ const computeCount = (reserveSeeAll) => {
27982
+ const availableWidth = containerWidth - (reserveSeeAll ? seeAllWidth : 0);
27983
+ if (availableWidth <= 0) return 1;
27984
+ let totalWidth = 0;
27985
+ let nextCount = 0;
27986
+ for (let i = 0; i < maxCount; i += 1) {
27987
+ const itemWidth = getOuterWidth(itemRefs.current[i] ?? null);
27988
+ if (totalWidth + itemWidth > availableWidth) break;
27989
+ totalWidth += itemWidth;
27990
+ nextCount = i + 1;
27991
+ }
27992
+ return Math.max(1, nextCount);
27993
+ };
27994
+ const countWithSeeAll = computeCount(true);
27995
+ const shouldShowSeeAll = payload.length > countWithSeeAll;
27996
+ const finalCount = shouldShowSeeAll ? countWithSeeAll : computeCount(false);
27997
+ setShowSeeAll(shouldShowSeeAll);
27998
+ setVisibleCount(finalCount);
27999
+ };
28000
+ updateVisibleCount();
28001
+ const observer = new ResizeObserver(updateVisibleCount);
28002
+ observer.observe(containerRef.current);
28003
+ return () => observer.disconnect();
28004
+ }, [payload.length, maxItems]);
28005
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
28006
+ "div",
28007
+ {
28008
+ ref: containerRef,
28009
+ style: {
28010
+ display: "flex",
28011
+ flexDirection: "row",
28012
+ justifyContent: "space-between",
28013
+ alignItems: "center",
28014
+ flexWrap: "nowrap",
28015
+ width: "100%"
28016
+ },
28017
+ children: [
28018
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
28019
+ "div",
28020
+ {
28021
+ style: {
28022
+ position: "absolute",
28023
+ visibility: "hidden",
28024
+ height: 0,
28025
+ overflow: "hidden",
28026
+ pointerEvents: "none",
28027
+ display: "flex",
28028
+ alignItems: "center",
28029
+ flexWrap: "nowrap",
28030
+ justifyContent: "space-between",
28031
+ width: "100%"
28032
+ },
28033
+ children: [
28034
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
28035
+ "div",
28036
+ {
28037
+ style: {
28038
+ display: "flex",
28039
+ flexDirection: "row",
28040
+ alignItems: "center",
28041
+ justifyContent: "flex-start",
28042
+ flexWrap: "nowrap"
28043
+ },
28044
+ children: payload.slice(0, maxItems).map((entry, index) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
28045
+ "div",
28046
+ {
28047
+ ref: (element) => {
28048
+ itemRefs.current[index] = element;
28049
+ },
28050
+ children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(LegendItem, { entry, index, theme })
28051
+ },
28052
+ `legend-measure-${index}`
28053
+ ))
28054
+ }
28055
+ ),
28056
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
28057
+ "div",
28058
+ {
28059
+ ref: seeAllMeasureRef,
28060
+ style: {
28061
+ color: theme?.secondaryTextColor,
28062
+ fontSize: theme?.fontSizeMedium || "14px",
28063
+ fontFamily: theme?.fontFamily,
28064
+ marginLeft: 10,
28065
+ display: "flex",
28066
+ alignItems: "baseline",
28067
+ flexShrink: 0,
28068
+ whiteSpace: "nowrap"
28069
+ },
28070
+ children: "See all"
28071
+ }
28072
+ )
28073
+ ]
28074
+ }
28075
+ ),
28076
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
28077
+ "div",
28078
+ {
28079
+ style: {
28080
+ display: "flex",
28081
+ flexDirection: "row",
28082
+ alignItems: "center",
28083
+ justifyContent: "flex-start",
28084
+ flexWrap: "nowrap"
28085
+ },
28086
+ children: visiblePayload.map((entry, index) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
28087
+ LegendItem,
28088
+ {
28089
+ entry,
28090
+ index,
28091
+ theme
28092
+ },
28093
+ `legend-${index}`
28094
+ ))
28095
+ }
28096
+ ),
28097
+ showSeeAll && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("div", { onMouseEnter: handleOpen, onMouseLeave: handleClose, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
28098
+ MemoizedPopover,
28099
+ {
28100
+ isOpen,
28101
+ setIsOpen,
28102
+ triggerLabel: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
28103
+ "div",
28104
+ {
28105
+ ref: seeAllTriggerRef,
28106
+ onClick: handleOpen,
28107
+ onMouseEnter: handleOpen,
28108
+ style: {
28109
+ cursor: "pointer",
28110
+ color: theme?.secondaryTextColor,
28111
+ fontSize: theme?.fontSizeMedium || "14px",
28112
+ fontFamily: theme?.fontFamily,
28113
+ marginLeft: 10,
28114
+ display: "flex",
28115
+ alignItems: "baseline",
28116
+ flexShrink: 0,
28117
+ whiteSpace: "nowrap"
28118
+ },
28119
+ children: "See all"
28120
+ }
28121
+ ),
28122
+ popoverChildren: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
28123
+ "div",
28124
+ {
28125
+ style: {
28126
+ display: "flex",
28127
+ flexWrap: "wrap",
28128
+ alignItems: "center",
28129
+ minWidth: 260,
28130
+ maxWidth: 520,
28131
+ gap: "0.5rem"
28132
+ },
28133
+ children: payload.map((entry, index) => /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
28134
+ LegendItem,
28135
+ {
28136
+ entry,
28137
+ index,
28138
+ theme
28139
+ },
28140
+ `legend-popover-${index}`
28141
+ ))
28142
+ }
28143
+ )
28144
+ }
28145
+ ) })
28146
+ ]
28147
+ }
28148
+ );
28149
+ };
28150
+
28151
+ // src/components/Chart/PieChart.tsx
28373
28152
  var import_jsx_runtime28 = require("react/jsx-runtime");
28153
+ var defaultValueFormatter = (value) => (value * 1).toFixed(1) + "%";
28154
+ var parseData2 = (data, colors, categoryKey, valueKey) => {
28155
+ const maxItems = 20;
28156
+ const slicedData = deepCopy(data).slice(0, maxItems);
28157
+ const totalValue = slicedData.reduce(
28158
+ (acc, dataPoint) => (
28159
+ // Big(acc)
28160
+ // .add(Big(Number(dataPoint[valueKey]) ?? 0))
28161
+ // .toNumber(),
28162
+ acc + parseFloat(dataPoint[valueKey] ?? "0")
28163
+ ),
28164
+ 0
28165
+ );
28166
+ slicedData.forEach((dataPoint) => {
28167
+ const rawValue = parseFloat(dataPoint[valueKey] ?? "0");
28168
+ dataPoint[valueKey] = totalValue ? rawValue * 100 / totalValue : data.length > maxItems ? 100 / (maxItems + 1) : 100 / slicedData.length;
28169
+ dataPoint[`raw_${valueKey}`] = parseFloat(rawValue.toFixed(2));
28170
+ });
28171
+ const parsedData = slicedData.map((dataPoint, idx) => {
28172
+ const baseColor = colors.length > 0 ? idx < colors.length ? colors[idx] : colors[colors.length - 1] : "#808080";
28173
+ return {
28174
+ ...dataPoint,
28175
+ color: baseColor,
28176
+ fill: baseColor
28177
+ };
28178
+ });
28179
+ if (data.length > maxItems) {
28180
+ const otherData = data.slice(maxItems);
28181
+ const otherSum = otherData.reduce(
28182
+ (acc, dataPoint) => (
28183
+ // Big(acc)
28184
+ // .add(Big(Number(dataPoint[valueKey])) ?? 0)
28185
+ // .toNumber(),
28186
+ acc + parseFloat(dataPoint[valueKey] ?? "0")
28187
+ ),
28188
+ 0
28189
+ );
28190
+ const otherColor = colors.length > 0 ? colors[colors.length - 1] : "#808080";
28191
+ const normalizedOtherSum = totalValue ? otherSum * 100 / totalValue : 100 / (maxItems + 1);
28192
+ parsedData.push({
28193
+ [categoryKey]: "Other",
28194
+ [valueKey]: normalizedOtherSum,
28195
+ [`raw_${valueKey}`]: parseFloat(otherSum.toFixed(2)),
28196
+ color: otherColor,
28197
+ fill: otherColor
28198
+ });
28199
+ }
28200
+ return parsedData;
28201
+ };
28202
+ var ChartTooltipFrame = ({
28203
+ children,
28204
+ theme
28205
+ }) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
28206
+ "div",
28207
+ {
28208
+ style: {
28209
+ borderStyle: "solid",
28210
+ borderColor: theme?.borderColor || "#E5E7EB",
28211
+ borderWidth: 1,
28212
+ background: theme?.backgroundColor || "#ffffff",
28213
+ fontSize: theme?.fontSize || "14px",
28214
+ borderRadius: "6px",
28215
+ boxShadow: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)"
28216
+ },
28217
+ children
28218
+ }
28219
+ );
28220
+ var ChartTooltipRow = ({
28221
+ value,
28222
+ rawValue,
28223
+ valueKey,
28224
+ valueKeyLabel,
28225
+ name: name2,
28226
+ // color,
28227
+ theme
28228
+ }) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
28229
+ "div",
28230
+ {
28231
+ style: {
28232
+ display: "flex",
28233
+ flexDirection: "column",
28234
+ gap: 2,
28235
+ minWidth: 150,
28236
+ position: "relative"
28237
+ },
28238
+ children: [
28239
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
28240
+ "div",
28241
+ {
28242
+ style: {
28243
+ display: "flex",
28244
+ alignItems: "center",
28245
+ width: "100%"
28246
+ // paddingLeft: '24px',
28247
+ },
28248
+ children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
28249
+ "span",
28250
+ {
28251
+ style: {
28252
+ flex: 1,
28253
+ display: "flex",
28254
+ alignItems: "center",
28255
+ justifyContent: "space-between"
28256
+ },
28257
+ children: [
28258
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
28259
+ "p",
28260
+ {
28261
+ style: {
28262
+ marginTop: 0,
28263
+ marginBottom: 0,
28264
+ marginRight: "24px",
28265
+ fontFamily: theme?.fontFamily,
28266
+ color: theme?.primaryTextColor,
28267
+ fontSize: theme?.fontSizeSmall || "14px",
28268
+ fontWeight: theme?.fontWeightMedium || "500",
28269
+ minWidth: "60px"
28270
+ },
28271
+ children: name2
28272
+ }
28273
+ ),
28274
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
28275
+ "p",
28276
+ {
28277
+ style: {
28278
+ marginTop: 0,
28279
+ marginBottom: 0,
28280
+ fontFamily: theme?.fontFamily,
28281
+ color: theme?.primaryTextColor,
28282
+ fontSize: theme?.fontSizeSmall || "14px",
28283
+ fontWeight: theme?.fontWeightMedium || "500",
28284
+ minWidth: "40px",
28285
+ textAlign: "right"
28286
+ },
28287
+ children: value
28288
+ }
28289
+ )
28290
+ ]
28291
+ }
28292
+ )
28293
+ }
28294
+ ),
28295
+ (rawValue || valueKey) && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
28296
+ "div",
28297
+ {
28298
+ style: {
28299
+ display: "flex",
28300
+ alignItems: "center",
28301
+ width: "100%",
28302
+ // paddingLeft: '24px',
28303
+ justifyContent: "space-between"
28304
+ },
28305
+ children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
28306
+ "span",
28307
+ {
28308
+ style: {
28309
+ flex: 1,
28310
+ display: "flex",
28311
+ alignItems: "center",
28312
+ justifyContent: "space-between"
28313
+ },
28314
+ children: [
28315
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
28316
+ "p",
28317
+ {
28318
+ style: {
28319
+ marginTop: 0,
28320
+ marginBottom: 0,
28321
+ marginRight: "24px",
28322
+ fontFamily: theme?.fontFamily,
28323
+ color: theme?.primaryTextColor,
28324
+ fontSize: theme?.fontSizeSmall || "14px",
28325
+ fontWeight: theme?.fontWeightMedium || "500",
28326
+ minWidth: "60px"
28327
+ },
28328
+ children: valueKeyLabel || valueKey
28329
+ }
28330
+ ),
28331
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
28332
+ "p",
28333
+ {
28334
+ style: {
28335
+ marginTop: 0,
28336
+ marginBottom: 0,
28337
+ fontFamily: theme?.fontFamily,
28338
+ color: theme?.primaryTextColor,
28339
+ fontSize: theme?.fontSizeSmall || "14px",
28340
+ fontWeight: theme?.fontWeightMedium || "500",
28341
+ minWidth: "40px",
28342
+ textAlign: "right"
28343
+ },
28344
+ children: rawValue
28345
+ }
28346
+ )
28347
+ ]
28348
+ }
28349
+ )
28350
+ }
28351
+ )
28352
+ ]
28353
+ }
28354
+ );
28355
+ var DonutChartTooltip = ({
28356
+ active,
28357
+ payload,
28358
+ valueFormatter: valueFormatter2,
28359
+ theme,
28360
+ yAxisFields
28361
+ }) => {
28362
+ if (active && payload[0]) {
28363
+ const payloadRow = payload[0];
28364
+ const rawValue = payloadRow.payload[`raw_${payloadRow.dataKey}`];
28365
+ const field = yAxisFields?.find((f) => f.field === payloadRow.dataKey);
28366
+ const formattedRawValue = quillFormat({
28367
+ value: rawValue?.toString() || "",
28368
+ format: field?.format || "string"
28369
+ });
28370
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(ChartTooltipFrame, { theme, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
28371
+ "div",
28372
+ {
28373
+ style: {
28374
+ paddingLeft: "1rem",
28375
+ paddingRight: "1rem",
28376
+ paddingTop: "8px",
28377
+ paddingBottom: "8px"
28378
+ },
28379
+ children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
28380
+ ChartTooltipRow,
28381
+ {
28382
+ value: valueFormatter2(payloadRow.value),
28383
+ rawValue: rawValue ? formattedRawValue : void 0,
28384
+ valueKey: payloadRow.dataKey,
28385
+ valueKeyLabel: field?.label,
28386
+ name: payloadRow.name,
28387
+ color: payloadRow.payload.color,
28388
+ theme
28389
+ }
28390
+ )
28391
+ }
28392
+ ) });
28393
+ }
28394
+ return null;
28395
+ };
28396
+ var PieChartWrapper = import_react13.default.forwardRef(
28397
+ (props, ref) => {
28398
+ const {
28399
+ category = "pct_of_the_total",
28400
+ index = "status",
28401
+ data,
28402
+ colors = [],
28403
+ colorMap = {},
28404
+ variant = "donut",
28405
+ valueFormatter: valueFormatter2 = defaultValueFormatter,
28406
+ className,
28407
+ containerStyle,
28408
+ theme,
28409
+ onClickChartElement,
28410
+ yAxisFields,
28411
+ showLegend = false,
28412
+ ...other
28413
+ } = props;
28414
+ const isDonut = variant == "donut";
28415
+ if (!data || data.length === 0) {
28416
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
28417
+ "div",
28418
+ {
28419
+ style: {
28420
+ display: "flex",
28421
+ flex: "1 0 auto",
28422
+ // height: '100%',
28423
+ margin: "auto",
28424
+ justifyContent: "center",
28425
+ alignItems: "center",
28426
+ fontSize: 13,
28427
+ fontFamily: theme?.fontFamily,
28428
+ color: theme.secondaryTextColor,
28429
+ ...containerStyle
28430
+ },
28431
+ className,
28432
+ children: "No results"
28433
+ }
28434
+ );
28435
+ }
28436
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
28437
+ "div",
28438
+ {
28439
+ ref,
28440
+ className,
28441
+ style: {
28442
+ width: "100%",
28443
+ display: "flex",
28444
+ flexDirection: "row",
28445
+ alignItems: "center",
28446
+ justifyContent: "center",
28447
+ boxSizing: "content-box",
28448
+ ...containerStyle
28449
+ },
28450
+ ...other,
28451
+ children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
28452
+ import_recharts.ResponsiveContainer,
28453
+ {
28454
+ width: "100%",
28455
+ height: "100%",
28456
+ minWidth: 0,
28457
+ minHeight: 0,
28458
+ children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_recharts.PieChart, { children: [
28459
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
28460
+ import_recharts.Pie,
28461
+ {
28462
+ data: parseData2(
28463
+ data,
28464
+ (() => {
28465
+ const colorArray = colorMap[category] && colorMap[category]["primary"] && colorMap[category]["primary"] || colors;
28466
+ const containsCssVars = colorArray.some(
28467
+ (color2) => typeof color2 === "string" && color2.includes("var(")
28468
+ );
28469
+ if (containsCssVars) {
28470
+ return Array.from({ length: data.length }).map(
28471
+ (_, idx) => colorArray[idx % colorArray.length] ?? colorArray[colorArray.length - 1] ?? "#808080"
28472
+ );
28473
+ }
28474
+ return colorArray.length >= data.length ? colorArray.slice(0, data.length) : generateArrayFromColor(colorArray, data.length);
28475
+ })(),
28476
+ index,
28477
+ category
28478
+ ),
28479
+ cx: "50%",
28480
+ cy: "50%",
28481
+ startAngle: 90,
28482
+ endAngle: -270,
28483
+ innerRadius: isDonut ? showLegend ? "50%" : "70%" : "0%",
28484
+ outerRadius: showLegend ? "70%" : "100%",
28485
+ paddingAngle: 0,
28486
+ dataKey: category,
28487
+ nameKey: index,
28488
+ isAnimationActive: true,
28489
+ onClick: onClickChartElement,
28490
+ labelLine: false,
28491
+ label: false
28492
+ }
28493
+ ),
28494
+ showLegend && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
28495
+ import_recharts.Legend,
28496
+ {
28497
+ verticalAlign: "top",
28498
+ align: "left",
28499
+ fontSize: 11,
28500
+ color: theme.secondaryTextColor,
28501
+ wrapperStyle: {
28502
+ paddingBottom: 20,
28503
+ fontFamily: theme?.fontFamily
28504
+ },
28505
+ content: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(RenderLegend, { limit: 5 })
28506
+ }
28507
+ ),
28508
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
28509
+ import_recharts.Tooltip,
28510
+ {
28511
+ wrapperStyle: {
28512
+ outline: "none"
28513
+ },
28514
+ content: ({ active, payload }) => {
28515
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
28516
+ DonutChartTooltip,
28517
+ {
28518
+ active,
28519
+ payload,
28520
+ valueFormatter: valueFormatter2,
28521
+ theme,
28522
+ yAxisFields
28523
+ }
28524
+ );
28525
+ }
28526
+ }
28527
+ )
28528
+ ] })
28529
+ }
28530
+ )
28531
+ }
28532
+ );
28533
+ }
28534
+ );
28535
+ var PieChart_default = PieChartWrapper;
28536
+
28537
+ // src/components/QuillTable.tsx
28538
+ var import_react14 = require("react");
28539
+ init_valueFormatter();
28540
+ var import_jsx_runtime29 = require("react/jsx-runtime");
28374
28541
  function QuillTable({
28375
28542
  rows,
28376
28543
  rowCount,
@@ -28399,18 +28566,18 @@ function QuillTable({
28399
28566
  borderTop,
28400
28567
  borderBottom
28401
28568
  }) {
28402
- const [activeRows, setActiveRows] = (0, import_react13.useState)([]);
28403
- const [maxPage, setMaxPage] = (0, import_react13.useState)(1);
28404
- const [sortColumn, setSortColumn] = (0, import_react13.useState)(sort?.field || "");
28405
- const [sortDirection, setSortDirection] = (0, import_react13.useState)(sort?.direction || "desc");
28406
- const [theme] = (0, import_react13.useContext)(ThemeContext);
28407
- const [isPaginating, setIsPaginating] = (0, import_react13.useState)(true);
28408
- const [initialLoad, setInitialLoad] = (0, import_react13.useState)(true);
28409
- (0, import_react13.useEffect)(() => {
28569
+ const [activeRows, setActiveRows] = (0, import_react14.useState)([]);
28570
+ const [maxPage, setMaxPage] = (0, import_react14.useState)(1);
28571
+ const [sortColumn, setSortColumn] = (0, import_react14.useState)(sort?.field || "");
28572
+ const [sortDirection, setSortDirection] = (0, import_react14.useState)(sort?.direction || "desc");
28573
+ const [theme] = (0, import_react14.useContext)(ThemeContext);
28574
+ const [isPaginating, setIsPaginating] = (0, import_react14.useState)(true);
28575
+ const [initialLoad, setInitialLoad] = (0, import_react14.useState)(true);
28576
+ (0, import_react14.useEffect)(() => {
28410
28577
  setSortColumn(sort?.field || "");
28411
28578
  setSortDirection(sort?.direction || "desc");
28412
28579
  }, [sort]);
28413
- (0, import_react13.useEffect)(() => {
28580
+ (0, import_react14.useEffect)(() => {
28414
28581
  if (rows?.length === 0 && isLoading) {
28415
28582
  return;
28416
28583
  }
@@ -28442,7 +28609,7 @@ function QuillTable({
28442
28609
  rowCount,
28443
28610
  isLoading
28444
28611
  ]);
28445
- (0, import_react13.useEffect)(() => {
28612
+ (0, import_react14.useEffect)(() => {
28446
28613
  if (rows.length <= currentPage * rowsPerPage) {
28447
28614
  onPageChange && onPageChange(0);
28448
28615
  setMaxPage(1);
@@ -28486,7 +28653,7 @@ function QuillTable({
28486
28653
  }
28487
28654
  };
28488
28655
  if (initialLoad) {
28489
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
28656
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
28490
28657
  "div",
28491
28658
  {
28492
28659
  style: {
@@ -28494,11 +28661,11 @@ function QuillTable({
28494
28661
  ...containerStyle
28495
28662
  },
28496
28663
  className,
28497
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(LoadingComponent, {})
28664
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(LoadingComponent, {})
28498
28665
  }
28499
28666
  );
28500
28667
  }
28501
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
28668
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
28502
28669
  "div",
28503
28670
  {
28504
28671
  style: {
@@ -28511,7 +28678,7 @@ function QuillTable({
28511
28678
  ...containerStyle
28512
28679
  },
28513
28680
  className,
28514
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
28681
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
28515
28682
  "div",
28516
28683
  {
28517
28684
  style: {
@@ -28530,7 +28697,7 @@ function QuillTable({
28530
28697
  outline: "none",
28531
28698
  position: "relative"
28532
28699
  },
28533
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
28700
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
28534
28701
  "div",
28535
28702
  {
28536
28703
  role: "table",
@@ -28544,8 +28711,8 @@ function QuillTable({
28544
28711
  minHeight: "260px"
28545
28712
  },
28546
28713
  children: [
28547
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { style: { overflow: "auto", flexGrow: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)("div", { style: { minWidth: "100%", display: "inline-block" }, children: [
28548
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
28714
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { style: { overflow: "auto", flexGrow: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)("div", { style: { minWidth: "100%", display: "inline-block" }, children: [
28715
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
28549
28716
  "div",
28550
28717
  {
28551
28718
  className: "thead",
@@ -28555,7 +28722,7 @@ function QuillTable({
28555
28722
  zIndex: 1,
28556
28723
  background: headerBackgroundColor ?? "white"
28557
28724
  },
28558
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
28725
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
28559
28726
  "div",
28560
28727
  {
28561
28728
  role: "row",
@@ -28568,7 +28735,7 @@ function QuillTable({
28568
28735
  marginBottom: "-1px"
28569
28736
  // avoid double border
28570
28737
  },
28571
- children: columns && columns.map((column, index) => /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
28738
+ children: columns && columns.map((column, index) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
28572
28739
  "div",
28573
28740
  {
28574
28741
  onClick: (e) => {
@@ -28599,7 +28766,7 @@ function QuillTable({
28599
28766
  justifyContent: "space-between"
28600
28767
  },
28601
28768
  children: [
28602
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
28769
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
28603
28770
  "div",
28604
28771
  {
28605
28772
  "aria-haspopup": "dialog",
@@ -28624,7 +28791,7 @@ function QuillTable({
28624
28791
  children: hideLabels || !column.label ? column.field : column.label
28625
28792
  }
28626
28793
  ),
28627
- column.field === sortColumn && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
28794
+ column.field === sortColumn && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
28628
28795
  "svg",
28629
28796
  {
28630
28797
  xmlns: "http://www.w3.org/2000/svg",
@@ -28635,7 +28802,7 @@ function QuillTable({
28635
28802
  style: {
28636
28803
  transform: sortDirection === "desc" ? "rotate(180deg)" : void 0
28637
28804
  },
28638
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
28805
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
28639
28806
  "path",
28640
28807
  {
28641
28808
  fillRule: "evenodd",
@@ -28653,15 +28820,15 @@ function QuillTable({
28653
28820
  )
28654
28821
  }
28655
28822
  ),
28656
- (isPaginating || isLoading) && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
28823
+ (isPaginating || isLoading) && /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
28657
28824
  "div",
28658
28825
  {
28659
28826
  className,
28660
28827
  style: { position: "absolute", width: "100%" },
28661
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(LoadingComponent, {})
28828
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(LoadingComponent, {})
28662
28829
  }
28663
28830
  ),
28664
- activeRows && activeRows.length === 0 || columns && columns.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
28831
+ activeRows && activeRows.length === 0 || columns && columns.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
28665
28832
  "div",
28666
28833
  {
28667
28834
  style: {
@@ -28679,7 +28846,7 @@ function QuillTable({
28679
28846
  },
28680
28847
  children: emptyStateLabel
28681
28848
  }
28682
- ) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { role: "rowgroup", className: "tbody", children: activeRows && activeRows.map((row, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
28849
+ ) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { role: "rowgroup", className: "tbody", children: activeRows && activeRows.map((row, rowIndex) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
28683
28850
  "div",
28684
28851
  {
28685
28852
  role: "row",
@@ -28690,7 +28857,7 @@ function QuillTable({
28690
28857
  minWidth: "100px",
28691
28858
  boxSizing: "border-box"
28692
28859
  },
28693
- children: columns && columns.map((column, columnIndex) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
28860
+ children: columns && columns.map((column, columnIndex) => /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
28694
28861
  "div",
28695
28862
  {
28696
28863
  role: "cell",
@@ -28709,7 +28876,7 @@ function QuillTable({
28709
28876
  borderBottom: rowIndex === activeRows?.length - 1 ? "1px solid #E7E7E7" : void 0,
28710
28877
  userSelect: "none"
28711
28878
  },
28712
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
28879
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
28713
28880
  "div",
28714
28881
  {
28715
28882
  style: {
@@ -28721,7 +28888,7 @@ function QuillTable({
28721
28888
  userSelect: "none"
28722
28889
  },
28723
28890
  "data-testid": "static-cell",
28724
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
28891
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
28725
28892
  "div",
28726
28893
  {
28727
28894
  "aria-haspopup": "dialog",
@@ -28753,7 +28920,7 @@ function QuillTable({
28753
28920
  "sqlrow" + rowIndex
28754
28921
  )) })
28755
28922
  ] }) }),
28756
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
28923
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
28757
28924
  "div",
28758
28925
  {
28759
28926
  style: {
@@ -28766,7 +28933,7 @@ function QuillTable({
28766
28933
  marginTop: "-1px"
28767
28934
  // avoid double border
28768
28935
  },
28769
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
28936
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
28770
28937
  "div",
28771
28938
  {
28772
28939
  style: {
@@ -28778,7 +28945,7 @@ function QuillTable({
28778
28945
  height: 37
28779
28946
  },
28780
28947
  children: [
28781
- !hideCSVDownloadButton ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
28948
+ !hideCSVDownloadButton ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
28782
28949
  "button",
28783
28950
  {
28784
28951
  onClick: downloadCSV2,
@@ -28794,8 +28961,8 @@ function QuillTable({
28794
28961
  },
28795
28962
  children: "Download CSV"
28796
28963
  }
28797
- ) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", {}),
28798
- rows.length === 0 || isLoading ? null : /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
28964
+ ) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", {}),
28965
+ rows.length === 0 || isLoading ? null : /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
28799
28966
  "div",
28800
28967
  {
28801
28968
  style: {
@@ -28804,7 +28971,7 @@ function QuillTable({
28804
28971
  alignItems: "center"
28805
28972
  },
28806
28973
  children: [
28807
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
28974
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
28808
28975
  "div",
28809
28976
  {
28810
28977
  style: {
@@ -28819,8 +28986,8 @@ function QuillTable({
28819
28986
  ]
28820
28987
  }
28821
28988
  ),
28822
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { style: { width: 8 } }),
28823
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
28989
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { style: { width: 8 } }),
28990
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
28824
28991
  "button",
28825
28992
  {
28826
28993
  onClick: (e) => {
@@ -28832,7 +28999,7 @@ function QuillTable({
28832
28999
  border: "none",
28833
29000
  background: "transparent"
28834
29001
  },
28835
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
29002
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
28836
29003
  "svg",
28837
29004
  {
28838
29005
  xmlns: "http://www.w3.org/2000/svg",
@@ -28840,7 +29007,7 @@ function QuillTable({
28840
29007
  fill: theme?.chartLabelFontFamily || theme?.fontFamily,
28841
29008
  height: "16px",
28842
29009
  width: "16px",
28843
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
29010
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
28844
29011
  "path",
28845
29012
  {
28846
29013
  fillRule: "evenodd",
@@ -28852,7 +29019,7 @@ function QuillTable({
28852
29019
  )
28853
29020
  }
28854
29021
  ),
28855
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
29022
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
28856
29023
  "button",
28857
29024
  {
28858
29025
  onClick: (e) => {
@@ -28864,7 +29031,7 @@ function QuillTable({
28864
29031
  border: "none",
28865
29032
  background: "transparent"
28866
29033
  },
28867
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
29034
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
28868
29035
  "svg",
28869
29036
  {
28870
29037
  xmlns: "http://www.w3.org/2000/svg",
@@ -28872,7 +29039,7 @@ function QuillTable({
28872
29039
  fill: theme?.chartLabelFontFamily || theme?.fontFamily,
28873
29040
  height: "16px",
28874
29041
  width: "16px",
28875
- children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
29042
+ children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
28876
29043
  "path",
28877
29044
  {
28878
29045
  fillRule: "evenodd",
@@ -28884,7 +29051,7 @@ function QuillTable({
28884
29051
  )
28885
29052
  }
28886
29053
  ),
28887
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("div", { style: { width: 12 } })
29054
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("div", { style: { width: 12 } })
28888
29055
  ]
28889
29056
  }
28890
29057
  )
@@ -29061,12 +29228,12 @@ var format_wo_yyyy2 = (value) => {
29061
29228
  var import_date_fns10 = require("date-fns");
29062
29229
 
29063
29230
  // src/components/Chart/ChartTooltipFrame.tsx
29064
- var import_jsx_runtime29 = require("react/jsx-runtime");
29231
+ var import_jsx_runtime30 = require("react/jsx-runtime");
29065
29232
  function ChartTooltipFrame2({
29066
29233
  children,
29067
29234
  theme
29068
29235
  }) {
29069
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
29236
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
29070
29237
  "div",
29071
29238
  {
29072
29239
  style: {
@@ -29086,7 +29253,7 @@ function ChartTooltipFrame2({
29086
29253
  }
29087
29254
 
29088
29255
  // src/components/Chart/ChartTooltipRow.tsx
29089
- var import_jsx_runtime30 = require("react/jsx-runtime");
29256
+ var import_jsx_runtime31 = require("react/jsx-runtime");
29090
29257
  function ChartTooltipRow2({
29091
29258
  value,
29092
29259
  name: name2,
@@ -29094,7 +29261,7 @@ function ChartTooltipRow2({
29094
29261
  theme,
29095
29262
  hideDot = false
29096
29263
  }) {
29097
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
29264
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
29098
29265
  "div",
29099
29266
  {
29100
29267
  style: {
@@ -29107,8 +29274,8 @@ function ChartTooltipRow2({
29107
29274
  paddingBottom: 2
29108
29275
  },
29109
29276
  children: [
29110
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)("div", { style: { display: "flex", alignItems: "center" }, children: [
29111
- !hideDot && /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
29277
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)("div", { style: { display: "flex", alignItems: "center" }, children: [
29278
+ !hideDot && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
29112
29279
  "span",
29113
29280
  {
29114
29281
  style: {
@@ -29125,7 +29292,7 @@ function ChartTooltipRow2({
29125
29292
  }
29126
29293
  }
29127
29294
  ),
29128
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
29295
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
29129
29296
  "p",
29130
29297
  {
29131
29298
  style: {
@@ -29140,7 +29307,7 @@ function ChartTooltipRow2({
29140
29307
  }
29141
29308
  )
29142
29309
  ] }),
29143
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
29310
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
29144
29311
  "p",
29145
29312
  {
29146
29313
  style: {
@@ -29164,14 +29331,14 @@ function ChartTooltipRow2({
29164
29331
  }
29165
29332
 
29166
29333
  // src/components/Chart/ChartTooltipGroup.tsx
29167
- var import_jsx_runtime31 = require("react/jsx-runtime");
29334
+ var import_jsx_runtime32 = require("react/jsx-runtime");
29168
29335
  function ChartTooltipGroup({
29169
29336
  name: name2,
29170
29337
  items,
29171
29338
  theme,
29172
29339
  hideDot = false
29173
29340
  }) {
29174
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(
29341
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
29175
29342
  "div",
29176
29343
  {
29177
29344
  style: {
@@ -29183,7 +29350,7 @@ function ChartTooltipGroup({
29183
29350
  marginRight: "24px"
29184
29351
  },
29185
29352
  children: [
29186
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
29353
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
29187
29354
  "p",
29188
29355
  {
29189
29356
  style: {
@@ -29201,7 +29368,7 @@ function ChartTooltipGroup({
29201
29368
  children: name2.replaceAll("_", " ").toLowerCase()
29202
29369
  }
29203
29370
  ),
29204
- items.map(({ color: color2, value, name: name3 }, idx) => /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
29371
+ items.map(({ color: color2, value, name: name3 }, idx) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
29205
29372
  ChartTooltipRow2,
29206
29373
  {
29207
29374
  value,
@@ -29219,9 +29386,9 @@ function ChartTooltipGroup({
29219
29386
 
29220
29387
  // src/components/Chart/ChartTooltip.tsx
29221
29388
  init_dates();
29222
- var import_jsx_runtime32 = require("react/jsx-runtime");
29223
- var ChartTooltipPrimary = (props) => /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(ChartTooltipFrame2, { theme: props.theme, children: [
29224
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
29389
+ var import_jsx_runtime33 = require("react/jsx-runtime");
29390
+ var ChartTooltipPrimary = (props) => /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(ChartTooltipFrame2, { theme: props.theme, children: [
29391
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
29225
29392
  "div",
29226
29393
  {
29227
29394
  style: {
@@ -29239,7 +29406,7 @@ var ChartTooltipPrimary = (props) => /* @__PURE__ */ (0, import_jsx_runtime32.js
29239
29406
  paddingTop: "8px",
29240
29407
  paddingBottom: "8px"
29241
29408
  },
29242
- children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
29409
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
29243
29410
  "p",
29244
29411
  {
29245
29412
  style: {
@@ -29258,7 +29425,7 @@ var ChartTooltipPrimary = (props) => /* @__PURE__ */ (0, import_jsx_runtime32.js
29258
29425
  )
29259
29426
  }
29260
29427
  ),
29261
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
29428
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
29262
29429
  "div",
29263
29430
  {
29264
29431
  style: {
@@ -29267,7 +29434,7 @@ var ChartTooltipPrimary = (props) => /* @__PURE__ */ (0, import_jsx_runtime32.js
29267
29434
  paddingTop: "8px",
29268
29435
  paddingBottom: "8px"
29269
29436
  },
29270
- children: props.payload.map(({ color: color2, value, name: name2 }, idx) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
29437
+ children: props.payload.map(({ color: color2, value, name: name2 }, idx) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
29271
29438
  ChartTooltipRow2,
29272
29439
  {
29273
29440
  value: props.valueFormatter(value, name2),
@@ -29348,8 +29515,8 @@ function ChartTooltipComparison(props) {
29348
29515
  presetLabel,
29349
29516
  convertComparisonRange(presetLabel, comparisonLabel)
29350
29517
  ) ?? {};
29351
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(ChartTooltipFrame2, { theme: props.theme, children: [
29352
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
29518
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(ChartTooltipFrame2, { theme: props.theme, children: [
29519
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
29353
29520
  "div",
29354
29521
  {
29355
29522
  style: {
@@ -29367,7 +29534,7 @@ function ChartTooltipComparison(props) {
29367
29534
  paddingTop: "8px",
29368
29535
  paddingBottom: "8px"
29369
29536
  },
29370
- children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
29537
+ children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
29371
29538
  "p",
29372
29539
  {
29373
29540
  style: {
@@ -29387,7 +29554,7 @@ function ChartTooltipComparison(props) {
29387
29554
  )
29388
29555
  }
29389
29556
  ),
29390
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
29557
+ /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
29391
29558
  "div",
29392
29559
  {
29393
29560
  style: {
@@ -29399,7 +29566,7 @@ function ChartTooltipComparison(props) {
29399
29566
  flexDirection: "column",
29400
29567
  gap: 4
29401
29568
  },
29402
- children: Object.entries(newRows).map(([key, value], index) => /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
29569
+ children: Object.entries(newRows).map(([key, value], index) => /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
29403
29570
  ChartTooltipGroup,
29404
29571
  {
29405
29572
  name: key,
@@ -29415,8 +29582,8 @@ function ChartTooltipComparison(props) {
29415
29582
  }
29416
29583
  function ChartTooltip(props) {
29417
29584
  if (!props.active || !props.payload) return null;
29418
- if (props.comparison) return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ChartTooltipComparison, { ...props });
29419
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(ChartTooltipPrimary, { ...props });
29585
+ if (props.comparison) return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ChartTooltipComparison, { ...props });
29586
+ return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(ChartTooltipPrimary, { ...props });
29420
29587
  }
29421
29588
 
29422
29589
  // src/utils/getDomain.ts
@@ -29492,7 +29659,7 @@ var import_react15 = require("react");
29492
29659
 
29493
29660
  // src/components/Chart/CustomReferenceLine.tsx
29494
29661
  init_constants();
29495
- var import_jsx_runtime33 = require("react/jsx-runtime");
29662
+ var import_jsx_runtime34 = require("react/jsx-runtime");
29496
29663
  function CustomReferenceLine({
29497
29664
  xAxisMap,
29498
29665
  yAxisMap,
@@ -29509,8 +29676,8 @@ function CustomReferenceLine({
29509
29676
  const y1 = yScale(referenceLine[0]);
29510
29677
  const y2 = yScale(referenceLine[1]);
29511
29678
  const textY = yScale(referenceLine[referenceLine.length - 1]) - 5;
29512
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_jsx_runtime33.Fragment, { children: [
29513
- referenceLine.length === 2 && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
29679
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_jsx_runtime34.Fragment, { children: [
29680
+ referenceLine.length === 2 && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
29514
29681
  "line",
29515
29682
  {
29516
29683
  x1: xMin,
@@ -29526,7 +29693,7 @@ function CustomReferenceLine({
29526
29693
  referenceLine.length > 2 && referenceLine.slice(1).map((point, index) => {
29527
29694
  const x1 = xMin + (xMax - xMin) * (index / (referenceLine.length - 1));
29528
29695
  const x2 = xMin + (xMax - xMin) * ((index + 1) / (referenceLine.length - 1));
29529
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
29696
+ return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
29530
29697
  "line",
29531
29698
  {
29532
29699
  x1,
@@ -29541,7 +29708,7 @@ function CustomReferenceLine({
29541
29708
  index
29542
29709
  );
29543
29710
  }),
29544
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(
29711
+ /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
29545
29712
  "text",
29546
29713
  {
29547
29714
  x: xMax - 5,
@@ -29564,56 +29731,6 @@ function CustomReferenceLine({
29564
29731
  ] });
29565
29732
  }
29566
29733
 
29567
- // src/components/Chart/CustomLegend.tsx
29568
- var import_react14 = require("react");
29569
- var import_jsx_runtime34 = require("react/jsx-runtime");
29570
- var RenderLegend = (props) => {
29571
- const { payload } = props;
29572
- const [theme] = (0, import_react14.useContext)(ThemeContext);
29573
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)("div", { style: { display: "flex", justifyContent: "flex-start" }, children: payload.map((entry, index) => /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(
29574
- "div",
29575
- {
29576
- style: {
29577
- display: "flex",
29578
- alignItems: "center",
29579
- marginRight: "1rem"
29580
- },
29581
- children: [
29582
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
29583
- "svg",
29584
- {
29585
- style: { marginRight: "0.5rem" },
29586
- width: "16",
29587
- height: "16",
29588
- viewBox: "0 0 16 16",
29589
- children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
29590
- "rect",
29591
- {
29592
- width: "16",
29593
- height: "16",
29594
- rx: "3",
29595
- fill: payload?.[index]?.color
29596
- }
29597
- )
29598
- }
29599
- ),
29600
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
29601
- "span",
29602
- {
29603
- style: {
29604
- color: theme?.secondaryTextColor,
29605
- fontFamily: theme?.fontFamily,
29606
- fontSize: theme?.fontSizeMedium || "14px"
29607
- },
29608
- children: entry.value
29609
- }
29610
- )
29611
- ]
29612
- },
29613
- `legend-${index}`
29614
- )) });
29615
- };
29616
-
29617
29734
  // src/components/Chart/LineChart.tsx
29618
29735
  var import_jsx_runtime35 = require("react/jsx-runtime");
29619
29736
  function createLineForEmptyChart(yAxisFields, dateFilter, xAxisField, xAxisFormat) {
@@ -32766,6 +32883,7 @@ var constructReportFromItem = (item) => {
32766
32883
  rows: [],
32767
32884
  columns: [],
32768
32885
  chartType: item.chartType,
32886
+ showLegend: item.showLegend,
32769
32887
  dateField: item.dateField,
32770
32888
  pivot: item.pivot,
32771
32889
  xAxisLabel: item.xAxisLabel,
@@ -36528,7 +36646,7 @@ var ChartDisplay = ({
36528
36646
  onClickChartElement,
36529
36647
  overrideTheme,
36530
36648
  referenceLines,
36531
- showLegend = false,
36649
+ showLegend,
36532
36650
  tableRowsLoading = false
36533
36651
  }) => {
36534
36652
  const { downloadCSV: downloadCSV2 } = useExport(reportId);
@@ -36561,6 +36679,7 @@ var ChartDisplay = ({
36561
36679
  }
36562
36680
  return void 0;
36563
36681
  }, [config, specificReportFilters, specificDashboardFilters]);
36682
+ const resolvedShowLegend = showLegend !== void 0 ? showLegend : config?.showLegend ?? false;
36564
36683
  const [page, setPage] = (0, import_react30.useState)(0);
36565
36684
  if (loading) {
36566
36685
  return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("div", { className, style: containerStyle, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(LoadingComponent, {}) });
@@ -36596,7 +36715,7 @@ var ChartDisplay = ({
36596
36715
  colorMap,
36597
36716
  onClickChartElement,
36598
36717
  yAxisFields: config?.yAxisFields,
36599
- showLegend
36718
+ showLegend: resolvedShowLegend
36600
36719
  }
36601
36720
  );
36602
36721
  }
@@ -36670,7 +36789,7 @@ var ChartDisplay = ({
36670
36789
  onClickChartElement,
36671
36790
  dateFilter: !hideDateRangeFilter ? dateFilter : void 0,
36672
36791
  referenceLines,
36673
- showLegend
36792
+ showLegend: resolvedShowLegend
36674
36793
  }
36675
36794
  );
36676
36795
  }
@@ -36697,7 +36816,7 @@ var ChartDisplay = ({
36697
36816
  onClickChartElement,
36698
36817
  dateFilter: !hideDateRangeFilter ? dateFilter : void 0,
36699
36818
  referenceLines,
36700
- showLegend,
36819
+ showLegend: resolvedShowLegend,
36701
36820
  stackedMode: true
36702
36821
  }
36703
36822
  );
@@ -36841,7 +36960,7 @@ var ChartDisplay = ({
36841
36960
  onClickChartElement,
36842
36961
  dateFilter: !hideDateRangeFilter ? dateFilter : void 0,
36843
36962
  referenceLines,
36844
- showLegend
36963
+ showLegend: resolvedShowLegend
36845
36964
  }
36846
36965
  );
36847
36966
  };
@@ -44192,6 +44311,7 @@ function ChartBuilder({
44192
44311
  ],
44193
44312
  xAxisLabel: "",
44194
44313
  chartType: firstNumberColumn ? "line" : "table",
44314
+ showLegend: report?.showLegend ?? false,
44195
44315
  pivot: null,
44196
44316
  dateField: defaultDateField,
44197
44317
  template: true,
@@ -46157,6 +46277,19 @@ function ChartBuilder({
46157
46277
  ) })
46158
46278
  ] })
46159
46279
  ] }),
46280
+ ["line", "column", "stacked", "pie"].includes(
46281
+ (chartData.chartType ?? "").toLowerCase()
46282
+ ) && /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { children: [
46283
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(SubHeaderComponent, { label: "Legend" }),
46284
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(ChartBuilderInputRowContainer, { children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
46285
+ CheckboxComponent,
46286
+ {
46287
+ isChecked: !!formData.showLegend,
46288
+ label: "Show legend",
46289
+ onChange: () => handleChange(!formData.showLegend, "showLegend")
46290
+ }
46291
+ ) })
46292
+ ] }),
46160
46293
  client?.featureFlags?.["referenceLines"] && (chartData.chartType === "line" || chartData.chartType === "column") && /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { children: [
46161
46294
  /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(SubHeaderComponent, { label: "Reference Lines" }),
46162
46295
  /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(ChartBuilderInputColumnContainer, { children: [
@@ -54114,7 +54247,7 @@ function StaticChart(props) {
54114
54247
  reportId,
54115
54248
  onClickChartElement,
54116
54249
  containerStyle,
54117
- showLegend = false,
54250
+ showLegend,
54118
54251
  className
54119
54252
  } = props;
54120
54253
  const {