@quillsql/react 2.16.18 → 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 +927 -788
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1296 -1157
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -19665,18 +19665,18 @@ var require_pluralize = __commonJS({
|
|
|
19665
19665
|
import {
|
|
19666
19666
|
useContext as useContext20,
|
|
19667
19667
|
useEffect as useEffect19,
|
|
19668
|
-
useState as
|
|
19668
|
+
useState as useState25,
|
|
19669
19669
|
useMemo as useMemo16,
|
|
19670
|
-
useRef as
|
|
19670
|
+
useRef as useRef15
|
|
19671
19671
|
} from "react";
|
|
19672
19672
|
|
|
19673
19673
|
// src/Chart.tsx
|
|
19674
19674
|
import {
|
|
19675
|
-
useState as
|
|
19675
|
+
useState as useState19,
|
|
19676
19676
|
useEffect as useEffect16,
|
|
19677
19677
|
useContext as useContext16,
|
|
19678
19678
|
useMemo as useMemo13,
|
|
19679
|
-
useRef as
|
|
19679
|
+
useRef as useRef13
|
|
19680
19680
|
} from "react";
|
|
19681
19681
|
|
|
19682
19682
|
// src/utils/csv.ts
|
|
@@ -19990,6 +19990,7 @@ async function cleanDashboardItem({
|
|
|
19990
19990
|
pivotRows: pivotTable ? pivotTable.rows : void 0,
|
|
19991
19991
|
pivotColumns: pivotTable ? pivotTable.columns : void 0,
|
|
19992
19992
|
compareRows: item.compareRows,
|
|
19993
|
+
showLegend: item.showLegend ?? false,
|
|
19993
19994
|
columns: processedColumns.map((column) => {
|
|
19994
19995
|
return {
|
|
19995
19996
|
field: column.field,
|
|
@@ -20256,6 +20257,7 @@ function createInitialFormData(columns) {
|
|
|
20256
20257
|
],
|
|
20257
20258
|
xAxisLabel: "",
|
|
20258
20259
|
chartType: firstNumberColumn ? "line" : "table",
|
|
20260
|
+
showLegend: false,
|
|
20259
20261
|
pivot: null,
|
|
20260
20262
|
template: true,
|
|
20261
20263
|
referenceLines: []
|
|
@@ -20343,7 +20345,8 @@ function extractAllReportValuesFromQuillInternalReport(reportInternal) {
|
|
|
20343
20345
|
pivotRows: reportInternal.pivotRows,
|
|
20344
20346
|
pivotColumns: reportInternal.pivotColumns,
|
|
20345
20347
|
pivotRowCount: reportInternal.pivotRowCount,
|
|
20346
|
-
filterMap: reportInternal.filterMap
|
|
20348
|
+
filterMap: reportInternal.filterMap,
|
|
20349
|
+
showLegend: reportInternal.showLegend
|
|
20347
20350
|
};
|
|
20348
20351
|
}
|
|
20349
20352
|
async function fetchReportRows({
|
|
@@ -25527,8 +25530,8 @@ var BarList = React2.forwardRef((props, ref) => {
|
|
|
25527
25530
|
var BarList_default = BarList;
|
|
25528
25531
|
|
|
25529
25532
|
// src/components/Chart/PieChart.tsx
|
|
25530
|
-
import
|
|
25531
|
-
import { Pie, PieChart, ResponsiveContainer, Tooltip } from "recharts";
|
|
25533
|
+
import React4 from "react";
|
|
25534
|
+
import { Legend, Pie, PieChart, ResponsiveContainer, Tooltip } from "recharts";
|
|
25532
25535
|
|
|
25533
25536
|
// src/utils/color.ts
|
|
25534
25537
|
var DEFAULT_GRADIENT_COLORS = [
|
|
@@ -25887,476 +25890,9 @@ function HSLtoRGB(h, s, l) {
|
|
|
25887
25890
|
// src/components/Chart/PieChart.tsx
|
|
25888
25891
|
init_util();
|
|
25889
25892
|
init_valueFormatter();
|
|
25890
|
-
import { Fragment, jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
25891
|
-
var defaultValueFormatter = (value) => (value * 1).toFixed(1) + "%";
|
|
25892
|
-
var parseData2 = (data, colors, categoryKey, valueKey) => {
|
|
25893
|
-
const maxItems = 20;
|
|
25894
|
-
const slicedData = deepCopy(data).slice(0, maxItems);
|
|
25895
|
-
const totalValue = slicedData.reduce(
|
|
25896
|
-
(acc, dataPoint) => (
|
|
25897
|
-
// Big(acc)
|
|
25898
|
-
// .add(Big(Number(dataPoint[valueKey]) ?? 0))
|
|
25899
|
-
// .toNumber(),
|
|
25900
|
-
acc + parseFloat(dataPoint[valueKey] ?? "0")
|
|
25901
|
-
),
|
|
25902
|
-
0
|
|
25903
|
-
);
|
|
25904
|
-
slicedData.forEach((dataPoint) => {
|
|
25905
|
-
const rawValue = parseFloat(dataPoint[valueKey] ?? "0");
|
|
25906
|
-
dataPoint[valueKey] = totalValue ? rawValue * 100 / totalValue : data.length > maxItems ? 100 / (maxItems + 1) : 100 / slicedData.length;
|
|
25907
|
-
dataPoint[`raw_${valueKey}`] = parseFloat(rawValue.toFixed(2));
|
|
25908
|
-
});
|
|
25909
|
-
const parsedData = slicedData.map((dataPoint, idx) => {
|
|
25910
|
-
const baseColor = colors.length > 0 ? idx < colors.length ? colors[idx] : colors[colors.length - 1] : "#808080";
|
|
25911
|
-
return {
|
|
25912
|
-
...dataPoint,
|
|
25913
|
-
color: baseColor,
|
|
25914
|
-
fill: baseColor
|
|
25915
|
-
};
|
|
25916
|
-
});
|
|
25917
|
-
if (data.length > maxItems) {
|
|
25918
|
-
const otherData = data.slice(maxItems);
|
|
25919
|
-
const otherSum = otherData.reduce(
|
|
25920
|
-
(acc, dataPoint) => (
|
|
25921
|
-
// Big(acc)
|
|
25922
|
-
// .add(Big(Number(dataPoint[valueKey])) ?? 0)
|
|
25923
|
-
// .toNumber(),
|
|
25924
|
-
acc + parseFloat(dataPoint[valueKey] ?? "0")
|
|
25925
|
-
),
|
|
25926
|
-
0
|
|
25927
|
-
);
|
|
25928
|
-
const otherColor = colors.length > 0 ? colors[colors.length - 1] : "#808080";
|
|
25929
|
-
const normalizedOtherSum = totalValue ? otherSum * 100 / totalValue : 100 / (maxItems + 1);
|
|
25930
|
-
parsedData.push({
|
|
25931
|
-
[categoryKey]: "Other",
|
|
25932
|
-
[valueKey]: normalizedOtherSum,
|
|
25933
|
-
[`raw_${valueKey}`]: parseFloat(otherSum.toFixed(2)),
|
|
25934
|
-
color: otherColor,
|
|
25935
|
-
fill: otherColor
|
|
25936
|
-
});
|
|
25937
|
-
}
|
|
25938
|
-
return parsedData;
|
|
25939
|
-
};
|
|
25940
|
-
var ChartTooltipFrame = ({
|
|
25941
|
-
children,
|
|
25942
|
-
theme
|
|
25943
|
-
}) => /* @__PURE__ */ jsx4(
|
|
25944
|
-
"div",
|
|
25945
|
-
{
|
|
25946
|
-
style: {
|
|
25947
|
-
borderStyle: "solid",
|
|
25948
|
-
borderColor: theme?.borderColor || "#E5E7EB",
|
|
25949
|
-
borderWidth: 1,
|
|
25950
|
-
background: theme?.backgroundColor || "#ffffff",
|
|
25951
|
-
fontSize: theme?.fontSize || "14px",
|
|
25952
|
-
borderRadius: "6px",
|
|
25953
|
-
boxShadow: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)"
|
|
25954
|
-
},
|
|
25955
|
-
children
|
|
25956
|
-
}
|
|
25957
|
-
);
|
|
25958
|
-
var ChartTooltipRow = ({
|
|
25959
|
-
value,
|
|
25960
|
-
rawValue,
|
|
25961
|
-
valueKey,
|
|
25962
|
-
valueKeyLabel,
|
|
25963
|
-
name: name2,
|
|
25964
|
-
// color,
|
|
25965
|
-
theme
|
|
25966
|
-
}) => /* @__PURE__ */ jsxs3(
|
|
25967
|
-
"div",
|
|
25968
|
-
{
|
|
25969
|
-
style: {
|
|
25970
|
-
display: "flex",
|
|
25971
|
-
flexDirection: "column",
|
|
25972
|
-
gap: 2,
|
|
25973
|
-
minWidth: 150,
|
|
25974
|
-
position: "relative"
|
|
25975
|
-
},
|
|
25976
|
-
children: [
|
|
25977
|
-
/* @__PURE__ */ jsx4(
|
|
25978
|
-
"div",
|
|
25979
|
-
{
|
|
25980
|
-
style: {
|
|
25981
|
-
display: "flex",
|
|
25982
|
-
alignItems: "center",
|
|
25983
|
-
width: "100%"
|
|
25984
|
-
// paddingLeft: '24px',
|
|
25985
|
-
},
|
|
25986
|
-
children: /* @__PURE__ */ jsxs3(
|
|
25987
|
-
"span",
|
|
25988
|
-
{
|
|
25989
|
-
style: {
|
|
25990
|
-
flex: 1,
|
|
25991
|
-
display: "flex",
|
|
25992
|
-
alignItems: "center",
|
|
25993
|
-
justifyContent: "space-between"
|
|
25994
|
-
},
|
|
25995
|
-
children: [
|
|
25996
|
-
/* @__PURE__ */ jsx4(
|
|
25997
|
-
"p",
|
|
25998
|
-
{
|
|
25999
|
-
style: {
|
|
26000
|
-
marginTop: 0,
|
|
26001
|
-
marginBottom: 0,
|
|
26002
|
-
marginRight: "24px",
|
|
26003
|
-
fontFamily: theme?.fontFamily,
|
|
26004
|
-
color: theme?.primaryTextColor,
|
|
26005
|
-
fontSize: theme?.fontSizeSmall || "14px",
|
|
26006
|
-
fontWeight: theme?.fontWeightMedium || "500",
|
|
26007
|
-
minWidth: "60px"
|
|
26008
|
-
},
|
|
26009
|
-
children: name2
|
|
26010
|
-
}
|
|
26011
|
-
),
|
|
26012
|
-
/* @__PURE__ */ jsx4(
|
|
26013
|
-
"p",
|
|
26014
|
-
{
|
|
26015
|
-
style: {
|
|
26016
|
-
marginTop: 0,
|
|
26017
|
-
marginBottom: 0,
|
|
26018
|
-
fontFamily: theme?.fontFamily,
|
|
26019
|
-
color: theme?.primaryTextColor,
|
|
26020
|
-
fontSize: theme?.fontSizeSmall || "14px",
|
|
26021
|
-
fontWeight: theme?.fontWeightMedium || "500",
|
|
26022
|
-
minWidth: "40px",
|
|
26023
|
-
textAlign: "right"
|
|
26024
|
-
},
|
|
26025
|
-
children: value
|
|
26026
|
-
}
|
|
26027
|
-
)
|
|
26028
|
-
]
|
|
26029
|
-
}
|
|
26030
|
-
)
|
|
26031
|
-
}
|
|
26032
|
-
),
|
|
26033
|
-
(rawValue || valueKey) && /* @__PURE__ */ jsx4(
|
|
26034
|
-
"div",
|
|
26035
|
-
{
|
|
26036
|
-
style: {
|
|
26037
|
-
display: "flex",
|
|
26038
|
-
alignItems: "center",
|
|
26039
|
-
width: "100%",
|
|
26040
|
-
// paddingLeft: '24px',
|
|
26041
|
-
justifyContent: "space-between"
|
|
26042
|
-
},
|
|
26043
|
-
children: /* @__PURE__ */ jsxs3(
|
|
26044
|
-
"span",
|
|
26045
|
-
{
|
|
26046
|
-
style: {
|
|
26047
|
-
flex: 1,
|
|
26048
|
-
display: "flex",
|
|
26049
|
-
alignItems: "center",
|
|
26050
|
-
justifyContent: "space-between"
|
|
26051
|
-
},
|
|
26052
|
-
children: [
|
|
26053
|
-
/* @__PURE__ */ jsx4(
|
|
26054
|
-
"p",
|
|
26055
|
-
{
|
|
26056
|
-
style: {
|
|
26057
|
-
marginTop: 0,
|
|
26058
|
-
marginBottom: 0,
|
|
26059
|
-
marginRight: "24px",
|
|
26060
|
-
fontFamily: theme?.fontFamily,
|
|
26061
|
-
color: theme?.primaryTextColor,
|
|
26062
|
-
fontSize: theme?.fontSizeSmall || "14px",
|
|
26063
|
-
fontWeight: theme?.fontWeightMedium || "500",
|
|
26064
|
-
minWidth: "60px"
|
|
26065
|
-
},
|
|
26066
|
-
children: valueKeyLabel || valueKey
|
|
26067
|
-
}
|
|
26068
|
-
),
|
|
26069
|
-
/* @__PURE__ */ jsx4(
|
|
26070
|
-
"p",
|
|
26071
|
-
{
|
|
26072
|
-
style: {
|
|
26073
|
-
marginTop: 0,
|
|
26074
|
-
marginBottom: 0,
|
|
26075
|
-
fontFamily: theme?.fontFamily,
|
|
26076
|
-
color: theme?.primaryTextColor,
|
|
26077
|
-
fontSize: theme?.fontSizeSmall || "14px",
|
|
26078
|
-
fontWeight: theme?.fontWeightMedium || "500",
|
|
26079
|
-
minWidth: "40px",
|
|
26080
|
-
textAlign: "right"
|
|
26081
|
-
},
|
|
26082
|
-
children: rawValue
|
|
26083
|
-
}
|
|
26084
|
-
)
|
|
26085
|
-
]
|
|
26086
|
-
}
|
|
26087
|
-
)
|
|
26088
|
-
}
|
|
26089
|
-
)
|
|
26090
|
-
]
|
|
26091
|
-
}
|
|
26092
|
-
);
|
|
26093
|
-
var DonutChartTooltip = ({
|
|
26094
|
-
active,
|
|
26095
|
-
payload,
|
|
26096
|
-
valueFormatter: valueFormatter2,
|
|
26097
|
-
theme,
|
|
26098
|
-
yAxisFields
|
|
26099
|
-
}) => {
|
|
26100
|
-
if (active && payload[0]) {
|
|
26101
|
-
const payloadRow = payload[0];
|
|
26102
|
-
const rawValue = payloadRow.payload[`raw_${payloadRow.dataKey}`];
|
|
26103
|
-
const field = yAxisFields?.find((f) => f.field === payloadRow.dataKey);
|
|
26104
|
-
const formattedRawValue = quillFormat({
|
|
26105
|
-
value: rawValue?.toString() || "",
|
|
26106
|
-
format: field?.format || "string"
|
|
26107
|
-
});
|
|
26108
|
-
return /* @__PURE__ */ jsx4(ChartTooltipFrame, { theme, children: /* @__PURE__ */ jsx4(
|
|
26109
|
-
"div",
|
|
26110
|
-
{
|
|
26111
|
-
style: {
|
|
26112
|
-
paddingLeft: "1rem",
|
|
26113
|
-
paddingRight: "1rem",
|
|
26114
|
-
paddingTop: "8px",
|
|
26115
|
-
paddingBottom: "8px"
|
|
26116
|
-
},
|
|
26117
|
-
children: /* @__PURE__ */ jsx4(
|
|
26118
|
-
ChartTooltipRow,
|
|
26119
|
-
{
|
|
26120
|
-
value: valueFormatter2(payloadRow.value),
|
|
26121
|
-
rawValue: rawValue ? formattedRawValue : void 0,
|
|
26122
|
-
valueKey: payloadRow.dataKey,
|
|
26123
|
-
valueKeyLabel: field?.label,
|
|
26124
|
-
name: payloadRow.name,
|
|
26125
|
-
color: payloadRow.payload.color,
|
|
26126
|
-
theme
|
|
26127
|
-
}
|
|
26128
|
-
)
|
|
26129
|
-
}
|
|
26130
|
-
) });
|
|
26131
|
-
}
|
|
26132
|
-
return null;
|
|
26133
|
-
};
|
|
26134
|
-
var renderCustomizedLabel = ({
|
|
26135
|
-
cx,
|
|
26136
|
-
cy,
|
|
26137
|
-
name: name2,
|
|
26138
|
-
midAngle,
|
|
26139
|
-
outerRadius,
|
|
26140
|
-
percent,
|
|
26141
|
-
tooltipPayload,
|
|
26142
|
-
theme,
|
|
26143
|
-
yAxisFields
|
|
26144
|
-
}) => {
|
|
26145
|
-
const RADIAN = Math.PI / 180;
|
|
26146
|
-
const radius = outerRadius + 25;
|
|
26147
|
-
const x = cx + radius * Math.cos(-midAngle * RADIAN);
|
|
26148
|
-
const y = cy + radius * Math.sin(-midAngle * RADIAN);
|
|
26149
|
-
const category = tooltipPayload?.[0]?.dataKey;
|
|
26150
|
-
const rawValue = tooltipPayload?.[0]?.payload?.[`raw_${category}`];
|
|
26151
|
-
const displayValue = rawValue ? `${rawValue}` : `${(percent * 100).toFixed(0)}%`;
|
|
26152
|
-
const isRightSide = x > cx;
|
|
26153
|
-
const isTopSide = y < cy;
|
|
26154
|
-
const field = yAxisFields?.find(
|
|
26155
|
-
(f) => f.field === tooltipPayload?.[0]?.dataKey
|
|
26156
|
-
);
|
|
26157
|
-
const formattedDisplayValue = quillFormat({
|
|
26158
|
-
value: displayValue?.toString() || "",
|
|
26159
|
-
format: field?.format || "string"
|
|
26160
|
-
});
|
|
26161
|
-
const padding = 10;
|
|
26162
|
-
let textX;
|
|
26163
|
-
if (isRightSide) {
|
|
26164
|
-
textX = x + padding;
|
|
26165
|
-
} else {
|
|
26166
|
-
const longestText = name2.length > displayValue.length ? name2 : displayValue;
|
|
26167
|
-
const estimatedTextWidth = longestText.length * 7;
|
|
26168
|
-
textX = x - padding - estimatedTextWidth;
|
|
26169
|
-
}
|
|
26170
|
-
return /* @__PURE__ */ jsx4("g", { children: isTopSide ? /* @__PURE__ */ jsxs3(Fragment, { children: [
|
|
26171
|
-
/* @__PURE__ */ jsx4(
|
|
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: "500",
|
|
26181
|
-
fontFamily: theme?.fontFamily,
|
|
26182
|
-
children: name2
|
|
26183
|
-
}
|
|
26184
|
-
),
|
|
26185
|
-
/* @__PURE__ */ jsx4(
|
|
26186
|
-
"text",
|
|
26187
|
-
{
|
|
26188
|
-
x: textX,
|
|
26189
|
-
y: y + 8,
|
|
26190
|
-
fill: theme?.secondaryTextColor,
|
|
26191
|
-
textAnchor: "start",
|
|
26192
|
-
dominantBaseline: "central",
|
|
26193
|
-
fontSize: theme?.fontSize || "14px",
|
|
26194
|
-
fontWeight: "400",
|
|
26195
|
-
fontFamily: theme?.fontFamily,
|
|
26196
|
-
children: formattedDisplayValue
|
|
26197
|
-
}
|
|
26198
|
-
)
|
|
26199
|
-
] }) : /* @__PURE__ */ jsxs3(Fragment, { children: [
|
|
26200
|
-
/* @__PURE__ */ jsx4(
|
|
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: "400",
|
|
26210
|
-
fontFamily: theme?.fontFamily,
|
|
26211
|
-
children: formattedDisplayValue
|
|
26212
|
-
}
|
|
26213
|
-
),
|
|
26214
|
-
/* @__PURE__ */ jsx4(
|
|
26215
|
-
"text",
|
|
26216
|
-
{
|
|
26217
|
-
x: textX,
|
|
26218
|
-
y: y - 8,
|
|
26219
|
-
fill: theme?.secondaryTextColor,
|
|
26220
|
-
textAnchor: "start",
|
|
26221
|
-
dominantBaseline: "central",
|
|
26222
|
-
fontSize: theme?.fontSize || "14px",
|
|
26223
|
-
fontWeight: "500",
|
|
26224
|
-
fontFamily: theme?.fontFamily,
|
|
26225
|
-
children: name2
|
|
26226
|
-
}
|
|
26227
|
-
)
|
|
26228
|
-
] }) });
|
|
26229
|
-
};
|
|
26230
|
-
var PieChartWrapper = React3.forwardRef(
|
|
26231
|
-
(props, ref) => {
|
|
26232
|
-
const {
|
|
26233
|
-
category = "pct_of_the_total",
|
|
26234
|
-
index = "status",
|
|
26235
|
-
data,
|
|
26236
|
-
colors = [],
|
|
26237
|
-
colorMap = {},
|
|
26238
|
-
variant = "donut",
|
|
26239
|
-
valueFormatter: valueFormatter2 = defaultValueFormatter,
|
|
26240
|
-
className,
|
|
26241
|
-
containerStyle,
|
|
26242
|
-
theme,
|
|
26243
|
-
onClickChartElement,
|
|
26244
|
-
yAxisFields,
|
|
26245
|
-
showLegend = false,
|
|
26246
|
-
...other
|
|
26247
|
-
} = props;
|
|
26248
|
-
const isDonut = variant == "donut";
|
|
26249
|
-
if (!data || data.length === 0) {
|
|
26250
|
-
return /* @__PURE__ */ jsx4(
|
|
26251
|
-
"div",
|
|
26252
|
-
{
|
|
26253
|
-
style: {
|
|
26254
|
-
display: "flex",
|
|
26255
|
-
flex: "1 0 auto",
|
|
26256
|
-
// height: '100%',
|
|
26257
|
-
margin: "auto",
|
|
26258
|
-
justifyContent: "center",
|
|
26259
|
-
alignItems: "center",
|
|
26260
|
-
fontSize: 13,
|
|
26261
|
-
fontFamily: theme?.fontFamily,
|
|
26262
|
-
color: theme.secondaryTextColor,
|
|
26263
|
-
...containerStyle
|
|
26264
|
-
},
|
|
26265
|
-
className,
|
|
26266
|
-
children: "No results"
|
|
26267
|
-
}
|
|
26268
|
-
);
|
|
26269
|
-
}
|
|
26270
|
-
return /* @__PURE__ */ jsx4(
|
|
26271
|
-
"div",
|
|
26272
|
-
{
|
|
26273
|
-
ref,
|
|
26274
|
-
className,
|
|
26275
|
-
style: {
|
|
26276
|
-
width: "100%",
|
|
26277
|
-
display: "flex",
|
|
26278
|
-
flexDirection: "row",
|
|
26279
|
-
alignItems: "center",
|
|
26280
|
-
justifyContent: "center",
|
|
26281
|
-
boxSizing: "content-box",
|
|
26282
|
-
...containerStyle
|
|
26283
|
-
},
|
|
26284
|
-
...other,
|
|
26285
|
-
children: /* @__PURE__ */ jsx4(
|
|
26286
|
-
ResponsiveContainer,
|
|
26287
|
-
{
|
|
26288
|
-
width: "100%",
|
|
26289
|
-
height: "100%",
|
|
26290
|
-
minWidth: 0,
|
|
26291
|
-
minHeight: 0,
|
|
26292
|
-
children: /* @__PURE__ */ jsxs3(PieChart, { children: [
|
|
26293
|
-
/* @__PURE__ */ jsx4(
|
|
26294
|
-
Pie,
|
|
26295
|
-
{
|
|
26296
|
-
data: parseData2(
|
|
26297
|
-
data,
|
|
26298
|
-
(() => {
|
|
26299
|
-
const colorArray = colorMap[category] && colorMap[category]["primary"] && colorMap[category]["primary"] || colors;
|
|
26300
|
-
const containsCssVars = colorArray.some(
|
|
26301
|
-
(color2) => typeof color2 === "string" && color2.includes("var(")
|
|
26302
|
-
);
|
|
26303
|
-
if (containsCssVars) {
|
|
26304
|
-
return Array.from({ length: data.length }).map(
|
|
26305
|
-
(_, idx) => colorArray[idx % colorArray.length] ?? colorArray[colorArray.length - 1] ?? "#808080"
|
|
26306
|
-
);
|
|
26307
|
-
}
|
|
26308
|
-
return colorArray.length >= data.length ? colorArray.slice(0, data.length) : generateArrayFromColor(colorArray, data.length);
|
|
26309
|
-
})(),
|
|
26310
|
-
index,
|
|
26311
|
-
category
|
|
26312
|
-
),
|
|
26313
|
-
cx: "50%",
|
|
26314
|
-
cy: "50%",
|
|
26315
|
-
startAngle: 90,
|
|
26316
|
-
endAngle: -270,
|
|
26317
|
-
innerRadius: isDonut ? showLegend ? "50%" : "70%" : "0%",
|
|
26318
|
-
outerRadius: showLegend ? "70%" : "100%",
|
|
26319
|
-
paddingAngle: 0,
|
|
26320
|
-
dataKey: category,
|
|
26321
|
-
nameKey: index,
|
|
26322
|
-
isAnimationActive: true,
|
|
26323
|
-
onClick: onClickChartElement,
|
|
26324
|
-
labelLine: false,
|
|
26325
|
-
label: showLegend ? (props2) => renderCustomizedLabel({ ...props2, theme, yAxisFields }) : void 0
|
|
26326
|
-
}
|
|
26327
|
-
),
|
|
26328
|
-
/* @__PURE__ */ jsx4(
|
|
26329
|
-
Tooltip,
|
|
26330
|
-
{
|
|
26331
|
-
wrapperStyle: {
|
|
26332
|
-
outline: "none"
|
|
26333
|
-
},
|
|
26334
|
-
content: ({ active, payload }) => {
|
|
26335
|
-
return /* @__PURE__ */ jsx4(
|
|
26336
|
-
DonutChartTooltip,
|
|
26337
|
-
{
|
|
26338
|
-
active,
|
|
26339
|
-
payload,
|
|
26340
|
-
valueFormatter: valueFormatter2,
|
|
26341
|
-
theme,
|
|
26342
|
-
yAxisFields
|
|
26343
|
-
}
|
|
26344
|
-
);
|
|
26345
|
-
}
|
|
26346
|
-
}
|
|
26347
|
-
)
|
|
26348
|
-
] })
|
|
26349
|
-
}
|
|
26350
|
-
)
|
|
26351
|
-
}
|
|
26352
|
-
);
|
|
26353
|
-
}
|
|
26354
|
-
);
|
|
26355
|
-
var PieChart_default = PieChartWrapper;
|
|
26356
25893
|
|
|
26357
|
-
// src/components/
|
|
26358
|
-
|
|
26359
|
-
import { useContext as useContext5, useEffect as useEffect8, useState as useState9 } from "react";
|
|
25894
|
+
// src/components/Chart/CustomLegend.tsx
|
|
25895
|
+
import { useContext as useContext5, useLayoutEffect as useLayoutEffect2, useRef as useRef5, useState as useState9 } from "react";
|
|
26360
25896
|
|
|
26361
25897
|
// src/components/UiComponents.tsx
|
|
26362
25898
|
import {
|
|
@@ -26368,54 +25904,54 @@ import {
|
|
|
26368
25904
|
} from "react";
|
|
26369
25905
|
|
|
26370
25906
|
// src/assets/ArrowDownHeadIcon.tsx
|
|
26371
|
-
import { jsx as
|
|
25907
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
26372
25908
|
|
|
26373
25909
|
// src/assets/ArrowDownRightIcon.tsx
|
|
26374
|
-
import { jsx as
|
|
25910
|
+
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
26375
25911
|
|
|
26376
25912
|
// src/assets/ArrowDownIcon.tsx
|
|
26377
|
-
import { jsx as
|
|
25913
|
+
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
26378
25914
|
|
|
26379
25915
|
// src/assets/ArrowRightIcon.tsx
|
|
26380
|
-
import { jsx as
|
|
25916
|
+
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
26381
25917
|
|
|
26382
25918
|
// src/assets/ArrowRightHeadIcon.tsx
|
|
26383
|
-
import { jsx as
|
|
25919
|
+
import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
26384
25920
|
|
|
26385
25921
|
// src/assets/ArrowLeftHeadIcon.tsx
|
|
26386
|
-
import { jsx as
|
|
25922
|
+
import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
26387
25923
|
|
|
26388
25924
|
// src/assets/DoubleArrowLeftHeadIcon.tsx
|
|
26389
|
-
import { jsx as
|
|
25925
|
+
import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
26390
25926
|
|
|
26391
25927
|
// src/assets/DoubleArrowRightHeadIcon.tsx
|
|
26392
|
-
import { jsx as
|
|
25928
|
+
import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
26393
25929
|
|
|
26394
25930
|
// src/assets/ArrowUpHeadIcon.tsx
|
|
26395
|
-
import { jsx as
|
|
25931
|
+
import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
26396
25932
|
|
|
26397
25933
|
// src/assets/ArrowUpIcon.tsx
|
|
26398
|
-
import { jsx as
|
|
25934
|
+
import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
26399
25935
|
|
|
26400
25936
|
// src/assets/ArrowUpRightIcon.tsx
|
|
26401
|
-
import { jsx as
|
|
25937
|
+
import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
26402
25938
|
|
|
26403
25939
|
// src/assets/CalendarIcon.tsx
|
|
26404
|
-
import { jsx as
|
|
25940
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
26405
25941
|
|
|
26406
25942
|
// src/assets/CalendarNormalIcon.tsx
|
|
26407
|
-
import { jsx as
|
|
25943
|
+
import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
26408
25944
|
|
|
26409
25945
|
// src/assets/ExclamationFilledIcon.tsx
|
|
26410
|
-
import { jsx as
|
|
26411
|
-
var ExclamationFilledIcon = ({ ...props }) => /* @__PURE__ */
|
|
25946
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
25947
|
+
var ExclamationFilledIcon = ({ ...props }) => /* @__PURE__ */ jsx17(
|
|
26412
25948
|
"svg",
|
|
26413
25949
|
{
|
|
26414
25950
|
...props,
|
|
26415
25951
|
xmlns: "http://www.w3.org/2000/svg",
|
|
26416
25952
|
viewBox: "0 0 24 24",
|
|
26417
25953
|
fill: "currentColor",
|
|
26418
|
-
children: /* @__PURE__ */
|
|
25954
|
+
children: /* @__PURE__ */ jsx17(
|
|
26419
25955
|
"path",
|
|
26420
25956
|
{
|
|
26421
25957
|
fillRule: "evenodd",
|
|
@@ -26428,20 +25964,20 @@ var ExclamationFilledIcon = ({ ...props }) => /* @__PURE__ */ jsx18(
|
|
|
26428
25964
|
var ExclamationFilledIcon_default = ExclamationFilledIcon;
|
|
26429
25965
|
|
|
26430
25966
|
// src/assets/SearchIcon.tsx
|
|
26431
|
-
import { jsx as
|
|
25967
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
26432
25968
|
|
|
26433
25969
|
// src/assets/XCircleIcon.tsx
|
|
26434
|
-
import { jsx as
|
|
25970
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
26435
25971
|
|
|
26436
25972
|
// src/assets/RefreshIcon.tsx
|
|
26437
|
-
import { jsx as
|
|
25973
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
26438
25974
|
|
|
26439
25975
|
// src/assets/FilterIcon.tsx
|
|
26440
|
-
import { jsx as
|
|
25976
|
+
import { jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
26441
25977
|
|
|
26442
25978
|
// src/assets/MoreIcon.tsx
|
|
26443
|
-
import { jsx as
|
|
26444
|
-
var MoreIcon = ({ ...props }) => /* @__PURE__ */
|
|
25979
|
+
import { jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
25980
|
+
var MoreIcon = ({ ...props }) => /* @__PURE__ */ jsxs15(
|
|
26445
25981
|
"svg",
|
|
26446
25982
|
{
|
|
26447
25983
|
width: "24",
|
|
@@ -26451,20 +25987,20 @@ var MoreIcon = ({ ...props }) => /* @__PURE__ */ jsxs16(
|
|
|
26451
25987
|
xmlns: "http://www.w3.org/2000/svg",
|
|
26452
25988
|
...props,
|
|
26453
25989
|
children: [
|
|
26454
|
-
/* @__PURE__ */
|
|
26455
|
-
/* @__PURE__ */
|
|
26456
|
-
/* @__PURE__ */
|
|
25990
|
+
/* @__PURE__ */ jsx22("circle", { cx: "5", cy: "12", r: "2", fill: "currentColor" }),
|
|
25991
|
+
/* @__PURE__ */ jsx22("circle", { cx: "12", cy: "12", r: "2", fill: "currentColor" }),
|
|
25992
|
+
/* @__PURE__ */ jsx22("circle", { cx: "19", cy: "12", r: "2", fill: "currentColor" })
|
|
26457
25993
|
]
|
|
26458
25994
|
}
|
|
26459
25995
|
);
|
|
26460
25996
|
var MoreIcon_default = MoreIcon;
|
|
26461
25997
|
|
|
26462
25998
|
// src/assets/UpLeftArrowsIcon.tsx
|
|
26463
|
-
import { jsx as
|
|
25999
|
+
import { jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
26464
26000
|
|
|
26465
26001
|
// src/assets/XIcon.tsx
|
|
26466
|
-
import { jsx as
|
|
26467
|
-
var XIcon = ({ ...props }) => /* @__PURE__ */
|
|
26002
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
26003
|
+
var XIcon = ({ ...props }) => /* @__PURE__ */ jsx24(
|
|
26468
26004
|
"svg",
|
|
26469
26005
|
{
|
|
26470
26006
|
...props,
|
|
@@ -26472,7 +26008,7 @@ var XIcon = ({ ...props }) => /* @__PURE__ */ jsx25(
|
|
|
26472
26008
|
viewBox: "0 0 24 24",
|
|
26473
26009
|
height: "20",
|
|
26474
26010
|
width: "20",
|
|
26475
|
-
children: /* @__PURE__ */
|
|
26011
|
+
children: /* @__PURE__ */ jsx24(
|
|
26476
26012
|
"path",
|
|
26477
26013
|
{
|
|
26478
26014
|
fillRule: "evenodd",
|
|
@@ -26486,14 +26022,14 @@ var XIcon_default = XIcon;
|
|
|
26486
26022
|
|
|
26487
26023
|
// src/components/Chart/ChartSkeleton.tsx
|
|
26488
26024
|
import { useContext as useContext3 } from "react";
|
|
26489
|
-
import { jsx as
|
|
26490
|
-
var QuillLoadingSkeleton = () => /* @__PURE__ */
|
|
26025
|
+
import { jsx as jsx25, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
26026
|
+
var QuillLoadingSkeleton = () => /* @__PURE__ */ jsx25(ChartSkeleton, {});
|
|
26491
26027
|
function ChartSkeleton({
|
|
26492
26028
|
className,
|
|
26493
26029
|
containerStyle
|
|
26494
26030
|
}) {
|
|
26495
26031
|
const [theme] = useContext3(ThemeContext);
|
|
26496
|
-
return /* @__PURE__ */
|
|
26032
|
+
return /* @__PURE__ */ jsx25(
|
|
26497
26033
|
"div",
|
|
26498
26034
|
{
|
|
26499
26035
|
style: {
|
|
@@ -26503,7 +26039,7 @@ function ChartSkeleton({
|
|
|
26503
26039
|
...containerStyle
|
|
26504
26040
|
},
|
|
26505
26041
|
className,
|
|
26506
|
-
children: /* @__PURE__ */
|
|
26042
|
+
children: /* @__PURE__ */ jsx25(
|
|
26507
26043
|
"div",
|
|
26508
26044
|
{
|
|
26509
26045
|
style: {
|
|
@@ -26513,7 +26049,7 @@ function ChartSkeleton({
|
|
|
26513
26049
|
borderRadius: 8,
|
|
26514
26050
|
overflow: "hidden"
|
|
26515
26051
|
},
|
|
26516
|
-
children: /* @__PURE__ */
|
|
26052
|
+
children: /* @__PURE__ */ jsxs17(
|
|
26517
26053
|
"svg",
|
|
26518
26054
|
{
|
|
26519
26055
|
width: "100%",
|
|
@@ -26521,7 +26057,7 @@ function ChartSkeleton({
|
|
|
26521
26057
|
xmlns: "http://www.w3.org/2000/svg",
|
|
26522
26058
|
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
26523
26059
|
children: [
|
|
26524
|
-
/* @__PURE__ */
|
|
26060
|
+
/* @__PURE__ */ jsx25(
|
|
26525
26061
|
"rect",
|
|
26526
26062
|
{
|
|
26527
26063
|
width: "100%",
|
|
@@ -26529,7 +26065,7 @@ function ChartSkeleton({
|
|
|
26529
26065
|
fill: theme?.loadingStateBackgroundColor || "#F9F9FA"
|
|
26530
26066
|
}
|
|
26531
26067
|
),
|
|
26532
|
-
/* @__PURE__ */
|
|
26068
|
+
/* @__PURE__ */ jsx25("defs", { fill: theme?.loadingStateBackgroundColor || "#F9F9FA", children: /* @__PURE__ */ jsxs17(
|
|
26533
26069
|
"linearGradient",
|
|
26534
26070
|
{
|
|
26535
26071
|
id: "skeletonGradient",
|
|
@@ -26539,10 +26075,10 @@ function ChartSkeleton({
|
|
|
26539
26075
|
y2: "0%",
|
|
26540
26076
|
gradientUnits: "userSpaceOnUse",
|
|
26541
26077
|
children: [
|
|
26542
|
-
/* @__PURE__ */
|
|
26543
|
-
/* @__PURE__ */
|
|
26544
|
-
/* @__PURE__ */
|
|
26545
|
-
/* @__PURE__ */
|
|
26078
|
+
/* @__PURE__ */ jsx25("stop", { offset: "0%", stopColor: "rgba(255,255,255,0)" }),
|
|
26079
|
+
/* @__PURE__ */ jsx25("stop", { offset: "50%", stopColor: "#FEFEFE" }),
|
|
26080
|
+
/* @__PURE__ */ jsx25("stop", { offset: "100%", stopColor: "rgba(255,255,255,0)" }),
|
|
26081
|
+
/* @__PURE__ */ jsx25(
|
|
26546
26082
|
"animate",
|
|
26547
26083
|
{
|
|
26548
26084
|
attributeName: "x1",
|
|
@@ -26552,7 +26088,7 @@ function ChartSkeleton({
|
|
|
26552
26088
|
repeatCount: "indefinite"
|
|
26553
26089
|
}
|
|
26554
26090
|
),
|
|
26555
|
-
/* @__PURE__ */
|
|
26091
|
+
/* @__PURE__ */ jsx25(
|
|
26556
26092
|
"animate",
|
|
26557
26093
|
{
|
|
26558
26094
|
attributeName: "x2",
|
|
@@ -26565,7 +26101,7 @@ function ChartSkeleton({
|
|
|
26565
26101
|
]
|
|
26566
26102
|
}
|
|
26567
26103
|
) }),
|
|
26568
|
-
/* @__PURE__ */
|
|
26104
|
+
/* @__PURE__ */ jsx25("rect", { width: "50%", height: "100%", fill: "url(#skeletonGradient)", children: /* @__PURE__ */ jsx25(
|
|
26569
26105
|
"animate",
|
|
26570
26106
|
{
|
|
26571
26107
|
attributeName: "x",
|
|
@@ -26795,7 +26331,7 @@ var getScrollableParent = (element) => {
|
|
|
26795
26331
|
};
|
|
26796
26332
|
|
|
26797
26333
|
// src/components/UiComponents.tsx
|
|
26798
|
-
import { Fragment
|
|
26334
|
+
import { Fragment, jsx as jsx26, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
26799
26335
|
var QuillTextInput = forwardRef(
|
|
26800
26336
|
({
|
|
26801
26337
|
id: id2,
|
|
@@ -26809,7 +26345,7 @@ var QuillTextInput = forwardRef(
|
|
|
26809
26345
|
const [theme] = useContext4(ThemeContext);
|
|
26810
26346
|
const isNumericWidth = typeof width === "number";
|
|
26811
26347
|
const resolvedWidth = typeof width === "string" ? width : isNumericWidth ? width : "100%";
|
|
26812
|
-
return /* @__PURE__ */
|
|
26348
|
+
return /* @__PURE__ */ jsxs18(
|
|
26813
26349
|
"label",
|
|
26814
26350
|
{
|
|
26815
26351
|
style: {
|
|
@@ -26822,7 +26358,7 @@ var QuillTextInput = forwardRef(
|
|
|
26822
26358
|
flex: isNumericWidth ? "0 0 auto" : "1 1 auto"
|
|
26823
26359
|
},
|
|
26824
26360
|
children: [
|
|
26825
|
-
label && /* @__PURE__ */
|
|
26361
|
+
label && /* @__PURE__ */ jsx26(
|
|
26826
26362
|
"div",
|
|
26827
26363
|
{
|
|
26828
26364
|
style: {
|
|
@@ -26835,7 +26371,7 @@ var QuillTextInput = forwardRef(
|
|
|
26835
26371
|
children: label
|
|
26836
26372
|
}
|
|
26837
26373
|
),
|
|
26838
|
-
/* @__PURE__ */
|
|
26374
|
+
/* @__PURE__ */ jsx26(
|
|
26839
26375
|
"input",
|
|
26840
26376
|
{
|
|
26841
26377
|
ref,
|
|
@@ -26877,12 +26413,12 @@ var MemoizedButton = ({
|
|
|
26877
26413
|
isLoading
|
|
26878
26414
|
}) => {
|
|
26879
26415
|
const [theme] = useContext4(ThemeContext);
|
|
26880
|
-
return /* @__PURE__ */
|
|
26416
|
+
return /* @__PURE__ */ jsx26(
|
|
26881
26417
|
QuillToolTipPortal,
|
|
26882
26418
|
{
|
|
26883
26419
|
enabled: !!tooltipText && tooltipText !== "",
|
|
26884
26420
|
text: tooltipText ?? "",
|
|
26885
|
-
children: /* @__PURE__ */
|
|
26421
|
+
children: /* @__PURE__ */ jsxs18(
|
|
26886
26422
|
"button",
|
|
26887
26423
|
{
|
|
26888
26424
|
className: disabled ? "quill-button-disabled" : "quill-button",
|
|
@@ -26908,7 +26444,7 @@ var MemoizedButton = ({
|
|
|
26908
26444
|
justifyContent: "center"
|
|
26909
26445
|
},
|
|
26910
26446
|
children: [
|
|
26911
|
-
/* @__PURE__ */
|
|
26447
|
+
/* @__PURE__ */ jsx26("style", { children: `
|
|
26912
26448
|
.quill-button {
|
|
26913
26449
|
background-color: ${theme?.primaryButtonColor};
|
|
26914
26450
|
color: ${theme?.primaryButtonTextColor ?? "white"};
|
|
@@ -26922,8 +26458,8 @@ var MemoizedButton = ({
|
|
|
26922
26458
|
background-color: ${theme?.hoverPrimaryButtonColor};
|
|
26923
26459
|
color: ${theme?.hoverPrimaryButtonTextColor ?? "white"};
|
|
26924
26460
|
}` }),
|
|
26925
|
-
isLoading ? /* @__PURE__ */
|
|
26926
|
-
/* @__PURE__ */
|
|
26461
|
+
isLoading ? /* @__PURE__ */ jsx26("div", { style: { position: "absolute" }, children: /* @__PURE__ */ jsx26(LoadingSpinner, {}) }) : null,
|
|
26462
|
+
/* @__PURE__ */ jsxs18(
|
|
26927
26463
|
"div",
|
|
26928
26464
|
{
|
|
26929
26465
|
style: {
|
|
@@ -26950,12 +26486,12 @@ var MemoizedSecondaryButton = ({
|
|
|
26950
26486
|
width
|
|
26951
26487
|
}) => {
|
|
26952
26488
|
const [theme] = useContext4(ThemeContext);
|
|
26953
|
-
return /* @__PURE__ */
|
|
26489
|
+
return /* @__PURE__ */ jsx26(
|
|
26954
26490
|
QuillToolTip,
|
|
26955
26491
|
{
|
|
26956
26492
|
enabled: !!tooltipText && tooltipText !== "",
|
|
26957
26493
|
text: tooltipText ?? "",
|
|
26958
|
-
children: /* @__PURE__ */
|
|
26494
|
+
children: /* @__PURE__ */ jsxs18(
|
|
26959
26495
|
"button",
|
|
26960
26496
|
{
|
|
26961
26497
|
className: "quill-secondary-button",
|
|
@@ -26982,7 +26518,7 @@ var MemoizedSecondaryButton = ({
|
|
|
26982
26518
|
},
|
|
26983
26519
|
disabled,
|
|
26984
26520
|
children: [
|
|
26985
|
-
/* @__PURE__ */
|
|
26521
|
+
/* @__PURE__ */ jsx26("style", { children: `
|
|
26986
26522
|
.quill-secondary-button {
|
|
26987
26523
|
background-color: white;
|
|
26988
26524
|
}
|
|
@@ -27002,8 +26538,8 @@ var MemoizedSecondaryButton = ({
|
|
|
27002
26538
|
flex-shrink: 0;
|
|
27003
26539
|
}
|
|
27004
26540
|
` }),
|
|
27005
|
-
icon && /* @__PURE__ */
|
|
27006
|
-
label && /* @__PURE__ */
|
|
26541
|
+
icon && /* @__PURE__ */ jsx26("div", { className: "icon-container", children: icon }),
|
|
26542
|
+
label && /* @__PURE__ */ jsx26(
|
|
27007
26543
|
"span",
|
|
27008
26544
|
{
|
|
27009
26545
|
style: {
|
|
@@ -27024,7 +26560,7 @@ var MemoizedSecondaryButton = ({
|
|
|
27024
26560
|
};
|
|
27025
26561
|
var MemoizedHeader = ({ label }) => {
|
|
27026
26562
|
const [theme] = useContext4(ThemeContext);
|
|
27027
|
-
return /* @__PURE__ */
|
|
26563
|
+
return /* @__PURE__ */ jsx26(
|
|
27028
26564
|
"h1",
|
|
27029
26565
|
{
|
|
27030
26566
|
style: {
|
|
@@ -27042,7 +26578,7 @@ var MemoizedHeader = ({ label }) => {
|
|
|
27042
26578
|
};
|
|
27043
26579
|
var MemoizedSubHeader = ({ label }) => {
|
|
27044
26580
|
const [theme] = useContext4(ThemeContext);
|
|
27045
|
-
return /* @__PURE__ */
|
|
26581
|
+
return /* @__PURE__ */ jsx26(
|
|
27046
26582
|
"h2",
|
|
27047
26583
|
{
|
|
27048
26584
|
style: {
|
|
@@ -27061,7 +26597,7 @@ var MemoizedSubHeader = ({ label }) => {
|
|
|
27061
26597
|
};
|
|
27062
26598
|
var MemoizedLabel = ({ label }) => {
|
|
27063
26599
|
const [theme] = useContext4(ThemeContext);
|
|
27064
|
-
return /* @__PURE__ */
|
|
26600
|
+
return /* @__PURE__ */ jsx26(
|
|
27065
26601
|
"h1",
|
|
27066
26602
|
{
|
|
27067
26603
|
style: {
|
|
@@ -27084,7 +26620,7 @@ var MemoizedCheckbox = ({
|
|
|
27084
26620
|
disabled
|
|
27085
26621
|
}) => {
|
|
27086
26622
|
const [theme] = useContext4(ThemeContext);
|
|
27087
|
-
return /* @__PURE__ */
|
|
26623
|
+
return /* @__PURE__ */ jsxs18(
|
|
27088
26624
|
"label",
|
|
27089
26625
|
{
|
|
27090
26626
|
style: {
|
|
@@ -27097,7 +26633,7 @@ var MemoizedCheckbox = ({
|
|
|
27097
26633
|
...containerStyle
|
|
27098
26634
|
},
|
|
27099
26635
|
children: [
|
|
27100
|
-
/* @__PURE__ */
|
|
26636
|
+
/* @__PURE__ */ jsx26(
|
|
27101
26637
|
"input",
|
|
27102
26638
|
{
|
|
27103
26639
|
type: "checkbox",
|
|
@@ -27112,7 +26648,7 @@ var MemoizedCheckbox = ({
|
|
|
27112
26648
|
}
|
|
27113
26649
|
}
|
|
27114
26650
|
),
|
|
27115
|
-
/* @__PURE__ */
|
|
26651
|
+
/* @__PURE__ */ jsx26(
|
|
27116
26652
|
"span",
|
|
27117
26653
|
{
|
|
27118
26654
|
style: {
|
|
@@ -27141,7 +26677,7 @@ var QuillTabs = ({
|
|
|
27141
26677
|
options = DEFAULT_TAB_OPTIONS,
|
|
27142
26678
|
value,
|
|
27143
26679
|
onChange
|
|
27144
|
-
}) => /* @__PURE__ */
|
|
26680
|
+
}) => /* @__PURE__ */ jsx26(
|
|
27145
26681
|
"div",
|
|
27146
26682
|
{
|
|
27147
26683
|
style: {
|
|
@@ -27152,7 +26688,7 @@ var QuillTabs = ({
|
|
|
27152
26688
|
background: "#F9FAFB",
|
|
27153
26689
|
padding: "5px"
|
|
27154
26690
|
},
|
|
27155
|
-
children: options.map((option, index) => /* @__PURE__ */
|
|
26691
|
+
children: options.map((option, index) => /* @__PURE__ */ jsx26(
|
|
27156
26692
|
"button",
|
|
27157
26693
|
{
|
|
27158
26694
|
onClick: () => {
|
|
@@ -27193,7 +26729,7 @@ var QuillTabs = ({
|
|
|
27193
26729
|
);
|
|
27194
26730
|
var MemoizedText = ({ label }) => {
|
|
27195
26731
|
const [theme] = useContext4(ThemeContext);
|
|
27196
|
-
return /* @__PURE__ */
|
|
26732
|
+
return /* @__PURE__ */ jsx26(
|
|
27197
26733
|
"p",
|
|
27198
26734
|
{
|
|
27199
26735
|
style: {
|
|
@@ -27264,15 +26800,15 @@ var MemoizedPopover = ({
|
|
|
27264
26800
|
}
|
|
27265
26801
|
}
|
|
27266
26802
|
};
|
|
27267
|
-
return /* @__PURE__ */
|
|
26803
|
+
return /* @__PURE__ */ jsxs18("div", { style: containerStyle, children: [
|
|
27268
26804
|
triggerLabel,
|
|
27269
|
-
!disabled && isOpen && /* @__PURE__ */
|
|
26805
|
+
!disabled && isOpen && /* @__PURE__ */ jsx26(
|
|
27270
26806
|
"div",
|
|
27271
26807
|
{
|
|
27272
26808
|
id: "quill-popover-modal",
|
|
27273
26809
|
ref: modalRef,
|
|
27274
26810
|
style: { position: "relative" },
|
|
27275
|
-
children: /* @__PURE__ */
|
|
26811
|
+
children: /* @__PURE__ */ jsxs18(
|
|
27276
26812
|
"div",
|
|
27277
26813
|
{
|
|
27278
26814
|
ref: popoverRef,
|
|
@@ -27289,7 +26825,7 @@ var MemoizedPopover = ({
|
|
|
27289
26825
|
right: rightAlignment
|
|
27290
26826
|
},
|
|
27291
26827
|
children: [
|
|
27292
|
-
popoverTitle && /* @__PURE__ */
|
|
26828
|
+
popoverTitle && /* @__PURE__ */ jsx26(
|
|
27293
26829
|
"h1",
|
|
27294
26830
|
{
|
|
27295
26831
|
style: {
|
|
@@ -27325,8 +26861,8 @@ function MemoizedModal({
|
|
|
27325
26861
|
if (!isOpen) {
|
|
27326
26862
|
return null;
|
|
27327
26863
|
}
|
|
27328
|
-
return /* @__PURE__ */
|
|
27329
|
-
/* @__PURE__ */
|
|
26864
|
+
return /* @__PURE__ */ jsxs18(Fragment, { children: [
|
|
26865
|
+
/* @__PURE__ */ jsx26(
|
|
27330
26866
|
"div",
|
|
27331
26867
|
{
|
|
27332
26868
|
style: {
|
|
@@ -27342,7 +26878,7 @@ function MemoizedModal({
|
|
|
27342
26878
|
onClick: () => setIsOpen(false)
|
|
27343
26879
|
}
|
|
27344
26880
|
),
|
|
27345
|
-
/* @__PURE__ */
|
|
26881
|
+
/* @__PURE__ */ jsx26(
|
|
27346
26882
|
"div",
|
|
27347
26883
|
{
|
|
27348
26884
|
style: {
|
|
@@ -27365,7 +26901,7 @@ function MemoizedModal({
|
|
|
27365
26901
|
maxWidth: "calc(100vw - 82px)",
|
|
27366
26902
|
maxHeight: "calc(100vh - 82px)"
|
|
27367
26903
|
},
|
|
27368
|
-
children: /* @__PURE__ */
|
|
26904
|
+
children: /* @__PURE__ */ jsxs18(
|
|
27369
26905
|
"div",
|
|
27370
26906
|
{
|
|
27371
26907
|
style: {
|
|
@@ -27379,7 +26915,7 @@ function MemoizedModal({
|
|
|
27379
26915
|
fontFamily: theme?.fontFamily
|
|
27380
26916
|
},
|
|
27381
26917
|
children: [
|
|
27382
|
-
/* @__PURE__ */
|
|
26918
|
+
/* @__PURE__ */ jsxs18(
|
|
27383
26919
|
"div",
|
|
27384
26920
|
{
|
|
27385
26921
|
id: "quill-modal-header",
|
|
@@ -27394,7 +26930,7 @@ function MemoizedModal({
|
|
|
27394
26930
|
borderBottom: "1px solid #E7E7E7"
|
|
27395
26931
|
},
|
|
27396
26932
|
children: [
|
|
27397
|
-
/* @__PURE__ */
|
|
26933
|
+
/* @__PURE__ */ jsx26(
|
|
27398
26934
|
"h2",
|
|
27399
26935
|
{
|
|
27400
26936
|
style: {
|
|
@@ -27408,11 +26944,11 @@ function MemoizedModal({
|
|
|
27408
26944
|
children: title
|
|
27409
26945
|
}
|
|
27410
26946
|
),
|
|
27411
|
-
/* @__PURE__ */
|
|
26947
|
+
/* @__PURE__ */ jsx26(MemoizedDeleteButton, { onClick: () => setIsOpen(false) })
|
|
27412
26948
|
]
|
|
27413
26949
|
}
|
|
27414
26950
|
),
|
|
27415
|
-
/* @__PURE__ */
|
|
26951
|
+
/* @__PURE__ */ jsx26(
|
|
27416
26952
|
"div",
|
|
27417
26953
|
{
|
|
27418
26954
|
style: {
|
|
@@ -27433,7 +26969,7 @@ function MemoizedModal({
|
|
|
27433
26969
|
}
|
|
27434
26970
|
var MemoizedDeleteButton = ({
|
|
27435
26971
|
onClick
|
|
27436
|
-
}) => /* @__PURE__ */
|
|
26972
|
+
}) => /* @__PURE__ */ jsxs18(
|
|
27437
26973
|
"button",
|
|
27438
26974
|
{
|
|
27439
26975
|
className: "quill-delete-button",
|
|
@@ -27450,18 +26986,18 @@ var MemoizedDeleteButton = ({
|
|
|
27450
26986
|
borderRadius: 6
|
|
27451
26987
|
},
|
|
27452
26988
|
children: [
|
|
27453
|
-
/* @__PURE__ */
|
|
26989
|
+
/* @__PURE__ */ jsx26("style", { children: `
|
|
27454
26990
|
.quill-delete-button {
|
|
27455
26991
|
background-color: white;
|
|
27456
26992
|
}
|
|
27457
26993
|
.quill-delete-button:hover {
|
|
27458
26994
|
background-color: #F4F4F5;
|
|
27459
26995
|
}` }),
|
|
27460
|
-
/* @__PURE__ */
|
|
26996
|
+
/* @__PURE__ */ jsx26(XIcon_default, { height: "20", width: "20", fill: "#6C727F" })
|
|
27461
26997
|
]
|
|
27462
26998
|
}
|
|
27463
26999
|
);
|
|
27464
|
-
var LoadingSpinner = () => /* @__PURE__ */
|
|
27000
|
+
var LoadingSpinner = () => /* @__PURE__ */ jsx26(
|
|
27465
27001
|
"div",
|
|
27466
27002
|
{
|
|
27467
27003
|
style: {
|
|
@@ -27472,8 +27008,8 @@ var LoadingSpinner = () => /* @__PURE__ */ jsx27(
|
|
|
27472
27008
|
justifyContent: "center",
|
|
27473
27009
|
alignItems: "center"
|
|
27474
27010
|
},
|
|
27475
|
-
children: /* @__PURE__ */
|
|
27476
|
-
/* @__PURE__ */
|
|
27011
|
+
children: /* @__PURE__ */ jsxs18("svg", { width: "24", height: "24", children: [
|
|
27012
|
+
/* @__PURE__ */ jsx26(
|
|
27477
27013
|
"circle",
|
|
27478
27014
|
{
|
|
27479
27015
|
cx: "12",
|
|
@@ -27485,7 +27021,7 @@ var LoadingSpinner = () => /* @__PURE__ */ jsx27(
|
|
|
27485
27021
|
stroke: "#364153",
|
|
27486
27022
|
fill: "none",
|
|
27487
27023
|
transform: "rotate(-90 12 12)",
|
|
27488
|
-
children: /* @__PURE__ */
|
|
27024
|
+
children: /* @__PURE__ */ jsx26(
|
|
27489
27025
|
"animateTransform",
|
|
27490
27026
|
{
|
|
27491
27027
|
attributeName: "transform",
|
|
@@ -27499,7 +27035,7 @@ var LoadingSpinner = () => /* @__PURE__ */ jsx27(
|
|
|
27499
27035
|
)
|
|
27500
27036
|
}
|
|
27501
27037
|
),
|
|
27502
|
-
/* @__PURE__ */
|
|
27038
|
+
/* @__PURE__ */ jsx26(
|
|
27503
27039
|
"circle",
|
|
27504
27040
|
{
|
|
27505
27041
|
cx: "12",
|
|
@@ -27511,7 +27047,7 @@ var LoadingSpinner = () => /* @__PURE__ */ jsx27(
|
|
|
27511
27047
|
stroke: "#ADB1B9",
|
|
27512
27048
|
fill: "none",
|
|
27513
27049
|
transform: "rotate(90 12 12)",
|
|
27514
|
-
children: /* @__PURE__ */
|
|
27050
|
+
children: /* @__PURE__ */ jsx26(
|
|
27515
27051
|
"animateTransform",
|
|
27516
27052
|
{
|
|
27517
27053
|
attributeName: "transform",
|
|
@@ -27528,7 +27064,7 @@ var LoadingSpinner = () => /* @__PURE__ */ jsx27(
|
|
|
27528
27064
|
] })
|
|
27529
27065
|
}
|
|
27530
27066
|
);
|
|
27531
|
-
var QuillEmptyDashboardComponent = () => /* @__PURE__ */
|
|
27067
|
+
var QuillEmptyDashboardComponent = () => /* @__PURE__ */ jsx26("div", {});
|
|
27532
27068
|
var defaultFilterContainerStyles = {
|
|
27533
27069
|
display: "flex",
|
|
27534
27070
|
width: "100%",
|
|
@@ -27540,9 +27076,9 @@ var QuillLoadingDashboardComponent = ({
|
|
|
27540
27076
|
chartContainerStyle,
|
|
27541
27077
|
LoadingComponent = QuillLoadingSkeleton
|
|
27542
27078
|
}) => {
|
|
27543
|
-
return /* @__PURE__ */
|
|
27544
|
-
/* @__PURE__ */
|
|
27545
|
-
/* @__PURE__ */
|
|
27079
|
+
return /* @__PURE__ */ jsxs18("div", { style: { ...containerStyle, overflow: "hidden" }, children: [
|
|
27080
|
+
/* @__PURE__ */ jsx26("div", { style: defaultFilterContainerStyles, children: /* @__PURE__ */ jsx26(LoadingComponent, {}) }),
|
|
27081
|
+
/* @__PURE__ */ jsx26(
|
|
27546
27082
|
"div",
|
|
27547
27083
|
{
|
|
27548
27084
|
style: {
|
|
@@ -27551,7 +27087,7 @@ var QuillLoadingDashboardComponent = ({
|
|
|
27551
27087
|
gridTemplateRows: `repeat(${170}px)`,
|
|
27552
27088
|
gap: 40
|
|
27553
27089
|
},
|
|
27554
|
-
children: Array.from({ length: 4 }).map((_, index) => /* @__PURE__ */
|
|
27090
|
+
children: Array.from({ length: 4 }).map((_, index) => /* @__PURE__ */ jsx26("div", { style: chartContainerStyle, children: /* @__PURE__ */ jsx26(LoadingComponent, {}, index) }, index))
|
|
27555
27091
|
}
|
|
27556
27092
|
)
|
|
27557
27093
|
] });
|
|
@@ -27559,7 +27095,7 @@ var QuillLoadingDashboardComponent = ({
|
|
|
27559
27095
|
var QuillChartBuilderInputRowContainer = ({
|
|
27560
27096
|
children
|
|
27561
27097
|
}) => {
|
|
27562
|
-
return /* @__PURE__ */
|
|
27098
|
+
return /* @__PURE__ */ jsx26(
|
|
27563
27099
|
"div",
|
|
27564
27100
|
{
|
|
27565
27101
|
style: {
|
|
@@ -27574,7 +27110,7 @@ var QuillChartBuilderInputRowContainer = ({
|
|
|
27574
27110
|
var QuillChartBuilderInputColumnContainer = ({
|
|
27575
27111
|
children
|
|
27576
27112
|
}) => {
|
|
27577
|
-
return /* @__PURE__ */
|
|
27113
|
+
return /* @__PURE__ */ jsx26(
|
|
27578
27114
|
"div",
|
|
27579
27115
|
{
|
|
27580
27116
|
style: {
|
|
@@ -27589,7 +27125,7 @@ var QuillChartBuilderInputColumnContainer = ({
|
|
|
27589
27125
|
var QuillPivotRowContainer = ({
|
|
27590
27126
|
children
|
|
27591
27127
|
}) => {
|
|
27592
|
-
return /* @__PURE__ */
|
|
27128
|
+
return /* @__PURE__ */ jsx26(
|
|
27593
27129
|
"div",
|
|
27594
27130
|
{
|
|
27595
27131
|
style: {
|
|
@@ -27604,7 +27140,7 @@ var QuillPivotRowContainer = ({
|
|
|
27604
27140
|
var QuillPivotColumnContainer = ({
|
|
27605
27141
|
children
|
|
27606
27142
|
}) => {
|
|
27607
|
-
return /* @__PURE__ */
|
|
27143
|
+
return /* @__PURE__ */ jsx26(
|
|
27608
27144
|
"div",
|
|
27609
27145
|
{
|
|
27610
27146
|
style: {
|
|
@@ -27619,7 +27155,7 @@ var QuillPivotColumnContainer = ({
|
|
|
27619
27155
|
var QuillFilterContainerComponent = ({
|
|
27620
27156
|
children
|
|
27621
27157
|
}) => {
|
|
27622
|
-
return /* @__PURE__ */
|
|
27158
|
+
return /* @__PURE__ */ jsx26(
|
|
27623
27159
|
"div",
|
|
27624
27160
|
{
|
|
27625
27161
|
style: {
|
|
@@ -27679,8 +27215,8 @@ var QuillModalComponent = ({
|
|
|
27679
27215
|
}
|
|
27680
27216
|
}
|
|
27681
27217
|
};
|
|
27682
|
-
return /* @__PURE__ */
|
|
27683
|
-
/* @__PURE__ */
|
|
27218
|
+
return /* @__PURE__ */ jsxs18("div", { style: { position: "relative" }, ref: modalRef, children: [
|
|
27219
|
+
/* @__PURE__ */ jsx26(
|
|
27684
27220
|
MemoizedSecondaryButton,
|
|
27685
27221
|
{
|
|
27686
27222
|
onClick: () => {
|
|
@@ -27689,12 +27225,12 @@ var QuillModalComponent = ({
|
|
|
27689
27225
|
label: triggerLabel || ""
|
|
27690
27226
|
}
|
|
27691
27227
|
),
|
|
27692
|
-
title && title === "Filters" ? isOpen && /* @__PURE__ */
|
|
27228
|
+
title && title === "Filters" ? isOpen && /* @__PURE__ */ jsx26(
|
|
27693
27229
|
"div",
|
|
27694
27230
|
{
|
|
27695
27231
|
id: "quill-popover-modal",
|
|
27696
27232
|
style: { position: "relative", top: 10 },
|
|
27697
|
-
children: /* @__PURE__ */
|
|
27233
|
+
children: /* @__PURE__ */ jsxs18(
|
|
27698
27234
|
"div",
|
|
27699
27235
|
{
|
|
27700
27236
|
ref: popoverRef,
|
|
@@ -27711,7 +27247,7 @@ var QuillModalComponent = ({
|
|
|
27711
27247
|
right: rightAlignment
|
|
27712
27248
|
},
|
|
27713
27249
|
children: [
|
|
27714
|
-
/* @__PURE__ */
|
|
27250
|
+
/* @__PURE__ */ jsx26(
|
|
27715
27251
|
"h1",
|
|
27716
27252
|
{
|
|
27717
27253
|
style: {
|
|
@@ -27731,8 +27267,8 @@ var QuillModalComponent = ({
|
|
|
27731
27267
|
}
|
|
27732
27268
|
)
|
|
27733
27269
|
}
|
|
27734
|
-
) : isOpen && /* @__PURE__ */
|
|
27735
|
-
/* @__PURE__ */
|
|
27270
|
+
) : isOpen && /* @__PURE__ */ jsxs18("div", { children: [
|
|
27271
|
+
/* @__PURE__ */ jsx26(
|
|
27736
27272
|
"div",
|
|
27737
27273
|
{
|
|
27738
27274
|
style: {
|
|
@@ -27750,7 +27286,7 @@ var QuillModalComponent = ({
|
|
|
27750
27286
|
}
|
|
27751
27287
|
}
|
|
27752
27288
|
),
|
|
27753
|
-
/* @__PURE__ */
|
|
27289
|
+
/* @__PURE__ */ jsx26(
|
|
27754
27290
|
"div",
|
|
27755
27291
|
{
|
|
27756
27292
|
style: {
|
|
@@ -27771,7 +27307,7 @@ var QuillModalComponent = ({
|
|
|
27771
27307
|
padding: 30,
|
|
27772
27308
|
overflow: "auto"
|
|
27773
27309
|
},
|
|
27774
|
-
children: /* @__PURE__ */
|
|
27310
|
+
children: /* @__PURE__ */ jsxs18(
|
|
27775
27311
|
"div",
|
|
27776
27312
|
{
|
|
27777
27313
|
style: {
|
|
@@ -27780,7 +27316,7 @@ var QuillModalComponent = ({
|
|
|
27780
27316
|
minWidth: "60vw"
|
|
27781
27317
|
},
|
|
27782
27318
|
children: [
|
|
27783
|
-
/* @__PURE__ */
|
|
27319
|
+
/* @__PURE__ */ jsx26(
|
|
27784
27320
|
"h1",
|
|
27785
27321
|
{
|
|
27786
27322
|
style: {
|
|
@@ -27807,7 +27343,7 @@ var QuillModalComponent = ({
|
|
|
27807
27343
|
var QuillChartBuilderFormContainer = ({
|
|
27808
27344
|
children
|
|
27809
27345
|
}) => {
|
|
27810
|
-
return /* @__PURE__ */
|
|
27346
|
+
return /* @__PURE__ */ jsx26(
|
|
27811
27347
|
"div",
|
|
27812
27348
|
{
|
|
27813
27349
|
style: {
|
|
@@ -27830,7 +27366,7 @@ var QuillErrorMessageComponent = ({
|
|
|
27830
27366
|
containerStyle
|
|
27831
27367
|
}) => {
|
|
27832
27368
|
const [theme] = useContext4(ThemeContext);
|
|
27833
|
-
return /* @__PURE__ */
|
|
27369
|
+
return /* @__PURE__ */ jsxs18(
|
|
27834
27370
|
"div",
|
|
27835
27371
|
{
|
|
27836
27372
|
style: {
|
|
@@ -27848,7 +27384,7 @@ var QuillErrorMessageComponent = ({
|
|
|
27848
27384
|
...containerStyle
|
|
27849
27385
|
},
|
|
27850
27386
|
children: [
|
|
27851
|
-
/* @__PURE__ */
|
|
27387
|
+
/* @__PURE__ */ jsx26(
|
|
27852
27388
|
"svg",
|
|
27853
27389
|
{
|
|
27854
27390
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -27862,7 +27398,7 @@ var QuillErrorMessageComponent = ({
|
|
|
27862
27398
|
marginRight: 8,
|
|
27863
27399
|
color: "#D32F2F"
|
|
27864
27400
|
},
|
|
27865
|
-
children: /* @__PURE__ */
|
|
27401
|
+
children: /* @__PURE__ */ jsx26(
|
|
27866
27402
|
"path",
|
|
27867
27403
|
{
|
|
27868
27404
|
strokeLinecap: "round",
|
|
@@ -27879,11 +27415,11 @@ var QuillErrorMessageComponent = ({
|
|
|
27879
27415
|
};
|
|
27880
27416
|
var QuillColumnSearchEmptyState = () => {
|
|
27881
27417
|
const [theme] = useContext4(ThemeContext);
|
|
27882
|
-
return /* @__PURE__ */
|
|
27418
|
+
return /* @__PURE__ */ jsx26("div", { style: { fontFamily: theme?.fontFamily }, children: "No results found" });
|
|
27883
27419
|
};
|
|
27884
27420
|
var QuillLoadingComponent = () => {
|
|
27885
27421
|
const [theme] = useContext4(ThemeContext);
|
|
27886
|
-
return /* @__PURE__ */
|
|
27422
|
+
return /* @__PURE__ */ jsxs18(
|
|
27887
27423
|
"div",
|
|
27888
27424
|
{
|
|
27889
27425
|
style: {
|
|
@@ -27898,9 +27434,9 @@ var QuillLoadingComponent = () => {
|
|
|
27898
27434
|
justifyContent: "center"
|
|
27899
27435
|
},
|
|
27900
27436
|
children: [
|
|
27901
|
-
/* @__PURE__ */
|
|
27902
|
-
/* @__PURE__ */
|
|
27903
|
-
/* @__PURE__ */
|
|
27437
|
+
/* @__PURE__ */ jsx26("div", { style: { height: 100 } }),
|
|
27438
|
+
/* @__PURE__ */ jsxs18("svg", { width: "24", height: "24", children: [
|
|
27439
|
+
/* @__PURE__ */ jsx26(
|
|
27904
27440
|
"circle",
|
|
27905
27441
|
{
|
|
27906
27442
|
cx: "12",
|
|
@@ -27912,7 +27448,7 @@ var QuillLoadingComponent = () => {
|
|
|
27912
27448
|
stroke: theme?.primaryTextColor || "#364153",
|
|
27913
27449
|
fill: "none",
|
|
27914
27450
|
transform: "rotate(-90 12 12)",
|
|
27915
|
-
children: /* @__PURE__ */
|
|
27451
|
+
children: /* @__PURE__ */ jsx26(
|
|
27916
27452
|
"animateTransform",
|
|
27917
27453
|
{
|
|
27918
27454
|
attributeName: "transform",
|
|
@@ -27926,7 +27462,7 @@ var QuillLoadingComponent = () => {
|
|
|
27926
27462
|
)
|
|
27927
27463
|
}
|
|
27928
27464
|
),
|
|
27929
|
-
/* @__PURE__ */
|
|
27465
|
+
/* @__PURE__ */ jsx26(
|
|
27930
27466
|
"circle",
|
|
27931
27467
|
{
|
|
27932
27468
|
cx: "12",
|
|
@@ -27938,7 +27474,7 @@ var QuillLoadingComponent = () => {
|
|
|
27938
27474
|
stroke: "#ADB1B9",
|
|
27939
27475
|
fill: "none",
|
|
27940
27476
|
transform: "rotate(90 12 12)",
|
|
27941
|
-
children: /* @__PURE__ */
|
|
27477
|
+
children: /* @__PURE__ */ jsx26(
|
|
27942
27478
|
"animateTransform",
|
|
27943
27479
|
{
|
|
27944
27480
|
attributeName: "transform",
|
|
@@ -28028,7 +27564,7 @@ var OverflowContainer = ({
|
|
|
28028
27564
|
opacity: showBottomShadow ? 1 : 0,
|
|
28029
27565
|
...shadowStyle
|
|
28030
27566
|
};
|
|
28031
|
-
return /* @__PURE__ */
|
|
27567
|
+
return /* @__PURE__ */ jsxs18(
|
|
28032
27568
|
"div",
|
|
28033
27569
|
{
|
|
28034
27570
|
style: containerStyle,
|
|
@@ -28037,9 +27573,9 @@ var OverflowContainer = ({
|
|
|
28037
27573
|
onTouchMove: checkOverflow,
|
|
28038
27574
|
onMouseMove: checkOverflow,
|
|
28039
27575
|
children: [
|
|
28040
|
-
/* @__PURE__ */
|
|
27576
|
+
/* @__PURE__ */ jsx26("div", { style: topShadowStyle }),
|
|
28041
27577
|
children,
|
|
28042
|
-
/* @__PURE__ */
|
|
27578
|
+
/* @__PURE__ */ jsx26("div", { style: bottomShadowStyle })
|
|
28043
27579
|
]
|
|
28044
27580
|
}
|
|
28045
27581
|
);
|
|
@@ -28053,8 +27589,8 @@ var QuillToolTip = ({
|
|
|
28053
27589
|
displayBelow = false
|
|
28054
27590
|
}) => {
|
|
28055
27591
|
const [theme] = useContext4(ThemeContext);
|
|
28056
|
-
return enabled ? /* @__PURE__ */
|
|
28057
|
-
/* @__PURE__ */
|
|
27592
|
+
return enabled ? /* @__PURE__ */ jsxs18("div", { className: "tooltip-container", style: { ...containerStyle }, children: [
|
|
27593
|
+
/* @__PURE__ */ jsx26("style", { children: `
|
|
28058
27594
|
.tooltip-container {
|
|
28059
27595
|
position: relative;
|
|
28060
27596
|
display: inline-block;
|
|
@@ -28116,7 +27652,7 @@ var QuillToolTip = ({
|
|
|
28116
27652
|
opacity: 1;
|
|
28117
27653
|
}` }),
|
|
28118
27654
|
children,
|
|
28119
|
-
/* @__PURE__ */
|
|
27655
|
+
/* @__PURE__ */ jsx26("div", { className: "tooltip-text", style: { ...textStyle }, children: text })
|
|
28120
27656
|
] }) : children;
|
|
28121
27657
|
};
|
|
28122
27658
|
var QuillToolTipPortal = ({
|
|
@@ -28171,9 +27707,9 @@ var QuillToolTipPortal = ({
|
|
|
28171
27707
|
}
|
|
28172
27708
|
}, [isOpen]);
|
|
28173
27709
|
if (!enabled) {
|
|
28174
|
-
return /* @__PURE__ */
|
|
27710
|
+
return /* @__PURE__ */ jsx26(Fragment, { children });
|
|
28175
27711
|
}
|
|
28176
|
-
return /* @__PURE__ */
|
|
27712
|
+
return /* @__PURE__ */ jsxs18(
|
|
28177
27713
|
"div",
|
|
28178
27714
|
{
|
|
28179
27715
|
ref: triggerRef,
|
|
@@ -28187,7 +27723,7 @@ var QuillToolTipPortal = ({
|
|
|
28187
27723
|
children: [
|
|
28188
27724
|
children,
|
|
28189
27725
|
isOpen && createPortal(
|
|
28190
|
-
/* @__PURE__ */
|
|
27726
|
+
/* @__PURE__ */ jsxs18(
|
|
28191
27727
|
"div",
|
|
28192
27728
|
{
|
|
28193
27729
|
ref: tooltipRef,
|
|
@@ -28214,7 +27750,7 @@ var QuillToolTipPortal = ({
|
|
|
28214
27750
|
},
|
|
28215
27751
|
children: [
|
|
28216
27752
|
text,
|
|
28217
|
-
/* @__PURE__ */
|
|
27753
|
+
/* @__PURE__ */ jsx26(
|
|
28218
27754
|
"div",
|
|
28219
27755
|
{
|
|
28220
27756
|
style: {
|
|
@@ -28229,7 +27765,7 @@ var QuillToolTipPortal = ({
|
|
|
28229
27765
|
}
|
|
28230
27766
|
}
|
|
28231
27767
|
),
|
|
28232
|
-
/* @__PURE__ */
|
|
27768
|
+
/* @__PURE__ */ jsx26(
|
|
28233
27769
|
"div",
|
|
28234
27770
|
{
|
|
28235
27771
|
style: {
|
|
@@ -28261,7 +27797,7 @@ var QuillChartBuilderCheckboxComponent = ({
|
|
|
28261
27797
|
containerStyle
|
|
28262
27798
|
}) => {
|
|
28263
27799
|
const [theme] = useContext4(ThemeContext);
|
|
28264
|
-
return /* @__PURE__ */
|
|
27800
|
+
return /* @__PURE__ */ jsx26(
|
|
28265
27801
|
"div",
|
|
28266
27802
|
{
|
|
28267
27803
|
style: {
|
|
@@ -28270,7 +27806,7 @@ var QuillChartBuilderCheckboxComponent = ({
|
|
|
28270
27806
|
paddingBottom: 4,
|
|
28271
27807
|
paddingLeft: 8,
|
|
28272
27808
|
paddingRight: 8,
|
|
28273
|
-
border:
|
|
27809
|
+
// border: '1px solid #E7E7E7',
|
|
28274
27810
|
borderRadius: 4,
|
|
28275
27811
|
display: "flex",
|
|
28276
27812
|
alignItems: "center",
|
|
@@ -28279,7 +27815,7 @@ var QuillChartBuilderCheckboxComponent = ({
|
|
|
28279
27815
|
pointerEvents: disabled ? "none" : "auto",
|
|
28280
27816
|
...containerStyle
|
|
28281
27817
|
},
|
|
28282
|
-
children: /* @__PURE__ */
|
|
27818
|
+
children: /* @__PURE__ */ jsx26(
|
|
28283
27819
|
MemoizedCheckbox,
|
|
28284
27820
|
{
|
|
28285
27821
|
isChecked,
|
|
@@ -28359,7 +27895,7 @@ var QuillPortal = ({
|
|
|
28359
27895
|
showModal
|
|
28360
27896
|
);
|
|
28361
27897
|
return createPortal(
|
|
28362
|
-
/* @__PURE__ */
|
|
27898
|
+
/* @__PURE__ */ jsx26(
|
|
28363
27899
|
"div",
|
|
28364
27900
|
{
|
|
28365
27901
|
style: {
|
|
@@ -28394,8 +27930,645 @@ var QuillPortal = ({
|
|
|
28394
27930
|
);
|
|
28395
27931
|
};
|
|
28396
27932
|
|
|
28397
|
-
// src/components/
|
|
27933
|
+
// src/components/Chart/CustomLegend.tsx
|
|
27934
|
+
import { jsx as jsx27, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
27935
|
+
var getLegendLabel = (entry) => {
|
|
27936
|
+
const label = entry?.payload?.name ?? entry?.value ?? entry?.dataKey ?? "";
|
|
27937
|
+
return typeof label === "string" ? label : String(label ?? "");
|
|
27938
|
+
};
|
|
27939
|
+
var LegendItem = ({
|
|
27940
|
+
entry,
|
|
27941
|
+
index,
|
|
27942
|
+
theme
|
|
27943
|
+
}) => /* @__PURE__ */ jsx27(
|
|
27944
|
+
"div",
|
|
27945
|
+
{
|
|
27946
|
+
style: {
|
|
27947
|
+
display: "flex",
|
|
27948
|
+
alignItems: "baseline",
|
|
27949
|
+
marginRight: "1rem"
|
|
27950
|
+
},
|
|
27951
|
+
children: /* @__PURE__ */ jsxs19("div", { style: { display: "flex", flexDirection: "row", alignItems: "center" }, children: [
|
|
27952
|
+
/* @__PURE__ */ jsx27(
|
|
27953
|
+
"svg",
|
|
27954
|
+
{
|
|
27955
|
+
style: { marginRight: "0.5rem" },
|
|
27956
|
+
width: "16",
|
|
27957
|
+
height: "16",
|
|
27958
|
+
viewBox: "0 0 16 16",
|
|
27959
|
+
children: /* @__PURE__ */ jsx27("rect", { width: "16", height: "16", rx: "3", fill: entry?.color })
|
|
27960
|
+
}
|
|
27961
|
+
),
|
|
27962
|
+
/* @__PURE__ */ jsx27(
|
|
27963
|
+
"span",
|
|
27964
|
+
{
|
|
27965
|
+
style: {
|
|
27966
|
+
color: theme?.secondaryTextColor,
|
|
27967
|
+
fontFamily: theme?.fontFamily,
|
|
27968
|
+
fontSize: theme?.fontSizeMedium || "14px",
|
|
27969
|
+
whiteSpace: "nowrap"
|
|
27970
|
+
},
|
|
27971
|
+
children: getLegendLabel(entry)
|
|
27972
|
+
}
|
|
27973
|
+
)
|
|
27974
|
+
] })
|
|
27975
|
+
},
|
|
27976
|
+
`legend-${index}`
|
|
27977
|
+
);
|
|
27978
|
+
var getOuterWidth = (element) => {
|
|
27979
|
+
if (!element) return 0;
|
|
27980
|
+
const rect = element.getBoundingClientRect();
|
|
27981
|
+
const styles = window.getComputedStyle(element);
|
|
27982
|
+
const marginLeft = Number.parseFloat(styles.marginLeft || "0");
|
|
27983
|
+
const marginRight = Number.parseFloat(styles.marginRight || "0");
|
|
27984
|
+
return rect.width + marginLeft + marginRight;
|
|
27985
|
+
};
|
|
27986
|
+
var RenderLegend = ({
|
|
27987
|
+
payload,
|
|
27988
|
+
limit
|
|
27989
|
+
}) => {
|
|
27990
|
+
const [theme] = useContext5(ThemeContext);
|
|
27991
|
+
const [isOpen, setIsOpen] = useState9(false);
|
|
27992
|
+
const [showSeeAll, setShowSeeAll] = useState9(false);
|
|
27993
|
+
const [visibleCount, setVisibleCount] = useState9(null);
|
|
27994
|
+
const containerRef = useRef5(null);
|
|
27995
|
+
const seeAllMeasureRef = useRef5(null);
|
|
27996
|
+
const seeAllTriggerRef = useRef5(null);
|
|
27997
|
+
const itemRefs = useRef5([]);
|
|
27998
|
+
if (!payload || payload.length === 0) return null;
|
|
27999
|
+
const maxItems = limit ?? payload.length;
|
|
28000
|
+
const measuredLimit = visibleCount ?? maxItems;
|
|
28001
|
+
const visiblePayload = payload.slice(0, Math.min(maxItems, measuredLimit));
|
|
28002
|
+
const handleOpen = () => setIsOpen(true);
|
|
28003
|
+
const handleClose = () => setIsOpen(false);
|
|
28004
|
+
useLayoutEffect2(() => {
|
|
28005
|
+
if (!containerRef.current) return;
|
|
28006
|
+
if (!payload.length) return;
|
|
28007
|
+
const updateVisibleCount = () => {
|
|
28008
|
+
const containerWidth = containerRef.current?.offsetWidth ?? 0;
|
|
28009
|
+
if (!containerWidth) return;
|
|
28010
|
+
const maxCount = Math.min(maxItems, payload.length);
|
|
28011
|
+
const seeAllWidth = getOuterWidth(seeAllMeasureRef.current);
|
|
28012
|
+
const computeCount = (reserveSeeAll) => {
|
|
28013
|
+
const availableWidth = containerWidth - (reserveSeeAll ? seeAllWidth : 0);
|
|
28014
|
+
if (availableWidth <= 0) return 1;
|
|
28015
|
+
let totalWidth = 0;
|
|
28016
|
+
let nextCount = 0;
|
|
28017
|
+
for (let i = 0; i < maxCount; i += 1) {
|
|
28018
|
+
const itemWidth = getOuterWidth(itemRefs.current[i] ?? null);
|
|
28019
|
+
if (totalWidth + itemWidth > availableWidth) break;
|
|
28020
|
+
totalWidth += itemWidth;
|
|
28021
|
+
nextCount = i + 1;
|
|
28022
|
+
}
|
|
28023
|
+
return Math.max(1, nextCount);
|
|
28024
|
+
};
|
|
28025
|
+
const countWithSeeAll = computeCount(true);
|
|
28026
|
+
const shouldShowSeeAll = payload.length > countWithSeeAll;
|
|
28027
|
+
const finalCount = shouldShowSeeAll ? countWithSeeAll : computeCount(false);
|
|
28028
|
+
setShowSeeAll(shouldShowSeeAll);
|
|
28029
|
+
setVisibleCount(finalCount);
|
|
28030
|
+
};
|
|
28031
|
+
updateVisibleCount();
|
|
28032
|
+
const observer = new ResizeObserver(updateVisibleCount);
|
|
28033
|
+
observer.observe(containerRef.current);
|
|
28034
|
+
return () => observer.disconnect();
|
|
28035
|
+
}, [payload.length, maxItems]);
|
|
28036
|
+
return /* @__PURE__ */ jsxs19(
|
|
28037
|
+
"div",
|
|
28038
|
+
{
|
|
28039
|
+
ref: containerRef,
|
|
28040
|
+
style: {
|
|
28041
|
+
display: "flex",
|
|
28042
|
+
flexDirection: "row",
|
|
28043
|
+
justifyContent: "space-between",
|
|
28044
|
+
alignItems: "center",
|
|
28045
|
+
flexWrap: "nowrap",
|
|
28046
|
+
width: "100%"
|
|
28047
|
+
},
|
|
28048
|
+
children: [
|
|
28049
|
+
/* @__PURE__ */ jsxs19(
|
|
28050
|
+
"div",
|
|
28051
|
+
{
|
|
28052
|
+
style: {
|
|
28053
|
+
position: "absolute",
|
|
28054
|
+
visibility: "hidden",
|
|
28055
|
+
height: 0,
|
|
28056
|
+
overflow: "hidden",
|
|
28057
|
+
pointerEvents: "none",
|
|
28058
|
+
display: "flex",
|
|
28059
|
+
alignItems: "center",
|
|
28060
|
+
flexWrap: "nowrap",
|
|
28061
|
+
justifyContent: "space-between",
|
|
28062
|
+
width: "100%"
|
|
28063
|
+
},
|
|
28064
|
+
children: [
|
|
28065
|
+
/* @__PURE__ */ jsx27(
|
|
28066
|
+
"div",
|
|
28067
|
+
{
|
|
28068
|
+
style: {
|
|
28069
|
+
display: "flex",
|
|
28070
|
+
flexDirection: "row",
|
|
28071
|
+
alignItems: "center",
|
|
28072
|
+
justifyContent: "flex-start",
|
|
28073
|
+
flexWrap: "nowrap"
|
|
28074
|
+
},
|
|
28075
|
+
children: payload.slice(0, maxItems).map((entry, index) => /* @__PURE__ */ jsx27(
|
|
28076
|
+
"div",
|
|
28077
|
+
{
|
|
28078
|
+
ref: (element) => {
|
|
28079
|
+
itemRefs.current[index] = element;
|
|
28080
|
+
},
|
|
28081
|
+
children: /* @__PURE__ */ jsx27(LegendItem, { entry, index, theme })
|
|
28082
|
+
},
|
|
28083
|
+
`legend-measure-${index}`
|
|
28084
|
+
))
|
|
28085
|
+
}
|
|
28086
|
+
),
|
|
28087
|
+
/* @__PURE__ */ jsx27(
|
|
28088
|
+
"div",
|
|
28089
|
+
{
|
|
28090
|
+
ref: seeAllMeasureRef,
|
|
28091
|
+
style: {
|
|
28092
|
+
color: theme?.secondaryTextColor,
|
|
28093
|
+
fontSize: theme?.fontSizeMedium || "14px",
|
|
28094
|
+
fontFamily: theme?.fontFamily,
|
|
28095
|
+
marginLeft: 10,
|
|
28096
|
+
display: "flex",
|
|
28097
|
+
alignItems: "baseline",
|
|
28098
|
+
flexShrink: 0,
|
|
28099
|
+
whiteSpace: "nowrap"
|
|
28100
|
+
},
|
|
28101
|
+
children: "See all"
|
|
28102
|
+
}
|
|
28103
|
+
)
|
|
28104
|
+
]
|
|
28105
|
+
}
|
|
28106
|
+
),
|
|
28107
|
+
/* @__PURE__ */ jsx27(
|
|
28108
|
+
"div",
|
|
28109
|
+
{
|
|
28110
|
+
style: {
|
|
28111
|
+
display: "flex",
|
|
28112
|
+
flexDirection: "row",
|
|
28113
|
+
alignItems: "center",
|
|
28114
|
+
justifyContent: "flex-start",
|
|
28115
|
+
flexWrap: "nowrap"
|
|
28116
|
+
},
|
|
28117
|
+
children: visiblePayload.map((entry, index) => /* @__PURE__ */ jsx27(
|
|
28118
|
+
LegendItem,
|
|
28119
|
+
{
|
|
28120
|
+
entry,
|
|
28121
|
+
index,
|
|
28122
|
+
theme
|
|
28123
|
+
},
|
|
28124
|
+
`legend-${index}`
|
|
28125
|
+
))
|
|
28126
|
+
}
|
|
28127
|
+
),
|
|
28128
|
+
showSeeAll && /* @__PURE__ */ jsx27("div", { onMouseEnter: handleOpen, onMouseLeave: handleClose, children: /* @__PURE__ */ jsx27(
|
|
28129
|
+
MemoizedPopover,
|
|
28130
|
+
{
|
|
28131
|
+
isOpen,
|
|
28132
|
+
setIsOpen,
|
|
28133
|
+
triggerLabel: /* @__PURE__ */ jsx27(
|
|
28134
|
+
"div",
|
|
28135
|
+
{
|
|
28136
|
+
ref: seeAllTriggerRef,
|
|
28137
|
+
onClick: handleOpen,
|
|
28138
|
+
onMouseEnter: handleOpen,
|
|
28139
|
+
style: {
|
|
28140
|
+
cursor: "pointer",
|
|
28141
|
+
color: theme?.secondaryTextColor,
|
|
28142
|
+
fontSize: theme?.fontSizeMedium || "14px",
|
|
28143
|
+
fontFamily: theme?.fontFamily,
|
|
28144
|
+
marginLeft: 10,
|
|
28145
|
+
display: "flex",
|
|
28146
|
+
alignItems: "baseline",
|
|
28147
|
+
flexShrink: 0,
|
|
28148
|
+
whiteSpace: "nowrap"
|
|
28149
|
+
},
|
|
28150
|
+
children: "See all"
|
|
28151
|
+
}
|
|
28152
|
+
),
|
|
28153
|
+
popoverChildren: /* @__PURE__ */ jsx27(
|
|
28154
|
+
"div",
|
|
28155
|
+
{
|
|
28156
|
+
style: {
|
|
28157
|
+
display: "flex",
|
|
28158
|
+
flexWrap: "wrap",
|
|
28159
|
+
alignItems: "center",
|
|
28160
|
+
minWidth: 260,
|
|
28161
|
+
maxWidth: 520,
|
|
28162
|
+
gap: "0.5rem"
|
|
28163
|
+
},
|
|
28164
|
+
children: payload.map((entry, index) => /* @__PURE__ */ jsx27(
|
|
28165
|
+
LegendItem,
|
|
28166
|
+
{
|
|
28167
|
+
entry,
|
|
28168
|
+
index,
|
|
28169
|
+
theme
|
|
28170
|
+
},
|
|
28171
|
+
`legend-popover-${index}`
|
|
28172
|
+
))
|
|
28173
|
+
}
|
|
28174
|
+
)
|
|
28175
|
+
}
|
|
28176
|
+
) })
|
|
28177
|
+
]
|
|
28178
|
+
}
|
|
28179
|
+
);
|
|
28180
|
+
};
|
|
28181
|
+
|
|
28182
|
+
// src/components/Chart/PieChart.tsx
|
|
28398
28183
|
import { jsx as jsx28, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
28184
|
+
var defaultValueFormatter = (value) => (value * 1).toFixed(1) + "%";
|
|
28185
|
+
var parseData2 = (data, colors, categoryKey, valueKey) => {
|
|
28186
|
+
const maxItems = 20;
|
|
28187
|
+
const slicedData = deepCopy(data).slice(0, maxItems);
|
|
28188
|
+
const totalValue = slicedData.reduce(
|
|
28189
|
+
(acc, dataPoint) => (
|
|
28190
|
+
// Big(acc)
|
|
28191
|
+
// .add(Big(Number(dataPoint[valueKey]) ?? 0))
|
|
28192
|
+
// .toNumber(),
|
|
28193
|
+
acc + parseFloat(dataPoint[valueKey] ?? "0")
|
|
28194
|
+
),
|
|
28195
|
+
0
|
|
28196
|
+
);
|
|
28197
|
+
slicedData.forEach((dataPoint) => {
|
|
28198
|
+
const rawValue = parseFloat(dataPoint[valueKey] ?? "0");
|
|
28199
|
+
dataPoint[valueKey] = totalValue ? rawValue * 100 / totalValue : data.length > maxItems ? 100 / (maxItems + 1) : 100 / slicedData.length;
|
|
28200
|
+
dataPoint[`raw_${valueKey}`] = parseFloat(rawValue.toFixed(2));
|
|
28201
|
+
});
|
|
28202
|
+
const parsedData = slicedData.map((dataPoint, idx) => {
|
|
28203
|
+
const baseColor = colors.length > 0 ? idx < colors.length ? colors[idx] : colors[colors.length - 1] : "#808080";
|
|
28204
|
+
return {
|
|
28205
|
+
...dataPoint,
|
|
28206
|
+
color: baseColor,
|
|
28207
|
+
fill: baseColor
|
|
28208
|
+
};
|
|
28209
|
+
});
|
|
28210
|
+
if (data.length > maxItems) {
|
|
28211
|
+
const otherData = data.slice(maxItems);
|
|
28212
|
+
const otherSum = otherData.reduce(
|
|
28213
|
+
(acc, dataPoint) => (
|
|
28214
|
+
// Big(acc)
|
|
28215
|
+
// .add(Big(Number(dataPoint[valueKey])) ?? 0)
|
|
28216
|
+
// .toNumber(),
|
|
28217
|
+
acc + parseFloat(dataPoint[valueKey] ?? "0")
|
|
28218
|
+
),
|
|
28219
|
+
0
|
|
28220
|
+
);
|
|
28221
|
+
const otherColor = colors.length > 0 ? colors[colors.length - 1] : "#808080";
|
|
28222
|
+
const normalizedOtherSum = totalValue ? otherSum * 100 / totalValue : 100 / (maxItems + 1);
|
|
28223
|
+
parsedData.push({
|
|
28224
|
+
[categoryKey]: "Other",
|
|
28225
|
+
[valueKey]: normalizedOtherSum,
|
|
28226
|
+
[`raw_${valueKey}`]: parseFloat(otherSum.toFixed(2)),
|
|
28227
|
+
color: otherColor,
|
|
28228
|
+
fill: otherColor
|
|
28229
|
+
});
|
|
28230
|
+
}
|
|
28231
|
+
return parsedData;
|
|
28232
|
+
};
|
|
28233
|
+
var ChartTooltipFrame = ({
|
|
28234
|
+
children,
|
|
28235
|
+
theme
|
|
28236
|
+
}) => /* @__PURE__ */ jsx28(
|
|
28237
|
+
"div",
|
|
28238
|
+
{
|
|
28239
|
+
style: {
|
|
28240
|
+
borderStyle: "solid",
|
|
28241
|
+
borderColor: theme?.borderColor || "#E5E7EB",
|
|
28242
|
+
borderWidth: 1,
|
|
28243
|
+
background: theme?.backgroundColor || "#ffffff",
|
|
28244
|
+
fontSize: theme?.fontSize || "14px",
|
|
28245
|
+
borderRadius: "6px",
|
|
28246
|
+
boxShadow: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)"
|
|
28247
|
+
},
|
|
28248
|
+
children
|
|
28249
|
+
}
|
|
28250
|
+
);
|
|
28251
|
+
var ChartTooltipRow = ({
|
|
28252
|
+
value,
|
|
28253
|
+
rawValue,
|
|
28254
|
+
valueKey,
|
|
28255
|
+
valueKeyLabel,
|
|
28256
|
+
name: name2,
|
|
28257
|
+
// color,
|
|
28258
|
+
theme
|
|
28259
|
+
}) => /* @__PURE__ */ jsxs20(
|
|
28260
|
+
"div",
|
|
28261
|
+
{
|
|
28262
|
+
style: {
|
|
28263
|
+
display: "flex",
|
|
28264
|
+
flexDirection: "column",
|
|
28265
|
+
gap: 2,
|
|
28266
|
+
minWidth: 150,
|
|
28267
|
+
position: "relative"
|
|
28268
|
+
},
|
|
28269
|
+
children: [
|
|
28270
|
+
/* @__PURE__ */ jsx28(
|
|
28271
|
+
"div",
|
|
28272
|
+
{
|
|
28273
|
+
style: {
|
|
28274
|
+
display: "flex",
|
|
28275
|
+
alignItems: "center",
|
|
28276
|
+
width: "100%"
|
|
28277
|
+
// paddingLeft: '24px',
|
|
28278
|
+
},
|
|
28279
|
+
children: /* @__PURE__ */ jsxs20(
|
|
28280
|
+
"span",
|
|
28281
|
+
{
|
|
28282
|
+
style: {
|
|
28283
|
+
flex: 1,
|
|
28284
|
+
display: "flex",
|
|
28285
|
+
alignItems: "center",
|
|
28286
|
+
justifyContent: "space-between"
|
|
28287
|
+
},
|
|
28288
|
+
children: [
|
|
28289
|
+
/* @__PURE__ */ jsx28(
|
|
28290
|
+
"p",
|
|
28291
|
+
{
|
|
28292
|
+
style: {
|
|
28293
|
+
marginTop: 0,
|
|
28294
|
+
marginBottom: 0,
|
|
28295
|
+
marginRight: "24px",
|
|
28296
|
+
fontFamily: theme?.fontFamily,
|
|
28297
|
+
color: theme?.primaryTextColor,
|
|
28298
|
+
fontSize: theme?.fontSizeSmall || "14px",
|
|
28299
|
+
fontWeight: theme?.fontWeightMedium || "500",
|
|
28300
|
+
minWidth: "60px"
|
|
28301
|
+
},
|
|
28302
|
+
children: name2
|
|
28303
|
+
}
|
|
28304
|
+
),
|
|
28305
|
+
/* @__PURE__ */ jsx28(
|
|
28306
|
+
"p",
|
|
28307
|
+
{
|
|
28308
|
+
style: {
|
|
28309
|
+
marginTop: 0,
|
|
28310
|
+
marginBottom: 0,
|
|
28311
|
+
fontFamily: theme?.fontFamily,
|
|
28312
|
+
color: theme?.primaryTextColor,
|
|
28313
|
+
fontSize: theme?.fontSizeSmall || "14px",
|
|
28314
|
+
fontWeight: theme?.fontWeightMedium || "500",
|
|
28315
|
+
minWidth: "40px",
|
|
28316
|
+
textAlign: "right"
|
|
28317
|
+
},
|
|
28318
|
+
children: value
|
|
28319
|
+
}
|
|
28320
|
+
)
|
|
28321
|
+
]
|
|
28322
|
+
}
|
|
28323
|
+
)
|
|
28324
|
+
}
|
|
28325
|
+
),
|
|
28326
|
+
(rawValue || valueKey) && /* @__PURE__ */ jsx28(
|
|
28327
|
+
"div",
|
|
28328
|
+
{
|
|
28329
|
+
style: {
|
|
28330
|
+
display: "flex",
|
|
28331
|
+
alignItems: "center",
|
|
28332
|
+
width: "100%",
|
|
28333
|
+
// paddingLeft: '24px',
|
|
28334
|
+
justifyContent: "space-between"
|
|
28335
|
+
},
|
|
28336
|
+
children: /* @__PURE__ */ jsxs20(
|
|
28337
|
+
"span",
|
|
28338
|
+
{
|
|
28339
|
+
style: {
|
|
28340
|
+
flex: 1,
|
|
28341
|
+
display: "flex",
|
|
28342
|
+
alignItems: "center",
|
|
28343
|
+
justifyContent: "space-between"
|
|
28344
|
+
},
|
|
28345
|
+
children: [
|
|
28346
|
+
/* @__PURE__ */ jsx28(
|
|
28347
|
+
"p",
|
|
28348
|
+
{
|
|
28349
|
+
style: {
|
|
28350
|
+
marginTop: 0,
|
|
28351
|
+
marginBottom: 0,
|
|
28352
|
+
marginRight: "24px",
|
|
28353
|
+
fontFamily: theme?.fontFamily,
|
|
28354
|
+
color: theme?.primaryTextColor,
|
|
28355
|
+
fontSize: theme?.fontSizeSmall || "14px",
|
|
28356
|
+
fontWeight: theme?.fontWeightMedium || "500",
|
|
28357
|
+
minWidth: "60px"
|
|
28358
|
+
},
|
|
28359
|
+
children: valueKeyLabel || valueKey
|
|
28360
|
+
}
|
|
28361
|
+
),
|
|
28362
|
+
/* @__PURE__ */ jsx28(
|
|
28363
|
+
"p",
|
|
28364
|
+
{
|
|
28365
|
+
style: {
|
|
28366
|
+
marginTop: 0,
|
|
28367
|
+
marginBottom: 0,
|
|
28368
|
+
fontFamily: theme?.fontFamily,
|
|
28369
|
+
color: theme?.primaryTextColor,
|
|
28370
|
+
fontSize: theme?.fontSizeSmall || "14px",
|
|
28371
|
+
fontWeight: theme?.fontWeightMedium || "500",
|
|
28372
|
+
minWidth: "40px",
|
|
28373
|
+
textAlign: "right"
|
|
28374
|
+
},
|
|
28375
|
+
children: rawValue
|
|
28376
|
+
}
|
|
28377
|
+
)
|
|
28378
|
+
]
|
|
28379
|
+
}
|
|
28380
|
+
)
|
|
28381
|
+
}
|
|
28382
|
+
)
|
|
28383
|
+
]
|
|
28384
|
+
}
|
|
28385
|
+
);
|
|
28386
|
+
var DonutChartTooltip = ({
|
|
28387
|
+
active,
|
|
28388
|
+
payload,
|
|
28389
|
+
valueFormatter: valueFormatter2,
|
|
28390
|
+
theme,
|
|
28391
|
+
yAxisFields
|
|
28392
|
+
}) => {
|
|
28393
|
+
if (active && payload[0]) {
|
|
28394
|
+
const payloadRow = payload[0];
|
|
28395
|
+
const rawValue = payloadRow.payload[`raw_${payloadRow.dataKey}`];
|
|
28396
|
+
const field = yAxisFields?.find((f) => f.field === payloadRow.dataKey);
|
|
28397
|
+
const formattedRawValue = quillFormat({
|
|
28398
|
+
value: rawValue?.toString() || "",
|
|
28399
|
+
format: field?.format || "string"
|
|
28400
|
+
});
|
|
28401
|
+
return /* @__PURE__ */ jsx28(ChartTooltipFrame, { theme, children: /* @__PURE__ */ jsx28(
|
|
28402
|
+
"div",
|
|
28403
|
+
{
|
|
28404
|
+
style: {
|
|
28405
|
+
paddingLeft: "1rem",
|
|
28406
|
+
paddingRight: "1rem",
|
|
28407
|
+
paddingTop: "8px",
|
|
28408
|
+
paddingBottom: "8px"
|
|
28409
|
+
},
|
|
28410
|
+
children: /* @__PURE__ */ jsx28(
|
|
28411
|
+
ChartTooltipRow,
|
|
28412
|
+
{
|
|
28413
|
+
value: valueFormatter2(payloadRow.value),
|
|
28414
|
+
rawValue: rawValue ? formattedRawValue : void 0,
|
|
28415
|
+
valueKey: payloadRow.dataKey,
|
|
28416
|
+
valueKeyLabel: field?.label,
|
|
28417
|
+
name: payloadRow.name,
|
|
28418
|
+
color: payloadRow.payload.color,
|
|
28419
|
+
theme
|
|
28420
|
+
}
|
|
28421
|
+
)
|
|
28422
|
+
}
|
|
28423
|
+
) });
|
|
28424
|
+
}
|
|
28425
|
+
return null;
|
|
28426
|
+
};
|
|
28427
|
+
var PieChartWrapper = React4.forwardRef(
|
|
28428
|
+
(props, ref) => {
|
|
28429
|
+
const {
|
|
28430
|
+
category = "pct_of_the_total",
|
|
28431
|
+
index = "status",
|
|
28432
|
+
data,
|
|
28433
|
+
colors = [],
|
|
28434
|
+
colorMap = {},
|
|
28435
|
+
variant = "donut",
|
|
28436
|
+
valueFormatter: valueFormatter2 = defaultValueFormatter,
|
|
28437
|
+
className,
|
|
28438
|
+
containerStyle,
|
|
28439
|
+
theme,
|
|
28440
|
+
onClickChartElement,
|
|
28441
|
+
yAxisFields,
|
|
28442
|
+
showLegend = false,
|
|
28443
|
+
...other
|
|
28444
|
+
} = props;
|
|
28445
|
+
const isDonut = variant == "donut";
|
|
28446
|
+
if (!data || data.length === 0) {
|
|
28447
|
+
return /* @__PURE__ */ jsx28(
|
|
28448
|
+
"div",
|
|
28449
|
+
{
|
|
28450
|
+
style: {
|
|
28451
|
+
display: "flex",
|
|
28452
|
+
flex: "1 0 auto",
|
|
28453
|
+
// height: '100%',
|
|
28454
|
+
margin: "auto",
|
|
28455
|
+
justifyContent: "center",
|
|
28456
|
+
alignItems: "center",
|
|
28457
|
+
fontSize: 13,
|
|
28458
|
+
fontFamily: theme?.fontFamily,
|
|
28459
|
+
color: theme.secondaryTextColor,
|
|
28460
|
+
...containerStyle
|
|
28461
|
+
},
|
|
28462
|
+
className,
|
|
28463
|
+
children: "No results"
|
|
28464
|
+
}
|
|
28465
|
+
);
|
|
28466
|
+
}
|
|
28467
|
+
return /* @__PURE__ */ jsx28(
|
|
28468
|
+
"div",
|
|
28469
|
+
{
|
|
28470
|
+
ref,
|
|
28471
|
+
className,
|
|
28472
|
+
style: {
|
|
28473
|
+
width: "100%",
|
|
28474
|
+
display: "flex",
|
|
28475
|
+
flexDirection: "row",
|
|
28476
|
+
alignItems: "center",
|
|
28477
|
+
justifyContent: "center",
|
|
28478
|
+
boxSizing: "content-box",
|
|
28479
|
+
...containerStyle
|
|
28480
|
+
},
|
|
28481
|
+
...other,
|
|
28482
|
+
children: /* @__PURE__ */ jsx28(
|
|
28483
|
+
ResponsiveContainer,
|
|
28484
|
+
{
|
|
28485
|
+
width: "100%",
|
|
28486
|
+
height: "100%",
|
|
28487
|
+
minWidth: 0,
|
|
28488
|
+
minHeight: 0,
|
|
28489
|
+
children: /* @__PURE__ */ jsxs20(PieChart, { children: [
|
|
28490
|
+
/* @__PURE__ */ jsx28(
|
|
28491
|
+
Pie,
|
|
28492
|
+
{
|
|
28493
|
+
data: parseData2(
|
|
28494
|
+
data,
|
|
28495
|
+
(() => {
|
|
28496
|
+
const colorArray = colorMap[category] && colorMap[category]["primary"] && colorMap[category]["primary"] || colors;
|
|
28497
|
+
const containsCssVars = colorArray.some(
|
|
28498
|
+
(color2) => typeof color2 === "string" && color2.includes("var(")
|
|
28499
|
+
);
|
|
28500
|
+
if (containsCssVars) {
|
|
28501
|
+
return Array.from({ length: data.length }).map(
|
|
28502
|
+
(_, idx) => colorArray[idx % colorArray.length] ?? colorArray[colorArray.length - 1] ?? "#808080"
|
|
28503
|
+
);
|
|
28504
|
+
}
|
|
28505
|
+
return colorArray.length >= data.length ? colorArray.slice(0, data.length) : generateArrayFromColor(colorArray, data.length);
|
|
28506
|
+
})(),
|
|
28507
|
+
index,
|
|
28508
|
+
category
|
|
28509
|
+
),
|
|
28510
|
+
cx: "50%",
|
|
28511
|
+
cy: "50%",
|
|
28512
|
+
startAngle: 90,
|
|
28513
|
+
endAngle: -270,
|
|
28514
|
+
innerRadius: isDonut ? showLegend ? "50%" : "70%" : "0%",
|
|
28515
|
+
outerRadius: showLegend ? "70%" : "100%",
|
|
28516
|
+
paddingAngle: 0,
|
|
28517
|
+
dataKey: category,
|
|
28518
|
+
nameKey: index,
|
|
28519
|
+
isAnimationActive: true,
|
|
28520
|
+
onClick: onClickChartElement,
|
|
28521
|
+
labelLine: false,
|
|
28522
|
+
label: false
|
|
28523
|
+
}
|
|
28524
|
+
),
|
|
28525
|
+
showLegend && /* @__PURE__ */ jsx28(
|
|
28526
|
+
Legend,
|
|
28527
|
+
{
|
|
28528
|
+
verticalAlign: "top",
|
|
28529
|
+
align: "left",
|
|
28530
|
+
fontSize: 11,
|
|
28531
|
+
color: theme.secondaryTextColor,
|
|
28532
|
+
wrapperStyle: {
|
|
28533
|
+
paddingBottom: 20,
|
|
28534
|
+
fontFamily: theme?.fontFamily
|
|
28535
|
+
},
|
|
28536
|
+
content: /* @__PURE__ */ jsx28(RenderLegend, { limit: 5 })
|
|
28537
|
+
}
|
|
28538
|
+
),
|
|
28539
|
+
/* @__PURE__ */ jsx28(
|
|
28540
|
+
Tooltip,
|
|
28541
|
+
{
|
|
28542
|
+
wrapperStyle: {
|
|
28543
|
+
outline: "none"
|
|
28544
|
+
},
|
|
28545
|
+
content: ({ active, payload }) => {
|
|
28546
|
+
return /* @__PURE__ */ jsx28(
|
|
28547
|
+
DonutChartTooltip,
|
|
28548
|
+
{
|
|
28549
|
+
active,
|
|
28550
|
+
payload,
|
|
28551
|
+
valueFormatter: valueFormatter2,
|
|
28552
|
+
theme,
|
|
28553
|
+
yAxisFields
|
|
28554
|
+
}
|
|
28555
|
+
);
|
|
28556
|
+
}
|
|
28557
|
+
}
|
|
28558
|
+
)
|
|
28559
|
+
] })
|
|
28560
|
+
}
|
|
28561
|
+
)
|
|
28562
|
+
}
|
|
28563
|
+
);
|
|
28564
|
+
}
|
|
28565
|
+
);
|
|
28566
|
+
var PieChart_default = PieChartWrapper;
|
|
28567
|
+
|
|
28568
|
+
// src/components/QuillTable.tsx
|
|
28569
|
+
init_valueFormatter();
|
|
28570
|
+
import { useContext as useContext6, useEffect as useEffect8, useState as useState10 } from "react";
|
|
28571
|
+
import { jsx as jsx29, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
28399
28572
|
function QuillTable({
|
|
28400
28573
|
rows,
|
|
28401
28574
|
rowCount,
|
|
@@ -28424,13 +28597,13 @@ function QuillTable({
|
|
|
28424
28597
|
borderTop,
|
|
28425
28598
|
borderBottom
|
|
28426
28599
|
}) {
|
|
28427
|
-
const [activeRows, setActiveRows] =
|
|
28428
|
-
const [maxPage, setMaxPage] =
|
|
28429
|
-
const [sortColumn, setSortColumn] =
|
|
28430
|
-
const [sortDirection, setSortDirection] =
|
|
28431
|
-
const [theme] =
|
|
28432
|
-
const [isPaginating, setIsPaginating] =
|
|
28433
|
-
const [initialLoad, setInitialLoad] =
|
|
28600
|
+
const [activeRows, setActiveRows] = useState10([]);
|
|
28601
|
+
const [maxPage, setMaxPage] = useState10(1);
|
|
28602
|
+
const [sortColumn, setSortColumn] = useState10(sort?.field || "");
|
|
28603
|
+
const [sortDirection, setSortDirection] = useState10(sort?.direction || "desc");
|
|
28604
|
+
const [theme] = useContext6(ThemeContext);
|
|
28605
|
+
const [isPaginating, setIsPaginating] = useState10(true);
|
|
28606
|
+
const [initialLoad, setInitialLoad] = useState10(true);
|
|
28434
28607
|
useEffect8(() => {
|
|
28435
28608
|
setSortColumn(sort?.field || "");
|
|
28436
28609
|
setSortDirection(sort?.direction || "desc");
|
|
@@ -28511,7 +28684,7 @@ function QuillTable({
|
|
|
28511
28684
|
}
|
|
28512
28685
|
};
|
|
28513
28686
|
if (initialLoad) {
|
|
28514
|
-
return /* @__PURE__ */
|
|
28687
|
+
return /* @__PURE__ */ jsx29(
|
|
28515
28688
|
"div",
|
|
28516
28689
|
{
|
|
28517
28690
|
style: {
|
|
@@ -28519,11 +28692,11 @@ function QuillTable({
|
|
|
28519
28692
|
...containerStyle
|
|
28520
28693
|
},
|
|
28521
28694
|
className,
|
|
28522
|
-
children: /* @__PURE__ */
|
|
28695
|
+
children: /* @__PURE__ */ jsx29(LoadingComponent, {})
|
|
28523
28696
|
}
|
|
28524
28697
|
);
|
|
28525
28698
|
}
|
|
28526
|
-
return /* @__PURE__ */
|
|
28699
|
+
return /* @__PURE__ */ jsx29(
|
|
28527
28700
|
"div",
|
|
28528
28701
|
{
|
|
28529
28702
|
style: {
|
|
@@ -28536,7 +28709,7 @@ function QuillTable({
|
|
|
28536
28709
|
...containerStyle
|
|
28537
28710
|
},
|
|
28538
28711
|
className,
|
|
28539
|
-
children: /* @__PURE__ */
|
|
28712
|
+
children: /* @__PURE__ */ jsx29(
|
|
28540
28713
|
"div",
|
|
28541
28714
|
{
|
|
28542
28715
|
style: {
|
|
@@ -28555,7 +28728,7 @@ function QuillTable({
|
|
|
28555
28728
|
outline: "none",
|
|
28556
28729
|
position: "relative"
|
|
28557
28730
|
},
|
|
28558
|
-
children: /* @__PURE__ */
|
|
28731
|
+
children: /* @__PURE__ */ jsxs21(
|
|
28559
28732
|
"div",
|
|
28560
28733
|
{
|
|
28561
28734
|
role: "table",
|
|
@@ -28569,8 +28742,8 @@ function QuillTable({
|
|
|
28569
28742
|
minHeight: "260px"
|
|
28570
28743
|
},
|
|
28571
28744
|
children: [
|
|
28572
|
-
/* @__PURE__ */
|
|
28573
|
-
/* @__PURE__ */
|
|
28745
|
+
/* @__PURE__ */ jsx29("div", { style: { overflow: "auto", flexGrow: 1 }, children: /* @__PURE__ */ jsxs21("div", { style: { minWidth: "100%", display: "inline-block" }, children: [
|
|
28746
|
+
/* @__PURE__ */ jsx29(
|
|
28574
28747
|
"div",
|
|
28575
28748
|
{
|
|
28576
28749
|
className: "thead",
|
|
@@ -28580,7 +28753,7 @@ function QuillTable({
|
|
|
28580
28753
|
zIndex: 1,
|
|
28581
28754
|
background: headerBackgroundColor ?? "white"
|
|
28582
28755
|
},
|
|
28583
|
-
children: /* @__PURE__ */
|
|
28756
|
+
children: /* @__PURE__ */ jsx29(
|
|
28584
28757
|
"div",
|
|
28585
28758
|
{
|
|
28586
28759
|
role: "row",
|
|
@@ -28593,7 +28766,7 @@ function QuillTable({
|
|
|
28593
28766
|
marginBottom: "-1px"
|
|
28594
28767
|
// avoid double border
|
|
28595
28768
|
},
|
|
28596
|
-
children: columns && columns.map((column, index) => /* @__PURE__ */
|
|
28769
|
+
children: columns && columns.map((column, index) => /* @__PURE__ */ jsxs21(
|
|
28597
28770
|
"div",
|
|
28598
28771
|
{
|
|
28599
28772
|
onClick: (e) => {
|
|
@@ -28624,7 +28797,7 @@ function QuillTable({
|
|
|
28624
28797
|
justifyContent: "space-between"
|
|
28625
28798
|
},
|
|
28626
28799
|
children: [
|
|
28627
|
-
/* @__PURE__ */
|
|
28800
|
+
/* @__PURE__ */ jsx29(
|
|
28628
28801
|
"div",
|
|
28629
28802
|
{
|
|
28630
28803
|
"aria-haspopup": "dialog",
|
|
@@ -28649,7 +28822,7 @@ function QuillTable({
|
|
|
28649
28822
|
children: hideLabels || !column.label ? column.field : column.label
|
|
28650
28823
|
}
|
|
28651
28824
|
),
|
|
28652
|
-
column.field === sortColumn && /* @__PURE__ */
|
|
28825
|
+
column.field === sortColumn && /* @__PURE__ */ jsx29(
|
|
28653
28826
|
"svg",
|
|
28654
28827
|
{
|
|
28655
28828
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -28660,7 +28833,7 @@ function QuillTable({
|
|
|
28660
28833
|
style: {
|
|
28661
28834
|
transform: sortDirection === "desc" ? "rotate(180deg)" : void 0
|
|
28662
28835
|
},
|
|
28663
|
-
children: /* @__PURE__ */
|
|
28836
|
+
children: /* @__PURE__ */ jsx29(
|
|
28664
28837
|
"path",
|
|
28665
28838
|
{
|
|
28666
28839
|
fillRule: "evenodd",
|
|
@@ -28678,15 +28851,15 @@ function QuillTable({
|
|
|
28678
28851
|
)
|
|
28679
28852
|
}
|
|
28680
28853
|
),
|
|
28681
|
-
(isPaginating || isLoading) && /* @__PURE__ */
|
|
28854
|
+
(isPaginating || isLoading) && /* @__PURE__ */ jsx29(
|
|
28682
28855
|
"div",
|
|
28683
28856
|
{
|
|
28684
28857
|
className,
|
|
28685
28858
|
style: { position: "absolute", width: "100%" },
|
|
28686
|
-
children: /* @__PURE__ */
|
|
28859
|
+
children: /* @__PURE__ */ jsx29(LoadingComponent, {})
|
|
28687
28860
|
}
|
|
28688
28861
|
),
|
|
28689
|
-
activeRows && activeRows.length === 0 || columns && columns.length === 0 ? /* @__PURE__ */
|
|
28862
|
+
activeRows && activeRows.length === 0 || columns && columns.length === 0 ? /* @__PURE__ */ jsx29(
|
|
28690
28863
|
"div",
|
|
28691
28864
|
{
|
|
28692
28865
|
style: {
|
|
@@ -28704,7 +28877,7 @@ function QuillTable({
|
|
|
28704
28877
|
},
|
|
28705
28878
|
children: emptyStateLabel
|
|
28706
28879
|
}
|
|
28707
|
-
) : /* @__PURE__ */
|
|
28880
|
+
) : /* @__PURE__ */ jsx29("div", { role: "rowgroup", className: "tbody", children: activeRows && activeRows.map((row, rowIndex) => /* @__PURE__ */ jsx29(
|
|
28708
28881
|
"div",
|
|
28709
28882
|
{
|
|
28710
28883
|
role: "row",
|
|
@@ -28715,7 +28888,7 @@ function QuillTable({
|
|
|
28715
28888
|
minWidth: "100px",
|
|
28716
28889
|
boxSizing: "border-box"
|
|
28717
28890
|
},
|
|
28718
|
-
children: columns && columns.map((column, columnIndex) => /* @__PURE__ */
|
|
28891
|
+
children: columns && columns.map((column, columnIndex) => /* @__PURE__ */ jsx29(
|
|
28719
28892
|
"div",
|
|
28720
28893
|
{
|
|
28721
28894
|
role: "cell",
|
|
@@ -28734,7 +28907,7 @@ function QuillTable({
|
|
|
28734
28907
|
borderBottom: rowIndex === activeRows?.length - 1 ? "1px solid #E7E7E7" : void 0,
|
|
28735
28908
|
userSelect: "none"
|
|
28736
28909
|
},
|
|
28737
|
-
children: /* @__PURE__ */
|
|
28910
|
+
children: /* @__PURE__ */ jsx29(
|
|
28738
28911
|
"div",
|
|
28739
28912
|
{
|
|
28740
28913
|
style: {
|
|
@@ -28746,7 +28919,7 @@ function QuillTable({
|
|
|
28746
28919
|
userSelect: "none"
|
|
28747
28920
|
},
|
|
28748
28921
|
"data-testid": "static-cell",
|
|
28749
|
-
children: /* @__PURE__ */
|
|
28922
|
+
children: /* @__PURE__ */ jsx29(
|
|
28750
28923
|
"div",
|
|
28751
28924
|
{
|
|
28752
28925
|
"aria-haspopup": "dialog",
|
|
@@ -28778,7 +28951,7 @@ function QuillTable({
|
|
|
28778
28951
|
"sqlrow" + rowIndex
|
|
28779
28952
|
)) })
|
|
28780
28953
|
] }) }),
|
|
28781
|
-
/* @__PURE__ */
|
|
28954
|
+
/* @__PURE__ */ jsx29(
|
|
28782
28955
|
"div",
|
|
28783
28956
|
{
|
|
28784
28957
|
style: {
|
|
@@ -28791,7 +28964,7 @@ function QuillTable({
|
|
|
28791
28964
|
marginTop: "-1px"
|
|
28792
28965
|
// avoid double border
|
|
28793
28966
|
},
|
|
28794
|
-
children: /* @__PURE__ */
|
|
28967
|
+
children: /* @__PURE__ */ jsxs21(
|
|
28795
28968
|
"div",
|
|
28796
28969
|
{
|
|
28797
28970
|
style: {
|
|
@@ -28803,7 +28976,7 @@ function QuillTable({
|
|
|
28803
28976
|
height: 37
|
|
28804
28977
|
},
|
|
28805
28978
|
children: [
|
|
28806
|
-
!hideCSVDownloadButton ? /* @__PURE__ */
|
|
28979
|
+
!hideCSVDownloadButton ? /* @__PURE__ */ jsx29(
|
|
28807
28980
|
"button",
|
|
28808
28981
|
{
|
|
28809
28982
|
onClick: downloadCSV2,
|
|
@@ -28819,8 +28992,8 @@ function QuillTable({
|
|
|
28819
28992
|
},
|
|
28820
28993
|
children: "Download CSV"
|
|
28821
28994
|
}
|
|
28822
|
-
) : /* @__PURE__ */
|
|
28823
|
-
rows.length === 0 || isLoading ? null : /* @__PURE__ */
|
|
28995
|
+
) : /* @__PURE__ */ jsx29("div", {}),
|
|
28996
|
+
rows.length === 0 || isLoading ? null : /* @__PURE__ */ jsxs21(
|
|
28824
28997
|
"div",
|
|
28825
28998
|
{
|
|
28826
28999
|
style: {
|
|
@@ -28829,7 +29002,7 @@ function QuillTable({
|
|
|
28829
29002
|
alignItems: "center"
|
|
28830
29003
|
},
|
|
28831
29004
|
children: [
|
|
28832
|
-
/* @__PURE__ */
|
|
29005
|
+
/* @__PURE__ */ jsxs21(
|
|
28833
29006
|
"div",
|
|
28834
29007
|
{
|
|
28835
29008
|
style: {
|
|
@@ -28844,8 +29017,8 @@ function QuillTable({
|
|
|
28844
29017
|
]
|
|
28845
29018
|
}
|
|
28846
29019
|
),
|
|
28847
|
-
/* @__PURE__ */
|
|
28848
|
-
/* @__PURE__ */
|
|
29020
|
+
/* @__PURE__ */ jsx29("div", { style: { width: 8 } }),
|
|
29021
|
+
/* @__PURE__ */ jsx29(
|
|
28849
29022
|
"button",
|
|
28850
29023
|
{
|
|
28851
29024
|
onClick: (e) => {
|
|
@@ -28857,7 +29030,7 @@ function QuillTable({
|
|
|
28857
29030
|
border: "none",
|
|
28858
29031
|
background: "transparent"
|
|
28859
29032
|
},
|
|
28860
|
-
children: /* @__PURE__ */
|
|
29033
|
+
children: /* @__PURE__ */ jsx29(
|
|
28861
29034
|
"svg",
|
|
28862
29035
|
{
|
|
28863
29036
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -28865,7 +29038,7 @@ function QuillTable({
|
|
|
28865
29038
|
fill: theme?.chartLabelFontFamily || theme?.fontFamily,
|
|
28866
29039
|
height: "16px",
|
|
28867
29040
|
width: "16px",
|
|
28868
|
-
children: /* @__PURE__ */
|
|
29041
|
+
children: /* @__PURE__ */ jsx29(
|
|
28869
29042
|
"path",
|
|
28870
29043
|
{
|
|
28871
29044
|
fillRule: "evenodd",
|
|
@@ -28877,7 +29050,7 @@ function QuillTable({
|
|
|
28877
29050
|
)
|
|
28878
29051
|
}
|
|
28879
29052
|
),
|
|
28880
|
-
/* @__PURE__ */
|
|
29053
|
+
/* @__PURE__ */ jsx29(
|
|
28881
29054
|
"button",
|
|
28882
29055
|
{
|
|
28883
29056
|
onClick: (e) => {
|
|
@@ -28889,7 +29062,7 @@ function QuillTable({
|
|
|
28889
29062
|
border: "none",
|
|
28890
29063
|
background: "transparent"
|
|
28891
29064
|
},
|
|
28892
|
-
children: /* @__PURE__ */
|
|
29065
|
+
children: /* @__PURE__ */ jsx29(
|
|
28893
29066
|
"svg",
|
|
28894
29067
|
{
|
|
28895
29068
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -28897,7 +29070,7 @@ function QuillTable({
|
|
|
28897
29070
|
fill: theme?.chartLabelFontFamily || theme?.fontFamily,
|
|
28898
29071
|
height: "16px",
|
|
28899
29072
|
width: "16px",
|
|
28900
|
-
children: /* @__PURE__ */
|
|
29073
|
+
children: /* @__PURE__ */ jsx29(
|
|
28901
29074
|
"path",
|
|
28902
29075
|
{
|
|
28903
29076
|
fillRule: "evenodd",
|
|
@@ -28909,7 +29082,7 @@ function QuillTable({
|
|
|
28909
29082
|
)
|
|
28910
29083
|
}
|
|
28911
29084
|
),
|
|
28912
|
-
/* @__PURE__ */
|
|
29085
|
+
/* @__PURE__ */ jsx29("div", { style: { width: 12 } })
|
|
28913
29086
|
]
|
|
28914
29087
|
}
|
|
28915
29088
|
)
|
|
@@ -28934,7 +29107,7 @@ import {
|
|
|
28934
29107
|
CartesianGrid,
|
|
28935
29108
|
ComposedChart,
|
|
28936
29109
|
Customized,
|
|
28937
|
-
Legend,
|
|
29110
|
+
Legend as Legend2,
|
|
28938
29111
|
ResponsiveContainer as ResponsiveContainer2,
|
|
28939
29112
|
Tooltip as Tooltip2,
|
|
28940
29113
|
XAxis,
|
|
@@ -29096,12 +29269,12 @@ var format_wo_yyyy2 = (value) => {
|
|
|
29096
29269
|
import { format as format6, subDays as subDays2 } from "date-fns";
|
|
29097
29270
|
|
|
29098
29271
|
// src/components/Chart/ChartTooltipFrame.tsx
|
|
29099
|
-
import { jsx as
|
|
29272
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
29100
29273
|
function ChartTooltipFrame2({
|
|
29101
29274
|
children,
|
|
29102
29275
|
theme
|
|
29103
29276
|
}) {
|
|
29104
|
-
return /* @__PURE__ */
|
|
29277
|
+
return /* @__PURE__ */ jsx30(
|
|
29105
29278
|
"div",
|
|
29106
29279
|
{
|
|
29107
29280
|
style: {
|
|
@@ -29121,7 +29294,7 @@ function ChartTooltipFrame2({
|
|
|
29121
29294
|
}
|
|
29122
29295
|
|
|
29123
29296
|
// src/components/Chart/ChartTooltipRow.tsx
|
|
29124
|
-
import { jsx as
|
|
29297
|
+
import { jsx as jsx31, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
29125
29298
|
function ChartTooltipRow2({
|
|
29126
29299
|
value,
|
|
29127
29300
|
name: name2,
|
|
@@ -29129,7 +29302,7 @@ function ChartTooltipRow2({
|
|
|
29129
29302
|
theme,
|
|
29130
29303
|
hideDot = false
|
|
29131
29304
|
}) {
|
|
29132
|
-
return /* @__PURE__ */
|
|
29305
|
+
return /* @__PURE__ */ jsxs22(
|
|
29133
29306
|
"div",
|
|
29134
29307
|
{
|
|
29135
29308
|
style: {
|
|
@@ -29142,8 +29315,8 @@ function ChartTooltipRow2({
|
|
|
29142
29315
|
paddingBottom: 2
|
|
29143
29316
|
},
|
|
29144
29317
|
children: [
|
|
29145
|
-
/* @__PURE__ */
|
|
29146
|
-
!hideDot && /* @__PURE__ */
|
|
29318
|
+
/* @__PURE__ */ jsxs22("div", { style: { display: "flex", alignItems: "center" }, children: [
|
|
29319
|
+
!hideDot && /* @__PURE__ */ jsx31(
|
|
29147
29320
|
"span",
|
|
29148
29321
|
{
|
|
29149
29322
|
style: {
|
|
@@ -29160,7 +29333,7 @@ function ChartTooltipRow2({
|
|
|
29160
29333
|
}
|
|
29161
29334
|
}
|
|
29162
29335
|
),
|
|
29163
|
-
/* @__PURE__ */
|
|
29336
|
+
/* @__PURE__ */ jsx31(
|
|
29164
29337
|
"p",
|
|
29165
29338
|
{
|
|
29166
29339
|
style: {
|
|
@@ -29175,7 +29348,7 @@ function ChartTooltipRow2({
|
|
|
29175
29348
|
}
|
|
29176
29349
|
)
|
|
29177
29350
|
] }),
|
|
29178
|
-
/* @__PURE__ */
|
|
29351
|
+
/* @__PURE__ */ jsx31(
|
|
29179
29352
|
"p",
|
|
29180
29353
|
{
|
|
29181
29354
|
style: {
|
|
@@ -29199,14 +29372,14 @@ function ChartTooltipRow2({
|
|
|
29199
29372
|
}
|
|
29200
29373
|
|
|
29201
29374
|
// src/components/Chart/ChartTooltipGroup.tsx
|
|
29202
|
-
import { jsx as
|
|
29375
|
+
import { jsx as jsx32, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
29203
29376
|
function ChartTooltipGroup({
|
|
29204
29377
|
name: name2,
|
|
29205
29378
|
items,
|
|
29206
29379
|
theme,
|
|
29207
29380
|
hideDot = false
|
|
29208
29381
|
}) {
|
|
29209
|
-
return /* @__PURE__ */
|
|
29382
|
+
return /* @__PURE__ */ jsxs23(
|
|
29210
29383
|
"div",
|
|
29211
29384
|
{
|
|
29212
29385
|
style: {
|
|
@@ -29218,7 +29391,7 @@ function ChartTooltipGroup({
|
|
|
29218
29391
|
marginRight: "24px"
|
|
29219
29392
|
},
|
|
29220
29393
|
children: [
|
|
29221
|
-
/* @__PURE__ */
|
|
29394
|
+
/* @__PURE__ */ jsx32(
|
|
29222
29395
|
"p",
|
|
29223
29396
|
{
|
|
29224
29397
|
style: {
|
|
@@ -29236,7 +29409,7 @@ function ChartTooltipGroup({
|
|
|
29236
29409
|
children: name2.replaceAll("_", " ").toLowerCase()
|
|
29237
29410
|
}
|
|
29238
29411
|
),
|
|
29239
|
-
items.map(({ color: color2, value, name: name3 }, idx) => /* @__PURE__ */
|
|
29412
|
+
items.map(({ color: color2, value, name: name3 }, idx) => /* @__PURE__ */ jsx32(
|
|
29240
29413
|
ChartTooltipRow2,
|
|
29241
29414
|
{
|
|
29242
29415
|
value,
|
|
@@ -29254,9 +29427,9 @@ function ChartTooltipGroup({
|
|
|
29254
29427
|
|
|
29255
29428
|
// src/components/Chart/ChartTooltip.tsx
|
|
29256
29429
|
init_dates();
|
|
29257
|
-
import { jsx as
|
|
29258
|
-
var ChartTooltipPrimary = (props) => /* @__PURE__ */
|
|
29259
|
-
/* @__PURE__ */
|
|
29430
|
+
import { jsx as jsx33, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
29431
|
+
var ChartTooltipPrimary = (props) => /* @__PURE__ */ jsxs24(ChartTooltipFrame2, { theme: props.theme, children: [
|
|
29432
|
+
/* @__PURE__ */ jsx33(
|
|
29260
29433
|
"div",
|
|
29261
29434
|
{
|
|
29262
29435
|
style: {
|
|
@@ -29274,7 +29447,7 @@ var ChartTooltipPrimary = (props) => /* @__PURE__ */ jsxs23(ChartTooltipFrame2,
|
|
|
29274
29447
|
paddingTop: "8px",
|
|
29275
29448
|
paddingBottom: "8px"
|
|
29276
29449
|
},
|
|
29277
|
-
children: /* @__PURE__ */
|
|
29450
|
+
children: /* @__PURE__ */ jsx33(
|
|
29278
29451
|
"p",
|
|
29279
29452
|
{
|
|
29280
29453
|
style: {
|
|
@@ -29293,7 +29466,7 @@ var ChartTooltipPrimary = (props) => /* @__PURE__ */ jsxs23(ChartTooltipFrame2,
|
|
|
29293
29466
|
)
|
|
29294
29467
|
}
|
|
29295
29468
|
),
|
|
29296
|
-
/* @__PURE__ */
|
|
29469
|
+
/* @__PURE__ */ jsx33(
|
|
29297
29470
|
"div",
|
|
29298
29471
|
{
|
|
29299
29472
|
style: {
|
|
@@ -29302,7 +29475,7 @@ var ChartTooltipPrimary = (props) => /* @__PURE__ */ jsxs23(ChartTooltipFrame2,
|
|
|
29302
29475
|
paddingTop: "8px",
|
|
29303
29476
|
paddingBottom: "8px"
|
|
29304
29477
|
},
|
|
29305
|
-
children: props.payload.map(({ color: color2, value, name: name2 }, idx) => /* @__PURE__ */
|
|
29478
|
+
children: props.payload.map(({ color: color2, value, name: name2 }, idx) => /* @__PURE__ */ jsx33(
|
|
29306
29479
|
ChartTooltipRow2,
|
|
29307
29480
|
{
|
|
29308
29481
|
value: props.valueFormatter(value, name2),
|
|
@@ -29383,8 +29556,8 @@ function ChartTooltipComparison(props) {
|
|
|
29383
29556
|
presetLabel,
|
|
29384
29557
|
convertComparisonRange(presetLabel, comparisonLabel)
|
|
29385
29558
|
) ?? {};
|
|
29386
|
-
return /* @__PURE__ */
|
|
29387
|
-
/* @__PURE__ */
|
|
29559
|
+
return /* @__PURE__ */ jsxs24(ChartTooltipFrame2, { theme: props.theme, children: [
|
|
29560
|
+
/* @__PURE__ */ jsx33(
|
|
29388
29561
|
"div",
|
|
29389
29562
|
{
|
|
29390
29563
|
style: {
|
|
@@ -29402,7 +29575,7 @@ function ChartTooltipComparison(props) {
|
|
|
29402
29575
|
paddingTop: "8px",
|
|
29403
29576
|
paddingBottom: "8px"
|
|
29404
29577
|
},
|
|
29405
|
-
children: /* @__PURE__ */
|
|
29578
|
+
children: /* @__PURE__ */ jsx33(
|
|
29406
29579
|
"p",
|
|
29407
29580
|
{
|
|
29408
29581
|
style: {
|
|
@@ -29422,7 +29595,7 @@ function ChartTooltipComparison(props) {
|
|
|
29422
29595
|
)
|
|
29423
29596
|
}
|
|
29424
29597
|
),
|
|
29425
|
-
/* @__PURE__ */
|
|
29598
|
+
/* @__PURE__ */ jsx33(
|
|
29426
29599
|
"div",
|
|
29427
29600
|
{
|
|
29428
29601
|
style: {
|
|
@@ -29434,7 +29607,7 @@ function ChartTooltipComparison(props) {
|
|
|
29434
29607
|
flexDirection: "column",
|
|
29435
29608
|
gap: 4
|
|
29436
29609
|
},
|
|
29437
|
-
children: Object.entries(newRows).map(([key, value], index) => /* @__PURE__ */
|
|
29610
|
+
children: Object.entries(newRows).map(([key, value], index) => /* @__PURE__ */ jsx33(
|
|
29438
29611
|
ChartTooltipGroup,
|
|
29439
29612
|
{
|
|
29440
29613
|
name: key,
|
|
@@ -29450,8 +29623,8 @@ function ChartTooltipComparison(props) {
|
|
|
29450
29623
|
}
|
|
29451
29624
|
function ChartTooltip(props) {
|
|
29452
29625
|
if (!props.active || !props.payload) return null;
|
|
29453
|
-
if (props.comparison) return /* @__PURE__ */
|
|
29454
|
-
return /* @__PURE__ */
|
|
29626
|
+
if (props.comparison) return /* @__PURE__ */ jsx33(ChartTooltipComparison, { ...props });
|
|
29627
|
+
return /* @__PURE__ */ jsx33(ChartTooltipPrimary, { ...props });
|
|
29455
29628
|
}
|
|
29456
29629
|
|
|
29457
29630
|
// src/utils/getDomain.ts
|
|
@@ -29527,7 +29700,7 @@ import { useMemo as useMemo4 } from "react";
|
|
|
29527
29700
|
|
|
29528
29701
|
// src/components/Chart/CustomReferenceLine.tsx
|
|
29529
29702
|
init_constants();
|
|
29530
|
-
import { Fragment as
|
|
29703
|
+
import { Fragment as Fragment2, jsx as jsx34, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
29531
29704
|
function CustomReferenceLine({
|
|
29532
29705
|
xAxisMap,
|
|
29533
29706
|
yAxisMap,
|
|
@@ -29544,8 +29717,8 @@ function CustomReferenceLine({
|
|
|
29544
29717
|
const y1 = yScale(referenceLine[0]);
|
|
29545
29718
|
const y2 = yScale(referenceLine[1]);
|
|
29546
29719
|
const textY = yScale(referenceLine[referenceLine.length - 1]) - 5;
|
|
29547
|
-
return /* @__PURE__ */
|
|
29548
|
-
referenceLine.length === 2 && /* @__PURE__ */
|
|
29720
|
+
return /* @__PURE__ */ jsxs25(Fragment2, { children: [
|
|
29721
|
+
referenceLine.length === 2 && /* @__PURE__ */ jsx34(
|
|
29549
29722
|
"line",
|
|
29550
29723
|
{
|
|
29551
29724
|
x1: xMin,
|
|
@@ -29561,7 +29734,7 @@ function CustomReferenceLine({
|
|
|
29561
29734
|
referenceLine.length > 2 && referenceLine.slice(1).map((point, index) => {
|
|
29562
29735
|
const x1 = xMin + (xMax - xMin) * (index / (referenceLine.length - 1));
|
|
29563
29736
|
const x2 = xMin + (xMax - xMin) * ((index + 1) / (referenceLine.length - 1));
|
|
29564
|
-
return /* @__PURE__ */
|
|
29737
|
+
return /* @__PURE__ */ jsx34(
|
|
29565
29738
|
"line",
|
|
29566
29739
|
{
|
|
29567
29740
|
x1,
|
|
@@ -29576,7 +29749,7 @@ function CustomReferenceLine({
|
|
|
29576
29749
|
index
|
|
29577
29750
|
);
|
|
29578
29751
|
}),
|
|
29579
|
-
/* @__PURE__ */
|
|
29752
|
+
/* @__PURE__ */ jsxs25(
|
|
29580
29753
|
"text",
|
|
29581
29754
|
{
|
|
29582
29755
|
x: xMax - 5,
|
|
@@ -29599,56 +29772,6 @@ function CustomReferenceLine({
|
|
|
29599
29772
|
] });
|
|
29600
29773
|
}
|
|
29601
29774
|
|
|
29602
|
-
// src/components/Chart/CustomLegend.tsx
|
|
29603
|
-
import { useContext as useContext6 } from "react";
|
|
29604
|
-
import { jsx as jsx34, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
29605
|
-
var RenderLegend = (props) => {
|
|
29606
|
-
const { payload } = props;
|
|
29607
|
-
const [theme] = useContext6(ThemeContext);
|
|
29608
|
-
return /* @__PURE__ */ jsx34("div", { style: { display: "flex", justifyContent: "flex-start" }, children: payload.map((entry, index) => /* @__PURE__ */ jsxs25(
|
|
29609
|
-
"div",
|
|
29610
|
-
{
|
|
29611
|
-
style: {
|
|
29612
|
-
display: "flex",
|
|
29613
|
-
alignItems: "center",
|
|
29614
|
-
marginRight: "1rem"
|
|
29615
|
-
},
|
|
29616
|
-
children: [
|
|
29617
|
-
/* @__PURE__ */ jsx34(
|
|
29618
|
-
"svg",
|
|
29619
|
-
{
|
|
29620
|
-
style: { marginRight: "0.5rem" },
|
|
29621
|
-
width: "16",
|
|
29622
|
-
height: "16",
|
|
29623
|
-
viewBox: "0 0 16 16",
|
|
29624
|
-
children: /* @__PURE__ */ jsx34(
|
|
29625
|
-
"rect",
|
|
29626
|
-
{
|
|
29627
|
-
width: "16",
|
|
29628
|
-
height: "16",
|
|
29629
|
-
rx: "3",
|
|
29630
|
-
fill: payload?.[index]?.color
|
|
29631
|
-
}
|
|
29632
|
-
)
|
|
29633
|
-
}
|
|
29634
|
-
),
|
|
29635
|
-
/* @__PURE__ */ jsx34(
|
|
29636
|
-
"span",
|
|
29637
|
-
{
|
|
29638
|
-
style: {
|
|
29639
|
-
color: theme?.secondaryTextColor,
|
|
29640
|
-
fontFamily: theme?.fontFamily,
|
|
29641
|
-
fontSize: theme?.fontSizeMedium || "14px"
|
|
29642
|
-
},
|
|
29643
|
-
children: entry.value
|
|
29644
|
-
}
|
|
29645
|
-
)
|
|
29646
|
-
]
|
|
29647
|
-
},
|
|
29648
|
-
`legend-${index}`
|
|
29649
|
-
)) });
|
|
29650
|
-
};
|
|
29651
|
-
|
|
29652
29775
|
// src/components/Chart/LineChart.tsx
|
|
29653
29776
|
import { jsx as jsx35, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
29654
29777
|
function createLineForEmptyChart(yAxisFields, dateFilter, xAxisField, xAxisFormat) {
|
|
@@ -29767,7 +29890,7 @@ function LineChart({
|
|
|
29767
29890
|
}
|
|
29768
29891
|
),
|
|
29769
29892
|
showLegend && /* @__PURE__ */ jsx35(
|
|
29770
|
-
|
|
29893
|
+
Legend2,
|
|
29771
29894
|
{
|
|
29772
29895
|
verticalAlign: "top",
|
|
29773
29896
|
align: "left",
|
|
@@ -29986,7 +30109,7 @@ import {
|
|
|
29986
30109
|
Bar,
|
|
29987
30110
|
BarChart as ReChartsBarChart,
|
|
29988
30111
|
Customized as Customized2,
|
|
29989
|
-
Legend as
|
|
30112
|
+
Legend as Legend3
|
|
29990
30113
|
} from "recharts";
|
|
29991
30114
|
|
|
29992
30115
|
// src/components/Chart/CustomBar.tsx
|
|
@@ -30157,7 +30280,7 @@ function BarChart({
|
|
|
30157
30280
|
}
|
|
30158
30281
|
),
|
|
30159
30282
|
showLegend && /* @__PURE__ */ jsx37(
|
|
30160
|
-
|
|
30283
|
+
Legend3,
|
|
30161
30284
|
{
|
|
30162
30285
|
verticalAlign: "top",
|
|
30163
30286
|
align: "left",
|
|
@@ -30449,8 +30572,8 @@ import { useMemo as useMemo10 } from "react";
|
|
|
30449
30572
|
import {
|
|
30450
30573
|
useContext as useContext9,
|
|
30451
30574
|
useEffect as useEffect10,
|
|
30452
|
-
useRef as
|
|
30453
|
-
useState as
|
|
30575
|
+
useRef as useRef7,
|
|
30576
|
+
useState as useState12
|
|
30454
30577
|
} from "react";
|
|
30455
30578
|
import {
|
|
30456
30579
|
startOfMonth as startOfMonth3,
|
|
@@ -30471,8 +30594,8 @@ import {
|
|
|
30471
30594
|
import {
|
|
30472
30595
|
useContext as useContext8,
|
|
30473
30596
|
useMemo as useMemo7,
|
|
30474
|
-
useRef as
|
|
30475
|
-
useState as
|
|
30597
|
+
useRef as useRef6,
|
|
30598
|
+
useState as useState11,
|
|
30476
30599
|
useEffect as useEffect9
|
|
30477
30600
|
} from "react";
|
|
30478
30601
|
import { createPortal as createPortal2 } from "react-dom";
|
|
@@ -30488,9 +30611,9 @@ function QuillSelectComponent({
|
|
|
30488
30611
|
hideEmptyOption
|
|
30489
30612
|
}) {
|
|
30490
30613
|
const [theme] = useContext8(ThemeContext);
|
|
30491
|
-
const [showModal, setShowModal] =
|
|
30492
|
-
const modalRef =
|
|
30493
|
-
const buttonRef =
|
|
30614
|
+
const [showModal, setShowModal] = useState11(false);
|
|
30615
|
+
const modalRef = useRef6(null);
|
|
30616
|
+
const buttonRef = useRef6(null);
|
|
30494
30617
|
useOnClickOutside_default(
|
|
30495
30618
|
modalRef,
|
|
30496
30619
|
(event) => {
|
|
@@ -30513,9 +30636,9 @@ function QuillSelectComponent({
|
|
|
30513
30636
|
const nullLabel = useMemo7(() => {
|
|
30514
30637
|
return sortedItems.some((item) => item.value === "-") ? "None" : "-";
|
|
30515
30638
|
}, [sortedItems]);
|
|
30516
|
-
const [popoverPosition, setPopoverPosition] =
|
|
30517
|
-
const [z, setZ] =
|
|
30518
|
-
const scrollableParentRef =
|
|
30639
|
+
const [popoverPosition, setPopoverPosition] = useState11(void 0);
|
|
30640
|
+
const [z, setZ] = useState11(10);
|
|
30641
|
+
const scrollableParentRef = useRef6(document.body);
|
|
30519
30642
|
const updatePosition = () => {
|
|
30520
30643
|
if (buttonRef.current) {
|
|
30521
30644
|
requestAnimationFrame(() => {
|
|
@@ -30820,22 +30943,22 @@ function QuillDateRangePicker({
|
|
|
30820
30943
|
}) {
|
|
30821
30944
|
const [theme] = useContext9(ThemeContext);
|
|
30822
30945
|
const [client] = useContext9(ClientContext);
|
|
30823
|
-
const [anchorStartDate, setAnchorStartDate] =
|
|
30946
|
+
const [anchorStartDate, setAnchorStartDate] = useState12(
|
|
30824
30947
|
getAnchorStartDate(dateRange.startDate, dateRange.endDate)
|
|
30825
30948
|
);
|
|
30826
|
-
const [anchorEndDate, setAnchorEndDate] =
|
|
30949
|
+
const [anchorEndDate, setAnchorEndDate] = useState12(
|
|
30827
30950
|
getAnchorEndDate(dateRange.startDate, dateRange.endDate)
|
|
30828
30951
|
);
|
|
30829
|
-
const [localStartDate, setLocalStartDate] =
|
|
30952
|
+
const [localStartDate, setLocalStartDate] = useState12(
|
|
30830
30953
|
dateRange.startDate
|
|
30831
30954
|
);
|
|
30832
|
-
const [localEndDate, setLocalEndDate] =
|
|
30955
|
+
const [localEndDate, setLocalEndDate] = useState12(
|
|
30833
30956
|
dateRange.endDate
|
|
30834
30957
|
);
|
|
30835
|
-
const [localPreset, setLocalPreset] =
|
|
30836
|
-
const [showModal, setShowModal] =
|
|
30837
|
-
const buttonRef =
|
|
30838
|
-
const modalRef =
|
|
30958
|
+
const [localPreset, setLocalPreset] = useState12(preset);
|
|
30959
|
+
const [showModal, setShowModal] = useState12(false);
|
|
30960
|
+
const buttonRef = useRef7(null);
|
|
30961
|
+
const modalRef = useRef7(null);
|
|
30839
30962
|
useEffect10(() => {
|
|
30840
30963
|
setLocalEndDate(dateRange.endDate);
|
|
30841
30964
|
setLocalStartDate(dateRange.startDate);
|
|
@@ -31351,11 +31474,11 @@ import React7, {
|
|
|
31351
31474
|
useContext as useContext10,
|
|
31352
31475
|
useEffect as useEffect11,
|
|
31353
31476
|
useMemo as useMemo8,
|
|
31354
|
-
useRef as
|
|
31355
|
-
useState as
|
|
31477
|
+
useRef as useRef8,
|
|
31478
|
+
useState as useState13
|
|
31356
31479
|
} from "react";
|
|
31357
31480
|
import { createPortal as createPortal3 } from "react-dom";
|
|
31358
|
-
import { Fragment as
|
|
31481
|
+
import { Fragment as Fragment3, jsx as jsx41, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
31359
31482
|
function QuillMultiSelectComponentWithCombo({
|
|
31360
31483
|
options,
|
|
31361
31484
|
width,
|
|
@@ -31369,17 +31492,17 @@ function QuillMultiSelectComponentWithCombo({
|
|
|
31369
31492
|
style: style2
|
|
31370
31493
|
}) {
|
|
31371
31494
|
const [theme] = useContext10(ThemeContext);
|
|
31372
|
-
const [selectedOptions, setSelectedOptions] =
|
|
31373
|
-
const [showModal, setShowModal] =
|
|
31374
|
-
const modalRef =
|
|
31375
|
-
const buttonRef =
|
|
31376
|
-
const debounceTimeoutId =
|
|
31495
|
+
const [selectedOptions, setSelectedOptions] = useState13([]);
|
|
31496
|
+
const [showModal, setShowModal] = useState13(false);
|
|
31497
|
+
const modalRef = useRef8(null);
|
|
31498
|
+
const buttonRef = useRef8(null);
|
|
31499
|
+
const debounceTimeoutId = useRef8(null);
|
|
31377
31500
|
const [searchQuery, setSearchQuery] = React7.useState("");
|
|
31378
|
-
const [exceedsLimit, setExceedsLimit] =
|
|
31379
|
-
const [popoverPosition, setPopoverPosition] =
|
|
31380
|
-
const [z, setZ] =
|
|
31381
|
-
const scrollableParentRef =
|
|
31382
|
-
const selectAllRef =
|
|
31501
|
+
const [exceedsLimit, setExceedsLimit] = useState13(false);
|
|
31502
|
+
const [popoverPosition, setPopoverPosition] = useState13(void 0);
|
|
31503
|
+
const [z, setZ] = useState13(10);
|
|
31504
|
+
const scrollableParentRef = useRef8(document.body);
|
|
31505
|
+
const selectAllRef = useRef8(null);
|
|
31383
31506
|
let CheckboxState;
|
|
31384
31507
|
((CheckboxState2) => {
|
|
31385
31508
|
CheckboxState2[CheckboxState2["SELECTED"] = 0] = "SELECTED";
|
|
@@ -31413,7 +31536,7 @@ function QuillMultiSelectComponentWithCombo({
|
|
|
31413
31536
|
(elem) => elem.label ?? "-"
|
|
31414
31537
|
).join(", ");
|
|
31415
31538
|
}, [options, value]);
|
|
31416
|
-
const [selectAllCheckboxState, setSelectAllCheckboxState] =
|
|
31539
|
+
const [selectAllCheckboxState, setSelectAllCheckboxState] = useState13(
|
|
31417
31540
|
(() => {
|
|
31418
31541
|
if (value.length === 0) {
|
|
31419
31542
|
return 1 /* UNSELECTED */;
|
|
@@ -31669,7 +31792,7 @@ function QuillMultiSelectComponentWithCombo({
|
|
|
31669
31792
|
ref: modalRef,
|
|
31670
31793
|
"data-portal-ignore": "true",
|
|
31671
31794
|
children: [
|
|
31672
|
-
!exceedsLimit && options && options.length > 20 && /* @__PURE__ */ jsxs31(
|
|
31795
|
+
!exceedsLimit && options && options.length > 20 && /* @__PURE__ */ jsxs31(Fragment3, { children: [
|
|
31673
31796
|
/* @__PURE__ */ jsx41(
|
|
31674
31797
|
ListboxTextInput,
|
|
31675
31798
|
{
|
|
@@ -31739,7 +31862,7 @@ function QuillMultiSelectComponentWithCombo({
|
|
|
31739
31862
|
]
|
|
31740
31863
|
}
|
|
31741
31864
|
),
|
|
31742
|
-
!exceedsLimit && !isLoading ? /* @__PURE__ */ jsxs31(
|
|
31865
|
+
!exceedsLimit && !isLoading ? /* @__PURE__ */ jsxs31(Fragment3, { children: [
|
|
31743
31866
|
searchQuery === "" && potentialOptions.length > 0 && /* @__PURE__ */ jsxs31(
|
|
31744
31867
|
"button",
|
|
31745
31868
|
{
|
|
@@ -32016,8 +32139,8 @@ var ListboxTextInput = ({
|
|
|
32016
32139
|
import React8, {
|
|
32017
32140
|
useContext as useContext11,
|
|
32018
32141
|
useMemo as useMemo9,
|
|
32019
|
-
useRef as
|
|
32020
|
-
useState as
|
|
32142
|
+
useRef as useRef9,
|
|
32143
|
+
useState as useState14
|
|
32021
32144
|
} from "react";
|
|
32022
32145
|
import { jsx as jsx42, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
32023
32146
|
function QuillSelectComponentWithCombo({
|
|
@@ -32031,9 +32154,9 @@ function QuillSelectComponentWithCombo({
|
|
|
32031
32154
|
disabled
|
|
32032
32155
|
}) {
|
|
32033
32156
|
const [theme] = useContext11(ThemeContext);
|
|
32034
|
-
const [showModal, setShowModal] =
|
|
32035
|
-
const modalRef =
|
|
32036
|
-
const buttonRef =
|
|
32157
|
+
const [showModal, setShowModal] = useState14(false);
|
|
32158
|
+
const modalRef = useRef9(null);
|
|
32159
|
+
const buttonRef = useRef9(null);
|
|
32037
32160
|
const [searchQuery, setSearchQuery] = React8.useState("");
|
|
32038
32161
|
const filteredItems = React8.useMemo(() => {
|
|
32039
32162
|
if (searchQuery === "") {
|
|
@@ -32832,11 +32955,11 @@ var MetricDisplay = ({
|
|
|
32832
32955
|
};
|
|
32833
32956
|
|
|
32834
32957
|
// src/components/Dashboard/DataLoader.tsx
|
|
32835
|
-
import { useContext as useContext13, useEffect as useEffect12, useMemo as useMemo11, useRef as
|
|
32958
|
+
import { useContext as useContext13, useEffect as useEffect12, useMemo as useMemo11, useRef as useRef10, useState as useState15 } from "react";
|
|
32836
32959
|
init_paginationProcessing();
|
|
32837
32960
|
init_tableProcessing();
|
|
32838
32961
|
import equal2 from "fast-deep-equal";
|
|
32839
|
-
import { Fragment as
|
|
32962
|
+
import { Fragment as Fragment4, jsx as jsx45 } from "react/jsx-runtime";
|
|
32840
32963
|
var constructReportFromItem = (item) => {
|
|
32841
32964
|
return {
|
|
32842
32965
|
...EMPTY_INTERNAL_REPORT,
|
|
@@ -32846,6 +32969,7 @@ var constructReportFromItem = (item) => {
|
|
|
32846
32969
|
rows: [],
|
|
32847
32970
|
columns: [],
|
|
32848
32971
|
chartType: item.chartType,
|
|
32972
|
+
showLegend: item.showLegend,
|
|
32849
32973
|
dateField: item.dateField,
|
|
32850
32974
|
pivot: item.pivot,
|
|
32851
32975
|
xAxisLabel: item.xAxisLabel,
|
|
@@ -32951,10 +33075,10 @@ function DataLoader({
|
|
|
32951
33075
|
) : Object.values(reportFilters[item.id] ?? {}).map((f) => f.filter);
|
|
32952
33076
|
}, [dashboardFilters, reportFilters, dashboardName, item.id]);
|
|
32953
33077
|
const [schemaData] = useContext13(SchemaDataContext);
|
|
32954
|
-
const [loading, setLoading] =
|
|
32955
|
-
const [error, setError] =
|
|
32956
|
-
const [previousPage, setPreviousPage] =
|
|
32957
|
-
const [additionalProcessing, setAdditionalProcessing] =
|
|
33078
|
+
const [loading, setLoading] = useState15(true);
|
|
33079
|
+
const [error, setError] = useState15(void 0);
|
|
33080
|
+
const [previousPage, setPreviousPage] = useState15(0);
|
|
33081
|
+
const [additionalProcessing, setAdditionalProcessing] = useState15(defaultAdditionalProcessing);
|
|
32958
33082
|
const chartReport = useMemo11(() => {
|
|
32959
33083
|
const report = (dashboardName ? dashboard : reports)[item.id];
|
|
32960
33084
|
if (report) {
|
|
@@ -32971,17 +33095,17 @@ function DataLoader({
|
|
|
32971
33095
|
reportFilters,
|
|
32972
33096
|
dashboardFilters
|
|
32973
33097
|
]);
|
|
32974
|
-
const previousFilters =
|
|
32975
|
-
const previousUserFilters =
|
|
32976
|
-
const previousTenants =
|
|
32977
|
-
const previousCustomFields =
|
|
32978
|
-
const [rowCountIsLoading, setRowCountIsLoading] =
|
|
32979
|
-
const rowsRequestId =
|
|
32980
|
-
const rowsAbortController =
|
|
32981
|
-
const rowCountRequestId =
|
|
32982
|
-
const rowCountAbortController =
|
|
32983
|
-
const updateTableRowsRequestId =
|
|
32984
|
-
const updateTableRowsAbortController =
|
|
33098
|
+
const previousFilters = useRef10(filters);
|
|
33099
|
+
const previousUserFilters = useRef10(userFilters);
|
|
33100
|
+
const previousTenants = useRef10(tenants);
|
|
33101
|
+
const previousCustomFields = useRef10(schemaData.customFields);
|
|
33102
|
+
const [rowCountIsLoading, setRowCountIsLoading] = useState15(false);
|
|
33103
|
+
const rowsRequestId = useRef10(0);
|
|
33104
|
+
const rowsAbortController = useRef10(null);
|
|
33105
|
+
const rowCountRequestId = useRef10(0);
|
|
33106
|
+
const rowCountAbortController = useRef10(null);
|
|
33107
|
+
const updateTableRowsRequestId = useRef10(0);
|
|
33108
|
+
const updateTableRowsAbortController = useRef10(null);
|
|
32985
33109
|
const fetchRowCount = async (processing) => {
|
|
32986
33110
|
if (!client || !filters) {
|
|
32987
33111
|
if (!rowCountAbortController.current) return;
|
|
@@ -33340,7 +33464,7 @@ function DataLoader({
|
|
|
33340
33464
|
(dashboardName ? dashboard : reports)[item.id]?.triggerReload,
|
|
33341
33465
|
(dashboardName ? dashboard : reports)[item.id]?.error
|
|
33342
33466
|
]);
|
|
33343
|
-
return /* @__PURE__ */ jsx45(
|
|
33467
|
+
return /* @__PURE__ */ jsx45(Fragment4, { children: children({
|
|
33344
33468
|
isLoading: loading,
|
|
33345
33469
|
error,
|
|
33346
33470
|
onPageChange,
|
|
@@ -33376,17 +33500,17 @@ var ChartDataLoader = ({
|
|
|
33376
33500
|
(f) => f.filter
|
|
33377
33501
|
) : Object.values(reportFilters[item.id] ?? {}).map((f) => f.filter);
|
|
33378
33502
|
}, [dashboardFilters, reportFilters, dashboardName, item.id]);
|
|
33379
|
-
const [loading, setLoading] =
|
|
33380
|
-
const [error, setError] =
|
|
33503
|
+
const [loading, setLoading] = useState15(true);
|
|
33504
|
+
const [error, setError] = useState15(void 0);
|
|
33381
33505
|
const [client] = useContext13(ClientContext);
|
|
33382
33506
|
const [schemaData] = useContext13(SchemaDataContext);
|
|
33383
|
-
const previousFilters =
|
|
33384
|
-
const previousUserFilters =
|
|
33385
|
-
const previousDateBucket =
|
|
33386
|
-
const previousTenants =
|
|
33387
|
-
const previousCustomFields =
|
|
33388
|
-
const fetchReportAbortController =
|
|
33389
|
-
const rowsRequestId =
|
|
33507
|
+
const previousFilters = useRef10(filters);
|
|
33508
|
+
const previousUserFilters = useRef10(userFilters);
|
|
33509
|
+
const previousDateBucket = useRef10(dateBucket);
|
|
33510
|
+
const previousTenants = useRef10(tenants);
|
|
33511
|
+
const previousCustomFields = useRef10(schemaData.customFields);
|
|
33512
|
+
const fetchReportAbortController = useRef10(null);
|
|
33513
|
+
const rowsRequestId = useRef10(0);
|
|
33390
33514
|
const chartReport = useMemo11(() => {
|
|
33391
33515
|
const report = dashboardName ? dashboard[item.id] : reports[item.id];
|
|
33392
33516
|
if (!report) {
|
|
@@ -33667,7 +33791,7 @@ import {
|
|
|
33667
33791
|
Geography,
|
|
33668
33792
|
useMapContext
|
|
33669
33793
|
} from "react-simple-maps";
|
|
33670
|
-
import { useEffect as useEffect13, useMemo as useMemo12, useRef as
|
|
33794
|
+
import { useEffect as useEffect13, useMemo as useMemo12, useRef as useRef11, useState as useState16 } from "react";
|
|
33671
33795
|
init_valueFormatter();
|
|
33672
33796
|
import { jsx as jsx46, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
33673
33797
|
var statesUrl = "https://cdn.jsdelivr.net/npm/us-atlas@3/states-10m.json";
|
|
@@ -33994,17 +34118,17 @@ function USMap({
|
|
|
33994
34118
|
className,
|
|
33995
34119
|
containerStyle
|
|
33996
34120
|
}) {
|
|
33997
|
-
const containerRef =
|
|
33998
|
-
const [hoveredState, setHoveredState] =
|
|
34121
|
+
const containerRef = useRef11(null);
|
|
34122
|
+
const [hoveredState, setHoveredState] = useState16(
|
|
33999
34123
|
void 0
|
|
34000
34124
|
);
|
|
34001
|
-
const [hoveredCoords, setHoveredCoords] =
|
|
34125
|
+
const [hoveredCoords, setHoveredCoords] = useState16(void 0);
|
|
34002
34126
|
const mappedData = data.reduce((acc, curr) => {
|
|
34003
34127
|
acc[curr[xAxisField]?.toString()] = curr;
|
|
34004
34128
|
return acc;
|
|
34005
34129
|
}, {});
|
|
34006
34130
|
const measureField = yAxisFields[0]?.field ?? xAxisField;
|
|
34007
|
-
const [scaleLog, setScaleLog] =
|
|
34131
|
+
const [scaleLog, setScaleLog] = useState16(null);
|
|
34008
34132
|
useEffect13(() => {
|
|
34009
34133
|
import("d3-scale").then((scale) => {
|
|
34010
34134
|
setScaleLog(() => scale.scaleLog);
|
|
@@ -34185,17 +34309,17 @@ function WorldMap({
|
|
|
34185
34309
|
className,
|
|
34186
34310
|
containerStyle
|
|
34187
34311
|
}) {
|
|
34188
|
-
const containerRef =
|
|
34189
|
-
const [hoveredCountry, setHoveredCountry] =
|
|
34312
|
+
const containerRef = useRef11(null);
|
|
34313
|
+
const [hoveredCountry, setHoveredCountry] = useState16(
|
|
34190
34314
|
void 0
|
|
34191
34315
|
);
|
|
34192
|
-
const [hoveredCoords, setHoveredCoords] =
|
|
34316
|
+
const [hoveredCoords, setHoveredCoords] = useState16(void 0);
|
|
34193
34317
|
const mappedData = data.reduce((acc, curr) => {
|
|
34194
34318
|
acc[curr[xAxisField]?.toString()] = curr;
|
|
34195
34319
|
return acc;
|
|
34196
34320
|
}, {});
|
|
34197
34321
|
const measureField = yAxisFields[0]?.field ?? xAxisField;
|
|
34198
|
-
const [scaleLog, setScaleLog] =
|
|
34322
|
+
const [scaleLog, setScaleLog] = useState16(null);
|
|
34199
34323
|
useEffect13(() => {
|
|
34200
34324
|
import("d3-scale").then((scale) => {
|
|
34201
34325
|
setScaleLog(() => scale.scaleLog);
|
|
@@ -34378,7 +34502,7 @@ function MapLayout({
|
|
|
34378
34502
|
regionNames
|
|
34379
34503
|
}) {
|
|
34380
34504
|
const { projection } = useMapContext();
|
|
34381
|
-
const [geoCentroid, setGeoCentroid] =
|
|
34505
|
+
const [geoCentroid, setGeoCentroid] = useState16(null);
|
|
34382
34506
|
useEffect13(() => {
|
|
34383
34507
|
import("d3-geo").then((geo) => {
|
|
34384
34508
|
setGeoCentroid(() => geo.geoCentroid);
|
|
@@ -34431,7 +34555,7 @@ function MapLayout({
|
|
|
34431
34555
|
}
|
|
34432
34556
|
|
|
34433
34557
|
// src/components/Chart/GaugeChart.tsx
|
|
34434
|
-
import { useEffect as useEffect14, useRef as
|
|
34558
|
+
import { useEffect as useEffect14, useRef as useRef12, useState as useState17 } from "react";
|
|
34435
34559
|
|
|
34436
34560
|
// ../../node_modules/d3-transition/src/selection/index.js
|
|
34437
34561
|
import { selection as selection3 } from "d3-selection";
|
|
@@ -35705,19 +35829,19 @@ function D3Gauge({
|
|
|
35705
35829
|
colors,
|
|
35706
35830
|
isAnimationActive
|
|
35707
35831
|
}) {
|
|
35708
|
-
const containerRef =
|
|
35709
|
-
const svgRef =
|
|
35710
|
-
const gaugeGroupRef =
|
|
35711
|
-
const needleRef =
|
|
35712
|
-
const needleOutlineRef =
|
|
35713
|
-
const textRef =
|
|
35714
|
-
const previousPercentageRef =
|
|
35715
|
-
const firstMountRef =
|
|
35832
|
+
const containerRef = useRef12(null);
|
|
35833
|
+
const svgRef = useRef12(null);
|
|
35834
|
+
const gaugeGroupRef = useRef12(null);
|
|
35835
|
+
const needleRef = useRef12(null);
|
|
35836
|
+
const needleOutlineRef = useRef12(null);
|
|
35837
|
+
const textRef = useRef12(null);
|
|
35838
|
+
const previousPercentageRef = useRef12(0);
|
|
35839
|
+
const firstMountRef = useRef12(true);
|
|
35716
35840
|
const startAngle = -(3 * Math.PI) / 4;
|
|
35717
35841
|
const totalAngle = 3 * Math.PI / 2;
|
|
35718
|
-
const [arc, setArc] =
|
|
35719
|
-
const [interpolate, setInterpolate] =
|
|
35720
|
-
const [select, setSelect] =
|
|
35842
|
+
const [arc, setArc] = useState17(null);
|
|
35843
|
+
const [interpolate, setInterpolate] = useState17(null);
|
|
35844
|
+
const [select, setSelect] = useState17(null);
|
|
35721
35845
|
useEffect14(() => {
|
|
35722
35846
|
import("d3-shape").then(({ arc: arc2 }) => {
|
|
35723
35847
|
setArc(() => arc2);
|
|
@@ -35865,7 +35989,7 @@ function D3Gauge({
|
|
|
35865
35989
|
|
|
35866
35990
|
// src/components/QuillComponentTables.tsx
|
|
35867
35991
|
init_paginationProcessing();
|
|
35868
|
-
import { useState as
|
|
35992
|
+
import { useState as useState18, useEffect as useEffect15, useContext as useContext15 } from "react";
|
|
35869
35993
|
import { jsx as jsx48, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
35870
35994
|
var QuillTableSQLEditorComponent = ({
|
|
35871
35995
|
rows,
|
|
@@ -35881,8 +36005,8 @@ var QuillTableSQLEditorComponent = ({
|
|
|
35881
36005
|
setCurrentPage,
|
|
35882
36006
|
hideLabels
|
|
35883
36007
|
}) => {
|
|
35884
|
-
const [sort, setSort] =
|
|
35885
|
-
const [page, setPage] =
|
|
36008
|
+
const [sort, setSort] = useState18({ field: "", direction: "" });
|
|
36009
|
+
const [page, setPage] = useState18(0);
|
|
35886
36010
|
return /* @__PURE__ */ jsx48(
|
|
35887
36011
|
QuillTable,
|
|
35888
36012
|
{
|
|
@@ -35924,8 +36048,8 @@ var QuillTableReportBuilderComponent = ({
|
|
|
35924
36048
|
setCurrentPage,
|
|
35925
36049
|
disableSort
|
|
35926
36050
|
}) => {
|
|
35927
|
-
const [sort, setSort] =
|
|
35928
|
-
const [page, setPage] =
|
|
36051
|
+
const [sort, setSort] = useState18({ field: "", direction: "" });
|
|
36052
|
+
const [page, setPage] = useState18(0);
|
|
35929
36053
|
useEffect15(() => {
|
|
35930
36054
|
if (disableSort) {
|
|
35931
36055
|
setSort({ field: "", direction: "" });
|
|
@@ -35978,9 +36102,9 @@ var QuillTableComponent = ({
|
|
|
35978
36102
|
borderTop,
|
|
35979
36103
|
borderBottom
|
|
35980
36104
|
}) => {
|
|
35981
|
-
const [sort, setSort] =
|
|
35982
|
-
const [page, setPage] =
|
|
35983
|
-
const [initialLoad, setInitialLoad] =
|
|
36105
|
+
const [sort, setSort] = useState18({ field: "", direction: "" });
|
|
36106
|
+
const [page, setPage] = useState18(0);
|
|
36107
|
+
const [initialLoad, setInitialLoad] = useState18(() => {
|
|
35984
36108
|
return !(rows && rows.length > 0 && !isLoading);
|
|
35985
36109
|
});
|
|
35986
36110
|
useEffect15(() => {
|
|
@@ -36050,9 +36174,9 @@ function QuillTableDashboardComponent({
|
|
|
36050
36174
|
hideName
|
|
36051
36175
|
}) {
|
|
36052
36176
|
const [theme] = useContext15(ThemeContext);
|
|
36053
|
-
const [initialLoad, setInitialLoad] =
|
|
36177
|
+
const [initialLoad, setInitialLoad] = useState18(true);
|
|
36054
36178
|
const { downloadCSV: downloadCSV2 } = useExport(report?.id);
|
|
36055
|
-
const [page, setPage] =
|
|
36179
|
+
const [page, setPage] = useState18(report?.pagination?.page ?? 0);
|
|
36056
36180
|
useEffect15(() => {
|
|
36057
36181
|
if (!isLoading) {
|
|
36058
36182
|
setInitialLoad(false);
|
|
@@ -36161,7 +36285,7 @@ function QuillTableDashboardComponent({
|
|
|
36161
36285
|
}
|
|
36162
36286
|
|
|
36163
36287
|
// src/Chart.tsx
|
|
36164
|
-
import { Fragment as
|
|
36288
|
+
import { Fragment as Fragment5, jsx as jsx49, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
36165
36289
|
var MAX_ROWS_FOR_GENERIC_TABLE = 500;
|
|
36166
36290
|
function sumByKey(arr, key) {
|
|
36167
36291
|
return arr.reduce((acc, cur) => {
|
|
@@ -36237,11 +36361,11 @@ function Chart({
|
|
|
36237
36361
|
filters,
|
|
36238
36362
|
dashboardCustomFilters[allReportsById[reportId]?.dashboardName ?? ""]
|
|
36239
36363
|
]);
|
|
36240
|
-
const previousFilters =
|
|
36364
|
+
const previousFilters = useRef13(void 0);
|
|
36241
36365
|
if (!equal3(previousFilters.current, filters)) {
|
|
36242
36366
|
previousFilters.current = filters;
|
|
36243
36367
|
}
|
|
36244
|
-
const [filterValues, setFilterValues] =
|
|
36368
|
+
const [filterValues, setFilterValues] = useState19({});
|
|
36245
36369
|
useEffect16(() => {
|
|
36246
36370
|
setFilterValues(
|
|
36247
36371
|
Object.values(reportFilters[reportId] ?? {}).reduce((acc, f) => {
|
|
@@ -36311,7 +36435,7 @@ function Chart({
|
|
|
36311
36435
|
[reportId, allReportsById]
|
|
36312
36436
|
);
|
|
36313
36437
|
const report = useMemo13(() => reports[reportId], [reports, reportId]);
|
|
36314
|
-
const [loading, setLoading] =
|
|
36438
|
+
const [loading, setLoading] = useState19(true);
|
|
36315
36439
|
const [theme] = useContext16(ThemeContext);
|
|
36316
36440
|
const colorMap = useMemo13(() => {
|
|
36317
36441
|
if (mapColorsToFields && report && theme) {
|
|
@@ -36319,7 +36443,7 @@ function Chart({
|
|
|
36319
36443
|
}
|
|
36320
36444
|
}, [report, theme]);
|
|
36321
36445
|
const [client, clientLoading] = useContext16(ClientContext);
|
|
36322
|
-
const [error, setError] =
|
|
36446
|
+
const [error, setError] = useState19(void 0);
|
|
36323
36447
|
const updateFilter = (filter, value, comparison) => {
|
|
36324
36448
|
let filterValue = {};
|
|
36325
36449
|
if (filter.filterType === "string" /* String */) {
|
|
@@ -36489,8 +36613,8 @@ function Chart({
|
|
|
36489
36613
|
},
|
|
36490
36614
|
index
|
|
36491
36615
|
)) }),
|
|
36492
|
-
loading || !report ? /* @__PURE__ */ jsx49(LoadingComponent, {}) : /* @__PURE__ */ jsxs37(
|
|
36493
|
-
("table" === report.chartType || "metric" === report.chartType) && /* @__PURE__ */ jsx49(
|
|
36616
|
+
loading || !report ? /* @__PURE__ */ jsx49(LoadingComponent, {}) : /* @__PURE__ */ jsxs37(Fragment5, { children: [
|
|
36617
|
+
("table" === report.chartType || "metric" === report.chartType) && /* @__PURE__ */ jsx49(Fragment5, { children: /* @__PURE__ */ jsx49(
|
|
36494
36618
|
DataLoader,
|
|
36495
36619
|
{
|
|
36496
36620
|
item: report,
|
|
@@ -36613,7 +36737,7 @@ var ChartDisplay = ({
|
|
|
36613
36737
|
onClickChartElement,
|
|
36614
36738
|
overrideTheme,
|
|
36615
36739
|
referenceLines,
|
|
36616
|
-
showLegend
|
|
36740
|
+
showLegend,
|
|
36617
36741
|
tableRowsLoading = false
|
|
36618
36742
|
}) => {
|
|
36619
36743
|
const { downloadCSV: downloadCSV2 } = useExport(reportId);
|
|
@@ -36646,7 +36770,8 @@ var ChartDisplay = ({
|
|
|
36646
36770
|
}
|
|
36647
36771
|
return void 0;
|
|
36648
36772
|
}, [config, specificReportFilters, specificDashboardFilters]);
|
|
36649
|
-
const
|
|
36773
|
+
const resolvedShowLegend = showLegend !== void 0 ? showLegend : config?.showLegend ?? false;
|
|
36774
|
+
const [page, setPage] = useState19(0);
|
|
36650
36775
|
if (loading) {
|
|
36651
36776
|
return /* @__PURE__ */ jsx49("div", { className, style: containerStyle, children: /* @__PURE__ */ jsx49(LoadingComponent, {}) });
|
|
36652
36777
|
} else if (config && !["metric", "table", "gauge", "US map", "World map"].includes(
|
|
@@ -36681,7 +36806,7 @@ var ChartDisplay = ({
|
|
|
36681
36806
|
colorMap,
|
|
36682
36807
|
onClickChartElement,
|
|
36683
36808
|
yAxisFields: config?.yAxisFields,
|
|
36684
|
-
showLegend
|
|
36809
|
+
showLegend: resolvedShowLegend
|
|
36685
36810
|
}
|
|
36686
36811
|
);
|
|
36687
36812
|
}
|
|
@@ -36755,7 +36880,7 @@ var ChartDisplay = ({
|
|
|
36755
36880
|
onClickChartElement,
|
|
36756
36881
|
dateFilter: !hideDateRangeFilter ? dateFilter : void 0,
|
|
36757
36882
|
referenceLines,
|
|
36758
|
-
showLegend
|
|
36883
|
+
showLegend: resolvedShowLegend
|
|
36759
36884
|
}
|
|
36760
36885
|
);
|
|
36761
36886
|
}
|
|
@@ -36782,7 +36907,7 @@ var ChartDisplay = ({
|
|
|
36782
36907
|
onClickChartElement,
|
|
36783
36908
|
dateFilter: !hideDateRangeFilter ? dateFilter : void 0,
|
|
36784
36909
|
referenceLines,
|
|
36785
|
-
showLegend,
|
|
36910
|
+
showLegend: resolvedShowLegend,
|
|
36786
36911
|
stackedMode: true
|
|
36787
36912
|
}
|
|
36788
36913
|
);
|
|
@@ -36926,7 +37051,7 @@ var ChartDisplay = ({
|
|
|
36926
37051
|
onClickChartElement,
|
|
36927
37052
|
dateFilter: !hideDateRangeFilter ? dateFilter : void 0,
|
|
36928
37053
|
referenceLines,
|
|
36929
|
-
showLegend
|
|
37054
|
+
showLegend: resolvedShowLegend
|
|
36930
37055
|
}
|
|
36931
37056
|
);
|
|
36932
37057
|
};
|
|
@@ -37090,7 +37215,7 @@ function QuillChartComponent({
|
|
|
37090
37215
|
}
|
|
37091
37216
|
|
|
37092
37217
|
// src/components/Dashboard/TemplateChartComponent.tsx
|
|
37093
|
-
import { useState as
|
|
37218
|
+
import { useState as useState20 } from "react";
|
|
37094
37219
|
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
37095
37220
|
function QuillTemplateChartComponent({
|
|
37096
37221
|
report,
|
|
@@ -37098,7 +37223,7 @@ function QuillTemplateChartComponent({
|
|
|
37098
37223
|
children,
|
|
37099
37224
|
isLoading
|
|
37100
37225
|
}) {
|
|
37101
|
-
const [isSelected, setIsSelected] =
|
|
37226
|
+
const [isSelected, setIsSelected] = useState20(false);
|
|
37102
37227
|
return /* @__PURE__ */ jsx52(
|
|
37103
37228
|
"div",
|
|
37104
37229
|
{
|
|
@@ -37128,13 +37253,13 @@ function QuillTemplateChartComponent({
|
|
|
37128
37253
|
|
|
37129
37254
|
// src/components/Dashboard/DashboardSection.tsx
|
|
37130
37255
|
import { useContext as useContext18 } from "react";
|
|
37131
|
-
import { Fragment as
|
|
37256
|
+
import { Fragment as Fragment6, jsx as jsx53, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
37132
37257
|
function DashboardSection({
|
|
37133
37258
|
section,
|
|
37134
37259
|
children
|
|
37135
37260
|
}) {
|
|
37136
37261
|
const [theme] = useContext18(ThemeContext);
|
|
37137
|
-
return /* @__PURE__ */ jsxs39(
|
|
37262
|
+
return /* @__PURE__ */ jsxs39(Fragment6, { children: [
|
|
37138
37263
|
section && /* @__PURE__ */ jsx53("div", { style: { display: "flex", flexDirection: "column" }, children: /* @__PURE__ */ jsx53(
|
|
37139
37264
|
"h1",
|
|
37140
37265
|
{
|
|
@@ -37187,12 +37312,12 @@ import {
|
|
|
37187
37312
|
useContext as useContext19,
|
|
37188
37313
|
useEffect as useEffect17,
|
|
37189
37314
|
useMemo as useMemo14,
|
|
37190
|
-
useRef as
|
|
37191
|
-
useState as
|
|
37315
|
+
useRef as useRef14,
|
|
37316
|
+
useState as useState21
|
|
37192
37317
|
} from "react";
|
|
37193
37318
|
init_util();
|
|
37194
37319
|
init_tableProcessing();
|
|
37195
|
-
import { Fragment as
|
|
37320
|
+
import { Fragment as Fragment7, jsx as jsx54, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
37196
37321
|
var QuillSecondaryButton = ({ children, ...props }) => {
|
|
37197
37322
|
const [theme] = useContext19(ThemeContext);
|
|
37198
37323
|
return /* @__PURE__ */ jsx54(
|
|
@@ -37597,7 +37722,7 @@ var QuillSortPopover = ({
|
|
|
37597
37722
|
setIsOpen,
|
|
37598
37723
|
disabled
|
|
37599
37724
|
}) => {
|
|
37600
|
-
return /* @__PURE__ */ jsxs40(
|
|
37725
|
+
return /* @__PURE__ */ jsxs40(Fragment7, { children: [
|
|
37601
37726
|
/* @__PURE__ */ jsx54(
|
|
37602
37727
|
QuillTag,
|
|
37603
37728
|
{
|
|
@@ -37630,7 +37755,7 @@ var QuillLimitPopover = ({
|
|
|
37630
37755
|
setIsOpen,
|
|
37631
37756
|
disabled = false
|
|
37632
37757
|
}) => {
|
|
37633
|
-
return /* @__PURE__ */ jsxs40(
|
|
37758
|
+
return /* @__PURE__ */ jsxs40(Fragment7, { children: [
|
|
37634
37759
|
/* @__PURE__ */ jsx54(
|
|
37635
37760
|
QuillTag,
|
|
37636
37761
|
{
|
|
@@ -37683,10 +37808,10 @@ var FilterPopoverWrapper = ({
|
|
|
37683
37808
|
}) => {
|
|
37684
37809
|
const { tenants } = useContext19(TenantContext);
|
|
37685
37810
|
const { eventTracking } = useContext19(EventTrackingContext);
|
|
37686
|
-
const [isOpen, setIsOpen] =
|
|
37687
|
-
const [uniqueValues, setUniqueValues] =
|
|
37688
|
-
const [uniqueValuesIsLoading, setUniqueValuesIsLoading] =
|
|
37689
|
-
const prevFiltersRef =
|
|
37811
|
+
const [isOpen, setIsOpen] = useState21(false);
|
|
37812
|
+
const [uniqueValues, setUniqueValues] = useState21(void 0);
|
|
37813
|
+
const [uniqueValuesIsLoading, setUniqueValuesIsLoading] = useState21(false);
|
|
37814
|
+
const prevFiltersRef = useRef14("");
|
|
37690
37815
|
const columnInternals = useMemo14(() => {
|
|
37691
37816
|
if (!tables) {
|
|
37692
37817
|
return null;
|
|
@@ -37771,11 +37896,11 @@ var FilterPopoverWrapper = ({
|
|
|
37771
37896
|
|
|
37772
37897
|
// src/components/ReportBuilder/FilterModal.tsx
|
|
37773
37898
|
init_Filter();
|
|
37774
|
-
import { useState as
|
|
37899
|
+
import { useState as useState22, useEffect as useEffect18, useMemo as useMemo15 } from "react";
|
|
37775
37900
|
init_textProcessing();
|
|
37776
37901
|
init_filterProcessing();
|
|
37777
37902
|
import { format as format8, isValid as isValid5, parse as parse4, startOfToday as startOfToday2 } from "date-fns";
|
|
37778
|
-
import { Fragment as
|
|
37903
|
+
import { Fragment as Fragment8, jsx as jsx55, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
37779
37904
|
function FilterModal({
|
|
37780
37905
|
schema,
|
|
37781
37906
|
tables,
|
|
@@ -37793,26 +37918,26 @@ function FilterModal({
|
|
|
37793
37918
|
MultiSelectComponent,
|
|
37794
37919
|
reportBuilderColumns
|
|
37795
37920
|
}) {
|
|
37796
|
-
const [field, setField] =
|
|
37797
|
-
const [fieldOptions, setFieldOptions] =
|
|
37798
|
-
const [fieldValues, setFieldValues] =
|
|
37799
|
-
const [type, setType] =
|
|
37800
|
-
const [value, setValue] =
|
|
37801
|
-
const [selectedOptions, setSelectedOptions] =
|
|
37802
|
-
const [operator, setOperator] =
|
|
37921
|
+
const [field, setField] = useState22("");
|
|
37922
|
+
const [fieldOptions, setFieldOptions] = useState22([]);
|
|
37923
|
+
const [fieldValues, setFieldValues] = useState22([]);
|
|
37924
|
+
const [type, setType] = useState22(null);
|
|
37925
|
+
const [value, setValue] = useState22(void 0);
|
|
37926
|
+
const [selectedOptions, setSelectedOptions] = useState22([]);
|
|
37927
|
+
const [operator, setOperator] = useState22(
|
|
37803
37928
|
void 0
|
|
37804
37929
|
);
|
|
37805
|
-
const [operatorOptions, setOperatorOptions] =
|
|
37806
|
-
const [unit, setUnit] =
|
|
37807
|
-
const [unitOptions, setUnitOptions] =
|
|
37808
|
-
const [startDate, setStartDate] =
|
|
37930
|
+
const [operatorOptions, setOperatorOptions] = useState22([]);
|
|
37931
|
+
const [unit, setUnit] = useState22("");
|
|
37932
|
+
const [unitOptions, setUnitOptions] = useState22([]);
|
|
37933
|
+
const [startDate, setStartDate] = useState22(
|
|
37809
37934
|
startOfToday2().toISOString().substring(0, 10)
|
|
37810
37935
|
);
|
|
37811
|
-
const [endDate, setEndDate] =
|
|
37936
|
+
const [endDate, setEndDate] = useState22(
|
|
37812
37937
|
startOfToday2().toISOString().substring(0, 10)
|
|
37813
37938
|
);
|
|
37814
|
-
const [filterInitialized, setFilterInitialized] =
|
|
37815
|
-
const [table, setTable] =
|
|
37939
|
+
const [filterInitialized, setFilterInitialized] = useState22(false);
|
|
37940
|
+
const [table, setTable] = useState22(void 0);
|
|
37816
37941
|
const memoizedFieldValuesMap = useMemo15(
|
|
37817
37942
|
() => fieldValuesMap,
|
|
37818
37943
|
[JSON.stringify(fieldValuesMap)]
|
|
@@ -38527,7 +38652,7 @@ function FilterModal({
|
|
|
38527
38652
|
}
|
|
38528
38653
|
) });
|
|
38529
38654
|
default:
|
|
38530
|
-
return /* @__PURE__ */ jsx55(
|
|
38655
|
+
return /* @__PURE__ */ jsx55(Fragment8, {});
|
|
38531
38656
|
}
|
|
38532
38657
|
})()
|
|
38533
38658
|
]
|
|
@@ -38573,7 +38698,7 @@ function FilterModal({
|
|
|
38573
38698
|
}
|
|
38574
38699
|
|
|
38575
38700
|
// src/components/Dashboard/TemplateMetricComponent.tsx
|
|
38576
|
-
import { useState as
|
|
38701
|
+
import { useState as useState23 } from "react";
|
|
38577
38702
|
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
38578
38703
|
function QuillTemplateMetricComponent({
|
|
38579
38704
|
report,
|
|
@@ -38581,7 +38706,7 @@ function QuillTemplateMetricComponent({
|
|
|
38581
38706
|
children,
|
|
38582
38707
|
isLoading
|
|
38583
38708
|
}) {
|
|
38584
|
-
const [isSelected, setIsSelected] =
|
|
38709
|
+
const [isSelected, setIsSelected] = useState23(false);
|
|
38585
38710
|
return /* @__PURE__ */ jsx56(
|
|
38586
38711
|
"div",
|
|
38587
38712
|
{
|
|
@@ -38610,7 +38735,7 @@ function QuillTemplateMetricComponent({
|
|
|
38610
38735
|
}
|
|
38611
38736
|
|
|
38612
38737
|
// src/components/Dashboard/TemplateTableComponent.tsx
|
|
38613
|
-
import { useState as
|
|
38738
|
+
import { useState as useState24 } from "react";
|
|
38614
38739
|
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
38615
38740
|
function QuillTemplateTableComponent({
|
|
38616
38741
|
report,
|
|
@@ -38621,7 +38746,7 @@ function QuillTemplateTableComponent({
|
|
|
38621
38746
|
onPageChange,
|
|
38622
38747
|
onSortChange
|
|
38623
38748
|
}) {
|
|
38624
|
-
const [isSelected, setIsSelected] =
|
|
38749
|
+
const [isSelected, setIsSelected] = useState24(false);
|
|
38625
38750
|
return /* @__PURE__ */ jsx57(
|
|
38626
38751
|
"div",
|
|
38627
38752
|
{
|
|
@@ -38749,7 +38874,7 @@ async function addTemplatesToDashboard(name2, newTemplates, client, dashboardDat
|
|
|
38749
38874
|
}
|
|
38750
38875
|
|
|
38751
38876
|
// src/Dashboard.tsx
|
|
38752
|
-
import { Fragment as
|
|
38877
|
+
import { Fragment as Fragment9, jsx as jsx58, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
38753
38878
|
var defaultChartContainerStyles = {
|
|
38754
38879
|
display: "flex",
|
|
38755
38880
|
width: "100%",
|
|
@@ -38836,8 +38961,8 @@ function Dashboard({
|
|
|
38836
38961
|
templateDashboardName,
|
|
38837
38962
|
pagination = { rowsPerPage: 10, rowsPerRequest: 50 }
|
|
38838
38963
|
}) {
|
|
38839
|
-
const [userFilters, setUserFilters] =
|
|
38840
|
-
const [selectedSection, setSelectedSection] =
|
|
38964
|
+
const [userFilters, setUserFilters] = useState25({});
|
|
38965
|
+
const [selectedSection, setSelectedSection] = useState25("");
|
|
38841
38966
|
const dataLoaderUserFilters = useMemo16(() => {
|
|
38842
38967
|
return (filters?.map((f) => convertCustomFilter(f)) ?? []).concat(
|
|
38843
38968
|
Object.values(userFilters)
|
|
@@ -38941,7 +39066,7 @@ function Dashboard({
|
|
|
38941
39066
|
});
|
|
38942
39067
|
return map;
|
|
38943
39068
|
}, [data?.sections, data?.sectionOrder]);
|
|
38944
|
-
const mounted =
|
|
39069
|
+
const mounted = useRef15(false);
|
|
38945
39070
|
useEffect19(() => {
|
|
38946
39071
|
if (!mounted.current) {
|
|
38947
39072
|
mounted.current = true;
|
|
@@ -38968,31 +39093,31 @@ function Dashboard({
|
|
|
38968
39093
|
const { dispatch: dashboardFiltersDispatch } = useContext20(
|
|
38969
39094
|
DashboardFiltersContext
|
|
38970
39095
|
);
|
|
38971
|
-
const [fieldValuesMap, setFieldValuesMap] =
|
|
38972
|
-
const [fieldValuesIsLoaded, setFieldValuesIsLoaded] =
|
|
38973
|
-
const [addFilterPopoverIsOpen, setAddFilterPopoverIsOpen] =
|
|
38974
|
-
const [filterListIsOpen, setFilterListIsOpen] =
|
|
39096
|
+
const [fieldValuesMap, setFieldValuesMap] = useState25({});
|
|
39097
|
+
const [fieldValuesIsLoaded, setFieldValuesIsLoaded] = useState25(false);
|
|
39098
|
+
const [addFilterPopoverIsOpen, setAddFilterPopoverIsOpen] = useState25(false);
|
|
39099
|
+
const [filterListIsOpen, setFilterListIsOpen] = useState25(false);
|
|
38975
39100
|
const [
|
|
38976
39101
|
filterListAddFilterPopoverIsOpen,
|
|
38977
39102
|
setFilterListAddFilterPopoverIsOpen
|
|
38978
|
-
] =
|
|
39103
|
+
] = useState25(false);
|
|
38979
39104
|
const presetOptions = useMemo16(() => {
|
|
38980
39105
|
return populatedDashboardFilters?.[0]?.filterType === "date_range" ? convertPresetOptionsToSelectableList(
|
|
38981
39106
|
populatedDashboardFilters[0].presetOptions ?? [],
|
|
38982
39107
|
populatedDashboardFilters[0].defaultPresetRanges ?? []
|
|
38983
39108
|
) : defaultOptionsV2;
|
|
38984
39109
|
}, [populatedDashboardFilters]);
|
|
38985
|
-
const [filterValues, setFilterValues] =
|
|
38986
|
-
const prevNameRef =
|
|
38987
|
-
const prevFlagsRef =
|
|
38988
|
-
const prevClientRef =
|
|
38989
|
-
const addFilterPopoverButtonRef =
|
|
38990
|
-
const viewFiltersPopoverButtonRef =
|
|
38991
|
-
const previousFilters =
|
|
39110
|
+
const [filterValues, setFilterValues] = useState25({});
|
|
39111
|
+
const prevNameRef = useRef15(name2);
|
|
39112
|
+
const prevFlagsRef = useRef15(flags);
|
|
39113
|
+
const prevClientRef = useRef15(client?.publicKey ?? "");
|
|
39114
|
+
const addFilterPopoverButtonRef = useRef15(null);
|
|
39115
|
+
const viewFiltersPopoverButtonRef = useRef15(null);
|
|
39116
|
+
const previousFilters = useRef15(filters);
|
|
38992
39117
|
if (!equal4(previousFilters.current, filters)) {
|
|
38993
39118
|
previousFilters.current = filters;
|
|
38994
39119
|
}
|
|
38995
|
-
const isInitialLoadOfDashboardRef =
|
|
39120
|
+
const isInitialLoadOfDashboardRef = useRef15(false);
|
|
38996
39121
|
const referencedTables = useMemo16(() => {
|
|
38997
39122
|
const sections = data?.sections || {};
|
|
38998
39123
|
const tables2 = Object.values(sections).flatMap(
|
|
@@ -39020,7 +39145,7 @@ function Dashboard({
|
|
|
39020
39145
|
prevFlagsRef.current = flags;
|
|
39021
39146
|
});
|
|
39022
39147
|
}, [name2, isClientLoading]);
|
|
39023
|
-
const tenantMounted =
|
|
39148
|
+
const tenantMounted = useRef15(false);
|
|
39024
39149
|
useEffect19(() => {
|
|
39025
39150
|
if (!tenantMounted.current) {
|
|
39026
39151
|
tenantMounted.current = true;
|
|
@@ -39562,7 +39687,7 @@ function Dashboard({
|
|
|
39562
39687
|
return /* @__PURE__ */ jsx58(
|
|
39563
39688
|
DashboardSectionContainerComponent,
|
|
39564
39689
|
{
|
|
39565
|
-
children: section === "" ? /* @__PURE__ */ jsxs42(
|
|
39690
|
+
children: section === "" ? /* @__PURE__ */ jsxs42(Fragment9, { children: [
|
|
39566
39691
|
(metrics[section]?.length ?? 0) > 0 && /* @__PURE__ */ jsx58(DashboardSectionComponent, { section, children: metrics[section]?.map((item) => {
|
|
39567
39692
|
return /* @__PURE__ */ jsx58(
|
|
39568
39693
|
DataLoader,
|
|
@@ -39704,7 +39829,7 @@ function Dashboard({
|
|
|
39704
39829
|
data: data2,
|
|
39705
39830
|
rowCount,
|
|
39706
39831
|
rowCountIsLoading
|
|
39707
|
-
}) => /* @__PURE__ */ jsx58(
|
|
39832
|
+
}) => /* @__PURE__ */ jsx58(Fragment9, { children: /* @__PURE__ */ jsx58(
|
|
39708
39833
|
TableComponent,
|
|
39709
39834
|
{
|
|
39710
39835
|
report: data2,
|
|
@@ -39920,10 +40045,10 @@ function QuillDashboardTemplate({
|
|
|
39920
40045
|
const { dashboardConfig, dashboardConfigDispatch } = useContext20(
|
|
39921
40046
|
DashboardConfigContext
|
|
39922
40047
|
);
|
|
39923
|
-
const [addItemModalIsOpen, setAddItemModalIsOpen] =
|
|
39924
|
-
const [selectedTemplates, setSelectedTemplates] =
|
|
39925
|
-
const [selectingTemplate, setSelectingTemplate] =
|
|
39926
|
-
const [submittingTemplate, setSubmittingTemplate] =
|
|
40048
|
+
const [addItemModalIsOpen, setAddItemModalIsOpen] = useState25(false);
|
|
40049
|
+
const [selectedTemplates, setSelectedTemplates] = useState25([]);
|
|
40050
|
+
const [selectingTemplate, setSelectingTemplate] = useState25(false);
|
|
40051
|
+
const [submittingTemplate, setSubmittingTemplate] = useState25(false);
|
|
39927
40052
|
const templateSections = data?.sections;
|
|
39928
40053
|
const onSubmitTemplates = async () => {
|
|
39929
40054
|
setSubmittingTemplate(true);
|
|
@@ -40070,7 +40195,7 @@ import {
|
|
|
40070
40195
|
useContext as useContext21,
|
|
40071
40196
|
useEffect as useEffect20,
|
|
40072
40197
|
useMemo as useMemo17,
|
|
40073
|
-
useState as
|
|
40198
|
+
useState as useState26
|
|
40074
40199
|
} from "react";
|
|
40075
40200
|
init_Filter();
|
|
40076
40201
|
init_paginationProcessing();
|
|
@@ -40088,7 +40213,7 @@ var Table = ({
|
|
|
40088
40213
|
const [schemaData] = useContext21(SchemaDataContext);
|
|
40089
40214
|
const { eventTracking } = useContext21(EventTrackingContext);
|
|
40090
40215
|
const { allReportsById } = useAllReports();
|
|
40091
|
-
const [loading, setLoading] =
|
|
40216
|
+
const [loading, setLoading] = useState26(false);
|
|
40092
40217
|
const report = useMemo17(() => {
|
|
40093
40218
|
return props.reportId ? allReportsById[props.reportId] : null;
|
|
40094
40219
|
}, [allReportsById[props.reportId ?? ""]]);
|
|
@@ -40175,7 +40300,7 @@ var Table = ({
|
|
|
40175
40300
|
clientLoading,
|
|
40176
40301
|
!reports[props.reportId ?? ""]
|
|
40177
40302
|
]);
|
|
40178
|
-
const [page, setPage] =
|
|
40303
|
+
const [page, setPage] = useState26(0);
|
|
40179
40304
|
if ("rows" in data && "columns" in data) {
|
|
40180
40305
|
return /* @__PURE__ */ jsx60(
|
|
40181
40306
|
QuillTable,
|
|
@@ -40236,10 +40361,10 @@ var Table_default = Table;
|
|
|
40236
40361
|
|
|
40237
40362
|
// src/SQLEditor.tsx
|
|
40238
40363
|
import {
|
|
40239
|
-
useState as
|
|
40364
|
+
useState as useState32,
|
|
40240
40365
|
useContext as useContext28,
|
|
40241
40366
|
useEffect as useEffect25,
|
|
40242
|
-
useRef as
|
|
40367
|
+
useRef as useRef20,
|
|
40243
40368
|
useMemo as useMemo22,
|
|
40244
40369
|
useCallback as useCallback4
|
|
40245
40370
|
} from "react";
|
|
@@ -40248,8 +40373,8 @@ import MonacoEditor from "@monaco-editor/react";
|
|
|
40248
40373
|
// src/ChartBuilder.tsx
|
|
40249
40374
|
import {
|
|
40250
40375
|
useEffect as useEffect23,
|
|
40251
|
-
useRef as
|
|
40252
|
-
useState as
|
|
40376
|
+
useRef as useRef19,
|
|
40377
|
+
useState as useState30,
|
|
40253
40378
|
useContext as useContext26,
|
|
40254
40379
|
useMemo as useMemo21,
|
|
40255
40380
|
useCallback as useCallback3
|
|
@@ -40276,9 +40401,9 @@ import {
|
|
|
40276
40401
|
useCallback as useCallback2,
|
|
40277
40402
|
useContext as useContext23,
|
|
40278
40403
|
useMemo as useMemo18,
|
|
40279
|
-
useState as
|
|
40404
|
+
useState as useState27,
|
|
40280
40405
|
useEffect as useEffect21,
|
|
40281
|
-
useRef as
|
|
40406
|
+
useRef as useRef16
|
|
40282
40407
|
} from "react";
|
|
40283
40408
|
|
|
40284
40409
|
// src/internals/ReportBuilder/PivotList.tsx
|
|
@@ -40743,44 +40868,44 @@ var PivotModal = ({
|
|
|
40743
40868
|
reportBuilderState
|
|
40744
40869
|
}) => {
|
|
40745
40870
|
const { getToken, quillFetchWithToken } = useContext23(FetchContext);
|
|
40746
|
-
const [isLoading, setIsLoading] =
|
|
40747
|
-
const [previewLoading, setPreviewLoading] =
|
|
40748
|
-
const [selectedPivotType, setSelectedPivotType] =
|
|
40749
|
-
const [errors, setErrors] =
|
|
40871
|
+
const [isLoading, setIsLoading] = useState27(false);
|
|
40872
|
+
const [previewLoading, setPreviewLoading] = useState27(false);
|
|
40873
|
+
const [selectedPivotType, setSelectedPivotType] = useState27("recommended");
|
|
40874
|
+
const [errors, setErrors] = useState27([]);
|
|
40750
40875
|
const [client] = useContext23(ClientContext);
|
|
40751
40876
|
const [schemaData] = useContext23(SchemaDataContext);
|
|
40752
40877
|
const { tenants } = useContext23(TenantContext);
|
|
40753
40878
|
const { eventTracking } = useContext23(EventTrackingContext);
|
|
40754
|
-
const rowFieldRef =
|
|
40755
|
-
const colFieldRef =
|
|
40756
|
-
const [pivotCardWidth, setPivotCardWidth] =
|
|
40757
|
-
const [samplePivotTable, setSamplePivotTable] =
|
|
40758
|
-
const [hasNoRecommendedPivots, sethasNoRecommendedPivots] =
|
|
40759
|
-
const [isFetchingPivots, setIsFetchingPivots] =
|
|
40760
|
-
const [allowedColumnFields, setAllowedColumnFields] =
|
|
40761
|
-
const [allowedRowFields, setAllowedRowFields] =
|
|
40762
|
-
const [allowedValueFields, setAllowedValueFields] =
|
|
40763
|
-
const [uniqueValues, setUniqueValues] =
|
|
40764
|
-
const buttonRef =
|
|
40765
|
-
const [dateRanges, setDateRanges] =
|
|
40766
|
-
const [pivotError, setPivotError] =
|
|
40767
|
-
const [limitInput, setLimitInput] =
|
|
40879
|
+
const rowFieldRef = useRef16(null);
|
|
40880
|
+
const colFieldRef = useRef16(null);
|
|
40881
|
+
const [pivotCardWidth, setPivotCardWidth] = useState27(420);
|
|
40882
|
+
const [samplePivotTable, setSamplePivotTable] = useState27(null);
|
|
40883
|
+
const [hasNoRecommendedPivots, sethasNoRecommendedPivots] = useState27(false);
|
|
40884
|
+
const [isFetchingPivots, setIsFetchingPivots] = useState27(false);
|
|
40885
|
+
const [allowedColumnFields, setAllowedColumnFields] = useState27([]);
|
|
40886
|
+
const [allowedRowFields, setAllowedRowFields] = useState27([]);
|
|
40887
|
+
const [allowedValueFields, setAllowedValueFields] = useState27([]);
|
|
40888
|
+
const [uniqueValues, setUniqueValues] = useState27(initialUniqueValues);
|
|
40889
|
+
const buttonRef = useRef16(null);
|
|
40890
|
+
const [dateRanges, setDateRanges] = useState27({});
|
|
40891
|
+
const [pivotError, setPivotError] = useState27("");
|
|
40892
|
+
const [limitInput, setLimitInput] = useState27(
|
|
40768
40893
|
pivotLimit?.toString() ?? "100"
|
|
40769
40894
|
);
|
|
40770
|
-
const [sortFieldInput, setSortFieldInput] =
|
|
40895
|
+
const [sortFieldInput, setSortFieldInput] = useState27(
|
|
40771
40896
|
pivotSort?.sortField ?? ""
|
|
40772
40897
|
);
|
|
40773
|
-
const [sortDirectionInput, setSortDirectionInput] =
|
|
40898
|
+
const [sortDirectionInput, setSortDirectionInput] = useState27(
|
|
40774
40899
|
pivotSort?.sortDirection ?? "ASC"
|
|
40775
40900
|
);
|
|
40776
|
-
const [showLimitInput, setShowLimitInput] =
|
|
40777
|
-
const [showSortInput, setShowSortInput] =
|
|
40778
|
-
const [availableHeight, setAvailableHeight] =
|
|
40779
|
-
const [pivotModalTopHeight, setPivotModalTopHeight] =
|
|
40780
|
-
const [popoverPosition, setPopoverPosition] =
|
|
40901
|
+
const [showLimitInput, setShowLimitInput] = useState27(!!pivotLimit);
|
|
40902
|
+
const [showSortInput, setShowSortInput] = useState27(!!pivotSort);
|
|
40903
|
+
const [availableHeight, setAvailableHeight] = useState27(0);
|
|
40904
|
+
const [pivotModalTopHeight, setPivotModalTopHeight] = useState27(450);
|
|
40905
|
+
const [popoverPosition, setPopoverPosition] = useState27(
|
|
40781
40906
|
"bottom"
|
|
40782
40907
|
);
|
|
40783
|
-
const popoverRef =
|
|
40908
|
+
const popoverRef = useRef16(null);
|
|
40784
40909
|
const getDistinctValues = async (fetchDistinct) => {
|
|
40785
40910
|
if (!client) {
|
|
40786
40911
|
return {
|
|
@@ -41065,7 +41190,7 @@ var PivotModal = ({
|
|
|
41065
41190
|
return map;
|
|
41066
41191
|
}, {});
|
|
41067
41192
|
}, [columns]);
|
|
41068
|
-
const [selectedPivotTable, setSelectedPivotTable] =
|
|
41193
|
+
const [selectedPivotTable, setSelectedPivotTable] = useState27(null);
|
|
41069
41194
|
useEffect21(() => {
|
|
41070
41195
|
const fetchPivotTables = async () => {
|
|
41071
41196
|
if (selectedPivotIndex === -1) {
|
|
@@ -41118,7 +41243,7 @@ var PivotModal = ({
|
|
|
41118
41243
|
};
|
|
41119
41244
|
fetchPivotTables();
|
|
41120
41245
|
}, [selectedPivotIndex, data, dateRange, createdPivots]);
|
|
41121
|
-
const previousUniqueValuesRef =
|
|
41246
|
+
const previousUniqueValuesRef = useRef16();
|
|
41122
41247
|
useEffect21(() => {
|
|
41123
41248
|
if (!uniqueValuesIsLoading && !equal5(uniqueValues, previousUniqueValuesRef.current)) {
|
|
41124
41249
|
previousUniqueValuesRef.current = uniqueValues;
|
|
@@ -41594,10 +41719,10 @@ var PivotModal = ({
|
|
|
41594
41719
|
}
|
|
41595
41720
|
}, 500);
|
|
41596
41721
|
};
|
|
41597
|
-
const [recommendedPivotTables, setRecommendedPivotTables] =
|
|
41722
|
+
const [recommendedPivotTables, setRecommendedPivotTables] = useState27(
|
|
41598
41723
|
[]
|
|
41599
41724
|
);
|
|
41600
|
-
const [createdPivotTables, setCreatedPivotTables] =
|
|
41725
|
+
const [createdPivotTables, setCreatedPivotTables] = useState27([]);
|
|
41601
41726
|
useEffect21(() => {
|
|
41602
41727
|
const fetchPivotTables = async () => {
|
|
41603
41728
|
const pts = await Promise.all(
|
|
@@ -42497,18 +42622,18 @@ var validateReport = (formData, dashboardData, defaultDateFilter, allTables) =>
|
|
|
42497
42622
|
|
|
42498
42623
|
// src/components/Chart/InternalChart.tsx
|
|
42499
42624
|
import {
|
|
42500
|
-
useState as
|
|
42625
|
+
useState as useState28,
|
|
42501
42626
|
useEffect as useEffect22,
|
|
42502
42627
|
useContext as useContext24,
|
|
42503
42628
|
useMemo as useMemo19,
|
|
42504
|
-
useRef as
|
|
42505
|
-
useLayoutEffect as
|
|
42629
|
+
useRef as useRef17,
|
|
42630
|
+
useLayoutEffect as useLayoutEffect3
|
|
42506
42631
|
} from "react";
|
|
42507
42632
|
import { differenceInHours as differenceInHours2 } from "date-fns";
|
|
42508
42633
|
init_Filter();
|
|
42509
42634
|
init_filterProcessing();
|
|
42510
42635
|
init_dateRangePickerUtils();
|
|
42511
|
-
import { Fragment as
|
|
42636
|
+
import { Fragment as Fragment10, jsx as jsx64, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
42512
42637
|
var MULTISELECT_REQUEST_DEBOUNCE_MS = 1e3;
|
|
42513
42638
|
var TogglePrimitive = ({
|
|
42514
42639
|
value,
|
|
@@ -42622,8 +42747,8 @@ function InternalChart({
|
|
|
42622
42747
|
const { reportFilters } = useContext24(ReportFiltersContext);
|
|
42623
42748
|
const { dashboardConfig } = useContext24(DashboardConfigContext);
|
|
42624
42749
|
const { eventTracking } = useContext24(EventTrackingContext);
|
|
42625
|
-
const [filtersPopoverOpen, setFiltersPopoverOpen] =
|
|
42626
|
-
const filtersButtonRef =
|
|
42750
|
+
const [filtersPopoverOpen, setFiltersPopoverOpen] = useState28(false);
|
|
42751
|
+
const filtersButtonRef = useRef17(null);
|
|
42627
42752
|
const currentReportFilters = useMemo19(() => {
|
|
42628
42753
|
const dashFilters = dashboardConfig[report?.dashboardName ?? ""]?.config.filters;
|
|
42629
42754
|
if (!dashFilters)
|
|
@@ -42651,10 +42776,10 @@ function InternalChart({
|
|
|
42651
42776
|
reportDateFilter.defaultPresetRanges ?? []
|
|
42652
42777
|
) : defaultOptionsV2;
|
|
42653
42778
|
}, [reportDateFilter]);
|
|
42654
|
-
const [filterValues, setFilterValues] =
|
|
42655
|
-
const multiselectDebounceRef =
|
|
42656
|
-
const latestMultiselectValueRef =
|
|
42657
|
-
const [lockedFilters, setLockedFilters] =
|
|
42779
|
+
const [filterValues, setFilterValues] = useState28({});
|
|
42780
|
+
const multiselectDebounceRef = useRef17({});
|
|
42781
|
+
const latestMultiselectValueRef = useRef17({});
|
|
42782
|
+
const [lockedFilters, setLockedFilters] = useState28(
|
|
42658
42783
|
{}
|
|
42659
42784
|
);
|
|
42660
42785
|
useEffect22(() => {
|
|
@@ -42814,9 +42939,9 @@ function InternalChart({
|
|
|
42814
42939
|
}
|
|
42815
42940
|
onDashboardFilterChange(filter.label, filterValue);
|
|
42816
42941
|
};
|
|
42817
|
-
const [filtersExpanded, setFiltersExpanded] =
|
|
42818
|
-
const filtersContainerRef =
|
|
42819
|
-
const [visibleFilters, setVisibleFilters] =
|
|
42942
|
+
const [filtersExpanded, setFiltersExpanded] = useState28(false);
|
|
42943
|
+
const filtersContainerRef = useRef17(null);
|
|
42944
|
+
const [visibleFilters, setVisibleFilters] = useState28([]);
|
|
42820
42945
|
const filtersOverflowing = useMemo19(() => {
|
|
42821
42946
|
return visibleFilters.some((visible) => visible);
|
|
42822
42947
|
}, [visibleFilters]);
|
|
@@ -42832,7 +42957,7 @@ function InternalChart({
|
|
|
42832
42957
|
});
|
|
42833
42958
|
setVisibleFilters(newVisibleItems);
|
|
42834
42959
|
};
|
|
42835
|
-
|
|
42960
|
+
useLayoutEffect3(() => {
|
|
42836
42961
|
requestAnimationFrame(() => measureItems());
|
|
42837
42962
|
const handleResize = () => {
|
|
42838
42963
|
measureItems();
|
|
@@ -43008,7 +43133,7 @@ function InternalChart({
|
|
|
43008
43133
|
)
|
|
43009
43134
|
}
|
|
43010
43135
|
),
|
|
43011
|
-
loading && (!report || report.chartType !== "table") || !report ? /* @__PURE__ */ jsx64(LoadingComponent, {}) : /* @__PURE__ */ jsxs46(
|
|
43136
|
+
loading && (!report || report.chartType !== "table") || !report ? /* @__PURE__ */ jsx64(LoadingComponent, {}) : /* @__PURE__ */ jsxs46(Fragment10, { children: [
|
|
43012
43137
|
"metric" === report.chartType && /* @__PURE__ */ jsx64(
|
|
43013
43138
|
"div",
|
|
43014
43139
|
{
|
|
@@ -43081,10 +43206,10 @@ init_dates();
|
|
|
43081
43206
|
import React13, {
|
|
43082
43207
|
useContext as useContext25,
|
|
43083
43208
|
useMemo as useMemo20,
|
|
43084
|
-
useRef as
|
|
43085
|
-
useState as
|
|
43209
|
+
useRef as useRef18,
|
|
43210
|
+
useState as useState29
|
|
43086
43211
|
} from "react";
|
|
43087
|
-
import { Fragment as
|
|
43212
|
+
import { Fragment as Fragment11, jsx as jsx65, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
43088
43213
|
function QuillMultiSelectSectionList({
|
|
43089
43214
|
options,
|
|
43090
43215
|
width,
|
|
@@ -43100,10 +43225,10 @@ function QuillMultiSelectSectionList({
|
|
|
43100
43225
|
owner
|
|
43101
43226
|
}) {
|
|
43102
43227
|
const [theme] = useContext25(ThemeContext);
|
|
43103
|
-
const [showModal, setShowModal] =
|
|
43104
|
-
const modalRef =
|
|
43105
|
-
const buttonRef =
|
|
43106
|
-
const debounceTimeoutId =
|
|
43228
|
+
const [showModal, setShowModal] = useState29(false);
|
|
43229
|
+
const modalRef = useRef18(null);
|
|
43230
|
+
const buttonRef = useRef18(null);
|
|
43231
|
+
const debounceTimeoutId = useRef18(null);
|
|
43107
43232
|
const [searchQuery, setSearchQuery] = React13.useState("");
|
|
43108
43233
|
useOnClickOutside_default(
|
|
43109
43234
|
modalRef,
|
|
@@ -43297,7 +43422,7 @@ function QuillMultiSelectSectionList({
|
|
|
43297
43422
|
},
|
|
43298
43423
|
ref: modalRef,
|
|
43299
43424
|
children: [
|
|
43300
|
-
options && optionsLength > 20 && /* @__PURE__ */ jsxs47(
|
|
43425
|
+
options && optionsLength > 20 && /* @__PURE__ */ jsxs47(Fragment11, { children: [
|
|
43301
43426
|
/* @__PURE__ */ jsx65(
|
|
43302
43427
|
ListboxTextInput2,
|
|
43303
43428
|
{
|
|
@@ -43610,7 +43735,7 @@ init_constants();
|
|
|
43610
43735
|
init_pivotConstructor();
|
|
43611
43736
|
var import_pluralize = __toESM(require_pluralize(), 1);
|
|
43612
43737
|
init_pivotProcessing();
|
|
43613
|
-
import { Fragment as
|
|
43738
|
+
import { Fragment as Fragment12, jsx as jsx66, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
43614
43739
|
var CHART_TYPES = [
|
|
43615
43740
|
"column",
|
|
43616
43741
|
"stacked",
|
|
@@ -43885,15 +44010,15 @@ function createReportFromForm(formData, report, eventTracking, selectedPivotTabl
|
|
|
43885
44010
|
return newReport;
|
|
43886
44011
|
}
|
|
43887
44012
|
function ChartBuilderWithModal(props) {
|
|
43888
|
-
const parentRef =
|
|
43889
|
-
const [modalWidth, setModalWidth] =
|
|
43890
|
-
const [modalHeight, setModalHeight] =
|
|
44013
|
+
const parentRef = useRef19(null);
|
|
44014
|
+
const [modalWidth, setModalWidth] = useState30(200);
|
|
44015
|
+
const [modalHeight, setModalHeight] = useState30(200);
|
|
43891
44016
|
const { isOpen, setIsOpen, title, isHorizontalView } = props;
|
|
43892
44017
|
const Modal = props.ModalComponent ?? MemoizedModal;
|
|
43893
44018
|
const { dashboardReports: dashboard } = useDashboardReports(
|
|
43894
44019
|
props.destinationDashboard
|
|
43895
44020
|
);
|
|
43896
|
-
const [filtersEnabledState, setFiltersEnabledState] =
|
|
44021
|
+
const [filtersEnabledState, setFiltersEnabledState] = useState30(
|
|
43897
44022
|
!!props.reportId
|
|
43898
44023
|
);
|
|
43899
44024
|
useEffect23(() => {
|
|
@@ -44031,13 +44156,13 @@ function ChartBuilder({
|
|
|
44031
44156
|
}
|
|
44032
44157
|
return map;
|
|
44033
44158
|
}, [report]);
|
|
44034
|
-
const [windowWidth, setWindowWidth] =
|
|
44035
|
-
const [rows, setRows] =
|
|
44036
|
-
const [itemQuery, setItemQuery] =
|
|
44037
|
-
const [rowCount, setRowCount] =
|
|
44038
|
-
const [maxPage, setMaxPage] =
|
|
44159
|
+
const [windowWidth, setWindowWidth] = useState30(1200);
|
|
44160
|
+
const [rows, setRows] = useState30(() => report?.rows ?? []);
|
|
44161
|
+
const [itemQuery, setItemQuery] = useState30(report?.itemQuery);
|
|
44162
|
+
const [rowCount, setRowCount] = useState30(report?.rowCount ?? 0);
|
|
44163
|
+
const [maxPage, setMaxPage] = useState30(0);
|
|
44039
44164
|
const thisReportLoadingState = reportId ? reportsLoadingState[reportId] : void 0;
|
|
44040
|
-
const [isLoading, setIsLoading] =
|
|
44165
|
+
const [isLoading, setIsLoading] = useState30(() => {
|
|
44041
44166
|
if (reportId) {
|
|
44042
44167
|
if (report?.rows && report.rows.length > 0) return false;
|
|
44043
44168
|
if (report?.pivotRows && report.pivotRows.length > 0) return false;
|
|
@@ -44047,13 +44172,13 @@ function ChartBuilder({
|
|
|
44047
44172
|
}
|
|
44048
44173
|
return false;
|
|
44049
44174
|
});
|
|
44050
|
-
const [rowCountIsLoading, setRowCountIsLoading] =
|
|
44051
|
-
const [isSubmitting, setIsSubmitting] =
|
|
44175
|
+
const [rowCountIsLoading, setRowCountIsLoading] = useState30(false);
|
|
44176
|
+
const [isSubmitting, setIsSubmitting] = useState30(false);
|
|
44052
44177
|
const MIN_FORM_WIDTH = 700;
|
|
44053
|
-
const [pivotCardWidth, setPivotCardWidth] =
|
|
44054
|
-
const [formWidth, setFormWidth] =
|
|
44055
|
-
const inputRef =
|
|
44056
|
-
const selectRef =
|
|
44178
|
+
const [pivotCardWidth, setPivotCardWidth] = useState30(MIN_FORM_WIDTH);
|
|
44179
|
+
const [formWidth, setFormWidth] = useState30(MIN_FORM_WIDTH);
|
|
44180
|
+
const inputRef = useRef19(null);
|
|
44181
|
+
const selectRef = useRef19(null);
|
|
44057
44182
|
const processColumns = (columns2) => {
|
|
44058
44183
|
if (schemaData.schemaWithCustomFields) {
|
|
44059
44184
|
const newProcessedColumns = columns2?.map((col) => {
|
|
@@ -44108,12 +44233,12 @@ function ChartBuilder({
|
|
|
44108
44233
|
}
|
|
44109
44234
|
return columns2;
|
|
44110
44235
|
};
|
|
44111
|
-
const [columns, setColumns] =
|
|
44236
|
+
const [columns, setColumns] = useState30(
|
|
44112
44237
|
processColumns(report?.columnInternal ?? [])
|
|
44113
44238
|
);
|
|
44114
|
-
const [currentPage, setCurrentPage] =
|
|
44115
|
-
const parentRef =
|
|
44116
|
-
const deleteRef =
|
|
44239
|
+
const [currentPage, setCurrentPage] = useState30(0);
|
|
44240
|
+
const parentRef = useRef19(null);
|
|
44241
|
+
const deleteRef = useRef19(null);
|
|
44117
44242
|
const modalPadding = 20;
|
|
44118
44243
|
const deleteButtonMargin = -12;
|
|
44119
44244
|
const { dashboardFilters } = useContext26(DashboardFiltersContext);
|
|
@@ -44158,7 +44283,7 @@ function ChartBuilder({
|
|
|
44158
44283
|
window.removeEventListener("resize", handleResize);
|
|
44159
44284
|
};
|
|
44160
44285
|
}, [isOpen]);
|
|
44161
|
-
const [dashboardOptions, setDashboardOptions] =
|
|
44286
|
+
const [dashboardOptions, setDashboardOptions] = useState30([]);
|
|
44162
44287
|
const {
|
|
44163
44288
|
reportFilters,
|
|
44164
44289
|
loadFiltersForReport,
|
|
@@ -44166,8 +44291,8 @@ function ChartBuilder({
|
|
|
44166
44291
|
abortLoadingFilters
|
|
44167
44292
|
} = useContext26(ReportFiltersContext);
|
|
44168
44293
|
const { reportsDispatch } = useContext26(ReportsContext);
|
|
44169
|
-
const initialFilters =
|
|
44170
|
-
const [reportFiltersLoaded, setReportFiltersLoaded] =
|
|
44294
|
+
const initialFilters = useRef19(reportFilters[report?.id ?? TEMP_REPORT_ID]);
|
|
44295
|
+
const [reportFiltersLoaded, setReportFiltersLoaded] = useState30(!filtersEnabled);
|
|
44171
44296
|
const hasExistingData = useMemo21(() => {
|
|
44172
44297
|
return report?.rows && report.rows.length > 0 || report?.pivotRows && report.pivotRows.length > 0;
|
|
44173
44298
|
}, [report?.rows, report?.pivotRows]);
|
|
@@ -44204,20 +44329,20 @@ function ChartBuilder({
|
|
|
44204
44329
|
(f) => f.filter
|
|
44205
44330
|
);
|
|
44206
44331
|
}, [reportFilters, report?.id]);
|
|
44207
|
-
const [showFilterModal, setShowFilterModal] =
|
|
44208
|
-
const [filterIssues, setFilterIssues] =
|
|
44209
|
-
const [showPivotPopover, setShowPivotPopover] =
|
|
44210
|
-
const [isEdittingPivot, setIsEdittingPivot] =
|
|
44211
|
-
const [selectedPivotIndex, setSelectedPivotIndex] =
|
|
44212
|
-
const [tableName, setTableName] =
|
|
44213
|
-
const [includeCustomFields, setIncludeCustomFields] =
|
|
44332
|
+
const [showFilterModal, setShowFilterModal] = useState30(false);
|
|
44333
|
+
const [filterIssues, setFilterIssues] = useState30([]);
|
|
44334
|
+
const [showPivotPopover, setShowPivotPopover] = useState30(false);
|
|
44335
|
+
const [isEdittingPivot, setIsEdittingPivot] = useState30(false);
|
|
44336
|
+
const [selectedPivotIndex, setSelectedPivotIndex] = useState30(-1);
|
|
44337
|
+
const [tableName, setTableName] = useState30(void 0);
|
|
44338
|
+
const [includeCustomFields, setIncludeCustomFields] = useState30(
|
|
44214
44339
|
report ? !!report.includeCustomFields : !!client?.featureFlags?.customFieldsEnabled
|
|
44215
44340
|
);
|
|
44216
44341
|
const selectedTable = schemaData.schema?.find(
|
|
44217
44342
|
(t) => t.displayName === tableName
|
|
44218
44343
|
);
|
|
44219
|
-
const [pivotPopUpTitle, setPivotPopUpTitle] =
|
|
44220
|
-
const [pivotError, setPivotError] =
|
|
44344
|
+
const [pivotPopUpTitle, setPivotPopUpTitle] = useState30("Add pivot");
|
|
44345
|
+
const [pivotError, setPivotError] = useState30(void 0);
|
|
44221
44346
|
const pivotData = report?.pivotRows && report?.pivotColumns ? {
|
|
44222
44347
|
rows: report.pivotRows,
|
|
44223
44348
|
columns: report.pivotColumns,
|
|
@@ -44227,19 +44352,19 @@ function ChartBuilder({
|
|
|
44227
44352
|
} : void 0;
|
|
44228
44353
|
const destinationDashboardName = report?.dashboardName || destinationDashboard;
|
|
44229
44354
|
const query = report?.queryString;
|
|
44230
|
-
const [loadingFormData, setLoadingFormData] =
|
|
44231
|
-
const [triggeredEditChart, setTriggeredEditChart] =
|
|
44232
|
-
const [createdPivots, setCreatedPivots] =
|
|
44355
|
+
const [loadingFormData, setLoadingFormData] = useState30(false);
|
|
44356
|
+
const [triggeredEditChart, setTriggeredEditChart] = useState30(false);
|
|
44357
|
+
const [createdPivots, setCreatedPivots] = useState30(
|
|
44233
44358
|
report?.pivot ? [report.pivot] : cp
|
|
44234
44359
|
);
|
|
44235
|
-
const [recommendedPivots, setRecommendedPivots] =
|
|
44236
|
-
const [pivotRowField, setPivotRowField] =
|
|
44360
|
+
const [recommendedPivots, setRecommendedPivots] = useState30(rp);
|
|
44361
|
+
const [pivotRowField, setPivotRowField] = useState30(
|
|
44237
44362
|
report?.pivot?.rowField
|
|
44238
44363
|
);
|
|
44239
|
-
const [pivotColumnField, setPivotColumnField] =
|
|
44364
|
+
const [pivotColumnField, setPivotColumnField] = useState30(
|
|
44240
44365
|
report?.pivot?.columnField
|
|
44241
44366
|
);
|
|
44242
|
-
const [pivotAggregations, setPivotAggregations] =
|
|
44367
|
+
const [pivotAggregations, setPivotAggregations] = useState30(
|
|
44243
44368
|
report?.pivot?.aggregations ?? [
|
|
44244
44369
|
{
|
|
44245
44370
|
valueField: report?.pivot?.valueField,
|
|
@@ -44248,10 +44373,10 @@ function ChartBuilder({
|
|
|
44248
44373
|
}
|
|
44249
44374
|
]
|
|
44250
44375
|
);
|
|
44251
|
-
const [pivotLimit, setPivotLimit] =
|
|
44376
|
+
const [pivotLimit, setPivotLimit] = useState30(
|
|
44252
44377
|
report?.pivot?.rowLimit
|
|
44253
44378
|
);
|
|
44254
|
-
const [pivotSort, setPivotSort] =
|
|
44379
|
+
const [pivotSort, setPivotSort] = useState30(
|
|
44255
44380
|
report?.pivot?.sort && report?.pivot?.sortDirection && report?.pivot?.sortField ? {
|
|
44256
44381
|
sortField: report.pivot.sortField,
|
|
44257
44382
|
sortDirection: report.pivot.sortDirection
|
|
@@ -44264,18 +44389,18 @@ function ChartBuilder({
|
|
|
44264
44389
|
rowsPerRequest: report?.chartType === "table" ? 50 : 500
|
|
44265
44390
|
}
|
|
44266
44391
|
};
|
|
44267
|
-
const [currentProcessing, setCurrentProcessing] =
|
|
44268
|
-
const [customTenantAccess, setCustomTenantAccess] =
|
|
44392
|
+
const [currentProcessing, setCurrentProcessing] = useState30(baseProcessing);
|
|
44393
|
+
const [customTenantAccess, setCustomTenantAccess] = useState30(() => {
|
|
44269
44394
|
const value = report?.flags === null ? false : !!Object.values(report?.flags ?? {}).length;
|
|
44270
44395
|
return value;
|
|
44271
44396
|
});
|
|
44272
|
-
const [dateFieldOptions, setDateFieldOptions] =
|
|
44273
|
-
const [allTables, setAllTables] =
|
|
44274
|
-
const [customFieldTableRef, setCustomFieldTableRef] =
|
|
44275
|
-
const [referencedColumns, setReferencedColumns] =
|
|
44276
|
-
const [referencedColumnsWithoutStar, setReferencedColumnsWithoutStar] =
|
|
44277
|
-
const [referencedTablesLoaded, setReferencedTablesLoaded] =
|
|
44278
|
-
const [filterMap, setFilterMap] =
|
|
44397
|
+
const [dateFieldOptions, setDateFieldOptions] = useState30([]);
|
|
44398
|
+
const [allTables, setAllTables] = useState30([]);
|
|
44399
|
+
const [customFieldTableRef, setCustomFieldTableRef] = useState30(false);
|
|
44400
|
+
const [referencedColumns, setReferencedColumns] = useState30({});
|
|
44401
|
+
const [referencedColumnsWithoutStar, setReferencedColumnsWithoutStar] = useState30({});
|
|
44402
|
+
const [referencedTablesLoaded, setReferencedTablesLoaded] = useState30(false);
|
|
44403
|
+
const [filterMap, setFilterMap] = useState30(report?.filterMap ?? {});
|
|
44279
44404
|
const canonicalFilterMap = useMemo21(() => {
|
|
44280
44405
|
return Object.fromEntries(
|
|
44281
44406
|
Object.entries(filterMap).filter(
|
|
@@ -44302,7 +44427,7 @@ function ChartBuilder({
|
|
|
44302
44427
|
{}
|
|
44303
44428
|
);
|
|
44304
44429
|
}, [specificDashboardFilters, filterMap, allTables, referencedTablesLoaded]);
|
|
44305
|
-
const [formFlags, setFormFlags] =
|
|
44430
|
+
const [formFlags, setFormFlags] = useState30(
|
|
44306
44431
|
report?.flags ? Object.fromEntries(
|
|
44307
44432
|
Object.entries(report.flags).map(([key, value]) => {
|
|
44308
44433
|
if (value === ALL_TENANTS) {
|
|
@@ -44319,7 +44444,7 @@ function ChartBuilder({
|
|
|
44319
44444
|
})
|
|
44320
44445
|
) : void 0
|
|
44321
44446
|
);
|
|
44322
|
-
const [defaultDateField, setDefaultDateField] =
|
|
44447
|
+
const [defaultDateField, setDefaultDateField] = useState30({
|
|
44323
44448
|
table: dateFieldOptions[0]?.name || "",
|
|
44324
44449
|
field: dateFieldOptions[0]?.columns[0]?.field || ""
|
|
44325
44450
|
});
|
|
@@ -44343,6 +44468,7 @@ function ChartBuilder({
|
|
|
44343
44468
|
],
|
|
44344
44469
|
xAxisLabel: "",
|
|
44345
44470
|
chartType: firstNumberColumn ? "line" : "table",
|
|
44471
|
+
showLegend: report?.showLegend ?? false,
|
|
44346
44472
|
pivot: null,
|
|
44347
44473
|
dateField: defaultDateField,
|
|
44348
44474
|
template: true,
|
|
@@ -44458,7 +44584,7 @@ function ChartBuilder({
|
|
|
44458
44584
|
};
|
|
44459
44585
|
}
|
|
44460
44586
|
};
|
|
44461
|
-
const initializedRef =
|
|
44587
|
+
const initializedRef = useRef19(false);
|
|
44462
44588
|
const getCurrentSection = () => {
|
|
44463
44589
|
let id2 = report?.id ?? "";
|
|
44464
44590
|
if (id2 === "" || id2 === TEMP_REPORT_ID) {
|
|
@@ -44505,7 +44631,7 @@ function ChartBuilder({
|
|
|
44505
44631
|
}
|
|
44506
44632
|
return chartBuilderData;
|
|
44507
44633
|
};
|
|
44508
|
-
const [formData, setFormData] =
|
|
44634
|
+
const [formData, setFormData] = useState30(
|
|
44509
44635
|
formFormDataFromReport(report, destinationSection ?? getCurrentSection())
|
|
44510
44636
|
);
|
|
44511
44637
|
const reportCustomFields = useMemo21(() => {
|
|
@@ -44559,7 +44685,7 @@ function ChartBuilder({
|
|
|
44559
44685
|
const columnsObservedInRows = rows[0] ? Object.keys(rows[0]) : [];
|
|
44560
44686
|
return columns.filter((col) => !columnsObservedInRows.includes(col.field));
|
|
44561
44687
|
}, [rows]);
|
|
44562
|
-
const [chartTypes, setChartTypes] =
|
|
44688
|
+
const [chartTypes, setChartTypes] = useState30(
|
|
44563
44689
|
(() => {
|
|
44564
44690
|
const data = formFormDataFromReport(
|
|
44565
44691
|
report,
|
|
@@ -44787,7 +44913,7 @@ function ChartBuilder({
|
|
|
44787
44913
|
}));
|
|
44788
44914
|
}
|
|
44789
44915
|
}, [report?.triggerReload, report?.columns, formData.columns.length]);
|
|
44790
|
-
const ranMountQuery =
|
|
44916
|
+
const ranMountQuery = useRef19(false);
|
|
44791
44917
|
useEffect23(() => {
|
|
44792
44918
|
if (runQueryOnMount && reportFiltersLoaded && filtersEnabled && !ranMountQuery.current) {
|
|
44793
44919
|
ranMountQuery.current = true;
|
|
@@ -44813,7 +44939,7 @@ function ChartBuilder({
|
|
|
44813
44939
|
{}
|
|
44814
44940
|
) ?? {};
|
|
44815
44941
|
}, [client?.allTenantTypes]);
|
|
44816
|
-
const [selectedPivotTable, setSelectedPivotTable] =
|
|
44942
|
+
const [selectedPivotTable, setSelectedPivotTable] = useState30(pivotData);
|
|
44817
44943
|
const getDefaultXAxisFormat = useCallback3(
|
|
44818
44944
|
(form) => {
|
|
44819
44945
|
if (form.pivot?.rowField) {
|
|
@@ -45021,7 +45147,7 @@ function ChartBuilder({
|
|
|
45021
45147
|
return handleRunQuery(baseProcessing, updatedFilters);
|
|
45022
45148
|
});
|
|
45023
45149
|
};
|
|
45024
|
-
const filtersEnabledRef =
|
|
45150
|
+
const filtersEnabledRef = useRef19(filtersEnabled);
|
|
45025
45151
|
useEffect23(() => {
|
|
45026
45152
|
if (filtersEnabledRef.current !== filtersEnabled) {
|
|
45027
45153
|
filtersEnabledRef.current = filtersEnabled;
|
|
@@ -45966,7 +46092,7 @@ function ChartBuilder({
|
|
|
45966
46092
|
width: 200
|
|
45967
46093
|
}
|
|
45968
46094
|
) }),
|
|
45969
|
-
hideChartType ? /* @__PURE__ */ jsx66("div", { style: { width: 200 } }) : /* @__PURE__ */ jsxs48(
|
|
46095
|
+
hideChartType ? /* @__PURE__ */ jsx66("div", { style: { width: 200 } }) : /* @__PURE__ */ jsxs48(Fragment12, { children: [
|
|
45970
46096
|
/* @__PURE__ */ jsx66(
|
|
45971
46097
|
"div",
|
|
45972
46098
|
{
|
|
@@ -46308,6 +46434,19 @@ function ChartBuilder({
|
|
|
46308
46434
|
) })
|
|
46309
46435
|
] })
|
|
46310
46436
|
] }),
|
|
46437
|
+
["line", "column", "stacked", "pie"].includes(
|
|
46438
|
+
(chartData.chartType ?? "").toLowerCase()
|
|
46439
|
+
) && /* @__PURE__ */ jsxs48("div", { children: [
|
|
46440
|
+
/* @__PURE__ */ jsx66(SubHeaderComponent, { label: "Legend" }),
|
|
46441
|
+
/* @__PURE__ */ jsx66(ChartBuilderInputRowContainer, { children: /* @__PURE__ */ jsx66(
|
|
46442
|
+
CheckboxComponent,
|
|
46443
|
+
{
|
|
46444
|
+
isChecked: !!formData.showLegend,
|
|
46445
|
+
label: "Show legend",
|
|
46446
|
+
onChange: () => handleChange(!formData.showLegend, "showLegend")
|
|
46447
|
+
}
|
|
46448
|
+
) })
|
|
46449
|
+
] }),
|
|
46311
46450
|
client?.featureFlags?.["referenceLines"] && (chartData.chartType === "line" || chartData.chartType === "column") && /* @__PURE__ */ jsxs48("div", { children: [
|
|
46312
46451
|
/* @__PURE__ */ jsx66(SubHeaderComponent, { label: "Reference Lines" }),
|
|
46313
46452
|
/* @__PURE__ */ jsxs48(ChartBuilderInputColumnContainer, { children: [
|
|
@@ -46343,7 +46482,7 @@ function ChartBuilder({
|
|
|
46343
46482
|
)
|
|
46344
46483
|
}
|
|
46345
46484
|
),
|
|
46346
|
-
refLine.label === REFERENCE_LINE && /* @__PURE__ */ jsxs48(
|
|
46485
|
+
refLine.label === REFERENCE_LINE && /* @__PURE__ */ jsxs48(Fragment12, { children: [
|
|
46347
46486
|
/* @__PURE__ */ jsx66(
|
|
46348
46487
|
TextInputComponent,
|
|
46349
46488
|
{
|
|
@@ -47040,7 +47179,7 @@ function ChartBuilder({
|
|
|
47040
47179
|
label: "Delete"
|
|
47041
47180
|
}
|
|
47042
47181
|
),
|
|
47043
|
-
!hideSubmitButton && /* @__PURE__ */ jsxs48(
|
|
47182
|
+
!hideSubmitButton && /* @__PURE__ */ jsxs48(Fragment12, { children: [
|
|
47044
47183
|
hideDiscardChanges ? null : /* @__PURE__ */ jsx66(
|
|
47045
47184
|
SecondaryButtonComponent,
|
|
47046
47185
|
{
|
|
@@ -47811,7 +47950,7 @@ function reconcileReportWithColumns(report, columns, previousReport) {
|
|
|
47811
47950
|
}
|
|
47812
47951
|
|
|
47813
47952
|
// src/hooks/useLongLoading.tsx
|
|
47814
|
-
import { useContext as useContext27, useEffect as useEffect24, useState as
|
|
47953
|
+
import { useContext as useContext27, useEffect as useEffect24, useState as useState31 } from "react";
|
|
47815
47954
|
function useLongLoading(isLoading, meta) {
|
|
47816
47955
|
const {
|
|
47817
47956
|
origin,
|
|
@@ -47819,8 +47958,8 @@ function useLongLoading(isLoading, meta) {
|
|
|
47819
47958
|
abnormalLoadTime = 15e3,
|
|
47820
47959
|
loadDescription
|
|
47821
47960
|
} = meta;
|
|
47822
|
-
const [isLongLoading, setIsLongLoading] =
|
|
47823
|
-
const [isAbnormalLoading, setIsAbnormalLoading] =
|
|
47961
|
+
const [isLongLoading, setIsLongLoading] = useState31(false);
|
|
47962
|
+
const [isAbnormalLoading, setIsAbnormalLoading] = useState31(false);
|
|
47824
47963
|
const { eventTracking } = useContext27(EventTrackingContext);
|
|
47825
47964
|
useEffect24(() => {
|
|
47826
47965
|
let longTimer = null;
|
|
@@ -48004,8 +48143,8 @@ function SQLEditor({
|
|
|
48004
48143
|
onRequestAddVirtualTable
|
|
48005
48144
|
}) {
|
|
48006
48145
|
const computedButtonLabel = addToDashboardButtonLabel === "Add to dashboard" ? reportId || report?.id ? "Save changes" : "Add to dashboard" : addToDashboardButtonLabel;
|
|
48007
|
-
const [sqlPrompt, setSqlPrompt] =
|
|
48008
|
-
const sqlPromptFormRef =
|
|
48146
|
+
const [sqlPrompt, setSqlPrompt] = useState32("");
|
|
48147
|
+
const sqlPromptFormRef = useRef20(null);
|
|
48009
48148
|
const sqlPromptInputWidth = useResponsiveFirstChildWidth_default(sqlPromptFormRef, {
|
|
48010
48149
|
gap: 12,
|
|
48011
48150
|
initialWidth: 320,
|
|
@@ -48027,9 +48166,9 @@ function SQLEditor({
|
|
|
48027
48166
|
const destinationDashboardConfig = useMemo22(() => {
|
|
48028
48167
|
return dashboards?.find((d) => d.name === destinationDashboard);
|
|
48029
48168
|
}, [dashboards, destinationDashboard]);
|
|
48030
|
-
const [query, setQuery] =
|
|
48031
|
-
const [rows, setRows] =
|
|
48032
|
-
const [columns, setColumns] =
|
|
48169
|
+
const [query, setQuery] = useState32(defaultQuery);
|
|
48170
|
+
const [rows, setRows] = useState32([]);
|
|
48171
|
+
const [columns, setColumns] = useState32([]);
|
|
48033
48172
|
const [schemaData] = useContext28(SchemaDataContext);
|
|
48034
48173
|
const { dashboardFilters } = useContext28(DashboardFiltersContext);
|
|
48035
48174
|
const specificDashboardFilters = useMemo22(() => {
|
|
@@ -48037,27 +48176,27 @@ function SQLEditor({
|
|
|
48037
48176
|
dashboardFilters[report?.dashboardName ?? destinationDashboard ?? ""] ?? {}
|
|
48038
48177
|
).map((f) => f.filter);
|
|
48039
48178
|
}, [dashboardFilters, destinationDashboard]);
|
|
48040
|
-
const [errorMessage, setErrorMessage] =
|
|
48041
|
-
const [sqlResponseLoading, setSqlResponseLoading] =
|
|
48179
|
+
const [errorMessage, setErrorMessage] = useState32("");
|
|
48180
|
+
const [sqlResponseLoading, setSqlResponseLoading] = useState32(false);
|
|
48042
48181
|
useLongLoading(sqlResponseLoading, {
|
|
48043
48182
|
origin: "SQLEditor",
|
|
48044
48183
|
loadDescription: "Loading SQL response"
|
|
48045
48184
|
});
|
|
48046
|
-
const [sqlQueryLoading, setSqlQueryLoading] =
|
|
48185
|
+
const [sqlQueryLoading, setSqlQueryLoading] = useState32(false);
|
|
48047
48186
|
useLongLoading(sqlQueryLoading, {
|
|
48048
48187
|
origin: "SQLEditor",
|
|
48049
48188
|
loadDescription: "Loading SQL query"
|
|
48050
48189
|
});
|
|
48051
|
-
const [isChartBuilderOpen, setIsChartBuilderOpen] =
|
|
48052
|
-
const [displayTable, setDisplayTable] =
|
|
48053
|
-
const [formattedRows, setFormattedRows] =
|
|
48054
|
-
const [rowCount, setRowCount] =
|
|
48055
|
-
const [rowCountIsLoading, setRowCountIsLoading] =
|
|
48056
|
-
const [maxPage, setMaxPage] =
|
|
48057
|
-
const [tableSearchQuery, setTableSearchQuery] =
|
|
48058
|
-
const [lastSuccessfulQuery, setLastSuccessfulQuery] =
|
|
48059
|
-
const [isSaveQueryModalOpen, setIsSaveQueryModalOpen] =
|
|
48060
|
-
const [tempReport, setTempReport] =
|
|
48190
|
+
const [isChartBuilderOpen, setIsChartBuilderOpen] = useState32(false);
|
|
48191
|
+
const [displayTable, setDisplayTable] = useState32(false);
|
|
48192
|
+
const [formattedRows, setFormattedRows] = useState32([]);
|
|
48193
|
+
const [rowCount, setRowCount] = useState32(void 0);
|
|
48194
|
+
const [rowCountIsLoading, setRowCountIsLoading] = useState32(false);
|
|
48195
|
+
const [maxPage, setMaxPage] = useState32(1);
|
|
48196
|
+
const [tableSearchQuery, setTableSearchQuery] = useState32("");
|
|
48197
|
+
const [lastSuccessfulQuery, setLastSuccessfulQuery] = useState32("");
|
|
48198
|
+
const [isSaveQueryModalOpen, setIsSaveQueryModalOpen] = useState32(false);
|
|
48199
|
+
const [tempReport, setTempReport] = useState32(() => {
|
|
48061
48200
|
const contextReport = reportId ? allReportsById[reportId] : void 0;
|
|
48062
48201
|
const initial = {
|
|
48063
48202
|
...EMPTY_INTERNAL_REPORT,
|
|
@@ -48065,8 +48204,8 @@ function SQLEditor({
|
|
|
48065
48204
|
};
|
|
48066
48205
|
return initial;
|
|
48067
48206
|
});
|
|
48068
|
-
const tableRef =
|
|
48069
|
-
const [cachedHeight, setCachedHeight] =
|
|
48207
|
+
const tableRef = useRef20(null);
|
|
48208
|
+
const [cachedHeight, setCachedHeight] = useState32(0);
|
|
48070
48209
|
const DEFAULT_ROWS_PER_PAGE = 5;
|
|
48071
48210
|
const ROW_HEIGHT = 37;
|
|
48072
48211
|
const TABLE_TAB_HEIGHT = 75;
|
|
@@ -48143,8 +48282,8 @@ function SQLEditor({
|
|
|
48143
48282
|
rowsPerPage * 10
|
|
48144
48283
|
)
|
|
48145
48284
|
};
|
|
48146
|
-
const [currentPage, setCurrentPage] =
|
|
48147
|
-
const [currentSort, setCurrentSort] =
|
|
48285
|
+
const [currentPage, setCurrentPage] = useState32(0);
|
|
48286
|
+
const [currentSort, setCurrentSort] = useState32(void 0);
|
|
48148
48287
|
const currentProcessing = useMemo22(() => {
|
|
48149
48288
|
return {
|
|
48150
48289
|
page: {
|
|
@@ -49065,9 +49204,9 @@ var SQLEditorComponent = ({
|
|
|
49065
49204
|
loading,
|
|
49066
49205
|
LoadingComponent = QuillLoadingComponent
|
|
49067
49206
|
}) => {
|
|
49068
|
-
const [editorKey, setEditorKey] =
|
|
49207
|
+
const [editorKey, setEditorKey] = useState32(0);
|
|
49069
49208
|
const { eventTracking } = useContext28(EventTrackingContext);
|
|
49070
|
-
const currentProvider =
|
|
49209
|
+
const currentProvider = useRef20(null);
|
|
49071
49210
|
useEffect25(() => {
|
|
49072
49211
|
if (currentProvider.current) {
|
|
49073
49212
|
currentProvider.current.dispose();
|
|
@@ -49309,7 +49448,7 @@ function SchemaItem({
|
|
|
49309
49448
|
index,
|
|
49310
49449
|
onClick
|
|
49311
49450
|
}) {
|
|
49312
|
-
const [isOpen, setIsOpen] =
|
|
49451
|
+
const [isOpen, setIsOpen] = useState32(index === 0);
|
|
49313
49452
|
const schemaContainerStyle = {
|
|
49314
49453
|
display: "flex",
|
|
49315
49454
|
flexDirection: "column"
|
|
@@ -49539,13 +49678,13 @@ function SchemaItem({
|
|
|
49539
49678
|
import {
|
|
49540
49679
|
useContext as useContext32,
|
|
49541
49680
|
useEffect as useEffect29,
|
|
49542
|
-
useRef as
|
|
49543
|
-
useState as
|
|
49681
|
+
useRef as useRef22,
|
|
49682
|
+
useState as useState38
|
|
49544
49683
|
} from "react";
|
|
49545
49684
|
init_constants();
|
|
49546
49685
|
|
|
49547
49686
|
// src/hooks/useReportBuilder.tsx
|
|
49548
|
-
import { useContext as useContext29, useEffect as useEffect26, useMemo as useMemo23, useState as
|
|
49687
|
+
import { useContext as useContext29, useEffect as useEffect26, useMemo as useMemo23, useState as useState33 } from "react";
|
|
49549
49688
|
init_tableProcessing();
|
|
49550
49689
|
init_ReportBuilder();
|
|
49551
49690
|
init_constants();
|
|
@@ -49596,18 +49735,18 @@ var useReportBuilderInternal = ({
|
|
|
49596
49735
|
rowsPerPage: _rowsPerPage,
|
|
49597
49736
|
rowsPerRequest: _rowsPerRequest
|
|
49598
49737
|
};
|
|
49599
|
-
const [openPopover, setOpenPopover] =
|
|
49600
|
-
const [aiPrompt, setAiPrompt] =
|
|
49601
|
-
const [reportBuilderLoading, setReportBuilderLoading] =
|
|
49602
|
-
const [tableLoading, setTableLoading] =
|
|
49603
|
-
const [errorMessage, setErrorMessage] =
|
|
49604
|
-
const [unresolvedReportMessage, setUnresolvedReportMessage] =
|
|
49605
|
-
const [tables, setTables] =
|
|
49606
|
-
const [columns, setColumns] =
|
|
49607
|
-
const [filterStack, setFilterStack] =
|
|
49608
|
-
const [pivot, setPivot] =
|
|
49609
|
-
const [sort, setSort] =
|
|
49610
|
-
const [limit, setLimit] =
|
|
49738
|
+
const [openPopover, setOpenPopover] = useState33(null);
|
|
49739
|
+
const [aiPrompt, setAiPrompt] = useState33("");
|
|
49740
|
+
const [reportBuilderLoading, setReportBuilderLoading] = useState33(false);
|
|
49741
|
+
const [tableLoading, setTableLoading] = useState33(false);
|
|
49742
|
+
const [errorMessage, setErrorMessage] = useState33("");
|
|
49743
|
+
const [unresolvedReportMessage, setUnresolvedReportMessage] = useState33("");
|
|
49744
|
+
const [tables, setTables] = useState33([]);
|
|
49745
|
+
const [columns, setColumns] = useState33([]);
|
|
49746
|
+
const [filterStack, setFilterStack] = useState33([]);
|
|
49747
|
+
const [pivot, setPivot] = useState33(null);
|
|
49748
|
+
const [sort, setSort] = useState33([]);
|
|
49749
|
+
const [limit, setLimit] = useState33(null);
|
|
49611
49750
|
const reportBuilderState = useMemo23(() => {
|
|
49612
49751
|
return {
|
|
49613
49752
|
tables,
|
|
@@ -49618,28 +49757,28 @@ var useReportBuilderInternal = ({
|
|
|
49618
49757
|
limit
|
|
49619
49758
|
};
|
|
49620
49759
|
}, [columns, filterStack, limit, pivot, sort, tables]);
|
|
49621
|
-
const [stateStack, setStateStack] =
|
|
49622
|
-
const [poppedStateStack, setPoppedStateStack] =
|
|
49623
|
-
const [unfilteredUniqueValues, setUnfilteredUniqueValues] =
|
|
49624
|
-
const [unfilteredUniqueValuesIsLoading, setUnfilteredUniqueValuesIsLoading] =
|
|
49625
|
-
const [filteredUniqueValues, setFilteredUniqueValues] =
|
|
49626
|
-
const [filteredUniqueValuesIsLoading, setFilteredUniqueValuesIsLoading] =
|
|
49627
|
-
const [columnUniqueValues, setColumnUniqueValues] =
|
|
49628
|
-
const [dateRanges, setDateRanges] =
|
|
49629
|
-
const [tempReport, setTempReport] =
|
|
49760
|
+
const [stateStack, setStateStack] = useState33([]);
|
|
49761
|
+
const [poppedStateStack, setPoppedStateStack] = useState33([]);
|
|
49762
|
+
const [unfilteredUniqueValues, setUnfilteredUniqueValues] = useState33({});
|
|
49763
|
+
const [unfilteredUniqueValuesIsLoading, setUnfilteredUniqueValuesIsLoading] = useState33(false);
|
|
49764
|
+
const [filteredUniqueValues, setFilteredUniqueValues] = useState33(null);
|
|
49765
|
+
const [filteredUniqueValuesIsLoading, setFilteredUniqueValuesIsLoading] = useState33(false);
|
|
49766
|
+
const [columnUniqueValues, setColumnUniqueValues] = useState33({});
|
|
49767
|
+
const [dateRanges, setDateRanges] = useState33(null);
|
|
49768
|
+
const [tempReport, setTempReport] = useState33({
|
|
49630
49769
|
...EMPTY_INTERNAL_REPORT,
|
|
49631
49770
|
pagination: REPORT_BUILDER_PAGINATION
|
|
49632
49771
|
});
|
|
49633
|
-
const [currentProcessing, setCurrentProcessing] =
|
|
49772
|
+
const [currentProcessing, setCurrentProcessing] = useState33({
|
|
49634
49773
|
page: REPORT_BUILDER_PAGINATION
|
|
49635
49774
|
});
|
|
49636
|
-
const [previousPage, setPreviousPage] =
|
|
49637
|
-
const [reportColumns, setReportColumns] =
|
|
49638
|
-
const [reportRows, setReportRows] =
|
|
49639
|
-
const [formattedRows, setFormattedRows] =
|
|
49640
|
-
const [pivotData, setPivotData] =
|
|
49641
|
-
const [numberOfRows, setNumberOfRows] =
|
|
49642
|
-
const [rowCountIsLoading, setRowCountIsLoading] =
|
|
49775
|
+
const [previousPage, setPreviousPage] = useState33(0);
|
|
49776
|
+
const [reportColumns, setReportColumns] = useState33([]);
|
|
49777
|
+
const [reportRows, setReportRows] = useState33([]);
|
|
49778
|
+
const [formattedRows, setFormattedRows] = useState33([]);
|
|
49779
|
+
const [pivotData, setPivotData] = useState33(null);
|
|
49780
|
+
const [numberOfRows, setNumberOfRows] = useState33(0);
|
|
49781
|
+
const [rowCountIsLoading, setRowCountIsLoading] = useState33(false);
|
|
49643
49782
|
const reportColumnsToStateColumns = useMemo23(() => {
|
|
49644
49783
|
const positionMap = {};
|
|
49645
49784
|
columns.forEach((column, index) => {
|
|
@@ -49658,28 +49797,28 @@ var useReportBuilderInternal = ({
|
|
|
49658
49797
|
}
|
|
49659
49798
|
});
|
|
49660
49799
|
}, [columns, reportColumns]);
|
|
49661
|
-
const [pivotRowField, setPivotRowField] =
|
|
49800
|
+
const [pivotRowField, setPivotRowField] = useState33(
|
|
49662
49801
|
void 0
|
|
49663
49802
|
);
|
|
49664
|
-
const [pivotColumnField, setPivotColumnField] =
|
|
49803
|
+
const [pivotColumnField, setPivotColumnField] = useState33(
|
|
49665
49804
|
void 0
|
|
49666
49805
|
);
|
|
49667
|
-
const [pivotAggregations, setPivotAggregations] =
|
|
49668
|
-
const [pivotLimit, setPivotLimit] =
|
|
49669
|
-
const [pivotSort, setPivotSort] =
|
|
49670
|
-
const [pivotHint, setPivotHint] =
|
|
49671
|
-
const [pivotError, setPivotError] =
|
|
49672
|
-
const [createdPivots, setCreatedPivots] =
|
|
49673
|
-
const [recommendedPivots, setRecommendedPivots] =
|
|
49674
|
-
const [pivotPopUpTitle, setPivotPopUpTitle] =
|
|
49675
|
-
const [showPivotPopover, setShowPivotPopover] =
|
|
49676
|
-
const [isEditingPivot, setIsEditingPivot] =
|
|
49677
|
-
const [selectedPivotIndex, setSelectedPivotIndex] =
|
|
49806
|
+
const [pivotAggregations, setPivotAggregations] = useState33([]);
|
|
49807
|
+
const [pivotLimit, setPivotLimit] = useState33(void 0);
|
|
49808
|
+
const [pivotSort, setPivotSort] = useState33(void 0);
|
|
49809
|
+
const [pivotHint, setPivotHint] = useState33("");
|
|
49810
|
+
const [pivotError, setPivotError] = useState33("");
|
|
49811
|
+
const [createdPivots, setCreatedPivots] = useState33([]);
|
|
49812
|
+
const [recommendedPivots, setRecommendedPivots] = useState33([]);
|
|
49813
|
+
const [pivotPopUpTitle, setPivotPopUpTitle] = useState33("Add pivot");
|
|
49814
|
+
const [showPivotPopover, setShowPivotPopover] = useState33(false);
|
|
49815
|
+
const [isEditingPivot, setIsEditingPivot] = useState33(false);
|
|
49816
|
+
const [selectedPivotIndex, setSelectedPivotIndex] = useState33(-1);
|
|
49678
49817
|
const [
|
|
49679
49818
|
pivotRecommendationsEnabledState,
|
|
49680
49819
|
setPivotRecommendationsEnabledState
|
|
49681
|
-
] =
|
|
49682
|
-
const [askAILoading, setAskAILoading] =
|
|
49820
|
+
] = useState33(pivotRecommendationsEnabled);
|
|
49821
|
+
const [askAILoading, setAskAILoading] = useState33(false);
|
|
49683
49822
|
const loading = reportBuilderLoading || tableLoading;
|
|
49684
49823
|
useLongLoading(reportBuilderLoading, {
|
|
49685
49824
|
origin: "ReportBuilder",
|
|
@@ -51061,7 +51200,7 @@ var useReportBuilder = ({
|
|
|
51061
51200
|
init_ReportBuilder();
|
|
51062
51201
|
|
|
51063
51202
|
// src/components/ReportBuilder/AddColumnModal.tsx
|
|
51064
|
-
import { useState as
|
|
51203
|
+
import { useState as useState34, useRef as useRef21, useMemo as useMemo24, useEffect as useEffect27, useContext as useContext30 } from "react";
|
|
51065
51204
|
import {
|
|
51066
51205
|
DndContext as DndContext2,
|
|
51067
51206
|
closestCenter as closestCenter2,
|
|
@@ -51096,14 +51235,14 @@ function AddColumnModal({
|
|
|
51096
51235
|
LoadingComponent = QuillLoadingComponent,
|
|
51097
51236
|
onRequestAddVirtualTable
|
|
51098
51237
|
}) {
|
|
51099
|
-
const [primaryTable, setPrimaryTable] =
|
|
51238
|
+
const [primaryTable, setPrimaryTable] = useState34(
|
|
51100
51239
|
selectedTables[0]?.name
|
|
51101
51240
|
);
|
|
51102
51241
|
const [theme] = useContext30(ThemeContext);
|
|
51103
|
-
const [search, setSearch] =
|
|
51104
|
-
const [initialLoad, setInitialLoad] =
|
|
51105
|
-
const textInputContainerRef =
|
|
51106
|
-
const [modalSelectedColumns, setModalSelectedColumns] =
|
|
51242
|
+
const [search, setSearch] = useState34("");
|
|
51243
|
+
const [initialLoad, setInitialLoad] = useState34(true);
|
|
51244
|
+
const textInputContainerRef = useRef21(null);
|
|
51245
|
+
const [modalSelectedColumns, setModalSelectedColumns] = useState34(
|
|
51107
51246
|
selectedColumns.map((col) => `${col.table}.${col.field}`)
|
|
51108
51247
|
);
|
|
51109
51248
|
const columnOptions = useMemo24(() => {
|
|
@@ -51130,7 +51269,7 @@ function AddColumnModal({
|
|
|
51130
51269
|
})
|
|
51131
51270
|
);
|
|
51132
51271
|
}, [schema, primaryTable]);
|
|
51133
|
-
const [orderedColumnNames, setOrderedColumnNames] =
|
|
51272
|
+
const [orderedColumnNames, setOrderedColumnNames] = useState34([]);
|
|
51134
51273
|
const isSelectedAllColumns = columnOptions.length === modalSelectedColumns.length;
|
|
51135
51274
|
const searchResults = useMemo24(() => {
|
|
51136
51275
|
return orderedColumnNames.filter((column) => {
|
|
@@ -52026,7 +52165,7 @@ var AddFilters = ({
|
|
|
52026
52165
|
};
|
|
52027
52166
|
|
|
52028
52167
|
// src/internals/ReportBuilder/PivotForm.tsx
|
|
52029
|
-
import { useContext as useContext31, useEffect as useEffect28, useState as
|
|
52168
|
+
import { useContext as useContext31, useEffect as useEffect28, useState as useState35 } from "react";
|
|
52030
52169
|
init_textProcessing();
|
|
52031
52170
|
init_pivotProcessing();
|
|
52032
52171
|
import { jsx as jsx74, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
@@ -52055,21 +52194,21 @@ function PivotForm({
|
|
|
52055
52194
|
isLoading,
|
|
52056
52195
|
pivotHint
|
|
52057
52196
|
}) {
|
|
52058
|
-
const [allowedColumnFields, setAllowedColumnFields] =
|
|
52059
|
-
const [allowedRowFields, setAllowedRowFields] =
|
|
52060
|
-
const [allowedValueFields, setAllowedValueFields] =
|
|
52197
|
+
const [allowedColumnFields, setAllowedColumnFields] = useState35([]);
|
|
52198
|
+
const [allowedRowFields, setAllowedRowFields] = useState35([]);
|
|
52199
|
+
const [allowedValueFields, setAllowedValueFields] = useState35([]);
|
|
52061
52200
|
const [theme] = useContext31(ThemeContext);
|
|
52062
|
-
const [limitInput, setLimitInput] =
|
|
52201
|
+
const [limitInput, setLimitInput] = useState35(
|
|
52063
52202
|
pivotLimit?.toString() ?? ""
|
|
52064
52203
|
);
|
|
52065
|
-
const [sortFieldInput, setSortFieldInput] =
|
|
52204
|
+
const [sortFieldInput, setSortFieldInput] = useState35(
|
|
52066
52205
|
pivotSort?.sortField ?? ""
|
|
52067
52206
|
);
|
|
52068
|
-
const [sortDirectionInput, setSortDirectionInput] =
|
|
52207
|
+
const [sortDirectionInput, setSortDirectionInput] = useState35(
|
|
52069
52208
|
pivotSort?.sortDirection ?? ""
|
|
52070
52209
|
);
|
|
52071
|
-
const [showLimitInput, setShowLimitInput] =
|
|
52072
|
-
const [showSortInput, setShowSortInput] =
|
|
52210
|
+
const [showLimitInput, setShowLimitInput] = useState35(!!pivotLimit);
|
|
52211
|
+
const [showSortInput, setShowSortInput] = useState35(!!pivotSort);
|
|
52073
52212
|
useEffect28(() => {
|
|
52074
52213
|
if (uniqueValues) {
|
|
52075
52214
|
const possibleColumns = getPossiblePivotFieldOptions(
|
|
@@ -52698,8 +52837,8 @@ var AddPivot = ({
|
|
|
52698
52837
|
};
|
|
52699
52838
|
|
|
52700
52839
|
// src/components/ReportBuilder/AddLimitPopover.tsx
|
|
52701
|
-
import { useState as
|
|
52702
|
-
import { Fragment as
|
|
52840
|
+
import { useState as useState36 } from "react";
|
|
52841
|
+
import { Fragment as Fragment13, jsx as jsx76, jsxs as jsxs56 } from "react/jsx-runtime";
|
|
52703
52842
|
var LimitSentence = ({
|
|
52704
52843
|
limit,
|
|
52705
52844
|
handleDelete,
|
|
@@ -52713,7 +52852,7 @@ var LimitSentence = ({
|
|
|
52713
52852
|
SecondaryButton = MemoizedSecondaryButton,
|
|
52714
52853
|
disabled = false
|
|
52715
52854
|
}) => {
|
|
52716
|
-
const [isOpen, setIsOpen] =
|
|
52855
|
+
const [isOpen, setIsOpen] = useState36(false);
|
|
52717
52856
|
const handleClickDelete = () => {
|
|
52718
52857
|
setOpenPopover(null);
|
|
52719
52858
|
handleDelete();
|
|
@@ -52755,7 +52894,7 @@ var AddLimitPopover = ({
|
|
|
52755
52894
|
Button = MemoizedButton,
|
|
52756
52895
|
SecondaryButton = MemoizedSecondaryButton
|
|
52757
52896
|
}) => {
|
|
52758
|
-
const [limit, setLimit] =
|
|
52897
|
+
const [limit, setLimit] = useState36(initialLimit.toString());
|
|
52759
52898
|
const MAX_LIMIT = 2147483647;
|
|
52760
52899
|
return /* @__PURE__ */ jsxs56("div", { style: { display: "flex", flexDirection: "column", gap: 12 }, children: [
|
|
52761
52900
|
/* @__PURE__ */ jsx76(
|
|
@@ -52790,7 +52929,7 @@ var AddLimitPopover = ({
|
|
|
52790
52929
|
justifyContent: "end",
|
|
52791
52930
|
gap: 12
|
|
52792
52931
|
},
|
|
52793
|
-
children: isEdit ? /* @__PURE__ */ jsxs56(
|
|
52932
|
+
children: isEdit ? /* @__PURE__ */ jsxs56(Fragment13, { children: [
|
|
52794
52933
|
/* @__PURE__ */ jsx76(SecondaryButton, { onClick: onDelete, label: "Delete" }),
|
|
52795
52934
|
/* @__PURE__ */ jsx76(
|
|
52796
52935
|
Button,
|
|
@@ -52996,9 +53135,9 @@ var AddLimit = ({
|
|
|
52996
53135
|
};
|
|
52997
53136
|
|
|
52998
53137
|
// src/components/ReportBuilder/AddSortPopover.tsx
|
|
52999
|
-
import { useState as
|
|
53138
|
+
import { useState as useState37 } from "react";
|
|
53000
53139
|
init_textProcessing();
|
|
53001
|
-
import { Fragment as
|
|
53140
|
+
import { Fragment as Fragment14, jsx as jsx78, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
53002
53141
|
var SORT_VALUE_TO_LABEL = {
|
|
53003
53142
|
ASC: "ascending",
|
|
53004
53143
|
DESC: "descending",
|
|
@@ -53020,7 +53159,7 @@ var SortSentence = ({
|
|
|
53020
53159
|
SecondaryButton = MemoizedSecondaryButton,
|
|
53021
53160
|
disabled = false
|
|
53022
53161
|
}) => {
|
|
53023
|
-
const [isOpen, setIsOpen] =
|
|
53162
|
+
const [isOpen, setIsOpen] = useState37(false);
|
|
53024
53163
|
const handleSetIsOpen = (isOpen2) => {
|
|
53025
53164
|
setIsOpen(isOpen2);
|
|
53026
53165
|
};
|
|
@@ -53072,8 +53211,8 @@ var AddSortPopover = ({
|
|
|
53072
53211
|
Button = MemoizedButton,
|
|
53073
53212
|
SecondaryButton = MemoizedSecondaryButton
|
|
53074
53213
|
}) => {
|
|
53075
|
-
const [sortColumn, setSortColumn] =
|
|
53076
|
-
const [sortDirection, setSortDirection] =
|
|
53214
|
+
const [sortColumn, setSortColumn] = useState37(column || "");
|
|
53215
|
+
const [sortDirection, setSortDirection] = useState37(
|
|
53077
53216
|
direction || "ASC"
|
|
53078
53217
|
);
|
|
53079
53218
|
return /* @__PURE__ */ jsxs58("div", { style: { display: "flex", flexDirection: "column", gap: 12 }, children: [
|
|
@@ -53131,7 +53270,7 @@ var AddSortPopover = ({
|
|
|
53131
53270
|
justifyContent: "end",
|
|
53132
53271
|
gap: 12
|
|
53133
53272
|
},
|
|
53134
|
-
children: isEdit ? /* @__PURE__ */ jsxs58(
|
|
53273
|
+
children: isEdit ? /* @__PURE__ */ jsxs58(Fragment14, { children: [
|
|
53135
53274
|
/* @__PURE__ */ jsx78(SecondaryButton, { onClick: onDelete, label: "Delete" }),
|
|
53136
53275
|
/* @__PURE__ */ jsx78(
|
|
53137
53276
|
Button,
|
|
@@ -53492,7 +53631,7 @@ var ReportTable = ({
|
|
|
53492
53631
|
};
|
|
53493
53632
|
|
|
53494
53633
|
// src/ReportBuilder.tsx
|
|
53495
|
-
import { Fragment as
|
|
53634
|
+
import { Fragment as Fragment15, jsx as jsx82, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
53496
53635
|
function ReportBuilder({
|
|
53497
53636
|
initialTableName = "",
|
|
53498
53637
|
onSubmitEditReport = () => void 0,
|
|
@@ -53554,11 +53693,11 @@ function ReportBuilder({
|
|
|
53554
53693
|
const [theme] = useContext32(ThemeContext);
|
|
53555
53694
|
const [client] = useContext32(ClientContext);
|
|
53556
53695
|
const { getToken } = useContext32(FetchContext);
|
|
53557
|
-
const parentRef =
|
|
53558
|
-
const askAIFormRef =
|
|
53559
|
-
const [isCopying, setIsCopying] =
|
|
53560
|
-
const [isChartBuilderOpen, setIsChartBuilderOpen] =
|
|
53561
|
-
const [isSaveQueryModalOpen, setIsSaveQueryModalOpen] =
|
|
53696
|
+
const parentRef = useRef22(null);
|
|
53697
|
+
const askAIFormRef = useRef22(null);
|
|
53698
|
+
const [isCopying, setIsCopying] = useState38(false);
|
|
53699
|
+
const [isChartBuilderOpen, setIsChartBuilderOpen] = useState38(false);
|
|
53700
|
+
const [isSaveQueryModalOpen, setIsSaveQueryModalOpen] = useState38(false);
|
|
53562
53701
|
const reportBuilder = useReportBuilderInternal({
|
|
53563
53702
|
reportId,
|
|
53564
53703
|
initialTableName,
|
|
@@ -53916,7 +54055,7 @@ function ReportBuilder({
|
|
|
53916
54055
|
disabled: poppedStateStack.length < 1 || loading
|
|
53917
54056
|
}
|
|
53918
54057
|
),
|
|
53919
|
-
columns.length > 0 && /* @__PURE__ */ jsxs61(
|
|
54058
|
+
columns.length > 0 && /* @__PURE__ */ jsxs61(Fragment15, { children: [
|
|
53920
54059
|
onDiscardChanges && /* @__PURE__ */ jsx82(
|
|
53921
54060
|
SecondaryButtonComponent,
|
|
53922
54061
|
{
|
|
@@ -54062,8 +54201,8 @@ import {
|
|
|
54062
54201
|
useContext as useContext33,
|
|
54063
54202
|
useEffect as useEffect30,
|
|
54064
54203
|
useMemo as useMemo26,
|
|
54065
|
-
useRef as
|
|
54066
|
-
useState as
|
|
54204
|
+
useRef as useRef23,
|
|
54205
|
+
useState as useState39
|
|
54067
54206
|
} from "react";
|
|
54068
54207
|
import { jsx as jsx83 } from "react/jsx-runtime";
|
|
54069
54208
|
function ChartEditor({
|
|
@@ -54111,9 +54250,9 @@ function ChartEditor({
|
|
|
54111
54250
|
onClickChartElement,
|
|
54112
54251
|
onClickChartError
|
|
54113
54252
|
}) {
|
|
54114
|
-
const parentRef =
|
|
54115
|
-
const [modalWidth, setModalWidth] =
|
|
54116
|
-
const [modalHeight, setModalHeight] =
|
|
54253
|
+
const parentRef = useRef23(null);
|
|
54254
|
+
const [modalWidth, setModalWidth] = useState39(200);
|
|
54255
|
+
const [modalHeight, setModalHeight] = useState39(200);
|
|
54117
54256
|
const { allReportsById } = useAllReports();
|
|
54118
54257
|
const report = allReportsById[reportId];
|
|
54119
54258
|
const resolvedDashboard = useMemo26(
|
|
@@ -54136,8 +54275,8 @@ function ChartEditor({
|
|
|
54136
54275
|
(f) => f.filter
|
|
54137
54276
|
);
|
|
54138
54277
|
}, [dashboardFilters, report?.dashboardName]);
|
|
54139
|
-
const [filtersEnabled, setFiltersEnabled] =
|
|
54140
|
-
const [chartBuilderKey, setChartBuilderKey] =
|
|
54278
|
+
const [filtersEnabled, setFiltersEnabled] = useState39(true);
|
|
54279
|
+
const [chartBuilderKey, setChartBuilderKey] = useState39(0);
|
|
54141
54280
|
const dateFilter = Object.values(specificDashboardFilters).find(
|
|
54142
54281
|
(filter) => filter.filterType === "date_range"
|
|
54143
54282
|
);
|
|
@@ -54301,7 +54440,7 @@ function StaticChart(props) {
|
|
|
54301
54440
|
reportId,
|
|
54302
54441
|
onClickChartElement,
|
|
54303
54442
|
containerStyle,
|
|
54304
|
-
showLegend
|
|
54443
|
+
showLegend,
|
|
54305
54444
|
className
|
|
54306
54445
|
} = props;
|
|
54307
54446
|
const {
|
|
@@ -54417,7 +54556,7 @@ var useTenants = (dashboardName) => {
|
|
|
54417
54556
|
};
|
|
54418
54557
|
|
|
54419
54558
|
// src/hooks/useQuill.ts
|
|
54420
|
-
import { useContext as useContext35, useEffect as useEffect32, useMemo as useMemo27, useState as
|
|
54559
|
+
import { useContext as useContext35, useEffect as useEffect32, useMemo as useMemo27, useState as useState40 } from "react";
|
|
54421
54560
|
init_paginationProcessing();
|
|
54422
54561
|
init_tableProcessing();
|
|
54423
54562
|
init_dataProcessing();
|
|
@@ -54440,9 +54579,9 @@ var useQuill = (reportId, pagination) => {
|
|
|
54440
54579
|
const [client, isClientLoading] = useContext35(ClientContext);
|
|
54441
54580
|
const { tenants } = useContext35(TenantContext);
|
|
54442
54581
|
const { eventTracking } = useContext35(EventTrackingContext);
|
|
54443
|
-
const [loading, setLoading] =
|
|
54444
|
-
const [error, setError] =
|
|
54445
|
-
const [previousPage, setPreviousPage] =
|
|
54582
|
+
const [loading, setLoading] = useState40(true);
|
|
54583
|
+
const [error, setError] = useState40(void 0);
|
|
54584
|
+
const [previousPage, setPreviousPage] = useState40(0);
|
|
54446
54585
|
const processedReport = useMemo27(() => {
|
|
54447
54586
|
return reportId && allReportsById[reportId] ? convertInternalReportToReport(
|
|
54448
54587
|
mergeComparisonRange(allReportsById[reportId]),
|
|
@@ -54451,7 +54590,7 @@ var useQuill = (reportId, pagination) => {
|
|
|
54451
54590
|
"useQuill"
|
|
54452
54591
|
) : void 0;
|
|
54453
54592
|
}, [reportId, reportId && allReportsById[reportId], specificReportFilters]);
|
|
54454
|
-
const [additionalProcessing, setAdditionProcessing] =
|
|
54593
|
+
const [additionalProcessing, setAdditionProcessing] = useState40(
|
|
54455
54594
|
pagination ? {
|
|
54456
54595
|
page: pagination
|
|
54457
54596
|
} : void 0
|
|
@@ -54667,7 +54806,7 @@ var useMemoizedRows = (reportId) => {
|
|
|
54667
54806
|
};
|
|
54668
54807
|
|
|
54669
54808
|
// src/hooks/useAskQuill.tsx
|
|
54670
|
-
import { useContext as useContext36, useEffect as useEffect33, useState as
|
|
54809
|
+
import { useContext as useContext36, useEffect as useEffect33, useState as useState41 } from "react";
|
|
54671
54810
|
init_astProcessing();
|
|
54672
54811
|
init_astFilterProcessing();
|
|
54673
54812
|
init_pivotProcessing();
|
|
@@ -54700,8 +54839,8 @@ var useAskQuill = (dashboardName) => {
|
|
|
54700
54839
|
const { tenants } = useContext36(TenantContext);
|
|
54701
54840
|
const { getToken } = useContext36(FetchContext);
|
|
54702
54841
|
const { eventTracking } = useContext36(EventTrackingContext);
|
|
54703
|
-
const [astInfo, setAstInfo] =
|
|
54704
|
-
const [data, setData] =
|
|
54842
|
+
const [astInfo, setAstInfo] = useState41(void 0);
|
|
54843
|
+
const [data, setData] = useState41({
|
|
54705
54844
|
rows: [],
|
|
54706
54845
|
columns: [],
|
|
54707
54846
|
pivot: null,
|
|
@@ -54711,9 +54850,9 @@ var useAskQuill = (dashboardName) => {
|
|
|
54711
54850
|
pivotColumnFields: [],
|
|
54712
54851
|
pivotValueFields: []
|
|
54713
54852
|
});
|
|
54714
|
-
const [loading, setLoading] =
|
|
54715
|
-
const [error, setError] =
|
|
54716
|
-
const [ask, setAsk] =
|
|
54853
|
+
const [loading, setLoading] = useState41(false);
|
|
54854
|
+
const [error, setError] = useState41(void 0);
|
|
54855
|
+
const [ask, setAsk] = useState41(
|
|
54717
54856
|
async () => void 0
|
|
54718
54857
|
);
|
|
54719
54858
|
const askHelper = async (query) => {
|
|
@@ -54927,13 +55066,13 @@ var useAskQuill = (dashboardName) => {
|
|
|
54927
55066
|
};
|
|
54928
55067
|
|
|
54929
55068
|
// src/hooks/useVirtualTables.tsx
|
|
54930
|
-
import { useContext as useContext37, useState as
|
|
55069
|
+
import { useContext as useContext37, useState as useState42 } from "react";
|
|
54931
55070
|
var useVirtualTables = () => {
|
|
54932
55071
|
const [schemaData, setSchemaData] = useContext37(SchemaDataContext);
|
|
54933
55072
|
const { tenants } = useContext37(TenantContext);
|
|
54934
55073
|
const { getToken, quillFetchWithToken } = useContext37(FetchContext);
|
|
54935
55074
|
const { eventTracking } = useContext37(EventTrackingContext);
|
|
54936
|
-
const [loadingTables, setLoadingTables] =
|
|
55075
|
+
const [loadingTables, setLoadingTables] = useState42({});
|
|
54937
55076
|
const handleReload = async (client, caller) => {
|
|
54938
55077
|
setSchemaData({ ...schemaData, isSchemaLoading: true });
|
|
54939
55078
|
setLoadingTables(
|