@quantumwake/terminal-ux-dashboard-components 0.1.1 → 0.1.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/index.cjs +3 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -1
- package/dist/index.d.ts +10 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -38,6 +38,7 @@ function useCapabilities() {
|
|
|
38
38
|
canDelete: !!c.deleteDashboard,
|
|
39
39
|
canAnalyze: !!c.analyzeDataset,
|
|
40
40
|
canRefine: !!c.refineDashboard,
|
|
41
|
+
canAddPanel: !!c.addPanel,
|
|
41
42
|
canEditPanels: !!c.removePanel
|
|
42
43
|
};
|
|
43
44
|
}
|
|
@@ -1624,7 +1625,7 @@ function DataExplorer({
|
|
|
1624
1625
|
onSelectState,
|
|
1625
1626
|
onRefreshStates
|
|
1626
1627
|
}) {
|
|
1627
|
-
const { theme, saveDashboard, listDashboards, searchDashboards, loadDashboard, deleteDashboard, analyzeDataset, refineDashboard } = useDashboard();
|
|
1628
|
+
const { theme, addPanel, saveDashboard, listDashboards, searchDashboards, loadDashboard, deleteDashboard, analyzeDataset, refineDashboard } = useDashboard();
|
|
1628
1629
|
const caps = useCapabilities();
|
|
1629
1630
|
const [mode, setMode] = react.useState("dashboard");
|
|
1630
1631
|
const [fullscreen, setFullscreen] = react.useState(false);
|
|
@@ -1762,7 +1763,7 @@ function DataExplorer({
|
|
|
1762
1763
|
)
|
|
1763
1764
|
] }, d.id))
|
|
1764
1765
|
] }),
|
|
1765
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `border ${theme.border} bg-midnight-surface flex-1 flex flex-col min-h-0`, children: mode === "sql" ? /* @__PURE__ */ jsxRuntime.jsx(SqlConsole, { columns, stateId: activeStateId ?? void 0 }) : mode === "builder" ? /* @__PURE__ */ jsxRuntime.jsx(ChartBuilder, { records, columns, stateId: activeStateId ?? void 0 }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1766
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: `border ${theme.border} bg-midnight-surface flex-1 flex flex-col min-h-0`, children: mode === "sql" ? /* @__PURE__ */ jsxRuntime.jsx(SqlConsole, { columns, stateId: activeStateId ?? void 0 }) : mode === "builder" ? /* @__PURE__ */ jsxRuntime.jsx(ChartBuilder, { records, columns, stateId: activeStateId ?? void 0, onSave: addPanel }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1766
1767
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 min-h-0 overflow-auto", children: dashboard ? /* @__PURE__ */ jsxRuntime.jsx(DashboardRenderer, { dashboard, records, columns }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col items-center justify-center h-full gap-4 text-midnight-text-muted", children: [
|
|
1767
1768
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Sparkles, { className: "w-8 h-8" }),
|
|
1768
1769
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm", children: caps.canAnalyze ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|