drizzle-cube 0.4.41 → 0.4.42
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/client/charts.js +9 -9
- package/dist/client/chunks/{DashboardEditModal-D_7J62sG.js → DashboardEditModal-4zzjtZRR.js} +7 -7
- package/dist/client/chunks/{DashboardEditModal-D_7J62sG.js.map → DashboardEditModal-4zzjtZRR.js.map} +1 -1
- package/dist/client/chunks/{FieldSearchModal-5Qz6vvTz.js → FieldSearchModal-trURu9Sa.js} +2 -2
- package/dist/client/chunks/{FieldSearchModal-5Qz6vvTz.js.map → FieldSearchModal-trURu9Sa.js.map} +1 -1
- package/dist/client/chunks/{analysis-builder-DPJJiHVx.js → analysis-builder-B7XSIMkr.js} +381 -372
- package/dist/client/chunks/analysis-builder-B7XSIMkr.js.map +1 -0
- package/dist/client/chunks/{analysis-builder-shared-C-C-rOgu.js → analysis-builder-shared-DaqtrLxd.js} +6 -6
- package/dist/client/chunks/{analysis-builder-shared-C-C-rOgu.js.map → analysis-builder-shared-DaqtrLxd.js.map} +1 -1
- package/dist/client/chunks/{chart-bar-DVzmau1G.js → chart-bar-CPt67rLR.js} +1 -1
- package/dist/client/chunks/{chart-bar-DVzmau1G.js.map → chart-bar-CPt67rLR.js.map} +1 -1
- package/dist/client/chunks/{chart-box-plot-CCmbHv1Y.js → chart-box-plot-Dp_nqQen.js} +1 -1
- package/dist/client/chunks/{chart-box-plot-CCmbHv1Y.js.map → chart-box-plot-Dp_nqQen.js.map} +1 -1
- package/dist/client/chunks/{chart-bubble-S6qSwWdK.js → chart-bubble-CYQ8loeS.js} +1 -1
- package/dist/client/chunks/{chart-bubble-S6qSwWdK.js.map → chart-bubble-CYQ8loeS.js.map} +1 -1
- package/dist/client/chunks/{chart-candlestick-BNKbDruo.js → chart-candlestick-DTeSf7C5.js} +1 -1
- package/dist/client/chunks/{chart-candlestick-BNKbDruo.js.map → chart-candlestick-DTeSf7C5.js.map} +1 -1
- package/dist/client/chunks/{chart-data-table-D4s27-U3.js → chart-data-table-BZ7StNWv.js} +18 -18
- package/dist/client/chunks/{chart-data-table-D4s27-U3.js.map → chart-data-table-BZ7StNWv.js.map} +1 -1
- package/dist/client/chunks/{chart-gauge-BFhc4i_f.js → chart-gauge-_Xdgk_qI.js} +1 -1
- package/dist/client/chunks/{chart-gauge-BFhc4i_f.js.map → chart-gauge-_Xdgk_qI.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-delta-DzGNnIcW.js → chart-kpi-delta-C2tdpWki.js} +2 -2
- package/dist/client/chunks/{chart-kpi-delta-DzGNnIcW.js.map → chart-kpi-delta-C2tdpWki.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-number-sHtgbE_f.js → chart-kpi-number-BUNKM7yg.js} +3 -3
- package/dist/client/chunks/{chart-kpi-number-sHtgbE_f.js.map → chart-kpi-number-BUNKM7yg.js.map} +1 -1
- package/dist/client/chunks/{chart-kpi-text-Bmk-GzVJ.js → chart-kpi-text-COF8iN0K.js} +2 -2
- package/dist/client/chunks/{chart-kpi-text-Bmk-GzVJ.js.map → chart-kpi-text-COF8iN0K.js.map} +1 -1
- package/dist/client/chunks/{chart-line-Bkl5WQAw.js → chart-line-D3SEwXDS.js} +1 -1
- package/dist/client/chunks/{chart-line-Bkl5WQAw.js.map → chart-line-D3SEwXDS.js.map} +1 -1
- package/dist/client/chunks/{chart-markdown-7MNetRtX.js → chart-markdown-DMekYkKz.js} +647 -644
- package/dist/client/chunks/chart-markdown-DMekYkKz.js.map +1 -0
- package/dist/client/chunks/{chart-measure-profile-B7h6vQo4.js → chart-measure-profile-BPhI1Z9s.js} +1 -1
- package/dist/client/chunks/{chart-measure-profile-B7h6vQo4.js.map → chart-measure-profile-BPhI1Z9s.js.map} +1 -1
- package/dist/client/chunks/{chart-pie-Do2YnCxl.js → chart-pie-COl3Rmdk.js} +1 -1
- package/dist/client/chunks/{chart-pie-Do2YnCxl.js.map → chart-pie-COl3Rmdk.js.map} +1 -1
- package/dist/client/chunks/{chart-radar-C7gQkH70.js → chart-radar-BKZXylBB.js} +1 -1
- package/dist/client/chunks/{chart-radar-C7gQkH70.js.map → chart-radar-BKZXylBB.js.map} +1 -1
- package/dist/client/chunks/{chart-radial-bar-DHqCck3x.js → chart-radial-bar-CMfC7SPd.js} +1 -1
- package/dist/client/chunks/{chart-radial-bar-DHqCck3x.js.map → chart-radial-bar-CMfC7SPd.js.map} +1 -1
- package/dist/client/chunks/{chart-scatter-YSHOUfXf.js → chart-scatter-xQMa3dUt.js} +1 -1
- package/dist/client/chunks/{chart-scatter-YSHOUfXf.js.map → chart-scatter-xQMa3dUt.js.map} +1 -1
- package/dist/client/chunks/{chart-tree-map-BlhcXK1F.js → chart-tree-map-Cn1pmrAw.js} +1 -1
- package/dist/client/chunks/{chart-tree-map-BlhcXK1F.js.map → chart-tree-map-Cn1pmrAw.js.map} +1 -1
- package/dist/client/chunks/{chart-waterfall-BWCAzlPq.js → chart-waterfall-C2nVN4pn.js} +1 -1
- package/dist/client/chunks/{chart-waterfall-BWCAzlPq.js.map → chart-waterfall-C2nVN4pn.js.map} +1 -1
- package/dist/client/chunks/{schema-visualization-BJ8HrNqB.js → schema-visualization-DVdfx6N8.js} +85 -89
- package/dist/client/chunks/schema-visualization-DVdfx6N8.js.map +1 -0
- package/dist/client/chunks/{useDebounce-EWynD0lC.js → useDebounce-Bel8J05v.js} +2 -2
- package/dist/client/chunks/{useDebounce-EWynD0lC.js.map → useDebounce-Bel8J05v.js.map} +1 -1
- package/dist/client/chunks/{useExplainAI-BBTJWQVu.js → useExplainAI-CxdzY2N0.js} +4 -4
- package/dist/client/chunks/{useExplainAI-BBTJWQVu.js.map → useExplainAI-CxdzY2N0.js.map} +1 -1
- package/dist/client/chunks/{utils-DMyRayr_.js → utils-CMkS7h9x.js} +2 -2
- package/dist/client/chunks/{utils-DMyRayr_.js.map → utils-CMkS7h9x.js.map} +1 -1
- package/dist/client/chunks/{vendor-iY25ogTA.js → vendor-BoWEubRu.js} +2 -2
- package/dist/client/chunks/{vendor-iY25ogTA.js.map → vendor-BoWEubRu.js.map} +1 -1
- package/dist/client/components.js +3 -3
- package/dist/client/hooks.js +3 -3
- package/dist/client/icons.js +1 -1
- package/dist/client/index.d.ts +0 -1
- package/dist/client/index.js +139 -140
- package/dist/client/index.js.map +1 -1
- package/dist/client/providers.js +1 -1
- package/dist/client/schema.d.ts +13 -0
- package/dist/client/schema.js +2 -0
- package/dist/client/styles.css +1 -1
- package/dist/client/utils.js +4 -4
- package/dist/client-bundle-stats.html +1 -1
- package/package.json +5 -1
- package/dist/client/chunks/analysis-builder-DPJJiHVx.js.map +0 -1
- package/dist/client/chunks/chart-markdown-7MNetRtX.js.map +0 -1
- package/dist/client/chunks/schema-visualization-BJ8HrNqB.js.map +0 -1
package/dist/client/index.js
CHANGED
|
@@ -1,32 +1,31 @@
|
|
|
1
|
-
import { a as e, n as t, o as n, r, s as i } from "./chunks/vendor-
|
|
2
|
-
import { A as a, C as o, D as s, E as c, F as l, G as u, H as d, I as f, J as p, K as m, L as h, M as g, N as _, O as v, P as y, R as b, S as x, T as S, V as C, X as w, Y as T, c as E, j as D, k as O, l as k, q as A, s as j, w as M, x as N } from "./chunks/chart-data-table-
|
|
3
|
-
import { _ as ee, a as P, b as F, d as I, f as L, g as te, h as R, i as z, l as B, m as ne, o as re, p as ie, s as ae, u as oe, v as se } from "./chunks/useDebounce-
|
|
4
|
-
import { a as ce, i as le, n as ue, o as de, r as fe, t as pe } from "./chunks/useExplainAI-
|
|
1
|
+
import { a as e, n as t, o as n, r, s as i } from "./chunks/vendor-BoWEubRu.js";
|
|
2
|
+
import { A as a, C as o, D as s, E as c, F as l, G as u, H as d, I as f, J as p, K as m, L as h, M as g, N as _, O as v, P as y, R as b, S as x, T as S, V as C, X as w, Y as T, c as E, j as D, k as O, l as k, q as A, s as j, w as M, x as N } from "./chunks/chart-data-table-BZ7StNWv.js";
|
|
3
|
+
import { _ as ee, a as P, b as F, d as I, f as L, g as te, h as R, i as z, l as B, m as ne, o as re, p as ie, s as ae, u as oe, v as se } from "./chunks/useDebounce-Bel8J05v.js";
|
|
4
|
+
import { a as ce, i as le, n as ue, o as de, r as fe, t as pe } from "./chunks/useExplainAI-CxdzY2N0.js";
|
|
5
5
|
import { a as me, c as he, i as ge, l as _e, o as ve, r as ye, s as be } from "./chunks/chart-funnel-C9JRW79j.js";
|
|
6
6
|
import { n as xe, r as Se } from "./chunks/chart-sankey-8nRYnupt.js";
|
|
7
7
|
import { n as Ce, t as we } from "./chunks/providers-DX3Vw5kc.js";
|
|
8
8
|
import { A as Te, _ as Ee, c as De, d as Oe, f as ke, g as Ae, h as je, l as Me, m as Ne, p as Pe, u as Fe } from "./chunks/chart-activity-grid-wR2Twpo7.js";
|
|
9
|
-
import { A as Ie, C as Le, D as Re, E as ze, M as Be, N as Ve, O as He, S as Ue, T as We, _ as Ge, a as Ke, b as qe, c as Je, d as Ye, f as Xe, g as Ze, h as Qe, i as $e, j as et, k as tt, l as nt, m as rt, n as it, o as at, p as ot, r as st, s as ct, t as lt, u as ut, v as dt, w as ft, x as pt, y as mt } from "./chunks/DashboardEditModal-
|
|
9
|
+
import { A as Ie, C as Le, D as Re, E as ze, M as Be, N as Ve, O as He, S as Ue, T as We, _ as Ge, a as Ke, b as qe, c as Je, d as Ye, f as Xe, g as Ze, h as Qe, i as $e, j as et, k as tt, l as nt, m as rt, n as it, o as at, p as ot, r as st, s as ct, t as lt, u as ut, v as dt, w as ft, x as pt, y as mt } from "./chunks/DashboardEditModal-4zzjtZRR.js";
|
|
10
10
|
import { u as V } from "./chunks/chart-area-e9ysnatQ.js";
|
|
11
|
-
import { A as ht, C as gt, D as _t, E as vt, F as yt, I as bt, L as xt, M as St, N as Ct, O as wt, P as Tt, R as Et, S as Dt, T as Ot, h as kt, j as At, k as jt, p as Mt, r as Nt, t as Pt, w as Ft } from "./chunks/FieldSearchModal-
|
|
11
|
+
import { A as ht, C as gt, D as _t, E as vt, F as yt, I as bt, L as xt, M as St, N as Ct, O as wt, P as Tt, R as Et, S as Dt, T as Ot, h as kt, j as At, k as jt, p as Mt, r as Nt, t as Pt, w as Ft } from "./chunks/FieldSearchModal-trURu9Sa.js";
|
|
12
12
|
import { r as It } from "./chunks/syntaxHighlighting-BYYWYmjr.js";
|
|
13
|
-
import { A as Lt, D as Rt, E as zt, F as Bt, I as Vt, M as Ht, O as Ut, P as Wt, S as Gt, T as Kt, _ as qt, a as Jt, b as Yt, c as Xt, d as Zt, f as Qt, g as $t, h as en, i as tn, j as nn, k as rn, l as an, n as on, o as sn, p as cn, r as ln, s as un, t as dn, v as fn, w as pn, x as mn, y as hn } from "./chunks/analysis-builder-shared-
|
|
14
|
-
import { r as gn } from "./chunks/chart-markdown-
|
|
13
|
+
import { A as Lt, D as Rt, E as zt, F as Bt, I as Vt, M as Ht, O as Ut, P as Wt, S as Gt, T as Kt, _ as qt, a as Jt, b as Yt, c as Xt, d as Zt, f as Qt, g as $t, h as en, i as tn, j as nn, k as rn, l as an, n as on, o as sn, p as cn, r as ln, s as un, t as dn, v as fn, w as pn, x as mn, y as hn } from "./chunks/analysis-builder-shared-DaqtrLxd.js";
|
|
14
|
+
import { r as gn } from "./chunks/chart-markdown-DMekYkKz.js";
|
|
15
15
|
import { t as _n } from "./chunks/useNotebookLayout-DKkMenhj.js";
|
|
16
|
-
import { n as vn } from "./chunks/
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import H, { createContext as Sn, useCallback as U, useContext as Cn, useEffect as W, useMemo as G, useRef as K, useState as q } from "react";
|
|
16
|
+
import { n as vn } from "./chunks/chart-bubble-CYQ8loeS.js";
|
|
17
|
+
import { i as yn, t as bn } from "./chunks/utils-CMkS7h9x.js";
|
|
18
|
+
import H, { createContext as xn, useCallback as U, useContext as Sn, useEffect as W, useMemo as G, useRef as K, useState as q } from "react";
|
|
20
19
|
import { Fragment as J, jsx as Y, jsxs as X } from "react/jsx-runtime";
|
|
21
20
|
//#region src/client/stores/notebookStore.tsx
|
|
22
|
-
var
|
|
21
|
+
var Cn = () => ({
|
|
23
22
|
blocks: [],
|
|
24
23
|
messages: [],
|
|
25
24
|
isStreaming: !1,
|
|
26
25
|
sessionId: null,
|
|
27
26
|
inputValue: ""
|
|
28
27
|
});
|
|
29
|
-
function
|
|
28
|
+
function wn(e, t) {
|
|
30
29
|
return {
|
|
31
30
|
addBlock: (t) => e((e) => ({ blocks: [...e.blocks, t] })),
|
|
32
31
|
removeBlock: (t) => e((e) => ({ blocks: e.blocks.filter((e) => e.id !== t) })),
|
|
@@ -90,38 +89,38 @@ function Tn(e, t) {
|
|
|
90
89
|
blocks: t.blocks || [],
|
|
91
90
|
messages: t.messages || []
|
|
92
91
|
}),
|
|
93
|
-
reset: () => e(
|
|
92
|
+
reset: () => e(Cn())
|
|
94
93
|
};
|
|
95
94
|
}
|
|
96
|
-
function
|
|
97
|
-
let t =
|
|
95
|
+
function Tn() {
|
|
96
|
+
let t = Cn();
|
|
98
97
|
return i()(r(e((e, n) => ({
|
|
99
98
|
...t,
|
|
100
|
-
...
|
|
99
|
+
...wn(e, n)
|
|
101
100
|
})), { name: "NotebookStore" }));
|
|
102
101
|
}
|
|
103
|
-
var
|
|
104
|
-
function
|
|
102
|
+
var En = xn(null);
|
|
103
|
+
function Dn({ children: e, initialConfig: t }) {
|
|
105
104
|
let n = K(null);
|
|
106
105
|
if (!n.current) {
|
|
107
|
-
let e =
|
|
106
|
+
let e = Tn();
|
|
108
107
|
t && e.getState().load(t), n.current = e;
|
|
109
108
|
}
|
|
110
|
-
return /* @__PURE__ */ Y(
|
|
109
|
+
return /* @__PURE__ */ Y(En.Provider, {
|
|
111
110
|
value: n.current,
|
|
112
111
|
children: e
|
|
113
112
|
});
|
|
114
113
|
}
|
|
115
114
|
function Z(e) {
|
|
116
|
-
let t =
|
|
115
|
+
let t = Sn(En);
|
|
117
116
|
if (!t) throw Error("useNotebookStore must be used within NotebookStoreProvider");
|
|
118
117
|
return n(t, e);
|
|
119
118
|
}
|
|
120
|
-
var
|
|
119
|
+
var On = (e) => e.blocks, kn = (e) => e.messages, An = (e) => e.isStreaming, jn = (e) => e.sessionId, Mn = (e) => e.inputValue, Nn = (e) => ({
|
|
121
120
|
messages: e.messages,
|
|
122
121
|
isStreaming: e.isStreaming,
|
|
123
122
|
inputValue: e.inputValue
|
|
124
|
-
}),
|
|
123
|
+
}), Pn = (e) => ({
|
|
125
124
|
addMessage: e.addMessage,
|
|
126
125
|
appendToLastAssistantMessage: e.appendToLastAssistantMessage,
|
|
127
126
|
setLastAssistantError: e.setLastAssistantError,
|
|
@@ -130,16 +129,16 @@ var kn = (e) => e.blocks, An = (e) => e.messages, jn = (e) => e.isStreaming, Mn
|
|
|
130
129
|
setIsStreaming: e.setIsStreaming,
|
|
131
130
|
setInputValue: e.setInputValue,
|
|
132
131
|
setSessionId: e.setSessionId
|
|
133
|
-
}),
|
|
132
|
+
}), Fn = (e) => ({
|
|
134
133
|
addBlock: e.addBlock,
|
|
135
134
|
removeBlock: e.removeBlock,
|
|
136
135
|
moveBlock: e.moveBlock,
|
|
137
136
|
updateBlock: e.updateBlock
|
|
138
|
-
}),
|
|
137
|
+
}), In = {
|
|
139
138
|
width: "16px",
|
|
140
139
|
height: "16px",
|
|
141
140
|
color: "currentColor"
|
|
142
|
-
},
|
|
141
|
+
}, Ln = a("chevronUp"), Rn = a("chevronDown"), zn = a("edit"), Bn = a("delete"), Vn = H.memo(function({ block: e, colorPalette: t, onRemove: n, onMoveUp: r, onMoveDown: i, onEdit: a, isFirst: o, isLast: s }) {
|
|
143
142
|
let [c, l] = q(null), u = U((e) => {
|
|
144
143
|
l(e);
|
|
145
144
|
}, []);
|
|
@@ -167,25 +166,25 @@ var kn = (e) => e.blocks, An = (e) => e.messages, jn = (e) => e.isStreaming, Mn
|
|
|
167
166
|
onClick: () => r(e.id),
|
|
168
167
|
className: "dc:p-1 dc:bg-transparent dc:border-none dc:rounded-sm text-dc-text-secondary dc:cursor-pointer dc:hover:bg-dc-surface-hover dc:transition-colors",
|
|
169
168
|
title: "Move up",
|
|
170
|
-
children: /* @__PURE__ */ Y(
|
|
169
|
+
children: /* @__PURE__ */ Y(Ln, { style: In })
|
|
171
170
|
}),
|
|
172
171
|
!s && /* @__PURE__ */ Y("button", {
|
|
173
172
|
onClick: () => i(e.id),
|
|
174
173
|
className: "dc:p-1 dc:bg-transparent dc:border-none dc:rounded-sm text-dc-text-secondary dc:cursor-pointer dc:hover:bg-dc-surface-hover dc:transition-colors",
|
|
175
174
|
title: "Move down",
|
|
176
|
-
children: /* @__PURE__ */ Y(
|
|
175
|
+
children: /* @__PURE__ */ Y(Rn, { style: In })
|
|
177
176
|
}),
|
|
178
177
|
/* @__PURE__ */ Y("button", {
|
|
179
178
|
onClick: () => a(e),
|
|
180
179
|
className: "dc:p-1 dc:bg-transparent dc:border-none dc:rounded-sm text-dc-text-secondary dc:cursor-pointer dc:hover:bg-dc-surface-hover dc:transition-colors",
|
|
181
180
|
title: "Edit visualization",
|
|
182
|
-
children: /* @__PURE__ */ Y(
|
|
181
|
+
children: /* @__PURE__ */ Y(zn, { style: In })
|
|
183
182
|
}),
|
|
184
183
|
/* @__PURE__ */ Y("button", {
|
|
185
184
|
onClick: () => n(e.id),
|
|
186
185
|
className: "dc:p-1 dc:mr-0.5 dc:bg-transparent dc:border-none dc:rounded-sm dc:cursor-pointer dc:hover:bg-dc-danger-bg text-dc-danger dc:transition-colors",
|
|
187
186
|
title: "Remove",
|
|
188
|
-
children: /* @__PURE__ */ Y(
|
|
187
|
+
children: /* @__PURE__ */ Y(Bn, { style: In })
|
|
189
188
|
})
|
|
190
189
|
]
|
|
191
190
|
})]
|
|
@@ -207,8 +206,8 @@ var kn = (e) => e.blocks, An = (e) => e.messages, jn = (e) => e.isStreaming, Mn
|
|
|
207
206
|
width: "16px",
|
|
208
207
|
height: "16px",
|
|
209
208
|
color: "currentColor"
|
|
210
|
-
},
|
|
211
|
-
function
|
|
209
|
+
}, Hn = a("documentText"), Un = a("chevronUp"), Wn = a("chevronDown"), Gn = a("delete");
|
|
210
|
+
function Kn({ children: e, ...t }) {
|
|
212
211
|
return /* @__PURE__ */ Y("div", {
|
|
213
212
|
className: "dc:overflow-x-auto dc:my-2",
|
|
214
213
|
children: /* @__PURE__ */ Y("table", {
|
|
@@ -217,7 +216,7 @@ function qn({ children: e, ...t }) {
|
|
|
217
216
|
})
|
|
218
217
|
});
|
|
219
218
|
}
|
|
220
|
-
var
|
|
219
|
+
var qn = { overrides: {
|
|
221
220
|
h1: { props: { className: "dc:text-lg dc:font-bold text-dc-text dc:mb-2 dc:mt-3" } },
|
|
222
221
|
h2: { props: { className: "dc:text-base dc:font-semibold text-dc-text dc:mb-2 dc:mt-3" } },
|
|
223
222
|
h3: { props: { className: "dc:text-sm dc:font-semibold text-dc-text dc:mb-2 dc:mt-3" } },
|
|
@@ -236,21 +235,21 @@ var Jn = { overrides: {
|
|
|
236
235
|
hr: { props: { className: "dc:my-3 border-dc-border" } },
|
|
237
236
|
blockquote: { props: { className: "dc:border-l-4 border-dc-accent dc:pl-3 dc:my-2 dc:italic text-dc-text-secondary dc:text-sm" } },
|
|
238
237
|
table: {
|
|
239
|
-
component:
|
|
238
|
+
component: Kn,
|
|
240
239
|
props: { className: "dc:w-full dc:border-collapse dc:text-sm" }
|
|
241
240
|
},
|
|
242
241
|
thead: { props: { className: "bg-dc-surface-secondary" } },
|
|
243
242
|
th: { props: { className: "dc:px-3 dc:py-2 dc:text-left dc:font-semibold dc:text-xs text-dc-text-secondary dc:uppercase dc:tracking-wider border-dc-border dc:border-b" } },
|
|
244
243
|
td: { props: { className: "dc:px-3 dc:py-2 dc:text-sm text-dc-text border-dc-border dc:border-b" } },
|
|
245
244
|
tr: { props: { className: "dc:hover:opacity-80" } }
|
|
246
|
-
} },
|
|
245
|
+
} }, Jn = H.memo(function({ block: e, onRemove: t, onMoveUp: n, onMoveDown: r, isFirst: i, isLast: a }) {
|
|
247
246
|
return /* @__PURE__ */ X("div", {
|
|
248
247
|
className: "dc:relative dc:mb-4 bg-dc-surface dc:border border-dc-border dc:rounded-lg dc:flex dc:flex-col",
|
|
249
248
|
children: [/* @__PURE__ */ X("div", {
|
|
250
249
|
className: "dc:flex dc:items-center dc:justify-between dc:px-3 dc:py-1.5 dc:border-b border-dc-border dc:shrink-0 bg-dc-surface-secondary dc:rounded-t-lg",
|
|
251
250
|
children: [/* @__PURE__ */ X("div", {
|
|
252
251
|
className: "dc:flex dc:items-center dc:gap-2 dc:flex-1 dc:min-w-0",
|
|
253
|
-
children: [/* @__PURE__ */ Y(
|
|
252
|
+
children: [/* @__PURE__ */ Y(Hn, { style: Q }), /* @__PURE__ */ Y("h3", {
|
|
254
253
|
className: "dc:font-semibold dc:text-sm text-dc-text dc:truncate",
|
|
255
254
|
children: e.title || "Markdown"
|
|
256
255
|
})]
|
|
@@ -261,32 +260,32 @@ var Jn = { overrides: {
|
|
|
261
260
|
onClick: () => n(e.id),
|
|
262
261
|
className: "dc:p-1 dc:bg-transparent dc:border-none dc:rounded-sm text-dc-text-secondary dc:cursor-pointer dc:hover:bg-dc-surface-hover dc:transition-colors",
|
|
263
262
|
title: "Move up",
|
|
264
|
-
children: /* @__PURE__ */ Y(
|
|
263
|
+
children: /* @__PURE__ */ Y(Un, { style: Q })
|
|
265
264
|
}),
|
|
266
265
|
!a && /* @__PURE__ */ Y("button", {
|
|
267
266
|
onClick: () => r(e.id),
|
|
268
267
|
className: "dc:p-1 dc:bg-transparent dc:border-none dc:rounded-sm text-dc-text-secondary dc:cursor-pointer dc:hover:bg-dc-surface-hover dc:transition-colors",
|
|
269
268
|
title: "Move down",
|
|
270
|
-
children: /* @__PURE__ */ Y(
|
|
269
|
+
children: /* @__PURE__ */ Y(Wn, { style: Q })
|
|
271
270
|
}),
|
|
272
271
|
/* @__PURE__ */ Y("button", {
|
|
273
272
|
onClick: () => t(e.id),
|
|
274
273
|
className: "dc:p-1 dc:mr-0.5 dc:bg-transparent dc:border-none dc:rounded-sm dc:cursor-pointer dc:hover:bg-dc-danger-bg text-dc-danger dc:transition-colors",
|
|
275
274
|
title: "Remove",
|
|
276
|
-
children: /* @__PURE__ */ Y(
|
|
275
|
+
children: /* @__PURE__ */ Y(Gn, { style: Q })
|
|
277
276
|
})
|
|
278
277
|
]
|
|
279
278
|
})]
|
|
280
279
|
}), /* @__PURE__ */ Y("div", {
|
|
281
280
|
className: "dc:p-4 dc:min-w-0 dc:overflow-hidden",
|
|
282
281
|
children: /* @__PURE__ */ Y(gn, {
|
|
283
|
-
options:
|
|
282
|
+
options: qn,
|
|
284
283
|
children: e.content
|
|
285
284
|
})
|
|
286
285
|
})]
|
|
287
286
|
});
|
|
288
|
-
}),
|
|
289
|
-
let n = e ?? kt(), r = Z(
|
|
287
|
+
}), Yn = H.memo(function({ colorPalette: e }) {
|
|
288
|
+
let n = e ?? kt(), r = Z(On), { removeBlock: i, moveBlock: a, updateBlock: o } = Z(t(Fn)), s = K(null), [c, l] = q(null), u = K(r.length);
|
|
290
289
|
W(() => {
|
|
291
290
|
r.length > u.current && s.current?.scrollIntoView({ behavior: "smooth" }), u.current = r.length;
|
|
292
291
|
}, [r.length]);
|
|
@@ -322,7 +321,7 @@ var Jn = { overrides: {
|
|
|
322
321
|
children: [
|
|
323
322
|
r.map((e, t) => {
|
|
324
323
|
let i = t === 0, a = t === r.length - 1;
|
|
325
|
-
return e.type === "portlet" ? /* @__PURE__ */ Y(
|
|
324
|
+
return e.type === "portlet" ? /* @__PURE__ */ Y(Vn, {
|
|
326
325
|
block: e,
|
|
327
326
|
colorPalette: n,
|
|
328
327
|
onRemove: d,
|
|
@@ -331,7 +330,7 @@ var Jn = { overrides: {
|
|
|
331
330
|
onEdit: m,
|
|
332
331
|
isFirst: i,
|
|
333
332
|
isLast: a
|
|
334
|
-
}, e.id) : e.type === "markdown" ? /* @__PURE__ */ Y(
|
|
333
|
+
}, e.id) : e.type === "markdown" ? /* @__PURE__ */ Y(Jn, {
|
|
335
334
|
block: e,
|
|
336
335
|
onRemove: d,
|
|
337
336
|
onMoveUp: f,
|
|
@@ -366,7 +365,7 @@ var Jn = { overrides: {
|
|
|
366
365
|
});
|
|
367
366
|
//#endregion
|
|
368
367
|
//#region src/client/hooks/useAgentChat.ts
|
|
369
|
-
function
|
|
368
|
+
function Xn(e) {
|
|
370
369
|
if (e.startsWith("{") || e.includes("\"type\":\"error\"")) try {
|
|
371
370
|
let t = JSON.parse(e.replace(/^Error:\s*/, ""));
|
|
372
371
|
return {
|
|
@@ -384,7 +383,7 @@ function Zn(e) {
|
|
|
384
383
|
}
|
|
385
384
|
return e;
|
|
386
385
|
}
|
|
387
|
-
function
|
|
386
|
+
function Zn(e) {
|
|
388
387
|
let { agentEndpoint: t, agentApiKey: n, agentProvider: r, agentModel: i, agentProviderEndpoint: a } = e, { cubeApi: o } = p(), s = K(null), [c, l] = q(!1), u = K(e);
|
|
389
388
|
return u.current = e, {
|
|
390
389
|
sendMessage: U(async (e, c, d) => {
|
|
@@ -474,7 +473,7 @@ function Qn(e) {
|
|
|
474
473
|
} catch (e) {
|
|
475
474
|
if (e.name !== "AbortError") {
|
|
476
475
|
let t = e instanceof Error ? e.message : "Stream failed";
|
|
477
|
-
u.current.onError(
|
|
476
|
+
u.current.onError(Xn(t));
|
|
478
477
|
}
|
|
479
478
|
} finally {
|
|
480
479
|
l(!1), s.current = null;
|
|
@@ -495,7 +494,7 @@ function Qn(e) {
|
|
|
495
494
|
}
|
|
496
495
|
//#endregion
|
|
497
496
|
//#region src/client/components/AgenticNotebook/ChatMessage.tsx
|
|
498
|
-
function
|
|
497
|
+
function Qn(e) {
|
|
499
498
|
let t = [], n = e, r = 0;
|
|
500
499
|
for (; n;) {
|
|
501
500
|
let e = n.match(/^(.*?)`([^`]+)`(.*)$/);
|
|
@@ -521,15 +520,15 @@ function $n(e) {
|
|
|
521
520
|
}
|
|
522
521
|
return t;
|
|
523
522
|
}
|
|
524
|
-
var
|
|
523
|
+
var $n = {
|
|
525
524
|
discover_cubes: "Discovering cubes",
|
|
526
525
|
get_cube_metadata: "Reading metadata",
|
|
527
526
|
execute_query: "Executing query",
|
|
528
527
|
add_portlet: "Adding visualization",
|
|
529
528
|
add_markdown: "Adding explanation"
|
|
530
529
|
};
|
|
531
|
-
function
|
|
532
|
-
let [n, r] = q(!1), i =
|
|
530
|
+
function er({ toolCall: e, loadingComponent: t }) {
|
|
531
|
+
let [n, r] = q(!1), i = $n[e.name] || e.name, a = e.status === "running";
|
|
533
532
|
return /* @__PURE__ */ X("div", {
|
|
534
533
|
className: "dc:my-1 dc:text-xs",
|
|
535
534
|
children: [/* @__PURE__ */ X("button", {
|
|
@@ -555,17 +554,17 @@ function tr({ toolCall: e, loadingComponent: t }) {
|
|
|
555
554
|
})]
|
|
556
555
|
});
|
|
557
556
|
}
|
|
558
|
-
var
|
|
557
|
+
var tr = { animation: "dc-msg-in 100ms ease-out" }, nr = H.memo(function({ message: e, loadingComponent: t }) {
|
|
559
558
|
let n = e.role === "user", r = !!e.content?.trim(), i = !!e.error, a = e.toolCalls && e.toolCalls.length > 0;
|
|
560
559
|
return !n && !r && !i && !a ? null : /* @__PURE__ */ Y("div", {
|
|
561
560
|
className: `dc:flex dc:mb-3 ${n ? "dc:justify-end" : "dc:justify-start"}`,
|
|
562
|
-
style:
|
|
561
|
+
style: tr,
|
|
563
562
|
children: /* @__PURE__ */ X("div", {
|
|
564
563
|
className: `dc:max-w-[85%] dc:rounded-lg dc:px-3 dc:py-2 dc:text-sm ${n ? "bg-dc-accent text-dc-accent-text dc:rounded-br-sm" : i && !r ? "bg-dc-warning-bg text-dc-text dc:rounded-bl-sm" : "bg-dc-surface-secondary text-dc-text dc:rounded-bl-sm"}`,
|
|
565
564
|
children: [
|
|
566
565
|
r && /* @__PURE__ */ Y("div", {
|
|
567
566
|
className: "dc:whitespace-pre-wrap dc:break-words",
|
|
568
|
-
children: n ? e.content :
|
|
567
|
+
children: n ? e.content : Qn(e.content)
|
|
569
568
|
}),
|
|
570
569
|
i && /* @__PURE__ */ X("div", {
|
|
571
570
|
className: `dc:flex dc:items-start dc:gap-2 ${r ? "dc:mt-2 dc:pt-2 dc:border-t dc:border-current dc:border-opacity-10" : ""}`,
|
|
@@ -579,7 +578,7 @@ var nr = { animation: "dc-msg-in 100ms ease-out" }, rr = H.memo(function({ messa
|
|
|
579
578
|
}),
|
|
580
579
|
a && /* @__PURE__ */ Y("div", {
|
|
581
580
|
className: r || i ? "dc:mt-1 dc:border-t dc:border-current dc:border-opacity-10 dc:pt-1" : "",
|
|
582
|
-
children: e.toolCalls.map((e, n) => /* @__PURE__ */ Y(
|
|
581
|
+
children: e.toolCalls.map((e, n) => /* @__PURE__ */ Y(er, {
|
|
583
582
|
toolCall: e,
|
|
584
583
|
loadingComponent: t
|
|
585
584
|
}, e.id || n))
|
|
@@ -587,7 +586,7 @@ var nr = { animation: "dc-msg-in 100ms ease-out" }, rr = H.memo(function({ messa
|
|
|
587
586
|
]
|
|
588
587
|
})
|
|
589
588
|
});
|
|
590
|
-
}),
|
|
589
|
+
}), rr = H.memo(function({ value: e, onChange: t, onSend: n, onStop: r, onContinue: i, isStreaming: a = !1, showContinue: o = !1, disabled: s = !1, placeholder: c = "Ask about your data..." }) {
|
|
591
590
|
let l = K(null);
|
|
592
591
|
return W(() => {
|
|
593
592
|
let e = l.current;
|
|
@@ -626,8 +625,8 @@ var nr = { animation: "dc-msg-in 100ms ease-out" }, rr = H.memo(function({ messa
|
|
|
626
625
|
children: "Send"
|
|
627
626
|
})] })]
|
|
628
627
|
});
|
|
629
|
-
}),
|
|
630
|
-
let d = K(null), f = K(!1), [p, m] = q(null), [h, g] = q(/* @__PURE__ */ new Set()), [_, v] = q(!1), y = K(!1), { messages: b, isStreaming: x, inputValue: S } = Z(t(
|
|
628
|
+
}), ir = a("thumbUp"), ar = a("thumbDown"), or = H.memo(function({ agentEndpoint: e, agentApiKey: n, agentProvider: r, agentModel: i, agentProviderEndpoint: a, onClear: o, onDashboardSaved: s, onScore: c, loadingComponent: l, initialPrompt: u }) {
|
|
629
|
+
let d = K(null), f = K(!1), [p, m] = q(null), [h, g] = q(/* @__PURE__ */ new Set()), [_, v] = q(!1), y = K(!1), { messages: b, isStreaming: x, inputValue: S } = Z(t(Nn)), { addMessage: C, appendToLastAssistantMessage: w, setLastAssistantError: T, addToolCallToLastAssistant: E, updateLastToolCall: D, setIsStreaming: O, setInputValue: k, setSessionId: A } = Z(t(Pn)), j = Z((e) => e.sessionId), M = Z((e) => e.addBlock), N = Z((e) => e.reset), ee = Z((e) => e.blocks.filter((e) => e.type === "portlet").length), P = K(b);
|
|
631
630
|
P.current = b;
|
|
632
631
|
let F = K(x);
|
|
633
632
|
F.current = x;
|
|
@@ -647,7 +646,7 @@ var nr = { animation: "dc-msg-in 100ms ease-out" }, rr = H.memo(function({ messa
|
|
|
647
646
|
}, [b]), W(() => {
|
|
648
647
|
_ && d.current?.scrollIntoView({ behavior: "smooth" });
|
|
649
648
|
}, [_]);
|
|
650
|
-
let { sendMessage: R, abort: z } =
|
|
649
|
+
let { sendMessage: R, abort: z } = Zn({
|
|
651
650
|
agentEndpoint: e,
|
|
652
651
|
agentApiKey: n,
|
|
653
652
|
agentProvider: r,
|
|
@@ -780,11 +779,11 @@ var nr = { animation: "dc-msg-in 100ms ease-out" }, rr = H.memo(function({ messa
|
|
|
780
779
|
/* @__PURE__ */ X("div", {
|
|
781
780
|
className: "dc:flex-1 dc:overflow-y-auto dc:px-4 dc:py-3",
|
|
782
781
|
children: [
|
|
783
|
-
b.length === 0 ? /* @__PURE__ */ Y(
|
|
782
|
+
b.length === 0 ? /* @__PURE__ */ Y(cr, {}) : b.map((e) => /* @__PURE__ */ Y(nr, {
|
|
784
783
|
message: e,
|
|
785
784
|
loadingComponent: l
|
|
786
785
|
}, e.id)),
|
|
787
|
-
_ && /* @__PURE__ */ Y(
|
|
786
|
+
_ && /* @__PURE__ */ Y(sr, { loadingComponent: l }),
|
|
788
787
|
(ue || de) && /* @__PURE__ */ Y("div", {
|
|
789
788
|
className: "dc:flex dc:items-center dc:justify-center dc:gap-3 dc:py-4 dc:mt-2",
|
|
790
789
|
children: de ? /* @__PURE__ */ Y("span", {
|
|
@@ -798,18 +797,18 @@ var nr = { animation: "dc-msg-in 100ms ease-out" }, rr = H.memo(function({ messa
|
|
|
798
797
|
children: [/* @__PURE__ */ X("button", {
|
|
799
798
|
onClick: () => ce(1),
|
|
800
799
|
className: "dc:flex dc:items-center dc:gap-1.5 dc:px-3 dc:py-1.5 dc:rounded-lg dc:text-sm dc:font-medium border-dc-border dc:border text-dc-success hover:bg-dc-success-bg dc:transition-colors bg-dc-surface dc:cursor-pointer",
|
|
801
|
-
children: [/* @__PURE__ */ Y(
|
|
800
|
+
children: [/* @__PURE__ */ Y(ir, { className: "dc:w-4 dc:h-4" }), "Yes"]
|
|
802
801
|
}), /* @__PURE__ */ X("button", {
|
|
803
802
|
onClick: () => ce(0),
|
|
804
803
|
className: "dc:flex dc:items-center dc:gap-1.5 dc:px-3 dc:py-1.5 dc:rounded-lg dc:text-sm dc:font-medium border-dc-border dc:border text-dc-error hover:bg-dc-danger-bg dc:transition-colors bg-dc-surface dc:cursor-pointer",
|
|
805
|
-
children: [/* @__PURE__ */ Y(
|
|
804
|
+
children: [/* @__PURE__ */ Y(ar, { className: "dc:w-4 dc:h-4" }), "No"]
|
|
806
805
|
})]
|
|
807
806
|
})] })
|
|
808
807
|
}),
|
|
809
808
|
/* @__PURE__ */ Y("div", { ref: d })
|
|
810
809
|
]
|
|
811
810
|
}),
|
|
812
|
-
/* @__PURE__ */ Y(
|
|
811
|
+
/* @__PURE__ */ Y(rr, {
|
|
813
812
|
value: S,
|
|
814
813
|
onChange: k,
|
|
815
814
|
onSend: re,
|
|
@@ -821,7 +820,7 @@ var nr = { animation: "dc-msg-in 100ms ease-out" }, rr = H.memo(function({ messa
|
|
|
821
820
|
]
|
|
822
821
|
});
|
|
823
822
|
});
|
|
824
|
-
function
|
|
823
|
+
function sr({ loadingComponent: e }) {
|
|
825
824
|
return /* @__PURE__ */ Y("div", {
|
|
826
825
|
className: "dc:flex dc:mb-3 dc:justify-start",
|
|
827
826
|
style: { animation: "dc-msg-in 100ms ease-out" },
|
|
@@ -834,7 +833,7 @@ function cr({ loadingComponent: e }) {
|
|
|
834
833
|
})
|
|
835
834
|
});
|
|
836
835
|
}
|
|
837
|
-
function
|
|
836
|
+
function cr() {
|
|
838
837
|
return /* @__PURE__ */ Y("div", {
|
|
839
838
|
className: "dc:flex dc:items-center dc:justify-center dc:h-full",
|
|
840
839
|
children: /* @__PURE__ */ X("div", {
|
|
@@ -862,7 +861,7 @@ function lr() {
|
|
|
862
861
|
}
|
|
863
862
|
//#endregion
|
|
864
863
|
//#region src/client/components/AgenticNotebook/index.tsx
|
|
865
|
-
function
|
|
864
|
+
function lr({ blocks: e, pulsingBlockId: t, nudge: n, onExpand: r }) {
|
|
866
865
|
let i = a("bookOpen"), o = a("documentText");
|
|
867
866
|
return /* @__PURE__ */ X("button", {
|
|
868
867
|
type: "button",
|
|
@@ -892,7 +891,7 @@ function ur({ blocks: e, pulsingBlockId: t, nudge: n, onExpand: r }) {
|
|
|
892
891
|
})]
|
|
893
892
|
});
|
|
894
893
|
}
|
|
895
|
-
function
|
|
894
|
+
function ur({ onExpand: e }) {
|
|
896
895
|
return /* @__PURE__ */ X("button", {
|
|
897
896
|
type: "button",
|
|
898
897
|
onClick: e,
|
|
@@ -905,7 +904,7 @@ function dr({ onExpand: e }) {
|
|
|
905
904
|
})]
|
|
906
905
|
});
|
|
907
906
|
}
|
|
908
|
-
function
|
|
907
|
+
function dr({ agentEndpoint: e, agentApiKey: t, agentProvider: n, agentModel: r, agentProviderEndpoint: i, onSave: a, onDirtyStateChange: o, onDashboardSaved: s, onScore: c, colorPalette: l, loadingComponent: u, className: d, initialPrompt: f }) {
|
|
909
908
|
let [p, m] = q(60), h = K(null), g = K(!1), { containerRef: _, layoutMode: v } = _n(), [y, b] = q("chat"), [x, S] = q(null), [C, w] = q(!1), T = K(v), E = Z((e) => e.blocks), D = E.length, O = Z((e) => e.messages.length), k = Z((e) => e.isStreaming), A = Z((e) => e.save);
|
|
910
909
|
W(() => {
|
|
911
910
|
T.current === "narrow" && v === "wide" && b("chat"), T.current = v;
|
|
@@ -998,7 +997,7 @@ function fr({ agentEndpoint: e, agentApiKey: t, agentProvider: n, agentModel: r,
|
|
|
998
997
|
g.current = !1, document.removeEventListener("mousemove", t), document.removeEventListener("mouseup", n);
|
|
999
998
|
};
|
|
1000
999
|
document.addEventListener("mousemove", t), document.addEventListener("mouseup", n);
|
|
1001
|
-
}, []), z = /* @__PURE__ */ Y(
|
|
1000
|
+
}, []), z = /* @__PURE__ */ Y(or, {
|
|
1002
1001
|
agentEndpoint: e,
|
|
1003
1002
|
agentApiKey: t,
|
|
1004
1003
|
agentProvider: n,
|
|
@@ -1013,7 +1012,7 @@ function fr({ agentEndpoint: e, agentApiKey: t, agentProvider: n, agentModel: r,
|
|
|
1013
1012
|
return v === "narrow" ? /* @__PURE__ */ Y("div", {
|
|
1014
1013
|
ref: N,
|
|
1015
1014
|
className: `dc:flex dc:h-full dc:w-full dc:overflow-hidden bg-dc-surface-secondary ${d || ""}`,
|
|
1016
|
-
children: y === "chat" ? /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(
|
|
1015
|
+
children: y === "chat" ? /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y(lr, {
|
|
1017
1016
|
blocks: E,
|
|
1018
1017
|
pulsingBlockId: x,
|
|
1019
1018
|
nudge: C,
|
|
@@ -1023,8 +1022,8 @@ function fr({ agentEndpoint: e, agentApiKey: t, agentProvider: n, agentModel: r,
|
|
|
1023
1022
|
children: z
|
|
1024
1023
|
})] }) : /* @__PURE__ */ X(J, { children: [/* @__PURE__ */ Y("div", {
|
|
1025
1024
|
className: "dc:h-full dc:overflow-hidden dc:flex-1",
|
|
1026
|
-
children: /* @__PURE__ */ Y(
|
|
1027
|
-
}), /* @__PURE__ */ Y(
|
|
1025
|
+
children: /* @__PURE__ */ Y(Yn, { colorPalette: l })
|
|
1026
|
+
}), /* @__PURE__ */ Y(ur, { onExpand: () => b("chat") })] })
|
|
1028
1027
|
}) : /* @__PURE__ */ X("div", {
|
|
1029
1028
|
ref: N,
|
|
1030
1029
|
className: `dc:flex dc:h-full dc:w-full dc:overflow-hidden bg-dc-surface-secondary ${d || ""}`,
|
|
@@ -1032,7 +1031,7 @@ function fr({ agentEndpoint: e, agentApiKey: t, agentProvider: n, agentModel: r,
|
|
|
1032
1031
|
/* @__PURE__ */ Y("div", {
|
|
1033
1032
|
className: "dc:h-full dc:overflow-hidden",
|
|
1034
1033
|
style: { width: `${p}%` },
|
|
1035
|
-
children: /* @__PURE__ */ Y(
|
|
1034
|
+
children: /* @__PURE__ */ Y(Yn, { colorPalette: l })
|
|
1036
1035
|
}),
|
|
1037
1036
|
/* @__PURE__ */ Y("div", {
|
|
1038
1037
|
className: "dc:w-1 dc:h-full dc:cursor-col-resize dc:flex-shrink-0 dc:transition-colors bg-dc-border dc:hover:bg-dc-accent",
|
|
@@ -1046,10 +1045,10 @@ function fr({ agentEndpoint: e, agentApiKey: t, agentProvider: n, agentModel: r,
|
|
|
1046
1045
|
]
|
|
1047
1046
|
});
|
|
1048
1047
|
}
|
|
1049
|
-
var
|
|
1050
|
-
return /* @__PURE__ */ Y(
|
|
1048
|
+
var fr = H.memo(function({ config: e, colorPalette: t, ...n }) {
|
|
1049
|
+
return /* @__PURE__ */ Y(Dn, {
|
|
1051
1050
|
initialConfig: e,
|
|
1052
|
-
children: /* @__PURE__ */ Y(
|
|
1051
|
+
children: /* @__PURE__ */ Y(dr, {
|
|
1053
1052
|
...n,
|
|
1054
1053
|
colorPalette: t
|
|
1055
1054
|
})
|
|
@@ -1057,27 +1056,27 @@ var pr = H.memo(function({ config: e, colorPalette: t, ...n }) {
|
|
|
1057
1056
|
});
|
|
1058
1057
|
//#endregion
|
|
1059
1058
|
//#region src/client/components/AnalyticsPage.tsx
|
|
1060
|
-
function
|
|
1059
|
+
function pr() {
|
|
1061
1060
|
return /* @__PURE__ */ Y("div", { children: "Analytics Page - Coming in Phase 4" });
|
|
1062
1061
|
}
|
|
1063
1062
|
//#endregion
|
|
1064
1063
|
//#region src/client/stores/dataBrowserStore.tsx
|
|
1065
|
-
var
|
|
1066
|
-
function
|
|
1064
|
+
var mr = "dc-data-browser-column-widths";
|
|
1065
|
+
function hr(e) {
|
|
1067
1066
|
try {
|
|
1068
|
-
let t = localStorage.getItem(
|
|
1067
|
+
let t = localStorage.getItem(mr);
|
|
1069
1068
|
return t ? JSON.parse(t)[e] ?? {} : {};
|
|
1070
1069
|
} catch {
|
|
1071
1070
|
return {};
|
|
1072
1071
|
}
|
|
1073
1072
|
}
|
|
1074
|
-
function
|
|
1073
|
+
function gr(e, t) {
|
|
1075
1074
|
try {
|
|
1076
|
-
let n = localStorage.getItem(
|
|
1077
|
-
r[e] = t, localStorage.setItem(
|
|
1075
|
+
let n = localStorage.getItem(mr), r = n ? JSON.parse(n) : {};
|
|
1076
|
+
r[e] = t, localStorage.setItem(mr, JSON.stringify(r));
|
|
1078
1077
|
} catch {}
|
|
1079
1078
|
}
|
|
1080
|
-
function
|
|
1079
|
+
function _r(e = {}) {
|
|
1081
1080
|
return i()((t, n) => ({
|
|
1082
1081
|
selectedCube: e.defaultCube ?? null,
|
|
1083
1082
|
visibleColumns: e.defaultColumns ?? [],
|
|
@@ -1088,7 +1087,7 @@ function vr(e = {}) {
|
|
|
1088
1087
|
filters: [],
|
|
1089
1088
|
showFilterBar: !1,
|
|
1090
1089
|
showColumnPicker: !1,
|
|
1091
|
-
columnWidths: e.defaultCube ?
|
|
1090
|
+
columnWidths: e.defaultCube ? hr(e.defaultCube) : {},
|
|
1092
1091
|
selectCube: (e, n) => t({
|
|
1093
1092
|
selectedCube: e,
|
|
1094
1093
|
visibleColumns: n,
|
|
@@ -1097,7 +1096,7 @@ function vr(e = {}) {
|
|
|
1097
1096
|
page: 0,
|
|
1098
1097
|
filters: [],
|
|
1099
1098
|
showFilterBar: !1,
|
|
1100
|
-
columnWidths:
|
|
1099
|
+
columnWidths: hr(e)
|
|
1101
1100
|
}),
|
|
1102
1101
|
setVisibleColumns: (e) => t({
|
|
1103
1102
|
visibleColumns: e,
|
|
@@ -1144,39 +1143,39 @@ function vr(e = {}) {
|
|
|
1144
1143
|
...t.columnWidths,
|
|
1145
1144
|
[e]: n
|
|
1146
1145
|
};
|
|
1147
|
-
return t.selectedCube &&
|
|
1146
|
+
return t.selectedCube && gr(t.selectedCube, r), { columnWidths: r };
|
|
1148
1147
|
}),
|
|
1149
1148
|
setColumnWidths: (e) => {
|
|
1150
1149
|
let r = n().selectedCube;
|
|
1151
|
-
r &&
|
|
1150
|
+
r && gr(r, e), t({ columnWidths: e });
|
|
1152
1151
|
}
|
|
1153
1152
|
}));
|
|
1154
1153
|
}
|
|
1155
|
-
var
|
|
1156
|
-
function
|
|
1154
|
+
var vr = xn(null);
|
|
1155
|
+
function yr({ children: e, defaultPageSize: t, defaultCube: n, defaultColumns: r }) {
|
|
1157
1156
|
let i = K(null);
|
|
1158
|
-
return i.current ||=
|
|
1157
|
+
return i.current ||= _r({
|
|
1159
1158
|
defaultPageSize: t,
|
|
1160
1159
|
defaultCube: n,
|
|
1161
1160
|
defaultColumns: r
|
|
1162
|
-
}), /* @__PURE__ */ Y(
|
|
1161
|
+
}), /* @__PURE__ */ Y(vr.Provider, {
|
|
1163
1162
|
value: i.current,
|
|
1164
1163
|
children: e
|
|
1165
1164
|
});
|
|
1166
1165
|
}
|
|
1167
1166
|
function $(e) {
|
|
1168
|
-
let t =
|
|
1167
|
+
let t = Sn(vr);
|
|
1169
1168
|
if (!t) throw Error("useDataBrowserStore must be used within DataBrowserStoreProvider");
|
|
1170
1169
|
return n(t, e);
|
|
1171
1170
|
}
|
|
1172
1171
|
//#endregion
|
|
1173
1172
|
//#region src/client/hooks/useDataBrowser.ts
|
|
1174
|
-
function
|
|
1173
|
+
function br(e, t) {
|
|
1175
1174
|
if (!t) return !0;
|
|
1176
1175
|
let [n, r] = e.split("."), i = t.cubes.find((e) => e.name === n);
|
|
1177
1176
|
return i ? i.dimensions.some((e) => e.name === `${n}.${r}`) : !0;
|
|
1178
1177
|
}
|
|
1179
|
-
function
|
|
1178
|
+
function xr(e, t) {
|
|
1180
1179
|
if (!t) return "string";
|
|
1181
1180
|
let [n] = e.split("."), r = t.cubes.find((e) => e.name === n);
|
|
1182
1181
|
if (!r) return "string";
|
|
@@ -1185,7 +1184,7 @@ function Sr(e, t) {
|
|
|
1185
1184
|
let a = r.measures.find((t) => t.name === e);
|
|
1186
1185
|
return a ? a.type : "string";
|
|
1187
1186
|
}
|
|
1188
|
-
function
|
|
1187
|
+
function Sr(e, t) {
|
|
1189
1188
|
if (!t) return {
|
|
1190
1189
|
dimensions: [],
|
|
1191
1190
|
measures: []
|
|
@@ -1207,7 +1206,7 @@ function Cr(e, t) {
|
|
|
1207
1206
|
measures: n.measures.filter((e) => r.has(e.type)).map((e) => e.name)
|
|
1208
1207
|
};
|
|
1209
1208
|
}
|
|
1210
|
-
function
|
|
1209
|
+
function Cr() {
|
|
1211
1210
|
let e = $((e) => e.selectedCube), n = $((e) => e.visibleColumns), r = $((e) => e.sortColumn), i = $((e) => e.sortDirection), a = $((e) => e.page), o = $((e) => e.pageSize), s = $((e) => e.filters), c = $((e) => e.showFilterBar), l = $((e) => e.showColumnPicker), u = $(t((e) => ({
|
|
1212
1211
|
selectCube: e.selectCube,
|
|
1213
1212
|
setVisibleColumns: e.setVisibleColumns,
|
|
@@ -1227,7 +1226,7 @@ function wr() {
|
|
|
1227
1226
|
return n ? n.name : t.dimensions.length > 0 ? t.dimensions[0].name : null;
|
|
1228
1227
|
}, [d, e]), m = r ?? p, h = r ? i : "asc", g = G(() => {
|
|
1229
1228
|
if (!e || n.length === 0) return null;
|
|
1230
|
-
let t = n.filter((e) =>
|
|
1229
|
+
let t = n.filter((e) => br(e, d)), r = n.filter((e) => !br(e, d));
|
|
1231
1230
|
if (t.length === 0) return null;
|
|
1232
1231
|
let i = {
|
|
1233
1232
|
dimensions: t,
|
|
@@ -1281,8 +1280,8 @@ function wr() {
|
|
|
1281
1280
|
}
|
|
1282
1281
|
//#endregion
|
|
1283
1282
|
//#region src/client/components/DataBrowser/DataBrowserSidebar.tsx
|
|
1284
|
-
var
|
|
1285
|
-
function
|
|
1283
|
+
var wr = a("search"), Tr = a("cube");
|
|
1284
|
+
function Er({ cubes: e, selectedCube: t, onSelectCube: n }) {
|
|
1286
1285
|
let [r, i] = q(""), a = G(() => {
|
|
1287
1286
|
let t = [...e].sort((e, t) => (e.title || e.name).localeCompare(t.title || t.name));
|
|
1288
1287
|
if (!r) return t;
|
|
@@ -1298,7 +1297,7 @@ function Dr({ cubes: e, selectedCube: t, onSelectCube: n }) {
|
|
|
1298
1297
|
children: "Cubes"
|
|
1299
1298
|
}), /* @__PURE__ */ X("div", {
|
|
1300
1299
|
className: "dc:relative",
|
|
1301
|
-
children: [/* @__PURE__ */ Y(
|
|
1300
|
+
children: [/* @__PURE__ */ Y(wr, { className: "dc:absolute dc:left-2 dc:top-1/2 dc:-translate-y-1/2 dc:w-3.5 dc:h-3.5 text-dc-text-muted" }), /* @__PURE__ */ Y("input", {
|
|
1302
1301
|
type: "text",
|
|
1303
1302
|
value: r,
|
|
1304
1303
|
onChange: (e) => i(e.target.value),
|
|
@@ -1311,7 +1310,7 @@ function Dr({ cubes: e, selectedCube: t, onSelectCube: n }) {
|
|
|
1311
1310
|
children: [a.map((e) => /* @__PURE__ */ X("button", {
|
|
1312
1311
|
onClick: () => n(e.name),
|
|
1313
1312
|
className: `dc:flex dc:items-center dc:gap-2 dc:w-full dc:px-3 dc:py-1.5 dc:text-left dc:text-sm dc:transition-colors ${t === e.name ? "bg-dc-accent-bg text-dc-accent dc:font-medium" : "text-dc-text dc:hover:bg-dc-surface-hover"}`,
|
|
1314
|
-
children: [/* @__PURE__ */ Y(
|
|
1313
|
+
children: [/* @__PURE__ */ Y(Tr, { className: "dc:w-4 dc:h-4 dc:shrink-0 text-dc-text-muted" }), /* @__PURE__ */ Y("span", {
|
|
1315
1314
|
className: "dc:truncate",
|
|
1316
1315
|
children: e.title || e.name
|
|
1317
1316
|
})]
|
|
@@ -1324,8 +1323,8 @@ function Dr({ cubes: e, selectedCube: t, onSelectCube: n }) {
|
|
|
1324
1323
|
}
|
|
1325
1324
|
//#endregion
|
|
1326
1325
|
//#region src/client/components/DataBrowser/DataBrowserToolbar.tsx
|
|
1327
|
-
var
|
|
1328
|
-
function
|
|
1326
|
+
var Dr = a("filter"), Or = a("settings"), kr = a("chevronLeft"), Ar = a("chevronRight"), jr = a("refresh");
|
|
1327
|
+
function Mr({ showFilterBar: e, filterCount: t, onToggleFilterBar: n, onToggleColumnPicker: r, page: i, pageSize: a, rowCount: o, hasNextPage: s, hasPrevPage: c, onPageChange: l, onPageSizeChange: u, isFetching: d, onRefresh: f }) {
|
|
1329
1328
|
return /* @__PURE__ */ X("div", {
|
|
1330
1329
|
className: "dc:flex dc:items-center dc:gap-2 dc:px-3 dc:py-2 dc:border-b border-dc-border bg-dc-surface-secondary",
|
|
1331
1330
|
children: [
|
|
@@ -1333,7 +1332,7 @@ function Nr({ showFilterBar: e, filterCount: t, onToggleFilterBar: n, onToggleCo
|
|
|
1333
1332
|
onClick: n,
|
|
1334
1333
|
className: `dc:flex dc:items-center dc:gap-1.5 dc:px-2.5 dc:py-1.5 dc:text-xs dc:font-medium dc:rounded dc:border dc:transition-colors ${e ? "border-dc-accent bg-dc-accent-bg text-dc-accent" : "border-dc-border bg-dc-surface text-dc-text dc:hover:bg-dc-surface-hover"}`,
|
|
1335
1334
|
children: [
|
|
1336
|
-
/* @__PURE__ */ Y(
|
|
1335
|
+
/* @__PURE__ */ Y(Dr, { className: "dc:w-3.5 dc:h-3.5" }),
|
|
1337
1336
|
"Filters",
|
|
1338
1337
|
t > 0 && /* @__PURE__ */ Y("span", {
|
|
1339
1338
|
className: "dc:inline-flex dc:items-center dc:justify-center dc:w-4 dc:h-4 dc:text-[10px] dc:font-bold dc:rounded-full bg-dc-accent text-dc-surface",
|
|
@@ -1344,7 +1343,7 @@ function Nr({ showFilterBar: e, filterCount: t, onToggleFilterBar: n, onToggleCo
|
|
|
1344
1343
|
/* @__PURE__ */ X("button", {
|
|
1345
1344
|
onClick: r,
|
|
1346
1345
|
className: "dc:flex dc:items-center dc:gap-1.5 dc:px-2.5 dc:py-1.5 dc:text-xs dc:font-medium dc:rounded dc:border border-dc-border bg-dc-surface text-dc-text dc:hover:bg-dc-surface-hover dc:transition-colors",
|
|
1347
|
-
children: [/* @__PURE__ */ Y(
|
|
1346
|
+
children: [/* @__PURE__ */ Y(Or, { className: "dc:w-3.5 dc:h-3.5" }), "Columns"]
|
|
1348
1347
|
}),
|
|
1349
1348
|
/* @__PURE__ */ Y("div", { className: "dc:flex-1" }),
|
|
1350
1349
|
/* @__PURE__ */ X("span", {
|
|
@@ -1355,7 +1354,7 @@ function Nr({ showFilterBar: e, filterCount: t, onToggleFilterBar: n, onToggleCo
|
|
|
1355
1354
|
onClick: f,
|
|
1356
1355
|
className: "dc:p-1 dc:rounded dc:hover:bg-dc-surface-hover dc:transition-colors",
|
|
1357
1356
|
title: "Refresh",
|
|
1358
|
-
children: /* @__PURE__ */ Y(
|
|
1357
|
+
children: /* @__PURE__ */ Y(jr, { className: `dc:w-3.5 dc:h-3.5 text-dc-text-muted ${d ? "dc:animate-spin" : ""}` })
|
|
1359
1358
|
}),
|
|
1360
1359
|
/* @__PURE__ */ X("select", {
|
|
1361
1360
|
value: a,
|
|
@@ -1383,7 +1382,7 @@ function Nr({ showFilterBar: e, filterCount: t, onToggleFilterBar: n, onToggleCo
|
|
|
1383
1382
|
onClick: () => l(i - 1),
|
|
1384
1383
|
disabled: !c,
|
|
1385
1384
|
className: "dc:p-1 dc:rounded dc:hover:bg-dc-surface-hover dc:disabled:opacity-30 dc:disabled:cursor-not-allowed dc:transition-colors",
|
|
1386
|
-
children: /* @__PURE__ */ Y(
|
|
1385
|
+
children: /* @__PURE__ */ Y(kr, { className: "dc:w-4 dc:h-4 text-dc-text-muted" })
|
|
1387
1386
|
}),
|
|
1388
1387
|
/* @__PURE__ */ Y("span", {
|
|
1389
1388
|
className: "dc:text-xs dc:font-medium text-dc-text dc:min-w-[2rem] dc:text-center",
|
|
@@ -1393,7 +1392,7 @@ function Nr({ showFilterBar: e, filterCount: t, onToggleFilterBar: n, onToggleCo
|
|
|
1393
1392
|
onClick: () => l(i + 1),
|
|
1394
1393
|
disabled: !s,
|
|
1395
1394
|
className: "dc:p-1 dc:rounded dc:hover:bg-dc-surface-hover dc:disabled:opacity-30 dc:disabled:cursor-not-allowed dc:transition-colors",
|
|
1396
|
-
children: /* @__PURE__ */ Y(
|
|
1395
|
+
children: /* @__PURE__ */ Y(Ar, { className: "dc:w-4 dc:h-4 text-dc-text-muted" })
|
|
1397
1396
|
})
|
|
1398
1397
|
]
|
|
1399
1398
|
})
|
|
@@ -1402,9 +1401,9 @@ function Nr({ showFilterBar: e, filterCount: t, onToggleFilterBar: n, onToggleCo
|
|
|
1402
1401
|
}
|
|
1403
1402
|
//#endregion
|
|
1404
1403
|
//#region src/client/components/DataBrowser/DataBrowserTable.tsx
|
|
1405
|
-
var
|
|
1406
|
-
function
|
|
1407
|
-
let n =
|
|
1404
|
+
var Nr = a("chevronUp"), Pr = a("chevronDown");
|
|
1405
|
+
function Fr(e, t) {
|
|
1406
|
+
let n = xr(e, t);
|
|
1408
1407
|
return {
|
|
1409
1408
|
string: "text",
|
|
1410
1409
|
number: "num",
|
|
@@ -1416,13 +1415,13 @@ function Ir(e, t) {
|
|
|
1416
1415
|
max: "num"
|
|
1417
1416
|
}[n] || n;
|
|
1418
1417
|
}
|
|
1419
|
-
function
|
|
1420
|
-
return
|
|
1418
|
+
function Ir(e, t) {
|
|
1419
|
+
return Fr(e, t) === "num";
|
|
1421
1420
|
}
|
|
1422
|
-
function
|
|
1421
|
+
function Lr(e) {
|
|
1423
1422
|
return e == null ? "" : typeof e == "number" ? e.toLocaleString() : typeof e == "boolean" ? e ? "true" : "false" : e instanceof Date ? e.toISOString() : String(e);
|
|
1424
1423
|
}
|
|
1425
|
-
var
|
|
1424
|
+
var Rr = 60, zr = 150, Br = H.memo(function({ data: e, columns: t, sortColumn: n, sortDirection: r, onSort: i, getFieldLabel: a, meta: o, isLoading: s, isFetching: c, selectedCube: l, loadingComponent: u }) {
|
|
1426
1425
|
let d = $((e) => e.columnWidths), f = $((e) => e.setColumnWidth), p = $((e) => e.setColumnWidths), m = K(null), h = K(!1), g = U((e, n) => {
|
|
1427
1426
|
e.preventDefault(), e.stopPropagation();
|
|
1428
1427
|
let r = e.clientX;
|
|
@@ -1435,9 +1434,9 @@ var zr = 60, Br = 150, Vr = H.memo(function({ data: e, columns: t, sortColumn: n
|
|
|
1435
1434
|
i && (n[i] = e.getBoundingClientRect().width);
|
|
1436
1435
|
}), p(n);
|
|
1437
1436
|
}
|
|
1438
|
-
let a = e.target.closest("th"), o = a ? a.getBoundingClientRect().width :
|
|
1437
|
+
let a = e.target.closest("th"), o = a ? a.getBoundingClientRect().width : zr, s = (e) => {
|
|
1439
1438
|
let t = e.clientX - r;
|
|
1440
|
-
Math.abs(t) > 2 && (h.current = !0), f(n, Math.max(
|
|
1439
|
+
Math.abs(t) > 2 && (h.current = !0), f(n, Math.max(Rr, o + t));
|
|
1441
1440
|
}, c = () => {
|
|
1442
1441
|
document.removeEventListener("mousemove", s), document.removeEventListener("mouseup", c), document.body.style.cursor = "", document.body.style.userSelect = "", requestAnimationFrame(() => {
|
|
1443
1442
|
h.current = !1;
|
|
@@ -1450,7 +1449,7 @@ var zr = 60, Br = 150, Vr = H.memo(function({ data: e, columns: t, sortColumn: n
|
|
|
1450
1449
|
p
|
|
1451
1450
|
]), _ = U((e) => {
|
|
1452
1451
|
h.current || i(e);
|
|
1453
|
-
}, [i]), v = Object.keys(d).length > 0 ? t.reduce((e, t) => e + (d[t] ??
|
|
1452
|
+
}, [i]), v = Object.keys(d).length > 0 ? t.reduce((e, t) => e + (d[t] ?? zr), 0) : void 0;
|
|
1454
1453
|
return l ? e ? e.length === 0 && !s && !c ? /* @__PURE__ */ Y("div", {
|
|
1455
1454
|
className: "dc:flex dc:items-center dc:justify-center dc:h-full",
|
|
1456
1455
|
children: /* @__PURE__ */ X("div", {
|
|
@@ -1474,12 +1473,12 @@ var zr = 60, Br = 150, Vr = H.memo(function({ data: e, columns: t, sortColumn: n
|
|
|
1474
1473
|
minWidth: "100%"
|
|
1475
1474
|
},
|
|
1476
1475
|
children: [
|
|
1477
|
-
/* @__PURE__ */ Y("colgroup", { children: t.map((e) => /* @__PURE__ */ Y("col", { style: { width: d[e] ??
|
|
1476
|
+
/* @__PURE__ */ Y("colgroup", { children: t.map((e) => /* @__PURE__ */ Y("col", { style: { width: d[e] ?? zr } }, e)) }),
|
|
1478
1477
|
/* @__PURE__ */ Y("thead", {
|
|
1479
1478
|
className: "dc:sticky dc:top-0 dc:z-20",
|
|
1480
1479
|
style: { backgroundColor: "var(--dc-surface-secondary)" },
|
|
1481
1480
|
children: /* @__PURE__ */ Y("tr", { children: t.map((e, i) => {
|
|
1482
|
-
let s = n === e, c = a(e), l =
|
|
1481
|
+
let s = n === e, c = a(e), l = Fr(e, o), u = i === t.length - 1, d = Ir(e, o);
|
|
1483
1482
|
return /* @__PURE__ */ X("th", {
|
|
1484
1483
|
onClick: () => _(e),
|
|
1485
1484
|
className: `dc:relative dc:px-3 dc:py-2 dc:text-xs dc:font-normal dc:cursor-pointer dc:select-none dc:border-b border-dc-border dc:transition-colors${u ? "" : " dc:border-r"}${d ? " dc:text-right" : " dc:text-left"}`,
|
|
@@ -1496,7 +1495,7 @@ var zr = 60, Br = 150, Vr = H.memo(function({ data: e, columns: t, sortColumn: n
|
|
|
1496
1495
|
className: "dc:text-[10px] dc:opacity-50 dc:shrink-0",
|
|
1497
1496
|
children: l
|
|
1498
1497
|
}),
|
|
1499
|
-
s && Y(r === "asc" ?
|
|
1498
|
+
s && Y(r === "asc" ? Nr : Pr, { className: "dc:w-3 dc:h-3 text-dc-accent dc:shrink-0" })
|
|
1500
1499
|
]
|
|
1501
1500
|
}), /* @__PURE__ */ Y("div", {
|
|
1502
1501
|
onMouseDown: (t) => g(t, e),
|
|
@@ -1516,11 +1515,11 @@ var zr = 60, Br = 150, Vr = H.memo(function({ data: e, columns: t, sortColumn: n
|
|
|
1516
1515
|
e.currentTarget.style.backgroundColor = "";
|
|
1517
1516
|
},
|
|
1518
1517
|
children: t.map((n, r) => {
|
|
1519
|
-
let i = r === t.length - 1, a =
|
|
1518
|
+
let i = r === t.length - 1, a = Ir(n, o);
|
|
1520
1519
|
return /* @__PURE__ */ Y("td", {
|
|
1521
1520
|
className: `dc:px-3 dc:py-1.5 dc:text-sm dc:overflow-hidden dc:text-ellipsis dc:whitespace-nowrap${i ? "" : " dc:border-r border-dc-border"}${a ? " dc:text-right dc:tabular-nums" : ""}`,
|
|
1522
1521
|
style: { color: "var(--dc-text)" },
|
|
1523
|
-
children:
|
|
1522
|
+
children: Lr(e[n])
|
|
1524
1523
|
}, n);
|
|
1525
1524
|
})
|
|
1526
1525
|
}, n)) })
|
|
@@ -1548,12 +1547,12 @@ var zr = 60, Br = 150, Vr = H.memo(function({ data: e, columns: t, sortColumn: n
|
|
|
1548
1547
|
});
|
|
1549
1548
|
//#endregion
|
|
1550
1549
|
//#region src/client/components/DataBrowser/index.tsx
|
|
1551
|
-
function
|
|
1552
|
-
let { selectedCube: r, visibleColumns: i, sortColumn: a, sortDirection: o, page: s, pageSize: c, filters: l, showFilterBar: u, showColumnPicker: d, rawData: f, isLoading: p, isFetching: m, rowCount: h, hasNextPage: g, hasPrevPage: _, meta: v, getFieldLabel: y, selectCube: b, setSort: x, setPage: S, setPageSize: C, setFilters: w, toggleFilterBar: T, setShowColumnPicker: E, toggleColumn: D, refetch: O } =
|
|
1550
|
+
function Vr({ className: e = "", maxHeight: t = "100vh", loadingComponent: n }) {
|
|
1551
|
+
let { selectedCube: r, visibleColumns: i, sortColumn: a, sortDirection: o, page: s, pageSize: c, filters: l, showFilterBar: u, showColumnPicker: d, rawData: f, isLoading: p, isFetching: m, rowCount: h, hasNextPage: g, hasPrevPage: _, meta: v, getFieldLabel: y, selectCube: b, setSort: x, setPage: S, setPageSize: C, setFilters: w, toggleFilterBar: T, setShowColumnPicker: E, toggleColumn: D, refetch: O } = Cr(), k = G(() => v ? v.cubes.map((e) => ({
|
|
1553
1552
|
name: e.name,
|
|
1554
1553
|
title: e.title || e.name
|
|
1555
1554
|
})) : [], [v]), A = U((e) => {
|
|
1556
|
-
let { dimensions: t } =
|
|
1555
|
+
let { dimensions: t } = Sr(e, v);
|
|
1557
1556
|
b(e, t);
|
|
1558
1557
|
}, [v, b]), j = G(() => {
|
|
1559
1558
|
function e(t) {
|
|
@@ -1574,7 +1573,7 @@ function Hr({ className: e = "", maxHeight: t = "100vh", loadingComponent: n })
|
|
|
1574
1573
|
className: `dc:flex dc:border border-dc-border dc:rounded-lg dc:overflow-hidden bg-dc-surface ${e}`,
|
|
1575
1574
|
style: { height: t },
|
|
1576
1575
|
children: [
|
|
1577
|
-
/* @__PURE__ */ Y(
|
|
1576
|
+
/* @__PURE__ */ Y(Er, {
|
|
1578
1577
|
cubes: k,
|
|
1579
1578
|
selectedCube: r,
|
|
1580
1579
|
onSelectCube: A
|
|
@@ -1582,7 +1581,7 @@ function Hr({ className: e = "", maxHeight: t = "100vh", loadingComponent: n })
|
|
|
1582
1581
|
/* @__PURE__ */ X("div", {
|
|
1583
1582
|
className: "dc:flex dc:flex-col dc:flex-1 dc:min-w-0",
|
|
1584
1583
|
children: [
|
|
1585
|
-
r && /* @__PURE__ */ Y(
|
|
1584
|
+
r && /* @__PURE__ */ Y(Mr, {
|
|
1586
1585
|
showFilterBar: u,
|
|
1587
1586
|
filterCount: j,
|
|
1588
1587
|
onToggleFilterBar: T,
|
|
@@ -1605,7 +1604,7 @@ function Hr({ className: e = "", maxHeight: t = "100vh", loadingComponent: n })
|
|
|
1605
1604
|
onFiltersChange: w
|
|
1606
1605
|
})
|
|
1607
1606
|
}),
|
|
1608
|
-
/* @__PURE__ */ Y(
|
|
1607
|
+
/* @__PURE__ */ Y(Br, {
|
|
1609
1608
|
data: f,
|
|
1610
1609
|
columns: i,
|
|
1611
1610
|
sortColumn: a,
|
|
@@ -1631,11 +1630,11 @@ function Hr({ className: e = "", maxHeight: t = "100vh", loadingComponent: n })
|
|
|
1631
1630
|
]
|
|
1632
1631
|
});
|
|
1633
1632
|
}
|
|
1634
|
-
function
|
|
1635
|
-
return /* @__PURE__ */ Y(
|
|
1633
|
+
function Hr({ className: e, defaultCube: t, defaultPageSize: n = 20, maxHeight: r, loadingComponent: i }) {
|
|
1634
|
+
return /* @__PURE__ */ Y(yr, {
|
|
1636
1635
|
defaultPageSize: n,
|
|
1637
1636
|
defaultCube: t,
|
|
1638
|
-
children: /* @__PURE__ */ Y(
|
|
1637
|
+
children: /* @__PURE__ */ Y(Vr, {
|
|
1639
1638
|
className: e,
|
|
1640
1639
|
maxHeight: r,
|
|
1641
1640
|
loadingComponent: i
|
|
@@ -1644,13 +1643,13 @@ function Ur({ className: e, defaultCube: t, defaultPageSize: n = 20, maxHeight:
|
|
|
1644
1643
|
}
|
|
1645
1644
|
//#endregion
|
|
1646
1645
|
//#region src/client/components/DashboardThumbnailPlaceholder.tsx
|
|
1647
|
-
var
|
|
1648
|
-
function
|
|
1646
|
+
var Ur = a("segment");
|
|
1647
|
+
function Wr({ className: e = "" }) {
|
|
1649
1648
|
return /* @__PURE__ */ Y("div", {
|
|
1650
1649
|
className: `dc:flex dc:items-center dc:justify-center bg-dc-bg-secondary ${e}`,
|
|
1651
1650
|
children: /* @__PURE__ */ X("div", {
|
|
1652
1651
|
className: "dc:text-center",
|
|
1653
|
-
children: [/* @__PURE__ */ Y(
|
|
1652
|
+
children: [/* @__PURE__ */ Y(Ur, { className: "dc:w-8 dc:h-8 dc:mx-auto dc:mb-2 text-dc-text-muted dc:opacity-50" }), /* @__PURE__ */ Y("span", {
|
|
1654
1653
|
className: "dc:text-xs text-dc-text-muted",
|
|
1655
1654
|
children: "No preview"
|
|
1656
1655
|
})]
|
|
@@ -1658,6 +1657,6 @@ function Gr({ className: e = "" }) {
|
|
|
1658
1657
|
});
|
|
1659
1658
|
}
|
|
1660
1659
|
//#endregion
|
|
1661
|
-
export {
|
|
1660
|
+
export { fr as AgenticNotebook, ct as AnalysisBuilder, st as AnalyticsDashboard, pr as AnalyticsPage, Re as AnalyticsPortlet, Ve as ChartErrorBoundary, Nt as ConfirmModal, T as CubeClient, j as CubeProvider, b as DEFAULT_ICONS, lt as DashboardEditModal, $e as DashboardGrid, Je as DashboardStoreProvider, Wr as DashboardThumbnailPlaceholder, Hr as DataBrowser, et as DrillBreadcrumb, Be as DrillMenu, Wt as ExecutionPlanPanel, Bt as ExplainAIPanel, N as LazyChart, V as LoadingIndicator, Mt as Modal, Dn as NotebookStoreProvider, at as PortletAnalysisModal, it as PortletContainer, we as ScrollContainerProvider, De as THEME_PRESETS, Me as applyTheme, ye as buildFunnelConfigFromQueries, ge as buildServerFunnelQuery, d as captureThumbnail, k as chartPluginRegistry, an as compressAndEncode, w as createCubeClient, bn as createDashboardLayout, nt as createDashboardStore, Ot as createDefaultConfig, vt as createDefaultFlowConfig, _t as createDefaultFunnelConfig, wt as createDefaultQueryConfig, jt as createDefaultRetentionConfig, ht as createDefaultWorkspace, ue as createExplainQueryKey, z as createFlowQueryKey, re as createFunnelQueryKey, Tn as createNotebookStore, Zt as decodeAndDecompress, $t as detectAsymmetricDateRanges, qt as detectMeasureCollisions, yn as formatChartData, me as formatDuration, oe as generateQueryLabel, Qt as generateShareUrl, dn as getAvailableBindingKeyDimensions, x as getAvailableChartTypes, ve as getBindingKeyField, on as getBindingKeyLabel, v as getChartTypeIcon, I as getCombinedFields, be as getCubeNameFromQuery, O as getFieldTypeIcon, a as getIcon, D as getIconData, g as getIconRegistry, _ as getIconsByCategory, y as getMeasureTypeIcon, L as getQueryIndices, ie as getQueryLabels, Fe as getTheme, Oe as getThemeVariable, o as getUnavailableChartTypes, fn as getValidationSummary, It as highlightCodeBlocks, M as isChartTypeAvailable, ke as isDarkMode, At as isFlowConfig, St as isFunnelConfig, he as isFunnelData, ln as isMinimumFunnelConfigValid, Ct as isMultiQuery, He as isMultiQueryConfig, ne as isMultiQueryData, hn as isMultiQueryValid, Tt as isQueryConfig, yt as isRetentionConfig, xe as isSankeyData, Se as isServerFlowQuery, tt as isServerFunnelQuery, cn as isShareableSize, bt as isSingleQuery, u as isThumbnailCaptureAvailable, xt as isValidAnalysisConfig, Et as isValidAnalysisWorkspace, S as isValidChartType, R as mergeQueryResults, te as mergeResultsByKey, ee as mergeResultsConcat, gt as migrateConfig, Ft as migrateLegacyPortlet, en as parseShareUrl, c as preloadChart, s as preloadCharts, l as registerIcons, f as resetIcons, Pe as resetTheme, ut as selectAllActions, Fn as selectBlockActions, On as selectBlocks, pn as selectBreakdowns, Kt as selectChartConfig, Pn as selectChatActions, Nn as selectChatState, zt as selectCurrentState, Ye as selectDebugData, Xe as selectDebugDataActions, ot as selectEditModeActions, rt as selectEditModeState, Rt as selectFilters, Ut as selectFunnelState, Mn as selectInputValue, An as selectIsStreaming, Qe as selectLayoutActions, Ze as selectLayoutState, kn as selectMessages, rn as selectMetrics, Ge as selectModalActions, dt as selectModalState, Lt as selectMultiQueryState, mt as selectPortletDebugData, jn as selectSessionId, qe as selectThumbnailDirty, nn as selectUIState, h as setIcon, Ne as setTheme, je as setThemeVariable, _e as transformServerFunnelResult, Zn as useAgentChat, Xt as useAnalysisBuilder, Ht as useAnalysisBuilderStore, p as useCubeApi, E as useCubeContext, C as useCubeFeatures, Ee as useCubeFieldLabel, F as useCubeLoadQuery, F as useCubeQuery, Te as useCubeMeta, A as useCubeMetaQuery, Ke as useDashboard, pt as useDashboardStore, Ue as useDashboardStoreApi, Le as useDashboardStoreOptional, Cr as useDataBrowser, Ie as useDrillInteraction, le as useDryRunQueries, ce as useDryRunQuery, We as useElementVisibility, pe as useExplainAI, fe as useExplainQuery, P as useFlowQuery, ae as useFunnelQuery, B as useMultiCubeLoadQuery, de as useMultiDryRunQueries, Z as useNotebookStore, Ce as useScrollContainer, ze as useScrollDetection, vn as useTheme, tn as validateBindingKeyExists, Jt as validateBindingKeyForSteps, sn as validateFunnelConfig, se as validateMergeKey, Yt as validateMergeKeys, mn as validateMultiQueryConfig, un as validateStepQueries, Gt as validateTimeDimensionAlignment, m as warnIfScreenshotLibMissing, Ae as watchThemeChanges };
|
|
1662
1661
|
|
|
1663
1662
|
//# sourceMappingURL=index.js.map
|