react-semaphor 0.0.227 → 0.0.229
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-6RB1NM5A.js → dashboard-plus-5-7yzt3Q.js} +477 -477
- package/dist/chunks/{dashboard-plus-7njT3wpD.js → dashboard-plus-Tqe1mSSw.js} +9 -9
- package/dist/chunks/{index-LvoufeVX.js → index-LiVhH7z4.js} +79 -79
- package/dist/chunks/{index-XuqiSHf8.js → index-yvohbzaw.js} +3046 -3049
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +4 -4
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { O as T, b as w, j as e, P as
|
|
2
|
-
import xe, { useState as
|
|
1
|
+
import { O as T, b as w, j as e, P as Ss, Q as ks, R as k, U as ws, V as zs, W as Fs, X as Ms, Y as Os, Z as G, _ as he, $ as sa, J as aa, M as De, a0 as Ka, a1 as Ga, a2 as Ja, a3 as Ua, a4 as Qa, a5 as Wa, a6 as $s, a7 as Be, a8 as Ue, a9 as $e, T as Ts, e as ta, g as Ls, aa as Me, ab as Oe, f as ee, ac as Te, ad as Le, ae as Pe, af as Ae, ag as X, ah as Ds, G as c, ai as ls, aj as is, ak as Ya, al as os, w as na, v as ra, t as ue, am as Za, r as Xa, N as la, s as et, an as st, B as at, ao as ia, ap as tt, S as As, z as nt, n as Ps, aq as js, A as oa, ar as bs, u as Qe, as as me, at as be, au as Ke, av as ca, aw as da, ax as ha, ay as ma, az as ua, aA as rt, aB as lt, aC as xa, aD as it, aE as ot, aF as ct, aG as dt, aH as ht, aI as ys, aJ as mt, aK as He, aL as vs, aM as Fe, aN as Ns, aO as Ks, aP as ut, aQ as xt, aR as pt, aS as ft, aT as gt, aU as gs, aV as jt, aW as Gs, aX as bt, aY as Js, aZ as yt, a_ as vt, a$ as Nt, b0 as pa, l as Ct, C as St, E as Cs, d as kt, h as wt, i as zt, o as Ft, b1 as Mt, m as Ot, H as fa, b2 as Tt, b3 as ga, b4 as ja, b5 as as, b6 as Lt, b7 as ts, b8 as Us, K as Dt, b9 as At, ba, bb as Et, bc as Es, bd as Ee, be as ya, bf as It, bg as Vt, bh as qt, bi as Rt, bj as _t, bk as Ce, bl as H, bm as B, bn as Is, bo as $, bp as Qs, bq as Ht, br as Bt, bs as $t, bt as Pt, bu as Ws, bv as Kt, bw as Gt, bx as Jt, by as Ut, bz as Qt, bA as Wt } from "./index-yvohbzaw.js";
|
|
2
|
+
import xe, { useState as O, useEffect as Q, useMemo as Yt, useRef as Ge } 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
|
|
9
|
+
const Zt = T("AreaChart", [
|
|
10
10
|
["path", { d: "M3 3v18h18", key: "1s2lah" }],
|
|
11
11
|
["path", { d: "M7 12v5h12V8l-5 5-4-4Z", key: "zxz28u" }]
|
|
12
12
|
]);
|
|
@@ -16,7 +16,7 @@ const Yt = T("AreaChart", [
|
|
|
16
16
|
* This source code is licensed under the ISC license.
|
|
17
17
|
* See the LICENSE file in the root directory of this source tree.
|
|
18
18
|
*/
|
|
19
|
-
const
|
|
19
|
+
const Vs = T("BarChart4", [
|
|
20
20
|
["path", { d: "M3 3v18h18", key: "1s2lah" }],
|
|
21
21
|
["path", { d: "M13 17V9", key: "1fwyjl" }],
|
|
22
22
|
["path", { d: "M18 17V5", key: "sfb6ij" }],
|
|
@@ -28,7 +28,7 @@ const Is = T("BarChart4", [
|
|
|
28
28
|
* This source code is licensed under the ISC license.
|
|
29
29
|
* See the LICENSE file in the root directory of this source tree.
|
|
30
30
|
*/
|
|
31
|
-
const
|
|
31
|
+
const Xt = T("Box", [
|
|
32
32
|
[
|
|
33
33
|
"path",
|
|
34
34
|
{
|
|
@@ -45,7 +45,7 @@ const Zt = T("Box", [
|
|
|
45
45
|
* This source code is licensed under the ISC license.
|
|
46
46
|
* See the LICENSE file in the root directory of this source tree.
|
|
47
47
|
*/
|
|
48
|
-
const
|
|
48
|
+
const en = T("CircleX", [
|
|
49
49
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
50
50
|
["path", { d: "m15 9-6 6", key: "1uzhvr" }],
|
|
51
51
|
["path", { d: "m9 9 6 6", key: "z0biqf" }]
|
|
@@ -56,7 +56,7 @@ const Xt = T("CircleX", [
|
|
|
56
56
|
* This source code is licensed under the ISC license.
|
|
57
57
|
* See the LICENSE file in the root directory of this source tree.
|
|
58
58
|
*/
|
|
59
|
-
const
|
|
59
|
+
const sn = T("Database", [
|
|
60
60
|
["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3", key: "msslwz" }],
|
|
61
61
|
["path", { d: "M3 5V19A9 3 0 0 0 21 19V5", key: "1wlel7" }],
|
|
62
62
|
["path", { d: "M3 12A9 3 0 0 0 21 12", key: "mv7ke4" }]
|
|
@@ -67,7 +67,7 @@ const en = T("Database", [
|
|
|
67
67
|
* This source code is licensed under the ISC license.
|
|
68
68
|
* See the LICENSE file in the root directory of this source tree.
|
|
69
69
|
*/
|
|
70
|
-
const
|
|
70
|
+
const an = T("Eraser", [
|
|
71
71
|
[
|
|
72
72
|
"path",
|
|
73
73
|
{
|
|
@@ -84,7 +84,7 @@ const sn = T("Eraser", [
|
|
|
84
84
|
* This source code is licensed under the ISC license.
|
|
85
85
|
* See the LICENSE file in the root directory of this source tree.
|
|
86
86
|
*/
|
|
87
|
-
const
|
|
87
|
+
const va = T("Filter", [
|
|
88
88
|
["polygon", { points: "22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3", key: "1yg77f" }]
|
|
89
89
|
]);
|
|
90
90
|
/**
|
|
@@ -93,7 +93,7 @@ const ya = T("Filter", [
|
|
|
93
93
|
* This source code is licensed under the ISC license.
|
|
94
94
|
* See the LICENSE file in the root directory of this source tree.
|
|
95
95
|
*/
|
|
96
|
-
const
|
|
96
|
+
const Na = T("GanttChart", [
|
|
97
97
|
["path", { d: "M8 6h10", key: "9lnwnk" }],
|
|
98
98
|
["path", { d: "M6 12h9", key: "1g9pqf" }],
|
|
99
99
|
["path", { d: "M11 18h7", key: "c8dzvl" }]
|
|
@@ -104,7 +104,7 @@ const va = T("GanttChart", [
|
|
|
104
104
|
* This source code is licensed under the ISC license.
|
|
105
105
|
* See the LICENSE file in the root directory of this source tree.
|
|
106
106
|
*/
|
|
107
|
-
const
|
|
107
|
+
const tn = T("Glasses", [
|
|
108
108
|
["circle", { cx: "6", cy: "15", r: "4", key: "vux9w4" }],
|
|
109
109
|
["circle", { cx: "18", cy: "15", r: "4", key: "18o8ve" }],
|
|
110
110
|
["path", { d: "M14 15a2 2 0 0 0-2-2 2 2 0 0 0-2 2", key: "1ag4bs" }],
|
|
@@ -117,7 +117,7 @@ const an = T("Glasses", [
|
|
|
117
117
|
* This source code is licensed under the ISC license.
|
|
118
118
|
* See the LICENSE file in the root directory of this source tree.
|
|
119
119
|
*/
|
|
120
|
-
const
|
|
120
|
+
const nn = T("Hammer", [
|
|
121
121
|
["path", { d: "m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9", key: "eefl8a" }],
|
|
122
122
|
["path", { d: "m18 15 4-4", key: "16gjal" }],
|
|
123
123
|
[
|
|
@@ -134,7 +134,7 @@ const tn = T("Hammer", [
|
|
|
134
134
|
* This source code is licensed under the ISC license.
|
|
135
135
|
* See the LICENSE file in the root directory of this source tree.
|
|
136
136
|
*/
|
|
137
|
-
const
|
|
137
|
+
const rn = T("Hash", [
|
|
138
138
|
["line", { x1: "4", x2: "20", y1: "9", y2: "9", key: "4lhtct" }],
|
|
139
139
|
["line", { x1: "4", x2: "20", y1: "15", y2: "15", key: "vyu0kd" }],
|
|
140
140
|
["line", { x1: "10", x2: "8", y1: "3", y2: "21", key: "1ggp8o" }],
|
|
@@ -146,7 +146,7 @@ const nn = T("Hash", [
|
|
|
146
146
|
* This source code is licensed under the ISC license.
|
|
147
147
|
* See the LICENSE file in the root directory of this source tree.
|
|
148
148
|
*/
|
|
149
|
-
const
|
|
149
|
+
const ln = T("Key", [
|
|
150
150
|
["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" }],
|
|
151
151
|
["path", { d: "m21 2-9.6 9.6", key: "1j0ho8" }],
|
|
152
152
|
["circle", { cx: "7.5", cy: "15.5", r: "5.5", key: "yqb3hr" }]
|
|
@@ -157,7 +157,7 @@ const rn = T("Key", [
|
|
|
157
157
|
* This source code is licensed under the ISC license.
|
|
158
158
|
* See the LICENSE file in the root directory of this source tree.
|
|
159
159
|
*/
|
|
160
|
-
const
|
|
160
|
+
const qs = T("LineChart", [
|
|
161
161
|
["path", { d: "M3 3v18h18", key: "1s2lah" }],
|
|
162
162
|
["path", { d: "m19 9-5 5-4-4-3 3", key: "2osh9i" }]
|
|
163
163
|
]);
|
|
@@ -167,7 +167,7 @@ const Vs = T("LineChart", [
|
|
|
167
167
|
* This source code is licensed under the ISC license.
|
|
168
168
|
* See the LICENSE file in the root directory of this source tree.
|
|
169
169
|
*/
|
|
170
|
-
const
|
|
170
|
+
const on = T("ListEnd", [
|
|
171
171
|
["path", { d: "M16 12H3", key: "1a2rj7" }],
|
|
172
172
|
["path", { d: "M16 6H3", key: "1wxfjs" }],
|
|
173
173
|
["path", { d: "M10 18H3", key: "13769t" }],
|
|
@@ -180,7 +180,7 @@ const ln = T("ListEnd", [
|
|
|
180
180
|
* This source code is licensed under the ISC license.
|
|
181
181
|
* See the LICENSE file in the root directory of this source tree.
|
|
182
182
|
*/
|
|
183
|
-
const
|
|
183
|
+
const cn = T("ListStart", [
|
|
184
184
|
["path", { d: "M16 12H3", key: "1a2rj7" }],
|
|
185
185
|
["path", { d: "M16 18H3", key: "12xzn7" }],
|
|
186
186
|
["path", { d: "M10 6H3", key: "lf8lx7" }],
|
|
@@ -193,7 +193,7 @@ const on = T("ListStart", [
|
|
|
193
193
|
* This source code is licensed under the ISC license.
|
|
194
194
|
* See the LICENSE file in the root directory of this source tree.
|
|
195
195
|
*/
|
|
196
|
-
const
|
|
196
|
+
const dn = T("ListX", [
|
|
197
197
|
["path", { d: "M11 12H3", key: "51ecnj" }],
|
|
198
198
|
["path", { d: "M16 6H3", key: "1wxfjs" }],
|
|
199
199
|
["path", { d: "M16 18H3", key: "12xzn7" }],
|
|
@@ -215,7 +215,7 @@ const Je = T("LoaderCircle", [
|
|
|
215
215
|
* This source code is licensed under the ISC license.
|
|
216
216
|
* See the LICENSE file in the root directory of this source tree.
|
|
217
217
|
*/
|
|
218
|
-
const
|
|
218
|
+
const hn = T("MessageSquareMore", [
|
|
219
219
|
["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" }],
|
|
220
220
|
["path", { d: "M8 10h.01", key: "19clt8" }],
|
|
221
221
|
["path", { d: "M12 10h.01", key: "1nrarc" }],
|
|
@@ -227,7 +227,7 @@ const dn = T("MessageSquareMore", [
|
|
|
227
227
|
* This source code is licensed under the ISC license.
|
|
228
228
|
* See the LICENSE file in the root directory of this source tree.
|
|
229
229
|
*/
|
|
230
|
-
const
|
|
230
|
+
const mn = T("Network", [
|
|
231
231
|
["rect", { x: "16", y: "16", width: "6", height: "6", rx: "1", key: "4q2zg0" }],
|
|
232
232
|
["rect", { x: "2", y: "16", width: "6", height: "6", rx: "1", key: "8cvhb9" }],
|
|
233
233
|
["rect", { x: "9", y: "2", width: "6", height: "6", rx: "1", key: "1egb70" }],
|
|
@@ -240,7 +240,7 @@ const hn = T("Network", [
|
|
|
240
240
|
* This source code is licensed under the ISC license.
|
|
241
241
|
* See the LICENSE file in the root directory of this source tree.
|
|
242
242
|
*/
|
|
243
|
-
const
|
|
243
|
+
const Ca = T("Pencil", [
|
|
244
244
|
["path", { d: "M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z", key: "5qss01" }],
|
|
245
245
|
["path", { d: "m15 5 4 4", key: "1mk7zo" }]
|
|
246
246
|
]);
|
|
@@ -250,7 +250,7 @@ const Na = T("Pencil", [
|
|
|
250
250
|
* This source code is licensed under the ISC license.
|
|
251
251
|
* See the LICENSE file in the root directory of this source tree.
|
|
252
252
|
*/
|
|
253
|
-
const
|
|
253
|
+
const Sa = T("PieChart", [
|
|
254
254
|
["path", { d: "M21.21 15.89A10 10 0 1 1 8 2.83", key: "k2fpak" }],
|
|
255
255
|
["path", { d: "M22 12A10 10 0 0 0 12 2v10z", key: "1rfc4y" }]
|
|
256
256
|
]);
|
|
@@ -260,7 +260,7 @@ const Ca = T("PieChart", [
|
|
|
260
260
|
* This source code is licensed under the ISC license.
|
|
261
261
|
* See the LICENSE file in the root directory of this source tree.
|
|
262
262
|
*/
|
|
263
|
-
const
|
|
263
|
+
const un = T("Play", [
|
|
264
264
|
["polygon", { points: "6 3 20 12 6 21 6 3", key: "1oa8hb" }]
|
|
265
265
|
]);
|
|
266
266
|
/**
|
|
@@ -269,7 +269,7 @@ const mn = T("Play", [
|
|
|
269
269
|
* This source code is licensed under the ISC license.
|
|
270
270
|
* See the LICENSE file in the root directory of this source tree.
|
|
271
271
|
*/
|
|
272
|
-
const
|
|
272
|
+
const xn = T("Plug2", [
|
|
273
273
|
["path", { d: "M9 2v6", key: "17ngun" }],
|
|
274
274
|
["path", { d: "M15 2v6", key: "s7yy2p" }],
|
|
275
275
|
["path", { d: "M12 17v5", key: "bb1du9" }],
|
|
@@ -282,7 +282,7 @@ const un = T("Plug2", [
|
|
|
282
282
|
* This source code is licensed under the ISC license.
|
|
283
283
|
* See the LICENSE file in the root directory of this source tree.
|
|
284
284
|
*/
|
|
285
|
-
const
|
|
285
|
+
const pn = T("Save", [
|
|
286
286
|
[
|
|
287
287
|
"path",
|
|
288
288
|
{
|
|
@@ -299,7 +299,7 @@ const xn = T("Save", [
|
|
|
299
299
|
* This source code is licensed under the ISC license.
|
|
300
300
|
* See the LICENSE file in the root directory of this source tree.
|
|
301
301
|
*/
|
|
302
|
-
const
|
|
302
|
+
const ka = T("ScatterChart", [
|
|
303
303
|
["circle", { cx: "7.5", cy: "7.5", r: ".5", fill: "currentColor", key: "kqv944" }],
|
|
304
304
|
["circle", { cx: "18.5", cy: "5.5", r: ".5", fill: "currentColor", key: "lysivs" }],
|
|
305
305
|
["circle", { cx: "11.5", cy: "11.5", r: ".5", fill: "currentColor", key: "byv1b8" }],
|
|
@@ -313,7 +313,7 @@ const Sa = T("ScatterChart", [
|
|
|
313
313
|
* This source code is licensed under the ISC license.
|
|
314
314
|
* See the LICENSE file in the root directory of this source tree.
|
|
315
315
|
*/
|
|
316
|
-
const
|
|
316
|
+
const fn = T("ShieldQuestion", [
|
|
317
317
|
[
|
|
318
318
|
"path",
|
|
319
319
|
{
|
|
@@ -330,7 +330,7 @@ const pn = T("ShieldQuestion", [
|
|
|
330
330
|
* This source code is licensed under the ISC license.
|
|
331
331
|
* See the LICENSE file in the root directory of this source tree.
|
|
332
332
|
*/
|
|
333
|
-
const
|
|
333
|
+
const gn = T("Sigma", [
|
|
334
334
|
["path", { d: "M18 7V4H6l6 8-6 8h12v-3", key: "zis8ev" }]
|
|
335
335
|
]);
|
|
336
336
|
/**
|
|
@@ -339,7 +339,7 @@ const fn = T("Sigma", [
|
|
|
339
339
|
* This source code is licensed under the ISC license.
|
|
340
340
|
* See the LICENSE file in the root directory of this source tree.
|
|
341
341
|
*/
|
|
342
|
-
const
|
|
342
|
+
const jn = T("SwatchBook", [
|
|
343
343
|
["path", { d: "M11 17a4 4 0 0 1-8 0V5a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2Z", key: "1ldrpk" }],
|
|
344
344
|
["path", { d: "M16.7 13H19a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2H7", key: "11i5po" }],
|
|
345
345
|
["path", { d: "M 7 17h0.01", key: "10821z" }],
|
|
@@ -357,7 +357,7 @@ const gn = T("SwatchBook", [
|
|
|
357
357
|
* This source code is licensed under the ISC license.
|
|
358
358
|
* See the LICENSE file in the root directory of this source tree.
|
|
359
359
|
*/
|
|
360
|
-
const
|
|
360
|
+
const bn = T("Tag", [
|
|
361
361
|
[
|
|
362
362
|
"path",
|
|
363
363
|
{
|
|
@@ -373,7 +373,7 @@ const jn = T("Tag", [
|
|
|
373
373
|
* This source code is licensed under the ISC license.
|
|
374
374
|
* See the LICENSE file in the root directory of this source tree.
|
|
375
375
|
*/
|
|
376
|
-
const
|
|
376
|
+
const yn = T("ToggleLeft", [
|
|
377
377
|
["rect", { width: "20", height: "12", x: "2", y: "6", rx: "6", ry: "6", key: "f2vt7d" }],
|
|
378
378
|
["circle", { cx: "8", cy: "12", r: "2", key: "1nvbw3" }]
|
|
379
379
|
]);
|
|
@@ -383,7 +383,7 @@ const bn = T("ToggleLeft", [
|
|
|
383
383
|
* This source code is licensed under the ISC license.
|
|
384
384
|
* See the LICENSE file in the root directory of this source tree.
|
|
385
385
|
*/
|
|
386
|
-
const
|
|
386
|
+
const Rs = T("Type", [
|
|
387
387
|
["polyline", { points: "4 7 4 4 20 4 20 7", key: "1nosan" }],
|
|
388
388
|
["line", { x1: "9", x2: "15", y1: "20", y2: "20", key: "swin9y" }],
|
|
389
389
|
["line", { x1: "12", x2: "12", y1: "4", y2: "20", key: "1tx1rr" }]
|
|
@@ -394,14 +394,14 @@ const qs = T("Type", [
|
|
|
394
394
|
* This source code is licensed under the ISC license.
|
|
395
395
|
* See the LICENSE file in the root directory of this source tree.
|
|
396
396
|
*/
|
|
397
|
-
const
|
|
397
|
+
const vn = T("User", [
|
|
398
398
|
["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
|
|
399
399
|
["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
|
|
400
400
|
]);
|
|
401
|
-
function
|
|
402
|
-
const [s, t] =
|
|
401
|
+
function Nn() {
|
|
402
|
+
const [s, t] = O(""), [a, n] = O(!1), [r, m] = O(!1), u = w((o) => o.dashboard);
|
|
403
403
|
function d() {
|
|
404
|
-
const o =
|
|
404
|
+
const o = aa(u), f = De(u.id), p = JSON.parse(localStorage.getItem(f) || "[]");
|
|
405
405
|
if (p.some(
|
|
406
406
|
(b) => b.name === s
|
|
407
407
|
)) {
|
|
@@ -413,22 +413,22 @@ function vn() {
|
|
|
413
413
|
template: o
|
|
414
414
|
}), localStorage.setItem(f, JSON.stringify(p)), m(!1);
|
|
415
415
|
}
|
|
416
|
-
return /* @__PURE__ */ e.jsxs(
|
|
417
|
-
/* @__PURE__ */ e.jsx(
|
|
416
|
+
return /* @__PURE__ */ e.jsxs(Ss, { open: r, onOpenChange: m, children: [
|
|
417
|
+
/* @__PURE__ */ e.jsx(ks, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
418
418
|
k,
|
|
419
419
|
{
|
|
420
420
|
variant: "outline",
|
|
421
421
|
className: "h-7 p-2",
|
|
422
422
|
size: "sm",
|
|
423
423
|
children: [
|
|
424
|
-
/* @__PURE__ */ e.jsx(
|
|
424
|
+
/* @__PURE__ */ e.jsx(ws, { className: " mr-2 h-4 w-4", strokeWidth: 1.5 }),
|
|
425
425
|
"Add Lens"
|
|
426
426
|
]
|
|
427
427
|
}
|
|
428
428
|
) }),
|
|
429
|
-
/* @__PURE__ */ e.jsxs(
|
|
430
|
-
/* @__PURE__ */ e.jsxs(
|
|
431
|
-
/* @__PURE__ */ e.jsx(
|
|
429
|
+
/* @__PURE__ */ e.jsxs(zs, { className: "sm:max-w-[425px]", children: [
|
|
430
|
+
/* @__PURE__ */ e.jsxs(Fs, { children: [
|
|
431
|
+
/* @__PURE__ */ e.jsx(Ms, { children: "Add a Lens" }),
|
|
432
432
|
/* @__PURE__ */ e.jsx(Os, { children: "Lenses are private by default and are only visible to you." })
|
|
433
433
|
] }),
|
|
434
434
|
/* @__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: [
|
|
@@ -446,7 +446,7 @@ function vn() {
|
|
|
446
446
|
)
|
|
447
447
|
] }) }),
|
|
448
448
|
a && /* @__PURE__ */ e.jsx("p", { className: "text-sm", children: "The bookmark name already exists. Use a differnet name." }),
|
|
449
|
-
/* @__PURE__ */ e.jsx(
|
|
449
|
+
/* @__PURE__ */ e.jsx(sa, { children: /* @__PURE__ */ e.jsx(
|
|
450
450
|
k,
|
|
451
451
|
{
|
|
452
452
|
variant: "outline",
|
|
@@ -459,14 +459,14 @@ function vn() {
|
|
|
459
459
|
] })
|
|
460
460
|
] });
|
|
461
461
|
}
|
|
462
|
-
function
|
|
463
|
-
const [s, t] =
|
|
462
|
+
function Cn() {
|
|
463
|
+
const [s, t] = O(!1), [a, n] = O(""), r = w((i) => i.dashboard), m = w((i) => i.bookmarkKey), [u, d] = O([]), o = w((i) => i.actions.setDashboard), f = w(
|
|
464
464
|
(i) => i.actions.setFilterValues
|
|
465
465
|
), p = w(
|
|
466
466
|
(i) => i.actions.setBookmarkKey
|
|
467
467
|
);
|
|
468
468
|
Q(() => {
|
|
469
|
-
const i =
|
|
469
|
+
const i = De(r.id), x = JSON.parse(localStorage.getItem(i) || "[]");
|
|
470
470
|
d(x);
|
|
471
471
|
const h = x.find(
|
|
472
472
|
(S) => S.default
|
|
@@ -480,25 +480,25 @@ function Nn() {
|
|
|
480
480
|
h && (o(h), f(x.filterValues || []), p(i === "Original" ? "" : i)), n(i);
|
|
481
481
|
}
|
|
482
482
|
function b(i) {
|
|
483
|
-
const x =
|
|
483
|
+
const x = De(r.id), S = JSON.parse(localStorage.getItem(x) || "[]").filter(
|
|
484
484
|
(j) => j.name !== i
|
|
485
485
|
);
|
|
486
486
|
localStorage.setItem(x, JSON.stringify(S)), d(S);
|
|
487
487
|
}
|
|
488
|
-
return /* @__PURE__ */ e.jsxs(
|
|
489
|
-
/* @__PURE__ */ e.jsx(
|
|
490
|
-
/* @__PURE__ */ e.jsxs(
|
|
491
|
-
/* @__PURE__ */ e.jsx(
|
|
492
|
-
/* @__PURE__ */ e.jsx(
|
|
488
|
+
return /* @__PURE__ */ e.jsxs(Ka, { open: s, onOpenChange: t, children: [
|
|
489
|
+
/* @__PURE__ */ e.jsx(Ga, { asChild: !0, children: /* @__PURE__ */ e.jsx(k, { variant: "outline", className: "h-7 p-2", children: /* @__PURE__ */ e.jsx(tn, { className: "h-4 w-4", strokeWidth: 1.5 }) }) }),
|
|
490
|
+
/* @__PURE__ */ e.jsxs(Ja, { className: "w-56", children: [
|
|
491
|
+
/* @__PURE__ */ e.jsx(Ua, { children: "Lenses" }),
|
|
492
|
+
/* @__PURE__ */ e.jsx(Qa, {}),
|
|
493
493
|
/* @__PURE__ */ e.jsxs(
|
|
494
|
-
|
|
494
|
+
Wa,
|
|
495
495
|
{
|
|
496
496
|
value: a,
|
|
497
497
|
onValueChange: g,
|
|
498
498
|
children: [
|
|
499
|
-
/* @__PURE__ */ e.jsx(
|
|
499
|
+
/* @__PURE__ */ e.jsx($s, { value: "Original", children: "Original" }),
|
|
500
500
|
u.filter((i) => i.name != "Original").map((i, x) => /* @__PURE__ */ e.jsxs(
|
|
501
|
-
|
|
501
|
+
$s,
|
|
502
502
|
{
|
|
503
503
|
className: "xbg-red-100 flex justify-between",
|
|
504
504
|
value: i.name,
|
|
@@ -525,14 +525,14 @@ function Nn() {
|
|
|
525
525
|
] })
|
|
526
526
|
] });
|
|
527
527
|
}
|
|
528
|
-
function
|
|
529
|
-
const [s, t] =
|
|
528
|
+
function Sn() {
|
|
529
|
+
const [s, t] = O(!1), a = w((m) => m.dashboard), n = w((m) => m.bookmarkKey);
|
|
530
530
|
Q(() => {
|
|
531
531
|
if (!n) {
|
|
532
532
|
t(!1);
|
|
533
533
|
return;
|
|
534
534
|
}
|
|
535
|
-
const m =
|
|
535
|
+
const m = De(a.id), d = JSON.parse(
|
|
536
536
|
localStorage.getItem(m) || "[]"
|
|
537
537
|
).find(
|
|
538
538
|
(o) => o.name === n
|
|
@@ -542,7 +542,7 @@ function Cn() {
|
|
|
542
542
|
function r(m) {
|
|
543
543
|
if (t(m), !n)
|
|
544
544
|
return;
|
|
545
|
-
const u =
|
|
545
|
+
const u = De(a.id), o = JSON.parse(
|
|
546
546
|
localStorage.getItem(u) || "[]"
|
|
547
547
|
).map((f) => (f.name === n ? f.default = m : f.default = !1, f));
|
|
548
548
|
console.log(o), localStorage.setItem(u, JSON.stringify(o));
|
|
@@ -566,7 +566,7 @@ function Cn() {
|
|
|
566
566
|
)
|
|
567
567
|
] });
|
|
568
568
|
}
|
|
569
|
-
function
|
|
569
|
+
function kn() {
|
|
570
570
|
const s = w((j) => j.bookmarkKey), t = w((j) => j.dashboard);
|
|
571
571
|
w((j) => j.selectedSheetId);
|
|
572
572
|
const a = w(
|
|
@@ -597,19 +597,19 @@ function Sn() {
|
|
|
597
597
|
type: "bar",
|
|
598
598
|
sql: "select COUNT(*) from YOUR_TABLE",
|
|
599
599
|
data: []
|
|
600
|
-
},
|
|
600
|
+
}, M = {
|
|
601
601
|
id: $e(),
|
|
602
602
|
cards: [j],
|
|
603
603
|
activeCardId: j.id
|
|
604
604
|
};
|
|
605
|
-
o(i.id,
|
|
605
|
+
o(i.id, M), f(M.id);
|
|
606
606
|
}, h = () => {
|
|
607
607
|
g(!0);
|
|
608
608
|
};
|
|
609
609
|
function S() {
|
|
610
610
|
if (!s || s === "")
|
|
611
611
|
return;
|
|
612
|
-
const j =
|
|
612
|
+
const j = aa(t), M = De(t.id), y = JSON.parse(localStorage.getItem(M) || "[]"), A = y.findIndex(
|
|
613
613
|
(E) => E.name === s
|
|
614
614
|
);
|
|
615
615
|
A !== -1 ? y[A] = {
|
|
@@ -621,7 +621,7 @@ function Sn() {
|
|
|
621
621
|
name: s,
|
|
622
622
|
template: j,
|
|
623
623
|
filterValues: n
|
|
624
|
-
}), localStorage.setItem(
|
|
624
|
+
}), localStorage.setItem(M, JSON.stringify(y)), u == null || u(j);
|
|
625
625
|
}
|
|
626
626
|
return r ? null : /* @__PURE__ */ e.jsxs(
|
|
627
627
|
"div",
|
|
@@ -633,12 +633,12 @@ function Sn() {
|
|
|
633
633
|
/* @__PURE__ */ e.jsx(G, { children: s }),
|
|
634
634
|
!!s && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
635
635
|
/* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: "|" }),
|
|
636
|
-
/* @__PURE__ */ e.jsx(
|
|
636
|
+
/* @__PURE__ */ e.jsx(Sn, {})
|
|
637
637
|
] })
|
|
638
638
|
] }),
|
|
639
639
|
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
|
|
640
|
-
a && !r && /* @__PURE__ */ e.jsx(
|
|
641
|
-
!r && /* @__PURE__ */ e.jsx(
|
|
640
|
+
a && !r && /* @__PURE__ */ e.jsx(Nn, {}),
|
|
641
|
+
!r && /* @__PURE__ */ e.jsx(Cn, {}),
|
|
642
642
|
a && !r && /* @__PURE__ */ e.jsxs(
|
|
643
643
|
k,
|
|
644
644
|
{
|
|
@@ -648,7 +648,7 @@ function Sn() {
|
|
|
648
648
|
disabled: !a,
|
|
649
649
|
onClick: x,
|
|
650
650
|
children: [
|
|
651
|
-
/* @__PURE__ */ e.jsx(
|
|
651
|
+
/* @__PURE__ */ e.jsx(ws, { className: "mr-2 h-4 w-4", strokeWidth: 1.5 }),
|
|
652
652
|
"Add Frame"
|
|
653
653
|
]
|
|
654
654
|
}
|
|
@@ -660,7 +660,7 @@ function Sn() {
|
|
|
660
660
|
className: "h-7 p-2",
|
|
661
661
|
onClick: h,
|
|
662
662
|
size: "sm",
|
|
663
|
-
children: /* @__PURE__ */ e.jsx(
|
|
663
|
+
children: /* @__PURE__ */ e.jsx(Ca, { className: "h-4 w-4", strokeWidth: 1.5 })
|
|
664
664
|
}
|
|
665
665
|
),
|
|
666
666
|
a && !r && /* @__PURE__ */ e.jsx(
|
|
@@ -683,7 +683,7 @@ function Sn() {
|
|
|
683
683
|
variant: "outline",
|
|
684
684
|
onClick: S,
|
|
685
685
|
size: "sm",
|
|
686
|
-
children: /* @__PURE__ */ e.jsx(
|
|
686
|
+
children: /* @__PURE__ */ e.jsx(pn, { className: "h-4 w-4", strokeWidth: 1.5 })
|
|
687
687
|
}
|
|
688
688
|
),
|
|
689
689
|
!m && !r && a && /* @__PURE__ */ e.jsx(
|
|
@@ -693,7 +693,7 @@ function Sn() {
|
|
|
693
693
|
variant: "outline",
|
|
694
694
|
onClick: () => d(!0),
|
|
695
695
|
size: "sm",
|
|
696
|
-
children: /* @__PURE__ */ e.jsx(
|
|
696
|
+
children: /* @__PURE__ */ e.jsx(va, { className: "h-4 w-4", strokeWidth: 1.5 })
|
|
697
697
|
}
|
|
698
698
|
),
|
|
699
699
|
!r && a && !1,
|
|
@@ -719,24 +719,24 @@ function _e({
|
|
|
719
719
|
const g = n ? "Loading..." : r ? "Error" : a;
|
|
720
720
|
function b() {
|
|
721
721
|
if (s === "Connection")
|
|
722
|
-
return /* @__PURE__ */ e.jsx(
|
|
722
|
+
return /* @__PURE__ */ e.jsx(xn, { className: "size-4 rotate-90" });
|
|
723
723
|
if (s === "Database")
|
|
724
|
-
return /* @__PURE__ */ e.jsx(
|
|
724
|
+
return /* @__PURE__ */ e.jsx(sn, { className: "size-4" });
|
|
725
725
|
if (s === "Schema")
|
|
726
|
-
return /* @__PURE__ */ e.jsx(
|
|
726
|
+
return /* @__PURE__ */ e.jsx(mn, { className: "size-4" });
|
|
727
727
|
if (s === "Table")
|
|
728
728
|
return /* @__PURE__ */ e.jsx(Ds, { className: "size-4" });
|
|
729
|
-
if (s === "
|
|
730
|
-
return /* @__PURE__ */ e.jsx(
|
|
729
|
+
if (s === "Model")
|
|
730
|
+
return /* @__PURE__ */ e.jsx(Xt, { className: "size-4" });
|
|
731
731
|
}
|
|
732
732
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
733
|
-
f && /* @__PURE__ */ e.jsx("div", { className: "shrink-0", children: m ? /* @__PURE__ */ e.jsxs(
|
|
734
|
-
/* @__PURE__ */ e.jsx(
|
|
735
|
-
/* @__PURE__ */ e.jsx(
|
|
733
|
+
f && /* @__PURE__ */ e.jsx("div", { className: "shrink-0", children: m ? /* @__PURE__ */ e.jsxs(Ts, { children: [
|
|
734
|
+
/* @__PURE__ */ e.jsx(ta, { children: b() }),
|
|
735
|
+
/* @__PURE__ */ e.jsx(Ls, { className: "text-xs", align: "start", children: m })
|
|
736
736
|
] }) : b() }),
|
|
737
|
-
/* @__PURE__ */ e.jsxs(
|
|
737
|
+
/* @__PURE__ */ e.jsxs(Me, { disabled: p, value: g, onValueChange: u, children: [
|
|
738
738
|
/* @__PURE__ */ e.jsx(
|
|
739
|
-
|
|
739
|
+
Oe,
|
|
740
740
|
{
|
|
741
741
|
className: ee(
|
|
742
742
|
"h-9 w-full focus:ring-1 focus:ring-offset-0",
|
|
@@ -750,7 +750,7 @@ function _e({
|
|
|
750
750
|
)
|
|
751
751
|
}
|
|
752
752
|
),
|
|
753
|
-
/* @__PURE__ */ e.jsx(
|
|
753
|
+
/* @__PURE__ */ e.jsx(Le, { children: /* @__PURE__ */ e.jsxs(Pe, { children: [
|
|
754
754
|
n ? /* @__PURE__ */ e.jsx(Ae, { children: "Loading..." }) : /* @__PURE__ */ e.jsx(Ae, { children: s }),
|
|
755
755
|
/* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
756
756
|
d && /* @__PURE__ */ e.jsx(X, { value: "none", children: "None" }, "none"),
|
|
@@ -761,19 +761,19 @@ function _e({
|
|
|
761
761
|
] })
|
|
762
762
|
] });
|
|
763
763
|
}
|
|
764
|
-
function
|
|
765
|
-
const [t, a] =
|
|
764
|
+
function wn({ column: s }) {
|
|
765
|
+
const [t, a] = O(!1), n = c((b) => b.selectedTableName), r = c(
|
|
766
766
|
(b) => b.selectedSchemaName
|
|
767
767
|
), m = c(
|
|
768
768
|
(b) => b.selectedDatamodelId
|
|
769
769
|
), u = c((b) => b.sqlGen), { modelItems: d } = cs(), o = c((b) => b.actions.setSqlGen), f = c((b) => b.actions.setCardSql), p = c((b) => b.actions.setRunSql);
|
|
770
770
|
function g(b, i) {
|
|
771
771
|
var j;
|
|
772
|
-
const x =
|
|
773
|
-
(
|
|
772
|
+
const x = na(b, u, i), h = (j = d == null ? void 0 : d.find(
|
|
773
|
+
(M) => M.id === m
|
|
774
774
|
)) == null ? void 0 : j.name;
|
|
775
775
|
o(x);
|
|
776
|
-
const S =
|
|
776
|
+
const S = ra(
|
|
777
777
|
x,
|
|
778
778
|
ue(r || ""),
|
|
779
779
|
ue(n),
|
|
@@ -782,7 +782,7 @@ function kn({ column: s }) {
|
|
|
782
782
|
S && (f(S), p(!0)), a(!1);
|
|
783
783
|
}
|
|
784
784
|
return /* @__PURE__ */ e.jsxs(ls, { open: t, onOpenChange: a, children: [
|
|
785
|
-
/* @__PURE__ */ e.jsx(is, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
785
|
+
/* @__PURE__ */ e.jsx(is, { asChild: !0, children: /* @__PURE__ */ e.jsx(Ya, { className: "h-4 w-4 cursor-pointer text-foreground/40" }) }),
|
|
786
786
|
/* @__PURE__ */ e.jsx(
|
|
787
787
|
os,
|
|
788
788
|
{
|
|
@@ -834,19 +834,19 @@ function kn({ column: s }) {
|
|
|
834
834
|
)
|
|
835
835
|
] });
|
|
836
836
|
}
|
|
837
|
-
function
|
|
838
|
-
return /* @__PURE__ */ e.jsxs(
|
|
839
|
-
/* @__PURE__ */ e.jsx(
|
|
837
|
+
function wa({ column: s }) {
|
|
838
|
+
return /* @__PURE__ */ e.jsxs(Ts, { children: [
|
|
839
|
+
/* @__PURE__ */ e.jsx(Za, { asChild: !0, children: Xa.includes(s.data_type.toLowerCase()) ? (
|
|
840
840
|
// <span className=" font-thin">T</span>
|
|
841
|
-
/* @__PURE__ */ e.jsx(
|
|
842
|
-
) :
|
|
841
|
+
/* @__PURE__ */ e.jsx(Rs, { className: "size-3" })
|
|
842
|
+
) : la.includes(s.data_type.toLowerCase()) ? (
|
|
843
843
|
//
|
|
844
|
-
/* @__PURE__ */ e.jsx(
|
|
845
|
-
) :
|
|
846
|
-
/* @__PURE__ */ e.jsx(
|
|
844
|
+
/* @__PURE__ */ e.jsx(rn, { className: "size-3" })
|
|
845
|
+
) : et.includes(s.data_type.toLowerCase()) ? /* @__PURE__ */ e.jsx(st, { className: "size-3" }) : at.includes(s.data_type.toLowerCase()) ? /* @__PURE__ */ e.jsx(yn, { className: "size-3" }) : /* @__PURE__ */ e.jsx(fn, { className: "size-3" }) }),
|
|
846
|
+
/* @__PURE__ */ e.jsx(Ls, { children: /* @__PURE__ */ e.jsx("p", { className: "font-mono text-xs", children: s.data_type }) })
|
|
847
847
|
] });
|
|
848
848
|
}
|
|
849
|
-
function
|
|
849
|
+
function zn({
|
|
850
850
|
schemaName: s,
|
|
851
851
|
tableName: t,
|
|
852
852
|
columns: a,
|
|
@@ -865,13 +865,13 @@ function wn({
|
|
|
865
865
|
), { setAIScopeTables: g } = w((N) => N.actions), b = c((N) => N.actions.setRunSql), i = c((N) => N.actions.setSqlGen), x = c(
|
|
866
866
|
(N) => N.actions.setIsShowingVisual
|
|
867
867
|
), h = c((N) => N.actions.setCardSql), { connectionType: S, modelItems: j } = cs();
|
|
868
|
-
function
|
|
869
|
-
var
|
|
870
|
-
const z =
|
|
868
|
+
function M(N) {
|
|
869
|
+
var L;
|
|
870
|
+
const z = na(N, r);
|
|
871
871
|
i(z);
|
|
872
|
-
const q = (
|
|
872
|
+
const q = (L = j == null ? void 0 : j.find(
|
|
873
873
|
(R) => R.id === f
|
|
874
|
-
)) == null ? void 0 :
|
|
874
|
+
)) == null ? void 0 : L.name, P = ra(z, ue(s), ue(t), q);
|
|
875
875
|
P && (h(P), b(!0));
|
|
876
876
|
}
|
|
877
877
|
function y() {
|
|
@@ -888,8 +888,8 @@ function wn({
|
|
|
888
888
|
schemaName: d,
|
|
889
889
|
tableName: o
|
|
890
890
|
}, P = [...p || [], z].filter(
|
|
891
|
-
(
|
|
892
|
-
(J) => J.connectinonId ===
|
|
891
|
+
(L, R, W) => W.findIndex(
|
|
892
|
+
(J) => J.connectinonId === L.connectinonId && J.tableName === L.tableName
|
|
893
893
|
) === R
|
|
894
894
|
);
|
|
895
895
|
g(P), js.success(`Added '${o}' to AI Scope`, {
|
|
@@ -909,12 +909,12 @@ function wn({
|
|
|
909
909
|
}
|
|
910
910
|
}
|
|
911
911
|
function E() {
|
|
912
|
-
var
|
|
913
|
-
let N =
|
|
914
|
-
const z = (
|
|
912
|
+
var L;
|
|
913
|
+
let N = oa(s, t);
|
|
914
|
+
const z = (L = j == null ? void 0 : j.find(
|
|
915
915
|
(R) => R.id === f
|
|
916
|
-
)) == null ? void 0 :
|
|
917
|
-
console.log("modelName", z), f && f !== "none" && (N =
|
|
916
|
+
)) == null ? void 0 : L.name;
|
|
917
|
+
console.log("modelName", z), f && f !== "none" && (N = `${bs}.${z}`);
|
|
918
918
|
let q = N;
|
|
919
919
|
return ((R) => /[A-Z]/.test(R))(t) && (q = q.split(".").map((W) => `"${W}"`).join(".")), q;
|
|
920
920
|
}
|
|
@@ -924,14 +924,14 @@ function wn({
|
|
|
924
924
|
const z = S === "MSSQL" ? `SELECT top 10 * FROM ${N}` : `SELECT * FROM ${N} LIMIT 10`;
|
|
925
925
|
h(z), b(!0);
|
|
926
926
|
}
|
|
927
|
-
function
|
|
927
|
+
function D() {
|
|
928
928
|
const N = E();
|
|
929
929
|
x(!1), h(`SELECT COUNT(*) as count FROM ${N}`), b(!0);
|
|
930
930
|
}
|
|
931
931
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex grow flex-col space-y-4 px-4", children: [
|
|
932
932
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-center gap-1", children: [
|
|
933
933
|
/* @__PURE__ */ e.jsx(
|
|
934
|
-
|
|
934
|
+
ia,
|
|
935
935
|
{
|
|
936
936
|
title: `${y() ? "Remove from" : "Add to"} AI Scope`,
|
|
937
937
|
pressed: y(),
|
|
@@ -939,7 +939,7 @@ function wn({
|
|
|
939
939
|
variant: "outline",
|
|
940
940
|
className: "h-9 px-2",
|
|
941
941
|
children: /* @__PURE__ */ e.jsx(
|
|
942
|
-
|
|
942
|
+
tt,
|
|
943
943
|
{
|
|
944
944
|
className: ee("size-4", {
|
|
945
945
|
"text-primary": y(),
|
|
@@ -958,7 +958,7 @@ function wn({
|
|
|
958
958
|
variant: "secondary",
|
|
959
959
|
className: "flex",
|
|
960
960
|
children: [
|
|
961
|
-
n !== "Success" ? /* @__PURE__ */ e.jsx(Je, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(
|
|
961
|
+
n !== "Success" ? /* @__PURE__ */ e.jsx(Je, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(jn, { className: "mr-2 size-4" }),
|
|
962
962
|
"Top 10"
|
|
963
963
|
]
|
|
964
964
|
}
|
|
@@ -967,51 +967,51 @@ function wn({
|
|
|
967
967
|
k,
|
|
968
968
|
{
|
|
969
969
|
disabled: n !== "Success",
|
|
970
|
-
onClick:
|
|
970
|
+
onClick: D,
|
|
971
971
|
size: "sm",
|
|
972
972
|
variant: "secondary",
|
|
973
973
|
className: "flex",
|
|
974
974
|
children: [
|
|
975
|
-
n !== "Success" ? /* @__PURE__ */ e.jsx(Je, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(
|
|
975
|
+
n !== "Success" ? /* @__PURE__ */ e.jsx(Je, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(gn, { className: "mr-2 size-4" }),
|
|
976
976
|
"Count"
|
|
977
977
|
]
|
|
978
978
|
}
|
|
979
979
|
)
|
|
980
980
|
] }),
|
|
981
981
|
/* @__PURE__ */ e.jsxs(
|
|
982
|
-
|
|
982
|
+
As,
|
|
983
983
|
{
|
|
984
984
|
className: "flex-1 basis-0 overflow-y-auto border-b border-t border-muted py-3",
|
|
985
985
|
children: [
|
|
986
986
|
a == null ? void 0 : a.map((N) => /* @__PURE__ */ e.jsxs(
|
|
987
987
|
"div",
|
|
988
988
|
{
|
|
989
|
-
onClick: () =>
|
|
989
|
+
onClick: () => M(N),
|
|
990
990
|
className: ee(
|
|
991
991
|
"mx-3 flex cursor-pointer items-center justify-between rounded px-2 py-[6px] text-sm transition-colors hover:bg-muted/50",
|
|
992
992
|
{
|
|
993
|
-
"bg-muted":
|
|
993
|
+
"bg-muted": nt(N, r)
|
|
994
994
|
}
|
|
995
995
|
),
|
|
996
996
|
children: [
|
|
997
997
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
998
|
-
/* @__PURE__ */ e.jsx(
|
|
998
|
+
/* @__PURE__ */ e.jsx(wa, { column: N }),
|
|
999
999
|
/* @__PURE__ */ e.jsx("span", { children: N.column_name })
|
|
1000
1000
|
] }),
|
|
1001
|
-
|
|
1001
|
+
la.includes(N.data_type) && /* @__PURE__ */ e.jsx(
|
|
1002
1002
|
"div",
|
|
1003
1003
|
{
|
|
1004
1004
|
onClick: (z) => z.stopPropagation(),
|
|
1005
1005
|
className: "flex items-center justify-end",
|
|
1006
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1006
|
+
children: /* @__PURE__ */ e.jsx(wn, { column: N })
|
|
1007
1007
|
}
|
|
1008
1008
|
)
|
|
1009
1009
|
]
|
|
1010
1010
|
},
|
|
1011
1011
|
N.column_name
|
|
1012
1012
|
)),
|
|
1013
|
-
/* @__PURE__ */ e.jsx(
|
|
1014
|
-
/* @__PURE__ */ e.jsx(
|
|
1013
|
+
/* @__PURE__ */ e.jsx(Ps, { orientation: "vertical" }),
|
|
1014
|
+
/* @__PURE__ */ e.jsx(Ps, { orientation: "horizontal" })
|
|
1015
1015
|
]
|
|
1016
1016
|
}
|
|
1017
1017
|
)
|
|
@@ -1019,7 +1019,7 @@ function wn({
|
|
|
1019
1019
|
}
|
|
1020
1020
|
function cs(s, t) {
|
|
1021
1021
|
var Ye, Ze, qe, Xe, es;
|
|
1022
|
-
let a =
|
|
1022
|
+
let a = Yt(() => [], []);
|
|
1023
1023
|
const n = Qe().authToken || s, r = c(
|
|
1024
1024
|
(l) => l.selectedConnectionId
|
|
1025
1025
|
), m = c(
|
|
@@ -1047,7 +1047,7 @@ function cs(s, t) {
|
|
|
1047
1047
|
function j(l) {
|
|
1048
1048
|
return !!(r && u && u !== "NA" && d && o || r && (l === "S3" || l === "API") || m && m);
|
|
1049
1049
|
}
|
|
1050
|
-
function
|
|
1050
|
+
function M(l) {
|
|
1051
1051
|
return r && l ? !(l === "API" || l === "S3") : !1;
|
|
1052
1052
|
}
|
|
1053
1053
|
const {
|
|
@@ -1064,7 +1064,7 @@ function cs(s, t) {
|
|
|
1064
1064
|
// Only fetch if authToken is present
|
|
1065
1065
|
}), {
|
|
1066
1066
|
data: V,
|
|
1067
|
-
isLoading:
|
|
1067
|
+
isLoading: D,
|
|
1068
1068
|
isError: N
|
|
1069
1069
|
} = me({
|
|
1070
1070
|
queryKey: ["models", r],
|
|
@@ -1080,7 +1080,7 @@ function cs(s, t) {
|
|
|
1080
1080
|
}), z = y == null ? void 0 : y.connections.find(
|
|
1081
1081
|
(l) => l.id === r
|
|
1082
1082
|
), q = z == null ? void 0 : z.type, P = (z == null ? void 0 : z.type) === "API" || (z == null ? void 0 : z.type) === "S3", {
|
|
1083
|
-
data:
|
|
1083
|
+
data: L,
|
|
1084
1084
|
isLoading: R,
|
|
1085
1085
|
isFetching: W,
|
|
1086
1086
|
isError: J,
|
|
@@ -1094,7 +1094,7 @@ function cs(s, t) {
|
|
|
1094
1094
|
connection_id: r
|
|
1095
1095
|
}
|
|
1096
1096
|
),
|
|
1097
|
-
enabled:
|
|
1097
|
+
enabled: M(q)
|
|
1098
1098
|
// !!selectedConnectionId && !isNonDbConnection, //currentConnection?.type !== 'API', // Only fetch if connectionId is present
|
|
1099
1099
|
}), {
|
|
1100
1100
|
data: K,
|
|
@@ -1193,10 +1193,10 @@ function cs(s, t) {
|
|
|
1193
1193
|
function Ve(l) {
|
|
1194
1194
|
p(l);
|
|
1195
1195
|
}
|
|
1196
|
-
function
|
|
1196
|
+
function Hs(l) {
|
|
1197
1197
|
g(l === "none" ? "" : l), l !== "none" && l !== "" && b("");
|
|
1198
1198
|
}
|
|
1199
|
-
|
|
1199
|
+
L && ((Ze = L == null ? void 0 : L.databases) == null ? void 0 : Ze.length) > 0, K && ((qe = K == null ? void 0 : K.schemas) == null ? void 0 : qe.length) > 0, se && ((Xe = se == null ? void 0 : se.columns) == null ? void 0 : Xe.length) > 0 && (a = se.columns.map((l) => ({
|
|
1200
1200
|
...l,
|
|
1201
1201
|
data_type: l.data_type.toLowerCase()
|
|
1202
1202
|
}))), J && (a = []), (U || E) && (a = []);
|
|
@@ -1209,7 +1209,7 @@ function cs(s, t) {
|
|
|
1209
1209
|
), hs = (es = V == null ? void 0 : V.datamodels) == null ? void 0 : es.map((l) => ({
|
|
1210
1210
|
id: l.id,
|
|
1211
1211
|
name: l.name
|
|
1212
|
-
})), We =
|
|
1212
|
+
})), We = L == null ? void 0 : L.databases.map((l) => ({
|
|
1213
1213
|
id: l.database_name,
|
|
1214
1214
|
name: l.database_name
|
|
1215
1215
|
})), ms = K == null ? void 0 : K.schemas.map((l) => ({
|
|
@@ -1224,7 +1224,7 @@ function cs(s, t) {
|
|
|
1224
1224
|
isConnectionsLoading: A,
|
|
1225
1225
|
isConnectionsError: E,
|
|
1226
1226
|
modelItems: hs,
|
|
1227
|
-
isModelsLoading:
|
|
1227
|
+
isModelsLoading: D,
|
|
1228
1228
|
isModelsError: N,
|
|
1229
1229
|
databaseItems: We,
|
|
1230
1230
|
isDatabasesLoadingOrFetching: R || W,
|
|
@@ -1243,12 +1243,12 @@ function cs(s, t) {
|
|
|
1243
1243
|
tableName: re,
|
|
1244
1244
|
schemaName: le,
|
|
1245
1245
|
handleConnectionChange: Ve,
|
|
1246
|
-
handleDatamodelChange:
|
|
1246
|
+
handleDatamodelChange: Hs,
|
|
1247
1247
|
handleDatabaseChange: Se,
|
|
1248
1248
|
handleSchemaChange: ve
|
|
1249
1249
|
};
|
|
1250
1250
|
}
|
|
1251
|
-
function
|
|
1251
|
+
function za({
|
|
1252
1252
|
ColumnsComponent: s
|
|
1253
1253
|
}) {
|
|
1254
1254
|
var ae;
|
|
@@ -1274,17 +1274,17 @@ function wa({
|
|
|
1274
1274
|
isConnectionsError: h,
|
|
1275
1275
|
isModelsError: S,
|
|
1276
1276
|
isDatabasesLoadingOrFetching: j,
|
|
1277
|
-
isDatabaseError:
|
|
1277
|
+
isDatabaseError: M,
|
|
1278
1278
|
isSchemaLoadingOrFetching: y,
|
|
1279
1279
|
isSchemaError: A,
|
|
1280
1280
|
isColumnsError: E,
|
|
1281
1281
|
isColumnsLoadingOrFetching: V,
|
|
1282
|
-
isTableLoadingOrFetching:
|
|
1282
|
+
isTableLoadingOrFetching: D,
|
|
1283
1283
|
isTableError: N,
|
|
1284
1284
|
connectionType: z,
|
|
1285
1285
|
isNonDbConnection: q,
|
|
1286
1286
|
handleConnectionChange: P,
|
|
1287
|
-
handleDatabaseChange:
|
|
1287
|
+
handleDatabaseChange: L,
|
|
1288
1288
|
handleSchemaChange: R,
|
|
1289
1289
|
handleDatamodelChange: W,
|
|
1290
1290
|
tableName: J,
|
|
@@ -1292,7 +1292,7 @@ function wa({
|
|
|
1292
1292
|
} = cs();
|
|
1293
1293
|
function K() {
|
|
1294
1294
|
return s ? s(te, J, b) : /* @__PURE__ */ e.jsx(
|
|
1295
|
-
|
|
1295
|
+
zn,
|
|
1296
1296
|
{
|
|
1297
1297
|
schemaName: te,
|
|
1298
1298
|
tableName: J,
|
|
@@ -1312,8 +1312,8 @@ function wa({
|
|
|
1312
1312
|
_e,
|
|
1313
1313
|
{
|
|
1314
1314
|
showNone: !0,
|
|
1315
|
-
onChange:
|
|
1316
|
-
isError:
|
|
1315
|
+
onChange: L,
|
|
1316
|
+
isError: M,
|
|
1317
1317
|
isLoading: j,
|
|
1318
1318
|
items: p,
|
|
1319
1319
|
value: n || "",
|
|
@@ -1342,7 +1342,7 @@ function wa({
|
|
|
1342
1342
|
isLoading: x,
|
|
1343
1343
|
items: o,
|
|
1344
1344
|
value: a || "",
|
|
1345
|
-
title: "
|
|
1345
|
+
title: "Model"
|
|
1346
1346
|
}
|
|
1347
1347
|
);
|
|
1348
1348
|
}
|
|
@@ -1370,7 +1370,7 @@ function wa({
|
|
|
1370
1370
|
onChange: u,
|
|
1371
1371
|
isError: N,
|
|
1372
1372
|
items: g,
|
|
1373
|
-
isLoading:
|
|
1373
|
+
isLoading: D,
|
|
1374
1374
|
value: m || "",
|
|
1375
1375
|
title: "Table"
|
|
1376
1376
|
}
|
|
@@ -1407,14 +1407,14 @@ function wa({
|
|
|
1407
1407
|
variant: "secondary",
|
|
1408
1408
|
className: "w-full",
|
|
1409
1409
|
children: [
|
|
1410
|
-
/* @__PURE__ */ e.jsx(
|
|
1410
|
+
/* @__PURE__ */ e.jsx(hn, { className: "mr-2 size-4" }),
|
|
1411
1411
|
"Help"
|
|
1412
1412
|
]
|
|
1413
1413
|
}
|
|
1414
1414
|
) })
|
|
1415
1415
|
] });
|
|
1416
1416
|
}
|
|
1417
|
-
function
|
|
1417
|
+
function Fn(s) {
|
|
1418
1418
|
const t = s.toUpperCase().indexOf("WHERE"), a = s.toUpperCase().indexOf("GROUP BY"), n = s.toUpperCase().indexOf("LIMIT"), r = s.toUpperCase().indexOf("ORDER BY");
|
|
1419
1419
|
let m = s.length;
|
|
1420
1420
|
if (r !== -1 && (m = r), n !== -1 && n < m && (m = n), t !== -1) {
|
|
@@ -1430,16 +1430,16 @@ function zn(s) {
|
|
|
1430
1430
|
return `${u} {{ filters | where }} ${d}`;
|
|
1431
1431
|
}
|
|
1432
1432
|
}
|
|
1433
|
-
function
|
|
1433
|
+
function Mn({
|
|
1434
1434
|
error: s,
|
|
1435
1435
|
setShowAIDialog: t,
|
|
1436
1436
|
setUserInputforAI: a,
|
|
1437
1437
|
setTriggerAIRun: n
|
|
1438
1438
|
}) {
|
|
1439
|
-
return /* @__PURE__ */ e.jsxs(
|
|
1440
|
-
/* @__PURE__ */ e.jsx(
|
|
1441
|
-
/* @__PURE__ */ e.jsx(
|
|
1442
|
-
/* @__PURE__ */ e.jsx(
|
|
1439
|
+
return /* @__PURE__ */ e.jsxs(ca, { openDelay: 0, children: [
|
|
1440
|
+
/* @__PURE__ */ e.jsx(da, { asChild: !0, children: /* @__PURE__ */ e.jsx(k, { variant: "link", className: "h-5 p-0", children: /* @__PURE__ */ e.jsx(en, { className: "h-4 w-4 text-red-500" }) }) }),
|
|
1441
|
+
/* @__PURE__ */ e.jsx(ha, { align: "start", className: "min-w-fit max-w-[500px]", children: /* @__PURE__ */ e.jsx("div", { className: "flex justify-between space-x-4", children: /* @__PURE__ */ e.jsxs("div", { className: "flex grow flex-col space-y-2", children: [
|
|
1442
|
+
/* @__PURE__ */ e.jsx(As, { className: "max-h-[250px] min-h-0 overflow-scroll", children: /* @__PURE__ */ e.jsx("p", { className: "overflow-auto rounded-md bg-muted p-2 text-xs leading-relaxed", children: s }) }),
|
|
1443
1443
|
/* @__PURE__ */ e.jsxs(
|
|
1444
1444
|
k,
|
|
1445
1445
|
{
|
|
@@ -1449,7 +1449,7 @@ function Fn({
|
|
|
1449
1449
|
size: "sm",
|
|
1450
1450
|
variant: "outline",
|
|
1451
1451
|
children: [
|
|
1452
|
-
/* @__PURE__ */ e.jsx(
|
|
1452
|
+
/* @__PURE__ */ e.jsx(nn, { className: "mr-2 h-4 w-4" }),
|
|
1453
1453
|
"Debug with AI"
|
|
1454
1454
|
]
|
|
1455
1455
|
}
|
|
@@ -1467,7 +1467,7 @@ function On({
|
|
|
1467
1467
|
/* @__PURE__ */ e.jsx("label", { className: "text-xs leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", children: s })
|
|
1468
1468
|
] });
|
|
1469
1469
|
}
|
|
1470
|
-
function
|
|
1470
|
+
function Tn() {
|
|
1471
1471
|
const { authToken: s } = Qe(), t = c(
|
|
1472
1472
|
(m) => m.selectedConnectionId
|
|
1473
1473
|
), { data: a } = me({
|
|
@@ -1483,17 +1483,17 @@ function Mn() {
|
|
|
1483
1483
|
);
|
|
1484
1484
|
return n == null ? void 0 : n.type;
|
|
1485
1485
|
}
|
|
1486
|
-
function
|
|
1487
|
-
const { authToken: s } = Qe(), t = Ge(null), a = c((o) => o.applyFilters), [n, r] =
|
|
1486
|
+
function Ln() {
|
|
1487
|
+
const { authToken: s } = Qe(), t = Ge(null), a = c((o) => o.applyFilters), [n, r] = O(""), m = c((o) => o.filterValues), u = c((o) => o.card.sql), d = Tn();
|
|
1488
1488
|
return /* @__PURE__ */ e.jsxs(
|
|
1489
|
-
|
|
1489
|
+
ca,
|
|
1490
1490
|
{
|
|
1491
1491
|
openDelay: 0,
|
|
1492
1492
|
onOpenChange: async (o) => {
|
|
1493
1493
|
if (!o)
|
|
1494
1494
|
return;
|
|
1495
1495
|
console.log("onOpenChange");
|
|
1496
|
-
const f = await
|
|
1496
|
+
const f = await ma(
|
|
1497
1497
|
"https://semaphor.cloud/api/v1/filter-sql",
|
|
1498
1498
|
(s == null ? void 0 : s.accessToken) || "",
|
|
1499
1499
|
{
|
|
@@ -1505,20 +1505,20 @@ function Tn() {
|
|
|
1505
1505
|
console.log(f), f.sql ? (console.log(f.records), r(f.sql)) : r("Error");
|
|
1506
1506
|
},
|
|
1507
1507
|
children: [
|
|
1508
|
-
/* @__PURE__ */ e.jsx(
|
|
1509
|
-
/* @__PURE__ */ e.jsxs(
|
|
1508
|
+
/* @__PURE__ */ e.jsx(da, { asChild: !0, children: a && /* @__PURE__ */ e.jsx("p", { className: "p-0 text-xs hover:cursor-pointer", children: "| Filter Query" }) }),
|
|
1509
|
+
/* @__PURE__ */ e.jsxs(ha, { align: "end", className: "w-[600px]", children: [
|
|
1510
1510
|
/* @__PURE__ */ e.jsx("div", { className: "flex justify-between space-x-4", children: /* @__PURE__ */ e.jsx("div", { className: "rounded-sm bg-muted p-2", children: /* @__PURE__ */ e.jsxs("code", { ref: t, className: "font-mono text-sm", children: [
|
|
1511
1511
|
n,
|
|
1512
1512
|
/* @__PURE__ */ e.jsx(
|
|
1513
|
-
|
|
1513
|
+
ua,
|
|
1514
1514
|
{
|
|
1515
|
-
onClick: () =>
|
|
1515
|
+
onClick: () => rt(t),
|
|
1516
1516
|
className: "ml-3 inline-block h-4 w-4 opacity-70 hover:cursor-pointer hover:opacity-100"
|
|
1517
1517
|
}
|
|
1518
1518
|
)
|
|
1519
1519
|
] }) }) }),
|
|
1520
1520
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 pt-2", children: [
|
|
1521
|
-
/* @__PURE__ */ e.jsx(
|
|
1521
|
+
/* @__PURE__ */ e.jsx(lt, { className: "h-4 w-4 opacity-70" }),
|
|
1522
1522
|
/* @__PURE__ */ e.jsx("span", { className: "text-xs text-muted-foreground", children: "A preview of the query with filters applied." })
|
|
1523
1523
|
] })
|
|
1524
1524
|
] })
|
|
@@ -1573,7 +1573,7 @@ SELECT label, measure FROM table
|
|
|
1573
1573
|
- Label - Category
|
|
1574
1574
|
- Measure - Number
|
|
1575
1575
|
`;
|
|
1576
|
-
function
|
|
1576
|
+
function An({
|
|
1577
1577
|
open: s,
|
|
1578
1578
|
setOpen: t,
|
|
1579
1579
|
userInput: a,
|
|
@@ -1581,15 +1581,15 @@ function Ln({
|
|
|
1581
1581
|
triggerAIRun: r,
|
|
1582
1582
|
setTriggerAIRun: m
|
|
1583
1583
|
}) {
|
|
1584
|
-
const u = Ge(null), d = Ge(null), { authToken: o } = Qe(), [f, p] =
|
|
1584
|
+
const u = Ge(null), d = Ge(null), { authToken: o } = Qe(), [f, p] = O(!1), g = c((C) => C.actions.setCardSql), b = w((C) => C.dashboard.baseQueries), i = c((C) => C.actions.setRunSql), x = c((C) => C.actions.setCardType), [h, S] = O([]), j = c((C) => C.currentColumns), M = c((C) => C.card.sql), y = c((C) => C.selectedTableName), A = `
|
|
1585
1585
|
${a}
|
|
1586
1586
|
|
|
1587
1587
|
Database Query Dialect: ${y === "api" || y === "s3" ? "DuckDb" : ""}
|
|
1588
1588
|
Table Name: ${y}
|
|
1589
1589
|
Table Columns: ${j == null ? void 0 : j.map((C) => `${C.column_name} | ${C.data_type}`).join(", ")}
|
|
1590
|
-
User SQL: ${
|
|
1590
|
+
User SQL: ${M}
|
|
1591
1591
|
${b && `Base Queries: ${JSON.stringify(b)} `}`, E = ` 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.
|
|
1592
|
-
Visual Query Syntax: ${Dn}`, { data: V, isLoading:
|
|
1592
|
+
Visual Query Syntax: ${Dn}`, { data: V, isLoading: D, isFetching: N, isError: z, refetch: q } = me({
|
|
1593
1593
|
queryKey: ["ai-query"],
|
|
1594
1594
|
queryFn: () => be(
|
|
1595
1595
|
"https://semaphor.cloud/api/v1/ai",
|
|
@@ -1634,11 +1634,11 @@ function Ln({
|
|
|
1634
1634
|
}, 100);
|
|
1635
1635
|
return () => clearTimeout(C);
|
|
1636
1636
|
}, [h]);
|
|
1637
|
-
function
|
|
1637
|
+
function L() {
|
|
1638
1638
|
a && (S((C) => [...C, { role: "user", content: a }]), P(a) && p(!0), n(""), q());
|
|
1639
1639
|
}
|
|
1640
1640
|
Q(() => {
|
|
1641
|
-
r && (
|
|
1641
|
+
r && (L(), m(!1));
|
|
1642
1642
|
}, [r, m]);
|
|
1643
1643
|
const R = {
|
|
1644
1644
|
//seleect a darker color
|
|
@@ -1672,7 +1672,7 @@ function Ln({
|
|
|
1672
1672
|
pre: ({ node: C, ...v }) => /* @__PURE__ */ e.jsxs("pre", { className: "space-y-2 rounded-sm bg-muted/50 p-3", style: W, children: [
|
|
1673
1673
|
/* @__PURE__ */ e.jsx("code", { className: "whitespace-normal text-sm", children: v.children }),
|
|
1674
1674
|
/* @__PURE__ */ e.jsxs("div", { className: "flex justify-start gap-2", children: [
|
|
1675
|
-
/* @__PURE__ */ e.jsx(k, { onClick: K, size: "sm", variant: "outline", children: /* @__PURE__ */ e.jsx(
|
|
1675
|
+
/* @__PURE__ */ e.jsx(k, { onClick: K, size: "sm", variant: "outline", children: /* @__PURE__ */ e.jsx(ua, {}) }),
|
|
1676
1676
|
/* @__PURE__ */ e.jsx(
|
|
1677
1677
|
k,
|
|
1678
1678
|
{
|
|
@@ -1682,7 +1682,7 @@ function Ln({
|
|
|
1682
1682
|
},
|
|
1683
1683
|
size: "sm",
|
|
1684
1684
|
variant: "outline",
|
|
1685
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1685
|
+
children: /* @__PURE__ */ e.jsx(ct, {})
|
|
1686
1686
|
}
|
|
1687
1687
|
)
|
|
1688
1688
|
] })
|
|
@@ -1703,13 +1703,13 @@ function Ln({
|
|
|
1703
1703
|
{
|
|
1704
1704
|
className: "flex items-start rounded-md bg-muted p-3 text-sm",
|
|
1705
1705
|
children: [
|
|
1706
|
-
/* @__PURE__ */ e.jsx(
|
|
1706
|
+
/* @__PURE__ */ e.jsx(vn, { className: "mr-2 h-5 w-5" }),
|
|
1707
1707
|
/* @__PURE__ */ e.jsx("div", { children: C.content })
|
|
1708
1708
|
]
|
|
1709
1709
|
},
|
|
1710
1710
|
v
|
|
1711
1711
|
) : C.role === "ai" ? /* @__PURE__ */ e.jsx(
|
|
1712
|
-
|
|
1712
|
+
ot,
|
|
1713
1713
|
{
|
|
1714
1714
|
className: "w-full overflow-auto py-1",
|
|
1715
1715
|
components: te,
|
|
@@ -1718,8 +1718,8 @@ function Ln({
|
|
|
1718
1718
|
v
|
|
1719
1719
|
) : /* @__PURE__ */ e.jsx("div", {}, v));
|
|
1720
1720
|
}
|
|
1721
|
-
return /* @__PURE__ */ e.jsxs(
|
|
1722
|
-
/* @__PURE__ */ e.jsx(
|
|
1721
|
+
return /* @__PURE__ */ e.jsxs(Ss, { open: s, onOpenChange: t, children: [
|
|
1722
|
+
/* @__PURE__ */ e.jsx(ks, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
1723
1723
|
k,
|
|
1724
1724
|
{
|
|
1725
1725
|
size: "sm",
|
|
@@ -1729,12 +1729,12 @@ function Ln({
|
|
|
1729
1729
|
}
|
|
1730
1730
|
) }),
|
|
1731
1731
|
/* @__PURE__ */ e.jsxs(
|
|
1732
|
-
|
|
1732
|
+
zs,
|
|
1733
1733
|
{
|
|
1734
1734
|
className: "flex flex-col justify-between overflow-auto sm:max-w-[425px] md:max-h-[625px] md:min-w-[625px]",
|
|
1735
1735
|
children: [
|
|
1736
|
-
/* @__PURE__ */ e.jsxs(
|
|
1737
|
-
/* @__PURE__ */ e.jsx(
|
|
1736
|
+
/* @__PURE__ */ e.jsxs(Fs, { children: [
|
|
1737
|
+
/* @__PURE__ */ e.jsx(Ms, { children: "Assistant" }),
|
|
1738
1738
|
/* @__PURE__ */ e.jsx(Os, { children: "What can I help you with?" })
|
|
1739
1739
|
] }),
|
|
1740
1740
|
/* @__PURE__ */ e.jsx(
|
|
@@ -1750,12 +1750,12 @@ function Ln({
|
|
|
1750
1750
|
{
|
|
1751
1751
|
children: /* @__PURE__ */ e.jsxs("div", { className: "flex w-full items-center rounded-md border", children: [
|
|
1752
1752
|
/* @__PURE__ */ e.jsx(
|
|
1753
|
-
|
|
1753
|
+
xa,
|
|
1754
1754
|
{
|
|
1755
1755
|
autoFocus: !0,
|
|
1756
1756
|
ref: u,
|
|
1757
1757
|
onKeyDown: (C) => {
|
|
1758
|
-
C.key === "Enter" && !C.shiftKey && (C.preventDefault(), n(""),
|
|
1758
|
+
C.key === "Enter" && !C.shiftKey && (C.preventDefault(), n(""), L());
|
|
1759
1759
|
},
|
|
1760
1760
|
placeholder: "Type your question here...",
|
|
1761
1761
|
onFocus: (C) => {
|
|
@@ -1765,7 +1765,7 @@ function Ln({
|
|
|
1765
1765
|
className: ee(
|
|
1766
1766
|
"max-h-10 min-h-7 resize-none border-none focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0"
|
|
1767
1767
|
),
|
|
1768
|
-
disabled:
|
|
1768
|
+
disabled: D || N,
|
|
1769
1769
|
value: a,
|
|
1770
1770
|
onChange: (C) => n(C.target.value)
|
|
1771
1771
|
}
|
|
@@ -1777,8 +1777,8 @@ function Ln({
|
|
|
1777
1777
|
className: "h-8",
|
|
1778
1778
|
size: "sm",
|
|
1779
1779
|
variant: "ghost",
|
|
1780
|
-
onClick:
|
|
1781
|
-
children: !
|
|
1780
|
+
onClick: L,
|
|
1781
|
+
children: !D && !N ? /* @__PURE__ */ e.jsx(it, {}) : /* @__PURE__ */ e.jsx(Je, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" })
|
|
1782
1782
|
}
|
|
1783
1783
|
)
|
|
1784
1784
|
] })
|
|
@@ -1789,17 +1789,17 @@ function Ln({
|
|
|
1789
1789
|
)
|
|
1790
1790
|
] });
|
|
1791
1791
|
}
|
|
1792
|
-
var
|
|
1792
|
+
var Fa = {
|
|
1793
1793
|
color: void 0,
|
|
1794
1794
|
size: void 0,
|
|
1795
1795
|
className: void 0,
|
|
1796
1796
|
style: void 0,
|
|
1797
1797
|
attr: void 0
|
|
1798
|
-
},
|
|
1799
|
-
function
|
|
1798
|
+
}, Ys = xe.createContext && /* @__PURE__ */ xe.createContext(Fa), En = ["attr", "size", "title"];
|
|
1799
|
+
function In(s, t) {
|
|
1800
1800
|
if (s == null)
|
|
1801
1801
|
return {};
|
|
1802
|
-
var a =
|
|
1802
|
+
var a = Vn(s, t), n, r;
|
|
1803
1803
|
if (Object.getOwnPropertySymbols) {
|
|
1804
1804
|
var m = Object.getOwnPropertySymbols(s);
|
|
1805
1805
|
for (r = 0; r < m.length; r++)
|
|
@@ -1807,7 +1807,7 @@ function En(s, t) {
|
|
|
1807
1807
|
}
|
|
1808
1808
|
return a;
|
|
1809
1809
|
}
|
|
1810
|
-
function
|
|
1810
|
+
function Vn(s, t) {
|
|
1811
1811
|
if (s == null)
|
|
1812
1812
|
return {};
|
|
1813
1813
|
var a = {}, n = Object.keys(s), r, m;
|
|
@@ -1825,7 +1825,7 @@ function ns() {
|
|
|
1825
1825
|
return s;
|
|
1826
1826
|
}, ns.apply(this, arguments);
|
|
1827
1827
|
}
|
|
1828
|
-
function
|
|
1828
|
+
function Zs(s, t) {
|
|
1829
1829
|
var a = Object.keys(s);
|
|
1830
1830
|
if (Object.getOwnPropertySymbols) {
|
|
1831
1831
|
var n = Object.getOwnPropertySymbols(s);
|
|
@@ -1838,22 +1838,22 @@ function Ys(s, t) {
|
|
|
1838
1838
|
function rs(s) {
|
|
1839
1839
|
for (var t = 1; t < arguments.length; t++) {
|
|
1840
1840
|
var a = arguments[t] != null ? arguments[t] : {};
|
|
1841
|
-
t % 2 ?
|
|
1842
|
-
|
|
1843
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(s, Object.getOwnPropertyDescriptors(a)) :
|
|
1841
|
+
t % 2 ? Zs(Object(a), !0).forEach(function(n) {
|
|
1842
|
+
qn(s, n, a[n]);
|
|
1843
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(s, Object.getOwnPropertyDescriptors(a)) : Zs(Object(a)).forEach(function(n) {
|
|
1844
1844
|
Object.defineProperty(s, n, Object.getOwnPropertyDescriptor(a, n));
|
|
1845
1845
|
});
|
|
1846
1846
|
}
|
|
1847
1847
|
return s;
|
|
1848
1848
|
}
|
|
1849
|
-
function
|
|
1850
|
-
return t =
|
|
1849
|
+
function qn(s, t, a) {
|
|
1850
|
+
return t = Rn(t), t in s ? Object.defineProperty(s, t, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : s[t] = a, s;
|
|
1851
1851
|
}
|
|
1852
|
-
function
|
|
1853
|
-
var t =
|
|
1852
|
+
function Rn(s) {
|
|
1853
|
+
var t = _n(s, "string");
|
|
1854
1854
|
return typeof t == "symbol" ? t : String(t);
|
|
1855
1855
|
}
|
|
1856
|
-
function
|
|
1856
|
+
function _n(s, t) {
|
|
1857
1857
|
if (typeof s != "object" || s === null)
|
|
1858
1858
|
return s;
|
|
1859
1859
|
var a = s[Symbol.toPrimitive];
|
|
@@ -1865,23 +1865,23 @@ function Rn(s, t) {
|
|
|
1865
1865
|
}
|
|
1866
1866
|
return (t === "string" ? String : Number)(s);
|
|
1867
1867
|
}
|
|
1868
|
-
function
|
|
1868
|
+
function Ma(s) {
|
|
1869
1869
|
return s && s.map((t, a) => /* @__PURE__ */ xe.createElement(t.tag, rs({
|
|
1870
1870
|
key: a
|
|
1871
|
-
}, t.attr),
|
|
1871
|
+
}, t.attr), Ma(t.child)));
|
|
1872
1872
|
}
|
|
1873
1873
|
function pe(s) {
|
|
1874
|
-
return (t) => /* @__PURE__ */ xe.createElement(
|
|
1874
|
+
return (t) => /* @__PURE__ */ xe.createElement(Hn, ns({
|
|
1875
1875
|
attr: rs({}, s.attr)
|
|
1876
|
-
}, t),
|
|
1876
|
+
}, t), Ma(s.child));
|
|
1877
1877
|
}
|
|
1878
|
-
function
|
|
1878
|
+
function Hn(s) {
|
|
1879
1879
|
var t = (a) => {
|
|
1880
1880
|
var {
|
|
1881
1881
|
attr: n,
|
|
1882
1882
|
size: r,
|
|
1883
1883
|
title: m
|
|
1884
|
-
} = s, u =
|
|
1884
|
+
} = s, u = In(s, En), d = r || a.size || "1em", o;
|
|
1885
1885
|
return a.className && (o = a.className), s.className && (o = (o ? o + " " : "") + s.className), /* @__PURE__ */ xe.createElement("svg", ns({
|
|
1886
1886
|
stroke: "currentColor",
|
|
1887
1887
|
fill: "currentColor",
|
|
@@ -1896,15 +1896,15 @@ function _n(s) {
|
|
|
1896
1896
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1897
1897
|
}), m && /* @__PURE__ */ xe.createElement("title", null, m), s.children);
|
|
1898
1898
|
};
|
|
1899
|
-
return
|
|
1899
|
+
return Ys !== void 0 ? /* @__PURE__ */ xe.createElement(Ys.Consumer, null, (a) => t(a)) : t(Fa);
|
|
1900
1900
|
}
|
|
1901
|
-
function
|
|
1901
|
+
function Bn(s) {
|
|
1902
1902
|
return pe({ 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);
|
|
1903
1903
|
}
|
|
1904
|
-
function
|
|
1905
|
-
const { theme: s } =
|
|
1904
|
+
function $n() {
|
|
1905
|
+
const { theme: s } = dt(), t = Ge(), a = Ge(), [n, r] = O(!1), [m, u] = O(!1), [d, o] = O(!1), [f, p] = O(""), [g, b] = O(!1), { authToken: i } = Qe();
|
|
1906
1906
|
w((l) => l.selectedSheetId);
|
|
1907
|
-
const x = w((l) => l.dashboard.baseQueries), h = c((l) => l.card), S = w((l) => l.theme), j = c((l) => l.isShowingVisual),
|
|
1907
|
+
const x = w((l) => l.dashboard.baseQueries), h = c((l) => l.card), S = w((l) => l.theme), j = c((l) => l.isShowingVisual), M = c(
|
|
1908
1908
|
(l) => l.selectedConnectionId
|
|
1909
1909
|
), y = c(
|
|
1910
1910
|
(l) => l.selectedDatabaseName
|
|
@@ -1916,7 +1916,7 @@ function Bn() {
|
|
|
1916
1916
|
w(
|
|
1917
1917
|
(l) => l.actions.updateFrameCard
|
|
1918
1918
|
);
|
|
1919
|
-
const V = c((l) => l.selectedTableName),
|
|
1919
|
+
const V = c((l) => l.selectedTableName), D = c((l) => l.card.sql), N = c((l) => l.card.python), z = ht(D, x), q = c((l) => l.selectedConnectionId), P = c((l) => l.frame), L = c((l) => l.filterValues), R = c((l) => l.applyFilters), {
|
|
1920
1920
|
setCardCustomCfg: W,
|
|
1921
1921
|
setQueryResultColumns: J,
|
|
1922
1922
|
setFilterValues: te,
|
|
@@ -1936,18 +1936,18 @@ function Bn() {
|
|
|
1936
1936
|
isSuccess: ve,
|
|
1937
1937
|
isError: Se,
|
|
1938
1938
|
error: Ve,
|
|
1939
|
-
status:
|
|
1939
|
+
status: Hs,
|
|
1940
1940
|
refetch: ke
|
|
1941
1941
|
} = me({
|
|
1942
1942
|
queryKey: [z, N],
|
|
1943
|
-
queryFn: () =>
|
|
1943
|
+
queryFn: () => ma(
|
|
1944
1944
|
"https://semaphor.cloud/api/v1/query",
|
|
1945
1945
|
(i == null ? void 0 : i.accessToken) || "",
|
|
1946
1946
|
{
|
|
1947
1947
|
connection_id: q,
|
|
1948
1948
|
sql: z,
|
|
1949
|
-
python: N ===
|
|
1950
|
-
active_filters: R ?
|
|
1949
|
+
python: N === Ks ? "" : N,
|
|
1950
|
+
active_filters: R ? L : []
|
|
1951
1951
|
}
|
|
1952
1952
|
),
|
|
1953
1953
|
enabled: !1,
|
|
@@ -1958,7 +1958,7 @@ function Bn() {
|
|
|
1958
1958
|
position: "top-center",
|
|
1959
1959
|
richColors: !0
|
|
1960
1960
|
}), v((U == null ? void 0 : U.output) || ""), U.records.length > 0)) {
|
|
1961
|
-
const { dimensionKeys: l } =
|
|
1961
|
+
const { dimensionKeys: l } = ys(U.records);
|
|
1962
1962
|
J(l);
|
|
1963
1963
|
}
|
|
1964
1964
|
}, [U, I, J, v]), Q(() => {
|
|
@@ -1985,15 +1985,15 @@ function Bn() {
|
|
|
1985
1985
|
a.current = l;
|
|
1986
1986
|
};
|
|
1987
1987
|
function ms() {
|
|
1988
|
-
let l =
|
|
1989
|
-
|
|
1988
|
+
let l = D;
|
|
1989
|
+
D && !D.includes("{{") && (l = Fn(D), K(l));
|
|
1990
1990
|
const ie = {
|
|
1991
1991
|
...h,
|
|
1992
1992
|
lastSelectedSchema: E,
|
|
1993
1993
|
lastSelectedDatamodelId: A,
|
|
1994
1994
|
lastSelectedDatabase: y,
|
|
1995
1995
|
lastSelectedTable: V,
|
|
1996
|
-
connectionId:
|
|
1996
|
+
connectionId: M,
|
|
1997
1997
|
type: j ? h.type : "table",
|
|
1998
1998
|
sql: l,
|
|
1999
1999
|
customCfg: j ? h.customCfg : null
|
|
@@ -2015,11 +2015,11 @@ function Bn() {
|
|
|
2015
2015
|
return Ze(ie);
|
|
2016
2016
|
}
|
|
2017
2017
|
function Ze(l) {
|
|
2018
|
-
const [ie, Re, Ne] = l.split(" "), Z = parseFloat(ie),
|
|
2018
|
+
const [ie, Re, Ne] = l.split(" "), Z = parseFloat(ie), Ha = parseFloat(Re), Ba = parseFloat(Ne), $a = Ha / 100, Bs = Ba / 100, je = (1 - Math.abs(2 * Bs - 1)) * $a, we = je * (1 - Math.abs(Z / 60 % 2 - 1)), xs = Bs - je / 2;
|
|
2019
2019
|
let oe = 0, ce = 0, de = 0;
|
|
2020
2020
|
0 <= Z && Z < 60 ? (oe = je, ce = we, de = 0) : 60 <= Z && Z < 120 ? (oe = we, ce = je, de = 0) : 120 <= Z && Z < 180 ? (oe = 0, ce = je, de = we) : 180 <= Z && Z < 240 ? (oe = 0, ce = we, de = je) : 240 <= Z && Z < 300 ? (oe = we, ce = 0, de = je) : 300 <= Z && Z < 360 && (oe = je, ce = 0, de = we), oe = Math.round((oe + xs) * 255), ce = Math.round((ce + xs) * 255), de = Math.round((de + xs) * 255);
|
|
2021
|
-
const ps = (
|
|
2022
|
-
const fs =
|
|
2021
|
+
const ps = (Pa) => {
|
|
2022
|
+
const fs = Pa.toString(16);
|
|
2023
2023
|
return fs.length == 1 ? "0" + fs : fs;
|
|
2024
2024
|
};
|
|
2025
2025
|
return `#${ps(oe)}${ps(ce)}${ps(de)}`;
|
|
@@ -2067,8 +2067,8 @@ function Bn() {
|
|
|
2067
2067
|
text: "Apply Filters"
|
|
2068
2068
|
}
|
|
2069
2069
|
),
|
|
2070
|
-
/* @__PURE__ */ e.jsx(
|
|
2071
|
-
|
|
2070
|
+
/* @__PURE__ */ e.jsx(Ln, {}),
|
|
2071
|
+
L && m && /* @__PURE__ */ e.jsx(
|
|
2072
2072
|
Be,
|
|
2073
2073
|
{
|
|
2074
2074
|
onClick: () => u(!1),
|
|
@@ -2089,7 +2089,7 @@ function Bn() {
|
|
|
2089
2089
|
},
|
|
2090
2090
|
defaultLanguage: "json",
|
|
2091
2091
|
className: "mt-1 min-h-[220px]",
|
|
2092
|
-
value: JSON.stringify(
|
|
2092
|
+
value: JSON.stringify(L, null, 2),
|
|
2093
2093
|
options: {
|
|
2094
2094
|
readOnly: !0,
|
|
2095
2095
|
minimap: {
|
|
@@ -2110,8 +2110,8 @@ function Bn() {
|
|
|
2110
2110
|
] })
|
|
2111
2111
|
}
|
|
2112
2112
|
),
|
|
2113
|
-
|
|
2114
|
-
|
|
2113
|
+
L && !m && /* @__PURE__ */ e.jsx(
|
|
2114
|
+
va,
|
|
2115
2115
|
{
|
|
2116
2116
|
onClick: () => u(!0),
|
|
2117
2117
|
className: ee(
|
|
@@ -2126,7 +2126,7 @@ function Bn() {
|
|
|
2126
2126
|
}
|
|
2127
2127
|
function es() {
|
|
2128
2128
|
return /* @__PURE__ */ e.jsxs(
|
|
2129
|
-
|
|
2129
|
+
vs,
|
|
2130
2130
|
{
|
|
2131
2131
|
className: "flex grow pb-1",
|
|
2132
2132
|
direction: "vertical",
|
|
@@ -2153,7 +2153,7 @@ function Bn() {
|
|
|
2153
2153
|
onChange: (l) => {
|
|
2154
2154
|
K(l);
|
|
2155
2155
|
},
|
|
2156
|
-
value:
|
|
2156
|
+
value: D,
|
|
2157
2157
|
options: {
|
|
2158
2158
|
minimap: {
|
|
2159
2159
|
enabled: !1
|
|
@@ -2178,7 +2178,7 @@ function Bn() {
|
|
|
2178
2178
|
}
|
|
2179
2179
|
),
|
|
2180
2180
|
n && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2181
|
-
/* @__PURE__ */ e.jsx(
|
|
2181
|
+
/* @__PURE__ */ e.jsx(Ns, { withHandle: !0, className: "border" }),
|
|
2182
2182
|
/* @__PURE__ */ e.jsxs(
|
|
2183
2183
|
Fe,
|
|
2184
2184
|
{
|
|
@@ -2200,7 +2200,7 @@ function Bn() {
|
|
|
2200
2200
|
onChange: (l) => {
|
|
2201
2201
|
ne(l && l.trim() || "");
|
|
2202
2202
|
},
|
|
2203
|
-
value: N ||
|
|
2203
|
+
value: N || Ks,
|
|
2204
2204
|
options: {
|
|
2205
2205
|
minimap: {
|
|
2206
2206
|
enabled: !1
|
|
@@ -2267,13 +2267,13 @@ function Bn() {
|
|
|
2267
2267
|
size: "sm",
|
|
2268
2268
|
variant: "outline",
|
|
2269
2269
|
children: [
|
|
2270
|
-
re || le ? /* @__PURE__ */ e.jsx(Je, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(
|
|
2270
|
+
re || le ? /* @__PURE__ */ e.jsx(Je, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(un, { className: "mr-2 h-4 w-4" }),
|
|
2271
2271
|
"Run"
|
|
2272
2272
|
]
|
|
2273
2273
|
}
|
|
2274
2274
|
),
|
|
2275
2275
|
Se && /* @__PURE__ */ e.jsx(
|
|
2276
|
-
|
|
2276
|
+
Mn,
|
|
2277
2277
|
{
|
|
2278
2278
|
error: Ve.message,
|
|
2279
2279
|
setShowAIDialog: o,
|
|
@@ -2289,24 +2289,24 @@ function Bn() {
|
|
|
2289
2289
|
size: "sm",
|
|
2290
2290
|
variant: "outline",
|
|
2291
2291
|
children: [
|
|
2292
|
-
/* @__PURE__ */ e.jsx(
|
|
2292
|
+
/* @__PURE__ */ e.jsx(an, { className: "mr-2 size-4" }),
|
|
2293
2293
|
"Clear"
|
|
2294
2294
|
]
|
|
2295
2295
|
}
|
|
2296
2296
|
),
|
|
2297
2297
|
/* @__PURE__ */ e.jsx(
|
|
2298
|
-
|
|
2298
|
+
ia,
|
|
2299
2299
|
{
|
|
2300
2300
|
pressed: n,
|
|
2301
2301
|
onPressedChange: (l) => r(l),
|
|
2302
2302
|
className: "",
|
|
2303
2303
|
size: "sm",
|
|
2304
2304
|
variant: "outline",
|
|
2305
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2305
|
+
children: /* @__PURE__ */ e.jsx(Bn, { className: "size-4 text-foreground/70" })
|
|
2306
2306
|
}
|
|
2307
2307
|
),
|
|
2308
2308
|
/* @__PURE__ */ e.jsx(
|
|
2309
|
-
|
|
2309
|
+
An,
|
|
2310
2310
|
{
|
|
2311
2311
|
open: d,
|
|
2312
2312
|
setOpen: o,
|
|
@@ -2325,7 +2325,7 @@ function Bn() {
|
|
|
2325
2325
|
size: "sm",
|
|
2326
2326
|
variant: "outline",
|
|
2327
2327
|
children: [
|
|
2328
|
-
/* @__PURE__ */ e.jsx(
|
|
2328
|
+
/* @__PURE__ */ e.jsx(mt, { className: "mr-2 size-4 font-bold text-green-600" }),
|
|
2329
2329
|
"Accept"
|
|
2330
2330
|
]
|
|
2331
2331
|
}
|
|
@@ -2352,7 +2352,7 @@ function Bn() {
|
|
|
2352
2352
|
)
|
|
2353
2353
|
);
|
|
2354
2354
|
}
|
|
2355
|
-
function
|
|
2355
|
+
function Pn({ data: s }) {
|
|
2356
2356
|
var u;
|
|
2357
2357
|
const [t, a] = xe.useState([]), r = Object.keys(s[0]).map((d) => ({
|
|
2358
2358
|
// header: key,
|
|
@@ -2366,37 +2366,37 @@ function $n({ data: s }) {
|
|
|
2366
2366
|
onClick: () => o.toggleSorting(o.getIsSorted() === "asc"),
|
|
2367
2367
|
children: [
|
|
2368
2368
|
d,
|
|
2369
|
-
f === "asc" ? /* @__PURE__ */ e.jsx(
|
|
2369
|
+
f === "asc" ? /* @__PURE__ */ e.jsx(ut, { className: "ml-2 h-5 w-5" }) : f === "desc" ? /* @__PURE__ */ e.jsx(xt, { className: "ml-2 h-5 w-5" }) : null
|
|
2370
2370
|
]
|
|
2371
2371
|
}
|
|
2372
2372
|
) });
|
|
2373
2373
|
}
|
|
2374
|
-
})), m =
|
|
2374
|
+
})), m = pt({
|
|
2375
2375
|
data: s,
|
|
2376
2376
|
columns: r,
|
|
2377
|
-
getCoreRowModel:
|
|
2378
|
-
getPaginationRowModel:
|
|
2377
|
+
getCoreRowModel: yt(),
|
|
2378
|
+
getPaginationRowModel: vt(),
|
|
2379
2379
|
onSortingChange: a,
|
|
2380
|
-
getSortedRowModel:
|
|
2380
|
+
getSortedRowModel: Nt(),
|
|
2381
2381
|
manualPagination: !0,
|
|
2382
2382
|
state: {
|
|
2383
2383
|
sorting: t
|
|
2384
2384
|
}
|
|
2385
2385
|
});
|
|
2386
|
-
return /* @__PURE__ */ e.jsxs(
|
|
2387
|
-
/* @__PURE__ */ e.jsx(
|
|
2386
|
+
return /* @__PURE__ */ e.jsxs(ft, { children: [
|
|
2387
|
+
/* @__PURE__ */ e.jsx(gt, { children: m.getHeaderGroups().map((d) => /* @__PURE__ */ e.jsx(gs, { children: d.headers.map((o) => /* @__PURE__ */ e.jsx(jt, { className: "sticky top-0 bg-muted", children: o.isPlaceholder ? null : Gs(
|
|
2388
2388
|
o.column.columnDef.header,
|
|
2389
2389
|
o.getContext()
|
|
2390
2390
|
) }, o.id)) }, d.id)) }),
|
|
2391
|
-
/* @__PURE__ */ e.jsx(
|
|
2391
|
+
/* @__PURE__ */ e.jsx(bt, { children: (u = m.getRowModel().rows) != null && u.length ? m.getRowModel().rows.map((d) => /* @__PURE__ */ e.jsx(
|
|
2392
2392
|
gs,
|
|
2393
2393
|
{
|
|
2394
2394
|
className: "whitespace-nowrap py-2",
|
|
2395
2395
|
"data-state": d.getIsSelected() && "selected",
|
|
2396
|
-
children: d.getVisibleCells().map((o) => /* @__PURE__ */ e.jsx(
|
|
2396
|
+
children: d.getVisibleCells().map((o) => /* @__PURE__ */ e.jsx(Js, { children: Gs(o.column.columnDef.cell, o.getContext()) }, o.id))
|
|
2397
2397
|
},
|
|
2398
2398
|
d.id
|
|
2399
|
-
)) : /* @__PURE__ */ e.jsx(gs, { children: /* @__PURE__ */ e.jsx(
|
|
2399
|
+
)) : /* @__PURE__ */ e.jsx(gs, { children: /* @__PURE__ */ e.jsx(Js, { colSpan: r.length, className: "h-24 text-center", children: "No results." }) }) })
|
|
2400
2400
|
] });
|
|
2401
2401
|
}
|
|
2402
2402
|
function Oa({
|
|
@@ -2419,35 +2419,35 @@ function Oa({
|
|
|
2419
2419
|
]), !r.id)
|
|
2420
2420
|
return null;
|
|
2421
2421
|
let u;
|
|
2422
|
-
return r.data && r.data.length > 0 && (u =
|
|
2422
|
+
return r.data && r.data.length > 0 && (u = pa({
|
|
2423
2423
|
data: r.data,
|
|
2424
2424
|
cardType: r.type,
|
|
2425
2425
|
cfg: r.cfg,
|
|
2426
2426
|
customCfg: r.customCfg,
|
|
2427
2427
|
preferences: r.preferences
|
|
2428
2428
|
})), /* @__PURE__ */ e.jsxs(
|
|
2429
|
-
|
|
2429
|
+
Ct,
|
|
2430
2430
|
{
|
|
2431
2431
|
role: "editor-visual-card",
|
|
2432
2432
|
className: ee("relative flex h-full flex-col rounded-none", t),
|
|
2433
2433
|
...a,
|
|
2434
2434
|
children: [
|
|
2435
|
-
/* @__PURE__ */ e.jsxs(
|
|
2435
|
+
/* @__PURE__ */ e.jsxs(St, { className: "py-4", children: [
|
|
2436
2436
|
/* @__PURE__ */ e.jsx(
|
|
2437
|
-
|
|
2437
|
+
Cs,
|
|
2438
2438
|
{
|
|
2439
2439
|
text: r.title,
|
|
2440
2440
|
onSave: (o) => m({ ...r, title: o }),
|
|
2441
|
-
children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e.jsx(
|
|
2441
|
+
children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e.jsx(kt, { className: "text-base", children: r.title }) })
|
|
2442
2442
|
},
|
|
2443
2443
|
r.title
|
|
2444
2444
|
),
|
|
2445
2445
|
/* @__PURE__ */ e.jsx(
|
|
2446
|
-
|
|
2446
|
+
Cs,
|
|
2447
2447
|
{
|
|
2448
2448
|
text: r.description || "",
|
|
2449
2449
|
onSave: (o) => m({ ...r, description: o }),
|
|
2450
|
-
children: /* @__PURE__ */ e.jsxs(
|
|
2450
|
+
children: /* @__PURE__ */ e.jsxs(wt, { children: [
|
|
2451
2451
|
" ",
|
|
2452
2452
|
r.description
|
|
2453
2453
|
] })
|
|
@@ -2455,33 +2455,33 @@ function Oa({
|
|
|
2455
2455
|
r.description
|
|
2456
2456
|
)
|
|
2457
2457
|
] }),
|
|
2458
|
-
/* @__PURE__ */ e.jsxs(
|
|
2458
|
+
/* @__PURE__ */ e.jsxs(zt, { className: "flex grow flex-col pb-3", children: [
|
|
2459
2459
|
r.type !== "table" && u && // <ChartJsVisual key={visualKey} cfg={cfg} />
|
|
2460
2460
|
/* @__PURE__ */ e.jsx(
|
|
2461
|
-
|
|
2461
|
+
Ft,
|
|
2462
2462
|
{
|
|
2463
2463
|
cfg: u
|
|
2464
2464
|
},
|
|
2465
2465
|
JSON.stringify(u) + JSON.stringify(r.preferences) + ((d = r == null ? void 0 : r.preferences) == null ? void 0 : d.customVisualCode)
|
|
2466
2466
|
),
|
|
2467
2467
|
r.type === "table" && r.data && r.data.length > 0 && // All of the below css classes are #IMPORTANT for the table to scroll properly
|
|
2468
|
-
/* @__PURE__ */ e.jsx(
|
|
2468
|
+
/* @__PURE__ */ e.jsx(Mt, { className: "flex min-h-0 flex-1 grow basis-0", children: /* @__PURE__ */ e.jsx(Ot, { card: r, data: r == null ? void 0 : r.data }) })
|
|
2469
2469
|
] })
|
|
2470
2470
|
]
|
|
2471
2471
|
}
|
|
2472
2472
|
);
|
|
2473
2473
|
}
|
|
2474
|
-
function
|
|
2475
|
-
const [s, t] =
|
|
2474
|
+
function Kn() {
|
|
2475
|
+
const [s, t] = O(!1), [a, n] = O(""), [r, m] = O(""), [u, d] = O(""), [o, f] = O(""), p = c((y) => y.card), g = c(
|
|
2476
2476
|
(y) => y.card.customCfg
|
|
2477
|
-
), { setCardCustomCfg: b, setCustomVisualCode: i } =
|
|
2477
|
+
), { setCardCustomCfg: b, setCustomVisualCode: i } = fa();
|
|
2478
2478
|
function x(y) {
|
|
2479
|
-
var V,
|
|
2479
|
+
var V, D;
|
|
2480
2480
|
const A = {
|
|
2481
2481
|
...y,
|
|
2482
2482
|
data: {
|
|
2483
2483
|
...y == null ? void 0 : y.data,
|
|
2484
|
-
datasets: (
|
|
2484
|
+
datasets: (D = (V = y == null ? void 0 : y.data) == null ? void 0 : V.datasets) == null ? void 0 : D.map((N) => ({
|
|
2485
2485
|
...N,
|
|
2486
2486
|
data: []
|
|
2487
2487
|
}))
|
|
@@ -2493,7 +2493,7 @@ function Pn() {
|
|
|
2493
2493
|
var A, E;
|
|
2494
2494
|
if (!p.data || p.data.length === 0)
|
|
2495
2495
|
return;
|
|
2496
|
-
const y =
|
|
2496
|
+
const y = pa({
|
|
2497
2497
|
data: p.data,
|
|
2498
2498
|
cardType: p.type,
|
|
2499
2499
|
cfg: p.cfg,
|
|
@@ -2513,36 +2513,36 @@ function Pn() {
|
|
|
2513
2513
|
function j() {
|
|
2514
2514
|
m(""), b(null);
|
|
2515
2515
|
}
|
|
2516
|
-
function
|
|
2516
|
+
function M() {
|
|
2517
2517
|
let y;
|
|
2518
2518
|
if (g) {
|
|
2519
|
-
const A =
|
|
2519
|
+
const A = Us.cloneDeep(p.cfg), E = Us.merge(A, g);
|
|
2520
2520
|
return y = x(E), y;
|
|
2521
2521
|
}
|
|
2522
2522
|
return a ? (y = x(JSON.parse(a)), y) : "";
|
|
2523
2523
|
}
|
|
2524
|
-
return /* @__PURE__ */ e.jsxs(
|
|
2525
|
-
/* @__PURE__ */ e.jsx(
|
|
2524
|
+
return /* @__PURE__ */ e.jsxs(Ss, { open: s, onOpenChange: t, children: [
|
|
2525
|
+
/* @__PURE__ */ e.jsx(ks, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
2526
2526
|
k,
|
|
2527
2527
|
{
|
|
2528
2528
|
onClick: h,
|
|
2529
2529
|
className: ` ${g && "border-foreground/50 dark:border-foreground/70"}`,
|
|
2530
2530
|
size: "sm",
|
|
2531
2531
|
variant: "outline",
|
|
2532
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2532
|
+
children: /* @__PURE__ */ e.jsx(Tt, { className: "h-4 w-4" })
|
|
2533
2533
|
}
|
|
2534
2534
|
) }),
|
|
2535
2535
|
/* @__PURE__ */ e.jsxs(
|
|
2536
|
-
|
|
2536
|
+
zs,
|
|
2537
2537
|
{
|
|
2538
2538
|
className: "max-h-[70vh] min-h-[70vh] overflow-auto sm:min-w-[900px] lg:min-w-[1200px]",
|
|
2539
2539
|
children: [
|
|
2540
|
-
/* @__PURE__ */ e.jsxs(
|
|
2540
|
+
/* @__PURE__ */ e.jsxs(Fs, { className: "", children: [
|
|
2541
2541
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2542
|
-
/* @__PURE__ */ e.jsx(
|
|
2543
|
-
/* @__PURE__ */ e.jsxs(
|
|
2544
|
-
/* @__PURE__ */ e.jsx(
|
|
2545
|
-
|
|
2542
|
+
/* @__PURE__ */ e.jsx(Ms, { children: "Customize Card" }),
|
|
2543
|
+
/* @__PURE__ */ e.jsxs(Ts, { children: [
|
|
2544
|
+
/* @__PURE__ */ e.jsx(ta, { children: /* @__PURE__ */ e.jsx(
|
|
2545
|
+
ln,
|
|
2546
2546
|
{
|
|
2547
2547
|
onClick: () => {
|
|
2548
2548
|
navigator.clipboard.writeText(p.id);
|
|
@@ -2550,7 +2550,7 @@ function Pn() {
|
|
|
2550
2550
|
className: "size-3 cursor-pointer text-muted-foreground/70 transition-colors hover:text-muted-foreground"
|
|
2551
2551
|
}
|
|
2552
2552
|
) }),
|
|
2553
|
-
/* @__PURE__ */ e.jsx(
|
|
2553
|
+
/* @__PURE__ */ e.jsx(Ls, { side: "right", align: "center", children: /* @__PURE__ */ e.jsx("p", { className: "text-xs", children: "Copy Card ID" }) })
|
|
2554
2554
|
] })
|
|
2555
2555
|
] }),
|
|
2556
2556
|
/* @__PURE__ */ e.jsxs(Os, { children: [
|
|
@@ -2568,10 +2568,10 @@ function Pn() {
|
|
|
2568
2568
|
] }),
|
|
2569
2569
|
/* @__PURE__ */ e.jsxs("div", { className: "flex grow gap-2", children: [
|
|
2570
2570
|
/* @__PURE__ */ e.jsx(Oa, { className: "w-1/2 rounded shadow-none" }),
|
|
2571
|
-
/* @__PURE__ */ e.jsxs(
|
|
2572
|
-
/* @__PURE__ */ e.jsxs(
|
|
2571
|
+
/* @__PURE__ */ e.jsxs(ga, { defaultValue: "custom-config", className: "flex w-1/2 flex-col", children: [
|
|
2572
|
+
/* @__PURE__ */ e.jsxs(ja, { className: "justify-start rounded-sm rounded-b-none border border-b-0", children: [
|
|
2573
2573
|
/* @__PURE__ */ e.jsxs(as, { value: "custom-config", children: [
|
|
2574
|
-
g && /* @__PURE__ */ e.jsx(
|
|
2574
|
+
g && /* @__PURE__ */ e.jsx(Lt, { className: "mr-1 h-5 w-5 text-green-600" }),
|
|
2575
2575
|
g ? "Custom Config" : "Default Config"
|
|
2576
2576
|
] }),
|
|
2577
2577
|
/* @__PURE__ */ e.jsx(as, { className: "", value: "output", children: "Output" }),
|
|
@@ -2583,7 +2583,7 @@ function Pn() {
|
|
|
2583
2583
|
className: "bg-red-x mt-0 grow rounded-b border border-t-0 p-2",
|
|
2584
2584
|
value: "output",
|
|
2585
2585
|
children: /* @__PURE__ */ e.jsx(
|
|
2586
|
-
|
|
2586
|
+
xa,
|
|
2587
2587
|
{
|
|
2588
2588
|
disabled: !0,
|
|
2589
2589
|
value: a,
|
|
@@ -2615,7 +2615,7 @@ function Pn() {
|
|
|
2615
2615
|
renderLineHighlight: "none"
|
|
2616
2616
|
},
|
|
2617
2617
|
defaultLanguage: "json",
|
|
2618
|
-
value:
|
|
2618
|
+
value: M(),
|
|
2619
2619
|
onChange: (y) => m(y)
|
|
2620
2620
|
}
|
|
2621
2621
|
)
|
|
@@ -2652,7 +2652,7 @@ function Pn() {
|
|
|
2652
2652
|
)
|
|
2653
2653
|
] })
|
|
2654
2654
|
] }),
|
|
2655
|
-
/* @__PURE__ */ e.jsxs(
|
|
2655
|
+
/* @__PURE__ */ e.jsxs(sa, { className: "flex items-center", children: [
|
|
2656
2656
|
/* @__PURE__ */ e.jsx(G, { className: "mr-2 text-red-500", children: o }),
|
|
2657
2657
|
/* @__PURE__ */ e.jsx(
|
|
2658
2658
|
k,
|
|
@@ -2671,39 +2671,39 @@ function Pn() {
|
|
|
2671
2671
|
)
|
|
2672
2672
|
] });
|
|
2673
2673
|
}
|
|
2674
|
-
function
|
|
2674
|
+
function Ta(s) {
|
|
2675
2675
|
return pe({ 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);
|
|
2676
2676
|
}
|
|
2677
|
-
function
|
|
2677
|
+
function La(s) {
|
|
2678
2678
|
return pe({ 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);
|
|
2679
2679
|
}
|
|
2680
2680
|
function Da(s) {
|
|
2681
2681
|
return pe({ 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);
|
|
2682
2682
|
}
|
|
2683
|
-
function
|
|
2683
|
+
function Aa(s) {
|
|
2684
2684
|
return pe({ 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);
|
|
2685
2685
|
}
|
|
2686
|
-
function
|
|
2686
|
+
function Ea(s) {
|
|
2687
2687
|
return pe({ 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);
|
|
2688
2688
|
}
|
|
2689
|
-
function
|
|
2689
|
+
function Ia(s) {
|
|
2690
2690
|
return pe({ 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);
|
|
2691
2691
|
}
|
|
2692
|
-
function
|
|
2692
|
+
function Va(s) {
|
|
2693
2693
|
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);
|
|
2694
2694
|
}
|
|
2695
|
-
function
|
|
2695
|
+
function qa(s) {
|
|
2696
2696
|
return pe({ 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);
|
|
2697
2697
|
}
|
|
2698
|
-
function
|
|
2699
|
-
const [s, t] =
|
|
2698
|
+
function Gn() {
|
|
2699
|
+
const [s, t] = O(!1), a = c((o) => o.card.type), { setCardType: n, setCardPreferences: r, setChartOrientation: m } = c((o) => o.actions), u = c(
|
|
2700
2700
|
(o) => o.actions.setCardCustomCfg
|
|
2701
2701
|
);
|
|
2702
2702
|
function d(o) {
|
|
2703
2703
|
u(null), r({}), n(o), t(!1);
|
|
2704
2704
|
}
|
|
2705
2705
|
return /* @__PURE__ */ e.jsxs(ls, { open: s, onOpenChange: t, children: [
|
|
2706
|
-
/* @__PURE__ */ e.jsx(is, { asChild: !0, children: /* @__PURE__ */ e.jsx(k, { size: "sm", variant: "outline", children: /* @__PURE__ */ e.jsx(
|
|
2706
|
+
/* @__PURE__ */ e.jsx(is, { asChild: !0, children: /* @__PURE__ */ e.jsx(k, { size: "sm", variant: "outline", children: /* @__PURE__ */ e.jsx(Jn, { className: "h-4 w-4", chartType: a }) }) }),
|
|
2707
2707
|
/* @__PURE__ */ e.jsx(os, { className: "w-50", children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-3 place-items-center", children: [
|
|
2708
2708
|
/* @__PURE__ */ e.jsx(
|
|
2709
2709
|
k,
|
|
@@ -2711,7 +2711,7 @@ function Kn() {
|
|
|
2711
2711
|
onClick: () => d("bar"),
|
|
2712
2712
|
className: "font-normal",
|
|
2713
2713
|
variant: "ghost",
|
|
2714
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2714
|
+
children: /* @__PURE__ */ e.jsx(Vs, { className: "size-5" })
|
|
2715
2715
|
}
|
|
2716
2716
|
),
|
|
2717
2717
|
/* @__PURE__ */ e.jsx(
|
|
@@ -2719,7 +2719,7 @@ function Kn() {
|
|
|
2719
2719
|
{
|
|
2720
2720
|
onClick: () => d("line"),
|
|
2721
2721
|
variant: "ghost",
|
|
2722
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2722
|
+
children: /* @__PURE__ */ e.jsx(qs, { className: "size-5" })
|
|
2723
2723
|
}
|
|
2724
2724
|
),
|
|
2725
2725
|
/* @__PURE__ */ e.jsx(
|
|
@@ -2727,7 +2727,7 @@ function Kn() {
|
|
|
2727
2727
|
{
|
|
2728
2728
|
onClick: () => d("stackedBar"),
|
|
2729
2729
|
variant: "ghost",
|
|
2730
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2730
|
+
children: /* @__PURE__ */ e.jsx(Ia, { className: "size-5", strokeWidth: 0 })
|
|
2731
2731
|
}
|
|
2732
2732
|
),
|
|
2733
2733
|
/* @__PURE__ */ e.jsx(
|
|
@@ -2735,7 +2735,7 @@ function Kn() {
|
|
|
2735
2735
|
{
|
|
2736
2736
|
onClick: () => d("stackedLine"),
|
|
2737
2737
|
variant: "ghost",
|
|
2738
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2738
|
+
children: /* @__PURE__ */ e.jsx(Ea, { className: "size-5", strokeWidth: 0 })
|
|
2739
2739
|
}
|
|
2740
2740
|
),
|
|
2741
2741
|
/* @__PURE__ */ e.jsx(
|
|
@@ -2743,7 +2743,7 @@ function Kn() {
|
|
|
2743
2743
|
{
|
|
2744
2744
|
onClick: () => d("scatter"),
|
|
2745
2745
|
variant: "ghost",
|
|
2746
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2746
|
+
children: /* @__PURE__ */ e.jsx(ka, { className: "size-5" })
|
|
2747
2747
|
}
|
|
2748
2748
|
),
|
|
2749
2749
|
/* @__PURE__ */ e.jsx(
|
|
@@ -2751,7 +2751,7 @@ function Kn() {
|
|
|
2751
2751
|
{
|
|
2752
2752
|
onClick: () => d("bubble"),
|
|
2753
2753
|
variant: "ghost",
|
|
2754
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2754
|
+
children: /* @__PURE__ */ e.jsx(Aa, { className: "size-4" })
|
|
2755
2755
|
}
|
|
2756
2756
|
),
|
|
2757
2757
|
/* @__PURE__ */ e.jsx(
|
|
@@ -2759,7 +2759,7 @@ function Kn() {
|
|
|
2759
2759
|
{
|
|
2760
2760
|
onClick: () => d("pie"),
|
|
2761
2761
|
variant: "ghost",
|
|
2762
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2762
|
+
children: /* @__PURE__ */ e.jsx(Sa, { className: "size-5" })
|
|
2763
2763
|
}
|
|
2764
2764
|
),
|
|
2765
2765
|
/* @__PURE__ */ e.jsx(
|
|
@@ -2767,7 +2767,7 @@ function Kn() {
|
|
|
2767
2767
|
{
|
|
2768
2768
|
onClick: () => d("doughnut"),
|
|
2769
2769
|
variant: "ghost",
|
|
2770
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2770
|
+
children: /* @__PURE__ */ e.jsx(La, { className: "size-5", strokeWidth: 1 })
|
|
2771
2771
|
}
|
|
2772
2772
|
),
|
|
2773
2773
|
/* @__PURE__ */ e.jsx(
|
|
@@ -2776,7 +2776,7 @@ function Kn() {
|
|
|
2776
2776
|
onClick: () => d("radar"),
|
|
2777
2777
|
variant: "ghost",
|
|
2778
2778
|
children: /* @__PURE__ */ e.jsx(
|
|
2779
|
-
|
|
2779
|
+
Ta,
|
|
2780
2780
|
{
|
|
2781
2781
|
className: "size-5 font-extralight",
|
|
2782
2782
|
strokeWidth: 0.5
|
|
@@ -2797,7 +2797,7 @@ function Kn() {
|
|
|
2797
2797
|
{
|
|
2798
2798
|
onClick: () => d("pyramid"),
|
|
2799
2799
|
variant: "ghost",
|
|
2800
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2800
|
+
children: /* @__PURE__ */ e.jsx(qa, { className: "size-5" })
|
|
2801
2801
|
}
|
|
2802
2802
|
),
|
|
2803
2803
|
/* @__PURE__ */ e.jsx(
|
|
@@ -2805,7 +2805,7 @@ function Kn() {
|
|
|
2805
2805
|
{
|
|
2806
2806
|
onClick: () => d("range"),
|
|
2807
2807
|
variant: "ghost",
|
|
2808
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2808
|
+
children: /* @__PURE__ */ e.jsx(Na, { className: "size-5" })
|
|
2809
2809
|
}
|
|
2810
2810
|
),
|
|
2811
2811
|
/* @__PURE__ */ e.jsx(
|
|
@@ -2821,7 +2821,7 @@ function Kn() {
|
|
|
2821
2821
|
{
|
|
2822
2822
|
onClick: () => d("kpi"),
|
|
2823
2823
|
variant: "ghost",
|
|
2824
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2824
|
+
children: /* @__PURE__ */ e.jsx(Va, { className: "size-6" })
|
|
2825
2825
|
}
|
|
2826
2826
|
),
|
|
2827
2827
|
/* @__PURE__ */ e.jsx(
|
|
@@ -2829,50 +2829,50 @@ function Kn() {
|
|
|
2829
2829
|
{
|
|
2830
2830
|
onClick: () => d("text"),
|
|
2831
2831
|
variant: "ghost",
|
|
2832
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2832
|
+
children: /* @__PURE__ */ e.jsx(Rs, { className: "size-4" })
|
|
2833
2833
|
}
|
|
2834
2834
|
)
|
|
2835
2835
|
] }) })
|
|
2836
2836
|
] });
|
|
2837
2837
|
}
|
|
2838
|
-
function
|
|
2838
|
+
function Jn({ chartType: s, className: t }) {
|
|
2839
2839
|
switch (s) {
|
|
2840
2840
|
case "bar":
|
|
2841
|
-
return /* @__PURE__ */ e.jsx(Is, { className: t });
|
|
2842
|
-
case "line":
|
|
2843
2841
|
return /* @__PURE__ */ e.jsx(Vs, { className: t });
|
|
2842
|
+
case "line":
|
|
2843
|
+
return /* @__PURE__ */ e.jsx(qs, { className: t });
|
|
2844
2844
|
case "pie":
|
|
2845
|
-
return /* @__PURE__ */ e.jsx(
|
|
2845
|
+
return /* @__PURE__ */ e.jsx(Sa, { className: t });
|
|
2846
2846
|
case "radar":
|
|
2847
|
-
return /* @__PURE__ */ e.jsx(
|
|
2847
|
+
return /* @__PURE__ */ e.jsx(Ta, { className: t });
|
|
2848
2848
|
case "scatter":
|
|
2849
|
-
return /* @__PURE__ */ e.jsx(
|
|
2849
|
+
return /* @__PURE__ */ e.jsx(ka, { className: t });
|
|
2850
2850
|
case "bubble":
|
|
2851
|
-
return /* @__PURE__ */ e.jsx(
|
|
2851
|
+
return /* @__PURE__ */ e.jsx(Aa, { className: t });
|
|
2852
2852
|
case "doughnut":
|
|
2853
|
-
return /* @__PURE__ */ e.jsx(
|
|
2853
|
+
return /* @__PURE__ */ e.jsx(La, { className: t });
|
|
2854
2854
|
case "stackedBar":
|
|
2855
|
-
return /* @__PURE__ */ e.jsx(
|
|
2855
|
+
return /* @__PURE__ */ e.jsx(Ia, { className: "size-4 text-foreground/70" });
|
|
2856
2856
|
case "stackedLine":
|
|
2857
|
-
return /* @__PURE__ */ e.jsx(
|
|
2857
|
+
return /* @__PURE__ */ e.jsx(Ea, { className: "size-4 text-foreground/70" });
|
|
2858
2858
|
case "polarArea":
|
|
2859
2859
|
return /* @__PURE__ */ e.jsx(Da, { className: t });
|
|
2860
2860
|
case "pyramid":
|
|
2861
|
-
return /* @__PURE__ */ e.jsx(
|
|
2861
|
+
return /* @__PURE__ */ e.jsx(qa, { className: t });
|
|
2862
2862
|
case "range":
|
|
2863
|
-
return /* @__PURE__ */ e.jsx(
|
|
2863
|
+
return /* @__PURE__ */ e.jsx(Na, { className: t });
|
|
2864
2864
|
case "kpi":
|
|
2865
|
-
return /* @__PURE__ */ e.jsx(
|
|
2865
|
+
return /* @__PURE__ */ e.jsx(Va, { className: t });
|
|
2866
2866
|
case "text":
|
|
2867
|
-
return /* @__PURE__ */ e.jsx(
|
|
2867
|
+
return /* @__PURE__ */ e.jsx(Rs, { className: t });
|
|
2868
2868
|
default:
|
|
2869
2869
|
return /* @__PURE__ */ e.jsx(Ds, { className: t });
|
|
2870
2870
|
}
|
|
2871
2871
|
}
|
|
2872
|
-
function
|
|
2872
|
+
function Xs() {
|
|
2873
2873
|
const s = c((h) => h.frame), t = c((h) => h.card), a = c((h) => h.card.data), n = c((h) => h.isShowingVisual), r = c((h) => h.isSqlRunning), m = c((h) => h.queryError), u = c((h) => h.pythonStdOut), d = c((h) => h.actions.setRunSql);
|
|
2874
2874
|
c((h) => h.onSave), c((h) => h.onClose), c((h) => h.actions.setCardSql), c((h) => h.actions.setCardType), c((h) => h.actions.setSqlGen);
|
|
2875
|
-
const { setFrame: o, setCard: f, updateCardInFrame: p } =
|
|
2875
|
+
const { setFrame: o, setCard: f, updateCardInFrame: p } = fa();
|
|
2876
2876
|
if (!t)
|
|
2877
2877
|
return /* @__PURE__ */ e.jsx(e.Fragment, { children: "No Active Card" });
|
|
2878
2878
|
function g() {
|
|
@@ -2899,45 +2899,45 @@ function Zs() {
|
|
|
2899
2899
|
o(S), f(h);
|
|
2900
2900
|
}
|
|
2901
2901
|
function b(h) {
|
|
2902
|
-
const S = s.cards.filter((y) => y.id !== h), j = S[0],
|
|
2902
|
+
const S = s.cards.filter((y) => y.id !== h), j = S[0], M = {
|
|
2903
2903
|
...s,
|
|
2904
2904
|
cards: S,
|
|
2905
2905
|
// update the active card to the first card in the frame
|
|
2906
2906
|
activeCardId: j.id
|
|
2907
2907
|
};
|
|
2908
|
-
o(
|
|
2908
|
+
o(M), f(j);
|
|
2909
2909
|
}
|
|
2910
2910
|
function i(h) {
|
|
2911
2911
|
const S = {
|
|
2912
2912
|
...s,
|
|
2913
|
-
cards: s.cards.map((
|
|
2913
|
+
cards: s.cards.map((M) => M.id === t.id ? t : M),
|
|
2914
2914
|
activeCardId: h
|
|
2915
2915
|
};
|
|
2916
2916
|
o(S);
|
|
2917
|
-
const j = S.cards.find((
|
|
2917
|
+
const j = S.cards.find((M) => M.id === h);
|
|
2918
2918
|
f(j), j.sql && j.data && j.data.length === 0 && d(!0);
|
|
2919
2919
|
}
|
|
2920
2920
|
function x() {
|
|
2921
|
-
return t.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(Dt, { isLoading: r, card: t }) }) }) : t.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(
|
|
2922
|
-
|
|
2921
|
+
return t.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(Dt, { isLoading: r, card: t }) }) }) : t.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(At, { isLoading: r, card: t }) }) }) : /* @__PURE__ */ e.jsxs(
|
|
2922
|
+
ga,
|
|
2923
2923
|
{
|
|
2924
2924
|
onValueChange: i,
|
|
2925
2925
|
value: s.activeCardId,
|
|
2926
2926
|
className: "flex grow flex-col pb-3",
|
|
2927
2927
|
children: [
|
|
2928
2928
|
s.cards.map((h) => /* @__PURE__ */ e.jsx(ts, { className: "mt-0 grow", value: h.id, children: /* @__PURE__ */ e.jsx(Oa, { showCard: h, className: "grow border-none shadow-none" }) }, h.id)),
|
|
2929
|
-
/* @__PURE__ */ e.jsxs(
|
|
2929
|
+
/* @__PURE__ */ e.jsxs(ja, { className: "mx-6 flex justify-start", children: [
|
|
2930
2930
|
s.cards.map((h) => /* @__PURE__ */ e.jsx(
|
|
2931
|
-
|
|
2931
|
+
Cs,
|
|
2932
2932
|
{
|
|
2933
2933
|
text: h.tabTitle || h.title,
|
|
2934
2934
|
onSave: (S) => {
|
|
2935
|
-
f({ ...
|
|
2935
|
+
f({ ...t, tabTitle: S }), p({ ...t, tabTitle: S });
|
|
2936
2936
|
},
|
|
2937
2937
|
children: /* @__PURE__ */ e.jsxs(as, { className: "", value: h.id, children: [
|
|
2938
2938
|
h.tabTitle || h.title,
|
|
2939
2939
|
s.activeCardId === h.id && s.cards.length > 1 && /* @__PURE__ */ e.jsx(
|
|
2940
|
-
|
|
2940
|
+
ba,
|
|
2941
2941
|
{
|
|
2942
2942
|
className: "ml-2 size-3.5 text-muted-foreground hover:text-foreground",
|
|
2943
2943
|
onClick: () => b(h.id)
|
|
@@ -2953,7 +2953,7 @@ function Zs() {
|
|
|
2953
2953
|
className: "ml-1 h-8 px-2 hover:bg-muted-foreground/50",
|
|
2954
2954
|
variant: "outline",
|
|
2955
2955
|
onClick: g,
|
|
2956
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2956
|
+
children: /* @__PURE__ */ e.jsx(ws, { className: "h-4 w-4" })
|
|
2957
2957
|
}
|
|
2958
2958
|
)
|
|
2959
2959
|
] })
|
|
@@ -2965,10 +2965,10 @@ function Zs() {
|
|
|
2965
2965
|
r && /* @__PURE__ */ e.jsx(Je, { className: "absolute bottom-0 left-0 right-0 top-0 z-10 m-auto h-10 w-10 animate-spin text-foreground/10" }),
|
|
2966
2966
|
/* @__PURE__ */ e.jsxs("div", { className: "mb-0 flex min-h-10 items-center justify-end gap-2 px-6", children: [
|
|
2967
2967
|
n && /* @__PURE__ */ e.jsxs("div", { className: "flex grow items-center gap-2", children: [
|
|
2968
|
-
/* @__PURE__ */ e.jsx(
|
|
2969
|
-
t.type !== "table" && /* @__PURE__ */ e.jsx(
|
|
2968
|
+
/* @__PURE__ */ e.jsx(Gn, {}),
|
|
2969
|
+
t.type !== "table" && /* @__PURE__ */ e.jsx(Kn, {})
|
|
2970
2970
|
] }),
|
|
2971
|
-
/* @__PURE__ */ e.jsx(
|
|
2971
|
+
/* @__PURE__ */ e.jsx(Qn, {})
|
|
2972
2972
|
] }),
|
|
2973
2973
|
n ? x() : (
|
|
2974
2974
|
// card.type === 'kpi' ? (
|
|
@@ -2981,14 +2981,14 @@ function Zs() {
|
|
|
2981
2981
|
// <EditorCard className="grow border-none shadow-none" />
|
|
2982
2982
|
// )
|
|
2983
2983
|
/* @__PURE__ */ e.jsxs("div", { className: "flex min-h-0 w-full flex-1 grow basis-0 px-6", children: [
|
|
2984
|
-
u && /* @__PURE__ */ e.jsx(
|
|
2985
|
-
t.data && t.data.length > 0 && /* @__PURE__ */ e.jsx(
|
|
2984
|
+
u && /* @__PURE__ */ e.jsx(Un, {}),
|
|
2985
|
+
t.data && t.data.length > 0 && /* @__PURE__ */ e.jsx(Pn, { data: a || [] }),
|
|
2986
2986
|
m && /* @__PURE__ */ e.jsx("span", { className: "font-mono text-sm", children: m })
|
|
2987
2987
|
] })
|
|
2988
2988
|
)
|
|
2989
2989
|
] });
|
|
2990
2990
|
}
|
|
2991
|
-
function
|
|
2991
|
+
function Un() {
|
|
2992
2992
|
const s = c((a) => a.pythonStdOut);
|
|
2993
2993
|
if (!s)
|
|
2994
2994
|
return null;
|
|
@@ -3005,14 +3005,14 @@ function Jn() {
|
|
|
3005
3005
|
/* @__PURE__ */ e.jsx(Ke, { className: "mb-2" })
|
|
3006
3006
|
] });
|
|
3007
3007
|
}
|
|
3008
|
-
function
|
|
3008
|
+
function Qn() {
|
|
3009
3009
|
const s = c((a) => a.isShowingVisual), t = c(
|
|
3010
3010
|
(a) => a.actions.setIsShowingVisual
|
|
3011
3011
|
);
|
|
3012
3012
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
3013
3013
|
/* @__PURE__ */ e.jsx(G, { htmlFor: "visualize", children: "Chart" }),
|
|
3014
3014
|
/* @__PURE__ */ e.jsx(
|
|
3015
|
-
|
|
3015
|
+
Et,
|
|
3016
3016
|
{
|
|
3017
3017
|
checked: s,
|
|
3018
3018
|
onCheckedChange: () => t(!s),
|
|
@@ -3023,7 +3023,7 @@ function Un() {
|
|
|
3023
3023
|
] });
|
|
3024
3024
|
}
|
|
3025
3025
|
function Ie() {
|
|
3026
|
-
const [s, t] =
|
|
3026
|
+
const [s, t] = O([]);
|
|
3027
3027
|
c(
|
|
3028
3028
|
(p) => p.card.cfg
|
|
3029
3029
|
);
|
|
@@ -3119,7 +3119,7 @@ function Ie() {
|
|
|
3119
3119
|
/* @__PURE__ */ e.jsx("div", { className: "flex gap-2 items-center ", children: ((i = a == null ? void 0 : a.onClickFilter) == null ? void 0 : i.find(
|
|
3120
3120
|
(x) => x.columnIndex === g
|
|
3121
3121
|
)) && /* @__PURE__ */ e.jsx(
|
|
3122
|
-
|
|
3122
|
+
Ca,
|
|
3123
3123
|
{
|
|
3124
3124
|
onClick: () => {
|
|
3125
3125
|
t((x) => {
|
|
@@ -3148,7 +3148,7 @@ function ds() {
|
|
|
3148
3148
|
r(f);
|
|
3149
3149
|
}
|
|
3150
3150
|
return /* @__PURE__ */ e.jsxs(
|
|
3151
|
-
|
|
3151
|
+
Es,
|
|
3152
3152
|
{
|
|
3153
3153
|
value: ((d = s == null ? void 0 : s.chartOptions) == null ? void 0 : d.indexAxis) || ((o = t == null ? void 0 : t.options) == null ? void 0 : o.indexAxis) || "x",
|
|
3154
3154
|
onValueChange: m,
|
|
@@ -3168,26 +3168,26 @@ function ds() {
|
|
|
3168
3168
|
);
|
|
3169
3169
|
}
|
|
3170
3170
|
const ze = "focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0";
|
|
3171
|
-
function
|
|
3171
|
+
function ea(s, t) {
|
|
3172
3172
|
var n, r, m;
|
|
3173
|
-
const a =
|
|
3173
|
+
const a = ya(s, t);
|
|
3174
3174
|
return ((m = (r = (n = s == null ? void 0 : s.chartOptions) == null ? void 0 : n.scales) == null ? void 0 : r[a]) == null ? void 0 : m.type) || "linear";
|
|
3175
3175
|
}
|
|
3176
|
-
function
|
|
3176
|
+
function Ra() {
|
|
3177
3177
|
var W, J, te, K, ne, C;
|
|
3178
|
-
const [s, t] =
|
|
3178
|
+
const [s, t] = O(!1), a = c((v) => {
|
|
3179
3179
|
var F;
|
|
3180
3180
|
return (F = v.card) == null ? void 0 : F.preferences;
|
|
3181
3181
|
}), n = c((v) => {
|
|
3182
3182
|
var F;
|
|
3183
3183
|
return (F = v.card) == null ? void 0 : F.cfg;
|
|
3184
|
-
}), r =
|
|
3185
|
-
|
|
3186
|
-
), [d, o] =
|
|
3184
|
+
}), r = ya(a, n), [m, u] = O(
|
|
3185
|
+
ea(a)
|
|
3186
|
+
), [d, o] = O(
|
|
3187
3187
|
((te = (J = (W = a == null ? void 0 : a.chartOptions) == null ? void 0 : W.scales) == null ? void 0 : J[r]) == null ? void 0 : te.min) || ""
|
|
3188
|
-
), [f, p] =
|
|
3188
|
+
), [f, p] = O(
|
|
3189
3189
|
((C = (ne = (K = a == null ? void 0 : a.chartOptions) == null ? void 0 : K.scales) == null ? void 0 : ne[r]) == null ? void 0 : C.max) || ""
|
|
3190
|
-
), [g, b] =
|
|
3190
|
+
), [g, b] = O(d || f ? "custom" : "auto"), [i, x] = O(""), [h, S] = O(0), [j, M] = O(""), [y, A] = O(""), [E, V] = O(""), D = c(
|
|
3191
3191
|
(v) => v.actions.setCardPreferences
|
|
3192
3192
|
), N = c((v) => {
|
|
3193
3193
|
var F;
|
|
@@ -3195,11 +3195,11 @@ function qa() {
|
|
|
3195
3195
|
}), z = ["pie", "doughnut", "polarArea"].includes(N);
|
|
3196
3196
|
Q(() => {
|
|
3197
3197
|
var v, F, _, fe, ae, I, Y, se, ye, ge, U, re, le, ve;
|
|
3198
|
-
u(
|
|
3198
|
+
u(ea(a)), o(
|
|
3199
3199
|
((_ = (F = (v = a == null ? void 0 : a.chartOptions) == null ? void 0 : v.scales) == null ? void 0 : F[r]) == null ? void 0 : _.min) === 0 ? 0 : ""
|
|
3200
3200
|
), p(((I = (ae = (fe = a == null ? void 0 : a.chartOptions) == null ? void 0 : fe.scales) == null ? void 0 : ae[r]) == null ? void 0 : I.max) || ""), x(
|
|
3201
3201
|
((ge = (ye = (se = (Y = a == null ? void 0 : a.chartOptions) == null ? void 0 : Y.scales) == null ? void 0 : se[r]) == null ? void 0 : ye.ticks) == null ? void 0 : ge.stepSize) || ""
|
|
3202
|
-
), S(((U = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : U.decimalPlaces) || 0),
|
|
3202
|
+
), S(((U = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : U.decimalPlaces) || 0), M(((re = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : re.suffix) || ""), A(((le = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : le.currency) || ""), V(((ve = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : ve.locale) || "");
|
|
3203
3203
|
}, [s, a, r]);
|
|
3204
3204
|
function q(v, F) {
|
|
3205
3205
|
return F === "" || /^[0-9\b]+$/.test(F) ? Number(F) : Number(v);
|
|
@@ -3257,7 +3257,7 @@ function qa() {
|
|
|
3257
3257
|
] })
|
|
3258
3258
|
] });
|
|
3259
3259
|
}
|
|
3260
|
-
function
|
|
3260
|
+
function L() {
|
|
3261
3261
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
3262
3262
|
/* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-3 items-center gap-2", children: [
|
|
3263
3263
|
/* @__PURE__ */ e.jsx(G, { htmlFor: "range", children: "Range" }),
|
|
@@ -3324,10 +3324,10 @@ function qa() {
|
|
|
3324
3324
|
locale: E
|
|
3325
3325
|
}
|
|
3326
3326
|
};
|
|
3327
|
-
console.log(F),
|
|
3327
|
+
console.log(F), D(F);
|
|
3328
3328
|
}
|
|
3329
3329
|
return /* @__PURE__ */ e.jsxs(ls, { onOpenChange: (v) => t(v), children: [
|
|
3330
|
-
/* @__PURE__ */ e.jsx(is, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
3330
|
+
/* @__PURE__ */ e.jsx(is, { asChild: !0, children: /* @__PURE__ */ e.jsx(It, { className: "size-4 cursor-pointer text-muted-foreground hover:text-foreground" }) }),
|
|
3331
3331
|
/* @__PURE__ */ e.jsx(os, { align: "center", className: "max-w-65", children: /* @__PURE__ */ e.jsxs("div", { className: "grid gap-4", children: [
|
|
3332
3332
|
/* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
3333
3333
|
/* @__PURE__ */ e.jsx("h4", { className: "font-medium leading-none", children: "Scale Options" }),
|
|
@@ -3337,14 +3337,14 @@ function qa() {
|
|
|
3337
3337
|
/* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-3 items-center gap-2", children: [
|
|
3338
3338
|
/* @__PURE__ */ e.jsx(G, { htmlFor: "scale", children: "Type" }),
|
|
3339
3339
|
/* @__PURE__ */ e.jsxs(
|
|
3340
|
-
|
|
3340
|
+
Me,
|
|
3341
3341
|
{
|
|
3342
3342
|
disabled: z,
|
|
3343
3343
|
value: m,
|
|
3344
3344
|
onValueChange: (v) => u(v),
|
|
3345
3345
|
children: [
|
|
3346
|
-
/* @__PURE__ */ e.jsx(
|
|
3347
|
-
/* @__PURE__ */ e.jsx(
|
|
3346
|
+
/* @__PURE__ */ e.jsx(Oe, { className: "col-span-2 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(Te, {}) }),
|
|
3347
|
+
/* @__PURE__ */ e.jsx(Le, { id: "type", children: /* @__PURE__ */ e.jsxs(Pe, { children: [
|
|
3348
3348
|
/* @__PURE__ */ e.jsx(Ae, { children: "Option" }),
|
|
3349
3349
|
/* @__PURE__ */ e.jsx(X, { value: "linear", children: "Linear" }),
|
|
3350
3350
|
/* @__PURE__ */ e.jsx(X, { value: "logarithmic", children: "Logarithmic" })
|
|
@@ -3356,7 +3356,7 @@ function qa() {
|
|
|
3356
3356
|
m == "linear" && /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-3 items-center gap-2 py-1", children: [
|
|
3357
3357
|
/* @__PURE__ */ e.jsx(G, { htmlFor: "scale-option", children: "Setup" }),
|
|
3358
3358
|
/* @__PURE__ */ e.jsxs(
|
|
3359
|
-
|
|
3359
|
+
Es,
|
|
3360
3360
|
{
|
|
3361
3361
|
disabled: z,
|
|
3362
3362
|
id: "scale-option",
|
|
@@ -3377,9 +3377,9 @@ function qa() {
|
|
|
3377
3377
|
}
|
|
3378
3378
|
)
|
|
3379
3379
|
] }),
|
|
3380
|
-
g === "custom" && m == "linear" &&
|
|
3380
|
+
g === "custom" && m == "linear" && L(),
|
|
3381
3381
|
P(),
|
|
3382
|
-
/* @__PURE__ */ e.jsx(
|
|
3382
|
+
/* @__PURE__ */ e.jsx(Vt, {}),
|
|
3383
3383
|
/* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-3", children: /* @__PURE__ */ e.jsx(
|
|
3384
3384
|
k,
|
|
3385
3385
|
{
|
|
@@ -3393,7 +3393,7 @@ function qa() {
|
|
|
3393
3393
|
] }) })
|
|
3394
3394
|
] });
|
|
3395
3395
|
}
|
|
3396
|
-
function
|
|
3396
|
+
function Wn({ idx: s }) {
|
|
3397
3397
|
var d;
|
|
3398
3398
|
const t = c((o) => {
|
|
3399
3399
|
var f;
|
|
@@ -3407,7 +3407,7 @@ function Qn({ idx: s }) {
|
|
|
3407
3407
|
(o) => o.actions.setCardPreferences
|
|
3408
3408
|
), r = (d = t == null ? void 0 : t.chartOptions) == null ? void 0 : d.indexAxis, m = a == null ? void 0 : a.find((o) => o.idx === s);
|
|
3409
3409
|
function u(o, f) {
|
|
3410
|
-
(o === "end" || o === "start") &&
|
|
3410
|
+
(o === "end" || o === "start") && qt(Rt());
|
|
3411
3411
|
const p = {
|
|
3412
3412
|
display: o !== "none",
|
|
3413
3413
|
align: o,
|
|
@@ -3438,7 +3438,7 @@ function Qn({ idx: s }) {
|
|
|
3438
3438
|
}
|
|
3439
3439
|
}
|
|
3440
3440
|
return /* @__PURE__ */ e.jsxs(ls, { children: [
|
|
3441
|
-
/* @__PURE__ */ e.jsx(is, { children: /* @__PURE__ */ e.jsx(
|
|
3441
|
+
/* @__PURE__ */ e.jsx(is, { children: /* @__PURE__ */ e.jsx(bn, { className: "invisible size-4 rotate-[135deg] cursor-pointer text-muted-foreground hover:text-foreground group-hover:visible" }) }),
|
|
3442
3442
|
/* @__PURE__ */ e.jsx(os, { className: "w-fit p-1", children: /* @__PURE__ */ e.jsxs("div", { className: "flex gap-1", children: [
|
|
3443
3443
|
/* @__PURE__ */ e.jsx(
|
|
3444
3444
|
k,
|
|
@@ -3447,7 +3447,7 @@ function Qn({ idx: s }) {
|
|
|
3447
3447
|
size: "sm",
|
|
3448
3448
|
variant: "secondary",
|
|
3449
3449
|
className: "h-7 p-1 text-xs font-normal",
|
|
3450
|
-
children: /* @__PURE__ */ e.jsx(
|
|
3450
|
+
children: /* @__PURE__ */ e.jsx(ba, { className: "size-4" })
|
|
3451
3451
|
}
|
|
3452
3452
|
),
|
|
3453
3453
|
/* @__PURE__ */ e.jsx(
|
|
@@ -3458,7 +3458,7 @@ function Qn({ idx: s }) {
|
|
|
3458
3458
|
variant: "secondary",
|
|
3459
3459
|
className: "h-7 p-1 text-xs font-normal",
|
|
3460
3460
|
children: /* @__PURE__ */ e.jsx(
|
|
3461
|
-
|
|
3461
|
+
on,
|
|
3462
3462
|
{
|
|
3463
3463
|
className: ee("h-4 w-4", {
|
|
3464
3464
|
"rotate-90": r === "y"
|
|
@@ -3475,7 +3475,7 @@ function Qn({ idx: s }) {
|
|
|
3475
3475
|
variant: "secondary",
|
|
3476
3476
|
className: "h-7 p-1 text-xs font-normal",
|
|
3477
3477
|
children: /* @__PURE__ */ e.jsx(
|
|
3478
|
-
|
|
3478
|
+
dn,
|
|
3479
3479
|
{
|
|
3480
3480
|
className: ee("h-4 w-4", {
|
|
3481
3481
|
"rotate-90": r === "y"
|
|
@@ -3492,7 +3492,7 @@ function Qn({ idx: s }) {
|
|
|
3492
3492
|
variant: "secondary",
|
|
3493
3493
|
className: "h-7 p-1 text-xs font-normal",
|
|
3494
3494
|
children: /* @__PURE__ */ e.jsx(
|
|
3495
|
-
|
|
3495
|
+
cn,
|
|
3496
3496
|
{
|
|
3497
3497
|
className: ee("h-4 w-4", {
|
|
3498
3498
|
"rotate-90": r === "y"
|
|
@@ -3504,7 +3504,7 @@ function Qn({ idx: s }) {
|
|
|
3504
3504
|
] }) })
|
|
3505
3505
|
] });
|
|
3506
3506
|
}
|
|
3507
|
-
function
|
|
3507
|
+
function _a() {
|
|
3508
3508
|
const s = c((o) => o.card), t = c(
|
|
3509
3509
|
(o) => {
|
|
3510
3510
|
var f, p, g;
|
|
@@ -3514,15 +3514,15 @@ function Ra() {
|
|
|
3514
3514
|
keys: r,
|
|
3515
3515
|
metricKeys: m,
|
|
3516
3516
|
dimensionKeys: u
|
|
3517
|
-
} =
|
|
3517
|
+
} = ys(s.data || []);
|
|
3518
3518
|
let d = m;
|
|
3519
3519
|
if (["stackedBar", "stackedLine"].includes(s.type)) {
|
|
3520
|
-
const o =
|
|
3520
|
+
const o = _t({
|
|
3521
3521
|
dataArray: s.data || [],
|
|
3522
3522
|
groupKey: u[0],
|
|
3523
3523
|
pivotKey: u[1],
|
|
3524
3524
|
valueKey: d[0]
|
|
3525
|
-
}), { metricKeys: f } =
|
|
3525
|
+
}), { metricKeys: f } = ys(o);
|
|
3526
3526
|
d = f;
|
|
3527
3527
|
}
|
|
3528
3528
|
return r.length === 0 ? null : /* @__PURE__ */ e.jsxs("div", { className: "space-y-4", children: [
|
|
@@ -3533,13 +3533,13 @@ function Ra() {
|
|
|
3533
3533
|
/* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
3534
3534
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between gap-5", children: [
|
|
3535
3535
|
/* @__PURE__ */ e.jsx(G, { children: n }),
|
|
3536
|
-
/* @__PURE__ */ e.jsx(
|
|
3536
|
+
/* @__PURE__ */ e.jsx(Ra, {})
|
|
3537
3537
|
] }),
|
|
3538
|
-
/* @__PURE__ */ e.jsx("div", { className: "my-1 space-y-1", children: d.map((o, f) => /* @__PURE__ */ e.jsx(
|
|
3538
|
+
/* @__PURE__ */ e.jsx("div", { className: "my-1 space-y-1", children: d.map((o, f) => /* @__PURE__ */ e.jsx(Yn, { col: o, idx: f }, o)) })
|
|
3539
3539
|
] })
|
|
3540
3540
|
] });
|
|
3541
3541
|
}
|
|
3542
|
-
function
|
|
3542
|
+
function Yn({ col: s, idx: t }) {
|
|
3543
3543
|
const a = c((d) => {
|
|
3544
3544
|
var o;
|
|
3545
3545
|
return (o = d.card) == null ? void 0 : o.preferences;
|
|
@@ -3578,21 +3578,21 @@ function Wn({ col: s, idx: t }) {
|
|
|
3578
3578
|
/* @__PURE__ */ e.jsx("p", { children: s }),
|
|
3579
3579
|
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
|
|
3580
3580
|
/* @__PURE__ */ e.jsx(
|
|
3581
|
-
|
|
3581
|
+
Vs,
|
|
3582
3582
|
{
|
|
3583
3583
|
onClick: () => u("bar"),
|
|
3584
3584
|
className: "invisible size-4 cursor-pointer text-muted-foreground hover:text-foreground group-hover:visible"
|
|
3585
3585
|
}
|
|
3586
3586
|
),
|
|
3587
3587
|
/* @__PURE__ */ e.jsx(
|
|
3588
|
-
|
|
3588
|
+
qs,
|
|
3589
3589
|
{
|
|
3590
3590
|
onClick: () => u("line"),
|
|
3591
3591
|
className: "invisible size-4 cursor-pointer text-muted-foreground hover:text-foreground group-hover:visible"
|
|
3592
3592
|
}
|
|
3593
3593
|
),
|
|
3594
3594
|
/* @__PURE__ */ e.jsx(
|
|
3595
|
-
|
|
3595
|
+
Zt,
|
|
3596
3596
|
{
|
|
3597
3597
|
onClick: () => u("area"),
|
|
3598
3598
|
className: "invisible size-4 cursor-pointer text-muted-foreground hover:text-foreground group-hover:visible"
|
|
@@ -3605,16 +3605,16 @@ function Wn({ col: s, idx: t }) {
|
|
|
3605
3605
|
className: "invisible size-4 cursor-pointer py-2 text-muted-foreground hover:text-foreground group-hover:visible"
|
|
3606
3606
|
}
|
|
3607
3607
|
),
|
|
3608
|
-
/* @__PURE__ */ e.jsx(
|
|
3608
|
+
/* @__PURE__ */ e.jsx(Wn, { idx: t })
|
|
3609
3609
|
] })
|
|
3610
3610
|
] });
|
|
3611
3611
|
}
|
|
3612
|
-
function
|
|
3612
|
+
function Zn({
|
|
3613
3613
|
cardType: s
|
|
3614
3614
|
}) {
|
|
3615
3615
|
return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(Ce, { defaultValue: ["item-2"], type: "multiple", children: [
|
|
3616
3616
|
/* @__PURE__ */ e.jsxs(H, { value: "item-1", children: [
|
|
3617
|
-
/* @__PURE__ */ e.jsx(B, { children: `${
|
|
3617
|
+
/* @__PURE__ */ e.jsx(B, { children: `${Is(s)} Chart` }),
|
|
3618
3618
|
/* @__PURE__ */ e.jsxs($, { className: "space-y-4 font-mono text-xs", children: [
|
|
3619
3619
|
/* @__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" }),
|
|
3620
3620
|
/* @__PURE__ */ e.jsxs("ul", { className: "ml-6 list-disc text-xs [&>li]:mt-2", children: [
|
|
@@ -3642,7 +3642,7 @@ function Yn({
|
|
|
3642
3642
|
/* @__PURE__ */ e.jsx(B, { children: "Settings" }),
|
|
3643
3643
|
/* @__PURE__ */ e.jsxs($, { className: "space-y-4 px-2", children: [
|
|
3644
3644
|
/* @__PURE__ */ e.jsx(ds, {}),
|
|
3645
|
-
/* @__PURE__ */ e.jsx(
|
|
3645
|
+
/* @__PURE__ */ e.jsx(_a, {})
|
|
3646
3646
|
] })
|
|
3647
3647
|
] }),
|
|
3648
3648
|
/* @__PURE__ */ e.jsxs(H, { value: "item-3", children: [
|
|
@@ -3651,7 +3651,7 @@ function Yn({
|
|
|
3651
3651
|
] })
|
|
3652
3652
|
] }) });
|
|
3653
3653
|
}
|
|
3654
|
-
function
|
|
3654
|
+
function _s() {
|
|
3655
3655
|
var r, m, u;
|
|
3656
3656
|
const s = c(
|
|
3657
3657
|
(d) => d.card.cfg
|
|
@@ -3680,17 +3680,17 @@ function Rs() {
|
|
|
3680
3680
|
return /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
3681
3681
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
3682
3682
|
/* @__PURE__ */ e.jsx("label", { className: "font-medium", children: "Data Labels" }),
|
|
3683
|
-
!["pyramid"].includes(a) && /* @__PURE__ */ e.jsx(
|
|
3683
|
+
!["pyramid"].includes(a) && /* @__PURE__ */ e.jsx(Ra, {})
|
|
3684
3684
|
] }),
|
|
3685
3685
|
/* @__PURE__ */ e.jsxs(
|
|
3686
|
-
|
|
3686
|
+
Me,
|
|
3687
3687
|
{
|
|
3688
3688
|
value: (u = (m = (r = s == null ? void 0 : s.options) == null ? void 0 : r.plugins) == null ? void 0 : m.datalabels) == null ? void 0 : u.anchor,
|
|
3689
3689
|
onValueChange: n,
|
|
3690
3690
|
defaultValue: "none",
|
|
3691
3691
|
children: [
|
|
3692
|
-
/* @__PURE__ */ e.jsx(
|
|
3693
|
-
/* @__PURE__ */ e.jsx(
|
|
3692
|
+
/* @__PURE__ */ e.jsx(Oe, { className: "h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(Te, { placeholder: "Select position" }) }),
|
|
3693
|
+
/* @__PURE__ */ e.jsx(Le, { children: /* @__PURE__ */ e.jsxs(Pe, { children: [
|
|
3694
3694
|
/* @__PURE__ */ e.jsx(Ae, { children: "Data Labels" }),
|
|
3695
3695
|
/* @__PURE__ */ e.jsx(X, { value: "none", children: "None" }),
|
|
3696
3696
|
a !== "pyramid" && /* @__PURE__ */ e.jsx(X, { value: "start", children: "Start" }),
|
|
@@ -3702,7 +3702,7 @@ function Rs() {
|
|
|
3702
3702
|
)
|
|
3703
3703
|
] });
|
|
3704
3704
|
}
|
|
3705
|
-
function
|
|
3705
|
+
function Xn({
|
|
3706
3706
|
cardType: s
|
|
3707
3707
|
}) {
|
|
3708
3708
|
function t(a) {
|
|
@@ -3734,12 +3734,12 @@ function Zn({
|
|
|
3734
3734
|
}
|
|
3735
3735
|
return /* @__PURE__ */ e.jsx("div", { className: "px-6 py-2 space-y-6", children: /* @__PURE__ */ e.jsxs(Ce, { defaultValue: ["item-2"], type: "multiple", children: [
|
|
3736
3736
|
/* @__PURE__ */ e.jsxs(H, { value: "item-1", children: [
|
|
3737
|
-
/* @__PURE__ */ e.jsx(B, { children: `${
|
|
3737
|
+
/* @__PURE__ */ e.jsx(B, { children: `${Is(s)} Chart` }),
|
|
3738
3738
|
/* @__PURE__ */ e.jsx($, { className: " space-y-4 font-mono text-xs ", children: t(s) })
|
|
3739
3739
|
] }),
|
|
3740
3740
|
/* @__PURE__ */ e.jsxs(H, { value: "item-2", children: [
|
|
3741
3741
|
/* @__PURE__ */ e.jsx(B, { children: "Settings" }),
|
|
3742
|
-
/* @__PURE__ */ e.jsx($, { className: "px-2", children: /* @__PURE__ */ e.jsx(
|
|
3742
|
+
/* @__PURE__ */ e.jsx($, { className: "px-2", children: /* @__PURE__ */ e.jsx(_s, {}) })
|
|
3743
3743
|
] }),
|
|
3744
3744
|
/* @__PURE__ */ e.jsxs(H, { value: "item-3", children: [
|
|
3745
3745
|
/* @__PURE__ */ e.jsx(B, { children: "Filter on click" }),
|
|
@@ -3747,7 +3747,7 @@ function Zn({
|
|
|
3747
3747
|
] })
|
|
3748
3748
|
] }) });
|
|
3749
3749
|
}
|
|
3750
|
-
const
|
|
3750
|
+
const er = {
|
|
3751
3751
|
datasets: [
|
|
3752
3752
|
{
|
|
3753
3753
|
type: "line",
|
|
@@ -3760,7 +3760,7 @@ const Xn = {
|
|
|
3760
3760
|
data: []
|
|
3761
3761
|
}
|
|
3762
3762
|
]
|
|
3763
|
-
},
|
|
3763
|
+
}, sr = {
|
|
3764
3764
|
datasets: [
|
|
3765
3765
|
{
|
|
3766
3766
|
fill: "origin",
|
|
@@ -3770,7 +3770,7 @@ const Xn = {
|
|
|
3770
3770
|
}
|
|
3771
3771
|
]
|
|
3772
3772
|
};
|
|
3773
|
-
function
|
|
3773
|
+
function ar() {
|
|
3774
3774
|
const s = c((t) => t.card.type);
|
|
3775
3775
|
return /* @__PURE__ */ e.jsxs("div", { className: "space-y-6 p-6", children: [
|
|
3776
3776
|
/* @__PURE__ */ e.jsx(
|
|
@@ -3779,15 +3779,15 @@ function sr() {
|
|
|
3779
3779
|
className: " ",
|
|
3780
3780
|
type: "single",
|
|
3781
3781
|
collapsible: !0,
|
|
3782
|
-
children:
|
|
3782
|
+
children: tr(s)
|
|
3783
3783
|
}
|
|
3784
3784
|
),
|
|
3785
3785
|
/* @__PURE__ */ e.jsx("section", { className: "", children: ["line", "bar"].includes(s) && /* @__PURE__ */ e.jsx(ds, {}) }),
|
|
3786
|
-
/* @__PURE__ */ e.jsx("div", { children: !["kpi"].includes(s) && /* @__PURE__ */ e.jsx(
|
|
3786
|
+
/* @__PURE__ */ e.jsx("div", { children: !["kpi"].includes(s) && /* @__PURE__ */ e.jsx(_s, {}) }),
|
|
3787
3787
|
/* @__PURE__ */ e.jsx("div", { children: !["kpi"].includes(s) && /* @__PURE__ */ e.jsx(Ie, {}) })
|
|
3788
3788
|
] });
|
|
3789
3789
|
}
|
|
3790
|
-
function
|
|
3790
|
+
function tr(s) {
|
|
3791
3791
|
if (["line", "bar"].includes(s))
|
|
3792
3792
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
3793
3793
|
/* @__PURE__ */ e.jsxs(H, { value: "item-1", children: [
|
|
@@ -3808,7 +3808,7 @@ function ar(s) {
|
|
|
3808
3808
|
/* @__PURE__ */ e.jsx("b", { children: "Customize" }),
|
|
3809
3809
|
" and change the `type` property in the dataset."
|
|
3810
3810
|
] }),
|
|
3811
|
-
/* @__PURE__ */ e.jsx("pre", { children: JSON.stringify(
|
|
3811
|
+
/* @__PURE__ */ e.jsx("pre", { children: JSON.stringify(er, null, 2) })
|
|
3812
3812
|
] })
|
|
3813
3813
|
] }),
|
|
3814
3814
|
/* @__PURE__ */ e.jsxs(H, { value: "item-3", children: [
|
|
@@ -3829,7 +3829,7 @@ function ar(s) {
|
|
|
3829
3829
|
),
|
|
3830
3830
|
"for more options."
|
|
3831
3831
|
] }),
|
|
3832
|
-
/* @__PURE__ */ e.jsx("pre", { children: JSON.stringify(
|
|
3832
|
+
/* @__PURE__ */ e.jsx("pre", { children: JSON.stringify(sr, null, 2) })
|
|
3833
3833
|
] })
|
|
3834
3834
|
] })
|
|
3835
3835
|
] });
|
|
@@ -3884,7 +3884,7 @@ function ar(s) {
|
|
|
3884
3884
|
] })
|
|
3885
3885
|
] }) });
|
|
3886
3886
|
}
|
|
3887
|
-
function
|
|
3887
|
+
function nr() {
|
|
3888
3888
|
var o, f, p, g, b;
|
|
3889
3889
|
const s = c((i) => i.card.preferences), t = c(
|
|
3890
3890
|
(i) => i.actions.setCardPreferences
|
|
@@ -3918,7 +3918,7 @@ function tr() {
|
|
|
3918
3918
|
}
|
|
3919
3919
|
) || [], u = c(
|
|
3920
3920
|
(i) => i.actions.setColorRanges
|
|
3921
|
-
), d = [...new Set(
|
|
3921
|
+
), d = [...new Set(Qs.map((i) => i.currency))];
|
|
3922
3922
|
return /* @__PURE__ */ e.jsxs("div", { children: [
|
|
3923
3923
|
/* @__PURE__ */ e.jsxs("div", { className: "mb-3 flex items-center gap-2", children: [
|
|
3924
3924
|
/* @__PURE__ */ e.jsx(
|
|
@@ -3944,7 +3944,7 @@ function tr() {
|
|
|
3944
3944
|
/* @__PURE__ */ e.jsxs("div", { className: "w-full space-y-1", children: [
|
|
3945
3945
|
/* @__PURE__ */ e.jsx(G, { children: "Locale" }),
|
|
3946
3946
|
/* @__PURE__ */ e.jsxs(
|
|
3947
|
-
|
|
3947
|
+
Me,
|
|
3948
3948
|
{
|
|
3949
3949
|
value: n || "en-US",
|
|
3950
3950
|
onValueChange: (i) => {
|
|
@@ -3957,10 +3957,10 @@ function tr() {
|
|
|
3957
3957
|
);
|
|
3958
3958
|
},
|
|
3959
3959
|
children: [
|
|
3960
|
-
/* @__PURE__ */ e.jsx(
|
|
3961
|
-
/* @__PURE__ */ e.jsx(
|
|
3960
|
+
/* @__PURE__ */ e.jsx(Oe, { className: "col-span-6 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(Te, {}) }),
|
|
3961
|
+
/* @__PURE__ */ e.jsx(Le, { children: /* @__PURE__ */ e.jsxs(Pe, { children: [
|
|
3962
3962
|
/* @__PURE__ */ e.jsx(Ae, { children: "Format" }),
|
|
3963
|
-
|
|
3963
|
+
Qs.map((i) => /* @__PURE__ */ e.jsx(X, { value: i.locale, children: i.locale }, i.locale))
|
|
3964
3964
|
] }) })
|
|
3965
3965
|
]
|
|
3966
3966
|
}
|
|
@@ -3969,7 +3969,7 @@ function tr() {
|
|
|
3969
3969
|
/* @__PURE__ */ e.jsxs("div", { className: "w-full space-y-1", children: [
|
|
3970
3970
|
/* @__PURE__ */ e.jsx(G, { children: "Currency" }),
|
|
3971
3971
|
/* @__PURE__ */ e.jsxs(
|
|
3972
|
-
|
|
3972
|
+
Me,
|
|
3973
3973
|
{
|
|
3974
3974
|
value: r || "none",
|
|
3975
3975
|
onValueChange: (i) => {
|
|
@@ -3982,8 +3982,8 @@ function tr() {
|
|
|
3982
3982
|
);
|
|
3983
3983
|
},
|
|
3984
3984
|
children: [
|
|
3985
|
-
/* @__PURE__ */ e.jsx(
|
|
3986
|
-
/* @__PURE__ */ e.jsx(
|
|
3985
|
+
/* @__PURE__ */ e.jsx(Oe, { className: "col-span-6 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(Te, {}) }),
|
|
3986
|
+
/* @__PURE__ */ e.jsx(Le, { children: /* @__PURE__ */ e.jsxs(Pe, { children: [
|
|
3987
3987
|
/* @__PURE__ */ e.jsx(Ae, { children: "Currency" }),
|
|
3988
3988
|
/* @__PURE__ */ e.jsx(X, { value: "none", children: "None" }, "none"),
|
|
3989
3989
|
d.map((i) => /* @__PURE__ */ e.jsx(X, { value: i, children: i }, i))
|
|
@@ -3997,7 +3997,7 @@ function tr() {
|
|
|
3997
3997
|
/* @__PURE__ */ e.jsxs("div", { className: "w-full space-y-1", children: [
|
|
3998
3998
|
/* @__PURE__ */ e.jsx(G, { children: "Decimals" }),
|
|
3999
3999
|
/* @__PURE__ */ e.jsxs(
|
|
4000
|
-
|
|
4000
|
+
Me,
|
|
4001
4001
|
{
|
|
4002
4002
|
value: ((g = (p = s == null ? void 0 : s.formatNumber) == null ? void 0 : p.decimalPlaces) == null ? void 0 : g.toString()) || "0",
|
|
4003
4003
|
onValueChange: (i) => {
|
|
@@ -4010,8 +4010,8 @@ function tr() {
|
|
|
4010
4010
|
);
|
|
4011
4011
|
},
|
|
4012
4012
|
children: [
|
|
4013
|
-
/* @__PURE__ */ e.jsx(
|
|
4014
|
-
/* @__PURE__ */ e.jsx(
|
|
4013
|
+
/* @__PURE__ */ e.jsx(Oe, { className: "col-span-3 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(Te, {}) }),
|
|
4014
|
+
/* @__PURE__ */ e.jsx(Le, { children: ["0", "1", "2", "3", "4"].map((i) => /* @__PURE__ */ e.jsx(X, { value: i, children: i }, i)) })
|
|
4015
4015
|
]
|
|
4016
4016
|
}
|
|
4017
4017
|
)
|
|
@@ -4040,7 +4040,7 @@ function tr() {
|
|
|
4040
4040
|
] }) }),
|
|
4041
4041
|
/* @__PURE__ */ e.jsx(Ke, { className: "my-3" }),
|
|
4042
4042
|
/* @__PURE__ */ e.jsx(
|
|
4043
|
-
|
|
4043
|
+
Ht,
|
|
4044
4044
|
{
|
|
4045
4045
|
colorRanges: m,
|
|
4046
4046
|
setColorRanges: u
|
|
@@ -4049,7 +4049,7 @@ function tr() {
|
|
|
4049
4049
|
] })
|
|
4050
4050
|
] });
|
|
4051
4051
|
}
|
|
4052
|
-
function
|
|
4052
|
+
function rr() {
|
|
4053
4053
|
return /* @__PURE__ */ e.jsxs("div", { className: "space-y-6 px-6 py-2", children: [
|
|
4054
4054
|
/* @__PURE__ */ e.jsx(Ce, { type: "single", collapsible: !0, children: /* @__PURE__ */ e.jsxs(H, { value: "item-1", children: [
|
|
4055
4055
|
/* @__PURE__ */ e.jsx(B, { className: "", children: "KPI Query" }),
|
|
@@ -4075,12 +4075,12 @@ function nr() {
|
|
|
4075
4075
|
] })
|
|
4076
4076
|
] })
|
|
4077
4077
|
] }) }),
|
|
4078
|
-
/* @__PURE__ */ e.jsx("section", { className: "", children: /* @__PURE__ */ e.jsx(
|
|
4078
|
+
/* @__PURE__ */ e.jsx("section", { className: "", children: /* @__PURE__ */ e.jsx(nr, {}) }),
|
|
4079
4079
|
/* @__PURE__ */ e.jsx("div", {}),
|
|
4080
4080
|
/* @__PURE__ */ e.jsx("div", {})
|
|
4081
4081
|
] });
|
|
4082
4082
|
}
|
|
4083
|
-
function
|
|
4083
|
+
function lr() {
|
|
4084
4084
|
var n;
|
|
4085
4085
|
const s = c((r) => r.card.preferences), { setCardPreferences: t } = c((r) => r.actions);
|
|
4086
4086
|
function a(r) {
|
|
@@ -4093,7 +4093,7 @@ function rr() {
|
|
|
4093
4093
|
});
|
|
4094
4094
|
}
|
|
4095
4095
|
return /* @__PURE__ */ e.jsxs(
|
|
4096
|
-
|
|
4096
|
+
Es,
|
|
4097
4097
|
{
|
|
4098
4098
|
value: (n = s == null ? void 0 : s.textVisualOptions) != null && n.isDynamicText ? "dynamic" : "static",
|
|
4099
4099
|
onValueChange: a,
|
|
@@ -4119,7 +4119,7 @@ function ss({
|
|
|
4119
4119
|
}) {
|
|
4120
4120
|
return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(Ce, { defaultValue: ["item-2"], type: "multiple", children: [
|
|
4121
4121
|
/* @__PURE__ */ e.jsxs(H, { value: "item-1", children: [
|
|
4122
|
-
/* @__PURE__ */ e.jsx(B, { children: `${
|
|
4122
|
+
/* @__PURE__ */ e.jsx(B, { children: `${Is(s)} ${a}` }),
|
|
4123
4123
|
/* @__PURE__ */ e.jsx($, { children: t || /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
|
|
4124
4124
|
/* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT label, measure FROM table" }),
|
|
4125
4125
|
/* @__PURE__ */ e.jsxs("ul", { className: "ml-6 list-disc text-xs [&>li]:mt-2", children: [
|
|
@@ -4146,8 +4146,8 @@ function ss({
|
|
|
4146
4146
|
/* @__PURE__ */ e.jsx(B, { children: "Settings" }),
|
|
4147
4147
|
/* @__PURE__ */ e.jsxs($, { className: "space-y-4 px-2", children: [
|
|
4148
4148
|
s === "range" && /* @__PURE__ */ e.jsx(ds, {}),
|
|
4149
|
-
s !== "text" && /* @__PURE__ */ e.jsx(
|
|
4150
|
-
s === "text" && /* @__PURE__ */ e.jsx(
|
|
4149
|
+
s !== "text" && /* @__PURE__ */ e.jsx(_s, {}),
|
|
4150
|
+
s === "text" && /* @__PURE__ */ e.jsx(lr, {})
|
|
4151
4151
|
] })
|
|
4152
4152
|
] }),
|
|
4153
4153
|
!["range", "text"].includes(s) && /* @__PURE__ */ e.jsxs(H, { value: "item-3", children: [
|
|
@@ -4156,7 +4156,7 @@ function ss({
|
|
|
4156
4156
|
] })
|
|
4157
4157
|
] }) });
|
|
4158
4158
|
}
|
|
4159
|
-
function
|
|
4159
|
+
function ir() {
|
|
4160
4160
|
return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(Ce, { defaultValue: ["item-2"], type: "multiple", children: [
|
|
4161
4161
|
/* @__PURE__ */ e.jsxs(H, { value: "item-1", children: [
|
|
4162
4162
|
/* @__PURE__ */ e.jsx(B, { children: "Stacked Chart" }),
|
|
@@ -4187,7 +4187,7 @@ function lr() {
|
|
|
4187
4187
|
/* @__PURE__ */ e.jsx(B, { children: "Settings" }),
|
|
4188
4188
|
/* @__PURE__ */ e.jsxs($, { className: "space-y-4 px-2", children: [
|
|
4189
4189
|
/* @__PURE__ */ e.jsx(ds, {}),
|
|
4190
|
-
/* @__PURE__ */ e.jsx(
|
|
4190
|
+
/* @__PURE__ */ e.jsx(_a, {})
|
|
4191
4191
|
] })
|
|
4192
4192
|
] }),
|
|
4193
4193
|
/* @__PURE__ */ e.jsxs(H, { value: "item-3", children: [
|
|
@@ -4196,7 +4196,7 @@ function lr() {
|
|
|
4196
4196
|
] })
|
|
4197
4197
|
] }) });
|
|
4198
4198
|
}
|
|
4199
|
-
function
|
|
4199
|
+
function or({}) {
|
|
4200
4200
|
const s = c((n) => {
|
|
4201
4201
|
var r;
|
|
4202
4202
|
return (r = n.card) == null ? void 0 : r.preferences;
|
|
@@ -4226,7 +4226,7 @@ function ir({}) {
|
|
|
4226
4226
|
] })
|
|
4227
4227
|
] });
|
|
4228
4228
|
}
|
|
4229
|
-
const
|
|
4229
|
+
const cr = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
|
|
4230
4230
|
/* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT dimension, cohort, metric FROM table" }),
|
|
4231
4231
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
4232
4232
|
"See ",
|
|
@@ -4242,7 +4242,7 @@ const or = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-
|
|
|
4242
4242
|
),
|
|
4243
4243
|
" in the docs."
|
|
4244
4244
|
] })
|
|
4245
|
-
] }),
|
|
4245
|
+
] }), dr = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
|
|
4246
4246
|
/* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT y-axis, label, range-from, range-to, range-value FROM table" }),
|
|
4247
4247
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
4248
4248
|
"See ",
|
|
@@ -4258,7 +4258,7 @@ const or = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-
|
|
|
4258
4258
|
),
|
|
4259
4259
|
" in the docs."
|
|
4260
4260
|
] })
|
|
4261
|
-
] }),
|
|
4261
|
+
] }), hr = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
|
|
4262
4262
|
/* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT text FROM table limit 1" }),
|
|
4263
4263
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
4264
4264
|
"See ",
|
|
@@ -4275,22 +4275,22 @@ const or = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-
|
|
|
4275
4275
|
" in the docs."
|
|
4276
4276
|
] })
|
|
4277
4277
|
] });
|
|
4278
|
-
function
|
|
4278
|
+
function mr() {
|
|
4279
4279
|
const s = c((a) => a.card.type);
|
|
4280
4280
|
function t(a) {
|
|
4281
4281
|
switch (a) {
|
|
4282
4282
|
case "stackedBar":
|
|
4283
4283
|
case "stackedLine":
|
|
4284
|
-
return /* @__PURE__ */ e.jsx(
|
|
4284
|
+
return /* @__PURE__ */ e.jsx(ir, {});
|
|
4285
4285
|
case "pyramid":
|
|
4286
|
-
return /* @__PURE__ */ e.jsx(ss, { docContent:
|
|
4286
|
+
return /* @__PURE__ */ e.jsx(ss, { docContent: cr, cardType: a });
|
|
4287
4287
|
case "kpi":
|
|
4288
|
-
return /* @__PURE__ */ e.jsx(
|
|
4288
|
+
return /* @__PURE__ */ e.jsx(rr, {});
|
|
4289
4289
|
case "line":
|
|
4290
4290
|
case "bar":
|
|
4291
|
-
return /* @__PURE__ */ e.jsx(
|
|
4291
|
+
return /* @__PURE__ */ e.jsx(Zn, { cardType: a });
|
|
4292
4292
|
case "range":
|
|
4293
|
-
return /* @__PURE__ */ e.jsx(ss, { docContent:
|
|
4293
|
+
return /* @__PURE__ */ e.jsx(ss, { docContent: dr, cardType: a });
|
|
4294
4294
|
case "pie":
|
|
4295
4295
|
case "doughnut":
|
|
4296
4296
|
case "polarArea":
|
|
@@ -4298,28 +4298,28 @@ function hr() {
|
|
|
4298
4298
|
return /* @__PURE__ */ e.jsx(ss, { cardType: a });
|
|
4299
4299
|
case "bubble":
|
|
4300
4300
|
case "scatter":
|
|
4301
|
-
return /* @__PURE__ */ e.jsx(
|
|
4301
|
+
return /* @__PURE__ */ e.jsx(Xn, { cardType: a });
|
|
4302
4302
|
case "table":
|
|
4303
|
-
return /* @__PURE__ */ e.jsx(
|
|
4303
|
+
return /* @__PURE__ */ e.jsx(or, { cardType: a });
|
|
4304
4304
|
case "text":
|
|
4305
4305
|
return /* @__PURE__ */ e.jsx(
|
|
4306
4306
|
ss,
|
|
4307
4307
|
{
|
|
4308
|
-
docContent:
|
|
4308
|
+
docContent: hr,
|
|
4309
4309
|
cardType: a,
|
|
4310
4310
|
suffix: "Visual"
|
|
4311
4311
|
}
|
|
4312
4312
|
);
|
|
4313
4313
|
default:
|
|
4314
|
-
return /* @__PURE__ */ e.jsx(
|
|
4314
|
+
return /* @__PURE__ */ e.jsx(ar, {});
|
|
4315
4315
|
}
|
|
4316
4316
|
}
|
|
4317
|
-
return /* @__PURE__ */ e.jsx(
|
|
4317
|
+
return /* @__PURE__ */ e.jsx(As, { className: "h-full w-full text-sm", children: t(s) });
|
|
4318
4318
|
}
|
|
4319
|
-
function
|
|
4319
|
+
function ur() {
|
|
4320
4320
|
const s = c((t) => t.isShowingVisual);
|
|
4321
4321
|
return /* @__PURE__ */ e.jsxs(
|
|
4322
|
-
|
|
4322
|
+
vs,
|
|
4323
4323
|
{
|
|
4324
4324
|
direction: "vertical",
|
|
4325
4325
|
className: "min-h-[250px] min-w-full max-w-lg",
|
|
@@ -4331,10 +4331,10 @@ function mr() {
|
|
|
4331
4331
|
className: "flex",
|
|
4332
4332
|
minSize: 20,
|
|
4333
4333
|
defaultSize: 40,
|
|
4334
|
-
children: /* @__PURE__ */ e.jsx(
|
|
4334
|
+
children: /* @__PURE__ */ e.jsx($n, {})
|
|
4335
4335
|
}
|
|
4336
4336
|
),
|
|
4337
|
-
/* @__PURE__ */ e.jsx(
|
|
4337
|
+
/* @__PURE__ */ e.jsx(Ns, { withHandle: !0, className: "border" }),
|
|
4338
4338
|
/* @__PURE__ */ e.jsx(
|
|
4339
4339
|
Fe,
|
|
4340
4340
|
{
|
|
@@ -4342,7 +4342,7 @@ function mr() {
|
|
|
4342
4342
|
role: "visual-section",
|
|
4343
4343
|
minSize: 0,
|
|
4344
4344
|
defaultSize: 60,
|
|
4345
|
-
children: s ? /* @__PURE__ */ e.jsxs(
|
|
4345
|
+
children: s ? /* @__PURE__ */ e.jsxs(vs, { direction: "horizontal", children: [
|
|
4346
4346
|
/* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx(
|
|
4347
4347
|
Fe,
|
|
4348
4348
|
{
|
|
@@ -4350,30 +4350,30 @@ function mr() {
|
|
|
4350
4350
|
minSize: 20,
|
|
4351
4351
|
defaultSize: 25,
|
|
4352
4352
|
maxSize: 30,
|
|
4353
|
-
children: /* @__PURE__ */ e.jsx(
|
|
4353
|
+
children: /* @__PURE__ */ e.jsx(mr, {})
|
|
4354
4354
|
}
|
|
4355
4355
|
) }),
|
|
4356
|
-
/* @__PURE__ */ e.jsx(
|
|
4357
|
-
/* @__PURE__ */ e.jsx(Fe, { minSize: 40, defaultSize: 75, maxSize: 100, children: /* @__PURE__ */ e.jsx(
|
|
4358
|
-
] }) : /* @__PURE__ */ e.jsx(
|
|
4356
|
+
/* @__PURE__ */ e.jsx(Ns, { className: "border" }),
|
|
4357
|
+
/* @__PURE__ */ e.jsx(Fe, { minSize: 40, defaultSize: 75, maxSize: 100, children: /* @__PURE__ */ e.jsx(Xs, {}) })
|
|
4358
|
+
] }) : /* @__PURE__ */ e.jsx(Xs, {})
|
|
4359
4359
|
}
|
|
4360
4360
|
)
|
|
4361
4361
|
]
|
|
4362
4362
|
}
|
|
4363
4363
|
);
|
|
4364
4364
|
}
|
|
4365
|
-
function
|
|
4365
|
+
function xr({ authToken: s, onSave: t, onClose: a }) {
|
|
4366
4366
|
const n = c((u) => u.actions.setOnSave), r = c((u) => u.actions.setOnClose), m = w((u) => u.actions.setAuthToken);
|
|
4367
4367
|
return Q(() => {
|
|
4368
4368
|
t && n(t), a && r(a);
|
|
4369
4369
|
}, [t, n, a, r]), Q(() => {
|
|
4370
4370
|
s && s.accessToken && m(s);
|
|
4371
|
-
}, [s, m]), /* @__PURE__ */ e.jsxs(
|
|
4372
|
-
/* @__PURE__ */ e.jsx(
|
|
4373
|
-
/* @__PURE__ */ e.jsx(
|
|
4371
|
+
}, [s, m]), /* @__PURE__ */ e.jsxs(Bt, { className: "rounded-none", role: "editor-panel", children: [
|
|
4372
|
+
/* @__PURE__ */ e.jsx($t, { className: "rounded-none border-r-[1.5px]", children: /* @__PURE__ */ e.jsx(za, {}) }),
|
|
4373
|
+
/* @__PURE__ */ e.jsx(Pt, { children: /* @__PURE__ */ e.jsx(ur, {}) })
|
|
4374
4374
|
] });
|
|
4375
4375
|
}
|
|
4376
|
-
function
|
|
4376
|
+
function pr() {
|
|
4377
4377
|
w((u) => u.selectedCardId);
|
|
4378
4378
|
const s = w((u) => u.selectedSheetId), { setIsVisualEditing: t } = w((u) => u.actions), a = w((u) => u.isVisualEditing), n = w((u) => u.actions.updateFrame);
|
|
4379
4379
|
function r(u) {
|
|
@@ -4390,11 +4390,11 @@ function xr() {
|
|
|
4390
4390
|
block: a,
|
|
4391
4391
|
hidden: !a
|
|
4392
4392
|
}),
|
|
4393
|
-
children: /* @__PURE__ */ e.jsx(
|
|
4393
|
+
children: /* @__PURE__ */ e.jsx(xr, { onSave: r, onClose: m })
|
|
4394
4394
|
}
|
|
4395
4395
|
);
|
|
4396
4396
|
}
|
|
4397
|
-
function
|
|
4397
|
+
function fr({
|
|
4398
4398
|
columns: s,
|
|
4399
4399
|
tableName: t
|
|
4400
4400
|
}) {
|
|
@@ -4404,21 +4404,21 @@ function pr({
|
|
|
4404
4404
|
function b(i) {
|
|
4405
4405
|
var V;
|
|
4406
4406
|
const x = ue(i.column_name), h = ue(r || ""), S = ue(m || ""), j = ue(t);
|
|
4407
|
-
let
|
|
4407
|
+
let M = oa(
|
|
4408
4408
|
S,
|
|
4409
4409
|
j
|
|
4410
|
-
), y = `${
|
|
4410
|
+
), y = `${M}.${x}`;
|
|
4411
4411
|
const A = (V = g == null ? void 0 : g.find(
|
|
4412
|
-
(
|
|
4412
|
+
(D) => D.id === n
|
|
4413
4413
|
)) == null ? void 0 : V.name;
|
|
4414
|
-
n && n !== "none" && (y =
|
|
4414
|
+
n && n !== "none" && (y = `${bs}.${A}.${x}`, M = `${bs}.${A}`), console.log(
|
|
4415
4415
|
"find",
|
|
4416
4416
|
y,
|
|
4417
4417
|
j,
|
|
4418
4418
|
h
|
|
4419
4419
|
);
|
|
4420
4420
|
const E = d == null ? void 0 : d.find(
|
|
4421
|
-
(
|
|
4421
|
+
(D) => D.column === y && D.table === j && (D.database === h || D.database === r)
|
|
4422
4422
|
);
|
|
4423
4423
|
if (E)
|
|
4424
4424
|
p(E.id), f(E.id);
|
|
@@ -4434,9 +4434,9 @@ function pr({
|
|
|
4434
4434
|
// database: 'NA',
|
|
4435
4435
|
connectionId: a,
|
|
4436
4436
|
operation: "in",
|
|
4437
|
-
sql:
|
|
4437
|
+
sql: Ws(
|
|
4438
4438
|
i.data_type,
|
|
4439
|
-
|
|
4439
|
+
M,
|
|
4440
4440
|
x
|
|
4441
4441
|
)
|
|
4442
4442
|
//DATE_DATA_TYPES.includes(column.data_type) ? dateSql : sql,
|
|
@@ -4453,9 +4453,9 @@ function pr({
|
|
|
4453
4453
|
database: r || "",
|
|
4454
4454
|
connectionId: a || "",
|
|
4455
4455
|
operation: "in",
|
|
4456
|
-
sql:
|
|
4456
|
+
sql: Ws(
|
|
4457
4457
|
i.data_type,
|
|
4458
|
-
|
|
4458
|
+
M,
|
|
4459
4459
|
x
|
|
4460
4460
|
)
|
|
4461
4461
|
//DATE_DATA_TYPES.includes(column.data_type) ? dateSql : sql,
|
|
@@ -4477,7 +4477,7 @@ function pr({
|
|
|
4477
4477
|
}
|
|
4478
4478
|
),
|
|
4479
4479
|
children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
4480
|
-
/* @__PURE__ */ e.jsx(
|
|
4480
|
+
/* @__PURE__ */ e.jsx(wa, { column: i }),
|
|
4481
4481
|
/* @__PURE__ */ e.jsx("span", { children: i.column_name })
|
|
4482
4482
|
] })
|
|
4483
4483
|
},
|
|
@@ -4485,7 +4485,7 @@ function pr({
|
|
|
4485
4485
|
);
|
|
4486
4486
|
}) });
|
|
4487
4487
|
}
|
|
4488
|
-
function
|
|
4488
|
+
function gr() {
|
|
4489
4489
|
w((t) => t.showFilters);
|
|
4490
4490
|
const s = w(
|
|
4491
4491
|
(t) => t.actions.setShowFilters
|
|
@@ -4504,10 +4504,10 @@ function fr() {
|
|
|
4504
4504
|
)
|
|
4505
4505
|
] }),
|
|
4506
4506
|
/* @__PURE__ */ e.jsx("div", { className: "flex grow", children: /* @__PURE__ */ e.jsx(
|
|
4507
|
-
|
|
4507
|
+
za,
|
|
4508
4508
|
{
|
|
4509
4509
|
ColumnsComponent: (t, a, n) => /* @__PURE__ */ e.jsx(
|
|
4510
|
-
|
|
4510
|
+
fr,
|
|
4511
4511
|
{
|
|
4512
4512
|
schemaName: t,
|
|
4513
4513
|
tableName: a,
|
|
@@ -4518,7 +4518,7 @@ function fr() {
|
|
|
4518
4518
|
) })
|
|
4519
4519
|
] });
|
|
4520
4520
|
}
|
|
4521
|
-
function
|
|
4521
|
+
function jr() {
|
|
4522
4522
|
w((a) => a.dashboard);
|
|
4523
4523
|
const s = w((a) => a.showFilters), t = w((a) => a.isVisualEditing);
|
|
4524
4524
|
return w((a) => a.bookmarkKey), /* @__PURE__ */ e.jsxs(
|
|
@@ -4530,13 +4530,13 @@ function gr() {
|
|
|
4530
4530
|
flex: !t
|
|
4531
4531
|
}),
|
|
4532
4532
|
children: [
|
|
4533
|
-
/* @__PURE__ */ e.jsx(
|
|
4534
|
-
s && /* @__PURE__ */ e.jsx("div", { role: "filter-aside-container", className: "flex", children: /* @__PURE__ */ e.jsx(
|
|
4533
|
+
/* @__PURE__ */ e.jsx(Kt, {}),
|
|
4534
|
+
s && /* @__PURE__ */ e.jsx("div", { role: "filter-aside-container", className: "flex", children: /* @__PURE__ */ e.jsx(gr, {}) })
|
|
4535
4535
|
]
|
|
4536
4536
|
}
|
|
4537
4537
|
);
|
|
4538
4538
|
}
|
|
4539
|
-
function
|
|
4539
|
+
function br() {
|
|
4540
4540
|
const s = w((n) => n.dashboard), t = w((n) => n.actions.setDashboard), a = w(
|
|
4541
4541
|
(n) => n.showDashboardJSON
|
|
4542
4542
|
);
|
|
@@ -4549,7 +4549,7 @@ function jr() {
|
|
|
4549
4549
|
hidden: !a
|
|
4550
4550
|
}),
|
|
4551
4551
|
children: /* @__PURE__ */ e.jsx(
|
|
4552
|
-
|
|
4552
|
+
Gt,
|
|
4553
4553
|
{
|
|
4554
4554
|
onChange: (n) => {
|
|
4555
4555
|
if (n)
|
|
@@ -4580,25 +4580,25 @@ function jr() {
|
|
|
4580
4580
|
}
|
|
4581
4581
|
);
|
|
4582
4582
|
}
|
|
4583
|
-
function
|
|
4583
|
+
function Nr({
|
|
4584
4584
|
showControls: s = !1,
|
|
4585
4585
|
showFooter: t = !0,
|
|
4586
4586
|
...a
|
|
4587
4587
|
}) {
|
|
4588
|
-
return /* @__PURE__ */ e.jsxs(
|
|
4589
|
-
/* @__PURE__ */ e.jsx(
|
|
4590
|
-
/* @__PURE__ */ e.jsxs(
|
|
4591
|
-
/* @__PURE__ */ e.jsx(
|
|
4592
|
-
/* @__PURE__ */ e.jsxs(
|
|
4593
|
-
s && /* @__PURE__ */ e.jsx(
|
|
4594
|
-
/* @__PURE__ */ e.jsx(
|
|
4595
|
-
/* @__PURE__ */ e.jsx(
|
|
4588
|
+
return /* @__PURE__ */ e.jsxs(Jt, { dashboardProps: a, children: [
|
|
4589
|
+
/* @__PURE__ */ e.jsx(Ut, {}),
|
|
4590
|
+
/* @__PURE__ */ e.jsxs(Qt, { children: [
|
|
4591
|
+
/* @__PURE__ */ e.jsx(br, {}),
|
|
4592
|
+
/* @__PURE__ */ e.jsxs(Wt, { ...a, children: [
|
|
4593
|
+
s && /* @__PURE__ */ e.jsx(kn, {}),
|
|
4594
|
+
/* @__PURE__ */ e.jsx(pr, {}),
|
|
4595
|
+
/* @__PURE__ */ e.jsx(jr, {})
|
|
4596
4596
|
] })
|
|
4597
4597
|
] })
|
|
4598
4598
|
] });
|
|
4599
4599
|
}
|
|
4600
4600
|
export {
|
|
4601
|
-
|
|
4601
|
+
Nr as D,
|
|
4602
4602
|
Je as L,
|
|
4603
4603
|
_e as S,
|
|
4604
4604
|
cs as u
|