@quillsql/react 2.16.19 → 2.16.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +927 -794
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1296 -1163
- 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({
|
|
@@ -24314,14 +24317,12 @@ var useDashboard = (dashboardName, config) => {
|
|
|
24314
24317
|
const reportRequestIds = useRef2({});
|
|
24315
24318
|
const lastDashboardName = useRef2(null);
|
|
24316
24319
|
const pendingNameChangeReload = useRef2(false);
|
|
24317
|
-
const shouldReloadOnNameChange = useRef2(false);
|
|
24318
24320
|
useEffect2(() => {
|
|
24319
24321
|
customFiltersRef.current = customReportFilters;
|
|
24320
24322
|
}, [customReportFilters]);
|
|
24321
24323
|
useEffect2(() => {
|
|
24322
24324
|
const nameChanged = dashboardName !== lastDashboardName.current;
|
|
24323
24325
|
if (nameChanged) {
|
|
24324
|
-
shouldReloadOnNameChange.current = lastDashboardName.current !== null;
|
|
24325
24326
|
lastDashboardName.current = dashboardName ?? null;
|
|
24326
24327
|
initialLoad.current = true;
|
|
24327
24328
|
fetchedInitialReports.current = false;
|
|
@@ -24333,10 +24334,6 @@ var useDashboard = (dashboardName, config) => {
|
|
|
24333
24334
|
if (pendingNameChangeReload.current && data) {
|
|
24334
24335
|
pendingNameChangeReload.current = false;
|
|
24335
24336
|
initialLoad.current = false;
|
|
24336
|
-
if (shouldReloadOnNameChange.current) {
|
|
24337
|
-
shouldReloadOnNameChange.current = false;
|
|
24338
|
-
reload(dashboardName, true);
|
|
24339
|
-
}
|
|
24340
24337
|
return;
|
|
24341
24338
|
}
|
|
24342
24339
|
if (pendingNameChangeReload.current && !isLoading && !data && initialLoad.current) {
|
|
@@ -25533,8 +25530,8 @@ var BarList = React2.forwardRef((props, ref) => {
|
|
|
25533
25530
|
var BarList_default = BarList;
|
|
25534
25531
|
|
|
25535
25532
|
// src/components/Chart/PieChart.tsx
|
|
25536
|
-
import
|
|
25537
|
-
import { Pie, PieChart, ResponsiveContainer, Tooltip } from "recharts";
|
|
25533
|
+
import React4 from "react";
|
|
25534
|
+
import { Legend, Pie, PieChart, ResponsiveContainer, Tooltip } from "recharts";
|
|
25538
25535
|
|
|
25539
25536
|
// src/utils/color.ts
|
|
25540
25537
|
var DEFAULT_GRADIENT_COLORS = [
|
|
@@ -25893,476 +25890,9 @@ function HSLtoRGB(h, s, l) {
|
|
|
25893
25890
|
// src/components/Chart/PieChart.tsx
|
|
25894
25891
|
init_util();
|
|
25895
25892
|
init_valueFormatter();
|
|
25896
|
-
import { Fragment, jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
25897
|
-
var defaultValueFormatter = (value) => (value * 1).toFixed(1) + "%";
|
|
25898
|
-
var parseData2 = (data, colors, categoryKey, valueKey) => {
|
|
25899
|
-
const maxItems = 20;
|
|
25900
|
-
const slicedData = deepCopy(data).slice(0, maxItems);
|
|
25901
|
-
const totalValue = slicedData.reduce(
|
|
25902
|
-
(acc, dataPoint) => (
|
|
25903
|
-
// Big(acc)
|
|
25904
|
-
// .add(Big(Number(dataPoint[valueKey]) ?? 0))
|
|
25905
|
-
// .toNumber(),
|
|
25906
|
-
acc + parseFloat(dataPoint[valueKey] ?? "0")
|
|
25907
|
-
),
|
|
25908
|
-
0
|
|
25909
|
-
);
|
|
25910
|
-
slicedData.forEach((dataPoint) => {
|
|
25911
|
-
const rawValue = parseFloat(dataPoint[valueKey] ?? "0");
|
|
25912
|
-
dataPoint[valueKey] = totalValue ? rawValue * 100 / totalValue : data.length > maxItems ? 100 / (maxItems + 1) : 100 / slicedData.length;
|
|
25913
|
-
dataPoint[`raw_${valueKey}`] = parseFloat(rawValue.toFixed(2));
|
|
25914
|
-
});
|
|
25915
|
-
const parsedData = slicedData.map((dataPoint, idx) => {
|
|
25916
|
-
const baseColor = colors.length > 0 ? idx < colors.length ? colors[idx] : colors[colors.length - 1] : "#808080";
|
|
25917
|
-
return {
|
|
25918
|
-
...dataPoint,
|
|
25919
|
-
color: baseColor,
|
|
25920
|
-
fill: baseColor
|
|
25921
|
-
};
|
|
25922
|
-
});
|
|
25923
|
-
if (data.length > maxItems) {
|
|
25924
|
-
const otherData = data.slice(maxItems);
|
|
25925
|
-
const otherSum = otherData.reduce(
|
|
25926
|
-
(acc, dataPoint) => (
|
|
25927
|
-
// Big(acc)
|
|
25928
|
-
// .add(Big(Number(dataPoint[valueKey])) ?? 0)
|
|
25929
|
-
// .toNumber(),
|
|
25930
|
-
acc + parseFloat(dataPoint[valueKey] ?? "0")
|
|
25931
|
-
),
|
|
25932
|
-
0
|
|
25933
|
-
);
|
|
25934
|
-
const otherColor = colors.length > 0 ? colors[colors.length - 1] : "#808080";
|
|
25935
|
-
const normalizedOtherSum = totalValue ? otherSum * 100 / totalValue : 100 / (maxItems + 1);
|
|
25936
|
-
parsedData.push({
|
|
25937
|
-
[categoryKey]: "Other",
|
|
25938
|
-
[valueKey]: normalizedOtherSum,
|
|
25939
|
-
[`raw_${valueKey}`]: parseFloat(otherSum.toFixed(2)),
|
|
25940
|
-
color: otherColor,
|
|
25941
|
-
fill: otherColor
|
|
25942
|
-
});
|
|
25943
|
-
}
|
|
25944
|
-
return parsedData;
|
|
25945
|
-
};
|
|
25946
|
-
var ChartTooltipFrame = ({
|
|
25947
|
-
children,
|
|
25948
|
-
theme
|
|
25949
|
-
}) => /* @__PURE__ */ jsx4(
|
|
25950
|
-
"div",
|
|
25951
|
-
{
|
|
25952
|
-
style: {
|
|
25953
|
-
borderStyle: "solid",
|
|
25954
|
-
borderColor: theme?.borderColor || "#E5E7EB",
|
|
25955
|
-
borderWidth: 1,
|
|
25956
|
-
background: theme?.backgroundColor || "#ffffff",
|
|
25957
|
-
fontSize: theme?.fontSize || "14px",
|
|
25958
|
-
borderRadius: "6px",
|
|
25959
|
-
boxShadow: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)"
|
|
25960
|
-
},
|
|
25961
|
-
children
|
|
25962
|
-
}
|
|
25963
|
-
);
|
|
25964
|
-
var ChartTooltipRow = ({
|
|
25965
|
-
value,
|
|
25966
|
-
rawValue,
|
|
25967
|
-
valueKey,
|
|
25968
|
-
valueKeyLabel,
|
|
25969
|
-
name: name2,
|
|
25970
|
-
// color,
|
|
25971
|
-
theme
|
|
25972
|
-
}) => /* @__PURE__ */ jsxs3(
|
|
25973
|
-
"div",
|
|
25974
|
-
{
|
|
25975
|
-
style: {
|
|
25976
|
-
display: "flex",
|
|
25977
|
-
flexDirection: "column",
|
|
25978
|
-
gap: 2,
|
|
25979
|
-
minWidth: 150,
|
|
25980
|
-
position: "relative"
|
|
25981
|
-
},
|
|
25982
|
-
children: [
|
|
25983
|
-
/* @__PURE__ */ jsx4(
|
|
25984
|
-
"div",
|
|
25985
|
-
{
|
|
25986
|
-
style: {
|
|
25987
|
-
display: "flex",
|
|
25988
|
-
alignItems: "center",
|
|
25989
|
-
width: "100%"
|
|
25990
|
-
// paddingLeft: '24px',
|
|
25991
|
-
},
|
|
25992
|
-
children: /* @__PURE__ */ jsxs3(
|
|
25993
|
-
"span",
|
|
25994
|
-
{
|
|
25995
|
-
style: {
|
|
25996
|
-
flex: 1,
|
|
25997
|
-
display: "flex",
|
|
25998
|
-
alignItems: "center",
|
|
25999
|
-
justifyContent: "space-between"
|
|
26000
|
-
},
|
|
26001
|
-
children: [
|
|
26002
|
-
/* @__PURE__ */ jsx4(
|
|
26003
|
-
"p",
|
|
26004
|
-
{
|
|
26005
|
-
style: {
|
|
26006
|
-
marginTop: 0,
|
|
26007
|
-
marginBottom: 0,
|
|
26008
|
-
marginRight: "24px",
|
|
26009
|
-
fontFamily: theme?.fontFamily,
|
|
26010
|
-
color: theme?.primaryTextColor,
|
|
26011
|
-
fontSize: theme?.fontSizeSmall || "14px",
|
|
26012
|
-
fontWeight: theme?.fontWeightMedium || "500",
|
|
26013
|
-
minWidth: "60px"
|
|
26014
|
-
},
|
|
26015
|
-
children: name2
|
|
26016
|
-
}
|
|
26017
|
-
),
|
|
26018
|
-
/* @__PURE__ */ jsx4(
|
|
26019
|
-
"p",
|
|
26020
|
-
{
|
|
26021
|
-
style: {
|
|
26022
|
-
marginTop: 0,
|
|
26023
|
-
marginBottom: 0,
|
|
26024
|
-
fontFamily: theme?.fontFamily,
|
|
26025
|
-
color: theme?.primaryTextColor,
|
|
26026
|
-
fontSize: theme?.fontSizeSmall || "14px",
|
|
26027
|
-
fontWeight: theme?.fontWeightMedium || "500",
|
|
26028
|
-
minWidth: "40px",
|
|
26029
|
-
textAlign: "right"
|
|
26030
|
-
},
|
|
26031
|
-
children: value
|
|
26032
|
-
}
|
|
26033
|
-
)
|
|
26034
|
-
]
|
|
26035
|
-
}
|
|
26036
|
-
)
|
|
26037
|
-
}
|
|
26038
|
-
),
|
|
26039
|
-
(rawValue || valueKey) && /* @__PURE__ */ jsx4(
|
|
26040
|
-
"div",
|
|
26041
|
-
{
|
|
26042
|
-
style: {
|
|
26043
|
-
display: "flex",
|
|
26044
|
-
alignItems: "center",
|
|
26045
|
-
width: "100%",
|
|
26046
|
-
// paddingLeft: '24px',
|
|
26047
|
-
justifyContent: "space-between"
|
|
26048
|
-
},
|
|
26049
|
-
children: /* @__PURE__ */ jsxs3(
|
|
26050
|
-
"span",
|
|
26051
|
-
{
|
|
26052
|
-
style: {
|
|
26053
|
-
flex: 1,
|
|
26054
|
-
display: "flex",
|
|
26055
|
-
alignItems: "center",
|
|
26056
|
-
justifyContent: "space-between"
|
|
26057
|
-
},
|
|
26058
|
-
children: [
|
|
26059
|
-
/* @__PURE__ */ jsx4(
|
|
26060
|
-
"p",
|
|
26061
|
-
{
|
|
26062
|
-
style: {
|
|
26063
|
-
marginTop: 0,
|
|
26064
|
-
marginBottom: 0,
|
|
26065
|
-
marginRight: "24px",
|
|
26066
|
-
fontFamily: theme?.fontFamily,
|
|
26067
|
-
color: theme?.primaryTextColor,
|
|
26068
|
-
fontSize: theme?.fontSizeSmall || "14px",
|
|
26069
|
-
fontWeight: theme?.fontWeightMedium || "500",
|
|
26070
|
-
minWidth: "60px"
|
|
26071
|
-
},
|
|
26072
|
-
children: valueKeyLabel || valueKey
|
|
26073
|
-
}
|
|
26074
|
-
),
|
|
26075
|
-
/* @__PURE__ */ jsx4(
|
|
26076
|
-
"p",
|
|
26077
|
-
{
|
|
26078
|
-
style: {
|
|
26079
|
-
marginTop: 0,
|
|
26080
|
-
marginBottom: 0,
|
|
26081
|
-
fontFamily: theme?.fontFamily,
|
|
26082
|
-
color: theme?.primaryTextColor,
|
|
26083
|
-
fontSize: theme?.fontSizeSmall || "14px",
|
|
26084
|
-
fontWeight: theme?.fontWeightMedium || "500",
|
|
26085
|
-
minWidth: "40px",
|
|
26086
|
-
textAlign: "right"
|
|
26087
|
-
},
|
|
26088
|
-
children: rawValue
|
|
26089
|
-
}
|
|
26090
|
-
)
|
|
26091
|
-
]
|
|
26092
|
-
}
|
|
26093
|
-
)
|
|
26094
|
-
}
|
|
26095
|
-
)
|
|
26096
|
-
]
|
|
26097
|
-
}
|
|
26098
|
-
);
|
|
26099
|
-
var DonutChartTooltip = ({
|
|
26100
|
-
active,
|
|
26101
|
-
payload,
|
|
26102
|
-
valueFormatter: valueFormatter2,
|
|
26103
|
-
theme,
|
|
26104
|
-
yAxisFields
|
|
26105
|
-
}) => {
|
|
26106
|
-
if (active && payload[0]) {
|
|
26107
|
-
const payloadRow = payload[0];
|
|
26108
|
-
const rawValue = payloadRow.payload[`raw_${payloadRow.dataKey}`];
|
|
26109
|
-
const field = yAxisFields?.find((f) => f.field === payloadRow.dataKey);
|
|
26110
|
-
const formattedRawValue = quillFormat({
|
|
26111
|
-
value: rawValue?.toString() || "",
|
|
26112
|
-
format: field?.format || "string"
|
|
26113
|
-
});
|
|
26114
|
-
return /* @__PURE__ */ jsx4(ChartTooltipFrame, { theme, children: /* @__PURE__ */ jsx4(
|
|
26115
|
-
"div",
|
|
26116
|
-
{
|
|
26117
|
-
style: {
|
|
26118
|
-
paddingLeft: "1rem",
|
|
26119
|
-
paddingRight: "1rem",
|
|
26120
|
-
paddingTop: "8px",
|
|
26121
|
-
paddingBottom: "8px"
|
|
26122
|
-
},
|
|
26123
|
-
children: /* @__PURE__ */ jsx4(
|
|
26124
|
-
ChartTooltipRow,
|
|
26125
|
-
{
|
|
26126
|
-
value: valueFormatter2(payloadRow.value),
|
|
26127
|
-
rawValue: rawValue ? formattedRawValue : void 0,
|
|
26128
|
-
valueKey: payloadRow.dataKey,
|
|
26129
|
-
valueKeyLabel: field?.label,
|
|
26130
|
-
name: payloadRow.name,
|
|
26131
|
-
color: payloadRow.payload.color,
|
|
26132
|
-
theme
|
|
26133
|
-
}
|
|
26134
|
-
)
|
|
26135
|
-
}
|
|
26136
|
-
) });
|
|
26137
|
-
}
|
|
26138
|
-
return null;
|
|
26139
|
-
};
|
|
26140
|
-
var renderCustomizedLabel = ({
|
|
26141
|
-
cx,
|
|
26142
|
-
cy,
|
|
26143
|
-
name: name2,
|
|
26144
|
-
midAngle,
|
|
26145
|
-
outerRadius,
|
|
26146
|
-
percent,
|
|
26147
|
-
tooltipPayload,
|
|
26148
|
-
theme,
|
|
26149
|
-
yAxisFields
|
|
26150
|
-
}) => {
|
|
26151
|
-
const RADIAN = Math.PI / 180;
|
|
26152
|
-
const radius = outerRadius + 25;
|
|
26153
|
-
const x = cx + radius * Math.cos(-midAngle * RADIAN);
|
|
26154
|
-
const y = cy + radius * Math.sin(-midAngle * RADIAN);
|
|
26155
|
-
const category = tooltipPayload?.[0]?.dataKey;
|
|
26156
|
-
const rawValue = tooltipPayload?.[0]?.payload?.[`raw_${category}`];
|
|
26157
|
-
const displayValue = rawValue ? `${rawValue}` : `${(percent * 100).toFixed(0)}%`;
|
|
26158
|
-
const isRightSide = x > cx;
|
|
26159
|
-
const isTopSide = y < cy;
|
|
26160
|
-
const field = yAxisFields?.find(
|
|
26161
|
-
(f) => f.field === tooltipPayload?.[0]?.dataKey
|
|
26162
|
-
);
|
|
26163
|
-
const formattedDisplayValue = quillFormat({
|
|
26164
|
-
value: displayValue?.toString() || "",
|
|
26165
|
-
format: field?.format || "string"
|
|
26166
|
-
});
|
|
26167
|
-
const padding = 10;
|
|
26168
|
-
let textX;
|
|
26169
|
-
if (isRightSide) {
|
|
26170
|
-
textX = x + padding;
|
|
26171
|
-
} else {
|
|
26172
|
-
const longestText = name2.length > displayValue.length ? name2 : displayValue;
|
|
26173
|
-
const estimatedTextWidth = longestText.length * 7;
|
|
26174
|
-
textX = x - padding - estimatedTextWidth;
|
|
26175
|
-
}
|
|
26176
|
-
return /* @__PURE__ */ jsx4("g", { children: isTopSide ? /* @__PURE__ */ jsxs3(Fragment, { children: [
|
|
26177
|
-
/* @__PURE__ */ jsx4(
|
|
26178
|
-
"text",
|
|
26179
|
-
{
|
|
26180
|
-
x: textX,
|
|
26181
|
-
y: y - 8,
|
|
26182
|
-
fill: theme?.secondaryTextColor,
|
|
26183
|
-
textAnchor: "start",
|
|
26184
|
-
dominantBaseline: "central",
|
|
26185
|
-
fontSize: theme?.fontSize || "14px",
|
|
26186
|
-
fontWeight: "500",
|
|
26187
|
-
fontFamily: theme?.fontFamily,
|
|
26188
|
-
children: name2
|
|
26189
|
-
}
|
|
26190
|
-
),
|
|
26191
|
-
/* @__PURE__ */ jsx4(
|
|
26192
|
-
"text",
|
|
26193
|
-
{
|
|
26194
|
-
x: textX,
|
|
26195
|
-
y: y + 8,
|
|
26196
|
-
fill: theme?.secondaryTextColor,
|
|
26197
|
-
textAnchor: "start",
|
|
26198
|
-
dominantBaseline: "central",
|
|
26199
|
-
fontSize: theme?.fontSize || "14px",
|
|
26200
|
-
fontWeight: "400",
|
|
26201
|
-
fontFamily: theme?.fontFamily,
|
|
26202
|
-
children: formattedDisplayValue
|
|
26203
|
-
}
|
|
26204
|
-
)
|
|
26205
|
-
] }) : /* @__PURE__ */ jsxs3(Fragment, { children: [
|
|
26206
|
-
/* @__PURE__ */ jsx4(
|
|
26207
|
-
"text",
|
|
26208
|
-
{
|
|
26209
|
-
x: textX,
|
|
26210
|
-
y: y + 8,
|
|
26211
|
-
fill: theme?.secondaryTextColor,
|
|
26212
|
-
textAnchor: "start",
|
|
26213
|
-
dominantBaseline: "central",
|
|
26214
|
-
fontSize: theme?.fontSize || "14px",
|
|
26215
|
-
fontWeight: "400",
|
|
26216
|
-
fontFamily: theme?.fontFamily,
|
|
26217
|
-
children: formattedDisplayValue
|
|
26218
|
-
}
|
|
26219
|
-
),
|
|
26220
|
-
/* @__PURE__ */ jsx4(
|
|
26221
|
-
"text",
|
|
26222
|
-
{
|
|
26223
|
-
x: textX,
|
|
26224
|
-
y: y - 8,
|
|
26225
|
-
fill: theme?.secondaryTextColor,
|
|
26226
|
-
textAnchor: "start",
|
|
26227
|
-
dominantBaseline: "central",
|
|
26228
|
-
fontSize: theme?.fontSize || "14px",
|
|
26229
|
-
fontWeight: "500",
|
|
26230
|
-
fontFamily: theme?.fontFamily,
|
|
26231
|
-
children: name2
|
|
26232
|
-
}
|
|
26233
|
-
)
|
|
26234
|
-
] }) });
|
|
26235
|
-
};
|
|
26236
|
-
var PieChartWrapper = React3.forwardRef(
|
|
26237
|
-
(props, ref) => {
|
|
26238
|
-
const {
|
|
26239
|
-
category = "pct_of_the_total",
|
|
26240
|
-
index = "status",
|
|
26241
|
-
data,
|
|
26242
|
-
colors = [],
|
|
26243
|
-
colorMap = {},
|
|
26244
|
-
variant = "donut",
|
|
26245
|
-
valueFormatter: valueFormatter2 = defaultValueFormatter,
|
|
26246
|
-
className,
|
|
26247
|
-
containerStyle,
|
|
26248
|
-
theme,
|
|
26249
|
-
onClickChartElement,
|
|
26250
|
-
yAxisFields,
|
|
26251
|
-
showLegend = false,
|
|
26252
|
-
...other
|
|
26253
|
-
} = props;
|
|
26254
|
-
const isDonut = variant == "donut";
|
|
26255
|
-
if (!data || data.length === 0) {
|
|
26256
|
-
return /* @__PURE__ */ jsx4(
|
|
26257
|
-
"div",
|
|
26258
|
-
{
|
|
26259
|
-
style: {
|
|
26260
|
-
display: "flex",
|
|
26261
|
-
flex: "1 0 auto",
|
|
26262
|
-
// height: '100%',
|
|
26263
|
-
margin: "auto",
|
|
26264
|
-
justifyContent: "center",
|
|
26265
|
-
alignItems: "center",
|
|
26266
|
-
fontSize: 13,
|
|
26267
|
-
fontFamily: theme?.fontFamily,
|
|
26268
|
-
color: theme.secondaryTextColor,
|
|
26269
|
-
...containerStyle
|
|
26270
|
-
},
|
|
26271
|
-
className,
|
|
26272
|
-
children: "No results"
|
|
26273
|
-
}
|
|
26274
|
-
);
|
|
26275
|
-
}
|
|
26276
|
-
return /* @__PURE__ */ jsx4(
|
|
26277
|
-
"div",
|
|
26278
|
-
{
|
|
26279
|
-
ref,
|
|
26280
|
-
className,
|
|
26281
|
-
style: {
|
|
26282
|
-
width: "100%",
|
|
26283
|
-
display: "flex",
|
|
26284
|
-
flexDirection: "row",
|
|
26285
|
-
alignItems: "center",
|
|
26286
|
-
justifyContent: "center",
|
|
26287
|
-
boxSizing: "content-box",
|
|
26288
|
-
...containerStyle
|
|
26289
|
-
},
|
|
26290
|
-
...other,
|
|
26291
|
-
children: /* @__PURE__ */ jsx4(
|
|
26292
|
-
ResponsiveContainer,
|
|
26293
|
-
{
|
|
26294
|
-
width: "100%",
|
|
26295
|
-
height: "100%",
|
|
26296
|
-
minWidth: 0,
|
|
26297
|
-
minHeight: 0,
|
|
26298
|
-
children: /* @__PURE__ */ jsxs3(PieChart, { children: [
|
|
26299
|
-
/* @__PURE__ */ jsx4(
|
|
26300
|
-
Pie,
|
|
26301
|
-
{
|
|
26302
|
-
data: parseData2(
|
|
26303
|
-
data,
|
|
26304
|
-
(() => {
|
|
26305
|
-
const colorArray = colorMap[category] && colorMap[category]["primary"] && colorMap[category]["primary"] || colors;
|
|
26306
|
-
const containsCssVars = colorArray.some(
|
|
26307
|
-
(color2) => typeof color2 === "string" && color2.includes("var(")
|
|
26308
|
-
);
|
|
26309
|
-
if (containsCssVars) {
|
|
26310
|
-
return Array.from({ length: data.length }).map(
|
|
26311
|
-
(_, idx) => colorArray[idx % colorArray.length] ?? colorArray[colorArray.length - 1] ?? "#808080"
|
|
26312
|
-
);
|
|
26313
|
-
}
|
|
26314
|
-
return colorArray.length >= data.length ? colorArray.slice(0, data.length) : generateArrayFromColor(colorArray, data.length);
|
|
26315
|
-
})(),
|
|
26316
|
-
index,
|
|
26317
|
-
category
|
|
26318
|
-
),
|
|
26319
|
-
cx: "50%",
|
|
26320
|
-
cy: "50%",
|
|
26321
|
-
startAngle: 90,
|
|
26322
|
-
endAngle: -270,
|
|
26323
|
-
innerRadius: isDonut ? showLegend ? "50%" : "70%" : "0%",
|
|
26324
|
-
outerRadius: showLegend ? "70%" : "100%",
|
|
26325
|
-
paddingAngle: 0,
|
|
26326
|
-
dataKey: category,
|
|
26327
|
-
nameKey: index,
|
|
26328
|
-
isAnimationActive: true,
|
|
26329
|
-
onClick: onClickChartElement,
|
|
26330
|
-
labelLine: false,
|
|
26331
|
-
label: showLegend ? (props2) => renderCustomizedLabel({ ...props2, theme, yAxisFields }) : void 0
|
|
26332
|
-
}
|
|
26333
|
-
),
|
|
26334
|
-
/* @__PURE__ */ jsx4(
|
|
26335
|
-
Tooltip,
|
|
26336
|
-
{
|
|
26337
|
-
wrapperStyle: {
|
|
26338
|
-
outline: "none"
|
|
26339
|
-
},
|
|
26340
|
-
content: ({ active, payload }) => {
|
|
26341
|
-
return /* @__PURE__ */ jsx4(
|
|
26342
|
-
DonutChartTooltip,
|
|
26343
|
-
{
|
|
26344
|
-
active,
|
|
26345
|
-
payload,
|
|
26346
|
-
valueFormatter: valueFormatter2,
|
|
26347
|
-
theme,
|
|
26348
|
-
yAxisFields
|
|
26349
|
-
}
|
|
26350
|
-
);
|
|
26351
|
-
}
|
|
26352
|
-
}
|
|
26353
|
-
)
|
|
26354
|
-
] })
|
|
26355
|
-
}
|
|
26356
|
-
)
|
|
26357
|
-
}
|
|
26358
|
-
);
|
|
26359
|
-
}
|
|
26360
|
-
);
|
|
26361
|
-
var PieChart_default = PieChartWrapper;
|
|
26362
25893
|
|
|
26363
|
-
// src/components/
|
|
26364
|
-
|
|
26365
|
-
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";
|
|
26366
25896
|
|
|
26367
25897
|
// src/components/UiComponents.tsx
|
|
26368
25898
|
import {
|
|
@@ -26374,54 +25904,54 @@ import {
|
|
|
26374
25904
|
} from "react";
|
|
26375
25905
|
|
|
26376
25906
|
// src/assets/ArrowDownHeadIcon.tsx
|
|
26377
|
-
import { jsx as
|
|
25907
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
26378
25908
|
|
|
26379
25909
|
// src/assets/ArrowDownRightIcon.tsx
|
|
26380
|
-
import { jsx as
|
|
25910
|
+
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
26381
25911
|
|
|
26382
25912
|
// src/assets/ArrowDownIcon.tsx
|
|
26383
|
-
import { jsx as
|
|
25913
|
+
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
26384
25914
|
|
|
26385
25915
|
// src/assets/ArrowRightIcon.tsx
|
|
26386
|
-
import { jsx as
|
|
25916
|
+
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
26387
25917
|
|
|
26388
25918
|
// src/assets/ArrowRightHeadIcon.tsx
|
|
26389
|
-
import { jsx as
|
|
25919
|
+
import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
26390
25920
|
|
|
26391
25921
|
// src/assets/ArrowLeftHeadIcon.tsx
|
|
26392
|
-
import { jsx as
|
|
25922
|
+
import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
26393
25923
|
|
|
26394
25924
|
// src/assets/DoubleArrowLeftHeadIcon.tsx
|
|
26395
|
-
import { jsx as
|
|
25925
|
+
import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
26396
25926
|
|
|
26397
25927
|
// src/assets/DoubleArrowRightHeadIcon.tsx
|
|
26398
|
-
import { jsx as
|
|
25928
|
+
import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
26399
25929
|
|
|
26400
25930
|
// src/assets/ArrowUpHeadIcon.tsx
|
|
26401
|
-
import { jsx as
|
|
25931
|
+
import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
26402
25932
|
|
|
26403
25933
|
// src/assets/ArrowUpIcon.tsx
|
|
26404
|
-
import { jsx as
|
|
25934
|
+
import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
26405
25935
|
|
|
26406
25936
|
// src/assets/ArrowUpRightIcon.tsx
|
|
26407
|
-
import { jsx as
|
|
25937
|
+
import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
26408
25938
|
|
|
26409
25939
|
// src/assets/CalendarIcon.tsx
|
|
26410
|
-
import { jsx as
|
|
25940
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
26411
25941
|
|
|
26412
25942
|
// src/assets/CalendarNormalIcon.tsx
|
|
26413
|
-
import { jsx as
|
|
25943
|
+
import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
26414
25944
|
|
|
26415
25945
|
// src/assets/ExclamationFilledIcon.tsx
|
|
26416
|
-
import { jsx as
|
|
26417
|
-
var ExclamationFilledIcon = ({ ...props }) => /* @__PURE__ */
|
|
25946
|
+
import { jsx as jsx17 } from "react/jsx-runtime";
|
|
25947
|
+
var ExclamationFilledIcon = ({ ...props }) => /* @__PURE__ */ jsx17(
|
|
26418
25948
|
"svg",
|
|
26419
25949
|
{
|
|
26420
25950
|
...props,
|
|
26421
25951
|
xmlns: "http://www.w3.org/2000/svg",
|
|
26422
25952
|
viewBox: "0 0 24 24",
|
|
26423
25953
|
fill: "currentColor",
|
|
26424
|
-
children: /* @__PURE__ */
|
|
25954
|
+
children: /* @__PURE__ */ jsx17(
|
|
26425
25955
|
"path",
|
|
26426
25956
|
{
|
|
26427
25957
|
fillRule: "evenodd",
|
|
@@ -26434,20 +25964,20 @@ var ExclamationFilledIcon = ({ ...props }) => /* @__PURE__ */ jsx18(
|
|
|
26434
25964
|
var ExclamationFilledIcon_default = ExclamationFilledIcon;
|
|
26435
25965
|
|
|
26436
25966
|
// src/assets/SearchIcon.tsx
|
|
26437
|
-
import { jsx as
|
|
25967
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
26438
25968
|
|
|
26439
25969
|
// src/assets/XCircleIcon.tsx
|
|
26440
|
-
import { jsx as
|
|
25970
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
26441
25971
|
|
|
26442
25972
|
// src/assets/RefreshIcon.tsx
|
|
26443
|
-
import { jsx as
|
|
25973
|
+
import { jsx as jsx20 } from "react/jsx-runtime";
|
|
26444
25974
|
|
|
26445
25975
|
// src/assets/FilterIcon.tsx
|
|
26446
|
-
import { jsx as
|
|
25976
|
+
import { jsx as jsx21, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
26447
25977
|
|
|
26448
25978
|
// src/assets/MoreIcon.tsx
|
|
26449
|
-
import { jsx as
|
|
26450
|
-
var MoreIcon = ({ ...props }) => /* @__PURE__ */
|
|
25979
|
+
import { jsx as jsx22, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
25980
|
+
var MoreIcon = ({ ...props }) => /* @__PURE__ */ jsxs15(
|
|
26451
25981
|
"svg",
|
|
26452
25982
|
{
|
|
26453
25983
|
width: "24",
|
|
@@ -26457,20 +25987,20 @@ var MoreIcon = ({ ...props }) => /* @__PURE__ */ jsxs16(
|
|
|
26457
25987
|
xmlns: "http://www.w3.org/2000/svg",
|
|
26458
25988
|
...props,
|
|
26459
25989
|
children: [
|
|
26460
|
-
/* @__PURE__ */
|
|
26461
|
-
/* @__PURE__ */
|
|
26462
|
-
/* @__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" })
|
|
26463
25993
|
]
|
|
26464
25994
|
}
|
|
26465
25995
|
);
|
|
26466
25996
|
var MoreIcon_default = MoreIcon;
|
|
26467
25997
|
|
|
26468
25998
|
// src/assets/UpLeftArrowsIcon.tsx
|
|
26469
|
-
import { jsx as
|
|
25999
|
+
import { jsx as jsx23, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
26470
26000
|
|
|
26471
26001
|
// src/assets/XIcon.tsx
|
|
26472
|
-
import { jsx as
|
|
26473
|
-
var XIcon = ({ ...props }) => /* @__PURE__ */
|
|
26002
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
26003
|
+
var XIcon = ({ ...props }) => /* @__PURE__ */ jsx24(
|
|
26474
26004
|
"svg",
|
|
26475
26005
|
{
|
|
26476
26006
|
...props,
|
|
@@ -26478,7 +26008,7 @@ var XIcon = ({ ...props }) => /* @__PURE__ */ jsx25(
|
|
|
26478
26008
|
viewBox: "0 0 24 24",
|
|
26479
26009
|
height: "20",
|
|
26480
26010
|
width: "20",
|
|
26481
|
-
children: /* @__PURE__ */
|
|
26011
|
+
children: /* @__PURE__ */ jsx24(
|
|
26482
26012
|
"path",
|
|
26483
26013
|
{
|
|
26484
26014
|
fillRule: "evenodd",
|
|
@@ -26492,14 +26022,14 @@ var XIcon_default = XIcon;
|
|
|
26492
26022
|
|
|
26493
26023
|
// src/components/Chart/ChartSkeleton.tsx
|
|
26494
26024
|
import { useContext as useContext3 } from "react";
|
|
26495
|
-
import { jsx as
|
|
26496
|
-
var QuillLoadingSkeleton = () => /* @__PURE__ */
|
|
26025
|
+
import { jsx as jsx25, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
26026
|
+
var QuillLoadingSkeleton = () => /* @__PURE__ */ jsx25(ChartSkeleton, {});
|
|
26497
26027
|
function ChartSkeleton({
|
|
26498
26028
|
className,
|
|
26499
26029
|
containerStyle
|
|
26500
26030
|
}) {
|
|
26501
26031
|
const [theme] = useContext3(ThemeContext);
|
|
26502
|
-
return /* @__PURE__ */
|
|
26032
|
+
return /* @__PURE__ */ jsx25(
|
|
26503
26033
|
"div",
|
|
26504
26034
|
{
|
|
26505
26035
|
style: {
|
|
@@ -26509,7 +26039,7 @@ function ChartSkeleton({
|
|
|
26509
26039
|
...containerStyle
|
|
26510
26040
|
},
|
|
26511
26041
|
className,
|
|
26512
|
-
children: /* @__PURE__ */
|
|
26042
|
+
children: /* @__PURE__ */ jsx25(
|
|
26513
26043
|
"div",
|
|
26514
26044
|
{
|
|
26515
26045
|
style: {
|
|
@@ -26519,7 +26049,7 @@ function ChartSkeleton({
|
|
|
26519
26049
|
borderRadius: 8,
|
|
26520
26050
|
overflow: "hidden"
|
|
26521
26051
|
},
|
|
26522
|
-
children: /* @__PURE__ */
|
|
26052
|
+
children: /* @__PURE__ */ jsxs17(
|
|
26523
26053
|
"svg",
|
|
26524
26054
|
{
|
|
26525
26055
|
width: "100%",
|
|
@@ -26527,7 +26057,7 @@ function ChartSkeleton({
|
|
|
26527
26057
|
xmlns: "http://www.w3.org/2000/svg",
|
|
26528
26058
|
xmlnsXlink: "http://www.w3.org/1999/xlink",
|
|
26529
26059
|
children: [
|
|
26530
|
-
/* @__PURE__ */
|
|
26060
|
+
/* @__PURE__ */ jsx25(
|
|
26531
26061
|
"rect",
|
|
26532
26062
|
{
|
|
26533
26063
|
width: "100%",
|
|
@@ -26535,7 +26065,7 @@ function ChartSkeleton({
|
|
|
26535
26065
|
fill: theme?.loadingStateBackgroundColor || "#F9F9FA"
|
|
26536
26066
|
}
|
|
26537
26067
|
),
|
|
26538
|
-
/* @__PURE__ */
|
|
26068
|
+
/* @__PURE__ */ jsx25("defs", { fill: theme?.loadingStateBackgroundColor || "#F9F9FA", children: /* @__PURE__ */ jsxs17(
|
|
26539
26069
|
"linearGradient",
|
|
26540
26070
|
{
|
|
26541
26071
|
id: "skeletonGradient",
|
|
@@ -26545,10 +26075,10 @@ function ChartSkeleton({
|
|
|
26545
26075
|
y2: "0%",
|
|
26546
26076
|
gradientUnits: "userSpaceOnUse",
|
|
26547
26077
|
children: [
|
|
26548
|
-
/* @__PURE__ */
|
|
26549
|
-
/* @__PURE__ */
|
|
26550
|
-
/* @__PURE__ */
|
|
26551
|
-
/* @__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(
|
|
26552
26082
|
"animate",
|
|
26553
26083
|
{
|
|
26554
26084
|
attributeName: "x1",
|
|
@@ -26558,7 +26088,7 @@ function ChartSkeleton({
|
|
|
26558
26088
|
repeatCount: "indefinite"
|
|
26559
26089
|
}
|
|
26560
26090
|
),
|
|
26561
|
-
/* @__PURE__ */
|
|
26091
|
+
/* @__PURE__ */ jsx25(
|
|
26562
26092
|
"animate",
|
|
26563
26093
|
{
|
|
26564
26094
|
attributeName: "x2",
|
|
@@ -26571,7 +26101,7 @@ function ChartSkeleton({
|
|
|
26571
26101
|
]
|
|
26572
26102
|
}
|
|
26573
26103
|
) }),
|
|
26574
|
-
/* @__PURE__ */
|
|
26104
|
+
/* @__PURE__ */ jsx25("rect", { width: "50%", height: "100%", fill: "url(#skeletonGradient)", children: /* @__PURE__ */ jsx25(
|
|
26575
26105
|
"animate",
|
|
26576
26106
|
{
|
|
26577
26107
|
attributeName: "x",
|
|
@@ -26801,7 +26331,7 @@ var getScrollableParent = (element) => {
|
|
|
26801
26331
|
};
|
|
26802
26332
|
|
|
26803
26333
|
// src/components/UiComponents.tsx
|
|
26804
|
-
import { Fragment
|
|
26334
|
+
import { Fragment, jsx as jsx26, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
26805
26335
|
var QuillTextInput = forwardRef(
|
|
26806
26336
|
({
|
|
26807
26337
|
id: id2,
|
|
@@ -26815,7 +26345,7 @@ var QuillTextInput = forwardRef(
|
|
|
26815
26345
|
const [theme] = useContext4(ThemeContext);
|
|
26816
26346
|
const isNumericWidth = typeof width === "number";
|
|
26817
26347
|
const resolvedWidth = typeof width === "string" ? width : isNumericWidth ? width : "100%";
|
|
26818
|
-
return /* @__PURE__ */
|
|
26348
|
+
return /* @__PURE__ */ jsxs18(
|
|
26819
26349
|
"label",
|
|
26820
26350
|
{
|
|
26821
26351
|
style: {
|
|
@@ -26828,7 +26358,7 @@ var QuillTextInput = forwardRef(
|
|
|
26828
26358
|
flex: isNumericWidth ? "0 0 auto" : "1 1 auto"
|
|
26829
26359
|
},
|
|
26830
26360
|
children: [
|
|
26831
|
-
label && /* @__PURE__ */
|
|
26361
|
+
label && /* @__PURE__ */ jsx26(
|
|
26832
26362
|
"div",
|
|
26833
26363
|
{
|
|
26834
26364
|
style: {
|
|
@@ -26841,7 +26371,7 @@ var QuillTextInput = forwardRef(
|
|
|
26841
26371
|
children: label
|
|
26842
26372
|
}
|
|
26843
26373
|
),
|
|
26844
|
-
/* @__PURE__ */
|
|
26374
|
+
/* @__PURE__ */ jsx26(
|
|
26845
26375
|
"input",
|
|
26846
26376
|
{
|
|
26847
26377
|
ref,
|
|
@@ -26883,12 +26413,12 @@ var MemoizedButton = ({
|
|
|
26883
26413
|
isLoading
|
|
26884
26414
|
}) => {
|
|
26885
26415
|
const [theme] = useContext4(ThemeContext);
|
|
26886
|
-
return /* @__PURE__ */
|
|
26416
|
+
return /* @__PURE__ */ jsx26(
|
|
26887
26417
|
QuillToolTipPortal,
|
|
26888
26418
|
{
|
|
26889
26419
|
enabled: !!tooltipText && tooltipText !== "",
|
|
26890
26420
|
text: tooltipText ?? "",
|
|
26891
|
-
children: /* @__PURE__ */
|
|
26421
|
+
children: /* @__PURE__ */ jsxs18(
|
|
26892
26422
|
"button",
|
|
26893
26423
|
{
|
|
26894
26424
|
className: disabled ? "quill-button-disabled" : "quill-button",
|
|
@@ -26914,7 +26444,7 @@ var MemoizedButton = ({
|
|
|
26914
26444
|
justifyContent: "center"
|
|
26915
26445
|
},
|
|
26916
26446
|
children: [
|
|
26917
|
-
/* @__PURE__ */
|
|
26447
|
+
/* @__PURE__ */ jsx26("style", { children: `
|
|
26918
26448
|
.quill-button {
|
|
26919
26449
|
background-color: ${theme?.primaryButtonColor};
|
|
26920
26450
|
color: ${theme?.primaryButtonTextColor ?? "white"};
|
|
@@ -26928,8 +26458,8 @@ var MemoizedButton = ({
|
|
|
26928
26458
|
background-color: ${theme?.hoverPrimaryButtonColor};
|
|
26929
26459
|
color: ${theme?.hoverPrimaryButtonTextColor ?? "white"};
|
|
26930
26460
|
}` }),
|
|
26931
|
-
isLoading ? /* @__PURE__ */
|
|
26932
|
-
/* @__PURE__ */
|
|
26461
|
+
isLoading ? /* @__PURE__ */ jsx26("div", { style: { position: "absolute" }, children: /* @__PURE__ */ jsx26(LoadingSpinner, {}) }) : null,
|
|
26462
|
+
/* @__PURE__ */ jsxs18(
|
|
26933
26463
|
"div",
|
|
26934
26464
|
{
|
|
26935
26465
|
style: {
|
|
@@ -26956,12 +26486,12 @@ var MemoizedSecondaryButton = ({
|
|
|
26956
26486
|
width
|
|
26957
26487
|
}) => {
|
|
26958
26488
|
const [theme] = useContext4(ThemeContext);
|
|
26959
|
-
return /* @__PURE__ */
|
|
26489
|
+
return /* @__PURE__ */ jsx26(
|
|
26960
26490
|
QuillToolTip,
|
|
26961
26491
|
{
|
|
26962
26492
|
enabled: !!tooltipText && tooltipText !== "",
|
|
26963
26493
|
text: tooltipText ?? "",
|
|
26964
|
-
children: /* @__PURE__ */
|
|
26494
|
+
children: /* @__PURE__ */ jsxs18(
|
|
26965
26495
|
"button",
|
|
26966
26496
|
{
|
|
26967
26497
|
className: "quill-secondary-button",
|
|
@@ -26988,7 +26518,7 @@ var MemoizedSecondaryButton = ({
|
|
|
26988
26518
|
},
|
|
26989
26519
|
disabled,
|
|
26990
26520
|
children: [
|
|
26991
|
-
/* @__PURE__ */
|
|
26521
|
+
/* @__PURE__ */ jsx26("style", { children: `
|
|
26992
26522
|
.quill-secondary-button {
|
|
26993
26523
|
background-color: white;
|
|
26994
26524
|
}
|
|
@@ -27008,8 +26538,8 @@ var MemoizedSecondaryButton = ({
|
|
|
27008
26538
|
flex-shrink: 0;
|
|
27009
26539
|
}
|
|
27010
26540
|
` }),
|
|
27011
|
-
icon && /* @__PURE__ */
|
|
27012
|
-
label && /* @__PURE__ */
|
|
26541
|
+
icon && /* @__PURE__ */ jsx26("div", { className: "icon-container", children: icon }),
|
|
26542
|
+
label && /* @__PURE__ */ jsx26(
|
|
27013
26543
|
"span",
|
|
27014
26544
|
{
|
|
27015
26545
|
style: {
|
|
@@ -27030,7 +26560,7 @@ var MemoizedSecondaryButton = ({
|
|
|
27030
26560
|
};
|
|
27031
26561
|
var MemoizedHeader = ({ label }) => {
|
|
27032
26562
|
const [theme] = useContext4(ThemeContext);
|
|
27033
|
-
return /* @__PURE__ */
|
|
26563
|
+
return /* @__PURE__ */ jsx26(
|
|
27034
26564
|
"h1",
|
|
27035
26565
|
{
|
|
27036
26566
|
style: {
|
|
@@ -27048,7 +26578,7 @@ var MemoizedHeader = ({ label }) => {
|
|
|
27048
26578
|
};
|
|
27049
26579
|
var MemoizedSubHeader = ({ label }) => {
|
|
27050
26580
|
const [theme] = useContext4(ThemeContext);
|
|
27051
|
-
return /* @__PURE__ */
|
|
26581
|
+
return /* @__PURE__ */ jsx26(
|
|
27052
26582
|
"h2",
|
|
27053
26583
|
{
|
|
27054
26584
|
style: {
|
|
@@ -27067,7 +26597,7 @@ var MemoizedSubHeader = ({ label }) => {
|
|
|
27067
26597
|
};
|
|
27068
26598
|
var MemoizedLabel = ({ label }) => {
|
|
27069
26599
|
const [theme] = useContext4(ThemeContext);
|
|
27070
|
-
return /* @__PURE__ */
|
|
26600
|
+
return /* @__PURE__ */ jsx26(
|
|
27071
26601
|
"h1",
|
|
27072
26602
|
{
|
|
27073
26603
|
style: {
|
|
@@ -27090,7 +26620,7 @@ var MemoizedCheckbox = ({
|
|
|
27090
26620
|
disabled
|
|
27091
26621
|
}) => {
|
|
27092
26622
|
const [theme] = useContext4(ThemeContext);
|
|
27093
|
-
return /* @__PURE__ */
|
|
26623
|
+
return /* @__PURE__ */ jsxs18(
|
|
27094
26624
|
"label",
|
|
27095
26625
|
{
|
|
27096
26626
|
style: {
|
|
@@ -27103,7 +26633,7 @@ var MemoizedCheckbox = ({
|
|
|
27103
26633
|
...containerStyle
|
|
27104
26634
|
},
|
|
27105
26635
|
children: [
|
|
27106
|
-
/* @__PURE__ */
|
|
26636
|
+
/* @__PURE__ */ jsx26(
|
|
27107
26637
|
"input",
|
|
27108
26638
|
{
|
|
27109
26639
|
type: "checkbox",
|
|
@@ -27118,7 +26648,7 @@ var MemoizedCheckbox = ({
|
|
|
27118
26648
|
}
|
|
27119
26649
|
}
|
|
27120
26650
|
),
|
|
27121
|
-
/* @__PURE__ */
|
|
26651
|
+
/* @__PURE__ */ jsx26(
|
|
27122
26652
|
"span",
|
|
27123
26653
|
{
|
|
27124
26654
|
style: {
|
|
@@ -27147,7 +26677,7 @@ var QuillTabs = ({
|
|
|
27147
26677
|
options = DEFAULT_TAB_OPTIONS,
|
|
27148
26678
|
value,
|
|
27149
26679
|
onChange
|
|
27150
|
-
}) => /* @__PURE__ */
|
|
26680
|
+
}) => /* @__PURE__ */ jsx26(
|
|
27151
26681
|
"div",
|
|
27152
26682
|
{
|
|
27153
26683
|
style: {
|
|
@@ -27158,7 +26688,7 @@ var QuillTabs = ({
|
|
|
27158
26688
|
background: "#F9FAFB",
|
|
27159
26689
|
padding: "5px"
|
|
27160
26690
|
},
|
|
27161
|
-
children: options.map((option, index) => /* @__PURE__ */
|
|
26691
|
+
children: options.map((option, index) => /* @__PURE__ */ jsx26(
|
|
27162
26692
|
"button",
|
|
27163
26693
|
{
|
|
27164
26694
|
onClick: () => {
|
|
@@ -27199,7 +26729,7 @@ var QuillTabs = ({
|
|
|
27199
26729
|
);
|
|
27200
26730
|
var MemoizedText = ({ label }) => {
|
|
27201
26731
|
const [theme] = useContext4(ThemeContext);
|
|
27202
|
-
return /* @__PURE__ */
|
|
26732
|
+
return /* @__PURE__ */ jsx26(
|
|
27203
26733
|
"p",
|
|
27204
26734
|
{
|
|
27205
26735
|
style: {
|
|
@@ -27270,15 +26800,15 @@ var MemoizedPopover = ({
|
|
|
27270
26800
|
}
|
|
27271
26801
|
}
|
|
27272
26802
|
};
|
|
27273
|
-
return /* @__PURE__ */
|
|
26803
|
+
return /* @__PURE__ */ jsxs18("div", { style: containerStyle, children: [
|
|
27274
26804
|
triggerLabel,
|
|
27275
|
-
!disabled && isOpen && /* @__PURE__ */
|
|
26805
|
+
!disabled && isOpen && /* @__PURE__ */ jsx26(
|
|
27276
26806
|
"div",
|
|
27277
26807
|
{
|
|
27278
26808
|
id: "quill-popover-modal",
|
|
27279
26809
|
ref: modalRef,
|
|
27280
26810
|
style: { position: "relative" },
|
|
27281
|
-
children: /* @__PURE__ */
|
|
26811
|
+
children: /* @__PURE__ */ jsxs18(
|
|
27282
26812
|
"div",
|
|
27283
26813
|
{
|
|
27284
26814
|
ref: popoverRef,
|
|
@@ -27295,7 +26825,7 @@ var MemoizedPopover = ({
|
|
|
27295
26825
|
right: rightAlignment
|
|
27296
26826
|
},
|
|
27297
26827
|
children: [
|
|
27298
|
-
popoverTitle && /* @__PURE__ */
|
|
26828
|
+
popoverTitle && /* @__PURE__ */ jsx26(
|
|
27299
26829
|
"h1",
|
|
27300
26830
|
{
|
|
27301
26831
|
style: {
|
|
@@ -27331,8 +26861,8 @@ function MemoizedModal({
|
|
|
27331
26861
|
if (!isOpen) {
|
|
27332
26862
|
return null;
|
|
27333
26863
|
}
|
|
27334
|
-
return /* @__PURE__ */
|
|
27335
|
-
/* @__PURE__ */
|
|
26864
|
+
return /* @__PURE__ */ jsxs18(Fragment, { children: [
|
|
26865
|
+
/* @__PURE__ */ jsx26(
|
|
27336
26866
|
"div",
|
|
27337
26867
|
{
|
|
27338
26868
|
style: {
|
|
@@ -27348,7 +26878,7 @@ function MemoizedModal({
|
|
|
27348
26878
|
onClick: () => setIsOpen(false)
|
|
27349
26879
|
}
|
|
27350
26880
|
),
|
|
27351
|
-
/* @__PURE__ */
|
|
26881
|
+
/* @__PURE__ */ jsx26(
|
|
27352
26882
|
"div",
|
|
27353
26883
|
{
|
|
27354
26884
|
style: {
|
|
@@ -27371,7 +26901,7 @@ function MemoizedModal({
|
|
|
27371
26901
|
maxWidth: "calc(100vw - 82px)",
|
|
27372
26902
|
maxHeight: "calc(100vh - 82px)"
|
|
27373
26903
|
},
|
|
27374
|
-
children: /* @__PURE__ */
|
|
26904
|
+
children: /* @__PURE__ */ jsxs18(
|
|
27375
26905
|
"div",
|
|
27376
26906
|
{
|
|
27377
26907
|
style: {
|
|
@@ -27385,7 +26915,7 @@ function MemoizedModal({
|
|
|
27385
26915
|
fontFamily: theme?.fontFamily
|
|
27386
26916
|
},
|
|
27387
26917
|
children: [
|
|
27388
|
-
/* @__PURE__ */
|
|
26918
|
+
/* @__PURE__ */ jsxs18(
|
|
27389
26919
|
"div",
|
|
27390
26920
|
{
|
|
27391
26921
|
id: "quill-modal-header",
|
|
@@ -27400,7 +26930,7 @@ function MemoizedModal({
|
|
|
27400
26930
|
borderBottom: "1px solid #E7E7E7"
|
|
27401
26931
|
},
|
|
27402
26932
|
children: [
|
|
27403
|
-
/* @__PURE__ */
|
|
26933
|
+
/* @__PURE__ */ jsx26(
|
|
27404
26934
|
"h2",
|
|
27405
26935
|
{
|
|
27406
26936
|
style: {
|
|
@@ -27414,11 +26944,11 @@ function MemoizedModal({
|
|
|
27414
26944
|
children: title
|
|
27415
26945
|
}
|
|
27416
26946
|
),
|
|
27417
|
-
/* @__PURE__ */
|
|
26947
|
+
/* @__PURE__ */ jsx26(MemoizedDeleteButton, { onClick: () => setIsOpen(false) })
|
|
27418
26948
|
]
|
|
27419
26949
|
}
|
|
27420
26950
|
),
|
|
27421
|
-
/* @__PURE__ */
|
|
26951
|
+
/* @__PURE__ */ jsx26(
|
|
27422
26952
|
"div",
|
|
27423
26953
|
{
|
|
27424
26954
|
style: {
|
|
@@ -27439,7 +26969,7 @@ function MemoizedModal({
|
|
|
27439
26969
|
}
|
|
27440
26970
|
var MemoizedDeleteButton = ({
|
|
27441
26971
|
onClick
|
|
27442
|
-
}) => /* @__PURE__ */
|
|
26972
|
+
}) => /* @__PURE__ */ jsxs18(
|
|
27443
26973
|
"button",
|
|
27444
26974
|
{
|
|
27445
26975
|
className: "quill-delete-button",
|
|
@@ -27456,18 +26986,18 @@ var MemoizedDeleteButton = ({
|
|
|
27456
26986
|
borderRadius: 6
|
|
27457
26987
|
},
|
|
27458
26988
|
children: [
|
|
27459
|
-
/* @__PURE__ */
|
|
26989
|
+
/* @__PURE__ */ jsx26("style", { children: `
|
|
27460
26990
|
.quill-delete-button {
|
|
27461
26991
|
background-color: white;
|
|
27462
26992
|
}
|
|
27463
26993
|
.quill-delete-button:hover {
|
|
27464
26994
|
background-color: #F4F4F5;
|
|
27465
26995
|
}` }),
|
|
27466
|
-
/* @__PURE__ */
|
|
26996
|
+
/* @__PURE__ */ jsx26(XIcon_default, { height: "20", width: "20", fill: "#6C727F" })
|
|
27467
26997
|
]
|
|
27468
26998
|
}
|
|
27469
26999
|
);
|
|
27470
|
-
var LoadingSpinner = () => /* @__PURE__ */
|
|
27000
|
+
var LoadingSpinner = () => /* @__PURE__ */ jsx26(
|
|
27471
27001
|
"div",
|
|
27472
27002
|
{
|
|
27473
27003
|
style: {
|
|
@@ -27478,8 +27008,8 @@ var LoadingSpinner = () => /* @__PURE__ */ jsx27(
|
|
|
27478
27008
|
justifyContent: "center",
|
|
27479
27009
|
alignItems: "center"
|
|
27480
27010
|
},
|
|
27481
|
-
children: /* @__PURE__ */
|
|
27482
|
-
/* @__PURE__ */
|
|
27011
|
+
children: /* @__PURE__ */ jsxs18("svg", { width: "24", height: "24", children: [
|
|
27012
|
+
/* @__PURE__ */ jsx26(
|
|
27483
27013
|
"circle",
|
|
27484
27014
|
{
|
|
27485
27015
|
cx: "12",
|
|
@@ -27491,7 +27021,7 @@ var LoadingSpinner = () => /* @__PURE__ */ jsx27(
|
|
|
27491
27021
|
stroke: "#364153",
|
|
27492
27022
|
fill: "none",
|
|
27493
27023
|
transform: "rotate(-90 12 12)",
|
|
27494
|
-
children: /* @__PURE__ */
|
|
27024
|
+
children: /* @__PURE__ */ jsx26(
|
|
27495
27025
|
"animateTransform",
|
|
27496
27026
|
{
|
|
27497
27027
|
attributeName: "transform",
|
|
@@ -27505,7 +27035,7 @@ var LoadingSpinner = () => /* @__PURE__ */ jsx27(
|
|
|
27505
27035
|
)
|
|
27506
27036
|
}
|
|
27507
27037
|
),
|
|
27508
|
-
/* @__PURE__ */
|
|
27038
|
+
/* @__PURE__ */ jsx26(
|
|
27509
27039
|
"circle",
|
|
27510
27040
|
{
|
|
27511
27041
|
cx: "12",
|
|
@@ -27517,7 +27047,7 @@ var LoadingSpinner = () => /* @__PURE__ */ jsx27(
|
|
|
27517
27047
|
stroke: "#ADB1B9",
|
|
27518
27048
|
fill: "none",
|
|
27519
27049
|
transform: "rotate(90 12 12)",
|
|
27520
|
-
children: /* @__PURE__ */
|
|
27050
|
+
children: /* @__PURE__ */ jsx26(
|
|
27521
27051
|
"animateTransform",
|
|
27522
27052
|
{
|
|
27523
27053
|
attributeName: "transform",
|
|
@@ -27534,7 +27064,7 @@ var LoadingSpinner = () => /* @__PURE__ */ jsx27(
|
|
|
27534
27064
|
] })
|
|
27535
27065
|
}
|
|
27536
27066
|
);
|
|
27537
|
-
var QuillEmptyDashboardComponent = () => /* @__PURE__ */
|
|
27067
|
+
var QuillEmptyDashboardComponent = () => /* @__PURE__ */ jsx26("div", {});
|
|
27538
27068
|
var defaultFilterContainerStyles = {
|
|
27539
27069
|
display: "flex",
|
|
27540
27070
|
width: "100%",
|
|
@@ -27546,9 +27076,9 @@ var QuillLoadingDashboardComponent = ({
|
|
|
27546
27076
|
chartContainerStyle,
|
|
27547
27077
|
LoadingComponent = QuillLoadingSkeleton
|
|
27548
27078
|
}) => {
|
|
27549
|
-
return /* @__PURE__ */
|
|
27550
|
-
/* @__PURE__ */
|
|
27551
|
-
/* @__PURE__ */
|
|
27079
|
+
return /* @__PURE__ */ jsxs18("div", { style: { ...containerStyle, overflow: "hidden" }, children: [
|
|
27080
|
+
/* @__PURE__ */ jsx26("div", { style: defaultFilterContainerStyles, children: /* @__PURE__ */ jsx26(LoadingComponent, {}) }),
|
|
27081
|
+
/* @__PURE__ */ jsx26(
|
|
27552
27082
|
"div",
|
|
27553
27083
|
{
|
|
27554
27084
|
style: {
|
|
@@ -27557,7 +27087,7 @@ var QuillLoadingDashboardComponent = ({
|
|
|
27557
27087
|
gridTemplateRows: `repeat(${170}px)`,
|
|
27558
27088
|
gap: 40
|
|
27559
27089
|
},
|
|
27560
|
-
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))
|
|
27561
27091
|
}
|
|
27562
27092
|
)
|
|
27563
27093
|
] });
|
|
@@ -27565,7 +27095,7 @@ var QuillLoadingDashboardComponent = ({
|
|
|
27565
27095
|
var QuillChartBuilderInputRowContainer = ({
|
|
27566
27096
|
children
|
|
27567
27097
|
}) => {
|
|
27568
|
-
return /* @__PURE__ */
|
|
27098
|
+
return /* @__PURE__ */ jsx26(
|
|
27569
27099
|
"div",
|
|
27570
27100
|
{
|
|
27571
27101
|
style: {
|
|
@@ -27580,7 +27110,7 @@ var QuillChartBuilderInputRowContainer = ({
|
|
|
27580
27110
|
var QuillChartBuilderInputColumnContainer = ({
|
|
27581
27111
|
children
|
|
27582
27112
|
}) => {
|
|
27583
|
-
return /* @__PURE__ */
|
|
27113
|
+
return /* @__PURE__ */ jsx26(
|
|
27584
27114
|
"div",
|
|
27585
27115
|
{
|
|
27586
27116
|
style: {
|
|
@@ -27595,7 +27125,7 @@ var QuillChartBuilderInputColumnContainer = ({
|
|
|
27595
27125
|
var QuillPivotRowContainer = ({
|
|
27596
27126
|
children
|
|
27597
27127
|
}) => {
|
|
27598
|
-
return /* @__PURE__ */
|
|
27128
|
+
return /* @__PURE__ */ jsx26(
|
|
27599
27129
|
"div",
|
|
27600
27130
|
{
|
|
27601
27131
|
style: {
|
|
@@ -27610,7 +27140,7 @@ var QuillPivotRowContainer = ({
|
|
|
27610
27140
|
var QuillPivotColumnContainer = ({
|
|
27611
27141
|
children
|
|
27612
27142
|
}) => {
|
|
27613
|
-
return /* @__PURE__ */
|
|
27143
|
+
return /* @__PURE__ */ jsx26(
|
|
27614
27144
|
"div",
|
|
27615
27145
|
{
|
|
27616
27146
|
style: {
|
|
@@ -27625,7 +27155,7 @@ var QuillPivotColumnContainer = ({
|
|
|
27625
27155
|
var QuillFilterContainerComponent = ({
|
|
27626
27156
|
children
|
|
27627
27157
|
}) => {
|
|
27628
|
-
return /* @__PURE__ */
|
|
27158
|
+
return /* @__PURE__ */ jsx26(
|
|
27629
27159
|
"div",
|
|
27630
27160
|
{
|
|
27631
27161
|
style: {
|
|
@@ -27685,8 +27215,8 @@ var QuillModalComponent = ({
|
|
|
27685
27215
|
}
|
|
27686
27216
|
}
|
|
27687
27217
|
};
|
|
27688
|
-
return /* @__PURE__ */
|
|
27689
|
-
/* @__PURE__ */
|
|
27218
|
+
return /* @__PURE__ */ jsxs18("div", { style: { position: "relative" }, ref: modalRef, children: [
|
|
27219
|
+
/* @__PURE__ */ jsx26(
|
|
27690
27220
|
MemoizedSecondaryButton,
|
|
27691
27221
|
{
|
|
27692
27222
|
onClick: () => {
|
|
@@ -27695,12 +27225,12 @@ var QuillModalComponent = ({
|
|
|
27695
27225
|
label: triggerLabel || ""
|
|
27696
27226
|
}
|
|
27697
27227
|
),
|
|
27698
|
-
title && title === "Filters" ? isOpen && /* @__PURE__ */
|
|
27228
|
+
title && title === "Filters" ? isOpen && /* @__PURE__ */ jsx26(
|
|
27699
27229
|
"div",
|
|
27700
27230
|
{
|
|
27701
27231
|
id: "quill-popover-modal",
|
|
27702
27232
|
style: { position: "relative", top: 10 },
|
|
27703
|
-
children: /* @__PURE__ */
|
|
27233
|
+
children: /* @__PURE__ */ jsxs18(
|
|
27704
27234
|
"div",
|
|
27705
27235
|
{
|
|
27706
27236
|
ref: popoverRef,
|
|
@@ -27717,7 +27247,7 @@ var QuillModalComponent = ({
|
|
|
27717
27247
|
right: rightAlignment
|
|
27718
27248
|
},
|
|
27719
27249
|
children: [
|
|
27720
|
-
/* @__PURE__ */
|
|
27250
|
+
/* @__PURE__ */ jsx26(
|
|
27721
27251
|
"h1",
|
|
27722
27252
|
{
|
|
27723
27253
|
style: {
|
|
@@ -27737,8 +27267,8 @@ var QuillModalComponent = ({
|
|
|
27737
27267
|
}
|
|
27738
27268
|
)
|
|
27739
27269
|
}
|
|
27740
|
-
) : isOpen && /* @__PURE__ */
|
|
27741
|
-
/* @__PURE__ */
|
|
27270
|
+
) : isOpen && /* @__PURE__ */ jsxs18("div", { children: [
|
|
27271
|
+
/* @__PURE__ */ jsx26(
|
|
27742
27272
|
"div",
|
|
27743
27273
|
{
|
|
27744
27274
|
style: {
|
|
@@ -27756,7 +27286,7 @@ var QuillModalComponent = ({
|
|
|
27756
27286
|
}
|
|
27757
27287
|
}
|
|
27758
27288
|
),
|
|
27759
|
-
/* @__PURE__ */
|
|
27289
|
+
/* @__PURE__ */ jsx26(
|
|
27760
27290
|
"div",
|
|
27761
27291
|
{
|
|
27762
27292
|
style: {
|
|
@@ -27777,7 +27307,7 @@ var QuillModalComponent = ({
|
|
|
27777
27307
|
padding: 30,
|
|
27778
27308
|
overflow: "auto"
|
|
27779
27309
|
},
|
|
27780
|
-
children: /* @__PURE__ */
|
|
27310
|
+
children: /* @__PURE__ */ jsxs18(
|
|
27781
27311
|
"div",
|
|
27782
27312
|
{
|
|
27783
27313
|
style: {
|
|
@@ -27786,7 +27316,7 @@ var QuillModalComponent = ({
|
|
|
27786
27316
|
minWidth: "60vw"
|
|
27787
27317
|
},
|
|
27788
27318
|
children: [
|
|
27789
|
-
/* @__PURE__ */
|
|
27319
|
+
/* @__PURE__ */ jsx26(
|
|
27790
27320
|
"h1",
|
|
27791
27321
|
{
|
|
27792
27322
|
style: {
|
|
@@ -27813,7 +27343,7 @@ var QuillModalComponent = ({
|
|
|
27813
27343
|
var QuillChartBuilderFormContainer = ({
|
|
27814
27344
|
children
|
|
27815
27345
|
}) => {
|
|
27816
|
-
return /* @__PURE__ */
|
|
27346
|
+
return /* @__PURE__ */ jsx26(
|
|
27817
27347
|
"div",
|
|
27818
27348
|
{
|
|
27819
27349
|
style: {
|
|
@@ -27836,7 +27366,7 @@ var QuillErrorMessageComponent = ({
|
|
|
27836
27366
|
containerStyle
|
|
27837
27367
|
}) => {
|
|
27838
27368
|
const [theme] = useContext4(ThemeContext);
|
|
27839
|
-
return /* @__PURE__ */
|
|
27369
|
+
return /* @__PURE__ */ jsxs18(
|
|
27840
27370
|
"div",
|
|
27841
27371
|
{
|
|
27842
27372
|
style: {
|
|
@@ -27854,7 +27384,7 @@ var QuillErrorMessageComponent = ({
|
|
|
27854
27384
|
...containerStyle
|
|
27855
27385
|
},
|
|
27856
27386
|
children: [
|
|
27857
|
-
/* @__PURE__ */
|
|
27387
|
+
/* @__PURE__ */ jsx26(
|
|
27858
27388
|
"svg",
|
|
27859
27389
|
{
|
|
27860
27390
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -27868,7 +27398,7 @@ var QuillErrorMessageComponent = ({
|
|
|
27868
27398
|
marginRight: 8,
|
|
27869
27399
|
color: "#D32F2F"
|
|
27870
27400
|
},
|
|
27871
|
-
children: /* @__PURE__ */
|
|
27401
|
+
children: /* @__PURE__ */ jsx26(
|
|
27872
27402
|
"path",
|
|
27873
27403
|
{
|
|
27874
27404
|
strokeLinecap: "round",
|
|
@@ -27885,11 +27415,11 @@ var QuillErrorMessageComponent = ({
|
|
|
27885
27415
|
};
|
|
27886
27416
|
var QuillColumnSearchEmptyState = () => {
|
|
27887
27417
|
const [theme] = useContext4(ThemeContext);
|
|
27888
|
-
return /* @__PURE__ */
|
|
27418
|
+
return /* @__PURE__ */ jsx26("div", { style: { fontFamily: theme?.fontFamily }, children: "No results found" });
|
|
27889
27419
|
};
|
|
27890
27420
|
var QuillLoadingComponent = () => {
|
|
27891
27421
|
const [theme] = useContext4(ThemeContext);
|
|
27892
|
-
return /* @__PURE__ */
|
|
27422
|
+
return /* @__PURE__ */ jsxs18(
|
|
27893
27423
|
"div",
|
|
27894
27424
|
{
|
|
27895
27425
|
style: {
|
|
@@ -27904,9 +27434,9 @@ var QuillLoadingComponent = () => {
|
|
|
27904
27434
|
justifyContent: "center"
|
|
27905
27435
|
},
|
|
27906
27436
|
children: [
|
|
27907
|
-
/* @__PURE__ */
|
|
27908
|
-
/* @__PURE__ */
|
|
27909
|
-
/* @__PURE__ */
|
|
27437
|
+
/* @__PURE__ */ jsx26("div", { style: { height: 100 } }),
|
|
27438
|
+
/* @__PURE__ */ jsxs18("svg", { width: "24", height: "24", children: [
|
|
27439
|
+
/* @__PURE__ */ jsx26(
|
|
27910
27440
|
"circle",
|
|
27911
27441
|
{
|
|
27912
27442
|
cx: "12",
|
|
@@ -27918,7 +27448,7 @@ var QuillLoadingComponent = () => {
|
|
|
27918
27448
|
stroke: theme?.primaryTextColor || "#364153",
|
|
27919
27449
|
fill: "none",
|
|
27920
27450
|
transform: "rotate(-90 12 12)",
|
|
27921
|
-
children: /* @__PURE__ */
|
|
27451
|
+
children: /* @__PURE__ */ jsx26(
|
|
27922
27452
|
"animateTransform",
|
|
27923
27453
|
{
|
|
27924
27454
|
attributeName: "transform",
|
|
@@ -27932,7 +27462,7 @@ var QuillLoadingComponent = () => {
|
|
|
27932
27462
|
)
|
|
27933
27463
|
}
|
|
27934
27464
|
),
|
|
27935
|
-
/* @__PURE__ */
|
|
27465
|
+
/* @__PURE__ */ jsx26(
|
|
27936
27466
|
"circle",
|
|
27937
27467
|
{
|
|
27938
27468
|
cx: "12",
|
|
@@ -27944,7 +27474,7 @@ var QuillLoadingComponent = () => {
|
|
|
27944
27474
|
stroke: "#ADB1B9",
|
|
27945
27475
|
fill: "none",
|
|
27946
27476
|
transform: "rotate(90 12 12)",
|
|
27947
|
-
children: /* @__PURE__ */
|
|
27477
|
+
children: /* @__PURE__ */ jsx26(
|
|
27948
27478
|
"animateTransform",
|
|
27949
27479
|
{
|
|
27950
27480
|
attributeName: "transform",
|
|
@@ -28034,7 +27564,7 @@ var OverflowContainer = ({
|
|
|
28034
27564
|
opacity: showBottomShadow ? 1 : 0,
|
|
28035
27565
|
...shadowStyle
|
|
28036
27566
|
};
|
|
28037
|
-
return /* @__PURE__ */
|
|
27567
|
+
return /* @__PURE__ */ jsxs18(
|
|
28038
27568
|
"div",
|
|
28039
27569
|
{
|
|
28040
27570
|
style: containerStyle,
|
|
@@ -28043,9 +27573,9 @@ var OverflowContainer = ({
|
|
|
28043
27573
|
onTouchMove: checkOverflow,
|
|
28044
27574
|
onMouseMove: checkOverflow,
|
|
28045
27575
|
children: [
|
|
28046
|
-
/* @__PURE__ */
|
|
27576
|
+
/* @__PURE__ */ jsx26("div", { style: topShadowStyle }),
|
|
28047
27577
|
children,
|
|
28048
|
-
/* @__PURE__ */
|
|
27578
|
+
/* @__PURE__ */ jsx26("div", { style: bottomShadowStyle })
|
|
28049
27579
|
]
|
|
28050
27580
|
}
|
|
28051
27581
|
);
|
|
@@ -28059,8 +27589,8 @@ var QuillToolTip = ({
|
|
|
28059
27589
|
displayBelow = false
|
|
28060
27590
|
}) => {
|
|
28061
27591
|
const [theme] = useContext4(ThemeContext);
|
|
28062
|
-
return enabled ? /* @__PURE__ */
|
|
28063
|
-
/* @__PURE__ */
|
|
27592
|
+
return enabled ? /* @__PURE__ */ jsxs18("div", { className: "tooltip-container", style: { ...containerStyle }, children: [
|
|
27593
|
+
/* @__PURE__ */ jsx26("style", { children: `
|
|
28064
27594
|
.tooltip-container {
|
|
28065
27595
|
position: relative;
|
|
28066
27596
|
display: inline-block;
|
|
@@ -28122,7 +27652,7 @@ var QuillToolTip = ({
|
|
|
28122
27652
|
opacity: 1;
|
|
28123
27653
|
}` }),
|
|
28124
27654
|
children,
|
|
28125
|
-
/* @__PURE__ */
|
|
27655
|
+
/* @__PURE__ */ jsx26("div", { className: "tooltip-text", style: { ...textStyle }, children: text })
|
|
28126
27656
|
] }) : children;
|
|
28127
27657
|
};
|
|
28128
27658
|
var QuillToolTipPortal = ({
|
|
@@ -28177,9 +27707,9 @@ var QuillToolTipPortal = ({
|
|
|
28177
27707
|
}
|
|
28178
27708
|
}, [isOpen]);
|
|
28179
27709
|
if (!enabled) {
|
|
28180
|
-
return /* @__PURE__ */
|
|
27710
|
+
return /* @__PURE__ */ jsx26(Fragment, { children });
|
|
28181
27711
|
}
|
|
28182
|
-
return /* @__PURE__ */
|
|
27712
|
+
return /* @__PURE__ */ jsxs18(
|
|
28183
27713
|
"div",
|
|
28184
27714
|
{
|
|
28185
27715
|
ref: triggerRef,
|
|
@@ -28193,7 +27723,7 @@ var QuillToolTipPortal = ({
|
|
|
28193
27723
|
children: [
|
|
28194
27724
|
children,
|
|
28195
27725
|
isOpen && createPortal(
|
|
28196
|
-
/* @__PURE__ */
|
|
27726
|
+
/* @__PURE__ */ jsxs18(
|
|
28197
27727
|
"div",
|
|
28198
27728
|
{
|
|
28199
27729
|
ref: tooltipRef,
|
|
@@ -28220,7 +27750,7 @@ var QuillToolTipPortal = ({
|
|
|
28220
27750
|
},
|
|
28221
27751
|
children: [
|
|
28222
27752
|
text,
|
|
28223
|
-
/* @__PURE__ */
|
|
27753
|
+
/* @__PURE__ */ jsx26(
|
|
28224
27754
|
"div",
|
|
28225
27755
|
{
|
|
28226
27756
|
style: {
|
|
@@ -28235,7 +27765,7 @@ var QuillToolTipPortal = ({
|
|
|
28235
27765
|
}
|
|
28236
27766
|
}
|
|
28237
27767
|
),
|
|
28238
|
-
/* @__PURE__ */
|
|
27768
|
+
/* @__PURE__ */ jsx26(
|
|
28239
27769
|
"div",
|
|
28240
27770
|
{
|
|
28241
27771
|
style: {
|
|
@@ -28267,7 +27797,7 @@ var QuillChartBuilderCheckboxComponent = ({
|
|
|
28267
27797
|
containerStyle
|
|
28268
27798
|
}) => {
|
|
28269
27799
|
const [theme] = useContext4(ThemeContext);
|
|
28270
|
-
return /* @__PURE__ */
|
|
27800
|
+
return /* @__PURE__ */ jsx26(
|
|
28271
27801
|
"div",
|
|
28272
27802
|
{
|
|
28273
27803
|
style: {
|
|
@@ -28276,7 +27806,7 @@ var QuillChartBuilderCheckboxComponent = ({
|
|
|
28276
27806
|
paddingBottom: 4,
|
|
28277
27807
|
paddingLeft: 8,
|
|
28278
27808
|
paddingRight: 8,
|
|
28279
|
-
border:
|
|
27809
|
+
// border: '1px solid #E7E7E7',
|
|
28280
27810
|
borderRadius: 4,
|
|
28281
27811
|
display: "flex",
|
|
28282
27812
|
alignItems: "center",
|
|
@@ -28285,7 +27815,7 @@ var QuillChartBuilderCheckboxComponent = ({
|
|
|
28285
27815
|
pointerEvents: disabled ? "none" : "auto",
|
|
28286
27816
|
...containerStyle
|
|
28287
27817
|
},
|
|
28288
|
-
children: /* @__PURE__ */
|
|
27818
|
+
children: /* @__PURE__ */ jsx26(
|
|
28289
27819
|
MemoizedCheckbox,
|
|
28290
27820
|
{
|
|
28291
27821
|
isChecked,
|
|
@@ -28365,7 +27895,7 @@ var QuillPortal = ({
|
|
|
28365
27895
|
showModal
|
|
28366
27896
|
);
|
|
28367
27897
|
return createPortal(
|
|
28368
|
-
/* @__PURE__ */
|
|
27898
|
+
/* @__PURE__ */ jsx26(
|
|
28369
27899
|
"div",
|
|
28370
27900
|
{
|
|
28371
27901
|
style: {
|
|
@@ -28400,8 +27930,645 @@ var QuillPortal = ({
|
|
|
28400
27930
|
);
|
|
28401
27931
|
};
|
|
28402
27932
|
|
|
28403
|
-
// 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
|
|
28404
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";
|
|
28405
28572
|
function QuillTable({
|
|
28406
28573
|
rows,
|
|
28407
28574
|
rowCount,
|
|
@@ -28430,13 +28597,13 @@ function QuillTable({
|
|
|
28430
28597
|
borderTop,
|
|
28431
28598
|
borderBottom
|
|
28432
28599
|
}) {
|
|
28433
|
-
const [activeRows, setActiveRows] =
|
|
28434
|
-
const [maxPage, setMaxPage] =
|
|
28435
|
-
const [sortColumn, setSortColumn] =
|
|
28436
|
-
const [sortDirection, setSortDirection] =
|
|
28437
|
-
const [theme] =
|
|
28438
|
-
const [isPaginating, setIsPaginating] =
|
|
28439
|
-
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);
|
|
28440
28607
|
useEffect8(() => {
|
|
28441
28608
|
setSortColumn(sort?.field || "");
|
|
28442
28609
|
setSortDirection(sort?.direction || "desc");
|
|
@@ -28517,7 +28684,7 @@ function QuillTable({
|
|
|
28517
28684
|
}
|
|
28518
28685
|
};
|
|
28519
28686
|
if (initialLoad) {
|
|
28520
|
-
return /* @__PURE__ */
|
|
28687
|
+
return /* @__PURE__ */ jsx29(
|
|
28521
28688
|
"div",
|
|
28522
28689
|
{
|
|
28523
28690
|
style: {
|
|
@@ -28525,11 +28692,11 @@ function QuillTable({
|
|
|
28525
28692
|
...containerStyle
|
|
28526
28693
|
},
|
|
28527
28694
|
className,
|
|
28528
|
-
children: /* @__PURE__ */
|
|
28695
|
+
children: /* @__PURE__ */ jsx29(LoadingComponent, {})
|
|
28529
28696
|
}
|
|
28530
28697
|
);
|
|
28531
28698
|
}
|
|
28532
|
-
return /* @__PURE__ */
|
|
28699
|
+
return /* @__PURE__ */ jsx29(
|
|
28533
28700
|
"div",
|
|
28534
28701
|
{
|
|
28535
28702
|
style: {
|
|
@@ -28542,7 +28709,7 @@ function QuillTable({
|
|
|
28542
28709
|
...containerStyle
|
|
28543
28710
|
},
|
|
28544
28711
|
className,
|
|
28545
|
-
children: /* @__PURE__ */
|
|
28712
|
+
children: /* @__PURE__ */ jsx29(
|
|
28546
28713
|
"div",
|
|
28547
28714
|
{
|
|
28548
28715
|
style: {
|
|
@@ -28561,7 +28728,7 @@ function QuillTable({
|
|
|
28561
28728
|
outline: "none",
|
|
28562
28729
|
position: "relative"
|
|
28563
28730
|
},
|
|
28564
|
-
children: /* @__PURE__ */
|
|
28731
|
+
children: /* @__PURE__ */ jsxs21(
|
|
28565
28732
|
"div",
|
|
28566
28733
|
{
|
|
28567
28734
|
role: "table",
|
|
@@ -28575,8 +28742,8 @@ function QuillTable({
|
|
|
28575
28742
|
minHeight: "260px"
|
|
28576
28743
|
},
|
|
28577
28744
|
children: [
|
|
28578
|
-
/* @__PURE__ */
|
|
28579
|
-
/* @__PURE__ */
|
|
28745
|
+
/* @__PURE__ */ jsx29("div", { style: { overflow: "auto", flexGrow: 1 }, children: /* @__PURE__ */ jsxs21("div", { style: { minWidth: "100%", display: "inline-block" }, children: [
|
|
28746
|
+
/* @__PURE__ */ jsx29(
|
|
28580
28747
|
"div",
|
|
28581
28748
|
{
|
|
28582
28749
|
className: "thead",
|
|
@@ -28586,7 +28753,7 @@ function QuillTable({
|
|
|
28586
28753
|
zIndex: 1,
|
|
28587
28754
|
background: headerBackgroundColor ?? "white"
|
|
28588
28755
|
},
|
|
28589
|
-
children: /* @__PURE__ */
|
|
28756
|
+
children: /* @__PURE__ */ jsx29(
|
|
28590
28757
|
"div",
|
|
28591
28758
|
{
|
|
28592
28759
|
role: "row",
|
|
@@ -28599,7 +28766,7 @@ function QuillTable({
|
|
|
28599
28766
|
marginBottom: "-1px"
|
|
28600
28767
|
// avoid double border
|
|
28601
28768
|
},
|
|
28602
|
-
children: columns && columns.map((column, index) => /* @__PURE__ */
|
|
28769
|
+
children: columns && columns.map((column, index) => /* @__PURE__ */ jsxs21(
|
|
28603
28770
|
"div",
|
|
28604
28771
|
{
|
|
28605
28772
|
onClick: (e) => {
|
|
@@ -28630,7 +28797,7 @@ function QuillTable({
|
|
|
28630
28797
|
justifyContent: "space-between"
|
|
28631
28798
|
},
|
|
28632
28799
|
children: [
|
|
28633
|
-
/* @__PURE__ */
|
|
28800
|
+
/* @__PURE__ */ jsx29(
|
|
28634
28801
|
"div",
|
|
28635
28802
|
{
|
|
28636
28803
|
"aria-haspopup": "dialog",
|
|
@@ -28655,7 +28822,7 @@ function QuillTable({
|
|
|
28655
28822
|
children: hideLabels || !column.label ? column.field : column.label
|
|
28656
28823
|
}
|
|
28657
28824
|
),
|
|
28658
|
-
column.field === sortColumn && /* @__PURE__ */
|
|
28825
|
+
column.field === sortColumn && /* @__PURE__ */ jsx29(
|
|
28659
28826
|
"svg",
|
|
28660
28827
|
{
|
|
28661
28828
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -28666,7 +28833,7 @@ function QuillTable({
|
|
|
28666
28833
|
style: {
|
|
28667
28834
|
transform: sortDirection === "desc" ? "rotate(180deg)" : void 0
|
|
28668
28835
|
},
|
|
28669
|
-
children: /* @__PURE__ */
|
|
28836
|
+
children: /* @__PURE__ */ jsx29(
|
|
28670
28837
|
"path",
|
|
28671
28838
|
{
|
|
28672
28839
|
fillRule: "evenodd",
|
|
@@ -28684,15 +28851,15 @@ function QuillTable({
|
|
|
28684
28851
|
)
|
|
28685
28852
|
}
|
|
28686
28853
|
),
|
|
28687
|
-
(isPaginating || isLoading) && /* @__PURE__ */
|
|
28854
|
+
(isPaginating || isLoading) && /* @__PURE__ */ jsx29(
|
|
28688
28855
|
"div",
|
|
28689
28856
|
{
|
|
28690
28857
|
className,
|
|
28691
28858
|
style: { position: "absolute", width: "100%" },
|
|
28692
|
-
children: /* @__PURE__ */
|
|
28859
|
+
children: /* @__PURE__ */ jsx29(LoadingComponent, {})
|
|
28693
28860
|
}
|
|
28694
28861
|
),
|
|
28695
|
-
activeRows && activeRows.length === 0 || columns && columns.length === 0 ? /* @__PURE__ */
|
|
28862
|
+
activeRows && activeRows.length === 0 || columns && columns.length === 0 ? /* @__PURE__ */ jsx29(
|
|
28696
28863
|
"div",
|
|
28697
28864
|
{
|
|
28698
28865
|
style: {
|
|
@@ -28710,7 +28877,7 @@ function QuillTable({
|
|
|
28710
28877
|
},
|
|
28711
28878
|
children: emptyStateLabel
|
|
28712
28879
|
}
|
|
28713
|
-
) : /* @__PURE__ */
|
|
28880
|
+
) : /* @__PURE__ */ jsx29("div", { role: "rowgroup", className: "tbody", children: activeRows && activeRows.map((row, rowIndex) => /* @__PURE__ */ jsx29(
|
|
28714
28881
|
"div",
|
|
28715
28882
|
{
|
|
28716
28883
|
role: "row",
|
|
@@ -28721,7 +28888,7 @@ function QuillTable({
|
|
|
28721
28888
|
minWidth: "100px",
|
|
28722
28889
|
boxSizing: "border-box"
|
|
28723
28890
|
},
|
|
28724
|
-
children: columns && columns.map((column, columnIndex) => /* @__PURE__ */
|
|
28891
|
+
children: columns && columns.map((column, columnIndex) => /* @__PURE__ */ jsx29(
|
|
28725
28892
|
"div",
|
|
28726
28893
|
{
|
|
28727
28894
|
role: "cell",
|
|
@@ -28740,7 +28907,7 @@ function QuillTable({
|
|
|
28740
28907
|
borderBottom: rowIndex === activeRows?.length - 1 ? "1px solid #E7E7E7" : void 0,
|
|
28741
28908
|
userSelect: "none"
|
|
28742
28909
|
},
|
|
28743
|
-
children: /* @__PURE__ */
|
|
28910
|
+
children: /* @__PURE__ */ jsx29(
|
|
28744
28911
|
"div",
|
|
28745
28912
|
{
|
|
28746
28913
|
style: {
|
|
@@ -28752,7 +28919,7 @@ function QuillTable({
|
|
|
28752
28919
|
userSelect: "none"
|
|
28753
28920
|
},
|
|
28754
28921
|
"data-testid": "static-cell",
|
|
28755
|
-
children: /* @__PURE__ */
|
|
28922
|
+
children: /* @__PURE__ */ jsx29(
|
|
28756
28923
|
"div",
|
|
28757
28924
|
{
|
|
28758
28925
|
"aria-haspopup": "dialog",
|
|
@@ -28784,7 +28951,7 @@ function QuillTable({
|
|
|
28784
28951
|
"sqlrow" + rowIndex
|
|
28785
28952
|
)) })
|
|
28786
28953
|
] }) }),
|
|
28787
|
-
/* @__PURE__ */
|
|
28954
|
+
/* @__PURE__ */ jsx29(
|
|
28788
28955
|
"div",
|
|
28789
28956
|
{
|
|
28790
28957
|
style: {
|
|
@@ -28797,7 +28964,7 @@ function QuillTable({
|
|
|
28797
28964
|
marginTop: "-1px"
|
|
28798
28965
|
// avoid double border
|
|
28799
28966
|
},
|
|
28800
|
-
children: /* @__PURE__ */
|
|
28967
|
+
children: /* @__PURE__ */ jsxs21(
|
|
28801
28968
|
"div",
|
|
28802
28969
|
{
|
|
28803
28970
|
style: {
|
|
@@ -28809,7 +28976,7 @@ function QuillTable({
|
|
|
28809
28976
|
height: 37
|
|
28810
28977
|
},
|
|
28811
28978
|
children: [
|
|
28812
|
-
!hideCSVDownloadButton ? /* @__PURE__ */
|
|
28979
|
+
!hideCSVDownloadButton ? /* @__PURE__ */ jsx29(
|
|
28813
28980
|
"button",
|
|
28814
28981
|
{
|
|
28815
28982
|
onClick: downloadCSV2,
|
|
@@ -28825,8 +28992,8 @@ function QuillTable({
|
|
|
28825
28992
|
},
|
|
28826
28993
|
children: "Download CSV"
|
|
28827
28994
|
}
|
|
28828
|
-
) : /* @__PURE__ */
|
|
28829
|
-
rows.length === 0 || isLoading ? null : /* @__PURE__ */
|
|
28995
|
+
) : /* @__PURE__ */ jsx29("div", {}),
|
|
28996
|
+
rows.length === 0 || isLoading ? null : /* @__PURE__ */ jsxs21(
|
|
28830
28997
|
"div",
|
|
28831
28998
|
{
|
|
28832
28999
|
style: {
|
|
@@ -28835,7 +29002,7 @@ function QuillTable({
|
|
|
28835
29002
|
alignItems: "center"
|
|
28836
29003
|
},
|
|
28837
29004
|
children: [
|
|
28838
|
-
/* @__PURE__ */
|
|
29005
|
+
/* @__PURE__ */ jsxs21(
|
|
28839
29006
|
"div",
|
|
28840
29007
|
{
|
|
28841
29008
|
style: {
|
|
@@ -28850,8 +29017,8 @@ function QuillTable({
|
|
|
28850
29017
|
]
|
|
28851
29018
|
}
|
|
28852
29019
|
),
|
|
28853
|
-
/* @__PURE__ */
|
|
28854
|
-
/* @__PURE__ */
|
|
29020
|
+
/* @__PURE__ */ jsx29("div", { style: { width: 8 } }),
|
|
29021
|
+
/* @__PURE__ */ jsx29(
|
|
28855
29022
|
"button",
|
|
28856
29023
|
{
|
|
28857
29024
|
onClick: (e) => {
|
|
@@ -28863,7 +29030,7 @@ function QuillTable({
|
|
|
28863
29030
|
border: "none",
|
|
28864
29031
|
background: "transparent"
|
|
28865
29032
|
},
|
|
28866
|
-
children: /* @__PURE__ */
|
|
29033
|
+
children: /* @__PURE__ */ jsx29(
|
|
28867
29034
|
"svg",
|
|
28868
29035
|
{
|
|
28869
29036
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -28871,7 +29038,7 @@ function QuillTable({
|
|
|
28871
29038
|
fill: theme?.chartLabelFontFamily || theme?.fontFamily,
|
|
28872
29039
|
height: "16px",
|
|
28873
29040
|
width: "16px",
|
|
28874
|
-
children: /* @__PURE__ */
|
|
29041
|
+
children: /* @__PURE__ */ jsx29(
|
|
28875
29042
|
"path",
|
|
28876
29043
|
{
|
|
28877
29044
|
fillRule: "evenodd",
|
|
@@ -28883,7 +29050,7 @@ function QuillTable({
|
|
|
28883
29050
|
)
|
|
28884
29051
|
}
|
|
28885
29052
|
),
|
|
28886
|
-
/* @__PURE__ */
|
|
29053
|
+
/* @__PURE__ */ jsx29(
|
|
28887
29054
|
"button",
|
|
28888
29055
|
{
|
|
28889
29056
|
onClick: (e) => {
|
|
@@ -28895,7 +29062,7 @@ function QuillTable({
|
|
|
28895
29062
|
border: "none",
|
|
28896
29063
|
background: "transparent"
|
|
28897
29064
|
},
|
|
28898
|
-
children: /* @__PURE__ */
|
|
29065
|
+
children: /* @__PURE__ */ jsx29(
|
|
28899
29066
|
"svg",
|
|
28900
29067
|
{
|
|
28901
29068
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -28903,7 +29070,7 @@ function QuillTable({
|
|
|
28903
29070
|
fill: theme?.chartLabelFontFamily || theme?.fontFamily,
|
|
28904
29071
|
height: "16px",
|
|
28905
29072
|
width: "16px",
|
|
28906
|
-
children: /* @__PURE__ */
|
|
29073
|
+
children: /* @__PURE__ */ jsx29(
|
|
28907
29074
|
"path",
|
|
28908
29075
|
{
|
|
28909
29076
|
fillRule: "evenodd",
|
|
@@ -28915,7 +29082,7 @@ function QuillTable({
|
|
|
28915
29082
|
)
|
|
28916
29083
|
}
|
|
28917
29084
|
),
|
|
28918
|
-
/* @__PURE__ */
|
|
29085
|
+
/* @__PURE__ */ jsx29("div", { style: { width: 12 } })
|
|
28919
29086
|
]
|
|
28920
29087
|
}
|
|
28921
29088
|
)
|
|
@@ -28940,7 +29107,7 @@ import {
|
|
|
28940
29107
|
CartesianGrid,
|
|
28941
29108
|
ComposedChart,
|
|
28942
29109
|
Customized,
|
|
28943
|
-
Legend,
|
|
29110
|
+
Legend as Legend2,
|
|
28944
29111
|
ResponsiveContainer as ResponsiveContainer2,
|
|
28945
29112
|
Tooltip as Tooltip2,
|
|
28946
29113
|
XAxis,
|
|
@@ -29102,12 +29269,12 @@ var format_wo_yyyy2 = (value) => {
|
|
|
29102
29269
|
import { format as format6, subDays as subDays2 } from "date-fns";
|
|
29103
29270
|
|
|
29104
29271
|
// src/components/Chart/ChartTooltipFrame.tsx
|
|
29105
|
-
import { jsx as
|
|
29272
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
29106
29273
|
function ChartTooltipFrame2({
|
|
29107
29274
|
children,
|
|
29108
29275
|
theme
|
|
29109
29276
|
}) {
|
|
29110
|
-
return /* @__PURE__ */
|
|
29277
|
+
return /* @__PURE__ */ jsx30(
|
|
29111
29278
|
"div",
|
|
29112
29279
|
{
|
|
29113
29280
|
style: {
|
|
@@ -29127,7 +29294,7 @@ function ChartTooltipFrame2({
|
|
|
29127
29294
|
}
|
|
29128
29295
|
|
|
29129
29296
|
// src/components/Chart/ChartTooltipRow.tsx
|
|
29130
|
-
import { jsx as
|
|
29297
|
+
import { jsx as jsx31, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
29131
29298
|
function ChartTooltipRow2({
|
|
29132
29299
|
value,
|
|
29133
29300
|
name: name2,
|
|
@@ -29135,7 +29302,7 @@ function ChartTooltipRow2({
|
|
|
29135
29302
|
theme,
|
|
29136
29303
|
hideDot = false
|
|
29137
29304
|
}) {
|
|
29138
|
-
return /* @__PURE__ */
|
|
29305
|
+
return /* @__PURE__ */ jsxs22(
|
|
29139
29306
|
"div",
|
|
29140
29307
|
{
|
|
29141
29308
|
style: {
|
|
@@ -29148,8 +29315,8 @@ function ChartTooltipRow2({
|
|
|
29148
29315
|
paddingBottom: 2
|
|
29149
29316
|
},
|
|
29150
29317
|
children: [
|
|
29151
|
-
/* @__PURE__ */
|
|
29152
|
-
!hideDot && /* @__PURE__ */
|
|
29318
|
+
/* @__PURE__ */ jsxs22("div", { style: { display: "flex", alignItems: "center" }, children: [
|
|
29319
|
+
!hideDot && /* @__PURE__ */ jsx31(
|
|
29153
29320
|
"span",
|
|
29154
29321
|
{
|
|
29155
29322
|
style: {
|
|
@@ -29166,7 +29333,7 @@ function ChartTooltipRow2({
|
|
|
29166
29333
|
}
|
|
29167
29334
|
}
|
|
29168
29335
|
),
|
|
29169
|
-
/* @__PURE__ */
|
|
29336
|
+
/* @__PURE__ */ jsx31(
|
|
29170
29337
|
"p",
|
|
29171
29338
|
{
|
|
29172
29339
|
style: {
|
|
@@ -29181,7 +29348,7 @@ function ChartTooltipRow2({
|
|
|
29181
29348
|
}
|
|
29182
29349
|
)
|
|
29183
29350
|
] }),
|
|
29184
|
-
/* @__PURE__ */
|
|
29351
|
+
/* @__PURE__ */ jsx31(
|
|
29185
29352
|
"p",
|
|
29186
29353
|
{
|
|
29187
29354
|
style: {
|
|
@@ -29205,14 +29372,14 @@ function ChartTooltipRow2({
|
|
|
29205
29372
|
}
|
|
29206
29373
|
|
|
29207
29374
|
// src/components/Chart/ChartTooltipGroup.tsx
|
|
29208
|
-
import { jsx as
|
|
29375
|
+
import { jsx as jsx32, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
29209
29376
|
function ChartTooltipGroup({
|
|
29210
29377
|
name: name2,
|
|
29211
29378
|
items,
|
|
29212
29379
|
theme,
|
|
29213
29380
|
hideDot = false
|
|
29214
29381
|
}) {
|
|
29215
|
-
return /* @__PURE__ */
|
|
29382
|
+
return /* @__PURE__ */ jsxs23(
|
|
29216
29383
|
"div",
|
|
29217
29384
|
{
|
|
29218
29385
|
style: {
|
|
@@ -29224,7 +29391,7 @@ function ChartTooltipGroup({
|
|
|
29224
29391
|
marginRight: "24px"
|
|
29225
29392
|
},
|
|
29226
29393
|
children: [
|
|
29227
|
-
/* @__PURE__ */
|
|
29394
|
+
/* @__PURE__ */ jsx32(
|
|
29228
29395
|
"p",
|
|
29229
29396
|
{
|
|
29230
29397
|
style: {
|
|
@@ -29242,7 +29409,7 @@ function ChartTooltipGroup({
|
|
|
29242
29409
|
children: name2.replaceAll("_", " ").toLowerCase()
|
|
29243
29410
|
}
|
|
29244
29411
|
),
|
|
29245
|
-
items.map(({ color: color2, value, name: name3 }, idx) => /* @__PURE__ */
|
|
29412
|
+
items.map(({ color: color2, value, name: name3 }, idx) => /* @__PURE__ */ jsx32(
|
|
29246
29413
|
ChartTooltipRow2,
|
|
29247
29414
|
{
|
|
29248
29415
|
value,
|
|
@@ -29260,9 +29427,9 @@ function ChartTooltipGroup({
|
|
|
29260
29427
|
|
|
29261
29428
|
// src/components/Chart/ChartTooltip.tsx
|
|
29262
29429
|
init_dates();
|
|
29263
|
-
import { jsx as
|
|
29264
|
-
var ChartTooltipPrimary = (props) => /* @__PURE__ */
|
|
29265
|
-
/* @__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(
|
|
29266
29433
|
"div",
|
|
29267
29434
|
{
|
|
29268
29435
|
style: {
|
|
@@ -29280,7 +29447,7 @@ var ChartTooltipPrimary = (props) => /* @__PURE__ */ jsxs23(ChartTooltipFrame2,
|
|
|
29280
29447
|
paddingTop: "8px",
|
|
29281
29448
|
paddingBottom: "8px"
|
|
29282
29449
|
},
|
|
29283
|
-
children: /* @__PURE__ */
|
|
29450
|
+
children: /* @__PURE__ */ jsx33(
|
|
29284
29451
|
"p",
|
|
29285
29452
|
{
|
|
29286
29453
|
style: {
|
|
@@ -29299,7 +29466,7 @@ var ChartTooltipPrimary = (props) => /* @__PURE__ */ jsxs23(ChartTooltipFrame2,
|
|
|
29299
29466
|
)
|
|
29300
29467
|
}
|
|
29301
29468
|
),
|
|
29302
|
-
/* @__PURE__ */
|
|
29469
|
+
/* @__PURE__ */ jsx33(
|
|
29303
29470
|
"div",
|
|
29304
29471
|
{
|
|
29305
29472
|
style: {
|
|
@@ -29308,7 +29475,7 @@ var ChartTooltipPrimary = (props) => /* @__PURE__ */ jsxs23(ChartTooltipFrame2,
|
|
|
29308
29475
|
paddingTop: "8px",
|
|
29309
29476
|
paddingBottom: "8px"
|
|
29310
29477
|
},
|
|
29311
|
-
children: props.payload.map(({ color: color2, value, name: name2 }, idx) => /* @__PURE__ */
|
|
29478
|
+
children: props.payload.map(({ color: color2, value, name: name2 }, idx) => /* @__PURE__ */ jsx33(
|
|
29312
29479
|
ChartTooltipRow2,
|
|
29313
29480
|
{
|
|
29314
29481
|
value: props.valueFormatter(value, name2),
|
|
@@ -29389,8 +29556,8 @@ function ChartTooltipComparison(props) {
|
|
|
29389
29556
|
presetLabel,
|
|
29390
29557
|
convertComparisonRange(presetLabel, comparisonLabel)
|
|
29391
29558
|
) ?? {};
|
|
29392
|
-
return /* @__PURE__ */
|
|
29393
|
-
/* @__PURE__ */
|
|
29559
|
+
return /* @__PURE__ */ jsxs24(ChartTooltipFrame2, { theme: props.theme, children: [
|
|
29560
|
+
/* @__PURE__ */ jsx33(
|
|
29394
29561
|
"div",
|
|
29395
29562
|
{
|
|
29396
29563
|
style: {
|
|
@@ -29408,7 +29575,7 @@ function ChartTooltipComparison(props) {
|
|
|
29408
29575
|
paddingTop: "8px",
|
|
29409
29576
|
paddingBottom: "8px"
|
|
29410
29577
|
},
|
|
29411
|
-
children: /* @__PURE__ */
|
|
29578
|
+
children: /* @__PURE__ */ jsx33(
|
|
29412
29579
|
"p",
|
|
29413
29580
|
{
|
|
29414
29581
|
style: {
|
|
@@ -29428,7 +29595,7 @@ function ChartTooltipComparison(props) {
|
|
|
29428
29595
|
)
|
|
29429
29596
|
}
|
|
29430
29597
|
),
|
|
29431
|
-
/* @__PURE__ */
|
|
29598
|
+
/* @__PURE__ */ jsx33(
|
|
29432
29599
|
"div",
|
|
29433
29600
|
{
|
|
29434
29601
|
style: {
|
|
@@ -29440,7 +29607,7 @@ function ChartTooltipComparison(props) {
|
|
|
29440
29607
|
flexDirection: "column",
|
|
29441
29608
|
gap: 4
|
|
29442
29609
|
},
|
|
29443
|
-
children: Object.entries(newRows).map(([key, value], index) => /* @__PURE__ */
|
|
29610
|
+
children: Object.entries(newRows).map(([key, value], index) => /* @__PURE__ */ jsx33(
|
|
29444
29611
|
ChartTooltipGroup,
|
|
29445
29612
|
{
|
|
29446
29613
|
name: key,
|
|
@@ -29456,8 +29623,8 @@ function ChartTooltipComparison(props) {
|
|
|
29456
29623
|
}
|
|
29457
29624
|
function ChartTooltip(props) {
|
|
29458
29625
|
if (!props.active || !props.payload) return null;
|
|
29459
|
-
if (props.comparison) return /* @__PURE__ */
|
|
29460
|
-
return /* @__PURE__ */
|
|
29626
|
+
if (props.comparison) return /* @__PURE__ */ jsx33(ChartTooltipComparison, { ...props });
|
|
29627
|
+
return /* @__PURE__ */ jsx33(ChartTooltipPrimary, { ...props });
|
|
29461
29628
|
}
|
|
29462
29629
|
|
|
29463
29630
|
// src/utils/getDomain.ts
|
|
@@ -29533,7 +29700,7 @@ import { useMemo as useMemo4 } from "react";
|
|
|
29533
29700
|
|
|
29534
29701
|
// src/components/Chart/CustomReferenceLine.tsx
|
|
29535
29702
|
init_constants();
|
|
29536
|
-
import { Fragment as
|
|
29703
|
+
import { Fragment as Fragment2, jsx as jsx34, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
29537
29704
|
function CustomReferenceLine({
|
|
29538
29705
|
xAxisMap,
|
|
29539
29706
|
yAxisMap,
|
|
@@ -29550,8 +29717,8 @@ function CustomReferenceLine({
|
|
|
29550
29717
|
const y1 = yScale(referenceLine[0]);
|
|
29551
29718
|
const y2 = yScale(referenceLine[1]);
|
|
29552
29719
|
const textY = yScale(referenceLine[referenceLine.length - 1]) - 5;
|
|
29553
|
-
return /* @__PURE__ */
|
|
29554
|
-
referenceLine.length === 2 && /* @__PURE__ */
|
|
29720
|
+
return /* @__PURE__ */ jsxs25(Fragment2, { children: [
|
|
29721
|
+
referenceLine.length === 2 && /* @__PURE__ */ jsx34(
|
|
29555
29722
|
"line",
|
|
29556
29723
|
{
|
|
29557
29724
|
x1: xMin,
|
|
@@ -29567,7 +29734,7 @@ function CustomReferenceLine({
|
|
|
29567
29734
|
referenceLine.length > 2 && referenceLine.slice(1).map((point, index) => {
|
|
29568
29735
|
const x1 = xMin + (xMax - xMin) * (index / (referenceLine.length - 1));
|
|
29569
29736
|
const x2 = xMin + (xMax - xMin) * ((index + 1) / (referenceLine.length - 1));
|
|
29570
|
-
return /* @__PURE__ */
|
|
29737
|
+
return /* @__PURE__ */ jsx34(
|
|
29571
29738
|
"line",
|
|
29572
29739
|
{
|
|
29573
29740
|
x1,
|
|
@@ -29582,7 +29749,7 @@ function CustomReferenceLine({
|
|
|
29582
29749
|
index
|
|
29583
29750
|
);
|
|
29584
29751
|
}),
|
|
29585
|
-
/* @__PURE__ */
|
|
29752
|
+
/* @__PURE__ */ jsxs25(
|
|
29586
29753
|
"text",
|
|
29587
29754
|
{
|
|
29588
29755
|
x: xMax - 5,
|
|
@@ -29605,56 +29772,6 @@ function CustomReferenceLine({
|
|
|
29605
29772
|
] });
|
|
29606
29773
|
}
|
|
29607
29774
|
|
|
29608
|
-
// src/components/Chart/CustomLegend.tsx
|
|
29609
|
-
import { useContext as useContext6 } from "react";
|
|
29610
|
-
import { jsx as jsx34, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
29611
|
-
var RenderLegend = (props) => {
|
|
29612
|
-
const { payload } = props;
|
|
29613
|
-
const [theme] = useContext6(ThemeContext);
|
|
29614
|
-
return /* @__PURE__ */ jsx34("div", { style: { display: "flex", justifyContent: "flex-start" }, children: payload.map((entry, index) => /* @__PURE__ */ jsxs25(
|
|
29615
|
-
"div",
|
|
29616
|
-
{
|
|
29617
|
-
style: {
|
|
29618
|
-
display: "flex",
|
|
29619
|
-
alignItems: "center",
|
|
29620
|
-
marginRight: "1rem"
|
|
29621
|
-
},
|
|
29622
|
-
children: [
|
|
29623
|
-
/* @__PURE__ */ jsx34(
|
|
29624
|
-
"svg",
|
|
29625
|
-
{
|
|
29626
|
-
style: { marginRight: "0.5rem" },
|
|
29627
|
-
width: "16",
|
|
29628
|
-
height: "16",
|
|
29629
|
-
viewBox: "0 0 16 16",
|
|
29630
|
-
children: /* @__PURE__ */ jsx34(
|
|
29631
|
-
"rect",
|
|
29632
|
-
{
|
|
29633
|
-
width: "16",
|
|
29634
|
-
height: "16",
|
|
29635
|
-
rx: "3",
|
|
29636
|
-
fill: payload?.[index]?.color
|
|
29637
|
-
}
|
|
29638
|
-
)
|
|
29639
|
-
}
|
|
29640
|
-
),
|
|
29641
|
-
/* @__PURE__ */ jsx34(
|
|
29642
|
-
"span",
|
|
29643
|
-
{
|
|
29644
|
-
style: {
|
|
29645
|
-
color: theme?.secondaryTextColor,
|
|
29646
|
-
fontFamily: theme?.fontFamily,
|
|
29647
|
-
fontSize: theme?.fontSizeMedium || "14px"
|
|
29648
|
-
},
|
|
29649
|
-
children: entry.value
|
|
29650
|
-
}
|
|
29651
|
-
)
|
|
29652
|
-
]
|
|
29653
|
-
},
|
|
29654
|
-
`legend-${index}`
|
|
29655
|
-
)) });
|
|
29656
|
-
};
|
|
29657
|
-
|
|
29658
29775
|
// src/components/Chart/LineChart.tsx
|
|
29659
29776
|
import { jsx as jsx35, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
29660
29777
|
function createLineForEmptyChart(yAxisFields, dateFilter, xAxisField, xAxisFormat) {
|
|
@@ -29773,7 +29890,7 @@ function LineChart({
|
|
|
29773
29890
|
}
|
|
29774
29891
|
),
|
|
29775
29892
|
showLegend && /* @__PURE__ */ jsx35(
|
|
29776
|
-
|
|
29893
|
+
Legend2,
|
|
29777
29894
|
{
|
|
29778
29895
|
verticalAlign: "top",
|
|
29779
29896
|
align: "left",
|
|
@@ -29992,7 +30109,7 @@ import {
|
|
|
29992
30109
|
Bar,
|
|
29993
30110
|
BarChart as ReChartsBarChart,
|
|
29994
30111
|
Customized as Customized2,
|
|
29995
|
-
Legend as
|
|
30112
|
+
Legend as Legend3
|
|
29996
30113
|
} from "recharts";
|
|
29997
30114
|
|
|
29998
30115
|
// src/components/Chart/CustomBar.tsx
|
|
@@ -30163,7 +30280,7 @@ function BarChart({
|
|
|
30163
30280
|
}
|
|
30164
30281
|
),
|
|
30165
30282
|
showLegend && /* @__PURE__ */ jsx37(
|
|
30166
|
-
|
|
30283
|
+
Legend3,
|
|
30167
30284
|
{
|
|
30168
30285
|
verticalAlign: "top",
|
|
30169
30286
|
align: "left",
|
|
@@ -30455,8 +30572,8 @@ import { useMemo as useMemo10 } from "react";
|
|
|
30455
30572
|
import {
|
|
30456
30573
|
useContext as useContext9,
|
|
30457
30574
|
useEffect as useEffect10,
|
|
30458
|
-
useRef as
|
|
30459
|
-
useState as
|
|
30575
|
+
useRef as useRef7,
|
|
30576
|
+
useState as useState12
|
|
30460
30577
|
} from "react";
|
|
30461
30578
|
import {
|
|
30462
30579
|
startOfMonth as startOfMonth3,
|
|
@@ -30477,8 +30594,8 @@ import {
|
|
|
30477
30594
|
import {
|
|
30478
30595
|
useContext as useContext8,
|
|
30479
30596
|
useMemo as useMemo7,
|
|
30480
|
-
useRef as
|
|
30481
|
-
useState as
|
|
30597
|
+
useRef as useRef6,
|
|
30598
|
+
useState as useState11,
|
|
30482
30599
|
useEffect as useEffect9
|
|
30483
30600
|
} from "react";
|
|
30484
30601
|
import { createPortal as createPortal2 } from "react-dom";
|
|
@@ -30494,9 +30611,9 @@ function QuillSelectComponent({
|
|
|
30494
30611
|
hideEmptyOption
|
|
30495
30612
|
}) {
|
|
30496
30613
|
const [theme] = useContext8(ThemeContext);
|
|
30497
|
-
const [showModal, setShowModal] =
|
|
30498
|
-
const modalRef =
|
|
30499
|
-
const buttonRef =
|
|
30614
|
+
const [showModal, setShowModal] = useState11(false);
|
|
30615
|
+
const modalRef = useRef6(null);
|
|
30616
|
+
const buttonRef = useRef6(null);
|
|
30500
30617
|
useOnClickOutside_default(
|
|
30501
30618
|
modalRef,
|
|
30502
30619
|
(event) => {
|
|
@@ -30519,9 +30636,9 @@ function QuillSelectComponent({
|
|
|
30519
30636
|
const nullLabel = useMemo7(() => {
|
|
30520
30637
|
return sortedItems.some((item) => item.value === "-") ? "None" : "-";
|
|
30521
30638
|
}, [sortedItems]);
|
|
30522
|
-
const [popoverPosition, setPopoverPosition] =
|
|
30523
|
-
const [z, setZ] =
|
|
30524
|
-
const scrollableParentRef =
|
|
30639
|
+
const [popoverPosition, setPopoverPosition] = useState11(void 0);
|
|
30640
|
+
const [z, setZ] = useState11(10);
|
|
30641
|
+
const scrollableParentRef = useRef6(document.body);
|
|
30525
30642
|
const updatePosition = () => {
|
|
30526
30643
|
if (buttonRef.current) {
|
|
30527
30644
|
requestAnimationFrame(() => {
|
|
@@ -30826,22 +30943,22 @@ function QuillDateRangePicker({
|
|
|
30826
30943
|
}) {
|
|
30827
30944
|
const [theme] = useContext9(ThemeContext);
|
|
30828
30945
|
const [client] = useContext9(ClientContext);
|
|
30829
|
-
const [anchorStartDate, setAnchorStartDate] =
|
|
30946
|
+
const [anchorStartDate, setAnchorStartDate] = useState12(
|
|
30830
30947
|
getAnchorStartDate(dateRange.startDate, dateRange.endDate)
|
|
30831
30948
|
);
|
|
30832
|
-
const [anchorEndDate, setAnchorEndDate] =
|
|
30949
|
+
const [anchorEndDate, setAnchorEndDate] = useState12(
|
|
30833
30950
|
getAnchorEndDate(dateRange.startDate, dateRange.endDate)
|
|
30834
30951
|
);
|
|
30835
|
-
const [localStartDate, setLocalStartDate] =
|
|
30952
|
+
const [localStartDate, setLocalStartDate] = useState12(
|
|
30836
30953
|
dateRange.startDate
|
|
30837
30954
|
);
|
|
30838
|
-
const [localEndDate, setLocalEndDate] =
|
|
30955
|
+
const [localEndDate, setLocalEndDate] = useState12(
|
|
30839
30956
|
dateRange.endDate
|
|
30840
30957
|
);
|
|
30841
|
-
const [localPreset, setLocalPreset] =
|
|
30842
|
-
const [showModal, setShowModal] =
|
|
30843
|
-
const buttonRef =
|
|
30844
|
-
const modalRef =
|
|
30958
|
+
const [localPreset, setLocalPreset] = useState12(preset);
|
|
30959
|
+
const [showModal, setShowModal] = useState12(false);
|
|
30960
|
+
const buttonRef = useRef7(null);
|
|
30961
|
+
const modalRef = useRef7(null);
|
|
30845
30962
|
useEffect10(() => {
|
|
30846
30963
|
setLocalEndDate(dateRange.endDate);
|
|
30847
30964
|
setLocalStartDate(dateRange.startDate);
|
|
@@ -31357,11 +31474,11 @@ import React7, {
|
|
|
31357
31474
|
useContext as useContext10,
|
|
31358
31475
|
useEffect as useEffect11,
|
|
31359
31476
|
useMemo as useMemo8,
|
|
31360
|
-
useRef as
|
|
31361
|
-
useState as
|
|
31477
|
+
useRef as useRef8,
|
|
31478
|
+
useState as useState13
|
|
31362
31479
|
} from "react";
|
|
31363
31480
|
import { createPortal as createPortal3 } from "react-dom";
|
|
31364
|
-
import { Fragment as
|
|
31481
|
+
import { Fragment as Fragment3, jsx as jsx41, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
31365
31482
|
function QuillMultiSelectComponentWithCombo({
|
|
31366
31483
|
options,
|
|
31367
31484
|
width,
|
|
@@ -31375,17 +31492,17 @@ function QuillMultiSelectComponentWithCombo({
|
|
|
31375
31492
|
style: style2
|
|
31376
31493
|
}) {
|
|
31377
31494
|
const [theme] = useContext10(ThemeContext);
|
|
31378
|
-
const [selectedOptions, setSelectedOptions] =
|
|
31379
|
-
const [showModal, setShowModal] =
|
|
31380
|
-
const modalRef =
|
|
31381
|
-
const buttonRef =
|
|
31382
|
-
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);
|
|
31383
31500
|
const [searchQuery, setSearchQuery] = React7.useState("");
|
|
31384
|
-
const [exceedsLimit, setExceedsLimit] =
|
|
31385
|
-
const [popoverPosition, setPopoverPosition] =
|
|
31386
|
-
const [z, setZ] =
|
|
31387
|
-
const scrollableParentRef =
|
|
31388
|
-
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);
|
|
31389
31506
|
let CheckboxState;
|
|
31390
31507
|
((CheckboxState2) => {
|
|
31391
31508
|
CheckboxState2[CheckboxState2["SELECTED"] = 0] = "SELECTED";
|
|
@@ -31419,7 +31536,7 @@ function QuillMultiSelectComponentWithCombo({
|
|
|
31419
31536
|
(elem) => elem.label ?? "-"
|
|
31420
31537
|
).join(", ");
|
|
31421
31538
|
}, [options, value]);
|
|
31422
|
-
const [selectAllCheckboxState, setSelectAllCheckboxState] =
|
|
31539
|
+
const [selectAllCheckboxState, setSelectAllCheckboxState] = useState13(
|
|
31423
31540
|
(() => {
|
|
31424
31541
|
if (value.length === 0) {
|
|
31425
31542
|
return 1 /* UNSELECTED */;
|
|
@@ -31675,7 +31792,7 @@ function QuillMultiSelectComponentWithCombo({
|
|
|
31675
31792
|
ref: modalRef,
|
|
31676
31793
|
"data-portal-ignore": "true",
|
|
31677
31794
|
children: [
|
|
31678
|
-
!exceedsLimit && options && options.length > 20 && /* @__PURE__ */ jsxs31(
|
|
31795
|
+
!exceedsLimit && options && options.length > 20 && /* @__PURE__ */ jsxs31(Fragment3, { children: [
|
|
31679
31796
|
/* @__PURE__ */ jsx41(
|
|
31680
31797
|
ListboxTextInput,
|
|
31681
31798
|
{
|
|
@@ -31745,7 +31862,7 @@ function QuillMultiSelectComponentWithCombo({
|
|
|
31745
31862
|
]
|
|
31746
31863
|
}
|
|
31747
31864
|
),
|
|
31748
|
-
!exceedsLimit && !isLoading ? /* @__PURE__ */ jsxs31(
|
|
31865
|
+
!exceedsLimit && !isLoading ? /* @__PURE__ */ jsxs31(Fragment3, { children: [
|
|
31749
31866
|
searchQuery === "" && potentialOptions.length > 0 && /* @__PURE__ */ jsxs31(
|
|
31750
31867
|
"button",
|
|
31751
31868
|
{
|
|
@@ -32022,8 +32139,8 @@ var ListboxTextInput = ({
|
|
|
32022
32139
|
import React8, {
|
|
32023
32140
|
useContext as useContext11,
|
|
32024
32141
|
useMemo as useMemo9,
|
|
32025
|
-
useRef as
|
|
32026
|
-
useState as
|
|
32142
|
+
useRef as useRef9,
|
|
32143
|
+
useState as useState14
|
|
32027
32144
|
} from "react";
|
|
32028
32145
|
import { jsx as jsx42, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
32029
32146
|
function QuillSelectComponentWithCombo({
|
|
@@ -32037,9 +32154,9 @@ function QuillSelectComponentWithCombo({
|
|
|
32037
32154
|
disabled
|
|
32038
32155
|
}) {
|
|
32039
32156
|
const [theme] = useContext11(ThemeContext);
|
|
32040
|
-
const [showModal, setShowModal] =
|
|
32041
|
-
const modalRef =
|
|
32042
|
-
const buttonRef =
|
|
32157
|
+
const [showModal, setShowModal] = useState14(false);
|
|
32158
|
+
const modalRef = useRef9(null);
|
|
32159
|
+
const buttonRef = useRef9(null);
|
|
32043
32160
|
const [searchQuery, setSearchQuery] = React8.useState("");
|
|
32044
32161
|
const filteredItems = React8.useMemo(() => {
|
|
32045
32162
|
if (searchQuery === "") {
|
|
@@ -32838,11 +32955,11 @@ var MetricDisplay = ({
|
|
|
32838
32955
|
};
|
|
32839
32956
|
|
|
32840
32957
|
// src/components/Dashboard/DataLoader.tsx
|
|
32841
|
-
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";
|
|
32842
32959
|
init_paginationProcessing();
|
|
32843
32960
|
init_tableProcessing();
|
|
32844
32961
|
import equal2 from "fast-deep-equal";
|
|
32845
|
-
import { Fragment as
|
|
32962
|
+
import { Fragment as Fragment4, jsx as jsx45 } from "react/jsx-runtime";
|
|
32846
32963
|
var constructReportFromItem = (item) => {
|
|
32847
32964
|
return {
|
|
32848
32965
|
...EMPTY_INTERNAL_REPORT,
|
|
@@ -32852,6 +32969,7 @@ var constructReportFromItem = (item) => {
|
|
|
32852
32969
|
rows: [],
|
|
32853
32970
|
columns: [],
|
|
32854
32971
|
chartType: item.chartType,
|
|
32972
|
+
showLegend: item.showLegend,
|
|
32855
32973
|
dateField: item.dateField,
|
|
32856
32974
|
pivot: item.pivot,
|
|
32857
32975
|
xAxisLabel: item.xAxisLabel,
|
|
@@ -32957,10 +33075,10 @@ function DataLoader({
|
|
|
32957
33075
|
) : Object.values(reportFilters[item.id] ?? {}).map((f) => f.filter);
|
|
32958
33076
|
}, [dashboardFilters, reportFilters, dashboardName, item.id]);
|
|
32959
33077
|
const [schemaData] = useContext13(SchemaDataContext);
|
|
32960
|
-
const [loading, setLoading] =
|
|
32961
|
-
const [error, setError] =
|
|
32962
|
-
const [previousPage, setPreviousPage] =
|
|
32963
|
-
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);
|
|
32964
33082
|
const chartReport = useMemo11(() => {
|
|
32965
33083
|
const report = (dashboardName ? dashboard : reports)[item.id];
|
|
32966
33084
|
if (report) {
|
|
@@ -32977,17 +33095,17 @@ function DataLoader({
|
|
|
32977
33095
|
reportFilters,
|
|
32978
33096
|
dashboardFilters
|
|
32979
33097
|
]);
|
|
32980
|
-
const previousFilters =
|
|
32981
|
-
const previousUserFilters =
|
|
32982
|
-
const previousTenants =
|
|
32983
|
-
const previousCustomFields =
|
|
32984
|
-
const [rowCountIsLoading, setRowCountIsLoading] =
|
|
32985
|
-
const rowsRequestId =
|
|
32986
|
-
const rowsAbortController =
|
|
32987
|
-
const rowCountRequestId =
|
|
32988
|
-
const rowCountAbortController =
|
|
32989
|
-
const updateTableRowsRequestId =
|
|
32990
|
-
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);
|
|
32991
33109
|
const fetchRowCount = async (processing) => {
|
|
32992
33110
|
if (!client || !filters) {
|
|
32993
33111
|
if (!rowCountAbortController.current) return;
|
|
@@ -33346,7 +33464,7 @@ function DataLoader({
|
|
|
33346
33464
|
(dashboardName ? dashboard : reports)[item.id]?.triggerReload,
|
|
33347
33465
|
(dashboardName ? dashboard : reports)[item.id]?.error
|
|
33348
33466
|
]);
|
|
33349
|
-
return /* @__PURE__ */ jsx45(
|
|
33467
|
+
return /* @__PURE__ */ jsx45(Fragment4, { children: children({
|
|
33350
33468
|
isLoading: loading,
|
|
33351
33469
|
error,
|
|
33352
33470
|
onPageChange,
|
|
@@ -33382,17 +33500,17 @@ var ChartDataLoader = ({
|
|
|
33382
33500
|
(f) => f.filter
|
|
33383
33501
|
) : Object.values(reportFilters[item.id] ?? {}).map((f) => f.filter);
|
|
33384
33502
|
}, [dashboardFilters, reportFilters, dashboardName, item.id]);
|
|
33385
|
-
const [loading, setLoading] =
|
|
33386
|
-
const [error, setError] =
|
|
33503
|
+
const [loading, setLoading] = useState15(true);
|
|
33504
|
+
const [error, setError] = useState15(void 0);
|
|
33387
33505
|
const [client] = useContext13(ClientContext);
|
|
33388
33506
|
const [schemaData] = useContext13(SchemaDataContext);
|
|
33389
|
-
const previousFilters =
|
|
33390
|
-
const previousUserFilters =
|
|
33391
|
-
const previousDateBucket =
|
|
33392
|
-
const previousTenants =
|
|
33393
|
-
const previousCustomFields =
|
|
33394
|
-
const fetchReportAbortController =
|
|
33395
|
-
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);
|
|
33396
33514
|
const chartReport = useMemo11(() => {
|
|
33397
33515
|
const report = dashboardName ? dashboard[item.id] : reports[item.id];
|
|
33398
33516
|
if (!report) {
|
|
@@ -33673,7 +33791,7 @@ import {
|
|
|
33673
33791
|
Geography,
|
|
33674
33792
|
useMapContext
|
|
33675
33793
|
} from "react-simple-maps";
|
|
33676
|
-
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";
|
|
33677
33795
|
init_valueFormatter();
|
|
33678
33796
|
import { jsx as jsx46, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
33679
33797
|
var statesUrl = "https://cdn.jsdelivr.net/npm/us-atlas@3/states-10m.json";
|
|
@@ -34000,17 +34118,17 @@ function USMap({
|
|
|
34000
34118
|
className,
|
|
34001
34119
|
containerStyle
|
|
34002
34120
|
}) {
|
|
34003
|
-
const containerRef =
|
|
34004
|
-
const [hoveredState, setHoveredState] =
|
|
34121
|
+
const containerRef = useRef11(null);
|
|
34122
|
+
const [hoveredState, setHoveredState] = useState16(
|
|
34005
34123
|
void 0
|
|
34006
34124
|
);
|
|
34007
|
-
const [hoveredCoords, setHoveredCoords] =
|
|
34125
|
+
const [hoveredCoords, setHoveredCoords] = useState16(void 0);
|
|
34008
34126
|
const mappedData = data.reduce((acc, curr) => {
|
|
34009
34127
|
acc[curr[xAxisField]?.toString()] = curr;
|
|
34010
34128
|
return acc;
|
|
34011
34129
|
}, {});
|
|
34012
34130
|
const measureField = yAxisFields[0]?.field ?? xAxisField;
|
|
34013
|
-
const [scaleLog, setScaleLog] =
|
|
34131
|
+
const [scaleLog, setScaleLog] = useState16(null);
|
|
34014
34132
|
useEffect13(() => {
|
|
34015
34133
|
import("d3-scale").then((scale) => {
|
|
34016
34134
|
setScaleLog(() => scale.scaleLog);
|
|
@@ -34191,17 +34309,17 @@ function WorldMap({
|
|
|
34191
34309
|
className,
|
|
34192
34310
|
containerStyle
|
|
34193
34311
|
}) {
|
|
34194
|
-
const containerRef =
|
|
34195
|
-
const [hoveredCountry, setHoveredCountry] =
|
|
34312
|
+
const containerRef = useRef11(null);
|
|
34313
|
+
const [hoveredCountry, setHoveredCountry] = useState16(
|
|
34196
34314
|
void 0
|
|
34197
34315
|
);
|
|
34198
|
-
const [hoveredCoords, setHoveredCoords] =
|
|
34316
|
+
const [hoveredCoords, setHoveredCoords] = useState16(void 0);
|
|
34199
34317
|
const mappedData = data.reduce((acc, curr) => {
|
|
34200
34318
|
acc[curr[xAxisField]?.toString()] = curr;
|
|
34201
34319
|
return acc;
|
|
34202
34320
|
}, {});
|
|
34203
34321
|
const measureField = yAxisFields[0]?.field ?? xAxisField;
|
|
34204
|
-
const [scaleLog, setScaleLog] =
|
|
34322
|
+
const [scaleLog, setScaleLog] = useState16(null);
|
|
34205
34323
|
useEffect13(() => {
|
|
34206
34324
|
import("d3-scale").then((scale) => {
|
|
34207
34325
|
setScaleLog(() => scale.scaleLog);
|
|
@@ -34384,7 +34502,7 @@ function MapLayout({
|
|
|
34384
34502
|
regionNames
|
|
34385
34503
|
}) {
|
|
34386
34504
|
const { projection } = useMapContext();
|
|
34387
|
-
const [geoCentroid, setGeoCentroid] =
|
|
34505
|
+
const [geoCentroid, setGeoCentroid] = useState16(null);
|
|
34388
34506
|
useEffect13(() => {
|
|
34389
34507
|
import("d3-geo").then((geo) => {
|
|
34390
34508
|
setGeoCentroid(() => geo.geoCentroid);
|
|
@@ -34437,7 +34555,7 @@ function MapLayout({
|
|
|
34437
34555
|
}
|
|
34438
34556
|
|
|
34439
34557
|
// src/components/Chart/GaugeChart.tsx
|
|
34440
|
-
import { useEffect as useEffect14, useRef as
|
|
34558
|
+
import { useEffect as useEffect14, useRef as useRef12, useState as useState17 } from "react";
|
|
34441
34559
|
|
|
34442
34560
|
// ../../node_modules/d3-transition/src/selection/index.js
|
|
34443
34561
|
import { selection as selection3 } from "d3-selection";
|
|
@@ -35711,19 +35829,19 @@ function D3Gauge({
|
|
|
35711
35829
|
colors,
|
|
35712
35830
|
isAnimationActive
|
|
35713
35831
|
}) {
|
|
35714
|
-
const containerRef =
|
|
35715
|
-
const svgRef =
|
|
35716
|
-
const gaugeGroupRef =
|
|
35717
|
-
const needleRef =
|
|
35718
|
-
const needleOutlineRef =
|
|
35719
|
-
const textRef =
|
|
35720
|
-
const previousPercentageRef =
|
|
35721
|
-
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);
|
|
35722
35840
|
const startAngle = -(3 * Math.PI) / 4;
|
|
35723
35841
|
const totalAngle = 3 * Math.PI / 2;
|
|
35724
|
-
const [arc, setArc] =
|
|
35725
|
-
const [interpolate, setInterpolate] =
|
|
35726
|
-
const [select, setSelect] =
|
|
35842
|
+
const [arc, setArc] = useState17(null);
|
|
35843
|
+
const [interpolate, setInterpolate] = useState17(null);
|
|
35844
|
+
const [select, setSelect] = useState17(null);
|
|
35727
35845
|
useEffect14(() => {
|
|
35728
35846
|
import("d3-shape").then(({ arc: arc2 }) => {
|
|
35729
35847
|
setArc(() => arc2);
|
|
@@ -35871,7 +35989,7 @@ function D3Gauge({
|
|
|
35871
35989
|
|
|
35872
35990
|
// src/components/QuillComponentTables.tsx
|
|
35873
35991
|
init_paginationProcessing();
|
|
35874
|
-
import { useState as
|
|
35992
|
+
import { useState as useState18, useEffect as useEffect15, useContext as useContext15 } from "react";
|
|
35875
35993
|
import { jsx as jsx48, jsxs as jsxs36 } from "react/jsx-runtime";
|
|
35876
35994
|
var QuillTableSQLEditorComponent = ({
|
|
35877
35995
|
rows,
|
|
@@ -35887,8 +36005,8 @@ var QuillTableSQLEditorComponent = ({
|
|
|
35887
36005
|
setCurrentPage,
|
|
35888
36006
|
hideLabels
|
|
35889
36007
|
}) => {
|
|
35890
|
-
const [sort, setSort] =
|
|
35891
|
-
const [page, setPage] =
|
|
36008
|
+
const [sort, setSort] = useState18({ field: "", direction: "" });
|
|
36009
|
+
const [page, setPage] = useState18(0);
|
|
35892
36010
|
return /* @__PURE__ */ jsx48(
|
|
35893
36011
|
QuillTable,
|
|
35894
36012
|
{
|
|
@@ -35930,8 +36048,8 @@ var QuillTableReportBuilderComponent = ({
|
|
|
35930
36048
|
setCurrentPage,
|
|
35931
36049
|
disableSort
|
|
35932
36050
|
}) => {
|
|
35933
|
-
const [sort, setSort] =
|
|
35934
|
-
const [page, setPage] =
|
|
36051
|
+
const [sort, setSort] = useState18({ field: "", direction: "" });
|
|
36052
|
+
const [page, setPage] = useState18(0);
|
|
35935
36053
|
useEffect15(() => {
|
|
35936
36054
|
if (disableSort) {
|
|
35937
36055
|
setSort({ field: "", direction: "" });
|
|
@@ -35984,9 +36102,9 @@ var QuillTableComponent = ({
|
|
|
35984
36102
|
borderTop,
|
|
35985
36103
|
borderBottom
|
|
35986
36104
|
}) => {
|
|
35987
|
-
const [sort, setSort] =
|
|
35988
|
-
const [page, setPage] =
|
|
35989
|
-
const [initialLoad, setInitialLoad] =
|
|
36105
|
+
const [sort, setSort] = useState18({ field: "", direction: "" });
|
|
36106
|
+
const [page, setPage] = useState18(0);
|
|
36107
|
+
const [initialLoad, setInitialLoad] = useState18(() => {
|
|
35990
36108
|
return !(rows && rows.length > 0 && !isLoading);
|
|
35991
36109
|
});
|
|
35992
36110
|
useEffect15(() => {
|
|
@@ -36056,9 +36174,9 @@ function QuillTableDashboardComponent({
|
|
|
36056
36174
|
hideName
|
|
36057
36175
|
}) {
|
|
36058
36176
|
const [theme] = useContext15(ThemeContext);
|
|
36059
|
-
const [initialLoad, setInitialLoad] =
|
|
36177
|
+
const [initialLoad, setInitialLoad] = useState18(true);
|
|
36060
36178
|
const { downloadCSV: downloadCSV2 } = useExport(report?.id);
|
|
36061
|
-
const [page, setPage] =
|
|
36179
|
+
const [page, setPage] = useState18(report?.pagination?.page ?? 0);
|
|
36062
36180
|
useEffect15(() => {
|
|
36063
36181
|
if (!isLoading) {
|
|
36064
36182
|
setInitialLoad(false);
|
|
@@ -36167,7 +36285,7 @@ function QuillTableDashboardComponent({
|
|
|
36167
36285
|
}
|
|
36168
36286
|
|
|
36169
36287
|
// src/Chart.tsx
|
|
36170
|
-
import { Fragment as
|
|
36288
|
+
import { Fragment as Fragment5, jsx as jsx49, jsxs as jsxs37 } from "react/jsx-runtime";
|
|
36171
36289
|
var MAX_ROWS_FOR_GENERIC_TABLE = 500;
|
|
36172
36290
|
function sumByKey(arr, key) {
|
|
36173
36291
|
return arr.reduce((acc, cur) => {
|
|
@@ -36243,11 +36361,11 @@ function Chart({
|
|
|
36243
36361
|
filters,
|
|
36244
36362
|
dashboardCustomFilters[allReportsById[reportId]?.dashboardName ?? ""]
|
|
36245
36363
|
]);
|
|
36246
|
-
const previousFilters =
|
|
36364
|
+
const previousFilters = useRef13(void 0);
|
|
36247
36365
|
if (!equal3(previousFilters.current, filters)) {
|
|
36248
36366
|
previousFilters.current = filters;
|
|
36249
36367
|
}
|
|
36250
|
-
const [filterValues, setFilterValues] =
|
|
36368
|
+
const [filterValues, setFilterValues] = useState19({});
|
|
36251
36369
|
useEffect16(() => {
|
|
36252
36370
|
setFilterValues(
|
|
36253
36371
|
Object.values(reportFilters[reportId] ?? {}).reduce((acc, f) => {
|
|
@@ -36317,7 +36435,7 @@ function Chart({
|
|
|
36317
36435
|
[reportId, allReportsById]
|
|
36318
36436
|
);
|
|
36319
36437
|
const report = useMemo13(() => reports[reportId], [reports, reportId]);
|
|
36320
|
-
const [loading, setLoading] =
|
|
36438
|
+
const [loading, setLoading] = useState19(true);
|
|
36321
36439
|
const [theme] = useContext16(ThemeContext);
|
|
36322
36440
|
const colorMap = useMemo13(() => {
|
|
36323
36441
|
if (mapColorsToFields && report && theme) {
|
|
@@ -36325,7 +36443,7 @@ function Chart({
|
|
|
36325
36443
|
}
|
|
36326
36444
|
}, [report, theme]);
|
|
36327
36445
|
const [client, clientLoading] = useContext16(ClientContext);
|
|
36328
|
-
const [error, setError] =
|
|
36446
|
+
const [error, setError] = useState19(void 0);
|
|
36329
36447
|
const updateFilter = (filter, value, comparison) => {
|
|
36330
36448
|
let filterValue = {};
|
|
36331
36449
|
if (filter.filterType === "string" /* String */) {
|
|
@@ -36495,8 +36613,8 @@ function Chart({
|
|
|
36495
36613
|
},
|
|
36496
36614
|
index
|
|
36497
36615
|
)) }),
|
|
36498
|
-
loading || !report ? /* @__PURE__ */ jsx49(LoadingComponent, {}) : /* @__PURE__ */ jsxs37(
|
|
36499
|
-
("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(
|
|
36500
36618
|
DataLoader,
|
|
36501
36619
|
{
|
|
36502
36620
|
item: report,
|
|
@@ -36619,7 +36737,7 @@ var ChartDisplay = ({
|
|
|
36619
36737
|
onClickChartElement,
|
|
36620
36738
|
overrideTheme,
|
|
36621
36739
|
referenceLines,
|
|
36622
|
-
showLegend
|
|
36740
|
+
showLegend,
|
|
36623
36741
|
tableRowsLoading = false
|
|
36624
36742
|
}) => {
|
|
36625
36743
|
const { downloadCSV: downloadCSV2 } = useExport(reportId);
|
|
@@ -36652,7 +36770,8 @@ var ChartDisplay = ({
|
|
|
36652
36770
|
}
|
|
36653
36771
|
return void 0;
|
|
36654
36772
|
}, [config, specificReportFilters, specificDashboardFilters]);
|
|
36655
|
-
const
|
|
36773
|
+
const resolvedShowLegend = showLegend !== void 0 ? showLegend : config?.showLegend ?? false;
|
|
36774
|
+
const [page, setPage] = useState19(0);
|
|
36656
36775
|
if (loading) {
|
|
36657
36776
|
return /* @__PURE__ */ jsx49("div", { className, style: containerStyle, children: /* @__PURE__ */ jsx49(LoadingComponent, {}) });
|
|
36658
36777
|
} else if (config && !["metric", "table", "gauge", "US map", "World map"].includes(
|
|
@@ -36687,7 +36806,7 @@ var ChartDisplay = ({
|
|
|
36687
36806
|
colorMap,
|
|
36688
36807
|
onClickChartElement,
|
|
36689
36808
|
yAxisFields: config?.yAxisFields,
|
|
36690
|
-
showLegend
|
|
36809
|
+
showLegend: resolvedShowLegend
|
|
36691
36810
|
}
|
|
36692
36811
|
);
|
|
36693
36812
|
}
|
|
@@ -36761,7 +36880,7 @@ var ChartDisplay = ({
|
|
|
36761
36880
|
onClickChartElement,
|
|
36762
36881
|
dateFilter: !hideDateRangeFilter ? dateFilter : void 0,
|
|
36763
36882
|
referenceLines,
|
|
36764
|
-
showLegend
|
|
36883
|
+
showLegend: resolvedShowLegend
|
|
36765
36884
|
}
|
|
36766
36885
|
);
|
|
36767
36886
|
}
|
|
@@ -36788,7 +36907,7 @@ var ChartDisplay = ({
|
|
|
36788
36907
|
onClickChartElement,
|
|
36789
36908
|
dateFilter: !hideDateRangeFilter ? dateFilter : void 0,
|
|
36790
36909
|
referenceLines,
|
|
36791
|
-
showLegend,
|
|
36910
|
+
showLegend: resolvedShowLegend,
|
|
36792
36911
|
stackedMode: true
|
|
36793
36912
|
}
|
|
36794
36913
|
);
|
|
@@ -36932,7 +37051,7 @@ var ChartDisplay = ({
|
|
|
36932
37051
|
onClickChartElement,
|
|
36933
37052
|
dateFilter: !hideDateRangeFilter ? dateFilter : void 0,
|
|
36934
37053
|
referenceLines,
|
|
36935
|
-
showLegend
|
|
37054
|
+
showLegend: resolvedShowLegend
|
|
36936
37055
|
}
|
|
36937
37056
|
);
|
|
36938
37057
|
};
|
|
@@ -37096,7 +37215,7 @@ function QuillChartComponent({
|
|
|
37096
37215
|
}
|
|
37097
37216
|
|
|
37098
37217
|
// src/components/Dashboard/TemplateChartComponent.tsx
|
|
37099
|
-
import { useState as
|
|
37218
|
+
import { useState as useState20 } from "react";
|
|
37100
37219
|
import { jsx as jsx52 } from "react/jsx-runtime";
|
|
37101
37220
|
function QuillTemplateChartComponent({
|
|
37102
37221
|
report,
|
|
@@ -37104,7 +37223,7 @@ function QuillTemplateChartComponent({
|
|
|
37104
37223
|
children,
|
|
37105
37224
|
isLoading
|
|
37106
37225
|
}) {
|
|
37107
|
-
const [isSelected, setIsSelected] =
|
|
37226
|
+
const [isSelected, setIsSelected] = useState20(false);
|
|
37108
37227
|
return /* @__PURE__ */ jsx52(
|
|
37109
37228
|
"div",
|
|
37110
37229
|
{
|
|
@@ -37134,13 +37253,13 @@ function QuillTemplateChartComponent({
|
|
|
37134
37253
|
|
|
37135
37254
|
// src/components/Dashboard/DashboardSection.tsx
|
|
37136
37255
|
import { useContext as useContext18 } from "react";
|
|
37137
|
-
import { Fragment as
|
|
37256
|
+
import { Fragment as Fragment6, jsx as jsx53, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
37138
37257
|
function DashboardSection({
|
|
37139
37258
|
section,
|
|
37140
37259
|
children
|
|
37141
37260
|
}) {
|
|
37142
37261
|
const [theme] = useContext18(ThemeContext);
|
|
37143
|
-
return /* @__PURE__ */ jsxs39(
|
|
37262
|
+
return /* @__PURE__ */ jsxs39(Fragment6, { children: [
|
|
37144
37263
|
section && /* @__PURE__ */ jsx53("div", { style: { display: "flex", flexDirection: "column" }, children: /* @__PURE__ */ jsx53(
|
|
37145
37264
|
"h1",
|
|
37146
37265
|
{
|
|
@@ -37193,12 +37312,12 @@ import {
|
|
|
37193
37312
|
useContext as useContext19,
|
|
37194
37313
|
useEffect as useEffect17,
|
|
37195
37314
|
useMemo as useMemo14,
|
|
37196
|
-
useRef as
|
|
37197
|
-
useState as
|
|
37315
|
+
useRef as useRef14,
|
|
37316
|
+
useState as useState21
|
|
37198
37317
|
} from "react";
|
|
37199
37318
|
init_util();
|
|
37200
37319
|
init_tableProcessing();
|
|
37201
|
-
import { Fragment as
|
|
37320
|
+
import { Fragment as Fragment7, jsx as jsx54, jsxs as jsxs40 } from "react/jsx-runtime";
|
|
37202
37321
|
var QuillSecondaryButton = ({ children, ...props }) => {
|
|
37203
37322
|
const [theme] = useContext19(ThemeContext);
|
|
37204
37323
|
return /* @__PURE__ */ jsx54(
|
|
@@ -37603,7 +37722,7 @@ var QuillSortPopover = ({
|
|
|
37603
37722
|
setIsOpen,
|
|
37604
37723
|
disabled
|
|
37605
37724
|
}) => {
|
|
37606
|
-
return /* @__PURE__ */ jsxs40(
|
|
37725
|
+
return /* @__PURE__ */ jsxs40(Fragment7, { children: [
|
|
37607
37726
|
/* @__PURE__ */ jsx54(
|
|
37608
37727
|
QuillTag,
|
|
37609
37728
|
{
|
|
@@ -37636,7 +37755,7 @@ var QuillLimitPopover = ({
|
|
|
37636
37755
|
setIsOpen,
|
|
37637
37756
|
disabled = false
|
|
37638
37757
|
}) => {
|
|
37639
|
-
return /* @__PURE__ */ jsxs40(
|
|
37758
|
+
return /* @__PURE__ */ jsxs40(Fragment7, { children: [
|
|
37640
37759
|
/* @__PURE__ */ jsx54(
|
|
37641
37760
|
QuillTag,
|
|
37642
37761
|
{
|
|
@@ -37689,10 +37808,10 @@ var FilterPopoverWrapper = ({
|
|
|
37689
37808
|
}) => {
|
|
37690
37809
|
const { tenants } = useContext19(TenantContext);
|
|
37691
37810
|
const { eventTracking } = useContext19(EventTrackingContext);
|
|
37692
|
-
const [isOpen, setIsOpen] =
|
|
37693
|
-
const [uniqueValues, setUniqueValues] =
|
|
37694
|
-
const [uniqueValuesIsLoading, setUniqueValuesIsLoading] =
|
|
37695
|
-
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("");
|
|
37696
37815
|
const columnInternals = useMemo14(() => {
|
|
37697
37816
|
if (!tables) {
|
|
37698
37817
|
return null;
|
|
@@ -37777,11 +37896,11 @@ var FilterPopoverWrapper = ({
|
|
|
37777
37896
|
|
|
37778
37897
|
// src/components/ReportBuilder/FilterModal.tsx
|
|
37779
37898
|
init_Filter();
|
|
37780
|
-
import { useState as
|
|
37899
|
+
import { useState as useState22, useEffect as useEffect18, useMemo as useMemo15 } from "react";
|
|
37781
37900
|
init_textProcessing();
|
|
37782
37901
|
init_filterProcessing();
|
|
37783
37902
|
import { format as format8, isValid as isValid5, parse as parse4, startOfToday as startOfToday2 } from "date-fns";
|
|
37784
|
-
import { Fragment as
|
|
37903
|
+
import { Fragment as Fragment8, jsx as jsx55, jsxs as jsxs41 } from "react/jsx-runtime";
|
|
37785
37904
|
function FilterModal({
|
|
37786
37905
|
schema,
|
|
37787
37906
|
tables,
|
|
@@ -37799,26 +37918,26 @@ function FilterModal({
|
|
|
37799
37918
|
MultiSelectComponent,
|
|
37800
37919
|
reportBuilderColumns
|
|
37801
37920
|
}) {
|
|
37802
|
-
const [field, setField] =
|
|
37803
|
-
const [fieldOptions, setFieldOptions] =
|
|
37804
|
-
const [fieldValues, setFieldValues] =
|
|
37805
|
-
const [type, setType] =
|
|
37806
|
-
const [value, setValue] =
|
|
37807
|
-
const [selectedOptions, setSelectedOptions] =
|
|
37808
|
-
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(
|
|
37809
37928
|
void 0
|
|
37810
37929
|
);
|
|
37811
|
-
const [operatorOptions, setOperatorOptions] =
|
|
37812
|
-
const [unit, setUnit] =
|
|
37813
|
-
const [unitOptions, setUnitOptions] =
|
|
37814
|
-
const [startDate, setStartDate] =
|
|
37930
|
+
const [operatorOptions, setOperatorOptions] = useState22([]);
|
|
37931
|
+
const [unit, setUnit] = useState22("");
|
|
37932
|
+
const [unitOptions, setUnitOptions] = useState22([]);
|
|
37933
|
+
const [startDate, setStartDate] = useState22(
|
|
37815
37934
|
startOfToday2().toISOString().substring(0, 10)
|
|
37816
37935
|
);
|
|
37817
|
-
const [endDate, setEndDate] =
|
|
37936
|
+
const [endDate, setEndDate] = useState22(
|
|
37818
37937
|
startOfToday2().toISOString().substring(0, 10)
|
|
37819
37938
|
);
|
|
37820
|
-
const [filterInitialized, setFilterInitialized] =
|
|
37821
|
-
const [table, setTable] =
|
|
37939
|
+
const [filterInitialized, setFilterInitialized] = useState22(false);
|
|
37940
|
+
const [table, setTable] = useState22(void 0);
|
|
37822
37941
|
const memoizedFieldValuesMap = useMemo15(
|
|
37823
37942
|
() => fieldValuesMap,
|
|
37824
37943
|
[JSON.stringify(fieldValuesMap)]
|
|
@@ -38533,7 +38652,7 @@ function FilterModal({
|
|
|
38533
38652
|
}
|
|
38534
38653
|
) });
|
|
38535
38654
|
default:
|
|
38536
|
-
return /* @__PURE__ */ jsx55(
|
|
38655
|
+
return /* @__PURE__ */ jsx55(Fragment8, {});
|
|
38537
38656
|
}
|
|
38538
38657
|
})()
|
|
38539
38658
|
]
|
|
@@ -38579,7 +38698,7 @@ function FilterModal({
|
|
|
38579
38698
|
}
|
|
38580
38699
|
|
|
38581
38700
|
// src/components/Dashboard/TemplateMetricComponent.tsx
|
|
38582
|
-
import { useState as
|
|
38701
|
+
import { useState as useState23 } from "react";
|
|
38583
38702
|
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
38584
38703
|
function QuillTemplateMetricComponent({
|
|
38585
38704
|
report,
|
|
@@ -38587,7 +38706,7 @@ function QuillTemplateMetricComponent({
|
|
|
38587
38706
|
children,
|
|
38588
38707
|
isLoading
|
|
38589
38708
|
}) {
|
|
38590
|
-
const [isSelected, setIsSelected] =
|
|
38709
|
+
const [isSelected, setIsSelected] = useState23(false);
|
|
38591
38710
|
return /* @__PURE__ */ jsx56(
|
|
38592
38711
|
"div",
|
|
38593
38712
|
{
|
|
@@ -38616,7 +38735,7 @@ function QuillTemplateMetricComponent({
|
|
|
38616
38735
|
}
|
|
38617
38736
|
|
|
38618
38737
|
// src/components/Dashboard/TemplateTableComponent.tsx
|
|
38619
|
-
import { useState as
|
|
38738
|
+
import { useState as useState24 } from "react";
|
|
38620
38739
|
import { jsx as jsx57 } from "react/jsx-runtime";
|
|
38621
38740
|
function QuillTemplateTableComponent({
|
|
38622
38741
|
report,
|
|
@@ -38627,7 +38746,7 @@ function QuillTemplateTableComponent({
|
|
|
38627
38746
|
onPageChange,
|
|
38628
38747
|
onSortChange
|
|
38629
38748
|
}) {
|
|
38630
|
-
const [isSelected, setIsSelected] =
|
|
38749
|
+
const [isSelected, setIsSelected] = useState24(false);
|
|
38631
38750
|
return /* @__PURE__ */ jsx57(
|
|
38632
38751
|
"div",
|
|
38633
38752
|
{
|
|
@@ -38755,7 +38874,7 @@ async function addTemplatesToDashboard(name2, newTemplates, client, dashboardDat
|
|
|
38755
38874
|
}
|
|
38756
38875
|
|
|
38757
38876
|
// src/Dashboard.tsx
|
|
38758
|
-
import { Fragment as
|
|
38877
|
+
import { Fragment as Fragment9, jsx as jsx58, jsxs as jsxs42 } from "react/jsx-runtime";
|
|
38759
38878
|
var defaultChartContainerStyles = {
|
|
38760
38879
|
display: "flex",
|
|
38761
38880
|
width: "100%",
|
|
@@ -38842,8 +38961,8 @@ function Dashboard({
|
|
|
38842
38961
|
templateDashboardName,
|
|
38843
38962
|
pagination = { rowsPerPage: 10, rowsPerRequest: 50 }
|
|
38844
38963
|
}) {
|
|
38845
|
-
const [userFilters, setUserFilters] =
|
|
38846
|
-
const [selectedSection, setSelectedSection] =
|
|
38964
|
+
const [userFilters, setUserFilters] = useState25({});
|
|
38965
|
+
const [selectedSection, setSelectedSection] = useState25("");
|
|
38847
38966
|
const dataLoaderUserFilters = useMemo16(() => {
|
|
38848
38967
|
return (filters?.map((f) => convertCustomFilter(f)) ?? []).concat(
|
|
38849
38968
|
Object.values(userFilters)
|
|
@@ -38947,7 +39066,7 @@ function Dashboard({
|
|
|
38947
39066
|
});
|
|
38948
39067
|
return map;
|
|
38949
39068
|
}, [data?.sections, data?.sectionOrder]);
|
|
38950
|
-
const mounted =
|
|
39069
|
+
const mounted = useRef15(false);
|
|
38951
39070
|
useEffect19(() => {
|
|
38952
39071
|
if (!mounted.current) {
|
|
38953
39072
|
mounted.current = true;
|
|
@@ -38974,31 +39093,31 @@ function Dashboard({
|
|
|
38974
39093
|
const { dispatch: dashboardFiltersDispatch } = useContext20(
|
|
38975
39094
|
DashboardFiltersContext
|
|
38976
39095
|
);
|
|
38977
|
-
const [fieldValuesMap, setFieldValuesMap] =
|
|
38978
|
-
const [fieldValuesIsLoaded, setFieldValuesIsLoaded] =
|
|
38979
|
-
const [addFilterPopoverIsOpen, setAddFilterPopoverIsOpen] =
|
|
38980
|
-
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);
|
|
38981
39100
|
const [
|
|
38982
39101
|
filterListAddFilterPopoverIsOpen,
|
|
38983
39102
|
setFilterListAddFilterPopoverIsOpen
|
|
38984
|
-
] =
|
|
39103
|
+
] = useState25(false);
|
|
38985
39104
|
const presetOptions = useMemo16(() => {
|
|
38986
39105
|
return populatedDashboardFilters?.[0]?.filterType === "date_range" ? convertPresetOptionsToSelectableList(
|
|
38987
39106
|
populatedDashboardFilters[0].presetOptions ?? [],
|
|
38988
39107
|
populatedDashboardFilters[0].defaultPresetRanges ?? []
|
|
38989
39108
|
) : defaultOptionsV2;
|
|
38990
39109
|
}, [populatedDashboardFilters]);
|
|
38991
|
-
const [filterValues, setFilterValues] =
|
|
38992
|
-
const prevNameRef =
|
|
38993
|
-
const prevFlagsRef =
|
|
38994
|
-
const prevClientRef =
|
|
38995
|
-
const addFilterPopoverButtonRef =
|
|
38996
|
-
const viewFiltersPopoverButtonRef =
|
|
38997
|
-
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);
|
|
38998
39117
|
if (!equal4(previousFilters.current, filters)) {
|
|
38999
39118
|
previousFilters.current = filters;
|
|
39000
39119
|
}
|
|
39001
|
-
const isInitialLoadOfDashboardRef =
|
|
39120
|
+
const isInitialLoadOfDashboardRef = useRef15(false);
|
|
39002
39121
|
const referencedTables = useMemo16(() => {
|
|
39003
39122
|
const sections = data?.sections || {};
|
|
39004
39123
|
const tables2 = Object.values(sections).flatMap(
|
|
@@ -39026,7 +39145,7 @@ function Dashboard({
|
|
|
39026
39145
|
prevFlagsRef.current = flags;
|
|
39027
39146
|
});
|
|
39028
39147
|
}, [name2, isClientLoading]);
|
|
39029
|
-
const tenantMounted =
|
|
39148
|
+
const tenantMounted = useRef15(false);
|
|
39030
39149
|
useEffect19(() => {
|
|
39031
39150
|
if (!tenantMounted.current) {
|
|
39032
39151
|
tenantMounted.current = true;
|
|
@@ -39568,7 +39687,7 @@ function Dashboard({
|
|
|
39568
39687
|
return /* @__PURE__ */ jsx58(
|
|
39569
39688
|
DashboardSectionContainerComponent,
|
|
39570
39689
|
{
|
|
39571
|
-
children: section === "" ? /* @__PURE__ */ jsxs42(
|
|
39690
|
+
children: section === "" ? /* @__PURE__ */ jsxs42(Fragment9, { children: [
|
|
39572
39691
|
(metrics[section]?.length ?? 0) > 0 && /* @__PURE__ */ jsx58(DashboardSectionComponent, { section, children: metrics[section]?.map((item) => {
|
|
39573
39692
|
return /* @__PURE__ */ jsx58(
|
|
39574
39693
|
DataLoader,
|
|
@@ -39710,7 +39829,7 @@ function Dashboard({
|
|
|
39710
39829
|
data: data2,
|
|
39711
39830
|
rowCount,
|
|
39712
39831
|
rowCountIsLoading
|
|
39713
|
-
}) => /* @__PURE__ */ jsx58(
|
|
39832
|
+
}) => /* @__PURE__ */ jsx58(Fragment9, { children: /* @__PURE__ */ jsx58(
|
|
39714
39833
|
TableComponent,
|
|
39715
39834
|
{
|
|
39716
39835
|
report: data2,
|
|
@@ -39926,10 +40045,10 @@ function QuillDashboardTemplate({
|
|
|
39926
40045
|
const { dashboardConfig, dashboardConfigDispatch } = useContext20(
|
|
39927
40046
|
DashboardConfigContext
|
|
39928
40047
|
);
|
|
39929
|
-
const [addItemModalIsOpen, setAddItemModalIsOpen] =
|
|
39930
|
-
const [selectedTemplates, setSelectedTemplates] =
|
|
39931
|
-
const [selectingTemplate, setSelectingTemplate] =
|
|
39932
|
-
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);
|
|
39933
40052
|
const templateSections = data?.sections;
|
|
39934
40053
|
const onSubmitTemplates = async () => {
|
|
39935
40054
|
setSubmittingTemplate(true);
|
|
@@ -40076,7 +40195,7 @@ import {
|
|
|
40076
40195
|
useContext as useContext21,
|
|
40077
40196
|
useEffect as useEffect20,
|
|
40078
40197
|
useMemo as useMemo17,
|
|
40079
|
-
useState as
|
|
40198
|
+
useState as useState26
|
|
40080
40199
|
} from "react";
|
|
40081
40200
|
init_Filter();
|
|
40082
40201
|
init_paginationProcessing();
|
|
@@ -40094,7 +40213,7 @@ var Table = ({
|
|
|
40094
40213
|
const [schemaData] = useContext21(SchemaDataContext);
|
|
40095
40214
|
const { eventTracking } = useContext21(EventTrackingContext);
|
|
40096
40215
|
const { allReportsById } = useAllReports();
|
|
40097
|
-
const [loading, setLoading] =
|
|
40216
|
+
const [loading, setLoading] = useState26(false);
|
|
40098
40217
|
const report = useMemo17(() => {
|
|
40099
40218
|
return props.reportId ? allReportsById[props.reportId] : null;
|
|
40100
40219
|
}, [allReportsById[props.reportId ?? ""]]);
|
|
@@ -40181,7 +40300,7 @@ var Table = ({
|
|
|
40181
40300
|
clientLoading,
|
|
40182
40301
|
!reports[props.reportId ?? ""]
|
|
40183
40302
|
]);
|
|
40184
|
-
const [page, setPage] =
|
|
40303
|
+
const [page, setPage] = useState26(0);
|
|
40185
40304
|
if ("rows" in data && "columns" in data) {
|
|
40186
40305
|
return /* @__PURE__ */ jsx60(
|
|
40187
40306
|
QuillTable,
|
|
@@ -40242,10 +40361,10 @@ var Table_default = Table;
|
|
|
40242
40361
|
|
|
40243
40362
|
// src/SQLEditor.tsx
|
|
40244
40363
|
import {
|
|
40245
|
-
useState as
|
|
40364
|
+
useState as useState32,
|
|
40246
40365
|
useContext as useContext28,
|
|
40247
40366
|
useEffect as useEffect25,
|
|
40248
|
-
useRef as
|
|
40367
|
+
useRef as useRef20,
|
|
40249
40368
|
useMemo as useMemo22,
|
|
40250
40369
|
useCallback as useCallback4
|
|
40251
40370
|
} from "react";
|
|
@@ -40254,8 +40373,8 @@ import MonacoEditor from "@monaco-editor/react";
|
|
|
40254
40373
|
// src/ChartBuilder.tsx
|
|
40255
40374
|
import {
|
|
40256
40375
|
useEffect as useEffect23,
|
|
40257
|
-
useRef as
|
|
40258
|
-
useState as
|
|
40376
|
+
useRef as useRef19,
|
|
40377
|
+
useState as useState30,
|
|
40259
40378
|
useContext as useContext26,
|
|
40260
40379
|
useMemo as useMemo21,
|
|
40261
40380
|
useCallback as useCallback3
|
|
@@ -40282,9 +40401,9 @@ import {
|
|
|
40282
40401
|
useCallback as useCallback2,
|
|
40283
40402
|
useContext as useContext23,
|
|
40284
40403
|
useMemo as useMemo18,
|
|
40285
|
-
useState as
|
|
40404
|
+
useState as useState27,
|
|
40286
40405
|
useEffect as useEffect21,
|
|
40287
|
-
useRef as
|
|
40406
|
+
useRef as useRef16
|
|
40288
40407
|
} from "react";
|
|
40289
40408
|
|
|
40290
40409
|
// src/internals/ReportBuilder/PivotList.tsx
|
|
@@ -40749,44 +40868,44 @@ var PivotModal = ({
|
|
|
40749
40868
|
reportBuilderState
|
|
40750
40869
|
}) => {
|
|
40751
40870
|
const { getToken, quillFetchWithToken } = useContext23(FetchContext);
|
|
40752
|
-
const [isLoading, setIsLoading] =
|
|
40753
|
-
const [previewLoading, setPreviewLoading] =
|
|
40754
|
-
const [selectedPivotType, setSelectedPivotType] =
|
|
40755
|
-
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([]);
|
|
40756
40875
|
const [client] = useContext23(ClientContext);
|
|
40757
40876
|
const [schemaData] = useContext23(SchemaDataContext);
|
|
40758
40877
|
const { tenants } = useContext23(TenantContext);
|
|
40759
40878
|
const { eventTracking } = useContext23(EventTrackingContext);
|
|
40760
|
-
const rowFieldRef =
|
|
40761
|
-
const colFieldRef =
|
|
40762
|
-
const [pivotCardWidth, setPivotCardWidth] =
|
|
40763
|
-
const [samplePivotTable, setSamplePivotTable] =
|
|
40764
|
-
const [hasNoRecommendedPivots, sethasNoRecommendedPivots] =
|
|
40765
|
-
const [isFetchingPivots, setIsFetchingPivots] =
|
|
40766
|
-
const [allowedColumnFields, setAllowedColumnFields] =
|
|
40767
|
-
const [allowedRowFields, setAllowedRowFields] =
|
|
40768
|
-
const [allowedValueFields, setAllowedValueFields] =
|
|
40769
|
-
const [uniqueValues, setUniqueValues] =
|
|
40770
|
-
const buttonRef =
|
|
40771
|
-
const [dateRanges, setDateRanges] =
|
|
40772
|
-
const [pivotError, setPivotError] =
|
|
40773
|
-
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(
|
|
40774
40893
|
pivotLimit?.toString() ?? "100"
|
|
40775
40894
|
);
|
|
40776
|
-
const [sortFieldInput, setSortFieldInput] =
|
|
40895
|
+
const [sortFieldInput, setSortFieldInput] = useState27(
|
|
40777
40896
|
pivotSort?.sortField ?? ""
|
|
40778
40897
|
);
|
|
40779
|
-
const [sortDirectionInput, setSortDirectionInput] =
|
|
40898
|
+
const [sortDirectionInput, setSortDirectionInput] = useState27(
|
|
40780
40899
|
pivotSort?.sortDirection ?? "ASC"
|
|
40781
40900
|
);
|
|
40782
|
-
const [showLimitInput, setShowLimitInput] =
|
|
40783
|
-
const [showSortInput, setShowSortInput] =
|
|
40784
|
-
const [availableHeight, setAvailableHeight] =
|
|
40785
|
-
const [pivotModalTopHeight, setPivotModalTopHeight] =
|
|
40786
|
-
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(
|
|
40787
40906
|
"bottom"
|
|
40788
40907
|
);
|
|
40789
|
-
const popoverRef =
|
|
40908
|
+
const popoverRef = useRef16(null);
|
|
40790
40909
|
const getDistinctValues = async (fetchDistinct) => {
|
|
40791
40910
|
if (!client) {
|
|
40792
40911
|
return {
|
|
@@ -41071,7 +41190,7 @@ var PivotModal = ({
|
|
|
41071
41190
|
return map;
|
|
41072
41191
|
}, {});
|
|
41073
41192
|
}, [columns]);
|
|
41074
|
-
const [selectedPivotTable, setSelectedPivotTable] =
|
|
41193
|
+
const [selectedPivotTable, setSelectedPivotTable] = useState27(null);
|
|
41075
41194
|
useEffect21(() => {
|
|
41076
41195
|
const fetchPivotTables = async () => {
|
|
41077
41196
|
if (selectedPivotIndex === -1) {
|
|
@@ -41124,7 +41243,7 @@ var PivotModal = ({
|
|
|
41124
41243
|
};
|
|
41125
41244
|
fetchPivotTables();
|
|
41126
41245
|
}, [selectedPivotIndex, data, dateRange, createdPivots]);
|
|
41127
|
-
const previousUniqueValuesRef =
|
|
41246
|
+
const previousUniqueValuesRef = useRef16();
|
|
41128
41247
|
useEffect21(() => {
|
|
41129
41248
|
if (!uniqueValuesIsLoading && !equal5(uniqueValues, previousUniqueValuesRef.current)) {
|
|
41130
41249
|
previousUniqueValuesRef.current = uniqueValues;
|
|
@@ -41600,10 +41719,10 @@ var PivotModal = ({
|
|
|
41600
41719
|
}
|
|
41601
41720
|
}, 500);
|
|
41602
41721
|
};
|
|
41603
|
-
const [recommendedPivotTables, setRecommendedPivotTables] =
|
|
41722
|
+
const [recommendedPivotTables, setRecommendedPivotTables] = useState27(
|
|
41604
41723
|
[]
|
|
41605
41724
|
);
|
|
41606
|
-
const [createdPivotTables, setCreatedPivotTables] =
|
|
41725
|
+
const [createdPivotTables, setCreatedPivotTables] = useState27([]);
|
|
41607
41726
|
useEffect21(() => {
|
|
41608
41727
|
const fetchPivotTables = async () => {
|
|
41609
41728
|
const pts = await Promise.all(
|
|
@@ -42503,18 +42622,18 @@ var validateReport = (formData, dashboardData, defaultDateFilter, allTables) =>
|
|
|
42503
42622
|
|
|
42504
42623
|
// src/components/Chart/InternalChart.tsx
|
|
42505
42624
|
import {
|
|
42506
|
-
useState as
|
|
42625
|
+
useState as useState28,
|
|
42507
42626
|
useEffect as useEffect22,
|
|
42508
42627
|
useContext as useContext24,
|
|
42509
42628
|
useMemo as useMemo19,
|
|
42510
|
-
useRef as
|
|
42511
|
-
useLayoutEffect as
|
|
42629
|
+
useRef as useRef17,
|
|
42630
|
+
useLayoutEffect as useLayoutEffect3
|
|
42512
42631
|
} from "react";
|
|
42513
42632
|
import { differenceInHours as differenceInHours2 } from "date-fns";
|
|
42514
42633
|
init_Filter();
|
|
42515
42634
|
init_filterProcessing();
|
|
42516
42635
|
init_dateRangePickerUtils();
|
|
42517
|
-
import { Fragment as
|
|
42636
|
+
import { Fragment as Fragment10, jsx as jsx64, jsxs as jsxs46 } from "react/jsx-runtime";
|
|
42518
42637
|
var MULTISELECT_REQUEST_DEBOUNCE_MS = 1e3;
|
|
42519
42638
|
var TogglePrimitive = ({
|
|
42520
42639
|
value,
|
|
@@ -42628,8 +42747,8 @@ function InternalChart({
|
|
|
42628
42747
|
const { reportFilters } = useContext24(ReportFiltersContext);
|
|
42629
42748
|
const { dashboardConfig } = useContext24(DashboardConfigContext);
|
|
42630
42749
|
const { eventTracking } = useContext24(EventTrackingContext);
|
|
42631
|
-
const [filtersPopoverOpen, setFiltersPopoverOpen] =
|
|
42632
|
-
const filtersButtonRef =
|
|
42750
|
+
const [filtersPopoverOpen, setFiltersPopoverOpen] = useState28(false);
|
|
42751
|
+
const filtersButtonRef = useRef17(null);
|
|
42633
42752
|
const currentReportFilters = useMemo19(() => {
|
|
42634
42753
|
const dashFilters = dashboardConfig[report?.dashboardName ?? ""]?.config.filters;
|
|
42635
42754
|
if (!dashFilters)
|
|
@@ -42657,10 +42776,10 @@ function InternalChart({
|
|
|
42657
42776
|
reportDateFilter.defaultPresetRanges ?? []
|
|
42658
42777
|
) : defaultOptionsV2;
|
|
42659
42778
|
}, [reportDateFilter]);
|
|
42660
|
-
const [filterValues, setFilterValues] =
|
|
42661
|
-
const multiselectDebounceRef =
|
|
42662
|
-
const latestMultiselectValueRef =
|
|
42663
|
-
const [lockedFilters, setLockedFilters] =
|
|
42779
|
+
const [filterValues, setFilterValues] = useState28({});
|
|
42780
|
+
const multiselectDebounceRef = useRef17({});
|
|
42781
|
+
const latestMultiselectValueRef = useRef17({});
|
|
42782
|
+
const [lockedFilters, setLockedFilters] = useState28(
|
|
42664
42783
|
{}
|
|
42665
42784
|
);
|
|
42666
42785
|
useEffect22(() => {
|
|
@@ -42820,9 +42939,9 @@ function InternalChart({
|
|
|
42820
42939
|
}
|
|
42821
42940
|
onDashboardFilterChange(filter.label, filterValue);
|
|
42822
42941
|
};
|
|
42823
|
-
const [filtersExpanded, setFiltersExpanded] =
|
|
42824
|
-
const filtersContainerRef =
|
|
42825
|
-
const [visibleFilters, setVisibleFilters] =
|
|
42942
|
+
const [filtersExpanded, setFiltersExpanded] = useState28(false);
|
|
42943
|
+
const filtersContainerRef = useRef17(null);
|
|
42944
|
+
const [visibleFilters, setVisibleFilters] = useState28([]);
|
|
42826
42945
|
const filtersOverflowing = useMemo19(() => {
|
|
42827
42946
|
return visibleFilters.some((visible) => visible);
|
|
42828
42947
|
}, [visibleFilters]);
|
|
@@ -42838,7 +42957,7 @@ function InternalChart({
|
|
|
42838
42957
|
});
|
|
42839
42958
|
setVisibleFilters(newVisibleItems);
|
|
42840
42959
|
};
|
|
42841
|
-
|
|
42960
|
+
useLayoutEffect3(() => {
|
|
42842
42961
|
requestAnimationFrame(() => measureItems());
|
|
42843
42962
|
const handleResize = () => {
|
|
42844
42963
|
measureItems();
|
|
@@ -43014,7 +43133,7 @@ function InternalChart({
|
|
|
43014
43133
|
)
|
|
43015
43134
|
}
|
|
43016
43135
|
),
|
|
43017
|
-
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: [
|
|
43018
43137
|
"metric" === report.chartType && /* @__PURE__ */ jsx64(
|
|
43019
43138
|
"div",
|
|
43020
43139
|
{
|
|
@@ -43087,10 +43206,10 @@ init_dates();
|
|
|
43087
43206
|
import React13, {
|
|
43088
43207
|
useContext as useContext25,
|
|
43089
43208
|
useMemo as useMemo20,
|
|
43090
|
-
useRef as
|
|
43091
|
-
useState as
|
|
43209
|
+
useRef as useRef18,
|
|
43210
|
+
useState as useState29
|
|
43092
43211
|
} from "react";
|
|
43093
|
-
import { Fragment as
|
|
43212
|
+
import { Fragment as Fragment11, jsx as jsx65, jsxs as jsxs47 } from "react/jsx-runtime";
|
|
43094
43213
|
function QuillMultiSelectSectionList({
|
|
43095
43214
|
options,
|
|
43096
43215
|
width,
|
|
@@ -43106,10 +43225,10 @@ function QuillMultiSelectSectionList({
|
|
|
43106
43225
|
owner
|
|
43107
43226
|
}) {
|
|
43108
43227
|
const [theme] = useContext25(ThemeContext);
|
|
43109
|
-
const [showModal, setShowModal] =
|
|
43110
|
-
const modalRef =
|
|
43111
|
-
const buttonRef =
|
|
43112
|
-
const debounceTimeoutId =
|
|
43228
|
+
const [showModal, setShowModal] = useState29(false);
|
|
43229
|
+
const modalRef = useRef18(null);
|
|
43230
|
+
const buttonRef = useRef18(null);
|
|
43231
|
+
const debounceTimeoutId = useRef18(null);
|
|
43113
43232
|
const [searchQuery, setSearchQuery] = React13.useState("");
|
|
43114
43233
|
useOnClickOutside_default(
|
|
43115
43234
|
modalRef,
|
|
@@ -43303,7 +43422,7 @@ function QuillMultiSelectSectionList({
|
|
|
43303
43422
|
},
|
|
43304
43423
|
ref: modalRef,
|
|
43305
43424
|
children: [
|
|
43306
|
-
options && optionsLength > 20 && /* @__PURE__ */ jsxs47(
|
|
43425
|
+
options && optionsLength > 20 && /* @__PURE__ */ jsxs47(Fragment11, { children: [
|
|
43307
43426
|
/* @__PURE__ */ jsx65(
|
|
43308
43427
|
ListboxTextInput2,
|
|
43309
43428
|
{
|
|
@@ -43616,7 +43735,7 @@ init_constants();
|
|
|
43616
43735
|
init_pivotConstructor();
|
|
43617
43736
|
var import_pluralize = __toESM(require_pluralize(), 1);
|
|
43618
43737
|
init_pivotProcessing();
|
|
43619
|
-
import { Fragment as
|
|
43738
|
+
import { Fragment as Fragment12, jsx as jsx66, jsxs as jsxs48 } from "react/jsx-runtime";
|
|
43620
43739
|
var CHART_TYPES = [
|
|
43621
43740
|
"column",
|
|
43622
43741
|
"stacked",
|
|
@@ -43891,15 +44010,15 @@ function createReportFromForm(formData, report, eventTracking, selectedPivotTabl
|
|
|
43891
44010
|
return newReport;
|
|
43892
44011
|
}
|
|
43893
44012
|
function ChartBuilderWithModal(props) {
|
|
43894
|
-
const parentRef =
|
|
43895
|
-
const [modalWidth, setModalWidth] =
|
|
43896
|
-
const [modalHeight, setModalHeight] =
|
|
44013
|
+
const parentRef = useRef19(null);
|
|
44014
|
+
const [modalWidth, setModalWidth] = useState30(200);
|
|
44015
|
+
const [modalHeight, setModalHeight] = useState30(200);
|
|
43897
44016
|
const { isOpen, setIsOpen, title, isHorizontalView } = props;
|
|
43898
44017
|
const Modal = props.ModalComponent ?? MemoizedModal;
|
|
43899
44018
|
const { dashboardReports: dashboard } = useDashboardReports(
|
|
43900
44019
|
props.destinationDashboard
|
|
43901
44020
|
);
|
|
43902
|
-
const [filtersEnabledState, setFiltersEnabledState] =
|
|
44021
|
+
const [filtersEnabledState, setFiltersEnabledState] = useState30(
|
|
43903
44022
|
!!props.reportId
|
|
43904
44023
|
);
|
|
43905
44024
|
useEffect23(() => {
|
|
@@ -44037,13 +44156,13 @@ function ChartBuilder({
|
|
|
44037
44156
|
}
|
|
44038
44157
|
return map;
|
|
44039
44158
|
}, [report]);
|
|
44040
|
-
const [windowWidth, setWindowWidth] =
|
|
44041
|
-
const [rows, setRows] =
|
|
44042
|
-
const [itemQuery, setItemQuery] =
|
|
44043
|
-
const [rowCount, setRowCount] =
|
|
44044
|
-
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);
|
|
44045
44164
|
const thisReportLoadingState = reportId ? reportsLoadingState[reportId] : void 0;
|
|
44046
|
-
const [isLoading, setIsLoading] =
|
|
44165
|
+
const [isLoading, setIsLoading] = useState30(() => {
|
|
44047
44166
|
if (reportId) {
|
|
44048
44167
|
if (report?.rows && report.rows.length > 0) return false;
|
|
44049
44168
|
if (report?.pivotRows && report.pivotRows.length > 0) return false;
|
|
@@ -44053,13 +44172,13 @@ function ChartBuilder({
|
|
|
44053
44172
|
}
|
|
44054
44173
|
return false;
|
|
44055
44174
|
});
|
|
44056
|
-
const [rowCountIsLoading, setRowCountIsLoading] =
|
|
44057
|
-
const [isSubmitting, setIsSubmitting] =
|
|
44175
|
+
const [rowCountIsLoading, setRowCountIsLoading] = useState30(false);
|
|
44176
|
+
const [isSubmitting, setIsSubmitting] = useState30(false);
|
|
44058
44177
|
const MIN_FORM_WIDTH = 700;
|
|
44059
|
-
const [pivotCardWidth, setPivotCardWidth] =
|
|
44060
|
-
const [formWidth, setFormWidth] =
|
|
44061
|
-
const inputRef =
|
|
44062
|
-
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);
|
|
44063
44182
|
const processColumns = (columns2) => {
|
|
44064
44183
|
if (schemaData.schemaWithCustomFields) {
|
|
44065
44184
|
const newProcessedColumns = columns2?.map((col) => {
|
|
@@ -44114,12 +44233,12 @@ function ChartBuilder({
|
|
|
44114
44233
|
}
|
|
44115
44234
|
return columns2;
|
|
44116
44235
|
};
|
|
44117
|
-
const [columns, setColumns] =
|
|
44236
|
+
const [columns, setColumns] = useState30(
|
|
44118
44237
|
processColumns(report?.columnInternal ?? [])
|
|
44119
44238
|
);
|
|
44120
|
-
const [currentPage, setCurrentPage] =
|
|
44121
|
-
const parentRef =
|
|
44122
|
-
const deleteRef =
|
|
44239
|
+
const [currentPage, setCurrentPage] = useState30(0);
|
|
44240
|
+
const parentRef = useRef19(null);
|
|
44241
|
+
const deleteRef = useRef19(null);
|
|
44123
44242
|
const modalPadding = 20;
|
|
44124
44243
|
const deleteButtonMargin = -12;
|
|
44125
44244
|
const { dashboardFilters } = useContext26(DashboardFiltersContext);
|
|
@@ -44164,7 +44283,7 @@ function ChartBuilder({
|
|
|
44164
44283
|
window.removeEventListener("resize", handleResize);
|
|
44165
44284
|
};
|
|
44166
44285
|
}, [isOpen]);
|
|
44167
|
-
const [dashboardOptions, setDashboardOptions] =
|
|
44286
|
+
const [dashboardOptions, setDashboardOptions] = useState30([]);
|
|
44168
44287
|
const {
|
|
44169
44288
|
reportFilters,
|
|
44170
44289
|
loadFiltersForReport,
|
|
@@ -44172,8 +44291,8 @@ function ChartBuilder({
|
|
|
44172
44291
|
abortLoadingFilters
|
|
44173
44292
|
} = useContext26(ReportFiltersContext);
|
|
44174
44293
|
const { reportsDispatch } = useContext26(ReportsContext);
|
|
44175
|
-
const initialFilters =
|
|
44176
|
-
const [reportFiltersLoaded, setReportFiltersLoaded] =
|
|
44294
|
+
const initialFilters = useRef19(reportFilters[report?.id ?? TEMP_REPORT_ID]);
|
|
44295
|
+
const [reportFiltersLoaded, setReportFiltersLoaded] = useState30(!filtersEnabled);
|
|
44177
44296
|
const hasExistingData = useMemo21(() => {
|
|
44178
44297
|
return report?.rows && report.rows.length > 0 || report?.pivotRows && report.pivotRows.length > 0;
|
|
44179
44298
|
}, [report?.rows, report?.pivotRows]);
|
|
@@ -44210,20 +44329,20 @@ function ChartBuilder({
|
|
|
44210
44329
|
(f) => f.filter
|
|
44211
44330
|
);
|
|
44212
44331
|
}, [reportFilters, report?.id]);
|
|
44213
|
-
const [showFilterModal, setShowFilterModal] =
|
|
44214
|
-
const [filterIssues, setFilterIssues] =
|
|
44215
|
-
const [showPivotPopover, setShowPivotPopover] =
|
|
44216
|
-
const [isEdittingPivot, setIsEdittingPivot] =
|
|
44217
|
-
const [selectedPivotIndex, setSelectedPivotIndex] =
|
|
44218
|
-
const [tableName, setTableName] =
|
|
44219
|
-
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(
|
|
44220
44339
|
report ? !!report.includeCustomFields : !!client?.featureFlags?.customFieldsEnabled
|
|
44221
44340
|
);
|
|
44222
44341
|
const selectedTable = schemaData.schema?.find(
|
|
44223
44342
|
(t) => t.displayName === tableName
|
|
44224
44343
|
);
|
|
44225
|
-
const [pivotPopUpTitle, setPivotPopUpTitle] =
|
|
44226
|
-
const [pivotError, setPivotError] =
|
|
44344
|
+
const [pivotPopUpTitle, setPivotPopUpTitle] = useState30("Add pivot");
|
|
44345
|
+
const [pivotError, setPivotError] = useState30(void 0);
|
|
44227
44346
|
const pivotData = report?.pivotRows && report?.pivotColumns ? {
|
|
44228
44347
|
rows: report.pivotRows,
|
|
44229
44348
|
columns: report.pivotColumns,
|
|
@@ -44233,19 +44352,19 @@ function ChartBuilder({
|
|
|
44233
44352
|
} : void 0;
|
|
44234
44353
|
const destinationDashboardName = report?.dashboardName || destinationDashboard;
|
|
44235
44354
|
const query = report?.queryString;
|
|
44236
|
-
const [loadingFormData, setLoadingFormData] =
|
|
44237
|
-
const [triggeredEditChart, setTriggeredEditChart] =
|
|
44238
|
-
const [createdPivots, setCreatedPivots] =
|
|
44355
|
+
const [loadingFormData, setLoadingFormData] = useState30(false);
|
|
44356
|
+
const [triggeredEditChart, setTriggeredEditChart] = useState30(false);
|
|
44357
|
+
const [createdPivots, setCreatedPivots] = useState30(
|
|
44239
44358
|
report?.pivot ? [report.pivot] : cp
|
|
44240
44359
|
);
|
|
44241
|
-
const [recommendedPivots, setRecommendedPivots] =
|
|
44242
|
-
const [pivotRowField, setPivotRowField] =
|
|
44360
|
+
const [recommendedPivots, setRecommendedPivots] = useState30(rp);
|
|
44361
|
+
const [pivotRowField, setPivotRowField] = useState30(
|
|
44243
44362
|
report?.pivot?.rowField
|
|
44244
44363
|
);
|
|
44245
|
-
const [pivotColumnField, setPivotColumnField] =
|
|
44364
|
+
const [pivotColumnField, setPivotColumnField] = useState30(
|
|
44246
44365
|
report?.pivot?.columnField
|
|
44247
44366
|
);
|
|
44248
|
-
const [pivotAggregations, setPivotAggregations] =
|
|
44367
|
+
const [pivotAggregations, setPivotAggregations] = useState30(
|
|
44249
44368
|
report?.pivot?.aggregations ?? [
|
|
44250
44369
|
{
|
|
44251
44370
|
valueField: report?.pivot?.valueField,
|
|
@@ -44254,10 +44373,10 @@ function ChartBuilder({
|
|
|
44254
44373
|
}
|
|
44255
44374
|
]
|
|
44256
44375
|
);
|
|
44257
|
-
const [pivotLimit, setPivotLimit] =
|
|
44376
|
+
const [pivotLimit, setPivotLimit] = useState30(
|
|
44258
44377
|
report?.pivot?.rowLimit
|
|
44259
44378
|
);
|
|
44260
|
-
const [pivotSort, setPivotSort] =
|
|
44379
|
+
const [pivotSort, setPivotSort] = useState30(
|
|
44261
44380
|
report?.pivot?.sort && report?.pivot?.sortDirection && report?.pivot?.sortField ? {
|
|
44262
44381
|
sortField: report.pivot.sortField,
|
|
44263
44382
|
sortDirection: report.pivot.sortDirection
|
|
@@ -44270,18 +44389,18 @@ function ChartBuilder({
|
|
|
44270
44389
|
rowsPerRequest: report?.chartType === "table" ? 50 : 500
|
|
44271
44390
|
}
|
|
44272
44391
|
};
|
|
44273
|
-
const [currentProcessing, setCurrentProcessing] =
|
|
44274
|
-
const [customTenantAccess, setCustomTenantAccess] =
|
|
44392
|
+
const [currentProcessing, setCurrentProcessing] = useState30(baseProcessing);
|
|
44393
|
+
const [customTenantAccess, setCustomTenantAccess] = useState30(() => {
|
|
44275
44394
|
const value = report?.flags === null ? false : !!Object.values(report?.flags ?? {}).length;
|
|
44276
44395
|
return value;
|
|
44277
44396
|
});
|
|
44278
|
-
const [dateFieldOptions, setDateFieldOptions] =
|
|
44279
|
-
const [allTables, setAllTables] =
|
|
44280
|
-
const [customFieldTableRef, setCustomFieldTableRef] =
|
|
44281
|
-
const [referencedColumns, setReferencedColumns] =
|
|
44282
|
-
const [referencedColumnsWithoutStar, setReferencedColumnsWithoutStar] =
|
|
44283
|
-
const [referencedTablesLoaded, setReferencedTablesLoaded] =
|
|
44284
|
-
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 ?? {});
|
|
44285
44404
|
const canonicalFilterMap = useMemo21(() => {
|
|
44286
44405
|
return Object.fromEntries(
|
|
44287
44406
|
Object.entries(filterMap).filter(
|
|
@@ -44308,7 +44427,7 @@ function ChartBuilder({
|
|
|
44308
44427
|
{}
|
|
44309
44428
|
);
|
|
44310
44429
|
}, [specificDashboardFilters, filterMap, allTables, referencedTablesLoaded]);
|
|
44311
|
-
const [formFlags, setFormFlags] =
|
|
44430
|
+
const [formFlags, setFormFlags] = useState30(
|
|
44312
44431
|
report?.flags ? Object.fromEntries(
|
|
44313
44432
|
Object.entries(report.flags).map(([key, value]) => {
|
|
44314
44433
|
if (value === ALL_TENANTS) {
|
|
@@ -44325,7 +44444,7 @@ function ChartBuilder({
|
|
|
44325
44444
|
})
|
|
44326
44445
|
) : void 0
|
|
44327
44446
|
);
|
|
44328
|
-
const [defaultDateField, setDefaultDateField] =
|
|
44447
|
+
const [defaultDateField, setDefaultDateField] = useState30({
|
|
44329
44448
|
table: dateFieldOptions[0]?.name || "",
|
|
44330
44449
|
field: dateFieldOptions[0]?.columns[0]?.field || ""
|
|
44331
44450
|
});
|
|
@@ -44349,6 +44468,7 @@ function ChartBuilder({
|
|
|
44349
44468
|
],
|
|
44350
44469
|
xAxisLabel: "",
|
|
44351
44470
|
chartType: firstNumberColumn ? "line" : "table",
|
|
44471
|
+
showLegend: report?.showLegend ?? false,
|
|
44352
44472
|
pivot: null,
|
|
44353
44473
|
dateField: defaultDateField,
|
|
44354
44474
|
template: true,
|
|
@@ -44464,7 +44584,7 @@ function ChartBuilder({
|
|
|
44464
44584
|
};
|
|
44465
44585
|
}
|
|
44466
44586
|
};
|
|
44467
|
-
const initializedRef =
|
|
44587
|
+
const initializedRef = useRef19(false);
|
|
44468
44588
|
const getCurrentSection = () => {
|
|
44469
44589
|
let id2 = report?.id ?? "";
|
|
44470
44590
|
if (id2 === "" || id2 === TEMP_REPORT_ID) {
|
|
@@ -44511,7 +44631,7 @@ function ChartBuilder({
|
|
|
44511
44631
|
}
|
|
44512
44632
|
return chartBuilderData;
|
|
44513
44633
|
};
|
|
44514
|
-
const [formData, setFormData] =
|
|
44634
|
+
const [formData, setFormData] = useState30(
|
|
44515
44635
|
formFormDataFromReport(report, destinationSection ?? getCurrentSection())
|
|
44516
44636
|
);
|
|
44517
44637
|
const reportCustomFields = useMemo21(() => {
|
|
@@ -44565,7 +44685,7 @@ function ChartBuilder({
|
|
|
44565
44685
|
const columnsObservedInRows = rows[0] ? Object.keys(rows[0]) : [];
|
|
44566
44686
|
return columns.filter((col) => !columnsObservedInRows.includes(col.field));
|
|
44567
44687
|
}, [rows]);
|
|
44568
|
-
const [chartTypes, setChartTypes] =
|
|
44688
|
+
const [chartTypes, setChartTypes] = useState30(
|
|
44569
44689
|
(() => {
|
|
44570
44690
|
const data = formFormDataFromReport(
|
|
44571
44691
|
report,
|
|
@@ -44793,7 +44913,7 @@ function ChartBuilder({
|
|
|
44793
44913
|
}));
|
|
44794
44914
|
}
|
|
44795
44915
|
}, [report?.triggerReload, report?.columns, formData.columns.length]);
|
|
44796
|
-
const ranMountQuery =
|
|
44916
|
+
const ranMountQuery = useRef19(false);
|
|
44797
44917
|
useEffect23(() => {
|
|
44798
44918
|
if (runQueryOnMount && reportFiltersLoaded && filtersEnabled && !ranMountQuery.current) {
|
|
44799
44919
|
ranMountQuery.current = true;
|
|
@@ -44819,7 +44939,7 @@ function ChartBuilder({
|
|
|
44819
44939
|
{}
|
|
44820
44940
|
) ?? {};
|
|
44821
44941
|
}, [client?.allTenantTypes]);
|
|
44822
|
-
const [selectedPivotTable, setSelectedPivotTable] =
|
|
44942
|
+
const [selectedPivotTable, setSelectedPivotTable] = useState30(pivotData);
|
|
44823
44943
|
const getDefaultXAxisFormat = useCallback3(
|
|
44824
44944
|
(form) => {
|
|
44825
44945
|
if (form.pivot?.rowField) {
|
|
@@ -45027,7 +45147,7 @@ function ChartBuilder({
|
|
|
45027
45147
|
return handleRunQuery(baseProcessing, updatedFilters);
|
|
45028
45148
|
});
|
|
45029
45149
|
};
|
|
45030
|
-
const filtersEnabledRef =
|
|
45150
|
+
const filtersEnabledRef = useRef19(filtersEnabled);
|
|
45031
45151
|
useEffect23(() => {
|
|
45032
45152
|
if (filtersEnabledRef.current !== filtersEnabled) {
|
|
45033
45153
|
filtersEnabledRef.current = filtersEnabled;
|
|
@@ -45972,7 +46092,7 @@ function ChartBuilder({
|
|
|
45972
46092
|
width: 200
|
|
45973
46093
|
}
|
|
45974
46094
|
) }),
|
|
45975
|
-
hideChartType ? /* @__PURE__ */ jsx66("div", { style: { width: 200 } }) : /* @__PURE__ */ jsxs48(
|
|
46095
|
+
hideChartType ? /* @__PURE__ */ jsx66("div", { style: { width: 200 } }) : /* @__PURE__ */ jsxs48(Fragment12, { children: [
|
|
45976
46096
|
/* @__PURE__ */ jsx66(
|
|
45977
46097
|
"div",
|
|
45978
46098
|
{
|
|
@@ -46314,6 +46434,19 @@ function ChartBuilder({
|
|
|
46314
46434
|
) })
|
|
46315
46435
|
] })
|
|
46316
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
|
+
] }),
|
|
46317
46450
|
client?.featureFlags?.["referenceLines"] && (chartData.chartType === "line" || chartData.chartType === "column") && /* @__PURE__ */ jsxs48("div", { children: [
|
|
46318
46451
|
/* @__PURE__ */ jsx66(SubHeaderComponent, { label: "Reference Lines" }),
|
|
46319
46452
|
/* @__PURE__ */ jsxs48(ChartBuilderInputColumnContainer, { children: [
|
|
@@ -46349,7 +46482,7 @@ function ChartBuilder({
|
|
|
46349
46482
|
)
|
|
46350
46483
|
}
|
|
46351
46484
|
),
|
|
46352
|
-
refLine.label === REFERENCE_LINE && /* @__PURE__ */ jsxs48(
|
|
46485
|
+
refLine.label === REFERENCE_LINE && /* @__PURE__ */ jsxs48(Fragment12, { children: [
|
|
46353
46486
|
/* @__PURE__ */ jsx66(
|
|
46354
46487
|
TextInputComponent,
|
|
46355
46488
|
{
|
|
@@ -47046,7 +47179,7 @@ function ChartBuilder({
|
|
|
47046
47179
|
label: "Delete"
|
|
47047
47180
|
}
|
|
47048
47181
|
),
|
|
47049
|
-
!hideSubmitButton && /* @__PURE__ */ jsxs48(
|
|
47182
|
+
!hideSubmitButton && /* @__PURE__ */ jsxs48(Fragment12, { children: [
|
|
47050
47183
|
hideDiscardChanges ? null : /* @__PURE__ */ jsx66(
|
|
47051
47184
|
SecondaryButtonComponent,
|
|
47052
47185
|
{
|
|
@@ -47817,7 +47950,7 @@ function reconcileReportWithColumns(report, columns, previousReport) {
|
|
|
47817
47950
|
}
|
|
47818
47951
|
|
|
47819
47952
|
// src/hooks/useLongLoading.tsx
|
|
47820
|
-
import { useContext as useContext27, useEffect as useEffect24, useState as
|
|
47953
|
+
import { useContext as useContext27, useEffect as useEffect24, useState as useState31 } from "react";
|
|
47821
47954
|
function useLongLoading(isLoading, meta) {
|
|
47822
47955
|
const {
|
|
47823
47956
|
origin,
|
|
@@ -47825,8 +47958,8 @@ function useLongLoading(isLoading, meta) {
|
|
|
47825
47958
|
abnormalLoadTime = 15e3,
|
|
47826
47959
|
loadDescription
|
|
47827
47960
|
} = meta;
|
|
47828
|
-
const [isLongLoading, setIsLongLoading] =
|
|
47829
|
-
const [isAbnormalLoading, setIsAbnormalLoading] =
|
|
47961
|
+
const [isLongLoading, setIsLongLoading] = useState31(false);
|
|
47962
|
+
const [isAbnormalLoading, setIsAbnormalLoading] = useState31(false);
|
|
47830
47963
|
const { eventTracking } = useContext27(EventTrackingContext);
|
|
47831
47964
|
useEffect24(() => {
|
|
47832
47965
|
let longTimer = null;
|
|
@@ -48010,8 +48143,8 @@ function SQLEditor({
|
|
|
48010
48143
|
onRequestAddVirtualTable
|
|
48011
48144
|
}) {
|
|
48012
48145
|
const computedButtonLabel = addToDashboardButtonLabel === "Add to dashboard" ? reportId || report?.id ? "Save changes" : "Add to dashboard" : addToDashboardButtonLabel;
|
|
48013
|
-
const [sqlPrompt, setSqlPrompt] =
|
|
48014
|
-
const sqlPromptFormRef =
|
|
48146
|
+
const [sqlPrompt, setSqlPrompt] = useState32("");
|
|
48147
|
+
const sqlPromptFormRef = useRef20(null);
|
|
48015
48148
|
const sqlPromptInputWidth = useResponsiveFirstChildWidth_default(sqlPromptFormRef, {
|
|
48016
48149
|
gap: 12,
|
|
48017
48150
|
initialWidth: 320,
|
|
@@ -48033,9 +48166,9 @@ function SQLEditor({
|
|
|
48033
48166
|
const destinationDashboardConfig = useMemo22(() => {
|
|
48034
48167
|
return dashboards?.find((d) => d.name === destinationDashboard);
|
|
48035
48168
|
}, [dashboards, destinationDashboard]);
|
|
48036
|
-
const [query, setQuery] =
|
|
48037
|
-
const [rows, setRows] =
|
|
48038
|
-
const [columns, setColumns] =
|
|
48169
|
+
const [query, setQuery] = useState32(defaultQuery);
|
|
48170
|
+
const [rows, setRows] = useState32([]);
|
|
48171
|
+
const [columns, setColumns] = useState32([]);
|
|
48039
48172
|
const [schemaData] = useContext28(SchemaDataContext);
|
|
48040
48173
|
const { dashboardFilters } = useContext28(DashboardFiltersContext);
|
|
48041
48174
|
const specificDashboardFilters = useMemo22(() => {
|
|
@@ -48043,27 +48176,27 @@ function SQLEditor({
|
|
|
48043
48176
|
dashboardFilters[report?.dashboardName ?? destinationDashboard ?? ""] ?? {}
|
|
48044
48177
|
).map((f) => f.filter);
|
|
48045
48178
|
}, [dashboardFilters, destinationDashboard]);
|
|
48046
|
-
const [errorMessage, setErrorMessage] =
|
|
48047
|
-
const [sqlResponseLoading, setSqlResponseLoading] =
|
|
48179
|
+
const [errorMessage, setErrorMessage] = useState32("");
|
|
48180
|
+
const [sqlResponseLoading, setSqlResponseLoading] = useState32(false);
|
|
48048
48181
|
useLongLoading(sqlResponseLoading, {
|
|
48049
48182
|
origin: "SQLEditor",
|
|
48050
48183
|
loadDescription: "Loading SQL response"
|
|
48051
48184
|
});
|
|
48052
|
-
const [sqlQueryLoading, setSqlQueryLoading] =
|
|
48185
|
+
const [sqlQueryLoading, setSqlQueryLoading] = useState32(false);
|
|
48053
48186
|
useLongLoading(sqlQueryLoading, {
|
|
48054
48187
|
origin: "SQLEditor",
|
|
48055
48188
|
loadDescription: "Loading SQL query"
|
|
48056
48189
|
});
|
|
48057
|
-
const [isChartBuilderOpen, setIsChartBuilderOpen] =
|
|
48058
|
-
const [displayTable, setDisplayTable] =
|
|
48059
|
-
const [formattedRows, setFormattedRows] =
|
|
48060
|
-
const [rowCount, setRowCount] =
|
|
48061
|
-
const [rowCountIsLoading, setRowCountIsLoading] =
|
|
48062
|
-
const [maxPage, setMaxPage] =
|
|
48063
|
-
const [tableSearchQuery, setTableSearchQuery] =
|
|
48064
|
-
const [lastSuccessfulQuery, setLastSuccessfulQuery] =
|
|
48065
|
-
const [isSaveQueryModalOpen, setIsSaveQueryModalOpen] =
|
|
48066
|
-
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(() => {
|
|
48067
48200
|
const contextReport = reportId ? allReportsById[reportId] : void 0;
|
|
48068
48201
|
const initial = {
|
|
48069
48202
|
...EMPTY_INTERNAL_REPORT,
|
|
@@ -48071,8 +48204,8 @@ function SQLEditor({
|
|
|
48071
48204
|
};
|
|
48072
48205
|
return initial;
|
|
48073
48206
|
});
|
|
48074
|
-
const tableRef =
|
|
48075
|
-
const [cachedHeight, setCachedHeight] =
|
|
48207
|
+
const tableRef = useRef20(null);
|
|
48208
|
+
const [cachedHeight, setCachedHeight] = useState32(0);
|
|
48076
48209
|
const DEFAULT_ROWS_PER_PAGE = 5;
|
|
48077
48210
|
const ROW_HEIGHT = 37;
|
|
48078
48211
|
const TABLE_TAB_HEIGHT = 75;
|
|
@@ -48149,8 +48282,8 @@ function SQLEditor({
|
|
|
48149
48282
|
rowsPerPage * 10
|
|
48150
48283
|
)
|
|
48151
48284
|
};
|
|
48152
|
-
const [currentPage, setCurrentPage] =
|
|
48153
|
-
const [currentSort, setCurrentSort] =
|
|
48285
|
+
const [currentPage, setCurrentPage] = useState32(0);
|
|
48286
|
+
const [currentSort, setCurrentSort] = useState32(void 0);
|
|
48154
48287
|
const currentProcessing = useMemo22(() => {
|
|
48155
48288
|
return {
|
|
48156
48289
|
page: {
|
|
@@ -49071,9 +49204,9 @@ var SQLEditorComponent = ({
|
|
|
49071
49204
|
loading,
|
|
49072
49205
|
LoadingComponent = QuillLoadingComponent
|
|
49073
49206
|
}) => {
|
|
49074
|
-
const [editorKey, setEditorKey] =
|
|
49207
|
+
const [editorKey, setEditorKey] = useState32(0);
|
|
49075
49208
|
const { eventTracking } = useContext28(EventTrackingContext);
|
|
49076
|
-
const currentProvider =
|
|
49209
|
+
const currentProvider = useRef20(null);
|
|
49077
49210
|
useEffect25(() => {
|
|
49078
49211
|
if (currentProvider.current) {
|
|
49079
49212
|
currentProvider.current.dispose();
|
|
@@ -49315,7 +49448,7 @@ function SchemaItem({
|
|
|
49315
49448
|
index,
|
|
49316
49449
|
onClick
|
|
49317
49450
|
}) {
|
|
49318
|
-
const [isOpen, setIsOpen] =
|
|
49451
|
+
const [isOpen, setIsOpen] = useState32(index === 0);
|
|
49319
49452
|
const schemaContainerStyle = {
|
|
49320
49453
|
display: "flex",
|
|
49321
49454
|
flexDirection: "column"
|
|
@@ -49545,13 +49678,13 @@ function SchemaItem({
|
|
|
49545
49678
|
import {
|
|
49546
49679
|
useContext as useContext32,
|
|
49547
49680
|
useEffect as useEffect29,
|
|
49548
|
-
useRef as
|
|
49549
|
-
useState as
|
|
49681
|
+
useRef as useRef22,
|
|
49682
|
+
useState as useState38
|
|
49550
49683
|
} from "react";
|
|
49551
49684
|
init_constants();
|
|
49552
49685
|
|
|
49553
49686
|
// src/hooks/useReportBuilder.tsx
|
|
49554
|
-
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";
|
|
49555
49688
|
init_tableProcessing();
|
|
49556
49689
|
init_ReportBuilder();
|
|
49557
49690
|
init_constants();
|
|
@@ -49602,18 +49735,18 @@ var useReportBuilderInternal = ({
|
|
|
49602
49735
|
rowsPerPage: _rowsPerPage,
|
|
49603
49736
|
rowsPerRequest: _rowsPerRequest
|
|
49604
49737
|
};
|
|
49605
|
-
const [openPopover, setOpenPopover] =
|
|
49606
|
-
const [aiPrompt, setAiPrompt] =
|
|
49607
|
-
const [reportBuilderLoading, setReportBuilderLoading] =
|
|
49608
|
-
const [tableLoading, setTableLoading] =
|
|
49609
|
-
const [errorMessage, setErrorMessage] =
|
|
49610
|
-
const [unresolvedReportMessage, setUnresolvedReportMessage] =
|
|
49611
|
-
const [tables, setTables] =
|
|
49612
|
-
const [columns, setColumns] =
|
|
49613
|
-
const [filterStack, setFilterStack] =
|
|
49614
|
-
const [pivot, setPivot] =
|
|
49615
|
-
const [sort, setSort] =
|
|
49616
|
-
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);
|
|
49617
49750
|
const reportBuilderState = useMemo23(() => {
|
|
49618
49751
|
return {
|
|
49619
49752
|
tables,
|
|
@@ -49624,28 +49757,28 @@ var useReportBuilderInternal = ({
|
|
|
49624
49757
|
limit
|
|
49625
49758
|
};
|
|
49626
49759
|
}, [columns, filterStack, limit, pivot, sort, tables]);
|
|
49627
|
-
const [stateStack, setStateStack] =
|
|
49628
|
-
const [poppedStateStack, setPoppedStateStack] =
|
|
49629
|
-
const [unfilteredUniqueValues, setUnfilteredUniqueValues] =
|
|
49630
|
-
const [unfilteredUniqueValuesIsLoading, setUnfilteredUniqueValuesIsLoading] =
|
|
49631
|
-
const [filteredUniqueValues, setFilteredUniqueValues] =
|
|
49632
|
-
const [filteredUniqueValuesIsLoading, setFilteredUniqueValuesIsLoading] =
|
|
49633
|
-
const [columnUniqueValues, setColumnUniqueValues] =
|
|
49634
|
-
const [dateRanges, setDateRanges] =
|
|
49635
|
-
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({
|
|
49636
49769
|
...EMPTY_INTERNAL_REPORT,
|
|
49637
49770
|
pagination: REPORT_BUILDER_PAGINATION
|
|
49638
49771
|
});
|
|
49639
|
-
const [currentProcessing, setCurrentProcessing] =
|
|
49772
|
+
const [currentProcessing, setCurrentProcessing] = useState33({
|
|
49640
49773
|
page: REPORT_BUILDER_PAGINATION
|
|
49641
49774
|
});
|
|
49642
|
-
const [previousPage, setPreviousPage] =
|
|
49643
|
-
const [reportColumns, setReportColumns] =
|
|
49644
|
-
const [reportRows, setReportRows] =
|
|
49645
|
-
const [formattedRows, setFormattedRows] =
|
|
49646
|
-
const [pivotData, setPivotData] =
|
|
49647
|
-
const [numberOfRows, setNumberOfRows] =
|
|
49648
|
-
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);
|
|
49649
49782
|
const reportColumnsToStateColumns = useMemo23(() => {
|
|
49650
49783
|
const positionMap = {};
|
|
49651
49784
|
columns.forEach((column, index) => {
|
|
@@ -49664,28 +49797,28 @@ var useReportBuilderInternal = ({
|
|
|
49664
49797
|
}
|
|
49665
49798
|
});
|
|
49666
49799
|
}, [columns, reportColumns]);
|
|
49667
|
-
const [pivotRowField, setPivotRowField] =
|
|
49800
|
+
const [pivotRowField, setPivotRowField] = useState33(
|
|
49668
49801
|
void 0
|
|
49669
49802
|
);
|
|
49670
|
-
const [pivotColumnField, setPivotColumnField] =
|
|
49803
|
+
const [pivotColumnField, setPivotColumnField] = useState33(
|
|
49671
49804
|
void 0
|
|
49672
49805
|
);
|
|
49673
|
-
const [pivotAggregations, setPivotAggregations] =
|
|
49674
|
-
const [pivotLimit, setPivotLimit] =
|
|
49675
|
-
const [pivotSort, setPivotSort] =
|
|
49676
|
-
const [pivotHint, setPivotHint] =
|
|
49677
|
-
const [pivotError, setPivotError] =
|
|
49678
|
-
const [createdPivots, setCreatedPivots] =
|
|
49679
|
-
const [recommendedPivots, setRecommendedPivots] =
|
|
49680
|
-
const [pivotPopUpTitle, setPivotPopUpTitle] =
|
|
49681
|
-
const [showPivotPopover, setShowPivotPopover] =
|
|
49682
|
-
const [isEditingPivot, setIsEditingPivot] =
|
|
49683
|
-
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);
|
|
49684
49817
|
const [
|
|
49685
49818
|
pivotRecommendationsEnabledState,
|
|
49686
49819
|
setPivotRecommendationsEnabledState
|
|
49687
|
-
] =
|
|
49688
|
-
const [askAILoading, setAskAILoading] =
|
|
49820
|
+
] = useState33(pivotRecommendationsEnabled);
|
|
49821
|
+
const [askAILoading, setAskAILoading] = useState33(false);
|
|
49689
49822
|
const loading = reportBuilderLoading || tableLoading;
|
|
49690
49823
|
useLongLoading(reportBuilderLoading, {
|
|
49691
49824
|
origin: "ReportBuilder",
|
|
@@ -51067,7 +51200,7 @@ var useReportBuilder = ({
|
|
|
51067
51200
|
init_ReportBuilder();
|
|
51068
51201
|
|
|
51069
51202
|
// src/components/ReportBuilder/AddColumnModal.tsx
|
|
51070
|
-
import { useState as
|
|
51203
|
+
import { useState as useState34, useRef as useRef21, useMemo as useMemo24, useEffect as useEffect27, useContext as useContext30 } from "react";
|
|
51071
51204
|
import {
|
|
51072
51205
|
DndContext as DndContext2,
|
|
51073
51206
|
closestCenter as closestCenter2,
|
|
@@ -51102,14 +51235,14 @@ function AddColumnModal({
|
|
|
51102
51235
|
LoadingComponent = QuillLoadingComponent,
|
|
51103
51236
|
onRequestAddVirtualTable
|
|
51104
51237
|
}) {
|
|
51105
|
-
const [primaryTable, setPrimaryTable] =
|
|
51238
|
+
const [primaryTable, setPrimaryTable] = useState34(
|
|
51106
51239
|
selectedTables[0]?.name
|
|
51107
51240
|
);
|
|
51108
51241
|
const [theme] = useContext30(ThemeContext);
|
|
51109
|
-
const [search, setSearch] =
|
|
51110
|
-
const [initialLoad, setInitialLoad] =
|
|
51111
|
-
const textInputContainerRef =
|
|
51112
|
-
const [modalSelectedColumns, setModalSelectedColumns] =
|
|
51242
|
+
const [search, setSearch] = useState34("");
|
|
51243
|
+
const [initialLoad, setInitialLoad] = useState34(true);
|
|
51244
|
+
const textInputContainerRef = useRef21(null);
|
|
51245
|
+
const [modalSelectedColumns, setModalSelectedColumns] = useState34(
|
|
51113
51246
|
selectedColumns.map((col) => `${col.table}.${col.field}`)
|
|
51114
51247
|
);
|
|
51115
51248
|
const columnOptions = useMemo24(() => {
|
|
@@ -51136,7 +51269,7 @@ function AddColumnModal({
|
|
|
51136
51269
|
})
|
|
51137
51270
|
);
|
|
51138
51271
|
}, [schema, primaryTable]);
|
|
51139
|
-
const [orderedColumnNames, setOrderedColumnNames] =
|
|
51272
|
+
const [orderedColumnNames, setOrderedColumnNames] = useState34([]);
|
|
51140
51273
|
const isSelectedAllColumns = columnOptions.length === modalSelectedColumns.length;
|
|
51141
51274
|
const searchResults = useMemo24(() => {
|
|
51142
51275
|
return orderedColumnNames.filter((column) => {
|
|
@@ -52032,7 +52165,7 @@ var AddFilters = ({
|
|
|
52032
52165
|
};
|
|
52033
52166
|
|
|
52034
52167
|
// src/internals/ReportBuilder/PivotForm.tsx
|
|
52035
|
-
import { useContext as useContext31, useEffect as useEffect28, useState as
|
|
52168
|
+
import { useContext as useContext31, useEffect as useEffect28, useState as useState35 } from "react";
|
|
52036
52169
|
init_textProcessing();
|
|
52037
52170
|
init_pivotProcessing();
|
|
52038
52171
|
import { jsx as jsx74, jsxs as jsxs54 } from "react/jsx-runtime";
|
|
@@ -52061,21 +52194,21 @@ function PivotForm({
|
|
|
52061
52194
|
isLoading,
|
|
52062
52195
|
pivotHint
|
|
52063
52196
|
}) {
|
|
52064
|
-
const [allowedColumnFields, setAllowedColumnFields] =
|
|
52065
|
-
const [allowedRowFields, setAllowedRowFields] =
|
|
52066
|
-
const [allowedValueFields, setAllowedValueFields] =
|
|
52197
|
+
const [allowedColumnFields, setAllowedColumnFields] = useState35([]);
|
|
52198
|
+
const [allowedRowFields, setAllowedRowFields] = useState35([]);
|
|
52199
|
+
const [allowedValueFields, setAllowedValueFields] = useState35([]);
|
|
52067
52200
|
const [theme] = useContext31(ThemeContext);
|
|
52068
|
-
const [limitInput, setLimitInput] =
|
|
52201
|
+
const [limitInput, setLimitInput] = useState35(
|
|
52069
52202
|
pivotLimit?.toString() ?? ""
|
|
52070
52203
|
);
|
|
52071
|
-
const [sortFieldInput, setSortFieldInput] =
|
|
52204
|
+
const [sortFieldInput, setSortFieldInput] = useState35(
|
|
52072
52205
|
pivotSort?.sortField ?? ""
|
|
52073
52206
|
);
|
|
52074
|
-
const [sortDirectionInput, setSortDirectionInput] =
|
|
52207
|
+
const [sortDirectionInput, setSortDirectionInput] = useState35(
|
|
52075
52208
|
pivotSort?.sortDirection ?? ""
|
|
52076
52209
|
);
|
|
52077
|
-
const [showLimitInput, setShowLimitInput] =
|
|
52078
|
-
const [showSortInput, setShowSortInput] =
|
|
52210
|
+
const [showLimitInput, setShowLimitInput] = useState35(!!pivotLimit);
|
|
52211
|
+
const [showSortInput, setShowSortInput] = useState35(!!pivotSort);
|
|
52079
52212
|
useEffect28(() => {
|
|
52080
52213
|
if (uniqueValues) {
|
|
52081
52214
|
const possibleColumns = getPossiblePivotFieldOptions(
|
|
@@ -52704,8 +52837,8 @@ var AddPivot = ({
|
|
|
52704
52837
|
};
|
|
52705
52838
|
|
|
52706
52839
|
// src/components/ReportBuilder/AddLimitPopover.tsx
|
|
52707
|
-
import { useState as
|
|
52708
|
-
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";
|
|
52709
52842
|
var LimitSentence = ({
|
|
52710
52843
|
limit,
|
|
52711
52844
|
handleDelete,
|
|
@@ -52719,7 +52852,7 @@ var LimitSentence = ({
|
|
|
52719
52852
|
SecondaryButton = MemoizedSecondaryButton,
|
|
52720
52853
|
disabled = false
|
|
52721
52854
|
}) => {
|
|
52722
|
-
const [isOpen, setIsOpen] =
|
|
52855
|
+
const [isOpen, setIsOpen] = useState36(false);
|
|
52723
52856
|
const handleClickDelete = () => {
|
|
52724
52857
|
setOpenPopover(null);
|
|
52725
52858
|
handleDelete();
|
|
@@ -52761,7 +52894,7 @@ var AddLimitPopover = ({
|
|
|
52761
52894
|
Button = MemoizedButton,
|
|
52762
52895
|
SecondaryButton = MemoizedSecondaryButton
|
|
52763
52896
|
}) => {
|
|
52764
|
-
const [limit, setLimit] =
|
|
52897
|
+
const [limit, setLimit] = useState36(initialLimit.toString());
|
|
52765
52898
|
const MAX_LIMIT = 2147483647;
|
|
52766
52899
|
return /* @__PURE__ */ jsxs56("div", { style: { display: "flex", flexDirection: "column", gap: 12 }, children: [
|
|
52767
52900
|
/* @__PURE__ */ jsx76(
|
|
@@ -52796,7 +52929,7 @@ var AddLimitPopover = ({
|
|
|
52796
52929
|
justifyContent: "end",
|
|
52797
52930
|
gap: 12
|
|
52798
52931
|
},
|
|
52799
|
-
children: isEdit ? /* @__PURE__ */ jsxs56(
|
|
52932
|
+
children: isEdit ? /* @__PURE__ */ jsxs56(Fragment13, { children: [
|
|
52800
52933
|
/* @__PURE__ */ jsx76(SecondaryButton, { onClick: onDelete, label: "Delete" }),
|
|
52801
52934
|
/* @__PURE__ */ jsx76(
|
|
52802
52935
|
Button,
|
|
@@ -53002,9 +53135,9 @@ var AddLimit = ({
|
|
|
53002
53135
|
};
|
|
53003
53136
|
|
|
53004
53137
|
// src/components/ReportBuilder/AddSortPopover.tsx
|
|
53005
|
-
import { useState as
|
|
53138
|
+
import { useState as useState37 } from "react";
|
|
53006
53139
|
init_textProcessing();
|
|
53007
|
-
import { Fragment as
|
|
53140
|
+
import { Fragment as Fragment14, jsx as jsx78, jsxs as jsxs58 } from "react/jsx-runtime";
|
|
53008
53141
|
var SORT_VALUE_TO_LABEL = {
|
|
53009
53142
|
ASC: "ascending",
|
|
53010
53143
|
DESC: "descending",
|
|
@@ -53026,7 +53159,7 @@ var SortSentence = ({
|
|
|
53026
53159
|
SecondaryButton = MemoizedSecondaryButton,
|
|
53027
53160
|
disabled = false
|
|
53028
53161
|
}) => {
|
|
53029
|
-
const [isOpen, setIsOpen] =
|
|
53162
|
+
const [isOpen, setIsOpen] = useState37(false);
|
|
53030
53163
|
const handleSetIsOpen = (isOpen2) => {
|
|
53031
53164
|
setIsOpen(isOpen2);
|
|
53032
53165
|
};
|
|
@@ -53078,8 +53211,8 @@ var AddSortPopover = ({
|
|
|
53078
53211
|
Button = MemoizedButton,
|
|
53079
53212
|
SecondaryButton = MemoizedSecondaryButton
|
|
53080
53213
|
}) => {
|
|
53081
|
-
const [sortColumn, setSortColumn] =
|
|
53082
|
-
const [sortDirection, setSortDirection] =
|
|
53214
|
+
const [sortColumn, setSortColumn] = useState37(column || "");
|
|
53215
|
+
const [sortDirection, setSortDirection] = useState37(
|
|
53083
53216
|
direction || "ASC"
|
|
53084
53217
|
);
|
|
53085
53218
|
return /* @__PURE__ */ jsxs58("div", { style: { display: "flex", flexDirection: "column", gap: 12 }, children: [
|
|
@@ -53137,7 +53270,7 @@ var AddSortPopover = ({
|
|
|
53137
53270
|
justifyContent: "end",
|
|
53138
53271
|
gap: 12
|
|
53139
53272
|
},
|
|
53140
|
-
children: isEdit ? /* @__PURE__ */ jsxs58(
|
|
53273
|
+
children: isEdit ? /* @__PURE__ */ jsxs58(Fragment14, { children: [
|
|
53141
53274
|
/* @__PURE__ */ jsx78(SecondaryButton, { onClick: onDelete, label: "Delete" }),
|
|
53142
53275
|
/* @__PURE__ */ jsx78(
|
|
53143
53276
|
Button,
|
|
@@ -53498,7 +53631,7 @@ var ReportTable = ({
|
|
|
53498
53631
|
};
|
|
53499
53632
|
|
|
53500
53633
|
// src/ReportBuilder.tsx
|
|
53501
|
-
import { Fragment as
|
|
53634
|
+
import { Fragment as Fragment15, jsx as jsx82, jsxs as jsxs61 } from "react/jsx-runtime";
|
|
53502
53635
|
function ReportBuilder({
|
|
53503
53636
|
initialTableName = "",
|
|
53504
53637
|
onSubmitEditReport = () => void 0,
|
|
@@ -53560,11 +53693,11 @@ function ReportBuilder({
|
|
|
53560
53693
|
const [theme] = useContext32(ThemeContext);
|
|
53561
53694
|
const [client] = useContext32(ClientContext);
|
|
53562
53695
|
const { getToken } = useContext32(FetchContext);
|
|
53563
|
-
const parentRef =
|
|
53564
|
-
const askAIFormRef =
|
|
53565
|
-
const [isCopying, setIsCopying] =
|
|
53566
|
-
const [isChartBuilderOpen, setIsChartBuilderOpen] =
|
|
53567
|
-
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);
|
|
53568
53701
|
const reportBuilder = useReportBuilderInternal({
|
|
53569
53702
|
reportId,
|
|
53570
53703
|
initialTableName,
|
|
@@ -53922,7 +54055,7 @@ function ReportBuilder({
|
|
|
53922
54055
|
disabled: poppedStateStack.length < 1 || loading
|
|
53923
54056
|
}
|
|
53924
54057
|
),
|
|
53925
|
-
columns.length > 0 && /* @__PURE__ */ jsxs61(
|
|
54058
|
+
columns.length > 0 && /* @__PURE__ */ jsxs61(Fragment15, { children: [
|
|
53926
54059
|
onDiscardChanges && /* @__PURE__ */ jsx82(
|
|
53927
54060
|
SecondaryButtonComponent,
|
|
53928
54061
|
{
|
|
@@ -54068,8 +54201,8 @@ import {
|
|
|
54068
54201
|
useContext as useContext33,
|
|
54069
54202
|
useEffect as useEffect30,
|
|
54070
54203
|
useMemo as useMemo26,
|
|
54071
|
-
useRef as
|
|
54072
|
-
useState as
|
|
54204
|
+
useRef as useRef23,
|
|
54205
|
+
useState as useState39
|
|
54073
54206
|
} from "react";
|
|
54074
54207
|
import { jsx as jsx83 } from "react/jsx-runtime";
|
|
54075
54208
|
function ChartEditor({
|
|
@@ -54117,9 +54250,9 @@ function ChartEditor({
|
|
|
54117
54250
|
onClickChartElement,
|
|
54118
54251
|
onClickChartError
|
|
54119
54252
|
}) {
|
|
54120
|
-
const parentRef =
|
|
54121
|
-
const [modalWidth, setModalWidth] =
|
|
54122
|
-
const [modalHeight, setModalHeight] =
|
|
54253
|
+
const parentRef = useRef23(null);
|
|
54254
|
+
const [modalWidth, setModalWidth] = useState39(200);
|
|
54255
|
+
const [modalHeight, setModalHeight] = useState39(200);
|
|
54123
54256
|
const { allReportsById } = useAllReports();
|
|
54124
54257
|
const report = allReportsById[reportId];
|
|
54125
54258
|
const resolvedDashboard = useMemo26(
|
|
@@ -54142,8 +54275,8 @@ function ChartEditor({
|
|
|
54142
54275
|
(f) => f.filter
|
|
54143
54276
|
);
|
|
54144
54277
|
}, [dashboardFilters, report?.dashboardName]);
|
|
54145
|
-
const [filtersEnabled, setFiltersEnabled] =
|
|
54146
|
-
const [chartBuilderKey, setChartBuilderKey] =
|
|
54278
|
+
const [filtersEnabled, setFiltersEnabled] = useState39(true);
|
|
54279
|
+
const [chartBuilderKey, setChartBuilderKey] = useState39(0);
|
|
54147
54280
|
const dateFilter = Object.values(specificDashboardFilters).find(
|
|
54148
54281
|
(filter) => filter.filterType === "date_range"
|
|
54149
54282
|
);
|
|
@@ -54307,7 +54440,7 @@ function StaticChart(props) {
|
|
|
54307
54440
|
reportId,
|
|
54308
54441
|
onClickChartElement,
|
|
54309
54442
|
containerStyle,
|
|
54310
|
-
showLegend
|
|
54443
|
+
showLegend,
|
|
54311
54444
|
className
|
|
54312
54445
|
} = props;
|
|
54313
54446
|
const {
|
|
@@ -54423,7 +54556,7 @@ var useTenants = (dashboardName) => {
|
|
|
54423
54556
|
};
|
|
54424
54557
|
|
|
54425
54558
|
// src/hooks/useQuill.ts
|
|
54426
|
-
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";
|
|
54427
54560
|
init_paginationProcessing();
|
|
54428
54561
|
init_tableProcessing();
|
|
54429
54562
|
init_dataProcessing();
|
|
@@ -54446,9 +54579,9 @@ var useQuill = (reportId, pagination) => {
|
|
|
54446
54579
|
const [client, isClientLoading] = useContext35(ClientContext);
|
|
54447
54580
|
const { tenants } = useContext35(TenantContext);
|
|
54448
54581
|
const { eventTracking } = useContext35(EventTrackingContext);
|
|
54449
|
-
const [loading, setLoading] =
|
|
54450
|
-
const [error, setError] =
|
|
54451
|
-
const [previousPage, setPreviousPage] =
|
|
54582
|
+
const [loading, setLoading] = useState40(true);
|
|
54583
|
+
const [error, setError] = useState40(void 0);
|
|
54584
|
+
const [previousPage, setPreviousPage] = useState40(0);
|
|
54452
54585
|
const processedReport = useMemo27(() => {
|
|
54453
54586
|
return reportId && allReportsById[reportId] ? convertInternalReportToReport(
|
|
54454
54587
|
mergeComparisonRange(allReportsById[reportId]),
|
|
@@ -54457,7 +54590,7 @@ var useQuill = (reportId, pagination) => {
|
|
|
54457
54590
|
"useQuill"
|
|
54458
54591
|
) : void 0;
|
|
54459
54592
|
}, [reportId, reportId && allReportsById[reportId], specificReportFilters]);
|
|
54460
|
-
const [additionalProcessing, setAdditionProcessing] =
|
|
54593
|
+
const [additionalProcessing, setAdditionProcessing] = useState40(
|
|
54461
54594
|
pagination ? {
|
|
54462
54595
|
page: pagination
|
|
54463
54596
|
} : void 0
|
|
@@ -54673,7 +54806,7 @@ var useMemoizedRows = (reportId) => {
|
|
|
54673
54806
|
};
|
|
54674
54807
|
|
|
54675
54808
|
// src/hooks/useAskQuill.tsx
|
|
54676
|
-
import { useContext as useContext36, useEffect as useEffect33, useState as
|
|
54809
|
+
import { useContext as useContext36, useEffect as useEffect33, useState as useState41 } from "react";
|
|
54677
54810
|
init_astProcessing();
|
|
54678
54811
|
init_astFilterProcessing();
|
|
54679
54812
|
init_pivotProcessing();
|
|
@@ -54706,8 +54839,8 @@ var useAskQuill = (dashboardName) => {
|
|
|
54706
54839
|
const { tenants } = useContext36(TenantContext);
|
|
54707
54840
|
const { getToken } = useContext36(FetchContext);
|
|
54708
54841
|
const { eventTracking } = useContext36(EventTrackingContext);
|
|
54709
|
-
const [astInfo, setAstInfo] =
|
|
54710
|
-
const [data, setData] =
|
|
54842
|
+
const [astInfo, setAstInfo] = useState41(void 0);
|
|
54843
|
+
const [data, setData] = useState41({
|
|
54711
54844
|
rows: [],
|
|
54712
54845
|
columns: [],
|
|
54713
54846
|
pivot: null,
|
|
@@ -54717,9 +54850,9 @@ var useAskQuill = (dashboardName) => {
|
|
|
54717
54850
|
pivotColumnFields: [],
|
|
54718
54851
|
pivotValueFields: []
|
|
54719
54852
|
});
|
|
54720
|
-
const [loading, setLoading] =
|
|
54721
|
-
const [error, setError] =
|
|
54722
|
-
const [ask, setAsk] =
|
|
54853
|
+
const [loading, setLoading] = useState41(false);
|
|
54854
|
+
const [error, setError] = useState41(void 0);
|
|
54855
|
+
const [ask, setAsk] = useState41(
|
|
54723
54856
|
async () => void 0
|
|
54724
54857
|
);
|
|
54725
54858
|
const askHelper = async (query) => {
|
|
@@ -54933,13 +55066,13 @@ var useAskQuill = (dashboardName) => {
|
|
|
54933
55066
|
};
|
|
54934
55067
|
|
|
54935
55068
|
// src/hooks/useVirtualTables.tsx
|
|
54936
|
-
import { useContext as useContext37, useState as
|
|
55069
|
+
import { useContext as useContext37, useState as useState42 } from "react";
|
|
54937
55070
|
var useVirtualTables = () => {
|
|
54938
55071
|
const [schemaData, setSchemaData] = useContext37(SchemaDataContext);
|
|
54939
55072
|
const { tenants } = useContext37(TenantContext);
|
|
54940
55073
|
const { getToken, quillFetchWithToken } = useContext37(FetchContext);
|
|
54941
55074
|
const { eventTracking } = useContext37(EventTrackingContext);
|
|
54942
|
-
const [loadingTables, setLoadingTables] =
|
|
55075
|
+
const [loadingTables, setLoadingTables] = useState42({});
|
|
54943
55076
|
const handleReload = async (client, caller) => {
|
|
54944
55077
|
setSchemaData({ ...schemaData, isSchemaLoading: true });
|
|
54945
55078
|
setLoadingTables(
|