react-semaphor 0.0.438 → 0.0.439
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/{index-By2xd102.js → index-BbpuKZcd.js} +191 -184
- package/dist/chunks/{index-SRcF4tB1.js → index-C3CSs3d8.js} +3 -3
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/index.cjs +30 -30
- package/dist/index.js +276 -283
- package/dist/style.css +1 -1
- package/dist/types/main.d.ts +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { c as A, p as nn, u as _, a as rt, b as Ve, d as Rn, e as jn, B as ee, P as mt, f as Bn, g as Pn, h as Hn, i as Gn, L as U, I as he, j as Un, k as $n, l as Qn, m as X, n as Kn, o as Jn, q as Wn, r as ks, s as In, t as G, C as an, v as Ms, S as ke, w as Me, x as De, y as Ie, z as Fe, A as Oe, E as ue, T as
|
|
2
|
-
import { D as Go, cs as Uo, cq as $o, cq as Qo, cv as Ko, cu as Jo, ct as Wo, cw as
|
|
3
|
-
import { jsxs as r, jsx as e, Fragment as
|
|
4
|
-
import * as
|
|
1
|
+
import { c as A, p as nn, u as _, a as rt, b as Ve, d as Rn, e as jn, B as ee, P as mt, f as Bn, g as Pn, h as Hn, i as Gn, L as U, I as he, j as Un, k as $n, l as Qn, m as X, n as Kn, o as Jn, q as Wn, r as ks, s as In, t as G, C as an, v as Ms, S as ke, w as Me, x as De, y as Ie, z as Fe, A as Oe, E as ue, T as Yn, F as Ke, G as Je, H as It, J as ze, K as sn, M as Ot, N as rn, O as Tt, Q as Le, R as Zn, U as zt, V as Xn, W as Ae, X as On, Y as Re, Z as f, _ as ea, $ as tt, a0 as bt, a1 as Ds, a2 as ta, a3 as na, a4 as aa, a5 as sa, a6 as ra, a7 as ia, a8 as la, a9 as oa, aa as ca, ab as da, ac as ua, ad as ma, ae as xe, af as Is, ag as Se, ah as $e, ai as we, aj as Os, ak as Ts, al as zs, am as vt, an as Ee, ao as As, ap as xt, aq as Fs, ar as W, as as Ls, at as Es, au as _s, av as Jt, aw as ha, ax as At, ay as nt, az as pa, aA as Ct, aB as ge, aC as Vs, aD as qs, aE as it, aF as Rs, aG as js, aH as Bs, aI as fa, aJ as Ps, aK as Ft, aL as Hs, aM as Gs, aN as Us, aO as Tn, aP as $s, aQ as Qs, aR as ln, aS as Ce, aT as Ks, aU as Wt, aV as je, aW as pe, aX as Be, aY as Js, aZ as Ws, a_ as Ys, a$ as Zs, b0 as Xs, b1 as Rt, b2 as er, b3 as zn, b4 as tr, b5 as An, b6 as nr, b7 as ar, b8 as sr, b9 as rr, ba as ga, bb as ir, bc as on, bd as ya, be as lr, bf as or, bg as Xe, bh as cr, bi as dr, bj as ba, bk as ur, bl as mr, bm as hr, bn as pr, bo as fr, bp as Lt, bq as va, br as gr, bs as cn, bt as dn, bu as et, bv as yt, bw as yr, bx as br, by as vr, bz as un, bA as xa, bB as Ca, bC as Nt, bD as xr, bE as St, bF as Na, bG as Sa, bH as wa, bI as Cr, bJ as Nr, bK as Sr, bL as wr, bM as qe, bN as le, bO as oe, bP as ce, bQ as mn, bR as kr, bS as Mr, bT as Dr, bU as Ir, bV as Fn, bW as ka, bX as Or, bY as Tr, bZ as zr, b_ as Ar, b$ as hn, c0 as Ma, c1 as Da, c2 as pn, c3 as Fr, c4 as Ia, c5 as Oa, c6 as Lr, c7 as Er, c8 as _r, c9 as Vr, ca as qr, cb as Rr, cc as jr, cd as Br, ce as Pr, cf as jt, cg as Ta, ch as Hr, ci as Gr, cj as Ur, ck as $r, cl as Qr, cm as Kr, cn as Jr } from "./chunks/index-BbpuKZcd.js";
|
|
2
|
+
import { D as Go, cs as Uo, cq as $o, cq as Qo, cv as Ko, cu as Jo, ct as Wo, cw as Yo, cx as Zo, cr as Xo, co as ec, cp as tc } from "./chunks/index-BbpuKZcd.js";
|
|
3
|
+
import { jsxs as r, jsx as e, Fragment as ae } from "react/jsx-runtime";
|
|
4
|
+
import * as Ze from "react";
|
|
5
5
|
import _e, { useState as J, useMemo as Pe, useEffect as me, useRef as at, useCallback as za, Suspense as Wr } from "react";
|
|
6
6
|
import "react-dom";
|
|
7
7
|
/**
|
|
@@ -10,7 +10,7 @@ import "react-dom";
|
|
|
10
10
|
* This source code is licensed under the ISC license.
|
|
11
11
|
* See the LICENSE file in the root directory of this source tree.
|
|
12
12
|
*/
|
|
13
|
-
const
|
|
13
|
+
const Yr = A("AlignCenter", [
|
|
14
14
|
["path", { d: "M17 12H7", key: "16if0g" }],
|
|
15
15
|
["path", { d: "M19 18H5", key: "18s9l3" }],
|
|
16
16
|
["path", { d: "M21 6H3", key: "1jwq7v" }]
|
|
@@ -21,7 +21,7 @@ const Zr = A("AlignCenter", [
|
|
|
21
21
|
* This source code is licensed under the ISC license.
|
|
22
22
|
* See the LICENSE file in the root directory of this source tree.
|
|
23
23
|
*/
|
|
24
|
-
const
|
|
24
|
+
const Zr = A("AlignLeft", [
|
|
25
25
|
["path", { d: "M15 12H3", key: "6jk70r" }],
|
|
26
26
|
["path", { d: "M17 18H3", key: "1amg6g" }],
|
|
27
27
|
["path", { d: "M21 6H3", key: "1jwq7v" }]
|
|
@@ -415,6 +415,16 @@ const bi = A("Database", [
|
|
|
415
415
|
["path", { d: "M3 5V19A9 3 0 0 0 21 19V5", key: "1wlel7" }],
|
|
416
416
|
["path", { d: "M3 12A9 3 0 0 0 21 12", key: "mv7ke4" }]
|
|
417
417
|
]);
|
|
418
|
+
/**
|
|
419
|
+
* @license lucide-react v0.453.0 - ISC
|
|
420
|
+
*
|
|
421
|
+
* This source code is licensed under the ISC license.
|
|
422
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
423
|
+
*/
|
|
424
|
+
const vi = A("DollarSign", [
|
|
425
|
+
["line", { x1: "12", x2: "12", y1: "2", y2: "22", key: "7eqyqh" }],
|
|
426
|
+
["path", { d: "M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6", key: "1b0p4s" }]
|
|
427
|
+
]);
|
|
418
428
|
/**
|
|
419
429
|
* @license lucide-react v0.453.0 - ISC
|
|
420
430
|
*
|
|
@@ -448,7 +458,7 @@ const Ra = A("EllipsisVertical", [
|
|
|
448
458
|
* This source code is licensed under the ISC license.
|
|
449
459
|
* See the LICENSE file in the root directory of this source tree.
|
|
450
460
|
*/
|
|
451
|
-
const
|
|
461
|
+
const xi = A("Eraser", [
|
|
452
462
|
[
|
|
453
463
|
"path",
|
|
454
464
|
{
|
|
@@ -477,7 +487,7 @@ const ja = A("Expand", [
|
|
|
477
487
|
* This source code is licensed under the ISC license.
|
|
478
488
|
* See the LICENSE file in the root directory of this source tree.
|
|
479
489
|
*/
|
|
480
|
-
const
|
|
490
|
+
const Ci = A("EyeClosed", [
|
|
481
491
|
["path", { d: "m15 18-.722-3.25", key: "1j64jw" }],
|
|
482
492
|
["path", { d: "M2 8a10.645 10.645 0 0 0 20 0", key: "1e7gxb" }],
|
|
483
493
|
["path", { d: "m20 15-1.726-2.05", key: "1cnuld" }],
|
|
@@ -490,7 +500,7 @@ const xi = A("EyeClosed", [
|
|
|
490
500
|
* This source code is licensed under the ISC license.
|
|
491
501
|
* See the LICENSE file in the root directory of this source tree.
|
|
492
502
|
*/
|
|
493
|
-
const
|
|
503
|
+
const Ni = A("FileCode2", [
|
|
494
504
|
["path", { d: "M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4", key: "1pf5j1" }],
|
|
495
505
|
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
|
|
496
506
|
["path", { d: "m5 12-3 3 3 3", key: "oke12k" }],
|
|
@@ -502,7 +512,7 @@ const Ci = A("FileCode2", [
|
|
|
502
512
|
* This source code is licensed under the ISC license.
|
|
503
513
|
* See the LICENSE file in the root directory of this source tree.
|
|
504
514
|
*/
|
|
505
|
-
const
|
|
515
|
+
const Si = A("FileJson2", [
|
|
506
516
|
["path", { d: "M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4", key: "1pf5j1" }],
|
|
507
517
|
["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
|
|
508
518
|
[
|
|
@@ -529,7 +539,7 @@ const Ba = A("Filter", [
|
|
|
529
539
|
* This source code is licensed under the ISC license.
|
|
530
540
|
* See the LICENSE file in the root directory of this source tree.
|
|
531
541
|
*/
|
|
532
|
-
const
|
|
542
|
+
const wi = A("Fingerprint", [
|
|
533
543
|
["path", { d: "M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4", key: "1nerag" }],
|
|
534
544
|
["path", { d: "M14 13.12c0 2.38 0 6.38-1 8.88", key: "o46ks0" }],
|
|
535
545
|
["path", { d: "M17.29 21.02c.12-.6.43-2.3.5-3.02", key: "ptglia" }],
|
|
@@ -546,7 +556,7 @@ const Si = A("Fingerprint", [
|
|
|
546
556
|
* This source code is licensed under the ISC license.
|
|
547
557
|
* See the LICENSE file in the root directory of this source tree.
|
|
548
558
|
*/
|
|
549
|
-
const
|
|
559
|
+
const ki = A("Glasses", [
|
|
550
560
|
["circle", { cx: "6", cy: "15", r: "4", key: "vux9w4" }],
|
|
551
561
|
["circle", { cx: "18", cy: "15", r: "4", key: "18o8ve" }],
|
|
552
562
|
["path", { d: "M14 15a2 2 0 0 0-2-2 2 2 0 0 0-2 2", key: "1ag4bs" }],
|
|
@@ -559,7 +569,7 @@ const wi = A("Glasses", [
|
|
|
559
569
|
* This source code is licensed under the ISC license.
|
|
560
570
|
* See the LICENSE file in the root directory of this source tree.
|
|
561
571
|
*/
|
|
562
|
-
const
|
|
572
|
+
const Mi = A("Grid3x3", [
|
|
563
573
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
564
574
|
["path", { d: "M3 9h18", key: "1pudct" }],
|
|
565
575
|
["path", { d: "M3 15h18", key: "5xshup" }],
|
|
@@ -572,7 +582,7 @@ const ki = A("Grid3x3", [
|
|
|
572
582
|
* This source code is licensed under the ISC license.
|
|
573
583
|
* See the LICENSE file in the root directory of this source tree.
|
|
574
584
|
*/
|
|
575
|
-
const
|
|
585
|
+
const Di = A("Hammer", [
|
|
576
586
|
["path", { d: "m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9", key: "eefl8a" }],
|
|
577
587
|
["path", { d: "m18 15 4-4", key: "16gjal" }],
|
|
578
588
|
[
|
|
@@ -601,7 +611,7 @@ const Pa = A("Hash", [
|
|
|
601
611
|
* This source code is licensed under the ISC license.
|
|
602
612
|
* See the LICENSE file in the root directory of this source tree.
|
|
603
613
|
*/
|
|
604
|
-
const
|
|
614
|
+
const Ii = A("House", [
|
|
605
615
|
["path", { d: "M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8", key: "5wwlr5" }],
|
|
606
616
|
[
|
|
607
617
|
"path",
|
|
@@ -617,7 +627,7 @@ const Di = A("House", [
|
|
|
617
627
|
* This source code is licensed under the ISC license.
|
|
618
628
|
* See the LICENSE file in the root directory of this source tree.
|
|
619
629
|
*/
|
|
620
|
-
const
|
|
630
|
+
const Oi = A("LayoutList", [
|
|
621
631
|
["rect", { width: "7", height: "7", x: "3", y: "3", rx: "1", key: "1g98yp" }],
|
|
622
632
|
["rect", { width: "7", height: "7", x: "3", y: "14", rx: "1", key: "1bb6yr" }],
|
|
623
633
|
["path", { d: "M14 4h7", key: "3xa0d5" }],
|
|
@@ -631,7 +641,7 @@ const Ii = A("LayoutList", [
|
|
|
631
641
|
* This source code is licensed under the ISC license.
|
|
632
642
|
* See the LICENSE file in the root directory of this source tree.
|
|
633
643
|
*/
|
|
634
|
-
const
|
|
644
|
+
const Ti = A("ListEnd", [
|
|
635
645
|
["path", { d: "M16 12H3", key: "1a2rj7" }],
|
|
636
646
|
["path", { d: "M16 6H3", key: "1wxfjs" }],
|
|
637
647
|
["path", { d: "M10 18H3", key: "13769t" }],
|
|
@@ -644,7 +654,7 @@ const Oi = A("ListEnd", [
|
|
|
644
654
|
* This source code is licensed under the ISC license.
|
|
645
655
|
* See the LICENSE file in the root directory of this source tree.
|
|
646
656
|
*/
|
|
647
|
-
const
|
|
657
|
+
const zi = A("ListStart", [
|
|
648
658
|
["path", { d: "M16 12H3", key: "1a2rj7" }],
|
|
649
659
|
["path", { d: "M16 18H3", key: "12xzn7" }],
|
|
650
660
|
["path", { d: "M10 6H3", key: "lf8lx7" }],
|
|
@@ -657,7 +667,7 @@ const Ti = A("ListStart", [
|
|
|
657
667
|
* This source code is licensed under the ISC license.
|
|
658
668
|
* See the LICENSE file in the root directory of this source tree.
|
|
659
669
|
*/
|
|
660
|
-
const
|
|
670
|
+
const Ai = A("ListX", [
|
|
661
671
|
["path", { d: "M11 12H3", key: "51ecnj" }],
|
|
662
672
|
["path", { d: "M16 6H3", key: "1wxfjs" }],
|
|
663
673
|
["path", { d: "M16 18H3", key: "12xzn7" }],
|
|
@@ -679,7 +689,7 @@ const Qe = A("LoaderCircle", [
|
|
|
679
689
|
* This source code is licensed under the ISC license.
|
|
680
690
|
* See the LICENSE file in the root directory of this source tree.
|
|
681
691
|
*/
|
|
682
|
-
const
|
|
692
|
+
const Fi = A("Logs", [
|
|
683
693
|
["path", { d: "M13 12h8", key: "h98zly" }],
|
|
684
694
|
["path", { d: "M13 18h8", key: "oe0vm4" }],
|
|
685
695
|
["path", { d: "M13 6h8", key: "15sg57" }],
|
|
@@ -696,7 +706,7 @@ const Ai = A("Logs", [
|
|
|
696
706
|
* This source code is licensed under the ISC license.
|
|
697
707
|
* See the LICENSE file in the root directory of this source tree.
|
|
698
708
|
*/
|
|
699
|
-
const
|
|
709
|
+
const Li = A("Mail", [
|
|
700
710
|
["rect", { width: "20", height: "16", x: "2", y: "4", rx: "2", key: "18n3k1" }],
|
|
701
711
|
["path", { d: "m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7", key: "1ocrg3" }]
|
|
702
712
|
]);
|
|
@@ -723,7 +733,7 @@ const Ha = A("Map", [
|
|
|
723
733
|
* This source code is licensed under the ISC license.
|
|
724
734
|
* See the LICENSE file in the root directory of this source tree.
|
|
725
735
|
*/
|
|
726
|
-
const
|
|
736
|
+
const Ei = A("MessageCircleMore", [
|
|
727
737
|
["path", { d: "M7.9 20A9 9 0 1 0 4 16.1L2 22Z", key: "vv11sd" }],
|
|
728
738
|
["path", { d: "M8 12h.01", key: "czm47f" }],
|
|
729
739
|
["path", { d: "M12 12h.01", key: "1mp3jc" }],
|
|
@@ -735,7 +745,7 @@ const Li = A("MessageCircleMore", [
|
|
|
735
745
|
* This source code is licensed under the ISC license.
|
|
736
746
|
* See the LICENSE file in the root directory of this source tree.
|
|
737
747
|
*/
|
|
738
|
-
const
|
|
748
|
+
const _i = A("MoveHorizontal", [
|
|
739
749
|
["path", { d: "m18 8 4 4-4 4", key: "1ak13k" }],
|
|
740
750
|
["path", { d: "M2 12h20", key: "9i4pu4" }],
|
|
741
751
|
["path", { d: "m6 8-4 4 4 4", key: "15zrgr" }]
|
|
@@ -746,7 +756,7 @@ const Ei = A("MoveHorizontal", [
|
|
|
746
756
|
* This source code is licensed under the ISC license.
|
|
747
757
|
* See the LICENSE file in the root directory of this source tree.
|
|
748
758
|
*/
|
|
749
|
-
const
|
|
759
|
+
const Vi = A("MoveVertical", [
|
|
750
760
|
["path", { d: "M12 2v20", key: "t6zp3m" }],
|
|
751
761
|
["path", { d: "m8 18 4 4 4-4", key: "bh5tu3" }],
|
|
752
762
|
["path", { d: "m8 6 4-4 4 4", key: "ybng9g" }]
|
|
@@ -757,7 +767,7 @@ const _i = A("MoveVertical", [
|
|
|
757
767
|
* This source code is licensed under the ISC license.
|
|
758
768
|
* See the LICENSE file in the root directory of this source tree.
|
|
759
769
|
*/
|
|
760
|
-
const
|
|
770
|
+
const qi = A("Network", [
|
|
761
771
|
["rect", { x: "16", y: "16", width: "6", height: "6", rx: "1", key: "4q2zg0" }],
|
|
762
772
|
["rect", { x: "2", y: "16", width: "6", height: "6", rx: "1", key: "8cvhb9" }],
|
|
763
773
|
["rect", { x: "9", y: "2", width: "6", height: "6", rx: "1", key: "1egb70" }],
|
|
@@ -770,7 +780,7 @@ const Vi = A("Network", [
|
|
|
770
780
|
* This source code is licensed under the ISC license.
|
|
771
781
|
* See the LICENSE file in the root directory of this source tree.
|
|
772
782
|
*/
|
|
773
|
-
const
|
|
783
|
+
const Ri = A("Plug", [
|
|
774
784
|
["path", { d: "M12 22v-5", key: "1ega77" }],
|
|
775
785
|
["path", { d: "M9 8V2", key: "14iosj" }],
|
|
776
786
|
["path", { d: "M15 8V2", key: "18g5xt" }],
|
|
@@ -810,30 +820,11 @@ const Ua = A("RefreshCw", [
|
|
|
810
820
|
* This source code is licensed under the ISC license.
|
|
811
821
|
* See the LICENSE file in the root directory of this source tree.
|
|
812
822
|
*/
|
|
813
|
-
const
|
|
823
|
+
const ji = A("Rows3", [
|
|
814
824
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
815
825
|
["path", { d: "M21 9H3", key: "1338ky" }],
|
|
816
826
|
["path", { d: "M21 15H3", key: "9uk58r" }]
|
|
817
827
|
]);
|
|
818
|
-
/**
|
|
819
|
-
* @license lucide-react v0.453.0 - ISC
|
|
820
|
-
*
|
|
821
|
-
* This source code is licensed under the ISC license.
|
|
822
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
823
|
-
*/
|
|
824
|
-
const ji = A("Ruler", [
|
|
825
|
-
[
|
|
826
|
-
"path",
|
|
827
|
-
{
|
|
828
|
-
d: "M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.41 2.41 0 0 1 0-3.4l2.6-2.6a2.41 2.41 0 0 1 3.4 0Z",
|
|
829
|
-
key: "icamh8"
|
|
830
|
-
}
|
|
831
|
-
],
|
|
832
|
-
["path", { d: "m14.5 12.5 2-2", key: "inckbg" }],
|
|
833
|
-
["path", { d: "m11.5 9.5 2-2", key: "fmmyf7" }],
|
|
834
|
-
["path", { d: "m8.5 6.5 2-2", key: "vc6u1g" }],
|
|
835
|
-
["path", { d: "m17.5 15.5 2-2", key: "wo5hmg" }]
|
|
836
|
-
]);
|
|
837
828
|
/**
|
|
838
829
|
* @license lucide-react v0.453.0 - ISC
|
|
839
830
|
*
|
|
@@ -1064,7 +1055,7 @@ async function Wi(t, a, n, s) {
|
|
|
1064
1055
|
operation: "create"
|
|
1065
1056
|
});
|
|
1066
1057
|
}
|
|
1067
|
-
async function
|
|
1058
|
+
async function Yt(t, a) {
|
|
1068
1059
|
if (!a)
|
|
1069
1060
|
return null;
|
|
1070
1061
|
const { id: n, template: s, filterValues: i, isDefault: o, shared: l } = t;
|
|
@@ -1077,13 +1068,13 @@ async function Zt(t, a) {
|
|
|
1077
1068
|
operation: "update"
|
|
1078
1069
|
});
|
|
1079
1070
|
}
|
|
1080
|
-
async function
|
|
1071
|
+
async function Yi(t, a) {
|
|
1081
1072
|
return a ? await nn("https://semaphor.cloud/api/v1/lens", a, {
|
|
1082
1073
|
operation: "delete",
|
|
1083
1074
|
lensId: t
|
|
1084
1075
|
}) : null;
|
|
1085
1076
|
}
|
|
1086
|
-
function
|
|
1077
|
+
function Zi() {
|
|
1087
1078
|
const [t, a] = J(""), [n, s] = J(!1), i = _((p) => p.lenses), { setLenses: o, setSelectedLensId: l } = rt(), [u, c] = J(!1), [h, d] = J(!1), y = _((p) => p.dashboard), x = _((p) => p.filterValues), { authToken: m } = Ve();
|
|
1088
1079
|
async function C() {
|
|
1089
1080
|
c(!0);
|
|
@@ -1150,7 +1141,7 @@ function Xi() {
|
|
|
1150
1141
|
o(d);
|
|
1151
1142
|
}
|
|
1152
1143
|
async function c(d) {
|
|
1153
|
-
if (await
|
|
1144
|
+
if (await Yi(d, l == null ? void 0 : l.accessToken)) {
|
|
1154
1145
|
const x = n == null ? void 0 : n.filter((m) => m.id !== d);
|
|
1155
1146
|
i(x || []), o("original");
|
|
1156
1147
|
}
|
|
@@ -1168,18 +1159,18 @@ function Xi() {
|
|
|
1168
1159
|
...d,
|
|
1169
1160
|
isDefault: !d.isDefault
|
|
1170
1161
|
};
|
|
1171
|
-
await
|
|
1162
|
+
await Yt(x, l == null ? void 0 : l.accessToken);
|
|
1172
1163
|
const m = n == null ? void 0 : n.find((C) => C.isDefault);
|
|
1173
1164
|
if (m && m.id !== d.id) {
|
|
1174
1165
|
const C = {
|
|
1175
1166
|
...m,
|
|
1176
1167
|
isDefault: !1
|
|
1177
1168
|
};
|
|
1178
|
-
await
|
|
1169
|
+
await Yt(C, l == null ? void 0 : l.accessToken);
|
|
1179
1170
|
}
|
|
1180
1171
|
}
|
|
1181
1172
|
return /* @__PURE__ */ r($n, { open: t, onOpenChange: a, children: [
|
|
1182
|
-
/* @__PURE__ */ e(Qn, { asChild: !0, children: /* @__PURE__ */ e(X, { tooltip: "Lenses", className: "h-7 p-2", children: /* @__PURE__ */ e(
|
|
1173
|
+
/* @__PURE__ */ e(Qn, { asChild: !0, children: /* @__PURE__ */ e(X, { tooltip: "Lenses", className: "h-7 p-2", children: /* @__PURE__ */ e(ki, { className: "h-4 w-4" }) }) }),
|
|
1183
1174
|
/* @__PURE__ */ r(Kn, { align: "end", className: "w-60", children: [
|
|
1184
1175
|
/* @__PURE__ */ e(Jn, { className: "px-3", children: "Lenses" }),
|
|
1185
1176
|
/* @__PURE__ */ e(Wn, {}),
|
|
@@ -1199,7 +1190,7 @@ function Xi() {
|
|
|
1199
1190
|
/* @__PURE__ */ e("p", { children: d.name }),
|
|
1200
1191
|
/* @__PURE__ */ r("span", { className: "flex items-center gap-3", children: [
|
|
1201
1192
|
/* @__PURE__ */ e(
|
|
1202
|
-
|
|
1193
|
+
Ii,
|
|
1203
1194
|
{
|
|
1204
1195
|
onClick: (y) => {
|
|
1205
1196
|
y.preventDefault(), h(d);
|
|
@@ -1235,7 +1226,7 @@ function Xi() {
|
|
|
1235
1226
|
] })
|
|
1236
1227
|
] });
|
|
1237
1228
|
}
|
|
1238
|
-
function
|
|
1229
|
+
function Ya() {
|
|
1239
1230
|
var o;
|
|
1240
1231
|
const t = _.getState().authToken, a = _.getState().theme, n = _.getState().filterValues, s = (o = _.getState().dashboard) == null ? void 0 : o.title, i = _.getState().selectedSheetId;
|
|
1241
1232
|
return {
|
|
@@ -1247,7 +1238,7 @@ function Za() {
|
|
|
1247
1238
|
};
|
|
1248
1239
|
}
|
|
1249
1240
|
async function el() {
|
|
1250
|
-
const t = _.getState().isDownloadingPdf, { authToken: a, theme: n, filterValues: s, dashboardTitle: i, selectedSheetId: o } =
|
|
1241
|
+
const t = _.getState().isDownloadingPdf, { authToken: a, theme: n, filterValues: s, dashboardTitle: i, selectedSheetId: o } = Ya();
|
|
1251
1242
|
if (t)
|
|
1252
1243
|
return;
|
|
1253
1244
|
const l = new URLSearchParams();
|
|
@@ -1338,7 +1329,7 @@ function nl({
|
|
|
1338
1329
|
error: o,
|
|
1339
1330
|
isDeleting: l
|
|
1340
1331
|
} = al(), [u, c] = J(""), [h, d] = J(Ln[0].value), [y, x] = J("06:00"), [m, C] = J("");
|
|
1341
|
-
return /* @__PURE__ */ e(
|
|
1332
|
+
return /* @__PURE__ */ e(Yn, { delayDuration: 0, children: /* @__PURE__ */ r(Ke, { children: [
|
|
1342
1333
|
/* @__PURE__ */ e(Je, { asChild: !0, children: /* @__PURE__ */ e(
|
|
1343
1334
|
X,
|
|
1344
1335
|
{
|
|
@@ -1437,7 +1428,7 @@ function nl({
|
|
|
1437
1428
|
/* @__PURE__ */ e("h4", { className: "font-medium leading-none", children: "Subscriptions" }),
|
|
1438
1429
|
/* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "Active email subscriptions" })
|
|
1439
1430
|
] }),
|
|
1440
|
-
|
|
1431
|
+
Zn
|
|
1441
1432
|
] }) }),
|
|
1442
1433
|
/* @__PURE__ */ e("div", { className: "grid gap-2", children: a == null ? void 0 : a.map((p) => /* @__PURE__ */ r(
|
|
1443
1434
|
"div",
|
|
@@ -1459,7 +1450,7 @@ function nl({
|
|
|
1459
1450
|
children: /* @__PURE__ */ e(hi, { className: "size-3.5" })
|
|
1460
1451
|
}
|
|
1461
1452
|
),
|
|
1462
|
-
/* @__PURE__ */ e(En, { tooltip: `${p.endUserEmail}`, children: /* @__PURE__ */ e(
|
|
1453
|
+
/* @__PURE__ */ e(En, { tooltip: `${p.endUserEmail}`, children: /* @__PURE__ */ e(Li, { className: "size-3.5" }) }),
|
|
1463
1454
|
l === p.id ? /* @__PURE__ */ e(Qe, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ e(
|
|
1464
1455
|
Qi,
|
|
1465
1456
|
{
|
|
@@ -1480,7 +1471,7 @@ function nl({
|
|
|
1480
1471
|
const En = ({
|
|
1481
1472
|
children: t,
|
|
1482
1473
|
tooltip: a
|
|
1483
|
-
}) => /* @__PURE__ */ e(
|
|
1474
|
+
}) => /* @__PURE__ */ e(Yn, { delayDuration: 0, children: /* @__PURE__ */ r(Ot, { children: [
|
|
1484
1475
|
/* @__PURE__ */ e(rn, { asChild: !0, children: t }),
|
|
1485
1476
|
/* @__PURE__ */ e(Tt, { children: a })
|
|
1486
1477
|
] }) });
|
|
@@ -1499,11 +1490,11 @@ function al() {
|
|
|
1499
1490
|
frequency: k,
|
|
1500
1491
|
time: O
|
|
1501
1492
|
}) {
|
|
1502
|
-
const { authToken: R, ...j } =
|
|
1493
|
+
const { authToken: R, ...j } = Ya(), Y = Intl.DateTimeFormat().resolvedOptions().timeZone, M = {
|
|
1503
1494
|
email: S,
|
|
1504
1495
|
frequency: k,
|
|
1505
1496
|
time: O,
|
|
1506
|
-
timezone:
|
|
1497
|
+
timezone: Y,
|
|
1507
1498
|
endUserId: h,
|
|
1508
1499
|
endUserEmail: S,
|
|
1509
1500
|
subject: z || c || "Scheduled Dashboard",
|
|
@@ -1513,7 +1504,7 @@ function al() {
|
|
|
1513
1504
|
a("loading");
|
|
1514
1505
|
const V = "https://semaphor.cloud/api/v1/subscriptions/create";
|
|
1515
1506
|
try {
|
|
1516
|
-
const
|
|
1507
|
+
const Z = await On(
|
|
1517
1508
|
V,
|
|
1518
1509
|
(R == null ? void 0 : R.accessToken) || "",
|
|
1519
1510
|
{
|
|
@@ -1523,8 +1514,8 @@ function al() {
|
|
|
1523
1514
|
a("success"), s(""), v(), setTimeout(() => {
|
|
1524
1515
|
a("idle");
|
|
1525
1516
|
}, 2e3);
|
|
1526
|
-
} catch (
|
|
1527
|
-
console.error(
|
|
1517
|
+
} catch (Z) {
|
|
1518
|
+
console.error(Z), a("error"), s(Z.message);
|
|
1528
1519
|
}
|
|
1529
1520
|
}
|
|
1530
1521
|
async function N(S) {
|
|
@@ -1598,16 +1589,16 @@ function sl() {
|
|
|
1598
1589
|
}, j = () => {
|
|
1599
1590
|
g(!0);
|
|
1600
1591
|
};
|
|
1601
|
-
async function
|
|
1592
|
+
async function Y() {
|
|
1602
1593
|
if (c(!0), !n || !s) return;
|
|
1603
1594
|
const M = Wa(
|
|
1604
1595
|
i
|
|
1605
|
-
), V = JSON.stringify(M),
|
|
1596
|
+
), V = JSON.stringify(M), Z = {
|
|
1606
1597
|
...s,
|
|
1607
1598
|
template: V,
|
|
1608
1599
|
filterValues: h
|
|
1609
1600
|
};
|
|
1610
|
-
await
|
|
1601
|
+
await Yt(Z, t == null ? void 0 : t.accessToken), bt.success("Lens saved"), x == null || x(M), c(!1);
|
|
1611
1602
|
}
|
|
1612
1603
|
return d ? null : /* @__PURE__ */ r(
|
|
1613
1604
|
"div",
|
|
@@ -1620,7 +1611,7 @@ function sl() {
|
|
|
1620
1611
|
!1,
|
|
1621
1612
|
!d && /* @__PURE__ */ e(tl, {}),
|
|
1622
1613
|
!d && /* @__PURE__ */ e(nl, {}),
|
|
1623
|
-
o && !d && O && /* @__PURE__ */ e(
|
|
1614
|
+
o && !d && O && /* @__PURE__ */ e(Zi, {}),
|
|
1624
1615
|
!d && O && /* @__PURE__ */ e(Xi, {}),
|
|
1625
1616
|
o && !d && /* @__PURE__ */ r(
|
|
1626
1617
|
ee,
|
|
@@ -1662,7 +1653,7 @@ function sl() {
|
|
|
1662
1653
|
className: "h-7 p-2",
|
|
1663
1654
|
variant: "ghost",
|
|
1664
1655
|
disabled: u,
|
|
1665
|
-
onClick:
|
|
1656
|
+
onClick: Y,
|
|
1666
1657
|
size: "sm",
|
|
1667
1658
|
children: /* @__PURE__ */ e(Bi, { className: "h-4 w-4" })
|
|
1668
1659
|
}
|
|
@@ -1696,8 +1687,8 @@ function rl({
|
|
|
1696
1687
|
icon: c,
|
|
1697
1688
|
showNone: h = !1
|
|
1698
1689
|
}) {
|
|
1699
|
-
const d =
|
|
1700
|
-
|
|
1690
|
+
const d = Ze.useRef(null), [y, x] = Ze.useState(!1), [m, C] = Ze.useState("100%"), p = h ? [...a || [], { id: "none", name: "None" }] : a;
|
|
1691
|
+
Ze.useLayoutEffect(() => {
|
|
1701
1692
|
d.current && C(d.current.offsetWidth);
|
|
1702
1693
|
}, []);
|
|
1703
1694
|
function v() {
|
|
@@ -1793,11 +1784,11 @@ function ct({
|
|
|
1793
1784
|
const y = s ? "Loading..." : i ? "Error" : n;
|
|
1794
1785
|
function x() {
|
|
1795
1786
|
if (t === "Connection")
|
|
1796
|
-
return /* @__PURE__ */ e(
|
|
1787
|
+
return /* @__PURE__ */ e(Ri, { className: "size-4" });
|
|
1797
1788
|
if (t === "Database")
|
|
1798
1789
|
return /* @__PURE__ */ e(bi, { className: "size-4" });
|
|
1799
1790
|
if (t === "Schema")
|
|
1800
|
-
return /* @__PURE__ */ e(
|
|
1791
|
+
return /* @__PURE__ */ e(qi, { className: "size-4" });
|
|
1801
1792
|
if (t === "Table")
|
|
1802
1793
|
return /* @__PURE__ */ e(yn, { className: "size-4" });
|
|
1803
1794
|
if (t === "Model")
|
|
@@ -1834,7 +1825,7 @@ function ct({
|
|
|
1834
1825
|
}
|
|
1835
1826
|
)
|
|
1836
1827
|
] }),
|
|
1837
|
-
/* @__PURE__ */ r(
|
|
1828
|
+
/* @__PURE__ */ r(ae, { children: [
|
|
1838
1829
|
u && /* @__PURE__ */ e(ue, { value: "none", children: "None" }, "none"),
|
|
1839
1830
|
a && a.map((p, v) => /* @__PURE__ */ e(ue, { value: p.id, children: p.name }, v))
|
|
1840
1831
|
] }),
|
|
@@ -2044,7 +2035,7 @@ function ol({
|
|
|
2044
2035
|
)
|
|
2045
2036
|
);
|
|
2046
2037
|
}
|
|
2047
|
-
function
|
|
2038
|
+
function Za(t) {
|
|
2048
2039
|
const a = _((c) => c.authToken) || t, n = f(
|
|
2049
2040
|
(c) => c.selectedConnectionId
|
|
2050
2041
|
), {
|
|
@@ -2081,7 +2072,7 @@ function vn(t) {
|
|
|
2081
2072
|
(g) => g.selectedDatamodelId
|
|
2082
2073
|
), o = f(
|
|
2083
2074
|
(g) => g.selectedSchemaName
|
|
2084
|
-
), l = f((g) => g.selectedTableName), { currentConnection: u } =
|
|
2075
|
+
), l = f((g) => g.selectedTableName), { currentConnection: u } = Za(), c = u == null ? void 0 : u.type, {
|
|
2085
2076
|
data: h,
|
|
2086
2077
|
isLoading: d,
|
|
2087
2078
|
isFetching: y,
|
|
@@ -2168,7 +2159,7 @@ function Ne(t, a) {
|
|
|
2168
2159
|
isConnectionsLoading: g,
|
|
2169
2160
|
isConnectionsError: N,
|
|
2170
2161
|
currentConnection: S
|
|
2171
|
-
} =
|
|
2162
|
+
} = Za(t), {
|
|
2172
2163
|
refetch: z,
|
|
2173
2164
|
data: k,
|
|
2174
2165
|
isLoading: O,
|
|
@@ -2184,10 +2175,10 @@ function Ne(t, a) {
|
|
|
2184
2175
|
),
|
|
2185
2176
|
enabled: !!(n != null && n.accessToken) && !!s
|
|
2186
2177
|
// Only fetch if authToken is present
|
|
2187
|
-
}), j = S == null ? void 0 : S.type,
|
|
2178
|
+
}), j = S == null ? void 0 : S.type, Y = (S == null ? void 0 : S.type) === "API" || (S == null ? void 0 : S.type) === "S3", {
|
|
2188
2179
|
data: M,
|
|
2189
2180
|
isLoading: V,
|
|
2190
|
-
isFetching:
|
|
2181
|
+
isFetching: Z,
|
|
2191
2182
|
isError: $,
|
|
2192
2183
|
refetch: I
|
|
2193
2184
|
} = Ae({
|
|
@@ -2217,13 +2208,13 @@ function Ne(t, a) {
|
|
|
2217
2208
|
database_name: o
|
|
2218
2209
|
}
|
|
2219
2210
|
),
|
|
2220
|
-
enabled: !!s && !!o && !
|
|
2211
|
+
enabled: !!s && !!o && !Y && o !== "NA"
|
|
2221
2212
|
//currentConnection?.type !== 'API', // Only fetch if connectionId and database is present
|
|
2222
2213
|
}), {
|
|
2223
2214
|
data: w,
|
|
2224
2215
|
isLoading: L,
|
|
2225
2216
|
isFetching: E,
|
|
2226
|
-
isError:
|
|
2217
|
+
isError: se,
|
|
2227
2218
|
refetch: Q
|
|
2228
2219
|
} = Ae({
|
|
2229
2220
|
queryKey: [
|
|
@@ -2258,14 +2249,14 @@ function Ne(t, a) {
|
|
|
2258
2249
|
y,
|
|
2259
2250
|
h
|
|
2260
2251
|
]);
|
|
2261
|
-
const q = (S == null ? void 0 : S.type) === "API" ? (Sn = S == null ? void 0 : S.type) == null ? void 0 : Sn.toLowerCase() : u || "", te =
|
|
2252
|
+
const q = (S == null ? void 0 : S.type) === "API" ? (Sn = S == null ? void 0 : S.type) == null ? void 0 : Sn.toLowerCase() : u || "", te = Y ? "" : l || "";
|
|
2262
2253
|
function fe(B) {
|
|
2263
2254
|
y(B), x("");
|
|
2264
2255
|
}
|
|
2265
2256
|
function Te(B) {
|
|
2266
2257
|
d(B === "none" ? "" : B), y(""), x(""), B !== "none" && B !== "" && h("");
|
|
2267
2258
|
}
|
|
2268
|
-
function
|
|
2259
|
+
function Ye(B) {
|
|
2269
2260
|
c(B);
|
|
2270
2261
|
}
|
|
2271
2262
|
function Et(B) {
|
|
@@ -2311,7 +2302,7 @@ function Ne(t, a) {
|
|
|
2311
2302
|
isModelsError: R,
|
|
2312
2303
|
selectedDatabaseName: o,
|
|
2313
2304
|
databaseItems: qt,
|
|
2314
|
-
isDatabasesLoadingOrFetching: V ||
|
|
2305
|
+
isDatabasesLoadingOrFetching: V || Z,
|
|
2315
2306
|
isDatabaseError: $,
|
|
2316
2307
|
schemaItems: ht,
|
|
2317
2308
|
selectedSchemaName: l,
|
|
@@ -2320,11 +2311,11 @@ function Ne(t, a) {
|
|
|
2320
2311
|
tableItems: ie,
|
|
2321
2312
|
selectedTableName: u,
|
|
2322
2313
|
isTableLoadingOrFetching: L || E,
|
|
2323
|
-
isTableError:
|
|
2314
|
+
isTableError: se,
|
|
2324
2315
|
columns: re,
|
|
2325
2316
|
isColumnsLoadingOrFetching: P || ne,
|
|
2326
2317
|
isColumnsError: K,
|
|
2327
|
-
isNonDbConnection:
|
|
2318
|
+
isNonDbConnection: Y,
|
|
2328
2319
|
connectionType: j,
|
|
2329
2320
|
tableName: q,
|
|
2330
2321
|
formattedTableName: ws,
|
|
@@ -2335,7 +2326,7 @@ function Ne(t, a) {
|
|
|
2335
2326
|
refetchSchemas: D,
|
|
2336
2327
|
refetchTables: Q,
|
|
2337
2328
|
refetchColumns: de,
|
|
2338
|
-
handleConnectionChange:
|
|
2329
|
+
handleConnectionChange: Ye,
|
|
2339
2330
|
handleDatamodelChange: Et,
|
|
2340
2331
|
handleDatabaseChange: Te,
|
|
2341
2332
|
handleSchemaChange: fe
|
|
@@ -2360,7 +2351,7 @@ const Pt = {
|
|
|
2360
2351
|
type: "string"
|
|
2361
2352
|
}, Xa = {
|
|
2362
2353
|
id: "__placeholder__"
|
|
2363
|
-
}, He = "droppable-group-by", Ge = "droppable-metrics", Ue = "droppable-pivot-by", wt = "sortable-group-by",
|
|
2354
|
+
}, He = "droppable-group-by", Ge = "droppable-metrics", Ue = "droppable-pivot-by", wt = "sortable-group-by", Zt = "sortable-metrics", kt = "sortable-pivot-by", Xt = "droppable-filters", en = "sortable-filters", xn = "sortable-order-by";
|
|
2364
2355
|
function cl() {
|
|
2365
2356
|
const t = Ee((I) => I.insertIndex), a = f(
|
|
2366
2357
|
(I) => {
|
|
@@ -2412,7 +2403,7 @@ function cl() {
|
|
|
2412
2403
|
const { active: b, over: T } = I;
|
|
2413
2404
|
if (((H = b.data.current) == null ? void 0 : H.type) === "column" && T) {
|
|
2414
2405
|
const F = T.id, D = g.find(
|
|
2415
|
-
(
|
|
2406
|
+
(se) => se.column_name === b.id
|
|
2416
2407
|
);
|
|
2417
2408
|
if (!D) return;
|
|
2418
2409
|
const w = $e(D.data_type), L = Se(D.data_type), E = we(D.data_type);
|
|
@@ -2530,7 +2521,7 @@ function cl() {
|
|
|
2530
2521
|
granularity: "month"
|
|
2531
2522
|
}, T.splice(H, 0, F), v(T);
|
|
2532
2523
|
}
|
|
2533
|
-
function
|
|
2524
|
+
function Y(I) {
|
|
2534
2525
|
const b = Se(I.data_type);
|
|
2535
2526
|
we(I.data_type);
|
|
2536
2527
|
const T = [...a], H = t !== null ? t : a.length;
|
|
@@ -2570,7 +2561,7 @@ function cl() {
|
|
|
2570
2561
|
b.splice(T, 0, H), C(b);
|
|
2571
2562
|
}
|
|
2572
2563
|
function V(I) {
|
|
2573
|
-
var F, D, w, L, E,
|
|
2564
|
+
var F, D, w, L, E, se, Q, re;
|
|
2574
2565
|
const { active: b, over: T } = I, H = b.data.current;
|
|
2575
2566
|
if ((H == null ? void 0 : H.type) === "column" && T) {
|
|
2576
2567
|
const P = g.find(
|
|
@@ -2578,7 +2569,7 @@ function cl() {
|
|
|
2578
2569
|
);
|
|
2579
2570
|
if (!P) return;
|
|
2580
2571
|
const ne = $e(P.data_type), K = Se(P.data_type), de = we(P.data_type);
|
|
2581
|
-
(K || de) && (T.id === He || ((F = T.data.current) == null ? void 0 : F.type) === wt) &&
|
|
2572
|
+
(K || de) && (T.id === He || ((F = T.data.current) == null ? void 0 : F.type) === wt) && Y(P), (K || de) && (T.id === Ue || ((D = T.data.current) == null ? void 0 : D.type) === kt) ? j(P) : (ne || K) && (T.id === Ge || ((w = T.data.current) == null ? void 0 : w.type) === Zt) ? (ne && R(P), K && R(P, "COUNT")) : O(P) && (T.id === Xt || ((L = T.data.current) == null ? void 0 : L.type) === en) && M(P);
|
|
2582
2573
|
}
|
|
2583
2574
|
if (T && ((E = T.data.current) == null ? void 0 : E.type) === wt && a.some((P) => P.id === b.id)) {
|
|
2584
2575
|
const P = a.findIndex(
|
|
@@ -2589,14 +2580,14 @@ function cl() {
|
|
|
2589
2580
|
K.splice(ne, 0, de), x(K);
|
|
2590
2581
|
}
|
|
2591
2582
|
}
|
|
2592
|
-
if (T && ((
|
|
2583
|
+
if (T && ((se = T.data.current) == null ? void 0 : se.type) === kt && o.some((P) => P.id === b.id)) {
|
|
2593
2584
|
const P = o.findIndex((K) => K.id === b.id), ne = o.findIndex((K) => K.id === T.id);
|
|
2594
2585
|
if (P !== -1 && ne !== -1 && P !== ne) {
|
|
2595
2586
|
const K = [...o], [de] = K.splice(P, 1);
|
|
2596
2587
|
K.splice(ne, 0, de), v(K);
|
|
2597
2588
|
}
|
|
2598
2589
|
}
|
|
2599
|
-
if (T && ((Q = T.data.current) == null ? void 0 : Q.type) ===
|
|
2590
|
+
if (T && ((Q = T.data.current) == null ? void 0 : Q.type) === Zt && n.some((P) => P.id === b.id)) {
|
|
2600
2591
|
const P = n.findIndex((K) => K.id === b.id), ne = n.findIndex((K) => K.id === T.id);
|
|
2601
2592
|
if (P !== -1 && ne !== -1 && P !== ne) {
|
|
2602
2593
|
const K = [...n], [de] = K.splice(P, 1);
|
|
@@ -2610,9 +2601,9 @@ function cl() {
|
|
|
2610
2601
|
K.splice(ne, 0, de), C(K);
|
|
2611
2602
|
}
|
|
2612
2603
|
}
|
|
2613
|
-
|
|
2604
|
+
Z(I), u(null), l(null), c(a), h(n), d(s), y(o);
|
|
2614
2605
|
}
|
|
2615
|
-
function
|
|
2606
|
+
function Z(I) {
|
|
2616
2607
|
const { active: b, over: T } = I, H = b.data.current;
|
|
2617
2608
|
if ((H == null ? void 0 : H.type) === xn && T) {
|
|
2618
2609
|
const F = i.findIndex(
|
|
@@ -2779,7 +2770,7 @@ function dl({
|
|
|
2779
2770
|
}
|
|
2780
2771
|
}
|
|
2781
2772
|
}
|
|
2782
|
-
function
|
|
2773
|
+
function Y(b) {
|
|
2783
2774
|
b === !0 && (d || R) && l ? (m({
|
|
2784
2775
|
connectionId: l,
|
|
2785
2776
|
connectionType: k === "S3" || k === "API" ? "DuckDb" : k,
|
|
@@ -2828,7 +2819,7 @@ function dl({
|
|
|
2828
2819
|
});
|
|
2829
2820
|
g(`SELECT COUNT(*) as count FROM ${b}`), N(!0);
|
|
2830
2821
|
}
|
|
2831
|
-
function
|
|
2822
|
+
function Z() {
|
|
2832
2823
|
return (x == null ? void 0 : x.find(
|
|
2833
2824
|
(b) => b.connectionId === l && (b.tableName === d || b.datamodelName === R)
|
|
2834
2825
|
)) !== void 0;
|
|
@@ -2857,13 +2848,13 @@ function dl({
|
|
|
2857
2848
|
) : /* @__PURE__ */ e(ol, { onClick: j, column: b });
|
|
2858
2849
|
}
|
|
2859
2850
|
function I() {
|
|
2860
|
-
return /* @__PURE__ */ r(
|
|
2851
|
+
return /* @__PURE__ */ r(ae, { children: [
|
|
2861
2852
|
/* @__PURE__ */ r(
|
|
2862
2853
|
pa,
|
|
2863
2854
|
{
|
|
2864
|
-
title: `${
|
|
2865
|
-
pressed:
|
|
2866
|
-
onPressedChange:
|
|
2855
|
+
title: `${Z() ? "Remove from" : "Add to"} Assistant Scope`,
|
|
2856
|
+
pressed: Z(),
|
|
2857
|
+
onPressedChange: Y,
|
|
2867
2858
|
variant: "outline",
|
|
2868
2859
|
className: G("h-9 px-2", {
|
|
2869
2860
|
// 'outline outline-1 outline-green-400': isInAIScopeTable(),
|
|
@@ -2873,8 +2864,8 @@ function dl({
|
|
|
2873
2864
|
mt,
|
|
2874
2865
|
{
|
|
2875
2866
|
className: G("mr-1 size-4", {
|
|
2876
|
-
"text-green-400":
|
|
2877
|
-
"text-muted-foreground": !
|
|
2867
|
+
"text-green-400": Z(),
|
|
2868
|
+
"text-muted-foreground": !Z()
|
|
2878
2869
|
})
|
|
2879
2870
|
}
|
|
2880
2871
|
),
|
|
@@ -2891,7 +2882,7 @@ function dl({
|
|
|
2891
2882
|
variant: "secondary",
|
|
2892
2883
|
className: "flex",
|
|
2893
2884
|
children: [
|
|
2894
|
-
s !== "Success" ? /* @__PURE__ */ e(Qe, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e(
|
|
2885
|
+
s !== "Success" ? /* @__PURE__ */ e(Qe, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e(Fi, { className: "mr-2 size-4" }),
|
|
2895
2886
|
"Top 10"
|
|
2896
2887
|
]
|
|
2897
2888
|
}
|
|
@@ -2962,10 +2953,10 @@ function es({
|
|
|
2962
2953
|
isModelsError: O,
|
|
2963
2954
|
isDatabasesLoadingOrFetching: R,
|
|
2964
2955
|
isDatabaseError: j,
|
|
2965
|
-
isSchemaLoadingOrFetching:
|
|
2956
|
+
isSchemaLoadingOrFetching: Y,
|
|
2966
2957
|
isSchemaError: M,
|
|
2967
2958
|
isColumnsError: V,
|
|
2968
|
-
isColumnsLoadingOrFetching:
|
|
2959
|
+
isColumnsLoadingOrFetching: Z,
|
|
2969
2960
|
isTableLoadingOrFetching: $,
|
|
2970
2961
|
isTableError: I,
|
|
2971
2962
|
connectionType: b,
|
|
@@ -2976,7 +2967,7 @@ function es({
|
|
|
2976
2967
|
refetchTables: w,
|
|
2977
2968
|
refetchColumns: L,
|
|
2978
2969
|
refetchConnections: E,
|
|
2979
|
-
handleConnectionChange:
|
|
2970
|
+
handleConnectionChange: se,
|
|
2980
2971
|
handleDatabaseChange: Q,
|
|
2981
2972
|
handleSchemaChange: re,
|
|
2982
2973
|
handleDatamodelChange: P,
|
|
@@ -2990,7 +2981,7 @@ function es({
|
|
|
2990
2981
|
schemaName: K,
|
|
2991
2982
|
tableName: ne,
|
|
2992
2983
|
columns: N,
|
|
2993
|
-
status:
|
|
2984
|
+
status: Z ? "Loading..." : V ? "Error" : "Success"
|
|
2994
2985
|
}
|
|
2995
2986
|
);
|
|
2996
2987
|
}
|
|
@@ -3002,7 +2993,7 @@ function es({
|
|
|
3002
2993
|
q();
|
|
3003
2994
|
}, 100)) : x(""), y(ie);
|
|
3004
2995
|
}
|
|
3005
|
-
function
|
|
2996
|
+
function Ye() {
|
|
3006
2997
|
if (!s || b === "S3" || b === "API") return null;
|
|
3007
2998
|
if (!o || o === "none")
|
|
3008
2999
|
return /* @__PURE__ */ e(
|
|
@@ -3053,7 +3044,7 @@ function es({
|
|
|
3053
3044
|
refetch: D,
|
|
3054
3045
|
onChange: re,
|
|
3055
3046
|
isError: M,
|
|
3056
|
-
isLoading:
|
|
3047
|
+
isLoading: Y,
|
|
3057
3048
|
items: p,
|
|
3058
3049
|
value: u || "",
|
|
3059
3050
|
title: "Schema",
|
|
@@ -3084,7 +3075,7 @@ function es({
|
|
|
3084
3075
|
"aside",
|
|
3085
3076
|
{
|
|
3086
3077
|
className: G(
|
|
3087
|
-
"flex h-full min-w-[
|
|
3078
|
+
"flex h-full min-w-[310px] max-w-[310px] flex-col justify-between rounded-none",
|
|
3088
3079
|
{
|
|
3089
3080
|
"border-r-[1px]": !i
|
|
3090
3081
|
}
|
|
@@ -3098,7 +3089,7 @@ function es({
|
|
|
3098
3089
|
items: m,
|
|
3099
3090
|
title: "Connection",
|
|
3100
3091
|
value: s || "",
|
|
3101
|
-
onChange:
|
|
3092
|
+
onChange: se,
|
|
3102
3093
|
isLoading: S,
|
|
3103
3094
|
isError: k,
|
|
3104
3095
|
type: "combobox",
|
|
@@ -3107,14 +3098,14 @@ function es({
|
|
|
3107
3098
|
)) == null ? void 0 : ht.type) || ""
|
|
3108
3099
|
}
|
|
3109
3100
|
),
|
|
3110
|
-
|
|
3101
|
+
Ye(),
|
|
3111
3102
|
Et(),
|
|
3112
3103
|
_t(),
|
|
3113
3104
|
Vt(),
|
|
3114
3105
|
qt()
|
|
3115
3106
|
] }),
|
|
3116
3107
|
te(),
|
|
3117
|
-
/* @__PURE__ */ e("div", { className: "flex items-center justify-between gap-2 px-6 py-4", children: a === "main" && /* @__PURE__ */ r(
|
|
3108
|
+
/* @__PURE__ */ e("div", { className: "flex items-center justify-between gap-2 px-6 py-4", children: a === "main" && /* @__PURE__ */ r(ae, { children: [
|
|
3118
3109
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
|
|
3119
3110
|
/* @__PURE__ */ e(
|
|
3120
3111
|
Vs,
|
|
@@ -3135,7 +3126,7 @@ function es({
|
|
|
3135
3126
|
variant: "secondary",
|
|
3136
3127
|
className: "group flex items-center gap-2 rounded-full",
|
|
3137
3128
|
children: [
|
|
3138
|
-
/* @__PURE__ */ e(
|
|
3129
|
+
/* @__PURE__ */ e(Ei, { className: "size-4" }),
|
|
3139
3130
|
/* @__PURE__ */ e("span", { className: "hidden group-hover:block", children: "Help" })
|
|
3140
3131
|
]
|
|
3141
3132
|
}
|
|
@@ -3178,13 +3169,13 @@ function ts({ sql: t, error: a, onClick: n }) {
|
|
|
3178
3169
|
variant: "secondary",
|
|
3179
3170
|
size: "sm",
|
|
3180
3171
|
children: [
|
|
3181
|
-
/* @__PURE__ */ e(
|
|
3172
|
+
/* @__PURE__ */ e(Ni, { className: "mr-2 h-4 w-4" }),
|
|
3182
3173
|
"View in SQL Editor"
|
|
3183
3174
|
]
|
|
3184
3175
|
}
|
|
3185
3176
|
),
|
|
3186
3177
|
a && n && /* @__PURE__ */ r(ee, { onClick: n, size: "sm", variant: "secondary", children: [
|
|
3187
|
-
/* @__PURE__ */ e(
|
|
3178
|
+
/* @__PURE__ */ e(Di, { className: "mr-2 h-4 w-4" }),
|
|
3188
3179
|
"Debug with Assistant"
|
|
3189
3180
|
] })
|
|
3190
3181
|
] }) })
|
|
@@ -3471,10 +3462,10 @@ function rs(t) {
|
|
|
3471
3462
|
(q) => q.dashboard.aiScopeTables
|
|
3472
3463
|
), { setTriggerAIRun: S, setCurrentAssitantScope: z } = W(), { selectedDatamodelName: k, connectionType: O, selectedDatamodelId: R } = Ne(), {
|
|
3473
3464
|
messages: j,
|
|
3474
|
-
setMessages:
|
|
3465
|
+
setMessages: Y,
|
|
3475
3466
|
reload: M,
|
|
3476
3467
|
error: V,
|
|
3477
|
-
append:
|
|
3468
|
+
append: Z,
|
|
3478
3469
|
input: $,
|
|
3479
3470
|
setInput: I,
|
|
3480
3471
|
status: b,
|
|
@@ -3552,7 +3543,7 @@ function rs(t) {
|
|
|
3552
3543
|
}
|
|
3553
3544
|
function E(q) {
|
|
3554
3545
|
const te = $s(q);
|
|
3555
|
-
z(te),
|
|
3546
|
+
z(te), Y((fe) => [
|
|
3556
3547
|
...fe,
|
|
3557
3548
|
{
|
|
3558
3549
|
id: crypto.randomUUID(),
|
|
@@ -3561,7 +3552,7 @@ function rs(t) {
|
|
|
3561
3552
|
}
|
|
3562
3553
|
]);
|
|
3563
3554
|
}
|
|
3564
|
-
function
|
|
3555
|
+
function se() {
|
|
3565
3556
|
const q = {
|
|
3566
3557
|
databaseName: C || "",
|
|
3567
3558
|
schemaName: g || "",
|
|
@@ -3600,14 +3591,14 @@ function rs(t) {
|
|
|
3600
3591
|
const re = !["ready", "error"].includes(b), P = (de = (K = (ne = JSON.parse((V == null ? void 0 : V.message) || "{}")) == null ? void 0 : ne.error) == null ? void 0 : K.lastError) == null ? void 0 : de.message;
|
|
3601
3592
|
return {
|
|
3602
3593
|
messages: j,
|
|
3603
|
-
setMessages:
|
|
3594
|
+
setMessages: Y,
|
|
3604
3595
|
reload: M,
|
|
3605
|
-
append:
|
|
3596
|
+
append: Z,
|
|
3606
3597
|
input: $,
|
|
3607
3598
|
setInput: I,
|
|
3608
3599
|
isLoading: re,
|
|
3609
3600
|
handleSetAIScope: Q,
|
|
3610
|
-
handleAddCurrentTableToScope:
|
|
3601
|
+
handleAddCurrentTableToScope: se,
|
|
3611
3602
|
removeFromCurrentSelections: L,
|
|
3612
3603
|
currentAssitantScope: y,
|
|
3613
3604
|
setCurrentAssitantScope: z,
|
|
@@ -3724,7 +3715,7 @@ function os() {
|
|
|
3724
3715
|
}), a.setQueryData(i, null), a.removeQueries({ queryKey: i, exact: !0 }), o(""), l({}), y(), u(""), c(""), h({});
|
|
3725
3716
|
}
|
|
3726
3717
|
return /* @__PURE__ */ r(ee, { onClick: x, className: "", size: "sm", variant: "secondary", children: [
|
|
3727
|
-
/* @__PURE__ */ e(
|
|
3718
|
+
/* @__PURE__ */ e(xi, { className: "mr-2 size-4" }),
|
|
3728
3719
|
"Clear"
|
|
3729
3720
|
] });
|
|
3730
3721
|
}
|
|
@@ -3786,10 +3777,10 @@ function wl() {
|
|
|
3786
3777
|
data: O,
|
|
3787
3778
|
isLoading: R,
|
|
3788
3779
|
isFetching: j,
|
|
3789
|
-
isSuccess:
|
|
3780
|
+
isSuccess: Y,
|
|
3790
3781
|
isError: M,
|
|
3791
3782
|
error: V,
|
|
3792
|
-
queryKey:
|
|
3783
|
+
queryKey: Z,
|
|
3793
3784
|
refetch: $,
|
|
3794
3785
|
errorMessage: I
|
|
3795
3786
|
} = ge(o), { handleSetAIScope: b } = rs();
|
|
@@ -3802,21 +3793,21 @@ function wl() {
|
|
|
3802
3793
|
d(w);
|
|
3803
3794
|
}
|
|
3804
3795
|
}, [O, d, m]), me(() => {
|
|
3805
|
-
(R || j) && k(!0), (M ||
|
|
3796
|
+
(R || j) && k(!0), (M || Y) && k(!1), M && (d([]), m(""));
|
|
3806
3797
|
}, [
|
|
3807
3798
|
R,
|
|
3808
3799
|
j,
|
|
3809
3800
|
O,
|
|
3810
3801
|
m,
|
|
3811
3802
|
M,
|
|
3812
|
-
|
|
3803
|
+
Y,
|
|
3813
3804
|
k,
|
|
3814
3805
|
d,
|
|
3815
3806
|
// setQueryError,
|
|
3816
3807
|
V
|
|
3817
3808
|
]), me(() => {
|
|
3818
|
-
S && (t.getQueryData(
|
|
3819
|
-
}, [S, $, z,
|
|
3809
|
+
S && (t.getQueryData(Z) || $(), z(!1));
|
|
3810
|
+
}, [S, $, z, Z, t]);
|
|
3820
3811
|
async function T() {
|
|
3821
3812
|
const w = `Can you help me debug this query in the current table scope?
|
|
3822
3813
|
|
|
@@ -3832,7 +3823,7 @@ function wl() {
|
|
|
3832
3823
|
g(w);
|
|
3833
3824
|
}
|
|
3834
3825
|
function H() {
|
|
3835
|
-
return /* @__PURE__ */ r(
|
|
3826
|
+
return /* @__PURE__ */ r(ae, { children: [
|
|
3836
3827
|
s && /* @__PURE__ */ e(
|
|
3837
3828
|
"div",
|
|
3838
3829
|
{
|
|
@@ -3885,7 +3876,7 @@ function wl() {
|
|
|
3885
3876
|
]
|
|
3886
3877
|
}
|
|
3887
3878
|
),
|
|
3888
|
-
a && /* @__PURE__ */ r(
|
|
3879
|
+
a && /* @__PURE__ */ r(ae, { children: [
|
|
3889
3880
|
/* @__PURE__ */ e(Be, { withHandle: !0, className: "border" }),
|
|
3890
3881
|
/* @__PURE__ */ r(
|
|
3891
3882
|
pe,
|
|
@@ -4007,12 +3998,12 @@ function kl({ data: t }) {
|
|
|
4007
3998
|
onClick: () => c.toggleSorting(c.getIsSorted() === "asc"),
|
|
4008
3999
|
children: [
|
|
4009
4000
|
u,
|
|
4010
|
-
h === "asc" ? /* @__PURE__ */ e(Ws, { className: "ml-2 h-5 w-5" }) : h === "desc" ? /* @__PURE__ */ e(
|
|
4001
|
+
h === "asc" ? /* @__PURE__ */ e(Ws, { className: "ml-2 h-5 w-5" }) : h === "desc" ? /* @__PURE__ */ e(Ys, { className: "ml-2 h-5 w-5" }) : null
|
|
4011
4002
|
]
|
|
4012
4003
|
}
|
|
4013
4004
|
) });
|
|
4014
4005
|
}
|
|
4015
|
-
})), o =
|
|
4006
|
+
})), o = Zs({
|
|
4016
4007
|
data: t,
|
|
4017
4008
|
columns: i,
|
|
4018
4009
|
getCoreRowModel: sr(),
|
|
@@ -4048,7 +4039,7 @@ function kl({ data: t }) {
|
|
|
4048
4039
|
] }) });
|
|
4049
4040
|
}
|
|
4050
4041
|
function Ml({ card: t }) {
|
|
4051
|
-
var N, S, z, k, O, R, j,
|
|
4042
|
+
var N, S, z, k, O, R, j, Y, M, V, Z;
|
|
4052
4043
|
const [a, n] = J(!1), [s, i] = J(
|
|
4053
4044
|
[]
|
|
4054
4045
|
), { authToken: o } = Ve(), l = rr(o == null ? void 0 : o.accessToken), u = _(($) => $.themeStyle), c = {
|
|
@@ -4070,7 +4061,7 @@ function Ml({ card: t }) {
|
|
|
4070
4061
|
n($);
|
|
4071
4062
|
}
|
|
4072
4063
|
const g = Object.keys(
|
|
4073
|
-
((
|
|
4064
|
+
((Y = t.customCardPreferences) == null ? void 0 : Y.dataInputCardIds) || {}
|
|
4074
4065
|
).map(($) => {
|
|
4075
4066
|
var T, H, F;
|
|
4076
4067
|
const I = (H = (T = t.customCardPreferences) == null ? void 0 : T.dataInputCardIds) == null ? void 0 : H[$].cardId, b = (F = y == null ? void 0 : y.cards) == null ? void 0 : F.find((D) => D.id === I);
|
|
@@ -4079,7 +4070,7 @@ function Ml({ card: t }) {
|
|
|
4079
4070
|
return /* @__PURE__ */ e("div", { className: "semaphor-custom mb-3 flex grow basis-0 flex-col space-y-2 overflow-y-auto", children: /* @__PURE__ */ r(
|
|
4080
4071
|
Wr,
|
|
4081
4072
|
{
|
|
4082
|
-
fallback: /* @__PURE__ */ e(
|
|
4073
|
+
fallback: /* @__PURE__ */ e(ae, {}),
|
|
4083
4074
|
children: [
|
|
4084
4075
|
p && d === "single" && /* @__PURE__ */ e(
|
|
4085
4076
|
p,
|
|
@@ -4091,7 +4082,7 @@ function Ml({ card: t }) {
|
|
|
4091
4082
|
data: (m == null ? void 0 : m.records) || []
|
|
4092
4083
|
}
|
|
4093
4084
|
),
|
|
4094
|
-
p && d === "multiple" && /* @__PURE__ */ r(
|
|
4085
|
+
p && d === "multiple" && /* @__PURE__ */ r(ae, { children: [
|
|
4095
4086
|
Object.keys(
|
|
4096
4087
|
((V = t.customCardPreferences) == null ? void 0 : V.dataInputCardIds) || {}
|
|
4097
4088
|
).map(($) => {
|
|
@@ -4128,7 +4119,7 @@ function Ml({ card: t }) {
|
|
|
4128
4119
|
] })
|
|
4129
4120
|
]
|
|
4130
4121
|
},
|
|
4131
|
-
(
|
|
4122
|
+
(Z = t.customCardPreferences) == null ? void 0 : Z.componentName
|
|
4132
4123
|
) });
|
|
4133
4124
|
}
|
|
4134
4125
|
function cs({
|
|
@@ -4170,7 +4161,7 @@ function cs({
|
|
|
4170
4161
|
if (n.type === "custom")
|
|
4171
4162
|
return C(n);
|
|
4172
4163
|
if (!["table", "custom"].includes(n.type) && m)
|
|
4173
|
-
return /* @__PURE__ */ e(
|
|
4164
|
+
return /* @__PURE__ */ e(ae, { children: h || d ? /* @__PURE__ */ e(ae, {}) : /* @__PURE__ */ e(
|
|
4174
4165
|
hr,
|
|
4175
4166
|
{
|
|
4176
4167
|
cfg: m
|
|
@@ -4472,7 +4463,7 @@ function zl({
|
|
|
4472
4463
|
n(x);
|
|
4473
4464
|
}
|
|
4474
4465
|
})();
|
|
4475
|
-
}, [u]), a.length === 0 ? null : /* @__PURE__ */ r(
|
|
4466
|
+
}, [u]), a.length === 0 ? null : /* @__PURE__ */ r(ae, { children: [
|
|
4476
4467
|
/* @__PURE__ */ e(Le, { className: "my-2" }),
|
|
4477
4468
|
/* @__PURE__ */ e("div", { className: "grid grid-cols-4 place-items-center", children: a.map((h, d) => /* @__PURE__ */ e(
|
|
4478
4469
|
Al,
|
|
@@ -4790,26 +4781,26 @@ function _l() {
|
|
|
4790
4781
|
((w = (D = (F = n == null ? void 0 : n.chartOptions) == null ? void 0 : F.scales) == null ? void 0 : D[s]) == null ? void 0 : w.max) || ""
|
|
4791
4782
|
), [d, y] = J(l || c ? "custom" : "auto"), [x, m] = J(""), [C, p] = J(0), [v, g] = J(""), [N, S] = J(""), [z, k] = J(""), O = f(
|
|
4792
4783
|
(L) => L.actions.setCardPreferences
|
|
4793
|
-
), { updateCardInFrame: R } = W(), j = f((L) => L.card),
|
|
4784
|
+
), { updateCardInFrame: R } = W(), j = f((L) => L.card), Y = f((L) => {
|
|
4794
4785
|
var E;
|
|
4795
4786
|
return (E = L.card) == null ? void 0 : E.type;
|
|
4796
|
-
}), M = ["pie", "doughnut", "polarArea"].includes(
|
|
4787
|
+
}), M = ["pie", "doughnut", "polarArea"].includes(Y);
|
|
4797
4788
|
me(() => {
|
|
4798
|
-
var L, E,
|
|
4789
|
+
var L, E, se, Q, re, P, ne, K, de, q, te, fe, Te, Ye;
|
|
4799
4790
|
o(qn(n)), u(
|
|
4800
|
-
((
|
|
4791
|
+
((se = (E = (L = n == null ? void 0 : n.chartOptions) == null ? void 0 : L.scales) == null ? void 0 : E[s]) == null ? void 0 : se.min) === 0 ? 0 : ""
|
|
4801
4792
|
), h(((P = (re = (Q = n == null ? void 0 : n.chartOptions) == null ? void 0 : Q.scales) == null ? void 0 : re[s]) == null ? void 0 : P.max) || ""), m(
|
|
4802
4793
|
((q = (de = (K = (ne = n == null ? void 0 : n.chartOptions) == null ? void 0 : ne.scales) == null ? void 0 : K[s]) == null ? void 0 : de.ticks) == null ? void 0 : q.stepSize) || ""
|
|
4803
|
-
), p(((te = n == null ? void 0 : n.numberAxisFormat) == null ? void 0 : te.decimalPlaces) || 0), g(((fe = n == null ? void 0 : n.numberAxisFormat) == null ? void 0 : fe.suffix) || ""), S(((Te = n == null ? void 0 : n.numberAxisFormat) == null ? void 0 : Te.currency) || ""), k(((
|
|
4794
|
+
), p(((te = n == null ? void 0 : n.numberAxisFormat) == null ? void 0 : te.decimalPlaces) || 0), g(((fe = n == null ? void 0 : n.numberAxisFormat) == null ? void 0 : fe.suffix) || ""), S(((Te = n == null ? void 0 : n.numberAxisFormat) == null ? void 0 : Te.currency) || ""), k(((Ye = n == null ? void 0 : n.numberAxisFormat) == null ? void 0 : Ye.locale) || "");
|
|
4804
4795
|
}, [t, n, s]);
|
|
4805
4796
|
function V(L, E) {
|
|
4806
4797
|
return E === "" || /^[0-9\b]+$/.test(E) ? Number(E) : Number(L);
|
|
4807
4798
|
}
|
|
4808
|
-
function
|
|
4799
|
+
function Z() {
|
|
4809
4800
|
const L = [
|
|
4810
4801
|
...new Set(St.map((E) => E.currency))
|
|
4811
4802
|
];
|
|
4812
|
-
return /* @__PURE__ */ r(
|
|
4803
|
+
return /* @__PURE__ */ r(ae, { children: [
|
|
4813
4804
|
/* @__PURE__ */ r("div", { className: "grid grid-cols-6 items-center gap-2", children: [
|
|
4814
4805
|
/* @__PURE__ */ e(
|
|
4815
4806
|
U,
|
|
@@ -4870,7 +4861,7 @@ function _l() {
|
|
|
4870
4861
|
] });
|
|
4871
4862
|
}
|
|
4872
4863
|
function $() {
|
|
4873
|
-
return /* @__PURE__ */ r(
|
|
4864
|
+
return /* @__PURE__ */ r(ae, { children: [
|
|
4874
4865
|
/* @__PURE__ */ r("div", { className: "grid grid-cols-3 items-center gap-2", children: [
|
|
4875
4866
|
/* @__PURE__ */ e(U, { htmlFor: "range", children: "Range" }),
|
|
4876
4867
|
/* @__PURE__ */ e(
|
|
@@ -4937,21 +4928,23 @@ function _l() {
|
|
|
4937
4928
|
}
|
|
4938
4929
|
};
|
|
4939
4930
|
console.log(E), O(E);
|
|
4940
|
-
const
|
|
4931
|
+
const se = {
|
|
4941
4932
|
...j,
|
|
4942
4933
|
preferences: E
|
|
4943
4934
|
};
|
|
4944
|
-
R(
|
|
4935
|
+
R(se);
|
|
4945
4936
|
}
|
|
4946
4937
|
return /* @__PURE__ */ r(Ke, { onOpenChange: (L) => a(L), children: [
|
|
4947
|
-
/* @__PURE__ */ e(Je, { asChild: !0, children: /* @__PURE__ */ e(X, { tooltip: "
|
|
4948
|
-
/* @__PURE__ */ e(un, { align: "
|
|
4938
|
+
/* @__PURE__ */ e(Je, { asChild: !0, children: /* @__PURE__ */ e(X, { tooltip: "Format Number", children: /* @__PURE__ */ e(vi, { className: "size-4" }) }) }),
|
|
4939
|
+
/* @__PURE__ */ e(un, { align: "end", className: "max-w-65", children: /* @__PURE__ */ r("div", { className: "grid gap-4", children: [
|
|
4949
4940
|
/* @__PURE__ */ r("div", { className: "space-y-2", children: [
|
|
4950
|
-
/* @__PURE__ */ e("h4", { className: "font-medium leading-none", children: "
|
|
4951
|
-
/* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "Set the
|
|
4941
|
+
/* @__PURE__ */ e("h4", { className: "font-medium leading-none", children: "Format Options" }),
|
|
4942
|
+
/* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "Set the format for number axis" })
|
|
4952
4943
|
] }),
|
|
4953
4944
|
/* @__PURE__ */ r("div", { className: "grid gap-2", children: [
|
|
4954
|
-
|
|
4945
|
+
Z(),
|
|
4946
|
+
/* @__PURE__ */ e("div", { className: "mt-4 space-y-2", children: /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "Set the scale for number axis" }) }),
|
|
4947
|
+
/* @__PURE__ */ r("div", { className: "mt-2 grid grid-cols-3 items-center gap-2", children: [
|
|
4955
4948
|
/* @__PURE__ */ e(U, { htmlFor: "scale", children: "Type" }),
|
|
4956
4949
|
/* @__PURE__ */ r(
|
|
4957
4950
|
ke,
|
|
@@ -4995,7 +4988,6 @@ function _l() {
|
|
|
4995
4988
|
)
|
|
4996
4989
|
] }),
|
|
4997
4990
|
d === "custom" && i == "linear" && $(),
|
|
4998
|
-
Y(),
|
|
4999
4991
|
/* @__PURE__ */ e(xr, {}),
|
|
5000
4992
|
/* @__PURE__ */ e("div", { className: "grid grid-cols-3", children: /* @__PURE__ */ e(
|
|
5001
4993
|
ee,
|
|
@@ -5046,8 +5038,8 @@ function Vl() {
|
|
|
5046
5038
|
});
|
|
5047
5039
|
};
|
|
5048
5040
|
return /* @__PURE__ */ r(Ke, { children: [
|
|
5049
|
-
/* @__PURE__ */ e(Je, { asChild: !0, children: /* @__PURE__ */ e(X, { tooltip: "Legend Settings", children: /* @__PURE__ */ e(
|
|
5050
|
-
/* @__PURE__ */ e(un, { className: "w-72", children: /* @__PURE__ */ r("div", { className: "grid gap-4", children: [
|
|
5041
|
+
/* @__PURE__ */ e(Je, { asChild: !0, children: /* @__PURE__ */ e(X, { tooltip: "Legend Settings", children: /* @__PURE__ */ e(Oi, { className: "size-4" }) }) }),
|
|
5042
|
+
/* @__PURE__ */ e(un, { align: "end", className: "w-72", children: /* @__PURE__ */ r("div", { className: "grid gap-4", children: [
|
|
5051
5043
|
/* @__PURE__ */ r("div", { className: "space-y-2", children: [
|
|
5052
5044
|
/* @__PURE__ */ e("h4", { className: "font-medium leading-none", children: "Legend Options" }),
|
|
5053
5045
|
/* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "Set the legend options for the chart." })
|
|
@@ -5060,75 +5052,76 @@ function Vl() {
|
|
|
5060
5052
|
{
|
|
5061
5053
|
checked: n,
|
|
5062
5054
|
onCheckedChange: i,
|
|
5063
|
-
defaultChecked: !0,
|
|
5064
5055
|
id: "displayLegend"
|
|
5065
5056
|
}
|
|
5066
5057
|
) })
|
|
5067
5058
|
] }),
|
|
5068
|
-
/* @__PURE__ */ r(
|
|
5069
|
-
/* @__PURE__ */
|
|
5070
|
-
|
|
5071
|
-
/* @__PURE__ */
|
|
5072
|
-
|
|
5073
|
-
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5092
|
-
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
|
|
5098
|
-
|
|
5099
|
-
|
|
5100
|
-
|
|
5101
|
-
|
|
5102
|
-
|
|
5103
|
-
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
/* @__PURE__ */
|
|
5107
|
-
|
|
5108
|
-
/* @__PURE__ */
|
|
5109
|
-
|
|
5110
|
-
|
|
5111
|
-
|
|
5112
|
-
|
|
5113
|
-
|
|
5114
|
-
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
|
|
5130
|
-
|
|
5131
|
-
|
|
5059
|
+
n && /* @__PURE__ */ r(ae, { children: [
|
|
5060
|
+
/* @__PURE__ */ r("div", { className: "grid grid-cols-3 items-center gap-4", children: [
|
|
5061
|
+
/* @__PURE__ */ e(U, { htmlFor: "position", children: "Position" }),
|
|
5062
|
+
/* @__PURE__ */ r("div", { className: "col-span-2 flex h-8 items-center", children: [
|
|
5063
|
+
/* @__PURE__ */ e(
|
|
5064
|
+
X,
|
|
5065
|
+
{
|
|
5066
|
+
tooltip: "Top",
|
|
5067
|
+
onClick: () => o("top"),
|
|
5068
|
+
children: /* @__PURE__ */ e(Sa, { className: "size-4" })
|
|
5069
|
+
}
|
|
5070
|
+
),
|
|
5071
|
+
/* @__PURE__ */ e(
|
|
5072
|
+
X,
|
|
5073
|
+
{
|
|
5074
|
+
tooltip: "Left",
|
|
5075
|
+
onClick: () => o("left"),
|
|
5076
|
+
children: /* @__PURE__ */ e(ai, { className: "size-4" })
|
|
5077
|
+
}
|
|
5078
|
+
),
|
|
5079
|
+
/* @__PURE__ */ e(
|
|
5080
|
+
X,
|
|
5081
|
+
{
|
|
5082
|
+
tooltip: "Bottom",
|
|
5083
|
+
onClick: () => o("bottom"),
|
|
5084
|
+
children: /* @__PURE__ */ e(Aa, { className: "size-4" })
|
|
5085
|
+
}
|
|
5086
|
+
),
|
|
5087
|
+
/* @__PURE__ */ e(
|
|
5088
|
+
X,
|
|
5089
|
+
{
|
|
5090
|
+
tooltip: "Right",
|
|
5091
|
+
onClick: () => o("right"),
|
|
5092
|
+
children: /* @__PURE__ */ e(si, { className: "size-4" })
|
|
5093
|
+
}
|
|
5094
|
+
)
|
|
5095
|
+
] })
|
|
5096
|
+
] }),
|
|
5097
|
+
/* @__PURE__ */ r("div", { className: "grid grid-cols-3 items-center gap-4", children: [
|
|
5098
|
+
/* @__PURE__ */ e(U, { htmlFor: "align", children: "Align" }),
|
|
5099
|
+
/* @__PURE__ */ r("div", { className: "col-span-2 flex h-8 items-center", children: [
|
|
5100
|
+
/* @__PURE__ */ e(
|
|
5101
|
+
X,
|
|
5102
|
+
{
|
|
5103
|
+
tooltip: "Start",
|
|
5104
|
+
onClick: () => l("start"),
|
|
5105
|
+
children: /* @__PURE__ */ e(Zr, { className: "size-4" })
|
|
5106
|
+
}
|
|
5107
|
+
),
|
|
5108
|
+
/* @__PURE__ */ e(
|
|
5109
|
+
X,
|
|
5110
|
+
{
|
|
5111
|
+
tooltip: "Center",
|
|
5112
|
+
onClick: () => l("center"),
|
|
5113
|
+
children: /* @__PURE__ */ e(Yr, { className: "size-4" })
|
|
5114
|
+
}
|
|
5115
|
+
),
|
|
5116
|
+
/* @__PURE__ */ e(
|
|
5117
|
+
X,
|
|
5118
|
+
{
|
|
5119
|
+
tooltip: "End",
|
|
5120
|
+
onClick: () => l("end"),
|
|
5121
|
+
children: /* @__PURE__ */ e(Xr, { className: "size-4" })
|
|
5122
|
+
}
|
|
5123
|
+
)
|
|
5124
|
+
] })
|
|
5132
5125
|
] })
|
|
5133
5126
|
] })
|
|
5134
5127
|
] })
|
|
@@ -5150,7 +5143,7 @@ function ql() {
|
|
|
5150
5143
|
{
|
|
5151
5144
|
onClick: () => s(i === "y" ? "x" : "y"),
|
|
5152
5145
|
tooltip: "Chart Orientation",
|
|
5153
|
-
children: i === "y" ? /* @__PURE__ */ e(
|
|
5146
|
+
children: i === "y" ? /* @__PURE__ */ e(Vi, { className: "size-4" }) : /* @__PURE__ */ e(_i, { className: "size-4" })
|
|
5154
5147
|
}
|
|
5155
5148
|
);
|
|
5156
5149
|
}
|
|
@@ -5174,7 +5167,7 @@ function Rl() {
|
|
|
5174
5167
|
"stackedLine",
|
|
5175
5168
|
"horizontalBar"
|
|
5176
5169
|
].includes(t.type) && /* @__PURE__ */ e(ql, {}),
|
|
5177
|
-
!["kpi", "text", "custom", "table"].includes(t.type) && /* @__PURE__ */ r(
|
|
5170
|
+
!["kpi", "text", "custom", "table"].includes(t.type) && /* @__PURE__ */ r(ae, { children: [
|
|
5178
5171
|
/* @__PURE__ */ e(_l, {}),
|
|
5179
5172
|
/* @__PURE__ */ e(Vl, {})
|
|
5180
5173
|
] }),
|
|
@@ -5189,9 +5182,9 @@ function Rl() {
|
|
|
5189
5182
|
"text",
|
|
5190
5183
|
"map"
|
|
5191
5184
|
].includes(t.type) && /* @__PURE__ */ r(X, { tooltip: "Grid Style", onClick: o, children: [
|
|
5192
|
-
(s === "xy" || !s) && /* @__PURE__ */ e(
|
|
5185
|
+
(s === "xy" || !s) && /* @__PURE__ */ e(Mi, { className: "size-4" }),
|
|
5193
5186
|
s === "x" && /* @__PURE__ */ e(fi, { className: "size-4" }),
|
|
5194
|
-
s === "y" && /* @__PURE__ */ e(
|
|
5187
|
+
s === "y" && /* @__PURE__ */ e(ji, { className: "size-4" }),
|
|
5195
5188
|
s === "none" && /* @__PURE__ */ e(Gi, { className: "size-4" })
|
|
5196
5189
|
] })
|
|
5197
5190
|
] }) : null;
|
|
@@ -5213,7 +5206,7 @@ function ft() {
|
|
|
5213
5206
|
runAssistant: m,
|
|
5214
5207
|
setChartGrid: C
|
|
5215
5208
|
} = W(), { data: p, isLoading: v, isFetching: g, error: N } = ge(a);
|
|
5216
|
-
if (!a) return /* @__PURE__ */ e(
|
|
5209
|
+
if (!a) return /* @__PURE__ */ e(ae, { children: "No Active Card" });
|
|
5217
5210
|
function S() {
|
|
5218
5211
|
const D = {
|
|
5219
5212
|
connectionId: a.connectionId,
|
|
@@ -5256,7 +5249,7 @@ function ft() {
|
|
|
5256
5249
|
z(D);
|
|
5257
5250
|
}
|
|
5258
5251
|
function O(D) {
|
|
5259
|
-
const w = t.cards.filter((
|
|
5252
|
+
const w = t.cards.filter((se) => se.id !== D), L = w[0], E = {
|
|
5260
5253
|
...t,
|
|
5261
5254
|
cards: w,
|
|
5262
5255
|
// update the active card to the first card in the frame
|
|
@@ -5277,17 +5270,17 @@ function ft() {
|
|
|
5277
5270
|
const L = w.cards.find((E) => E.id === D);
|
|
5278
5271
|
L.sql && c(!0), d(L);
|
|
5279
5272
|
}
|
|
5280
|
-
const
|
|
5273
|
+
const Y = (D, w) => {
|
|
5281
5274
|
console.log("handleDragStart", w), D.dataTransfer.setData("tabIndex", w.toString());
|
|
5282
5275
|
}, M = (D) => {
|
|
5283
5276
|
D.preventDefault();
|
|
5284
5277
|
}, V = (D, w) => {
|
|
5285
5278
|
const L = D.dataTransfer.getData("tabIndex");
|
|
5286
5279
|
if (L === w.toString()) return;
|
|
5287
|
-
const E = Array.from(t.cards), [
|
|
5288
|
-
E.splice(w, 0,
|
|
5280
|
+
const E = Array.from(t.cards), [se] = E.splice(parseInt(L), 1);
|
|
5281
|
+
E.splice(w, 0, se), h({ ...t, cards: E });
|
|
5289
5282
|
};
|
|
5290
|
-
function
|
|
5283
|
+
function Z(D, w) {
|
|
5291
5284
|
return D.cards.length === 1 && (w.displayTab === !0 || w.displayTab === void 0) || D.activeCardId !== w.id && (w.displayTab === !0 || w.displayTab === void 0) ? null : /* @__PURE__ */ e(
|
|
5292
5285
|
"div",
|
|
5293
5286
|
{
|
|
@@ -5298,7 +5291,7 @@ function ft() {
|
|
|
5298
5291
|
displayTab: L
|
|
5299
5292
|
});
|
|
5300
5293
|
},
|
|
5301
|
-
children: w.displayTab === !0 || w.displayTab === void 0 ? /* @__PURE__ */ e(wr, { className: "mr-2 size-3.5 text-muted-foreground hover:text-foreground" }) : /* @__PURE__ */ e(
|
|
5294
|
+
children: w.displayTab === !0 || w.displayTab === void 0 ? /* @__PURE__ */ e(wr, { className: "mr-2 size-3.5 text-muted-foreground hover:text-foreground" }) : /* @__PURE__ */ e(Ci, { className: "mr-2 size-3.5 text-muted-foreground hover:text-foreground" })
|
|
5302
5295
|
}
|
|
5303
5296
|
);
|
|
5304
5297
|
}
|
|
@@ -5323,13 +5316,13 @@ function ft() {
|
|
|
5323
5316
|
et,
|
|
5324
5317
|
{
|
|
5325
5318
|
draggable: !0,
|
|
5326
|
-
onDragStart: (L) =>
|
|
5319
|
+
onDragStart: (L) => Y(L, w),
|
|
5327
5320
|
onDragOver: M,
|
|
5328
5321
|
onDrop: (L) => V(L, w),
|
|
5329
5322
|
className: "",
|
|
5330
5323
|
value: D.id,
|
|
5331
5324
|
children: [
|
|
5332
|
-
|
|
5325
|
+
Z(t, D),
|
|
5333
5326
|
D.tabTitle || D.title,
|
|
5334
5327
|
t.activeCardId === D.id && t.cards.length > 1 && /* @__PURE__ */ e(
|
|
5335
5328
|
Ce,
|
|
@@ -5388,8 +5381,8 @@ function ft() {
|
|
|
5388
5381
|
).join(","),
|
|
5389
5382
|
...((p == null ? void 0 : p.records) || []).map((Q) => Object.values(Q).join(","))
|
|
5390
5383
|
].join(`
|
|
5391
|
-
`), L = new Blob([w], { type: "text/csv" }), E = URL.createObjectURL(L),
|
|
5392
|
-
|
|
5384
|
+
`), L = new Blob([w], { type: "text/csv" }), E = URL.createObjectURL(L), se = document.createElement("a");
|
|
5385
|
+
se.href = E, se.download = `${a.title}.csv`, se.click();
|
|
5393
5386
|
}
|
|
5394
5387
|
function H() {
|
|
5395
5388
|
const D = `Can you get the documentation for ${a.type} chart?`;
|
|
@@ -5429,7 +5422,7 @@ function ft() {
|
|
|
5429
5422
|
variant: "ghost",
|
|
5430
5423
|
size: "icon",
|
|
5431
5424
|
onClick: b,
|
|
5432
|
-
children: /* @__PURE__ */ e(
|
|
5425
|
+
children: /* @__PURE__ */ e(Si, { strokeWidth: 1.5, className: "size-4" })
|
|
5433
5426
|
}
|
|
5434
5427
|
),
|
|
5435
5428
|
/* @__PURE__ */ e(
|
|
@@ -5451,7 +5444,7 @@ function ft() {
|
|
|
5451
5444
|
className: "px-6",
|
|
5452
5445
|
direction: "horizontal",
|
|
5453
5446
|
children: [
|
|
5454
|
-
l && /* @__PURE__ */ r(
|
|
5447
|
+
l && /* @__PURE__ */ r(ae, { children: [
|
|
5455
5448
|
/* @__PURE__ */ e(
|
|
5456
5449
|
pe,
|
|
5457
5450
|
{
|
|
@@ -5561,7 +5554,7 @@ function Pl() {
|
|
|
5561
5554
|
label: "",
|
|
5562
5555
|
options: N || [],
|
|
5563
5556
|
value: ((j = (R = t == null ? void 0 : t.dataInputCardIds) == null ? void 0 : R[O]) == null ? void 0 : j.cardId) || "",
|
|
5564
|
-
onValueChange: (
|
|
5557
|
+
onValueChange: (Y) => d(O, Y)
|
|
5565
5558
|
}
|
|
5566
5559
|
)
|
|
5567
5560
|
]
|
|
@@ -5663,7 +5656,7 @@ function Pl() {
|
|
|
5663
5656
|
}
|
|
5664
5657
|
)
|
|
5665
5658
|
] }) }),
|
|
5666
|
-
((t == null ? void 0 : t.type) === "component" || (t == null ? void 0 : t.type) === void 0) && t && /* @__PURE__ */ e(
|
|
5659
|
+
((t == null ? void 0 : t.type) === "component" || (t == null ? void 0 : t.type) === void 0) && t && /* @__PURE__ */ e(ae, { children: u && /* @__PURE__ */ e(
|
|
5667
5660
|
ye,
|
|
5668
5661
|
{
|
|
5669
5662
|
icon: /* @__PURE__ */ e(gi, { className: "h-3.5 w-3.5" }),
|
|
@@ -5876,7 +5869,7 @@ function Hl({ idx: t }) {
|
|
|
5876
5869
|
onClick: () => l("start", t),
|
|
5877
5870
|
className: "h-7 p-1 text-xs font-normal",
|
|
5878
5871
|
children: /* @__PURE__ */ e(
|
|
5879
|
-
|
|
5872
|
+
Ti,
|
|
5880
5873
|
{
|
|
5881
5874
|
className: G("h-4 w-4", {
|
|
5882
5875
|
"rotate-90": i === "y"
|
|
@@ -5891,7 +5884,7 @@ function Hl({ idx: t }) {
|
|
|
5891
5884
|
onClick: () => l("center", t),
|
|
5892
5885
|
className: "h-7 p-1 text-xs font-normal",
|
|
5893
5886
|
children: /* @__PURE__ */ e(
|
|
5894
|
-
|
|
5887
|
+
Ai,
|
|
5895
5888
|
{
|
|
5896
5889
|
className: G("h-4 w-4", {
|
|
5897
5890
|
"rotate-90": i === "y"
|
|
@@ -5906,7 +5899,7 @@ function Hl({ idx: t }) {
|
|
|
5906
5899
|
onClick: () => l("end", t),
|
|
5907
5900
|
className: "h-7 p-1 text-xs font-normal",
|
|
5908
5901
|
children: /* @__PURE__ */ e(
|
|
5909
|
-
|
|
5902
|
+
zi,
|
|
5910
5903
|
{
|
|
5911
5904
|
className: G("h-4 w-4", {
|
|
5912
5905
|
"rotate-90": i === "y"
|
|
@@ -6149,7 +6142,7 @@ function Gl({
|
|
|
6149
6142
|
onSelect: a
|
|
6150
6143
|
}) {
|
|
6151
6144
|
var l;
|
|
6152
|
-
const [n, s] =
|
|
6145
|
+
const [n, s] = Ze.useState(!1), [i, o] = Ze.useState("");
|
|
6153
6146
|
return /* @__PURE__ */ r(Ke, { open: n, onOpenChange: s, children: [
|
|
6154
6147
|
/* @__PURE__ */ e(Je, { asChild: !0, children: /* @__PURE__ */ r(
|
|
6155
6148
|
ee,
|
|
@@ -6288,7 +6281,7 @@ function $l({
|
|
|
6288
6281
|
cardType: t
|
|
6289
6282
|
}) {
|
|
6290
6283
|
function a(n) {
|
|
6291
|
-
return /* @__PURE__ */ r(
|
|
6284
|
+
return /* @__PURE__ */ r(ae, { children: [
|
|
6292
6285
|
/* @__PURE__ */ e("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: n === "bubble" ? "SELECT label, [group], x-axis, y-axis, radius FROM table" : "SELECT label, [group], x-axis, y-axis FROM table" }),
|
|
6293
6286
|
/* @__PURE__ */ r("ul", { className: "ml-6 list-disc text-xs [&>li]:mt-2", children: [
|
|
6294
6287
|
/* @__PURE__ */ e("li", { children: "label - category" }),
|
|
@@ -6375,7 +6368,7 @@ function Jl() {
|
|
|
6375
6368
|
}
|
|
6376
6369
|
function Wl(t) {
|
|
6377
6370
|
if (["line", "bar"].includes(t))
|
|
6378
|
-
return /* @__PURE__ */ r(
|
|
6371
|
+
return /* @__PURE__ */ r(ae, { children: [
|
|
6379
6372
|
/* @__PURE__ */ r(le, { value: "item-1", children: [
|
|
6380
6373
|
/* @__PURE__ */ e(oe, { className: "font-normal", children: /* @__PURE__ */ e("p", { children: "Chart Query" }) }),
|
|
6381
6374
|
/* @__PURE__ */ r(ce, { className: " ", children: [
|
|
@@ -6420,7 +6413,7 @@ function Wl(t) {
|
|
|
6420
6413
|
] })
|
|
6421
6414
|
] });
|
|
6422
6415
|
if (t === "bubble")
|
|
6423
|
-
return /* @__PURE__ */ e(
|
|
6416
|
+
return /* @__PURE__ */ e(ae, { children: /* @__PURE__ */ r(le, { value: "item-1", children: [
|
|
6424
6417
|
/* @__PURE__ */ e(oe, { className: "font-normal", children: /* @__PURE__ */ r("p", { children: [
|
|
6425
6418
|
"How to create a ",
|
|
6426
6419
|
/* @__PURE__ */ e("span", { children: t }),
|
|
@@ -6438,7 +6431,7 @@ function Wl(t) {
|
|
|
6438
6431
|
] })
|
|
6439
6432
|
] }) });
|
|
6440
6433
|
if (t === "scatter")
|
|
6441
|
-
return /* @__PURE__ */ e(
|
|
6434
|
+
return /* @__PURE__ */ e(ae, { children: /* @__PURE__ */ r(le, { value: "item-1", children: [
|
|
6442
6435
|
/* @__PURE__ */ e(oe, { className: "font-normal", children: /* @__PURE__ */ r("p", { children: [
|
|
6443
6436
|
"How to create a ",
|
|
6444
6437
|
/* @__PURE__ */ e("span", { children: t }),
|
|
@@ -6455,7 +6448,7 @@ function Wl(t) {
|
|
|
6455
6448
|
] })
|
|
6456
6449
|
] }) });
|
|
6457
6450
|
if (["pie", "doughnut", "polarArea"].includes(t))
|
|
6458
|
-
return /* @__PURE__ */ e(
|
|
6451
|
+
return /* @__PURE__ */ e(ae, { children: /* @__PURE__ */ r(le, { value: "item-1", children: [
|
|
6459
6452
|
/* @__PURE__ */ e(oe, { className: "font-normal", children: /* @__PURE__ */ r("p", { children: [
|
|
6460
6453
|
/* @__PURE__ */ e("span", { children: t === "polarArea" ? "Polar" : t.charAt(0).toUpperCase() + t.slice(1) }),
|
|
6461
6454
|
" ",
|
|
@@ -6470,7 +6463,7 @@ function Wl(t) {
|
|
|
6470
6463
|
] })
|
|
6471
6464
|
] }) });
|
|
6472
6465
|
}
|
|
6473
|
-
function
|
|
6466
|
+
function Yl() {
|
|
6474
6467
|
var c, h, d, y, x;
|
|
6475
6468
|
const t = f((m) => m.card.preferences), a = f(
|
|
6476
6469
|
(m) => m.actions.setCardPreferences
|
|
@@ -6636,7 +6629,7 @@ function Zl() {
|
|
|
6636
6629
|
] })
|
|
6637
6630
|
] });
|
|
6638
6631
|
}
|
|
6639
|
-
function
|
|
6632
|
+
function Zl() {
|
|
6640
6633
|
return /* @__PURE__ */ r("div", { className: "space-y-6 px-6 py-2", children: [
|
|
6641
6634
|
/* @__PURE__ */ e(qe, { type: "single", collapsible: !0, children: /* @__PURE__ */ r(le, { value: "item-1", children: [
|
|
6642
6635
|
/* @__PURE__ */ e(oe, { className: "", children: "KPI Query" }),
|
|
@@ -6662,7 +6655,7 @@ function Yl() {
|
|
|
6662
6655
|
] })
|
|
6663
6656
|
] })
|
|
6664
6657
|
] }) }),
|
|
6665
|
-
/* @__PURE__ */ e("section", { className: "", children: /* @__PURE__ */ e(
|
|
6658
|
+
/* @__PURE__ */ e("section", { className: "", children: /* @__PURE__ */ e(Yl, {}) }),
|
|
6666
6659
|
/* @__PURE__ */ e("div", {}),
|
|
6667
6660
|
/* @__PURE__ */ e("div", {})
|
|
6668
6661
|
] });
|
|
@@ -6789,7 +6782,7 @@ const Xl = [
|
|
|
6789
6782
|
value: t
|
|
6790
6783
|
}));
|
|
6791
6784
|
function no() {
|
|
6792
|
-
var c, h, d, y, x, m, C, p, v, g, N, S, z, k, O, R, j,
|
|
6785
|
+
var c, h, d, y, x, m, C, p, v, g, N, S, z, k, O, R, j, Y;
|
|
6793
6786
|
const t = f((M) => M.card), a = (h = (c = t == null ? void 0 : t.preferences) == null ? void 0 : c.mapVisualOptions) == null ? void 0 : h.topoJsonUrl, [n, s] = J(
|
|
6794
6787
|
((y = (d = t == null ? void 0 : t.preferences) == null ? void 0 : d.mapVisualOptions) == null ? void 0 : y.customTopoJsonUrl) || ""
|
|
6795
6788
|
), { setCardPreferences: i } = W(), { data: o } = on(t), l = Object.keys((o == null ? void 0 : o.objects) || {}).map((M) => ({
|
|
@@ -6852,7 +6845,7 @@ function no() {
|
|
|
6852
6845
|
placeholder: "Custom URL"
|
|
6853
6846
|
}
|
|
6854
6847
|
),
|
|
6855
|
-
o && /* @__PURE__ */ r(
|
|
6848
|
+
o && /* @__PURE__ */ r(ae, { children: [
|
|
6856
6849
|
/* @__PURE__ */ r("div", { className: "space-y-1", children: [
|
|
6857
6850
|
/* @__PURE__ */ e(U, { children: "Map Object" }),
|
|
6858
6851
|
/* @__PURE__ */ e(
|
|
@@ -6951,14 +6944,14 @@ function no() {
|
|
|
6951
6944
|
step: 10,
|
|
6952
6945
|
value: ((O = (k = (z = t.preferences) == null ? void 0 : z.mapVisualOptions) == null ? void 0 : k.projectionOffset) == null ? void 0 : O[0]) || 0,
|
|
6953
6946
|
onChange: (M) => {
|
|
6954
|
-
var V,
|
|
6947
|
+
var V, Z, $, I;
|
|
6955
6948
|
i({
|
|
6956
6949
|
...t.preferences,
|
|
6957
6950
|
mapVisualOptions: {
|
|
6958
6951
|
...(V = t.preferences) == null ? void 0 : V.mapVisualOptions,
|
|
6959
6952
|
projectionOffset: [
|
|
6960
6953
|
Number(M.target.value),
|
|
6961
|
-
((I = ($ = (
|
|
6954
|
+
((I = ($ = (Z = t.preferences) == null ? void 0 : Z.mapVisualOptions) == null ? void 0 : $.projectionOffset) == null ? void 0 : I[1]) || 0
|
|
6962
6955
|
]
|
|
6963
6956
|
}
|
|
6964
6957
|
});
|
|
@@ -6972,15 +6965,15 @@ function no() {
|
|
|
6972
6965
|
className: `h-9 w-full ${ze}`,
|
|
6973
6966
|
type: "number",
|
|
6974
6967
|
step: 10,
|
|
6975
|
-
value: ((
|
|
6968
|
+
value: ((Y = (j = (R = t.preferences) == null ? void 0 : R.mapVisualOptions) == null ? void 0 : j.projectionOffset) == null ? void 0 : Y[1]) || 0,
|
|
6976
6969
|
onChange: (M) => {
|
|
6977
|
-
var V,
|
|
6970
|
+
var V, Z, $, I;
|
|
6978
6971
|
i({
|
|
6979
6972
|
...t.preferences,
|
|
6980
6973
|
mapVisualOptions: {
|
|
6981
6974
|
...(V = t.preferences) == null ? void 0 : V.mapVisualOptions,
|
|
6982
6975
|
projectionOffset: [
|
|
6983
|
-
((I = ($ = (
|
|
6976
|
+
((I = ($ = (Z = t.preferences) == null ? void 0 : Z.mapVisualOptions) == null ? void 0 : $.projectionOffset) == null ? void 0 : I[0]) || 0,
|
|
6984
6977
|
Number(M.target.value)
|
|
6985
6978
|
]
|
|
6986
6979
|
}
|
|
@@ -7245,7 +7238,7 @@ function co() {
|
|
|
7245
7238
|
case "pyramid":
|
|
7246
7239
|
return /* @__PURE__ */ e(gt, { docContent: io, cardType: n });
|
|
7247
7240
|
case "kpi":
|
|
7248
|
-
return /* @__PURE__ */ e(
|
|
7241
|
+
return /* @__PURE__ */ e(Zl, {});
|
|
7249
7242
|
case "line":
|
|
7250
7243
|
case "bar":
|
|
7251
7244
|
return /* @__PURE__ */ e(Ul, { cardType: n });
|
|
@@ -7325,7 +7318,7 @@ const uo = [
|
|
|
7325
7318
|
{
|
|
7326
7319
|
label: "Unique",
|
|
7327
7320
|
value: "DISTINCT",
|
|
7328
|
-
logo: /* @__PURE__ */ e(
|
|
7321
|
+
logo: /* @__PURE__ */ e(wi, { className: "size-3.5" })
|
|
7329
7322
|
},
|
|
7330
7323
|
{
|
|
7331
7324
|
label: "Average",
|
|
@@ -7540,7 +7533,7 @@ function yo({
|
|
|
7540
7533
|
transition: m
|
|
7541
7534
|
} : void 0, v = Se(t.type);
|
|
7542
7535
|
function g(O) {
|
|
7543
|
-
const R = $e(O.data_type), j = Se(O.data_type),
|
|
7536
|
+
const R = $e(O.data_type), j = Se(O.data_type), Y = we(O.data_type), M = R ? "number" : j ? "string" : Y ? "date" : "string";
|
|
7544
7537
|
if (s === He) {
|
|
7545
7538
|
if (j) {
|
|
7546
7539
|
const V = {
|
|
@@ -7552,7 +7545,7 @@ function yo({
|
|
|
7552
7545
|
};
|
|
7553
7546
|
l(t.id, V);
|
|
7554
7547
|
}
|
|
7555
|
-
if (
|
|
7548
|
+
if (Y) {
|
|
7556
7549
|
const V = {
|
|
7557
7550
|
id: t.id,
|
|
7558
7551
|
// use the previous column's id.
|
|
@@ -7576,7 +7569,7 @@ function yo({
|
|
|
7576
7569
|
};
|
|
7577
7570
|
c(t.id, V);
|
|
7578
7571
|
}
|
|
7579
|
-
if (
|
|
7572
|
+
if (Y) {
|
|
7580
7573
|
const V = {
|
|
7581
7574
|
id: t.id,
|
|
7582
7575
|
// use the previous column's id.
|
|
@@ -7764,7 +7757,7 @@ function vo() {
|
|
|
7764
7757
|
return (N = g.card.queryConfig) == null ? void 0 : N.metricColumns;
|
|
7765
7758
|
}) || [], { addOrderByColumn: s, removeOrderByColumn: i, updateOrderByColumn: o } = W(), l = [...a, ...n];
|
|
7766
7759
|
if (l.length === 0)
|
|
7767
|
-
return /* @__PURE__ */ e(
|
|
7760
|
+
return /* @__PURE__ */ e(ae, {});
|
|
7768
7761
|
const u = /* @__PURE__ */ e(ii, { className: "size-3.5 text-muted-foreground hover:text-foreground" }), c = /* @__PURE__ */ e(ti, { className: "size-3.5 text-muted-foreground hover:text-foreground" }), h = /* @__PURE__ */ e(ri, { className: "size-3.5 text-muted-foreground hover:text-foreground" }), d = /* @__PURE__ */ e(ei, { className: "size-3.5 text-muted-foreground hover:text-foreground" }), y = l == null ? void 0 : l.filter((g) => !t.some((N) => N.columnId === g.id)).map((g) => ({
|
|
7769
7762
|
id: g.id,
|
|
7770
7763
|
value: g.label || g.name
|
|
@@ -7934,7 +7927,7 @@ function xo() {
|
|
|
7934
7927
|
Kt,
|
|
7935
7928
|
{
|
|
7936
7929
|
onRemoveColumn: y,
|
|
7937
|
-
sortableType:
|
|
7930
|
+
sortableType: Zt,
|
|
7938
7931
|
id: Ge,
|
|
7939
7932
|
label: C,
|
|
7940
7933
|
columns: s,
|
|
@@ -8246,7 +8239,7 @@ function Do() {
|
|
|
8246
8239
|
n ? (l = t.current) == null || l.resize(0) : (u = t.current) == null || u.resize(25);
|
|
8247
8240
|
}, [n]);
|
|
8248
8241
|
function i() {
|
|
8249
|
-
return /* @__PURE__ */ r(
|
|
8242
|
+
return /* @__PURE__ */ r(ae, { children: [
|
|
8250
8243
|
/* @__PURE__ */ e(
|
|
8251
8244
|
pe,
|
|
8252
8245
|
{
|
|
@@ -8266,7 +8259,7 @@ function Do() {
|
|
|
8266
8259
|
minSize: 0,
|
|
8267
8260
|
defaultSize: 60,
|
|
8268
8261
|
children: a && !n ? /* @__PURE__ */ r(je, { direction: "horizontal", children: [
|
|
8269
|
-
/* @__PURE__ */ e(
|
|
8262
|
+
/* @__PURE__ */ e(ae, { children: /* @__PURE__ */ e(
|
|
8270
8263
|
pe,
|
|
8271
8264
|
{
|
|
8272
8265
|
ref: t,
|
|
@@ -8284,13 +8277,13 @@ function Do() {
|
|
|
8284
8277
|
] });
|
|
8285
8278
|
}
|
|
8286
8279
|
function o() {
|
|
8287
|
-
return /* @__PURE__ */ e(
|
|
8280
|
+
return /* @__PURE__ */ e(ae, { children: /* @__PURE__ */ e(
|
|
8288
8281
|
"div",
|
|
8289
8282
|
{
|
|
8290
8283
|
className: "grow",
|
|
8291
8284
|
"data-biz-mode-container": "",
|
|
8292
8285
|
children: a && !n ? /* @__PURE__ */ r(je, { direction: "horizontal", children: [
|
|
8293
|
-
/* @__PURE__ */ e(
|
|
8286
|
+
/* @__PURE__ */ e(ae, { children: /* @__PURE__ */ e(
|
|
8294
8287
|
pe,
|
|
8295
8288
|
{
|
|
8296
8289
|
ref: t,
|
|
@@ -8341,7 +8334,7 @@ const Io = [
|
|
|
8341
8334
|
}
|
|
8342
8335
|
];
|
|
8343
8336
|
function Oo() {
|
|
8344
|
-
const t = at(null), a = at(null), [n, s] = J(!1), [i, o] = J(
|
|
8337
|
+
const t = at(null), a = at(null), [n, s] = J(!1), [i, o] = J(Zn), [l, u] = J(!1), c = f((F) => F.actions.setCardSql), h = f((F) => F.actions.setRunSql), d = f((F) => F.showAIDialog), { setShowAIDialog: y } = W(), {
|
|
8345
8338
|
messages: x,
|
|
8346
8339
|
setMessages: m,
|
|
8347
8340
|
reload: C,
|
|
@@ -8355,10 +8348,10 @@ function Oo() {
|
|
|
8355
8348
|
handleInputChange: O,
|
|
8356
8349
|
handleSubmit: R,
|
|
8357
8350
|
stop: j,
|
|
8358
|
-
chatStatus:
|
|
8351
|
+
chatStatus: Y,
|
|
8359
8352
|
toolStatus: M,
|
|
8360
8353
|
llmUsage: V,
|
|
8361
|
-
errorMessage:
|
|
8354
|
+
errorMessage: Z
|
|
8362
8355
|
} = rs();
|
|
8363
8356
|
_r({
|
|
8364
8357
|
scrollContainerRef: t,
|
|
@@ -8519,7 +8512,7 @@ function Oo() {
|
|
|
8519
8512
|
/* @__PURE__ */ e(
|
|
8520
8513
|
Rr,
|
|
8521
8514
|
{
|
|
8522
|
-
status: jr(
|
|
8515
|
+
status: jr(Y, M),
|
|
8523
8516
|
isLoading: N
|
|
8524
8517
|
}
|
|
8525
8518
|
)
|
|
@@ -8559,7 +8552,7 @@ function Oo() {
|
|
|
8559
8552
|
V.totalTokens,
|
|
8560
8553
|
" total tokens"
|
|
8561
8554
|
] }) }),
|
|
8562
|
-
|
|
8555
|
+
Z && /* @__PURE__ */ e("div", { className: "flex items-center justify-between text-xs text-muted-foreground", children: /* @__PURE__ */ e("span", { children: Z }) })
|
|
8563
8556
|
]
|
|
8564
8557
|
}
|
|
8565
8558
|
);
|
|
@@ -8850,11 +8843,11 @@ export {
|
|
|
8850
8843
|
ma as getSql,
|
|
8851
8844
|
Wo as invalidateToken,
|
|
8852
8845
|
Ts as isBooleanDataType,
|
|
8853
|
-
|
|
8846
|
+
Yo as isColumnInSqlGen,
|
|
8854
8847
|
we as isDateDataType,
|
|
8855
8848
|
$e as isNumberDataType,
|
|
8856
8849
|
Se as isTextDataType,
|
|
8857
|
-
|
|
8850
|
+
Zo as resolveDataType,
|
|
8858
8851
|
Ct as resolveDatamodelName,
|
|
8859
8852
|
Xo as useCard,
|
|
8860
8853
|
rt as useDashboardActions,
|