@prismiq/react 0.2.0 → 0.2.2
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/{ChatBubble-ARocmvZD.d.cts → ChatBubble-3mFpV7yX.d.ts} +4 -2
- package/dist/{ChatBubble-BN_CjIpk.d.ts → ChatBubble-CMkEupzn.d.cts} +4 -2
- package/dist/{DashboardDialog-Z-HypxmG.d.cts → DashboardDialog-DMmZ3bnf.d.cts} +1 -1
- package/dist/{DashboardDialog-UhUGXx2h.d.ts → DashboardDialog-RlcPkdMt.d.ts} +1 -1
- package/dist/charts/index.d.cts +2 -2
- package/dist/charts/index.d.ts +2 -2
- package/dist/{chunk-JBJ5LEAG.js → chunk-F6QYNQEW.js} +12 -4
- package/dist/chunk-F6QYNQEW.js.map +1 -0
- package/dist/{chunk-FKXCINUF.cjs → chunk-N6I3QOHG.cjs} +201 -193
- package/dist/chunk-N6I3QOHG.cjs.map +1 -0
- package/dist/{chunk-PG7QBH3G.cjs → chunk-NXXKG4GN.cjs} +50 -15
- package/dist/chunk-NXXKG4GN.cjs.map +1 -0
- package/dist/{chunk-GELI7MDZ.js → chunk-VEFYFB5H.js} +50 -15
- package/dist/chunk-VEFYFB5H.js.map +1 -0
- package/dist/components/index.cjs +56 -56
- package/dist/components/index.d.cts +2 -2
- package/dist/components/index.d.ts +2 -2
- package/dist/components/index.js +1 -1
- package/dist/dashboard/index.cjs +34 -34
- package/dist/dashboard/index.d.cts +3 -3
- package/dist/dashboard/index.d.ts +3 -3
- package/dist/dashboard/index.js +2 -2
- package/dist/export/index.d.cts +1 -1
- package/dist/export/index.d.ts +1 -1
- package/dist/{index-B8DelfpL.d.cts → index-BA2VUhgN.d.cts} +1 -1
- package/dist/{index-RbfYPQD_.d.ts → index-BPo89ZAj.d.ts} +1 -1
- package/dist/index.cjs +100 -100
- package/dist/index.d.cts +11 -8
- package/dist/index.d.ts +11 -8
- package/dist/index.js +4 -4
- package/dist/{types-ccB9Ps3k.d.cts → types-BaI6sSAG.d.cts} +20 -2
- package/dist/{types-ccB9Ps3k.d.ts → types-BaI6sSAG.d.ts} +20 -2
- package/dist/utils/index.d.cts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/chunk-FKXCINUF.cjs.map +0 -1
- package/dist/chunk-GELI7MDZ.js.map +0 -1
- package/dist/chunk-JBJ5LEAG.js.map +0 -1
- package/dist/chunk-PG7QBH3G.cjs.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunk73TPDGXB_cjs = require('./chunk-73TPDGXB.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunkNXXKG4GN_cjs = require('./chunk-NXXKG4GN.cjs');
|
|
5
5
|
var chunkLMTG3LRC_cjs = require('./chunk-LMTG3LRC.cjs');
|
|
6
6
|
var chunkKXB2IZI2_cjs = require('./chunk-KXB2IZI2.cjs');
|
|
7
7
|
var react = require('react');
|
|
@@ -151,8 +151,8 @@ function DashboardProvider({
|
|
|
151
151
|
lazyLoading = DEFAULT_LAZY_LOADING,
|
|
152
152
|
children
|
|
153
153
|
}) {
|
|
154
|
-
const { client } =
|
|
155
|
-
const crossFilterContext =
|
|
154
|
+
const { client } = chunkNXXKG4GN_cjs.useAnalytics();
|
|
155
|
+
const crossFilterContext = chunkNXXKG4GN_cjs.useCrossFilterOptional();
|
|
156
156
|
const lazyLoadingEnabled = lazyLoading.enabled ?? true;
|
|
157
157
|
const lazyLoadingEnabledRef = react.useRef(lazyLoadingEnabled);
|
|
158
158
|
lazyLoadingEnabledRef.current = lazyLoadingEnabled;
|
|
@@ -1063,7 +1063,7 @@ function EditableDashboardLayout({
|
|
|
1063
1063
|
className = ""
|
|
1064
1064
|
}) {
|
|
1065
1065
|
const { theme } = chunkLMTG3LRC_cjs.useTheme();
|
|
1066
|
-
const { queueUpdate, status, error } =
|
|
1066
|
+
const { queueUpdate, status, error } = chunkNXXKG4GN_cjs.useDebouncedLayoutSave({
|
|
1067
1067
|
dashboardId,
|
|
1068
1068
|
debounceMs,
|
|
1069
1069
|
savedDurationMs,
|
|
@@ -1111,7 +1111,7 @@ function EditableDashboardLayout({
|
|
|
1111
1111
|
style: containerStyles2,
|
|
1112
1112
|
"data-testid": "dashboard-container",
|
|
1113
1113
|
children: [
|
|
1114
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { style: statusBarStyles, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1114
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: statusBarStyles, children: /* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.AutoSaveIndicator, { status, error }) }),
|
|
1115
1115
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1116
1116
|
DashboardLayout,
|
|
1117
1117
|
{
|
|
@@ -1199,7 +1199,7 @@ function WidgetHeader({
|
|
|
1199
1199
|
"aria-label": isRefreshing ? "Refreshing..." : "Refresh widget",
|
|
1200
1200
|
title: isRefreshing ? "Refreshing..." : "Refresh widget",
|
|
1201
1201
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1202
|
-
|
|
1202
|
+
chunkNXXKG4GN_cjs.Icon,
|
|
1203
1203
|
{
|
|
1204
1204
|
name: "sync",
|
|
1205
1205
|
size: 16,
|
|
@@ -1218,7 +1218,7 @@ function WidgetHeader({
|
|
|
1218
1218
|
style: actionButtonStyle,
|
|
1219
1219
|
className: "prismiq-widget-action-button",
|
|
1220
1220
|
"aria-label": hyperlink.title ?? "Open link",
|
|
1221
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1221
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Icon, { name: "link", size: 16 })
|
|
1222
1222
|
}
|
|
1223
1223
|
)
|
|
1224
1224
|
] }),
|
|
@@ -1413,7 +1413,7 @@ function WidgetContent({
|
|
|
1413
1413
|
isRefreshing = false
|
|
1414
1414
|
}) {
|
|
1415
1415
|
const { theme } = chunkLMTG3LRC_cjs.useTheme();
|
|
1416
|
-
const crossFilterContext =
|
|
1416
|
+
const crossFilterContext = chunkNXXKG4GN_cjs.useCrossFilterOptional();
|
|
1417
1417
|
const data = react.useMemo(() => result ? resultToDataPoints(result) : [], [result]);
|
|
1418
1418
|
const chartTypesWithCrossFilter = ["bar_chart", "pie_chart", "line_chart", "area_chart"];
|
|
1419
1419
|
const defaultCrossFilterEnabled = chartTypesWithCrossFilter.includes(widget.type);
|
|
@@ -1655,7 +1655,7 @@ function WidgetContent({
|
|
|
1655
1655
|
position: "relative"
|
|
1656
1656
|
};
|
|
1657
1657
|
const tableContent = /* @__PURE__ */ jsxRuntime.jsx(
|
|
1658
|
-
|
|
1658
|
+
chunkNXXKG4GN_cjs.ResultsTable,
|
|
1659
1659
|
{
|
|
1660
1660
|
result: tableResult,
|
|
1661
1661
|
pageSize: widget.config.page_size ?? 10,
|
|
@@ -1794,7 +1794,7 @@ function WidgetContainer({
|
|
|
1794
1794
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: contentStyles, children }),
|
|
1795
1795
|
editable && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: overlayStyles, children: [
|
|
1796
1796
|
onDuplicate && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1797
|
-
|
|
1797
|
+
chunkNXXKG4GN_cjs.Button,
|
|
1798
1798
|
{
|
|
1799
1799
|
size: "sm",
|
|
1800
1800
|
variant: "secondary",
|
|
@@ -1804,11 +1804,11 @@ function WidgetContainer({
|
|
|
1804
1804
|
},
|
|
1805
1805
|
title: "Duplicate",
|
|
1806
1806
|
"data-testid": "duplicate-widget-button",
|
|
1807
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1807
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Icon, { name: "copy", size: 14 })
|
|
1808
1808
|
}
|
|
1809
1809
|
),
|
|
1810
1810
|
onEdit && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1811
|
-
|
|
1811
|
+
chunkNXXKG4GN_cjs.Button,
|
|
1812
1812
|
{
|
|
1813
1813
|
size: "sm",
|
|
1814
1814
|
variant: "secondary",
|
|
@@ -1818,11 +1818,11 @@ function WidgetContainer({
|
|
|
1818
1818
|
},
|
|
1819
1819
|
title: "Edit",
|
|
1820
1820
|
"data-testid": "edit-widget-button",
|
|
1821
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1821
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Icon, { name: "edit", size: 14 })
|
|
1822
1822
|
}
|
|
1823
1823
|
),
|
|
1824
1824
|
onDelete && /* @__PURE__ */ jsxRuntime.jsx(
|
|
1825
|
-
|
|
1825
|
+
chunkNXXKG4GN_cjs.Button,
|
|
1826
1826
|
{
|
|
1827
1827
|
size: "sm",
|
|
1828
1828
|
variant: "danger",
|
|
@@ -1832,7 +1832,7 @@ function WidgetContainer({
|
|
|
1832
1832
|
},
|
|
1833
1833
|
title: "Delete",
|
|
1834
1834
|
"data-testid": "delete-widget-button",
|
|
1835
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1835
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Icon, { name: "trash", size: 14 })
|
|
1836
1836
|
}
|
|
1837
1837
|
)
|
|
1838
1838
|
] }),
|
|
@@ -2010,7 +2010,7 @@ function DateRangeFilter({
|
|
|
2010
2010
|
] });
|
|
2011
2011
|
}
|
|
2012
2012
|
function useDynamicFilterOptions(filter, limit = 100) {
|
|
2013
|
-
const { client } =
|
|
2013
|
+
const { client } = chunkNXXKG4GN_cjs.useAnalytics();
|
|
2014
2014
|
const [isLoading, setIsLoading] = react.useState(false);
|
|
2015
2015
|
const [options, setOptions] = react.useState([]);
|
|
2016
2016
|
const [error, setError] = react.useState(null);
|
|
@@ -2307,7 +2307,7 @@ function MultiSelectFilter({
|
|
|
2307
2307
|
disabled: isLoading,
|
|
2308
2308
|
children: [
|
|
2309
2309
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: displayText }),
|
|
2310
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2310
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Icon, { name: isOpen ? "chevron-up" : "chevron-down", size: 14 })
|
|
2311
2311
|
]
|
|
2312
2312
|
}
|
|
2313
2313
|
),
|
|
@@ -2356,7 +2356,7 @@ function MultiSelectFilter({
|
|
|
2356
2356
|
backgroundColor: isAllSelected ? theme.colors.primary : theme.colors.background,
|
|
2357
2357
|
borderColor: isAllSelected ? theme.colors.primary : theme.colors.border
|
|
2358
2358
|
},
|
|
2359
|
-
children: isAllSelected && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2359
|
+
children: isAllSelected && /* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Icon, { name: "check", size: 12, style: { color: "#fff" } })
|
|
2360
2360
|
}
|
|
2361
2361
|
),
|
|
2362
2362
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "All" })
|
|
@@ -2382,7 +2382,7 @@ function MultiSelectFilter({
|
|
|
2382
2382
|
backgroundColor: isSelected ? theme.colors.primary : theme.colors.background,
|
|
2383
2383
|
borderColor: isSelected ? theme.colors.primary : theme.colors.border
|
|
2384
2384
|
},
|
|
2385
|
-
children: isSelected && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2385
|
+
children: isSelected && /* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Icon, { name: "check", size: 12, style: { color: "#fff" } })
|
|
2386
2386
|
}
|
|
2387
2387
|
),
|
|
2388
2388
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: option.label })
|
|
@@ -2477,7 +2477,7 @@ function TextFilter({
|
|
|
2477
2477
|
justifyContent: "center"
|
|
2478
2478
|
};
|
|
2479
2479
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: containerStyle, children: [
|
|
2480
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2480
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Icon, { name: "search", size: 14, style: iconStyle }),
|
|
2481
2481
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2482
2482
|
"input",
|
|
2483
2483
|
{
|
|
@@ -2496,7 +2496,7 @@ function TextFilter({
|
|
|
2496
2496
|
onClick: handleClear,
|
|
2497
2497
|
style: clearButtonStyle,
|
|
2498
2498
|
"aria-label": "Clear filter",
|
|
2499
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2499
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Icon, { name: "x", size: 14 })
|
|
2500
2500
|
}
|
|
2501
2501
|
)
|
|
2502
2502
|
] });
|
|
@@ -2550,7 +2550,7 @@ function FilterBar({
|
|
|
2550
2550
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: filter.label }),
|
|
2551
2551
|
renderFilter(filter, values, onChange)
|
|
2552
2552
|
] }, filter.id)),
|
|
2553
|
-
onReset && /* @__PURE__ */ jsxRuntime.jsx("div", { style: actionsStyle, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2553
|
+
onReset && /* @__PURE__ */ jsxRuntime.jsx("div", { style: actionsStyle, children: /* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Button, { variant: "ghost", size: "sm", onClick: handleReset, children: "Reset" }) })
|
|
2554
2554
|
] });
|
|
2555
2555
|
}
|
|
2556
2556
|
function renderFilter(filter, values, onChange) {
|
|
@@ -2624,7 +2624,7 @@ function DashboardContent({
|
|
|
2624
2624
|
refreshWidget
|
|
2625
2625
|
} = useDashboard();
|
|
2626
2626
|
const { filters, values, setValue, resetAll } = useDashboardFilters();
|
|
2627
|
-
const crossFilterContext =
|
|
2627
|
+
const crossFilterContext = chunkNXXKG4GN_cjs.useCrossFilterOptional();
|
|
2628
2628
|
const renderWidget = react.useCallback(
|
|
2629
2629
|
(widget) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2630
2630
|
LazyWidget,
|
|
@@ -2767,7 +2767,7 @@ function DashboardContent({
|
|
|
2767
2767
|
] }, filter.sourceWidgetId)),
|
|
2768
2768
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: 1 } }),
|
|
2769
2769
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2770
|
-
|
|
2770
|
+
chunkNXXKG4GN_cjs.Button,
|
|
2771
2771
|
{
|
|
2772
2772
|
variant: "ghost",
|
|
2773
2773
|
size: "sm",
|
|
@@ -2796,7 +2796,7 @@ function Dashboard({
|
|
|
2796
2796
|
lazyLoading,
|
|
2797
2797
|
className = ""
|
|
2798
2798
|
}) {
|
|
2799
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2799
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.CrossFilterProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2800
2800
|
DashboardProvider,
|
|
2801
2801
|
{
|
|
2802
2802
|
dashboardId: id,
|
|
@@ -2904,37 +2904,37 @@ function EditorToolbar({
|
|
|
2904
2904
|
) : /* @__PURE__ */ jsxRuntime.jsx("h2", { style: titleStyle, children: dashboardName || "New Dashboard" }),
|
|
2905
2905
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: actionsStyle, children: [
|
|
2906
2906
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2907
|
-
|
|
2907
|
+
chunkNXXKG4GN_cjs.Button,
|
|
2908
2908
|
{
|
|
2909
2909
|
variant: "secondary",
|
|
2910
2910
|
size: "sm",
|
|
2911
2911
|
onClick: onAddWidget,
|
|
2912
2912
|
children: [
|
|
2913
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2913
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Icon, { name: "plus", size: 16 }),
|
|
2914
2914
|
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { marginLeft: theme.spacing.xs }, children: "Add Widget" })
|
|
2915
2915
|
]
|
|
2916
2916
|
}
|
|
2917
2917
|
),
|
|
2918
2918
|
onEditFilters && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2919
|
-
|
|
2919
|
+
chunkNXXKG4GN_cjs.Button,
|
|
2920
2920
|
{
|
|
2921
2921
|
variant: "ghost",
|
|
2922
2922
|
size: "sm",
|
|
2923
2923
|
onClick: onEditFilters,
|
|
2924
2924
|
children: [
|
|
2925
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2925
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Icon, { name: "filter", size: 16 }),
|
|
2926
2926
|
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { marginLeft: theme.spacing.xs }, children: "Filters" })
|
|
2927
2927
|
]
|
|
2928
2928
|
}
|
|
2929
2929
|
),
|
|
2930
2930
|
onSettings && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2931
|
-
|
|
2931
|
+
chunkNXXKG4GN_cjs.Button,
|
|
2932
2932
|
{
|
|
2933
2933
|
variant: "ghost",
|
|
2934
2934
|
size: "sm",
|
|
2935
2935
|
onClick: onSettings,
|
|
2936
2936
|
children: [
|
|
2937
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2937
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Icon, { name: "settings", size: 16 }),
|
|
2938
2938
|
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { marginLeft: theme.spacing.xs }, children: "Settings" })
|
|
2939
2939
|
]
|
|
2940
2940
|
}
|
|
@@ -2944,7 +2944,7 @@ function EditorToolbar({
|
|
|
2944
2944
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: rightSectionStyle, children: [
|
|
2945
2945
|
hasChanges && /* @__PURE__ */ jsxRuntime.jsx("span", { style: unsavedStyle, children: "Unsaved changes" }),
|
|
2946
2946
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2947
|
-
|
|
2947
|
+
chunkNXXKG4GN_cjs.Button,
|
|
2948
2948
|
{
|
|
2949
2949
|
variant: "ghost",
|
|
2950
2950
|
size: "sm",
|
|
@@ -2954,7 +2954,7 @@ function EditorToolbar({
|
|
|
2954
2954
|
}
|
|
2955
2955
|
),
|
|
2956
2956
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2957
|
-
|
|
2957
|
+
chunkNXXKG4GN_cjs.Button,
|
|
2958
2958
|
{
|
|
2959
2959
|
variant: "primary",
|
|
2960
2960
|
size: "sm",
|
|
@@ -3101,7 +3101,7 @@ function WidgetTypeSelector({
|
|
|
3101
3101
|
}
|
|
3102
3102
|
},
|
|
3103
3103
|
children: [
|
|
3104
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { style: iconStyle(isSelected), children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3104
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: iconStyle(isSelected), children: /* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Icon, { name: widgetType.icon, size: 16 }) }),
|
|
3105
3105
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: textContainerStyle, children: [
|
|
3106
3106
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: nameLabelStyle, children: widgetType.label }),
|
|
3107
3107
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: descStyle, children: widgetType.description })
|
|
@@ -3247,7 +3247,7 @@ function MetricConfig({
|
|
|
3247
3247
|
onChange
|
|
3248
3248
|
}) {
|
|
3249
3249
|
const { theme } = chunkLMTG3LRC_cjs.useTheme();
|
|
3250
|
-
const { getDisplayName } =
|
|
3250
|
+
const { getDisplayName } = chunkNXXKG4GN_cjs.useSchema();
|
|
3251
3251
|
const initialTable = query?.tables[0]?.name ?? "";
|
|
3252
3252
|
const initialAggregation = query?.columns[0]?.aggregation ?? "count";
|
|
3253
3253
|
const rawInitialColumn = query?.columns[0]?.column ?? "*";
|
|
@@ -3333,7 +3333,7 @@ function MetricConfig({
|
|
|
3333
3333
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
3334
3334
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "From Table" }),
|
|
3335
3335
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3336
|
-
|
|
3336
|
+
chunkNXXKG4GN_cjs.Select,
|
|
3337
3337
|
{
|
|
3338
3338
|
value: selectedTable,
|
|
3339
3339
|
onChange: handleTableChange,
|
|
@@ -3344,7 +3344,7 @@ function MetricConfig({
|
|
|
3344
3344
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
3345
3345
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "Metric" }),
|
|
3346
3346
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3347
|
-
|
|
3347
|
+
chunkNXXKG4GN_cjs.Select,
|
|
3348
3348
|
{
|
|
3349
3349
|
value: aggregation,
|
|
3350
3350
|
onChange: (value) => setAggregation(value),
|
|
@@ -3359,7 +3359,7 @@ function MetricConfig({
|
|
|
3359
3359
|
needsColumn && selectedTable && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
3360
3360
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "Column" }),
|
|
3361
3361
|
columnOptions.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
3362
|
-
|
|
3362
|
+
chunkNXXKG4GN_cjs.Select,
|
|
3363
3363
|
{
|
|
3364
3364
|
value: selectedColumn,
|
|
3365
3365
|
onChange: setSelectedColumn,
|
|
@@ -3370,7 +3370,7 @@ function MetricConfig({
|
|
|
3370
3370
|
selectedTable && currentTable && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
3371
3371
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "Filters (optional)" }),
|
|
3372
3372
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3373
|
-
|
|
3373
|
+
chunkNXXKG4GN_cjs.FilterBuilder,
|
|
3374
3374
|
{
|
|
3375
3375
|
tables: [{ id: "t1", name: selectedTable }],
|
|
3376
3376
|
filters,
|
|
@@ -3429,7 +3429,7 @@ function ChartConfig({
|
|
|
3429
3429
|
onChange
|
|
3430
3430
|
}) {
|
|
3431
3431
|
const { theme } = chunkLMTG3LRC_cjs.useTheme();
|
|
3432
|
-
const { getDisplayName } =
|
|
3432
|
+
const { getDisplayName } = chunkNXXKG4GN_cjs.useSchema();
|
|
3433
3433
|
const initialTables = query?.tables ?? [];
|
|
3434
3434
|
const groupByCol = query?.columns.find((c) => c.aggregation === "none");
|
|
3435
3435
|
const initialGroupBy = groupByCol?.column ?? query?.group_by?.[0]?.column ?? "";
|
|
@@ -3675,7 +3675,7 @@ function ChartConfig({
|
|
|
3675
3675
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
3676
3676
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "From Table" }),
|
|
3677
3677
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3678
|
-
|
|
3678
|
+
chunkNXXKG4GN_cjs.Select,
|
|
3679
3679
|
{
|
|
3680
3680
|
value: selectedTable,
|
|
3681
3681
|
onChange: handleTableChange,
|
|
@@ -3683,9 +3683,9 @@ function ChartConfig({
|
|
|
3683
3683
|
}
|
|
3684
3684
|
)
|
|
3685
3685
|
] }),
|
|
3686
|
-
selectedTable && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3686
|
+
selectedTable && /* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.CollapsibleSection, { title: "Join Tables", defaultOpen: tables.length > 1, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: theme.spacing.md }, children: [
|
|
3687
3687
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3688
|
-
|
|
3688
|
+
chunkNXXKG4GN_cjs.TableSelector,
|
|
3689
3689
|
{
|
|
3690
3690
|
schema,
|
|
3691
3691
|
tables,
|
|
@@ -3697,7 +3697,7 @@ function ChartConfig({
|
|
|
3697
3697
|
tables.length >= 2 && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
3698
3698
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "Join Conditions" }),
|
|
3699
3699
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3700
|
-
|
|
3700
|
+
chunkNXXKG4GN_cjs.JoinBuilder,
|
|
3701
3701
|
{
|
|
3702
3702
|
schema,
|
|
3703
3703
|
tables,
|
|
@@ -3711,7 +3711,7 @@ function ChartConfig({
|
|
|
3711
3711
|
selectedTable && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
3712
3712
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "Group By (X-Axis)" }),
|
|
3713
3713
|
groupByOptions.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
3714
|
-
|
|
3714
|
+
chunkNXXKG4GN_cjs.Select,
|
|
3715
3715
|
{
|
|
3716
3716
|
value: groupByValue,
|
|
3717
3717
|
onChange: handleGroupByChange,
|
|
@@ -3723,7 +3723,7 @@ function ChartConfig({
|
|
|
3723
3723
|
selectedTable && groupByColumn && isGroupByDate && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
3724
3724
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "Date Granularity" }),
|
|
3725
3725
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3726
|
-
|
|
3726
|
+
chunkNXXKG4GN_cjs.Select,
|
|
3727
3727
|
{
|
|
3728
3728
|
value: dateTrunc,
|
|
3729
3729
|
onChange: (value) => setDateTrunc(value),
|
|
@@ -3732,8 +3732,8 @@ function ChartConfig({
|
|
|
3732
3732
|
),
|
|
3733
3733
|
/* @__PURE__ */ jsxRuntime.jsx("span", { style: helpTextStyle, children: "Truncate dates to this interval" })
|
|
3734
3734
|
] }),
|
|
3735
|
-
selectedTable && isGroupByDate && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3736
|
-
|
|
3735
|
+
selectedTable && isGroupByDate && /* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.CollapsibleSection, { title: "Time Series Options", defaultOpen: timeSeries !== void 0, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3736
|
+
chunkNXXKG4GN_cjs.TimeSeriesConfig,
|
|
3737
3737
|
{
|
|
3738
3738
|
schema,
|
|
3739
3739
|
tables,
|
|
@@ -3746,7 +3746,7 @@ function ChartConfig({
|
|
|
3746
3746
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "Measures (Y-Axis)" }),
|
|
3747
3747
|
measures.map((measure, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { style: measureRowStyle, children: [
|
|
3748
3748
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3749
|
-
|
|
3749
|
+
chunkNXXKG4GN_cjs.Select,
|
|
3750
3750
|
{
|
|
3751
3751
|
value: measure.aggregation,
|
|
3752
3752
|
onChange: (value) => updateMeasure(index, { aggregation: value }),
|
|
@@ -3757,7 +3757,7 @@ function ChartConfig({
|
|
|
3757
3757
|
measure.aggregation !== "count" && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
3758
3758
|
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: theme.colors.textMuted }, children: "of" }),
|
|
3759
3759
|
measureColumnOptions.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
3760
|
-
|
|
3760
|
+
chunkNXXKG4GN_cjs.Select,
|
|
3761
3761
|
{
|
|
3762
3762
|
value: measure.column,
|
|
3763
3763
|
onChange: (value) => updateMeasure(index, { column: value }),
|
|
@@ -3766,17 +3766,17 @@ function ChartConfig({
|
|
|
3766
3766
|
}
|
|
3767
3767
|
) : /* @__PURE__ */ jsxRuntime.jsx("span", { style: { ...helpTextStyle, flex: 1 }, children: "No numeric columns" })
|
|
3768
3768
|
] }),
|
|
3769
|
-
measures.length > 1 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3769
|
+
measures.length > 1 && /* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Button, { variant: "ghost", size: "sm", onClick: () => removeMeasure(index), children: /* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Icon, { name: "x", size: 14 }) })
|
|
3770
3770
|
] }, measureIdsRef.current[index])),
|
|
3771
3771
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3772
|
-
|
|
3772
|
+
chunkNXXKG4GN_cjs.Button,
|
|
3773
3773
|
{
|
|
3774
3774
|
variant: "ghost",
|
|
3775
3775
|
size: "sm",
|
|
3776
3776
|
onClick: addMeasure,
|
|
3777
3777
|
style: { alignSelf: "flex-start" },
|
|
3778
3778
|
children: [
|
|
3779
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3779
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Icon, { name: "plus", size: 14 }),
|
|
3780
3780
|
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { marginLeft: theme.spacing.xs }, children: "Add measure" })
|
|
3781
3781
|
]
|
|
3782
3782
|
}
|
|
@@ -3786,7 +3786,7 @@ function ChartConfig({
|
|
|
3786
3786
|
selectedTable && currentTable && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
3787
3787
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "Filters (optional)" }),
|
|
3788
3788
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3789
|
-
|
|
3789
|
+
chunkNXXKG4GN_cjs.FilterBuilder,
|
|
3790
3790
|
{
|
|
3791
3791
|
tables,
|
|
3792
3792
|
filters,
|
|
@@ -3796,12 +3796,12 @@ function ChartConfig({
|
|
|
3796
3796
|
)
|
|
3797
3797
|
] }),
|
|
3798
3798
|
selectedTable && /* @__PURE__ */ jsxRuntime.jsx(
|
|
3799
|
-
|
|
3799
|
+
chunkNXXKG4GN_cjs.CollapsibleSection,
|
|
3800
3800
|
{
|
|
3801
3801
|
title: "Calculated Fields",
|
|
3802
3802
|
defaultOpen: calculatedFields.length > 0,
|
|
3803
3803
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3804
|
-
|
|
3804
|
+
chunkNXXKG4GN_cjs.CalculatedFieldBuilder,
|
|
3805
3805
|
{
|
|
3806
3806
|
fields: calculatedFields,
|
|
3807
3807
|
onChange: setCalculatedFields,
|
|
@@ -3859,7 +3859,7 @@ function PieConfig({
|
|
|
3859
3859
|
onChange
|
|
3860
3860
|
}) {
|
|
3861
3861
|
const { theme } = chunkLMTG3LRC_cjs.useTheme();
|
|
3862
|
-
const { getDisplayName } =
|
|
3862
|
+
const { getDisplayName } = chunkNXXKG4GN_cjs.useSchema();
|
|
3863
3863
|
const initialTable = query?.tables[0]?.name ?? "";
|
|
3864
3864
|
const labelCol = query?.columns.find((c) => c.aggregation === "none");
|
|
3865
3865
|
const initialLabel = labelCol?.column ?? "";
|
|
@@ -3985,7 +3985,7 @@ function PieConfig({
|
|
|
3985
3985
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
3986
3986
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "From Table" }),
|
|
3987
3987
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3988
|
-
|
|
3988
|
+
chunkNXXKG4GN_cjs.Select,
|
|
3989
3989
|
{
|
|
3990
3990
|
value: selectedTable,
|
|
3991
3991
|
onChange: handleTableChange,
|
|
@@ -3996,7 +3996,7 @@ function PieConfig({
|
|
|
3996
3996
|
selectedTable && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
3997
3997
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "Slices (Labels)" }),
|
|
3998
3998
|
labelOptions.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
3999
|
-
|
|
3999
|
+
chunkNXXKG4GN_cjs.Select,
|
|
4000
4000
|
{
|
|
4001
4001
|
value: labelColumn,
|
|
4002
4002
|
onChange: handleLabelChange,
|
|
@@ -4008,7 +4008,7 @@ function PieConfig({
|
|
|
4008
4008
|
selectedTable && labelColumn && isLabelDate && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
4009
4009
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "Date Granularity" }),
|
|
4010
4010
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4011
|
-
|
|
4011
|
+
chunkNXXKG4GN_cjs.Select,
|
|
4012
4012
|
{
|
|
4013
4013
|
value: dateTrunc,
|
|
4014
4014
|
onChange: (value) => setDateTrunc(value),
|
|
@@ -4021,7 +4021,7 @@ function PieConfig({
|
|
|
4021
4021
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "Size (Value)" }),
|
|
4022
4022
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: rowStyle, children: [
|
|
4023
4023
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4024
|
-
|
|
4024
|
+
chunkNXXKG4GN_cjs.Select,
|
|
4025
4025
|
{
|
|
4026
4026
|
value: aggregation,
|
|
4027
4027
|
onChange: (value) => setAggregation(value),
|
|
@@ -4032,7 +4032,7 @@ function PieConfig({
|
|
|
4032
4032
|
aggregation !== "count" && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4033
4033
|
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: theme.colors.textMuted }, children: "of" }),
|
|
4034
4034
|
valueColumnOptions.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
4035
|
-
|
|
4035
|
+
chunkNXXKG4GN_cjs.Select,
|
|
4036
4036
|
{
|
|
4037
4037
|
value: valueColumn,
|
|
4038
4038
|
onChange: setValueColumn,
|
|
@@ -4047,7 +4047,7 @@ function PieConfig({
|
|
|
4047
4047
|
selectedTable && currentTable && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
4048
4048
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "Filters (optional)" }),
|
|
4049
4049
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4050
|
-
|
|
4050
|
+
chunkNXXKG4GN_cjs.FilterBuilder,
|
|
4051
4051
|
{
|
|
4052
4052
|
tables: [{ id: "t1", name: selectedTable }],
|
|
4053
4053
|
filters,
|
|
@@ -4064,7 +4064,7 @@ function TableConfig({
|
|
|
4064
4064
|
onChange
|
|
4065
4065
|
}) {
|
|
4066
4066
|
const { theme } = chunkLMTG3LRC_cjs.useTheme();
|
|
4067
|
-
const { getDisplayName } =
|
|
4067
|
+
const { getDisplayName } = chunkNXXKG4GN_cjs.useSchema();
|
|
4068
4068
|
const initialTable = query?.tables[0]?.name ?? "";
|
|
4069
4069
|
const initialColumns = query?.columns.map((c) => c.column) ?? [];
|
|
4070
4070
|
const initialFilters = (query?.filters ?? []).map((f) => ({
|
|
@@ -4170,7 +4170,7 @@ function TableConfig({
|
|
|
4170
4170
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
4171
4171
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "From Table" }),
|
|
4172
4172
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4173
|
-
|
|
4173
|
+
chunkNXXKG4GN_cjs.Select,
|
|
4174
4174
|
{
|
|
4175
4175
|
value: selectedTable,
|
|
4176
4176
|
onChange: handleTableChange,
|
|
@@ -4187,7 +4187,7 @@ function TableConfig({
|
|
|
4187
4187
|
] })
|
|
4188
4188
|
] }),
|
|
4189
4189
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: columnsContainerStyle, children: currentTable.columns.map((col) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4190
|
-
|
|
4190
|
+
chunkNXXKG4GN_cjs.Checkbox,
|
|
4191
4191
|
{
|
|
4192
4192
|
label: `${col.name} (${col.data_type})`,
|
|
4193
4193
|
checked: selectedColumns.includes(col.name),
|
|
@@ -4200,7 +4200,7 @@ function TableConfig({
|
|
|
4200
4200
|
selectedTable && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
4201
4201
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "Maximum Rows" }),
|
|
4202
4202
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: rowStyle, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4203
|
-
|
|
4203
|
+
chunkNXXKG4GN_cjs.Select,
|
|
4204
4204
|
{
|
|
4205
4205
|
value: String(limit),
|
|
4206
4206
|
onChange: (value) => setLimit(parseInt(value, 10)),
|
|
@@ -4219,7 +4219,7 @@ function TableConfig({
|
|
|
4219
4219
|
selectedTable && currentTable && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
4220
4220
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "Filters (optional)" }),
|
|
4221
4221
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4222
|
-
|
|
4222
|
+
chunkNXXKG4GN_cjs.FilterBuilder,
|
|
4223
4223
|
{
|
|
4224
4224
|
tables: [{ id: "t1", name: selectedTable }],
|
|
4225
4225
|
filters,
|
|
@@ -4303,11 +4303,11 @@ function HyperlinkSection({
|
|
|
4303
4303
|
target
|
|
4304
4304
|
});
|
|
4305
4305
|
};
|
|
4306
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4306
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(chunkNXXKG4GN_cjs.CollapsibleSection, { title: "Hyperlink", defaultOpen, children: [
|
|
4307
4307
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
4308
4308
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "URL" }),
|
|
4309
4309
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4310
|
-
|
|
4310
|
+
chunkNXXKG4GN_cjs.Input,
|
|
4311
4311
|
{
|
|
4312
4312
|
value: hyperlink?.url || "",
|
|
4313
4313
|
onChange: (e) => handleUrlChange(e.target.value),
|
|
@@ -4320,7 +4320,7 @@ function HyperlinkSection({
|
|
|
4320
4320
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
4321
4321
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "Tooltip Text" }),
|
|
4322
4322
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4323
|
-
|
|
4323
|
+
chunkNXXKG4GN_cjs.Input,
|
|
4324
4324
|
{
|
|
4325
4325
|
value: hyperlink?.title || "",
|
|
4326
4326
|
onChange: (e) => handleTitleChange(e.target.value),
|
|
@@ -4331,7 +4331,7 @@ function HyperlinkSection({
|
|
|
4331
4331
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
4332
4332
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "Open In" }),
|
|
4333
4333
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4334
|
-
|
|
4334
|
+
chunkNXXKG4GN_cjs.Select,
|
|
4335
4335
|
{
|
|
4336
4336
|
value: hyperlink?.target || "_blank",
|
|
4337
4337
|
onChange: handleTargetChange,
|
|
@@ -4407,14 +4407,14 @@ function ReferenceLinesSection({
|
|
|
4407
4407
|
onChange(lines.filter((_, i) => i !== index));
|
|
4408
4408
|
};
|
|
4409
4409
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4410
|
-
|
|
4410
|
+
chunkNXXKG4GN_cjs.CollapsibleSection,
|
|
4411
4411
|
{
|
|
4412
4412
|
title: "Reference Lines",
|
|
4413
4413
|
defaultOpen: defaultOpen || lines.length > 0,
|
|
4414
4414
|
children: [
|
|
4415
4415
|
lines.map((line, index) => /* @__PURE__ */ jsxRuntime.jsxs("div", { style: lineRowStyle, children: [
|
|
4416
4416
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4417
|
-
|
|
4417
|
+
chunkNXXKG4GN_cjs.Input,
|
|
4418
4418
|
{
|
|
4419
4419
|
type: "number",
|
|
4420
4420
|
value: String(line.value),
|
|
@@ -4424,7 +4424,7 @@ function ReferenceLinesSection({
|
|
|
4424
4424
|
}
|
|
4425
4425
|
),
|
|
4426
4426
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4427
|
-
|
|
4427
|
+
chunkNXXKG4GN_cjs.Input,
|
|
4428
4428
|
{
|
|
4429
4429
|
value: line.label ?? "",
|
|
4430
4430
|
onChange: (e) => updateLine(index, { label: e.target.value || void 0 }),
|
|
@@ -4443,7 +4443,7 @@ function ReferenceLinesSection({
|
|
|
4443
4443
|
}
|
|
4444
4444
|
),
|
|
4445
4445
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4446
|
-
|
|
4446
|
+
chunkNXXKG4GN_cjs.Select,
|
|
4447
4447
|
{
|
|
4448
4448
|
value: line.lineStyle ?? "dashed",
|
|
4449
4449
|
onChange: (value) => updateLine(index, {
|
|
@@ -4453,10 +4453,10 @@ function ReferenceLinesSection({
|
|
|
4453
4453
|
style: { width: "90px" }
|
|
4454
4454
|
}
|
|
4455
4455
|
),
|
|
4456
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4456
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Button, { variant: "ghost", size: "sm", onClick: () => removeLine(index), children: /* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Icon, { name: "x", size: 14 }) })
|
|
4457
4457
|
] }, lineIdsRef.current[index])),
|
|
4458
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { style: addButtonStyle, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4459
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4458
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: addButtonStyle, children: /* @__PURE__ */ jsxRuntime.jsxs(chunkNXXKG4GN_cjs.Button, { variant: "ghost", size: "sm", onClick: addLine, children: [
|
|
4459
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Icon, { name: "plus", size: 14 }),
|
|
4460
4460
|
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { marginLeft: theme.spacing.xs }, children: "Add reference line" })
|
|
4461
4461
|
] }) })
|
|
4462
4462
|
]
|
|
@@ -4540,7 +4540,7 @@ function TextFormattingSection({
|
|
|
4540
4540
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: headerStyle, children: [
|
|
4541
4541
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "Content" }),
|
|
4542
4542
|
config.markdown && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4543
|
-
|
|
4543
|
+
chunkNXXKG4GN_cjs.Checkbox,
|
|
4544
4544
|
{
|
|
4545
4545
|
label: "Preview",
|
|
4546
4546
|
checked: showPreview,
|
|
@@ -4570,7 +4570,7 @@ function TextFormattingSection({
|
|
|
4570
4570
|
)
|
|
4571
4571
|
] }),
|
|
4572
4572
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: fieldStyle, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4573
|
-
|
|
4573
|
+
chunkNXXKG4GN_cjs.Checkbox,
|
|
4574
4574
|
{
|
|
4575
4575
|
label: "Enable Markdown",
|
|
4576
4576
|
checked: config.markdown ?? false,
|
|
@@ -4581,7 +4581,7 @@ function TextFormattingSection({
|
|
|
4581
4581
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: halfFieldStyle, children: [
|
|
4582
4582
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "Alignment" }),
|
|
4583
4583
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4584
|
-
|
|
4584
|
+
chunkNXXKG4GN_cjs.Select,
|
|
4585
4585
|
{
|
|
4586
4586
|
value: config.alignment ?? "Left",
|
|
4587
4587
|
onChange: (value) => onChange("alignment", value),
|
|
@@ -4592,7 +4592,7 @@ function TextFormattingSection({
|
|
|
4592
4592
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: halfFieldStyle, children: [
|
|
4593
4593
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "Font Size" }),
|
|
4594
4594
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4595
|
-
|
|
4595
|
+
chunkNXXKG4GN_cjs.Select,
|
|
4596
4596
|
{
|
|
4597
4597
|
value: config.fontSize ?? "Normal",
|
|
4598
4598
|
onChange: (value) => onChange("fontSize", value),
|
|
@@ -4709,13 +4709,13 @@ function PivotConfigSection({
|
|
|
4709
4709
|
).map((col) => col.column);
|
|
4710
4710
|
}, [query, config.pivot_column, config.value_column]);
|
|
4711
4711
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4712
|
-
|
|
4712
|
+
chunkNXXKG4GN_cjs.CollapsibleSection,
|
|
4713
4713
|
{
|
|
4714
4714
|
title: "Pivot Table",
|
|
4715
4715
|
defaultOpen: defaultOpen || isPivotEnabled,
|
|
4716
4716
|
children: [
|
|
4717
4717
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: fieldStyle, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
4718
|
-
|
|
4718
|
+
chunkNXXKG4GN_cjs.Checkbox,
|
|
4719
4719
|
{
|
|
4720
4720
|
label: "Enable Pivot Mode",
|
|
4721
4721
|
checked: isPivotEnabled,
|
|
@@ -4726,7 +4726,7 @@ function PivotConfigSection({
|
|
|
4726
4726
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
4727
4727
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "Pivot Column" }),
|
|
4728
4728
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4729
|
-
|
|
4729
|
+
chunkNXXKG4GN_cjs.Select,
|
|
4730
4730
|
{
|
|
4731
4731
|
value: config.pivot_column ?? "",
|
|
4732
4732
|
onChange: (value) => onChange("pivot_column", value || void 0),
|
|
@@ -4741,7 +4741,7 @@ function PivotConfigSection({
|
|
|
4741
4741
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
4742
4742
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "Value Column" }),
|
|
4743
4743
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4744
|
-
|
|
4744
|
+
chunkNXXKG4GN_cjs.Select,
|
|
4745
4745
|
{
|
|
4746
4746
|
value: config.value_column ?? "",
|
|
4747
4747
|
onChange: (value) => onChange("value_column", value || void 0),
|
|
@@ -4804,7 +4804,7 @@ function LayoutConstraintsSection({
|
|
|
4804
4804
|
};
|
|
4805
4805
|
const hasConstraints = position.minW !== void 0 || position.maxW !== void 0 || position.minH !== void 0 || position.maxH !== void 0;
|
|
4806
4806
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
4807
|
-
|
|
4807
|
+
chunkNXXKG4GN_cjs.CollapsibleSection,
|
|
4808
4808
|
{
|
|
4809
4809
|
title: "Size Constraints",
|
|
4810
4810
|
defaultOpen: defaultOpen || hasConstraints,
|
|
@@ -4812,7 +4812,7 @@ function LayoutConstraintsSection({
|
|
|
4812
4812
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
4813
4813
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "Min Width" }),
|
|
4814
4814
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4815
|
-
|
|
4815
|
+
chunkNXXKG4GN_cjs.Input,
|
|
4816
4816
|
{
|
|
4817
4817
|
type: "number",
|
|
4818
4818
|
value: position.minW !== void 0 ? String(position.minW) : "",
|
|
@@ -4826,7 +4826,7 @@ function LayoutConstraintsSection({
|
|
|
4826
4826
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
4827
4827
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "Max Width" }),
|
|
4828
4828
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4829
|
-
|
|
4829
|
+
chunkNXXKG4GN_cjs.Input,
|
|
4830
4830
|
{
|
|
4831
4831
|
type: "number",
|
|
4832
4832
|
value: position.maxW !== void 0 ? String(position.maxW) : "",
|
|
@@ -4840,7 +4840,7 @@ function LayoutConstraintsSection({
|
|
|
4840
4840
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
4841
4841
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "Min Height" }),
|
|
4842
4842
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4843
|
-
|
|
4843
|
+
chunkNXXKG4GN_cjs.Input,
|
|
4844
4844
|
{
|
|
4845
4845
|
type: "number",
|
|
4846
4846
|
value: position.minH !== void 0 ? String(position.minH) : "",
|
|
@@ -4853,7 +4853,7 @@ function LayoutConstraintsSection({
|
|
|
4853
4853
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
4854
4854
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "Max Height" }),
|
|
4855
4855
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4856
|
-
|
|
4856
|
+
chunkNXXKG4GN_cjs.Input,
|
|
4857
4857
|
{
|
|
4858
4858
|
type: "number",
|
|
4859
4859
|
value: position.maxH !== void 0 ? String(position.maxH) : "",
|
|
@@ -4921,14 +4921,14 @@ function CrossFilterSection({
|
|
|
4921
4921
|
});
|
|
4922
4922
|
};
|
|
4923
4923
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4924
|
-
|
|
4924
|
+
chunkNXXKG4GN_cjs.CollapsibleSection,
|
|
4925
4925
|
{
|
|
4926
4926
|
title: "Cross-Filtering",
|
|
4927
4927
|
defaultOpen: defaultOpen || crossFilterEnabled,
|
|
4928
4928
|
children: [
|
|
4929
4929
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
4930
4930
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4931
|
-
|
|
4931
|
+
chunkNXXKG4GN_cjs.Checkbox,
|
|
4932
4932
|
{
|
|
4933
4933
|
label: "Enable as filter source",
|
|
4934
4934
|
checked: crossFilterEnabled,
|
|
@@ -4940,7 +4940,7 @@ function CrossFilterSection({
|
|
|
4940
4940
|
crossFilterEnabled && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
4941
4941
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "Filter Column" }),
|
|
4942
4942
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4943
|
-
|
|
4943
|
+
chunkNXXKG4GN_cjs.Select,
|
|
4944
4944
|
{
|
|
4945
4945
|
value: config.cross_filter?.column ?? config.x_axis ?? "",
|
|
4946
4946
|
onChange: handleColumnChange,
|
|
@@ -5039,11 +5039,11 @@ function ValueFormattingSection({
|
|
|
5039
5039
|
marginBottom: theme.spacing.xs
|
|
5040
5040
|
};
|
|
5041
5041
|
const isCurrency = config.valueFormat === "currency" || config.format === "currency";
|
|
5042
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5042
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(chunkNXXKG4GN_cjs.CollapsibleSection, { title: "Value Formatting", defaultOpen, children: [
|
|
5043
5043
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
5044
5044
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "Format" }),
|
|
5045
5045
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5046
|
-
|
|
5046
|
+
chunkNXXKG4GN_cjs.Select,
|
|
5047
5047
|
{
|
|
5048
5048
|
value: config.valueFormat || config.format || "number",
|
|
5049
5049
|
onChange: (value) => {
|
|
@@ -5058,7 +5058,7 @@ function ValueFormattingSection({
|
|
|
5058
5058
|
isCurrency && showCurrency && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
5059
5059
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "Currency Symbol" }),
|
|
5060
5060
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5061
|
-
|
|
5061
|
+
chunkNXXKG4GN_cjs.Input,
|
|
5062
5062
|
{
|
|
5063
5063
|
value: config.currencySymbol ?? "$",
|
|
5064
5064
|
onChange: (e) => onChange("currencySymbol", e.target.value),
|
|
@@ -5070,7 +5070,7 @@ function ValueFormattingSection({
|
|
|
5070
5070
|
showCompact && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
5071
5071
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "Compact Notation" }),
|
|
5072
5072
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5073
|
-
|
|
5073
|
+
chunkNXXKG4GN_cjs.Select,
|
|
5074
5074
|
{
|
|
5075
5075
|
value: config.compactNotation || "",
|
|
5076
5076
|
onChange: (value) => onChange("compactNotation", value ? value : null),
|
|
@@ -5081,7 +5081,7 @@ function ValueFormattingSection({
|
|
|
5081
5081
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
5082
5082
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "Decimal Places" }),
|
|
5083
5083
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5084
|
-
|
|
5084
|
+
chunkNXXKG4GN_cjs.Select,
|
|
5085
5085
|
{
|
|
5086
5086
|
value: String(config.decimalDigits ?? 2),
|
|
5087
5087
|
onChange: (value) => onChange("decimalDigits", parseInt(value, 10)),
|
|
@@ -5122,9 +5122,9 @@ function DisplayConfigSection({
|
|
|
5122
5122
|
"pie_chart",
|
|
5123
5123
|
"scatter_chart"
|
|
5124
5124
|
].includes(widgetType);
|
|
5125
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5125
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(chunkNXXKG4GN_cjs.CollapsibleSection, { title: "Display Options", defaultOpen, children: [
|
|
5126
5126
|
showColorPalette && /* @__PURE__ */ jsxRuntime.jsx("div", { style: fieldStyle, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5127
|
-
|
|
5127
|
+
chunkNXXKG4GN_cjs.ColorPaletteSelector,
|
|
5128
5128
|
{
|
|
5129
5129
|
value: config.colors,
|
|
5130
5130
|
onChange: (colors) => onChange("colors", colors)
|
|
@@ -5133,7 +5133,7 @@ function DisplayConfigSection({
|
|
|
5133
5133
|
showOrientation && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
5134
5134
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "Orientation" }),
|
|
5135
5135
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5136
|
-
|
|
5136
|
+
chunkNXXKG4GN_cjs.Select,
|
|
5137
5137
|
{
|
|
5138
5138
|
value: config.orientation || "vertical",
|
|
5139
5139
|
onChange: (value) => onChange("orientation", value),
|
|
@@ -5146,7 +5146,7 @@ function DisplayConfigSection({
|
|
|
5146
5146
|
] }),
|
|
5147
5147
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: rowStyle, children: [
|
|
5148
5148
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5149
|
-
|
|
5149
|
+
chunkNXXKG4GN_cjs.Checkbox,
|
|
5150
5150
|
{
|
|
5151
5151
|
label: "Show Legend",
|
|
5152
5152
|
checked: config.show_legend ?? true,
|
|
@@ -5154,7 +5154,7 @@ function DisplayConfigSection({
|
|
|
5154
5154
|
}
|
|
5155
5155
|
),
|
|
5156
5156
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5157
|
-
|
|
5157
|
+
chunkNXXKG4GN_cjs.Checkbox,
|
|
5158
5158
|
{
|
|
5159
5159
|
label: "Data Labels",
|
|
5160
5160
|
checked: config.show_data_labels ?? false,
|
|
@@ -5162,7 +5162,7 @@ function DisplayConfigSection({
|
|
|
5162
5162
|
}
|
|
5163
5163
|
),
|
|
5164
5164
|
showStacked && /* @__PURE__ */ jsxRuntime.jsx(
|
|
5165
|
-
|
|
5165
|
+
chunkNXXKG4GN_cjs.Checkbox,
|
|
5166
5166
|
{
|
|
5167
5167
|
label: "Stacked",
|
|
5168
5168
|
checked: config.stacked ?? false,
|
|
@@ -5247,10 +5247,10 @@ function DateFormattingSection({
|
|
|
5247
5247
|
fontSize: theme.fontSizes.sm,
|
|
5248
5248
|
color: theme.colors.textMuted
|
|
5249
5249
|
};
|
|
5250
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5250
|
+
return /* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.CollapsibleSection, { title: "Date Formatting", defaultOpen, children: dateColumns.map((col) => /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
5251
5251
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: /* @__PURE__ */ jsxRuntime.jsx("span", { style: columnNameStyle, children: col.alias }) }),
|
|
5252
5252
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5253
|
-
|
|
5253
|
+
chunkNXXKG4GN_cjs.Select,
|
|
5254
5254
|
{
|
|
5255
5255
|
value: config.dateFormats?.[col.name] || "",
|
|
5256
5256
|
onChange: (value) => handleFormatChange(col.name, value),
|
|
@@ -5308,10 +5308,10 @@ function TrendConfigSection({
|
|
|
5308
5308
|
color: theme.colors.textMuted,
|
|
5309
5309
|
marginTop: theme.spacing.xs
|
|
5310
5310
|
};
|
|
5311
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5311
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(chunkNXXKG4GN_cjs.CollapsibleSection, { title: "Trend Comparison", defaultOpen, children: [
|
|
5312
5312
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
5313
5313
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5314
|
-
|
|
5314
|
+
chunkNXXKG4GN_cjs.Checkbox,
|
|
5315
5315
|
{
|
|
5316
5316
|
label: "Show Trend Indicator",
|
|
5317
5317
|
checked: config.showTrend ?? false,
|
|
@@ -5324,7 +5324,7 @@ function TrendConfigSection({
|
|
|
5324
5324
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
5325
5325
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "Comparison Period" }),
|
|
5326
5326
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5327
|
-
|
|
5327
|
+
chunkNXXKG4GN_cjs.Select,
|
|
5328
5328
|
{
|
|
5329
5329
|
value: config.trendPeriod || "previous_period",
|
|
5330
5330
|
onChange: (value) => onChange("trendPeriod", value),
|
|
@@ -5335,7 +5335,7 @@ function TrendConfigSection({
|
|
|
5335
5335
|
dateColumnOptions.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
5336
5336
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "Date Column" }),
|
|
5337
5337
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5338
|
-
|
|
5338
|
+
chunkNXXKG4GN_cjs.Select,
|
|
5339
5339
|
{
|
|
5340
5340
|
value: config.trendDateColumn || "",
|
|
5341
5341
|
onChange: (value) => onChange("trendDateColumn", value || void 0),
|
|
@@ -5381,8 +5381,8 @@ function WidgetEditorPage({
|
|
|
5381
5381
|
onCancel
|
|
5382
5382
|
}) {
|
|
5383
5383
|
const { theme } = chunkLMTG3LRC_cjs.useTheme();
|
|
5384
|
-
const { client } =
|
|
5385
|
-
const { enabled: llmEnabled, isLoading: llmStatusLoading } =
|
|
5384
|
+
const { client } = chunkNXXKG4GN_cjs.useAnalytics();
|
|
5385
|
+
const { enabled: llmEnabled, isLoading: llmStatusLoading } = chunkNXXKG4GN_cjs.useLLMStatus();
|
|
5386
5386
|
const isNew = widget === null;
|
|
5387
5387
|
const [type, setType] = react.useState(widget?.type ?? "bar_chart");
|
|
5388
5388
|
const [title, setTitle] = react.useState(widget?.title ?? "New Widget");
|
|
@@ -5524,6 +5524,13 @@ function WidgetEditorPage({
|
|
|
5524
5524
|
}))
|
|
5525
5525
|
);
|
|
5526
5526
|
}, [schema]);
|
|
5527
|
+
const widgetContext = react.useMemo(() => ({
|
|
5528
|
+
widget_type: type,
|
|
5529
|
+
x_axis: config.x_axis,
|
|
5530
|
+
y_axis: config.y_axis,
|
|
5531
|
+
series_column: config.series_column,
|
|
5532
|
+
last_error: previewError?.message
|
|
5533
|
+
}), [type, config.x_axis, config.y_axis, config.series_column, previewError]);
|
|
5527
5534
|
const containerStyle = {
|
|
5528
5535
|
display: "flex",
|
|
5529
5536
|
flexDirection: "column",
|
|
@@ -5664,7 +5671,7 @@ function WidgetEditorPage({
|
|
|
5664
5671
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
5665
5672
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "X-Axis Column" }),
|
|
5666
5673
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5667
|
-
|
|
5674
|
+
chunkNXXKG4GN_cjs.Select,
|
|
5668
5675
|
{
|
|
5669
5676
|
value: config.x_axis || "",
|
|
5670
5677
|
onChange: (value) => updateConfig("x_axis", value || void 0),
|
|
@@ -5725,7 +5732,7 @@ function WidgetEditorPage({
|
|
|
5725
5732
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
5726
5733
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "X-Axis Column" }),
|
|
5727
5734
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5728
|
-
|
|
5735
|
+
chunkNXXKG4GN_cjs.Select,
|
|
5729
5736
|
{
|
|
5730
5737
|
value: config.x_axis || "",
|
|
5731
5738
|
onChange: (value) => updateConfig("x_axis", value || void 0),
|
|
@@ -5806,7 +5813,7 @@ function WidgetEditorPage({
|
|
|
5806
5813
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
5807
5814
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "X-Axis Column" }),
|
|
5808
5815
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5809
|
-
|
|
5816
|
+
chunkNXXKG4GN_cjs.Select,
|
|
5810
5817
|
{
|
|
5811
5818
|
value: config.x_axis || "",
|
|
5812
5819
|
onChange: (value) => updateConfig("x_axis", value || void 0),
|
|
@@ -5817,7 +5824,7 @@ function WidgetEditorPage({
|
|
|
5817
5824
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
5818
5825
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "Y-Axis Column" }),
|
|
5819
5826
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5820
|
-
|
|
5827
|
+
chunkNXXKG4GN_cjs.Select,
|
|
5821
5828
|
{
|
|
5822
5829
|
value: config.y_axis?.[0] || "",
|
|
5823
5830
|
onChange: (value) => updateConfig("y_axis", value ? [value] : void 0),
|
|
@@ -5850,7 +5857,7 @@ function WidgetEditorPage({
|
|
|
5850
5857
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
5851
5858
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "Page Size" }),
|
|
5852
5859
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5853
|
-
|
|
5860
|
+
chunkNXXKG4GN_cjs.Select,
|
|
5854
5861
|
{
|
|
5855
5862
|
value: String(config.page_size || 10),
|
|
5856
5863
|
onChange: (value) => updateConfig("page_size", parseInt(value, 10)),
|
|
@@ -5864,7 +5871,7 @@ function WidgetEditorPage({
|
|
|
5864
5871
|
)
|
|
5865
5872
|
] }),
|
|
5866
5873
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5867
|
-
|
|
5874
|
+
chunkNXXKG4GN_cjs.Checkbox,
|
|
5868
5875
|
{
|
|
5869
5876
|
label: "Sortable Columns",
|
|
5870
5877
|
checked: config.sortable ?? true,
|
|
@@ -5922,10 +5929,10 @@ function WidgetEditorPage({
|
|
|
5922
5929
|
},
|
|
5923
5930
|
children: [
|
|
5924
5931
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: theme.spacing.sm }, children: [
|
|
5925
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5932
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Icon, { name: "table", size: 16 }),
|
|
5926
5933
|
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontWeight: 500, color: theme.colors.text }, children: "Query configured" })
|
|
5927
5934
|
] }),
|
|
5928
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5935
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Button, { variant: "ghost", size: "sm", onClick: handleClearQuery, children: /* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Icon, { name: "x", size: 16 }) })
|
|
5929
5936
|
]
|
|
5930
5937
|
}
|
|
5931
5938
|
),
|
|
@@ -5944,14 +5951,14 @@ function WidgetEditorPage({
|
|
|
5944
5951
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: headerStyle, children: [
|
|
5945
5952
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: headerLeftStyle, children: [
|
|
5946
5953
|
/* @__PURE__ */ jsxRuntime.jsxs("button", { type: "button", style: backButtonStyle, onClick: onCancel, children: [
|
|
5947
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5954
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Icon, { name: "chevron-left", size: 16 }),
|
|
5948
5955
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Back" })
|
|
5949
5956
|
] }),
|
|
5950
5957
|
/* @__PURE__ */ jsxRuntime.jsx("span", { style: headerTitleStyle, children: isNew ? "Add Widget" : "Edit Widget" })
|
|
5951
5958
|
] }),
|
|
5952
5959
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: headerActionsStyle, children: [
|
|
5953
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5954
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5960
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Button, { variant: "ghost", onClick: onCancel, children: "Cancel" }),
|
|
5961
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Button, { variant: "primary", onClick: handleSave, children: isNew ? "Add Widget" : "Save Changes" })
|
|
5955
5962
|
] })
|
|
5956
5963
|
] }),
|
|
5957
5964
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: bodyStyle, children: [
|
|
@@ -5962,7 +5969,7 @@ function WidgetEditorPage({
|
|
|
5962
5969
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
5963
5970
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "Title" }),
|
|
5964
5971
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5965
|
-
|
|
5972
|
+
chunkNXXKG4GN_cjs.Input,
|
|
5966
5973
|
{
|
|
5967
5974
|
value: title,
|
|
5968
5975
|
onChange: (e) => setTitle(e.target.value),
|
|
@@ -6010,7 +6017,7 @@ function WidgetEditorPage({
|
|
|
6010
6017
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: dataSourceHeaderStyle, children: [
|
|
6011
6018
|
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: theme.fontSizes.sm, fontWeight: 500, marginRight: "auto" }, children: "Data Source" }),
|
|
6012
6019
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6013
|
-
|
|
6020
|
+
chunkNXXKG4GN_cjs.Tooltip,
|
|
6014
6021
|
{
|
|
6015
6022
|
content: "Quick setup: pick columns from dropdowns to build your chart",
|
|
6016
6023
|
position: "bottom",
|
|
@@ -6028,7 +6035,7 @@ function WidgetEditorPage({
|
|
|
6028
6035
|
}
|
|
6029
6036
|
),
|
|
6030
6037
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6031
|
-
|
|
6038
|
+
chunkNXXKG4GN_cjs.Tooltip,
|
|
6032
6039
|
{
|
|
6033
6040
|
content: "Full control: combine tables, add filters, and create custom calculations",
|
|
6034
6041
|
position: "bottom",
|
|
@@ -6046,7 +6053,7 @@ function WidgetEditorPage({
|
|
|
6046
6053
|
}
|
|
6047
6054
|
),
|
|
6048
6055
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6049
|
-
|
|
6056
|
+
chunkNXXKG4GN_cjs.Tooltip,
|
|
6050
6057
|
{
|
|
6051
6058
|
content: "Write raw SQL queries directly, with optional AI assistance",
|
|
6052
6059
|
position: "bottom",
|
|
@@ -6076,7 +6083,7 @@ function WidgetEditorPage({
|
|
|
6076
6083
|
}
|
|
6077
6084
|
),
|
|
6078
6085
|
dataSourceMode === "advanced" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6079
|
-
|
|
6086
|
+
chunkNXXKG4GN_cjs.QueryBuilder,
|
|
6080
6087
|
{
|
|
6081
6088
|
initialQuery: query ?? void 0,
|
|
6082
6089
|
onQueryChange: handleQueryChange,
|
|
@@ -6087,7 +6094,7 @@ function WidgetEditorPage({
|
|
|
6087
6094
|
}
|
|
6088
6095
|
),
|
|
6089
6096
|
dataSourceMode === "saved" && /* @__PURE__ */ jsxRuntime.jsx(
|
|
6090
|
-
|
|
6097
|
+
chunkNXXKG4GN_cjs.SavedQueryPicker,
|
|
6091
6098
|
{
|
|
6092
6099
|
currentQuery: query,
|
|
6093
6100
|
onSelect: handleSavedQuerySelect,
|
|
@@ -6104,7 +6111,7 @@ function WidgetEditorPage({
|
|
|
6104
6111
|
flexDirection: "column",
|
|
6105
6112
|
overflow: "hidden"
|
|
6106
6113
|
}, children: schemaOpen ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
6107
|
-
|
|
6114
|
+
chunkNXXKG4GN_cjs.SchemaExplorer,
|
|
6108
6115
|
{
|
|
6109
6116
|
searchable: true,
|
|
6110
6117
|
collapsible: true,
|
|
@@ -6132,7 +6139,7 @@ function WidgetEditorPage({
|
|
|
6132
6139
|
color: theme.colors.textMuted,
|
|
6133
6140
|
flexShrink: 0
|
|
6134
6141
|
},
|
|
6135
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6142
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Icon, { name: "chevron-left", size: 12 })
|
|
6136
6143
|
}
|
|
6137
6144
|
),
|
|
6138
6145
|
style: { flex: 1, border: "none", borderRadius: 0 }
|
|
@@ -6159,7 +6166,7 @@ function WidgetEditorPage({
|
|
|
6159
6166
|
fontFamily: theme.fonts.sans
|
|
6160
6167
|
},
|
|
6161
6168
|
children: [
|
|
6162
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6169
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Icon, { name: "table", size: 16 }),
|
|
6163
6170
|
/* @__PURE__ */ jsxRuntime.jsx("span", { style: {
|
|
6164
6171
|
writingMode: "vertical-rl",
|
|
6165
6172
|
fontSize: "11px",
|
|
@@ -6170,7 +6177,7 @@ function WidgetEditorPage({
|
|
|
6170
6177
|
}
|
|
6171
6178
|
) }),
|
|
6172
6179
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: 1, minWidth: 0 }, "data-testid": "sql-editor", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6173
|
-
|
|
6180
|
+
chunkNXXKG4GN_cjs.CustomSQLEditor,
|
|
6174
6181
|
{
|
|
6175
6182
|
initialSql: rawSql,
|
|
6176
6183
|
onSqlChange: setRawSql,
|
|
@@ -6180,10 +6187,11 @@ function WidgetEditorPage({
|
|
|
6180
6187
|
}
|
|
6181
6188
|
) }),
|
|
6182
6189
|
!llmStatusLoading && llmEnabled && /* @__PURE__ */ jsxRuntime.jsx("div", { style: { width: "340px", flexShrink: 0 }, "data-testid": "chat-panel", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6183
|
-
|
|
6190
|
+
chunkNXXKG4GN_cjs.ChatPanel,
|
|
6184
6191
|
{
|
|
6185
6192
|
currentSql: rawSql || null,
|
|
6186
|
-
onApplySql: handleApplySql
|
|
6193
|
+
onApplySql: handleApplySql,
|
|
6194
|
+
widgetContext
|
|
6187
6195
|
}
|
|
6188
6196
|
) })
|
|
6189
6197
|
] })
|
|
@@ -6230,8 +6238,8 @@ function DashboardEditor({
|
|
|
6230
6238
|
className = ""
|
|
6231
6239
|
}) {
|
|
6232
6240
|
const { theme } = chunkLMTG3LRC_cjs.useTheme();
|
|
6233
|
-
const { client } =
|
|
6234
|
-
const { schema } =
|
|
6241
|
+
const { client } = chunkNXXKG4GN_cjs.useAnalytics();
|
|
6242
|
+
const { schema } = chunkNXXKG4GN_cjs.useSchema();
|
|
6235
6243
|
const [currentDashboardId, setCurrentDashboardId] = react.useState(dashboardId);
|
|
6236
6244
|
react.useEffect(() => {
|
|
6237
6245
|
setCurrentDashboardId(dashboardId);
|
|
@@ -6862,7 +6870,7 @@ function WidgetPalette({
|
|
|
6862
6870
|
Object.assign(e.currentTarget.style, itemStyle);
|
|
6863
6871
|
},
|
|
6864
6872
|
children: [
|
|
6865
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { style: iconContainerStyle, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6873
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: iconContainerStyle, children: /* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Icon, { name: widgetType.icon, size: 24 }) }),
|
|
6866
6874
|
/* @__PURE__ */ jsxRuntime.jsx("span", { style: labelStyle, children: widgetType.label }),
|
|
6867
6875
|
/* @__PURE__ */ jsxRuntime.jsx("span", { style: descriptionStyle, children: widgetType.description })
|
|
6868
6876
|
]
|
|
@@ -7014,7 +7022,7 @@ function WidgetEditor({
|
|
|
7014
7022
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
7015
7023
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "Format" }),
|
|
7016
7024
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7017
|
-
|
|
7025
|
+
chunkNXXKG4GN_cjs.Select,
|
|
7018
7026
|
{
|
|
7019
7027
|
value: config.format || "number",
|
|
7020
7028
|
onChange: (value) => updateConfig("format", value),
|
|
@@ -7030,7 +7038,7 @@ function WidgetEditor({
|
|
|
7030
7038
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
7031
7039
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "Trend Comparison Field" }),
|
|
7032
7040
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7033
|
-
|
|
7041
|
+
chunkNXXKG4GN_cjs.Select,
|
|
7034
7042
|
{
|
|
7035
7043
|
value: config.trend_comparison || "",
|
|
7036
7044
|
onChange: (value) => updateConfig("trend_comparison", value || void 0),
|
|
@@ -7047,7 +7055,7 @@ function WidgetEditor({
|
|
|
7047
7055
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
7048
7056
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "X-Axis Column" }),
|
|
7049
7057
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7050
|
-
|
|
7058
|
+
chunkNXXKG4GN_cjs.Select,
|
|
7051
7059
|
{
|
|
7052
7060
|
value: config.x_axis || "",
|
|
7053
7061
|
onChange: (value) => updateConfig("x_axis", value),
|
|
@@ -7058,7 +7066,7 @@ function WidgetEditor({
|
|
|
7058
7066
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
7059
7067
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "Orientation" }),
|
|
7060
7068
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7061
|
-
|
|
7069
|
+
chunkNXXKG4GN_cjs.Select,
|
|
7062
7070
|
{
|
|
7063
7071
|
value: config.orientation || "vertical",
|
|
7064
7072
|
onChange: (value) => updateConfig("orientation", value),
|
|
@@ -7071,7 +7079,7 @@ function WidgetEditor({
|
|
|
7071
7079
|
] }),
|
|
7072
7080
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: rowStyle, children: [
|
|
7073
7081
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7074
|
-
|
|
7082
|
+
chunkNXXKG4GN_cjs.Checkbox,
|
|
7075
7083
|
{
|
|
7076
7084
|
label: "Show Legend",
|
|
7077
7085
|
checked: config.show_legend ?? true,
|
|
@@ -7079,7 +7087,7 @@ function WidgetEditor({
|
|
|
7079
7087
|
}
|
|
7080
7088
|
),
|
|
7081
7089
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7082
|
-
|
|
7090
|
+
chunkNXXKG4GN_cjs.Checkbox,
|
|
7083
7091
|
{
|
|
7084
7092
|
label: "Stacked",
|
|
7085
7093
|
checked: config.stacked ?? false,
|
|
@@ -7087,7 +7095,7 @@ function WidgetEditor({
|
|
|
7087
7095
|
}
|
|
7088
7096
|
),
|
|
7089
7097
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7090
|
-
|
|
7098
|
+
chunkNXXKG4GN_cjs.Checkbox,
|
|
7091
7099
|
{
|
|
7092
7100
|
label: "Show Data Labels",
|
|
7093
7101
|
checked: config.show_data_labels ?? false,
|
|
@@ -7102,7 +7110,7 @@ function WidgetEditor({
|
|
|
7102
7110
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
7103
7111
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "X-Axis Column" }),
|
|
7104
7112
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7105
|
-
|
|
7113
|
+
chunkNXXKG4GN_cjs.Select,
|
|
7106
7114
|
{
|
|
7107
7115
|
value: config.x_axis || "",
|
|
7108
7116
|
onChange: (value) => updateConfig("x_axis", value),
|
|
@@ -7112,7 +7120,7 @@ function WidgetEditor({
|
|
|
7112
7120
|
] }),
|
|
7113
7121
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: rowStyle, children: [
|
|
7114
7122
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7115
|
-
|
|
7123
|
+
chunkNXXKG4GN_cjs.Checkbox,
|
|
7116
7124
|
{
|
|
7117
7125
|
label: "Show Legend",
|
|
7118
7126
|
checked: config.show_legend ?? true,
|
|
@@ -7120,7 +7128,7 @@ function WidgetEditor({
|
|
|
7120
7128
|
}
|
|
7121
7129
|
),
|
|
7122
7130
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7123
|
-
|
|
7131
|
+
chunkNXXKG4GN_cjs.Checkbox,
|
|
7124
7132
|
{
|
|
7125
7133
|
label: "Show Data Labels",
|
|
7126
7134
|
checked: config.show_data_labels ?? false,
|
|
@@ -7132,7 +7140,7 @@ function WidgetEditor({
|
|
|
7132
7140
|
case "pie_chart":
|
|
7133
7141
|
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: rowStyle, children: [
|
|
7134
7142
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7135
|
-
|
|
7143
|
+
chunkNXXKG4GN_cjs.Checkbox,
|
|
7136
7144
|
{
|
|
7137
7145
|
label: "Show Legend",
|
|
7138
7146
|
checked: config.show_legend ?? true,
|
|
@@ -7140,7 +7148,7 @@ function WidgetEditor({
|
|
|
7140
7148
|
}
|
|
7141
7149
|
),
|
|
7142
7150
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7143
|
-
|
|
7151
|
+
chunkNXXKG4GN_cjs.Checkbox,
|
|
7144
7152
|
{
|
|
7145
7153
|
label: "Show Data Labels",
|
|
7146
7154
|
checked: config.show_data_labels ?? true,
|
|
@@ -7153,7 +7161,7 @@ function WidgetEditor({
|
|
|
7153
7161
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
7154
7162
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "Page Size" }),
|
|
7155
7163
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7156
|
-
|
|
7164
|
+
chunkNXXKG4GN_cjs.Select,
|
|
7157
7165
|
{
|
|
7158
7166
|
value: String(config.page_size || 10),
|
|
7159
7167
|
onChange: (value) => updateConfig("page_size", parseInt(value, 10)),
|
|
@@ -7168,7 +7176,7 @@ function WidgetEditor({
|
|
|
7168
7176
|
)
|
|
7169
7177
|
] }),
|
|
7170
7178
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7171
|
-
|
|
7179
|
+
chunkNXXKG4GN_cjs.Checkbox,
|
|
7172
7180
|
{
|
|
7173
7181
|
label: "Sortable Columns",
|
|
7174
7182
|
checked: config.sortable ?? true,
|
|
@@ -7201,7 +7209,7 @@ function WidgetEditor({
|
|
|
7201
7209
|
)
|
|
7202
7210
|
] }),
|
|
7203
7211
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7204
|
-
|
|
7212
|
+
chunkNXXKG4GN_cjs.Checkbox,
|
|
7205
7213
|
{
|
|
7206
7214
|
label: "Enable Markdown",
|
|
7207
7215
|
checked: config.markdown ?? true,
|
|
@@ -7216,7 +7224,7 @@ function WidgetEditor({
|
|
|
7216
7224
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { style: overlayStyle, onClick: onCancel, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: modalStyle, onClick: (e) => e.stopPropagation(), children: [
|
|
7217
7225
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: headerStyle, children: [
|
|
7218
7226
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { style: titleStyle, children: "Edit Widget" }),
|
|
7219
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7227
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Button, { variant: "ghost", size: "sm", onClick: onCancel, children: /* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Icon, { name: "x", size: 20 }) })
|
|
7220
7228
|
] }),
|
|
7221
7229
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: bodyStyle, children: [
|
|
7222
7230
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: sectionStyle, children: [
|
|
@@ -7224,7 +7232,7 @@ function WidgetEditor({
|
|
|
7224
7232
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyle, children: [
|
|
7225
7233
|
/* @__PURE__ */ jsxRuntime.jsx("label", { style: labelStyle, children: "Title" }),
|
|
7226
7234
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7227
|
-
|
|
7235
|
+
chunkNXXKG4GN_cjs.Input,
|
|
7228
7236
|
{
|
|
7229
7237
|
value: title,
|
|
7230
7238
|
onChange: (e) => setTitle(e.target.value),
|
|
@@ -7260,10 +7268,10 @@ function WidgetEditor({
|
|
|
7260
7268
|
},
|
|
7261
7269
|
children: [
|
|
7262
7270
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: theme.spacing.sm }, children: [
|
|
7263
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7271
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Icon, { name: "table", size: 16 }),
|
|
7264
7272
|
/* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontWeight: 500, color: theme.colors.text }, children: queryName || "Custom Query" })
|
|
7265
7273
|
] }),
|
|
7266
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7274
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Button, { variant: "ghost", size: "sm", onClick: handleClearQuery, children: /* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Icon, { name: "x", size: 16 }) })
|
|
7267
7275
|
]
|
|
7268
7276
|
}
|
|
7269
7277
|
),
|
|
@@ -7291,11 +7299,11 @@ function WidgetEditor({
|
|
|
7291
7299
|
},
|
|
7292
7300
|
children: [
|
|
7293
7301
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: { textAlign: "center", color: theme.colors.textMuted }, children: [
|
|
7294
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7302
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Icon, { name: "table", size: 24, style: { marginBottom: theme.spacing.xs } }),
|
|
7295
7303
|
/* @__PURE__ */ jsxRuntime.jsx("div", { children: "Select a saved query to power this widget" })
|
|
7296
7304
|
] }),
|
|
7297
7305
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7298
|
-
|
|
7306
|
+
chunkNXXKG4GN_cjs.SavedQueryPicker,
|
|
7299
7307
|
{
|
|
7300
7308
|
currentQuery: null,
|
|
7301
7309
|
onSelect: handleSelectSavedQuery,
|
|
@@ -7308,8 +7316,8 @@ function WidgetEditor({
|
|
|
7308
7316
|
] })
|
|
7309
7317
|
] }),
|
|
7310
7318
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: footerStyle, children: [
|
|
7311
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7312
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7319
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Button, { variant: "ghost", onClick: onCancel, children: "Cancel" }),
|
|
7320
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Button, { variant: "primary", onClick: handleSave, children: "Save Widget" })
|
|
7313
7321
|
] })
|
|
7314
7322
|
] }) });
|
|
7315
7323
|
}
|
|
@@ -7454,31 +7462,31 @@ var DashboardCard = react.forwardRef(
|
|
|
7454
7462
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: headerStyles, children: [
|
|
7455
7463
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { style: titleStyles, children: dashboard.name }),
|
|
7456
7464
|
actions ? actions : /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7457
|
-
|
|
7465
|
+
chunkNXXKG4GN_cjs.Dropdown,
|
|
7458
7466
|
{
|
|
7459
7467
|
trigger: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7460
|
-
|
|
7468
|
+
chunkNXXKG4GN_cjs.Button,
|
|
7461
7469
|
{
|
|
7462
7470
|
variant: "ghost",
|
|
7463
7471
|
size: "sm",
|
|
7464
7472
|
onClick: (e) => e.stopPropagation(),
|
|
7465
7473
|
disabled: actionsDisabled,
|
|
7466
7474
|
"aria-label": "Dashboard actions",
|
|
7467
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7475
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Icon, { name: "more-vertical", size: 16 })
|
|
7468
7476
|
}
|
|
7469
7477
|
),
|
|
7470
7478
|
children: [
|
|
7471
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
7472
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7479
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkNXXKG4GN_cjs.DropdownItem, { onClick: () => handleMenuAction("edit"), children: [
|
|
7480
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Icon, { name: "edit", size: 14 }),
|
|
7473
7481
|
"Edit"
|
|
7474
7482
|
] }),
|
|
7475
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
7476
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7483
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkNXXKG4GN_cjs.DropdownItem, { onClick: () => handleMenuAction("duplicate"), children: [
|
|
7484
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Icon, { name: "copy", size: 14 }),
|
|
7477
7485
|
"Duplicate"
|
|
7478
7486
|
] }),
|
|
7479
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7480
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
7481
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7487
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.DropdownSeparator, {}),
|
|
7488
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkNXXKG4GN_cjs.DropdownItem, { onClick: () => handleMenuAction("delete"), children: [
|
|
7489
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Icon, { name: "trash", size: 14 }),
|
|
7482
7490
|
"Delete"
|
|
7483
7491
|
] })
|
|
7484
7492
|
]
|
|
@@ -7488,13 +7496,13 @@ var DashboardCard = react.forwardRef(
|
|
|
7488
7496
|
dashboard.description && /* @__PURE__ */ jsxRuntime.jsx("p", { style: descriptionStyles, children: dashboard.description }),
|
|
7489
7497
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: metaStyles, children: [
|
|
7490
7498
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { style: metaItemStyles, children: [
|
|
7491
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7499
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Icon, { name: "grid", size: 12 }),
|
|
7492
7500
|
dashboard.widgets.length,
|
|
7493
7501
|
" widget",
|
|
7494
7502
|
dashboard.widgets.length !== 1 ? "s" : ""
|
|
7495
7503
|
] }),
|
|
7496
7504
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { style: metaItemStyles, children: [
|
|
7497
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7505
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Icon, { name: "calendar", size: 12 }),
|
|
7498
7506
|
formatDate(dashboard.updated_at)
|
|
7499
7507
|
] }),
|
|
7500
7508
|
dashboard.is_public ? /* @__PURE__ */ jsxRuntime.jsx("span", { style: publicBadgeStyles, children: "Public" }) : /* @__PURE__ */ jsxRuntime.jsx("span", { style: privateBadgeStyles, children: "Private" })
|
|
@@ -7552,32 +7560,32 @@ var DashboardList = react.forwardRef(
|
|
|
7552
7560
|
if (isLoading) {
|
|
7553
7561
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, style: { ...containerStyles, ...style }, ...props, children: [
|
|
7554
7562
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: headerStyles2, children: [
|
|
7555
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7556
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7563
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Skeleton, { width: 200, height: 32 }),
|
|
7564
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Skeleton, { width: 150, height: 40 })
|
|
7557
7565
|
] }),
|
|
7558
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { style: getGridStyles(columns), children: Array.from({ length: 6 }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
7566
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { style: getGridStyles(columns), children: Array.from({ length: 6 }).map((_, i) => /* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Skeleton, { height: 150, style: { borderRadius: "var(--prismiq-radius-lg)" } }, i)) })
|
|
7559
7567
|
] });
|
|
7560
7568
|
}
|
|
7561
7569
|
if (error) {
|
|
7562
7570
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { ref, style: { ...containerStyles, ...style }, ...props, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: errorStyles, children: [
|
|
7563
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7571
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Icon, { name: "alert-circle", size: 48 }),
|
|
7564
7572
|
/* @__PURE__ */ jsxRuntime.jsxs("p", { children: [
|
|
7565
7573
|
"Failed to load dashboards: ",
|
|
7566
7574
|
error.message
|
|
7567
7575
|
] }),
|
|
7568
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7576
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Button, { variant: "secondary", onClick: () => window.location.reload(), children: "Retry" })
|
|
7569
7577
|
] }) });
|
|
7570
7578
|
}
|
|
7571
7579
|
if (!dashboards || dashboards.length === 0) {
|
|
7572
7580
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, style: { ...containerStyles, ...style }, ...props, children: [
|
|
7573
7581
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: headerStyles2, children: [
|
|
7574
7582
|
/* @__PURE__ */ jsxRuntime.jsx("h2", { style: titleStyles2, children: "Dashboards" }),
|
|
7575
|
-
onCreate && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7583
|
+
onCreate && /* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Button, { onClick: onCreate, leftIcon: /* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Icon, { name: "plus", size: 16 }), children: "Create Dashboard" })
|
|
7576
7584
|
] }),
|
|
7577
7585
|
emptyState || /* @__PURE__ */ jsxRuntime.jsx(
|
|
7578
|
-
|
|
7586
|
+
chunkNXXKG4GN_cjs.EmptyState,
|
|
7579
7587
|
{
|
|
7580
|
-
icon: /* @__PURE__ */ jsxRuntime.jsx(
|
|
7588
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Icon, { name: "layout", size: 64 }),
|
|
7581
7589
|
title: "No dashboards yet",
|
|
7582
7590
|
description: "Create your first dashboard to start visualizing your data.",
|
|
7583
7591
|
action: onCreate ? { label: "Create Dashboard", onClick: onCreate } : void 0
|
|
@@ -7592,7 +7600,7 @@ var DashboardList = react.forwardRef(
|
|
|
7592
7600
|
dashboards.length,
|
|
7593
7601
|
")"
|
|
7594
7602
|
] }),
|
|
7595
|
-
onCreate && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7603
|
+
onCreate && /* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Button, { onClick: onCreate, leftIcon: /* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Icon, { name: "plus", size: 16 }), children: "Create Dashboard" })
|
|
7596
7604
|
] }),
|
|
7597
7605
|
/* @__PURE__ */ jsxRuntime.jsx("div", { style: getGridStyles(columns), children: dashboards.map((dashboard) => {
|
|
7598
7606
|
const cardProps = {
|
|
@@ -7692,7 +7700,7 @@ var DashboardDialog = react.forwardRef(
|
|
|
7692
7700
|
);
|
|
7693
7701
|
const displayError = validationError || error;
|
|
7694
7702
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7695
|
-
|
|
7703
|
+
chunkNXXKG4GN_cjs.Dialog,
|
|
7696
7704
|
{
|
|
7697
7705
|
open,
|
|
7698
7706
|
onClose,
|
|
@@ -7704,7 +7712,7 @@ var DashboardDialog = react.forwardRef(
|
|
|
7704
7712
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyles, children: [
|
|
7705
7713
|
/* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: "dashboard-name", style: labelStyles, children: "Name" }),
|
|
7706
7714
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7707
|
-
|
|
7715
|
+
chunkNXXKG4GN_cjs.Input,
|
|
7708
7716
|
{
|
|
7709
7717
|
id: "dashboard-name",
|
|
7710
7718
|
value: formState.name,
|
|
@@ -7718,7 +7726,7 @@ var DashboardDialog = react.forwardRef(
|
|
|
7718
7726
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: fieldStyles, children: [
|
|
7719
7727
|
/* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: "dashboard-description", style: labelStyles, children: "Description (optional)" }),
|
|
7720
7728
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7721
|
-
|
|
7729
|
+
chunkNXXKG4GN_cjs.Input,
|
|
7722
7730
|
{
|
|
7723
7731
|
id: "dashboard-description",
|
|
7724
7732
|
value: formState.description,
|
|
@@ -7730,7 +7738,7 @@ var DashboardDialog = react.forwardRef(
|
|
|
7730
7738
|
] }),
|
|
7731
7739
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { style: checkboxContainerStyles, children: [
|
|
7732
7740
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7733
|
-
|
|
7741
|
+
chunkNXXKG4GN_cjs.Checkbox,
|
|
7734
7742
|
{
|
|
7735
7743
|
id: "dashboard-public",
|
|
7736
7744
|
checked: formState.isPublic,
|
|
@@ -7740,9 +7748,9 @@ var DashboardDialog = react.forwardRef(
|
|
|
7740
7748
|
),
|
|
7741
7749
|
/* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: "dashboard-public", style: checkboxLabelStyles, children: "Make this dashboard public" })
|
|
7742
7750
|
] }),
|
|
7743
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
7751
|
+
/* @__PURE__ */ jsxRuntime.jsxs(chunkNXXKG4GN_cjs.DialogFooter, { children: [
|
|
7744
7752
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7745
|
-
|
|
7753
|
+
chunkNXXKG4GN_cjs.Button,
|
|
7746
7754
|
{
|
|
7747
7755
|
type: "button",
|
|
7748
7756
|
variant: "secondary",
|
|
@@ -7751,7 +7759,7 @@ var DashboardDialog = react.forwardRef(
|
|
|
7751
7759
|
children: "Cancel"
|
|
7752
7760
|
}
|
|
7753
7761
|
),
|
|
7754
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7762
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkNXXKG4GN_cjs.Button, { type: "submit", loading: isLoading, children: isEditMode ? "Save Changes" : "Create Dashboard" })
|
|
7755
7763
|
] })
|
|
7756
7764
|
] })
|
|
7757
7765
|
}
|
|
@@ -7791,5 +7799,5 @@ exports.useDashboardFilters = useDashboardFilters;
|
|
|
7791
7799
|
exports.useFullscreen = useFullscreen;
|
|
7792
7800
|
exports.useWidget = useWidget;
|
|
7793
7801
|
exports.useWidgetVisibility = useWidgetVisibility;
|
|
7794
|
-
//# sourceMappingURL=chunk-
|
|
7795
|
-
//# sourceMappingURL=chunk-
|
|
7802
|
+
//# sourceMappingURL=chunk-N6I3QOHG.cjs.map
|
|
7803
|
+
//# sourceMappingURL=chunk-N6I3QOHG.cjs.map
|