react-semaphor 0.0.214 → 0.0.215
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/chunks/{dashboard-plus-8EUxxbn_.js → dashboard-plus-6cxhQU7b.js} +511 -535
- package/dist/chunks/dashboard-plus-8ek7Ti6E.js +215 -0
- package/dist/chunks/{index--jPf_GGf.js → index-icDf4hJ3.js} +44 -44
- package/dist/dashboard/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +3 -3
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunks/dashboard-plus-VLwNUeRy.js +0 -215
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { P as
|
|
2
|
-
import
|
|
1
|
+
import { P as L, b as w, j as e, Q as ys, R as vs, U as k, V as Xs, W as Ns, X as Cs, Y as Ss, Z as ks, _ as $, $ as re, a0 as Zs, J as ea, O as Le, a1 as Ra, a2 as _a, a3 as Ha, a4 as Ba, a5 as $a, a6 as Pa, a7 as Rs, a8 as _e, a9 as Pe, aa as es, T as ws, e as sa, g as zs, ab as Fe, ac as Oe, f as Y, ad as Me, ae as Te, af as He, ag as Ae, ah as W, ai as Fs, G as i, aj as Ke, ak as Ue, al as Ka, am as Ge, w as aa, v as ta, t as me, an as Ua, r as Ga, N as na, s as Ja, ao as Qa, B as Wa, ap as ra, aq as Ya, L as Be, S as Os, z as Xa, n as _s, ar as ps, A as fs, u as ts, as as ge, at as ye, au as la, av as ia, aw as oa, ax as ca, ay as da, az as Za, aA as et, aB as ha, aC as st, aD as at, aE as tt, aF as nt, aG as rt, aH as gs, aI as lt, aJ as Re, aK as js, aL as ze, aM as bs, aN as Hs, aO as it, aP as ot, aQ as ct, aR as dt, aS as ht, aT as ms, aU as mt, aV as Bs, aW as ut, aX as $s, aY as xt, aZ as pt, a_ as ft, a$ as ma, l as gt, C as jt, E as Ps, d as bt, h as yt, i as vt, o as Nt, b0 as Ct, m as St, H as kt, b1 as wt, b2 as zt, b3 as Ft, b4 as us, b5 as Ot, b6 as xs, b7 as Ks, K as Mt, b8 as Tt, b9 as Ms, ba as Lt, bb as Ts, bc as Ee, bd as ua, be as At, bf as Et, bg as Dt, bh as It, bi as Vt, bj as qt, bk as ve, bl as R, bm as _, bn as Ls, bo as H, bp as Us, bq as Rt, br as _t, bs as Ht, bt as Bt, bu as Gs, bv as $t, bw as Pt, bx as Kt, by as Ut, bz as Gt, bA as Jt } from "./index-icDf4hJ3.js";
|
|
2
|
+
import ue, { useState as T, useEffect as G, useMemo as Qt, useRef as $e } from "react";
|
|
3
3
|
/**
|
|
4
4
|
* @license lucide-react v0.379.0 - ISC
|
|
5
5
|
*
|
|
6
6
|
* This source code is licensed under the ISC license.
|
|
7
7
|
* See the LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
|
-
const Wt =
|
|
9
|
+
const Wt = L("Activity", [
|
|
10
10
|
[
|
|
11
11
|
"path",
|
|
12
12
|
{
|
|
@@ -21,7 +21,7 @@ const Wt = T("Activity", [
|
|
|
21
21
|
* This source code is licensed under the ISC license.
|
|
22
22
|
* See the LICENSE file in the root directory of this source tree.
|
|
23
23
|
*/
|
|
24
|
-
const Yt =
|
|
24
|
+
const Yt = L("AreaChart", [
|
|
25
25
|
["path", { d: "M3 3v18h18", key: "1s2lah" }],
|
|
26
26
|
["path", { d: "M7 12v5h12V8l-5 5-4-4Z", key: "zxz28u" }]
|
|
27
27
|
]);
|
|
@@ -31,7 +31,7 @@ const Yt = T("AreaChart", [
|
|
|
31
31
|
* This source code is licensed under the ISC license.
|
|
32
32
|
* See the LICENSE file in the root directory of this source tree.
|
|
33
33
|
*/
|
|
34
|
-
const As =
|
|
34
|
+
const As = L("BarChart4", [
|
|
35
35
|
["path", { d: "M3 3v18h18", key: "1s2lah" }],
|
|
36
36
|
["path", { d: "M13 17V9", key: "1fwyjl" }],
|
|
37
37
|
["path", { d: "M18 17V5", key: "sfb6ij" }],
|
|
@@ -43,7 +43,7 @@ const As = T("BarChart4", [
|
|
|
43
43
|
* This source code is licensed under the ISC license.
|
|
44
44
|
* See the LICENSE file in the root directory of this source tree.
|
|
45
45
|
*/
|
|
46
|
-
const Xt =
|
|
46
|
+
const Xt = L("Box", [
|
|
47
47
|
[
|
|
48
48
|
"path",
|
|
49
49
|
{
|
|
@@ -60,7 +60,7 @@ const Xt = T("Box", [
|
|
|
60
60
|
* This source code is licensed under the ISC license.
|
|
61
61
|
* See the LICENSE file in the root directory of this source tree.
|
|
62
62
|
*/
|
|
63
|
-
const Zt =
|
|
63
|
+
const Zt = L("CircleX", [
|
|
64
64
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
65
65
|
["path", { d: "m15 9-6 6", key: "1uzhvr" }],
|
|
66
66
|
["path", { d: "m9 9 6 6", key: "z0biqf" }]
|
|
@@ -71,7 +71,7 @@ const Zt = T("CircleX", [
|
|
|
71
71
|
* This source code is licensed under the ISC license.
|
|
72
72
|
* See the LICENSE file in the root directory of this source tree.
|
|
73
73
|
*/
|
|
74
|
-
const en =
|
|
74
|
+
const en = L("Database", [
|
|
75
75
|
["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3", key: "msslwz" }],
|
|
76
76
|
["path", { d: "M3 5V19A9 3 0 0 0 21 19V5", key: "1wlel7" }],
|
|
77
77
|
["path", { d: "M3 12A9 3 0 0 0 21 12", key: "mv7ke4" }]
|
|
@@ -82,7 +82,7 @@ const en = T("Database", [
|
|
|
82
82
|
* This source code is licensed under the ISC license.
|
|
83
83
|
* See the LICENSE file in the root directory of this source tree.
|
|
84
84
|
*/
|
|
85
|
-
const sn =
|
|
85
|
+
const sn = L("Eraser", [
|
|
86
86
|
[
|
|
87
87
|
"path",
|
|
88
88
|
{
|
|
@@ -99,7 +99,7 @@ const sn = T("Eraser", [
|
|
|
99
99
|
* This source code is licensed under the ISC license.
|
|
100
100
|
* See the LICENSE file in the root directory of this source tree.
|
|
101
101
|
*/
|
|
102
|
-
const xa =
|
|
102
|
+
const xa = L("Filter", [
|
|
103
103
|
["polygon", { points: "22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3", key: "1yg77f" }]
|
|
104
104
|
]);
|
|
105
105
|
/**
|
|
@@ -108,7 +108,7 @@ const xa = T("Filter", [
|
|
|
108
108
|
* This source code is licensed under the ISC license.
|
|
109
109
|
* See the LICENSE file in the root directory of this source tree.
|
|
110
110
|
*/
|
|
111
|
-
const pa =
|
|
111
|
+
const pa = L("GanttChart", [
|
|
112
112
|
["path", { d: "M8 6h10", key: "9lnwnk" }],
|
|
113
113
|
["path", { d: "M6 12h9", key: "1g9pqf" }],
|
|
114
114
|
["path", { d: "M11 18h7", key: "c8dzvl" }]
|
|
@@ -119,7 +119,7 @@ const pa = T("GanttChart", [
|
|
|
119
119
|
* This source code is licensed under the ISC license.
|
|
120
120
|
* See the LICENSE file in the root directory of this source tree.
|
|
121
121
|
*/
|
|
122
|
-
const an =
|
|
122
|
+
const an = L("Glasses", [
|
|
123
123
|
["circle", { cx: "6", cy: "15", r: "4", key: "vux9w4" }],
|
|
124
124
|
["circle", { cx: "18", cy: "15", r: "4", key: "18o8ve" }],
|
|
125
125
|
["path", { d: "M14 15a2 2 0 0 0-2-2 2 2 0 0 0-2 2", key: "1ag4bs" }],
|
|
@@ -132,7 +132,7 @@ const an = T("Glasses", [
|
|
|
132
132
|
* This source code is licensed under the ISC license.
|
|
133
133
|
* See the LICENSE file in the root directory of this source tree.
|
|
134
134
|
*/
|
|
135
|
-
const tn =
|
|
135
|
+
const tn = L("Hammer", [
|
|
136
136
|
["path", { d: "m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9", key: "eefl8a" }],
|
|
137
137
|
["path", { d: "m18 15 4-4", key: "16gjal" }],
|
|
138
138
|
[
|
|
@@ -149,7 +149,7 @@ const tn = T("Hammer", [
|
|
|
149
149
|
* This source code is licensed under the ISC license.
|
|
150
150
|
* See the LICENSE file in the root directory of this source tree.
|
|
151
151
|
*/
|
|
152
|
-
const nn =
|
|
152
|
+
const nn = L("Hash", [
|
|
153
153
|
["line", { x1: "4", x2: "20", y1: "9", y2: "9", key: "4lhtct" }],
|
|
154
154
|
["line", { x1: "4", x2: "20", y1: "15", y2: "15", key: "vyu0kd" }],
|
|
155
155
|
["line", { x1: "10", x2: "8", y1: "3", y2: "21", key: "1ggp8o" }],
|
|
@@ -161,7 +161,7 @@ const nn = T("Hash", [
|
|
|
161
161
|
* This source code is licensed under the ISC license.
|
|
162
162
|
* See the LICENSE file in the root directory of this source tree.
|
|
163
163
|
*/
|
|
164
|
-
const rn =
|
|
164
|
+
const rn = L("Key", [
|
|
165
165
|
["path", { d: "m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4", key: "g0fldk" }],
|
|
166
166
|
["path", { d: "m21 2-9.6 9.6", key: "1j0ho8" }],
|
|
167
167
|
["circle", { cx: "7.5", cy: "15.5", r: "5.5", key: "yqb3hr" }]
|
|
@@ -172,7 +172,7 @@ const rn = T("Key", [
|
|
|
172
172
|
* This source code is licensed under the ISC license.
|
|
173
173
|
* See the LICENSE file in the root directory of this source tree.
|
|
174
174
|
*/
|
|
175
|
-
const Es =
|
|
175
|
+
const Es = L("LineChart", [
|
|
176
176
|
["path", { d: "M3 3v18h18", key: "1s2lah" }],
|
|
177
177
|
["path", { d: "m19 9-5 5-4-4-3 3", key: "2osh9i" }]
|
|
178
178
|
]);
|
|
@@ -182,7 +182,7 @@ const Es = T("LineChart", [
|
|
|
182
182
|
* This source code is licensed under the ISC license.
|
|
183
183
|
* See the LICENSE file in the root directory of this source tree.
|
|
184
184
|
*/
|
|
185
|
-
const ln =
|
|
185
|
+
const ln = L("ListEnd", [
|
|
186
186
|
["path", { d: "M16 12H3", key: "1a2rj7" }],
|
|
187
187
|
["path", { d: "M16 6H3", key: "1wxfjs" }],
|
|
188
188
|
["path", { d: "M10 18H3", key: "13769t" }],
|
|
@@ -195,7 +195,7 @@ const ln = T("ListEnd", [
|
|
|
195
195
|
* This source code is licensed under the ISC license.
|
|
196
196
|
* See the LICENSE file in the root directory of this source tree.
|
|
197
197
|
*/
|
|
198
|
-
const on =
|
|
198
|
+
const on = L("ListStart", [
|
|
199
199
|
["path", { d: "M16 12H3", key: "1a2rj7" }],
|
|
200
200
|
["path", { d: "M16 18H3", key: "12xzn7" }],
|
|
201
201
|
["path", { d: "M10 6H3", key: "lf8lx7" }],
|
|
@@ -208,7 +208,7 @@ const on = T("ListStart", [
|
|
|
208
208
|
* This source code is licensed under the ISC license.
|
|
209
209
|
* See the LICENSE file in the root directory of this source tree.
|
|
210
210
|
*/
|
|
211
|
-
const cn =
|
|
211
|
+
const cn = L("ListX", [
|
|
212
212
|
["path", { d: "M11 12H3", key: "51ecnj" }],
|
|
213
213
|
["path", { d: "M16 6H3", key: "1wxfjs" }],
|
|
214
214
|
["path", { d: "M16 18H3", key: "12xzn7" }],
|
|
@@ -221,7 +221,7 @@ const cn = T("ListX", [
|
|
|
221
221
|
* This source code is licensed under the ISC license.
|
|
222
222
|
* See the LICENSE file in the root directory of this source tree.
|
|
223
223
|
*/
|
|
224
|
-
const dn =
|
|
224
|
+
const dn = L("MessageSquareMore", [
|
|
225
225
|
["path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z", key: "1lielz" }],
|
|
226
226
|
["path", { d: "M8 10h.01", key: "19clt8" }],
|
|
227
227
|
["path", { d: "M12 10h.01", key: "1nrarc" }],
|
|
@@ -233,7 +233,7 @@ const dn = T("MessageSquareMore", [
|
|
|
233
233
|
* This source code is licensed under the ISC license.
|
|
234
234
|
* See the LICENSE file in the root directory of this source tree.
|
|
235
235
|
*/
|
|
236
|
-
const hn =
|
|
236
|
+
const hn = L("Network", [
|
|
237
237
|
["rect", { x: "16", y: "16", width: "6", height: "6", rx: "1", key: "4q2zg0" }],
|
|
238
238
|
["rect", { x: "2", y: "16", width: "6", height: "6", rx: "1", key: "8cvhb9" }],
|
|
239
239
|
["rect", { x: "9", y: "2", width: "6", height: "6", rx: "1", key: "1egb70" }],
|
|
@@ -246,7 +246,7 @@ const hn = T("Network", [
|
|
|
246
246
|
* This source code is licensed under the ISC license.
|
|
247
247
|
* See the LICENSE file in the root directory of this source tree.
|
|
248
248
|
*/
|
|
249
|
-
const fa =
|
|
249
|
+
const fa = L("Pencil", [
|
|
250
250
|
["path", { d: "M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z", key: "5qss01" }],
|
|
251
251
|
["path", { d: "m15 5 4 4", key: "1mk7zo" }]
|
|
252
252
|
]);
|
|
@@ -256,7 +256,7 @@ const fa = T("Pencil", [
|
|
|
256
256
|
* This source code is licensed under the ISC license.
|
|
257
257
|
* See the LICENSE file in the root directory of this source tree.
|
|
258
258
|
*/
|
|
259
|
-
const ga =
|
|
259
|
+
const ga = L("PieChart", [
|
|
260
260
|
["path", { d: "M21.21 15.89A10 10 0 1 1 8 2.83", key: "k2fpak" }],
|
|
261
261
|
["path", { d: "M22 12A10 10 0 0 0 12 2v10z", key: "1rfc4y" }]
|
|
262
262
|
]);
|
|
@@ -266,7 +266,7 @@ const ga = T("PieChart", [
|
|
|
266
266
|
* This source code is licensed under the ISC license.
|
|
267
267
|
* See the LICENSE file in the root directory of this source tree.
|
|
268
268
|
*/
|
|
269
|
-
const mn =
|
|
269
|
+
const mn = L("Play", [
|
|
270
270
|
["polygon", { points: "6 3 20 12 6 21 6 3", key: "1oa8hb" }]
|
|
271
271
|
]);
|
|
272
272
|
/**
|
|
@@ -275,7 +275,7 @@ const mn = T("Play", [
|
|
|
275
275
|
* This source code is licensed under the ISC license.
|
|
276
276
|
* See the LICENSE file in the root directory of this source tree.
|
|
277
277
|
*/
|
|
278
|
-
const un =
|
|
278
|
+
const un = L("Plug2", [
|
|
279
279
|
["path", { d: "M9 2v6", key: "17ngun" }],
|
|
280
280
|
["path", { d: "M15 2v6", key: "s7yy2p" }],
|
|
281
281
|
["path", { d: "M12 17v5", key: "bb1du9" }],
|
|
@@ -288,7 +288,7 @@ const un = T("Plug2", [
|
|
|
288
288
|
* This source code is licensed under the ISC license.
|
|
289
289
|
* See the LICENSE file in the root directory of this source tree.
|
|
290
290
|
*/
|
|
291
|
-
const xn =
|
|
291
|
+
const xn = L("Save", [
|
|
292
292
|
[
|
|
293
293
|
"path",
|
|
294
294
|
{
|
|
@@ -305,7 +305,7 @@ const xn = T("Save", [
|
|
|
305
305
|
* This source code is licensed under the ISC license.
|
|
306
306
|
* See the LICENSE file in the root directory of this source tree.
|
|
307
307
|
*/
|
|
308
|
-
const ja =
|
|
308
|
+
const ja = L("ScatterChart", [
|
|
309
309
|
["circle", { cx: "7.5", cy: "7.5", r: ".5", fill: "currentColor", key: "kqv944" }],
|
|
310
310
|
["circle", { cx: "18.5", cy: "5.5", r: ".5", fill: "currentColor", key: "lysivs" }],
|
|
311
311
|
["circle", { cx: "11.5", cy: "11.5", r: ".5", fill: "currentColor", key: "byv1b8" }],
|
|
@@ -319,7 +319,7 @@ const ja = T("ScatterChart", [
|
|
|
319
319
|
* This source code is licensed under the ISC license.
|
|
320
320
|
* See the LICENSE file in the root directory of this source tree.
|
|
321
321
|
*/
|
|
322
|
-
const pn =
|
|
322
|
+
const pn = L("ShieldQuestion", [
|
|
323
323
|
[
|
|
324
324
|
"path",
|
|
325
325
|
{
|
|
@@ -336,7 +336,7 @@ const pn = T("ShieldQuestion", [
|
|
|
336
336
|
* This source code is licensed under the ISC license.
|
|
337
337
|
* See the LICENSE file in the root directory of this source tree.
|
|
338
338
|
*/
|
|
339
|
-
const fn =
|
|
339
|
+
const fn = L("Sigma", [
|
|
340
340
|
["path", { d: "M18 7V4H6l6 8-6 8h12v-3", key: "zis8ev" }]
|
|
341
341
|
]);
|
|
342
342
|
/**
|
|
@@ -345,7 +345,7 @@ const fn = T("Sigma", [
|
|
|
345
345
|
* This source code is licensed under the ISC license.
|
|
346
346
|
* See the LICENSE file in the root directory of this source tree.
|
|
347
347
|
*/
|
|
348
|
-
const gn =
|
|
348
|
+
const gn = L("SwatchBook", [
|
|
349
349
|
["path", { d: "M11 17a4 4 0 0 1-8 0V5a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2Z", key: "1ldrpk" }],
|
|
350
350
|
["path", { d: "M16.7 13H19a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2H7", key: "11i5po" }],
|
|
351
351
|
["path", { d: "M 7 17h0.01", key: "10821z" }],
|
|
@@ -363,7 +363,7 @@ const gn = T("SwatchBook", [
|
|
|
363
363
|
* This source code is licensed under the ISC license.
|
|
364
364
|
* See the LICENSE file in the root directory of this source tree.
|
|
365
365
|
*/
|
|
366
|
-
const jn =
|
|
366
|
+
const jn = L("Tag", [
|
|
367
367
|
[
|
|
368
368
|
"path",
|
|
369
369
|
{
|
|
@@ -379,7 +379,7 @@ const jn = T("Tag", [
|
|
|
379
379
|
* This source code is licensed under the ISC license.
|
|
380
380
|
* See the LICENSE file in the root directory of this source tree.
|
|
381
381
|
*/
|
|
382
|
-
const bn =
|
|
382
|
+
const bn = L("ToggleLeft", [
|
|
383
383
|
["rect", { width: "20", height: "12", x: "2", y: "6", rx: "6", ry: "6", key: "f2vt7d" }],
|
|
384
384
|
["circle", { cx: "8", cy: "12", r: "2", key: "1nvbw3" }]
|
|
385
385
|
]);
|
|
@@ -389,7 +389,7 @@ const bn = T("ToggleLeft", [
|
|
|
389
389
|
* This source code is licensed under the ISC license.
|
|
390
390
|
* See the LICENSE file in the root directory of this source tree.
|
|
391
391
|
*/
|
|
392
|
-
const Ds =
|
|
392
|
+
const Ds = L("Type", [
|
|
393
393
|
["polyline", { points: "4 7 4 4 20 4 20 7", key: "1nosan" }],
|
|
394
394
|
["line", { x1: "9", x2: "15", y1: "20", y2: "20", key: "swin9y" }],
|
|
395
395
|
["line", { x1: "12", x2: "12", y1: "4", y2: "20", key: "1tx1rr" }]
|
|
@@ -400,14 +400,14 @@ const Ds = T("Type", [
|
|
|
400
400
|
* This source code is licensed under the ISC license.
|
|
401
401
|
* See the LICENSE file in the root directory of this source tree.
|
|
402
402
|
*/
|
|
403
|
-
const yn =
|
|
403
|
+
const yn = L("User", [
|
|
404
404
|
["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
|
|
405
405
|
["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
|
|
406
406
|
]);
|
|
407
407
|
function vn() {
|
|
408
|
-
const [s, n] =
|
|
408
|
+
const [s, n] = T(""), [a, t] = T(!1), [l, h] = T(!1), c = w((o) => o.dashboard);
|
|
409
409
|
function r() {
|
|
410
|
-
const o = ea(c), f =
|
|
410
|
+
const o = ea(c), f = Le(c.id), m = JSON.parse(localStorage.getItem(f) || "[]");
|
|
411
411
|
if (m.some(
|
|
412
412
|
(S) => S.name === s
|
|
413
413
|
)) {
|
|
@@ -419,8 +419,8 @@ function vn() {
|
|
|
419
419
|
template: o
|
|
420
420
|
}), localStorage.setItem(f, JSON.stringify(m)), h(!1);
|
|
421
421
|
}
|
|
422
|
-
return /* @__PURE__ */ e.jsxs(
|
|
423
|
-
/* @__PURE__ */ e.jsx(
|
|
422
|
+
return /* @__PURE__ */ e.jsxs(ys, { open: l, onOpenChange: h, children: [
|
|
423
|
+
/* @__PURE__ */ e.jsx(vs, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
424
424
|
k,
|
|
425
425
|
{
|
|
426
426
|
variant: "outline",
|
|
@@ -432,15 +432,15 @@ function vn() {
|
|
|
432
432
|
]
|
|
433
433
|
}
|
|
434
434
|
) }),
|
|
435
|
-
/* @__PURE__ */ e.jsxs(
|
|
436
|
-
/* @__PURE__ */ e.jsxs(
|
|
437
|
-
/* @__PURE__ */ e.jsx(
|
|
438
|
-
/* @__PURE__ */ e.jsx(
|
|
435
|
+
/* @__PURE__ */ e.jsxs(Ns, { className: "sm:max-w-[425px]", children: [
|
|
436
|
+
/* @__PURE__ */ e.jsxs(Cs, { children: [
|
|
437
|
+
/* @__PURE__ */ e.jsx(Ss, { children: "Add a Lens" }),
|
|
438
|
+
/* @__PURE__ */ e.jsx(ks, { children: "Lenses are private by default and are only visible to you." })
|
|
439
439
|
] }),
|
|
440
440
|
/* @__PURE__ */ e.jsx("div", { className: "grid gap-4 py-4", children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-8 items-center gap-4", children: [
|
|
441
|
-
/* @__PURE__ */ e.jsx(
|
|
441
|
+
/* @__PURE__ */ e.jsx($, { className: "text-right", children: "Name" }),
|
|
442
442
|
/* @__PURE__ */ e.jsx(
|
|
443
|
-
|
|
443
|
+
re,
|
|
444
444
|
{
|
|
445
445
|
value: s,
|
|
446
446
|
onChange: (o) => {
|
|
@@ -466,13 +466,13 @@ function vn() {
|
|
|
466
466
|
] });
|
|
467
467
|
}
|
|
468
468
|
function Nn() {
|
|
469
|
-
const [s, n] =
|
|
469
|
+
const [s, n] = T(!1), [a, t] = T(""), l = w((d) => d.dashboard), h = w((d) => d.bookmarkKey), [c, r] = T([]), o = w((d) => d.actions.setDashboard), f = w(
|
|
470
470
|
(d) => d.actions.setFilterValues
|
|
471
471
|
), m = w(
|
|
472
472
|
(d) => d.actions.setBookmarkKey
|
|
473
473
|
);
|
|
474
474
|
G(() => {
|
|
475
|
-
const d =
|
|
475
|
+
const d = Le(l.id), x = JSON.parse(localStorage.getItem(d) || "[]");
|
|
476
476
|
r(x);
|
|
477
477
|
const j = x.find(
|
|
478
478
|
(z) => z.default
|
|
@@ -486,7 +486,7 @@ function Nn() {
|
|
|
486
486
|
j && (o(j), f(x.filterValues || []), m(d === "Original" ? "" : d)), t(d);
|
|
487
487
|
}
|
|
488
488
|
function S(d) {
|
|
489
|
-
const x =
|
|
489
|
+
const x = Le(l.id), z = JSON.parse(localStorage.getItem(x) || "[]").filter(
|
|
490
490
|
(C) => C.name !== d
|
|
491
491
|
);
|
|
492
492
|
localStorage.setItem(x, JSON.stringify(z)), r(z);
|
|
@@ -512,7 +512,7 @@ function Nn() {
|
|
|
512
512
|
children: [
|
|
513
513
|
/* @__PURE__ */ e.jsx("p", { children: d.name }),
|
|
514
514
|
/* @__PURE__ */ e.jsx(
|
|
515
|
-
|
|
515
|
+
_e,
|
|
516
516
|
{
|
|
517
517
|
onClick: (j) => {
|
|
518
518
|
j.preventDefault(), S(d.name);
|
|
@@ -532,13 +532,13 @@ function Nn() {
|
|
|
532
532
|
] });
|
|
533
533
|
}
|
|
534
534
|
function Cn() {
|
|
535
|
-
const [s, n] =
|
|
535
|
+
const [s, n] = T(!1), a = w((h) => h.dashboard), t = w((h) => h.bookmarkKey);
|
|
536
536
|
G(() => {
|
|
537
537
|
if (!t) {
|
|
538
538
|
n(!1);
|
|
539
539
|
return;
|
|
540
540
|
}
|
|
541
|
-
const h =
|
|
541
|
+
const h = Le(a.id), r = JSON.parse(
|
|
542
542
|
localStorage.getItem(h) || "[]"
|
|
543
543
|
).find(
|
|
544
544
|
(o) => o.name === t
|
|
@@ -548,14 +548,14 @@ function Cn() {
|
|
|
548
548
|
function l(h) {
|
|
549
549
|
if (n(h), !t)
|
|
550
550
|
return;
|
|
551
|
-
const c =
|
|
551
|
+
const c = Le(a.id), o = JSON.parse(
|
|
552
552
|
localStorage.getItem(c) || "[]"
|
|
553
553
|
).map((f) => (f.name === t ? f.default = h : f.default = !1, f));
|
|
554
554
|
console.log(o), localStorage.setItem(c, JSON.stringify(o));
|
|
555
555
|
}
|
|
556
556
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
557
557
|
/* @__PURE__ */ e.jsx(
|
|
558
|
-
|
|
558
|
+
Pe,
|
|
559
559
|
{
|
|
560
560
|
checked: s,
|
|
561
561
|
onCheckedChange: l,
|
|
@@ -589,7 +589,7 @@ function Sn() {
|
|
|
589
589
|
if (!a || !d)
|
|
590
590
|
return;
|
|
591
591
|
const C = {
|
|
592
|
-
id:
|
|
592
|
+
id: es(),
|
|
593
593
|
title: "Title",
|
|
594
594
|
description: "Description",
|
|
595
595
|
preferences: {
|
|
@@ -604,7 +604,7 @@ function Sn() {
|
|
|
604
604
|
sql: "select COUNT(*) from YOUR_TABLE",
|
|
605
605
|
data: []
|
|
606
606
|
}, E = {
|
|
607
|
-
id:
|
|
607
|
+
id: es(),
|
|
608
608
|
cards: [C],
|
|
609
609
|
activeCardId: C.id
|
|
610
610
|
};
|
|
@@ -615,7 +615,7 @@ function Sn() {
|
|
|
615
615
|
function z() {
|
|
616
616
|
if (!s || s === "")
|
|
617
617
|
return;
|
|
618
|
-
const C = ea(n), E =
|
|
618
|
+
const C = ea(n), E = Le(n.id), v = JSON.parse(localStorage.getItem(E) || "[]"), D = v.findIndex(
|
|
619
619
|
(N) => N.name === s
|
|
620
620
|
);
|
|
621
621
|
D !== -1 ? v[D] = {
|
|
@@ -636,7 +636,7 @@ function Sn() {
|
|
|
636
636
|
role: "dashboard-controls",
|
|
637
637
|
children: [
|
|
638
638
|
!l && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
639
|
-
/* @__PURE__ */ e.jsx(
|
|
639
|
+
/* @__PURE__ */ e.jsx($, { children: s }),
|
|
640
640
|
!!s && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
641
641
|
/* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: "|" }),
|
|
642
642
|
/* @__PURE__ */ e.jsx(Cn, {})
|
|
@@ -679,7 +679,7 @@ function Sn() {
|
|
|
679
679
|
u(!1), S(!1);
|
|
680
680
|
},
|
|
681
681
|
size: "sm",
|
|
682
|
-
children: /* @__PURE__ */ e.jsx(
|
|
682
|
+
children: /* @__PURE__ */ e.jsx(_e, { className: "h-4 w-4", strokeWidth: 1.5 })
|
|
683
683
|
}
|
|
684
684
|
),
|
|
685
685
|
a && !l && /* @__PURE__ */ e.jsx(
|
|
@@ -709,7 +709,7 @@ function Sn() {
|
|
|
709
709
|
}
|
|
710
710
|
);
|
|
711
711
|
}
|
|
712
|
-
function
|
|
712
|
+
function Xe({
|
|
713
713
|
title: s,
|
|
714
714
|
items: n,
|
|
715
715
|
value: a,
|
|
@@ -731,20 +731,20 @@ function Re({
|
|
|
731
731
|
if (s === "Schema")
|
|
732
732
|
return /* @__PURE__ */ e.jsx(hn, { className: "size-4" });
|
|
733
733
|
if (s === "Table")
|
|
734
|
-
return /* @__PURE__ */ e.jsx(
|
|
734
|
+
return /* @__PURE__ */ e.jsx(Fs, { className: "size-4" });
|
|
735
735
|
if (s === "Dataset")
|
|
736
736
|
return /* @__PURE__ */ e.jsx(Xt, { className: "size-4" });
|
|
737
737
|
}
|
|
738
738
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
739
|
-
f && /* @__PURE__ */ e.jsx("div", { className: "shrink-0", children: h ? /* @__PURE__ */ e.jsxs(
|
|
739
|
+
f && /* @__PURE__ */ e.jsx("div", { className: "shrink-0", children: h ? /* @__PURE__ */ e.jsxs(ws, { children: [
|
|
740
740
|
/* @__PURE__ */ e.jsx(sa, { children: S() }),
|
|
741
|
-
/* @__PURE__ */ e.jsx(
|
|
741
|
+
/* @__PURE__ */ e.jsx(zs, { className: "text-xs", align: "start", children: h })
|
|
742
742
|
] }) : S() }),
|
|
743
743
|
/* @__PURE__ */ e.jsxs(Fe, { disabled: m, value: u, onValueChange: c, children: [
|
|
744
744
|
/* @__PURE__ */ e.jsx(
|
|
745
745
|
Oe,
|
|
746
746
|
{
|
|
747
|
-
className:
|
|
747
|
+
className: Y(
|
|
748
748
|
"h-9 w-full focus:ring-1 focus:ring-offset-0",
|
|
749
749
|
o
|
|
750
750
|
),
|
|
@@ -756,19 +756,19 @@ function Re({
|
|
|
756
756
|
)
|
|
757
757
|
}
|
|
758
758
|
),
|
|
759
|
-
/* @__PURE__ */ e.jsx(
|
|
759
|
+
/* @__PURE__ */ e.jsx(Te, { children: /* @__PURE__ */ e.jsxs(He, { children: [
|
|
760
760
|
t ? /* @__PURE__ */ e.jsx(Ae, { children: "Loading..." }) : /* @__PURE__ */ e.jsx(Ae, { children: s }),
|
|
761
761
|
/* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
762
|
-
r && /* @__PURE__ */ e.jsx(
|
|
763
|
-
n && n.map((d, x) => /* @__PURE__ */ e.jsx(
|
|
762
|
+
r && /* @__PURE__ */ e.jsx(W, { value: "none", children: "None" }, "none"),
|
|
763
|
+
n && n.map((d, x) => /* @__PURE__ */ e.jsx(W, { value: d.id, children: d.name }, x))
|
|
764
764
|
] }),
|
|
765
|
-
(t || l) && /* @__PURE__ */ e.jsx(
|
|
765
|
+
(t || l) && /* @__PURE__ */ e.jsx(W, { value: u, children: u })
|
|
766
766
|
] }) })
|
|
767
767
|
] })
|
|
768
768
|
] });
|
|
769
769
|
}
|
|
770
770
|
function kn({ column: s }) {
|
|
771
|
-
const [n, a] =
|
|
771
|
+
const [n, a] = T(!1), t = i((m) => m.selectedTableName), l = i(
|
|
772
772
|
(m) => m.selectedSchemaName
|
|
773
773
|
), h = i((m) => m.sqlGen), c = i((m) => m.actions.setSqlGen), r = i((m) => m.actions.setCardSql), o = i((m) => m.actions.setRunSql);
|
|
774
774
|
function f(m, u) {
|
|
@@ -776,15 +776,15 @@ function kn({ column: s }) {
|
|
|
776
776
|
c(S);
|
|
777
777
|
const d = ta(
|
|
778
778
|
S,
|
|
779
|
-
|
|
780
|
-
|
|
779
|
+
me(l || ""),
|
|
780
|
+
me(t)
|
|
781
781
|
);
|
|
782
782
|
d && (r(d), o(!0)), a(!1);
|
|
783
783
|
}
|
|
784
|
-
return /* @__PURE__ */ e.jsxs(
|
|
785
|
-
/* @__PURE__ */ e.jsx(
|
|
784
|
+
return /* @__PURE__ */ e.jsxs(Ke, { open: n, onOpenChange: a, children: [
|
|
785
|
+
/* @__PURE__ */ e.jsx(Ue, { asChild: !0, children: /* @__PURE__ */ e.jsx(Ka, { className: "h-4 w-4 cursor-pointer text-foreground/40" }) }),
|
|
786
786
|
/* @__PURE__ */ e.jsx(
|
|
787
|
-
|
|
787
|
+
Ge,
|
|
788
788
|
{
|
|
789
789
|
align: "center",
|
|
790
790
|
className: "w-18 rounded-md p-0 shadow-none",
|
|
@@ -835,7 +835,7 @@ function kn({ column: s }) {
|
|
|
835
835
|
] });
|
|
836
836
|
}
|
|
837
837
|
function ba({ column: s }) {
|
|
838
|
-
return /* @__PURE__ */ e.jsxs(
|
|
838
|
+
return /* @__PURE__ */ e.jsxs(ws, { children: [
|
|
839
839
|
/* @__PURE__ */ e.jsx(Ua, { asChild: !0, children: Ga.includes(s.data_type.toLowerCase()) ? (
|
|
840
840
|
// <span className=" font-thin">T</span>
|
|
841
841
|
/* @__PURE__ */ e.jsx(Ds, { className: "size-3" })
|
|
@@ -843,7 +843,7 @@ function ba({ column: s }) {
|
|
|
843
843
|
//
|
|
844
844
|
/* @__PURE__ */ e.jsx(nn, { className: "size-3" })
|
|
845
845
|
) : Ja.includes(s.data_type.toLowerCase()) ? /* @__PURE__ */ e.jsx(Qa, { className: "size-3" }) : Wa.includes(s.data_type.toLowerCase()) ? /* @__PURE__ */ e.jsx(bn, { className: "size-3" }) : /* @__PURE__ */ e.jsx(pn, { className: "size-3" }) }),
|
|
846
|
-
/* @__PURE__ */ e.jsx(
|
|
846
|
+
/* @__PURE__ */ e.jsx(zs, { children: /* @__PURE__ */ e.jsx("p", { className: "font-mono text-xs", children: s.data_type }) })
|
|
847
847
|
] });
|
|
848
848
|
}
|
|
849
849
|
function wn({
|
|
@@ -866,7 +866,7 @@ function wn({
|
|
|
866
866
|
function z(N) {
|
|
867
867
|
const F = aa(N, l);
|
|
868
868
|
S(F);
|
|
869
|
-
const A = ta(F,
|
|
869
|
+
const A = ta(F, me(s), me(n));
|
|
870
870
|
A && (x(A), u(!0));
|
|
871
871
|
}
|
|
872
872
|
function C() {
|
|
@@ -882,12 +882,12 @@ function wn({
|
|
|
882
882
|
databaseName: c,
|
|
883
883
|
schemaName: r,
|
|
884
884
|
tableName: o
|
|
885
|
-
},
|
|
885
|
+
}, q = [...f || [], F].filter(
|
|
886
886
|
(M, U, P) => P.findIndex(
|
|
887
887
|
(I) => I.connectinonId === M.connectinonId && I.tableName === M.tableName
|
|
888
888
|
) === U
|
|
889
889
|
);
|
|
890
|
-
m(
|
|
890
|
+
m(q), ps.success(`Added '${o}' to AI Scope`, {
|
|
891
891
|
position: "top-right",
|
|
892
892
|
duration: 2500,
|
|
893
893
|
richColors: !0
|
|
@@ -896,7 +896,7 @@ function wn({
|
|
|
896
896
|
const F = (f || []).filter(
|
|
897
897
|
(A) => A.connectinonId !== h && A.tableName !== o
|
|
898
898
|
);
|
|
899
|
-
m(F),
|
|
899
|
+
m(F), ps(`Removed '${o}' from AI Scope`, {
|
|
900
900
|
position: "top-right",
|
|
901
901
|
duration: 2e3,
|
|
902
902
|
richColors: !0
|
|
@@ -904,14 +904,14 @@ function wn({
|
|
|
904
904
|
}
|
|
905
905
|
}
|
|
906
906
|
function v() {
|
|
907
|
-
let F =
|
|
907
|
+
let F = fs(s, n);
|
|
908
908
|
((M) => M.charAt(0) === M.charAt(0).toUpperCase())(n) && (F = `"${n}"`), d(!1);
|
|
909
|
-
const
|
|
910
|
-
x(
|
|
909
|
+
const q = j === "MSSQL" ? `SELECT top 10 * FROM ${F}` : `SELECT * FROM ${F} LIMIT 10`;
|
|
910
|
+
x(q), u(!0);
|
|
911
911
|
}
|
|
912
912
|
function D() {
|
|
913
|
-
let F =
|
|
914
|
-
((
|
|
913
|
+
let F = fs(s, n);
|
|
914
|
+
((q) => q.charAt(0) === q.charAt(0).toUpperCase())(n) && (F = `"${n}"`), d(!1), x(`SELECT COUNT(*) as count FROM ${F}`), u(!0);
|
|
915
915
|
}
|
|
916
916
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex grow flex-col space-y-4 px-4", children: [
|
|
917
917
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-center gap-1", children: [
|
|
@@ -926,7 +926,7 @@ function wn({
|
|
|
926
926
|
children: /* @__PURE__ */ e.jsx(
|
|
927
927
|
Ya,
|
|
928
928
|
{
|
|
929
|
-
className:
|
|
929
|
+
className: Y("size-4", {
|
|
930
930
|
"text-primary": C(),
|
|
931
931
|
"text-muted-foreground": !C()
|
|
932
932
|
})
|
|
@@ -943,7 +943,7 @@ function wn({
|
|
|
943
943
|
variant: "secondary",
|
|
944
944
|
className: "flex",
|
|
945
945
|
children: [
|
|
946
|
-
t !== "Success" ? /* @__PURE__ */ e.jsx(
|
|
946
|
+
t !== "Success" ? /* @__PURE__ */ e.jsx(Be, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(gn, { className: "mr-2 size-4" }),
|
|
947
947
|
"Top 10"
|
|
948
948
|
]
|
|
949
949
|
}
|
|
@@ -957,14 +957,14 @@ function wn({
|
|
|
957
957
|
variant: "secondary",
|
|
958
958
|
className: "flex",
|
|
959
959
|
children: [
|
|
960
|
-
t !== "Success" ? /* @__PURE__ */ e.jsx(
|
|
960
|
+
t !== "Success" ? /* @__PURE__ */ e.jsx(Be, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(fn, { className: "mr-2 size-4" }),
|
|
961
961
|
"Count"
|
|
962
962
|
]
|
|
963
963
|
}
|
|
964
964
|
)
|
|
965
965
|
] }),
|
|
966
966
|
/* @__PURE__ */ e.jsxs(
|
|
967
|
-
|
|
967
|
+
Os,
|
|
968
968
|
{
|
|
969
969
|
className: "flex-1 basis-0 overflow-y-auto border-b border-t border-muted py-3",
|
|
970
970
|
children: [
|
|
@@ -972,7 +972,7 @@ function wn({
|
|
|
972
972
|
"div",
|
|
973
973
|
{
|
|
974
974
|
onClick: () => z(N),
|
|
975
|
-
className:
|
|
975
|
+
className: Y(
|
|
976
976
|
"mx-3 flex cursor-pointer items-center justify-between rounded px-2 py-[6px] text-sm transition-colors hover:bg-muted/50",
|
|
977
977
|
{
|
|
978
978
|
"bg-muted": Xa(N, l)
|
|
@@ -1003,9 +1003,9 @@ function wn({
|
|
|
1003
1003
|
] });
|
|
1004
1004
|
}
|
|
1005
1005
|
function ya(s, n) {
|
|
1006
|
-
var
|
|
1006
|
+
var Qe, Ve, We, Ye, p;
|
|
1007
1007
|
let a = Qt(() => [], []);
|
|
1008
|
-
const t =
|
|
1008
|
+
const t = ts().authToken || s, l = i(
|
|
1009
1009
|
(g) => g.selectedConnectionId
|
|
1010
1010
|
), h = i(
|
|
1011
1011
|
(g) => g.selectedDatamodelId
|
|
@@ -1039,9 +1039,9 @@ function ya(s, n) {
|
|
|
1039
1039
|
data: v,
|
|
1040
1040
|
isLoading: D,
|
|
1041
1041
|
isError: N
|
|
1042
|
-
} =
|
|
1042
|
+
} = ge({
|
|
1043
1043
|
queryKey: ["connections"],
|
|
1044
|
-
queryFn: () =>
|
|
1044
|
+
queryFn: () => ye(
|
|
1045
1045
|
"https://semaphor.cloud/api/v1/connections",
|
|
1046
1046
|
(t == null ? void 0 : t.accessToken) || ""
|
|
1047
1047
|
),
|
|
@@ -1050,10 +1050,10 @@ function ya(s, n) {
|
|
|
1050
1050
|
}), {
|
|
1051
1051
|
data: F,
|
|
1052
1052
|
isLoading: A,
|
|
1053
|
-
isError:
|
|
1054
|
-
} =
|
|
1053
|
+
isError: q
|
|
1054
|
+
} = ge({
|
|
1055
1055
|
queryKey: ["models", l],
|
|
1056
|
-
queryFn: () =>
|
|
1056
|
+
queryFn: () => ye(
|
|
1057
1057
|
"https://semaphor.cloud/api/v1/datamodels",
|
|
1058
1058
|
(t == null ? void 0 : t.accessToken) || "",
|
|
1059
1059
|
{
|
|
@@ -1066,13 +1066,13 @@ function ya(s, n) {
|
|
|
1066
1066
|
(g) => g.id === l
|
|
1067
1067
|
), U = M == null ? void 0 : M.type, P = (M == null ? void 0 : M.type) === "API" || (M == null ? void 0 : M.type) === "S3", {
|
|
1068
1068
|
data: I,
|
|
1069
|
-
isLoading:
|
|
1070
|
-
isFetching:
|
|
1071
|
-
isError:
|
|
1072
|
-
refetch:
|
|
1073
|
-
} =
|
|
1069
|
+
isLoading: le,
|
|
1070
|
+
isFetching: X,
|
|
1071
|
+
isError: Z,
|
|
1072
|
+
refetch: ee
|
|
1073
|
+
} = ge({
|
|
1074
1074
|
queryKey: ["databases", l],
|
|
1075
|
-
queryFn: () =>
|
|
1075
|
+
queryFn: () => ye(
|
|
1076
1076
|
"https://semaphor.cloud/api/v1/databases",
|
|
1077
1077
|
(t == null ? void 0 : t.accessToken) || "",
|
|
1078
1078
|
{
|
|
@@ -1083,13 +1083,13 @@ function ya(s, n) {
|
|
|
1083
1083
|
// !!selectedConnectionId && !isNonDbConnection, //currentConnection?.type !== 'API', // Only fetch if connectionId is present
|
|
1084
1084
|
}), {
|
|
1085
1085
|
data: K,
|
|
1086
|
-
isLoading:
|
|
1086
|
+
isLoading: se,
|
|
1087
1087
|
isFetching: b,
|
|
1088
1088
|
isError: y,
|
|
1089
1089
|
refetch: O
|
|
1090
|
-
} =
|
|
1090
|
+
} = ge({
|
|
1091
1091
|
queryKey: ["schemas", l, c],
|
|
1092
|
-
queryFn: () =>
|
|
1092
|
+
queryFn: () => ye(
|
|
1093
1093
|
"https://semaphor.cloud/api/v1/schemas",
|
|
1094
1094
|
(t == null ? void 0 : t.accessToken) || "",
|
|
1095
1095
|
{
|
|
@@ -1100,19 +1100,19 @@ function ya(s, n) {
|
|
|
1100
1100
|
enabled: !!l && !!c && !P && c !== "NA"
|
|
1101
1101
|
//currentConnection?.type !== 'API', // Only fetch if connectionId and database is present
|
|
1102
1102
|
}), {
|
|
1103
|
-
data:
|
|
1104
|
-
isLoading:
|
|
1105
|
-
isFetching:
|
|
1106
|
-
isError:
|
|
1103
|
+
data: B,
|
|
1104
|
+
isLoading: V,
|
|
1105
|
+
isFetching: te,
|
|
1106
|
+
isError: Ne,
|
|
1107
1107
|
refetch: Ce
|
|
1108
|
-
} =
|
|
1108
|
+
} = ge({
|
|
1109
1109
|
queryKey: [
|
|
1110
1110
|
"tables",
|
|
1111
1111
|
l,
|
|
1112
1112
|
c,
|
|
1113
1113
|
r
|
|
1114
1114
|
],
|
|
1115
|
-
queryFn: () =>
|
|
1115
|
+
queryFn: () => ye(
|
|
1116
1116
|
"https://semaphor.cloud/api/v1/tables",
|
|
1117
1117
|
(t == null ? void 0 : t.accessToken) || "",
|
|
1118
1118
|
{
|
|
@@ -1123,11 +1123,11 @@ function ya(s, n) {
|
|
|
1123
1123
|
),
|
|
1124
1124
|
enabled: z(U)
|
|
1125
1125
|
}), {
|
|
1126
|
-
data:
|
|
1127
|
-
isLoading:
|
|
1126
|
+
data: ae,
|
|
1127
|
+
isLoading: pe,
|
|
1128
1128
|
isFetching: J,
|
|
1129
|
-
isError:
|
|
1130
|
-
} =
|
|
1129
|
+
isError: ne
|
|
1130
|
+
} = ge({
|
|
1131
1131
|
queryKey: [
|
|
1132
1132
|
"columns",
|
|
1133
1133
|
l,
|
|
@@ -1135,7 +1135,7 @@ function ya(s, n) {
|
|
|
1135
1135
|
r,
|
|
1136
1136
|
o
|
|
1137
1137
|
],
|
|
1138
|
-
queryFn: () =>
|
|
1138
|
+
queryFn: () => ye(
|
|
1139
1139
|
"https://semaphor.cloud/api/v1/columns",
|
|
1140
1140
|
(t == null ? void 0 : t.accessToken) || "",
|
|
1141
1141
|
{
|
|
@@ -1158,7 +1158,7 @@ function ya(s, n) {
|
|
|
1158
1158
|
});
|
|
1159
1159
|
G(() => {
|
|
1160
1160
|
f(a);
|
|
1161
|
-
}, [
|
|
1161
|
+
}, [ae, f, a]), G(() => {
|
|
1162
1162
|
}, [
|
|
1163
1163
|
P,
|
|
1164
1164
|
j,
|
|
@@ -1167,8 +1167,8 @@ function ya(s, n) {
|
|
|
1167
1167
|
S,
|
|
1168
1168
|
M
|
|
1169
1169
|
]);
|
|
1170
|
-
const
|
|
1171
|
-
function
|
|
1170
|
+
const ie = (M == null ? void 0 : M.type) === "API" ? (Qe = M == null ? void 0 : M.type) == null ? void 0 : Qe.toLowerCase() : o || "", je = P ? "" : r || "";
|
|
1171
|
+
function oe(g) {
|
|
1172
1172
|
d(g), x("");
|
|
1173
1173
|
}
|
|
1174
1174
|
function Ie(g) {
|
|
@@ -1180,72 +1180,72 @@ function ya(s, n) {
|
|
|
1180
1180
|
function Se(g) {
|
|
1181
1181
|
u(g === "none" ? "" : g), g !== "none" && g !== "" && S("");
|
|
1182
1182
|
}
|
|
1183
|
-
I && ((Ve = I == null ? void 0 : I.databases) == null ? void 0 : Ve.length) > 0, K && ((
|
|
1183
|
+
I && ((Ve = I == null ? void 0 : I.databases) == null ? void 0 : Ve.length) > 0, K && ((We = K == null ? void 0 : K.schemas) == null ? void 0 : We.length) > 0, ae && ((Ye = ae == null ? void 0 : ae.columns) == null ? void 0 : Ye.length) > 0 && (a = ae.columns.map((g) => ({
|
|
1184
1184
|
...g,
|
|
1185
1185
|
data_type: g.data_type.toLowerCase()
|
|
1186
|
-
}))),
|
|
1187
|
-
const
|
|
1186
|
+
}))), Z && (a = []), (ne || N) && (a = []);
|
|
1187
|
+
const rs = v == null ? void 0 : v.connections.map(
|
|
1188
1188
|
(g) => ({
|
|
1189
1189
|
id: g.id,
|
|
1190
1190
|
name: g.name,
|
|
1191
1191
|
type: g.type
|
|
1192
1192
|
})
|
|
1193
|
-
),
|
|
1193
|
+
), Je = (p = F == null ? void 0 : F.datamodels) == null ? void 0 : p.map((g) => ({
|
|
1194
1194
|
id: g.id,
|
|
1195
1195
|
name: g.name
|
|
1196
|
-
})),
|
|
1196
|
+
})), ls = I == null ? void 0 : I.databases.map((g) => ({
|
|
1197
1197
|
id: g.database_name,
|
|
1198
1198
|
name: g.database_name
|
|
1199
|
-
})),
|
|
1199
|
+
})), is = K == null ? void 0 : K.schemas.map((g) => ({
|
|
1200
1200
|
id: g.schema_name,
|
|
1201
1201
|
name: g.schema_name
|
|
1202
|
-
})),
|
|
1202
|
+
})), os = B == null ? void 0 : B.tables.map((g) => ({
|
|
1203
1203
|
id: g.table_name,
|
|
1204
1204
|
name: g.table_name
|
|
1205
1205
|
}));
|
|
1206
1206
|
return {
|
|
1207
|
-
connectionItems:
|
|
1207
|
+
connectionItems: rs,
|
|
1208
1208
|
isConnectionsLoading: D,
|
|
1209
1209
|
isConnectionsError: N,
|
|
1210
|
-
modelItems:
|
|
1210
|
+
modelItems: Je,
|
|
1211
1211
|
isModelsLoading: A,
|
|
1212
|
-
isModelsError:
|
|
1213
|
-
databaseItems:
|
|
1214
|
-
isDatabasesLoadingOrFetching:
|
|
1215
|
-
isDatabaseError:
|
|
1216
|
-
schemaItems:
|
|
1217
|
-
isSchemaLoadingOrFetching:
|
|
1212
|
+
isModelsError: q,
|
|
1213
|
+
databaseItems: ls,
|
|
1214
|
+
isDatabasesLoadingOrFetching: le || X,
|
|
1215
|
+
isDatabaseError: Z,
|
|
1216
|
+
schemaItems: is,
|
|
1217
|
+
isSchemaLoadingOrFetching: se || b,
|
|
1218
1218
|
isSchemaError: y,
|
|
1219
|
-
tableItems:
|
|
1220
|
-
isTableLoadingOrFetching:
|
|
1221
|
-
isTableError:
|
|
1219
|
+
tableItems: os,
|
|
1220
|
+
isTableLoadingOrFetching: V || te,
|
|
1221
|
+
isTableError: Ne,
|
|
1222
1222
|
columns: a,
|
|
1223
|
-
isColumnsLoadingOrFetching:
|
|
1224
|
-
isColumnsError:
|
|
1223
|
+
isColumnsLoadingOrFetching: pe || J,
|
|
1224
|
+
isColumnsError: ne,
|
|
1225
1225
|
isNonDbConnection: P,
|
|
1226
1226
|
connectionType: U,
|
|
1227
|
-
tableName:
|
|
1228
|
-
schemaName:
|
|
1227
|
+
tableName: ie,
|
|
1228
|
+
schemaName: je,
|
|
1229
1229
|
handleConnectionChange: Vs,
|
|
1230
1230
|
handleDatamodelChange: Se,
|
|
1231
1231
|
handleDatabaseChange: Ie,
|
|
1232
|
-
handleSchemaChange:
|
|
1232
|
+
handleSchemaChange: oe
|
|
1233
1233
|
};
|
|
1234
1234
|
}
|
|
1235
1235
|
function va({
|
|
1236
1236
|
ColumnsComponent: s
|
|
1237
1237
|
}) {
|
|
1238
|
-
var
|
|
1238
|
+
var B;
|
|
1239
1239
|
const n = i(
|
|
1240
|
-
(
|
|
1240
|
+
(V) => V.selectedConnectionId
|
|
1241
1241
|
), a = i(
|
|
1242
|
-
(
|
|
1242
|
+
(V) => V.selectedDatamodelId
|
|
1243
1243
|
), t = i(
|
|
1244
|
-
(
|
|
1244
|
+
(V) => V.selectedDatabaseName
|
|
1245
1245
|
), l = i(
|
|
1246
|
-
(
|
|
1247
|
-
), h = i((
|
|
1248
|
-
(
|
|
1246
|
+
(V) => V.selectedSchemaName
|
|
1247
|
+
), h = i((V) => V.selectedTableName), c = i(
|
|
1248
|
+
(V) => V.actions.setSelectedTableName
|
|
1249
1249
|
), {
|
|
1250
1250
|
connectionItems: r,
|
|
1251
1251
|
modelItems: o,
|
|
@@ -1264,33 +1264,33 @@ function va({
|
|
|
1264
1264
|
isColumnsError: N,
|
|
1265
1265
|
isColumnsLoadingOrFetching: F,
|
|
1266
1266
|
isTableLoadingOrFetching: A,
|
|
1267
|
-
isTableError:
|
|
1267
|
+
isTableError: q,
|
|
1268
1268
|
connectionType: M,
|
|
1269
1269
|
isNonDbConnection: U,
|
|
1270
1270
|
handleConnectionChange: P,
|
|
1271
1271
|
handleDatabaseChange: I,
|
|
1272
|
-
handleSchemaChange:
|
|
1273
|
-
handleDatamodelChange:
|
|
1274
|
-
tableName:
|
|
1275
|
-
schemaName:
|
|
1272
|
+
handleSchemaChange: le,
|
|
1273
|
+
handleDatamodelChange: X,
|
|
1274
|
+
tableName: Z,
|
|
1275
|
+
schemaName: ee
|
|
1276
1276
|
} = ya();
|
|
1277
1277
|
function K() {
|
|
1278
|
-
return s ? s(
|
|
1278
|
+
return s ? s(ee, Z, S) : /* @__PURE__ */ e.jsx(
|
|
1279
1279
|
wn,
|
|
1280
1280
|
{
|
|
1281
|
-
schemaName:
|
|
1282
|
-
tableName:
|
|
1281
|
+
schemaName: ee,
|
|
1282
|
+
tableName: Z,
|
|
1283
1283
|
columns: S,
|
|
1284
1284
|
status: F ? "Loading..." : N ? "Error" : "Success"
|
|
1285
1285
|
}
|
|
1286
1286
|
);
|
|
1287
1287
|
}
|
|
1288
|
-
function
|
|
1288
|
+
function se() {
|
|
1289
1289
|
window.location.href = "mailto:support@semaphor.cloud?subject=Help&body=I need help with...";
|
|
1290
1290
|
}
|
|
1291
1291
|
function b() {
|
|
1292
1292
|
return M === "S3" || M === "API" || !n || n === "none" || a && a !== "none" ? null : /* @__PURE__ */ e.jsx(
|
|
1293
|
-
|
|
1293
|
+
Xe,
|
|
1294
1294
|
{
|
|
1295
1295
|
showNone: !0,
|
|
1296
1296
|
onChange: I,
|
|
@@ -1303,32 +1303,10 @@ function va({
|
|
|
1303
1303
|
);
|
|
1304
1304
|
}
|
|
1305
1305
|
function y() {
|
|
1306
|
-
if (n && (!t || t === "none") && (!a || a === "none"))
|
|
1307
|
-
return /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-3", children: [
|
|
1308
|
-
/* @__PURE__ */ e.jsx("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e.jsx(Pe, {}) }),
|
|
1309
|
-
/* @__PURE__ */ e.jsx("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e.jsx(R, { children: "OR" }) }),
|
|
1310
|
-
/* @__PURE__ */ e.jsx("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e.jsx(Pe, {}) })
|
|
1311
|
-
] });
|
|
1312
|
-
}
|
|
1313
|
-
function O() {
|
|
1314
|
-
return M === "S3" || M === "API" || !n || n === "none" || t && t !== "none" ? null : /* @__PURE__ */ e.jsx(
|
|
1315
|
-
Re,
|
|
1316
|
-
{
|
|
1317
|
-
showNone: !0,
|
|
1318
|
-
onChange: Q,
|
|
1319
|
-
isError: z,
|
|
1320
|
-
isLoading: x,
|
|
1321
|
-
items: o,
|
|
1322
|
-
value: a || "",
|
|
1323
|
-
title: "Dataset"
|
|
1324
|
-
}
|
|
1325
|
-
);
|
|
1326
|
-
}
|
|
1327
|
-
function $() {
|
|
1328
1306
|
return M === "S3" || M === "API" || !t || n === "none" || t === "none" ? null : /* @__PURE__ */ e.jsx(
|
|
1329
|
-
|
|
1307
|
+
Xe,
|
|
1330
1308
|
{
|
|
1331
|
-
onChange:
|
|
1309
|
+
onChange: le,
|
|
1332
1310
|
isError: D,
|
|
1333
1311
|
isLoading: v,
|
|
1334
1312
|
items: f,
|
|
@@ -1337,12 +1315,12 @@ function va({
|
|
|
1337
1315
|
}
|
|
1338
1316
|
);
|
|
1339
1317
|
}
|
|
1340
|
-
function
|
|
1318
|
+
function O() {
|
|
1341
1319
|
return M === "API" || !l || l === "none" || n === "none" || t === "none" ? null : /* @__PURE__ */ e.jsx(
|
|
1342
|
-
|
|
1320
|
+
Xe,
|
|
1343
1321
|
{
|
|
1344
1322
|
onChange: c,
|
|
1345
|
-
isError:
|
|
1323
|
+
isError: q,
|
|
1346
1324
|
items: u,
|
|
1347
1325
|
isLoading: A,
|
|
1348
1326
|
value: h || "",
|
|
@@ -1353,7 +1331,7 @@ function va({
|
|
|
1353
1331
|
return /* @__PURE__ */ e.jsxs("aside", { className: "xbg-red-100 flex grow flex-col justify-between", children: [
|
|
1354
1332
|
/* @__PURE__ */ e.jsxs("section", { className: "space-y-3 px-6 py-4", children: [
|
|
1355
1333
|
/* @__PURE__ */ e.jsx(
|
|
1356
|
-
|
|
1334
|
+
Xe,
|
|
1357
1335
|
{
|
|
1358
1336
|
items: r,
|
|
1359
1337
|
title: "Connection",
|
|
@@ -1361,22 +1339,20 @@ function va({
|
|
|
1361
1339
|
onChange: P,
|
|
1362
1340
|
isLoading: d,
|
|
1363
1341
|
isError: j,
|
|
1364
|
-
connectionTooltip: ((
|
|
1365
|
-
(
|
|
1366
|
-
)) == null ? void 0 :
|
|
1342
|
+
connectionTooltip: ((B = r == null ? void 0 : r.find(
|
|
1343
|
+
(V) => V.id === n
|
|
1344
|
+
)) == null ? void 0 : B.type) || ""
|
|
1367
1345
|
}
|
|
1368
1346
|
),
|
|
1369
|
-
O(),
|
|
1370
|
-
y(),
|
|
1371
1347
|
b(),
|
|
1372
|
-
|
|
1373
|
-
|
|
1348
|
+
y(),
|
|
1349
|
+
O()
|
|
1374
1350
|
] }),
|
|
1375
1351
|
K(),
|
|
1376
1352
|
/* @__PURE__ */ e.jsx("div", { className: "flex items-end justify-center gap-2 px-6 py-4", children: /* @__PURE__ */ e.jsxs(
|
|
1377
1353
|
k,
|
|
1378
1354
|
{
|
|
1379
|
-
onClick:
|
|
1355
|
+
onClick: se,
|
|
1380
1356
|
size: "sm",
|
|
1381
1357
|
variant: "secondary",
|
|
1382
1358
|
className: "w-full",
|
|
@@ -1427,7 +1403,7 @@ function Fn({
|
|
|
1427
1403
|
]
|
|
1428
1404
|
}
|
|
1429
1405
|
),
|
|
1430
|
-
/* @__PURE__ */ e.jsx(
|
|
1406
|
+
/* @__PURE__ */ e.jsx(Os, { className: " min-h-0 max-h-[250px] overflow-scroll ", children: /* @__PURE__ */ e.jsx("p", { className: " overflow-auto text-sm leading-relaxed font-mono ", children: s }) })
|
|
1431
1407
|
] }) }) })
|
|
1432
1408
|
] });
|
|
1433
1409
|
}
|
|
@@ -1437,12 +1413,12 @@ function On({
|
|
|
1437
1413
|
checked: a
|
|
1438
1414
|
}) {
|
|
1439
1415
|
return /* @__PURE__ */ e.jsxs("div", { className: "xbg-red-100 ml-6 flex items-center gap-2", children: [
|
|
1440
|
-
/* @__PURE__ */ e.jsx(
|
|
1416
|
+
/* @__PURE__ */ e.jsx(Pe, { checked: a, onCheckedChange: n }),
|
|
1441
1417
|
/* @__PURE__ */ e.jsx("label", { className: "text-xs leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", children: s })
|
|
1442
1418
|
] });
|
|
1443
1419
|
}
|
|
1444
1420
|
function Mn() {
|
|
1445
|
-
const { authToken: s } =
|
|
1421
|
+
const { authToken: s } = ts(), n = $e(null), a = i((r) => r.applyFilters), [t, l] = T(""), h = i((r) => r.filterValues), c = i((r) => r.card.sql);
|
|
1446
1422
|
return /* @__PURE__ */ e.jsxs(
|
|
1447
1423
|
la,
|
|
1448
1424
|
{
|
|
@@ -1483,7 +1459,7 @@ function Mn() {
|
|
|
1483
1459
|
}
|
|
1484
1460
|
);
|
|
1485
1461
|
}
|
|
1486
|
-
const
|
|
1462
|
+
const Tn = `
|
|
1487
1463
|
|
|
1488
1464
|
Use the following syntax to create a chart query. Please replace the x-axis, y-axis, stack-by, label, and measure with the actual column names of the table.
|
|
1489
1465
|
|
|
@@ -1530,7 +1506,7 @@ SELECT label, measure FROM table
|
|
|
1530
1506
|
- Label - Category
|
|
1531
1507
|
- Measure - Number
|
|
1532
1508
|
`;
|
|
1533
|
-
function
|
|
1509
|
+
function Ln({
|
|
1534
1510
|
open: s,
|
|
1535
1511
|
setOpen: n,
|
|
1536
1512
|
userInput: a,
|
|
@@ -1538,7 +1514,7 @@ function Tn({
|
|
|
1538
1514
|
triggerAIRun: l,
|
|
1539
1515
|
setTriggerAIRun: h
|
|
1540
1516
|
}) {
|
|
1541
|
-
const c =
|
|
1517
|
+
const c = $e(null), r = $e(null), { authToken: o } = ts(), [f, m] = T(!1), u = i((b) => b.actions.setCardSql), S = w((b) => b.dashboard.baseQueries), d = i((b) => b.actions.setRunSql), x = i((b) => b.actions.setCardType), [j, z] = T([]), C = i((b) => b.currentColumns), E = i((b) => b.card.sql), v = i((b) => b.selectedTableName), D = `
|
|
1542
1518
|
${a}
|
|
1543
1519
|
|
|
1544
1520
|
Database Query Dialect: ${v === "api" || v === "s3" ? "DuckDb" : ""}
|
|
@@ -1546,9 +1522,9 @@ function Tn({
|
|
|
1546
1522
|
Table Columns: ${C == null ? void 0 : C.map((b) => `${b.column_name} | ${b.data_type}`).join(", ")}
|
|
1547
1523
|
User SQL: ${E}
|
|
1548
1524
|
${S && `Base Queries: ${JSON.stringify(S)} `}`, N = ` When the user asks for a specific chart please use the following query structure to generate the chart query. Do not make up the column names. Use only the table columns provided above for the query. Replace x-axis, y-axis, and lables with the appropriate column names.
|
|
1549
|
-
Visual Query Syntax: ${
|
|
1525
|
+
Visual Query Syntax: ${Tn}`, { data: F, isLoading: A, isFetching: q, isError: M, refetch: U } = ge({
|
|
1550
1526
|
queryKey: ["ai-query"],
|
|
1551
|
-
queryFn: () =>
|
|
1527
|
+
queryFn: () => ye(
|
|
1552
1528
|
"https://semaphor.cloud/api/v1/ai",
|
|
1553
1529
|
(o == null ? void 0 : o.accessToken) || "",
|
|
1554
1530
|
{
|
|
@@ -1597,7 +1573,7 @@ function Tn({
|
|
|
1597
1573
|
G(() => {
|
|
1598
1574
|
l && (I(), h(!1));
|
|
1599
1575
|
}, [l, h]);
|
|
1600
|
-
const
|
|
1576
|
+
const le = {
|
|
1601
1577
|
//seleect a darker color
|
|
1602
1578
|
// color: '#000',
|
|
1603
1579
|
fontFamily: "Arial, sans-serif",
|
|
@@ -1605,14 +1581,14 @@ function Tn({
|
|
|
1605
1581
|
fontSize: 15,
|
|
1606
1582
|
// padding: '5px',
|
|
1607
1583
|
width: "100%"
|
|
1608
|
-
},
|
|
1584
|
+
}, X = {
|
|
1609
1585
|
// background: '#f6f8fa',
|
|
1610
1586
|
// color: '#000',
|
|
1611
1587
|
fontFamily: "monospace",
|
|
1612
1588
|
fontSize: 14,
|
|
1613
1589
|
lineHeight: 1.6
|
|
1614
1590
|
// padding: 20,
|
|
1615
|
-
},
|
|
1591
|
+
}, Z = {
|
|
1616
1592
|
// color: '#000',
|
|
1617
1593
|
fontFamily: "Arial, sans-serif",
|
|
1618
1594
|
lineHeight: 1.6,
|
|
@@ -1622,11 +1598,11 @@ function Tn({
|
|
|
1622
1598
|
marginLeft: 20,
|
|
1623
1599
|
// add bullet points for unordered lists
|
|
1624
1600
|
listStyleType: "disc"
|
|
1625
|
-
},
|
|
1601
|
+
}, ee = {
|
|
1626
1602
|
// Override how paragraphs are rendered
|
|
1627
|
-
p: ({ node: b, ...y }) => /* @__PURE__ */ e.jsx("p", { style:
|
|
1603
|
+
p: ({ node: b, ...y }) => /* @__PURE__ */ e.jsx("p", { style: le, ...y }),
|
|
1628
1604
|
code: ({ node: b, ...y }) => /* @__PURE__ */ e.jsx("code", { className: "rounded-sm bg-muted px-2 py-1 text-sm", ...y }),
|
|
1629
|
-
pre: ({ node: b, ...y }) => /* @__PURE__ */ e.jsxs("pre", { className: "space-y-2 rounded-sm bg-muted/50 p-3", style:
|
|
1605
|
+
pre: ({ node: b, ...y }) => /* @__PURE__ */ e.jsxs("pre", { className: "space-y-2 rounded-sm bg-muted/50 p-3", style: X, children: [
|
|
1630
1606
|
/* @__PURE__ */ e.jsx("code", { className: "whitespace-normal text-sm", children: y.children }),
|
|
1631
1607
|
/* @__PURE__ */ e.jsxs("div", { className: "flex justify-start gap-2", children: [
|
|
1632
1608
|
/* @__PURE__ */ e.jsx(k, { onClick: K, size: "sm", variant: "outline", children: /* @__PURE__ */ e.jsx(da, {}) }),
|
|
@@ -1634,8 +1610,8 @@ function Tn({
|
|
|
1634
1610
|
k,
|
|
1635
1611
|
{
|
|
1636
1612
|
onClick: (O) => {
|
|
1637
|
-
const
|
|
1638
|
-
|
|
1613
|
+
const B = K(O);
|
|
1614
|
+
B && (n(!1), u(B), d(!0));
|
|
1639
1615
|
},
|
|
1640
1616
|
size: "sm",
|
|
1641
1617
|
variant: "outline",
|
|
@@ -1644,7 +1620,7 @@ function Tn({
|
|
|
1644
1620
|
)
|
|
1645
1621
|
] })
|
|
1646
1622
|
] }),
|
|
1647
|
-
li: ({ node: b, ...y }) => /* @__PURE__ */ e.jsx("li", { style:
|
|
1623
|
+
li: ({ node: b, ...y }) => /* @__PURE__ */ e.jsx("li", { style: Z, ...y })
|
|
1648
1624
|
// You can add more overrides for other elements like h1, h2, etc.
|
|
1649
1625
|
};
|
|
1650
1626
|
function K(b) {
|
|
@@ -1652,9 +1628,9 @@ function Tn({
|
|
|
1652
1628
|
if (!y)
|
|
1653
1629
|
return;
|
|
1654
1630
|
const O = y.textContent || y.innerText;
|
|
1655
|
-
return navigator.clipboard.writeText(O).then(() => console.log("Text copied to clipboard")).catch((
|
|
1631
|
+
return navigator.clipboard.writeText(O).then(() => console.log("Text copied to clipboard")).catch((B) => console.error("Error in copying text: ", B)), O;
|
|
1656
1632
|
}
|
|
1657
|
-
function
|
|
1633
|
+
function se() {
|
|
1658
1634
|
return j == null ? void 0 : j.map((b, y) => b.role === "user" ? /* @__PURE__ */ e.jsxs(
|
|
1659
1635
|
"div",
|
|
1660
1636
|
{
|
|
@@ -1669,14 +1645,14 @@ function Tn({
|
|
|
1669
1645
|
at,
|
|
1670
1646
|
{
|
|
1671
1647
|
className: "w-full overflow-auto py-1",
|
|
1672
|
-
components:
|
|
1648
|
+
components: ee,
|
|
1673
1649
|
children: F == null ? void 0 : F.response.replace(/DuckDB/gi, "Semaphor")
|
|
1674
1650
|
},
|
|
1675
1651
|
y
|
|
1676
1652
|
) : /* @__PURE__ */ e.jsx("div", {}, y));
|
|
1677
1653
|
}
|
|
1678
|
-
return /* @__PURE__ */ e.jsxs(
|
|
1679
|
-
/* @__PURE__ */ e.jsx(
|
|
1654
|
+
return /* @__PURE__ */ e.jsxs(ys, { open: s, onOpenChange: n, children: [
|
|
1655
|
+
/* @__PURE__ */ e.jsx(vs, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
1680
1656
|
k,
|
|
1681
1657
|
{
|
|
1682
1658
|
size: "sm",
|
|
@@ -1686,20 +1662,20 @@ function Tn({
|
|
|
1686
1662
|
}
|
|
1687
1663
|
) }),
|
|
1688
1664
|
/* @__PURE__ */ e.jsxs(
|
|
1689
|
-
|
|
1665
|
+
Ns,
|
|
1690
1666
|
{
|
|
1691
1667
|
className: "flex flex-col justify-between overflow-auto sm:max-w-[425px] md:max-h-[625px] md:min-w-[625px]",
|
|
1692
1668
|
children: [
|
|
1693
|
-
/* @__PURE__ */ e.jsxs(
|
|
1694
|
-
/* @__PURE__ */ e.jsx(
|
|
1695
|
-
/* @__PURE__ */ e.jsx(
|
|
1669
|
+
/* @__PURE__ */ e.jsxs(Cs, { children: [
|
|
1670
|
+
/* @__PURE__ */ e.jsx(Ss, { children: "Assistant" }),
|
|
1671
|
+
/* @__PURE__ */ e.jsx(ks, { children: "What can I help you with?" })
|
|
1696
1672
|
] }),
|
|
1697
1673
|
/* @__PURE__ */ e.jsx(
|
|
1698
1674
|
"div",
|
|
1699
1675
|
{
|
|
1700
1676
|
ref: r,
|
|
1701
1677
|
className: "h-[625px] w-full overflow-auto border-t border-t-muted",
|
|
1702
|
-
children: /* @__PURE__ */ e.jsx("div", { className: "space-y-4 py-2 pr-3", role: "messages", children:
|
|
1678
|
+
children: /* @__PURE__ */ e.jsx("div", { className: "space-y-4 py-2 pr-3", role: "messages", children: se() })
|
|
1703
1679
|
}
|
|
1704
1680
|
),
|
|
1705
1681
|
/* @__PURE__ */ e.jsx(
|
|
@@ -1719,10 +1695,10 @@ function Tn({
|
|
|
1719
1695
|
const y = b.target, O = y.value.length;
|
|
1720
1696
|
y.setSelectionRange(O, O);
|
|
1721
1697
|
},
|
|
1722
|
-
className:
|
|
1698
|
+
className: Y(
|
|
1723
1699
|
"max-h-10 min-h-7 resize-none border-none focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0"
|
|
1724
1700
|
),
|
|
1725
|
-
disabled: A ||
|
|
1701
|
+
disabled: A || q,
|
|
1726
1702
|
value: a,
|
|
1727
1703
|
onChange: (b) => t(b.target.value)
|
|
1728
1704
|
}
|
|
@@ -1735,7 +1711,7 @@ function Tn({
|
|
|
1735
1711
|
size: "sm",
|
|
1736
1712
|
variant: "ghost",
|
|
1737
1713
|
onClick: I,
|
|
1738
|
-
children: !A && !
|
|
1714
|
+
children: !A && !q ? /* @__PURE__ */ e.jsx(st, {}) : /* @__PURE__ */ e.jsx(Be, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" })
|
|
1739
1715
|
}
|
|
1740
1716
|
)
|
|
1741
1717
|
] })
|
|
@@ -1752,7 +1728,7 @@ var Na = {
|
|
|
1752
1728
|
className: void 0,
|
|
1753
1729
|
style: void 0,
|
|
1754
1730
|
attr: void 0
|
|
1755
|
-
}, Js =
|
|
1731
|
+
}, Js = ue.createContext && /* @__PURE__ */ ue.createContext(Na), An = ["attr", "size", "title"];
|
|
1756
1732
|
function En(s, n) {
|
|
1757
1733
|
if (s == null)
|
|
1758
1734
|
return {};
|
|
@@ -1772,15 +1748,15 @@ function Dn(s, n) {
|
|
|
1772
1748
|
l = t[h], !(n.indexOf(l) >= 0) && (a[l] = s[l]);
|
|
1773
1749
|
return a;
|
|
1774
1750
|
}
|
|
1775
|
-
function
|
|
1776
|
-
return
|
|
1751
|
+
function ss() {
|
|
1752
|
+
return ss = Object.assign ? Object.assign.bind() : function(s) {
|
|
1777
1753
|
for (var n = 1; n < arguments.length; n++) {
|
|
1778
1754
|
var a = arguments[n];
|
|
1779
1755
|
for (var t in a)
|
|
1780
1756
|
Object.prototype.hasOwnProperty.call(a, t) && (s[t] = a[t]);
|
|
1781
1757
|
}
|
|
1782
1758
|
return s;
|
|
1783
|
-
},
|
|
1759
|
+
}, ss.apply(this, arguments);
|
|
1784
1760
|
}
|
|
1785
1761
|
function Qs(s, n) {
|
|
1786
1762
|
var a = Object.keys(s);
|
|
@@ -1792,7 +1768,7 @@ function Qs(s, n) {
|
|
|
1792
1768
|
}
|
|
1793
1769
|
return a;
|
|
1794
1770
|
}
|
|
1795
|
-
function
|
|
1771
|
+
function as(s) {
|
|
1796
1772
|
for (var n = 1; n < arguments.length; n++) {
|
|
1797
1773
|
var a = arguments[n] != null ? arguments[n] : {};
|
|
1798
1774
|
n % 2 ? Qs(Object(a), !0).forEach(function(t) {
|
|
@@ -1823,13 +1799,13 @@ function qn(s, n) {
|
|
|
1823
1799
|
return (n === "string" ? String : Number)(s);
|
|
1824
1800
|
}
|
|
1825
1801
|
function Ca(s) {
|
|
1826
|
-
return s && s.map((n, a) => /* @__PURE__ */
|
|
1802
|
+
return s && s.map((n, a) => /* @__PURE__ */ ue.createElement(n.tag, as({
|
|
1827
1803
|
key: a
|
|
1828
1804
|
}, n.attr), Ca(n.child)));
|
|
1829
1805
|
}
|
|
1830
|
-
function
|
|
1831
|
-
return (n) => /* @__PURE__ */
|
|
1832
|
-
attr:
|
|
1806
|
+
function xe(s) {
|
|
1807
|
+
return (n) => /* @__PURE__ */ ue.createElement(Rn, ss({
|
|
1808
|
+
attr: as({}, s.attr)
|
|
1833
1809
|
}, n), Ca(s.child));
|
|
1834
1810
|
}
|
|
1835
1811
|
function Rn(s) {
|
|
@@ -1839,27 +1815,27 @@ function Rn(s) {
|
|
|
1839
1815
|
size: l,
|
|
1840
1816
|
title: h
|
|
1841
1817
|
} = s, c = En(s, An), r = l || a.size || "1em", o;
|
|
1842
|
-
return a.className && (o = a.className), s.className && (o = (o ? o + " " : "") + s.className), /* @__PURE__ */
|
|
1818
|
+
return a.className && (o = a.className), s.className && (o = (o ? o + " " : "") + s.className), /* @__PURE__ */ ue.createElement("svg", ss({
|
|
1843
1819
|
stroke: "currentColor",
|
|
1844
1820
|
fill: "currentColor",
|
|
1845
1821
|
strokeWidth: "0"
|
|
1846
1822
|
}, a.attr, t, c, {
|
|
1847
1823
|
className: o,
|
|
1848
|
-
style:
|
|
1824
|
+
style: as(as({
|
|
1849
1825
|
color: s.color || a.color
|
|
1850
1826
|
}, a.style), s.style),
|
|
1851
1827
|
height: r,
|
|
1852
1828
|
width: r,
|
|
1853
1829
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1854
|
-
}), h && /* @__PURE__ */
|
|
1830
|
+
}), h && /* @__PURE__ */ ue.createElement("title", null, h), s.children);
|
|
1855
1831
|
};
|
|
1856
|
-
return Js !== void 0 ? /* @__PURE__ */
|
|
1832
|
+
return Js !== void 0 ? /* @__PURE__ */ ue.createElement(Js.Consumer, null, (a) => n(a)) : n(Na);
|
|
1857
1833
|
}
|
|
1858
1834
|
function _n(s) {
|
|
1859
|
-
return
|
|
1835
|
+
return xe({ tag: "svg", attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M439.8 200.5c-7.7-30.9-22.3-54.2-53.4-54.2h-40.1v47.4c0 36.8-31.2 67.8-66.8 67.8H172.7c-29.2 0-53.4 25-53.4 54.3v101.8c0 29 25.2 46 53.4 54.3 33.8 9.9 66.3 11.7 106.8 0 26.9-7.8 53.4-23.5 53.4-54.3v-40.7H226.2v-13.6h160.2c31.1 0 42.6-21.7 53.4-54.2 11.2-33.5 10.7-65.7 0-108.6zM286.2 404c11.1 0 20.1 9.1 20.1 20.3 0 11.3-9 20.4-20.1 20.4-11 0-20.1-9.2-20.1-20.4.1-11.3 9.1-20.3 20.1-20.3zM167.8 248.1h106.8c29.7 0 53.4-24.5 53.4-54.3V91.9c0-29-24.4-50.7-53.4-55.6-35.8-5.9-74.7-5.6-106.8.1-45.2 8-53.4 24.7-53.4 55.6v40.7h106.9v13.6h-147c-31.1 0-58.3 18.7-66.8 54.2-9.8 40.7-10.2 66.1 0 108.6 7.6 31.6 25.7 54.2 56.8 54.2H101v-48.8c0-35.3 30.5-66.4 66.8-66.4zm-6.7-142.6c-11.1 0-20.1-9.1-20.1-20.3.1-11.3 9-20.4 20.1-20.4 11 0 20.1 9.2 20.1 20.4s-9 20.3-20.1 20.3z" }, child: [] }] })(s);
|
|
1860
1836
|
}
|
|
1861
1837
|
function Hn() {
|
|
1862
|
-
const { theme: s } = nt(), n =
|
|
1838
|
+
const { theme: s } = nt(), n = $e(), a = $e(), [t, l] = T(!1), [h, c] = T(!1), [r, o] = T(!1), [f, m] = T(""), [u, S] = T(!1), { authToken: d } = ts();
|
|
1863
1839
|
w((p) => p.selectedSheetId);
|
|
1864
1840
|
const x = w((p) => p.dashboard.baseQueries), j = i((p) => p.card), z = w((p) => p.theme), C = i((p) => p.isShowingVisual), E = i(
|
|
1865
1841
|
(p) => p.selectedConnectionId
|
|
@@ -1871,36 +1847,36 @@ function Hn() {
|
|
|
1871
1847
|
w(
|
|
1872
1848
|
(p) => p.actions.updateFrameCard
|
|
1873
1849
|
);
|
|
1874
|
-
const N = i((p) => p.selectedTableName), F = i((p) => p.card.sql), A = i((p) => p.card.python),
|
|
1875
|
-
setCardCustomCfg:
|
|
1876
|
-
setQueryResultColumns:
|
|
1877
|
-
setFilterValues:
|
|
1878
|
-
setCardSql:
|
|
1850
|
+
const N = i((p) => p.selectedTableName), F = i((p) => p.card.sql), A = i((p) => p.card.python), q = rt(F, x), M = i((p) => p.selectedConnectionId), U = i((p) => p.frame), P = i((p) => p.filterValues), I = i((p) => p.applyFilters), {
|
|
1851
|
+
setCardCustomCfg: le,
|
|
1852
|
+
setQueryResultColumns: X,
|
|
1853
|
+
setFilterValues: Z,
|
|
1854
|
+
setCardSql: ee,
|
|
1879
1855
|
setCardPython: K,
|
|
1880
|
-
setQueryError:
|
|
1856
|
+
setQueryError: se,
|
|
1881
1857
|
setPythonStdOut: b,
|
|
1882
1858
|
setCardPreferences: y
|
|
1883
|
-
} = i((p) => p.actions), O = i((p) => p.onSave),
|
|
1859
|
+
} = i((p) => p.actions), O = i((p) => p.onSave), B = i(
|
|
1884
1860
|
(p) => p.actions.setApplyFilters
|
|
1885
|
-
),
|
|
1861
|
+
), V = i((p) => p.onClose), te = i((p) => p.actions.setCardData), Ne = i((p) => p.actions.setSqlGen), Ce = i((p) => p.runSql), ae = i((p) => p.actions.setRunSql), pe = i(
|
|
1886
1862
|
(p) => p.actions.setIsSqlRunning
|
|
1887
1863
|
), {
|
|
1888
1864
|
data: J,
|
|
1889
|
-
isLoading:
|
|
1890
|
-
isFetching:
|
|
1891
|
-
isSuccess:
|
|
1892
|
-
isError:
|
|
1865
|
+
isLoading: ne,
|
|
1866
|
+
isFetching: ie,
|
|
1867
|
+
isSuccess: je,
|
|
1868
|
+
isError: oe,
|
|
1893
1869
|
error: Ie,
|
|
1894
1870
|
status: Vs,
|
|
1895
1871
|
refetch: Se
|
|
1896
|
-
} =
|
|
1897
|
-
queryKey: [
|
|
1872
|
+
} = ge({
|
|
1873
|
+
queryKey: [q, A],
|
|
1898
1874
|
queryFn: () => ca(
|
|
1899
1875
|
"https://semaphor.cloud/api/v1/query",
|
|
1900
1876
|
(d == null ? void 0 : d.accessToken) || "",
|
|
1901
1877
|
{
|
|
1902
1878
|
connection_id: M,
|
|
1903
|
-
sql:
|
|
1879
|
+
sql: q,
|
|
1904
1880
|
python: A === Hs ? "" : A,
|
|
1905
1881
|
active_filters: I ? P : []
|
|
1906
1882
|
}
|
|
@@ -1909,39 +1885,39 @@ function Hn() {
|
|
|
1909
1885
|
retry: !1
|
|
1910
1886
|
});
|
|
1911
1887
|
G(() => {
|
|
1912
|
-
if (J && (
|
|
1888
|
+
if (J && (te(J.records), J.rowLimitExceeded && ps.error("Row limit (10,000) exceeded. Refine your query.", {
|
|
1913
1889
|
position: "top-center",
|
|
1914
1890
|
richColors: !0
|
|
1915
1891
|
}), b((J == null ? void 0 : J.output) || ""), J.records.length > 0)) {
|
|
1916
|
-
const { dimensionKeys: p } =
|
|
1917
|
-
|
|
1892
|
+
const { dimensionKeys: p } = gs(J.records);
|
|
1893
|
+
X(p);
|
|
1918
1894
|
}
|
|
1919
|
-
}, [J,
|
|
1920
|
-
Ce && (Se(),
|
|
1921
|
-
}, [Ce, Se,
|
|
1922
|
-
(
|
|
1895
|
+
}, [J, te, X, b]), G(() => {
|
|
1896
|
+
Ce && (Se(), ae(!1));
|
|
1897
|
+
}, [Ce, Se, ae]), G(() => {
|
|
1898
|
+
(ne || ie) && pe(!0), (oe || je) && pe(!1), oe ? (se(Ie.message), te([]), X([]), b("")) : se("");
|
|
1923
1899
|
}, [
|
|
1924
|
-
|
|
1925
|
-
|
|
1900
|
+
ne,
|
|
1901
|
+
ie,
|
|
1926
1902
|
J,
|
|
1927
1903
|
b,
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1904
|
+
oe,
|
|
1905
|
+
je,
|
|
1906
|
+
pe,
|
|
1907
|
+
te,
|
|
1908
|
+
X,
|
|
1909
|
+
se,
|
|
1934
1910
|
Ie
|
|
1935
1911
|
]);
|
|
1936
|
-
function
|
|
1937
|
-
|
|
1912
|
+
function rs() {
|
|
1913
|
+
ee(""), te([]), Ne({}), le(""), y({});
|
|
1938
1914
|
}
|
|
1939
|
-
const
|
|
1915
|
+
const Je = (p) => {
|
|
1940
1916
|
a.current = p;
|
|
1941
1917
|
};
|
|
1942
|
-
function
|
|
1918
|
+
function ls() {
|
|
1943
1919
|
let p = F;
|
|
1944
|
-
F && !F.includes("{{") && (p = zn(F),
|
|
1920
|
+
F && !F.includes("{{") && (p = zn(F), ee(p));
|
|
1945
1921
|
const g = {
|
|
1946
1922
|
...j,
|
|
1947
1923
|
lastSelectedSchema: D,
|
|
@@ -1952,44 +1928,44 @@ function Hn() {
|
|
|
1952
1928
|
sql: p,
|
|
1953
1929
|
customCfg: C ? j.customCfg : null
|
|
1954
1930
|
}, qe = U.cards.map(
|
|
1955
|
-
(
|
|
1931
|
+
(be) => be.id === j.id ? g : be
|
|
1956
1932
|
);
|
|
1957
1933
|
O == null || O({
|
|
1958
1934
|
...U,
|
|
1959
1935
|
cards: qe
|
|
1960
1936
|
});
|
|
1961
1937
|
}
|
|
1962
|
-
function
|
|
1963
|
-
|
|
1938
|
+
function is() {
|
|
1939
|
+
V == null || V();
|
|
1964
1940
|
}
|
|
1965
|
-
function
|
|
1941
|
+
function os(p) {
|
|
1966
1942
|
const g = getComputedStyle(
|
|
1967
1943
|
document.documentElement
|
|
1968
1944
|
).getPropertyValue(p);
|
|
1969
|
-
return
|
|
1945
|
+
return Qe(g);
|
|
1970
1946
|
}
|
|
1971
|
-
function
|
|
1972
|
-
const [g, qe,
|
|
1973
|
-
let
|
|
1974
|
-
0 <=
|
|
1975
|
-
const
|
|
1976
|
-
const
|
|
1977
|
-
return
|
|
1947
|
+
function Qe(p) {
|
|
1948
|
+
const [g, qe, be] = p.split(" "), Q = parseFloat(g), Da = parseFloat(qe), Ia = parseFloat(be), Va = Da / 100, qs = Ia / 100, fe = (1 - Math.abs(2 * qs - 1)) * Va, ke = fe * (1 - Math.abs(Q / 60 % 2 - 1)), cs = qs - fe / 2;
|
|
1949
|
+
let ce = 0, de = 0, he = 0;
|
|
1950
|
+
0 <= Q && Q < 60 ? (ce = fe, de = ke, he = 0) : 60 <= Q && Q < 120 ? (ce = ke, de = fe, he = 0) : 120 <= Q && Q < 180 ? (ce = 0, de = fe, he = ke) : 180 <= Q && Q < 240 ? (ce = 0, de = ke, he = fe) : 240 <= Q && Q < 300 ? (ce = ke, de = 0, he = fe) : 300 <= Q && Q < 360 && (ce = fe, de = 0, he = ke), ce = Math.round((ce + cs) * 255), de = Math.round((de + cs) * 255), he = Math.round((he + cs) * 255);
|
|
1951
|
+
const ds = (qa) => {
|
|
1952
|
+
const hs = qa.toString(16);
|
|
1953
|
+
return hs.length == 1 ? "0" + hs : hs;
|
|
1978
1954
|
};
|
|
1979
|
-
return `#${
|
|
1955
|
+
return `#${ds(ce)}${ds(de)}${ds(he)}`;
|
|
1980
1956
|
}
|
|
1981
1957
|
G(() => {
|
|
1982
1958
|
const p = n.current, g = a.current;
|
|
1983
1959
|
if (p) {
|
|
1984
|
-
const qe = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light",
|
|
1960
|
+
const qe = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light", be = z === "system" ? qe : z;
|
|
1985
1961
|
p.editor.defineTheme("default", {
|
|
1986
1962
|
// base: theme === 'light' ? 'hc-light' : 'vs-dark',
|
|
1987
|
-
base:
|
|
1963
|
+
base: be === "light" ? "vs" : "vs-dark",
|
|
1988
1964
|
inherit: !0,
|
|
1989
1965
|
rules: [],
|
|
1990
1966
|
colors: {
|
|
1991
1967
|
// 'editor.background': activeTheme === 'light' ? '#ffffff' : '#020817',
|
|
1992
|
-
"editor.background":
|
|
1968
|
+
"editor.background": be === "light" ? "#ffffff" : os("--semaphor-background")
|
|
1993
1969
|
}
|
|
1994
1970
|
}), p.editor.setTheme("default");
|
|
1995
1971
|
}
|
|
@@ -2004,7 +1980,7 @@ function Hn() {
|
|
|
2004
1980
|
function Ve(p) {
|
|
2005
1981
|
n.current = p;
|
|
2006
1982
|
}
|
|
2007
|
-
function
|
|
1983
|
+
function We() {
|
|
2008
1984
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2009
1985
|
h && /* @__PURE__ */ e.jsx(
|
|
2010
1986
|
"div",
|
|
@@ -2017,13 +1993,13 @@ function Hn() {
|
|
|
2017
1993
|
On,
|
|
2018
1994
|
{
|
|
2019
1995
|
checked: I,
|
|
2020
|
-
onCheckedChange: () =>
|
|
1996
|
+
onCheckedChange: () => B(!I),
|
|
2021
1997
|
text: "Apply Filters"
|
|
2022
1998
|
}
|
|
2023
1999
|
),
|
|
2024
2000
|
/* @__PURE__ */ e.jsx(Mn, {}),
|
|
2025
2001
|
P && h && /* @__PURE__ */ e.jsx(
|
|
2026
|
-
|
|
2002
|
+
_e,
|
|
2027
2003
|
{
|
|
2028
2004
|
onClick: () => c(!1),
|
|
2029
2005
|
className: "bg-background/50 text-foreground/50 hover:cursor-pointer hover:text-foreground"
|
|
@@ -2031,13 +2007,13 @@ function Hn() {
|
|
|
2031
2007
|
)
|
|
2032
2008
|
] }),
|
|
2033
2009
|
/* @__PURE__ */ e.jsx(
|
|
2034
|
-
|
|
2010
|
+
Re,
|
|
2035
2011
|
{
|
|
2036
2012
|
theme: "default",
|
|
2037
2013
|
onChange: (p) => {
|
|
2038
2014
|
if (p)
|
|
2039
2015
|
try {
|
|
2040
|
-
JSON.parse(p),
|
|
2016
|
+
JSON.parse(p), Z(JSON.parse(p));
|
|
2041
2017
|
} catch {
|
|
2042
2018
|
}
|
|
2043
2019
|
},
|
|
@@ -2068,7 +2044,7 @@ function Hn() {
|
|
|
2068
2044
|
xa,
|
|
2069
2045
|
{
|
|
2070
2046
|
onClick: () => c(!0),
|
|
2071
|
-
className:
|
|
2047
|
+
className: Y(
|
|
2072
2048
|
"absolute bottom-4 right-6 h-3 w-3 text-foreground/50 hover:cursor-pointer hover:text-foreground",
|
|
2073
2049
|
{
|
|
2074
2050
|
"font-bold text-red-800": I
|
|
@@ -2078,9 +2054,9 @@ function Hn() {
|
|
|
2078
2054
|
)
|
|
2079
2055
|
] });
|
|
2080
2056
|
}
|
|
2081
|
-
function
|
|
2057
|
+
function Ye() {
|
|
2082
2058
|
return /* @__PURE__ */ e.jsxs(
|
|
2083
|
-
|
|
2059
|
+
js,
|
|
2084
2060
|
{
|
|
2085
2061
|
className: "flex grow pb-1",
|
|
2086
2062
|
direction: "vertical",
|
|
@@ -2100,12 +2076,12 @@ function Hn() {
|
|
|
2100
2076
|
role: "sql-container",
|
|
2101
2077
|
className: "relative flex w-[99%]",
|
|
2102
2078
|
children: /* @__PURE__ */ e.jsx(
|
|
2103
|
-
|
|
2079
|
+
Re,
|
|
2104
2080
|
{
|
|
2105
2081
|
theme: "default",
|
|
2106
2082
|
className: "pt-3",
|
|
2107
2083
|
onChange: (p) => {
|
|
2108
|
-
|
|
2084
|
+
ee(p);
|
|
2109
2085
|
},
|
|
2110
2086
|
value: F,
|
|
2111
2087
|
options: {
|
|
@@ -2123,7 +2099,7 @@ function Hn() {
|
|
|
2123
2099
|
defaultLanguage: "sql",
|
|
2124
2100
|
defaultValue: "SELECT * FROM table",
|
|
2125
2101
|
beforeMount: Ve,
|
|
2126
|
-
onMount:
|
|
2102
|
+
onMount: Je
|
|
2127
2103
|
}
|
|
2128
2104
|
)
|
|
2129
2105
|
}
|
|
@@ -2133,7 +2109,7 @@ function Hn() {
|
|
|
2133
2109
|
}
|
|
2134
2110
|
),
|
|
2135
2111
|
t && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2136
|
-
/* @__PURE__ */ e.jsx(
|
|
2112
|
+
/* @__PURE__ */ e.jsx(bs, { withHandle: !0, className: "border" }),
|
|
2137
2113
|
/* @__PURE__ */ e.jsxs(
|
|
2138
2114
|
ze,
|
|
2139
2115
|
{
|
|
@@ -2148,7 +2124,7 @@ function Hn() {
|
|
|
2148
2124
|
role: "python-container",
|
|
2149
2125
|
className: "relative flex w-[99%] pt-0",
|
|
2150
2126
|
children: /* @__PURE__ */ e.jsx(
|
|
2151
|
-
|
|
2127
|
+
Re,
|
|
2152
2128
|
{
|
|
2153
2129
|
className: "pt-3",
|
|
2154
2130
|
theme: "default",
|
|
@@ -2170,7 +2146,7 @@ function Hn() {
|
|
|
2170
2146
|
},
|
|
2171
2147
|
defaultLanguage: "python",
|
|
2172
2148
|
beforeMount: Ve,
|
|
2173
|
-
onMount:
|
|
2149
|
+
onMount: Je
|
|
2174
2150
|
}
|
|
2175
2151
|
)
|
|
2176
2152
|
}
|
|
@@ -2198,8 +2174,8 @@ function Hn() {
|
|
|
2198
2174
|
role: "sql-editor",
|
|
2199
2175
|
className: "relative flex grow justify-between overflow-y-scroll",
|
|
2200
2176
|
children: [
|
|
2201
|
-
|
|
2202
|
-
|
|
2177
|
+
Ye(),
|
|
2178
|
+
We()
|
|
2203
2179
|
]
|
|
2204
2180
|
}
|
|
2205
2181
|
),
|
|
@@ -2214,7 +2190,7 @@ function Hn() {
|
|
|
2214
2190
|
k,
|
|
2215
2191
|
{
|
|
2216
2192
|
title: "Shift + Enter",
|
|
2217
|
-
disabled:
|
|
2193
|
+
disabled: ne || ie,
|
|
2218
2194
|
onClick: () => {
|
|
2219
2195
|
Se();
|
|
2220
2196
|
},
|
|
@@ -2222,12 +2198,12 @@ function Hn() {
|
|
|
2222
2198
|
size: "sm",
|
|
2223
2199
|
variant: "outline",
|
|
2224
2200
|
children: [
|
|
2225
|
-
|
|
2201
|
+
ne || ie ? /* @__PURE__ */ e.jsx(Be, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(mn, { className: "mr-2 h-4 w-4" }),
|
|
2226
2202
|
"Run"
|
|
2227
2203
|
]
|
|
2228
2204
|
}
|
|
2229
2205
|
),
|
|
2230
|
-
|
|
2206
|
+
oe && /* @__PURE__ */ e.jsx(
|
|
2231
2207
|
Fn,
|
|
2232
2208
|
{
|
|
2233
2209
|
error: Ie.message,
|
|
@@ -2239,7 +2215,7 @@ function Hn() {
|
|
|
2239
2215
|
/* @__PURE__ */ e.jsxs(
|
|
2240
2216
|
k,
|
|
2241
2217
|
{
|
|
2242
|
-
onClick:
|
|
2218
|
+
onClick: rs,
|
|
2243
2219
|
className: "",
|
|
2244
2220
|
size: "sm",
|
|
2245
2221
|
variant: "outline",
|
|
@@ -2261,7 +2237,7 @@ function Hn() {
|
|
|
2261
2237
|
}
|
|
2262
2238
|
),
|
|
2263
2239
|
/* @__PURE__ */ e.jsx(
|
|
2264
|
-
|
|
2240
|
+
Ln,
|
|
2265
2241
|
{
|
|
2266
2242
|
open: r,
|
|
2267
2243
|
setOpen: o,
|
|
@@ -2276,7 +2252,7 @@ function Hn() {
|
|
|
2276
2252
|
/* @__PURE__ */ e.jsxs(
|
|
2277
2253
|
k,
|
|
2278
2254
|
{
|
|
2279
|
-
onClick:
|
|
2255
|
+
onClick: ls,
|
|
2280
2256
|
size: "sm",
|
|
2281
2257
|
variant: "outline",
|
|
2282
2258
|
children: [
|
|
@@ -2288,12 +2264,12 @@ function Hn() {
|
|
|
2288
2264
|
/* @__PURE__ */ e.jsxs(
|
|
2289
2265
|
k,
|
|
2290
2266
|
{
|
|
2291
|
-
onClick:
|
|
2267
|
+
onClick: is,
|
|
2292
2268
|
className: "w-full",
|
|
2293
2269
|
size: "sm",
|
|
2294
2270
|
variant: "outline",
|
|
2295
2271
|
children: [
|
|
2296
|
-
/* @__PURE__ */ e.jsx(
|
|
2272
|
+
/* @__PURE__ */ e.jsx(_e, { className: "mr-2 size-4" }),
|
|
2297
2273
|
"Close"
|
|
2298
2274
|
]
|
|
2299
2275
|
}
|
|
@@ -2309,7 +2285,7 @@ function Hn() {
|
|
|
2309
2285
|
}
|
|
2310
2286
|
function Bn({ data: s }) {
|
|
2311
2287
|
var c;
|
|
2312
|
-
const [n, a] =
|
|
2288
|
+
const [n, a] = ue.useState([]), l = Object.keys(s[0]).map((r) => ({
|
|
2313
2289
|
// header: key,
|
|
2314
2290
|
accessorKey: r,
|
|
2315
2291
|
header: ({ column: o }) => {
|
|
@@ -2339,19 +2315,19 @@ function Bn({ data: s }) {
|
|
|
2339
2315
|
}
|
|
2340
2316
|
});
|
|
2341
2317
|
return /* @__PURE__ */ e.jsxs(dt, { children: [
|
|
2342
|
-
/* @__PURE__ */ e.jsx(ht, { children: h.getHeaderGroups().map((r) => /* @__PURE__ */ e.jsx(
|
|
2318
|
+
/* @__PURE__ */ e.jsx(ht, { children: h.getHeaderGroups().map((r) => /* @__PURE__ */ e.jsx(ms, { children: r.headers.map((o) => /* @__PURE__ */ e.jsx(mt, { className: "sticky top-0 bg-muted", children: o.isPlaceholder ? null : Bs(
|
|
2343
2319
|
o.column.columnDef.header,
|
|
2344
2320
|
o.getContext()
|
|
2345
2321
|
) }, o.id)) }, r.id)) }),
|
|
2346
2322
|
/* @__PURE__ */ e.jsx(ut, { children: (c = h.getRowModel().rows) != null && c.length ? h.getRowModel().rows.map((r) => /* @__PURE__ */ e.jsx(
|
|
2347
|
-
|
|
2323
|
+
ms,
|
|
2348
2324
|
{
|
|
2349
2325
|
className: "whitespace-nowrap py-2",
|
|
2350
2326
|
"data-state": r.getIsSelected() && "selected",
|
|
2351
2327
|
children: r.getVisibleCells().map((o) => /* @__PURE__ */ e.jsx($s, { children: Bs(o.column.columnDef.cell, o.getContext()) }, o.id))
|
|
2352
2328
|
},
|
|
2353
2329
|
r.id
|
|
2354
|
-
)) : /* @__PURE__ */ e.jsx(
|
|
2330
|
+
)) : /* @__PURE__ */ e.jsx(ms, { children: /* @__PURE__ */ e.jsx($s, { colSpan: l.length, className: "h-24 text-center", children: "No results." }) }) })
|
|
2355
2331
|
] });
|
|
2356
2332
|
}
|
|
2357
2333
|
function Sa({
|
|
@@ -2360,7 +2336,7 @@ function Sa({
|
|
|
2360
2336
|
...n
|
|
2361
2337
|
}) {
|
|
2362
2338
|
var c;
|
|
2363
|
-
|
|
2339
|
+
ue.useState(0);
|
|
2364
2340
|
const a = w((r) => r.themeStyle), t = i((r) => r.card), l = i((r) => r.actions.setCard);
|
|
2365
2341
|
if (G(() => {
|
|
2366
2342
|
}, [
|
|
@@ -2383,7 +2359,7 @@ function Sa({
|
|
|
2383
2359
|
gt,
|
|
2384
2360
|
{
|
|
2385
2361
|
role: "editor-visual-card",
|
|
2386
|
-
className:
|
|
2362
|
+
className: Y("relative flex h-full flex-col rounded-none", s),
|
|
2387
2363
|
...n,
|
|
2388
2364
|
children: [
|
|
2389
2365
|
/* @__PURE__ */ e.jsxs(jt, { className: "py-4", children: [
|
|
@@ -2426,7 +2402,7 @@ function Sa({
|
|
|
2426
2402
|
);
|
|
2427
2403
|
}
|
|
2428
2404
|
function $n() {
|
|
2429
|
-
const [s, n] =
|
|
2405
|
+
const [s, n] = T(!1), [a, t] = T(""), [l, h] = T(""), [c, r] = T(""), [o, f] = T(""), m = i((v) => v.card), u = i(
|
|
2430
2406
|
(v) => v.card.customCfg
|
|
2431
2407
|
), { setCardCustomCfg: S, setCustomVisualCode: d } = kt();
|
|
2432
2408
|
function x(v) {
|
|
@@ -2435,8 +2411,8 @@ function $n() {
|
|
|
2435
2411
|
...v,
|
|
2436
2412
|
data: {
|
|
2437
2413
|
...v == null ? void 0 : v.data,
|
|
2438
|
-
datasets: (A = (F = v == null ? void 0 : v.data) == null ? void 0 : F.datasets) == null ? void 0 : A.map((
|
|
2439
|
-
...
|
|
2414
|
+
datasets: (A = (F = v == null ? void 0 : v.data) == null ? void 0 : F.datasets) == null ? void 0 : A.map((q) => ({
|
|
2415
|
+
...q,
|
|
2440
2416
|
data: []
|
|
2441
2417
|
}))
|
|
2442
2418
|
}
|
|
@@ -2475,8 +2451,8 @@ function $n() {
|
|
|
2475
2451
|
}
|
|
2476
2452
|
return a ? (v = x(JSON.parse(a)), v) : "";
|
|
2477
2453
|
}
|
|
2478
|
-
return /* @__PURE__ */ e.jsxs(
|
|
2479
|
-
/* @__PURE__ */ e.jsx(
|
|
2454
|
+
return /* @__PURE__ */ e.jsxs(ys, { open: s, onOpenChange: n, children: [
|
|
2455
|
+
/* @__PURE__ */ e.jsx(vs, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
2480
2456
|
k,
|
|
2481
2457
|
{
|
|
2482
2458
|
onClick: j,
|
|
@@ -2487,14 +2463,14 @@ function $n() {
|
|
|
2487
2463
|
}
|
|
2488
2464
|
) }),
|
|
2489
2465
|
/* @__PURE__ */ e.jsxs(
|
|
2490
|
-
|
|
2466
|
+
Ns,
|
|
2491
2467
|
{
|
|
2492
2468
|
className: "max-h-[70vh] min-h-[70vh] overflow-auto sm:min-w-[900px] lg:min-w-[1200px]",
|
|
2493
2469
|
children: [
|
|
2494
|
-
/* @__PURE__ */ e.jsxs(
|
|
2470
|
+
/* @__PURE__ */ e.jsxs(Cs, { className: "", children: [
|
|
2495
2471
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2496
|
-
/* @__PURE__ */ e.jsx(
|
|
2497
|
-
/* @__PURE__ */ e.jsxs(
|
|
2472
|
+
/* @__PURE__ */ e.jsx(Ss, { children: "Customize Card" }),
|
|
2473
|
+
/* @__PURE__ */ e.jsxs(ws, { children: [
|
|
2498
2474
|
/* @__PURE__ */ e.jsx(sa, { children: /* @__PURE__ */ e.jsx(
|
|
2499
2475
|
rn,
|
|
2500
2476
|
{
|
|
@@ -2504,10 +2480,10 @@ function $n() {
|
|
|
2504
2480
|
className: "size-3 cursor-pointer text-muted-foreground/70 transition-colors hover:text-muted-foreground"
|
|
2505
2481
|
}
|
|
2506
2482
|
) }),
|
|
2507
|
-
/* @__PURE__ */ e.jsx(
|
|
2483
|
+
/* @__PURE__ */ e.jsx(zs, { side: "right", align: "center", children: /* @__PURE__ */ e.jsx("p", { className: "text-xs", children: "Copy Card ID" }) })
|
|
2508
2484
|
] })
|
|
2509
2485
|
] }),
|
|
2510
|
-
/* @__PURE__ */ e.jsxs(
|
|
2486
|
+
/* @__PURE__ */ e.jsxs(ks, { children: [
|
|
2511
2487
|
"See the configuration options and documentation",
|
|
2512
2488
|
/* @__PURE__ */ e.jsx(
|
|
2513
2489
|
"a",
|
|
@@ -2524,15 +2500,15 @@ function $n() {
|
|
|
2524
2500
|
/* @__PURE__ */ e.jsx(Sa, { className: "w-1/2 rounded shadow-none" }),
|
|
2525
2501
|
/* @__PURE__ */ e.jsxs(zt, { defaultValue: "custom-config", className: "flex w-1/2 flex-col", children: [
|
|
2526
2502
|
/* @__PURE__ */ e.jsxs(Ft, { className: "justify-start rounded-sm rounded-b-none border border-b-0", children: [
|
|
2527
|
-
/* @__PURE__ */ e.jsxs(
|
|
2503
|
+
/* @__PURE__ */ e.jsxs(us, { value: "custom-config", children: [
|
|
2528
2504
|
u && /* @__PURE__ */ e.jsx(Ot, { className: "mr-1 h-5 w-5 text-green-600" }),
|
|
2529
2505
|
u ? "Custom Config" : "Default Config"
|
|
2530
2506
|
] }),
|
|
2531
|
-
/* @__PURE__ */ e.jsx(
|
|
2532
|
-
/* @__PURE__ */ e.jsx(
|
|
2507
|
+
/* @__PURE__ */ e.jsx(us, { className: "", value: "output", children: "Output" }),
|
|
2508
|
+
/* @__PURE__ */ e.jsx(us, { className: "", value: "custom-code", children: "Custom Code" })
|
|
2533
2509
|
] }),
|
|
2534
2510
|
/* @__PURE__ */ e.jsx(
|
|
2535
|
-
|
|
2511
|
+
xs,
|
|
2536
2512
|
{
|
|
2537
2513
|
className: "bg-red-x mt-0 grow rounded-b border border-t-0 p-2",
|
|
2538
2514
|
value: "output",
|
|
@@ -2547,12 +2523,12 @@ function $n() {
|
|
|
2547
2523
|
}
|
|
2548
2524
|
),
|
|
2549
2525
|
/* @__PURE__ */ e.jsx(
|
|
2550
|
-
|
|
2526
|
+
xs,
|
|
2551
2527
|
{
|
|
2552
2528
|
className: "mt-0 grow rounded-b border border-t-0",
|
|
2553
2529
|
value: "custom-config",
|
|
2554
2530
|
children: /* @__PURE__ */ e.jsx(
|
|
2555
|
-
|
|
2531
|
+
Re,
|
|
2556
2532
|
{
|
|
2557
2533
|
className: "h-full w-full overflow-hidden",
|
|
2558
2534
|
theme: "default",
|
|
@@ -2576,12 +2552,12 @@ function $n() {
|
|
|
2576
2552
|
}
|
|
2577
2553
|
),
|
|
2578
2554
|
/* @__PURE__ */ e.jsx(
|
|
2579
|
-
|
|
2555
|
+
xs,
|
|
2580
2556
|
{
|
|
2581
2557
|
className: "mt-0 grow rounded-b border border-t-0",
|
|
2582
2558
|
value: "custom-code",
|
|
2583
2559
|
children: /* @__PURE__ */ e.jsx(
|
|
2584
|
-
|
|
2560
|
+
Re,
|
|
2585
2561
|
{
|
|
2586
2562
|
className: "h-full w-full overflow-hidden",
|
|
2587
2563
|
theme: "default",
|
|
@@ -2607,7 +2583,7 @@ function $n() {
|
|
|
2607
2583
|
] })
|
|
2608
2584
|
] }),
|
|
2609
2585
|
/* @__PURE__ */ e.jsxs(Zs, { className: "flex items-center", children: [
|
|
2610
|
-
/* @__PURE__ */ e.jsx(
|
|
2586
|
+
/* @__PURE__ */ e.jsx($, { className: "mr-2 text-red-500", children: o }),
|
|
2611
2587
|
/* @__PURE__ */ e.jsx(
|
|
2612
2588
|
k,
|
|
2613
2589
|
{
|
|
@@ -2626,39 +2602,39 @@ function $n() {
|
|
|
2626
2602
|
] });
|
|
2627
2603
|
}
|
|
2628
2604
|
function ka(s) {
|
|
2629
|
-
return
|
|
2605
|
+
return xe({ tag: "svg", attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M926.8 397.1l-396-288a31.81 31.81 0 0 0-37.6 0l-396 288a31.99 31.99 0 0 0-11.6 35.8l151.3 466a32 32 0 0 0 30.4 22.1h489.5c13.9 0 26.1-8.9 30.4-22.1l151.3-466c4.2-13.2-.5-27.6-11.7-35.8zM838.6 417l-98.5 32-200-144.7V199.9L838.6 417zM466 567.2l-89.1 122.3-55.2-169.2L466 567.2zm-116.3-96.8L484 373.3v140.8l-134.3-43.7zM512 599.2l93.9 128.9H418.1L512 599.2zm28.1-225.9l134.2 97.1L540.1 514V373.3zM558 567.2l144.3-46.9-55.2 169.2L558 567.2zm-74-367.3v104.4L283.9 449l-98.5-32L484 199.9zM169.3 470.8l86.5 28.1 80.4 246.4-53.8 73.9-113.1-348.4zM327.1 853l50.3-69h269.3l50.3 69H327.1zm414.5-33.8l-53.8-73.9 80.4-246.4 86.5-28.1-113.1 348.4z" }, child: [] }] })(s);
|
|
2630
2606
|
}
|
|
2631
2607
|
function wa(s) {
|
|
2632
|
-
return
|
|
2608
|
+
return xe({ tag: "svg", attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M137.39,24.06A16,16,0,0,0,120,40V80.67a15.86,15.86,0,0,0,13.25,15.76A32,32,0,1,1,96,129.68c-.41-8.22,1.27-15,5-20.26h0a15.86,15.86,0,0,0-1.69-20.47L71.69,60.68a16,16,0,0,0-23.63,1.1A103.6,103.6,0,0,0,55,202.05,103.24,103.24,0,0,0,128,232h1.49A104.3,104.3,0,0,0,232,129.48C232.75,75.18,191.19,28.88,137.39,24.06ZM60.32,71.94l27.61,28.19,0,.06A43.29,43.29,0,0,0,80.44,120H40.36A87.13,87.13,0,0,1,60.32,71.94ZM40.37,136h40.3A48,48,0,0,0,120,175.34v40.3A88,88,0,0,1,40.37,136Zm149.77,54.14A87.45,87.45,0,0,1,136,215.61V175.34a47.55,47.55,0,0,0,24.73-12.23A48,48,0,0,0,136,80.66L136,40c45.52,4.08,80.67,43.28,80,89.25A87.45,87.45,0,0,1,190.14,190.14Z" }, child: [] }] })(s);
|
|
2633
2609
|
}
|
|
2634
2610
|
function za(s) {
|
|
2635
|
-
return
|
|
2611
|
+
return xe({ tag: "svg", attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm87.63,96H191.48A64.1,64.1,0,0,0,136,64.52V40.37A88.13,88.13,0,0,1,215.63,120ZM120,120H80.68A48.09,48.09,0,0,1,120,80.68Zm0,16v39.32A48.09,48.09,0,0,1,80.68,136Zm16,0h39.32A48.09,48.09,0,0,1,136,175.32Zm0-16V80.68A48.09,48.09,0,0,1,175.32,120ZM120,40.37V64.52A64.1,64.1,0,0,0,64.52,120H40.37A88.13,88.13,0,0,1,120,40.37ZM40.37,136H64.52A64.1,64.1,0,0,0,120,191.48v24.15A88.13,88.13,0,0,1,40.37,136ZM136,215.63V191.48A64.1,64.1,0,0,0,191.48,136h24.15A88.13,88.13,0,0,1,136,215.63Z" }, child: [] }] })(s);
|
|
2636
2612
|
}
|
|
2637
2613
|
function Fa(s) {
|
|
2638
|
-
return
|
|
2614
|
+
return xe({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }, child: [] }, { tag: "path", attr: { d: "M6 16m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" }, child: [] }, { tag: "path", attr: { d: "M16 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" }, child: [] }, { tag: "path", attr: { d: "M14.5 7.5m-4.5 0a4.5 4.5 0 1 0 9 0a4.5 4.5 0 1 0 -9 0" }, child: [] }] })(s);
|
|
2639
2615
|
}
|
|
2640
2616
|
function Oa(s) {
|
|
2641
|
-
return
|
|
2617
|
+
return xe({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "m2 19.99 7.5-7.51 4 4 7.09-7.97L22 9.92l-8.5 9.56-4-4-6 6.01-1.5-1.5zm1.5-4.5 6-6.01 4 4L22 3.92l-1.41-1.41-7.09 7.97-4-4L2 13.99l1.5 1.5z" }, child: [] }] })(s);
|
|
2642
2618
|
}
|
|
2643
2619
|
function Ma(s) {
|
|
2644
|
-
return
|
|
2645
|
-
}
|
|
2646
|
-
function La(s) {
|
|
2647
|
-
return pe({ tag: "svg", attr: { version: "1.2", baseProfile: "tiny", viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M4 18c-.552 0-1-.448-1-1v-6.382l-.553.276c-.495.248-1.095.046-1.342-.447-.247-.494-.046-1.094.448-1.342l2-1c.31-.155.678-.139.973.044.294.183.474.504.474.851v8c0 .552-.448 1-1 1zM13 18h-5c-.404 0-.769-.244-.924-.617-.155-.374-.069-.804.217-1.09l4-4c.254-.254.394-.591.394-.95 0-.358-.14-.695-.394-.949-.508-.508-1.39-.508-1.9.001-.253.252-.393.589-.393.948 0 .552-.448 1-1 1s-1-.448-1-1c0-.894.348-1.733.98-2.364 1.265-1.263 3.464-1.263 4.727.001.632.631.979 1.471.979 2.363 0 .893-.348 1.733-.979 2.364l-2.293 2.293h2.586c.552 0 1 .448 1 1s-.448 1-1 1zM20.955 12.377c.338-.457.545-1.016.545-1.627 0-1.517-1.234-2.75-2.75-2.75-1.031 0-1.966.569-2.44 1.484-.254.49-.063 1.094.428 1.348.49.254 1.094.062 1.348-.428.128-.249.383-.404.664-.404.414 0 .75.336.75.75s-.336.75-.75.75c-.552 0-1 .448-1 1s.448 1 1 1c.689 0 1.25.561 1.25 1.25s-.561 1.25-1.25 1.25-1.25-.561-1.25-1.25c0-.552-.448-1-1-1s-1 .448-1 1c0 1.792 1.458 3.25 3.25 3.25s3.25-1.458 3.25-3.25c0-.939-.406-1.779-1.045-2.373z" }, child: [] }] })(s);
|
|
2620
|
+
return xe({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "M4 9h4v11H4zM4 4h4v4H4zM10 7h4v4h-4zM16 10h4v4h-4zM16 15h4v5h-4zM10 12h4v8h-4z" }, child: [] }] })(s);
|
|
2648
2621
|
}
|
|
2649
2622
|
function Ta(s) {
|
|
2650
|
-
return
|
|
2623
|
+
return xe({ tag: "svg", attr: { version: "1.2", baseProfile: "tiny", viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M4 18c-.552 0-1-.448-1-1v-6.382l-.553.276c-.495.248-1.095.046-1.342-.447-.247-.494-.046-1.094.448-1.342l2-1c.31-.155.678-.139.973.044.294.183.474.504.474.851v8c0 .552-.448 1-1 1zM13 18h-5c-.404 0-.769-.244-.924-.617-.155-.374-.069-.804.217-1.09l4-4c.254-.254.394-.591.394-.95 0-.358-.14-.695-.394-.949-.508-.508-1.39-.508-1.9.001-.253.252-.393.589-.393.948 0 .552-.448 1-1 1s-1-.448-1-1c0-.894.348-1.733.98-2.364 1.265-1.263 3.464-1.263 4.727.001.632.631.979 1.471.979 2.363 0 .893-.348 1.733-.979 2.364l-2.293 2.293h2.586c.552 0 1 .448 1 1s-.448 1-1 1zM20.955 12.377c.338-.457.545-1.016.545-1.627 0-1.517-1.234-2.75-2.75-2.75-1.031 0-1.966.569-2.44 1.484-.254.49-.063 1.094.428 1.348.49.254 1.094.062 1.348-.428.128-.249.383-.404.664-.404.414 0 .75.336.75.75s-.336.75-.75.75c-.552 0-1 .448-1 1s.448 1 1 1c.689 0 1.25.561 1.25 1.25s-.561 1.25-1.25 1.25-1.25-.561-1.25-1.25c0-.552-.448-1-1-1s-1 .448-1 1c0 1.792 1.458 3.25 3.25 3.25s3.25-1.458 3.25-3.25c0-.939-.406-1.779-1.045-2.373z" }, child: [] }] })(s);
|
|
2624
|
+
}
|
|
2625
|
+
function La(s) {
|
|
2626
|
+
return xe({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M217 25v14h78V25h-78zm0 32v46h14V71h50v32h14V57h-78zm32 32v14h14V89h-14zm-64 32v46h30v-46h-30zm48 0v14h46v-14h-46zm64 0v46h30v-46h-30zm-64 32v14h46v-14h-46zm-80 32v46h62v-46h-62zm80 0v14h46v-14h-46zm64 0v46h62v-46h-62zm-64 32v14h46v-14h-46zm-112 32v46h94v-46h-94zm112 0v14h46v-14h-46zm64 0v46h94v-46h-94zm-64 32v14h46v-14h-46zM89 313v46h126v-46H89zm144 0v14h46v-14h-46zm64 0v46h126v-46H297zm-64 32v14h46v-14h-46zM57 377v46h158v-46H57zm176 0v14h46v-14h-46zm64 0v46h158v-46H297zm-64 32v14h46v-14h-46zM25 441v46h190v-46H25zm208 0v14h46v-14h-46zm64 0v46h190v-46H297zm-64 32v14h46v-14h-46z" }, child: [] }] })(s);
|
|
2651
2627
|
}
|
|
2652
2628
|
function Pn() {
|
|
2653
|
-
const [s, n] =
|
|
2629
|
+
const [s, n] = T(!1), a = i((o) => o.card.type), { setCardType: t, setCardPreferences: l, setChartOrientation: h } = i((o) => o.actions), c = i(
|
|
2654
2630
|
(o) => o.actions.setCardCustomCfg
|
|
2655
2631
|
);
|
|
2656
2632
|
function r(o) {
|
|
2657
2633
|
c(null), l({}), t(o), n(!1);
|
|
2658
2634
|
}
|
|
2659
|
-
return /* @__PURE__ */ e.jsxs(
|
|
2660
|
-
/* @__PURE__ */ e.jsx(
|
|
2661
|
-
/* @__PURE__ */ e.jsx(
|
|
2635
|
+
return /* @__PURE__ */ e.jsxs(Ke, { open: s, onOpenChange: n, children: [
|
|
2636
|
+
/* @__PURE__ */ e.jsx(Ue, { asChild: !0, children: /* @__PURE__ */ e.jsx(k, { size: "sm", variant: "outline", children: /* @__PURE__ */ e.jsx(Kn, { className: "h-4 w-4", chartType: a }) }) }),
|
|
2637
|
+
/* @__PURE__ */ e.jsx(Ge, { className: "w-50", children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-3 place-items-center", children: [
|
|
2662
2638
|
/* @__PURE__ */ e.jsx(
|
|
2663
2639
|
k,
|
|
2664
2640
|
{
|
|
@@ -2751,7 +2727,7 @@ function Pn() {
|
|
|
2751
2727
|
{
|
|
2752
2728
|
onClick: () => r("pyramid"),
|
|
2753
2729
|
variant: "ghost",
|
|
2754
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2730
|
+
children: /* @__PURE__ */ e.jsx(La, { className: "size-5" })
|
|
2755
2731
|
}
|
|
2756
2732
|
),
|
|
2757
2733
|
/* @__PURE__ */ e.jsx(
|
|
@@ -2767,7 +2743,7 @@ function Pn() {
|
|
|
2767
2743
|
{
|
|
2768
2744
|
onClick: () => r("table"),
|
|
2769
2745
|
variant: "ghost",
|
|
2770
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2746
|
+
children: /* @__PURE__ */ e.jsx(Fs, { className: "size-5" })
|
|
2771
2747
|
}
|
|
2772
2748
|
),
|
|
2773
2749
|
/* @__PURE__ */ e.jsx(
|
|
@@ -2775,7 +2751,7 @@ function Pn() {
|
|
|
2775
2751
|
{
|
|
2776
2752
|
onClick: () => r("kpi"),
|
|
2777
2753
|
variant: "ghost",
|
|
2778
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2754
|
+
children: /* @__PURE__ */ e.jsx(Ta, { className: "size-6" })
|
|
2779
2755
|
}
|
|
2780
2756
|
),
|
|
2781
2757
|
/* @__PURE__ */ e.jsx(
|
|
@@ -2812,15 +2788,15 @@ function Kn({ chartType: s, className: n }) {
|
|
|
2812
2788
|
case "polarArea":
|
|
2813
2789
|
return /* @__PURE__ */ e.jsx(za, { className: n });
|
|
2814
2790
|
case "pyramid":
|
|
2815
|
-
return /* @__PURE__ */ e.jsx(
|
|
2791
|
+
return /* @__PURE__ */ e.jsx(La, { className: n });
|
|
2816
2792
|
case "range":
|
|
2817
2793
|
return /* @__PURE__ */ e.jsx(pa, { className: n });
|
|
2818
2794
|
case "kpi":
|
|
2819
|
-
return /* @__PURE__ */ e.jsx(
|
|
2795
|
+
return /* @__PURE__ */ e.jsx(Ta, { className: n });
|
|
2820
2796
|
case "text":
|
|
2821
2797
|
return /* @__PURE__ */ e.jsx(Ds, { className: n });
|
|
2822
2798
|
default:
|
|
2823
|
-
return /* @__PURE__ */ e.jsx(
|
|
2799
|
+
return /* @__PURE__ */ e.jsx(Fs, { className: n });
|
|
2824
2800
|
}
|
|
2825
2801
|
}
|
|
2826
2802
|
function Un() {
|
|
@@ -2829,12 +2805,12 @@ function Un() {
|
|
|
2829
2805
|
), n = i(
|
|
2830
2806
|
(a) => a.actions.setCardRefreshInterval
|
|
2831
2807
|
);
|
|
2832
|
-
return /* @__PURE__ */ e.jsxs(
|
|
2833
|
-
/* @__PURE__ */ e.jsx(
|
|
2834
|
-
/* @__PURE__ */ e.jsx(
|
|
2835
|
-
/* @__PURE__ */ e.jsx(
|
|
2808
|
+
return /* @__PURE__ */ e.jsxs(Ke, { children: [
|
|
2809
|
+
/* @__PURE__ */ e.jsx(Ue, { asChild: !0, children: /* @__PURE__ */ e.jsx(k, { size: "sm", variant: "outline", children: /* @__PURE__ */ e.jsx(Wt, { className: "w-4 h-4" }) }) }),
|
|
2810
|
+
/* @__PURE__ */ e.jsx(Ge, { className: "w-[200px]", children: /* @__PURE__ */ e.jsx("div", { className: "grid gap-4", children: /* @__PURE__ */ e.jsx("div", { className: "grid gap-2", children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-5 items-center gap-1", children: [
|
|
2811
|
+
/* @__PURE__ */ e.jsx($, { className: "col-span-3", htmlFor: "width", children: "Refresh Every" }),
|
|
2836
2812
|
/* @__PURE__ */ e.jsx(
|
|
2837
|
-
|
|
2813
|
+
re,
|
|
2838
2814
|
{
|
|
2839
2815
|
value: s || "",
|
|
2840
2816
|
onChange: (a) => n(a.target.value),
|
|
@@ -2852,10 +2828,10 @@ function Ws() {
|
|
|
2852
2828
|
if (i((r) => r.onSave), i((r) => r.onClose), i((r) => r.actions.setCardSql), i((r) => r.actions.setCardType), i((r) => r.actions.setSqlGen), !s)
|
|
2853
2829
|
return /* @__PURE__ */ e.jsx(e.Fragment, { children: "No Active Card" });
|
|
2854
2830
|
function c() {
|
|
2855
|
-
return s.type === "kpi" ? /* @__PURE__ */ e.jsx("div", { className: "flex grow items-center justify-center", children: /* @__PURE__ */ e.jsx("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e.jsx(Mt, { isLoading: t, card: s }) }) }) : s.type === "text" ? /* @__PURE__ */ e.jsx("div", { className: "flex grow items-center justify-center", children: /* @__PURE__ */ e.jsx("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e.jsx(
|
|
2831
|
+
return s.type === "kpi" ? /* @__PURE__ */ e.jsx("div", { className: "flex grow items-center justify-center", children: /* @__PURE__ */ e.jsx("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e.jsx(Mt, { isLoading: t, card: s }) }) }) : s.type === "text" ? /* @__PURE__ */ e.jsx("div", { className: "flex grow items-center justify-center", children: /* @__PURE__ */ e.jsx("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e.jsx(Tt, { isLoading: t, card: s }) }) }) : /* @__PURE__ */ e.jsx(Sa, { className: "grow border-none shadow-none" });
|
|
2856
2832
|
}
|
|
2857
2833
|
return /* @__PURE__ */ e.jsxs("div", { className: "relative flex h-full flex-col pt-3", children: [
|
|
2858
|
-
t && /* @__PURE__ */ e.jsx(
|
|
2834
|
+
t && /* @__PURE__ */ e.jsx(Be, { className: "absolute bottom-0 left-0 right-0 top-0 z-10 m-auto h-10 w-10 animate-spin text-foreground/10" }),
|
|
2859
2835
|
/* @__PURE__ */ e.jsxs("div", { className: "mb-0 flex min-h-10 items-center justify-end gap-2 px-6", children: [
|
|
2860
2836
|
a && /* @__PURE__ */ e.jsxs("div", { className: "flex grow items-center gap-2", children: [
|
|
2861
2837
|
/* @__PURE__ */ e.jsx(Pn, {}),
|
|
@@ -2896,7 +2872,7 @@ function Gn() {
|
|
|
2896
2872
|
className: "bg-muted p-2 font-mono text-sm"
|
|
2897
2873
|
}
|
|
2898
2874
|
),
|
|
2899
|
-
/* @__PURE__ */ e.jsx(
|
|
2875
|
+
/* @__PURE__ */ e.jsx(Ms, { className: "mb-2" })
|
|
2900
2876
|
] });
|
|
2901
2877
|
}
|
|
2902
2878
|
function Jn() {
|
|
@@ -2904,9 +2880,9 @@ function Jn() {
|
|
|
2904
2880
|
(a) => a.actions.setIsShowingVisual
|
|
2905
2881
|
);
|
|
2906
2882
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
2907
|
-
/* @__PURE__ */ e.jsx(
|
|
2883
|
+
/* @__PURE__ */ e.jsx($, { htmlFor: "visualize", children: "Chart" }),
|
|
2908
2884
|
/* @__PURE__ */ e.jsx(
|
|
2909
|
-
|
|
2885
|
+
Lt,
|
|
2910
2886
|
{
|
|
2911
2887
|
checked: s,
|
|
2912
2888
|
onCheckedChange: () => n(!s),
|
|
@@ -2917,7 +2893,7 @@ function Jn() {
|
|
|
2917
2893
|
] });
|
|
2918
2894
|
}
|
|
2919
2895
|
function De() {
|
|
2920
|
-
const [s, n] =
|
|
2896
|
+
const [s, n] = T([]);
|
|
2921
2897
|
i(
|
|
2922
2898
|
(m) => m.card.cfg
|
|
2923
2899
|
);
|
|
@@ -2976,7 +2952,7 @@ function De() {
|
|
|
2976
2952
|
var u, S, d, x;
|
|
2977
2953
|
if (s != null && s[m] || (S = (u = a == null ? void 0 : a.onClickFilter) == null ? void 0 : u.find((j) => j.columnIndex === m)) != null && S.expression)
|
|
2978
2954
|
return /* @__PURE__ */ e.jsx(
|
|
2979
|
-
|
|
2955
|
+
re,
|
|
2980
2956
|
{
|
|
2981
2957
|
value: (x = (d = a == null ? void 0 : a.onClickFilter) == null ? void 0 : d.find((j) => j.columnIndex === m)) == null ? void 0 : x.expression,
|
|
2982
2958
|
onChange: (j) => o(m, j),
|
|
@@ -2995,7 +2971,7 @@ function De() {
|
|
|
2995
2971
|
children: /* @__PURE__ */ e.jsxs("div", { className: " grow", children: [
|
|
2996
2972
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center py-2 space-x-2", children: [
|
|
2997
2973
|
/* @__PURE__ */ e.jsx(
|
|
2998
|
-
|
|
2974
|
+
Pe,
|
|
2999
2975
|
{
|
|
3000
2976
|
checked: !!((S = a == null ? void 0 : a.onClickFilter) != null && S.find(
|
|
3001
2977
|
(x) => x.columnIndex === u
|
|
@@ -3032,7 +3008,7 @@ function De() {
|
|
|
3032
3008
|
);
|
|
3033
3009
|
}) });
|
|
3034
3010
|
}
|
|
3035
|
-
function
|
|
3011
|
+
function ns() {
|
|
3036
3012
|
var c, r, o;
|
|
3037
3013
|
const s = i((f) => f.card.preferences), n = i(
|
|
3038
3014
|
(f) => f.card.cfg
|
|
@@ -3042,7 +3018,7 @@ function rs() {
|
|
|
3042
3018
|
l(f);
|
|
3043
3019
|
}
|
|
3044
3020
|
return /* @__PURE__ */ e.jsxs(
|
|
3045
|
-
|
|
3021
|
+
Ts,
|
|
3046
3022
|
{
|
|
3047
3023
|
value: ((r = s == null ? void 0 : s.chartOptions) == null ? void 0 : r.indexAxis) || ((o = n == null ? void 0 : n.options) == null ? void 0 : o.indexAxis) || "x",
|
|
3048
3024
|
onValueChange: h,
|
|
@@ -3068,32 +3044,32 @@ function Ys(s, n) {
|
|
|
3068
3044
|
return ((h = (l = (t = s == null ? void 0 : s.chartOptions) == null ? void 0 : t.scales) == null ? void 0 : l[a]) == null ? void 0 : h.type) || "linear";
|
|
3069
3045
|
}
|
|
3070
3046
|
function Aa() {
|
|
3071
|
-
var
|
|
3072
|
-
const [s, n] =
|
|
3047
|
+
var X, Z, ee, K, se, b;
|
|
3048
|
+
const [s, n] = T(!1), a = i((y) => {
|
|
3073
3049
|
var O;
|
|
3074
3050
|
return (O = y.card) == null ? void 0 : O.preferences;
|
|
3075
3051
|
}), t = i((y) => {
|
|
3076
3052
|
var O;
|
|
3077
3053
|
return (O = y.card) == null ? void 0 : O.cfg;
|
|
3078
|
-
}), l = ua(a, t), [h, c] =
|
|
3054
|
+
}), l = ua(a, t), [h, c] = T(
|
|
3079
3055
|
Ys(a)
|
|
3080
|
-
), [r, o] =
|
|
3081
|
-
((
|
|
3082
|
-
), [f, m] =
|
|
3083
|
-
((b = (
|
|
3084
|
-
), [u, S] =
|
|
3056
|
+
), [r, o] = T(
|
|
3057
|
+
((ee = (Z = (X = a == null ? void 0 : a.chartOptions) == null ? void 0 : X.scales) == null ? void 0 : Z[l]) == null ? void 0 : ee.min) || ""
|
|
3058
|
+
), [f, m] = T(
|
|
3059
|
+
((b = (se = (K = a == null ? void 0 : a.chartOptions) == null ? void 0 : K.scales) == null ? void 0 : se[l]) == null ? void 0 : b.max) || ""
|
|
3060
|
+
), [u, S] = T(r || f ? "custom" : "auto"), [d, x] = T(""), [j, z] = T(0), [C, E] = T(""), [v, D] = T(""), [N, F] = T(""), A = i(
|
|
3085
3061
|
(y) => y.actions.setCardPreferences
|
|
3086
|
-
),
|
|
3062
|
+
), q = i((y) => {
|
|
3087
3063
|
var O;
|
|
3088
3064
|
return (O = y.card) == null ? void 0 : O.type;
|
|
3089
|
-
}), M = ["pie", "doughnut", "polarArea"].includes(
|
|
3065
|
+
}), M = ["pie", "doughnut", "polarArea"].includes(q);
|
|
3090
3066
|
G(() => {
|
|
3091
|
-
var y, O,
|
|
3067
|
+
var y, O, B, V, te, Ne, Ce, ae, pe, J, ne, ie, je, oe;
|
|
3092
3068
|
c(Ys(a)), o(
|
|
3093
|
-
((
|
|
3094
|
-
), m(((
|
|
3095
|
-
((J = (
|
|
3096
|
-
), z(((
|
|
3069
|
+
((B = (O = (y = a == null ? void 0 : a.chartOptions) == null ? void 0 : y.scales) == null ? void 0 : O[l]) == null ? void 0 : B.min) === 0 ? 0 : ""
|
|
3070
|
+
), m(((Ne = (te = (V = a == null ? void 0 : a.chartOptions) == null ? void 0 : V.scales) == null ? void 0 : te[l]) == null ? void 0 : Ne.max) || ""), x(
|
|
3071
|
+
((J = (pe = (ae = (Ce = a == null ? void 0 : a.chartOptions) == null ? void 0 : Ce.scales) == null ? void 0 : ae[l]) == null ? void 0 : pe.ticks) == null ? void 0 : J.stepSize) || ""
|
|
3072
|
+
), z(((ne = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : ne.decimalPlaces) || 0), E(((ie = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : ie.suffix) || ""), D(((je = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : je.currency) || ""), F(((oe = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : oe.locale) || "");
|
|
3097
3073
|
}, [s, a, l]);
|
|
3098
3074
|
function U(y, O) {
|
|
3099
3075
|
return O === "" || /^[0-9\b]+$/.test(O) ? Number(O) : Number(y);
|
|
@@ -3102,7 +3078,7 @@ function Aa() {
|
|
|
3102
3078
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
3103
3079
|
/* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-6 items-center gap-2", children: [
|
|
3104
3080
|
/* @__PURE__ */ e.jsx(
|
|
3105
|
-
|
|
3081
|
+
$,
|
|
3106
3082
|
{
|
|
3107
3083
|
className: "col-span-2 hover:cursor-pointer hover:underline",
|
|
3108
3084
|
htmlFor: "currency",
|
|
@@ -3117,7 +3093,7 @@ function Aa() {
|
|
|
3117
3093
|
}
|
|
3118
3094
|
),
|
|
3119
3095
|
/* @__PURE__ */ e.jsx(
|
|
3120
|
-
|
|
3096
|
+
re,
|
|
3121
3097
|
{
|
|
3122
3098
|
value: v,
|
|
3123
3099
|
placeholder: "USD",
|
|
@@ -3127,7 +3103,7 @@ function Aa() {
|
|
|
3127
3103
|
}
|
|
3128
3104
|
),
|
|
3129
3105
|
/* @__PURE__ */ e.jsx(
|
|
3130
|
-
|
|
3106
|
+
re,
|
|
3131
3107
|
{
|
|
3132
3108
|
value: N,
|
|
3133
3109
|
placeholder: "en-US",
|
|
@@ -3138,9 +3114,9 @@ function Aa() {
|
|
|
3138
3114
|
)
|
|
3139
3115
|
] }),
|
|
3140
3116
|
/* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-9 items-center gap-2", children: [
|
|
3141
|
-
/* @__PURE__ */ e.jsx(
|
|
3117
|
+
/* @__PURE__ */ e.jsx($, { className: "col-span-3", htmlFor: "format", children: "Decimals" }),
|
|
3142
3118
|
/* @__PURE__ */ e.jsx(
|
|
3143
|
-
|
|
3119
|
+
re,
|
|
3144
3120
|
{
|
|
3145
3121
|
value: j,
|
|
3146
3122
|
onChange: (y) => z(Number(y.target.value)),
|
|
@@ -3154,9 +3130,9 @@ function Aa() {
|
|
|
3154
3130
|
function I() {
|
|
3155
3131
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
3156
3132
|
/* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-3 items-center gap-2", children: [
|
|
3157
|
-
/* @__PURE__ */ e.jsx(
|
|
3133
|
+
/* @__PURE__ */ e.jsx($, { htmlFor: "range", children: "Range" }),
|
|
3158
3134
|
/* @__PURE__ */ e.jsx(
|
|
3159
|
-
|
|
3135
|
+
re,
|
|
3160
3136
|
{
|
|
3161
3137
|
id: "min",
|
|
3162
3138
|
value: r,
|
|
@@ -3165,7 +3141,7 @@ function Aa() {
|
|
|
3165
3141
|
}
|
|
3166
3142
|
),
|
|
3167
3143
|
/* @__PURE__ */ e.jsx(
|
|
3168
|
-
|
|
3144
|
+
re,
|
|
3169
3145
|
{
|
|
3170
3146
|
value: f,
|
|
3171
3147
|
onChange: (y) => m((O) => U(O, y.target.value)),
|
|
@@ -3175,9 +3151,9 @@ function Aa() {
|
|
|
3175
3151
|
)
|
|
3176
3152
|
] }),
|
|
3177
3153
|
/* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-3 items-center gap-2", children: [
|
|
3178
|
-
/* @__PURE__ */ e.jsx(
|
|
3154
|
+
/* @__PURE__ */ e.jsx($, { htmlFor: "step-size", children: "Step Size" }),
|
|
3179
3155
|
/* @__PURE__ */ e.jsx(
|
|
3180
|
-
|
|
3156
|
+
re,
|
|
3181
3157
|
{
|
|
3182
3158
|
value: d,
|
|
3183
3159
|
onChange: (y) => x((O) => U(O, y.target.value)),
|
|
@@ -3188,8 +3164,8 @@ function Aa() {
|
|
|
3188
3164
|
] })
|
|
3189
3165
|
] });
|
|
3190
3166
|
}
|
|
3191
|
-
function
|
|
3192
|
-
var
|
|
3167
|
+
function le() {
|
|
3168
|
+
var B;
|
|
3193
3169
|
let y = {};
|
|
3194
3170
|
u === "custom" && (y = {
|
|
3195
3171
|
min: r,
|
|
@@ -3203,7 +3179,7 @@ function Aa() {
|
|
|
3203
3179
|
chartOptions: {
|
|
3204
3180
|
...a == null ? void 0 : a.chartOptions,
|
|
3205
3181
|
scales: {
|
|
3206
|
-
...(
|
|
3182
|
+
...(B = a == null ? void 0 : a.chartOptions) == null ? void 0 : B.scales,
|
|
3207
3183
|
[l]: {
|
|
3208
3184
|
// ...cardPreferences?.chartOptions?.scales?.[axis],
|
|
3209
3185
|
type: h,
|
|
@@ -3220,16 +3196,16 @@ function Aa() {
|
|
|
3220
3196
|
};
|
|
3221
3197
|
console.log(O), A(O);
|
|
3222
3198
|
}
|
|
3223
|
-
return /* @__PURE__ */ e.jsxs(
|
|
3224
|
-
/* @__PURE__ */ e.jsx(
|
|
3225
|
-
/* @__PURE__ */ e.jsx(
|
|
3199
|
+
return /* @__PURE__ */ e.jsxs(Ke, { onOpenChange: (y) => n(y), children: [
|
|
3200
|
+
/* @__PURE__ */ e.jsx(Ue, { asChild: !0, children: /* @__PURE__ */ e.jsx(At, { className: "size-4 cursor-pointer text-muted-foreground hover:text-foreground" }) }),
|
|
3201
|
+
/* @__PURE__ */ e.jsx(Ge, { align: "center", className: "max-w-65", children: /* @__PURE__ */ e.jsxs("div", { className: "grid gap-4", children: [
|
|
3226
3202
|
/* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
3227
3203
|
/* @__PURE__ */ e.jsx("h4", { className: "font-medium leading-none", children: "Scale Options" }),
|
|
3228
3204
|
/* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted-foreground", children: "Set the scale for the number axis" })
|
|
3229
3205
|
] }),
|
|
3230
3206
|
/* @__PURE__ */ e.jsxs("div", { className: "grid gap-2", children: [
|
|
3231
3207
|
/* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-3 items-center gap-2", children: [
|
|
3232
|
-
/* @__PURE__ */ e.jsx(
|
|
3208
|
+
/* @__PURE__ */ e.jsx($, { htmlFor: "scale", children: "Type" }),
|
|
3233
3209
|
/* @__PURE__ */ e.jsxs(
|
|
3234
3210
|
Fe,
|
|
3235
3211
|
{
|
|
@@ -3238,19 +3214,19 @@ function Aa() {
|
|
|
3238
3214
|
onValueChange: (y) => c(y),
|
|
3239
3215
|
children: [
|
|
3240
3216
|
/* @__PURE__ */ e.jsx(Oe, { className: "col-span-2 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(Me, {}) }),
|
|
3241
|
-
/* @__PURE__ */ e.jsx(
|
|
3217
|
+
/* @__PURE__ */ e.jsx(Te, { id: "type", children: /* @__PURE__ */ e.jsxs(He, { children: [
|
|
3242
3218
|
/* @__PURE__ */ e.jsx(Ae, { children: "Option" }),
|
|
3243
|
-
/* @__PURE__ */ e.jsx(
|
|
3244
|
-
/* @__PURE__ */ e.jsx(
|
|
3219
|
+
/* @__PURE__ */ e.jsx(W, { value: "linear", children: "Linear" }),
|
|
3220
|
+
/* @__PURE__ */ e.jsx(W, { value: "logarithmic", children: "Logarithmic" })
|
|
3245
3221
|
] }) })
|
|
3246
3222
|
]
|
|
3247
3223
|
}
|
|
3248
3224
|
)
|
|
3249
3225
|
] }),
|
|
3250
3226
|
h == "linear" && /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-3 items-center gap-2 py-1", children: [
|
|
3251
|
-
/* @__PURE__ */ e.jsx(
|
|
3227
|
+
/* @__PURE__ */ e.jsx($, { htmlFor: "scale-option", children: "Setup" }),
|
|
3252
3228
|
/* @__PURE__ */ e.jsxs(
|
|
3253
|
-
|
|
3229
|
+
Ts,
|
|
3254
3230
|
{
|
|
3255
3231
|
disabled: M,
|
|
3256
3232
|
id: "scale-option",
|
|
@@ -3277,7 +3253,7 @@ function Aa() {
|
|
|
3277
3253
|
/* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-3", children: /* @__PURE__ */ e.jsx(
|
|
3278
3254
|
k,
|
|
3279
3255
|
{
|
|
3280
|
-
onClick:
|
|
3256
|
+
onClick: le,
|
|
3281
3257
|
variant: "secondary",
|
|
3282
3258
|
className: "col-span-1 col-start-3 h-8 w-full",
|
|
3283
3259
|
children: "Apply"
|
|
@@ -3331,9 +3307,9 @@ function Qn({ idx: s }) {
|
|
|
3331
3307
|
});
|
|
3332
3308
|
}
|
|
3333
3309
|
}
|
|
3334
|
-
return /* @__PURE__ */ e.jsxs(
|
|
3335
|
-
/* @__PURE__ */ e.jsx(
|
|
3336
|
-
/* @__PURE__ */ e.jsx(
|
|
3310
|
+
return /* @__PURE__ */ e.jsxs(Ke, { children: [
|
|
3311
|
+
/* @__PURE__ */ e.jsx(Ue, { children: /* @__PURE__ */ e.jsx(jn, { className: "invisible size-4 rotate-[135deg] cursor-pointer text-muted-foreground hover:text-foreground group-hover:visible" }) }),
|
|
3312
|
+
/* @__PURE__ */ e.jsx(Ge, { className: "w-fit p-1", children: /* @__PURE__ */ e.jsxs("div", { className: "flex gap-1", children: [
|
|
3337
3313
|
/* @__PURE__ */ e.jsx(
|
|
3338
3314
|
k,
|
|
3339
3315
|
{
|
|
@@ -3354,7 +3330,7 @@ function Qn({ idx: s }) {
|
|
|
3354
3330
|
children: /* @__PURE__ */ e.jsx(
|
|
3355
3331
|
ln,
|
|
3356
3332
|
{
|
|
3357
|
-
className:
|
|
3333
|
+
className: Y("h-4 w-4", {
|
|
3358
3334
|
"rotate-90": l === "y"
|
|
3359
3335
|
})
|
|
3360
3336
|
}
|
|
@@ -3371,7 +3347,7 @@ function Qn({ idx: s }) {
|
|
|
3371
3347
|
children: /* @__PURE__ */ e.jsx(
|
|
3372
3348
|
cn,
|
|
3373
3349
|
{
|
|
3374
|
-
className:
|
|
3350
|
+
className: Y("h-4 w-4", {
|
|
3375
3351
|
"rotate-90": l === "y"
|
|
3376
3352
|
})
|
|
3377
3353
|
}
|
|
@@ -3388,7 +3364,7 @@ function Qn({ idx: s }) {
|
|
|
3388
3364
|
children: /* @__PURE__ */ e.jsx(
|
|
3389
3365
|
on,
|
|
3390
3366
|
{
|
|
3391
|
-
className:
|
|
3367
|
+
className: Y("h-4 w-4", {
|
|
3392
3368
|
"rotate-90": l === "y"
|
|
3393
3369
|
})
|
|
3394
3370
|
}
|
|
@@ -3408,7 +3384,7 @@ function Ea() {
|
|
|
3408
3384
|
keys: l,
|
|
3409
3385
|
metricKeys: h,
|
|
3410
3386
|
dimensionKeys: c
|
|
3411
|
-
} =
|
|
3387
|
+
} = gs(s.data || []);
|
|
3412
3388
|
let r = h;
|
|
3413
3389
|
if (["stackedBar", "stackedLine"].includes(s.type)) {
|
|
3414
3390
|
const o = qt({
|
|
@@ -3416,17 +3392,17 @@ function Ea() {
|
|
|
3416
3392
|
groupKey: c[0],
|
|
3417
3393
|
pivotKey: c[1],
|
|
3418
3394
|
valueKey: r[0]
|
|
3419
|
-
}), { metricKeys: f } =
|
|
3395
|
+
}), { metricKeys: f } = gs(o);
|
|
3420
3396
|
r = f;
|
|
3421
3397
|
}
|
|
3422
3398
|
return l.length === 0 ? null : /* @__PURE__ */ e.jsxs("div", { className: "space-y-4", children: [
|
|
3423
3399
|
/* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
3424
|
-
/* @__PURE__ */ e.jsx(
|
|
3400
|
+
/* @__PURE__ */ e.jsx($, { children: a }),
|
|
3425
3401
|
/* @__PURE__ */ e.jsx("div", { className: "my-1 space-y-1", children: /* @__PURE__ */ e.jsx("div", { className: "rounded-md bg-muted/70 px-2 py-1 hover:bg-muted", children: /* @__PURE__ */ e.jsx("p", { children: c[0] }) }) })
|
|
3426
3402
|
] }),
|
|
3427
3403
|
/* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
3428
3404
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between gap-5", children: [
|
|
3429
|
-
/* @__PURE__ */ e.jsx(
|
|
3405
|
+
/* @__PURE__ */ e.jsx($, { children: t }),
|
|
3430
3406
|
/* @__PURE__ */ e.jsx(Aa, {})
|
|
3431
3407
|
] }),
|
|
3432
3408
|
/* @__PURE__ */ e.jsx("div", { className: "my-1 space-y-1", children: r.map((o, f) => /* @__PURE__ */ e.jsx(Wn, { col: o, idx: f }, o)) })
|
|
@@ -3493,7 +3469,7 @@ function Wn({ col: s, idx: n }) {
|
|
|
3493
3469
|
}
|
|
3494
3470
|
),
|
|
3495
3471
|
/* @__PURE__ */ e.jsx(
|
|
3496
|
-
|
|
3472
|
+
Ms,
|
|
3497
3473
|
{
|
|
3498
3474
|
orientation: "vertical",
|
|
3499
3475
|
className: "invisible size-4 cursor-pointer py-2 text-muted-foreground hover:text-foreground group-hover:visible"
|
|
@@ -3506,10 +3482,10 @@ function Wn({ col: s, idx: n }) {
|
|
|
3506
3482
|
function Yn({
|
|
3507
3483
|
cardType: s
|
|
3508
3484
|
}) {
|
|
3509
|
-
return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(
|
|
3510
|
-
/* @__PURE__ */ e.jsxs(
|
|
3511
|
-
/* @__PURE__ */ e.jsx(
|
|
3512
|
-
/* @__PURE__ */ e.jsxs(
|
|
3485
|
+
return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(ve, { defaultValue: ["item-2"], type: "multiple", children: [
|
|
3486
|
+
/* @__PURE__ */ e.jsxs(R, { value: "item-1", children: [
|
|
3487
|
+
/* @__PURE__ */ e.jsx(_, { children: `${Ls(s)} Chart` }),
|
|
3488
|
+
/* @__PURE__ */ e.jsxs(H, { className: "space-y-4 font-mono text-xs", children: [
|
|
3513
3489
|
/* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT x-axis, y-axis-1, y-axis-2,... FROM table" }),
|
|
3514
3490
|
/* @__PURE__ */ e.jsxs("ul", { className: "ml-6 list-disc text-xs [&>li]:mt-2", children: [
|
|
3515
3491
|
/* @__PURE__ */ e.jsx("li", { children: "x-axis - category" }),
|
|
@@ -3532,16 +3508,16 @@ function Yn({
|
|
|
3532
3508
|
] })
|
|
3533
3509
|
] })
|
|
3534
3510
|
] }),
|
|
3535
|
-
/* @__PURE__ */ e.jsxs(
|
|
3536
|
-
/* @__PURE__ */ e.jsx(
|
|
3537
|
-
/* @__PURE__ */ e.jsxs(
|
|
3538
|
-
/* @__PURE__ */ e.jsx(
|
|
3511
|
+
/* @__PURE__ */ e.jsxs(R, { value: "item-2", children: [
|
|
3512
|
+
/* @__PURE__ */ e.jsx(_, { children: "Settings" }),
|
|
3513
|
+
/* @__PURE__ */ e.jsxs(H, { className: "space-y-4 px-2", children: [
|
|
3514
|
+
/* @__PURE__ */ e.jsx(ns, {}),
|
|
3539
3515
|
/* @__PURE__ */ e.jsx(Ea, {})
|
|
3540
3516
|
] })
|
|
3541
3517
|
] }),
|
|
3542
|
-
/* @__PURE__ */ e.jsxs(
|
|
3543
|
-
/* @__PURE__ */ e.jsx(
|
|
3544
|
-
/* @__PURE__ */ e.jsx(
|
|
3518
|
+
/* @__PURE__ */ e.jsxs(R, { value: "item-3", children: [
|
|
3519
|
+
/* @__PURE__ */ e.jsx(_, { children: "Filter on click" }),
|
|
3520
|
+
/* @__PURE__ */ e.jsx(H, { className: "px-2", children: /* @__PURE__ */ e.jsx(De, {}) })
|
|
3545
3521
|
] })
|
|
3546
3522
|
] }) });
|
|
3547
3523
|
}
|
|
@@ -3584,12 +3560,12 @@ function Is() {
|
|
|
3584
3560
|
defaultValue: "none",
|
|
3585
3561
|
children: [
|
|
3586
3562
|
/* @__PURE__ */ e.jsx(Oe, { className: "h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(Me, { placeholder: "Select position" }) }),
|
|
3587
|
-
/* @__PURE__ */ e.jsx(
|
|
3563
|
+
/* @__PURE__ */ e.jsx(Te, { children: /* @__PURE__ */ e.jsxs(He, { children: [
|
|
3588
3564
|
/* @__PURE__ */ e.jsx(Ae, { children: "Data Labels" }),
|
|
3589
|
-
/* @__PURE__ */ e.jsx(
|
|
3590
|
-
a !== "pyramid" && /* @__PURE__ */ e.jsx(
|
|
3591
|
-
/* @__PURE__ */ e.jsx(
|
|
3592
|
-
a !== "pyramid" && /* @__PURE__ */ e.jsx(
|
|
3565
|
+
/* @__PURE__ */ e.jsx(W, { value: "none", children: "None" }),
|
|
3566
|
+
a !== "pyramid" && /* @__PURE__ */ e.jsx(W, { value: "start", children: "Start" }),
|
|
3567
|
+
/* @__PURE__ */ e.jsx(W, { value: "center", children: "Center" }),
|
|
3568
|
+
a !== "pyramid" && /* @__PURE__ */ e.jsx(W, { value: "end", children: "End" })
|
|
3593
3569
|
] }) })
|
|
3594
3570
|
]
|
|
3595
3571
|
}
|
|
@@ -3626,18 +3602,18 @@ function Xn({
|
|
|
3626
3602
|
] })
|
|
3627
3603
|
] });
|
|
3628
3604
|
}
|
|
3629
|
-
return /* @__PURE__ */ e.jsx("div", { className: "px-6 py-2 space-y-6", children: /* @__PURE__ */ e.jsxs(
|
|
3630
|
-
/* @__PURE__ */ e.jsxs(
|
|
3631
|
-
/* @__PURE__ */ e.jsx(
|
|
3632
|
-
/* @__PURE__ */ e.jsx(
|
|
3605
|
+
return /* @__PURE__ */ e.jsx("div", { className: "px-6 py-2 space-y-6", children: /* @__PURE__ */ e.jsxs(ve, { defaultValue: ["item-2"], type: "multiple", children: [
|
|
3606
|
+
/* @__PURE__ */ e.jsxs(R, { value: "item-1", children: [
|
|
3607
|
+
/* @__PURE__ */ e.jsx(_, { children: `${Ls(s)} Chart` }),
|
|
3608
|
+
/* @__PURE__ */ e.jsx(H, { className: " space-y-4 font-mono text-xs ", children: n(s) })
|
|
3633
3609
|
] }),
|
|
3634
|
-
/* @__PURE__ */ e.jsxs(
|
|
3635
|
-
/* @__PURE__ */ e.jsx(
|
|
3636
|
-
/* @__PURE__ */ e.jsx(
|
|
3610
|
+
/* @__PURE__ */ e.jsxs(R, { value: "item-2", children: [
|
|
3611
|
+
/* @__PURE__ */ e.jsx(_, { children: "Settings" }),
|
|
3612
|
+
/* @__PURE__ */ e.jsx(H, { className: "px-2", children: /* @__PURE__ */ e.jsx(Is, {}) })
|
|
3637
3613
|
] }),
|
|
3638
|
-
/* @__PURE__ */ e.jsxs(
|
|
3639
|
-
/* @__PURE__ */ e.jsx(
|
|
3640
|
-
/* @__PURE__ */ e.jsx(
|
|
3614
|
+
/* @__PURE__ */ e.jsxs(R, { value: "item-3", children: [
|
|
3615
|
+
/* @__PURE__ */ e.jsx(_, { children: "Filter on click" }),
|
|
3616
|
+
/* @__PURE__ */ e.jsx(H, { className: "px-2", children: /* @__PURE__ */ e.jsx(De, {}) })
|
|
3641
3617
|
] })
|
|
3642
3618
|
] }) });
|
|
3643
3619
|
}
|
|
@@ -3668,7 +3644,7 @@ function sr() {
|
|
|
3668
3644
|
const s = i((n) => n.card.type);
|
|
3669
3645
|
return /* @__PURE__ */ e.jsxs("div", { className: "space-y-6 p-6", children: [
|
|
3670
3646
|
/* @__PURE__ */ e.jsx(
|
|
3671
|
-
|
|
3647
|
+
ve,
|
|
3672
3648
|
{
|
|
3673
3649
|
className: " ",
|
|
3674
3650
|
type: "single",
|
|
@@ -3676,7 +3652,7 @@ function sr() {
|
|
|
3676
3652
|
children: ar(s)
|
|
3677
3653
|
}
|
|
3678
3654
|
),
|
|
3679
|
-
/* @__PURE__ */ e.jsx("section", { className: "", children: ["line", "bar"].includes(s) && /* @__PURE__ */ e.jsx(
|
|
3655
|
+
/* @__PURE__ */ e.jsx("section", { className: "", children: ["line", "bar"].includes(s) && /* @__PURE__ */ e.jsx(ns, {}) }),
|
|
3680
3656
|
/* @__PURE__ */ e.jsx("div", { children: !["kpi"].includes(s) && /* @__PURE__ */ e.jsx(Is, {}) }),
|
|
3681
3657
|
/* @__PURE__ */ e.jsx("div", { children: !["kpi"].includes(s) && /* @__PURE__ */ e.jsx(De, {}) })
|
|
3682
3658
|
] });
|
|
@@ -3684,9 +3660,9 @@ function sr() {
|
|
|
3684
3660
|
function ar(s) {
|
|
3685
3661
|
if (["line", "bar"].includes(s))
|
|
3686
3662
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
3687
|
-
/* @__PURE__ */ e.jsxs(
|
|
3688
|
-
/* @__PURE__ */ e.jsx(
|
|
3689
|
-
/* @__PURE__ */ e.jsxs(
|
|
3663
|
+
/* @__PURE__ */ e.jsxs(R, { value: "item-1", children: [
|
|
3664
|
+
/* @__PURE__ */ e.jsx(_, { className: "font-normal", children: /* @__PURE__ */ e.jsx("p", { children: "Chart Query" }) }),
|
|
3665
|
+
/* @__PURE__ */ e.jsxs(H, { className: " ", children: [
|
|
3690
3666
|
/* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 font-mono text-xs font-semibold", children: "SELECT x-axis, y-axis-1, y-axis-2, y-axis-3,... FROM table" }),
|
|
3691
3667
|
/* @__PURE__ */ e.jsxs("ul", { className: "my-6 ml-6 list-disc text-xs font-normal [&>li]:mt-2", children: [
|
|
3692
3668
|
/* @__PURE__ */ e.jsx("li", { children: "X-axis - Category (ex. city)" }),
|
|
@@ -3694,9 +3670,9 @@ function ar(s) {
|
|
|
3694
3670
|
] })
|
|
3695
3671
|
] })
|
|
3696
3672
|
] }),
|
|
3697
|
-
/* @__PURE__ */ e.jsxs(
|
|
3698
|
-
/* @__PURE__ */ e.jsx(
|
|
3699
|
-
/* @__PURE__ */ e.jsxs(
|
|
3673
|
+
/* @__PURE__ */ e.jsxs(R, { value: "item-2", children: [
|
|
3674
|
+
/* @__PURE__ */ e.jsx(_, { className: "font-normal", children: "Mixed Chart" }),
|
|
3675
|
+
/* @__PURE__ */ e.jsxs(H, { className: "space-y-2 text-xs", children: [
|
|
3700
3676
|
/* @__PURE__ */ e.jsxs("p", { children: [
|
|
3701
3677
|
"Click ",
|
|
3702
3678
|
/* @__PURE__ */ e.jsx("b", { children: "Customize" }),
|
|
@@ -3705,9 +3681,9 @@ function ar(s) {
|
|
|
3705
3681
|
/* @__PURE__ */ e.jsx("pre", { children: JSON.stringify(Zn, null, 2) })
|
|
3706
3682
|
] })
|
|
3707
3683
|
] }),
|
|
3708
|
-
/* @__PURE__ */ e.jsxs(
|
|
3709
|
-
/* @__PURE__ */ e.jsx(
|
|
3710
|
-
/* @__PURE__ */ e.jsxs(
|
|
3684
|
+
/* @__PURE__ */ e.jsxs(R, { value: "item-3", children: [
|
|
3685
|
+
/* @__PURE__ */ e.jsx(_, { className: "font-normal", children: "Area Chart" }),
|
|
3686
|
+
/* @__PURE__ */ e.jsxs(H, { className: "space-y-2 text-xs", children: [
|
|
3711
3687
|
/* @__PURE__ */ e.jsxs("p", { children: [
|
|
3712
3688
|
"Click ",
|
|
3713
3689
|
/* @__PURE__ */ e.jsx("b", { children: "Customize" }),
|
|
@@ -3728,13 +3704,13 @@ function ar(s) {
|
|
|
3728
3704
|
] })
|
|
3729
3705
|
] });
|
|
3730
3706
|
if (s === "bubble")
|
|
3731
|
-
return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs(
|
|
3732
|
-
/* @__PURE__ */ e.jsx(
|
|
3707
|
+
return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs(R, { value: "item-1", children: [
|
|
3708
|
+
/* @__PURE__ */ e.jsx(_, { className: "font-normal", children: /* @__PURE__ */ e.jsxs("p", { children: [
|
|
3733
3709
|
"How to create a ",
|
|
3734
3710
|
/* @__PURE__ */ e.jsx("span", { children: s }),
|
|
3735
3711
|
" chart query?"
|
|
3736
3712
|
] }) }),
|
|
3737
|
-
/* @__PURE__ */ e.jsxs(
|
|
3713
|
+
/* @__PURE__ */ e.jsxs(H, { className: " ", children: [
|
|
3738
3714
|
/* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 font-mono text-xs font-semibold", children: "SELECT label, x-axis, y-axis, radius FROM table" }),
|
|
3739
3715
|
/* @__PURE__ */ e.jsxs("ul", { className: "my-6 ml-6 list-disc text-xs font-normal [&>li]:mt-2", children: [
|
|
3740
3716
|
/* @__PURE__ */ e.jsx("li", { children: "Label - Category (ex. city)" }),
|
|
@@ -3746,13 +3722,13 @@ function ar(s) {
|
|
|
3746
3722
|
] })
|
|
3747
3723
|
] }) });
|
|
3748
3724
|
if (s === "scatter")
|
|
3749
|
-
return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs(
|
|
3750
|
-
/* @__PURE__ */ e.jsx(
|
|
3725
|
+
return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs(R, { value: "item-1", children: [
|
|
3726
|
+
/* @__PURE__ */ e.jsx(_, { className: "font-normal", children: /* @__PURE__ */ e.jsxs("p", { children: [
|
|
3751
3727
|
"How to create a ",
|
|
3752
3728
|
/* @__PURE__ */ e.jsx("span", { children: s }),
|
|
3753
3729
|
" chart query?"
|
|
3754
3730
|
] }) }),
|
|
3755
|
-
/* @__PURE__ */ e.jsxs(
|
|
3731
|
+
/* @__PURE__ */ e.jsxs(H, { className: " ", children: [
|
|
3756
3732
|
/* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 font-mono text-xs font-semibold", children: "SELECT label, x-axis, y-axis FROM table" }),
|
|
3757
3733
|
/* @__PURE__ */ e.jsxs("ul", { className: "my-6 ml-6 list-disc text-xs font-normal [&>li]:mt-2", children: [
|
|
3758
3734
|
/* @__PURE__ */ e.jsx("li", { children: "Label - Category (ex. city)" }),
|
|
@@ -3763,13 +3739,13 @@ function ar(s) {
|
|
|
3763
3739
|
] })
|
|
3764
3740
|
] }) });
|
|
3765
3741
|
if (["pie", "doughnut", "polarArea"].includes(s))
|
|
3766
|
-
return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs(
|
|
3767
|
-
/* @__PURE__ */ e.jsx(
|
|
3742
|
+
return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs(R, { value: "item-1", children: [
|
|
3743
|
+
/* @__PURE__ */ e.jsx(_, { className: "font-normal", children: /* @__PURE__ */ e.jsxs("p", { children: [
|
|
3768
3744
|
/* @__PURE__ */ e.jsx("span", { children: s === "polarArea" ? "Polar" : s.charAt(0).toUpperCase() + s.slice(1) }),
|
|
3769
3745
|
" ",
|
|
3770
3746
|
"chart query"
|
|
3771
3747
|
] }) }),
|
|
3772
|
-
/* @__PURE__ */ e.jsxs(
|
|
3748
|
+
/* @__PURE__ */ e.jsxs(H, { className: " ", children: [
|
|
3773
3749
|
/* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 font-mono text-xs font-semibold", children: "SELECT label, measure FROM table" }),
|
|
3774
3750
|
/* @__PURE__ */ e.jsxs("ul", { className: "my-6 ml-6 list-disc text-xs font-normal [&>li]:mt-2", children: [
|
|
3775
3751
|
/* @__PURE__ */ e.jsx("li", { children: "Label - Category (ex. city)" }),
|
|
@@ -3816,7 +3792,7 @@ function tr() {
|
|
|
3816
3792
|
return /* @__PURE__ */ e.jsxs("div", { children: [
|
|
3817
3793
|
/* @__PURE__ */ e.jsxs("div", { className: "mb-3 flex items-center gap-2", children: [
|
|
3818
3794
|
/* @__PURE__ */ e.jsx(
|
|
3819
|
-
|
|
3795
|
+
Pe,
|
|
3820
3796
|
{
|
|
3821
3797
|
checked: !!((o = s == null ? void 0 : s.formatNumber) != null && o.enabled),
|
|
3822
3798
|
onCheckedChange: (d) => {
|
|
@@ -3830,13 +3806,13 @@ function tr() {
|
|
|
3830
3806
|
}
|
|
3831
3807
|
}
|
|
3832
3808
|
),
|
|
3833
|
-
/* @__PURE__ */ e.jsx(
|
|
3809
|
+
/* @__PURE__ */ e.jsx($, { children: "Format Number" })
|
|
3834
3810
|
] }),
|
|
3835
3811
|
((f = s == null ? void 0 : s.formatNumber) == null ? void 0 : f.enabled) === !0 && /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
3836
3812
|
/* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 p-2", children: [
|
|
3837
3813
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
3838
3814
|
/* @__PURE__ */ e.jsxs("div", { className: "w-full space-y-1", children: [
|
|
3839
|
-
/* @__PURE__ */ e.jsx(
|
|
3815
|
+
/* @__PURE__ */ e.jsx($, { children: "Locale" }),
|
|
3840
3816
|
/* @__PURE__ */ e.jsxs(
|
|
3841
3817
|
Fe,
|
|
3842
3818
|
{
|
|
@@ -3852,16 +3828,16 @@ function tr() {
|
|
|
3852
3828
|
},
|
|
3853
3829
|
children: [
|
|
3854
3830
|
/* @__PURE__ */ e.jsx(Oe, { className: "col-span-6 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(Me, {}) }),
|
|
3855
|
-
/* @__PURE__ */ e.jsx(
|
|
3831
|
+
/* @__PURE__ */ e.jsx(Te, { children: /* @__PURE__ */ e.jsxs(He, { children: [
|
|
3856
3832
|
/* @__PURE__ */ e.jsx(Ae, { children: "Format" }),
|
|
3857
|
-
Us.map((d) => /* @__PURE__ */ e.jsx(
|
|
3833
|
+
Us.map((d) => /* @__PURE__ */ e.jsx(W, { value: d.locale, children: d.locale }, d.locale))
|
|
3858
3834
|
] }) })
|
|
3859
3835
|
]
|
|
3860
3836
|
}
|
|
3861
3837
|
)
|
|
3862
3838
|
] }),
|
|
3863
3839
|
/* @__PURE__ */ e.jsxs("div", { className: "w-full space-y-1", children: [
|
|
3864
|
-
/* @__PURE__ */ e.jsx(
|
|
3840
|
+
/* @__PURE__ */ e.jsx($, { children: "Currency" }),
|
|
3865
3841
|
/* @__PURE__ */ e.jsxs(
|
|
3866
3842
|
Fe,
|
|
3867
3843
|
{
|
|
@@ -3877,10 +3853,10 @@ function tr() {
|
|
|
3877
3853
|
},
|
|
3878
3854
|
children: [
|
|
3879
3855
|
/* @__PURE__ */ e.jsx(Oe, { className: "col-span-6 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(Me, {}) }),
|
|
3880
|
-
/* @__PURE__ */ e.jsx(
|
|
3856
|
+
/* @__PURE__ */ e.jsx(Te, { children: /* @__PURE__ */ e.jsxs(He, { children: [
|
|
3881
3857
|
/* @__PURE__ */ e.jsx(Ae, { children: "Currency" }),
|
|
3882
|
-
/* @__PURE__ */ e.jsx(
|
|
3883
|
-
r.map((d) => /* @__PURE__ */ e.jsx(
|
|
3858
|
+
/* @__PURE__ */ e.jsx(W, { value: "none", children: "None" }, "none"),
|
|
3859
|
+
r.map((d) => /* @__PURE__ */ e.jsx(W, { value: d, children: d }, d))
|
|
3884
3860
|
] }) })
|
|
3885
3861
|
]
|
|
3886
3862
|
}
|
|
@@ -3889,7 +3865,7 @@ function tr() {
|
|
|
3889
3865
|
] }),
|
|
3890
3866
|
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
|
|
3891
3867
|
/* @__PURE__ */ e.jsxs("div", { className: "w-full space-y-1", children: [
|
|
3892
|
-
/* @__PURE__ */ e.jsx(
|
|
3868
|
+
/* @__PURE__ */ e.jsx($, { children: "Decimals" }),
|
|
3893
3869
|
/* @__PURE__ */ e.jsxs(
|
|
3894
3870
|
Fe,
|
|
3895
3871
|
{
|
|
@@ -3905,15 +3881,15 @@ function tr() {
|
|
|
3905
3881
|
},
|
|
3906
3882
|
children: [
|
|
3907
3883
|
/* @__PURE__ */ e.jsx(Oe, { className: "col-span-3 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(Me, {}) }),
|
|
3908
|
-
/* @__PURE__ */ e.jsx(
|
|
3884
|
+
/* @__PURE__ */ e.jsx(Te, { children: ["0", "1", "2", "3", "4"].map((d) => /* @__PURE__ */ e.jsx(W, { value: d, children: d }, d)) })
|
|
3909
3885
|
]
|
|
3910
3886
|
}
|
|
3911
3887
|
)
|
|
3912
3888
|
] }),
|
|
3913
3889
|
/* @__PURE__ */ e.jsxs("div", { className: "w-full space-y-1", children: [
|
|
3914
|
-
/* @__PURE__ */ e.jsx(
|
|
3890
|
+
/* @__PURE__ */ e.jsx($, { children: "Suffix" }),
|
|
3915
3891
|
/* @__PURE__ */ e.jsx(
|
|
3916
|
-
|
|
3892
|
+
re,
|
|
3917
3893
|
{
|
|
3918
3894
|
value: ((S = s == null ? void 0 : s.formatNumber) == null ? void 0 : S.suffix) || "",
|
|
3919
3895
|
className: "h-8 font-mono text-xs focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0",
|
|
@@ -3932,7 +3908,7 @@ function tr() {
|
|
|
3932
3908
|
] })
|
|
3933
3909
|
] })
|
|
3934
3910
|
] }) }),
|
|
3935
|
-
/* @__PURE__ */ e.jsx(
|
|
3911
|
+
/* @__PURE__ */ e.jsx(Ms, { className: "my-3" }),
|
|
3936
3912
|
/* @__PURE__ */ e.jsx(
|
|
3937
3913
|
Rt,
|
|
3938
3914
|
{
|
|
@@ -3945,9 +3921,9 @@ function tr() {
|
|
|
3945
3921
|
}
|
|
3946
3922
|
function nr() {
|
|
3947
3923
|
return /* @__PURE__ */ e.jsxs("div", { className: "space-y-6 px-6 py-2", children: [
|
|
3948
|
-
/* @__PURE__ */ e.jsx(
|
|
3949
|
-
/* @__PURE__ */ e.jsx(
|
|
3950
|
-
/* @__PURE__ */ e.jsxs(
|
|
3924
|
+
/* @__PURE__ */ e.jsx(ve, { type: "single", collapsible: !0, children: /* @__PURE__ */ e.jsxs(R, { value: "item-1", children: [
|
|
3925
|
+
/* @__PURE__ */ e.jsx(_, { className: "", children: "KPI Query" }),
|
|
3926
|
+
/* @__PURE__ */ e.jsxs(H, { className: "font-mono", children: [
|
|
3951
3927
|
/* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 font-mono text-xs", children: "SELECT current, previous FROM table" }),
|
|
3952
3928
|
/* @__PURE__ */ e.jsxs("ul", { className: "my-6 ml-6 list-disc text-xs [&>li]:mt-2", children: [
|
|
3953
3929
|
/* @__PURE__ */ e.jsx("li", { children: "current - number" }),
|
|
@@ -3987,7 +3963,7 @@ function rr() {
|
|
|
3987
3963
|
});
|
|
3988
3964
|
}
|
|
3989
3965
|
return /* @__PURE__ */ e.jsxs(
|
|
3990
|
-
|
|
3966
|
+
Ts,
|
|
3991
3967
|
{
|
|
3992
3968
|
value: (t = s == null ? void 0 : s.textVisualOptions) != null && t.isDynamicText ? "dynamic" : "static",
|
|
3993
3969
|
onValueChange: a,
|
|
@@ -4006,15 +3982,15 @@ function rr() {
|
|
|
4006
3982
|
}
|
|
4007
3983
|
);
|
|
4008
3984
|
}
|
|
4009
|
-
function
|
|
3985
|
+
function Ze({
|
|
4010
3986
|
cardType: s,
|
|
4011
3987
|
docContent: n,
|
|
4012
3988
|
suffix: a = "Chart"
|
|
4013
3989
|
}) {
|
|
4014
|
-
return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(
|
|
4015
|
-
/* @__PURE__ */ e.jsxs(
|
|
4016
|
-
/* @__PURE__ */ e.jsx(
|
|
4017
|
-
/* @__PURE__ */ e.jsx(
|
|
3990
|
+
return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(ve, { defaultValue: ["item-2"], type: "multiple", children: [
|
|
3991
|
+
/* @__PURE__ */ e.jsxs(R, { value: "item-1", children: [
|
|
3992
|
+
/* @__PURE__ */ e.jsx(_, { children: `${Ls(s)} ${a}` }),
|
|
3993
|
+
/* @__PURE__ */ e.jsx(H, { children: n || /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
|
|
4018
3994
|
/* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT label, measure FROM table" }),
|
|
4019
3995
|
/* @__PURE__ */ e.jsxs("ul", { className: "ml-6 list-disc text-xs [&>li]:mt-2", children: [
|
|
4020
3996
|
/* @__PURE__ */ e.jsx("li", { children: "label - category" }),
|
|
@@ -4036,25 +4012,25 @@ function es({
|
|
|
4036
4012
|
] })
|
|
4037
4013
|
] }) })
|
|
4038
4014
|
] }),
|
|
4039
|
-
/* @__PURE__ */ e.jsxs(
|
|
4040
|
-
/* @__PURE__ */ e.jsx(
|
|
4041
|
-
/* @__PURE__ */ e.jsxs(
|
|
4042
|
-
s === "range" && /* @__PURE__ */ e.jsx(
|
|
4015
|
+
/* @__PURE__ */ e.jsxs(R, { value: "item-2", children: [
|
|
4016
|
+
/* @__PURE__ */ e.jsx(_, { children: "Settings" }),
|
|
4017
|
+
/* @__PURE__ */ e.jsxs(H, { className: "space-y-4 px-2", children: [
|
|
4018
|
+
s === "range" && /* @__PURE__ */ e.jsx(ns, {}),
|
|
4043
4019
|
s !== "text" && /* @__PURE__ */ e.jsx(Is, {}),
|
|
4044
4020
|
s === "text" && /* @__PURE__ */ e.jsx(rr, {})
|
|
4045
4021
|
] })
|
|
4046
4022
|
] }),
|
|
4047
|
-
!["range", "text"].includes(s) && /* @__PURE__ */ e.jsxs(
|
|
4048
|
-
/* @__PURE__ */ e.jsx(
|
|
4049
|
-
/* @__PURE__ */ e.jsx(
|
|
4023
|
+
!["range", "text"].includes(s) && /* @__PURE__ */ e.jsxs(R, { value: "item-3", children: [
|
|
4024
|
+
/* @__PURE__ */ e.jsx(_, { children: "Filter on click" }),
|
|
4025
|
+
/* @__PURE__ */ e.jsx(H, { className: "px-2", children: /* @__PURE__ */ e.jsx(De, {}) })
|
|
4050
4026
|
] })
|
|
4051
4027
|
] }) });
|
|
4052
4028
|
}
|
|
4053
4029
|
function lr() {
|
|
4054
|
-
return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(
|
|
4055
|
-
/* @__PURE__ */ e.jsxs(
|
|
4056
|
-
/* @__PURE__ */ e.jsx(
|
|
4057
|
-
/* @__PURE__ */ e.jsxs(
|
|
4030
|
+
return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(ve, { defaultValue: ["item-2"], type: "multiple", children: [
|
|
4031
|
+
/* @__PURE__ */ e.jsxs(R, { value: "item-1", children: [
|
|
4032
|
+
/* @__PURE__ */ e.jsx(_, { children: "Stacked Chart" }),
|
|
4033
|
+
/* @__PURE__ */ e.jsxs(H, { className: "space-y-4 font-mono text-xs", children: [
|
|
4058
4034
|
/* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT x-axis, stack-by, y-axis FROM table" }),
|
|
4059
4035
|
/* @__PURE__ */ e.jsxs("ul", { className: "ml-6 list-disc text-xs [&>li]:mt-2", children: [
|
|
4060
4036
|
/* @__PURE__ */ e.jsx("li", { children: "x-axis - category" }),
|
|
@@ -4077,16 +4053,16 @@ function lr() {
|
|
|
4077
4053
|
] })
|
|
4078
4054
|
] })
|
|
4079
4055
|
] }),
|
|
4080
|
-
/* @__PURE__ */ e.jsxs(
|
|
4081
|
-
/* @__PURE__ */ e.jsx(
|
|
4082
|
-
/* @__PURE__ */ e.jsxs(
|
|
4083
|
-
/* @__PURE__ */ e.jsx(
|
|
4056
|
+
/* @__PURE__ */ e.jsxs(R, { value: "item-2", children: [
|
|
4057
|
+
/* @__PURE__ */ e.jsx(_, { children: "Settings" }),
|
|
4058
|
+
/* @__PURE__ */ e.jsxs(H, { className: "space-y-4 px-2", children: [
|
|
4059
|
+
/* @__PURE__ */ e.jsx(ns, {}),
|
|
4084
4060
|
/* @__PURE__ */ e.jsx(Ea, {})
|
|
4085
4061
|
] })
|
|
4086
4062
|
] }),
|
|
4087
|
-
/* @__PURE__ */ e.jsxs(
|
|
4088
|
-
/* @__PURE__ */ e.jsx(
|
|
4089
|
-
/* @__PURE__ */ e.jsx(
|
|
4063
|
+
/* @__PURE__ */ e.jsxs(R, { value: "item-3", children: [
|
|
4064
|
+
/* @__PURE__ */ e.jsx(_, { children: "Filter on click" }),
|
|
4065
|
+
/* @__PURE__ */ e.jsx(H, { className: "px-2", children: /* @__PURE__ */ e.jsx(De, {}) })
|
|
4090
4066
|
] })
|
|
4091
4067
|
] }) });
|
|
4092
4068
|
}
|
|
@@ -4103,12 +4079,12 @@ function ir({}) {
|
|
|
4103
4079
|
});
|
|
4104
4080
|
};
|
|
4105
4081
|
return /* @__PURE__ */ e.jsxs("div", { className: "space-y-6 px-6 py-2", children: [
|
|
4106
|
-
/* @__PURE__ */ e.jsx(
|
|
4107
|
-
/* @__PURE__ */ e.jsx(
|
|
4108
|
-
/* @__PURE__ */ e.jsx(
|
|
4082
|
+
/* @__PURE__ */ e.jsx(ve, { defaultValue: ["item-3"], type: "multiple", children: /* @__PURE__ */ e.jsxs(R, { value: "item-3", children: [
|
|
4083
|
+
/* @__PURE__ */ e.jsx(_, { children: "Filter on click" }),
|
|
4084
|
+
/* @__PURE__ */ e.jsx(H, { className: "px-2", children: /* @__PURE__ */ e.jsx(De, {}) })
|
|
4109
4085
|
] }) }),
|
|
4110
4086
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
4111
|
-
/* @__PURE__ */ e.jsx(
|
|
4087
|
+
/* @__PURE__ */ e.jsx(Pe, { onCheckedChange: a, id: "allow-download" }),
|
|
4112
4088
|
/* @__PURE__ */ e.jsx(
|
|
4113
4089
|
"label",
|
|
4114
4090
|
{
|
|
@@ -4177,19 +4153,19 @@ function hr() {
|
|
|
4177
4153
|
case "stackedLine":
|
|
4178
4154
|
return /* @__PURE__ */ e.jsx(lr, {});
|
|
4179
4155
|
case "pyramid":
|
|
4180
|
-
return /* @__PURE__ */ e.jsx(
|
|
4156
|
+
return /* @__PURE__ */ e.jsx(Ze, { docContent: or, cardType: a });
|
|
4181
4157
|
case "kpi":
|
|
4182
4158
|
return /* @__PURE__ */ e.jsx(nr, {});
|
|
4183
4159
|
case "line":
|
|
4184
4160
|
case "bar":
|
|
4185
4161
|
return /* @__PURE__ */ e.jsx(Yn, { cardType: a });
|
|
4186
4162
|
case "range":
|
|
4187
|
-
return /* @__PURE__ */ e.jsx(
|
|
4163
|
+
return /* @__PURE__ */ e.jsx(Ze, { docContent: cr, cardType: a });
|
|
4188
4164
|
case "pie":
|
|
4189
4165
|
case "doughnut":
|
|
4190
4166
|
case "polarArea":
|
|
4191
4167
|
case "radar":
|
|
4192
|
-
return /* @__PURE__ */ e.jsx(
|
|
4168
|
+
return /* @__PURE__ */ e.jsx(Ze, { cardType: a });
|
|
4193
4169
|
case "bubble":
|
|
4194
4170
|
case "scatter":
|
|
4195
4171
|
return /* @__PURE__ */ e.jsx(Xn, { cardType: a });
|
|
@@ -4197,7 +4173,7 @@ function hr() {
|
|
|
4197
4173
|
return /* @__PURE__ */ e.jsx(ir, { cardType: a });
|
|
4198
4174
|
case "text":
|
|
4199
4175
|
return /* @__PURE__ */ e.jsx(
|
|
4200
|
-
|
|
4176
|
+
Ze,
|
|
4201
4177
|
{
|
|
4202
4178
|
docContent: dr,
|
|
4203
4179
|
cardType: a,
|
|
@@ -4208,12 +4184,12 @@ function hr() {
|
|
|
4208
4184
|
return /* @__PURE__ */ e.jsx(sr, {});
|
|
4209
4185
|
}
|
|
4210
4186
|
}
|
|
4211
|
-
return /* @__PURE__ */ e.jsx(
|
|
4187
|
+
return /* @__PURE__ */ e.jsx(Os, { className: "h-full w-full text-sm", children: n(s) });
|
|
4212
4188
|
}
|
|
4213
4189
|
function mr() {
|
|
4214
4190
|
const s = i((n) => n.isShowingVisual);
|
|
4215
4191
|
return /* @__PURE__ */ e.jsxs(
|
|
4216
|
-
|
|
4192
|
+
js,
|
|
4217
4193
|
{
|
|
4218
4194
|
direction: "vertical",
|
|
4219
4195
|
className: "min-h-[250px] min-w-full max-w-lg",
|
|
@@ -4228,7 +4204,7 @@ function mr() {
|
|
|
4228
4204
|
children: /* @__PURE__ */ e.jsx(Hn, {})
|
|
4229
4205
|
}
|
|
4230
4206
|
),
|
|
4231
|
-
/* @__PURE__ */ e.jsx(
|
|
4207
|
+
/* @__PURE__ */ e.jsx(bs, { withHandle: !0, className: "border" }),
|
|
4232
4208
|
/* @__PURE__ */ e.jsx(
|
|
4233
4209
|
ze,
|
|
4234
4210
|
{
|
|
@@ -4236,7 +4212,7 @@ function mr() {
|
|
|
4236
4212
|
role: "visual-section",
|
|
4237
4213
|
minSize: 0,
|
|
4238
4214
|
defaultSize: 60,
|
|
4239
|
-
children: s ? /* @__PURE__ */ e.jsxs(
|
|
4215
|
+
children: s ? /* @__PURE__ */ e.jsxs(js, { direction: "horizontal", children: [
|
|
4240
4216
|
/* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx(
|
|
4241
4217
|
ze,
|
|
4242
4218
|
{
|
|
@@ -4247,7 +4223,7 @@ function mr() {
|
|
|
4247
4223
|
children: /* @__PURE__ */ e.jsx(hr, {})
|
|
4248
4224
|
}
|
|
4249
4225
|
) }),
|
|
4250
|
-
/* @__PURE__ */ e.jsx(
|
|
4226
|
+
/* @__PURE__ */ e.jsx(bs, { className: "border" }),
|
|
4251
4227
|
/* @__PURE__ */ e.jsx(ze, { minSize: 40, defaultSize: 75, maxSize: 100, children: /* @__PURE__ */ e.jsx(Ws, {}) })
|
|
4252
4228
|
] }) : /* @__PURE__ */ e.jsx(Ws, {})
|
|
4253
4229
|
}
|
|
@@ -4280,7 +4256,7 @@ function xr() {
|
|
|
4280
4256
|
"div",
|
|
4281
4257
|
{
|
|
4282
4258
|
role: "editor-container",
|
|
4283
|
-
className:
|
|
4259
|
+
className: Y("flex grow", {
|
|
4284
4260
|
block: a,
|
|
4285
4261
|
hidden: !a
|
|
4286
4262
|
}),
|
|
@@ -4296,7 +4272,7 @@ function pr({
|
|
|
4296
4272
|
(u) => u.actions.removeFilterValue
|
|
4297
4273
|
);
|
|
4298
4274
|
function m(u) {
|
|
4299
|
-
const S =
|
|
4275
|
+
const S = me(u.column_name), d = me(t || ""), x = me(l || ""), j = me(n), z = fs(
|
|
4300
4276
|
x,
|
|
4301
4277
|
j
|
|
4302
4278
|
), C = `${z}.${S}`;
|
|
@@ -4314,7 +4290,7 @@ function pr({
|
|
|
4314
4290
|
else {
|
|
4315
4291
|
if (n === "api" && a) {
|
|
4316
4292
|
r({
|
|
4317
|
-
id:
|
|
4293
|
+
id: es(),
|
|
4318
4294
|
column: C,
|
|
4319
4295
|
title: u.column_name,
|
|
4320
4296
|
dataType: u.data_type,
|
|
@@ -4333,7 +4309,7 @@ function pr({
|
|
|
4333
4309
|
return;
|
|
4334
4310
|
}
|
|
4335
4311
|
r({
|
|
4336
|
-
id:
|
|
4312
|
+
id: es(),
|
|
4337
4313
|
column: `${z}.${S}`,
|
|
4338
4314
|
title: u.column_name,
|
|
4339
4315
|
dataType: u.data_type,
|
|
@@ -4352,13 +4328,13 @@ function pr({
|
|
|
4352
4328
|
}
|
|
4353
4329
|
return /* @__PURE__ */ e.jsx("div", { className: "xbg-red-100 flex-1 basis-0 flex-col overflow-scroll px-3", children: s == null ? void 0 : s.map((u) => {
|
|
4354
4330
|
const S = c == null ? void 0 : c.find(
|
|
4355
|
-
(d) => d.column ===
|
|
4331
|
+
(d) => d.column === me(u.column_name) && d.table === h && d.database === t
|
|
4356
4332
|
);
|
|
4357
4333
|
return /* @__PURE__ */ e.jsx(
|
|
4358
4334
|
"div",
|
|
4359
4335
|
{
|
|
4360
4336
|
onClick: () => m(u),
|
|
4361
|
-
className:
|
|
4337
|
+
className: Y(
|
|
4362
4338
|
"group flex cursor-pointer items-center justify-between border border-dashed border-background px-3 py-[6px] text-sm transition-colors hover:bg-muted/50",
|
|
4363
4339
|
{
|
|
4364
4340
|
"bg-muted": S
|
|
@@ -4380,14 +4356,14 @@ function fr() {
|
|
|
4380
4356
|
);
|
|
4381
4357
|
return /* @__PURE__ */ e.jsxs("section", { className: "relative flex grow flex-col border-l px-4", children: [
|
|
4382
4358
|
/* @__PURE__ */ e.jsxs("div", { className: "mt-4 flex items-center justify-between gap-2 px-3", children: [
|
|
4383
|
-
/* @__PURE__ */ e.jsx(
|
|
4359
|
+
/* @__PURE__ */ e.jsx($, { className: "text-lg", children: "Filters" }),
|
|
4384
4360
|
/* @__PURE__ */ e.jsx(
|
|
4385
4361
|
k,
|
|
4386
4362
|
{
|
|
4387
4363
|
onClick: () => s(!1),
|
|
4388
4364
|
className: "h-7 w-7 p-0",
|
|
4389
4365
|
variant: "ghost",
|
|
4390
|
-
children: /* @__PURE__ */ e.jsx(
|
|
4366
|
+
children: /* @__PURE__ */ e.jsx(_e, {})
|
|
4391
4367
|
}
|
|
4392
4368
|
)
|
|
4393
4369
|
] }),
|
|
@@ -4413,7 +4389,7 @@ function gr() {
|
|
|
4413
4389
|
"div",
|
|
4414
4390
|
{
|
|
4415
4391
|
role: "dashboard-plus-main",
|
|
4416
|
-
className:
|
|
4392
|
+
className: Y("grow", {
|
|
4417
4393
|
hidden: n,
|
|
4418
4394
|
flex: !n
|
|
4419
4395
|
}),
|
|
@@ -4433,7 +4409,7 @@ function jr() {
|
|
|
4433
4409
|
), /* @__PURE__ */ e.jsx(
|
|
4434
4410
|
"div",
|
|
4435
4411
|
{
|
|
4436
|
-
className:
|
|
4412
|
+
className: Y(" p-2", {
|
|
4437
4413
|
hidden: !a
|
|
4438
4414
|
}),
|
|
4439
4415
|
children: /* @__PURE__ */ e.jsx(
|
|
@@ -4487,6 +4463,6 @@ function vr({
|
|
|
4487
4463
|
}
|
|
4488
4464
|
export {
|
|
4489
4465
|
vr as D,
|
|
4490
|
-
|
|
4466
|
+
Xe as S,
|
|
4491
4467
|
ya as u
|
|
4492
4468
|
};
|