semaphor 0.0.60 → 0.0.61
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-eNV9YPaz.js → dashboard-plus-clQZKAkW.js} +838 -820
- package/dist/chunks/{dashboard-plus-m87TONy0.js → dashboard-plus-i2f2gNsr.js} +34 -34
- package/dist/chunks/{index-RE3C9jay.js → index-09gssWkM.js} +67 -67
- package/dist/chunks/{index-apw3sbi1.js → index-IpD-EtCy.js} +4822 -4819
- 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,13 +1,13 @@
|
|
|
1
|
-
import { O as D, b as k, j as e, P as
|
|
2
|
-
import * as
|
|
3
|
-
import xe, { useState as M, useEffect as U, useMemo as
|
|
1
|
+
import { O as D, b as k, j as e, P as ks, Q as ws, R as w, U as zs, V as Fs, W as Os, X as Ms, Y as Ts, Z as R, _ as he, $ as ia, J as oa, M as Ae, a0 as Wa, a1 as Ya, a2 as Za, a3 as Xa, a4 as et, a5 as st, a6 as Us, a7 as Pe, a8 as Qe, a9 as ca, aa as rs, T as Ds, e as da, g as As, ab as Oe, ac as Me, f as Y, ad as Te, ae as De, af as Ke, ag as Le, ah as ee, ai as Ls, G as c, aj as Es, ak as Is, al as Vs, w as ha, v as ma, t as ue, am as at, r as tt, N as ua, s as nt, an as lt, B as rt, ao as xa, ap as it, S as qs, z as ot, n as Qs, aq as ys, A as pa, ar as vs, u as We, as as me, at as be, au as Ge, av as fa, aw as ga, ax as ct, ay as dt, az as ja, aA as ht, aB as mt, aC as ut, aD as xt, aE as pt, aF as Ns, aG as ft, aH as $e, aI as Cs, aJ as Fe, aK as Ss, aL as Ws, aM as gt, aN as jt, aO as bt, aP as yt, aQ as vt, aR as bs, aS as Nt, aT as Ys, aU as Ct, aV as Zs, aW as St, aX as kt, aY as wt, c as zt, aZ as ba, l as Ft, C as Ot, E as ts, d as Mt, h as Tt, a_ as Dt, i as At, o as Lt, a$ as Et, m as It, H as Rs, b0 as Vt, b1 as ya, b2 as va, b3 as ns, b4 as Na, b5 as ls, b6 as Xs, b7 as cs, b8 as ds, b9 as hs, K as qt, ba as Rt, bb as _t, bc as Ca, bd as _s, be as Ee, bf as Sa, bg as Ht, bh as Bt, bi as $t, bj as Pt, bk as Kt, bl as ea, bm as Gt, bn as Jt, bo as Ut, bp as Qt, bq as Wt, br as Yt, bs as Zt, bt as Xt, bu as Ce, bv as B, bw as $, bx as Hs, by as P, bz as sa, bA as en, bB as sn, bC as an, bD as tn, bE as nn, bF as ln, bG as rn, bH as on, bI as cn, bJ as dn } from "./index-IpD-EtCy.js";
|
|
2
|
+
import * as aa from "react";
|
|
3
|
+
import xe, { useState as M, useEffect as U, useMemo as hn, useRef as Je } from "react";
|
|
4
4
|
/**
|
|
5
5
|
* @license lucide-react v0.379.0 - ISC
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the ISC license.
|
|
8
8
|
* See the LICENSE file in the root directory of this source tree.
|
|
9
9
|
*/
|
|
10
|
-
const
|
|
10
|
+
const mn = D("AreaChart", [
|
|
11
11
|
["path", { d: "M3 3v18h18", key: "1s2lah" }],
|
|
12
12
|
["path", { d: "M7 12v5h12V8l-5 5-4-4Z", key: "zxz28u" }]
|
|
13
13
|
]);
|
|
@@ -17,7 +17,7 @@ const hn = D("AreaChart", [
|
|
|
17
17
|
* This source code is licensed under the ISC license.
|
|
18
18
|
* See the LICENSE file in the root directory of this source tree.
|
|
19
19
|
*/
|
|
20
|
-
const
|
|
20
|
+
const Bs = D("BarChart4", [
|
|
21
21
|
["path", { d: "M3 3v18h18", key: "1s2lah" }],
|
|
22
22
|
["path", { d: "M13 17V9", key: "1fwyjl" }],
|
|
23
23
|
["path", { d: "M18 17V5", key: "sfb6ij" }],
|
|
@@ -29,7 +29,7 @@ const Hs = D("BarChart4", [
|
|
|
29
29
|
* This source code is licensed under the ISC license.
|
|
30
30
|
* See the LICENSE file in the root directory of this source tree.
|
|
31
31
|
*/
|
|
32
|
-
const
|
|
32
|
+
const un = D("Box", [
|
|
33
33
|
[
|
|
34
34
|
"path",
|
|
35
35
|
{
|
|
@@ -46,7 +46,7 @@ const mn = D("Box", [
|
|
|
46
46
|
* This source code is licensed under the ISC license.
|
|
47
47
|
* See the LICENSE file in the root directory of this source tree.
|
|
48
48
|
*/
|
|
49
|
-
const
|
|
49
|
+
const xn = D("CircleX", [
|
|
50
50
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
51
51
|
["path", { d: "m15 9-6 6", key: "1uzhvr" }],
|
|
52
52
|
["path", { d: "m9 9 6 6", key: "z0biqf" }]
|
|
@@ -57,7 +57,7 @@ const un = D("CircleX", [
|
|
|
57
57
|
* This source code is licensed under the ISC license.
|
|
58
58
|
* See the LICENSE file in the root directory of this source tree.
|
|
59
59
|
*/
|
|
60
|
-
const
|
|
60
|
+
const pn = D("Database", [
|
|
61
61
|
["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3", key: "msslwz" }],
|
|
62
62
|
["path", { d: "M3 5V19A9 3 0 0 0 21 19V5", key: "1wlel7" }],
|
|
63
63
|
["path", { d: "M3 12A9 3 0 0 0 21 12", key: "mv7ke4" }]
|
|
@@ -68,7 +68,7 @@ const xn = D("Database", [
|
|
|
68
68
|
* This source code is licensed under the ISC license.
|
|
69
69
|
* See the LICENSE file in the root directory of this source tree.
|
|
70
70
|
*/
|
|
71
|
-
const
|
|
71
|
+
const ka = D("EllipsisVertical", [
|
|
72
72
|
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
|
|
73
73
|
["circle", { cx: "12", cy: "5", r: "1", key: "gxeob9" }],
|
|
74
74
|
["circle", { cx: "12", cy: "19", r: "1", key: "lyex9k" }]
|
|
@@ -79,7 +79,7 @@ const Sa = D("EllipsisVertical", [
|
|
|
79
79
|
* This source code is licensed under the ISC license.
|
|
80
80
|
* See the LICENSE file in the root directory of this source tree.
|
|
81
81
|
*/
|
|
82
|
-
const
|
|
82
|
+
const fn = D("Eraser", [
|
|
83
83
|
[
|
|
84
84
|
"path",
|
|
85
85
|
{
|
|
@@ -96,7 +96,7 @@ const pn = D("Eraser", [
|
|
|
96
96
|
* This source code is licensed under the ISC license.
|
|
97
97
|
* See the LICENSE file in the root directory of this source tree.
|
|
98
98
|
*/
|
|
99
|
-
const
|
|
99
|
+
const wa = D("GanttChart", [
|
|
100
100
|
["path", { d: "M8 6h10", key: "9lnwnk" }],
|
|
101
101
|
["path", { d: "M6 12h9", key: "1g9pqf" }],
|
|
102
102
|
["path", { d: "M11 18h7", key: "c8dzvl" }]
|
|
@@ -107,7 +107,7 @@ const ka = D("GanttChart", [
|
|
|
107
107
|
* This source code is licensed under the ISC license.
|
|
108
108
|
* See the LICENSE file in the root directory of this source tree.
|
|
109
109
|
*/
|
|
110
|
-
const
|
|
110
|
+
const gn = D("Glasses", [
|
|
111
111
|
["circle", { cx: "6", cy: "15", r: "4", key: "vux9w4" }],
|
|
112
112
|
["circle", { cx: "18", cy: "15", r: "4", key: "18o8ve" }],
|
|
113
113
|
["path", { d: "M14 15a2 2 0 0 0-2-2 2 2 0 0 0-2 2", key: "1ag4bs" }],
|
|
@@ -120,7 +120,7 @@ const fn = D("Glasses", [
|
|
|
120
120
|
* This source code is licensed under the ISC license.
|
|
121
121
|
* See the LICENSE file in the root directory of this source tree.
|
|
122
122
|
*/
|
|
123
|
-
const
|
|
123
|
+
const jn = D("Hammer", [
|
|
124
124
|
["path", { d: "m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9", key: "eefl8a" }],
|
|
125
125
|
["path", { d: "m18 15 4-4", key: "16gjal" }],
|
|
126
126
|
[
|
|
@@ -137,7 +137,7 @@ const gn = D("Hammer", [
|
|
|
137
137
|
* This source code is licensed under the ISC license.
|
|
138
138
|
* See the LICENSE file in the root directory of this source tree.
|
|
139
139
|
*/
|
|
140
|
-
const
|
|
140
|
+
const bn = D("Hash", [
|
|
141
141
|
["line", { x1: "4", x2: "20", y1: "9", y2: "9", key: "4lhtct" }],
|
|
142
142
|
["line", { x1: "4", x2: "20", y1: "15", y2: "15", key: "vyu0kd" }],
|
|
143
143
|
["line", { x1: "10", x2: "8", y1: "3", y2: "21", key: "1ggp8o" }],
|
|
@@ -149,7 +149,7 @@ const jn = D("Hash", [
|
|
|
149
149
|
* This source code is licensed under the ISC license.
|
|
150
150
|
* See the LICENSE file in the root directory of this source tree.
|
|
151
151
|
*/
|
|
152
|
-
const
|
|
152
|
+
const yn = D("Key", [
|
|
153
153
|
["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" }],
|
|
154
154
|
["path", { d: "m21 2-9.6 9.6", key: "1j0ho8" }],
|
|
155
155
|
["circle", { cx: "7.5", cy: "15.5", r: "5.5", key: "yqb3hr" }]
|
|
@@ -160,7 +160,7 @@ const bn = D("Key", [
|
|
|
160
160
|
* This source code is licensed under the ISC license.
|
|
161
161
|
* See the LICENSE file in the root directory of this source tree.
|
|
162
162
|
*/
|
|
163
|
-
const
|
|
163
|
+
const $s = D("LineChart", [
|
|
164
164
|
["path", { d: "M3 3v18h18", key: "1s2lah" }],
|
|
165
165
|
["path", { d: "m19 9-5 5-4-4-3 3", key: "2osh9i" }]
|
|
166
166
|
]);
|
|
@@ -170,7 +170,7 @@ const Bs = D("LineChart", [
|
|
|
170
170
|
* This source code is licensed under the ISC license.
|
|
171
171
|
* See the LICENSE file in the root directory of this source tree.
|
|
172
172
|
*/
|
|
173
|
-
const
|
|
173
|
+
const vn = D("ListEnd", [
|
|
174
174
|
["path", { d: "M16 12H3", key: "1a2rj7" }],
|
|
175
175
|
["path", { d: "M16 6H3", key: "1wxfjs" }],
|
|
176
176
|
["path", { d: "M10 18H3", key: "13769t" }],
|
|
@@ -183,7 +183,7 @@ const yn = D("ListEnd", [
|
|
|
183
183
|
* This source code is licensed under the ISC license.
|
|
184
184
|
* See the LICENSE file in the root directory of this source tree.
|
|
185
185
|
*/
|
|
186
|
-
const
|
|
186
|
+
const Nn = D("ListStart", [
|
|
187
187
|
["path", { d: "M16 12H3", key: "1a2rj7" }],
|
|
188
188
|
["path", { d: "M16 18H3", key: "12xzn7" }],
|
|
189
189
|
["path", { d: "M10 6H3", key: "lf8lx7" }],
|
|
@@ -196,7 +196,7 @@ const vn = D("ListStart", [
|
|
|
196
196
|
* This source code is licensed under the ISC license.
|
|
197
197
|
* See the LICENSE file in the root directory of this source tree.
|
|
198
198
|
*/
|
|
199
|
-
const
|
|
199
|
+
const Cn = D("ListX", [
|
|
200
200
|
["path", { d: "M11 12H3", key: "51ecnj" }],
|
|
201
201
|
["path", { d: "M16 6H3", key: "1wxfjs" }],
|
|
202
202
|
["path", { d: "M16 18H3", key: "12xzn7" }],
|
|
@@ -209,7 +209,7 @@ const Nn = D("ListX", [
|
|
|
209
209
|
* This source code is licensed under the ISC license.
|
|
210
210
|
* See the LICENSE file in the root directory of this source tree.
|
|
211
211
|
*/
|
|
212
|
-
const
|
|
212
|
+
const Ue = D("LoaderCircle", [
|
|
213
213
|
["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]
|
|
214
214
|
]);
|
|
215
215
|
/**
|
|
@@ -218,7 +218,7 @@ const Je = D("LoaderCircle", [
|
|
|
218
218
|
* This source code is licensed under the ISC license.
|
|
219
219
|
* See the LICENSE file in the root directory of this source tree.
|
|
220
220
|
*/
|
|
221
|
-
const
|
|
221
|
+
const Sn = D("MessageSquareMore", [
|
|
222
222
|
["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" }],
|
|
223
223
|
["path", { d: "M8 10h.01", key: "19clt8" }],
|
|
224
224
|
["path", { d: "M12 10h.01", key: "1nrarc" }],
|
|
@@ -230,7 +230,7 @@ const Cn = D("MessageSquareMore", [
|
|
|
230
230
|
* This source code is licensed under the ISC license.
|
|
231
231
|
* See the LICENSE file in the root directory of this source tree.
|
|
232
232
|
*/
|
|
233
|
-
const
|
|
233
|
+
const kn = D("Network", [
|
|
234
234
|
["rect", { x: "16", y: "16", width: "6", height: "6", rx: "1", key: "4q2zg0" }],
|
|
235
235
|
["rect", { x: "2", y: "16", width: "6", height: "6", rx: "1", key: "8cvhb9" }],
|
|
236
236
|
["rect", { x: "9", y: "2", width: "6", height: "6", rx: "1", key: "1egb70" }],
|
|
@@ -243,7 +243,7 @@ const Sn = D("Network", [
|
|
|
243
243
|
* This source code is licensed under the ISC license.
|
|
244
244
|
* See the LICENSE file in the root directory of this source tree.
|
|
245
245
|
*/
|
|
246
|
-
const
|
|
246
|
+
const za = D("Pencil", [
|
|
247
247
|
["path", { d: "M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z", key: "5qss01" }],
|
|
248
248
|
["path", { d: "m15 5 4 4", key: "1mk7zo" }]
|
|
249
249
|
]);
|
|
@@ -253,7 +253,7 @@ const wa = D("Pencil", [
|
|
|
253
253
|
* This source code is licensed under the ISC license.
|
|
254
254
|
* See the LICENSE file in the root directory of this source tree.
|
|
255
255
|
*/
|
|
256
|
-
const
|
|
256
|
+
const Fa = D("PieChart", [
|
|
257
257
|
["path", { d: "M21.21 15.89A10 10 0 1 1 8 2.83", key: "k2fpak" }],
|
|
258
258
|
["path", { d: "M22 12A10 10 0 0 0 12 2v10z", key: "1rfc4y" }]
|
|
259
259
|
]);
|
|
@@ -263,7 +263,7 @@ const za = D("PieChart", [
|
|
|
263
263
|
* This source code is licensed under the ISC license.
|
|
264
264
|
* See the LICENSE file in the root directory of this source tree.
|
|
265
265
|
*/
|
|
266
|
-
const
|
|
266
|
+
const wn = D("Play", [
|
|
267
267
|
["polygon", { points: "6 3 20 12 6 21 6 3", key: "1oa8hb" }]
|
|
268
268
|
]);
|
|
269
269
|
/**
|
|
@@ -272,7 +272,7 @@ const kn = D("Play", [
|
|
|
272
272
|
* This source code is licensed under the ISC license.
|
|
273
273
|
* See the LICENSE file in the root directory of this source tree.
|
|
274
274
|
*/
|
|
275
|
-
const
|
|
275
|
+
const zn = D("Plug2", [
|
|
276
276
|
["path", { d: "M9 2v6", key: "17ngun" }],
|
|
277
277
|
["path", { d: "M15 2v6", key: "s7yy2p" }],
|
|
278
278
|
["path", { d: "M12 17v5", key: "bb1du9" }],
|
|
@@ -285,7 +285,7 @@ const wn = D("Plug2", [
|
|
|
285
285
|
* This source code is licensed under the ISC license.
|
|
286
286
|
* See the LICENSE file in the root directory of this source tree.
|
|
287
287
|
*/
|
|
288
|
-
const
|
|
288
|
+
const Fn = D("Save", [
|
|
289
289
|
[
|
|
290
290
|
"path",
|
|
291
291
|
{
|
|
@@ -302,7 +302,7 @@ const zn = D("Save", [
|
|
|
302
302
|
* This source code is licensed under the ISC license.
|
|
303
303
|
* See the LICENSE file in the root directory of this source tree.
|
|
304
304
|
*/
|
|
305
|
-
const
|
|
305
|
+
const Oa = D("ScatterChart", [
|
|
306
306
|
["circle", { cx: "7.5", cy: "7.5", r: ".5", fill: "currentColor", key: "kqv944" }],
|
|
307
307
|
["circle", { cx: "18.5", cy: "5.5", r: ".5", fill: "currentColor", key: "lysivs" }],
|
|
308
308
|
["circle", { cx: "11.5", cy: "11.5", r: ".5", fill: "currentColor", key: "byv1b8" }],
|
|
@@ -316,7 +316,7 @@ const Fa = D("ScatterChart", [
|
|
|
316
316
|
* This source code is licensed under the ISC license.
|
|
317
317
|
* See the LICENSE file in the root directory of this source tree.
|
|
318
318
|
*/
|
|
319
|
-
const
|
|
319
|
+
const On = D("ShieldQuestion", [
|
|
320
320
|
[
|
|
321
321
|
"path",
|
|
322
322
|
{
|
|
@@ -333,7 +333,7 @@ const Fn = D("ShieldQuestion", [
|
|
|
333
333
|
* This source code is licensed under the ISC license.
|
|
334
334
|
* See the LICENSE file in the root directory of this source tree.
|
|
335
335
|
*/
|
|
336
|
-
const
|
|
336
|
+
const Mn = D("Sigma", [
|
|
337
337
|
["path", { d: "M18 7V4H6l6 8-6 8h12v-3", key: "zis8ev" }]
|
|
338
338
|
]);
|
|
339
339
|
/**
|
|
@@ -342,7 +342,7 @@ const On = D("Sigma", [
|
|
|
342
342
|
* This source code is licensed under the ISC license.
|
|
343
343
|
* See the LICENSE file in the root directory of this source tree.
|
|
344
344
|
*/
|
|
345
|
-
const
|
|
345
|
+
const Tn = D("SwatchBook", [
|
|
346
346
|
["path", { d: "M11 17a4 4 0 0 1-8 0V5a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2Z", key: "1ldrpk" }],
|
|
347
347
|
["path", { d: "M16.7 13H19a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2H7", key: "11i5po" }],
|
|
348
348
|
["path", { d: "M 7 17h0.01", key: "10821z" }],
|
|
@@ -360,7 +360,7 @@ const Mn = D("SwatchBook", [
|
|
|
360
360
|
* This source code is licensed under the ISC license.
|
|
361
361
|
* See the LICENSE file in the root directory of this source tree.
|
|
362
362
|
*/
|
|
363
|
-
const
|
|
363
|
+
const Dn = D("Tag", [
|
|
364
364
|
[
|
|
365
365
|
"path",
|
|
366
366
|
{
|
|
@@ -376,7 +376,7 @@ const Tn = D("Tag", [
|
|
|
376
376
|
* This source code is licensed under the ISC license.
|
|
377
377
|
* See the LICENSE file in the root directory of this source tree.
|
|
378
378
|
*/
|
|
379
|
-
const
|
|
379
|
+
const An = D("ToggleLeft", [
|
|
380
380
|
["rect", { width: "20", height: "12", x: "2", y: "6", rx: "6", ry: "6", key: "f2vt7d" }],
|
|
381
381
|
["circle", { cx: "8", cy: "12", r: "2", key: "1nvbw3" }]
|
|
382
382
|
]);
|
|
@@ -386,7 +386,7 @@ const Dn = D("ToggleLeft", [
|
|
|
386
386
|
* This source code is licensed under the ISC license.
|
|
387
387
|
* See the LICENSE file in the root directory of this source tree.
|
|
388
388
|
*/
|
|
389
|
-
const
|
|
389
|
+
const Ps = D("Type", [
|
|
390
390
|
["polyline", { points: "4 7 4 4 20 4 20 7", key: "1nosan" }],
|
|
391
391
|
["line", { x1: "9", x2: "15", y1: "20", y2: "20", key: "swin9y" }],
|
|
392
392
|
["line", { x1: "12", x2: "12", y1: "4", y2: "20", key: "1tx1rr" }]
|
|
@@ -397,14 +397,14 @@ const $s = D("Type", [
|
|
|
397
397
|
* This source code is licensed under the ISC license.
|
|
398
398
|
* See the LICENSE file in the root directory of this source tree.
|
|
399
399
|
*/
|
|
400
|
-
const
|
|
400
|
+
const Ln = D("User", [
|
|
401
401
|
["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
|
|
402
402
|
["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
|
|
403
403
|
]);
|
|
404
|
-
function
|
|
405
|
-
const [s, t] = M(""), [a, n] = M(!1), [
|
|
404
|
+
function En() {
|
|
405
|
+
const [s, t] = M(""), [a, n] = M(!1), [l, m] = M(!1), i = k((d) => d.dashboard);
|
|
406
406
|
function o() {
|
|
407
|
-
const d =
|
|
407
|
+
const d = oa(i), p = Ae(i.id), x = JSON.parse(localStorage.getItem(p) || "[]");
|
|
408
408
|
if (x.some(
|
|
409
409
|
(g) => g.name === s
|
|
410
410
|
)) {
|
|
@@ -416,26 +416,26 @@ function Ln() {
|
|
|
416
416
|
template: d
|
|
417
417
|
}), localStorage.setItem(p, JSON.stringify(x)), m(!1);
|
|
418
418
|
}
|
|
419
|
-
return /* @__PURE__ */ e.jsxs(
|
|
420
|
-
/* @__PURE__ */ e.jsx(
|
|
419
|
+
return /* @__PURE__ */ e.jsxs(ks, { open: l, onOpenChange: m, children: [
|
|
420
|
+
/* @__PURE__ */ e.jsx(ws, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
421
421
|
w,
|
|
422
422
|
{
|
|
423
423
|
variant: "outline",
|
|
424
424
|
className: "h-7 p-2",
|
|
425
425
|
size: "sm",
|
|
426
426
|
children: [
|
|
427
|
-
/* @__PURE__ */ e.jsx(
|
|
427
|
+
/* @__PURE__ */ e.jsx(zs, { className: " mr-2 h-4 w-4", strokeWidth: 1.5 }),
|
|
428
428
|
"Add Lens"
|
|
429
429
|
]
|
|
430
430
|
}
|
|
431
431
|
) }),
|
|
432
|
-
/* @__PURE__ */ e.jsxs(
|
|
433
|
-
/* @__PURE__ */ e.jsxs(
|
|
434
|
-
/* @__PURE__ */ e.jsx(
|
|
435
|
-
/* @__PURE__ */ e.jsx(
|
|
432
|
+
/* @__PURE__ */ e.jsxs(Fs, { className: "sm:max-w-[425px]", children: [
|
|
433
|
+
/* @__PURE__ */ e.jsxs(Os, { children: [
|
|
434
|
+
/* @__PURE__ */ e.jsx(Ms, { children: "Add a Lens" }),
|
|
435
|
+
/* @__PURE__ */ e.jsx(Ts, { children: "Lenses are private by default and are only visible to you." })
|
|
436
436
|
] }),
|
|
437
437
|
/* @__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: [
|
|
438
|
-
/* @__PURE__ */ e.jsx(
|
|
438
|
+
/* @__PURE__ */ e.jsx(R, { className: "text-right", children: "Name" }),
|
|
439
439
|
/* @__PURE__ */ e.jsx(
|
|
440
440
|
he,
|
|
441
441
|
{
|
|
@@ -449,7 +449,7 @@ function Ln() {
|
|
|
449
449
|
)
|
|
450
450
|
] }) }),
|
|
451
451
|
a && /* @__PURE__ */ e.jsx("p", { className: "text-sm", children: "The bookmark name already exists. Use a differnet name." }),
|
|
452
|
-
/* @__PURE__ */ e.jsx(
|
|
452
|
+
/* @__PURE__ */ e.jsx(ia, { children: /* @__PURE__ */ e.jsx(
|
|
453
453
|
w,
|
|
454
454
|
{
|
|
455
455
|
variant: "outline",
|
|
@@ -462,20 +462,20 @@ function Ln() {
|
|
|
462
462
|
] })
|
|
463
463
|
] });
|
|
464
464
|
}
|
|
465
|
-
function
|
|
466
|
-
const [s, t] = M(!1), [a, n] = M(""),
|
|
465
|
+
function In() {
|
|
466
|
+
const [s, t] = M(!1), [a, n] = M(""), l = k((h) => h.dashboard), m = k((h) => h.bookmarkKey), [i, o] = M([]), d = k((h) => h.actions.setDashboard), p = k(
|
|
467
467
|
(h) => h.actions.setFilterValues
|
|
468
468
|
), x = k(
|
|
469
469
|
(h) => h.actions.setBookmarkKey
|
|
470
470
|
);
|
|
471
471
|
U(() => {
|
|
472
|
-
const h = Ae(
|
|
472
|
+
const h = Ae(l.id), u = JSON.parse(localStorage.getItem(h) || "[]");
|
|
473
473
|
o(u);
|
|
474
474
|
const j = u.find(
|
|
475
475
|
(f) => f.default
|
|
476
476
|
);
|
|
477
477
|
j && j.name === m && n(j.name);
|
|
478
|
-
}, [s,
|
|
478
|
+
}, [s, l, m]);
|
|
479
479
|
function b(h) {
|
|
480
480
|
if (h === a)
|
|
481
481
|
return;
|
|
@@ -483,25 +483,25 @@ function En() {
|
|
|
483
483
|
j && (d(j), p(u.filterValues || []), x(h === "Original" ? "" : h)), n(h);
|
|
484
484
|
}
|
|
485
485
|
function g(h) {
|
|
486
|
-
const u = Ae(
|
|
486
|
+
const u = Ae(l.id), f = JSON.parse(localStorage.getItem(u) || "[]").filter(
|
|
487
487
|
(v) => v.name !== h
|
|
488
488
|
);
|
|
489
489
|
localStorage.setItem(u, JSON.stringify(f)), o(f);
|
|
490
490
|
}
|
|
491
|
-
return /* @__PURE__ */ e.jsxs(
|
|
492
|
-
/* @__PURE__ */ e.jsx(
|
|
493
|
-
/* @__PURE__ */ e.jsxs(
|
|
494
|
-
/* @__PURE__ */ e.jsx(
|
|
495
|
-
/* @__PURE__ */ e.jsx(
|
|
491
|
+
return /* @__PURE__ */ e.jsxs(Wa, { open: s, onOpenChange: t, children: [
|
|
492
|
+
/* @__PURE__ */ e.jsx(Ya, { asChild: !0, children: /* @__PURE__ */ e.jsx(w, { variant: "outline", className: "h-7 p-2", children: /* @__PURE__ */ e.jsx(gn, { className: "h-4 w-4", strokeWidth: 1.5 }) }) }),
|
|
493
|
+
/* @__PURE__ */ e.jsxs(Za, { className: "w-56", children: [
|
|
494
|
+
/* @__PURE__ */ e.jsx(Xa, { children: "Lenses" }),
|
|
495
|
+
/* @__PURE__ */ e.jsx(et, {}),
|
|
496
496
|
/* @__PURE__ */ e.jsxs(
|
|
497
|
-
|
|
497
|
+
st,
|
|
498
498
|
{
|
|
499
499
|
value: a,
|
|
500
500
|
onValueChange: b,
|
|
501
501
|
children: [
|
|
502
|
-
/* @__PURE__ */ e.jsx(
|
|
502
|
+
/* @__PURE__ */ e.jsx(Us, { value: "Original", children: "Original" }),
|
|
503
503
|
i.filter((h) => h.name != "Original").map((h, u) => /* @__PURE__ */ e.jsxs(
|
|
504
|
-
|
|
504
|
+
Us,
|
|
505
505
|
{
|
|
506
506
|
className: "xbg-red-100 flex justify-between",
|
|
507
507
|
value: h.name,
|
|
@@ -509,7 +509,7 @@ function En() {
|
|
|
509
509
|
children: [
|
|
510
510
|
/* @__PURE__ */ e.jsx("p", { children: h.name }),
|
|
511
511
|
/* @__PURE__ */ e.jsx(
|
|
512
|
-
|
|
512
|
+
Pe,
|
|
513
513
|
{
|
|
514
514
|
onClick: (j) => {
|
|
515
515
|
j.preventDefault(), g(h.name);
|
|
@@ -528,7 +528,7 @@ function En() {
|
|
|
528
528
|
] })
|
|
529
529
|
] });
|
|
530
530
|
}
|
|
531
|
-
function
|
|
531
|
+
function Vn() {
|
|
532
532
|
const [s, t] = M(!1), a = k((m) => m.dashboard), n = k((m) => m.bookmarkKey);
|
|
533
533
|
U(() => {
|
|
534
534
|
if (!n) {
|
|
@@ -542,7 +542,7 @@ function In() {
|
|
|
542
542
|
);
|
|
543
543
|
t(o ? o.default : !1);
|
|
544
544
|
}, [n, a.id]);
|
|
545
|
-
function
|
|
545
|
+
function l(m) {
|
|
546
546
|
if (t(m), !n)
|
|
547
547
|
return;
|
|
548
548
|
const i = Ae(a.id), d = JSON.parse(
|
|
@@ -552,10 +552,10 @@ function In() {
|
|
|
552
552
|
}
|
|
553
553
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
554
554
|
/* @__PURE__ */ e.jsx(
|
|
555
|
-
|
|
555
|
+
Qe,
|
|
556
556
|
{
|
|
557
557
|
checked: s,
|
|
558
|
-
onCheckedChange:
|
|
558
|
+
onCheckedChange: l,
|
|
559
559
|
id: "terms"
|
|
560
560
|
}
|
|
561
561
|
),
|
|
@@ -569,12 +569,12 @@ function In() {
|
|
|
569
569
|
)
|
|
570
570
|
] });
|
|
571
571
|
}
|
|
572
|
-
function
|
|
572
|
+
function qn() {
|
|
573
573
|
const s = k((v) => v.bookmarkKey), t = k((v) => v.dashboard);
|
|
574
574
|
k((v) => v.selectedSheetId);
|
|
575
575
|
const a = k(
|
|
576
576
|
(v) => v.isDashboardEditing
|
|
577
|
-
), n = k((v) => v.filterValues),
|
|
577
|
+
), n = k((v) => v.filterValues), l = k((v) => v.isVisualEditing), m = k((v) => v.showFilters);
|
|
578
578
|
k(
|
|
579
579
|
(v) => v.showDashboardJSON
|
|
580
580
|
);
|
|
@@ -612,7 +612,7 @@ function Vn() {
|
|
|
612
612
|
function f() {
|
|
613
613
|
if (!s || s === "")
|
|
614
614
|
return;
|
|
615
|
-
const v =
|
|
615
|
+
const v = oa(t), O = Ae(t.id), y = JSON.parse(localStorage.getItem(O) || "[]"), L = y.findIndex(
|
|
616
616
|
(E) => E.name === s
|
|
617
617
|
);
|
|
618
618
|
L !== -1 ? y[L] = {
|
|
@@ -626,23 +626,23 @@ function Vn() {
|
|
|
626
626
|
filterValues: n
|
|
627
627
|
}), localStorage.setItem(O, JSON.stringify(y)), i == null || i(v);
|
|
628
628
|
}
|
|
629
|
-
return
|
|
629
|
+
return l ? null : /* @__PURE__ */ e.jsxs(
|
|
630
630
|
"div",
|
|
631
631
|
{
|
|
632
632
|
className: "flex items-center justify-between gap-2 border-b bg-muted/50 px-2 py-2",
|
|
633
633
|
role: "dashboard-controls",
|
|
634
634
|
children: [
|
|
635
|
-
!
|
|
636
|
-
/* @__PURE__ */ e.jsx(
|
|
635
|
+
!l && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
636
|
+
/* @__PURE__ */ e.jsx(R, { children: s }),
|
|
637
637
|
!!s && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
638
638
|
/* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: "|" }),
|
|
639
|
-
/* @__PURE__ */ e.jsx(
|
|
639
|
+
/* @__PURE__ */ e.jsx(Vn, {})
|
|
640
640
|
] })
|
|
641
641
|
] }),
|
|
642
642
|
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
|
|
643
|
-
a && !
|
|
644
|
-
!
|
|
645
|
-
a && !
|
|
643
|
+
a && !l && /* @__PURE__ */ e.jsx(En, {}),
|
|
644
|
+
!l && /* @__PURE__ */ e.jsx(In, {}),
|
|
645
|
+
a && !l && /* @__PURE__ */ e.jsxs(
|
|
646
646
|
w,
|
|
647
647
|
{
|
|
648
648
|
variant: "outline",
|
|
@@ -651,7 +651,7 @@ function Vn() {
|
|
|
651
651
|
disabled: !a,
|
|
652
652
|
onClick: u,
|
|
653
653
|
children: [
|
|
654
|
-
/* @__PURE__ */ e.jsx(
|
|
654
|
+
/* @__PURE__ */ e.jsx(zs, { className: "mr-2 h-4 w-4", strokeWidth: 1.5 }),
|
|
655
655
|
"Add Frame"
|
|
656
656
|
]
|
|
657
657
|
}
|
|
@@ -663,10 +663,10 @@ function Vn() {
|
|
|
663
663
|
className: "h-7 p-2",
|
|
664
664
|
onClick: j,
|
|
665
665
|
size: "sm",
|
|
666
|
-
children: /* @__PURE__ */ e.jsx(
|
|
666
|
+
children: /* @__PURE__ */ e.jsx(za, { className: "h-4 w-4", strokeWidth: 1.5 })
|
|
667
667
|
}
|
|
668
668
|
),
|
|
669
|
-
a && !
|
|
669
|
+
a && !l && /* @__PURE__ */ e.jsx(
|
|
670
670
|
w,
|
|
671
671
|
{
|
|
672
672
|
variant: "outline",
|
|
@@ -676,42 +676,42 @@ function Vn() {
|
|
|
676
676
|
b(!1), g(!1);
|
|
677
677
|
},
|
|
678
678
|
size: "sm",
|
|
679
|
-
children: /* @__PURE__ */ e.jsx(
|
|
679
|
+
children: /* @__PURE__ */ e.jsx(Pe, { className: "h-4 w-4", strokeWidth: 1.5 })
|
|
680
680
|
}
|
|
681
681
|
),
|
|
682
|
-
a && !
|
|
682
|
+
a && !l && /* @__PURE__ */ e.jsx(
|
|
683
683
|
w,
|
|
684
684
|
{
|
|
685
685
|
className: "h-7 p-2",
|
|
686
686
|
variant: "outline",
|
|
687
687
|
onClick: f,
|
|
688
688
|
size: "sm",
|
|
689
|
-
children: /* @__PURE__ */ e.jsx(
|
|
689
|
+
children: /* @__PURE__ */ e.jsx(Fn, { className: "h-4 w-4", strokeWidth: 1.5 })
|
|
690
690
|
}
|
|
691
691
|
),
|
|
692
|
-
!m && !
|
|
692
|
+
!m && !l && a && /* @__PURE__ */ e.jsx(
|
|
693
693
|
w,
|
|
694
694
|
{
|
|
695
695
|
className: "h-7 p-2",
|
|
696
696
|
variant: "outline",
|
|
697
697
|
onClick: () => o(!0),
|
|
698
698
|
size: "sm",
|
|
699
|
-
children: /* @__PURE__ */ e.jsx(
|
|
699
|
+
children: /* @__PURE__ */ e.jsx(ca, { className: "h-4 w-4", strokeWidth: 1.5 })
|
|
700
700
|
}
|
|
701
701
|
),
|
|
702
|
-
!
|
|
703
|
-
!
|
|
702
|
+
!l && a && !1,
|
|
703
|
+
!l && !1
|
|
704
704
|
] })
|
|
705
705
|
]
|
|
706
706
|
}
|
|
707
707
|
);
|
|
708
708
|
}
|
|
709
|
-
function
|
|
709
|
+
function Be({
|
|
710
710
|
title: s,
|
|
711
711
|
items: t,
|
|
712
712
|
value: a,
|
|
713
713
|
isLoading: n,
|
|
714
|
-
isError:
|
|
714
|
+
isError: l,
|
|
715
715
|
connectionTooltip: m,
|
|
716
716
|
onChange: i,
|
|
717
717
|
showNone: o = !1,
|
|
@@ -719,23 +719,23 @@ function He({
|
|
|
719
719
|
showIcon: p = !0,
|
|
720
720
|
disabled: x = !1
|
|
721
721
|
}) {
|
|
722
|
-
const b = n ? "Loading..." :
|
|
722
|
+
const b = n ? "Loading..." : l ? "Error" : a;
|
|
723
723
|
function g() {
|
|
724
724
|
if (s === "Connection")
|
|
725
|
-
return /* @__PURE__ */ e.jsx(
|
|
725
|
+
return /* @__PURE__ */ e.jsx(zn, { className: "size-4 rotate-90" });
|
|
726
726
|
if (s === "Database")
|
|
727
|
-
return /* @__PURE__ */ e.jsx(
|
|
727
|
+
return /* @__PURE__ */ e.jsx(pn, { className: "size-4" });
|
|
728
728
|
if (s === "Schema")
|
|
729
|
-
return /* @__PURE__ */ e.jsx(
|
|
729
|
+
return /* @__PURE__ */ e.jsx(kn, { className: "size-4" });
|
|
730
730
|
if (s === "Table")
|
|
731
|
-
return /* @__PURE__ */ e.jsx(
|
|
731
|
+
return /* @__PURE__ */ e.jsx(Ls, { className: "size-4" });
|
|
732
732
|
if (s === "Model")
|
|
733
|
-
return /* @__PURE__ */ e.jsx(
|
|
733
|
+
return /* @__PURE__ */ e.jsx(un, { className: "size-4" });
|
|
734
734
|
}
|
|
735
735
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
736
|
-
p && /* @__PURE__ */ e.jsx("div", { className: "shrink-0", children: m ? /* @__PURE__ */ e.jsxs(
|
|
737
|
-
/* @__PURE__ */ e.jsx(
|
|
738
|
-
/* @__PURE__ */ e.jsx(
|
|
736
|
+
p && /* @__PURE__ */ e.jsx("div", { className: "shrink-0", children: m ? /* @__PURE__ */ e.jsxs(Ds, { children: [
|
|
737
|
+
/* @__PURE__ */ e.jsx(da, { children: g() }),
|
|
738
|
+
/* @__PURE__ */ e.jsx(As, { className: "text-xs", align: "start", children: m })
|
|
739
739
|
] }) : g() }),
|
|
740
740
|
/* @__PURE__ */ e.jsxs(Oe, { disabled: x, value: b, onValueChange: i, children: [
|
|
741
741
|
/* @__PURE__ */ e.jsx(
|
|
@@ -748,37 +748,37 @@ function He({
|
|
|
748
748
|
children: /* @__PURE__ */ e.jsx(
|
|
749
749
|
Te,
|
|
750
750
|
{
|
|
751
|
-
placeholder: n ? "Loading..." :
|
|
751
|
+
placeholder: n ? "Loading..." : l ? "Error" : `Select ${s}`
|
|
752
752
|
}
|
|
753
753
|
)
|
|
754
754
|
}
|
|
755
755
|
),
|
|
756
|
-
/* @__PURE__ */ e.jsx(De, { children: /* @__PURE__ */ e.jsxs(
|
|
756
|
+
/* @__PURE__ */ e.jsx(De, { children: /* @__PURE__ */ e.jsxs(Ke, { children: [
|
|
757
757
|
n ? /* @__PURE__ */ e.jsx(Le, { children: "Loading..." }) : /* @__PURE__ */ e.jsx(Le, { children: s }),
|
|
758
758
|
/* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
759
759
|
o && /* @__PURE__ */ e.jsx(ee, { value: "none", children: "None" }, "none"),
|
|
760
760
|
t && t.map((h, u) => /* @__PURE__ */ e.jsx(ee, { value: h.id, children: h.name }, u))
|
|
761
761
|
] }),
|
|
762
|
-
(n ||
|
|
762
|
+
(n || l) && /* @__PURE__ */ e.jsx(ee, { value: b, children: b })
|
|
763
763
|
] }) })
|
|
764
764
|
] })
|
|
765
765
|
] });
|
|
766
766
|
}
|
|
767
|
-
function
|
|
768
|
-
const [t, a] = M(!1), n = c((h) => h.selectedTableName),
|
|
767
|
+
function Rn({ column: s }) {
|
|
768
|
+
const [t, a] = M(!1), n = c((h) => h.selectedTableName), l = c(
|
|
769
769
|
(h) => h.selectedSchemaName
|
|
770
770
|
), m = c(
|
|
771
771
|
(h) => h.selectedDatamodelId
|
|
772
772
|
), i = c((h) => h.sqlGen), { modelItems: o } = Ie(), d = c((h) => h.actions.setSqlGen), p = c((h) => h.actions.setCardSql), x = c((h) => h.actions.setRunSql);
|
|
773
773
|
function b(h, u) {
|
|
774
774
|
var O;
|
|
775
|
-
const j =
|
|
775
|
+
const j = ha(h, i, u), f = (O = o == null ? void 0 : o.find(
|
|
776
776
|
(y) => y.id === m
|
|
777
777
|
)) == null ? void 0 : O.name;
|
|
778
778
|
d(j);
|
|
779
|
-
const v =
|
|
779
|
+
const v = ma(
|
|
780
780
|
j,
|
|
781
|
-
ue(
|
|
781
|
+
ue(l || ""),
|
|
782
782
|
ue(n),
|
|
783
783
|
f
|
|
784
784
|
);
|
|
@@ -828,10 +828,10 @@ function qn({ column: s }) {
|
|
|
828
828
|
)
|
|
829
829
|
] });
|
|
830
830
|
}
|
|
831
|
-
return /* @__PURE__ */ e.jsxs(
|
|
832
|
-
/* @__PURE__ */ e.jsx(
|
|
831
|
+
return /* @__PURE__ */ e.jsxs(Es, { openDelay: 0, open: t, onOpenChange: a, children: [
|
|
832
|
+
/* @__PURE__ */ e.jsx(Is, { asChild: !0, children: /* @__PURE__ */ e.jsx(ka, { className: "invisible size-3.5 cursor-pointer text-foreground/40 group-hover:visible" }) }),
|
|
833
833
|
/* @__PURE__ */ e.jsx(
|
|
834
|
-
|
|
834
|
+
Vs,
|
|
835
835
|
{
|
|
836
836
|
align: "center",
|
|
837
837
|
className: "w-20 rounded-md p-0 shadow-none",
|
|
@@ -840,25 +840,25 @@ function qn({ column: s }) {
|
|
|
840
840
|
)
|
|
841
841
|
] });
|
|
842
842
|
}
|
|
843
|
-
function
|
|
844
|
-
return /* @__PURE__ */ e.jsxs(
|
|
845
|
-
/* @__PURE__ */ e.jsx(
|
|
843
|
+
function Ma({ column: s }) {
|
|
844
|
+
return /* @__PURE__ */ e.jsxs(Ds, { children: [
|
|
845
|
+
/* @__PURE__ */ e.jsx(at, { asChild: !0, children: tt.includes(s.data_type.toLowerCase()) ? (
|
|
846
846
|
// <span className=" font-thin">T</span>
|
|
847
|
-
/* @__PURE__ */ e.jsx(
|
|
848
|
-
) :
|
|
847
|
+
/* @__PURE__ */ e.jsx(Ps, { className: "size-3" })
|
|
848
|
+
) : ua.includes(s.data_type.toLowerCase()) ? (
|
|
849
849
|
//
|
|
850
|
-
/* @__PURE__ */ e.jsx(
|
|
851
|
-
) :
|
|
852
|
-
/* @__PURE__ */ e.jsx(
|
|
850
|
+
/* @__PURE__ */ e.jsx(bn, { className: "size-3" })
|
|
851
|
+
) : nt.includes(s.data_type.toLowerCase()) ? /* @__PURE__ */ e.jsx(lt, { className: "size-3" }) : rt.includes(s.data_type.toLowerCase()) ? /* @__PURE__ */ e.jsx(An, { className: "size-3" }) : /* @__PURE__ */ e.jsx(On, { className: "size-3" }) }),
|
|
852
|
+
/* @__PURE__ */ e.jsx(As, { children: /* @__PURE__ */ e.jsx("p", { className: "font-mono text-xs", children: s.data_type }) })
|
|
853
853
|
] });
|
|
854
854
|
}
|
|
855
|
-
function
|
|
855
|
+
function _n({
|
|
856
856
|
schemaName: s,
|
|
857
857
|
tableName: t,
|
|
858
858
|
columns: a,
|
|
859
859
|
status: n
|
|
860
860
|
}) {
|
|
861
|
-
const
|
|
861
|
+
const l = c((C) => C.sqlGen), m = c(
|
|
862
862
|
(C) => C.selectedConnectionId
|
|
863
863
|
), i = c(
|
|
864
864
|
(C) => C.selectedDatabaseName
|
|
@@ -873,11 +873,11 @@ function Rn({
|
|
|
873
873
|
), j = c((C) => C.actions.setCardSql), { connectionType: f, modelItems: v } = Ie();
|
|
874
874
|
function O(C) {
|
|
875
875
|
var A;
|
|
876
|
-
const z =
|
|
876
|
+
const z = ha(C, l);
|
|
877
877
|
h(z);
|
|
878
878
|
const q = (A = v == null ? void 0 : v.find(
|
|
879
|
-
(
|
|
880
|
-
)) == null ? void 0 : A.name, K =
|
|
879
|
+
(_) => _.id === p
|
|
880
|
+
)) == null ? void 0 : A.name, K = ma(z, ue(s), ue(t), q);
|
|
881
881
|
K && (j(K), g(!0));
|
|
882
882
|
}
|
|
883
883
|
function y() {
|
|
@@ -894,11 +894,11 @@ function Rn({
|
|
|
894
894
|
schemaName: o,
|
|
895
895
|
tableName: d
|
|
896
896
|
}, K = [...x || [], z].filter(
|
|
897
|
-
(A,
|
|
897
|
+
(A, _, W) => W.findIndex(
|
|
898
898
|
(J) => J.connectinonId === A.connectinonId && J.tableName === A.tableName
|
|
899
|
-
) ===
|
|
899
|
+
) === _
|
|
900
900
|
);
|
|
901
|
-
b(K),
|
|
901
|
+
b(K), ys.success(`Added '${d}' to AI Scope`, {
|
|
902
902
|
position: "top-right",
|
|
903
903
|
duration: 2500,
|
|
904
904
|
richColors: !0
|
|
@@ -907,7 +907,7 @@ function Rn({
|
|
|
907
907
|
const z = (x || []).filter(
|
|
908
908
|
(q) => q.connectinonId !== m && q.tableName !== d
|
|
909
909
|
);
|
|
910
|
-
b(z),
|
|
910
|
+
b(z), ys(`Removed '${d}' from AI Scope`, {
|
|
911
911
|
position: "top-right",
|
|
912
912
|
duration: 2e3,
|
|
913
913
|
richColors: !0
|
|
@@ -916,13 +916,13 @@ function Rn({
|
|
|
916
916
|
}
|
|
917
917
|
function E() {
|
|
918
918
|
var A;
|
|
919
|
-
let C =
|
|
919
|
+
let C = pa(s, t);
|
|
920
920
|
const z = (A = v == null ? void 0 : v.find(
|
|
921
|
-
(
|
|
921
|
+
(_) => _.id === p
|
|
922
922
|
)) == null ? void 0 : A.name;
|
|
923
|
-
console.log("modelName", z), p && p !== "none" && (C = `${
|
|
923
|
+
console.log("modelName", z), p && p !== "none" && (C = `${vs}.${z}`);
|
|
924
924
|
let q = C;
|
|
925
|
-
return ((
|
|
925
|
+
return ((_) => /[A-Z]/.test(_))(t) && (q = q.split(".").map((W) => `"${W}"`).join(".")), q;
|
|
926
926
|
}
|
|
927
927
|
function V() {
|
|
928
928
|
const C = E();
|
|
@@ -937,7 +937,7 @@ function Rn({
|
|
|
937
937
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex grow flex-col space-y-4 px-4", children: [
|
|
938
938
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-center gap-1", children: [
|
|
939
939
|
/* @__PURE__ */ e.jsx(
|
|
940
|
-
|
|
940
|
+
xa,
|
|
941
941
|
{
|
|
942
942
|
title: `${y() ? "Remove from" : "Add to"} AI Scope`,
|
|
943
943
|
pressed: y(),
|
|
@@ -945,7 +945,7 @@ function Rn({
|
|
|
945
945
|
variant: "outline",
|
|
946
946
|
className: "h-9 px-2",
|
|
947
947
|
children: /* @__PURE__ */ e.jsx(
|
|
948
|
-
|
|
948
|
+
it,
|
|
949
949
|
{
|
|
950
950
|
className: Y("size-4", {
|
|
951
951
|
"text-primary": y(),
|
|
@@ -964,7 +964,7 @@ function Rn({
|
|
|
964
964
|
variant: "secondary",
|
|
965
965
|
className: "flex",
|
|
966
966
|
children: [
|
|
967
|
-
n !== "Success" ? /* @__PURE__ */ e.jsx(
|
|
967
|
+
n !== "Success" ? /* @__PURE__ */ e.jsx(Ue, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(Tn, { className: "mr-2 size-4" }),
|
|
968
968
|
"Top 10"
|
|
969
969
|
]
|
|
970
970
|
}
|
|
@@ -978,14 +978,14 @@ function Rn({
|
|
|
978
978
|
variant: "secondary",
|
|
979
979
|
className: "flex",
|
|
980
980
|
children: [
|
|
981
|
-
n !== "Success" ? /* @__PURE__ */ e.jsx(
|
|
981
|
+
n !== "Success" ? /* @__PURE__ */ e.jsx(Ue, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(Mn, { className: "mr-2 size-4" }),
|
|
982
982
|
"Count"
|
|
983
983
|
]
|
|
984
984
|
}
|
|
985
985
|
)
|
|
986
986
|
] }),
|
|
987
987
|
/* @__PURE__ */ e.jsxs(
|
|
988
|
-
|
|
988
|
+
qs,
|
|
989
989
|
{
|
|
990
990
|
className: "flex-1 basis-0 overflow-y-auto border-b border-t border-muted py-3",
|
|
991
991
|
children: [
|
|
@@ -996,12 +996,12 @@ function Rn({
|
|
|
996
996
|
className: Y(
|
|
997
997
|
"group mx-3 flex cursor-pointer items-center justify-between rounded px-2 py-[6px] text-sm transition-colors hover:bg-muted/50",
|
|
998
998
|
{
|
|
999
|
-
"bg-muted":
|
|
999
|
+
"bg-muted": ot(C, l)
|
|
1000
1000
|
}
|
|
1001
1001
|
),
|
|
1002
1002
|
children: [
|
|
1003
1003
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
1004
|
-
/* @__PURE__ */ e.jsx(
|
|
1004
|
+
/* @__PURE__ */ e.jsx(Ma, { column: C }),
|
|
1005
1005
|
/* @__PURE__ */ e.jsx("span", { children: C.column_name })
|
|
1006
1006
|
] }),
|
|
1007
1007
|
/* @__PURE__ */ e.jsx(
|
|
@@ -1009,52 +1009,52 @@ function Rn({
|
|
|
1009
1009
|
{
|
|
1010
1010
|
onClick: (z) => z.stopPropagation(),
|
|
1011
1011
|
className: "flex items-center justify-end",
|
|
1012
|
-
children:
|
|
1012
|
+
children: ua.includes(C.data_type) && /* @__PURE__ */ e.jsx(Rn, { column: C })
|
|
1013
1013
|
}
|
|
1014
1014
|
)
|
|
1015
1015
|
]
|
|
1016
1016
|
},
|
|
1017
1017
|
C.column_name
|
|
1018
1018
|
)),
|
|
1019
|
-
/* @__PURE__ */ e.jsx(
|
|
1020
|
-
/* @__PURE__ */ e.jsx(
|
|
1019
|
+
/* @__PURE__ */ e.jsx(Qs, { orientation: "vertical" }),
|
|
1020
|
+
/* @__PURE__ */ e.jsx(Qs, { orientation: "horizontal" })
|
|
1021
1021
|
]
|
|
1022
1022
|
}
|
|
1023
1023
|
)
|
|
1024
1024
|
] });
|
|
1025
1025
|
}
|
|
1026
1026
|
function Ie(s, t) {
|
|
1027
|
-
var
|
|
1028
|
-
let a =
|
|
1029
|
-
const n =
|
|
1030
|
-
(
|
|
1027
|
+
var Ze, Xe, _e, es, ss;
|
|
1028
|
+
let a = hn(() => [], []);
|
|
1029
|
+
const n = We().authToken || s, l = c(
|
|
1030
|
+
(r) => r.selectedConnectionId
|
|
1031
1031
|
), m = c(
|
|
1032
|
-
(
|
|
1032
|
+
(r) => r.selectedDatamodelId
|
|
1033
1033
|
), i = c(
|
|
1034
|
-
(
|
|
1034
|
+
(r) => r.selectedDatabaseName
|
|
1035
1035
|
), o = c(
|
|
1036
|
-
(
|
|
1037
|
-
), d = c((
|
|
1038
|
-
(
|
|
1036
|
+
(r) => r.selectedSchemaName
|
|
1037
|
+
), d = c((r) => r.selectedTableName), p = c(
|
|
1038
|
+
(r) => r.actions.setCurrentColumns
|
|
1039
1039
|
), x = c(
|
|
1040
|
-
(
|
|
1040
|
+
(r) => r.actions.setSelectedConnectionId
|
|
1041
1041
|
), b = c(
|
|
1042
|
-
(
|
|
1042
|
+
(r) => r.actions.setSelectedDatamodelId
|
|
1043
1043
|
), g = c(
|
|
1044
|
-
(
|
|
1044
|
+
(r) => r.actions.setSelectedDatabaseName
|
|
1045
1045
|
), h = c(
|
|
1046
|
-
(
|
|
1046
|
+
(r) => r.actions.setSelectedSchemaName
|
|
1047
1047
|
), u = c(
|
|
1048
|
-
(
|
|
1049
|
-
), j = c((
|
|
1050
|
-
function f(
|
|
1051
|
-
return
|
|
1048
|
+
(r) => r.actions.setSelectedTableName
|
|
1049
|
+
), j = c((r) => r.actions.setCardSql);
|
|
1050
|
+
function f(r) {
|
|
1051
|
+
return l && i && o && i !== "NA" ? !0 : l && r === "API" ? !1 : !!(l && r === "S3");
|
|
1052
1052
|
}
|
|
1053
|
-
function v(
|
|
1054
|
-
return !!(
|
|
1053
|
+
function v(r) {
|
|
1054
|
+
return !!(l && i && i !== "NA" && o && d || l && (r === "S3" || r === "API") || m && m);
|
|
1055
1055
|
}
|
|
1056
|
-
function O(
|
|
1057
|
-
return
|
|
1056
|
+
function O(r) {
|
|
1057
|
+
return l && r ? !(r === "API" || r === "S3") : !1;
|
|
1058
1058
|
}
|
|
1059
1059
|
const {
|
|
1060
1060
|
data: y,
|
|
@@ -1073,31 +1073,31 @@ function Ie(s, t) {
|
|
|
1073
1073
|
isLoading: T,
|
|
1074
1074
|
isError: C
|
|
1075
1075
|
} = me({
|
|
1076
|
-
queryKey: ["models",
|
|
1076
|
+
queryKey: ["models", l],
|
|
1077
1077
|
queryFn: () => be(
|
|
1078
1078
|
"https://semaphor.cloud/api/v1/datamodels",
|
|
1079
1079
|
(n == null ? void 0 : n.accessToken) || "",
|
|
1080
1080
|
{
|
|
1081
|
-
connection_id:
|
|
1081
|
+
connection_id: l
|
|
1082
1082
|
}
|
|
1083
1083
|
),
|
|
1084
|
-
enabled: !!(n != null && n.accessToken) && !!
|
|
1084
|
+
enabled: !!(n != null && n.accessToken) && !!l
|
|
1085
1085
|
// Only fetch if authToken is present
|
|
1086
1086
|
}), z = y == null ? void 0 : y.connections.find(
|
|
1087
|
-
(
|
|
1087
|
+
(r) => r.id === l
|
|
1088
1088
|
), q = z == null ? void 0 : z.type, K = (z == null ? void 0 : z.type) === "API" || (z == null ? void 0 : z.type) === "S3", {
|
|
1089
1089
|
data: A,
|
|
1090
|
-
isLoading:
|
|
1090
|
+
isLoading: _,
|
|
1091
1091
|
isFetching: W,
|
|
1092
1092
|
isError: J,
|
|
1093
1093
|
refetch: te
|
|
1094
1094
|
} = me({
|
|
1095
|
-
queryKey: ["databases",
|
|
1095
|
+
queryKey: ["databases", l],
|
|
1096
1096
|
queryFn: () => be(
|
|
1097
1097
|
"https://semaphor.cloud/api/v1/databases",
|
|
1098
1098
|
(n == null ? void 0 : n.accessToken) || "",
|
|
1099
1099
|
{
|
|
1100
|
-
connection_id:
|
|
1100
|
+
connection_id: l
|
|
1101
1101
|
}
|
|
1102
1102
|
),
|
|
1103
1103
|
enabled: O(q)
|
|
@@ -1109,16 +1109,16 @@ function Ie(s, t) {
|
|
|
1109
1109
|
isError: N,
|
|
1110
1110
|
refetch: F
|
|
1111
1111
|
} = me({
|
|
1112
|
-
queryKey: ["schemas",
|
|
1112
|
+
queryKey: ["schemas", l, i],
|
|
1113
1113
|
queryFn: () => be(
|
|
1114
1114
|
"https://semaphor.cloud/api/v1/schemas",
|
|
1115
1115
|
(n == null ? void 0 : n.accessToken) || "",
|
|
1116
1116
|
{
|
|
1117
|
-
connection_id:
|
|
1117
|
+
connection_id: l,
|
|
1118
1118
|
database_name: i
|
|
1119
1119
|
}
|
|
1120
1120
|
),
|
|
1121
|
-
enabled: !!
|
|
1121
|
+
enabled: !!l && !!i && !K && i !== "NA"
|
|
1122
1122
|
//currentConnection?.type !== 'API', // Only fetch if connectionId and database is present
|
|
1123
1123
|
}), {
|
|
1124
1124
|
data: H,
|
|
@@ -1129,7 +1129,7 @@ function Ie(s, t) {
|
|
|
1129
1129
|
} = me({
|
|
1130
1130
|
queryKey: [
|
|
1131
1131
|
"tables",
|
|
1132
|
-
|
|
1132
|
+
l,
|
|
1133
1133
|
i,
|
|
1134
1134
|
o
|
|
1135
1135
|
],
|
|
@@ -1137,7 +1137,7 @@ function Ie(s, t) {
|
|
|
1137
1137
|
"https://semaphor.cloud/api/v1/tables",
|
|
1138
1138
|
(n == null ? void 0 : n.accessToken) || "",
|
|
1139
1139
|
{
|
|
1140
|
-
connection_id:
|
|
1140
|
+
connection_id: l,
|
|
1141
1141
|
database_name: i,
|
|
1142
1142
|
schema_name: o
|
|
1143
1143
|
}
|
|
@@ -1151,7 +1151,7 @@ function Ie(s, t) {
|
|
|
1151
1151
|
} = me({
|
|
1152
1152
|
queryKey: [
|
|
1153
1153
|
"columns",
|
|
1154
|
-
|
|
1154
|
+
l,
|
|
1155
1155
|
i,
|
|
1156
1156
|
m,
|
|
1157
1157
|
o,
|
|
@@ -1161,7 +1161,7 @@ function Ie(s, t) {
|
|
|
1161
1161
|
"https://semaphor.cloud/api/v1/columns",
|
|
1162
1162
|
(n == null ? void 0 : n.accessToken) || "",
|
|
1163
1163
|
{
|
|
1164
|
-
connection_id:
|
|
1164
|
+
connection_id: l,
|
|
1165
1165
|
datamodel_id: m || "",
|
|
1166
1166
|
// don't pass undefined. Pass empty string
|
|
1167
1167
|
database_name: i,
|
|
@@ -1189,56 +1189,56 @@ function Ie(s, t) {
|
|
|
1189
1189
|
g,
|
|
1190
1190
|
z
|
|
1191
1191
|
]);
|
|
1192
|
-
const
|
|
1193
|
-
function ve(
|
|
1194
|
-
h(
|
|
1192
|
+
const le = (z == null ? void 0 : z.type) === "API" ? (Ze = z == null ? void 0 : z.type) == null ? void 0 : Ze.toLowerCase() : d || "", re = K ? "" : o || "";
|
|
1193
|
+
function ve(r) {
|
|
1194
|
+
h(r), u("");
|
|
1195
1195
|
}
|
|
1196
|
-
function Se(
|
|
1197
|
-
g(
|
|
1196
|
+
function Se(r) {
|
|
1197
|
+
g(r === "none" ? "" : r), h(""), u(""), r !== "none" && r !== "" && b("");
|
|
1198
1198
|
}
|
|
1199
|
-
function
|
|
1200
|
-
x(
|
|
1199
|
+
function Re(r) {
|
|
1200
|
+
x(r);
|
|
1201
1201
|
}
|
|
1202
|
-
function
|
|
1203
|
-
b(
|
|
1202
|
+
function Gs(r) {
|
|
1203
|
+
b(r === "none" ? "" : r), r !== "none" && r !== "" && g("");
|
|
1204
1204
|
}
|
|
1205
|
-
A && ((
|
|
1206
|
-
...
|
|
1207
|
-
data_type:
|
|
1205
|
+
A && ((Xe = A == null ? void 0 : A.databases) == null ? void 0 : Xe.length) > 0, G && ((_e = G == null ? void 0 : G.schemas) == null ? void 0 : _e.length) > 0, se && ((es = se == null ? void 0 : se.columns) == null ? void 0 : es.length) > 0 && (a = se.columns.map((r) => ({
|
|
1206
|
+
...r,
|
|
1207
|
+
data_type: r.data_type.toLowerCase()
|
|
1208
1208
|
}))), J && (a = []), (Q || E) && (a = []);
|
|
1209
1209
|
const ke = y == null ? void 0 : y.connections.map(
|
|
1210
|
-
(
|
|
1211
|
-
id:
|
|
1212
|
-
name:
|
|
1213
|
-
type:
|
|
1210
|
+
(r) => ({
|
|
1211
|
+
id: r.id,
|
|
1212
|
+
name: r.name,
|
|
1213
|
+
type: r.type
|
|
1214
1214
|
})
|
|
1215
|
-
),
|
|
1216
|
-
id:
|
|
1217
|
-
name:
|
|
1218
|
-
})),
|
|
1219
|
-
id:
|
|
1220
|
-
name:
|
|
1221
|
-
})),
|
|
1222
|
-
id:
|
|
1223
|
-
name:
|
|
1224
|
-
})),
|
|
1225
|
-
id:
|
|
1226
|
-
name:
|
|
1215
|
+
), us = (ss = V == null ? void 0 : V.datamodels) == null ? void 0 : ss.map((r) => ({
|
|
1216
|
+
id: r.id,
|
|
1217
|
+
name: r.name
|
|
1218
|
+
})), Ye = A == null ? void 0 : A.databases.map((r) => ({
|
|
1219
|
+
id: r.database_name,
|
|
1220
|
+
name: r.database_name
|
|
1221
|
+
})), xs = G == null ? void 0 : G.schemas.map((r) => ({
|
|
1222
|
+
id: r.schema_name,
|
|
1223
|
+
name: r.schema_name
|
|
1224
|
+
})), ps = H == null ? void 0 : H.tables.map((r) => ({
|
|
1225
|
+
id: r.table_name,
|
|
1226
|
+
name: r.table_name
|
|
1227
1227
|
}));
|
|
1228
1228
|
return {
|
|
1229
1229
|
connectionItems: ke,
|
|
1230
1230
|
isConnectionsLoading: L,
|
|
1231
1231
|
isConnectionsError: E,
|
|
1232
|
-
modelItems:
|
|
1232
|
+
modelItems: us,
|
|
1233
1233
|
isModelsLoading: T,
|
|
1234
1234
|
isModelsError: C,
|
|
1235
|
-
databaseItems:
|
|
1236
|
-
isDatabasesLoadingOrFetching:
|
|
1235
|
+
databaseItems: Ye,
|
|
1236
|
+
isDatabasesLoadingOrFetching: _ || W,
|
|
1237
1237
|
isDatabaseError: J,
|
|
1238
|
-
schemaItems:
|
|
1238
|
+
schemaItems: xs,
|
|
1239
1239
|
isSchemaLoadingOrFetching: ne || S,
|
|
1240
1240
|
isSchemaError: N,
|
|
1241
|
-
tableItems:
|
|
1241
|
+
tableItems: ps,
|
|
1242
1242
|
isTableLoadingOrFetching: fe || ae,
|
|
1243
1243
|
isTableError: I,
|
|
1244
1244
|
columns: a,
|
|
@@ -1246,15 +1246,15 @@ function Ie(s, t) {
|
|
|
1246
1246
|
isColumnsError: Q,
|
|
1247
1247
|
isNonDbConnection: K,
|
|
1248
1248
|
connectionType: q,
|
|
1249
|
-
tableName:
|
|
1250
|
-
schemaName:
|
|
1251
|
-
handleConnectionChange:
|
|
1252
|
-
handleDatamodelChange:
|
|
1249
|
+
tableName: le,
|
|
1250
|
+
schemaName: re,
|
|
1251
|
+
handleConnectionChange: Re,
|
|
1252
|
+
handleDatamodelChange: Gs,
|
|
1253
1253
|
handleDatabaseChange: Se,
|
|
1254
1254
|
handleSchemaChange: ve
|
|
1255
1255
|
};
|
|
1256
1256
|
}
|
|
1257
|
-
function
|
|
1257
|
+
function Ta({
|
|
1258
1258
|
ColumnsComponent: s
|
|
1259
1259
|
}) {
|
|
1260
1260
|
var ae;
|
|
@@ -1264,7 +1264,7 @@ function Ma({
|
|
|
1264
1264
|
(I) => I.selectedDatamodelId
|
|
1265
1265
|
), n = c(
|
|
1266
1266
|
(I) => I.selectedDatabaseName
|
|
1267
|
-
),
|
|
1267
|
+
), l = c(
|
|
1268
1268
|
(I) => I.selectedSchemaName
|
|
1269
1269
|
), m = c((I) => I.selectedTableName), i = c(
|
|
1270
1270
|
(I) => I.actions.setSelectedTableName
|
|
@@ -1291,14 +1291,14 @@ function Ma({
|
|
|
1291
1291
|
isNonDbConnection: q,
|
|
1292
1292
|
handleConnectionChange: K,
|
|
1293
1293
|
handleDatabaseChange: A,
|
|
1294
|
-
handleSchemaChange:
|
|
1294
|
+
handleSchemaChange: _,
|
|
1295
1295
|
handleDatamodelChange: W,
|
|
1296
1296
|
tableName: J,
|
|
1297
1297
|
schemaName: te
|
|
1298
1298
|
} = Ie();
|
|
1299
1299
|
function G() {
|
|
1300
1300
|
return s ? s(te, J, g) : /* @__PURE__ */ e.jsx(
|
|
1301
|
-
|
|
1301
|
+
_n,
|
|
1302
1302
|
{
|
|
1303
1303
|
schemaName: te,
|
|
1304
1304
|
tableName: J,
|
|
@@ -1315,7 +1315,7 @@ function Ma({
|
|
|
1315
1315
|
return null;
|
|
1316
1316
|
if (!a || a === "none")
|
|
1317
1317
|
return /* @__PURE__ */ e.jsx(
|
|
1318
|
-
|
|
1318
|
+
Be,
|
|
1319
1319
|
{
|
|
1320
1320
|
showNone: !0,
|
|
1321
1321
|
onChange: A,
|
|
@@ -1330,9 +1330,9 @@ function Ma({
|
|
|
1330
1330
|
function N() {
|
|
1331
1331
|
if (t && !q && (!n || n === "none") && (!a || a === "none"))
|
|
1332
1332
|
return /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-3", children: [
|
|
1333
|
-
/* @__PURE__ */ e.jsx("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e.jsx(
|
|
1334
|
-
/* @__PURE__ */ e.jsx("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e.jsx(
|
|
1335
|
-
/* @__PURE__ */ e.jsx("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e.jsx(
|
|
1333
|
+
/* @__PURE__ */ e.jsx("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e.jsx(Ge, {}) }),
|
|
1334
|
+
/* @__PURE__ */ e.jsx("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e.jsx(R, { children: "OR" }) }),
|
|
1335
|
+
/* @__PURE__ */ e.jsx("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e.jsx(Ge, {}) })
|
|
1336
1336
|
] });
|
|
1337
1337
|
}
|
|
1338
1338
|
function F() {
|
|
@@ -1340,7 +1340,7 @@ function Ma({
|
|
|
1340
1340
|
return null;
|
|
1341
1341
|
if (!n || n === "none")
|
|
1342
1342
|
return /* @__PURE__ */ e.jsx(
|
|
1343
|
-
|
|
1343
|
+
Be,
|
|
1344
1344
|
{
|
|
1345
1345
|
showNone: !0,
|
|
1346
1346
|
onChange: W,
|
|
@@ -1354,13 +1354,13 @@ function Ma({
|
|
|
1354
1354
|
}
|
|
1355
1355
|
function H() {
|
|
1356
1356
|
return !t || z === "S3" || z === "API" || !n || n === "none" ? null : /* @__PURE__ */ e.jsx(
|
|
1357
|
-
|
|
1357
|
+
Be,
|
|
1358
1358
|
{
|
|
1359
|
-
onChange:
|
|
1359
|
+
onChange: _,
|
|
1360
1360
|
isError: L,
|
|
1361
1361
|
isLoading: y,
|
|
1362
1362
|
items: p,
|
|
1363
|
-
value:
|
|
1363
|
+
value: l || "",
|
|
1364
1364
|
title: "Schema"
|
|
1365
1365
|
}
|
|
1366
1366
|
);
|
|
@@ -1368,10 +1368,10 @@ function Ma({
|
|
|
1368
1368
|
function fe() {
|
|
1369
1369
|
function I() {
|
|
1370
1370
|
let Z = !1;
|
|
1371
|
-
return z === "API" ? (Z = !1, Z) : ((z === "S3" || t && n && n !== "none" &&
|
|
1371
|
+
return z === "API" ? (Z = !1, Z) : ((z === "S3" || t && n && n !== "none" && l) && (Z = !0), Z);
|
|
1372
1372
|
}
|
|
1373
1373
|
return I() ? /* @__PURE__ */ e.jsx(
|
|
1374
|
-
|
|
1374
|
+
Be,
|
|
1375
1375
|
{
|
|
1376
1376
|
onChange: i,
|
|
1377
1377
|
isError: C,
|
|
@@ -1385,7 +1385,7 @@ function Ma({
|
|
|
1385
1385
|
return /* @__PURE__ */ e.jsxs("aside", { className: "xbg-red-100 flex grow flex-col justify-between", children: [
|
|
1386
1386
|
/* @__PURE__ */ e.jsxs("section", { className: "space-y-3 px-6 py-4", children: [
|
|
1387
1387
|
/* @__PURE__ */ e.jsx(
|
|
1388
|
-
|
|
1388
|
+
Be,
|
|
1389
1389
|
{
|
|
1390
1390
|
items: o,
|
|
1391
1391
|
title: "Connection",
|
|
@@ -1413,17 +1413,17 @@ function Ma({
|
|
|
1413
1413
|
variant: "secondary",
|
|
1414
1414
|
className: "w-full",
|
|
1415
1415
|
children: [
|
|
1416
|
-
/* @__PURE__ */ e.jsx(
|
|
1416
|
+
/* @__PURE__ */ e.jsx(Sn, { className: "mr-2 size-4" }),
|
|
1417
1417
|
"Help"
|
|
1418
1418
|
]
|
|
1419
1419
|
}
|
|
1420
1420
|
) })
|
|
1421
1421
|
] });
|
|
1422
1422
|
}
|
|
1423
|
-
function
|
|
1424
|
-
const t = s.toUpperCase().indexOf("WHERE"), a = s.toUpperCase().indexOf("GROUP BY"), n = s.toUpperCase().indexOf("LIMIT"),
|
|
1423
|
+
function Hn(s) {
|
|
1424
|
+
const t = s.toUpperCase().indexOf("WHERE"), a = s.toUpperCase().indexOf("GROUP BY"), n = s.toUpperCase().indexOf("LIMIT"), l = s.toUpperCase().indexOf("ORDER BY");
|
|
1425
1425
|
let m = s.length;
|
|
1426
|
-
if (
|
|
1426
|
+
if (l !== -1 && (m = l), n !== -1 && n < m && (m = n), t !== -1) {
|
|
1427
1427
|
const i = s.substring(0, t), o = s.substring(t);
|
|
1428
1428
|
return `${i} {{ filters | where }} AND ${o.substring(
|
|
1429
1429
|
6
|
|
@@ -1436,16 +1436,16 @@ function _n(s) {
|
|
|
1436
1436
|
return `${i} {{ filters | where }} ${o}`;
|
|
1437
1437
|
}
|
|
1438
1438
|
}
|
|
1439
|
-
function
|
|
1439
|
+
function Bn({
|
|
1440
1440
|
error: s,
|
|
1441
1441
|
setShowAIDialog: t,
|
|
1442
1442
|
setUserInputforAI: a,
|
|
1443
1443
|
setTriggerAIRun: n
|
|
1444
1444
|
}) {
|
|
1445
|
-
return /* @__PURE__ */ e.jsxs(
|
|
1446
|
-
/* @__PURE__ */ e.jsx(
|
|
1447
|
-
/* @__PURE__ */ e.jsx(
|
|
1448
|
-
/* @__PURE__ */ e.jsx(
|
|
1445
|
+
return /* @__PURE__ */ e.jsxs(Es, { openDelay: 0, children: [
|
|
1446
|
+
/* @__PURE__ */ e.jsx(Is, { asChild: !0, children: /* @__PURE__ */ e.jsx(w, { variant: "link", className: "h-5 p-0", children: /* @__PURE__ */ e.jsx(xn, { className: "h-4 w-4 text-red-500" }) }) }),
|
|
1447
|
+
/* @__PURE__ */ e.jsx(Vs, { 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: [
|
|
1448
|
+
/* @__PURE__ */ e.jsx(qs, { 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 }) }),
|
|
1449
1449
|
/* @__PURE__ */ e.jsxs(
|
|
1450
1450
|
w,
|
|
1451
1451
|
{
|
|
@@ -1455,7 +1455,7 @@ function Hn({
|
|
|
1455
1455
|
size: "sm",
|
|
1456
1456
|
variant: "outline",
|
|
1457
1457
|
children: [
|
|
1458
|
-
/* @__PURE__ */ e.jsx(
|
|
1458
|
+
/* @__PURE__ */ e.jsx(jn, { className: "mr-2 h-4 w-4" }),
|
|
1459
1459
|
"Debug with AI"
|
|
1460
1460
|
]
|
|
1461
1461
|
}
|
|
@@ -1463,18 +1463,18 @@ function Hn({
|
|
|
1463
1463
|
] }) }) })
|
|
1464
1464
|
] });
|
|
1465
1465
|
}
|
|
1466
|
-
function
|
|
1466
|
+
function $n({
|
|
1467
1467
|
text: s,
|
|
1468
1468
|
onCheckedChange: t,
|
|
1469
1469
|
checked: a
|
|
1470
1470
|
}) {
|
|
1471
1471
|
return /* @__PURE__ */ e.jsxs("div", { className: "xbg-red-100 ml-6 flex items-center gap-2", children: [
|
|
1472
|
-
/* @__PURE__ */ e.jsx(
|
|
1472
|
+
/* @__PURE__ */ e.jsx(Qe, { checked: a, onCheckedChange: t }),
|
|
1473
1473
|
/* @__PURE__ */ e.jsx("label", { className: "text-xs leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", children: s })
|
|
1474
1474
|
] });
|
|
1475
1475
|
}
|
|
1476
|
-
function
|
|
1477
|
-
const { authToken: s } =
|
|
1476
|
+
function Pn() {
|
|
1477
|
+
const { authToken: s } = We(), t = c(
|
|
1478
1478
|
(m) => m.selectedConnectionId
|
|
1479
1479
|
), { data: a } = me({
|
|
1480
1480
|
queryKey: ["connections"],
|
|
@@ -1489,17 +1489,17 @@ function $n() {
|
|
|
1489
1489
|
);
|
|
1490
1490
|
return n == null ? void 0 : n.type;
|
|
1491
1491
|
}
|
|
1492
|
-
function
|
|
1493
|
-
const { authToken: s } =
|
|
1492
|
+
function Kn() {
|
|
1493
|
+
const { authToken: s } = We(), t = Je(null), a = c((d) => d.applyFilters), [n, l] = M(""), m = c((d) => d.filterValues), i = c((d) => d.card.sql), o = Pn();
|
|
1494
1494
|
return /* @__PURE__ */ e.jsxs(
|
|
1495
|
-
|
|
1495
|
+
Es,
|
|
1496
1496
|
{
|
|
1497
1497
|
openDelay: 0,
|
|
1498
1498
|
onOpenChange: async (d) => {
|
|
1499
1499
|
if (!d)
|
|
1500
1500
|
return;
|
|
1501
1501
|
console.log("onOpenChange");
|
|
1502
|
-
const p = await
|
|
1502
|
+
const p = await fa(
|
|
1503
1503
|
"https://semaphor.cloud/api/v1/filter-sql",
|
|
1504
1504
|
(s == null ? void 0 : s.accessToken) || "",
|
|
1505
1505
|
{
|
|
@@ -1508,23 +1508,23 @@ function Pn() {
|
|
|
1508
1508
|
connection_type: o
|
|
1509
1509
|
}
|
|
1510
1510
|
);
|
|
1511
|
-
console.log(p), p.sql ? (console.log(p.records),
|
|
1511
|
+
console.log(p), p.sql ? (console.log(p.records), l(p.sql)) : l("Error");
|
|
1512
1512
|
},
|
|
1513
1513
|
children: [
|
|
1514
|
-
/* @__PURE__ */ e.jsx(
|
|
1515
|
-
/* @__PURE__ */ e.jsxs(
|
|
1514
|
+
/* @__PURE__ */ e.jsx(Is, { asChild: !0, children: a && /* @__PURE__ */ e.jsx("p", { className: "p-0 text-xs hover:cursor-pointer", children: "| Filter Query" }) }),
|
|
1515
|
+
/* @__PURE__ */ e.jsxs(Vs, { align: "end", className: "w-[600px]", children: [
|
|
1516
1516
|
/* @__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: [
|
|
1517
1517
|
n,
|
|
1518
1518
|
/* @__PURE__ */ e.jsx(
|
|
1519
|
-
|
|
1519
|
+
ga,
|
|
1520
1520
|
{
|
|
1521
|
-
onClick: () =>
|
|
1521
|
+
onClick: () => ct(t),
|
|
1522
1522
|
className: "ml-3 inline-block h-4 w-4 opacity-70 hover:cursor-pointer hover:opacity-100"
|
|
1523
1523
|
}
|
|
1524
1524
|
)
|
|
1525
1525
|
] }) }) }),
|
|
1526
1526
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 pt-2", children: [
|
|
1527
|
-
/* @__PURE__ */ e.jsx(
|
|
1527
|
+
/* @__PURE__ */ e.jsx(dt, { className: "h-4 w-4 opacity-70" }),
|
|
1528
1528
|
/* @__PURE__ */ e.jsx("span", { className: "text-xs text-muted-foreground", children: "A preview of the query with filters applied." })
|
|
1529
1529
|
] })
|
|
1530
1530
|
] })
|
|
@@ -1532,7 +1532,7 @@ function Pn() {
|
|
|
1532
1532
|
}
|
|
1533
1533
|
);
|
|
1534
1534
|
}
|
|
1535
|
-
const
|
|
1535
|
+
const Gn = `
|
|
1536
1536
|
|
|
1537
1537
|
Use the following syntax to create a chart query. Please replace the x-axis, y-axis, stack-by, label, and measure with the actual column names of the table.
|
|
1538
1538
|
|
|
@@ -1579,15 +1579,15 @@ SELECT label, measure FROM table
|
|
|
1579
1579
|
- Label - Category
|
|
1580
1580
|
- Measure - Number
|
|
1581
1581
|
`;
|
|
1582
|
-
function
|
|
1582
|
+
function Jn({
|
|
1583
1583
|
open: s,
|
|
1584
1584
|
setOpen: t,
|
|
1585
1585
|
userInput: a,
|
|
1586
1586
|
setUserInput: n,
|
|
1587
|
-
triggerAIRun:
|
|
1587
|
+
triggerAIRun: l,
|
|
1588
1588
|
setTriggerAIRun: m
|
|
1589
1589
|
}) {
|
|
1590
|
-
const i =
|
|
1590
|
+
const i = Je(null), o = Je(null), { authToken: d } = We(), [p, x] = M(!1), b = c((S) => S.actions.setCardSql), g = k((S) => S.dashboard.baseQueries), h = c((S) => S.actions.setRunSql), u = c((S) => S.actions.setCardType), [j, f] = M([]), v = c((S) => S.currentColumns), O = c((S) => S.card.sql), y = c((S) => S.selectedTableName), L = `
|
|
1591
1591
|
${a}
|
|
1592
1592
|
|
|
1593
1593
|
Database Query Dialect: ${y === "api" || y === "s3" ? "DuckDb" : ""}
|
|
@@ -1595,7 +1595,7 @@ function Gn({
|
|
|
1595
1595
|
Table Columns: ${v == null ? void 0 : v.map((S) => `${S.column_name} | ${S.data_type}`).join(", ")}
|
|
1596
1596
|
User SQL: ${O}
|
|
1597
1597
|
${g && `Base Queries: ${JSON.stringify(g)} `}`, 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.
|
|
1598
|
-
Visual Query Syntax: ${
|
|
1598
|
+
Visual Query Syntax: ${Gn}`, { data: V, isLoading: T, isFetching: C, isError: z, refetch: q } = me({
|
|
1599
1599
|
queryKey: ["ai-query"],
|
|
1600
1600
|
queryFn: () => be(
|
|
1601
1601
|
"https://semaphor.cloud/api/v1/ai",
|
|
@@ -1644,9 +1644,9 @@ function Gn({
|
|
|
1644
1644
|
a && (f((S) => [...S, { role: "user", content: a }]), K(a) && x(!0), n(""), q());
|
|
1645
1645
|
}
|
|
1646
1646
|
U(() => {
|
|
1647
|
-
|
|
1648
|
-
}, [
|
|
1649
|
-
const
|
|
1647
|
+
l && (A(), m(!1));
|
|
1648
|
+
}, [l, m]);
|
|
1649
|
+
const _ = {
|
|
1650
1650
|
//seleect a darker color
|
|
1651
1651
|
// color: '#000',
|
|
1652
1652
|
fontFamily: "Arial, sans-serif",
|
|
@@ -1673,12 +1673,12 @@ function Gn({
|
|
|
1673
1673
|
listStyleType: "disc"
|
|
1674
1674
|
}, te = {
|
|
1675
1675
|
// Override how paragraphs are rendered
|
|
1676
|
-
p: ({ node: S, ...N }) => /* @__PURE__ */ e.jsx("p", { style:
|
|
1676
|
+
p: ({ node: S, ...N }) => /* @__PURE__ */ e.jsx("p", { style: _, ...N }),
|
|
1677
1677
|
code: ({ node: S, ...N }) => /* @__PURE__ */ e.jsx("code", { className: "rounded-sm bg-muted px-2 py-1 text-sm", ...N }),
|
|
1678
1678
|
pre: ({ node: S, ...N }) => /* @__PURE__ */ e.jsxs("pre", { className: "space-y-2 rounded-sm bg-muted/50 p-3", style: W, children: [
|
|
1679
1679
|
/* @__PURE__ */ e.jsx("code", { className: "whitespace-normal text-sm", children: N.children }),
|
|
1680
1680
|
/* @__PURE__ */ e.jsxs("div", { className: "flex justify-start gap-2", children: [
|
|
1681
|
-
/* @__PURE__ */ e.jsx(w, { onClick: G, size: "sm", variant: "outline", children: /* @__PURE__ */ e.jsx(
|
|
1681
|
+
/* @__PURE__ */ e.jsx(w, { onClick: G, size: "sm", variant: "outline", children: /* @__PURE__ */ e.jsx(ga, {}) }),
|
|
1682
1682
|
/* @__PURE__ */ e.jsx(
|
|
1683
1683
|
w,
|
|
1684
1684
|
{
|
|
@@ -1688,7 +1688,7 @@ function Gn({
|
|
|
1688
1688
|
},
|
|
1689
1689
|
size: "sm",
|
|
1690
1690
|
variant: "outline",
|
|
1691
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1691
|
+
children: /* @__PURE__ */ e.jsx(ut, {})
|
|
1692
1692
|
}
|
|
1693
1693
|
)
|
|
1694
1694
|
] })
|
|
@@ -1709,13 +1709,13 @@ function Gn({
|
|
|
1709
1709
|
{
|
|
1710
1710
|
className: "flex items-start rounded-md bg-muted p-3 text-sm",
|
|
1711
1711
|
children: [
|
|
1712
|
-
/* @__PURE__ */ e.jsx(
|
|
1712
|
+
/* @__PURE__ */ e.jsx(Ln, { className: "mr-2 h-5 w-5" }),
|
|
1713
1713
|
/* @__PURE__ */ e.jsx("div", { children: S.content })
|
|
1714
1714
|
]
|
|
1715
1715
|
},
|
|
1716
1716
|
N
|
|
1717
1717
|
) : S.role === "ai" ? /* @__PURE__ */ e.jsx(
|
|
1718
|
-
|
|
1718
|
+
mt,
|
|
1719
1719
|
{
|
|
1720
1720
|
className: "w-full overflow-auto py-1",
|
|
1721
1721
|
components: te,
|
|
@@ -1724,8 +1724,8 @@ function Gn({
|
|
|
1724
1724
|
N
|
|
1725
1725
|
) : /* @__PURE__ */ e.jsx("div", {}, N));
|
|
1726
1726
|
}
|
|
1727
|
-
return /* @__PURE__ */ e.jsxs(
|
|
1728
|
-
/* @__PURE__ */ e.jsx(
|
|
1727
|
+
return /* @__PURE__ */ e.jsxs(ks, { open: s, onOpenChange: t, children: [
|
|
1728
|
+
/* @__PURE__ */ e.jsx(ws, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
1729
1729
|
w,
|
|
1730
1730
|
{
|
|
1731
1731
|
size: "sm",
|
|
@@ -1735,13 +1735,13 @@ function Gn({
|
|
|
1735
1735
|
}
|
|
1736
1736
|
) }),
|
|
1737
1737
|
/* @__PURE__ */ e.jsxs(
|
|
1738
|
-
|
|
1738
|
+
Fs,
|
|
1739
1739
|
{
|
|
1740
1740
|
className: "flex flex-col justify-between overflow-auto sm:max-w-[425px] md:max-h-[625px] md:min-w-[625px]",
|
|
1741
1741
|
children: [
|
|
1742
|
-
/* @__PURE__ */ e.jsxs(
|
|
1743
|
-
/* @__PURE__ */ e.jsx(
|
|
1744
|
-
/* @__PURE__ */ e.jsx(
|
|
1742
|
+
/* @__PURE__ */ e.jsxs(Os, { children: [
|
|
1743
|
+
/* @__PURE__ */ e.jsx(Ms, { children: "Assistant" }),
|
|
1744
|
+
/* @__PURE__ */ e.jsx(Ts, { children: "What can I help you with?" })
|
|
1745
1745
|
] }),
|
|
1746
1746
|
/* @__PURE__ */ e.jsx(
|
|
1747
1747
|
"div",
|
|
@@ -1756,7 +1756,7 @@ function Gn({
|
|
|
1756
1756
|
{
|
|
1757
1757
|
children: /* @__PURE__ */ e.jsxs("div", { className: "flex w-full items-center rounded-md border", children: [
|
|
1758
1758
|
/* @__PURE__ */ e.jsx(
|
|
1759
|
-
|
|
1759
|
+
ja,
|
|
1760
1760
|
{
|
|
1761
1761
|
autoFocus: !0,
|
|
1762
1762
|
ref: i,
|
|
@@ -1784,7 +1784,7 @@ function Gn({
|
|
|
1784
1784
|
size: "sm",
|
|
1785
1785
|
variant: "ghost",
|
|
1786
1786
|
onClick: A,
|
|
1787
|
-
children: !T && !C ? /* @__PURE__ */ e.jsx(
|
|
1787
|
+
children: !T && !C ? /* @__PURE__ */ e.jsx(ht, {}) : /* @__PURE__ */ e.jsx(Ue, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" })
|
|
1788
1788
|
}
|
|
1789
1789
|
)
|
|
1790
1790
|
] })
|
|
@@ -1795,71 +1795,71 @@ function Gn({
|
|
|
1795
1795
|
)
|
|
1796
1796
|
] });
|
|
1797
1797
|
}
|
|
1798
|
-
var
|
|
1798
|
+
var Da = {
|
|
1799
1799
|
color: void 0,
|
|
1800
1800
|
size: void 0,
|
|
1801
1801
|
className: void 0,
|
|
1802
1802
|
style: void 0,
|
|
1803
1803
|
attr: void 0
|
|
1804
|
-
},
|
|
1805
|
-
function
|
|
1804
|
+
}, ta = xe.createContext && /* @__PURE__ */ xe.createContext(Da), Un = ["attr", "size", "title"];
|
|
1805
|
+
function Qn(s, t) {
|
|
1806
1806
|
if (s == null)
|
|
1807
1807
|
return {};
|
|
1808
|
-
var a =
|
|
1808
|
+
var a = Wn(s, t), n, l;
|
|
1809
1809
|
if (Object.getOwnPropertySymbols) {
|
|
1810
1810
|
var m = Object.getOwnPropertySymbols(s);
|
|
1811
|
-
for (
|
|
1812
|
-
n = m[
|
|
1811
|
+
for (l = 0; l < m.length; l++)
|
|
1812
|
+
n = m[l], !(t.indexOf(n) >= 0) && Object.prototype.propertyIsEnumerable.call(s, n) && (a[n] = s[n]);
|
|
1813
1813
|
}
|
|
1814
1814
|
return a;
|
|
1815
1815
|
}
|
|
1816
|
-
function
|
|
1816
|
+
function Wn(s, t) {
|
|
1817
1817
|
if (s == null)
|
|
1818
1818
|
return {};
|
|
1819
|
-
var a = {}, n = Object.keys(s),
|
|
1819
|
+
var a = {}, n = Object.keys(s), l, m;
|
|
1820
1820
|
for (m = 0; m < n.length; m++)
|
|
1821
|
-
|
|
1821
|
+
l = n[m], !(t.indexOf(l) >= 0) && (a[l] = s[l]);
|
|
1822
1822
|
return a;
|
|
1823
1823
|
}
|
|
1824
|
-
function
|
|
1825
|
-
return
|
|
1824
|
+
function is() {
|
|
1825
|
+
return is = Object.assign ? Object.assign.bind() : function(s) {
|
|
1826
1826
|
for (var t = 1; t < arguments.length; t++) {
|
|
1827
1827
|
var a = arguments[t];
|
|
1828
1828
|
for (var n in a)
|
|
1829
1829
|
Object.prototype.hasOwnProperty.call(a, n) && (s[n] = a[n]);
|
|
1830
1830
|
}
|
|
1831
1831
|
return s;
|
|
1832
|
-
},
|
|
1832
|
+
}, is.apply(this, arguments);
|
|
1833
1833
|
}
|
|
1834
|
-
function
|
|
1834
|
+
function na(s, t) {
|
|
1835
1835
|
var a = Object.keys(s);
|
|
1836
1836
|
if (Object.getOwnPropertySymbols) {
|
|
1837
1837
|
var n = Object.getOwnPropertySymbols(s);
|
|
1838
|
-
t && (n = n.filter(function(
|
|
1839
|
-
return Object.getOwnPropertyDescriptor(s,
|
|
1838
|
+
t && (n = n.filter(function(l) {
|
|
1839
|
+
return Object.getOwnPropertyDescriptor(s, l).enumerable;
|
|
1840
1840
|
})), a.push.apply(a, n);
|
|
1841
1841
|
}
|
|
1842
1842
|
return a;
|
|
1843
1843
|
}
|
|
1844
|
-
function
|
|
1844
|
+
function os(s) {
|
|
1845
1845
|
for (var t = 1; t < arguments.length; t++) {
|
|
1846
1846
|
var a = arguments[t] != null ? arguments[t] : {};
|
|
1847
|
-
t % 2 ?
|
|
1848
|
-
|
|
1849
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(s, Object.getOwnPropertyDescriptors(a)) :
|
|
1847
|
+
t % 2 ? na(Object(a), !0).forEach(function(n) {
|
|
1848
|
+
Yn(s, n, a[n]);
|
|
1849
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(s, Object.getOwnPropertyDescriptors(a)) : na(Object(a)).forEach(function(n) {
|
|
1850
1850
|
Object.defineProperty(s, n, Object.getOwnPropertyDescriptor(a, n));
|
|
1851
1851
|
});
|
|
1852
1852
|
}
|
|
1853
1853
|
return s;
|
|
1854
1854
|
}
|
|
1855
|
-
function
|
|
1856
|
-
return t =
|
|
1855
|
+
function Yn(s, t, a) {
|
|
1856
|
+
return t = Zn(t), t in s ? Object.defineProperty(s, t, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : s[t] = a, s;
|
|
1857
1857
|
}
|
|
1858
|
-
function
|
|
1859
|
-
var t =
|
|
1858
|
+
function Zn(s) {
|
|
1859
|
+
var t = Xn(s, "string");
|
|
1860
1860
|
return typeof t == "symbol" ? t : String(t);
|
|
1861
1861
|
}
|
|
1862
|
-
function
|
|
1862
|
+
function Xn(s, t) {
|
|
1863
1863
|
if (typeof s != "object" || s === null)
|
|
1864
1864
|
return s;
|
|
1865
1865
|
var a = s[Symbol.toPrimitive];
|
|
@@ -1871,30 +1871,30 @@ function Zn(s, t) {
|
|
|
1871
1871
|
}
|
|
1872
1872
|
return (t === "string" ? String : Number)(s);
|
|
1873
1873
|
}
|
|
1874
|
-
function
|
|
1875
|
-
return s && s.map((t, a) => /* @__PURE__ */ xe.createElement(t.tag,
|
|
1874
|
+
function Aa(s) {
|
|
1875
|
+
return s && s.map((t, a) => /* @__PURE__ */ xe.createElement(t.tag, os({
|
|
1876
1876
|
key: a
|
|
1877
|
-
}, t.attr),
|
|
1877
|
+
}, t.attr), Aa(t.child)));
|
|
1878
1878
|
}
|
|
1879
1879
|
function pe(s) {
|
|
1880
|
-
return (t) => /* @__PURE__ */ xe.createElement(
|
|
1881
|
-
attr:
|
|
1882
|
-
}, t),
|
|
1880
|
+
return (t) => /* @__PURE__ */ xe.createElement(el, is({
|
|
1881
|
+
attr: os({}, s.attr)
|
|
1882
|
+
}, t), Aa(s.child));
|
|
1883
1883
|
}
|
|
1884
|
-
function
|
|
1884
|
+
function el(s) {
|
|
1885
1885
|
var t = (a) => {
|
|
1886
1886
|
var {
|
|
1887
1887
|
attr: n,
|
|
1888
|
-
size:
|
|
1888
|
+
size: l,
|
|
1889
1889
|
title: m
|
|
1890
|
-
} = s, i =
|
|
1891
|
-
return a.className && (d = a.className), s.className && (d = (d ? d + " " : "") + s.className), /* @__PURE__ */ xe.createElement("svg",
|
|
1890
|
+
} = s, i = Qn(s, Un), o = l || a.size || "1em", d;
|
|
1891
|
+
return a.className && (d = a.className), s.className && (d = (d ? d + " " : "") + s.className), /* @__PURE__ */ xe.createElement("svg", is({
|
|
1892
1892
|
stroke: "currentColor",
|
|
1893
1893
|
fill: "currentColor",
|
|
1894
1894
|
strokeWidth: "0"
|
|
1895
1895
|
}, a.attr, n, i, {
|
|
1896
1896
|
className: d,
|
|
1897
|
-
style:
|
|
1897
|
+
style: os(os({
|
|
1898
1898
|
color: s.color || a.color
|
|
1899
1899
|
}, a.style), s.style),
|
|
1900
1900
|
height: o,
|
|
@@ -1902,27 +1902,27 @@ function Xn(s) {
|
|
|
1902
1902
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1903
1903
|
}), m && /* @__PURE__ */ xe.createElement("title", null, m), s.children);
|
|
1904
1904
|
};
|
|
1905
|
-
return
|
|
1905
|
+
return ta !== void 0 ? /* @__PURE__ */ xe.createElement(ta.Consumer, null, (a) => t(a)) : t(Da);
|
|
1906
1906
|
}
|
|
1907
|
-
function
|
|
1907
|
+
function sl(s) {
|
|
1908
1908
|
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);
|
|
1909
1909
|
}
|
|
1910
|
-
function
|
|
1911
|
-
const { theme: s } =
|
|
1912
|
-
k((
|
|
1913
|
-
const u = k((
|
|
1914
|
-
(
|
|
1910
|
+
function al() {
|
|
1911
|
+
const { theme: s } = xt(), t = Je(), a = Je(), [n, l] = M(!1), [m, i] = M(!1), [o, d] = M(!1), [p, x] = M(""), [b, g] = M(!1), { authToken: h } = We();
|
|
1912
|
+
k((r) => r.selectedSheetId);
|
|
1913
|
+
const u = k((r) => r.dashboard.baseQueries), j = c((r) => r.card), f = k((r) => r.theme), v = c((r) => r.isShowingVisual), O = c(
|
|
1914
|
+
(r) => r.selectedConnectionId
|
|
1915
1915
|
), y = c(
|
|
1916
|
-
(
|
|
1916
|
+
(r) => r.selectedDatabaseName
|
|
1917
1917
|
), L = c(
|
|
1918
|
-
(
|
|
1918
|
+
(r) => r.selectedDatamodelId
|
|
1919
1919
|
), E = c(
|
|
1920
|
-
(
|
|
1920
|
+
(r) => r.selectedSchemaName
|
|
1921
1921
|
);
|
|
1922
1922
|
k(
|
|
1923
|
-
(
|
|
1923
|
+
(r) => r.actions.updateFrameCard
|
|
1924
1924
|
);
|
|
1925
|
-
const V = c((
|
|
1925
|
+
const V = c((r) => r.selectedTableName), T = c((r) => r.card.sql), C = c((r) => r.card.python), z = pt(T, u), q = c((r) => r.selectedConnectionId), K = c((r) => r.frame), A = k((r) => r.filterValues), _ = c((r) => r.applyFilters), {
|
|
1926
1926
|
setCardCustomCfg: W,
|
|
1927
1927
|
setQueryResultColumns: J,
|
|
1928
1928
|
setFilterValues: te,
|
|
@@ -1931,49 +1931,49 @@ function sr() {
|
|
|
1931
1931
|
setQueryError: S,
|
|
1932
1932
|
setPythonStdOut: N,
|
|
1933
1933
|
setCardPreferences: F
|
|
1934
|
-
} = c((
|
|
1935
|
-
(
|
|
1936
|
-
), ae = c((
|
|
1937
|
-
(
|
|
1934
|
+
} = c((r) => r.actions), H = c((r) => r.onSave), fe = c(
|
|
1935
|
+
(r) => r.actions.setApplyFilters
|
|
1936
|
+
), ae = c((r) => r.onClose), I = c((r) => r.actions.setCardData), Z = c((r) => r.actions.setSqlGen), se = c((r) => r.runSql), ye = c((r) => r.actions.setRunSql), ge = c(
|
|
1937
|
+
(r) => r.actions.setIsSqlRunning
|
|
1938
1938
|
), {
|
|
1939
1939
|
data: Q,
|
|
1940
|
-
isLoading:
|
|
1941
|
-
isFetching:
|
|
1940
|
+
isLoading: le,
|
|
1941
|
+
isFetching: re,
|
|
1942
1942
|
isSuccess: ve,
|
|
1943
1943
|
isError: Se,
|
|
1944
|
-
error:
|
|
1945
|
-
status:
|
|
1944
|
+
error: Re,
|
|
1945
|
+
status: Gs,
|
|
1946
1946
|
refetch: ke
|
|
1947
1947
|
} = me({
|
|
1948
1948
|
queryKey: [z, C],
|
|
1949
|
-
queryFn: () =>
|
|
1949
|
+
queryFn: () => fa(
|
|
1950
1950
|
"https://semaphor.cloud/api/v1/query",
|
|
1951
1951
|
(h == null ? void 0 : h.accessToken) || "",
|
|
1952
1952
|
{
|
|
1953
1953
|
connection_id: q,
|
|
1954
1954
|
sql: z,
|
|
1955
|
-
python: C ===
|
|
1956
|
-
active_filters:
|
|
1955
|
+
python: C === Ws ? "" : C,
|
|
1956
|
+
active_filters: _ ? A : []
|
|
1957
1957
|
}
|
|
1958
1958
|
),
|
|
1959
1959
|
enabled: !1,
|
|
1960
1960
|
retry: !1
|
|
1961
1961
|
});
|
|
1962
1962
|
U(() => {
|
|
1963
|
-
if (Q && (I(Q.records), Q.rowLimitExceeded &&
|
|
1963
|
+
if (Q && (I(Q.records), Q.rowLimitExceeded && ys.error("Row limit (10,000) exceeded. Refine your query.", {
|
|
1964
1964
|
position: "top-center",
|
|
1965
1965
|
richColors: !0
|
|
1966
1966
|
}), N((Q == null ? void 0 : Q.output) || ""), Q.records.length > 0)) {
|
|
1967
|
-
const { dimensionKeys:
|
|
1968
|
-
J(
|
|
1967
|
+
const { dimensionKeys: r } = Ns(Q.records);
|
|
1968
|
+
J(r);
|
|
1969
1969
|
}
|
|
1970
1970
|
}, [Q, I, J, N]), U(() => {
|
|
1971
1971
|
se && (ke(), ye(!1));
|
|
1972
1972
|
}, [se, ke, ye]), U(() => {
|
|
1973
|
-
(
|
|
1973
|
+
(le || re) && ge(!0), (Se || ve) && ge(!1), Se ? (S(Re.message), I([]), J([]), N("")) : S("");
|
|
1974
1974
|
}, [
|
|
1975
|
-
re,
|
|
1976
1975
|
le,
|
|
1976
|
+
re,
|
|
1977
1977
|
Q,
|
|
1978
1978
|
N,
|
|
1979
1979
|
Se,
|
|
@@ -1982,17 +1982,17 @@ function sr() {
|
|
|
1982
1982
|
I,
|
|
1983
1983
|
J,
|
|
1984
1984
|
S,
|
|
1985
|
-
|
|
1985
|
+
Re
|
|
1986
1986
|
]);
|
|
1987
|
-
function
|
|
1987
|
+
function us() {
|
|
1988
1988
|
G(""), I([]), Z({}), W(""), F({});
|
|
1989
1989
|
}
|
|
1990
|
-
const
|
|
1991
|
-
a.current =
|
|
1990
|
+
const Ye = (r) => {
|
|
1991
|
+
a.current = r;
|
|
1992
1992
|
};
|
|
1993
|
-
function
|
|
1994
|
-
let
|
|
1995
|
-
T && !T.includes("{{") && (
|
|
1993
|
+
function xs() {
|
|
1994
|
+
let r = T;
|
|
1995
|
+
T && !T.includes("{{") && (r = Hn(T), G(r));
|
|
1996
1996
|
const ie = {
|
|
1997
1997
|
...j,
|
|
1998
1998
|
lastSelectedSchema: E,
|
|
@@ -2001,62 +2001,62 @@ function sr() {
|
|
|
2001
2001
|
lastSelectedTable: V,
|
|
2002
2002
|
connectionId: O,
|
|
2003
2003
|
type: v ? j.type : "table",
|
|
2004
|
-
sql:
|
|
2004
|
+
sql: r,
|
|
2005
2005
|
customCfg: v ? j.customCfg : null
|
|
2006
|
-
},
|
|
2006
|
+
}, He = K.cards.map(
|
|
2007
2007
|
(Ne) => Ne.id === j.id ? ie : Ne
|
|
2008
2008
|
);
|
|
2009
2009
|
H == null || H({
|
|
2010
2010
|
...K,
|
|
2011
|
-
cards:
|
|
2011
|
+
cards: He
|
|
2012
2012
|
});
|
|
2013
2013
|
}
|
|
2014
|
-
function
|
|
2014
|
+
function ps() {
|
|
2015
2015
|
ae == null || ae();
|
|
2016
2016
|
}
|
|
2017
|
-
function
|
|
2017
|
+
function Ze(r) {
|
|
2018
2018
|
const ie = getComputedStyle(
|
|
2019
2019
|
document.documentElement
|
|
2020
|
-
).getPropertyValue(
|
|
2021
|
-
return
|
|
2020
|
+
).getPropertyValue(r);
|
|
2021
|
+
return Xe(ie);
|
|
2022
2022
|
}
|
|
2023
|
-
function
|
|
2024
|
-
const [ie,
|
|
2023
|
+
function Xe(r) {
|
|
2024
|
+
const [ie, He, Ne] = r.split(" "), X = parseFloat(ie), Ga = parseFloat(He), Ja = parseFloat(Ne), Ua = Ga / 100, Js = Ja / 100, je = (1 - Math.abs(2 * Js - 1)) * Ua, we = je * (1 - Math.abs(X / 60 % 2 - 1)), fs = Js - je / 2;
|
|
2025
2025
|
let oe = 0, ce = 0, de = 0;
|
|
2026
|
-
0 <= X && X < 60 ? (oe = je, ce = we, de = 0) : 60 <= X && X < 120 ? (oe = we, ce = je, de = 0) : 120 <= X && X < 180 ? (oe = 0, ce = je, de = we) : 180 <= X && X < 240 ? (oe = 0, ce = we, de = je) : 240 <= X && X < 300 ? (oe = we, ce = 0, de = je) : 300 <= X && X < 360 && (oe = je, ce = 0, de = we), oe = Math.round((oe +
|
|
2027
|
-
const
|
|
2028
|
-
const
|
|
2029
|
-
return
|
|
2026
|
+
0 <= X && X < 60 ? (oe = je, ce = we, de = 0) : 60 <= X && X < 120 ? (oe = we, ce = je, de = 0) : 120 <= X && X < 180 ? (oe = 0, ce = je, de = we) : 180 <= X && X < 240 ? (oe = 0, ce = we, de = je) : 240 <= X && X < 300 ? (oe = we, ce = 0, de = je) : 300 <= X && X < 360 && (oe = je, ce = 0, de = we), oe = Math.round((oe + fs) * 255), ce = Math.round((ce + fs) * 255), de = Math.round((de + fs) * 255);
|
|
2027
|
+
const gs = (Qa) => {
|
|
2028
|
+
const js = Qa.toString(16);
|
|
2029
|
+
return js.length == 1 ? "0" + js : js;
|
|
2030
2030
|
};
|
|
2031
|
-
return `#${
|
|
2031
|
+
return `#${gs(oe)}${gs(ce)}${gs(de)}`;
|
|
2032
2032
|
}
|
|
2033
2033
|
U(() => {
|
|
2034
|
-
const
|
|
2035
|
-
if (
|
|
2036
|
-
const
|
|
2037
|
-
|
|
2034
|
+
const r = t.current, ie = a.current;
|
|
2035
|
+
if (r) {
|
|
2036
|
+
const He = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light", Ne = f === "system" ? He : f;
|
|
2037
|
+
r.editor.defineTheme("default", {
|
|
2038
2038
|
// base: theme === 'light' ? 'hc-light' : 'vs-dark',
|
|
2039
2039
|
base: Ne === "light" ? "vs" : "vs-dark",
|
|
2040
2040
|
inherit: !0,
|
|
2041
2041
|
rules: [],
|
|
2042
2042
|
colors: {
|
|
2043
2043
|
// 'editor.background': activeTheme === 'light' ? '#ffffff' : '#020817',
|
|
2044
|
-
"editor.background": Ne === "light" ? "#ffffff" :
|
|
2044
|
+
"editor.background": Ne === "light" ? "#ffffff" : Ze("--semaphor-background")
|
|
2045
2045
|
}
|
|
2046
|
-
}),
|
|
2046
|
+
}), r.editor.setTheme("default");
|
|
2047
2047
|
}
|
|
2048
|
-
return ie &&
|
|
2049
|
-
|
|
2048
|
+
return ie && r && ie.addCommand(
|
|
2049
|
+
r.KeyMod.Shift | r.KeyCode.Enter,
|
|
2050
2050
|
function() {
|
|
2051
2051
|
return console.log("Executing query..."), ke(), !1;
|
|
2052
2052
|
}
|
|
2053
2053
|
), () => {
|
|
2054
2054
|
};
|
|
2055
2055
|
}, [s, f, t.current]);
|
|
2056
|
-
function
|
|
2057
|
-
t.current =
|
|
2056
|
+
function _e(r) {
|
|
2057
|
+
t.current = r;
|
|
2058
2058
|
}
|
|
2059
|
-
function
|
|
2059
|
+
function es() {
|
|
2060
2060
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2061
2061
|
m && /* @__PURE__ */ e.jsx(
|
|
2062
2062
|
"div",
|
|
@@ -2066,16 +2066,16 @@ function sr() {
|
|
|
2066
2066
|
children: /* @__PURE__ */ e.jsxs("div", { className: "w-[99%]", children: [
|
|
2067
2067
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 pt-3", children: [
|
|
2068
2068
|
/* @__PURE__ */ e.jsx(
|
|
2069
|
-
|
|
2069
|
+
$n,
|
|
2070
2070
|
{
|
|
2071
|
-
checked:
|
|
2072
|
-
onCheckedChange: () => fe(!
|
|
2071
|
+
checked: _,
|
|
2072
|
+
onCheckedChange: () => fe(!_),
|
|
2073
2073
|
text: "Apply Filters"
|
|
2074
2074
|
}
|
|
2075
2075
|
),
|
|
2076
|
-
/* @__PURE__ */ e.jsx(
|
|
2076
|
+
/* @__PURE__ */ e.jsx(Kn, {}),
|
|
2077
2077
|
A && m && /* @__PURE__ */ e.jsx(
|
|
2078
|
-
|
|
2078
|
+
Pe,
|
|
2079
2079
|
{
|
|
2080
2080
|
onClick: () => i(!1),
|
|
2081
2081
|
className: "bg-background/50 text-foreground/50 hover:cursor-pointer hover:text-foreground"
|
|
@@ -2083,13 +2083,13 @@ function sr() {
|
|
|
2083
2083
|
)
|
|
2084
2084
|
] }),
|
|
2085
2085
|
/* @__PURE__ */ e.jsx(
|
|
2086
|
-
|
|
2086
|
+
$e,
|
|
2087
2087
|
{
|
|
2088
2088
|
theme: "default",
|
|
2089
|
-
onChange: (
|
|
2090
|
-
if (
|
|
2089
|
+
onChange: (r) => {
|
|
2090
|
+
if (r)
|
|
2091
2091
|
try {
|
|
2092
|
-
JSON.parse(
|
|
2092
|
+
JSON.parse(r), te(JSON.parse(r));
|
|
2093
2093
|
} catch {
|
|
2094
2094
|
}
|
|
2095
2095
|
},
|
|
@@ -2117,22 +2117,22 @@ function sr() {
|
|
|
2117
2117
|
}
|
|
2118
2118
|
),
|
|
2119
2119
|
A && !m && /* @__PURE__ */ e.jsx(
|
|
2120
|
-
|
|
2120
|
+
ca,
|
|
2121
2121
|
{
|
|
2122
2122
|
onClick: () => i(!0),
|
|
2123
2123
|
className: Y(
|
|
2124
2124
|
"absolute bottom-4 right-6 h-3 w-3 text-foreground/50 hover:cursor-pointer hover:text-foreground",
|
|
2125
2125
|
{
|
|
2126
|
-
"font-bold text-red-800":
|
|
2126
|
+
"font-bold text-red-800": _
|
|
2127
2127
|
}
|
|
2128
2128
|
)
|
|
2129
2129
|
}
|
|
2130
2130
|
)
|
|
2131
2131
|
] });
|
|
2132
2132
|
}
|
|
2133
|
-
function
|
|
2133
|
+
function ss() {
|
|
2134
2134
|
return /* @__PURE__ */ e.jsxs(
|
|
2135
|
-
|
|
2135
|
+
Cs,
|
|
2136
2136
|
{
|
|
2137
2137
|
className: "flex grow pb-1",
|
|
2138
2138
|
direction: "vertical",
|
|
@@ -2152,12 +2152,12 @@ function sr() {
|
|
|
2152
2152
|
role: "sql-container",
|
|
2153
2153
|
className: "relative flex w-[99%]",
|
|
2154
2154
|
children: /* @__PURE__ */ e.jsx(
|
|
2155
|
-
|
|
2155
|
+
$e,
|
|
2156
2156
|
{
|
|
2157
2157
|
theme: "default",
|
|
2158
2158
|
className: "pt-3",
|
|
2159
|
-
onChange: (
|
|
2160
|
-
G(
|
|
2159
|
+
onChange: (r) => {
|
|
2160
|
+
G(r);
|
|
2161
2161
|
},
|
|
2162
2162
|
value: T,
|
|
2163
2163
|
options: {
|
|
@@ -2173,8 +2173,8 @@ function sr() {
|
|
|
2173
2173
|
renderLineHighlight: "none"
|
|
2174
2174
|
},
|
|
2175
2175
|
defaultLanguage: "sql",
|
|
2176
|
-
beforeMount:
|
|
2177
|
-
onMount:
|
|
2176
|
+
beforeMount: _e,
|
|
2177
|
+
onMount: Ye
|
|
2178
2178
|
}
|
|
2179
2179
|
)
|
|
2180
2180
|
}
|
|
@@ -2184,7 +2184,7 @@ function sr() {
|
|
|
2184
2184
|
}
|
|
2185
2185
|
),
|
|
2186
2186
|
n && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2187
|
-
/* @__PURE__ */ e.jsx(
|
|
2187
|
+
/* @__PURE__ */ e.jsx(Ss, { withHandle: !0, className: "border" }),
|
|
2188
2188
|
/* @__PURE__ */ e.jsxs(
|
|
2189
2189
|
Fe,
|
|
2190
2190
|
{
|
|
@@ -2199,14 +2199,14 @@ function sr() {
|
|
|
2199
2199
|
role: "python-container",
|
|
2200
2200
|
className: "relative flex w-[99%] pt-0",
|
|
2201
2201
|
children: /* @__PURE__ */ e.jsx(
|
|
2202
|
-
|
|
2202
|
+
$e,
|
|
2203
2203
|
{
|
|
2204
2204
|
className: "pt-3",
|
|
2205
2205
|
theme: "default",
|
|
2206
|
-
onChange: (
|
|
2207
|
-
ne(
|
|
2206
|
+
onChange: (r) => {
|
|
2207
|
+
ne(r && r.trim() || "");
|
|
2208
2208
|
},
|
|
2209
|
-
value: C ||
|
|
2209
|
+
value: C || Ws,
|
|
2210
2210
|
options: {
|
|
2211
2211
|
minimap: {
|
|
2212
2212
|
enabled: !1
|
|
@@ -2220,8 +2220,8 @@ function sr() {
|
|
|
2220
2220
|
renderLineHighlight: "none"
|
|
2221
2221
|
},
|
|
2222
2222
|
defaultLanguage: "python",
|
|
2223
|
-
beforeMount:
|
|
2224
|
-
onMount:
|
|
2223
|
+
beforeMount: _e,
|
|
2224
|
+
onMount: Ye
|
|
2225
2225
|
}
|
|
2226
2226
|
)
|
|
2227
2227
|
}
|
|
@@ -2249,8 +2249,8 @@ function sr() {
|
|
|
2249
2249
|
role: "sql-editor",
|
|
2250
2250
|
className: "relative flex grow justify-between overflow-y-scroll",
|
|
2251
2251
|
children: [
|
|
2252
|
-
|
|
2253
|
-
|
|
2252
|
+
ss(),
|
|
2253
|
+
es()
|
|
2254
2254
|
]
|
|
2255
2255
|
}
|
|
2256
2256
|
),
|
|
@@ -2265,7 +2265,7 @@ function sr() {
|
|
|
2265
2265
|
w,
|
|
2266
2266
|
{
|
|
2267
2267
|
title: "Shift + Enter",
|
|
2268
|
-
disabled:
|
|
2268
|
+
disabled: le || re,
|
|
2269
2269
|
onClick: () => {
|
|
2270
2270
|
ke();
|
|
2271
2271
|
},
|
|
@@ -2273,15 +2273,15 @@ function sr() {
|
|
|
2273
2273
|
size: "sm",
|
|
2274
2274
|
variant: "outline",
|
|
2275
2275
|
children: [
|
|
2276
|
-
|
|
2276
|
+
le || re ? /* @__PURE__ */ e.jsx(Ue, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(wn, { className: "mr-2 h-4 w-4" }),
|
|
2277
2277
|
"Run"
|
|
2278
2278
|
]
|
|
2279
2279
|
}
|
|
2280
2280
|
),
|
|
2281
2281
|
Se && /* @__PURE__ */ e.jsx(
|
|
2282
|
-
|
|
2282
|
+
Bn,
|
|
2283
2283
|
{
|
|
2284
|
-
error:
|
|
2284
|
+
error: Re.message,
|
|
2285
2285
|
setShowAIDialog: d,
|
|
2286
2286
|
setTriggerAIRun: g,
|
|
2287
2287
|
setUserInputforAI: x
|
|
@@ -2290,36 +2290,36 @@ function sr() {
|
|
|
2290
2290
|
/* @__PURE__ */ e.jsxs(
|
|
2291
2291
|
w,
|
|
2292
2292
|
{
|
|
2293
|
-
onClick:
|
|
2293
|
+
onClick: us,
|
|
2294
2294
|
className: "",
|
|
2295
2295
|
size: "sm",
|
|
2296
2296
|
variant: "outline",
|
|
2297
2297
|
children: [
|
|
2298
|
-
/* @__PURE__ */ e.jsx(
|
|
2298
|
+
/* @__PURE__ */ e.jsx(fn, { className: "mr-2 size-4" }),
|
|
2299
2299
|
"Clear"
|
|
2300
2300
|
]
|
|
2301
2301
|
}
|
|
2302
2302
|
),
|
|
2303
2303
|
/* @__PURE__ */ e.jsx(
|
|
2304
|
-
|
|
2304
|
+
xa,
|
|
2305
2305
|
{
|
|
2306
2306
|
pressed: n,
|
|
2307
|
-
onPressedChange: (
|
|
2307
|
+
onPressedChange: (r) => l(r),
|
|
2308
2308
|
className: "",
|
|
2309
2309
|
size: "sm",
|
|
2310
2310
|
variant: "outline",
|
|
2311
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2311
|
+
children: /* @__PURE__ */ e.jsx(sl, { className: "size-4 text-foreground/70" })
|
|
2312
2312
|
}
|
|
2313
2313
|
),
|
|
2314
2314
|
/* @__PURE__ */ e.jsx(
|
|
2315
|
-
|
|
2315
|
+
Jn,
|
|
2316
2316
|
{
|
|
2317
2317
|
open: o,
|
|
2318
2318
|
setOpen: d,
|
|
2319
2319
|
userInput: p,
|
|
2320
2320
|
triggerAIRun: b,
|
|
2321
2321
|
setTriggerAIRun: g,
|
|
2322
|
-
setUserInput: (
|
|
2322
|
+
setUserInput: (r) => x(r)
|
|
2323
2323
|
}
|
|
2324
2324
|
)
|
|
2325
2325
|
] }),
|
|
@@ -2327,11 +2327,11 @@ function sr() {
|
|
|
2327
2327
|
/* @__PURE__ */ e.jsxs(
|
|
2328
2328
|
w,
|
|
2329
2329
|
{
|
|
2330
|
-
onClick:
|
|
2330
|
+
onClick: xs,
|
|
2331
2331
|
size: "sm",
|
|
2332
2332
|
variant: "outline",
|
|
2333
2333
|
children: [
|
|
2334
|
-
/* @__PURE__ */ e.jsx(
|
|
2334
|
+
/* @__PURE__ */ e.jsx(ft, { className: "mr-2 size-4 font-bold text-green-600" }),
|
|
2335
2335
|
"Accept"
|
|
2336
2336
|
]
|
|
2337
2337
|
}
|
|
@@ -2339,12 +2339,12 @@ function sr() {
|
|
|
2339
2339
|
/* @__PURE__ */ e.jsxs(
|
|
2340
2340
|
w,
|
|
2341
2341
|
{
|
|
2342
|
-
onClick:
|
|
2342
|
+
onClick: ps,
|
|
2343
2343
|
className: "w-full",
|
|
2344
2344
|
size: "sm",
|
|
2345
2345
|
variant: "outline",
|
|
2346
2346
|
children: [
|
|
2347
|
-
/* @__PURE__ */ e.jsx(
|
|
2347
|
+
/* @__PURE__ */ e.jsx(Pe, { className: "mr-2 size-4" }),
|
|
2348
2348
|
"Close"
|
|
2349
2349
|
]
|
|
2350
2350
|
}
|
|
@@ -2358,9 +2358,9 @@ function sr() {
|
|
|
2358
2358
|
)
|
|
2359
2359
|
);
|
|
2360
2360
|
}
|
|
2361
|
-
function
|
|
2361
|
+
function tl({ data: s }) {
|
|
2362
2362
|
var i;
|
|
2363
|
-
const [t, a] = xe.useState([]),
|
|
2363
|
+
const [t, a] = xe.useState([]), l = Object.keys(s[0]).map((o) => ({
|
|
2364
2364
|
// header: key,
|
|
2365
2365
|
accessorKey: o,
|
|
2366
2366
|
header: ({ column: d }) => {
|
|
@@ -2372,40 +2372,40 @@ function ar({ data: s }) {
|
|
|
2372
2372
|
onClick: () => d.toggleSorting(d.getIsSorted() === "asc"),
|
|
2373
2373
|
children: [
|
|
2374
2374
|
o,
|
|
2375
|
-
p === "asc" ? /* @__PURE__ */ e.jsx(
|
|
2375
|
+
p === "asc" ? /* @__PURE__ */ e.jsx(gt, { className: "ml-2 h-5 w-5" }) : p === "desc" ? /* @__PURE__ */ e.jsx(jt, { className: "ml-2 h-5 w-5" }) : null
|
|
2376
2376
|
]
|
|
2377
2377
|
}
|
|
2378
2378
|
) });
|
|
2379
2379
|
}
|
|
2380
|
-
})), m =
|
|
2380
|
+
})), m = bt({
|
|
2381
2381
|
data: s,
|
|
2382
|
-
columns:
|
|
2383
|
-
getCoreRowModel:
|
|
2384
|
-
getPaginationRowModel:
|
|
2382
|
+
columns: l,
|
|
2383
|
+
getCoreRowModel: St(),
|
|
2384
|
+
getPaginationRowModel: kt(),
|
|
2385
2385
|
onSortingChange: a,
|
|
2386
|
-
getSortedRowModel:
|
|
2386
|
+
getSortedRowModel: wt(),
|
|
2387
2387
|
manualPagination: !0,
|
|
2388
2388
|
state: {
|
|
2389
2389
|
sorting: t
|
|
2390
2390
|
}
|
|
2391
2391
|
});
|
|
2392
|
-
return /* @__PURE__ */ e.jsxs(
|
|
2393
|
-
/* @__PURE__ */ e.jsx(
|
|
2392
|
+
return /* @__PURE__ */ e.jsxs(yt, { children: [
|
|
2393
|
+
/* @__PURE__ */ e.jsx(vt, { children: m.getHeaderGroups().map((o) => /* @__PURE__ */ e.jsx(bs, { children: o.headers.map((d) => /* @__PURE__ */ e.jsx(Nt, { className: "sticky top-0 bg-muted", children: d.isPlaceholder ? null : Ys(
|
|
2394
2394
|
d.column.columnDef.header,
|
|
2395
2395
|
d.getContext()
|
|
2396
2396
|
) }, d.id)) }, o.id)) }),
|
|
2397
|
-
/* @__PURE__ */ e.jsx(
|
|
2398
|
-
|
|
2397
|
+
/* @__PURE__ */ e.jsx(Ct, { children: (i = m.getRowModel().rows) != null && i.length ? m.getRowModel().rows.map((o) => /* @__PURE__ */ e.jsx(
|
|
2398
|
+
bs,
|
|
2399
2399
|
{
|
|
2400
2400
|
className: "whitespace-nowrap py-2",
|
|
2401
2401
|
"data-state": o.getIsSelected() && "selected",
|
|
2402
|
-
children: o.getVisibleCells().map((d) => /* @__PURE__ */ e.jsx(
|
|
2402
|
+
children: o.getVisibleCells().map((d) => /* @__PURE__ */ e.jsx(Zs, { children: Ys(d.column.columnDef.cell, d.getContext()) }, d.id))
|
|
2403
2403
|
},
|
|
2404
2404
|
o.id
|
|
2405
|
-
)) : /* @__PURE__ */ e.jsx(
|
|
2405
|
+
)) : /* @__PURE__ */ e.jsx(bs, { children: /* @__PURE__ */ e.jsx(Zs, { colSpan: l.length, className: "h-24 text-center", children: "No results." }) }) })
|
|
2406
2406
|
] });
|
|
2407
2407
|
}
|
|
2408
|
-
function
|
|
2408
|
+
function La({
|
|
2409
2409
|
// card,
|
|
2410
2410
|
showCard: s,
|
|
2411
2411
|
className: t,
|
|
@@ -2413,90 +2413,90 @@ function Aa({
|
|
|
2413
2413
|
}) {
|
|
2414
2414
|
var h;
|
|
2415
2415
|
xe.useState(0);
|
|
2416
|
-
const n = k((u) => u.themeStyle),
|
|
2416
|
+
const n = k((u) => u.themeStyle), l = c((u) => u.card), m = c((u) => u.frame), i = k((u) => u.dashboard.filters), o = k((u) => u.filterValues), d = c((u) => u.actions.setRunSql), { updateFilter: p } = zt(), x = i == null ? void 0 : i.find((u) => u.id === m.filterId), b = c((u) => u.actions.setCard);
|
|
2417
2417
|
if (U(() => {
|
|
2418
2418
|
d(!0);
|
|
2419
2419
|
}, [o]), U(() => {
|
|
2420
2420
|
}, [
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2421
|
+
l.data,
|
|
2422
|
+
l.type,
|
|
2423
|
+
l.cfg,
|
|
2424
|
+
l.customCfg,
|
|
2425
2425
|
n,
|
|
2426
|
-
|
|
2427
|
-
]), !
|
|
2426
|
+
l.preferences
|
|
2427
|
+
]), !l.id)
|
|
2428
2428
|
return null;
|
|
2429
2429
|
let g;
|
|
2430
|
-
return
|
|
2431
|
-
data:
|
|
2432
|
-
cardType:
|
|
2433
|
-
cfg:
|
|
2434
|
-
customCfg:
|
|
2435
|
-
preferences:
|
|
2430
|
+
return l.data && l.data.length > 0 && (g = ba({
|
|
2431
|
+
data: l.data,
|
|
2432
|
+
cardType: l.type,
|
|
2433
|
+
cfg: l.cfg,
|
|
2434
|
+
customCfg: l.customCfg,
|
|
2435
|
+
preferences: l.preferences
|
|
2436
2436
|
})), /* @__PURE__ */ e.jsxs(
|
|
2437
|
-
|
|
2437
|
+
Ft,
|
|
2438
2438
|
{
|
|
2439
2439
|
role: "editor-visual-card",
|
|
2440
2440
|
className: Y("relative flex h-full flex-col rounded-none", t),
|
|
2441
2441
|
...a,
|
|
2442
2442
|
children: [
|
|
2443
|
-
/* @__PURE__ */ e.jsxs(
|
|
2443
|
+
/* @__PURE__ */ e.jsxs(Ot, { className: "flex flex-row items-start justify-between py-4", children: [
|
|
2444
2444
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
2445
2445
|
/* @__PURE__ */ e.jsx(
|
|
2446
|
-
|
|
2446
|
+
ts,
|
|
2447
2447
|
{
|
|
2448
|
-
text:
|
|
2449
|
-
onSave: (u) => b({ ...
|
|
2450
|
-
children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e.jsx(
|
|
2448
|
+
text: l.title,
|
|
2449
|
+
onSave: (u) => b({ ...l, title: u }),
|
|
2450
|
+
children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e.jsx(Mt, { className: "text-base", children: l.title }) })
|
|
2451
2451
|
},
|
|
2452
|
-
|
|
2452
|
+
l.title
|
|
2453
2453
|
),
|
|
2454
2454
|
/* @__PURE__ */ e.jsx(
|
|
2455
|
-
|
|
2455
|
+
ts,
|
|
2456
2456
|
{
|
|
2457
|
-
text:
|
|
2458
|
-
onSave: (u) => b({ ...
|
|
2459
|
-
children: /* @__PURE__ */ e.jsxs(
|
|
2457
|
+
text: l.description || "",
|
|
2458
|
+
onSave: (u) => b({ ...l, description: u }),
|
|
2459
|
+
children: /* @__PURE__ */ e.jsxs(Tt, { children: [
|
|
2460
2460
|
" ",
|
|
2461
|
-
|
|
2461
|
+
l.description
|
|
2462
2462
|
] })
|
|
2463
2463
|
},
|
|
2464
|
-
|
|
2464
|
+
l.description
|
|
2465
2465
|
)
|
|
2466
2466
|
] }),
|
|
2467
2467
|
x && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
2468
2468
|
/* @__PURE__ */ e.jsx(
|
|
2469
|
-
|
|
2469
|
+
ts,
|
|
2470
2470
|
{
|
|
2471
2471
|
className: "my-1",
|
|
2472
2472
|
text: x.title || x.column,
|
|
2473
2473
|
onSave: (u) => p({ ...x, title: u }),
|
|
2474
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2474
|
+
children: /* @__PURE__ */ e.jsx(R, { children: x.title })
|
|
2475
2475
|
}
|
|
2476
2476
|
),
|
|
2477
|
-
|
|
2477
|
+
Dt(x)
|
|
2478
2478
|
] })
|
|
2479
2479
|
] }),
|
|
2480
|
-
/* @__PURE__ */ e.jsxs(
|
|
2481
|
-
|
|
2480
|
+
/* @__PURE__ */ e.jsxs(At, { className: "flex grow flex-col pb-3", children: [
|
|
2481
|
+
l.type !== "table" && g && // <ChartJsVisual key={visualKey} cfg={cfg} />
|
|
2482
2482
|
/* @__PURE__ */ e.jsx(
|
|
2483
|
-
|
|
2483
|
+
Lt,
|
|
2484
2484
|
{
|
|
2485
2485
|
cfg: g
|
|
2486
2486
|
},
|
|
2487
|
-
JSON.stringify(g) + JSON.stringify(
|
|
2487
|
+
JSON.stringify(g) + JSON.stringify(l.preferences) + ((h = l == null ? void 0 : l.preferences) == null ? void 0 : h.customVisualCode)
|
|
2488
2488
|
),
|
|
2489
|
-
|
|
2490
|
-
/* @__PURE__ */ e.jsx(
|
|
2489
|
+
l.type === "table" && l.data && l.data.length > 0 && // All of the below css classes are #IMPORTANT for the table to scroll properly
|
|
2490
|
+
/* @__PURE__ */ e.jsx(Et, { className: "flex min-h-0 flex-1 grow basis-0", children: /* @__PURE__ */ e.jsx(It, { card: l, data: l == null ? void 0 : l.data }) })
|
|
2491
2491
|
] })
|
|
2492
2492
|
]
|
|
2493
2493
|
}
|
|
2494
2494
|
);
|
|
2495
2495
|
}
|
|
2496
|
-
function
|
|
2497
|
-
const [s, t] = M(!1), [a, n] = M(""), [
|
|
2496
|
+
function nl() {
|
|
2497
|
+
const [s, t] = M(!1), [a, n] = M(""), [l, m] = M(""), [i, o] = M(""), [d, p] = M(""), x = c((y) => y.card), b = c(
|
|
2498
2498
|
(y) => y.card.customCfg
|
|
2499
|
-
), { setCardCustomCfg: g, setCustomVisualCode: h } =
|
|
2499
|
+
), { setCardCustomCfg: g, setCustomVisualCode: h } = Rs();
|
|
2500
2500
|
function u(y) {
|
|
2501
2501
|
var V, T;
|
|
2502
2502
|
const L = {
|
|
@@ -2515,7 +2515,7 @@ function tr() {
|
|
|
2515
2515
|
var L, E;
|
|
2516
2516
|
if (!x.data || x.data.length === 0)
|
|
2517
2517
|
return;
|
|
2518
|
-
const y =
|
|
2518
|
+
const y = ba({
|
|
2519
2519
|
data: x.data,
|
|
2520
2520
|
cardType: x.type,
|
|
2521
2521
|
cfg: x.cfg,
|
|
@@ -2524,9 +2524,9 @@ function tr() {
|
|
|
2524
2524
|
y && (n(JSON.stringify(y, null, 1)), (L = x == null ? void 0 : x.preferences) != null && L.customVisualCode && o((E = x == null ? void 0 : x.preferences) == null ? void 0 : E.customVisualCode), b && m(JSON.stringify(b, null, 1)));
|
|
2525
2525
|
}
|
|
2526
2526
|
function f() {
|
|
2527
|
-
if (i && h(i), !!
|
|
2527
|
+
if (i && h(i), !!l)
|
|
2528
2528
|
try {
|
|
2529
|
-
const y = JSON.parse(
|
|
2529
|
+
const y = JSON.parse(l);
|
|
2530
2530
|
return y ? (g(y), p(""), m(""), y) : void 0;
|
|
2531
2531
|
} catch (y) {
|
|
2532
2532
|
console.log(y), p("Invalid JSON");
|
|
@@ -2538,33 +2538,33 @@ function tr() {
|
|
|
2538
2538
|
function O() {
|
|
2539
2539
|
let y;
|
|
2540
2540
|
if (b) {
|
|
2541
|
-
const L =
|
|
2541
|
+
const L = Xs.cloneDeep(x.cfg), E = Xs.merge(L, b);
|
|
2542
2542
|
return y = u(E), y;
|
|
2543
2543
|
}
|
|
2544
2544
|
return a ? (y = u(JSON.parse(a)), y) : "";
|
|
2545
2545
|
}
|
|
2546
|
-
return /* @__PURE__ */ e.jsxs(
|
|
2547
|
-
/* @__PURE__ */ e.jsx(
|
|
2546
|
+
return /* @__PURE__ */ e.jsxs(ks, { open: s, onOpenChange: t, children: [
|
|
2547
|
+
/* @__PURE__ */ e.jsx(ws, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
2548
2548
|
w,
|
|
2549
2549
|
{
|
|
2550
2550
|
onClick: j,
|
|
2551
2551
|
className: ` ${b && "border-foreground/50 dark:border-foreground/70"}`,
|
|
2552
2552
|
size: "sm",
|
|
2553
2553
|
variant: "outline",
|
|
2554
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2554
|
+
children: /* @__PURE__ */ e.jsx(Vt, { className: "h-4 w-4" })
|
|
2555
2555
|
}
|
|
2556
2556
|
) }),
|
|
2557
2557
|
/* @__PURE__ */ e.jsxs(
|
|
2558
|
-
|
|
2558
|
+
Fs,
|
|
2559
2559
|
{
|
|
2560
2560
|
className: "max-h-[70vh] min-h-[70vh] overflow-auto sm:min-w-[900px] lg:min-w-[1200px]",
|
|
2561
2561
|
children: [
|
|
2562
|
-
/* @__PURE__ */ e.jsxs(
|
|
2562
|
+
/* @__PURE__ */ e.jsxs(Os, { className: "", children: [
|
|
2563
2563
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2564
|
-
/* @__PURE__ */ e.jsx(
|
|
2565
|
-
/* @__PURE__ */ e.jsxs(
|
|
2566
|
-
/* @__PURE__ */ e.jsx(
|
|
2567
|
-
|
|
2564
|
+
/* @__PURE__ */ e.jsx(Ms, { children: "Customize Card" }),
|
|
2565
|
+
/* @__PURE__ */ e.jsxs(Ds, { children: [
|
|
2566
|
+
/* @__PURE__ */ e.jsx(da, { children: /* @__PURE__ */ e.jsx(
|
|
2567
|
+
yn,
|
|
2568
2568
|
{
|
|
2569
2569
|
onClick: () => {
|
|
2570
2570
|
navigator.clipboard.writeText(x.id);
|
|
@@ -2572,10 +2572,10 @@ function tr() {
|
|
|
2572
2572
|
className: "size-3 cursor-pointer text-muted-foreground/70 transition-colors hover:text-muted-foreground"
|
|
2573
2573
|
}
|
|
2574
2574
|
) }),
|
|
2575
|
-
/* @__PURE__ */ e.jsx(
|
|
2575
|
+
/* @__PURE__ */ e.jsx(As, { side: "right", align: "center", children: /* @__PURE__ */ e.jsx("p", { className: "text-xs", children: "Copy Card ID" }) })
|
|
2576
2576
|
] })
|
|
2577
2577
|
] }),
|
|
2578
|
-
/* @__PURE__ */ e.jsxs(
|
|
2578
|
+
/* @__PURE__ */ e.jsxs(Ts, { children: [
|
|
2579
2579
|
"See the configuration options and documentation",
|
|
2580
2580
|
/* @__PURE__ */ e.jsx(
|
|
2581
2581
|
"a",
|
|
@@ -2589,23 +2589,23 @@ function tr() {
|
|
|
2589
2589
|
] })
|
|
2590
2590
|
] }),
|
|
2591
2591
|
/* @__PURE__ */ e.jsxs("div", { className: "flex grow gap-2", children: [
|
|
2592
|
-
/* @__PURE__ */ e.jsx(
|
|
2593
|
-
/* @__PURE__ */ e.jsxs(
|
|
2594
|
-
/* @__PURE__ */ e.jsxs(
|
|
2595
|
-
/* @__PURE__ */ e.jsxs(
|
|
2596
|
-
b && /* @__PURE__ */ e.jsx(
|
|
2592
|
+
/* @__PURE__ */ e.jsx(La, { className: "w-1/2 rounded shadow-none" }),
|
|
2593
|
+
/* @__PURE__ */ e.jsxs(ya, { defaultValue: "custom-config", className: "flex w-1/2 flex-col", children: [
|
|
2594
|
+
/* @__PURE__ */ e.jsxs(va, { className: "justify-start rounded-sm rounded-b-none border border-b-0", children: [
|
|
2595
|
+
/* @__PURE__ */ e.jsxs(ns, { value: "custom-config", children: [
|
|
2596
|
+
b && /* @__PURE__ */ e.jsx(Na, { className: "mr-1 h-5 w-5 text-green-600" }),
|
|
2597
2597
|
b ? "Custom Config" : "Default Config"
|
|
2598
2598
|
] }),
|
|
2599
|
-
/* @__PURE__ */ e.jsx(
|
|
2600
|
-
/* @__PURE__ */ e.jsx(
|
|
2599
|
+
/* @__PURE__ */ e.jsx(ns, { className: "", value: "output", children: "Output" }),
|
|
2600
|
+
/* @__PURE__ */ e.jsx(ns, { className: "", value: "custom-code", children: "Custom Code" })
|
|
2601
2601
|
] }),
|
|
2602
2602
|
/* @__PURE__ */ e.jsx(
|
|
2603
|
-
|
|
2603
|
+
ls,
|
|
2604
2604
|
{
|
|
2605
2605
|
className: "bg-red-x mt-0 grow rounded-b border border-t-0 p-2",
|
|
2606
2606
|
value: "output",
|
|
2607
2607
|
children: /* @__PURE__ */ e.jsx(
|
|
2608
|
-
|
|
2608
|
+
ja,
|
|
2609
2609
|
{
|
|
2610
2610
|
disabled: !0,
|
|
2611
2611
|
value: a,
|
|
@@ -2615,12 +2615,12 @@ function tr() {
|
|
|
2615
2615
|
}
|
|
2616
2616
|
),
|
|
2617
2617
|
/* @__PURE__ */ e.jsx(
|
|
2618
|
-
|
|
2618
|
+
ls,
|
|
2619
2619
|
{
|
|
2620
2620
|
className: "mt-0 grow rounded-b border border-t-0",
|
|
2621
2621
|
value: "custom-config",
|
|
2622
2622
|
children: /* @__PURE__ */ e.jsx(
|
|
2623
|
-
|
|
2623
|
+
$e,
|
|
2624
2624
|
{
|
|
2625
2625
|
className: "h-full w-full overflow-hidden",
|
|
2626
2626
|
theme: "default",
|
|
@@ -2644,12 +2644,12 @@ function tr() {
|
|
|
2644
2644
|
}
|
|
2645
2645
|
),
|
|
2646
2646
|
/* @__PURE__ */ e.jsx(
|
|
2647
|
-
|
|
2647
|
+
ls,
|
|
2648
2648
|
{
|
|
2649
2649
|
className: "mt-0 grow rounded-b border border-t-0",
|
|
2650
2650
|
value: "custom-code",
|
|
2651
2651
|
children: /* @__PURE__ */ e.jsx(
|
|
2652
|
-
|
|
2652
|
+
$e,
|
|
2653
2653
|
{
|
|
2654
2654
|
className: "h-full w-full overflow-hidden",
|
|
2655
2655
|
theme: "default",
|
|
@@ -2674,8 +2674,8 @@ function tr() {
|
|
|
2674
2674
|
)
|
|
2675
2675
|
] })
|
|
2676
2676
|
] }),
|
|
2677
|
-
/* @__PURE__ */ e.jsxs(
|
|
2678
|
-
/* @__PURE__ */ e.jsx(
|
|
2677
|
+
/* @__PURE__ */ e.jsxs(ia, { className: "flex items-center", children: [
|
|
2678
|
+
/* @__PURE__ */ e.jsx(R, { className: "mr-2 text-red-500", children: d }),
|
|
2679
2679
|
/* @__PURE__ */ e.jsx(
|
|
2680
2680
|
w,
|
|
2681
2681
|
{
|
|
@@ -2693,47 +2693,47 @@ function tr() {
|
|
|
2693
2693
|
)
|
|
2694
2694
|
] });
|
|
2695
2695
|
}
|
|
2696
|
-
function
|
|
2696
|
+
function Ea(s) {
|
|
2697
2697
|
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);
|
|
2698
2698
|
}
|
|
2699
|
-
function
|
|
2699
|
+
function Ia(s) {
|
|
2700
2700
|
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);
|
|
2701
2701
|
}
|
|
2702
|
-
function
|
|
2702
|
+
function Va(s) {
|
|
2703
2703
|
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);
|
|
2704
2704
|
}
|
|
2705
|
-
function
|
|
2705
|
+
function qa(s) {
|
|
2706
2706
|
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);
|
|
2707
2707
|
}
|
|
2708
|
-
function
|
|
2708
|
+
function Ra(s) {
|
|
2709
2709
|
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);
|
|
2710
2710
|
}
|
|
2711
|
-
function
|
|
2711
|
+
function _a(s) {
|
|
2712
2712
|
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);
|
|
2713
2713
|
}
|
|
2714
|
-
function
|
|
2714
|
+
function Ha(s) {
|
|
2715
2715
|
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);
|
|
2716
2716
|
}
|
|
2717
|
-
function
|
|
2717
|
+
function Ba(s) {
|
|
2718
2718
|
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);
|
|
2719
2719
|
}
|
|
2720
|
-
function
|
|
2721
|
-
const [s, t] = M(!1), a = c((d) => d.card.type), { setCardType: n, setCardPreferences:
|
|
2720
|
+
function ll() {
|
|
2721
|
+
const [s, t] = M(!1), a = c((d) => d.card.type), { setCardType: n, setCardPreferences: l, setChartOrientation: m } = c((d) => d.actions), i = c(
|
|
2722
2722
|
(d) => d.actions.setCardCustomCfg
|
|
2723
2723
|
);
|
|
2724
2724
|
function o(d) {
|
|
2725
|
-
i(null),
|
|
2725
|
+
i(null), l({}), n(d), t(!1);
|
|
2726
2726
|
}
|
|
2727
|
-
return /* @__PURE__ */ e.jsxs(
|
|
2728
|
-
/* @__PURE__ */ e.jsx(
|
|
2729
|
-
/* @__PURE__ */ e.jsx(
|
|
2727
|
+
return /* @__PURE__ */ e.jsxs(cs, { open: s, onOpenChange: t, children: [
|
|
2728
|
+
/* @__PURE__ */ e.jsx(ds, { asChild: !0, children: /* @__PURE__ */ e.jsx(w, { size: "sm", variant: "outline", children: /* @__PURE__ */ e.jsx(rl, { className: "h-4 w-4", chartType: a }) }) }),
|
|
2729
|
+
/* @__PURE__ */ e.jsx(hs, { className: "w-50", children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-3 place-items-center", children: [
|
|
2730
2730
|
/* @__PURE__ */ e.jsx(
|
|
2731
2731
|
w,
|
|
2732
2732
|
{
|
|
2733
2733
|
onClick: () => o("bar"),
|
|
2734
2734
|
className: "font-normal",
|
|
2735
2735
|
variant: "ghost",
|
|
2736
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2736
|
+
children: /* @__PURE__ */ e.jsx(Bs, { className: "size-5" })
|
|
2737
2737
|
}
|
|
2738
2738
|
),
|
|
2739
2739
|
/* @__PURE__ */ e.jsx(
|
|
@@ -2741,7 +2741,7 @@ function nr() {
|
|
|
2741
2741
|
{
|
|
2742
2742
|
onClick: () => o("line"),
|
|
2743
2743
|
variant: "ghost",
|
|
2744
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2744
|
+
children: /* @__PURE__ */ e.jsx($s, { className: "size-5" })
|
|
2745
2745
|
}
|
|
2746
2746
|
),
|
|
2747
2747
|
/* @__PURE__ */ e.jsx(
|
|
@@ -2749,7 +2749,7 @@ function nr() {
|
|
|
2749
2749
|
{
|
|
2750
2750
|
onClick: () => o("stackedBar"),
|
|
2751
2751
|
variant: "ghost",
|
|
2752
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2752
|
+
children: /* @__PURE__ */ e.jsx(_a, { className: "size-5", strokeWidth: 0 })
|
|
2753
2753
|
}
|
|
2754
2754
|
),
|
|
2755
2755
|
/* @__PURE__ */ e.jsx(
|
|
@@ -2757,7 +2757,7 @@ function nr() {
|
|
|
2757
2757
|
{
|
|
2758
2758
|
onClick: () => o("stackedLine"),
|
|
2759
2759
|
variant: "ghost",
|
|
2760
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2760
|
+
children: /* @__PURE__ */ e.jsx(Ra, { className: "size-5", strokeWidth: 0 })
|
|
2761
2761
|
}
|
|
2762
2762
|
),
|
|
2763
2763
|
/* @__PURE__ */ e.jsx(
|
|
@@ -2765,7 +2765,7 @@ function nr() {
|
|
|
2765
2765
|
{
|
|
2766
2766
|
onClick: () => o("scatter"),
|
|
2767
2767
|
variant: "ghost",
|
|
2768
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2768
|
+
children: /* @__PURE__ */ e.jsx(Oa, { className: "size-5" })
|
|
2769
2769
|
}
|
|
2770
2770
|
),
|
|
2771
2771
|
/* @__PURE__ */ e.jsx(
|
|
@@ -2773,7 +2773,7 @@ function nr() {
|
|
|
2773
2773
|
{
|
|
2774
2774
|
onClick: () => o("bubble"),
|
|
2775
2775
|
variant: "ghost",
|
|
2776
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2776
|
+
children: /* @__PURE__ */ e.jsx(qa, { className: "size-4" })
|
|
2777
2777
|
}
|
|
2778
2778
|
),
|
|
2779
2779
|
/* @__PURE__ */ e.jsx(
|
|
@@ -2781,7 +2781,7 @@ function nr() {
|
|
|
2781
2781
|
{
|
|
2782
2782
|
onClick: () => o("pie"),
|
|
2783
2783
|
variant: "ghost",
|
|
2784
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2784
|
+
children: /* @__PURE__ */ e.jsx(Fa, { className: "size-5" })
|
|
2785
2785
|
}
|
|
2786
2786
|
),
|
|
2787
2787
|
/* @__PURE__ */ e.jsx(
|
|
@@ -2789,7 +2789,7 @@ function nr() {
|
|
|
2789
2789
|
{
|
|
2790
2790
|
onClick: () => o("doughnut"),
|
|
2791
2791
|
variant: "ghost",
|
|
2792
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2792
|
+
children: /* @__PURE__ */ e.jsx(Ia, { className: "size-5", strokeWidth: 1 })
|
|
2793
2793
|
}
|
|
2794
2794
|
),
|
|
2795
2795
|
/* @__PURE__ */ e.jsx(
|
|
@@ -2798,7 +2798,7 @@ function nr() {
|
|
|
2798
2798
|
onClick: () => o("radar"),
|
|
2799
2799
|
variant: "ghost",
|
|
2800
2800
|
children: /* @__PURE__ */ e.jsx(
|
|
2801
|
-
|
|
2801
|
+
Ea,
|
|
2802
2802
|
{
|
|
2803
2803
|
className: "size-5 font-extralight",
|
|
2804
2804
|
strokeWidth: 0.5
|
|
@@ -2811,7 +2811,7 @@ function nr() {
|
|
|
2811
2811
|
{
|
|
2812
2812
|
onClick: () => o("polarArea"),
|
|
2813
2813
|
variant: "ghost",
|
|
2814
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2814
|
+
children: /* @__PURE__ */ e.jsx(Va, { className: "size-5" })
|
|
2815
2815
|
}
|
|
2816
2816
|
),
|
|
2817
2817
|
/* @__PURE__ */ e.jsx(
|
|
@@ -2819,7 +2819,7 @@ function nr() {
|
|
|
2819
2819
|
{
|
|
2820
2820
|
onClick: () => o("pyramid"),
|
|
2821
2821
|
variant: "ghost",
|
|
2822
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2822
|
+
children: /* @__PURE__ */ e.jsx(Ba, { className: "size-5" })
|
|
2823
2823
|
}
|
|
2824
2824
|
),
|
|
2825
2825
|
/* @__PURE__ */ e.jsx(
|
|
@@ -2827,7 +2827,7 @@ function nr() {
|
|
|
2827
2827
|
{
|
|
2828
2828
|
onClick: () => o("range"),
|
|
2829
2829
|
variant: "ghost",
|
|
2830
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2830
|
+
children: /* @__PURE__ */ e.jsx(wa, { className: "size-5" })
|
|
2831
2831
|
}
|
|
2832
2832
|
),
|
|
2833
2833
|
/* @__PURE__ */ e.jsx(
|
|
@@ -2835,7 +2835,7 @@ function nr() {
|
|
|
2835
2835
|
{
|
|
2836
2836
|
onClick: () => o("table"),
|
|
2837
2837
|
variant: "ghost",
|
|
2838
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2838
|
+
children: /* @__PURE__ */ e.jsx(Ls, { className: "size-5" })
|
|
2839
2839
|
}
|
|
2840
2840
|
),
|
|
2841
2841
|
/* @__PURE__ */ e.jsx(
|
|
@@ -2843,7 +2843,7 @@ function nr() {
|
|
|
2843
2843
|
{
|
|
2844
2844
|
onClick: () => o("kpi"),
|
|
2845
2845
|
variant: "ghost",
|
|
2846
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2846
|
+
children: /* @__PURE__ */ e.jsx(Ha, { className: "size-6" })
|
|
2847
2847
|
}
|
|
2848
2848
|
),
|
|
2849
2849
|
/* @__PURE__ */ e.jsx(
|
|
@@ -2851,50 +2851,50 @@ function nr() {
|
|
|
2851
2851
|
{
|
|
2852
2852
|
onClick: () => o("text"),
|
|
2853
2853
|
variant: "ghost",
|
|
2854
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2854
|
+
children: /* @__PURE__ */ e.jsx(Ps, { className: "size-4" })
|
|
2855
2855
|
}
|
|
2856
2856
|
)
|
|
2857
2857
|
] }) })
|
|
2858
2858
|
] });
|
|
2859
2859
|
}
|
|
2860
|
-
function
|
|
2860
|
+
function rl({ chartType: s, className: t }) {
|
|
2861
2861
|
switch (s) {
|
|
2862
2862
|
case "bar":
|
|
2863
|
-
return /* @__PURE__ */ e.jsx(Hs, { className: t });
|
|
2864
|
-
case "line":
|
|
2865
2863
|
return /* @__PURE__ */ e.jsx(Bs, { className: t });
|
|
2864
|
+
case "line":
|
|
2865
|
+
return /* @__PURE__ */ e.jsx($s, { className: t });
|
|
2866
2866
|
case "pie":
|
|
2867
|
-
return /* @__PURE__ */ e.jsx(
|
|
2867
|
+
return /* @__PURE__ */ e.jsx(Fa, { className: t });
|
|
2868
2868
|
case "radar":
|
|
2869
|
-
return /* @__PURE__ */ e.jsx(
|
|
2869
|
+
return /* @__PURE__ */ e.jsx(Ea, { className: t });
|
|
2870
2870
|
case "scatter":
|
|
2871
|
-
return /* @__PURE__ */ e.jsx(
|
|
2871
|
+
return /* @__PURE__ */ e.jsx(Oa, { className: t });
|
|
2872
2872
|
case "bubble":
|
|
2873
|
-
return /* @__PURE__ */ e.jsx(
|
|
2873
|
+
return /* @__PURE__ */ e.jsx(qa, { className: t });
|
|
2874
2874
|
case "doughnut":
|
|
2875
|
-
return /* @__PURE__ */ e.jsx(
|
|
2875
|
+
return /* @__PURE__ */ e.jsx(Ia, { className: t });
|
|
2876
2876
|
case "stackedBar":
|
|
2877
|
-
return /* @__PURE__ */ e.jsx(
|
|
2877
|
+
return /* @__PURE__ */ e.jsx(_a, { className: "size-4 text-foreground/70" });
|
|
2878
2878
|
case "stackedLine":
|
|
2879
|
-
return /* @__PURE__ */ e.jsx(
|
|
2879
|
+
return /* @__PURE__ */ e.jsx(Ra, { className: "size-4 text-foreground/70" });
|
|
2880
2880
|
case "polarArea":
|
|
2881
|
-
return /* @__PURE__ */ e.jsx(
|
|
2881
|
+
return /* @__PURE__ */ e.jsx(Va, { className: t });
|
|
2882
2882
|
case "pyramid":
|
|
2883
|
-
return /* @__PURE__ */ e.jsx(
|
|
2883
|
+
return /* @__PURE__ */ e.jsx(Ba, { className: t });
|
|
2884
2884
|
case "range":
|
|
2885
|
-
return /* @__PURE__ */ e.jsx(
|
|
2885
|
+
return /* @__PURE__ */ e.jsx(wa, { className: t });
|
|
2886
2886
|
case "kpi":
|
|
2887
|
-
return /* @__PURE__ */ e.jsx(
|
|
2887
|
+
return /* @__PURE__ */ e.jsx(Ha, { className: t });
|
|
2888
2888
|
case "text":
|
|
2889
|
-
return /* @__PURE__ */ e.jsx(
|
|
2889
|
+
return /* @__PURE__ */ e.jsx(Ps, { className: t });
|
|
2890
2890
|
default:
|
|
2891
|
-
return /* @__PURE__ */ e.jsx(
|
|
2891
|
+
return /* @__PURE__ */ e.jsx(Ls, { className: t });
|
|
2892
2892
|
}
|
|
2893
2893
|
}
|
|
2894
|
-
function
|
|
2895
|
-
const s = c((f) => f.frame), t = c((f) => f.card), a = c((f) => f.card.data), n = c((f) => f.isShowingVisual),
|
|
2894
|
+
function la() {
|
|
2895
|
+
const s = c((f) => f.frame), t = c((f) => f.card), a = c((f) => f.card.data), n = c((f) => f.isShowingVisual), l = c((f) => f.isSqlRunning), m = c((f) => f.queryError), i = c((f) => f.pythonStdOut), o = c((f) => f.actions.setRunSql);
|
|
2896
2896
|
c((f) => f.onSave), c((f) => f.onClose), c((f) => f.actions.setCardSql), c((f) => f.actions.setCardType), c((f) => f.actions.setSqlGen);
|
|
2897
|
-
const { setFrame: d, setCard: p, updateCardInFrame: x } =
|
|
2897
|
+
const { setFrame: d, setCard: p, updateCardInFrame: x } = Rs();
|
|
2898
2898
|
if (!t)
|
|
2899
2899
|
return /* @__PURE__ */ e.jsx(e.Fragment, { children: "No Active Card" });
|
|
2900
2900
|
function b() {
|
|
@@ -2941,26 +2941,26 @@ function na() {
|
|
|
2941
2941
|
}
|
|
2942
2942
|
function u() {
|
|
2943
2943
|
return /* @__PURE__ */ e.jsxs(
|
|
2944
|
-
|
|
2944
|
+
ya,
|
|
2945
2945
|
{
|
|
2946
2946
|
onValueChange: h,
|
|
2947
2947
|
value: s.activeCardId,
|
|
2948
2948
|
className: "flex grow flex-col pb-3",
|
|
2949
2949
|
children: [
|
|
2950
|
-
s.cards.map((f) => /* @__PURE__ */ e.jsx(
|
|
2951
|
-
/* @__PURE__ */ e.jsxs(
|
|
2950
|
+
s.cards.map((f) => /* @__PURE__ */ e.jsx(ls, { className: "mt-0 grow", value: f.id, children: /* @__PURE__ */ e.jsx(La, { showCard: f, className: "grow border-none shadow-none" }) }, f.id)),
|
|
2951
|
+
/* @__PURE__ */ e.jsxs(va, { className: "mx-6 justify-between", children: [
|
|
2952
2952
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
|
|
2953
2953
|
s.cards.map((f) => /* @__PURE__ */ e.jsx(
|
|
2954
|
-
|
|
2954
|
+
ts,
|
|
2955
2955
|
{
|
|
2956
2956
|
text: f.tabTitle || f.title,
|
|
2957
2957
|
onSave: (v) => {
|
|
2958
2958
|
p({ ...t, tabTitle: v }), x({ ...t, tabTitle: v });
|
|
2959
2959
|
},
|
|
2960
|
-
children: /* @__PURE__ */ e.jsxs(
|
|
2960
|
+
children: /* @__PURE__ */ e.jsxs(ns, { className: "", value: f.id, children: [
|
|
2961
2961
|
f.tabTitle || f.title,
|
|
2962
2962
|
s.activeCardId === f.id && s.cards.length > 1 && /* @__PURE__ */ e.jsx(
|
|
2963
|
-
|
|
2963
|
+
Ca,
|
|
2964
2964
|
{
|
|
2965
2965
|
className: "ml-2 size-3.5 text-muted-foreground hover:text-foreground",
|
|
2966
2966
|
onClick: () => g(f.id)
|
|
@@ -2976,27 +2976,27 @@ function na() {
|
|
|
2976
2976
|
className: "ml-1 h-8 px-2 hover:bg-muted-foreground/50",
|
|
2977
2977
|
variant: "outline",
|
|
2978
2978
|
onClick: b,
|
|
2979
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2979
|
+
children: /* @__PURE__ */ e.jsx(zs, { className: "h-4 w-4" })
|
|
2980
2980
|
}
|
|
2981
2981
|
)
|
|
2982
2982
|
] }),
|
|
2983
|
-
/* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx(w, { className: "p-1", variant: "ghost", children: /* @__PURE__ */ e.jsx(
|
|
2983
|
+
/* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsx(w, { className: "p-1", variant: "ghost", children: /* @__PURE__ */ e.jsx(ka, { className: "size-4" }) }) })
|
|
2984
2984
|
] })
|
|
2985
2985
|
]
|
|
2986
2986
|
}
|
|
2987
2987
|
);
|
|
2988
2988
|
}
|
|
2989
2989
|
function j() {
|
|
2990
|
-
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(
|
|
2990
|
+
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(qt, { isLoading: l, 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(Rt, { isLoading: l, card: t }) }) }) : u();
|
|
2991
2991
|
}
|
|
2992
2992
|
return /* @__PURE__ */ e.jsxs("div", { className: "relative flex h-full flex-col pt-3", children: [
|
|
2993
|
-
|
|
2993
|
+
l && /* @__PURE__ */ e.jsx(Ue, { className: "absolute bottom-0 left-0 right-0 top-0 z-10 m-auto h-10 w-10 animate-spin text-foreground/10" }),
|
|
2994
2994
|
/* @__PURE__ */ e.jsxs("div", { className: "mb-0 flex min-h-10 items-center justify-end gap-2 px-6", children: [
|
|
2995
2995
|
n && /* @__PURE__ */ e.jsxs("div", { className: "flex grow items-center gap-2", children: [
|
|
2996
|
-
/* @__PURE__ */ e.jsx(
|
|
2997
|
-
t.type !== "table" && /* @__PURE__ */ e.jsx(
|
|
2996
|
+
/* @__PURE__ */ e.jsx(ll, {}),
|
|
2997
|
+
t.type !== "table" && /* @__PURE__ */ e.jsx(nl, {})
|
|
2998
2998
|
] }),
|
|
2999
|
-
/* @__PURE__ */ e.jsx(
|
|
2999
|
+
/* @__PURE__ */ e.jsx(ol, {})
|
|
3000
3000
|
] }),
|
|
3001
3001
|
n ? j() : (
|
|
3002
3002
|
// card.type === 'kpi' ? (
|
|
@@ -3009,14 +3009,14 @@ function na() {
|
|
|
3009
3009
|
// <EditorCard className="grow border-none shadow-none" />
|
|
3010
3010
|
// )
|
|
3011
3011
|
/* @__PURE__ */ e.jsxs("div", { className: "flex min-h-0 w-full flex-1 grow basis-0 px-6", children: [
|
|
3012
|
-
i && /* @__PURE__ */ e.jsx(
|
|
3013
|
-
t.data && t.data.length > 0 && /* @__PURE__ */ e.jsx(
|
|
3012
|
+
i && /* @__PURE__ */ e.jsx(il, {}),
|
|
3013
|
+
t.data && t.data.length > 0 && /* @__PURE__ */ e.jsx(tl, { data: a || [] }),
|
|
3014
3014
|
m && /* @__PURE__ */ e.jsx("span", { className: "font-mono text-sm", children: m })
|
|
3015
3015
|
] })
|
|
3016
3016
|
)
|
|
3017
3017
|
] });
|
|
3018
3018
|
}
|
|
3019
|
-
function
|
|
3019
|
+
function il() {
|
|
3020
3020
|
const s = c((a) => a.pythonStdOut);
|
|
3021
3021
|
if (!s)
|
|
3022
3022
|
return null;
|
|
@@ -3030,17 +3030,17 @@ function lr() {
|
|
|
3030
3030
|
className: "bg-muted p-2 font-mono text-sm"
|
|
3031
3031
|
}
|
|
3032
3032
|
),
|
|
3033
|
-
/* @__PURE__ */ e.jsx(
|
|
3033
|
+
/* @__PURE__ */ e.jsx(Ge, { className: "mb-2" })
|
|
3034
3034
|
] });
|
|
3035
3035
|
}
|
|
3036
|
-
function
|
|
3036
|
+
function ol() {
|
|
3037
3037
|
const s = c((a) => a.isShowingVisual), t = c(
|
|
3038
3038
|
(a) => a.actions.setIsShowingVisual
|
|
3039
3039
|
);
|
|
3040
3040
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
3041
|
-
/* @__PURE__ */ e.jsx(
|
|
3041
|
+
/* @__PURE__ */ e.jsx(R, { htmlFor: "visualize", children: "Chart" }),
|
|
3042
3042
|
/* @__PURE__ */ e.jsx(
|
|
3043
|
-
|
|
3043
|
+
_t,
|
|
3044
3044
|
{
|
|
3045
3045
|
checked: s,
|
|
3046
3046
|
onCheckedChange: () => t(!s),
|
|
@@ -3055,7 +3055,7 @@ function Ve() {
|
|
|
3055
3055
|
c(
|
|
3056
3056
|
(x) => x.card.cfg
|
|
3057
3057
|
);
|
|
3058
|
-
const a = c((x) => x.card.preferences), { setCardCfg: n, setFilterOnClickColumnIndex:
|
|
3058
|
+
const a = c((x) => x.card.preferences), { setCardCfg: n, setFilterOnClickColumnIndex: l, setCardPreferences: m } = c((x) => x.actions), i = c(
|
|
3059
3059
|
(x) => x.queryResultColumns
|
|
3060
3060
|
);
|
|
3061
3061
|
c(
|
|
@@ -3115,68 +3115,71 @@ function Ve() {
|
|
|
3115
3115
|
value: (u = (h = a == null ? void 0 : a.onClickFilter) == null ? void 0 : h.find((j) => j.columnIndex === x)) == null ? void 0 : u.expression,
|
|
3116
3116
|
onChange: (j) => d(x, j),
|
|
3117
3117
|
type: "text",
|
|
3118
|
-
className: "
|
|
3118
|
+
className: "h-9 w-full font-mono text-xs focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0",
|
|
3119
3119
|
placeholder: "Expression"
|
|
3120
3120
|
}
|
|
3121
3121
|
);
|
|
3122
3122
|
}
|
|
3123
|
-
return /* @__PURE__ */ e.
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
|
|
3158
|
-
|
|
3159
|
-
|
|
3160
|
-
|
|
3161
|
-
|
|
3162
|
-
|
|
3163
|
-
|
|
3164
|
-
|
|
3165
|
-
|
|
3166
|
-
|
|
3167
|
-
|
|
3123
|
+
return /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
3124
|
+
/* @__PURE__ */ e.jsx(R, { children: "On Click" }),
|
|
3125
|
+
i == null ? void 0 : i.map((x, b) => {
|
|
3126
|
+
var g, h;
|
|
3127
|
+
return /* @__PURE__ */ e.jsx(
|
|
3128
|
+
"div",
|
|
3129
|
+
{
|
|
3130
|
+
className: "xbg-red-100 group flex items-center justify-between space-y-2",
|
|
3131
|
+
children: /* @__PURE__ */ e.jsxs("div", { className: "grow", children: [
|
|
3132
|
+
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2 py-2", children: [
|
|
3133
|
+
/* @__PURE__ */ e.jsx(
|
|
3134
|
+
Qe,
|
|
3135
|
+
{
|
|
3136
|
+
checked: !!((g = a == null ? void 0 : a.onClickFilter) != null && g.find(
|
|
3137
|
+
(u) => u.columnIndex === b
|
|
3138
|
+
)),
|
|
3139
|
+
onCheckedChange: (u) => o(b, u)
|
|
3140
|
+
}
|
|
3141
|
+
),
|
|
3142
|
+
/* @__PURE__ */ e.jsx(
|
|
3143
|
+
"label",
|
|
3144
|
+
{
|
|
3145
|
+
className: "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
3146
|
+
children: x
|
|
3147
|
+
}
|
|
3148
|
+
),
|
|
3149
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-2", children: ((h = a == null ? void 0 : a.onClickFilter) == null ? void 0 : h.find(
|
|
3150
|
+
(u) => u.columnIndex === b
|
|
3151
|
+
)) && /* @__PURE__ */ e.jsx(
|
|
3152
|
+
za,
|
|
3153
|
+
{
|
|
3154
|
+
onClick: () => {
|
|
3155
|
+
t((u) => {
|
|
3156
|
+
const j = [...u];
|
|
3157
|
+
return j[b] = !u[b], j;
|
|
3158
|
+
});
|
|
3159
|
+
},
|
|
3160
|
+
className: "invisible size-3 cursor-pointer text-gray-400 group-hover:visible"
|
|
3161
|
+
}
|
|
3162
|
+
) })
|
|
3163
|
+
] }),
|
|
3164
|
+
p(b)
|
|
3165
|
+
] })
|
|
3166
|
+
},
|
|
3167
|
+
x
|
|
3168
|
+
);
|
|
3169
|
+
})
|
|
3170
|
+
] });
|
|
3168
3171
|
}
|
|
3169
|
-
function
|
|
3172
|
+
function ms() {
|
|
3170
3173
|
var i, o, d;
|
|
3171
3174
|
const s = c((p) => p.card.preferences), t = c(
|
|
3172
3175
|
(p) => p.card.cfg
|
|
3173
|
-
), { setCardCfg: a, setCardPreferences: n, setChartOrientation:
|
|
3176
|
+
), { setCardCfg: a, setCardPreferences: n, setChartOrientation: l } = c((p) => p.actions);
|
|
3174
3177
|
(i = t == null ? void 0 : t.options) != null && i.indexAxis;
|
|
3175
3178
|
function m(p) {
|
|
3176
|
-
|
|
3179
|
+
l(p);
|
|
3177
3180
|
}
|
|
3178
3181
|
return /* @__PURE__ */ e.jsxs(
|
|
3179
|
-
|
|
3182
|
+
_s,
|
|
3180
3183
|
{
|
|
3181
3184
|
value: ((o = s == null ? void 0 : s.chartOptions) == null ? void 0 : o.indexAxis) || ((d = t == null ? void 0 : t.options) == null ? void 0 : d.indexAxis) || "x",
|
|
3182
3185
|
onValueChange: m,
|
|
@@ -3197,11 +3200,11 @@ function hs() {
|
|
|
3197
3200
|
}
|
|
3198
3201
|
const ze = "focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0";
|
|
3199
3202
|
function ra(s, t) {
|
|
3200
|
-
var n,
|
|
3201
|
-
const a =
|
|
3202
|
-
return ((m = (
|
|
3203
|
+
var n, l, m;
|
|
3204
|
+
const a = Sa(s, t);
|
|
3205
|
+
return ((m = (l = (n = s == null ? void 0 : s.chartOptions) == null ? void 0 : n.scales) == null ? void 0 : l[a]) == null ? void 0 : m.type) || "linear";
|
|
3203
3206
|
}
|
|
3204
|
-
function
|
|
3207
|
+
function $a() {
|
|
3205
3208
|
var W, J, te, G, ne, S;
|
|
3206
3209
|
const [s, t] = M(!1), a = c((N) => {
|
|
3207
3210
|
var F;
|
|
@@ -3209,12 +3212,12 @@ function Ba() {
|
|
|
3209
3212
|
}), n = c((N) => {
|
|
3210
3213
|
var F;
|
|
3211
3214
|
return (F = N.card) == null ? void 0 : F.cfg;
|
|
3212
|
-
}),
|
|
3215
|
+
}), l = Sa(a, n), [m, i] = M(
|
|
3213
3216
|
ra(a)
|
|
3214
3217
|
), [o, d] = M(
|
|
3215
|
-
((te = (J = (W = a == null ? void 0 : a.chartOptions) == null ? void 0 : W.scales) == null ? void 0 : J[
|
|
3218
|
+
((te = (J = (W = a == null ? void 0 : a.chartOptions) == null ? void 0 : W.scales) == null ? void 0 : J[l]) == null ? void 0 : te.min) || ""
|
|
3216
3219
|
), [p, x] = M(
|
|
3217
|
-
((S = (ne = (G = a == null ? void 0 : a.chartOptions) == null ? void 0 : G.scales) == null ? void 0 : ne[
|
|
3220
|
+
((S = (ne = (G = a == null ? void 0 : a.chartOptions) == null ? void 0 : G.scales) == null ? void 0 : ne[l]) == null ? void 0 : S.max) || ""
|
|
3218
3221
|
), [b, g] = M(o || p ? "custom" : "auto"), [h, u] = M(""), [j, f] = M(0), [v, O] = M(""), [y, L] = M(""), [E, V] = M(""), T = c(
|
|
3219
3222
|
(N) => N.actions.setCardPreferences
|
|
3220
3223
|
), C = c((N) => {
|
|
@@ -3222,13 +3225,13 @@ function Ba() {
|
|
|
3222
3225
|
return (F = N.card) == null ? void 0 : F.type;
|
|
3223
3226
|
}), z = ["pie", "doughnut", "polarArea"].includes(C);
|
|
3224
3227
|
U(() => {
|
|
3225
|
-
var N, F, H, fe, ae, I, Z, se, ye, ge, Q,
|
|
3228
|
+
var N, F, H, fe, ae, I, Z, se, ye, ge, Q, le, re, ve;
|
|
3226
3229
|
i(ra(a)), d(
|
|
3227
|
-
((H = (F = (N = a == null ? void 0 : a.chartOptions) == null ? void 0 : N.scales) == null ? void 0 : F[
|
|
3228
|
-
), x(((I = (ae = (fe = a == null ? void 0 : a.chartOptions) == null ? void 0 : fe.scales) == null ? void 0 : ae[
|
|
3229
|
-
((ge = (ye = (se = (Z = a == null ? void 0 : a.chartOptions) == null ? void 0 : Z.scales) == null ? void 0 : se[
|
|
3230
|
-
), f(((Q = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : Q.decimalPlaces) || 0), O(((
|
|
3231
|
-
}, [s, a,
|
|
3230
|
+
((H = (F = (N = a == null ? void 0 : a.chartOptions) == null ? void 0 : N.scales) == null ? void 0 : F[l]) == null ? void 0 : H.min) === 0 ? 0 : ""
|
|
3231
|
+
), x(((I = (ae = (fe = a == null ? void 0 : a.chartOptions) == null ? void 0 : fe.scales) == null ? void 0 : ae[l]) == null ? void 0 : I.max) || ""), u(
|
|
3232
|
+
((ge = (ye = (se = (Z = a == null ? void 0 : a.chartOptions) == null ? void 0 : Z.scales) == null ? void 0 : se[l]) == null ? void 0 : ye.ticks) == null ? void 0 : ge.stepSize) || ""
|
|
3233
|
+
), f(((Q = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : Q.decimalPlaces) || 0), O(((le = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : le.suffix) || ""), L(((re = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : re.currency) || ""), V(((ve = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : ve.locale) || "");
|
|
3234
|
+
}, [s, a, l]);
|
|
3232
3235
|
function q(N, F) {
|
|
3233
3236
|
return F === "" || /^[0-9\b]+$/.test(F) ? Number(F) : Number(N);
|
|
3234
3237
|
}
|
|
@@ -3236,7 +3239,7 @@ function Ba() {
|
|
|
3236
3239
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
3237
3240
|
/* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-6 items-center gap-2", children: [
|
|
3238
3241
|
/* @__PURE__ */ e.jsx(
|
|
3239
|
-
|
|
3242
|
+
R,
|
|
3240
3243
|
{
|
|
3241
3244
|
className: "col-span-2 hover:cursor-pointer hover:underline",
|
|
3242
3245
|
htmlFor: "currency",
|
|
@@ -3272,7 +3275,7 @@ function Ba() {
|
|
|
3272
3275
|
)
|
|
3273
3276
|
] }),
|
|
3274
3277
|
/* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-9 items-center gap-2", children: [
|
|
3275
|
-
/* @__PURE__ */ e.jsx(
|
|
3278
|
+
/* @__PURE__ */ e.jsx(R, { className: "col-span-3", htmlFor: "format", children: "Decimals" }),
|
|
3276
3279
|
/* @__PURE__ */ e.jsx(
|
|
3277
3280
|
he,
|
|
3278
3281
|
{
|
|
@@ -3288,7 +3291,7 @@ function Ba() {
|
|
|
3288
3291
|
function A() {
|
|
3289
3292
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
3290
3293
|
/* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-3 items-center gap-2", children: [
|
|
3291
|
-
/* @__PURE__ */ e.jsx(
|
|
3294
|
+
/* @__PURE__ */ e.jsx(R, { htmlFor: "range", children: "Range" }),
|
|
3292
3295
|
/* @__PURE__ */ e.jsx(
|
|
3293
3296
|
he,
|
|
3294
3297
|
{
|
|
@@ -3309,7 +3312,7 @@ function Ba() {
|
|
|
3309
3312
|
)
|
|
3310
3313
|
] }),
|
|
3311
3314
|
/* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-3 items-center gap-2", children: [
|
|
3312
|
-
/* @__PURE__ */ e.jsx(
|
|
3315
|
+
/* @__PURE__ */ e.jsx(R, { htmlFor: "step-size", children: "Step Size" }),
|
|
3313
3316
|
/* @__PURE__ */ e.jsx(
|
|
3314
3317
|
he,
|
|
3315
3318
|
{
|
|
@@ -3322,7 +3325,7 @@ function Ba() {
|
|
|
3322
3325
|
] })
|
|
3323
3326
|
] });
|
|
3324
3327
|
}
|
|
3325
|
-
function
|
|
3328
|
+
function _() {
|
|
3326
3329
|
var H;
|
|
3327
3330
|
let N = {};
|
|
3328
3331
|
b === "custom" && (N = {
|
|
@@ -3338,7 +3341,7 @@ function Ba() {
|
|
|
3338
3341
|
...a == null ? void 0 : a.chartOptions,
|
|
3339
3342
|
scales: {
|
|
3340
3343
|
...(H = a == null ? void 0 : a.chartOptions) == null ? void 0 : H.scales,
|
|
3341
|
-
[
|
|
3344
|
+
[l]: {
|
|
3342
3345
|
// ...cardPreferences?.chartOptions?.scales?.[axis],
|
|
3343
3346
|
type: m,
|
|
3344
3347
|
...m === "linear" ? N : {}
|
|
@@ -3354,16 +3357,16 @@ function Ba() {
|
|
|
3354
3357
|
};
|
|
3355
3358
|
console.log(F), T(F);
|
|
3356
3359
|
}
|
|
3357
|
-
return /* @__PURE__ */ e.jsxs(
|
|
3358
|
-
/* @__PURE__ */ e.jsx(
|
|
3359
|
-
/* @__PURE__ */ e.jsx(
|
|
3360
|
+
return /* @__PURE__ */ e.jsxs(cs, { onOpenChange: (N) => t(N), children: [
|
|
3361
|
+
/* @__PURE__ */ e.jsx(ds, { asChild: !0, children: /* @__PURE__ */ e.jsx(Ht, { className: "size-4 cursor-pointer text-muted-foreground hover:text-foreground" }) }),
|
|
3362
|
+
/* @__PURE__ */ e.jsx(hs, { align: "center", className: "max-w-65", children: /* @__PURE__ */ e.jsxs("div", { className: "grid gap-4", children: [
|
|
3360
3363
|
/* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
3361
3364
|
/* @__PURE__ */ e.jsx("h4", { className: "font-medium leading-none", children: "Scale Options" }),
|
|
3362
3365
|
/* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted-foreground", children: "Set the scale for the number axis" })
|
|
3363
3366
|
] }),
|
|
3364
3367
|
/* @__PURE__ */ e.jsxs("div", { className: "grid gap-2", children: [
|
|
3365
3368
|
/* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-3 items-center gap-2", children: [
|
|
3366
|
-
/* @__PURE__ */ e.jsx(
|
|
3369
|
+
/* @__PURE__ */ e.jsx(R, { htmlFor: "scale", children: "Type" }),
|
|
3367
3370
|
/* @__PURE__ */ e.jsxs(
|
|
3368
3371
|
Oe,
|
|
3369
3372
|
{
|
|
@@ -3372,7 +3375,7 @@ function Ba() {
|
|
|
3372
3375
|
onValueChange: (N) => i(N),
|
|
3373
3376
|
children: [
|
|
3374
3377
|
/* @__PURE__ */ e.jsx(Me, { className: "col-span-2 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(Te, {}) }),
|
|
3375
|
-
/* @__PURE__ */ e.jsx(De, { id: "type", children: /* @__PURE__ */ e.jsxs(
|
|
3378
|
+
/* @__PURE__ */ e.jsx(De, { id: "type", children: /* @__PURE__ */ e.jsxs(Ke, { children: [
|
|
3376
3379
|
/* @__PURE__ */ e.jsx(Le, { children: "Option" }),
|
|
3377
3380
|
/* @__PURE__ */ e.jsx(ee, { value: "linear", children: "Linear" }),
|
|
3378
3381
|
/* @__PURE__ */ e.jsx(ee, { value: "logarithmic", children: "Logarithmic" })
|
|
@@ -3382,9 +3385,9 @@ function Ba() {
|
|
|
3382
3385
|
)
|
|
3383
3386
|
] }),
|
|
3384
3387
|
m == "linear" && /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-3 items-center gap-2 py-1", children: [
|
|
3385
|
-
/* @__PURE__ */ e.jsx(
|
|
3388
|
+
/* @__PURE__ */ e.jsx(R, { htmlFor: "scale-option", children: "Setup" }),
|
|
3386
3389
|
/* @__PURE__ */ e.jsxs(
|
|
3387
|
-
|
|
3390
|
+
_s,
|
|
3388
3391
|
{
|
|
3389
3392
|
disabled: z,
|
|
3390
3393
|
id: "scale-option",
|
|
@@ -3407,11 +3410,11 @@ function Ba() {
|
|
|
3407
3410
|
] }),
|
|
3408
3411
|
b === "custom" && m == "linear" && A(),
|
|
3409
3412
|
K(),
|
|
3410
|
-
/* @__PURE__ */ e.jsx(
|
|
3413
|
+
/* @__PURE__ */ e.jsx(Bt, {}),
|
|
3411
3414
|
/* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-3", children: /* @__PURE__ */ e.jsx(
|
|
3412
3415
|
w,
|
|
3413
3416
|
{
|
|
3414
|
-
onClick:
|
|
3417
|
+
onClick: _,
|
|
3415
3418
|
variant: "secondary",
|
|
3416
3419
|
className: "col-span-1 col-start-3 h-8 w-full",
|
|
3417
3420
|
children: "Apply"
|
|
@@ -3421,7 +3424,7 @@ function Ba() {
|
|
|
3421
3424
|
] }) })
|
|
3422
3425
|
] });
|
|
3423
3426
|
}
|
|
3424
|
-
function
|
|
3427
|
+
function cl({ idx: s }) {
|
|
3425
3428
|
var o;
|
|
3426
3429
|
const t = c((d) => {
|
|
3427
3430
|
var p;
|
|
@@ -3433,9 +3436,9 @@ function or({ idx: s }) {
|
|
|
3433
3436
|
}
|
|
3434
3437
|
), n = c(
|
|
3435
3438
|
(d) => d.actions.setCardPreferences
|
|
3436
|
-
),
|
|
3439
|
+
), l = (o = t == null ? void 0 : t.chartOptions) == null ? void 0 : o.indexAxis, m = a == null ? void 0 : a.find((d) => d.idx === s);
|
|
3437
3440
|
function i(d, p) {
|
|
3438
|
-
(d === "end" || d === "start") &&
|
|
3441
|
+
(d === "end" || d === "start") && $t(Pt());
|
|
3439
3442
|
const x = {
|
|
3440
3443
|
display: d !== "none",
|
|
3441
3444
|
align: d,
|
|
@@ -3465,9 +3468,9 @@ function or({ idx: s }) {
|
|
|
3465
3468
|
});
|
|
3466
3469
|
}
|
|
3467
3470
|
}
|
|
3468
|
-
return /* @__PURE__ */ e.jsxs(
|
|
3469
|
-
/* @__PURE__ */ e.jsx(
|
|
3470
|
-
/* @__PURE__ */ e.jsx(
|
|
3471
|
+
return /* @__PURE__ */ e.jsxs(cs, { children: [
|
|
3472
|
+
/* @__PURE__ */ e.jsx(ds, { children: /* @__PURE__ */ e.jsx(Dn, { className: "invisible size-4 rotate-[135deg] cursor-pointer text-muted-foreground hover:text-foreground group-hover:visible" }) }),
|
|
3473
|
+
/* @__PURE__ */ e.jsx(hs, { className: "w-fit p-1", children: /* @__PURE__ */ e.jsxs("div", { className: "flex gap-1", children: [
|
|
3471
3474
|
/* @__PURE__ */ e.jsx(
|
|
3472
3475
|
w,
|
|
3473
3476
|
{
|
|
@@ -3475,7 +3478,7 @@ function or({ idx: s }) {
|
|
|
3475
3478
|
size: "sm",
|
|
3476
3479
|
variant: "secondary",
|
|
3477
3480
|
className: "h-7 p-1 text-xs font-normal",
|
|
3478
|
-
children: /* @__PURE__ */ e.jsx(
|
|
3481
|
+
children: /* @__PURE__ */ e.jsx(Ca, { className: "size-4" })
|
|
3479
3482
|
}
|
|
3480
3483
|
),
|
|
3481
3484
|
/* @__PURE__ */ e.jsx(
|
|
@@ -3486,10 +3489,10 @@ function or({ idx: s }) {
|
|
|
3486
3489
|
variant: "secondary",
|
|
3487
3490
|
className: "h-7 p-1 text-xs font-normal",
|
|
3488
3491
|
children: /* @__PURE__ */ e.jsx(
|
|
3489
|
-
|
|
3492
|
+
vn,
|
|
3490
3493
|
{
|
|
3491
3494
|
className: Y("h-4 w-4", {
|
|
3492
|
-
"rotate-90":
|
|
3495
|
+
"rotate-90": l === "y"
|
|
3493
3496
|
})
|
|
3494
3497
|
}
|
|
3495
3498
|
)
|
|
@@ -3503,10 +3506,10 @@ function or({ idx: s }) {
|
|
|
3503
3506
|
variant: "secondary",
|
|
3504
3507
|
className: "h-7 p-1 text-xs font-normal",
|
|
3505
3508
|
children: /* @__PURE__ */ e.jsx(
|
|
3506
|
-
|
|
3509
|
+
Cn,
|
|
3507
3510
|
{
|
|
3508
3511
|
className: Y("h-4 w-4", {
|
|
3509
|
-
"rotate-90":
|
|
3512
|
+
"rotate-90": l === "y"
|
|
3510
3513
|
})
|
|
3511
3514
|
}
|
|
3512
3515
|
)
|
|
@@ -3520,10 +3523,10 @@ function or({ idx: s }) {
|
|
|
3520
3523
|
variant: "secondary",
|
|
3521
3524
|
className: "h-7 p-1 text-xs font-normal",
|
|
3522
3525
|
children: /* @__PURE__ */ e.jsx(
|
|
3523
|
-
|
|
3526
|
+
Nn,
|
|
3524
3527
|
{
|
|
3525
3528
|
className: Y("h-4 w-4", {
|
|
3526
|
-
"rotate-90":
|
|
3529
|
+
"rotate-90": l === "y"
|
|
3527
3530
|
})
|
|
3528
3531
|
}
|
|
3529
3532
|
)
|
|
@@ -3532,42 +3535,42 @@ function or({ idx: s }) {
|
|
|
3532
3535
|
] }) })
|
|
3533
3536
|
] });
|
|
3534
3537
|
}
|
|
3535
|
-
function
|
|
3538
|
+
function Pa() {
|
|
3536
3539
|
const s = c((d) => d.card), t = c(
|
|
3537
3540
|
(d) => {
|
|
3538
3541
|
var p, x, b;
|
|
3539
3542
|
return (b = (x = (p = d == null ? void 0 : d.card) == null ? void 0 : p.preferences) == null ? void 0 : x.chartOptions) == null ? void 0 : b.indexAxis;
|
|
3540
3543
|
}
|
|
3541
3544
|
), a = t === "y" ? "Y axis" : "X axis", n = t === "y" ? "X axis" : "Y axis", {
|
|
3542
|
-
keys:
|
|
3545
|
+
keys: l,
|
|
3543
3546
|
metricKeys: m,
|
|
3544
3547
|
dimensionKeys: i
|
|
3545
|
-
} =
|
|
3548
|
+
} = Ns(s.data || []);
|
|
3546
3549
|
let o = m;
|
|
3547
3550
|
if (["stackedBar", "stackedLine"].includes(s.type)) {
|
|
3548
|
-
const d =
|
|
3551
|
+
const d = Kt({
|
|
3549
3552
|
dataArray: s.data || [],
|
|
3550
3553
|
groupKey: i[0],
|
|
3551
3554
|
pivotKey: i[1],
|
|
3552
3555
|
valueKey: o[0]
|
|
3553
|
-
}), { metricKeys: p } =
|
|
3556
|
+
}), { metricKeys: p } = Ns(d);
|
|
3554
3557
|
o = p;
|
|
3555
3558
|
}
|
|
3556
|
-
return
|
|
3559
|
+
return l.length === 0 ? null : /* @__PURE__ */ e.jsxs("div", { className: "space-y-4", children: [
|
|
3557
3560
|
/* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
3558
|
-
/* @__PURE__ */ e.jsx(
|
|
3561
|
+
/* @__PURE__ */ e.jsx(R, { children: a }),
|
|
3559
3562
|
/* @__PURE__ */ e.jsx("div", { className: "my-1 space-y-1", children: /* @__PURE__ */ e.jsx("div", { className: "rounded-md bg-muted/70 px-2 py-1 hover:bg-muted", children: /* @__PURE__ */ e.jsx("p", { children: i[0] }) }) })
|
|
3560
3563
|
] }),
|
|
3561
3564
|
/* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
3562
3565
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between gap-5", children: [
|
|
3563
|
-
/* @__PURE__ */ e.jsx(
|
|
3564
|
-
/* @__PURE__ */ e.jsx(
|
|
3566
|
+
/* @__PURE__ */ e.jsx(R, { children: n }),
|
|
3567
|
+
/* @__PURE__ */ e.jsx($a, {})
|
|
3565
3568
|
] }),
|
|
3566
|
-
/* @__PURE__ */ e.jsx("div", { className: "my-1 space-y-1", children: o.map((d, p) => /* @__PURE__ */ e.jsx(
|
|
3569
|
+
/* @__PURE__ */ e.jsx("div", { className: "my-1 space-y-1", children: o.map((d, p) => /* @__PURE__ */ e.jsx(dl, { col: d, idx: p }, d)) })
|
|
3567
3570
|
] })
|
|
3568
3571
|
] });
|
|
3569
3572
|
}
|
|
3570
|
-
function
|
|
3573
|
+
function dl({ col: s, idx: t }) {
|
|
3571
3574
|
const a = c((o) => {
|
|
3572
3575
|
var d;
|
|
3573
3576
|
return (d = o.card) == null ? void 0 : d.preferences;
|
|
@@ -3576,9 +3579,9 @@ function cr({ col: s, idx: t }) {
|
|
|
3576
3579
|
var d;
|
|
3577
3580
|
return (d = o.card.preferences) == null ? void 0 : d.datasetOptions;
|
|
3578
3581
|
}
|
|
3579
|
-
),
|
|
3582
|
+
), l = n == null ? void 0 : n.find((o) => o.idx === t), { setCardPreferences: m } = c((o) => o.actions);
|
|
3580
3583
|
function i(o) {
|
|
3581
|
-
if (!
|
|
3584
|
+
if (!l)
|
|
3582
3585
|
m({
|
|
3583
3586
|
...a,
|
|
3584
3587
|
datasetOptions: [
|
|
@@ -3591,7 +3594,7 @@ function cr({ col: s, idx: t }) {
|
|
|
3591
3594
|
]
|
|
3592
3595
|
});
|
|
3593
3596
|
else {
|
|
3594
|
-
const d = { ...
|
|
3597
|
+
const d = { ...l };
|
|
3595
3598
|
d.type = o === "area" ? "line" : o, d.fill = o === "area" ? "origin" : "";
|
|
3596
3599
|
const p = n == null ? void 0 : n.map(
|
|
3597
3600
|
(x) => x.idx === t ? d : x
|
|
@@ -3606,52 +3609,52 @@ function cr({ col: s, idx: t }) {
|
|
|
3606
3609
|
/* @__PURE__ */ e.jsx("p", { children: s }),
|
|
3607
3610
|
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
|
|
3608
3611
|
/* @__PURE__ */ e.jsx(
|
|
3609
|
-
|
|
3612
|
+
Bs,
|
|
3610
3613
|
{
|
|
3611
3614
|
onClick: () => i("bar"),
|
|
3612
3615
|
className: "invisible size-4 cursor-pointer text-muted-foreground hover:text-foreground group-hover:visible"
|
|
3613
3616
|
}
|
|
3614
3617
|
),
|
|
3615
3618
|
/* @__PURE__ */ e.jsx(
|
|
3616
|
-
|
|
3619
|
+
$s,
|
|
3617
3620
|
{
|
|
3618
3621
|
onClick: () => i("line"),
|
|
3619
3622
|
className: "invisible size-4 cursor-pointer text-muted-foreground hover:text-foreground group-hover:visible"
|
|
3620
3623
|
}
|
|
3621
3624
|
),
|
|
3622
3625
|
/* @__PURE__ */ e.jsx(
|
|
3623
|
-
|
|
3626
|
+
mn,
|
|
3624
3627
|
{
|
|
3625
3628
|
onClick: () => i("area"),
|
|
3626
3629
|
className: "invisible size-4 cursor-pointer text-muted-foreground hover:text-foreground group-hover:visible"
|
|
3627
3630
|
}
|
|
3628
3631
|
),
|
|
3629
3632
|
/* @__PURE__ */ e.jsx(
|
|
3630
|
-
|
|
3633
|
+
Ge,
|
|
3631
3634
|
{
|
|
3632
3635
|
orientation: "vertical",
|
|
3633
3636
|
className: "invisible size-4 cursor-pointer py-2 text-muted-foreground hover:text-foreground group-hover:visible"
|
|
3634
3637
|
}
|
|
3635
3638
|
),
|
|
3636
|
-
/* @__PURE__ */ e.jsx(
|
|
3639
|
+
/* @__PURE__ */ e.jsx(cl, { idx: t })
|
|
3637
3640
|
] })
|
|
3638
3641
|
] });
|
|
3639
3642
|
}
|
|
3640
|
-
function
|
|
3641
|
-
const s = c((g) => g.selectedConnectionId), t = c((g) => g.selectedDatamodelId), a = c((g) => g.selectedDatabaseName), n = c((g) => g.selectedSchemaName),
|
|
3643
|
+
function Ka() {
|
|
3644
|
+
const s = c((g) => g.selectedConnectionId), t = c((g) => g.selectedDatamodelId), a = c((g) => g.selectedDatabaseName), n = c((g) => g.selectedSchemaName), l = c((g) => g.selectedTableName), m = k((g) => g.dashboard.filters) || [], i = k((g) => g.actions.addFilter), o = k((g) => g.actions.removeFilter), d = k(
|
|
3642
3645
|
(g) => g.actions.removeFilterValue
|
|
3643
3646
|
), { modelItems: p, tableName: x } = Ie();
|
|
3644
3647
|
function b(g, h = "dashboard") {
|
|
3645
3648
|
var V;
|
|
3646
3649
|
const u = ue(g.column_name), j = ue(a || ""), f = ue(n || ""), v = ue(x);
|
|
3647
|
-
let O =
|
|
3650
|
+
let O = pa(
|
|
3648
3651
|
f,
|
|
3649
3652
|
v
|
|
3650
3653
|
), y = `${O}.${u}`;
|
|
3651
3654
|
const L = (V = p == null ? void 0 : p.find(
|
|
3652
3655
|
(T) => T.id === t
|
|
3653
3656
|
)) == null ? void 0 : V.name;
|
|
3654
|
-
t && t !== "none" && (y = `${
|
|
3657
|
+
t && t !== "none" && (y = `${vs}.${L}.${u}`, O = `${vs}.${L}`);
|
|
3655
3658
|
const E = m == null ? void 0 : m.find(
|
|
3656
3659
|
(T) => T.column === y && T.table === v && (T.database === j || T.database === a)
|
|
3657
3660
|
);
|
|
@@ -3671,7 +3674,7 @@ function Pa() {
|
|
|
3671
3674
|
// database: 'NA',
|
|
3672
3675
|
connectionId: s,
|
|
3673
3676
|
operation: "in",
|
|
3674
|
-
sql:
|
|
3677
|
+
sql: ea(
|
|
3675
3678
|
g.data_type,
|
|
3676
3679
|
O,
|
|
3677
3680
|
u
|
|
@@ -3685,11 +3688,11 @@ function Pa() {
|
|
|
3685
3688
|
//columnName, //`${qualifiedTableName}.${formattedColumnName}`,
|
|
3686
3689
|
title: g.column_name,
|
|
3687
3690
|
dataType: g.data_type,
|
|
3688
|
-
table:
|
|
3691
|
+
table: l || "",
|
|
3689
3692
|
database: a || "",
|
|
3690
3693
|
connectionId: s || "",
|
|
3691
3694
|
operation: "in",
|
|
3692
|
-
sql:
|
|
3695
|
+
sql: ea(
|
|
3693
3696
|
g.data_type,
|
|
3694
3697
|
O,
|
|
3695
3698
|
u
|
|
@@ -3700,29 +3703,29 @@ function Pa() {
|
|
|
3700
3703
|
}
|
|
3701
3704
|
return { assignFilter: b };
|
|
3702
3705
|
}
|
|
3703
|
-
function
|
|
3706
|
+
function qe() {
|
|
3704
3707
|
const s = k(
|
|
3705
3708
|
(o) => o.dashboard.filters
|
|
3706
|
-
), t = c((o) => o.frame), { setFrame: a } =
|
|
3709
|
+
), t = c((o) => o.frame), { setFrame: a } = Rs(), { columns: n } = Ie(), { assignFilter: l } = Ka();
|
|
3707
3710
|
function m(o) {
|
|
3708
|
-
const d =
|
|
3711
|
+
const d = l(o, "frame");
|
|
3709
3712
|
a({ ...t, filterId: d });
|
|
3710
3713
|
}
|
|
3711
3714
|
const i = s == null ? void 0 : s.find((o) => o.id === t.filterId);
|
|
3712
3715
|
return /* @__PURE__ */ e.jsxs("div", { className: "space-y-3", children: [
|
|
3713
|
-
/* @__PURE__ */ e.jsx(
|
|
3714
|
-
/* @__PURE__ */ e.jsx(
|
|
3715
|
-
i && /* @__PURE__ */ e.jsx(
|
|
3716
|
+
/* @__PURE__ */ e.jsx(R, { children: "Card Filter" }),
|
|
3717
|
+
/* @__PURE__ */ e.jsx(hl, { onSelect: m, columns: n }),
|
|
3718
|
+
i && /* @__PURE__ */ e.jsx(Gt, { filter: i })
|
|
3716
3719
|
] });
|
|
3717
3720
|
}
|
|
3718
|
-
function
|
|
3721
|
+
function hl({
|
|
3719
3722
|
columns: s,
|
|
3720
3723
|
onSelect: t
|
|
3721
3724
|
}) {
|
|
3722
3725
|
var i;
|
|
3723
|
-
const [a, n] =
|
|
3724
|
-
return /* @__PURE__ */ e.jsxs(
|
|
3725
|
-
/* @__PURE__ */ e.jsx(
|
|
3726
|
+
const [a, n] = aa.useState(!1), [l, m] = aa.useState("");
|
|
3727
|
+
return /* @__PURE__ */ e.jsxs(cs, { open: a, onOpenChange: n, children: [
|
|
3728
|
+
/* @__PURE__ */ e.jsx(ds, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
3726
3729
|
w,
|
|
3727
3730
|
{
|
|
3728
3731
|
size: "sm",
|
|
@@ -3731,31 +3734,31 @@ function hr({
|
|
|
3731
3734
|
"aria-expanded": a,
|
|
3732
3735
|
className: "w-full justify-between font-normal",
|
|
3733
3736
|
children: [
|
|
3734
|
-
|
|
3735
|
-
/* @__PURE__ */ e.jsx(
|
|
3737
|
+
l ? (i = s.find((o) => o.column_name === l)) == null ? void 0 : i.column_name : "Select Column...",
|
|
3738
|
+
/* @__PURE__ */ e.jsx(Jt, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
|
|
3736
3739
|
]
|
|
3737
3740
|
}
|
|
3738
3741
|
) }),
|
|
3739
|
-
/* @__PURE__ */ e.jsx(
|
|
3740
|
-
/* @__PURE__ */ e.jsx(
|
|
3741
|
-
/* @__PURE__ */ e.jsxs(
|
|
3742
|
-
/* @__PURE__ */ e.jsx(
|
|
3743
|
-
/* @__PURE__ */ e.jsx(
|
|
3744
|
-
|
|
3742
|
+
/* @__PURE__ */ e.jsx(hs, { className: "w-[200px] p-0", children: /* @__PURE__ */ e.jsxs(Ut, { children: [
|
|
3743
|
+
/* @__PURE__ */ e.jsx(Qt, { placeholder: "Search column", className: "h-9" }),
|
|
3744
|
+
/* @__PURE__ */ e.jsxs(Wt, { children: [
|
|
3745
|
+
/* @__PURE__ */ e.jsx(Yt, { children: "No framework found." }),
|
|
3746
|
+
/* @__PURE__ */ e.jsx(Zt, { children: s.map((o) => /* @__PURE__ */ e.jsxs(
|
|
3747
|
+
Xt,
|
|
3745
3748
|
{
|
|
3746
3749
|
value: o.column_name,
|
|
3747
3750
|
onSelect: (d) => {
|
|
3748
|
-
const p = d ===
|
|
3751
|
+
const p = d === l ? "" : d;
|
|
3749
3752
|
m(p), n(!1), p && t(o);
|
|
3750
3753
|
},
|
|
3751
3754
|
children: [
|
|
3752
3755
|
o.column_name,
|
|
3753
3756
|
/* @__PURE__ */ e.jsx(
|
|
3754
|
-
|
|
3757
|
+
Na,
|
|
3755
3758
|
{
|
|
3756
3759
|
className: Y(
|
|
3757
3760
|
"ml-auto h-4 w-4",
|
|
3758
|
-
|
|
3761
|
+
l === o.column_name ? "opacity-100" : "opacity-0"
|
|
3759
3762
|
)
|
|
3760
3763
|
}
|
|
3761
3764
|
)
|
|
@@ -3767,12 +3770,12 @@ function hr({
|
|
|
3767
3770
|
] }) })
|
|
3768
3771
|
] });
|
|
3769
3772
|
}
|
|
3770
|
-
function
|
|
3773
|
+
function ml({
|
|
3771
3774
|
cardType: s
|
|
3772
3775
|
}) {
|
|
3773
3776
|
return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(Ce, { defaultValue: ["item-2"], type: "multiple", children: [
|
|
3774
3777
|
/* @__PURE__ */ e.jsxs(B, { value: "item-1", children: [
|
|
3775
|
-
/* @__PURE__ */ e.jsx($, { children: `${
|
|
3778
|
+
/* @__PURE__ */ e.jsx($, { children: `${Hs(s)} Chart` }),
|
|
3776
3779
|
/* @__PURE__ */ e.jsxs(P, { className: "space-y-4 font-mono text-xs", children: [
|
|
3777
3780
|
/* @__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" }),
|
|
3778
3781
|
/* @__PURE__ */ e.jsxs("ul", { className: "ml-6 list-disc text-xs [&>li]:mt-2", children: [
|
|
@@ -3799,21 +3802,21 @@ function mr({
|
|
|
3799
3802
|
/* @__PURE__ */ e.jsxs(B, { value: "item-2", children: [
|
|
3800
3803
|
/* @__PURE__ */ e.jsx($, { children: "Settings" }),
|
|
3801
3804
|
/* @__PURE__ */ e.jsxs(P, { className: "space-y-4 px-2", children: [
|
|
3802
|
-
/* @__PURE__ */ e.jsx(
|
|
3803
|
-
/* @__PURE__ */ e.jsx(
|
|
3805
|
+
/* @__PURE__ */ e.jsx(ms, {}),
|
|
3806
|
+
/* @__PURE__ */ e.jsx(Pa, {})
|
|
3804
3807
|
] })
|
|
3805
3808
|
] }),
|
|
3806
3809
|
/* @__PURE__ */ e.jsxs(B, { value: "item-3", children: [
|
|
3807
3810
|
/* @__PURE__ */ e.jsx($, { children: "Filters" }),
|
|
3808
3811
|
/* @__PURE__ */ e.jsxs(P, { className: "space-y-4 px-2", children: [
|
|
3809
3812
|
/* @__PURE__ */ e.jsx(Ve, {}),
|
|
3810
|
-
/* @__PURE__ */ e.jsx(
|
|
3813
|
+
/* @__PURE__ */ e.jsx(qe, {})
|
|
3811
3814
|
] })
|
|
3812
3815
|
] })
|
|
3813
3816
|
] }) });
|
|
3814
3817
|
}
|
|
3815
|
-
function
|
|
3816
|
-
var
|
|
3818
|
+
function Ks() {
|
|
3819
|
+
var l, m, i;
|
|
3817
3820
|
const s = c(
|
|
3818
3821
|
(o) => o.card.cfg
|
|
3819
3822
|
), t = c((o) => o.actions.setCardCfg), a = c((o) => o.card.type);
|
|
@@ -3841,17 +3844,17 @@ function Ps() {
|
|
|
3841
3844
|
return /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
3842
3845
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
3843
3846
|
/* @__PURE__ */ e.jsx("label", { className: "font-medium", children: "Data Labels" }),
|
|
3844
|
-
!["pyramid"].includes(a) && /* @__PURE__ */ e.jsx(
|
|
3847
|
+
!["pyramid"].includes(a) && /* @__PURE__ */ e.jsx($a, {})
|
|
3845
3848
|
] }),
|
|
3846
3849
|
/* @__PURE__ */ e.jsxs(
|
|
3847
3850
|
Oe,
|
|
3848
3851
|
{
|
|
3849
|
-
value: (i = (m = (
|
|
3852
|
+
value: (i = (m = (l = s == null ? void 0 : s.options) == null ? void 0 : l.plugins) == null ? void 0 : m.datalabels) == null ? void 0 : i.anchor,
|
|
3850
3853
|
onValueChange: n,
|
|
3851
3854
|
defaultValue: "none",
|
|
3852
3855
|
children: [
|
|
3853
3856
|
/* @__PURE__ */ e.jsx(Me, { className: "h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(Te, { placeholder: "Select position" }) }),
|
|
3854
|
-
/* @__PURE__ */ e.jsx(De, { children: /* @__PURE__ */ e.jsxs(
|
|
3857
|
+
/* @__PURE__ */ e.jsx(De, { children: /* @__PURE__ */ e.jsxs(Ke, { children: [
|
|
3855
3858
|
/* @__PURE__ */ e.jsx(Le, { children: "Data Labels" }),
|
|
3856
3859
|
/* @__PURE__ */ e.jsx(ee, { value: "none", children: "None" }),
|
|
3857
3860
|
a !== "pyramid" && /* @__PURE__ */ e.jsx(ee, { value: "start", children: "Start" }),
|
|
@@ -3863,13 +3866,13 @@ function Ps() {
|
|
|
3863
3866
|
)
|
|
3864
3867
|
] });
|
|
3865
3868
|
}
|
|
3866
|
-
function
|
|
3869
|
+
function ul({
|
|
3867
3870
|
cardType: s
|
|
3868
3871
|
}) {
|
|
3869
3872
|
function t(a) {
|
|
3870
|
-
const n = "SELECT label, [group], x-axis, y-axis, radius FROM table",
|
|
3873
|
+
const n = "SELECT label, [group], x-axis, y-axis, radius FROM table", l = "SELECT label, [group], x-axis, y-axis FROM table";
|
|
3871
3874
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
3872
|
-
/* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: a === "bubble" ? n :
|
|
3875
|
+
/* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: a === "bubble" ? n : l }),
|
|
3873
3876
|
/* @__PURE__ */ e.jsxs("ul", { className: "ml-6 list-disc text-xs [&>li]:mt-2", children: [
|
|
3874
3877
|
/* @__PURE__ */ e.jsx("li", { children: "label - category" }),
|
|
3875
3878
|
/* @__PURE__ */ e.jsx("li", { children: "group - category" }),
|
|
@@ -3895,20 +3898,23 @@ function ur({
|
|
|
3895
3898
|
}
|
|
3896
3899
|
return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(Ce, { defaultValue: ["item-2"], type: "multiple", children: [
|
|
3897
3900
|
/* @__PURE__ */ e.jsxs(B, { value: "item-1", children: [
|
|
3898
|
-
/* @__PURE__ */ e.jsx($, { children: `${
|
|
3901
|
+
/* @__PURE__ */ e.jsx($, { children: `${Hs(s)} Chart` }),
|
|
3899
3902
|
/* @__PURE__ */ e.jsx(P, { className: "space-y-4 font-mono text-xs", children: t(s) })
|
|
3900
3903
|
] }),
|
|
3901
3904
|
/* @__PURE__ */ e.jsxs(B, { value: "item-2", children: [
|
|
3902
3905
|
/* @__PURE__ */ e.jsx($, { children: "Settings" }),
|
|
3903
|
-
/* @__PURE__ */ e.jsx(P, { className: "px-2", children: /* @__PURE__ */ e.jsx(
|
|
3906
|
+
/* @__PURE__ */ e.jsx(P, { className: "px-2", children: /* @__PURE__ */ e.jsx(Ks, {}) })
|
|
3904
3907
|
] }),
|
|
3905
3908
|
/* @__PURE__ */ e.jsxs(B, { value: "item-3", children: [
|
|
3906
3909
|
/* @__PURE__ */ e.jsx($, { children: "Filters" }),
|
|
3907
|
-
/* @__PURE__ */ e.
|
|
3910
|
+
/* @__PURE__ */ e.jsxs(P, { className: "space-y-4 px-2", children: [
|
|
3911
|
+
/* @__PURE__ */ e.jsx(Ve, {}),
|
|
3912
|
+
/* @__PURE__ */ e.jsx(qe, {})
|
|
3913
|
+
] })
|
|
3908
3914
|
] })
|
|
3909
3915
|
] }) });
|
|
3910
3916
|
}
|
|
3911
|
-
const
|
|
3917
|
+
const xl = {
|
|
3912
3918
|
datasets: [
|
|
3913
3919
|
{
|
|
3914
3920
|
type: "line",
|
|
@@ -3921,7 +3927,7 @@ const xr = {
|
|
|
3921
3927
|
data: []
|
|
3922
3928
|
}
|
|
3923
3929
|
]
|
|
3924
|
-
},
|
|
3930
|
+
}, pl = {
|
|
3925
3931
|
datasets: [
|
|
3926
3932
|
{
|
|
3927
3933
|
fill: "origin",
|
|
@@ -3931,7 +3937,7 @@ const xr = {
|
|
|
3931
3937
|
}
|
|
3932
3938
|
]
|
|
3933
3939
|
};
|
|
3934
|
-
function
|
|
3940
|
+
function fl() {
|
|
3935
3941
|
const s = c((t) => t.card.type);
|
|
3936
3942
|
return /* @__PURE__ */ e.jsxs("div", { className: "space-y-6 p-6", children: [
|
|
3937
3943
|
/* @__PURE__ */ e.jsx(
|
|
@@ -3940,15 +3946,18 @@ function fr() {
|
|
|
3940
3946
|
className: " ",
|
|
3941
3947
|
type: "single",
|
|
3942
3948
|
collapsible: !0,
|
|
3943
|
-
children:
|
|
3949
|
+
children: gl(s)
|
|
3944
3950
|
}
|
|
3945
3951
|
),
|
|
3946
|
-
/* @__PURE__ */ e.jsx("section", { className: "", children: ["line", "bar"].includes(s) && /* @__PURE__ */ e.jsx(
|
|
3947
|
-
|
|
3948
|
-
|
|
3952
|
+
/* @__PURE__ */ e.jsx("section", { className: "", children: ["line", "bar"].includes(s) && /* @__PURE__ */ e.jsx(ms, {}) }),
|
|
3953
|
+
!["kpi"].includes(s) && /* @__PURE__ */ e.jsxs("div", { className: "space-y-4", children: [
|
|
3954
|
+
/* @__PURE__ */ e.jsx(Ks, {}),
|
|
3955
|
+
/* @__PURE__ */ e.jsx(Ve, {}),
|
|
3956
|
+
/* @__PURE__ */ e.jsx(qe, {})
|
|
3957
|
+
] })
|
|
3949
3958
|
] });
|
|
3950
3959
|
}
|
|
3951
|
-
function
|
|
3960
|
+
function gl(s) {
|
|
3952
3961
|
if (["line", "bar"].includes(s))
|
|
3953
3962
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
3954
3963
|
/* @__PURE__ */ e.jsxs(B, { value: "item-1", children: [
|
|
@@ -3969,7 +3978,7 @@ function gr(s) {
|
|
|
3969
3978
|
/* @__PURE__ */ e.jsx("b", { children: "Customize" }),
|
|
3970
3979
|
" and change the `type` property in the dataset."
|
|
3971
3980
|
] }),
|
|
3972
|
-
/* @__PURE__ */ e.jsx("pre", { children: JSON.stringify(
|
|
3981
|
+
/* @__PURE__ */ e.jsx("pre", { children: JSON.stringify(xl, null, 2) })
|
|
3973
3982
|
] })
|
|
3974
3983
|
] }),
|
|
3975
3984
|
/* @__PURE__ */ e.jsxs(B, { value: "item-3", children: [
|
|
@@ -3990,7 +3999,7 @@ function gr(s) {
|
|
|
3990
3999
|
),
|
|
3991
4000
|
"for more options."
|
|
3992
4001
|
] }),
|
|
3993
|
-
/* @__PURE__ */ e.jsx("pre", { children: JSON.stringify(
|
|
4002
|
+
/* @__PURE__ */ e.jsx("pre", { children: JSON.stringify(pl, null, 2) })
|
|
3994
4003
|
] })
|
|
3995
4004
|
] })
|
|
3996
4005
|
] });
|
|
@@ -4045,7 +4054,7 @@ function gr(s) {
|
|
|
4045
4054
|
] })
|
|
4046
4055
|
] }) });
|
|
4047
4056
|
}
|
|
4048
|
-
function
|
|
4057
|
+
function jl() {
|
|
4049
4058
|
var d, p, x, b, g;
|
|
4050
4059
|
const s = c((h) => h.card.preferences), t = c(
|
|
4051
4060
|
(h) => h.actions.setCardPreferences
|
|
@@ -4063,7 +4072,7 @@ function jr() {
|
|
|
4063
4072
|
var u, j;
|
|
4064
4073
|
return (j = (u = h.card.preferences) == null ? void 0 : u.formatNumber) == null ? void 0 : j.locale;
|
|
4065
4074
|
}
|
|
4066
|
-
),
|
|
4075
|
+
), l = c(
|
|
4067
4076
|
(h) => {
|
|
4068
4077
|
var u, j;
|
|
4069
4078
|
return (j = (u = h.card.preferences) == null ? void 0 : u.formatNumber) == null ? void 0 : j.currency;
|
|
@@ -4079,11 +4088,11 @@ function jr() {
|
|
|
4079
4088
|
}
|
|
4080
4089
|
) || [], i = c(
|
|
4081
4090
|
(h) => h.actions.setColorRanges
|
|
4082
|
-
), o = [...new Set(
|
|
4091
|
+
), o = [...new Set(sa.map((h) => h.currency))];
|
|
4083
4092
|
return /* @__PURE__ */ e.jsxs("div", { children: [
|
|
4084
4093
|
/* @__PURE__ */ e.jsxs("div", { className: "mb-3 flex items-center gap-2", children: [
|
|
4085
4094
|
/* @__PURE__ */ e.jsx(
|
|
4086
|
-
|
|
4095
|
+
Qe,
|
|
4087
4096
|
{
|
|
4088
4097
|
checked: !!((d = s == null ? void 0 : s.formatNumber) != null && d.enabled),
|
|
4089
4098
|
onCheckedChange: (h) => {
|
|
@@ -4097,13 +4106,13 @@ function jr() {
|
|
|
4097
4106
|
}
|
|
4098
4107
|
}
|
|
4099
4108
|
),
|
|
4100
|
-
/* @__PURE__ */ e.jsx(
|
|
4109
|
+
/* @__PURE__ */ e.jsx(R, { children: "Format Number" })
|
|
4101
4110
|
] }),
|
|
4102
4111
|
((p = s == null ? void 0 : s.formatNumber) == null ? void 0 : p.enabled) === !0 && /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
4103
4112
|
/* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 p-2", children: [
|
|
4104
4113
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
4105
4114
|
/* @__PURE__ */ e.jsxs("div", { className: "w-full space-y-1", children: [
|
|
4106
|
-
/* @__PURE__ */ e.jsx(
|
|
4115
|
+
/* @__PURE__ */ e.jsx(R, { children: "Locale" }),
|
|
4107
4116
|
/* @__PURE__ */ e.jsxs(
|
|
4108
4117
|
Oe,
|
|
4109
4118
|
{
|
|
@@ -4119,20 +4128,20 @@ function jr() {
|
|
|
4119
4128
|
},
|
|
4120
4129
|
children: [
|
|
4121
4130
|
/* @__PURE__ */ e.jsx(Me, { className: "col-span-6 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(Te, {}) }),
|
|
4122
|
-
/* @__PURE__ */ e.jsx(De, { children: /* @__PURE__ */ e.jsxs(
|
|
4131
|
+
/* @__PURE__ */ e.jsx(De, { children: /* @__PURE__ */ e.jsxs(Ke, { children: [
|
|
4123
4132
|
/* @__PURE__ */ e.jsx(Le, { children: "Format" }),
|
|
4124
|
-
|
|
4133
|
+
sa.map((h) => /* @__PURE__ */ e.jsx(ee, { value: h.locale, children: h.locale }, h.locale))
|
|
4125
4134
|
] }) })
|
|
4126
4135
|
]
|
|
4127
4136
|
}
|
|
4128
4137
|
)
|
|
4129
4138
|
] }),
|
|
4130
4139
|
/* @__PURE__ */ e.jsxs("div", { className: "w-full space-y-1", children: [
|
|
4131
|
-
/* @__PURE__ */ e.jsx(
|
|
4140
|
+
/* @__PURE__ */ e.jsx(R, { children: "Currency" }),
|
|
4132
4141
|
/* @__PURE__ */ e.jsxs(
|
|
4133
4142
|
Oe,
|
|
4134
4143
|
{
|
|
4135
|
-
value:
|
|
4144
|
+
value: l || "none",
|
|
4136
4145
|
onValueChange: (h) => {
|
|
4137
4146
|
var u, j, f;
|
|
4138
4147
|
return a(
|
|
@@ -4144,7 +4153,7 @@ function jr() {
|
|
|
4144
4153
|
},
|
|
4145
4154
|
children: [
|
|
4146
4155
|
/* @__PURE__ */ e.jsx(Me, { className: "col-span-6 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(Te, {}) }),
|
|
4147
|
-
/* @__PURE__ */ e.jsx(De, { children: /* @__PURE__ */ e.jsxs(
|
|
4156
|
+
/* @__PURE__ */ e.jsx(De, { children: /* @__PURE__ */ e.jsxs(Ke, { children: [
|
|
4148
4157
|
/* @__PURE__ */ e.jsx(Le, { children: "Currency" }),
|
|
4149
4158
|
/* @__PURE__ */ e.jsx(ee, { value: "none", children: "None" }, "none"),
|
|
4150
4159
|
o.map((h) => /* @__PURE__ */ e.jsx(ee, { value: h, children: h }, h))
|
|
@@ -4156,7 +4165,7 @@ function jr() {
|
|
|
4156
4165
|
] }),
|
|
4157
4166
|
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
|
|
4158
4167
|
/* @__PURE__ */ e.jsxs("div", { className: "w-full space-y-1", children: [
|
|
4159
|
-
/* @__PURE__ */ e.jsx(
|
|
4168
|
+
/* @__PURE__ */ e.jsx(R, { children: "Decimals" }),
|
|
4160
4169
|
/* @__PURE__ */ e.jsxs(
|
|
4161
4170
|
Oe,
|
|
4162
4171
|
{
|
|
@@ -4178,7 +4187,7 @@ function jr() {
|
|
|
4178
4187
|
)
|
|
4179
4188
|
] }),
|
|
4180
4189
|
/* @__PURE__ */ e.jsxs("div", { className: "w-full space-y-1", children: [
|
|
4181
|
-
/* @__PURE__ */ e.jsx(
|
|
4190
|
+
/* @__PURE__ */ e.jsx(R, { children: "Suffix" }),
|
|
4182
4191
|
/* @__PURE__ */ e.jsx(
|
|
4183
4192
|
he,
|
|
4184
4193
|
{
|
|
@@ -4199,9 +4208,9 @@ function jr() {
|
|
|
4199
4208
|
] })
|
|
4200
4209
|
] })
|
|
4201
4210
|
] }) }),
|
|
4202
|
-
/* @__PURE__ */ e.jsx(
|
|
4211
|
+
/* @__PURE__ */ e.jsx(Ge, { className: "my-3" }),
|
|
4203
4212
|
/* @__PURE__ */ e.jsx(
|
|
4204
|
-
|
|
4213
|
+
en,
|
|
4205
4214
|
{
|
|
4206
4215
|
colorRanges: m,
|
|
4207
4216
|
setColorRanges: i
|
|
@@ -4210,7 +4219,7 @@ function jr() {
|
|
|
4210
4219
|
] })
|
|
4211
4220
|
] });
|
|
4212
4221
|
}
|
|
4213
|
-
function
|
|
4222
|
+
function bl() {
|
|
4214
4223
|
return /* @__PURE__ */ e.jsxs("div", { className: "space-y-6 px-6 py-2", children: [
|
|
4215
4224
|
/* @__PURE__ */ e.jsx(Ce, { type: "single", collapsible: !0, children: /* @__PURE__ */ e.jsxs(B, { value: "item-1", children: [
|
|
4216
4225
|
/* @__PURE__ */ e.jsx($, { className: "", children: "KPI Query" }),
|
|
@@ -4236,25 +4245,25 @@ function br() {
|
|
|
4236
4245
|
] })
|
|
4237
4246
|
] })
|
|
4238
4247
|
] }) }),
|
|
4239
|
-
/* @__PURE__ */ e.jsx("section", { className: "", children: /* @__PURE__ */ e.jsx(
|
|
4248
|
+
/* @__PURE__ */ e.jsx("section", { className: "", children: /* @__PURE__ */ e.jsx(jl, {}) }),
|
|
4240
4249
|
/* @__PURE__ */ e.jsx("div", {}),
|
|
4241
4250
|
/* @__PURE__ */ e.jsx("div", {})
|
|
4242
4251
|
] });
|
|
4243
4252
|
}
|
|
4244
|
-
function
|
|
4253
|
+
function yl() {
|
|
4245
4254
|
var n;
|
|
4246
|
-
const s = c((
|
|
4247
|
-
function a(
|
|
4255
|
+
const s = c((l) => l.card.preferences), { setCardPreferences: t } = c((l) => l.actions);
|
|
4256
|
+
function a(l) {
|
|
4248
4257
|
t({
|
|
4249
4258
|
...s,
|
|
4250
4259
|
textVisualOptions: {
|
|
4251
4260
|
...s == null ? void 0 : s.textVisualOptions,
|
|
4252
|
-
isDynamicText:
|
|
4261
|
+
isDynamicText: l === "dynamic"
|
|
4253
4262
|
}
|
|
4254
4263
|
});
|
|
4255
4264
|
}
|
|
4256
4265
|
return /* @__PURE__ */ e.jsxs(
|
|
4257
|
-
|
|
4266
|
+
_s,
|
|
4258
4267
|
{
|
|
4259
4268
|
value: (n = s == null ? void 0 : s.textVisualOptions) != null && n.isDynamicText ? "dynamic" : "static",
|
|
4260
4269
|
onValueChange: a,
|
|
@@ -4273,14 +4282,14 @@ function yr() {
|
|
|
4273
4282
|
}
|
|
4274
4283
|
);
|
|
4275
4284
|
}
|
|
4276
|
-
function
|
|
4285
|
+
function as({
|
|
4277
4286
|
cardType: s,
|
|
4278
4287
|
docContent: t,
|
|
4279
4288
|
suffix: a = "Chart"
|
|
4280
4289
|
}) {
|
|
4281
4290
|
return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(Ce, { defaultValue: ["item-2"], type: "multiple", children: [
|
|
4282
4291
|
/* @__PURE__ */ e.jsxs(B, { value: "item-1", children: [
|
|
4283
|
-
/* @__PURE__ */ e.jsx($, { children: `${
|
|
4292
|
+
/* @__PURE__ */ e.jsx($, { children: `${Hs(s)} ${a}` }),
|
|
4284
4293
|
/* @__PURE__ */ e.jsx(P, { children: t || /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
|
|
4285
4294
|
/* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT label, measure FROM table" }),
|
|
4286
4295
|
/* @__PURE__ */ e.jsxs("ul", { className: "ml-6 list-disc text-xs [&>li]:mt-2", children: [
|
|
@@ -4306,18 +4315,21 @@ function ss({
|
|
|
4306
4315
|
/* @__PURE__ */ e.jsxs(B, { value: "item-2", children: [
|
|
4307
4316
|
/* @__PURE__ */ e.jsx($, { children: "Settings" }),
|
|
4308
4317
|
/* @__PURE__ */ e.jsxs(P, { className: "space-y-4 px-2", children: [
|
|
4309
|
-
s === "range" && /* @__PURE__ */ e.jsx(
|
|
4310
|
-
s !== "text" && /* @__PURE__ */ e.jsx(
|
|
4311
|
-
s === "text" && /* @__PURE__ */ e.jsx(
|
|
4318
|
+
s === "range" && /* @__PURE__ */ e.jsx(ms, {}),
|
|
4319
|
+
s !== "text" && /* @__PURE__ */ e.jsx(Ks, {}),
|
|
4320
|
+
s === "text" && /* @__PURE__ */ e.jsx(yl, {})
|
|
4312
4321
|
] })
|
|
4313
4322
|
] }),
|
|
4314
4323
|
!["range", "text"].includes(s) && /* @__PURE__ */ e.jsxs(B, { value: "item-3", children: [
|
|
4315
4324
|
/* @__PURE__ */ e.jsx($, { children: "Filters" }),
|
|
4316
|
-
/* @__PURE__ */ e.
|
|
4325
|
+
/* @__PURE__ */ e.jsxs(P, { className: "space-y-4 px-2", children: [
|
|
4326
|
+
/* @__PURE__ */ e.jsx(Ve, {}),
|
|
4327
|
+
/* @__PURE__ */ e.jsx(qe, {})
|
|
4328
|
+
] })
|
|
4317
4329
|
] })
|
|
4318
4330
|
] }) });
|
|
4319
4331
|
}
|
|
4320
|
-
function
|
|
4332
|
+
function vl() {
|
|
4321
4333
|
return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(Ce, { defaultValue: ["item-2"], type: "multiple", children: [
|
|
4322
4334
|
/* @__PURE__ */ e.jsxs(B, { value: "item-1", children: [
|
|
4323
4335
|
/* @__PURE__ */ e.jsx($, { children: "Stacked Chart" }),
|
|
@@ -4347,20 +4359,23 @@ function vr() {
|
|
|
4347
4359
|
/* @__PURE__ */ e.jsxs(B, { value: "item-2", children: [
|
|
4348
4360
|
/* @__PURE__ */ e.jsx($, { children: "Settings" }),
|
|
4349
4361
|
/* @__PURE__ */ e.jsxs(P, { className: "space-y-4 px-2", children: [
|
|
4350
|
-
/* @__PURE__ */ e.jsx(
|
|
4351
|
-
/* @__PURE__ */ e.jsx(
|
|
4362
|
+
/* @__PURE__ */ e.jsx(ms, {}),
|
|
4363
|
+
/* @__PURE__ */ e.jsx(Pa, {})
|
|
4352
4364
|
] })
|
|
4353
4365
|
] }),
|
|
4354
4366
|
/* @__PURE__ */ e.jsxs(B, { value: "item-3", children: [
|
|
4355
4367
|
/* @__PURE__ */ e.jsx($, { children: "Filters" }),
|
|
4356
|
-
/* @__PURE__ */ e.
|
|
4368
|
+
/* @__PURE__ */ e.jsxs(P, { className: "space-y-4 px-2", children: [
|
|
4369
|
+
/* @__PURE__ */ e.jsx(Ve, {}),
|
|
4370
|
+
/* @__PURE__ */ e.jsx(qe, {})
|
|
4371
|
+
] })
|
|
4357
4372
|
] })
|
|
4358
4373
|
] }) });
|
|
4359
4374
|
}
|
|
4360
|
-
function
|
|
4375
|
+
function Nl({}) {
|
|
4361
4376
|
const s = c((n) => {
|
|
4362
|
-
var
|
|
4363
|
-
return (
|
|
4377
|
+
var l;
|
|
4378
|
+
return (l = n.card) == null ? void 0 : l.preferences;
|
|
4364
4379
|
}), t = c(
|
|
4365
4380
|
(n) => n.actions.setCardPreferences
|
|
4366
4381
|
), a = (n) => {
|
|
@@ -4372,10 +4387,13 @@ function Nr({}) {
|
|
|
4372
4387
|
return /* @__PURE__ */ e.jsxs("div", { className: "space-y-6 px-6 py-2", children: [
|
|
4373
4388
|
/* @__PURE__ */ e.jsx(Ce, { defaultValue: ["item-3"], type: "multiple", children: /* @__PURE__ */ e.jsxs(B, { value: "item-3", children: [
|
|
4374
4389
|
/* @__PURE__ */ e.jsx($, { children: "Filters" }),
|
|
4375
|
-
/* @__PURE__ */ e.
|
|
4390
|
+
/* @__PURE__ */ e.jsxs(P, { className: "space-y-4 px-2", children: [
|
|
4391
|
+
/* @__PURE__ */ e.jsx(Ve, {}),
|
|
4392
|
+
/* @__PURE__ */ e.jsx(qe, {})
|
|
4393
|
+
] })
|
|
4376
4394
|
] }) }),
|
|
4377
4395
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
4378
|
-
/* @__PURE__ */ e.jsx(
|
|
4396
|
+
/* @__PURE__ */ e.jsx(Qe, { onCheckedChange: a, id: "allow-download" }),
|
|
4379
4397
|
/* @__PURE__ */ e.jsx(
|
|
4380
4398
|
"label",
|
|
4381
4399
|
{
|
|
@@ -4387,7 +4405,7 @@ function Nr({}) {
|
|
|
4387
4405
|
] })
|
|
4388
4406
|
] });
|
|
4389
4407
|
}
|
|
4390
|
-
const
|
|
4408
|
+
const Cl = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
|
|
4391
4409
|
/* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT dimension, cohort, metric FROM table" }),
|
|
4392
4410
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
4393
4411
|
"See ",
|
|
@@ -4403,7 +4421,7 @@ const Cr = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-
|
|
|
4403
4421
|
),
|
|
4404
4422
|
" in the docs."
|
|
4405
4423
|
] })
|
|
4406
|
-
] }),
|
|
4424
|
+
] }), Sl = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
|
|
4407
4425
|
/* @__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" }),
|
|
4408
4426
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
4409
4427
|
"See ",
|
|
@@ -4419,7 +4437,7 @@ const Cr = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-
|
|
|
4419
4437
|
),
|
|
4420
4438
|
" in the docs."
|
|
4421
4439
|
] })
|
|
4422
|
-
] }),
|
|
4440
|
+
] }), kl = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
|
|
4423
4441
|
/* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT text FROM table limit 1" }),
|
|
4424
4442
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
4425
4443
|
"See ",
|
|
@@ -4436,51 +4454,51 @@ const Cr = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-
|
|
|
4436
4454
|
" in the docs."
|
|
4437
4455
|
] })
|
|
4438
4456
|
] });
|
|
4439
|
-
function
|
|
4457
|
+
function wl() {
|
|
4440
4458
|
const s = c((a) => a.card.type);
|
|
4441
4459
|
function t(a) {
|
|
4442
4460
|
switch (a) {
|
|
4443
4461
|
case "stackedBar":
|
|
4444
4462
|
case "stackedLine":
|
|
4445
|
-
return /* @__PURE__ */ e.jsx(
|
|
4463
|
+
return /* @__PURE__ */ e.jsx(vl, {});
|
|
4446
4464
|
case "pyramid":
|
|
4447
|
-
return /* @__PURE__ */ e.jsx(
|
|
4465
|
+
return /* @__PURE__ */ e.jsx(as, { docContent: Cl, cardType: a });
|
|
4448
4466
|
case "kpi":
|
|
4449
|
-
return /* @__PURE__ */ e.jsx(
|
|
4467
|
+
return /* @__PURE__ */ e.jsx(bl, {});
|
|
4450
4468
|
case "line":
|
|
4451
4469
|
case "bar":
|
|
4452
|
-
return /* @__PURE__ */ e.jsx(
|
|
4470
|
+
return /* @__PURE__ */ e.jsx(ml, { cardType: a });
|
|
4453
4471
|
case "range":
|
|
4454
|
-
return /* @__PURE__ */ e.jsx(
|
|
4472
|
+
return /* @__PURE__ */ e.jsx(as, { docContent: Sl, cardType: a });
|
|
4455
4473
|
case "pie":
|
|
4456
4474
|
case "doughnut":
|
|
4457
4475
|
case "polarArea":
|
|
4458
4476
|
case "radar":
|
|
4459
|
-
return /* @__PURE__ */ e.jsx(
|
|
4477
|
+
return /* @__PURE__ */ e.jsx(as, { cardType: a });
|
|
4460
4478
|
case "bubble":
|
|
4461
4479
|
case "scatter":
|
|
4462
|
-
return /* @__PURE__ */ e.jsx(
|
|
4480
|
+
return /* @__PURE__ */ e.jsx(ul, { cardType: a });
|
|
4463
4481
|
case "table":
|
|
4464
|
-
return /* @__PURE__ */ e.jsx(
|
|
4482
|
+
return /* @__PURE__ */ e.jsx(Nl, { cardType: a });
|
|
4465
4483
|
case "text":
|
|
4466
4484
|
return /* @__PURE__ */ e.jsx(
|
|
4467
|
-
|
|
4485
|
+
as,
|
|
4468
4486
|
{
|
|
4469
|
-
docContent:
|
|
4487
|
+
docContent: kl,
|
|
4470
4488
|
cardType: a,
|
|
4471
4489
|
suffix: "Visual"
|
|
4472
4490
|
}
|
|
4473
4491
|
);
|
|
4474
4492
|
default:
|
|
4475
|
-
return /* @__PURE__ */ e.jsx(
|
|
4493
|
+
return /* @__PURE__ */ e.jsx(fl, {});
|
|
4476
4494
|
}
|
|
4477
4495
|
}
|
|
4478
|
-
return /* @__PURE__ */ e.jsx(
|
|
4496
|
+
return /* @__PURE__ */ e.jsx(qs, { className: "h-full w-full text-sm", children: t(s) });
|
|
4479
4497
|
}
|
|
4480
|
-
function
|
|
4498
|
+
function zl() {
|
|
4481
4499
|
const s = c((t) => t.isShowingVisual);
|
|
4482
4500
|
return /* @__PURE__ */ e.jsxs(
|
|
4483
|
-
|
|
4501
|
+
Cs,
|
|
4484
4502
|
{
|
|
4485
4503
|
direction: "vertical",
|
|
4486
4504
|
className: "min-h-[250px] min-w-full max-w-lg",
|
|
@@ -4492,10 +4510,10 @@ function zr() {
|
|
|
4492
4510
|
className: "flex",
|
|
4493
4511
|
minSize: 20,
|
|
4494
4512
|
defaultSize: 40,
|
|
4495
|
-
children: /* @__PURE__ */ e.jsx(
|
|
4513
|
+
children: /* @__PURE__ */ e.jsx(al, {})
|
|
4496
4514
|
}
|
|
4497
4515
|
),
|
|
4498
|
-
/* @__PURE__ */ e.jsx(
|
|
4516
|
+
/* @__PURE__ */ e.jsx(Ss, { withHandle: !0, className: "border" }),
|
|
4499
4517
|
/* @__PURE__ */ e.jsx(
|
|
4500
4518
|
Fe,
|
|
4501
4519
|
{
|
|
@@ -4503,7 +4521,7 @@ function zr() {
|
|
|
4503
4521
|
role: "visual-section",
|
|
4504
4522
|
minSize: 0,
|
|
4505
4523
|
defaultSize: 60,
|
|
4506
|
-
children: s ? /* @__PURE__ */ e.jsxs(
|
|
4524
|
+
children: s ? /* @__PURE__ */ e.jsxs(Cs, { direction: "horizontal", children: [
|
|
4507
4525
|
/* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx(
|
|
4508
4526
|
Fe,
|
|
4509
4527
|
{
|
|
@@ -4511,33 +4529,33 @@ function zr() {
|
|
|
4511
4529
|
minSize: 20,
|
|
4512
4530
|
defaultSize: 25,
|
|
4513
4531
|
maxSize: 30,
|
|
4514
|
-
children: /* @__PURE__ */ e.jsx(
|
|
4532
|
+
children: /* @__PURE__ */ e.jsx(wl, {})
|
|
4515
4533
|
}
|
|
4516
4534
|
) }),
|
|
4517
|
-
/* @__PURE__ */ e.jsx(
|
|
4518
|
-
/* @__PURE__ */ e.jsx(Fe, { minSize: 40, defaultSize: 75, maxSize: 100, children: /* @__PURE__ */ e.jsx(
|
|
4519
|
-
] }) : /* @__PURE__ */ e.jsx(
|
|
4535
|
+
/* @__PURE__ */ e.jsx(Ss, { className: "border" }),
|
|
4536
|
+
/* @__PURE__ */ e.jsx(Fe, { minSize: 40, defaultSize: 75, maxSize: 100, children: /* @__PURE__ */ e.jsx(la, {}) })
|
|
4537
|
+
] }) : /* @__PURE__ */ e.jsx(la, {})
|
|
4520
4538
|
}
|
|
4521
4539
|
)
|
|
4522
4540
|
]
|
|
4523
4541
|
}
|
|
4524
4542
|
);
|
|
4525
4543
|
}
|
|
4526
|
-
function
|
|
4527
|
-
const n = c((i) => i.actions.setOnSave),
|
|
4544
|
+
function Fl({ authToken: s, onSave: t, onClose: a }) {
|
|
4545
|
+
const n = c((i) => i.actions.setOnSave), l = c((i) => i.actions.setOnClose), m = k((i) => i.actions.setAuthToken);
|
|
4528
4546
|
return U(() => {
|
|
4529
|
-
t && n(t), a &&
|
|
4530
|
-
}, [t, n, a,
|
|
4547
|
+
t && n(t), a && l(a);
|
|
4548
|
+
}, [t, n, a, l]), U(() => {
|
|
4531
4549
|
s && s.accessToken && m(s);
|
|
4532
|
-
}, [s, m]), /* @__PURE__ */ e.jsxs(
|
|
4533
|
-
/* @__PURE__ */ e.jsx(
|
|
4534
|
-
/* @__PURE__ */ e.jsx(
|
|
4550
|
+
}, [s, m]), /* @__PURE__ */ e.jsxs(sn, { className: "rounded-none", role: "editor-panel", children: [
|
|
4551
|
+
/* @__PURE__ */ e.jsx(an, { className: "rounded-none border-r-[1.5px]", children: /* @__PURE__ */ e.jsx(Ta, {}) }),
|
|
4552
|
+
/* @__PURE__ */ e.jsx(tn, { children: /* @__PURE__ */ e.jsx(zl, {}) })
|
|
4535
4553
|
] });
|
|
4536
4554
|
}
|
|
4537
|
-
function
|
|
4555
|
+
function Ol() {
|
|
4538
4556
|
k((i) => i.selectedCardId);
|
|
4539
4557
|
const s = k((i) => i.selectedSheetId), { setIsVisualEditing: t } = k((i) => i.actions), a = k((i) => i.isVisualEditing), n = k((i) => i.actions.updateFrame);
|
|
4540
|
-
function
|
|
4558
|
+
function l(i) {
|
|
4541
4559
|
s && (n(s, i), t(!1));
|
|
4542
4560
|
}
|
|
4543
4561
|
function m() {
|
|
@@ -4551,11 +4569,11 @@ function Or() {
|
|
|
4551
4569
|
block: a,
|
|
4552
4570
|
hidden: !a
|
|
4553
4571
|
}),
|
|
4554
|
-
children: /* @__PURE__ */ e.jsx(
|
|
4572
|
+
children: /* @__PURE__ */ e.jsx(Fl, { onSave: l, onClose: m })
|
|
4555
4573
|
}
|
|
4556
4574
|
);
|
|
4557
4575
|
}
|
|
4558
|
-
function
|
|
4576
|
+
function Ml() {
|
|
4559
4577
|
c((i) => i.selectedConnectionId), c((i) => i.selectedDatamodelId);
|
|
4560
4578
|
const s = c((i) => i.selectedDatabaseName);
|
|
4561
4579
|
c((i) => i.selectedSchemaName);
|
|
@@ -4563,8 +4581,8 @@ function Mr() {
|
|
|
4563
4581
|
k((i) => i.actions.addFilter), k((i) => i.actions.removeFilter), k(
|
|
4564
4582
|
(i) => i.actions.removeFilterValue
|
|
4565
4583
|
);
|
|
4566
|
-
const { modelItems: n, columns:
|
|
4567
|
-
return /* @__PURE__ */ e.jsx("div", { className: "xbg-red-100 flex-1 basis-0 flex-col overflow-scroll px-3", children:
|
|
4584
|
+
const { modelItems: n, columns: l } = Ie(), { assignFilter: m } = Ka();
|
|
4585
|
+
return /* @__PURE__ */ e.jsx("div", { className: "xbg-red-100 flex-1 basis-0 flex-col overflow-scroll px-3", children: l == null ? void 0 : l.map((i) => {
|
|
4568
4586
|
const o = a == null ? void 0 : a.find(
|
|
4569
4587
|
(d) => d.column === ue(i.column_name) && d.table === t && d.database === s
|
|
4570
4588
|
);
|
|
@@ -4579,7 +4597,7 @@ function Mr() {
|
|
|
4579
4597
|
}
|
|
4580
4598
|
),
|
|
4581
4599
|
children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
4582
|
-
/* @__PURE__ */ e.jsx(
|
|
4600
|
+
/* @__PURE__ */ e.jsx(Ma, { column: i }),
|
|
4583
4601
|
/* @__PURE__ */ e.jsx("span", { children: i.column_name })
|
|
4584
4602
|
] })
|
|
4585
4603
|
},
|
|
@@ -4587,31 +4605,31 @@ function Mr() {
|
|
|
4587
4605
|
);
|
|
4588
4606
|
}) });
|
|
4589
4607
|
}
|
|
4590
|
-
function
|
|
4608
|
+
function Tl() {
|
|
4591
4609
|
k((t) => t.showFilters);
|
|
4592
4610
|
const s = k(
|
|
4593
4611
|
(t) => t.actions.setShowFilters
|
|
4594
4612
|
);
|
|
4595
4613
|
return /* @__PURE__ */ e.jsxs("section", { className: "relative flex grow flex-col border-l px-4", children: [
|
|
4596
4614
|
/* @__PURE__ */ e.jsxs("div", { className: "mt-4 flex items-center justify-between gap-2 px-3", children: [
|
|
4597
|
-
/* @__PURE__ */ e.jsx(
|
|
4615
|
+
/* @__PURE__ */ e.jsx(R, { className: "text-lg", children: "Filters" }),
|
|
4598
4616
|
/* @__PURE__ */ e.jsx(
|
|
4599
4617
|
w,
|
|
4600
4618
|
{
|
|
4601
4619
|
onClick: () => s(!1),
|
|
4602
4620
|
className: "h-7 w-7 p-0",
|
|
4603
4621
|
variant: "ghost",
|
|
4604
|
-
children: /* @__PURE__ */ e.jsx(
|
|
4622
|
+
children: /* @__PURE__ */ e.jsx(Pe, {})
|
|
4605
4623
|
}
|
|
4606
4624
|
)
|
|
4607
4625
|
] }),
|
|
4608
4626
|
/* @__PURE__ */ e.jsx("div", { className: "flex grow", children: /* @__PURE__ */ e.jsx(
|
|
4609
|
-
|
|
4627
|
+
Ta,
|
|
4610
4628
|
{
|
|
4611
4629
|
ColumnsComponent: () => (
|
|
4612
4630
|
// schemaName, tableName, columns
|
|
4613
4631
|
/* @__PURE__ */ e.jsx(
|
|
4614
|
-
|
|
4632
|
+
Ml,
|
|
4615
4633
|
{}
|
|
4616
4634
|
)
|
|
4617
4635
|
)
|
|
@@ -4619,7 +4637,7 @@ function Tr() {
|
|
|
4619
4637
|
) })
|
|
4620
4638
|
] });
|
|
4621
4639
|
}
|
|
4622
|
-
function
|
|
4640
|
+
function Dl() {
|
|
4623
4641
|
k((a) => a.dashboard);
|
|
4624
4642
|
const s = k((a) => a.showFilters), t = k((a) => a.isVisualEditing);
|
|
4625
4643
|
return k((a) => a.bookmarkKey), /* @__PURE__ */ e.jsxs(
|
|
@@ -4631,13 +4649,13 @@ function Dr() {
|
|
|
4631
4649
|
flex: !t
|
|
4632
4650
|
}),
|
|
4633
4651
|
children: [
|
|
4634
|
-
/* @__PURE__ */ e.jsx(
|
|
4635
|
-
s && /* @__PURE__ */ e.jsx("div", { role: "filter-aside-container", className: "flex", children: /* @__PURE__ */ e.jsx(
|
|
4652
|
+
/* @__PURE__ */ e.jsx(nn, {}),
|
|
4653
|
+
s && /* @__PURE__ */ e.jsx("div", { role: "filter-aside-container", className: "flex", children: /* @__PURE__ */ e.jsx(Tl, {}) })
|
|
4636
4654
|
]
|
|
4637
4655
|
}
|
|
4638
4656
|
);
|
|
4639
4657
|
}
|
|
4640
|
-
function
|
|
4658
|
+
function Al() {
|
|
4641
4659
|
const s = k((n) => n.dashboard), t = k((n) => n.actions.setDashboard), a = k(
|
|
4642
4660
|
(n) => n.showDashboardJSON
|
|
4643
4661
|
);
|
|
@@ -4650,7 +4668,7 @@ function Ar() {
|
|
|
4650
4668
|
hidden: !a
|
|
4651
4669
|
}),
|
|
4652
4670
|
children: /* @__PURE__ */ e.jsx(
|
|
4653
|
-
|
|
4671
|
+
ln,
|
|
4654
4672
|
{
|
|
4655
4673
|
onChange: (n) => {
|
|
4656
4674
|
if (n)
|
|
@@ -4681,26 +4699,26 @@ function Ar() {
|
|
|
4681
4699
|
}
|
|
4682
4700
|
);
|
|
4683
4701
|
}
|
|
4684
|
-
function
|
|
4702
|
+
function Il({
|
|
4685
4703
|
showControls: s = !1,
|
|
4686
4704
|
showFooter: t = !0,
|
|
4687
4705
|
...a
|
|
4688
4706
|
}) {
|
|
4689
4707
|
return /* @__PURE__ */ e.jsxs(rn, { dashboardProps: a, children: [
|
|
4690
|
-
/* @__PURE__ */ e.jsx(
|
|
4691
|
-
/* @__PURE__ */ e.jsxs(
|
|
4692
|
-
/* @__PURE__ */ e.jsx(
|
|
4693
|
-
/* @__PURE__ */ e.jsxs(
|
|
4694
|
-
s && /* @__PURE__ */ e.jsx(
|
|
4695
|
-
/* @__PURE__ */ e.jsx(
|
|
4696
|
-
/* @__PURE__ */ e.jsx(
|
|
4708
|
+
/* @__PURE__ */ e.jsx(on, {}),
|
|
4709
|
+
/* @__PURE__ */ e.jsxs(cn, { children: [
|
|
4710
|
+
/* @__PURE__ */ e.jsx(Al, {}),
|
|
4711
|
+
/* @__PURE__ */ e.jsxs(dn, { ...a, children: [
|
|
4712
|
+
s && /* @__PURE__ */ e.jsx(qn, {}),
|
|
4713
|
+
/* @__PURE__ */ e.jsx(Ol, {}),
|
|
4714
|
+
/* @__PURE__ */ e.jsx(Dl, {})
|
|
4697
4715
|
] })
|
|
4698
4716
|
] })
|
|
4699
4717
|
] });
|
|
4700
4718
|
}
|
|
4701
4719
|
export {
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
|
|
4720
|
+
Il as D,
|
|
4721
|
+
Ue as L,
|
|
4722
|
+
Be as S,
|
|
4705
4723
|
Ie as u
|
|
4706
4724
|
};
|