react-semaphor 0.0.321 → 0.0.323
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-BL6pRRMJ.js → index-BoOmRr9o.js} +81 -81
- package/dist/chunks/{index-DMyD2wJC.js → index-CmI4p14L.js} +821 -790
- package/dist/chunks/{index-D045_ncj.js → index-Csp8aNd_.js} +10488 -10434
- package/dist/chunks/{index-D3yq_sVn.js → index-eIpnAL0h.js} +5 -5
- package/dist/chunks/{lucide-react-BgkuPfcR.js → lucide-react-Du1HXzMf.js} +1 -1
- package/dist/chunks/{lucide-react-DyGQh8fl.js → lucide-react-DzVyq6Fk.js} +3 -3
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +2 -2
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +1 -1
- package/dist/types/dashboard.d.ts +1 -0
- package/dist/types/main.d.ts +1 -0
- package/dist/types/surfboard.d.ts +1 -0
- package/dist/types/types.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { c as V, p as Os, u as
|
|
1
|
+
import { c as V, p as Os, u as O, n as zs, o as ke, q as e, r as Fs, s as Is, t as z, j as Ds, v as Ts, w as Ls, x as Ms, y as Es, L as R, z as le, A as la, E as ra, H as ia, J as oa, K as st, M as at, N as tt, O as Js, Q as W, R as Qe, h as nt, V as m, W as lt, F as ca, Y as Je, Z as Ke, _ as da, $ as rt, a0 as ua, a1 as me, a2 as he, a3 as xe, a4 as pe, a5 as Se, a6 as fe, a7 as J, T as As, a8 as Vs, a9 as qs, aa as Rs, ab as ma, ac as ha, ad as de, ae as it, af as ot, ag as xa, ah as ct, C as dt, ai as ut, aj as pa, B as mt, ak as We, al as ht, am as Ks, an as fa, ao as ys, ap as Ne, aq as Fe, ar as ge, as as ga, at as xt, au as pt, av as ft, aw as gt, I as jt, ax as bt, ay as yt, az as vt, aA as qe, aB as vs, aC as Ct, a as Nt, aD as Ue, aE as Cs, aF as Ae, aG as Ns, aH as St, aI as wt, aJ as kt, aK as Ot, aL as zt, aM as Ft, aN as bs, aO as It, aP as Ws, aQ as Dt, aR as Ys, aS as Tt, aT as Lt, aU as Mt, aV as Et, aW as ja, aX as re, aY as _s, aZ as ba, a_ as At, a$ as Vt, b0 as ls, b1 as qt, b2 as Rt, b3 as _t, b4 as Ht, b5 as $t, b6 as Pt, b7 as Bt, l as Ut, b8 as us, b9 as ya, ba as va, bb as Ca, bc as rs, bd as Na, be as is, bf as Xs, bg as Gt, bh as Qt, bi as ms, bj as hs, bk as xs, bl as Jt, X as Sa, bm as Kt, bn as Wt, bo as Yt, bp as ps, bq as Ie, f as Xt, br as Be, bs as Hs, bt as wa, bu as Zt, bv as en, bw as os, bx as sn, by as an, bz as tn, bA as Zs, bB as nn, bC as ln, bD as rn, bE as on, bF as cn, bG as dn, bH as un, bI as mn, bJ as De, bK as B, bL as U, bM as $s, bN as G, bO as hn, bP as ka, bQ as xn, bR as pn, bS as fn, bT as gn, bU as jn, bV as bn, bW as yn, bX as vn, bY as Cn } from "./index-Csp8aNd_.js";
|
|
2
2
|
import * as ea from "react";
|
|
3
|
-
import we, { useState as q, useMemo as Ss, useEffect as Z, useRef as ws, Suspense as
|
|
3
|
+
import we, { useState as q, useMemo as Ss, useEffect as Z, useRef as ws, Suspense as Nn } from "react";
|
|
4
4
|
import "react-dom";
|
|
5
5
|
/**
|
|
6
6
|
* @license lucide-react v0.453.0 - ISC
|
|
@@ -8,7 +8,7 @@ import "react-dom";
|
|
|
8
8
|
* This source code is licensed under the ISC license.
|
|
9
9
|
* See the LICENSE file in the root directory of this source tree.
|
|
10
10
|
*/
|
|
11
|
-
const
|
|
11
|
+
const Sn = V("Box", [
|
|
12
12
|
[
|
|
13
13
|
"path",
|
|
14
14
|
{
|
|
@@ -25,7 +25,7 @@ const Nn = V("Box", [
|
|
|
25
25
|
* This source code is licensed under the ISC license.
|
|
26
26
|
* See the LICENSE file in the root directory of this source tree.
|
|
27
27
|
*/
|
|
28
|
-
const
|
|
28
|
+
const wn = V("ChartArea", [
|
|
29
29
|
["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
|
|
30
30
|
[
|
|
31
31
|
"path",
|
|
@@ -104,7 +104,7 @@ const Fa = V("ChartScatter", [
|
|
|
104
104
|
* This source code is licensed under the ISC license.
|
|
105
105
|
* See the LICENSE file in the root directory of this source tree.
|
|
106
106
|
*/
|
|
107
|
-
const
|
|
107
|
+
const kn = V("CircleX", [
|
|
108
108
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
109
109
|
["path", { d: "m15 9-6 6", key: "1uzhvr" }],
|
|
110
110
|
["path", { d: "m9 9 6 6", key: "z0biqf" }]
|
|
@@ -115,7 +115,7 @@ const wn = V("CircleX", [
|
|
|
115
115
|
* This source code is licensed under the ISC license.
|
|
116
116
|
* See the LICENSE file in the root directory of this source tree.
|
|
117
117
|
*/
|
|
118
|
-
const
|
|
118
|
+
const On = V("CopyPlus", [
|
|
119
119
|
["line", { x1: "15", x2: "15", y1: "12", y2: "18", key: "1p7wdc" }],
|
|
120
120
|
["line", { x1: "12", x2: "18", y1: "15", y2: "15", key: "1nscbv" }],
|
|
121
121
|
["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
|
|
@@ -127,7 +127,7 @@ const kn = V("CopyPlus", [
|
|
|
127
127
|
* This source code is licensed under the ISC license.
|
|
128
128
|
* See the LICENSE file in the root directory of this source tree.
|
|
129
129
|
*/
|
|
130
|
-
const
|
|
130
|
+
const zn = V("Database", [
|
|
131
131
|
["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3", key: "msslwz" }],
|
|
132
132
|
["path", { d: "M3 5V19A9 3 0 0 0 21 19V5", key: "1wlel7" }],
|
|
133
133
|
["path", { d: "M3 12A9 3 0 0 0 21 12", key: "mv7ke4" }]
|
|
@@ -149,7 +149,7 @@ const Ia = V("EllipsisVertical", [
|
|
|
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 Fn = V("Eraser", [
|
|
153
153
|
[
|
|
154
154
|
"path",
|
|
155
155
|
{
|
|
@@ -166,7 +166,7 @@ const zn = V("Eraser", [
|
|
|
166
166
|
* This source code is licensed under the ISC license.
|
|
167
167
|
* See the LICENSE file in the root directory of this source tree.
|
|
168
168
|
*/
|
|
169
|
-
const
|
|
169
|
+
const In = V("EyeClosed", [
|
|
170
170
|
["path", { d: "m15 18-.722-3.25", key: "1j64jw" }],
|
|
171
171
|
["path", { d: "M2 8a10.645 10.645 0 0 0 20 0", key: "1e7gxb" }],
|
|
172
172
|
["path", { d: "m20 15-1.726-2.05", key: "1cnuld" }],
|
|
@@ -179,7 +179,7 @@ const Fn = V("EyeClosed", [
|
|
|
179
179
|
* This source code is licensed under the ISC license.
|
|
180
180
|
* See the LICENSE file in the root directory of this source tree.
|
|
181
181
|
*/
|
|
182
|
-
const
|
|
182
|
+
const Dn = V("Eye", [
|
|
183
183
|
[
|
|
184
184
|
"path",
|
|
185
185
|
{
|
|
@@ -208,7 +208,7 @@ const Tn = V("Glasses", [
|
|
|
208
208
|
* This source code is licensed under the ISC license.
|
|
209
209
|
* See the LICENSE file in the root directory of this source tree.
|
|
210
210
|
*/
|
|
211
|
-
const
|
|
211
|
+
const Ln = V("Hammer", [
|
|
212
212
|
["path", { d: "m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9", key: "eefl8a" }],
|
|
213
213
|
["path", { d: "m18 15 4-4", key: "16gjal" }],
|
|
214
214
|
[
|
|
@@ -237,7 +237,7 @@ const Mn = V("Hash", [
|
|
|
237
237
|
* This source code is licensed under the ISC license.
|
|
238
238
|
* See the LICENSE file in the root directory of this source tree.
|
|
239
239
|
*/
|
|
240
|
-
const
|
|
240
|
+
const En = V("House", [
|
|
241
241
|
["path", { d: "M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8", key: "5wwlr5" }],
|
|
242
242
|
[
|
|
243
243
|
"path",
|
|
@@ -253,7 +253,7 @@ const Ln = V("House", [
|
|
|
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 An = V("IdCard", [
|
|
257
257
|
["path", { d: "M16 10h2", key: "8sgtl7" }],
|
|
258
258
|
["path", { d: "M16 14h2", key: "epxaof" }],
|
|
259
259
|
["path", { d: "M6.17 15a3 3 0 0 1 5.66 0", key: "n6f512" }],
|
|
@@ -266,7 +266,7 @@ const En = V("IdCard", [
|
|
|
266
266
|
* This source code is licensed under the ISC license.
|
|
267
267
|
* See the LICENSE file in the root directory of this source tree.
|
|
268
268
|
*/
|
|
269
|
-
const
|
|
269
|
+
const Vn = V("ListEnd", [
|
|
270
270
|
["path", { d: "M16 12H3", key: "1a2rj7" }],
|
|
271
271
|
["path", { d: "M16 6H3", key: "1wxfjs" }],
|
|
272
272
|
["path", { d: "M10 18H3", key: "13769t" }],
|
|
@@ -279,7 +279,7 @@ const An = V("ListEnd", [
|
|
|
279
279
|
* This source code is licensed under the ISC license.
|
|
280
280
|
* See the LICENSE file in the root directory of this source tree.
|
|
281
281
|
*/
|
|
282
|
-
const
|
|
282
|
+
const qn = V("ListStart", [
|
|
283
283
|
["path", { d: "M16 12H3", key: "1a2rj7" }],
|
|
284
284
|
["path", { d: "M16 18H3", key: "12xzn7" }],
|
|
285
285
|
["path", { d: "M10 6H3", key: "lf8lx7" }],
|
|
@@ -292,7 +292,7 @@ const Vn = V("ListStart", [
|
|
|
292
292
|
* This source code is licensed under the ISC license.
|
|
293
293
|
* See the LICENSE file in the root directory of this source tree.
|
|
294
294
|
*/
|
|
295
|
-
const
|
|
295
|
+
const Rn = V("ListX", [
|
|
296
296
|
["path", { d: "M11 12H3", key: "51ecnj" }],
|
|
297
297
|
["path", { d: "M16 6H3", key: "1wxfjs" }],
|
|
298
298
|
["path", { d: "M16 18H3", key: "12xzn7" }],
|
|
@@ -305,7 +305,7 @@ const qn = V("ListX", [
|
|
|
305
305
|
* This source code is licensed under the ISC license.
|
|
306
306
|
* See the LICENSE file in the root directory of this source tree.
|
|
307
307
|
*/
|
|
308
|
-
const
|
|
308
|
+
const Ve = V("LoaderCircle", [
|
|
309
309
|
["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]
|
|
310
310
|
]);
|
|
311
311
|
/**
|
|
@@ -314,7 +314,7 @@ const Ke = V("LoaderCircle", [
|
|
|
314
314
|
* This source code is licensed under the ISC license.
|
|
315
315
|
* See the LICENSE file in the root directory of this source tree.
|
|
316
316
|
*/
|
|
317
|
-
const
|
|
317
|
+
const Da = V("Map", [
|
|
318
318
|
[
|
|
319
319
|
"path",
|
|
320
320
|
{
|
|
@@ -331,7 +331,7 @@ const Ta = V("Map", [
|
|
|
331
331
|
* This source code is licensed under the ISC license.
|
|
332
332
|
* See the LICENSE file in the root directory of this source tree.
|
|
333
333
|
*/
|
|
334
|
-
const
|
|
334
|
+
const _n = V("MessageSquareMore", [
|
|
335
335
|
["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" }],
|
|
336
336
|
["path", { d: "M8 10h.01", key: "19clt8" }],
|
|
337
337
|
["path", { d: "M12 10h.01", key: "1nrarc" }],
|
|
@@ -343,7 +343,7 @@ const Rn = V("MessageSquareMore", [
|
|
|
343
343
|
* This source code is licensed under the ISC license.
|
|
344
344
|
* See the LICENSE file in the root directory of this source tree.
|
|
345
345
|
*/
|
|
346
|
-
const
|
|
346
|
+
const Hn = V("Network", [
|
|
347
347
|
["rect", { x: "16", y: "16", width: "6", height: "6", rx: "1", key: "4q2zg0" }],
|
|
348
348
|
["rect", { x: "2", y: "16", width: "6", height: "6", rx: "1", key: "8cvhb9" }],
|
|
349
349
|
["rect", { x: "9", y: "2", width: "6", height: "6", rx: "1", key: "1egb70" }],
|
|
@@ -356,7 +356,7 @@ const _n = V("Network", [
|
|
|
356
356
|
* This source code is licensed under the ISC license.
|
|
357
357
|
* See the LICENSE file in the root directory of this source tree.
|
|
358
358
|
*/
|
|
359
|
-
const
|
|
359
|
+
const Ta = V("Pencil", [
|
|
360
360
|
[
|
|
361
361
|
"path",
|
|
362
362
|
{
|
|
@@ -372,7 +372,7 @@ const Da = V("Pencil", [
|
|
|
372
372
|
* This source code is licensed under the ISC license.
|
|
373
373
|
* See the LICENSE file in the root directory of this source tree.
|
|
374
374
|
*/
|
|
375
|
-
const
|
|
375
|
+
const $n = V("Play", [
|
|
376
376
|
["polygon", { points: "6 3 20 12 6 21 6 3", key: "1oa8hb" }]
|
|
377
377
|
]);
|
|
378
378
|
/**
|
|
@@ -381,7 +381,7 @@ const Hn = V("Play", [
|
|
|
381
381
|
* This source code is licensed under the ISC license.
|
|
382
382
|
* See the LICENSE file in the root directory of this source tree.
|
|
383
383
|
*/
|
|
384
|
-
const
|
|
384
|
+
const Pn = V("Plug2", [
|
|
385
385
|
["path", { d: "M9 2v6", key: "17ngun" }],
|
|
386
386
|
["path", { d: "M15 2v6", key: "s7yy2p" }],
|
|
387
387
|
["path", { d: "M12 17v5", key: "bb1du9" }],
|
|
@@ -394,7 +394,7 @@ const $n = V("Plug2", [
|
|
|
394
394
|
* This source code is licensed under the ISC license.
|
|
395
395
|
* See the LICENSE file in the root directory of this source tree.
|
|
396
396
|
*/
|
|
397
|
-
const
|
|
397
|
+
const Bn = V("Save", [
|
|
398
398
|
[
|
|
399
399
|
"path",
|
|
400
400
|
{
|
|
@@ -411,7 +411,7 @@ const Pn = V("Save", [
|
|
|
411
411
|
* This source code is licensed under the ISC license.
|
|
412
412
|
* See the LICENSE file in the root directory of this source tree.
|
|
413
413
|
*/
|
|
414
|
-
const
|
|
414
|
+
const La = V("Shapes", [
|
|
415
415
|
[
|
|
416
416
|
"path",
|
|
417
417
|
{
|
|
@@ -428,7 +428,7 @@ const Ma = V("Shapes", [
|
|
|
428
428
|
* This source code is licensed under the ISC license.
|
|
429
429
|
* See the LICENSE file in the root directory of this source tree.
|
|
430
430
|
*/
|
|
431
|
-
const
|
|
431
|
+
const Un = V("ShieldQuestion", [
|
|
432
432
|
[
|
|
433
433
|
"path",
|
|
434
434
|
{
|
|
@@ -445,7 +445,7 @@ const Bn = V("ShieldQuestion", [
|
|
|
445
445
|
* This source code is licensed under the ISC license.
|
|
446
446
|
* See the LICENSE file in the root directory of this source tree.
|
|
447
447
|
*/
|
|
448
|
-
const
|
|
448
|
+
const Gn = V("Sigma", [
|
|
449
449
|
[
|
|
450
450
|
"path",
|
|
451
451
|
{
|
|
@@ -460,7 +460,7 @@ const Un = V("Sigma", [
|
|
|
460
460
|
* This source code is licensed under the ISC license.
|
|
461
461
|
* See the LICENSE file in the root directory of this source tree.
|
|
462
462
|
*/
|
|
463
|
-
const
|
|
463
|
+
const Qn = V("SwatchBook", [
|
|
464
464
|
["path", { d: "M11 17a4 4 0 0 1-8 0V5a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2Z", key: "1ldrpk" }],
|
|
465
465
|
["path", { d: "M16.7 13H19a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2H7", key: "11i5po" }],
|
|
466
466
|
["path", { d: "M 7 17h.01", key: "1euzgo" }],
|
|
@@ -478,7 +478,7 @@ const Gn = V("SwatchBook", [
|
|
|
478
478
|
* This source code is licensed under the ISC license.
|
|
479
479
|
* See the LICENSE file in the root directory of this source tree.
|
|
480
480
|
*/
|
|
481
|
-
const
|
|
481
|
+
const Jn = V("Tag", [
|
|
482
482
|
[
|
|
483
483
|
"path",
|
|
484
484
|
{
|
|
@@ -494,7 +494,7 @@ const Qn = V("Tag", [
|
|
|
494
494
|
* This source code is licensed under the ISC license.
|
|
495
495
|
* See the LICENSE file in the root directory of this source tree.
|
|
496
496
|
*/
|
|
497
|
-
const
|
|
497
|
+
const Kn = V("ToggleLeft", [
|
|
498
498
|
["rect", { width: "20", height: "12", x: "2", y: "6", rx: "6", ry: "6", key: "f2vt7d" }],
|
|
499
499
|
["circle", { cx: "8", cy: "12", r: "2", key: "1nvbw3" }]
|
|
500
500
|
]);
|
|
@@ -515,11 +515,11 @@ const Us = V("Type", [
|
|
|
515
515
|
* This source code is licensed under the ISC license.
|
|
516
516
|
* See the LICENSE file in the root directory of this source tree.
|
|
517
517
|
*/
|
|
518
|
-
const
|
|
518
|
+
const Wn = V("User", [
|
|
519
519
|
["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
|
|
520
520
|
["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
|
|
521
521
|
]);
|
|
522
|
-
function
|
|
522
|
+
function Ma(s) {
|
|
523
523
|
var t;
|
|
524
524
|
return {
|
|
525
525
|
...s,
|
|
@@ -531,14 +531,14 @@ function La(s) {
|
|
|
531
531
|
var o;
|
|
532
532
|
return {
|
|
533
533
|
...l,
|
|
534
|
-
cards: (o = l.cards) == null ? void 0 : o.map((
|
|
534
|
+
cards: (o = l.cards) == null ? void 0 : o.map((r) => Yn(r))
|
|
535
535
|
};
|
|
536
536
|
})
|
|
537
537
|
};
|
|
538
538
|
})
|
|
539
539
|
};
|
|
540
540
|
}
|
|
541
|
-
function
|
|
541
|
+
function Yn(s) {
|
|
542
542
|
var t, a, n, l;
|
|
543
543
|
return {
|
|
544
544
|
...s,
|
|
@@ -553,12 +553,12 @@ function Wn(s) {
|
|
|
553
553
|
}))
|
|
554
554
|
}
|
|
555
555
|
},
|
|
556
|
-
customCfg:
|
|
556
|
+
customCfg: Xn(s.customCfg),
|
|
557
557
|
// if customCfg is present, clean it, otherwise return null{
|
|
558
558
|
data: []
|
|
559
559
|
};
|
|
560
560
|
}
|
|
561
|
-
function
|
|
561
|
+
function Xn(s) {
|
|
562
562
|
var t, a;
|
|
563
563
|
return s ? {
|
|
564
564
|
...s,
|
|
@@ -572,7 +572,7 @@ function Yn(s) {
|
|
|
572
572
|
}
|
|
573
573
|
} : null;
|
|
574
574
|
}
|
|
575
|
-
async function
|
|
575
|
+
async function Zn(s, t, a, n) {
|
|
576
576
|
if (!n)
|
|
577
577
|
return null;
|
|
578
578
|
const l = JSON.stringify(t);
|
|
@@ -586,52 +586,52 @@ async function Xn(s, t, a, n) {
|
|
|
586
586
|
async function ks(s, t) {
|
|
587
587
|
if (!t)
|
|
588
588
|
return null;
|
|
589
|
-
const { id: a, template: n, filterValues: l, isDefault: o, shared:
|
|
589
|
+
const { id: a, template: n, filterValues: l, isDefault: o, shared: r } = s;
|
|
590
590
|
return await Os("https://semaphor.cloud/api/v1/lens", t, {
|
|
591
591
|
lensId: a,
|
|
592
592
|
template: n,
|
|
593
593
|
filterValues: l,
|
|
594
594
|
isDefault: o,
|
|
595
|
-
shared:
|
|
595
|
+
shared: r,
|
|
596
596
|
operation: "update"
|
|
597
597
|
});
|
|
598
598
|
}
|
|
599
|
-
async function
|
|
599
|
+
async function el(s, t) {
|
|
600
600
|
return t ? await Os("https://semaphor.cloud/api/v1/lens", t, {
|
|
601
601
|
operation: "delete",
|
|
602
602
|
lensId: s
|
|
603
603
|
}) : null;
|
|
604
604
|
}
|
|
605
|
-
function
|
|
606
|
-
const [s, t] = q(""), [a, n] = q(!1), l =
|
|
605
|
+
function sl() {
|
|
606
|
+
const [s, t] = q(""), [a, n] = q(!1), l = O((b) => b.lenses), { setLenses: o, setSelectedLensId: r } = zs(), [c, d] = q(!1), [p, u] = q(!1), y = O((b) => b.dashboard), g = O((b) => b.filterValues), { authToken: x } = ke();
|
|
607
607
|
async function j() {
|
|
608
608
|
d(!0);
|
|
609
|
-
const b =
|
|
609
|
+
const b = Ma(
|
|
610
610
|
y
|
|
611
|
-
), I = await
|
|
611
|
+
), I = await Zn(
|
|
612
612
|
s,
|
|
613
613
|
b,
|
|
614
614
|
g,
|
|
615
615
|
x == null ? void 0 : x.accessToken
|
|
616
616
|
);
|
|
617
|
-
I && (o([...l || [], I]),
|
|
617
|
+
I && (o([...l || [], I]), r(I.id), u(!1)), d(!1);
|
|
618
618
|
}
|
|
619
619
|
return /* @__PURE__ */ e.jsxs(Fs, { open: p, onOpenChange: u, children: [
|
|
620
620
|
/* @__PURE__ */ e.jsx(Is, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
621
|
-
|
|
621
|
+
z,
|
|
622
622
|
{
|
|
623
623
|
variant: "secondary",
|
|
624
624
|
className: "h-7 p-2",
|
|
625
625
|
size: "sm",
|
|
626
626
|
children: [
|
|
627
|
-
/* @__PURE__ */ e.jsx(
|
|
627
|
+
/* @__PURE__ */ e.jsx(Ds, { className: "mr-2 h-4 w-4", strokeWidth: 1.5 }),
|
|
628
628
|
"Lens"
|
|
629
629
|
]
|
|
630
630
|
}
|
|
631
631
|
) }),
|
|
632
|
-
/* @__PURE__ */ e.jsxs(
|
|
633
|
-
/* @__PURE__ */ e.jsxs(
|
|
634
|
-
/* @__PURE__ */ e.jsx(
|
|
632
|
+
/* @__PURE__ */ e.jsxs(Ts, { className: "sm:max-w-[425px]", children: [
|
|
633
|
+
/* @__PURE__ */ e.jsxs(Ls, { children: [
|
|
634
|
+
/* @__PURE__ */ e.jsx(Ms, { children: "Create Lens" }),
|
|
635
635
|
/* @__PURE__ */ e.jsx(Es, { children: "Lenses are private by default and are only visible to you." })
|
|
636
636
|
] }),
|
|
637
637
|
/* @__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: [
|
|
@@ -650,7 +650,7 @@ function el() {
|
|
|
650
650
|
] }) }),
|
|
651
651
|
a && /* @__PURE__ */ e.jsx("p", { className: "text-sm", children: "The lens name already exists. Use a differnet name." }),
|
|
652
652
|
/* @__PURE__ */ e.jsx(la, { children: /* @__PURE__ */ e.jsx(
|
|
653
|
-
|
|
653
|
+
z,
|
|
654
654
|
{
|
|
655
655
|
size: "sm",
|
|
656
656
|
variant: "outline",
|
|
@@ -663,13 +663,13 @@ function el() {
|
|
|
663
663
|
] })
|
|
664
664
|
] });
|
|
665
665
|
}
|
|
666
|
-
function
|
|
667
|
-
const [s, t] = q(!1), a =
|
|
666
|
+
function al() {
|
|
667
|
+
const [s, t] = q(!1), a = O((u) => u.lenses), n = O((u) => u.selectedLensId), { setLenses: l, setSelectedLensId: o } = zs(), { authToken: r } = ke();
|
|
668
668
|
async function c(u) {
|
|
669
669
|
o(u);
|
|
670
670
|
}
|
|
671
671
|
async function d(u) {
|
|
672
|
-
if (await
|
|
672
|
+
if (await el(u, r == null ? void 0 : r.accessToken)) {
|
|
673
673
|
const g = a == null ? void 0 : a.filter((x) => x.id !== u);
|
|
674
674
|
l(g || []), o("original");
|
|
675
675
|
}
|
|
@@ -687,18 +687,18 @@ function sl() {
|
|
|
687
687
|
...u,
|
|
688
688
|
isDefault: !u.isDefault
|
|
689
689
|
};
|
|
690
|
-
await ks(g,
|
|
690
|
+
await ks(g, r == null ? void 0 : r.accessToken);
|
|
691
691
|
const x = a == null ? void 0 : a.find((j) => j.isDefault);
|
|
692
692
|
if (x && x.id !== u.id) {
|
|
693
693
|
const j = {
|
|
694
694
|
...x,
|
|
695
695
|
isDefault: !1
|
|
696
696
|
};
|
|
697
|
-
await ks(j,
|
|
697
|
+
await ks(j, r == null ? void 0 : r.accessToken);
|
|
698
698
|
}
|
|
699
699
|
}
|
|
700
700
|
return /* @__PURE__ */ e.jsxs(ra, { open: s, onOpenChange: t, children: [
|
|
701
|
-
/* @__PURE__ */ e.jsx(ia, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
701
|
+
/* @__PURE__ */ e.jsx(ia, { asChild: !0, children: /* @__PURE__ */ e.jsx(z, { variant: "ghost", className: "h-7 p-2", children: /* @__PURE__ */ e.jsx(Tn, { className: "h-4 w-4", strokeWidth: 1.5 }) }) }),
|
|
702
702
|
/* @__PURE__ */ e.jsxs(oa, { align: "end", className: "w-60", children: [
|
|
703
703
|
/* @__PURE__ */ e.jsx(st, { className: "px-3", children: "Lenses" }),
|
|
704
704
|
/* @__PURE__ */ e.jsx(at, {}),
|
|
@@ -718,7 +718,7 @@ function sl() {
|
|
|
718
718
|
/* @__PURE__ */ e.jsx("p", { children: u.name }),
|
|
719
719
|
/* @__PURE__ */ e.jsxs("span", { className: "flex items-center gap-3", children: [
|
|
720
720
|
/* @__PURE__ */ e.jsx(
|
|
721
|
-
|
|
721
|
+
En,
|
|
722
722
|
{
|
|
723
723
|
onClick: (y) => {
|
|
724
724
|
y.preventDefault(), p(u);
|
|
@@ -734,7 +734,7 @@ function sl() {
|
|
|
734
734
|
}
|
|
735
735
|
),
|
|
736
736
|
/* @__PURE__ */ e.jsx(
|
|
737
|
-
|
|
737
|
+
Qe,
|
|
738
738
|
{
|
|
739
739
|
onClick: (y) => {
|
|
740
740
|
y.preventDefault(), d(u.id);
|
|
@@ -754,29 +754,59 @@ function sl() {
|
|
|
754
754
|
] })
|
|
755
755
|
] });
|
|
756
756
|
}
|
|
757
|
-
function
|
|
758
|
-
const
|
|
759
|
-
|
|
760
|
-
|
|
757
|
+
function tl() {
|
|
758
|
+
const [s, t] = q(!1), { authToken: a } = ke(), n = O((r) => r.theme), l = O((r) => r.filterValues);
|
|
759
|
+
async function o() {
|
|
760
|
+
{
|
|
761
|
+
t(!0);
|
|
762
|
+
const r = new URLSearchParams();
|
|
763
|
+
r.set("token", (a == null ? void 0 : a.accessToken) || ""), r.set("theme", n || "light"), r.set("filterValues", JSON.stringify(l));
|
|
764
|
+
const c = `https://semaphor.cloud/api/v1/generate-pdf?params=${encodeURIComponent(r.toString())}`, p = await (await fetch(c, {
|
|
765
|
+
method: "GET",
|
|
766
|
+
headers: {
|
|
767
|
+
Authorization: `Bearer ${a == null ? void 0 : a.accessToken}`
|
|
768
|
+
}
|
|
769
|
+
})).blob(), u = URL.createObjectURL(p);
|
|
770
|
+
window.open(u, "_blank"), t(!1);
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
return /* @__PURE__ */ e.jsx(
|
|
774
|
+
z,
|
|
775
|
+
{
|
|
776
|
+
variant: "ghost",
|
|
777
|
+
className: "h-7 p-2",
|
|
778
|
+
size: "sm",
|
|
779
|
+
onClick: o,
|
|
780
|
+
children: s ? /* @__PURE__ */ e.jsx(Ve, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ e.jsx(nt, { className: "h-4 w-4", strokeWidth: 1.5 })
|
|
781
|
+
}
|
|
782
|
+
);
|
|
783
|
+
}
|
|
784
|
+
function nl() {
|
|
785
|
+
q(!1);
|
|
786
|
+
const { authToken: s } = ke();
|
|
787
|
+
O((f) => f.theme);
|
|
788
|
+
const t = O((f) => f.lenses), a = O((f) => f.selectedLensId), n = t == null ? void 0 : t.find((f) => f.id === a), l = O((f) => f.dashboard);
|
|
789
|
+
O((f) => f.selectedSheetId);
|
|
790
|
+
const o = O(
|
|
761
791
|
(f) => f.isDashboardEditing
|
|
762
|
-
),
|
|
792
|
+
), r = m(
|
|
763
793
|
(f) => f.selectedConnectionId
|
|
764
|
-
), [c, d] = q(!1), p =
|
|
765
|
-
|
|
794
|
+
), [c, d] = q(!1), p = O((f) => f.filterValues), u = O((f) => f.isVisualEditing), y = O((f) => f.showFilters);
|
|
795
|
+
O(
|
|
766
796
|
(f) => f.showDashboardJSON
|
|
767
797
|
);
|
|
768
|
-
const g =
|
|
798
|
+
const g = O((f) => f.onSaveFunction), x = O(
|
|
769
799
|
(f) => f.actions.setShowFilters
|
|
770
|
-
), { addFrame: j, setSelectedFrameId: b } =
|
|
800
|
+
), { addFrame: j, setSelectedFrameId: b } = O(
|
|
771
801
|
(f) => f.actions
|
|
772
|
-
), { getSelectedSheet: I, setIsDashboardEditing: C, setShowDashboardJSON:
|
|
773
|
-
() =>
|
|
802
|
+
), { getSelectedSheet: I, setIsDashboardEditing: C, setShowDashboardJSON: T } = O((f) => f.actions), F = I(), { tenantId: A, endUserId: N } = Ss(
|
|
803
|
+
() => lt(s == null ? void 0 : s.accessToken),
|
|
774
804
|
[s == null ? void 0 : s.accessToken]
|
|
775
|
-
), S = Ss(() => A || N, [A, N]),
|
|
805
|
+
), S = Ss(() => A || N, [A, N]), L = () => {
|
|
776
806
|
if (!o || !F) return;
|
|
777
807
|
const f = {
|
|
778
|
-
connectionId:
|
|
779
|
-
id:
|
|
808
|
+
connectionId: r,
|
|
809
|
+
id: Je(),
|
|
780
810
|
title: "Title",
|
|
781
811
|
description: "Description",
|
|
782
812
|
preferences: {
|
|
@@ -791,7 +821,7 @@ function al() {
|
|
|
791
821
|
sql: "select COUNT(*) from YOUR_TABLE",
|
|
792
822
|
data: []
|
|
793
823
|
}, k = {
|
|
794
|
-
id:
|
|
824
|
+
id: Je(),
|
|
795
825
|
cards: [f],
|
|
796
826
|
activeCardId: f.id
|
|
797
827
|
};
|
|
@@ -801,14 +831,14 @@ function al() {
|
|
|
801
831
|
};
|
|
802
832
|
async function v() {
|
|
803
833
|
if (d(!0), !a || !n) return;
|
|
804
|
-
const f =
|
|
834
|
+
const f = Ma(
|
|
805
835
|
l
|
|
806
|
-
), k = JSON.stringify(f),
|
|
836
|
+
), k = JSON.stringify(f), M = {
|
|
807
837
|
...n,
|
|
808
838
|
template: k,
|
|
809
839
|
filterValues: p
|
|
810
840
|
};
|
|
811
|
-
await ks(
|
|
841
|
+
await ks(M, s == null ? void 0 : s.accessToken), Ke.success("Lens saved"), g == null || g(f), d(!1);
|
|
812
842
|
}
|
|
813
843
|
return u ? null : /* @__PURE__ */ e.jsxs(
|
|
814
844
|
"div",
|
|
@@ -818,58 +848,59 @@ function al() {
|
|
|
818
848
|
children: [
|
|
819
849
|
!u && /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ e.jsx(R, { children: n == null ? void 0 : n.name }) }),
|
|
820
850
|
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
|
|
821
|
-
|
|
822
|
-
!u && S && /* @__PURE__ */ e.jsx(sl, {}),
|
|
851
|
+
/* @__PURE__ */ e.jsx(tl, {}),
|
|
852
|
+
o && !u && S && /* @__PURE__ */ e.jsx(sl, {}),
|
|
853
|
+
!u && S && /* @__PURE__ */ e.jsx(al, {}),
|
|
823
854
|
o && !u && /* @__PURE__ */ e.jsxs(
|
|
824
|
-
|
|
855
|
+
z,
|
|
825
856
|
{
|
|
826
857
|
variant: "secondary",
|
|
827
858
|
className: "h-7 p-2",
|
|
828
859
|
size: "sm",
|
|
829
860
|
disabled: !o,
|
|
830
|
-
onClick:
|
|
861
|
+
onClick: L,
|
|
831
862
|
children: [
|
|
832
|
-
/* @__PURE__ */ e.jsx(
|
|
863
|
+
/* @__PURE__ */ e.jsx(Ds, { className: "mr-2 h-4 w-4", strokeWidth: 1.5 }),
|
|
833
864
|
"Frame"
|
|
834
865
|
]
|
|
835
866
|
}
|
|
836
867
|
),
|
|
837
868
|
!o && /* @__PURE__ */ e.jsx(
|
|
838
|
-
|
|
869
|
+
z,
|
|
839
870
|
{
|
|
840
871
|
variant: "ghost",
|
|
841
872
|
className: "h-7 p-2",
|
|
842
873
|
onClick: h,
|
|
843
874
|
size: "sm",
|
|
844
|
-
children: /* @__PURE__ */ e.jsx(
|
|
875
|
+
children: /* @__PURE__ */ e.jsx(Ta, { className: "h-4 w-4", strokeWidth: 1.5 })
|
|
845
876
|
}
|
|
846
877
|
),
|
|
847
878
|
o && !u && /* @__PURE__ */ e.jsx(
|
|
848
|
-
|
|
879
|
+
z,
|
|
849
880
|
{
|
|
850
881
|
variant: "ghost",
|
|
851
882
|
role: "close",
|
|
852
883
|
className: "h-7 p-2",
|
|
853
884
|
onClick: () => {
|
|
854
|
-
C(!1),
|
|
885
|
+
C(!1), T(!1);
|
|
855
886
|
},
|
|
856
887
|
size: "sm",
|
|
857
|
-
children: /* @__PURE__ */ e.jsx(
|
|
888
|
+
children: /* @__PURE__ */ e.jsx(Qe, { className: "h-4 w-4", strokeWidth: 1.5 })
|
|
858
889
|
}
|
|
859
890
|
),
|
|
860
891
|
o && !u && S && /* @__PURE__ */ e.jsx(
|
|
861
|
-
|
|
892
|
+
z,
|
|
862
893
|
{
|
|
863
894
|
className: "h-7 p-2",
|
|
864
895
|
variant: "ghost",
|
|
865
896
|
disabled: c,
|
|
866
897
|
onClick: v,
|
|
867
898
|
size: "sm",
|
|
868
|
-
children: /* @__PURE__ */ e.jsx(
|
|
899
|
+
children: /* @__PURE__ */ e.jsx(Bn, { className: "h-4 w-4", strokeWidth: 1.5 })
|
|
869
900
|
}
|
|
870
901
|
),
|
|
871
902
|
!y && !u && o && /* @__PURE__ */ e.jsx(
|
|
872
|
-
|
|
903
|
+
z,
|
|
873
904
|
{
|
|
874
905
|
className: "h-7 p-2",
|
|
875
906
|
variant: "ghost",
|
|
@@ -885,14 +916,14 @@ function al() {
|
|
|
885
916
|
}
|
|
886
917
|
);
|
|
887
918
|
}
|
|
888
|
-
function
|
|
919
|
+
function Pe({
|
|
889
920
|
title: s,
|
|
890
921
|
items: t,
|
|
891
922
|
value: a,
|
|
892
923
|
isLoading: n,
|
|
893
924
|
isError: l,
|
|
894
925
|
connectionTooltip: o,
|
|
895
|
-
onChange:
|
|
926
|
+
onChange: r,
|
|
896
927
|
showNone: c = !1,
|
|
897
928
|
className: d,
|
|
898
929
|
showIcon: p = !0,
|
|
@@ -901,22 +932,22 @@ function $e({
|
|
|
901
932
|
const y = n ? "Loading..." : l ? "Error" : a;
|
|
902
933
|
function g() {
|
|
903
934
|
if (s === "Connection")
|
|
904
|
-
return /* @__PURE__ */ e.jsx(
|
|
935
|
+
return /* @__PURE__ */ e.jsx(Pn, { className: "size-4 rotate-90" });
|
|
905
936
|
if (s === "Database")
|
|
906
|
-
return /* @__PURE__ */ e.jsx(
|
|
937
|
+
return /* @__PURE__ */ e.jsx(zn, { className: "size-4" });
|
|
907
938
|
if (s === "Schema")
|
|
908
|
-
return /* @__PURE__ */ e.jsx(
|
|
939
|
+
return /* @__PURE__ */ e.jsx(Hn, { className: "size-4" });
|
|
909
940
|
if (s === "Table")
|
|
910
941
|
return /* @__PURE__ */ e.jsx(As, { className: "size-4" });
|
|
911
942
|
if (s === "Model")
|
|
912
|
-
return /* @__PURE__ */ e.jsx(
|
|
943
|
+
return /* @__PURE__ */ e.jsx(Sn, { className: "size-4" });
|
|
913
944
|
}
|
|
914
945
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
915
946
|
p && /* @__PURE__ */ e.jsx("div", { className: "shrink-0", children: o ? /* @__PURE__ */ e.jsxs(da, { children: [
|
|
916
|
-
/* @__PURE__ */ e.jsx(
|
|
947
|
+
/* @__PURE__ */ e.jsx(rt, { children: g() }),
|
|
917
948
|
/* @__PURE__ */ e.jsx(ua, { className: "text-xs", align: "start", children: o })
|
|
918
949
|
] }) : g() }),
|
|
919
|
-
/* @__PURE__ */ e.jsxs(me, { disabled: u, value: y, onValueChange:
|
|
950
|
+
/* @__PURE__ */ e.jsxs(me, { disabled: u, value: y, onValueChange: r, children: [
|
|
920
951
|
/* @__PURE__ */ e.jsx(
|
|
921
952
|
he,
|
|
922
953
|
{
|
|
@@ -943,17 +974,17 @@ function $e({
|
|
|
943
974
|
] })
|
|
944
975
|
] });
|
|
945
976
|
}
|
|
946
|
-
function
|
|
977
|
+
function ll({ column: s }) {
|
|
947
978
|
const [t, a] = q(!1), n = m((x) => x.selectedTableName), l = m(
|
|
948
979
|
(x) => x.selectedSchemaName
|
|
949
980
|
), o = m(
|
|
950
981
|
(x) => x.selectedDatamodelId
|
|
951
|
-
),
|
|
982
|
+
), r = m((x) => x.sqlGen), { modelItems: c } = Re(), d = m((x) => x.actions.setSqlGen), p = m((x) => x.actions.setCardSql), u = m((x) => x.actions.setRunSql);
|
|
952
983
|
function y(x, j) {
|
|
953
|
-
var
|
|
954
|
-
const b = ma(x,
|
|
984
|
+
var T;
|
|
985
|
+
const b = ma(x, r, j), I = (T = c == null ? void 0 : c.find(
|
|
955
986
|
(F) => F.id === o
|
|
956
|
-
)) == null ? void 0 :
|
|
987
|
+
)) == null ? void 0 : T.name;
|
|
957
988
|
d(b);
|
|
958
989
|
const C = ha(
|
|
959
990
|
b,
|
|
@@ -1021,17 +1052,17 @@ function tl({ column: s }) {
|
|
|
1021
1052
|
}
|
|
1022
1053
|
function Ea({ column: s }) {
|
|
1023
1054
|
return /* @__PURE__ */ e.jsxs(da, { children: [
|
|
1024
|
-
/* @__PURE__ */ e.jsx(
|
|
1055
|
+
/* @__PURE__ */ e.jsx(it, { asChild: !0, children: ot.includes(s.data_type.toLowerCase()) ? (
|
|
1025
1056
|
// <span className=" font-thin">T</span>
|
|
1026
1057
|
/* @__PURE__ */ e.jsx(Us, { className: "size-3" })
|
|
1027
1058
|
) : xa.includes(s.data_type.toLowerCase()) ? (
|
|
1028
1059
|
//
|
|
1029
1060
|
/* @__PURE__ */ e.jsx(Mn, { className: "size-3" })
|
|
1030
|
-
) :
|
|
1061
|
+
) : ct.includes(s.data_type.toLowerCase()) ? /* @__PURE__ */ e.jsx(dt, { className: "size-3" }) : ut.includes(s.data_type.toLowerCase()) ? /* @__PURE__ */ e.jsx(Kn, { className: "size-3" }) : /* @__PURE__ */ e.jsx(Un, { className: "size-3" }) }),
|
|
1031
1062
|
/* @__PURE__ */ e.jsx(ua, { children: /* @__PURE__ */ e.jsx("p", { className: "font-mono text-xs", children: s.data_type }) })
|
|
1032
1063
|
] });
|
|
1033
1064
|
}
|
|
1034
|
-
function
|
|
1065
|
+
function rl({
|
|
1035
1066
|
schemaName: s,
|
|
1036
1067
|
tableName: t,
|
|
1037
1068
|
columns: a,
|
|
@@ -1039,24 +1070,24 @@ function nl({
|
|
|
1039
1070
|
}) {
|
|
1040
1071
|
const l = m((h) => h.sqlGen), o = m(
|
|
1041
1072
|
(h) => h.selectedConnectionId
|
|
1042
|
-
),
|
|
1073
|
+
), r = m(
|
|
1043
1074
|
(h) => h.selectedDatabaseName
|
|
1044
1075
|
), c = m(
|
|
1045
1076
|
(h) => h.selectedSchemaName
|
|
1046
1077
|
), d = m((h) => h.selectedTableName), p = m(
|
|
1047
1078
|
(h) => h.selectedDatamodelId
|
|
1048
|
-
), u =
|
|
1079
|
+
), u = O(
|
|
1049
1080
|
(h) => h.dashboard.aiScopeTables
|
|
1050
|
-
), { setAIScopeTables: y } =
|
|
1081
|
+
), { setAIScopeTables: y } = O((h) => h.actions), g = m((h) => h.actions.setRunSql), x = m((h) => h.actions.setSqlGen), j = m(
|
|
1051
1082
|
(h) => h.actions.setIsShowingVisual
|
|
1052
|
-
), b = m((h) => h.actions.setCardSql), { connectionType: I, modelItems: C } =
|
|
1053
|
-
function
|
|
1054
|
-
var
|
|
1083
|
+
), b = m((h) => h.actions.setCardSql), { connectionType: I, modelItems: C } = Re();
|
|
1084
|
+
function T(h) {
|
|
1085
|
+
var M;
|
|
1055
1086
|
const v = ma(h, l);
|
|
1056
1087
|
x(v);
|
|
1057
|
-
const f = (
|
|
1088
|
+
const f = (M = C == null ? void 0 : C.find(
|
|
1058
1089
|
(H) => H.id === p
|
|
1059
|
-
)) == null ? void 0 :
|
|
1090
|
+
)) == null ? void 0 : M.name, k = ha(v, de(s), de(t), f);
|
|
1060
1091
|
k && (b(k), g(!0));
|
|
1061
1092
|
}
|
|
1062
1093
|
function F() {
|
|
@@ -1069,15 +1100,15 @@ function nl({
|
|
|
1069
1100
|
const v = {
|
|
1070
1101
|
connectinonId: o,
|
|
1071
1102
|
connectionType: I,
|
|
1072
|
-
databaseName:
|
|
1103
|
+
databaseName: r,
|
|
1073
1104
|
schemaName: c,
|
|
1074
1105
|
tableName: d
|
|
1075
1106
|
}, k = [...u || [], v].filter(
|
|
1076
|
-
(
|
|
1077
|
-
(Y) => Y.connectinonId ===
|
|
1107
|
+
(M, H, P) => P.findIndex(
|
|
1108
|
+
(Y) => Y.connectinonId === M.connectinonId && Y.tableName === M.tableName
|
|
1078
1109
|
) === H
|
|
1079
1110
|
);
|
|
1080
|
-
y(k),
|
|
1111
|
+
y(k), Ke.success(`Added '${d}' to AI Scope`, {
|
|
1081
1112
|
position: "top-right",
|
|
1082
1113
|
duration: 2500,
|
|
1083
1114
|
richColors: !0
|
|
@@ -1086,7 +1117,7 @@ function nl({
|
|
|
1086
1117
|
const v = (u || []).filter(
|
|
1087
1118
|
(f) => f.connectinonId !== o && f.tableName !== d
|
|
1088
1119
|
);
|
|
1089
|
-
y(v),
|
|
1120
|
+
y(v), Ke(`Removed '${d}' from AI Scope`, {
|
|
1090
1121
|
position: "top-right",
|
|
1091
1122
|
duration: 2e3,
|
|
1092
1123
|
richColors: !0
|
|
@@ -1094,11 +1125,11 @@ function nl({
|
|
|
1094
1125
|
}
|
|
1095
1126
|
}
|
|
1096
1127
|
function N() {
|
|
1097
|
-
var
|
|
1128
|
+
var M;
|
|
1098
1129
|
let h = fa(s, t);
|
|
1099
|
-
const v = (
|
|
1130
|
+
const v = (M = C == null ? void 0 : C.find(
|
|
1100
1131
|
(H) => H.id === p
|
|
1101
|
-
)) == null ? void 0 :
|
|
1132
|
+
)) == null ? void 0 : M.name;
|
|
1102
1133
|
console.log("modelName", v), p && p !== "none" && (h = `${ys}.${v}`);
|
|
1103
1134
|
let f = h;
|
|
1104
1135
|
return ((H) => /[A-Z]/.test(H))(t) && (f = f.split(".").map((P) => `"${P}"`).join(".")), f;
|
|
@@ -1109,7 +1140,7 @@ function nl({
|
|
|
1109
1140
|
const v = I === "MSSQL" ? `SELECT top 10 * FROM ${h}` : `SELECT * FROM ${h} LIMIT 10`;
|
|
1110
1141
|
b(v), g(!0);
|
|
1111
1142
|
}
|
|
1112
|
-
function
|
|
1143
|
+
function L() {
|
|
1113
1144
|
const h = N();
|
|
1114
1145
|
b(`SELECT COUNT(*) as count FROM ${h}`), g(!0);
|
|
1115
1146
|
}
|
|
@@ -1124,7 +1155,7 @@ function nl({
|
|
|
1124
1155
|
variant: "outline",
|
|
1125
1156
|
className: "h-9 px-2",
|
|
1126
1157
|
children: /* @__PURE__ */ e.jsx(
|
|
1127
|
-
|
|
1158
|
+
mt,
|
|
1128
1159
|
{
|
|
1129
1160
|
className: W("size-4", {
|
|
1130
1161
|
"text-primary": F(),
|
|
@@ -1135,7 +1166,7 @@ function nl({
|
|
|
1135
1166
|
}
|
|
1136
1167
|
),
|
|
1137
1168
|
/* @__PURE__ */ e.jsxs(
|
|
1138
|
-
|
|
1169
|
+
z,
|
|
1139
1170
|
{
|
|
1140
1171
|
disabled: n !== "Success",
|
|
1141
1172
|
onClick: S,
|
|
@@ -1143,21 +1174,21 @@ function nl({
|
|
|
1143
1174
|
variant: "secondary",
|
|
1144
1175
|
className: "flex",
|
|
1145
1176
|
children: [
|
|
1146
|
-
n !== "Success" ? /* @__PURE__ */ e.jsx(
|
|
1177
|
+
n !== "Success" ? /* @__PURE__ */ e.jsx(Ve, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(Qn, { className: "mr-2 size-4" }),
|
|
1147
1178
|
"Top 10"
|
|
1148
1179
|
]
|
|
1149
1180
|
}
|
|
1150
1181
|
),
|
|
1151
1182
|
/* @__PURE__ */ e.jsxs(
|
|
1152
|
-
|
|
1183
|
+
z,
|
|
1153
1184
|
{
|
|
1154
1185
|
disabled: n !== "Success",
|
|
1155
|
-
onClick:
|
|
1186
|
+
onClick: L,
|
|
1156
1187
|
size: "sm",
|
|
1157
1188
|
variant: "secondary",
|
|
1158
1189
|
className: "flex",
|
|
1159
1190
|
children: [
|
|
1160
|
-
n !== "Success" ? /* @__PURE__ */ e.jsx(
|
|
1191
|
+
n !== "Success" ? /* @__PURE__ */ e.jsx(Ve, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(Gn, { className: "mr-2 size-4" }),
|
|
1161
1192
|
"Count"
|
|
1162
1193
|
]
|
|
1163
1194
|
}
|
|
@@ -1171,11 +1202,11 @@ function nl({
|
|
|
1171
1202
|
a == null ? void 0 : a.map((h) => /* @__PURE__ */ e.jsxs(
|
|
1172
1203
|
"div",
|
|
1173
1204
|
{
|
|
1174
|
-
onClick: () =>
|
|
1205
|
+
onClick: () => T(h),
|
|
1175
1206
|
className: W(
|
|
1176
1207
|
"group mx-3 flex cursor-pointer items-center justify-between rounded px-2 py-[6px] text-sm transition-colors hover:bg-muted/50",
|
|
1177
1208
|
{
|
|
1178
|
-
"bg-muted":
|
|
1209
|
+
"bg-muted": ht(h, l)
|
|
1179
1210
|
}
|
|
1180
1211
|
),
|
|
1181
1212
|
children: [
|
|
@@ -1188,7 +1219,7 @@ function nl({
|
|
|
1188
1219
|
{
|
|
1189
1220
|
onClick: (v) => v.stopPropagation(),
|
|
1190
1221
|
className: "flex items-center justify-end",
|
|
1191
|
-
children: xa.includes(h.data_type) && /* @__PURE__ */ e.jsx(
|
|
1222
|
+
children: xa.includes(h.data_type) && /* @__PURE__ */ e.jsx(ll, { column: h })
|
|
1192
1223
|
}
|
|
1193
1224
|
)
|
|
1194
1225
|
]
|
|
@@ -1202,38 +1233,38 @@ function nl({
|
|
|
1202
1233
|
)
|
|
1203
1234
|
] });
|
|
1204
1235
|
}
|
|
1205
|
-
function
|
|
1236
|
+
function Re(s, t) {
|
|
1206
1237
|
var Xe, Ze, es, ss, as;
|
|
1207
1238
|
let a = Ss(() => [], []);
|
|
1208
|
-
const n =
|
|
1209
|
-
(
|
|
1239
|
+
const n = ke().authToken || s, l = m(
|
|
1240
|
+
(i) => i.selectedConnectionId
|
|
1210
1241
|
), o = m(
|
|
1211
|
-
(
|
|
1212
|
-
),
|
|
1213
|
-
(
|
|
1242
|
+
(i) => i.selectedDatamodelId
|
|
1243
|
+
), r = m(
|
|
1244
|
+
(i) => i.selectedDatabaseName
|
|
1214
1245
|
), c = m(
|
|
1215
|
-
(
|
|
1216
|
-
), d = m((
|
|
1217
|
-
(
|
|
1246
|
+
(i) => i.selectedSchemaName
|
|
1247
|
+
), d = m((i) => i.selectedTableName), p = m(
|
|
1248
|
+
(i) => i.actions.setCurrentColumns
|
|
1218
1249
|
), u = m(
|
|
1219
|
-
(
|
|
1250
|
+
(i) => i.actions.setSelectedConnectionId
|
|
1220
1251
|
), y = m(
|
|
1221
|
-
(
|
|
1252
|
+
(i) => i.actions.setSelectedDatamodelId
|
|
1222
1253
|
), g = m(
|
|
1223
|
-
(
|
|
1254
|
+
(i) => i.actions.setSelectedDatabaseName
|
|
1224
1255
|
), x = m(
|
|
1225
|
-
(
|
|
1256
|
+
(i) => i.actions.setSelectedSchemaName
|
|
1226
1257
|
), j = m(
|
|
1227
|
-
(
|
|
1228
|
-
), b = m((
|
|
1229
|
-
function I(
|
|
1230
|
-
return l &&
|
|
1258
|
+
(i) => i.actions.setSelectedTableName
|
|
1259
|
+
), b = m((i) => i.actions.setCardSql);
|
|
1260
|
+
function I(i) {
|
|
1261
|
+
return l && r && c && r !== "NA" ? !0 : l && i === "API" ? !1 : !!(l && i === "S3");
|
|
1231
1262
|
}
|
|
1232
|
-
function C(
|
|
1233
|
-
return !!(l &&
|
|
1263
|
+
function C(i) {
|
|
1264
|
+
return !!(l && r && r !== "NA" && c && d || l && (i === "S3" || i === "API") || o && o);
|
|
1234
1265
|
}
|
|
1235
|
-
function
|
|
1236
|
-
return l &&
|
|
1266
|
+
function T(i) {
|
|
1267
|
+
return l && i ? !(i === "API" || i === "S3") : !1;
|
|
1237
1268
|
}
|
|
1238
1269
|
const {
|
|
1239
1270
|
data: F,
|
|
@@ -1241,7 +1272,7 @@ function qe(s, t) {
|
|
|
1241
1272
|
isError: N
|
|
1242
1273
|
} = Ne({
|
|
1243
1274
|
queryKey: ["connections"],
|
|
1244
|
-
queryFn: () =>
|
|
1275
|
+
queryFn: () => Fe(
|
|
1245
1276
|
"https://semaphor.cloud/api/v1/connections",
|
|
1246
1277
|
(n == null ? void 0 : n.accessToken) || ""
|
|
1247
1278
|
),
|
|
@@ -1249,11 +1280,11 @@ function qe(s, t) {
|
|
|
1249
1280
|
// Only fetch if authToken is present
|
|
1250
1281
|
}), {
|
|
1251
1282
|
data: S,
|
|
1252
|
-
isLoading:
|
|
1283
|
+
isLoading: L,
|
|
1253
1284
|
isError: h
|
|
1254
1285
|
} = Ne({
|
|
1255
1286
|
queryKey: ["models", l],
|
|
1256
|
-
queryFn: () =>
|
|
1287
|
+
queryFn: () => Fe(
|
|
1257
1288
|
"https://semaphor.cloud/api/v1/datamodels",
|
|
1258
1289
|
(n == null ? void 0 : n.accessToken) || "",
|
|
1259
1290
|
{
|
|
@@ -1263,23 +1294,23 @@ function qe(s, t) {
|
|
|
1263
1294
|
enabled: !!(n != null && n.accessToken) && !!l
|
|
1264
1295
|
// Only fetch if authToken is present
|
|
1265
1296
|
}), v = F == null ? void 0 : F.connections.find(
|
|
1266
|
-
(
|
|
1297
|
+
(i) => i.id === l
|
|
1267
1298
|
), f = v == null ? void 0 : v.type, k = (v == null ? void 0 : v.type) === "API" || (v == null ? void 0 : v.type) === "S3", {
|
|
1268
|
-
data:
|
|
1299
|
+
data: M,
|
|
1269
1300
|
isLoading: H,
|
|
1270
1301
|
isFetching: P,
|
|
1271
1302
|
isError: Y,
|
|
1272
1303
|
refetch: ie
|
|
1273
1304
|
} = Ne({
|
|
1274
1305
|
queryKey: ["databases", l],
|
|
1275
|
-
queryFn: () =>
|
|
1306
|
+
queryFn: () => Fe(
|
|
1276
1307
|
"https://semaphor.cloud/api/v1/databases",
|
|
1277
1308
|
(n == null ? void 0 : n.accessToken) || "",
|
|
1278
1309
|
{
|
|
1279
1310
|
connection_id: l
|
|
1280
1311
|
}
|
|
1281
1312
|
),
|
|
1282
|
-
enabled:
|
|
1313
|
+
enabled: T(f)
|
|
1283
1314
|
// !!selectedConnectionId && !isNonDbConnection, //currentConnection?.type !== 'API', // Only fetch if connectionId is present
|
|
1284
1315
|
}), {
|
|
1285
1316
|
data: K,
|
|
@@ -1288,20 +1319,20 @@ function qe(s, t) {
|
|
|
1288
1319
|
isError: _,
|
|
1289
1320
|
refetch: ee
|
|
1290
1321
|
} = Ne({
|
|
1291
|
-
queryKey: ["schemas", l,
|
|
1292
|
-
queryFn: () =>
|
|
1322
|
+
queryKey: ["schemas", l, r],
|
|
1323
|
+
queryFn: () => Fe(
|
|
1293
1324
|
"https://semaphor.cloud/api/v1/schemas",
|
|
1294
1325
|
(n == null ? void 0 : n.accessToken) || "",
|
|
1295
1326
|
{
|
|
1296
1327
|
connection_id: l,
|
|
1297
|
-
database_name:
|
|
1328
|
+
database_name: r
|
|
1298
1329
|
}
|
|
1299
1330
|
),
|
|
1300
|
-
enabled: !!l && !!
|
|
1331
|
+
enabled: !!l && !!r && !k && r !== "NA"
|
|
1301
1332
|
//currentConnection?.type !== 'API', // Only fetch if connectionId and database is present
|
|
1302
1333
|
}), {
|
|
1303
1334
|
data: E,
|
|
1304
|
-
isLoading:
|
|
1335
|
+
isLoading: D,
|
|
1305
1336
|
isFetching: se,
|
|
1306
1337
|
isError: $,
|
|
1307
1338
|
refetch: X
|
|
@@ -1309,41 +1340,41 @@ function qe(s, t) {
|
|
|
1309
1340
|
queryKey: [
|
|
1310
1341
|
"tables",
|
|
1311
1342
|
l,
|
|
1312
|
-
|
|
1343
|
+
r,
|
|
1313
1344
|
c
|
|
1314
1345
|
],
|
|
1315
|
-
queryFn: () =>
|
|
1346
|
+
queryFn: () => Fe(
|
|
1316
1347
|
"https://semaphor.cloud/api/v1/tables",
|
|
1317
1348
|
(n == null ? void 0 : n.accessToken) || "",
|
|
1318
1349
|
{
|
|
1319
1350
|
connection_id: l,
|
|
1320
|
-
database_name:
|
|
1351
|
+
database_name: r,
|
|
1321
1352
|
schema_name: c
|
|
1322
1353
|
}
|
|
1323
1354
|
),
|
|
1324
1355
|
enabled: I(f)
|
|
1325
1356
|
}), {
|
|
1326
1357
|
data: te,
|
|
1327
|
-
isLoading:
|
|
1328
|
-
isFetching:
|
|
1358
|
+
isLoading: Le,
|
|
1359
|
+
isFetching: Oe,
|
|
1329
1360
|
isError: be
|
|
1330
1361
|
} = Ne({
|
|
1331
1362
|
queryKey: [
|
|
1332
1363
|
"columns",
|
|
1333
1364
|
l,
|
|
1334
|
-
|
|
1365
|
+
r,
|
|
1335
1366
|
o,
|
|
1336
1367
|
c,
|
|
1337
1368
|
d
|
|
1338
1369
|
],
|
|
1339
|
-
queryFn: () =>
|
|
1370
|
+
queryFn: () => Fe(
|
|
1340
1371
|
"https://semaphor.cloud/api/v1/columns",
|
|
1341
1372
|
(n == null ? void 0 : n.accessToken) || "",
|
|
1342
1373
|
{
|
|
1343
1374
|
connection_id: l,
|
|
1344
1375
|
datamodel_id: o || "",
|
|
1345
1376
|
// don't pass undefined. Pass empty string
|
|
1346
|
-
database_name:
|
|
1377
|
+
database_name: r,
|
|
1347
1378
|
schema_name: c,
|
|
1348
1379
|
table_name: d
|
|
1349
1380
|
}
|
|
@@ -1369,47 +1400,47 @@ function qe(s, t) {
|
|
|
1369
1400
|
v
|
|
1370
1401
|
]);
|
|
1371
1402
|
const ye = (v == null ? void 0 : v.type) === "API" ? (Xe = v == null ? void 0 : v.type) == null ? void 0 : Xe.toLowerCase() : d || "", Q = k ? "" : c || "";
|
|
1372
|
-
function oe(
|
|
1373
|
-
x(
|
|
1403
|
+
function oe(i) {
|
|
1404
|
+
x(i), j("");
|
|
1374
1405
|
}
|
|
1375
|
-
function ce(
|
|
1376
|
-
g(
|
|
1406
|
+
function ce(i) {
|
|
1407
|
+
g(i === "none" ? "" : i), x(""), j(""), i !== "none" && i !== "" && y("");
|
|
1377
1408
|
}
|
|
1378
|
-
function
|
|
1379
|
-
u(
|
|
1409
|
+
function ze(i) {
|
|
1410
|
+
u(i);
|
|
1380
1411
|
}
|
|
1381
|
-
function
|
|
1382
|
-
y(
|
|
1412
|
+
function Me(i) {
|
|
1413
|
+
y(i === "none" ? "" : i), i !== "none" && i !== "" && g("");
|
|
1383
1414
|
}
|
|
1384
|
-
|
|
1385
|
-
...
|
|
1386
|
-
data_type:
|
|
1415
|
+
M && ((Ze = M == null ? void 0 : M.databases) == null ? void 0 : Ze.length) > 0, K && ((es = K == null ? void 0 : K.schemas) == null ? void 0 : es.length) > 0, te && ((ss = te == null ? void 0 : te.columns) == null ? void 0 : ss.length) > 0 && (a = te.columns.map((i) => ({
|
|
1416
|
+
...i,
|
|
1417
|
+
data_type: i.data_type.toLowerCase()
|
|
1387
1418
|
}))), Y && (a = []), (be || N) && (a = []);
|
|
1388
|
-
const
|
|
1389
|
-
(
|
|
1390
|
-
id:
|
|
1391
|
-
name:
|
|
1392
|
-
type:
|
|
1419
|
+
const He = F == null ? void 0 : F.connections.map(
|
|
1420
|
+
(i) => ({
|
|
1421
|
+
id: i.id,
|
|
1422
|
+
name: i.name,
|
|
1423
|
+
type: i.type
|
|
1393
1424
|
})
|
|
1394
|
-
),
|
|
1395
|
-
id:
|
|
1396
|
-
name:
|
|
1397
|
-
})), Ee =
|
|
1398
|
-
id:
|
|
1399
|
-
name:
|
|
1400
|
-
})), gs = K == null ? void 0 : K.schemas.map((
|
|
1401
|
-
id:
|
|
1402
|
-
name:
|
|
1403
|
-
})), Ye = E == null ? void 0 : E.tables.map((
|
|
1404
|
-
id:
|
|
1405
|
-
name:
|
|
1425
|
+
), $e = (as = S == null ? void 0 : S.datamodels) == null ? void 0 : as.map((i) => ({
|
|
1426
|
+
id: i.id,
|
|
1427
|
+
name: i.name
|
|
1428
|
+
})), Ee = M == null ? void 0 : M.databases.map((i) => ({
|
|
1429
|
+
id: i.database_name,
|
|
1430
|
+
name: i.database_name
|
|
1431
|
+
})), gs = K == null ? void 0 : K.schemas.map((i) => ({
|
|
1432
|
+
id: i.schema_name,
|
|
1433
|
+
name: i.schema_name
|
|
1434
|
+
})), Ye = E == null ? void 0 : E.tables.map((i) => ({
|
|
1435
|
+
id: i.table_name,
|
|
1436
|
+
name: i.table_name
|
|
1406
1437
|
}));
|
|
1407
1438
|
return {
|
|
1408
|
-
connectionItems:
|
|
1439
|
+
connectionItems: He,
|
|
1409
1440
|
isConnectionsLoading: A,
|
|
1410
1441
|
isConnectionsError: N,
|
|
1411
|
-
modelItems:
|
|
1412
|
-
isModelsLoading:
|
|
1442
|
+
modelItems: $e,
|
|
1443
|
+
isModelsLoading: L,
|
|
1413
1444
|
isModelsError: h,
|
|
1414
1445
|
databaseItems: Ee,
|
|
1415
1446
|
isDatabasesLoadingOrFetching: H || P,
|
|
@@ -1418,17 +1449,17 @@ function qe(s, t) {
|
|
|
1418
1449
|
isSchemaLoadingOrFetching: ae || w,
|
|
1419
1450
|
isSchemaError: _,
|
|
1420
1451
|
tableItems: Ye,
|
|
1421
|
-
isTableLoadingOrFetching:
|
|
1452
|
+
isTableLoadingOrFetching: D || se,
|
|
1422
1453
|
isTableError: $,
|
|
1423
1454
|
columns: a,
|
|
1424
|
-
isColumnsLoadingOrFetching:
|
|
1455
|
+
isColumnsLoadingOrFetching: Le || Oe,
|
|
1425
1456
|
isColumnsError: be,
|
|
1426
1457
|
isNonDbConnection: k,
|
|
1427
1458
|
connectionType: f,
|
|
1428
1459
|
tableName: ye,
|
|
1429
1460
|
schemaName: Q,
|
|
1430
|
-
handleConnectionChange:
|
|
1431
|
-
handleDatamodelChange:
|
|
1461
|
+
handleConnectionChange: ze,
|
|
1462
|
+
handleDatamodelChange: Me,
|
|
1432
1463
|
handleDatabaseChange: ce,
|
|
1433
1464
|
handleSchemaChange: oe
|
|
1434
1465
|
};
|
|
@@ -1445,7 +1476,7 @@ function Aa({
|
|
|
1445
1476
|
($) => $.selectedDatabaseName
|
|
1446
1477
|
), l = m(
|
|
1447
1478
|
($) => $.selectedSchemaName
|
|
1448
|
-
), o = m(($) => $.selectedTableName),
|
|
1479
|
+
), o = m(($) => $.selectedTableName), r = m(
|
|
1449
1480
|
($) => $.actions.setSelectedTableName
|
|
1450
1481
|
), {
|
|
1451
1482
|
connectionItems: c,
|
|
@@ -1459,25 +1490,25 @@ function Aa({
|
|
|
1459
1490
|
isConnectionsError: b,
|
|
1460
1491
|
isModelsError: I,
|
|
1461
1492
|
isDatabasesLoadingOrFetching: C,
|
|
1462
|
-
isDatabaseError:
|
|
1493
|
+
isDatabaseError: T,
|
|
1463
1494
|
isSchemaLoadingOrFetching: F,
|
|
1464
1495
|
isSchemaError: A,
|
|
1465
1496
|
isColumnsError: N,
|
|
1466
1497
|
isColumnsLoadingOrFetching: S,
|
|
1467
|
-
isTableLoadingOrFetching:
|
|
1498
|
+
isTableLoadingOrFetching: L,
|
|
1468
1499
|
isTableError: h,
|
|
1469
1500
|
connectionType: v,
|
|
1470
1501
|
isNonDbConnection: f,
|
|
1471
1502
|
handleConnectionChange: k,
|
|
1472
|
-
handleDatabaseChange:
|
|
1503
|
+
handleDatabaseChange: M,
|
|
1473
1504
|
handleSchemaChange: H,
|
|
1474
1505
|
handleDatamodelChange: P,
|
|
1475
1506
|
tableName: Y,
|
|
1476
1507
|
schemaName: ie
|
|
1477
|
-
} =
|
|
1508
|
+
} = Re();
|
|
1478
1509
|
function K() {
|
|
1479
1510
|
return s ? s(ie, Y, g) : /* @__PURE__ */ e.jsx(
|
|
1480
|
-
|
|
1511
|
+
rl,
|
|
1481
1512
|
{
|
|
1482
1513
|
schemaName: ie,
|
|
1483
1514
|
tableName: Y,
|
|
@@ -1493,11 +1524,11 @@ function Aa({
|
|
|
1493
1524
|
if (!t || v === "S3" || v === "API") return null;
|
|
1494
1525
|
if (!a || a === "none")
|
|
1495
1526
|
return /* @__PURE__ */ e.jsx(
|
|
1496
|
-
|
|
1527
|
+
Pe,
|
|
1497
1528
|
{
|
|
1498
1529
|
showNone: !0,
|
|
1499
|
-
onChange:
|
|
1500
|
-
isError:
|
|
1530
|
+
onChange: M,
|
|
1531
|
+
isError: T,
|
|
1501
1532
|
isLoading: C,
|
|
1502
1533
|
items: u,
|
|
1503
1534
|
value: n || "",
|
|
@@ -1517,7 +1548,7 @@ function Aa({
|
|
|
1517
1548
|
if (!t || v === "S3" || v === "API") return null;
|
|
1518
1549
|
if (!n || n === "none")
|
|
1519
1550
|
return /* @__PURE__ */ e.jsx(
|
|
1520
|
-
|
|
1551
|
+
Pe,
|
|
1521
1552
|
{
|
|
1522
1553
|
showNone: !0,
|
|
1523
1554
|
onChange: P,
|
|
@@ -1531,7 +1562,7 @@ function Aa({
|
|
|
1531
1562
|
}
|
|
1532
1563
|
function E() {
|
|
1533
1564
|
return !t || v === "S3" || v === "API" || !n || n === "none" ? null : /* @__PURE__ */ e.jsx(
|
|
1534
|
-
|
|
1565
|
+
Pe,
|
|
1535
1566
|
{
|
|
1536
1567
|
onChange: H,
|
|
1537
1568
|
isError: A,
|
|
@@ -1542,18 +1573,18 @@ function Aa({
|
|
|
1542
1573
|
}
|
|
1543
1574
|
);
|
|
1544
1575
|
}
|
|
1545
|
-
function
|
|
1576
|
+
function D() {
|
|
1546
1577
|
function $() {
|
|
1547
1578
|
let X = !1;
|
|
1548
1579
|
return v === "API" ? (X = !1, X) : ((v === "S3" || t && n && n !== "none" && l) && (X = !0), X);
|
|
1549
1580
|
}
|
|
1550
1581
|
return $() ? /* @__PURE__ */ e.jsx(
|
|
1551
|
-
|
|
1582
|
+
Pe,
|
|
1552
1583
|
{
|
|
1553
|
-
onChange:
|
|
1584
|
+
onChange: r,
|
|
1554
1585
|
isError: h,
|
|
1555
1586
|
items: y,
|
|
1556
|
-
isLoading:
|
|
1587
|
+
isLoading: L,
|
|
1557
1588
|
value: o || "",
|
|
1558
1589
|
title: "Table"
|
|
1559
1590
|
}
|
|
@@ -1562,7 +1593,7 @@ function Aa({
|
|
|
1562
1593
|
return /* @__PURE__ */ e.jsxs("aside", { className: "xbg-red-100 flex grow flex-col justify-between", children: [
|
|
1563
1594
|
/* @__PURE__ */ e.jsxs("section", { className: "space-y-3 px-6 py-4", children: [
|
|
1564
1595
|
/* @__PURE__ */ e.jsx(
|
|
1565
|
-
|
|
1596
|
+
Pe,
|
|
1566
1597
|
{
|
|
1567
1598
|
items: c,
|
|
1568
1599
|
title: "Connection",
|
|
@@ -1579,48 +1610,48 @@ function Aa({
|
|
|
1579
1610
|
_(),
|
|
1580
1611
|
w(),
|
|
1581
1612
|
E(),
|
|
1582
|
-
|
|
1613
|
+
D()
|
|
1583
1614
|
] }),
|
|
1584
1615
|
K(),
|
|
1585
1616
|
/* @__PURE__ */ e.jsx("div", { className: "flex items-end justify-center gap-2 px-6 py-4", children: /* @__PURE__ */ e.jsxs(
|
|
1586
|
-
|
|
1617
|
+
z,
|
|
1587
1618
|
{
|
|
1588
1619
|
onClick: ae,
|
|
1589
1620
|
size: "sm",
|
|
1590
1621
|
variant: "secondary",
|
|
1591
1622
|
className: "w-full",
|
|
1592
1623
|
children: [
|
|
1593
|
-
/* @__PURE__ */ e.jsx(
|
|
1624
|
+
/* @__PURE__ */ e.jsx(_n, { className: "mr-2 size-4" }),
|
|
1594
1625
|
"Help"
|
|
1595
1626
|
]
|
|
1596
1627
|
}
|
|
1597
1628
|
) })
|
|
1598
1629
|
] });
|
|
1599
1630
|
}
|
|
1600
|
-
function
|
|
1631
|
+
function il(s) {
|
|
1601
1632
|
const t = s.toUpperCase().indexOf("WHERE"), a = s.toUpperCase().indexOf("GROUP BY"), n = s.toUpperCase().indexOf("LIMIT"), l = s.toUpperCase().indexOf("ORDER BY");
|
|
1602
1633
|
let o = s.length;
|
|
1603
1634
|
if (l !== -1 && (o = l), n !== -1 && n < o && (o = n), t !== -1) {
|
|
1604
|
-
const
|
|
1605
|
-
return `${
|
|
1635
|
+
const r = s.substring(0, t), c = s.substring(t);
|
|
1636
|
+
return `${r} {{ filters | where }} AND ${c.substring(
|
|
1606
1637
|
6
|
|
1607
1638
|
)}`;
|
|
1608
1639
|
} else if (a !== -1) {
|
|
1609
|
-
const
|
|
1610
|
-
return `${
|
|
1640
|
+
const r = s.substring(0, a), c = s.substring(a);
|
|
1641
|
+
return `${r} {{ filters | where }} ${c}`;
|
|
1611
1642
|
} else {
|
|
1612
|
-
const
|
|
1613
|
-
return `${
|
|
1643
|
+
const r = s.substring(0, o), c = s.substring(o);
|
|
1644
|
+
return `${r} {{ filters | where }} ${c}`;
|
|
1614
1645
|
}
|
|
1615
1646
|
}
|
|
1616
|
-
function
|
|
1647
|
+
function ol({
|
|
1617
1648
|
error: s,
|
|
1618
1649
|
setShowAIDialog: t,
|
|
1619
1650
|
setUserInputforAI: a,
|
|
1620
1651
|
setTriggerAIRun: n
|
|
1621
1652
|
}) {
|
|
1622
1653
|
return /* @__PURE__ */ e.jsxs(Vs, { openDelay: 0, children: [
|
|
1623
|
-
/* @__PURE__ */ e.jsx(qs, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
1654
|
+
/* @__PURE__ */ e.jsx(qs, { asChild: !0, children: /* @__PURE__ */ e.jsx(z, { variant: "link", className: "h-5 p-0", children: /* @__PURE__ */ e.jsx(kn, { className: "h-4 w-4 text-red-500" }) }) }),
|
|
1624
1655
|
/* @__PURE__ */ e.jsx(
|
|
1625
1656
|
Rs,
|
|
1626
1657
|
{
|
|
@@ -1629,7 +1660,7 @@ function rl({
|
|
|
1629
1660
|
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: [
|
|
1630
1661
|
/* @__PURE__ */ e.jsx(We, { 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 }) }),
|
|
1631
1662
|
/* @__PURE__ */ e.jsxs(
|
|
1632
|
-
|
|
1663
|
+
z,
|
|
1633
1664
|
{
|
|
1634
1665
|
onClick: () => {
|
|
1635
1666
|
t(!0), a(s), n(!0);
|
|
@@ -1637,7 +1668,7 @@ function rl({
|
|
|
1637
1668
|
size: "sm",
|
|
1638
1669
|
variant: "outline",
|
|
1639
1670
|
children: [
|
|
1640
|
-
/* @__PURE__ */ e.jsx(
|
|
1671
|
+
/* @__PURE__ */ e.jsx(Ln, { className: "mr-2 h-4 w-4" }),
|
|
1641
1672
|
"Debug with AI"
|
|
1642
1673
|
]
|
|
1643
1674
|
}
|
|
@@ -1647,7 +1678,7 @@ function rl({
|
|
|
1647
1678
|
)
|
|
1648
1679
|
] });
|
|
1649
1680
|
}
|
|
1650
|
-
const
|
|
1681
|
+
const cl = `
|
|
1651
1682
|
|
|
1652
1683
|
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.
|
|
1653
1684
|
|
|
@@ -1694,7 +1725,7 @@ SELECT label, measure FROM table
|
|
|
1694
1725
|
- Label - Category
|
|
1695
1726
|
- Measure - Number
|
|
1696
1727
|
`;
|
|
1697
|
-
function
|
|
1728
|
+
function dl({
|
|
1698
1729
|
open: s,
|
|
1699
1730
|
setOpen: t,
|
|
1700
1731
|
userInput: a,
|
|
@@ -1702,17 +1733,17 @@ function ol({
|
|
|
1702
1733
|
triggerAIRun: l,
|
|
1703
1734
|
setTriggerAIRun: o
|
|
1704
1735
|
}) {
|
|
1705
|
-
const
|
|
1736
|
+
const r = ws(null), c = ws(null), { authToken: d } = ke(), [p, u] = q(!1), y = m((w) => w.actions.setCardSql), g = O((w) => w.dashboard.baseQueries), x = m((w) => w.actions.setRunSql), j = m((w) => w.actions.setCardType), [b, I] = q([]), C = m((w) => w.currentColumns), T = m((w) => w.card.sql), F = m((w) => w.selectedTableName), A = `
|
|
1706
1737
|
${a}
|
|
1707
1738
|
|
|
1708
1739
|
Database Query Dialect: ${F === "api" || F === "s3" ? "DuckDb" : ""}
|
|
1709
1740
|
Table Name: ${F}
|
|
1710
1741
|
Table Columns: ${C == null ? void 0 : C.map((w) => `${w.column_name} | ${w.data_type}`).join(", ")}
|
|
1711
|
-
User SQL: ${
|
|
1742
|
+
User SQL: ${T}
|
|
1712
1743
|
${g && `Base Queries: ${JSON.stringify(g)} `}`, N = ` When the user asks for a specific chart please use the following query structure to generate the chart query. Do not make up the column names. Use only the table columns provided above for the query. Replace x-axis, y-axis, and lables with the appropriate column names.
|
|
1713
|
-
Visual Query Syntax: ${
|
|
1744
|
+
Visual Query Syntax: ${cl}`, { data: S, isLoading: L, isFetching: h, isError: v, refetch: f } = Ne({
|
|
1714
1745
|
queryKey: ["ai-query"],
|
|
1715
|
-
queryFn: () =>
|
|
1746
|
+
queryFn: () => Fe(
|
|
1716
1747
|
"https://semaphor.cloud/api/v1/ai",
|
|
1717
1748
|
(d == null ? void 0 : d.accessToken) || "",
|
|
1718
1749
|
{
|
|
@@ -1751,15 +1782,15 @@ function ol({
|
|
|
1751
1782
|
c.current && (c.current.scroll({
|
|
1752
1783
|
top: c.current.scrollHeight,
|
|
1753
1784
|
behavior: "smooth"
|
|
1754
|
-
}), (_ =
|
|
1785
|
+
}), (_ = r.current) == null || _.focus());
|
|
1755
1786
|
}, 100);
|
|
1756
1787
|
return () => clearTimeout(w);
|
|
1757
1788
|
}, [b]);
|
|
1758
|
-
function
|
|
1789
|
+
function M() {
|
|
1759
1790
|
a && (I((w) => [...w, { role: "user", content: a }]), k(a) && u(!0), n(""), f());
|
|
1760
1791
|
}
|
|
1761
1792
|
Z(() => {
|
|
1762
|
-
l && (
|
|
1793
|
+
l && (M(), o(!1));
|
|
1763
1794
|
}, [l, o]);
|
|
1764
1795
|
const H = {
|
|
1765
1796
|
//seleect a darker color
|
|
@@ -1793,9 +1824,9 @@ function ol({
|
|
|
1793
1824
|
pre: ({ node: w, ..._ }) => /* @__PURE__ */ e.jsxs("pre", { className: "space-y-2 rounded-sm bg-muted/50 p-3", style: P, children: [
|
|
1794
1825
|
/* @__PURE__ */ e.jsx("code", { className: "whitespace-normal text-sm", children: _.children }),
|
|
1795
1826
|
/* @__PURE__ */ e.jsxs("div", { className: "flex justify-start gap-2", children: [
|
|
1796
|
-
/* @__PURE__ */ e.jsx(
|
|
1827
|
+
/* @__PURE__ */ e.jsx(z, { onClick: K, size: "sm", variant: "outline", children: /* @__PURE__ */ e.jsx(ft, {}) }),
|
|
1797
1828
|
/* @__PURE__ */ e.jsx(
|
|
1798
|
-
|
|
1829
|
+
z,
|
|
1799
1830
|
{
|
|
1800
1831
|
onClick: (ee) => {
|
|
1801
1832
|
const E = K(ee);
|
|
@@ -1803,7 +1834,7 @@ function ol({
|
|
|
1803
1834
|
},
|
|
1804
1835
|
size: "sm",
|
|
1805
1836
|
variant: "outline",
|
|
1806
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1837
|
+
children: /* @__PURE__ */ e.jsx(gt, {})
|
|
1807
1838
|
}
|
|
1808
1839
|
)
|
|
1809
1840
|
] })
|
|
@@ -1823,13 +1854,13 @@ function ol({
|
|
|
1823
1854
|
{
|
|
1824
1855
|
className: "flex items-start rounded-md bg-muted p-3 text-sm",
|
|
1825
1856
|
children: [
|
|
1826
|
-
/* @__PURE__ */ e.jsx(
|
|
1857
|
+
/* @__PURE__ */ e.jsx(Wn, { className: "mr-2 h-5 w-5" }),
|
|
1827
1858
|
/* @__PURE__ */ e.jsx("div", { children: w.content })
|
|
1828
1859
|
]
|
|
1829
1860
|
},
|
|
1830
1861
|
_
|
|
1831
1862
|
) : w.role === "ai" ? /* @__PURE__ */ e.jsx(
|
|
1832
|
-
|
|
1863
|
+
pt,
|
|
1833
1864
|
{
|
|
1834
1865
|
className: "w-full overflow-auto py-1",
|
|
1835
1866
|
components: ie,
|
|
@@ -1840,7 +1871,7 @@ function ol({
|
|
|
1840
1871
|
}
|
|
1841
1872
|
return /* @__PURE__ */ e.jsxs(Fs, { open: s, onOpenChange: t, children: [
|
|
1842
1873
|
/* @__PURE__ */ e.jsx(Is, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
1843
|
-
|
|
1874
|
+
z,
|
|
1844
1875
|
{
|
|
1845
1876
|
size: "sm",
|
|
1846
1877
|
className: "w-full justify-start border font-normal text-muted-foreground focus-visible:ring-0 focus-visible:ring-offset-0",
|
|
@@ -1849,12 +1880,12 @@ function ol({
|
|
|
1849
1880
|
}
|
|
1850
1881
|
) }),
|
|
1851
1882
|
/* @__PURE__ */ e.jsxs(
|
|
1852
|
-
|
|
1883
|
+
Ts,
|
|
1853
1884
|
{
|
|
1854
1885
|
className: "flex flex-col justify-between overflow-auto sm:max-w-[425px] md:max-h-[625px] md:min-w-[625px]",
|
|
1855
1886
|
children: [
|
|
1856
|
-
/* @__PURE__ */ e.jsxs(
|
|
1857
|
-
/* @__PURE__ */ e.jsx(
|
|
1887
|
+
/* @__PURE__ */ e.jsxs(Ls, { children: [
|
|
1888
|
+
/* @__PURE__ */ e.jsx(Ms, { children: "Assistant" }),
|
|
1858
1889
|
/* @__PURE__ */ e.jsx(Es, { children: "What can I help you with?" })
|
|
1859
1890
|
] }),
|
|
1860
1891
|
/* @__PURE__ */ e.jsx(
|
|
@@ -1873,9 +1904,9 @@ function ol({
|
|
|
1873
1904
|
ga,
|
|
1874
1905
|
{
|
|
1875
1906
|
autoFocus: !0,
|
|
1876
|
-
ref:
|
|
1907
|
+
ref: r,
|
|
1877
1908
|
onKeyDown: (w) => {
|
|
1878
|
-
w.key === "Enter" && !w.shiftKey && (w.preventDefault(), n(""),
|
|
1909
|
+
w.key === "Enter" && !w.shiftKey && (w.preventDefault(), n(""), M());
|
|
1879
1910
|
},
|
|
1880
1911
|
placeholder: "Type your question here...",
|
|
1881
1912
|
onFocus: (w) => {
|
|
@@ -1885,20 +1916,20 @@ function ol({
|
|
|
1885
1916
|
className: W(
|
|
1886
1917
|
"max-h-10 min-h-7 resize-none border-none focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0"
|
|
1887
1918
|
),
|
|
1888
|
-
disabled:
|
|
1919
|
+
disabled: L || h,
|
|
1889
1920
|
value: a,
|
|
1890
1921
|
onChange: (w) => n(w.target.value)
|
|
1891
1922
|
}
|
|
1892
1923
|
),
|
|
1893
1924
|
" ",
|
|
1894
1925
|
/* @__PURE__ */ e.jsx(
|
|
1895
|
-
|
|
1926
|
+
z,
|
|
1896
1927
|
{
|
|
1897
1928
|
className: "h-8",
|
|
1898
1929
|
size: "sm",
|
|
1899
1930
|
variant: "ghost",
|
|
1900
|
-
onClick:
|
|
1901
|
-
children: !
|
|
1931
|
+
onClick: M,
|
|
1932
|
+
children: !L && !h ? /* @__PURE__ */ e.jsx(xt, {}) : /* @__PURE__ */ e.jsx(Ve, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" })
|
|
1902
1933
|
}
|
|
1903
1934
|
)
|
|
1904
1935
|
] })
|
|
@@ -1915,10 +1946,10 @@ var Va = {
|
|
|
1915
1946
|
className: void 0,
|
|
1916
1947
|
style: void 0,
|
|
1917
1948
|
attr: void 0
|
|
1918
|
-
}, sa = we.createContext && /* @__PURE__ */ we.createContext(Va),
|
|
1919
|
-
function
|
|
1949
|
+
}, sa = we.createContext && /* @__PURE__ */ we.createContext(Va), ul = ["attr", "size", "title"];
|
|
1950
|
+
function ml(s, t) {
|
|
1920
1951
|
if (s == null) return {};
|
|
1921
|
-
var a =
|
|
1952
|
+
var a = hl(s, t), n, l;
|
|
1922
1953
|
if (Object.getOwnPropertySymbols) {
|
|
1923
1954
|
var o = Object.getOwnPropertySymbols(s);
|
|
1924
1955
|
for (l = 0; l < o.length; l++)
|
|
@@ -1926,7 +1957,7 @@ function dl(s, t) {
|
|
|
1926
1957
|
}
|
|
1927
1958
|
return a;
|
|
1928
1959
|
}
|
|
1929
|
-
function
|
|
1960
|
+
function hl(s, t) {
|
|
1930
1961
|
if (s == null) return {};
|
|
1931
1962
|
var a = {};
|
|
1932
1963
|
for (var n in s)
|
|
@@ -1960,21 +1991,21 @@ function ds(s) {
|
|
|
1960
1991
|
for (var t = 1; t < arguments.length; t++) {
|
|
1961
1992
|
var a = arguments[t] != null ? arguments[t] : {};
|
|
1962
1993
|
t % 2 ? aa(Object(a), !0).forEach(function(n) {
|
|
1963
|
-
|
|
1994
|
+
xl(s, n, a[n]);
|
|
1964
1995
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(s, Object.getOwnPropertyDescriptors(a)) : aa(Object(a)).forEach(function(n) {
|
|
1965
1996
|
Object.defineProperty(s, n, Object.getOwnPropertyDescriptor(a, n));
|
|
1966
1997
|
});
|
|
1967
1998
|
}
|
|
1968
1999
|
return s;
|
|
1969
2000
|
}
|
|
1970
|
-
function
|
|
1971
|
-
return t =
|
|
2001
|
+
function xl(s, t, a) {
|
|
2002
|
+
return t = pl(t), t in s ? Object.defineProperty(s, t, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : s[t] = a, s;
|
|
1972
2003
|
}
|
|
1973
|
-
function
|
|
1974
|
-
var t =
|
|
2004
|
+
function pl(s) {
|
|
2005
|
+
var t = fl(s, "string");
|
|
1975
2006
|
return typeof t == "symbol" ? t : t + "";
|
|
1976
2007
|
}
|
|
1977
|
-
function
|
|
2008
|
+
function fl(s, t) {
|
|
1978
2009
|
if (typeof s != "object" || !s) return s;
|
|
1979
2010
|
var a = s[Symbol.toPrimitive];
|
|
1980
2011
|
if (a !== void 0) {
|
|
@@ -1990,22 +2021,22 @@ function qa(s) {
|
|
|
1990
2021
|
}, t.attr), qa(t.child)));
|
|
1991
2022
|
}
|
|
1992
2023
|
function je(s) {
|
|
1993
|
-
return (t) => /* @__PURE__ */ we.createElement(
|
|
2024
|
+
return (t) => /* @__PURE__ */ we.createElement(gl, cs({
|
|
1994
2025
|
attr: ds({}, s.attr)
|
|
1995
2026
|
}, t), qa(s.child));
|
|
1996
2027
|
}
|
|
1997
|
-
function
|
|
2028
|
+
function gl(s) {
|
|
1998
2029
|
var t = (a) => {
|
|
1999
2030
|
var {
|
|
2000
2031
|
attr: n,
|
|
2001
2032
|
size: l,
|
|
2002
2033
|
title: o
|
|
2003
|
-
} = s,
|
|
2034
|
+
} = s, r = ml(s, ul), c = l || a.size || "1em", d;
|
|
2004
2035
|
return a.className && (d = a.className), s.className && (d = (d ? d + " " : "") + s.className), /* @__PURE__ */ we.createElement("svg", cs({
|
|
2005
2036
|
stroke: "currentColor",
|
|
2006
2037
|
fill: "currentColor",
|
|
2007
2038
|
strokeWidth: "0"
|
|
2008
|
-
}, a.attr, n,
|
|
2039
|
+
}, a.attr, n, r, {
|
|
2009
2040
|
className: d,
|
|
2010
2041
|
style: ds(ds({
|
|
2011
2042
|
color: s.color || a.color
|
|
@@ -2017,12 +2048,12 @@ function pl(s) {
|
|
|
2017
2048
|
};
|
|
2018
2049
|
return sa !== void 0 ? /* @__PURE__ */ we.createElement(sa.Consumer, null, (a) => t(a)) : t(Va);
|
|
2019
2050
|
}
|
|
2020
|
-
function
|
|
2051
|
+
function jl(s) {
|
|
2021
2052
|
return je({ 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);
|
|
2022
2053
|
}
|
|
2023
|
-
function
|
|
2054
|
+
function bl({ sql: s }) {
|
|
2024
2055
|
return /* @__PURE__ */ e.jsxs(Vs, { children: [
|
|
2025
|
-
/* @__PURE__ */ e.jsx(qs, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
2056
|
+
/* @__PURE__ */ e.jsx(qs, { asChild: !0, children: /* @__PURE__ */ e.jsx(z, { variant: "link", className: "h-5 p-0", children: /* @__PURE__ */ e.jsx(jt, { className: "h-4 w-4 text-muted-foreground" }) }) }),
|
|
2026
2057
|
/* @__PURE__ */ e.jsx(
|
|
2027
2058
|
Rs,
|
|
2028
2059
|
{
|
|
@@ -2036,65 +2067,65 @@ function gl({ sql: s }) {
|
|
|
2036
2067
|
)
|
|
2037
2068
|
] });
|
|
2038
2069
|
}
|
|
2039
|
-
function
|
|
2070
|
+
function yl() {
|
|
2040
2071
|
const [s, t] = q({
|
|
2041
2072
|
queryKey: [],
|
|
2042
2073
|
queryData: null
|
|
2043
|
-
}), { theme: a } =
|
|
2044
|
-
|
|
2045
|
-
const C = m((
|
|
2046
|
-
|
|
2074
|
+
}), { theme: a } = bt(), n = yt(), l = ws(), o = vt(), [r, c] = q(!1), [d, p] = q(!1), [u, y] = q(!1), [g, x] = q(""), [j, b] = q(!1), I = O((i) => i.selectedSheetId);
|
|
2075
|
+
O((i) => i.dashboard.baseQueries);
|
|
2076
|
+
const C = m((i) => i.card), T = O((i) => i.theme), F = m((i) => i.isShowingVisual);
|
|
2077
|
+
O((i) => i.onAcceptChanges);
|
|
2047
2078
|
const A = m(
|
|
2048
|
-
(
|
|
2079
|
+
(i) => i.selectedConnectionId
|
|
2049
2080
|
), N = m(
|
|
2050
|
-
(
|
|
2081
|
+
(i) => i.selectedDatabaseName
|
|
2051
2082
|
), S = m(
|
|
2052
|
-
(
|
|
2053
|
-
),
|
|
2054
|
-
(
|
|
2083
|
+
(i) => i.selectedDatamodelId
|
|
2084
|
+
), L = m(
|
|
2085
|
+
(i) => i.selectedSchemaName
|
|
2055
2086
|
);
|
|
2056
|
-
|
|
2057
|
-
(
|
|
2087
|
+
O(
|
|
2088
|
+
(i) => i.actions.updateFrameCard
|
|
2058
2089
|
);
|
|
2059
|
-
const h = m((
|
|
2060
|
-
(
|
|
2090
|
+
const h = m((i) => i.selectedTableName), v = m((i) => i.card.sql), f = m((i) => i.card.python), k = m((i) => i.frame), M = O((i) => i.dashboard.filters), H = O((i) => i.filterValues), P = M == null ? void 0 : M.filter(
|
|
2091
|
+
(i) => i.sheetId === I || !i.sheetId
|
|
2061
2092
|
), Y = H == null ? void 0 : H.filter(
|
|
2062
|
-
(
|
|
2063
|
-
), ie = m((
|
|
2093
|
+
(i) => (P == null ? void 0 : P.some((ne) => ne.id === i.filterId)) || i.filterId.endsWith(I)
|
|
2094
|
+
), ie = m((i) => i.applyFilters), {
|
|
2064
2095
|
setCardCustomCfg: K,
|
|
2065
2096
|
setQueryResultColumns: ae,
|
|
2066
2097
|
setFilterValues: w,
|
|
2067
2098
|
setCardSql: _,
|
|
2068
2099
|
setCard: ee,
|
|
2069
2100
|
setCardPython: E,
|
|
2070
|
-
setQueryError:
|
|
2101
|
+
setQueryError: D,
|
|
2071
2102
|
setPythonStdOut: se,
|
|
2072
2103
|
setCardPreferences: $
|
|
2073
|
-
} = m((
|
|
2104
|
+
} = m((i) => i.actions), X = m((i) => i.onSave);
|
|
2074
2105
|
m(
|
|
2075
|
-
(
|
|
2106
|
+
(i) => i.actions.setApplyFilters
|
|
2076
2107
|
);
|
|
2077
|
-
const te = m((
|
|
2078
|
-
m((
|
|
2108
|
+
const te = m((i) => i.onClose), Le = m((i) => i.actions.setSqlGen), Oe = m((i) => i.runSql), be = m((i) => i.actions.setRunSql);
|
|
2109
|
+
m((i) => i.actions.setCardCfg);
|
|
2079
2110
|
const ye = m(
|
|
2080
|
-
(
|
|
2111
|
+
(i) => i.actions.setIsSqlRunning
|
|
2081
2112
|
), {
|
|
2082
2113
|
data: Q,
|
|
2083
2114
|
isLoading: oe,
|
|
2084
2115
|
isFetching: ce,
|
|
2085
|
-
isSuccess:
|
|
2086
|
-
isError:
|
|
2087
|
-
error:
|
|
2088
|
-
queryKey:
|
|
2116
|
+
isSuccess: ze,
|
|
2117
|
+
isError: Me,
|
|
2118
|
+
error: He,
|
|
2119
|
+
queryKey: $e,
|
|
2089
2120
|
refetch: Ee
|
|
2090
|
-
} =
|
|
2121
|
+
} = qe(C);
|
|
2091
2122
|
Z(() => {
|
|
2092
|
-
if (Q && (Q.rowLimitExceeded &&
|
|
2123
|
+
if (Q && (Q.rowLimitExceeded && Ke.error("Row limit (10,000) exceeded. Refine your query.", {
|
|
2093
2124
|
position: "top-center",
|
|
2094
2125
|
richColors: !0
|
|
2095
2126
|
}), se((Q == null ? void 0 : Q.output) || ""), Q.records.length > 0)) {
|
|
2096
|
-
const { dimensionKeys:
|
|
2097
|
-
ae(
|
|
2127
|
+
const { dimensionKeys: i } = vs(Q.records);
|
|
2128
|
+
ae(i);
|
|
2098
2129
|
}
|
|
2099
2130
|
}, [
|
|
2100
2131
|
Q,
|
|
@@ -2102,63 +2133,63 @@ function jl() {
|
|
|
2102
2133
|
ae,
|
|
2103
2134
|
se
|
|
2104
2135
|
]), Z(() => {
|
|
2105
|
-
(oe || ce) && ye(!0), (
|
|
2136
|
+
(oe || ce) && ye(!0), (Me || ze) && ye(!1), Me ? (D(He.message), ae([]), se("")) : D("");
|
|
2106
2137
|
}, [
|
|
2107
2138
|
oe,
|
|
2108
2139
|
ce,
|
|
2109
2140
|
Q,
|
|
2110
2141
|
se,
|
|
2111
|
-
|
|
2112
|
-
|
|
2142
|
+
Me,
|
|
2143
|
+
ze,
|
|
2113
2144
|
ye,
|
|
2114
2145
|
ae,
|
|
2115
|
-
|
|
2116
|
-
|
|
2146
|
+
D,
|
|
2147
|
+
He
|
|
2117
2148
|
]), Z(() => {
|
|
2118
|
-
|
|
2119
|
-
}, [
|
|
2149
|
+
Oe && (Ee(), be(!1));
|
|
2150
|
+
}, [Oe, Ee, be]);
|
|
2120
2151
|
function gs() {
|
|
2121
|
-
const
|
|
2152
|
+
const i = n.getQueryData($e);
|
|
2122
2153
|
s.queryData || t({
|
|
2123
|
-
queryKey:
|
|
2124
|
-
queryData:
|
|
2125
|
-
}), n.setQueryData(
|
|
2154
|
+
queryKey: $e,
|
|
2155
|
+
queryData: i
|
|
2156
|
+
}), n.setQueryData($e, null), _(""), Le({}), K(""), $({});
|
|
2126
2157
|
}
|
|
2127
|
-
const Ye = (
|
|
2128
|
-
l.current =
|
|
2158
|
+
const Ye = (i) => {
|
|
2159
|
+
l.current = i;
|
|
2129
2160
|
};
|
|
2130
|
-
function Xe(
|
|
2131
|
-
if (
|
|
2161
|
+
function Xe(i, ne) {
|
|
2162
|
+
if (i.length === 0)
|
|
2132
2163
|
return "";
|
|
2133
2164
|
if (ne) {
|
|
2134
|
-
const ve =
|
|
2165
|
+
const ve = i.find((Ce) => Ce.id === ne);
|
|
2135
2166
|
if (ve) {
|
|
2136
2167
|
const Ce = ve.tabTitle;
|
|
2137
2168
|
if (Ce == "All__Header")
|
|
2138
|
-
return
|
|
2169
|
+
return i[0].id;
|
|
2139
2170
|
if (Ce && Ce.endsWith("__Header")) {
|
|
2140
|
-
const Za = Ce.split("__")[0], Qs =
|
|
2171
|
+
const Za = Ce.split("__")[0], Qs = i.find(
|
|
2141
2172
|
(et) => et.tabTitle === Za
|
|
2142
2173
|
);
|
|
2143
|
-
return Qs ? Qs.id :
|
|
2174
|
+
return Qs ? Qs.id : i[0].id;
|
|
2144
2175
|
}
|
|
2145
2176
|
return ne;
|
|
2146
2177
|
}
|
|
2147
2178
|
}
|
|
2148
|
-
return
|
|
2179
|
+
return i[0].id;
|
|
2149
2180
|
}
|
|
2150
2181
|
function Ze() {
|
|
2151
|
-
let
|
|
2152
|
-
v && !v.includes("{{") && (
|
|
2182
|
+
let i = v;
|
|
2183
|
+
v && !v.includes("{{") && (i = il(v), _(i));
|
|
2153
2184
|
const ne = {
|
|
2154
2185
|
...C,
|
|
2155
|
-
lastSelectedSchema:
|
|
2186
|
+
lastSelectedSchema: L,
|
|
2156
2187
|
lastSelectedDatamodelId: S,
|
|
2157
2188
|
lastSelectedDatabase: N,
|
|
2158
2189
|
lastSelectedTable: h,
|
|
2159
2190
|
connectionId: A,
|
|
2160
2191
|
type: F ? C.type : "table",
|
|
2161
|
-
sql:
|
|
2192
|
+
sql: i,
|
|
2162
2193
|
customCfg: F ? C.customCfg : null
|
|
2163
2194
|
}, ve = k.cards.map(
|
|
2164
2195
|
(js) => js.id === C.id ? ne : js
|
|
@@ -2170,32 +2201,32 @@ function jl() {
|
|
|
2170
2201
|
X == null || X(Ce);
|
|
2171
2202
|
}
|
|
2172
2203
|
function es() {
|
|
2173
|
-
const { queryKey:
|
|
2174
|
-
|
|
2204
|
+
const { queryKey: i, queryData: ne } = s;
|
|
2205
|
+
i && ne && n.setQueryData(i, ne), te == null || te();
|
|
2175
2206
|
}
|
|
2176
2207
|
Z(() => {
|
|
2177
2208
|
if (!o) return;
|
|
2178
|
-
const
|
|
2209
|
+
const i = l.current, ne = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light", ve = T === "system" ? ne : T;
|
|
2179
2210
|
return o.editor.defineTheme("default", {
|
|
2180
2211
|
// base: theme === 'light' ? 'hc-light' : 'vs-dark',
|
|
2181
2212
|
base: ve === "light" ? "vs" : "vs-dark",
|
|
2182
2213
|
inherit: !0,
|
|
2183
2214
|
rules: [],
|
|
2184
2215
|
colors: {
|
|
2185
|
-
"editor.background": ve === "light" ? "#ffffff" :
|
|
2216
|
+
"editor.background": ve === "light" ? "#ffffff" : Ct("240 10% 10%")
|
|
2186
2217
|
// 'editor.background':
|
|
2187
2218
|
// activeTheme === 'light'
|
|
2188
2219
|
// ? '#ffffff'
|
|
2189
2220
|
// : getCssVariableValue('--semaphor-background'),
|
|
2190
2221
|
}
|
|
2191
|
-
}), o.editor.setTheme("default"),
|
|
2222
|
+
}), o.editor.setTheme("default"), i && o && i.addCommand(
|
|
2192
2223
|
o.KeyMod.Shift | o.KeyCode.Enter,
|
|
2193
2224
|
function() {
|
|
2194
2225
|
return Ee(), !1;
|
|
2195
2226
|
}
|
|
2196
2227
|
), () => {
|
|
2197
2228
|
};
|
|
2198
|
-
}, [a,
|
|
2229
|
+
}, [a, T, o]);
|
|
2199
2230
|
function ss() {
|
|
2200
2231
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2201
2232
|
d && /* @__PURE__ */ e.jsx(
|
|
@@ -2207,7 +2238,7 @@ function jl() {
|
|
|
2207
2238
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 pt-3", children: [
|
|
2208
2239
|
/* @__PURE__ */ e.jsx(R, { className: "ml-6 text-xs font-semibold", children: "Filters" }),
|
|
2209
2240
|
Y && d && /* @__PURE__ */ e.jsx(
|
|
2210
|
-
|
|
2241
|
+
Qe,
|
|
2211
2242
|
{
|
|
2212
2243
|
onClick: () => p(!1),
|
|
2213
2244
|
className: "bg-background/50 text-foreground/50 hover:cursor-pointer hover:text-foreground"
|
|
@@ -2215,13 +2246,13 @@ function jl() {
|
|
|
2215
2246
|
)
|
|
2216
2247
|
] }),
|
|
2217
2248
|
/* @__PURE__ */ e.jsx(
|
|
2218
|
-
|
|
2249
|
+
Ue,
|
|
2219
2250
|
{
|
|
2220
2251
|
theme: "default",
|
|
2221
|
-
onChange: (
|
|
2222
|
-
if (
|
|
2252
|
+
onChange: (i) => {
|
|
2253
|
+
if (i)
|
|
2223
2254
|
try {
|
|
2224
|
-
JSON.parse(
|
|
2255
|
+
JSON.parse(i), w(JSON.parse(i));
|
|
2225
2256
|
} catch {
|
|
2226
2257
|
}
|
|
2227
2258
|
},
|
|
@@ -2244,7 +2275,7 @@ function jl() {
|
|
|
2244
2275
|
renderLineHighlight: "none"
|
|
2245
2276
|
}
|
|
2246
2277
|
},
|
|
2247
|
-
|
|
2278
|
+
T
|
|
2248
2279
|
)
|
|
2249
2280
|
] })
|
|
2250
2281
|
}
|
|
@@ -2276,7 +2307,7 @@ function jl() {
|
|
|
2276
2307
|
{
|
|
2277
2308
|
id: "1",
|
|
2278
2309
|
order: 1,
|
|
2279
|
-
defaultSize:
|
|
2310
|
+
defaultSize: r ? 20 : 100,
|
|
2280
2311
|
className: "relative flex grow",
|
|
2281
2312
|
children: [
|
|
2282
2313
|
/* @__PURE__ */ e.jsx(
|
|
@@ -2285,12 +2316,12 @@ function jl() {
|
|
|
2285
2316
|
role: "sql-container",
|
|
2286
2317
|
className: "relative flex w-[99%]",
|
|
2287
2318
|
children: /* @__PURE__ */ e.jsx(
|
|
2288
|
-
|
|
2319
|
+
Ue,
|
|
2289
2320
|
{
|
|
2290
2321
|
theme: "default",
|
|
2291
2322
|
className: "pt-3",
|
|
2292
|
-
onChange: (
|
|
2293
|
-
_(
|
|
2323
|
+
onChange: (i) => {
|
|
2324
|
+
_(i);
|
|
2294
2325
|
},
|
|
2295
2326
|
value: v,
|
|
2296
2327
|
options: {
|
|
@@ -2311,11 +2342,11 @@ function jl() {
|
|
|
2311
2342
|
)
|
|
2312
2343
|
}
|
|
2313
2344
|
),
|
|
2314
|
-
|
|
2345
|
+
r && /* @__PURE__ */ e.jsx("code", { className: "absolute right-6 top-3 text-sm text-muted-foreground/70", children: "sql" })
|
|
2315
2346
|
]
|
|
2316
2347
|
}
|
|
2317
2348
|
),
|
|
2318
|
-
|
|
2349
|
+
r && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2319
2350
|
/* @__PURE__ */ e.jsx(Ns, { withHandle: !0, className: "border" }),
|
|
2320
2351
|
/* @__PURE__ */ e.jsxs(
|
|
2321
2352
|
Ae,
|
|
@@ -2331,14 +2362,14 @@ function jl() {
|
|
|
2331
2362
|
role: "python-container",
|
|
2332
2363
|
className: "relative flex w-[99%] pt-0",
|
|
2333
2364
|
children: /* @__PURE__ */ e.jsx(
|
|
2334
|
-
|
|
2365
|
+
Ue,
|
|
2335
2366
|
{
|
|
2336
2367
|
className: "pt-3",
|
|
2337
2368
|
theme: "default",
|
|
2338
|
-
onChange: (
|
|
2339
|
-
E(
|
|
2369
|
+
onChange: (i) => {
|
|
2370
|
+
E(i && i.trim() || "");
|
|
2340
2371
|
},
|
|
2341
|
-
value: f ||
|
|
2372
|
+
value: f || St,
|
|
2342
2373
|
options: {
|
|
2343
2374
|
minimap: {
|
|
2344
2375
|
enabled: !1
|
|
@@ -2393,7 +2424,7 @@ function jl() {
|
|
|
2393
2424
|
children: [
|
|
2394
2425
|
/* @__PURE__ */ e.jsxs("div", { className: "flex grow items-center gap-2", children: [
|
|
2395
2426
|
/* @__PURE__ */ e.jsxs(
|
|
2396
|
-
|
|
2427
|
+
z,
|
|
2397
2428
|
{
|
|
2398
2429
|
title: "Shift + Enter",
|
|
2399
2430
|
disabled: oe || ce,
|
|
@@ -2404,29 +2435,29 @@ function jl() {
|
|
|
2404
2435
|
size: "sm",
|
|
2405
2436
|
variant: "outline",
|
|
2406
2437
|
children: [
|
|
2407
|
-
oe || ce ? /* @__PURE__ */ e.jsx(
|
|
2438
|
+
oe || ce ? /* @__PURE__ */ e.jsx(Ve, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx($n, { className: "mr-2 h-4 w-4" }),
|
|
2408
2439
|
"Run"
|
|
2409
2440
|
]
|
|
2410
2441
|
}
|
|
2411
2442
|
),
|
|
2412
|
-
|
|
2413
|
-
|
|
2443
|
+
Me && /* @__PURE__ */ e.jsx(
|
|
2444
|
+
ol,
|
|
2414
2445
|
{
|
|
2415
|
-
error:
|
|
2446
|
+
error: He.message,
|
|
2416
2447
|
setShowAIDialog: y,
|
|
2417
2448
|
setTriggerAIRun: b,
|
|
2418
2449
|
setUserInputforAI: x
|
|
2419
2450
|
}
|
|
2420
2451
|
),
|
|
2421
2452
|
/* @__PURE__ */ e.jsxs(
|
|
2422
|
-
|
|
2453
|
+
z,
|
|
2423
2454
|
{
|
|
2424
2455
|
onClick: gs,
|
|
2425
2456
|
className: "",
|
|
2426
2457
|
size: "sm",
|
|
2427
2458
|
variant: "outline",
|
|
2428
2459
|
children: [
|
|
2429
|
-
/* @__PURE__ */ e.jsx(
|
|
2460
|
+
/* @__PURE__ */ e.jsx(Fn, { className: "mr-2 size-4" }),
|
|
2430
2461
|
"Clear"
|
|
2431
2462
|
]
|
|
2432
2463
|
}
|
|
@@ -2434,49 +2465,49 @@ function jl() {
|
|
|
2434
2465
|
/* @__PURE__ */ e.jsx(
|
|
2435
2466
|
pa,
|
|
2436
2467
|
{
|
|
2437
|
-
pressed:
|
|
2438
|
-
onPressedChange: (
|
|
2468
|
+
pressed: r,
|
|
2469
|
+
onPressedChange: (i) => c(i),
|
|
2439
2470
|
className: "",
|
|
2440
2471
|
size: "sm",
|
|
2441
2472
|
variant: "outline",
|
|
2442
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2473
|
+
children: /* @__PURE__ */ e.jsx(jl, { className: "size-4 text-foreground/70" })
|
|
2443
2474
|
}
|
|
2444
2475
|
),
|
|
2445
2476
|
/* @__PURE__ */ e.jsx(
|
|
2446
|
-
|
|
2477
|
+
dl,
|
|
2447
2478
|
{
|
|
2448
2479
|
open: u,
|
|
2449
2480
|
setOpen: y,
|
|
2450
2481
|
userInput: g,
|
|
2451
2482
|
triggerAIRun: j,
|
|
2452
2483
|
setTriggerAIRun: b,
|
|
2453
|
-
setUserInput: (
|
|
2484
|
+
setUserInput: (i) => x(i)
|
|
2454
2485
|
}
|
|
2455
2486
|
)
|
|
2456
2487
|
] }),
|
|
2457
2488
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2458
|
-
(Q == null ? void 0 : Q.sql) && /* @__PURE__ */ e.jsx(
|
|
2489
|
+
(Q == null ? void 0 : Q.sql) && /* @__PURE__ */ e.jsx(bl, { sql: Q.sql }),
|
|
2459
2490
|
/* @__PURE__ */ e.jsxs(
|
|
2460
|
-
|
|
2491
|
+
z,
|
|
2461
2492
|
{
|
|
2462
2493
|
onClick: es,
|
|
2463
2494
|
className: "w-full",
|
|
2464
2495
|
size: "sm",
|
|
2465
2496
|
variant: "outline",
|
|
2466
2497
|
children: [
|
|
2467
|
-
/* @__PURE__ */ e.jsx(
|
|
2498
|
+
/* @__PURE__ */ e.jsx(Qe, { className: "mr-2 size-4" }),
|
|
2468
2499
|
"Close"
|
|
2469
2500
|
]
|
|
2470
2501
|
}
|
|
2471
2502
|
),
|
|
2472
2503
|
/* @__PURE__ */ e.jsxs(
|
|
2473
|
-
|
|
2504
|
+
z,
|
|
2474
2505
|
{
|
|
2475
2506
|
onClick: Ze,
|
|
2476
2507
|
size: "sm",
|
|
2477
2508
|
variant: "outline",
|
|
2478
2509
|
children: [
|
|
2479
|
-
/* @__PURE__ */ e.jsx(
|
|
2510
|
+
/* @__PURE__ */ e.jsx(Nt, { className: "mr-2 size-4 font-bold text-green-600" }),
|
|
2480
2511
|
"Accept"
|
|
2481
2512
|
]
|
|
2482
2513
|
}
|
|
@@ -2490,8 +2521,8 @@ function jl() {
|
|
|
2490
2521
|
)
|
|
2491
2522
|
);
|
|
2492
2523
|
}
|
|
2493
|
-
function
|
|
2494
|
-
var
|
|
2524
|
+
function vl({ data: s }) {
|
|
2525
|
+
var r;
|
|
2495
2526
|
const [t, a] = we.useState([]), l = Object.keys(s[0]).map((c) => ({
|
|
2496
2527
|
// header: key,
|
|
2497
2528
|
accessorKey: c,
|
|
@@ -2504,16 +2535,16 @@ function bl({ data: s }) {
|
|
|
2504
2535
|
onClick: () => d.toggleSorting(d.getIsSorted() === "asc"),
|
|
2505
2536
|
children: [
|
|
2506
2537
|
c,
|
|
2507
|
-
p === "asc" ? /* @__PURE__ */ e.jsx(
|
|
2538
|
+
p === "asc" ? /* @__PURE__ */ e.jsx(wt, { className: "ml-2 h-5 w-5" }) : p === "desc" ? /* @__PURE__ */ e.jsx(kt, { className: "ml-2 h-5 w-5" }) : null
|
|
2508
2539
|
]
|
|
2509
2540
|
}
|
|
2510
2541
|
) });
|
|
2511
2542
|
}
|
|
2512
|
-
})), o =
|
|
2543
|
+
})), o = Ot({
|
|
2513
2544
|
data: s,
|
|
2514
2545
|
columns: l,
|
|
2515
2546
|
getCoreRowModel: Tt(),
|
|
2516
|
-
getPaginationRowModel:
|
|
2547
|
+
getPaginationRowModel: Lt(),
|
|
2517
2548
|
onSortingChange: a,
|
|
2518
2549
|
getSortedRowModel: Mt(),
|
|
2519
2550
|
manualPagination: !0,
|
|
@@ -2521,12 +2552,12 @@ function bl({ data: s }) {
|
|
|
2521
2552
|
sorting: t
|
|
2522
2553
|
}
|
|
2523
2554
|
});
|
|
2524
|
-
return /* @__PURE__ */ e.jsxs(
|
|
2525
|
-
/* @__PURE__ */ e.jsx(
|
|
2555
|
+
return /* @__PURE__ */ e.jsxs(zt, { children: [
|
|
2556
|
+
/* @__PURE__ */ e.jsx(Ft, { children: o.getHeaderGroups().map((c) => /* @__PURE__ */ e.jsx(bs, { children: c.headers.map((d) => /* @__PURE__ */ e.jsx(It, { className: "sticky top-0 bg-muted", children: d.isPlaceholder ? null : Ws(
|
|
2526
2557
|
d.column.columnDef.header,
|
|
2527
2558
|
d.getContext()
|
|
2528
2559
|
) }, d.id)) }, c.id)) }),
|
|
2529
|
-
/* @__PURE__ */ e.jsx(
|
|
2560
|
+
/* @__PURE__ */ e.jsx(Dt, { children: (r = o.getRowModel().rows) != null && r.length ? o.getRowModel().rows.map((c) => /* @__PURE__ */ e.jsx(
|
|
2530
2561
|
bs,
|
|
2531
2562
|
{
|
|
2532
2563
|
className: "whitespace-nowrap py-2",
|
|
@@ -2537,34 +2568,34 @@ function bl({ data: s }) {
|
|
|
2537
2568
|
)) : /* @__PURE__ */ e.jsx(bs, { children: /* @__PURE__ */ e.jsx(Ys, { colSpan: l.length, className: "h-24 text-center", children: "No results." }) }) })
|
|
2538
2569
|
] });
|
|
2539
2570
|
}
|
|
2540
|
-
function
|
|
2541
|
-
var g, x, j, b, I, C,
|
|
2542
|
-
const { authToken: t } =
|
|
2571
|
+
function Cl({ card: s }) {
|
|
2572
|
+
var g, x, j, b, I, C, T, F, A, N;
|
|
2573
|
+
const { authToken: t } = ke(), a = Et(t == null ? void 0 : t.accessToken), n = O((S) => S.themeStyle), l = {
|
|
2543
2574
|
colors: ((x = (g = n == null ? void 0 : n.chart) == null ? void 0 : g.dataset) == null ? void 0 : x.backgroundColor) || []
|
|
2544
2575
|
};
|
|
2545
2576
|
(j = s.customCardPreferences) != null && j.inputData;
|
|
2546
|
-
const { getCard: o } = ja(((b = s.customCardPreferences) == null ? void 0 : b.url) || ""),
|
|
2577
|
+
const { getCard: o } = ja(((b = s.customCardPreferences) == null ? void 0 : b.url) || ""), r = ((I = s.customCardPreferences) == null ? void 0 : I.visualType) || "single", c = m((S) => S.frame);
|
|
2547
2578
|
re();
|
|
2548
|
-
const { data: d } =
|
|
2579
|
+
const { data: d } = qe(s);
|
|
2549
2580
|
if (!((C = s.customCardPreferences) != null && C.componentName))
|
|
2550
2581
|
return null;
|
|
2551
2582
|
const p = o(
|
|
2552
|
-
(
|
|
2583
|
+
(T = s.customCardPreferences) == null ? void 0 : T.componentName
|
|
2553
2584
|
), u = (S) => {
|
|
2554
2585
|
console.log("data", S), s.customCardPreferences;
|
|
2555
2586
|
}, y = Object.keys(
|
|
2556
2587
|
((F = s.customCardPreferences) == null ? void 0 : F.dataInputCardIds) || {}
|
|
2557
2588
|
).map((S) => {
|
|
2558
2589
|
var v, f, k;
|
|
2559
|
-
const
|
|
2590
|
+
const L = (f = (v = s.customCardPreferences) == null ? void 0 : v.dataInputCardIds) == null ? void 0 : f[S].cardId, h = (k = c == null ? void 0 : c.cards) == null ? void 0 : k.find((M) => M.id === L);
|
|
2560
2591
|
return h || null;
|
|
2561
2592
|
});
|
|
2562
2593
|
return /* @__PURE__ */ e.jsx("div", { className: "semaphor-custom mb-3 flex grow basis-0 flex-col space-y-2 overflow-y-auto", children: /* @__PURE__ */ e.jsxs(
|
|
2563
|
-
|
|
2594
|
+
Nn,
|
|
2564
2595
|
{
|
|
2565
2596
|
fallback: /* @__PURE__ */ e.jsx(e.Fragment, {}),
|
|
2566
2597
|
children: [
|
|
2567
|
-
p &&
|
|
2598
|
+
p && r === "single" && /* @__PURE__ */ e.jsx(
|
|
2568
2599
|
p,
|
|
2569
2600
|
{
|
|
2570
2601
|
params: a,
|
|
@@ -2574,15 +2605,15 @@ function yl({ card: s }) {
|
|
|
2574
2605
|
data: (d == null ? void 0 : d.records) || []
|
|
2575
2606
|
}
|
|
2576
2607
|
),
|
|
2577
|
-
p &&
|
|
2608
|
+
p && r === "multiple" && /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ e.jsx(
|
|
2578
2609
|
p,
|
|
2579
2610
|
{
|
|
2580
2611
|
theme: l,
|
|
2581
2612
|
onDataChange: u,
|
|
2582
2613
|
settings: y.map(
|
|
2583
2614
|
(S) => {
|
|
2584
|
-
var
|
|
2585
|
-
return (
|
|
2615
|
+
var L;
|
|
2616
|
+
return (L = S == null ? void 0 : S.customCardPreferences) == null ? void 0 : L.settings;
|
|
2586
2617
|
}
|
|
2587
2618
|
),
|
|
2588
2619
|
data: y.map((S) => (S == null ? void 0 : S.data) || [])
|
|
@@ -2600,9 +2631,9 @@ function Ra({
|
|
|
2600
2631
|
...t
|
|
2601
2632
|
}) {
|
|
2602
2633
|
var x, j;
|
|
2603
|
-
const a = m((b) => b.card), n = ((x = a.customCardPreferences) == null ? void 0 : x.showCardHeader) ?? !0, l = m((b) => b.frame), o =
|
|
2634
|
+
const a = m((b) => b.card), n = ((x = a.customCardPreferences) == null ? void 0 : x.showCardHeader) ?? !0, l = m((b) => b.frame), o = O((b) => b.dashboard.filters);
|
|
2604
2635
|
m((b) => b.actions.setRunSql);
|
|
2605
|
-
const { updateFilter:
|
|
2636
|
+
const { updateFilter: r } = zs(), c = o == null ? void 0 : o.find((b) => b.id === l.filterId), { data: d } = qe(a), { setCard: p } = re(), { data: u } = _s(a);
|
|
2606
2637
|
if (!a.id) return null;
|
|
2607
2638
|
let y;
|
|
2608
2639
|
d != null && d.records && (d == null ? void 0 : d.records.length) > 0 && (y = ba({
|
|
@@ -2614,23 +2645,23 @@ function Ra({
|
|
|
2614
2645
|
topoJson: u
|
|
2615
2646
|
}));
|
|
2616
2647
|
function g(b) {
|
|
2617
|
-
return /* @__PURE__ */ e.jsx(
|
|
2648
|
+
return /* @__PURE__ */ e.jsx(Cl, { card: b });
|
|
2618
2649
|
}
|
|
2619
2650
|
return /* @__PURE__ */ e.jsxs(
|
|
2620
|
-
|
|
2651
|
+
At,
|
|
2621
2652
|
{
|
|
2622
2653
|
role: "editor-visual-card",
|
|
2623
2654
|
className: W("relative flex h-full flex-col rounded-none", s),
|
|
2624
2655
|
...t,
|
|
2625
2656
|
children: [
|
|
2626
|
-
n && /* @__PURE__ */ e.jsxs(
|
|
2657
|
+
n && /* @__PURE__ */ e.jsxs(Vt, { className: "flex flex-row items-start justify-between py-4", children: [
|
|
2627
2658
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
2628
2659
|
/* @__PURE__ */ e.jsx(
|
|
2629
2660
|
ls,
|
|
2630
2661
|
{
|
|
2631
2662
|
text: a.title,
|
|
2632
2663
|
onSave: (b) => p({ ...a, title: b }),
|
|
2633
|
-
children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-5", children: /* @__PURE__ */ e.jsx(
|
|
2664
|
+
children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-5", children: /* @__PURE__ */ e.jsx(qt, { className: "text-base", children: a.title || "Edit title..." }) })
|
|
2634
2665
|
},
|
|
2635
2666
|
a.title
|
|
2636
2667
|
),
|
|
@@ -2639,7 +2670,7 @@ function Ra({
|
|
|
2639
2670
|
{
|
|
2640
2671
|
text: a.description || "",
|
|
2641
2672
|
onSave: (b) => p({ ...a, description: b }),
|
|
2642
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2673
|
+
children: /* @__PURE__ */ e.jsx(Rt, { children: a.description || "Edit description..." })
|
|
2643
2674
|
},
|
|
2644
2675
|
a.description
|
|
2645
2676
|
)
|
|
@@ -2650,34 +2681,34 @@ function Ra({
|
|
|
2650
2681
|
{
|
|
2651
2682
|
className: "my-1",
|
|
2652
2683
|
text: c.title || c.column,
|
|
2653
|
-
onSave: (b) =>
|
|
2684
|
+
onSave: (b) => r({ ...c, title: b }),
|
|
2654
2685
|
children: /* @__PURE__ */ e.jsx(R, { children: c.title })
|
|
2655
2686
|
}
|
|
2656
2687
|
),
|
|
2657
|
-
/* @__PURE__ */ e.jsx(
|
|
2688
|
+
/* @__PURE__ */ e.jsx(_t, { filter: c })
|
|
2658
2689
|
] })
|
|
2659
2690
|
] }),
|
|
2660
|
-
/* @__PURE__ */ e.jsxs(
|
|
2691
|
+
/* @__PURE__ */ e.jsxs(Ht, { className: "flex grow flex-col", children: [
|
|
2661
2692
|
a.type === "custom" && g(a),
|
|
2662
2693
|
!["table", "custom"].includes(a.type) && y && // <ChartJsVisual key={visualKey} cfg={cfg} />
|
|
2663
2694
|
/* @__PURE__ */ e.jsx(
|
|
2664
|
-
|
|
2695
|
+
$t,
|
|
2665
2696
|
{
|
|
2666
2697
|
cfg: y
|
|
2667
2698
|
},
|
|
2668
2699
|
JSON.stringify(y) + JSON.stringify(a.preferences) + ((j = a == null ? void 0 : a.preferences) == null ? void 0 : j.customVisualCode)
|
|
2669
2700
|
),
|
|
2670
2701
|
a.type === "table" && (d == null ? void 0 : d.records) && (d == null ? void 0 : d.records.length) > 0 && // All of the below css classes are #IMPORTANT for the table to scroll properly
|
|
2671
|
-
/* @__PURE__ */ e.jsx(
|
|
2702
|
+
/* @__PURE__ */ e.jsx(Pt, { className: "flex min-h-0 flex-1 grow basis-0", children: /* @__PURE__ */ e.jsx(Bt, { card: a, data: d == null ? void 0 : d.records }) })
|
|
2672
2703
|
] })
|
|
2673
2704
|
]
|
|
2674
2705
|
}
|
|
2675
2706
|
);
|
|
2676
2707
|
}
|
|
2677
|
-
function
|
|
2678
|
-
const [s, t] = q(!1), [a, n] = q(""), [l, o] = q(""), [
|
|
2708
|
+
function Nl() {
|
|
2709
|
+
const [s, t] = q(!1), [a, n] = q(""), [l, o] = q(""), [r, c] = q(""), [d, p] = q(""), u = m((N) => N.card), y = m(
|
|
2679
2710
|
(N) => N.card.customCfg
|
|
2680
|
-
), { data: g } =
|
|
2711
|
+
), { data: g } = qe(u), { data: x } = _s(u), { setCardCustomCfg: j, setCustomVisualCode: b } = re();
|
|
2681
2712
|
function I(N) {
|
|
2682
2713
|
var h, v;
|
|
2683
2714
|
const S = {
|
|
@@ -2693,7 +2724,7 @@ function vl() {
|
|
|
2693
2724
|
return JSON.stringify(S, null, 1);
|
|
2694
2725
|
}
|
|
2695
2726
|
function C() {
|
|
2696
|
-
var S,
|
|
2727
|
+
var S, L;
|
|
2697
2728
|
if (!(g != null && g.records) || (g == null ? void 0 : g.records.length) === 0) return;
|
|
2698
2729
|
const N = ba({
|
|
2699
2730
|
data: g == null ? void 0 : g.records,
|
|
@@ -2702,10 +2733,10 @@ function vl() {
|
|
|
2702
2733
|
preferences: u.preferences,
|
|
2703
2734
|
topoJson: x
|
|
2704
2735
|
});
|
|
2705
|
-
N && (n(JSON.stringify(N, null, 1)), (S = u == null ? void 0 : u.preferences) != null && S.customVisualCode && c((
|
|
2736
|
+
N && (n(JSON.stringify(N, null, 1)), (S = u == null ? void 0 : u.preferences) != null && S.customVisualCode && c((L = u == null ? void 0 : u.preferences) == null ? void 0 : L.customVisualCode), y && o(JSON.stringify(y, null, 1)));
|
|
2706
2737
|
}
|
|
2707
|
-
function
|
|
2708
|
-
if (
|
|
2738
|
+
function T() {
|
|
2739
|
+
if (r && b(r), !!l)
|
|
2709
2740
|
try {
|
|
2710
2741
|
const N = JSON.parse(l);
|
|
2711
2742
|
return N ? (j(N), p(""), o(""), N) : void 0;
|
|
@@ -2719,29 +2750,29 @@ function vl() {
|
|
|
2719
2750
|
function A() {
|
|
2720
2751
|
let N;
|
|
2721
2752
|
if (y) {
|
|
2722
|
-
const S = Xs.cloneDeep(u.cfg),
|
|
2723
|
-
return N = I(
|
|
2753
|
+
const S = Xs.cloneDeep(u.cfg), L = Xs.merge(S, y);
|
|
2754
|
+
return N = I(L), N;
|
|
2724
2755
|
}
|
|
2725
2756
|
return a ? (N = I(JSON.parse(a)), N) : "";
|
|
2726
2757
|
}
|
|
2727
2758
|
return /* @__PURE__ */ e.jsxs(Fs, { open: s, onOpenChange: t, children: [
|
|
2728
2759
|
/* @__PURE__ */ e.jsx(Is, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
2729
|
-
|
|
2760
|
+
z,
|
|
2730
2761
|
{
|
|
2731
2762
|
onClick: C,
|
|
2732
2763
|
className: ` ${y && "border-foreground/50 dark:border-foreground/70"}`,
|
|
2733
2764
|
size: "sm",
|
|
2734
2765
|
variant: "outline",
|
|
2735
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2766
|
+
children: /* @__PURE__ */ e.jsx(Ut, { className: "h-4 w-4" })
|
|
2736
2767
|
}
|
|
2737
2768
|
) }),
|
|
2738
2769
|
/* @__PURE__ */ e.jsxs(
|
|
2739
|
-
|
|
2770
|
+
Ts,
|
|
2740
2771
|
{
|
|
2741
2772
|
className: "max-h-[70vh] min-h-[70vh] overflow-auto sm:min-w-[900px] lg:min-w-[1200px]",
|
|
2742
2773
|
children: [
|
|
2743
|
-
/* @__PURE__ */ e.jsxs(
|
|
2744
|
-
/* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e.jsx(
|
|
2774
|
+
/* @__PURE__ */ e.jsxs(Ls, { className: "", children: [
|
|
2775
|
+
/* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e.jsx(Ms, { children: "Customize Card" }) }),
|
|
2745
2776
|
/* @__PURE__ */ e.jsxs(Es, { children: [
|
|
2746
2777
|
"See the configuration options and documentation",
|
|
2747
2778
|
/* @__PURE__ */ e.jsx(
|
|
@@ -2787,7 +2818,7 @@ function vl() {
|
|
|
2787
2818
|
className: "mt-0 grow rounded-b border border-t-0",
|
|
2788
2819
|
value: "custom-config",
|
|
2789
2820
|
children: /* @__PURE__ */ e.jsx(
|
|
2790
|
-
|
|
2821
|
+
Ue,
|
|
2791
2822
|
{
|
|
2792
2823
|
className: "h-full w-full overflow-hidden",
|
|
2793
2824
|
theme: "default",
|
|
@@ -2816,7 +2847,7 @@ function vl() {
|
|
|
2816
2847
|
className: "mt-0 grow rounded-b border border-t-0",
|
|
2817
2848
|
value: "custom-code",
|
|
2818
2849
|
children: /* @__PURE__ */ e.jsx(
|
|
2819
|
-
|
|
2850
|
+
Ue,
|
|
2820
2851
|
{
|
|
2821
2852
|
className: "h-full w-full overflow-hidden",
|
|
2822
2853
|
theme: "default",
|
|
@@ -2833,7 +2864,7 @@ function vl() {
|
|
|
2833
2864
|
renderLineHighlight: "none"
|
|
2834
2865
|
},
|
|
2835
2866
|
defaultLanguage: "javascript",
|
|
2836
|
-
value:
|
|
2867
|
+
value: r,
|
|
2837
2868
|
onChange: (N) => c(N || "")
|
|
2838
2869
|
}
|
|
2839
2870
|
)
|
|
@@ -2844,7 +2875,7 @@ function vl() {
|
|
|
2844
2875
|
/* @__PURE__ */ e.jsxs(la, { className: "flex items-center", children: [
|
|
2845
2876
|
/* @__PURE__ */ e.jsx(R, { className: "mr-2 text-red-500", children: d }),
|
|
2846
2877
|
/* @__PURE__ */ e.jsx(
|
|
2847
|
-
|
|
2878
|
+
z,
|
|
2848
2879
|
{
|
|
2849
2880
|
disabled: !y,
|
|
2850
2881
|
onClick: F,
|
|
@@ -2852,8 +2883,8 @@ function vl() {
|
|
|
2852
2883
|
children: "Reset"
|
|
2853
2884
|
}
|
|
2854
2885
|
),
|
|
2855
|
-
/* @__PURE__ */ e.jsx(
|
|
2856
|
-
/* @__PURE__ */ e.jsx(
|
|
2886
|
+
/* @__PURE__ */ e.jsx(z, { onClick: T, variant: "outline", children: "Apply" }),
|
|
2887
|
+
/* @__PURE__ */ e.jsx(z, { onClick: () => t(!1), variant: "outline", children: "Close" })
|
|
2857
2888
|
] })
|
|
2858
2889
|
]
|
|
2859
2890
|
}
|
|
@@ -2888,20 +2919,20 @@ function Ja(s) {
|
|
|
2888
2919
|
const [t, a] = q(null);
|
|
2889
2920
|
return Z(() => {
|
|
2890
2921
|
s && (async () => {
|
|
2891
|
-
const o = (await import("./lucide-react-
|
|
2922
|
+
const o = (await import("./lucide-react-DzVyq6Fk.js"))[s];
|
|
2892
2923
|
a(o);
|
|
2893
2924
|
})();
|
|
2894
2925
|
}, [s]), t;
|
|
2895
2926
|
}
|
|
2896
2927
|
function Ka() {
|
|
2897
|
-
const { authToken: s } =
|
|
2928
|
+
const { authToken: s } = ke(), { data: t, isLoading: a, isFetching: n, isError: l } = Ne({
|
|
2898
2929
|
queryKey: ["plugins", s == null ? void 0 : s.accessToken],
|
|
2899
|
-
queryFn: () =>
|
|
2930
|
+
queryFn: () => Gt(s == null ? void 0 : s.accessToken)
|
|
2900
2931
|
// staleTime: Infinity,
|
|
2901
2932
|
});
|
|
2902
2933
|
return { data: t, isLoading: a, isFetching: n, isError: l };
|
|
2903
2934
|
}
|
|
2904
|
-
function
|
|
2935
|
+
function Sl({
|
|
2905
2936
|
onChartTypeChange: s
|
|
2906
2937
|
}) {
|
|
2907
2938
|
const [t, a] = q([]), { data: n } = Ka();
|
|
@@ -2910,7 +2941,7 @@ function Cl({
|
|
|
2910
2941
|
var o;
|
|
2911
2942
|
if (n) {
|
|
2912
2943
|
const c = (await Promise.all(
|
|
2913
|
-
(o = n == null ? void 0 : n.plugins) == null ? void 0 : o.map(async (d) => (await
|
|
2944
|
+
(o = n == null ? void 0 : n.plugins) == null ? void 0 : o.map(async (d) => (await Qt(d.value)).visuals.map((y) => ({
|
|
2914
2945
|
name: y.name,
|
|
2915
2946
|
icon: y.icon,
|
|
2916
2947
|
url: d.value
|
|
@@ -2922,7 +2953,7 @@ function Cl({
|
|
|
2922
2953
|
}, [n]), t.length === 0 ? null : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2923
2954
|
/* @__PURE__ */ e.jsx(ge, { className: "my-2" }),
|
|
2924
2955
|
/* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-4 place-items-center", children: t.map((l, o) => /* @__PURE__ */ e.jsx(
|
|
2925
|
-
|
|
2956
|
+
wl,
|
|
2926
2957
|
{
|
|
2927
2958
|
text: l.name,
|
|
2928
2959
|
onClick: () => s("custom", l),
|
|
@@ -2932,17 +2963,17 @@ function Cl({
|
|
|
2932
2963
|
)) })
|
|
2933
2964
|
] });
|
|
2934
2965
|
}
|
|
2935
|
-
const
|
|
2966
|
+
const wl = ({
|
|
2936
2967
|
text: s,
|
|
2937
2968
|
icon: t,
|
|
2938
2969
|
onClick: a
|
|
2939
2970
|
}) => {
|
|
2940
2971
|
const n = Ja(t || ""), l = s.charAt(0).toUpperCase();
|
|
2941
|
-
return /* @__PURE__ */ e.jsx(
|
|
2972
|
+
return /* @__PURE__ */ e.jsx(z, { onClick: a, title: s, variant: "ghost", children: n ? /* @__PURE__ */ e.jsx(n, { className: "h-4 w-4" }) : l });
|
|
2942
2973
|
};
|
|
2943
|
-
function
|
|
2974
|
+
function kl() {
|
|
2944
2975
|
var u, y;
|
|
2945
|
-
const [s, t] = q(!1), a = m((g) => g.card), n = a.type, { setCardType: l, setCardPreferences: o, setChartOrientation:
|
|
2976
|
+
const [s, t] = q(!1), a = m((g) => g.card), n = a.type, { setCardType: l, setCardPreferences: o, setChartOrientation: r } = m((g) => g.actions), { setCardCustomCfg: c, setCustomCardPreferences: d } = re();
|
|
2946
2977
|
function p(g, x) {
|
|
2947
2978
|
c(null), o({}), l(g), x && d({
|
|
2948
2979
|
type: "component",
|
|
@@ -2953,8 +2984,8 @@ function Sl() {
|
|
|
2953
2984
|
}), t(!1);
|
|
2954
2985
|
}
|
|
2955
2986
|
return /* @__PURE__ */ e.jsxs(ms, { open: s, onOpenChange: t, children: [
|
|
2956
|
-
/* @__PURE__ */ e.jsx(hs, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
2957
|
-
|
|
2987
|
+
/* @__PURE__ */ e.jsx(hs, { asChild: !0, children: /* @__PURE__ */ e.jsx(z, { size: "sm", variant: "outline", children: /* @__PURE__ */ e.jsx(
|
|
2988
|
+
Ol,
|
|
2958
2989
|
{
|
|
2959
2990
|
className: "h-4 w-4",
|
|
2960
2991
|
chartType: n,
|
|
@@ -2965,7 +2996,7 @@ function Sl() {
|
|
|
2965
2996
|
/* @__PURE__ */ e.jsxs(xs, { className: "w-50", children: [
|
|
2966
2997
|
/* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-4 place-items-center", children: [
|
|
2967
2998
|
/* @__PURE__ */ e.jsx(
|
|
2968
|
-
|
|
2999
|
+
z,
|
|
2969
3000
|
{
|
|
2970
3001
|
onClick: () => p("bar"),
|
|
2971
3002
|
className: "font-normal",
|
|
@@ -2974,7 +3005,7 @@ function Sl() {
|
|
|
2974
3005
|
}
|
|
2975
3006
|
),
|
|
2976
3007
|
/* @__PURE__ */ e.jsx(
|
|
2977
|
-
|
|
3008
|
+
z,
|
|
2978
3009
|
{
|
|
2979
3010
|
onClick: () => p("line"),
|
|
2980
3011
|
variant: "ghost",
|
|
@@ -2982,7 +3013,7 @@ function Sl() {
|
|
|
2982
3013
|
}
|
|
2983
3014
|
),
|
|
2984
3015
|
/* @__PURE__ */ e.jsx(
|
|
2985
|
-
|
|
3016
|
+
z,
|
|
2986
3017
|
{
|
|
2987
3018
|
onClick: () => p("stackedBar"),
|
|
2988
3019
|
variant: "ghost",
|
|
@@ -2990,7 +3021,7 @@ function Sl() {
|
|
|
2990
3021
|
}
|
|
2991
3022
|
),
|
|
2992
3023
|
/* @__PURE__ */ e.jsx(
|
|
2993
|
-
|
|
3024
|
+
z,
|
|
2994
3025
|
{
|
|
2995
3026
|
onClick: () => p("stackedLine"),
|
|
2996
3027
|
variant: "ghost",
|
|
@@ -2998,7 +3029,7 @@ function Sl() {
|
|
|
2998
3029
|
}
|
|
2999
3030
|
),
|
|
3000
3031
|
/* @__PURE__ */ e.jsx(
|
|
3001
|
-
|
|
3032
|
+
z,
|
|
3002
3033
|
{
|
|
3003
3034
|
onClick: () => p("scatter"),
|
|
3004
3035
|
variant: "ghost",
|
|
@@ -3006,7 +3037,7 @@ function Sl() {
|
|
|
3006
3037
|
}
|
|
3007
3038
|
),
|
|
3008
3039
|
/* @__PURE__ */ e.jsx(
|
|
3009
|
-
|
|
3040
|
+
z,
|
|
3010
3041
|
{
|
|
3011
3042
|
onClick: () => p("bubble"),
|
|
3012
3043
|
variant: "ghost",
|
|
@@ -3014,7 +3045,7 @@ function Sl() {
|
|
|
3014
3045
|
}
|
|
3015
3046
|
),
|
|
3016
3047
|
/* @__PURE__ */ e.jsx(
|
|
3017
|
-
|
|
3048
|
+
z,
|
|
3018
3049
|
{
|
|
3019
3050
|
onClick: () => p("pie"),
|
|
3020
3051
|
variant: "ghost",
|
|
@@ -3022,7 +3053,7 @@ function Sl() {
|
|
|
3022
3053
|
}
|
|
3023
3054
|
),
|
|
3024
3055
|
/* @__PURE__ */ e.jsx(
|
|
3025
|
-
|
|
3056
|
+
z,
|
|
3026
3057
|
{
|
|
3027
3058
|
onClick: () => p("doughnut"),
|
|
3028
3059
|
variant: "ghost",
|
|
@@ -3030,7 +3061,7 @@ function Sl() {
|
|
|
3030
3061
|
}
|
|
3031
3062
|
),
|
|
3032
3063
|
/* @__PURE__ */ e.jsx(
|
|
3033
|
-
|
|
3064
|
+
z,
|
|
3034
3065
|
{
|
|
3035
3066
|
onClick: () => p("radar"),
|
|
3036
3067
|
variant: "ghost",
|
|
@@ -3044,7 +3075,7 @@ function Sl() {
|
|
|
3044
3075
|
}
|
|
3045
3076
|
),
|
|
3046
3077
|
/* @__PURE__ */ e.jsx(
|
|
3047
|
-
|
|
3078
|
+
z,
|
|
3048
3079
|
{
|
|
3049
3080
|
onClick: () => p("polarArea"),
|
|
3050
3081
|
variant: "ghost",
|
|
@@ -3052,7 +3083,7 @@ function Sl() {
|
|
|
3052
3083
|
}
|
|
3053
3084
|
),
|
|
3054
3085
|
/* @__PURE__ */ e.jsx(
|
|
3055
|
-
|
|
3086
|
+
z,
|
|
3056
3087
|
{
|
|
3057
3088
|
onClick: () => p("pyramid"),
|
|
3058
3089
|
variant: "ghost",
|
|
@@ -3060,7 +3091,7 @@ function Sl() {
|
|
|
3060
3091
|
}
|
|
3061
3092
|
),
|
|
3062
3093
|
/* @__PURE__ */ e.jsx(
|
|
3063
|
-
|
|
3094
|
+
z,
|
|
3064
3095
|
{
|
|
3065
3096
|
onClick: () => p("range"),
|
|
3066
3097
|
variant: "ghost",
|
|
@@ -3068,7 +3099,7 @@ function Sl() {
|
|
|
3068
3099
|
}
|
|
3069
3100
|
),
|
|
3070
3101
|
/* @__PURE__ */ e.jsx(
|
|
3071
|
-
|
|
3102
|
+
z,
|
|
3072
3103
|
{
|
|
3073
3104
|
onClick: () => p("table"),
|
|
3074
3105
|
variant: "ghost",
|
|
@@ -3076,7 +3107,7 @@ function Sl() {
|
|
|
3076
3107
|
}
|
|
3077
3108
|
),
|
|
3078
3109
|
/* @__PURE__ */ e.jsx(
|
|
3079
|
-
|
|
3110
|
+
z,
|
|
3080
3111
|
{
|
|
3081
3112
|
onClick: () => p("kpi"),
|
|
3082
3113
|
variant: "ghost",
|
|
@@ -3084,7 +3115,7 @@ function Sl() {
|
|
|
3084
3115
|
}
|
|
3085
3116
|
),
|
|
3086
3117
|
/* @__PURE__ */ e.jsx(
|
|
3087
|
-
|
|
3118
|
+
z,
|
|
3088
3119
|
{
|
|
3089
3120
|
onClick: () => p("text"),
|
|
3090
3121
|
variant: "ghost",
|
|
@@ -3092,27 +3123,27 @@ function Sl() {
|
|
|
3092
3123
|
}
|
|
3093
3124
|
),
|
|
3094
3125
|
/* @__PURE__ */ e.jsx(
|
|
3095
|
-
|
|
3126
|
+
z,
|
|
3096
3127
|
{
|
|
3097
3128
|
onClick: () => p("map"),
|
|
3098
3129
|
variant: "ghost",
|
|
3099
|
-
children: /* @__PURE__ */ e.jsx(
|
|
3130
|
+
children: /* @__PURE__ */ e.jsx(Da, { className: "size-4" })
|
|
3100
3131
|
}
|
|
3101
3132
|
),
|
|
3102
3133
|
/* @__PURE__ */ e.jsx(
|
|
3103
|
-
|
|
3134
|
+
z,
|
|
3104
3135
|
{
|
|
3105
3136
|
onClick: () => p("custom"),
|
|
3106
3137
|
variant: "ghost",
|
|
3107
|
-
children: /* @__PURE__ */ e.jsx(
|
|
3138
|
+
children: /* @__PURE__ */ e.jsx(La, { className: "size-4" })
|
|
3108
3139
|
}
|
|
3109
3140
|
)
|
|
3110
3141
|
] }),
|
|
3111
|
-
/* @__PURE__ */ e.jsx(
|
|
3142
|
+
/* @__PURE__ */ e.jsx(Sl, { onChartTypeChange: p })
|
|
3112
3143
|
] })
|
|
3113
3144
|
] });
|
|
3114
3145
|
}
|
|
3115
|
-
function
|
|
3146
|
+
function Ol({
|
|
3116
3147
|
chartType: s,
|
|
3117
3148
|
className: t,
|
|
3118
3149
|
customIcon: a,
|
|
@@ -3149,27 +3180,27 @@ function wl({
|
|
|
3149
3180
|
case "text":
|
|
3150
3181
|
return /* @__PURE__ */ e.jsx(Us, { className: t });
|
|
3151
3182
|
case "map":
|
|
3152
|
-
return /* @__PURE__ */ e.jsx(
|
|
3183
|
+
return /* @__PURE__ */ e.jsx(Da, { className: t });
|
|
3153
3184
|
case "custom":
|
|
3154
|
-
return a && l ? /* @__PURE__ */ e.jsx(l, { className: t }) : n ? n == null ? void 0 : n.charAt(0).toUpperCase() : /* @__PURE__ */ e.jsx(
|
|
3185
|
+
return a && l ? /* @__PURE__ */ e.jsx(l, { className: t }) : n ? n == null ? void 0 : n.charAt(0).toUpperCase() : /* @__PURE__ */ e.jsx(La, { className: t });
|
|
3155
3186
|
default:
|
|
3156
3187
|
return /* @__PURE__ */ e.jsx(As, { className: t });
|
|
3157
3188
|
}
|
|
3158
3189
|
}
|
|
3159
|
-
function
|
|
3190
|
+
function zl() {
|
|
3160
3191
|
var t;
|
|
3161
3192
|
const s = m((a) => a.card);
|
|
3162
3193
|
return (t = s.customCardPreferences) == null || t.showCardHeader, re(), /* @__PURE__ */ e.jsxs(ra, { children: [
|
|
3163
3194
|
/* @__PURE__ */ e.jsx(ia, { asChild: !0, children: /* @__PURE__ */ e.jsx(Ia, { className: "size-4 cursor-pointer text-muted-foreground/70 transition-colors hover:text-muted-foreground" }) }),
|
|
3164
3195
|
/* @__PURE__ */ e.jsx(oa, { align: "start", className: "w-40 text-muted-foreground", children: /* @__PURE__ */ e.jsxs(
|
|
3165
|
-
|
|
3196
|
+
Jt,
|
|
3166
3197
|
{
|
|
3167
3198
|
onClick: () => {
|
|
3168
|
-
navigator.clipboard.writeText(s.id),
|
|
3199
|
+
navigator.clipboard.writeText(s.id), Ke.success("Card ID copied to clipboard");
|
|
3169
3200
|
},
|
|
3170
3201
|
className: "cursor-pointer space-x-2",
|
|
3171
3202
|
children: [
|
|
3172
|
-
/* @__PURE__ */ e.jsx(
|
|
3203
|
+
/* @__PURE__ */ e.jsx(An, { className: "size-5" }),
|
|
3173
3204
|
/* @__PURE__ */ e.jsx("span", { children: "Copy Card ID" })
|
|
3174
3205
|
]
|
|
3175
3206
|
}
|
|
@@ -3177,14 +3208,14 @@ function kl() {
|
|
|
3177
3208
|
] });
|
|
3178
3209
|
}
|
|
3179
3210
|
function ta() {
|
|
3180
|
-
const s = m((h) => h.frame), t = m((h) => h.card), a = m((h) => h.isShowingVisual), n = m((h) => h.isSqlRunning), l = m((h) => h.queryError), o = m((h) => h.pythonStdOut),
|
|
3211
|
+
const s = m((h) => h.frame), t = m((h) => h.card), a = m((h) => h.isShowingVisual), n = m((h) => h.isSqlRunning), l = m((h) => h.queryError), o = m((h) => h.pythonStdOut), r = m((h) => h.actions.setRunSql);
|
|
3181
3212
|
m((h) => h.onSave), m((h) => h.onClose), m((h) => h.actions.setCardSql), m((h) => h.actions.setCardType), m((h) => h.actions.setSqlGen);
|
|
3182
|
-
const { setFrame: c, setCard: d, updateCardInFrame: p } = re(), { data: u, isLoading: y, isFetching: g } =
|
|
3213
|
+
const { setFrame: c, setCard: d, updateCardInFrame: p } = re(), { data: u, isLoading: y, isFetching: g } = qe(t);
|
|
3183
3214
|
if (!t) return /* @__PURE__ */ e.jsx(e.Fragment, { children: "No Active Card" });
|
|
3184
3215
|
function x() {
|
|
3185
3216
|
const h = {
|
|
3186
3217
|
connectionId: t.connectionId,
|
|
3187
|
-
id:
|
|
3218
|
+
id: Je(),
|
|
3188
3219
|
title: "Title",
|
|
3189
3220
|
description: "Description",
|
|
3190
3221
|
preferences: {
|
|
@@ -3212,14 +3243,14 @@ function ta() {
|
|
|
3212
3243
|
function b() {
|
|
3213
3244
|
const h = {
|
|
3214
3245
|
...t,
|
|
3215
|
-
id:
|
|
3246
|
+
id: Je(),
|
|
3216
3247
|
title: `${t.title} Copy`,
|
|
3217
3248
|
tabTitle: `${t.tabTitle} Copy`
|
|
3218
3249
|
};
|
|
3219
3250
|
j(h);
|
|
3220
3251
|
}
|
|
3221
3252
|
function I(h) {
|
|
3222
|
-
const v = s.cards.filter((
|
|
3253
|
+
const v = s.cards.filter((M) => M.id !== h), f = v[0], k = {
|
|
3223
3254
|
...s,
|
|
3224
3255
|
cards: v,
|
|
3225
3256
|
// update the active card to the first card in the frame
|
|
@@ -3235,17 +3266,17 @@ function ta() {
|
|
|
3235
3266
|
};
|
|
3236
3267
|
c(v);
|
|
3237
3268
|
const f = v.cards.find((k) => k.id === h);
|
|
3238
|
-
f.sql &&
|
|
3269
|
+
f.sql && r(!0), d(f);
|
|
3239
3270
|
}
|
|
3240
|
-
const
|
|
3271
|
+
const T = (h, v) => {
|
|
3241
3272
|
console.log("handleDragStart", v), h.dataTransfer.setData("tabIndex", v.toString());
|
|
3242
3273
|
}, F = (h) => {
|
|
3243
3274
|
h.preventDefault();
|
|
3244
3275
|
}, A = (h, v) => {
|
|
3245
3276
|
const f = h.dataTransfer.getData("tabIndex");
|
|
3246
3277
|
if (f === v.toString()) return;
|
|
3247
|
-
const k = Array.from(s.cards), [
|
|
3248
|
-
k.splice(v, 0,
|
|
3278
|
+
const k = Array.from(s.cards), [M] = k.splice(parseInt(f), 1);
|
|
3279
|
+
k.splice(v, 0, M), c({ ...s, cards: k });
|
|
3249
3280
|
};
|
|
3250
3281
|
function N(h, v) {
|
|
3251
3282
|
return h.cards.length === 1 && (v.displayTab === !0 || v.displayTab === void 0) || h.activeCardId !== v.id && (v.displayTab === !0 || v.displayTab === void 0) ? null : /* @__PURE__ */ e.jsx(
|
|
@@ -3258,7 +3289,7 @@ function ta() {
|
|
|
3258
3289
|
displayTab: f
|
|
3259
3290
|
});
|
|
3260
3291
|
},
|
|
3261
|
-
children: v.displayTab === !0 || v.displayTab === void 0 ? /* @__PURE__ */ e.jsx(
|
|
3292
|
+
children: v.displayTab === !0 || v.displayTab === void 0 ? /* @__PURE__ */ e.jsx(Dn, { className: "mr-2 size-3.5 text-muted-foreground hover:text-foreground" }) : /* @__PURE__ */ e.jsx(In, { className: "mr-2 size-3.5 text-muted-foreground hover:text-foreground" })
|
|
3262
3293
|
}
|
|
3263
3294
|
);
|
|
3264
3295
|
}
|
|
@@ -3270,7 +3301,7 @@ function ta() {
|
|
|
3270
3301
|
value: s.activeCardId,
|
|
3271
3302
|
className: "flex grow flex-col",
|
|
3272
3303
|
children: [
|
|
3273
|
-
s.cards.map((h) => /* @__PURE__ */ e.jsx(is, { className: "mt-0 grow", value: h.id, children:
|
|
3304
|
+
s.cards.map((h) => /* @__PURE__ */ e.jsx(is, { className: "mt-0 grow", value: h.id, children: L() }, h.id)),
|
|
3274
3305
|
/* @__PURE__ */ e.jsx(Ca, { className: "group mx-6 justify-between", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
|
|
3275
3306
|
s.cards.map((h, v) => /* @__PURE__ */ e.jsx(
|
|
3276
3307
|
ls,
|
|
@@ -3283,7 +3314,7 @@ function ta() {
|
|
|
3283
3314
|
rs,
|
|
3284
3315
|
{
|
|
3285
3316
|
draggable: !0,
|
|
3286
|
-
onDragStart: (f) =>
|
|
3317
|
+
onDragStart: (f) => T(f, v),
|
|
3287
3318
|
onDragOver: F,
|
|
3288
3319
|
onDrop: (f) => A(f, v),
|
|
3289
3320
|
className: "",
|
|
@@ -3305,21 +3336,21 @@ function ta() {
|
|
|
3305
3336
|
h.id
|
|
3306
3337
|
)),
|
|
3307
3338
|
/* @__PURE__ */ e.jsx(
|
|
3308
|
-
|
|
3339
|
+
z,
|
|
3309
3340
|
{
|
|
3310
3341
|
className: "ml-1 h-8 px-2 hover:bg-muted-foreground/50",
|
|
3311
3342
|
variant: "outline",
|
|
3312
3343
|
onClick: x,
|
|
3313
|
-
children: /* @__PURE__ */ e.jsx(
|
|
3344
|
+
children: /* @__PURE__ */ e.jsx(Ds, { className: "h-4 w-4" })
|
|
3314
3345
|
}
|
|
3315
3346
|
),
|
|
3316
3347
|
/* @__PURE__ */ e.jsx(
|
|
3317
|
-
|
|
3348
|
+
z,
|
|
3318
3349
|
{
|
|
3319
3350
|
className: "invisible ml-1 h-8 px-2 hover:bg-muted-foreground/50 group-hover:visible",
|
|
3320
3351
|
variant: "outline",
|
|
3321
3352
|
onClick: b,
|
|
3322
|
-
children: /* @__PURE__ */ e.jsx(
|
|
3353
|
+
children: /* @__PURE__ */ e.jsx(On, { className: "h-4 w-4" })
|
|
3323
3354
|
}
|
|
3324
3355
|
)
|
|
3325
3356
|
] }) })
|
|
@@ -3327,9 +3358,9 @@ function ta() {
|
|
|
3327
3358
|
}
|
|
3328
3359
|
);
|
|
3329
3360
|
}
|
|
3330
|
-
function
|
|
3331
|
-
return t.type === "kpi" ? /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e.jsx("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e.jsx(
|
|
3332
|
-
|
|
3361
|
+
function L() {
|
|
3362
|
+
return t.type === "kpi" ? /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e.jsx("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e.jsx(Kt, { card: t, data: u == null ? void 0 : u.records }) }) }) : t.type === "text" ? /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e.jsx("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e.jsx(We, { className: "mx-3 my-6 h-[300px] overflow-y-auto break-words px-3", children: /* @__PURE__ */ e.jsx(
|
|
3363
|
+
Wt,
|
|
3333
3364
|
{
|
|
3334
3365
|
isLoading: n,
|
|
3335
3366
|
card: t,
|
|
@@ -3338,23 +3369,23 @@ function ta() {
|
|
|
3338
3369
|
) }) }) }) : /* @__PURE__ */ e.jsx(us, { FallbackComponent: ya, children: /* @__PURE__ */ e.jsx(Ra, { className: "grow border-none shadow-none" }) });
|
|
3339
3370
|
}
|
|
3340
3371
|
return /* @__PURE__ */ e.jsxs("div", { className: "relative flex h-full flex-col py-3", children: [
|
|
3341
|
-
(y || g) && /* @__PURE__ */ e.jsx(
|
|
3372
|
+
(y || g) && /* @__PURE__ */ e.jsx(Ve, { className: "absolute bottom-0 left-0 right-0 top-0 z-50 m-auto h-10 w-10 animate-spin text-foreground/10" }),
|
|
3342
3373
|
/* @__PURE__ */ e.jsxs("div", { className: "mb-0 flex min-h-10 items-center justify-end gap-2 px-6", children: [
|
|
3343
3374
|
a && /* @__PURE__ */ e.jsxs("div", { className: "flex grow items-center gap-2", children: [
|
|
3344
|
-
/* @__PURE__ */ e.jsx(
|
|
3345
|
-
!["table", "custom"].includes(t.type) && /* @__PURE__ */ e.jsx(
|
|
3346
|
-
/* @__PURE__ */ e.jsx(
|
|
3375
|
+
/* @__PURE__ */ e.jsx(kl, {}),
|
|
3376
|
+
!["table", "custom"].includes(t.type) && /* @__PURE__ */ e.jsx(Nl, {}),
|
|
3377
|
+
/* @__PURE__ */ e.jsx(zl, {})
|
|
3347
3378
|
] }),
|
|
3348
|
-
/* @__PURE__ */ e.jsx(
|
|
3379
|
+
/* @__PURE__ */ e.jsx(Il, {})
|
|
3349
3380
|
] }),
|
|
3350
3381
|
a ? S() : /* @__PURE__ */ e.jsxs("div", { className: "flex min-h-0 w-full flex-1 grow basis-0 px-6", children: [
|
|
3351
|
-
o && /* @__PURE__ */ e.jsx(
|
|
3352
|
-
(u == null ? void 0 : u.records) && (u == null ? void 0 : u.records.length) > 0 && /* @__PURE__ */ e.jsx(
|
|
3382
|
+
o && /* @__PURE__ */ e.jsx(Fl, {}),
|
|
3383
|
+
(u == null ? void 0 : u.records) && (u == null ? void 0 : u.records.length) > 0 && /* @__PURE__ */ e.jsx(vl, { data: (u == null ? void 0 : u.records) || [] }),
|
|
3353
3384
|
l && /* @__PURE__ */ e.jsx("span", { className: "font-mono text-sm", children: l })
|
|
3354
3385
|
] })
|
|
3355
3386
|
] });
|
|
3356
3387
|
}
|
|
3357
|
-
function
|
|
3388
|
+
function Fl() {
|
|
3358
3389
|
const s = m((a) => a.pythonStdOut);
|
|
3359
3390
|
if (!s) return null;
|
|
3360
3391
|
const t = s.replace(/\n/g, "<br>");
|
|
@@ -3370,14 +3401,14 @@ function Ol() {
|
|
|
3370
3401
|
/* @__PURE__ */ e.jsx(ge, { className: "mb-2" })
|
|
3371
3402
|
] });
|
|
3372
3403
|
}
|
|
3373
|
-
function
|
|
3404
|
+
function Il() {
|
|
3374
3405
|
const s = m((a) => a.isShowingVisual), t = m(
|
|
3375
3406
|
(a) => a.actions.setIsShowingVisual
|
|
3376
3407
|
);
|
|
3377
3408
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
3378
3409
|
/* @__PURE__ */ e.jsx(R, { htmlFor: "visualize", children: "Chart" }),
|
|
3379
3410
|
/* @__PURE__ */ e.jsx(
|
|
3380
|
-
|
|
3411
|
+
Yt,
|
|
3381
3412
|
{
|
|
3382
3413
|
checked: s,
|
|
3383
3414
|
onCheckedChange: () => t(!s),
|
|
@@ -3387,7 +3418,7 @@ function zl() {
|
|
|
3387
3418
|
)
|
|
3388
3419
|
] });
|
|
3389
3420
|
}
|
|
3390
|
-
function
|
|
3421
|
+
function Dl({
|
|
3391
3422
|
options: s,
|
|
3392
3423
|
value: t,
|
|
3393
3424
|
onValueChange: a
|
|
@@ -3400,7 +3431,7 @@ function Fl({
|
|
|
3400
3431
|
className: "flex gap-4",
|
|
3401
3432
|
defaultValue: s[0].value,
|
|
3402
3433
|
children: s.map((n) => /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
3403
|
-
/* @__PURE__ */ e.jsx(
|
|
3434
|
+
/* @__PURE__ */ e.jsx(Ie, { value: n.value, id: n.value }),
|
|
3404
3435
|
/* @__PURE__ */ e.jsx("label", { className: "text-sm", htmlFor: n.value, children: n.label })
|
|
3405
3436
|
] }, n.value))
|
|
3406
3437
|
}
|
|
@@ -3427,7 +3458,7 @@ function ue({
|
|
|
3427
3458
|
] }) })
|
|
3428
3459
|
] });
|
|
3429
3460
|
}
|
|
3430
|
-
function
|
|
3461
|
+
function Ge({
|
|
3431
3462
|
children: s,
|
|
3432
3463
|
summary: t,
|
|
3433
3464
|
open: a,
|
|
@@ -3441,39 +3472,39 @@ function Ue({
|
|
|
3441
3472
|
children: [
|
|
3442
3473
|
/* @__PURE__ */ e.jsxs("summary", { className: "flex cursor-pointer list-none items-center justify-between gap-4", children: [
|
|
3443
3474
|
/* @__PURE__ */ e.jsx(R, { children: t }),
|
|
3444
|
-
/* @__PURE__ */ e.jsx(
|
|
3475
|
+
/* @__PURE__ */ e.jsx(Xt, { className: "h-4 w-4" })
|
|
3445
3476
|
] }),
|
|
3446
3477
|
/* @__PURE__ */ e.jsx("div", { className: "transition-all ease-in-out", children: s })
|
|
3447
3478
|
]
|
|
3448
3479
|
}
|
|
3449
3480
|
);
|
|
3450
3481
|
}
|
|
3451
|
-
function
|
|
3482
|
+
function Tl() {
|
|
3452
3483
|
var b, I;
|
|
3453
3484
|
const s = m(
|
|
3454
3485
|
(C) => C.card.customCardPreferences
|
|
3455
|
-
), { data: t } = Ka(), a = (t == null ? void 0 : t.plugins) || [], n = m((C) => C.card), l = m((C) => C.frame), o = (s == null ? void 0 : s.visualType) || "single", { setCustomCardPreferences:
|
|
3486
|
+
), { data: t } = Ka(), a = (t == null ? void 0 : t.plugins) || [], n = m((C) => C.card), l = m((C) => C.frame), o = (s == null ? void 0 : s.visualType) || "single", { setCustomCardPreferences: r } = re(), { components: c, manifest: d } = ja(
|
|
3456
3487
|
(s == null ? void 0 : s.url) || ""
|
|
3457
3488
|
), p = (b = d == null ? void 0 : d.visuals) == null ? void 0 : b.find(
|
|
3458
3489
|
(C) => C.name === (s == null ? void 0 : s.componentName)
|
|
3459
3490
|
);
|
|
3460
|
-
function u(C,
|
|
3491
|
+
function u(C, T) {
|
|
3461
3492
|
if (!s) return;
|
|
3462
3493
|
const A = {
|
|
3463
3494
|
...(s == null ? void 0 : s.dataInputCardIds) || {},
|
|
3464
3495
|
[C]: {
|
|
3465
|
-
cardId:
|
|
3496
|
+
cardId: T,
|
|
3466
3497
|
hookRef: null
|
|
3467
3498
|
}
|
|
3468
3499
|
};
|
|
3469
|
-
|
|
3500
|
+
r({
|
|
3470
3501
|
...s,
|
|
3471
3502
|
dataInputCardIds: A
|
|
3472
3503
|
});
|
|
3473
3504
|
}
|
|
3474
3505
|
function y(C) {
|
|
3475
3506
|
var F, A;
|
|
3476
|
-
const
|
|
3507
|
+
const T = (F = l == null ? void 0 : l.cards) == null ? void 0 : F.filter((N) => {
|
|
3477
3508
|
var S;
|
|
3478
3509
|
return ((S = N == null ? void 0 : N.customCardPreferences) == null ? void 0 : S.visualType) !== "multiple";
|
|
3479
3510
|
}).map((N) => ({
|
|
@@ -3481,7 +3512,7 @@ function Il() {
|
|
|
3481
3512
|
label: N.tabTitle || N.title
|
|
3482
3513
|
}));
|
|
3483
3514
|
return /* @__PURE__ */ e.jsx("div", { className: "space-y-2", children: (A = C == null ? void 0 : C.dataInputs) == null ? void 0 : A.map((N, S) => {
|
|
3484
|
-
var
|
|
3515
|
+
var L, h;
|
|
3485
3516
|
return /* @__PURE__ */ e.jsxs(
|
|
3486
3517
|
"div",
|
|
3487
3518
|
{
|
|
@@ -3493,8 +3524,8 @@ function Il() {
|
|
|
3493
3524
|
{
|
|
3494
3525
|
className: "col-span-6 h-8 w-full justify-between",
|
|
3495
3526
|
label: "",
|
|
3496
|
-
options:
|
|
3497
|
-
value: ((h = (
|
|
3527
|
+
options: T || [],
|
|
3528
|
+
value: ((h = (L = s == null ? void 0 : s.dataInputCardIds) == null ? void 0 : L[S]) == null ? void 0 : h.cardId) || "",
|
|
3498
3529
|
onValueChange: (v) => u(S, v)
|
|
3499
3530
|
}
|
|
3500
3531
|
)
|
|
@@ -3504,43 +3535,43 @@ function Il() {
|
|
|
3504
3535
|
);
|
|
3505
3536
|
}) });
|
|
3506
3537
|
}
|
|
3507
|
-
function g(C,
|
|
3538
|
+
function g(C, T, F = []) {
|
|
3508
3539
|
var A, N;
|
|
3509
3540
|
return s ? C === "input" ? /* @__PURE__ */ e.jsx(
|
|
3510
3541
|
le,
|
|
3511
3542
|
{
|
|
3512
|
-
className: `h-8 w-full ${
|
|
3513
|
-
value: ((A = s == null ? void 0 : s.settings) == null ? void 0 : A[
|
|
3543
|
+
className: `h-8 w-full ${Be}`,
|
|
3544
|
+
value: ((A = s == null ? void 0 : s.settings) == null ? void 0 : A[T]) || "",
|
|
3514
3545
|
onChange: (S) => {
|
|
3515
|
-
|
|
3546
|
+
r({
|
|
3516
3547
|
...s,
|
|
3517
3548
|
settings: {
|
|
3518
3549
|
...s == null ? void 0 : s.settings,
|
|
3519
|
-
[
|
|
3550
|
+
[T]: S.target.value
|
|
3520
3551
|
}
|
|
3521
3552
|
});
|
|
3522
3553
|
}
|
|
3523
3554
|
},
|
|
3524
|
-
|
|
3555
|
+
T
|
|
3525
3556
|
) : C === "select" ? /* @__PURE__ */ e.jsx(
|
|
3526
3557
|
ue,
|
|
3527
3558
|
{
|
|
3528
3559
|
className: "h-8 w-full",
|
|
3529
3560
|
label: "",
|
|
3530
3561
|
options: F,
|
|
3531
|
-
value: ((N = s == null ? void 0 : s.settings) == null ? void 0 : N[
|
|
3562
|
+
value: ((N = s == null ? void 0 : s.settings) == null ? void 0 : N[T]) || "",
|
|
3532
3563
|
onValueChange: (S) => {
|
|
3533
|
-
|
|
3564
|
+
r({
|
|
3534
3565
|
...s,
|
|
3535
|
-
settings: { ...s == null ? void 0 : s.settings, [
|
|
3566
|
+
settings: { ...s == null ? void 0 : s.settings, [T]: S }
|
|
3536
3567
|
});
|
|
3537
3568
|
}
|
|
3538
3569
|
}
|
|
3539
3570
|
) : null : null;
|
|
3540
3571
|
}
|
|
3541
3572
|
function x(C) {
|
|
3542
|
-
const
|
|
3543
|
-
return /* @__PURE__ */ e.jsx("div", { className: "space-y-3", children:
|
|
3573
|
+
const T = Object.entries((C == null ? void 0 : C.settings) || {});
|
|
3574
|
+
return /* @__PURE__ */ e.jsx("div", { className: "space-y-3", children: T.map(([F, A]) => /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
3544
3575
|
/* @__PURE__ */ e.jsx(R, { children: A.title }),
|
|
3545
3576
|
g(
|
|
3546
3577
|
A.ui,
|
|
@@ -3550,7 +3581,7 @@ function Il() {
|
|
|
3550
3581
|
] }, F)) });
|
|
3551
3582
|
}
|
|
3552
3583
|
function j(C) {
|
|
3553
|
-
s &&
|
|
3584
|
+
s && r({
|
|
3554
3585
|
...s,
|
|
3555
3586
|
visualType: C,
|
|
3556
3587
|
componentName: ""
|
|
@@ -3561,7 +3592,7 @@ function Il() {
|
|
|
3561
3592
|
{
|
|
3562
3593
|
className: "p-6",
|
|
3563
3594
|
children: [
|
|
3564
|
-
/* @__PURE__ */ e.jsx(
|
|
3595
|
+
/* @__PURE__ */ e.jsx(Ge, { summary: "Plugin Settings", children: /* @__PURE__ */ e.jsx("div", { className: "space-y-4 text-sm", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 text-sm", children: [
|
|
3565
3596
|
/* @__PURE__ */ e.jsx("div", { className: "space-y-2", children: /* @__PURE__ */ e.jsx("div", { className: "px-2", children: /* @__PURE__ */ e.jsx(
|
|
3566
3597
|
ue,
|
|
3567
3598
|
{
|
|
@@ -3569,7 +3600,7 @@ function Il() {
|
|
|
3569
3600
|
label: "",
|
|
3570
3601
|
options: a,
|
|
3571
3602
|
value: (s == null ? void 0 : s.url) || "",
|
|
3572
|
-
onValueChange: (C) =>
|
|
3603
|
+
onValueChange: (C) => r({
|
|
3573
3604
|
...s || {
|
|
3574
3605
|
url: "",
|
|
3575
3606
|
componentName: ""
|
|
@@ -3579,7 +3610,7 @@ function Il() {
|
|
|
3579
3610
|
}
|
|
3580
3611
|
) }) }),
|
|
3581
3612
|
((s == null ? void 0 : s.type) === "component" || (s == null ? void 0 : s.type) === void 0) && /* @__PURE__ */ e.jsx(
|
|
3582
|
-
|
|
3613
|
+
Dl,
|
|
3583
3614
|
{
|
|
3584
3615
|
options: [
|
|
3585
3616
|
{ value: "single", label: "Single Visual" },
|
|
@@ -3604,7 +3635,7 @@ function Il() {
|
|
|
3604
3635
|
}))) || [],
|
|
3605
3636
|
value: s.componentName,
|
|
3606
3637
|
onValueChange: (C) => {
|
|
3607
|
-
console.log("changing value", C),
|
|
3638
|
+
console.log("changing value", C), r({
|
|
3608
3639
|
...s,
|
|
3609
3640
|
componentName: C
|
|
3610
3641
|
});
|
|
@@ -3614,7 +3645,7 @@ function Il() {
|
|
|
3614
3645
|
] }) })
|
|
3615
3646
|
] }) }) }),
|
|
3616
3647
|
/* @__PURE__ */ e.jsx(ge, { className: "my-4" }),
|
|
3617
|
-
((I = n == null ? void 0 : n.customCardPreferences) == null ? void 0 : I.componentName) && /* @__PURE__ */ e.jsxs(
|
|
3648
|
+
((I = n == null ? void 0 : n.customCardPreferences) == null ? void 0 : I.componentName) && /* @__PURE__ */ e.jsxs(Ge, { summary: "Component Settings", children: [
|
|
3618
3649
|
p && p.dataInputs && /* @__PURE__ */ e.jsxs("div", { className: "space-y-3", children: [
|
|
3619
3650
|
/* @__PURE__ */ e.jsx(R, { children: "Input Mapping" }),
|
|
3620
3651
|
/* @__PURE__ */ e.jsx("div", { className: "px-2", children: y(p) })
|
|
@@ -3625,12 +3656,12 @@ function Il() {
|
|
|
3625
3656
|
}
|
|
3626
3657
|
);
|
|
3627
3658
|
}
|
|
3628
|
-
function
|
|
3659
|
+
function Te() {
|
|
3629
3660
|
const [s, t] = q([]);
|
|
3630
3661
|
m(
|
|
3631
3662
|
(u) => u.card.cfg
|
|
3632
3663
|
);
|
|
3633
|
-
const a = m((u) => u.card.preferences), { setCardCfg: n, setFilterOnClickColumnIndex: l, setCardPreferences: o } = m((u) => u.actions),
|
|
3664
|
+
const a = m((u) => u.card.preferences), { setCardCfg: n, setFilterOnClickColumnIndex: l, setCardPreferences: o } = m((u) => u.actions), r = m(
|
|
3634
3665
|
(u) => u.queryResultColumns
|
|
3635
3666
|
);
|
|
3636
3667
|
m(
|
|
@@ -3639,8 +3670,8 @@ function De() {
|
|
|
3639
3670
|
return (y = u.card.preferences) == null ? void 0 : y.filterOnClickColumnIndex;
|
|
3640
3671
|
}
|
|
3641
3672
|
), Z(() => {
|
|
3642
|
-
|
|
3643
|
-
}, [
|
|
3673
|
+
r && t(new Array(r.length).fill(!1));
|
|
3674
|
+
}, [r]);
|
|
3644
3675
|
function c(u, y) {
|
|
3645
3676
|
var g, x;
|
|
3646
3677
|
y ? a != null && a.onClickFilter && ((g = a == null ? void 0 : a.onClickFilter) == null ? void 0 : g.length) > 0 ? o({
|
|
@@ -3697,7 +3728,7 @@ function De() {
|
|
|
3697
3728
|
}
|
|
3698
3729
|
return /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
3699
3730
|
/* @__PURE__ */ e.jsx(R, { children: "On Click" }),
|
|
3700
|
-
|
|
3731
|
+
r == null ? void 0 : r.map((u, y) => {
|
|
3701
3732
|
var g, x;
|
|
3702
3733
|
return /* @__PURE__ */ e.jsx(
|
|
3703
3734
|
"div",
|
|
@@ -3724,7 +3755,7 @@ function De() {
|
|
|
3724
3755
|
/* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-2", children: ((x = a == null ? void 0 : a.onClickFilter) == null ? void 0 : x.find(
|
|
3725
3756
|
(j) => j.columnIndex === y
|
|
3726
3757
|
)) && /* @__PURE__ */ e.jsx(
|
|
3727
|
-
|
|
3758
|
+
Ta,
|
|
3728
3759
|
{
|
|
3729
3760
|
onClick: () => {
|
|
3730
3761
|
t((j) => {
|
|
@@ -3745,11 +3776,11 @@ function De() {
|
|
|
3745
3776
|
] });
|
|
3746
3777
|
}
|
|
3747
3778
|
function fs() {
|
|
3748
|
-
var
|
|
3779
|
+
var r, c, d;
|
|
3749
3780
|
const s = m((p) => p.card.preferences), t = m(
|
|
3750
3781
|
(p) => p.card.cfg
|
|
3751
3782
|
), { setCardCfg: a, setCardPreferences: n, setChartOrientation: l } = m((p) => p.actions);
|
|
3752
|
-
(
|
|
3783
|
+
(r = t == null ? void 0 : t.options) != null && r.indexAxis;
|
|
3753
3784
|
function o(p) {
|
|
3754
3785
|
l(p);
|
|
3755
3786
|
}
|
|
@@ -3762,11 +3793,11 @@ function fs() {
|
|
|
3762
3793
|
defaultValue: "x",
|
|
3763
3794
|
children: [
|
|
3764
3795
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
3765
|
-
/* @__PURE__ */ e.jsx(
|
|
3796
|
+
/* @__PURE__ */ e.jsx(Ie, { value: "x", id: "r1" }),
|
|
3766
3797
|
/* @__PURE__ */ e.jsx("label", { className: "text-sm", htmlFor: "r1", children: "Vertical" })
|
|
3767
3798
|
] }),
|
|
3768
3799
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
3769
|
-
/* @__PURE__ */ e.jsx(
|
|
3800
|
+
/* @__PURE__ */ e.jsx(Ie, { value: "y", id: "r2" }),
|
|
3770
3801
|
/* @__PURE__ */ e.jsx("label", { className: "text-sm", htmlFor: "r2", children: "Horizontal" })
|
|
3771
3802
|
] })
|
|
3772
3803
|
]
|
|
@@ -3782,37 +3813,37 @@ function na(s, t) {
|
|
|
3782
3813
|
function Wa() {
|
|
3783
3814
|
var ie, K, ae, w, _, ee;
|
|
3784
3815
|
const [s, t] = q(!1), a = m((E) => {
|
|
3785
|
-
var
|
|
3786
|
-
return (
|
|
3816
|
+
var D;
|
|
3817
|
+
return (D = E.card) == null ? void 0 : D.preferences;
|
|
3787
3818
|
}), n = m((E) => {
|
|
3788
|
-
var
|
|
3789
|
-
return (
|
|
3790
|
-
}), l = wa(a, n), [o,
|
|
3819
|
+
var D;
|
|
3820
|
+
return (D = E.card) == null ? void 0 : D.cfg;
|
|
3821
|
+
}), l = wa(a, n), [o, r] = q(
|
|
3791
3822
|
na(a)
|
|
3792
3823
|
), [c, d] = q(
|
|
3793
3824
|
((ae = (K = (ie = a == null ? void 0 : a.chartOptions) == null ? void 0 : ie.scales) == null ? void 0 : K[l]) == null ? void 0 : ae.min) || ""
|
|
3794
3825
|
), [p, u] = q(
|
|
3795
3826
|
((ee = (_ = (w = a == null ? void 0 : a.chartOptions) == null ? void 0 : w.scales) == null ? void 0 : _[l]) == null ? void 0 : ee.max) || ""
|
|
3796
|
-
), [y, g] = q(c || p ? "custom" : "auto"), [x, j] = q(""), [b, I] = q(0), [C,
|
|
3827
|
+
), [y, g] = q(c || p ? "custom" : "auto"), [x, j] = q(""), [b, I] = q(0), [C, T] = q(""), [F, A] = q(""), [N, S] = q(""), L = m(
|
|
3797
3828
|
(E) => E.actions.setCardPreferences
|
|
3798
3829
|
), { updateCardInFrame: h } = re(), v = m((E) => E.card), f = m((E) => {
|
|
3799
|
-
var
|
|
3800
|
-
return (
|
|
3830
|
+
var D;
|
|
3831
|
+
return (D = E.card) == null ? void 0 : D.type;
|
|
3801
3832
|
}), k = ["pie", "doughnut", "polarArea"].includes(f);
|
|
3802
3833
|
Z(() => {
|
|
3803
|
-
var E,
|
|
3804
|
-
|
|
3805
|
-
((se = (
|
|
3834
|
+
var E, D, se, $, X, te, Le, Oe, be, ye, Q, oe, ce, ze;
|
|
3835
|
+
r(na(a)), d(
|
|
3836
|
+
((se = (D = (E = a == null ? void 0 : a.chartOptions) == null ? void 0 : E.scales) == null ? void 0 : D[l]) == null ? void 0 : se.min) === 0 ? 0 : ""
|
|
3806
3837
|
), u(((te = (X = ($ = a == null ? void 0 : a.chartOptions) == null ? void 0 : $.scales) == null ? void 0 : X[l]) == null ? void 0 : te.max) || ""), j(
|
|
3807
|
-
((ye = (be = (
|
|
3808
|
-
), I(((Q = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : Q.decimalPlaces) || 0),
|
|
3838
|
+
((ye = (be = (Oe = (Le = a == null ? void 0 : a.chartOptions) == null ? void 0 : Le.scales) == null ? void 0 : Oe[l]) == null ? void 0 : be.ticks) == null ? void 0 : ye.stepSize) || ""
|
|
3839
|
+
), I(((Q = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : Q.decimalPlaces) || 0), T(((oe = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : oe.suffix) || ""), A(((ce = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : ce.currency) || ""), S(((ze = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : ze.locale) || "");
|
|
3809
3840
|
}, [s, a, l]);
|
|
3810
|
-
function
|
|
3811
|
-
return
|
|
3841
|
+
function M(E, D) {
|
|
3842
|
+
return D === "" || /^[0-9\b]+$/.test(D) ? Number(D) : Number(E);
|
|
3812
3843
|
}
|
|
3813
3844
|
function H() {
|
|
3814
3845
|
const E = [
|
|
3815
|
-
...new Set(os.map((
|
|
3846
|
+
...new Set(os.map((D) => D.currency))
|
|
3816
3847
|
];
|
|
3817
3848
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
3818
3849
|
/* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-6 items-center gap-2", children: [
|
|
@@ -3835,18 +3866,18 @@ function Wa() {
|
|
|
3835
3866
|
me,
|
|
3836
3867
|
{
|
|
3837
3868
|
value: F || "none",
|
|
3838
|
-
onValueChange: (
|
|
3869
|
+
onValueChange: (D) => A(D === "none" ? "" : D),
|
|
3839
3870
|
children: [
|
|
3840
3871
|
/* @__PURE__ */ e.jsx(he, { className: "col-span-2 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(xe, {}) }),
|
|
3841
3872
|
/* @__PURE__ */ e.jsx(pe, { children: /* @__PURE__ */ e.jsxs(Se, { children: [
|
|
3842
3873
|
/* @__PURE__ */ e.jsx(fe, { children: "Currency" }),
|
|
3843
3874
|
/* @__PURE__ */ e.jsx(J, { value: "none", children: "None" }),
|
|
3844
|
-
E.map((
|
|
3875
|
+
E.map((D) => /* @__PURE__ */ e.jsx(J, { value: D, children: D }, D))
|
|
3845
3876
|
] }) })
|
|
3846
3877
|
]
|
|
3847
3878
|
}
|
|
3848
3879
|
),
|
|
3849
|
-
/* @__PURE__ */ e.jsxs(me, { value: N, onValueChange: (
|
|
3880
|
+
/* @__PURE__ */ e.jsxs(me, { value: N, onValueChange: (D) => S(D), children: [
|
|
3850
3881
|
/* @__PURE__ */ e.jsx(
|
|
3851
3882
|
he,
|
|
3852
3883
|
{
|
|
@@ -3856,7 +3887,7 @@ function Wa() {
|
|
|
3856
3887
|
),
|
|
3857
3888
|
/* @__PURE__ */ e.jsx(pe, { children: /* @__PURE__ */ e.jsxs(Se, { children: [
|
|
3858
3889
|
/* @__PURE__ */ e.jsx(fe, { children: "Locale" }),
|
|
3859
|
-
os.map((
|
|
3890
|
+
os.map((D) => /* @__PURE__ */ e.jsx(J, { value: D.locale, children: D.locale }, D.locale))
|
|
3860
3891
|
] }) })
|
|
3861
3892
|
] })
|
|
3862
3893
|
] }),
|
|
@@ -3866,7 +3897,7 @@ function Wa() {
|
|
|
3866
3897
|
le,
|
|
3867
3898
|
{
|
|
3868
3899
|
value: b,
|
|
3869
|
-
onChange: (
|
|
3900
|
+
onChange: (D) => I(Number(D.target.value)),
|
|
3870
3901
|
id: "format",
|
|
3871
3902
|
className: `col-span-6 h-8 w-full tracking-wide ${ts}`
|
|
3872
3903
|
}
|
|
@@ -3883,7 +3914,7 @@ function Wa() {
|
|
|
3883
3914
|
{
|
|
3884
3915
|
id: "min",
|
|
3885
3916
|
value: c,
|
|
3886
|
-
onChange: (E) => d((
|
|
3917
|
+
onChange: (E) => d((D) => M(D, E.target.value)),
|
|
3887
3918
|
className: `col-span-1 h-8 w-full ${ts}`
|
|
3888
3919
|
}
|
|
3889
3920
|
),
|
|
@@ -3891,7 +3922,7 @@ function Wa() {
|
|
|
3891
3922
|
le,
|
|
3892
3923
|
{
|
|
3893
3924
|
value: p,
|
|
3894
|
-
onChange: (E) => u((
|
|
3925
|
+
onChange: (E) => u((D) => M(D, E.target.value)),
|
|
3895
3926
|
id: "max",
|
|
3896
3927
|
className: `col-span-1 h-8 w-full ${ts}`
|
|
3897
3928
|
}
|
|
@@ -3903,7 +3934,7 @@ function Wa() {
|
|
|
3903
3934
|
le,
|
|
3904
3935
|
{
|
|
3905
3936
|
value: x,
|
|
3906
|
-
onChange: (E) => j((
|
|
3937
|
+
onChange: (E) => j((D) => M(D, E.target.value)),
|
|
3907
3938
|
id: "step-size",
|
|
3908
3939
|
className: `col-span-1 h-8 w-full ${ts}`
|
|
3909
3940
|
}
|
|
@@ -3921,7 +3952,7 @@ function Wa() {
|
|
|
3921
3952
|
stepSize: x
|
|
3922
3953
|
}
|
|
3923
3954
|
});
|
|
3924
|
-
const
|
|
3955
|
+
const D = {
|
|
3925
3956
|
...a || {},
|
|
3926
3957
|
chartOptions: {
|
|
3927
3958
|
...a == null ? void 0 : a.chartOptions,
|
|
@@ -3941,15 +3972,15 @@ function Wa() {
|
|
|
3941
3972
|
locale: N
|
|
3942
3973
|
}
|
|
3943
3974
|
};
|
|
3944
|
-
console.log(
|
|
3975
|
+
console.log(D), L(D);
|
|
3945
3976
|
const se = {
|
|
3946
3977
|
...v,
|
|
3947
|
-
preferences:
|
|
3978
|
+
preferences: D
|
|
3948
3979
|
};
|
|
3949
3980
|
h(se);
|
|
3950
3981
|
}
|
|
3951
3982
|
return /* @__PURE__ */ e.jsxs(ms, { onOpenChange: (E) => t(E), children: [
|
|
3952
|
-
/* @__PURE__ */ e.jsx(hs, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
3983
|
+
/* @__PURE__ */ e.jsx(hs, { asChild: !0, children: /* @__PURE__ */ e.jsx(Zt, { className: "size-4 cursor-pointer text-muted-foreground hover:text-foreground" }) }),
|
|
3953
3984
|
/* @__PURE__ */ e.jsx(xs, { align: "center", className: "max-w-65", children: /* @__PURE__ */ e.jsxs("div", { className: "grid gap-4", children: [
|
|
3954
3985
|
/* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
3955
3986
|
/* @__PURE__ */ e.jsx("h4", { className: "font-medium leading-none", children: "Scale Options" }),
|
|
@@ -3963,7 +3994,7 @@ function Wa() {
|
|
|
3963
3994
|
{
|
|
3964
3995
|
disabled: k,
|
|
3965
3996
|
value: o,
|
|
3966
|
-
onValueChange: (E) =>
|
|
3997
|
+
onValueChange: (E) => r(E),
|
|
3967
3998
|
children: [
|
|
3968
3999
|
/* @__PURE__ */ e.jsx(he, { className: "col-span-2 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(xe, {}) }),
|
|
3969
4000
|
/* @__PURE__ */ e.jsx(pe, { id: "type", children: /* @__PURE__ */ e.jsxs(Se, { children: [
|
|
@@ -3988,11 +4019,11 @@ function Wa() {
|
|
|
3988
4019
|
defaultValue: "x",
|
|
3989
4020
|
children: [
|
|
3990
4021
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
3991
|
-
/* @__PURE__ */ e.jsx(
|
|
4022
|
+
/* @__PURE__ */ e.jsx(Ie, { value: "auto", id: "r1" }),
|
|
3992
4023
|
/* @__PURE__ */ e.jsx("label", { className: "text-sm", htmlFor: "r1", children: "Auto" })
|
|
3993
4024
|
] }),
|
|
3994
4025
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
3995
|
-
/* @__PURE__ */ e.jsx(
|
|
4026
|
+
/* @__PURE__ */ e.jsx(Ie, { value: "custom", id: "r2" }),
|
|
3996
4027
|
/* @__PURE__ */ e.jsx("label", { className: "text-sm", htmlFor: "r2", children: "Custom" })
|
|
3997
4028
|
] })
|
|
3998
4029
|
]
|
|
@@ -4001,9 +4032,9 @@ function Wa() {
|
|
|
4001
4032
|
] }),
|
|
4002
4033
|
y === "custom" && o == "linear" && P(),
|
|
4003
4034
|
H(),
|
|
4004
|
-
/* @__PURE__ */ e.jsx(
|
|
4035
|
+
/* @__PURE__ */ e.jsx(en, {}),
|
|
4005
4036
|
/* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-3", children: /* @__PURE__ */ e.jsx(
|
|
4006
|
-
|
|
4037
|
+
z,
|
|
4007
4038
|
{
|
|
4008
4039
|
onClick: Y,
|
|
4009
4040
|
variant: "secondary",
|
|
@@ -4015,7 +4046,7 @@ function Wa() {
|
|
|
4015
4046
|
] }) })
|
|
4016
4047
|
] });
|
|
4017
4048
|
}
|
|
4018
|
-
function
|
|
4049
|
+
function Ll({ idx: s }) {
|
|
4019
4050
|
var c;
|
|
4020
4051
|
const t = m((d) => {
|
|
4021
4052
|
var p;
|
|
@@ -4028,8 +4059,8 @@ function Tl({ idx: s }) {
|
|
|
4028
4059
|
), n = m(
|
|
4029
4060
|
(d) => d.actions.setCardPreferences
|
|
4030
4061
|
), l = (c = t == null ? void 0 : t.chartOptions) == null ? void 0 : c.indexAxis, o = a == null ? void 0 : a.find((d) => d.idx === s);
|
|
4031
|
-
function
|
|
4032
|
-
(d === "end" || d === "start") &&
|
|
4062
|
+
function r(d, p) {
|
|
4063
|
+
(d === "end" || d === "start") && sn(an());
|
|
4033
4064
|
const u = {
|
|
4034
4065
|
display: d !== "none",
|
|
4035
4066
|
align: d,
|
|
@@ -4060,12 +4091,12 @@ function Tl({ idx: s }) {
|
|
|
4060
4091
|
}
|
|
4061
4092
|
}
|
|
4062
4093
|
return /* @__PURE__ */ e.jsxs(ms, { children: [
|
|
4063
|
-
/* @__PURE__ */ e.jsx(hs, { children: /* @__PURE__ */ e.jsx(
|
|
4094
|
+
/* @__PURE__ */ e.jsx(hs, { children: /* @__PURE__ */ e.jsx(Jn, { className: "invisible size-4 rotate-[135deg] cursor-pointer text-muted-foreground hover:text-foreground group-hover:visible" }) }),
|
|
4064
4095
|
/* @__PURE__ */ e.jsx(xs, { className: "w-fit p-1", children: /* @__PURE__ */ e.jsxs("div", { className: "flex gap-1", children: [
|
|
4065
4096
|
/* @__PURE__ */ e.jsx(
|
|
4066
|
-
|
|
4097
|
+
z,
|
|
4067
4098
|
{
|
|
4068
|
-
onClick: () =>
|
|
4099
|
+
onClick: () => r("none", s),
|
|
4069
4100
|
size: "sm",
|
|
4070
4101
|
variant: "secondary",
|
|
4071
4102
|
className: "h-7 p-1 text-xs font-normal",
|
|
@@ -4073,14 +4104,14 @@ function Tl({ idx: s }) {
|
|
|
4073
4104
|
}
|
|
4074
4105
|
),
|
|
4075
4106
|
/* @__PURE__ */ e.jsx(
|
|
4076
|
-
|
|
4107
|
+
z,
|
|
4077
4108
|
{
|
|
4078
|
-
onClick: () =>
|
|
4109
|
+
onClick: () => r("start", s),
|
|
4079
4110
|
size: "sm",
|
|
4080
4111
|
variant: "secondary",
|
|
4081
4112
|
className: "h-7 p-1 text-xs font-normal",
|
|
4082
4113
|
children: /* @__PURE__ */ e.jsx(
|
|
4083
|
-
|
|
4114
|
+
Vn,
|
|
4084
4115
|
{
|
|
4085
4116
|
className: W("h-4 w-4", {
|
|
4086
4117
|
"rotate-90": l === "y"
|
|
@@ -4090,14 +4121,14 @@ function Tl({ idx: s }) {
|
|
|
4090
4121
|
}
|
|
4091
4122
|
),
|
|
4092
4123
|
/* @__PURE__ */ e.jsx(
|
|
4093
|
-
|
|
4124
|
+
z,
|
|
4094
4125
|
{
|
|
4095
|
-
onClick: () =>
|
|
4126
|
+
onClick: () => r("center", s),
|
|
4096
4127
|
size: "sm",
|
|
4097
4128
|
variant: "secondary",
|
|
4098
4129
|
className: "h-7 p-1 text-xs font-normal",
|
|
4099
4130
|
children: /* @__PURE__ */ e.jsx(
|
|
4100
|
-
|
|
4131
|
+
Rn,
|
|
4101
4132
|
{
|
|
4102
4133
|
className: W("h-4 w-4", {
|
|
4103
4134
|
"rotate-90": l === "y"
|
|
@@ -4107,14 +4138,14 @@ function Tl({ idx: s }) {
|
|
|
4107
4138
|
}
|
|
4108
4139
|
),
|
|
4109
4140
|
/* @__PURE__ */ e.jsx(
|
|
4110
|
-
|
|
4141
|
+
z,
|
|
4111
4142
|
{
|
|
4112
|
-
onClick: () =>
|
|
4143
|
+
onClick: () => r("end", s),
|
|
4113
4144
|
size: "sm",
|
|
4114
4145
|
variant: "secondary",
|
|
4115
4146
|
className: "h-7 p-1 text-xs font-normal",
|
|
4116
4147
|
children: /* @__PURE__ */ e.jsx(
|
|
4117
|
-
|
|
4148
|
+
qn,
|
|
4118
4149
|
{
|
|
4119
4150
|
className: W("h-4 w-4", {
|
|
4120
4151
|
"rotate-90": l === "y"
|
|
@@ -4132,14 +4163,14 @@ function Ya() {
|
|
|
4132
4163
|
var u, y, g;
|
|
4133
4164
|
return (g = (y = (u = p == null ? void 0 : p.card) == null ? void 0 : u.preferences) == null ? void 0 : y.chartOptions) == null ? void 0 : g.indexAxis;
|
|
4134
4165
|
}
|
|
4135
|
-
), { data: a } =
|
|
4166
|
+
), { data: a } = qe(s), n = t === "y" ? "Y axis" : "X axis", l = t === "y" ? "X axis" : "Y axis", {
|
|
4136
4167
|
keys: o,
|
|
4137
|
-
metricKeys:
|
|
4168
|
+
metricKeys: r,
|
|
4138
4169
|
dimensionKeys: c
|
|
4139
4170
|
} = vs((a == null ? void 0 : a.records) || []);
|
|
4140
|
-
let d =
|
|
4171
|
+
let d = r;
|
|
4141
4172
|
if (["stackedBar", "stackedLine"].includes(s.type)) {
|
|
4142
|
-
const p =
|
|
4173
|
+
const p = tn({
|
|
4143
4174
|
dataArray: (a == null ? void 0 : a.records) || [],
|
|
4144
4175
|
groupKey: c[0],
|
|
4145
4176
|
pivotKey: c[1],
|
|
@@ -4157,11 +4188,11 @@ function Ya() {
|
|
|
4157
4188
|
/* @__PURE__ */ e.jsx(R, { children: l }),
|
|
4158
4189
|
/* @__PURE__ */ e.jsx(Wa, {})
|
|
4159
4190
|
] }),
|
|
4160
|
-
/* @__PURE__ */ e.jsx("div", { className: "my-1 space-y-1", children: d.map((p, u) => /* @__PURE__ */ e.jsx(
|
|
4191
|
+
/* @__PURE__ */ e.jsx("div", { className: "my-1 space-y-1", children: d.map((p, u) => /* @__PURE__ */ e.jsx(Ml, { col: p, idx: u }, p)) })
|
|
4161
4192
|
] })
|
|
4162
4193
|
] });
|
|
4163
4194
|
}
|
|
4164
|
-
function
|
|
4195
|
+
function Ml({ col: s, idx: t }) {
|
|
4165
4196
|
const a = m((c) => {
|
|
4166
4197
|
var d;
|
|
4167
4198
|
return (d = c.card) == null ? void 0 : d.preferences;
|
|
@@ -4171,7 +4202,7 @@ function Dl({ col: s, idx: t }) {
|
|
|
4171
4202
|
return (d = c.card.preferences) == null ? void 0 : d.datasetOptions;
|
|
4172
4203
|
}
|
|
4173
4204
|
), l = n == null ? void 0 : n.find((c) => c.idx === t), { setCardPreferences: o } = m((c) => c.actions);
|
|
4174
|
-
function
|
|
4205
|
+
function r(c) {
|
|
4175
4206
|
if (!l)
|
|
4176
4207
|
o({
|
|
4177
4208
|
...a,
|
|
@@ -4202,53 +4233,53 @@ function Dl({ col: s, idx: t }) {
|
|
|
4202
4233
|
/* @__PURE__ */ e.jsx(
|
|
4203
4234
|
Ps,
|
|
4204
4235
|
{
|
|
4205
|
-
onClick: () =>
|
|
4236
|
+
onClick: () => r("bar"),
|
|
4206
4237
|
className: "invisible size-4 cursor-pointer text-muted-foreground hover:text-foreground group-hover:visible"
|
|
4207
4238
|
}
|
|
4208
4239
|
),
|
|
4209
4240
|
/* @__PURE__ */ e.jsx(
|
|
4210
4241
|
Bs,
|
|
4211
4242
|
{
|
|
4212
|
-
onClick: () =>
|
|
4243
|
+
onClick: () => r("line"),
|
|
4213
4244
|
className: "invisible size-4 cursor-pointer text-muted-foreground hover:text-foreground group-hover:visible"
|
|
4214
4245
|
}
|
|
4215
4246
|
),
|
|
4216
4247
|
/* @__PURE__ */ e.jsx(
|
|
4217
|
-
|
|
4248
|
+
wn,
|
|
4218
4249
|
{
|
|
4219
|
-
onClick: () =>
|
|
4250
|
+
onClick: () => r("area"),
|
|
4220
4251
|
className: "invisible size-4 cursor-pointer text-muted-foreground hover:text-foreground group-hover:visible"
|
|
4221
4252
|
}
|
|
4222
4253
|
),
|
|
4223
|
-
/* @__PURE__ */ e.jsx(
|
|
4254
|
+
/* @__PURE__ */ e.jsx(Ll, { idx: t })
|
|
4224
4255
|
] })
|
|
4225
4256
|
] });
|
|
4226
4257
|
}
|
|
4227
4258
|
function Xa() {
|
|
4228
|
-
const s = m((g) => g.selectedConnectionId), t = m((g) => g.selectedDatamodelId), a = m((g) => g.selectedDatabaseName), n = m((g) => g.selectedSchemaName), l = m((g) => g.selectedTableName), o =
|
|
4259
|
+
const s = m((g) => g.selectedConnectionId), t = m((g) => g.selectedDatamodelId), a = m((g) => g.selectedDatabaseName), n = m((g) => g.selectedSchemaName), l = m((g) => g.selectedTableName), o = O((g) => g.dashboard.filters) || [], r = O((g) => g.actions.addFilter), c = O((g) => g.actions.removeFilter), d = O(
|
|
4229
4260
|
(g) => g.actions.removeFilterValue
|
|
4230
|
-
), { modelItems: p, tableName: u } =
|
|
4261
|
+
), { modelItems: p, tableName: u } = Re();
|
|
4231
4262
|
function y(g, x = "dashboard") {
|
|
4232
4263
|
var S;
|
|
4233
4264
|
const j = de(g.column_name), b = de(a || ""), I = de(n || ""), C = de(u);
|
|
4234
|
-
let
|
|
4265
|
+
let T = fa(
|
|
4235
4266
|
I,
|
|
4236
4267
|
C
|
|
4237
|
-
), F = `${
|
|
4268
|
+
), F = `${T}.${j}`;
|
|
4238
4269
|
const A = (S = p == null ? void 0 : p.find(
|
|
4239
|
-
(
|
|
4270
|
+
(L) => L.id === t
|
|
4240
4271
|
)) == null ? void 0 : S.name;
|
|
4241
|
-
t && t !== "none" && (F = `${ys}.${A}.${j}`,
|
|
4272
|
+
t && t !== "none" && (F = `${ys}.${A}.${j}`, T = `${ys}.${A}`);
|
|
4242
4273
|
const N = o == null ? void 0 : o.find(
|
|
4243
|
-
(
|
|
4274
|
+
(L) => L.column === F && L.table === C && (L.database === b || L.database === a)
|
|
4244
4275
|
);
|
|
4245
4276
|
if (N)
|
|
4246
4277
|
d(N.id), c(N.id);
|
|
4247
4278
|
else {
|
|
4248
|
-
const
|
|
4249
|
-
return u === "api" && s ? (
|
|
4279
|
+
const L = Je();
|
|
4280
|
+
return u === "api" && s ? (r({
|
|
4250
4281
|
location: x,
|
|
4251
|
-
id:
|
|
4282
|
+
id: L,
|
|
4252
4283
|
//uuidv4(),
|
|
4253
4284
|
column: F,
|
|
4254
4285
|
title: g.column_name,
|
|
@@ -4260,12 +4291,12 @@ function Xa() {
|
|
|
4260
4291
|
operation: "in",
|
|
4261
4292
|
sql: Zs(
|
|
4262
4293
|
g.data_type,
|
|
4263
|
-
|
|
4294
|
+
T,
|
|
4264
4295
|
j
|
|
4265
4296
|
)
|
|
4266
4297
|
//DATE_DATA_TYPES.includes(column.data_type) ? dateSql : sql,
|
|
4267
|
-
}),
|
|
4268
|
-
id:
|
|
4298
|
+
}), L) : (r({
|
|
4299
|
+
id: L,
|
|
4269
4300
|
//uuidv4(),
|
|
4270
4301
|
location: x,
|
|
4271
4302
|
column: F,
|
|
@@ -4278,39 +4309,39 @@ function Xa() {
|
|
|
4278
4309
|
operation: "in",
|
|
4279
4310
|
sql: Zs(
|
|
4280
4311
|
g.data_type,
|
|
4281
|
-
|
|
4312
|
+
T,
|
|
4282
4313
|
j
|
|
4283
4314
|
)
|
|
4284
4315
|
//DATE_DATA_TYPES.includes(column.data_type) ? dateSql : sql,
|
|
4285
|
-
}),
|
|
4316
|
+
}), L);
|
|
4286
4317
|
}
|
|
4287
4318
|
}
|
|
4288
4319
|
return { assignFilter: y };
|
|
4289
4320
|
}
|
|
4290
|
-
function
|
|
4291
|
-
const s =
|
|
4321
|
+
function _e() {
|
|
4322
|
+
const s = O(
|
|
4292
4323
|
(c) => c.dashboard.filters
|
|
4293
|
-
), t = m((c) => c.frame), { setFrame: a } = re(), { columns: n } =
|
|
4324
|
+
), t = m((c) => c.frame), { setFrame: a } = re(), { columns: n } = Re(), { assignFilter: l } = Xa();
|
|
4294
4325
|
function o(c) {
|
|
4295
4326
|
const d = l(c, "frame");
|
|
4296
4327
|
a({ ...t, filterId: d });
|
|
4297
4328
|
}
|
|
4298
|
-
const
|
|
4329
|
+
const r = s == null ? void 0 : s.find((c) => c.id === t.filterId);
|
|
4299
4330
|
return /* @__PURE__ */ e.jsxs("div", { className: "space-y-3", children: [
|
|
4300
4331
|
/* @__PURE__ */ e.jsx(R, { children: "Card Filter" }),
|
|
4301
|
-
/* @__PURE__ */ e.jsx(
|
|
4302
|
-
|
|
4332
|
+
/* @__PURE__ */ e.jsx(El, { onSelect: o, columns: n }),
|
|
4333
|
+
r && /* @__PURE__ */ e.jsx(nn, { filter: r })
|
|
4303
4334
|
] });
|
|
4304
4335
|
}
|
|
4305
|
-
function
|
|
4336
|
+
function El({
|
|
4306
4337
|
columns: s,
|
|
4307
4338
|
onSelect: t
|
|
4308
4339
|
}) {
|
|
4309
|
-
var
|
|
4340
|
+
var r;
|
|
4310
4341
|
const [a, n] = ea.useState(!1), [l, o] = ea.useState("");
|
|
4311
4342
|
return /* @__PURE__ */ e.jsxs(ms, { open: a, onOpenChange: n, children: [
|
|
4312
4343
|
/* @__PURE__ */ e.jsx(hs, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
4313
|
-
|
|
4344
|
+
z,
|
|
4314
4345
|
{
|
|
4315
4346
|
size: "sm",
|
|
4316
4347
|
variant: "outline",
|
|
@@ -4318,17 +4349,17 @@ function Ml({
|
|
|
4318
4349
|
"aria-expanded": a,
|
|
4319
4350
|
className: "w-full justify-between font-normal",
|
|
4320
4351
|
children: [
|
|
4321
|
-
l ? (
|
|
4322
|
-
/* @__PURE__ */ e.jsx(
|
|
4352
|
+
l ? (r = s.find((c) => c.column_name === l)) == null ? void 0 : r.column_name : "Select Column...",
|
|
4353
|
+
/* @__PURE__ */ e.jsx(ln, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
|
|
4323
4354
|
]
|
|
4324
4355
|
}
|
|
4325
4356
|
) }),
|
|
4326
|
-
/* @__PURE__ */ e.jsx(xs, { className: "w-[200px] p-0", children: /* @__PURE__ */ e.jsxs(
|
|
4327
|
-
/* @__PURE__ */ e.jsx(
|
|
4328
|
-
/* @__PURE__ */ e.jsxs(
|
|
4329
|
-
/* @__PURE__ */ e.jsx(
|
|
4330
|
-
/* @__PURE__ */ e.jsx(
|
|
4331
|
-
|
|
4357
|
+
/* @__PURE__ */ e.jsx(xs, { className: "w-[200px] p-0", children: /* @__PURE__ */ e.jsxs(rn, { children: [
|
|
4358
|
+
/* @__PURE__ */ e.jsx(on, { placeholder: "Search column", className: "h-9" }),
|
|
4359
|
+
/* @__PURE__ */ e.jsxs(cn, { children: [
|
|
4360
|
+
/* @__PURE__ */ e.jsx(dn, { children: "No framework found." }),
|
|
4361
|
+
/* @__PURE__ */ e.jsx(un, { children: s.map((c) => /* @__PURE__ */ e.jsxs(
|
|
4362
|
+
mn,
|
|
4332
4363
|
{
|
|
4333
4364
|
value: c.column_name,
|
|
4334
4365
|
onSelect: (d) => {
|
|
@@ -4354,10 +4385,10 @@ function Ml({
|
|
|
4354
4385
|
] }) })
|
|
4355
4386
|
] });
|
|
4356
4387
|
}
|
|
4357
|
-
function
|
|
4388
|
+
function Al({
|
|
4358
4389
|
cardType: s
|
|
4359
4390
|
}) {
|
|
4360
|
-
return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(
|
|
4391
|
+
return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(De, { defaultValue: ["item-2"], type: "multiple", children: [
|
|
4361
4392
|
/* @__PURE__ */ e.jsxs(B, { value: "item-1", children: [
|
|
4362
4393
|
/* @__PURE__ */ e.jsx(U, { children: `${$s(s)} Chart` }),
|
|
4363
4394
|
/* @__PURE__ */ e.jsxs(G, { className: "space-y-4 font-mono text-xs", children: [
|
|
@@ -4393,14 +4424,14 @@ function Ll({
|
|
|
4393
4424
|
/* @__PURE__ */ e.jsxs(B, { value: "item-3", children: [
|
|
4394
4425
|
/* @__PURE__ */ e.jsx(U, { children: "Filters" }),
|
|
4395
4426
|
/* @__PURE__ */ e.jsxs(G, { className: "space-y-4 px-2", children: [
|
|
4396
|
-
/* @__PURE__ */ e.jsx(
|
|
4397
|
-
/* @__PURE__ */ e.jsx(
|
|
4427
|
+
/* @__PURE__ */ e.jsx(Te, {}),
|
|
4428
|
+
/* @__PURE__ */ e.jsx(_e, {})
|
|
4398
4429
|
] })
|
|
4399
4430
|
] })
|
|
4400
4431
|
] }) });
|
|
4401
4432
|
}
|
|
4402
4433
|
function Gs() {
|
|
4403
|
-
var l, o,
|
|
4434
|
+
var l, o, r;
|
|
4404
4435
|
const s = m(
|
|
4405
4436
|
(c) => c.card.cfg
|
|
4406
4437
|
), t = m((c) => c.actions.setCardCfg), a = m((c) => c.card.type);
|
|
@@ -4433,7 +4464,7 @@ function Gs() {
|
|
|
4433
4464
|
/* @__PURE__ */ e.jsxs(
|
|
4434
4465
|
me,
|
|
4435
4466
|
{
|
|
4436
|
-
value: (
|
|
4467
|
+
value: (r = (o = (l = s == null ? void 0 : s.options) == null ? void 0 : l.plugins) == null ? void 0 : o.datalabels) == null ? void 0 : r.anchor,
|
|
4437
4468
|
onValueChange: n,
|
|
4438
4469
|
defaultValue: "none",
|
|
4439
4470
|
children: [
|
|
@@ -4450,7 +4481,7 @@ function Gs() {
|
|
|
4450
4481
|
)
|
|
4451
4482
|
] });
|
|
4452
4483
|
}
|
|
4453
|
-
function
|
|
4484
|
+
function Vl({
|
|
4454
4485
|
cardType: s
|
|
4455
4486
|
}) {
|
|
4456
4487
|
function t(a) {
|
|
@@ -4479,7 +4510,7 @@ function El({
|
|
|
4479
4510
|
] })
|
|
4480
4511
|
] });
|
|
4481
4512
|
}
|
|
4482
|
-
return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(
|
|
4513
|
+
return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(De, { defaultValue: ["item-2"], type: "multiple", children: [
|
|
4483
4514
|
/* @__PURE__ */ e.jsxs(B, { value: "item-1", children: [
|
|
4484
4515
|
/* @__PURE__ */ e.jsx(U, { children: `${$s(s)} Chart` }),
|
|
4485
4516
|
/* @__PURE__ */ e.jsx(G, { className: "space-y-4 font-mono text-xs", children: t(s) })
|
|
@@ -4491,13 +4522,13 @@ function El({
|
|
|
4491
4522
|
/* @__PURE__ */ e.jsxs(B, { value: "item-3", children: [
|
|
4492
4523
|
/* @__PURE__ */ e.jsx(U, { children: "Filters" }),
|
|
4493
4524
|
/* @__PURE__ */ e.jsxs(G, { className: "space-y-4 px-2", children: [
|
|
4494
|
-
/* @__PURE__ */ e.jsx(
|
|
4495
|
-
/* @__PURE__ */ e.jsx(
|
|
4525
|
+
/* @__PURE__ */ e.jsx(Te, {}),
|
|
4526
|
+
/* @__PURE__ */ e.jsx(_e, {})
|
|
4496
4527
|
] })
|
|
4497
4528
|
] })
|
|
4498
4529
|
] }) });
|
|
4499
4530
|
}
|
|
4500
|
-
const
|
|
4531
|
+
const ql = {
|
|
4501
4532
|
datasets: [
|
|
4502
4533
|
{
|
|
4503
4534
|
type: "line",
|
|
@@ -4510,7 +4541,7 @@ const Al = {
|
|
|
4510
4541
|
data: []
|
|
4511
4542
|
}
|
|
4512
4543
|
]
|
|
4513
|
-
},
|
|
4544
|
+
}, Rl = {
|
|
4514
4545
|
datasets: [
|
|
4515
4546
|
{
|
|
4516
4547
|
fill: "origin",
|
|
@@ -4520,27 +4551,27 @@ const Al = {
|
|
|
4520
4551
|
}
|
|
4521
4552
|
]
|
|
4522
4553
|
};
|
|
4523
|
-
function
|
|
4554
|
+
function _l() {
|
|
4524
4555
|
const s = m((t) => t.card.type);
|
|
4525
4556
|
return /* @__PURE__ */ e.jsxs("div", { className: "space-y-6 p-6", children: [
|
|
4526
4557
|
/* @__PURE__ */ e.jsx(
|
|
4527
|
-
|
|
4558
|
+
De,
|
|
4528
4559
|
{
|
|
4529
4560
|
className: " ",
|
|
4530
4561
|
type: "single",
|
|
4531
4562
|
collapsible: !0,
|
|
4532
|
-
children:
|
|
4563
|
+
children: Hl(s)
|
|
4533
4564
|
}
|
|
4534
4565
|
),
|
|
4535
4566
|
/* @__PURE__ */ e.jsx("section", { className: "", children: ["line", "bar"].includes(s) && /* @__PURE__ */ e.jsx(fs, {}) }),
|
|
4536
4567
|
!["kpi"].includes(s) && /* @__PURE__ */ e.jsxs("div", { className: "space-y-4", children: [
|
|
4537
4568
|
/* @__PURE__ */ e.jsx(Gs, {}),
|
|
4538
|
-
/* @__PURE__ */ e.jsx(
|
|
4539
|
-
/* @__PURE__ */ e.jsx(
|
|
4569
|
+
/* @__PURE__ */ e.jsx(Te, {}),
|
|
4570
|
+
/* @__PURE__ */ e.jsx(_e, {})
|
|
4540
4571
|
] })
|
|
4541
4572
|
] });
|
|
4542
4573
|
}
|
|
4543
|
-
function
|
|
4574
|
+
function Hl(s) {
|
|
4544
4575
|
if (["line", "bar"].includes(s))
|
|
4545
4576
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
4546
4577
|
/* @__PURE__ */ e.jsxs(B, { value: "item-1", children: [
|
|
@@ -4561,7 +4592,7 @@ function Rl(s) {
|
|
|
4561
4592
|
/* @__PURE__ */ e.jsx("b", { children: "Customize" }),
|
|
4562
4593
|
" and change the `type` property in the dataset."
|
|
4563
4594
|
] }),
|
|
4564
|
-
/* @__PURE__ */ e.jsx("pre", { children: JSON.stringify(
|
|
4595
|
+
/* @__PURE__ */ e.jsx("pre", { children: JSON.stringify(ql, null, 2) })
|
|
4565
4596
|
] })
|
|
4566
4597
|
] }),
|
|
4567
4598
|
/* @__PURE__ */ e.jsxs(B, { value: "item-3", children: [
|
|
@@ -4582,7 +4613,7 @@ function Rl(s) {
|
|
|
4582
4613
|
),
|
|
4583
4614
|
"for more options."
|
|
4584
4615
|
] }),
|
|
4585
|
-
/* @__PURE__ */ e.jsx("pre", { children: JSON.stringify(
|
|
4616
|
+
/* @__PURE__ */ e.jsx("pre", { children: JSON.stringify(Rl, null, 2) })
|
|
4586
4617
|
] })
|
|
4587
4618
|
] })
|
|
4588
4619
|
] });
|
|
@@ -4637,7 +4668,7 @@ function Rl(s) {
|
|
|
4637
4668
|
] })
|
|
4638
4669
|
] }) });
|
|
4639
4670
|
}
|
|
4640
|
-
function
|
|
4671
|
+
function $l() {
|
|
4641
4672
|
var d, p, u, y, g;
|
|
4642
4673
|
const s = m((x) => x.card.preferences), t = m(
|
|
4643
4674
|
(x) => x.actions.setCardPreferences
|
|
@@ -4669,7 +4700,7 @@ function _l() {
|
|
|
4669
4700
|
var j, b;
|
|
4670
4701
|
return (b = (j = x.card.preferences) == null ? void 0 : j.formatNumber) == null ? void 0 : b.colorRanges;
|
|
4671
4702
|
}
|
|
4672
|
-
) || [],
|
|
4703
|
+
) || [], r = m(
|
|
4673
4704
|
(x) => x.actions.setColorRanges
|
|
4674
4705
|
), c = [...new Set(os.map((x) => x.currency))];
|
|
4675
4706
|
return /* @__PURE__ */ e.jsxs("div", { children: [
|
|
@@ -4794,18 +4825,18 @@ function _l() {
|
|
|
4794
4825
|
] }) }),
|
|
4795
4826
|
/* @__PURE__ */ e.jsx(ge, { className: "my-3" }),
|
|
4796
4827
|
/* @__PURE__ */ e.jsx(
|
|
4797
|
-
|
|
4828
|
+
hn,
|
|
4798
4829
|
{
|
|
4799
4830
|
colorRanges: o,
|
|
4800
|
-
setColorRanges:
|
|
4831
|
+
setColorRanges: r
|
|
4801
4832
|
}
|
|
4802
4833
|
)
|
|
4803
4834
|
] })
|
|
4804
4835
|
] });
|
|
4805
4836
|
}
|
|
4806
|
-
function
|
|
4837
|
+
function Pl() {
|
|
4807
4838
|
return /* @__PURE__ */ e.jsxs("div", { className: "space-y-6 px-6 py-2", children: [
|
|
4808
|
-
/* @__PURE__ */ e.jsx(
|
|
4839
|
+
/* @__PURE__ */ e.jsx(De, { type: "single", collapsible: !0, children: /* @__PURE__ */ e.jsxs(B, { value: "item-1", children: [
|
|
4809
4840
|
/* @__PURE__ */ e.jsx(U, { className: "", children: "KPI Query" }),
|
|
4810
4841
|
/* @__PURE__ */ e.jsxs(G, { className: "font-mono", children: [
|
|
4811
4842
|
/* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 font-mono text-xs", children: "SELECT current, previous FROM table" }),
|
|
@@ -4829,12 +4860,12 @@ function Hl() {
|
|
|
4829
4860
|
] })
|
|
4830
4861
|
] })
|
|
4831
4862
|
] }) }),
|
|
4832
|
-
/* @__PURE__ */ e.jsx("section", { className: "", children: /* @__PURE__ */ e.jsx(
|
|
4863
|
+
/* @__PURE__ */ e.jsx("section", { className: "", children: /* @__PURE__ */ e.jsx($l, {}) }),
|
|
4833
4864
|
/* @__PURE__ */ e.jsx("div", {}),
|
|
4834
4865
|
/* @__PURE__ */ e.jsx("div", {})
|
|
4835
4866
|
] });
|
|
4836
4867
|
}
|
|
4837
|
-
const
|
|
4868
|
+
const Bl = [
|
|
4838
4869
|
{
|
|
4839
4870
|
label: "Mercator",
|
|
4840
4871
|
value: "mercator"
|
|
@@ -4891,7 +4922,7 @@ const $l = [
|
|
|
4891
4922
|
label: "Natural Earth 1",
|
|
4892
4923
|
value: "naturalEarth1"
|
|
4893
4924
|
}
|
|
4894
|
-
],
|
|
4925
|
+
], Ul = [
|
|
4895
4926
|
"blues",
|
|
4896
4927
|
"brBG",
|
|
4897
4928
|
"buGn",
|
|
@@ -4930,15 +4961,15 @@ const $l = [
|
|
|
4930
4961
|
"ylGnBu",
|
|
4931
4962
|
"ylOrBr",
|
|
4932
4963
|
"ylOrRd"
|
|
4933
|
-
],
|
|
4964
|
+
], Gl = Ul.map((s) => ({
|
|
4934
4965
|
label: s,
|
|
4935
4966
|
value: s
|
|
4936
4967
|
}));
|
|
4937
|
-
function
|
|
4938
|
-
var d, p, u, y, g, x, j, b, I, C,
|
|
4968
|
+
function Ql() {
|
|
4969
|
+
var d, p, u, y, g, x, j, b, I, C, T, F, A, N, S, L, h, v;
|
|
4939
4970
|
const s = m((f) => f.card), t = (p = (d = s == null ? void 0 : s.preferences) == null ? void 0 : d.mapVisualOptions) == null ? void 0 : p.topoJsonUrl, [a, n] = q(
|
|
4940
4971
|
((y = (u = s == null ? void 0 : s.preferences) == null ? void 0 : u.mapVisualOptions) == null ? void 0 : y.customTopoJsonUrl) || ""
|
|
4941
|
-
), { setCardPreferences: l } = re(), { data: o } = _s(s),
|
|
4972
|
+
), { setCardPreferences: l } = re(), { data: o } = _s(s), r = Object.keys((o == null ? void 0 : o.objects) || {}).map((f) => ({
|
|
4942
4973
|
label: f,
|
|
4943
4974
|
value: f
|
|
4944
4975
|
})) || [], c = [
|
|
@@ -4956,9 +4987,9 @@ function Ul() {
|
|
|
4956
4987
|
}
|
|
4957
4988
|
];
|
|
4958
4989
|
return /* @__PURE__ */ e.jsxs("div", { className: "p-6", children: [
|
|
4959
|
-
/* @__PURE__ */ e.jsx(
|
|
4990
|
+
/* @__PURE__ */ e.jsx(Ge, { summary: "Map Query", children: /* @__PURE__ */ e.jsx("p", { className: "rounded-md bg-muted p-2 font-mono text-xs", children: "SELECT country, value FROM table" }) }),
|
|
4960
4991
|
/* @__PURE__ */ e.jsx(ge, { className: "my-4" }),
|
|
4961
|
-
/* @__PURE__ */ e.jsx(
|
|
4992
|
+
/* @__PURE__ */ e.jsx(Ge, { open: !0, summary: "Settings", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-3 px-2", children: [
|
|
4962
4993
|
/* @__PURE__ */ e.jsx(
|
|
4963
4994
|
ue,
|
|
4964
4995
|
{
|
|
@@ -4994,7 +5025,7 @@ function Ul() {
|
|
|
4994
5025
|
});
|
|
4995
5026
|
},
|
|
4996
5027
|
value: a,
|
|
4997
|
-
className: `h-9 w-full ${
|
|
5028
|
+
className: `h-9 w-full ${Be}`,
|
|
4998
5029
|
placeholder: "Custom URL"
|
|
4999
5030
|
}
|
|
5000
5031
|
),
|
|
@@ -5005,7 +5036,7 @@ function Ul() {
|
|
|
5005
5036
|
ue,
|
|
5006
5037
|
{
|
|
5007
5038
|
className: "h-9",
|
|
5008
|
-
options:
|
|
5039
|
+
options: r,
|
|
5009
5040
|
value: ((x = (g = s.preferences) == null ? void 0 : g.mapVisualOptions) == null ? void 0 : x.objectKey) || "",
|
|
5010
5041
|
label: "Map Object",
|
|
5011
5042
|
onValueChange: (f) => {
|
|
@@ -5027,7 +5058,7 @@ function Ul() {
|
|
|
5027
5058
|
ue,
|
|
5028
5059
|
{
|
|
5029
5060
|
className: "h-9",
|
|
5030
|
-
options:
|
|
5061
|
+
options: Bl,
|
|
5031
5062
|
value: ((b = (j = s.preferences) == null ? void 0 : j.mapVisualOptions) == null ? void 0 : b.projection) || "",
|
|
5032
5063
|
label: "Projection",
|
|
5033
5064
|
onValueChange: (f) => {
|
|
@@ -5049,7 +5080,7 @@ function Ul() {
|
|
|
5049
5080
|
ue,
|
|
5050
5081
|
{
|
|
5051
5082
|
className: "h-9",
|
|
5052
|
-
options:
|
|
5083
|
+
options: Gl,
|
|
5053
5084
|
value: ((C = (I = s.preferences) == null ? void 0 : I.mapVisualOptions) == null ? void 0 : C.colorScale) || "",
|
|
5054
5085
|
label: "Select Color Scale",
|
|
5055
5086
|
onValueChange: (f) => {
|
|
@@ -5068,14 +5099,14 @@ function Ul() {
|
|
|
5068
5099
|
] })
|
|
5069
5100
|
] }) }),
|
|
5070
5101
|
/* @__PURE__ */ e.jsx(ge, { className: "my-4" }),
|
|
5071
|
-
/* @__PURE__ */ e.jsx(
|
|
5102
|
+
/* @__PURE__ */ e.jsx(Ge, { className: "", summary: "Scale Options", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
5072
5103
|
/* @__PURE__ */ e.jsx(
|
|
5073
5104
|
le,
|
|
5074
5105
|
{
|
|
5075
|
-
className: `h-9 w-full ${
|
|
5106
|
+
className: `h-9 w-full ${Be}`,
|
|
5076
5107
|
type: "number",
|
|
5077
5108
|
step: 0.1,
|
|
5078
|
-
value: ((F = (
|
|
5109
|
+
value: ((F = (T = s.preferences) == null ? void 0 : T.mapVisualOptions) == null ? void 0 : F.projectionScale) || 1,
|
|
5079
5110
|
onChange: (f) => {
|
|
5080
5111
|
var k;
|
|
5081
5112
|
l({
|
|
@@ -5092,19 +5123,19 @@ function Ul() {
|
|
|
5092
5123
|
/* @__PURE__ */ e.jsx(
|
|
5093
5124
|
le,
|
|
5094
5125
|
{
|
|
5095
|
-
className: `h-9 w-full ${
|
|
5126
|
+
className: `h-9 w-full ${Be}`,
|
|
5096
5127
|
type: "number",
|
|
5097
5128
|
step: 10,
|
|
5098
5129
|
value: ((S = (N = (A = s.preferences) == null ? void 0 : A.mapVisualOptions) == null ? void 0 : N.projectionOffset) == null ? void 0 : S[0]) || 0,
|
|
5099
5130
|
onChange: (f) => {
|
|
5100
|
-
var k,
|
|
5131
|
+
var k, M, H, P;
|
|
5101
5132
|
l({
|
|
5102
5133
|
...s.preferences,
|
|
5103
5134
|
mapVisualOptions: {
|
|
5104
5135
|
...(k = s.preferences) == null ? void 0 : k.mapVisualOptions,
|
|
5105
5136
|
projectionOffset: [
|
|
5106
5137
|
Number(f.target.value),
|
|
5107
|
-
((P = (H = (
|
|
5138
|
+
((P = (H = (M = s.preferences) == null ? void 0 : M.mapVisualOptions) == null ? void 0 : H.projectionOffset) == null ? void 0 : P[1]) || 0
|
|
5108
5139
|
]
|
|
5109
5140
|
}
|
|
5110
5141
|
});
|
|
@@ -5115,18 +5146,18 @@ function Ul() {
|
|
|
5115
5146
|
/* @__PURE__ */ e.jsx(
|
|
5116
5147
|
le,
|
|
5117
5148
|
{
|
|
5118
|
-
className: `h-9 w-full ${
|
|
5149
|
+
className: `h-9 w-full ${Be}`,
|
|
5119
5150
|
type: "number",
|
|
5120
5151
|
step: 10,
|
|
5121
|
-
value: ((v = (h = (
|
|
5152
|
+
value: ((v = (h = (L = s.preferences) == null ? void 0 : L.mapVisualOptions) == null ? void 0 : h.projectionOffset) == null ? void 0 : v[1]) || 0,
|
|
5122
5153
|
onChange: (f) => {
|
|
5123
|
-
var k,
|
|
5154
|
+
var k, M, H, P;
|
|
5124
5155
|
l({
|
|
5125
5156
|
...s.preferences,
|
|
5126
5157
|
mapVisualOptions: {
|
|
5127
5158
|
...(k = s.preferences) == null ? void 0 : k.mapVisualOptions,
|
|
5128
5159
|
projectionOffset: [
|
|
5129
|
-
((P = (H = (
|
|
5160
|
+
((P = (H = (M = s.preferences) == null ? void 0 : M.mapVisualOptions) == null ? void 0 : H.projectionOffset) == null ? void 0 : P[0]) || 0,
|
|
5130
5161
|
Number(f.target.value)
|
|
5131
5162
|
]
|
|
5132
5163
|
}
|
|
@@ -5136,10 +5167,10 @@ function Ul() {
|
|
|
5136
5167
|
)
|
|
5137
5168
|
] }) }),
|
|
5138
5169
|
/* @__PURE__ */ e.jsx(ge, { className: "my-4" }),
|
|
5139
|
-
/* @__PURE__ */ e.jsx(
|
|
5170
|
+
/* @__PURE__ */ e.jsx(Te, {})
|
|
5140
5171
|
] });
|
|
5141
5172
|
}
|
|
5142
|
-
function
|
|
5173
|
+
function Jl() {
|
|
5143
5174
|
var n;
|
|
5144
5175
|
const s = m((l) => l.card.preferences), { setCardPreferences: t } = m((l) => l.actions);
|
|
5145
5176
|
function a(l) {
|
|
@@ -5160,11 +5191,11 @@ function Gl() {
|
|
|
5160
5191
|
defaultValue: "x",
|
|
5161
5192
|
children: [
|
|
5162
5193
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
5163
|
-
/* @__PURE__ */ e.jsx(
|
|
5194
|
+
/* @__PURE__ */ e.jsx(Ie, { value: "static", id: "r1" }),
|
|
5164
5195
|
/* @__PURE__ */ e.jsx("label", { className: "text-sm", htmlFor: "r1", children: "Static" })
|
|
5165
5196
|
] }),
|
|
5166
5197
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
5167
|
-
/* @__PURE__ */ e.jsx(
|
|
5198
|
+
/* @__PURE__ */ e.jsx(Ie, { value: "dynamic", id: "r2" }),
|
|
5168
5199
|
/* @__PURE__ */ e.jsx("label", { className: "text-sm", htmlFor: "r2", children: "Dynamic" })
|
|
5169
5200
|
] })
|
|
5170
5201
|
]
|
|
@@ -5177,7 +5208,7 @@ function ns({
|
|
|
5177
5208
|
suffix: a = "Chart"
|
|
5178
5209
|
}) {
|
|
5179
5210
|
let n = "pie-chart";
|
|
5180
|
-
return s === "radar" && (n = "radar-chart"), /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(
|
|
5211
|
+
return s === "radar" && (n = "radar-chart"), /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(De, { defaultValue: ["item-2"], type: "multiple", children: [
|
|
5181
5212
|
/* @__PURE__ */ e.jsxs(B, { value: "item-1", children: [
|
|
5182
5213
|
/* @__PURE__ */ e.jsx(U, { children: `${$s(s)} ${a}` }),
|
|
5183
5214
|
/* @__PURE__ */ e.jsx(G, { children: t || /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
|
|
@@ -5207,19 +5238,19 @@ function ns({
|
|
|
5207
5238
|
/* @__PURE__ */ e.jsxs(G, { className: "space-y-4 px-2", children: [
|
|
5208
5239
|
s === "range" && /* @__PURE__ */ e.jsx(fs, {}),
|
|
5209
5240
|
s !== "text" && /* @__PURE__ */ e.jsx(Gs, {}),
|
|
5210
|
-
s === "text" && /* @__PURE__ */ e.jsx(
|
|
5241
|
+
s === "text" && /* @__PURE__ */ e.jsx(Jl, {})
|
|
5211
5242
|
] })
|
|
5212
5243
|
] }),
|
|
5213
5244
|
!["range", "text"].includes(s) && /* @__PURE__ */ e.jsxs(B, { value: "item-3", children: [
|
|
5214
5245
|
/* @__PURE__ */ e.jsx(U, { children: "Filters" }),
|
|
5215
5246
|
/* @__PURE__ */ e.jsxs(G, { className: "space-y-4 px-2", children: [
|
|
5216
|
-
/* @__PURE__ */ e.jsx(
|
|
5217
|
-
/* @__PURE__ */ e.jsx(
|
|
5247
|
+
/* @__PURE__ */ e.jsx(Te, {}),
|
|
5248
|
+
/* @__PURE__ */ e.jsx(_e, {})
|
|
5218
5249
|
] })
|
|
5219
5250
|
] })
|
|
5220
5251
|
] }) });
|
|
5221
5252
|
}
|
|
5222
|
-
function
|
|
5253
|
+
function Kl() {
|
|
5223
5254
|
const s = m(
|
|
5224
5255
|
(n) => {
|
|
5225
5256
|
var l, o;
|
|
@@ -5256,7 +5287,7 @@ function Ql() {
|
|
|
5256
5287
|
)
|
|
5257
5288
|
] });
|
|
5258
5289
|
}
|
|
5259
|
-
return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(
|
|
5290
|
+
return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(De, { defaultValue: ["item-2"], type: "multiple", children: [
|
|
5260
5291
|
/* @__PURE__ */ e.jsxs(B, { value: "item-1", children: [
|
|
5261
5292
|
/* @__PURE__ */ e.jsx(U, { children: "Stacked Chart" }),
|
|
5262
5293
|
/* @__PURE__ */ e.jsxs(G, { className: "space-y-4 font-mono text-xs", children: [
|
|
@@ -5293,13 +5324,13 @@ function Ql() {
|
|
|
5293
5324
|
/* @__PURE__ */ e.jsxs(B, { value: "item-3", children: [
|
|
5294
5325
|
/* @__PURE__ */ e.jsx(U, { children: "Filters" }),
|
|
5295
5326
|
/* @__PURE__ */ e.jsxs(G, { className: "space-y-4 px-2", children: [
|
|
5296
|
-
/* @__PURE__ */ e.jsx(
|
|
5297
|
-
/* @__PURE__ */ e.jsx(
|
|
5327
|
+
/* @__PURE__ */ e.jsx(Te, {}),
|
|
5328
|
+
/* @__PURE__ */ e.jsx(_e, {})
|
|
5298
5329
|
] })
|
|
5299
5330
|
] })
|
|
5300
5331
|
] }) });
|
|
5301
5332
|
}
|
|
5302
|
-
function
|
|
5333
|
+
function Wl({}) {
|
|
5303
5334
|
const s = m((n) => {
|
|
5304
5335
|
var l;
|
|
5305
5336
|
return (l = n.card) == null ? void 0 : l.preferences;
|
|
@@ -5312,11 +5343,11 @@ function Jl({}) {
|
|
|
5312
5343
|
});
|
|
5313
5344
|
};
|
|
5314
5345
|
return /* @__PURE__ */ e.jsxs("div", { className: "space-y-6 px-6 py-2", children: [
|
|
5315
|
-
/* @__PURE__ */ e.jsx(
|
|
5346
|
+
/* @__PURE__ */ e.jsx(De, { defaultValue: ["item-3"], type: "multiple", children: /* @__PURE__ */ e.jsxs(B, { value: "item-3", children: [
|
|
5316
5347
|
/* @__PURE__ */ e.jsx(U, { children: "Filters" }),
|
|
5317
5348
|
/* @__PURE__ */ e.jsxs(G, { className: "space-y-4 px-2", children: [
|
|
5318
|
-
/* @__PURE__ */ e.jsx(
|
|
5319
|
-
/* @__PURE__ */ e.jsx(
|
|
5349
|
+
/* @__PURE__ */ e.jsx(Te, {}),
|
|
5350
|
+
/* @__PURE__ */ e.jsx(_e, {})
|
|
5320
5351
|
] })
|
|
5321
5352
|
] }) }),
|
|
5322
5353
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
@@ -5332,7 +5363,7 @@ function Jl({}) {
|
|
|
5332
5363
|
] })
|
|
5333
5364
|
] });
|
|
5334
5365
|
}
|
|
5335
|
-
const
|
|
5366
|
+
const Yl = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
|
|
5336
5367
|
/* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT dimension, cohort, metric FROM table" }),
|
|
5337
5368
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
5338
5369
|
"See ",
|
|
@@ -5348,7 +5379,7 @@ const Kl = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-
|
|
|
5348
5379
|
),
|
|
5349
5380
|
" in the docs."
|
|
5350
5381
|
] })
|
|
5351
|
-
] }),
|
|
5382
|
+
] }), Xl = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
|
|
5352
5383
|
/* @__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" }),
|
|
5353
5384
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
5354
5385
|
"See ",
|
|
@@ -5364,7 +5395,7 @@ const Kl = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-
|
|
|
5364
5395
|
),
|
|
5365
5396
|
" in the docs."
|
|
5366
5397
|
] })
|
|
5367
|
-
] }),
|
|
5398
|
+
] }), Zl = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
|
|
5368
5399
|
/* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT text FROM table limit 1" }),
|
|
5369
5400
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
5370
5401
|
"See ",
|
|
@@ -5381,22 +5412,22 @@ const Kl = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-
|
|
|
5381
5412
|
" in the docs."
|
|
5382
5413
|
] })
|
|
5383
5414
|
] });
|
|
5384
|
-
function
|
|
5415
|
+
function er() {
|
|
5385
5416
|
const s = m((a) => a.card.type);
|
|
5386
5417
|
function t(a) {
|
|
5387
5418
|
switch (a) {
|
|
5388
5419
|
case "stackedBar":
|
|
5389
5420
|
case "stackedLine":
|
|
5390
|
-
return /* @__PURE__ */ e.jsx(
|
|
5421
|
+
return /* @__PURE__ */ e.jsx(Kl, {});
|
|
5391
5422
|
case "pyramid":
|
|
5392
|
-
return /* @__PURE__ */ e.jsx(ns, { docContent:
|
|
5423
|
+
return /* @__PURE__ */ e.jsx(ns, { docContent: Yl, cardType: a });
|
|
5393
5424
|
case "kpi":
|
|
5394
|
-
return /* @__PURE__ */ e.jsx(
|
|
5425
|
+
return /* @__PURE__ */ e.jsx(Pl, {});
|
|
5395
5426
|
case "line":
|
|
5396
5427
|
case "bar":
|
|
5397
|
-
return /* @__PURE__ */ e.jsx(
|
|
5428
|
+
return /* @__PURE__ */ e.jsx(Al, { cardType: a });
|
|
5398
5429
|
case "range":
|
|
5399
|
-
return /* @__PURE__ */ e.jsx(ns, { docContent:
|
|
5430
|
+
return /* @__PURE__ */ e.jsx(ns, { docContent: Xl, cardType: a });
|
|
5400
5431
|
case "pie":
|
|
5401
5432
|
case "doughnut":
|
|
5402
5433
|
case "polarArea":
|
|
@@ -5404,29 +5435,29 @@ function Xl() {
|
|
|
5404
5435
|
return /* @__PURE__ */ e.jsx(ns, { cardType: a });
|
|
5405
5436
|
case "bubble":
|
|
5406
5437
|
case "scatter":
|
|
5407
|
-
return /* @__PURE__ */ e.jsx(
|
|
5438
|
+
return /* @__PURE__ */ e.jsx(Vl, { cardType: a });
|
|
5408
5439
|
case "table":
|
|
5409
|
-
return /* @__PURE__ */ e.jsx(
|
|
5440
|
+
return /* @__PURE__ */ e.jsx(Wl, { cardType: a });
|
|
5410
5441
|
case "text":
|
|
5411
5442
|
return /* @__PURE__ */ e.jsx(
|
|
5412
5443
|
ns,
|
|
5413
5444
|
{
|
|
5414
|
-
docContent:
|
|
5445
|
+
docContent: Zl,
|
|
5415
5446
|
cardType: a,
|
|
5416
5447
|
suffix: "Visual"
|
|
5417
5448
|
}
|
|
5418
5449
|
);
|
|
5419
5450
|
case "map":
|
|
5420
|
-
return /* @__PURE__ */ e.jsx(
|
|
5451
|
+
return /* @__PURE__ */ e.jsx(Ql, {});
|
|
5421
5452
|
case "custom":
|
|
5422
|
-
return /* @__PURE__ */ e.jsx(
|
|
5453
|
+
return /* @__PURE__ */ e.jsx(Tl, {});
|
|
5423
5454
|
default:
|
|
5424
|
-
return /* @__PURE__ */ e.jsx(
|
|
5455
|
+
return /* @__PURE__ */ e.jsx(_l, {});
|
|
5425
5456
|
}
|
|
5426
5457
|
}
|
|
5427
5458
|
return /* @__PURE__ */ e.jsx(We, { className: "h-full w-full text-sm", children: t(s) });
|
|
5428
5459
|
}
|
|
5429
|
-
function
|
|
5460
|
+
function sr() {
|
|
5430
5461
|
const s = m((t) => t.isShowingVisual);
|
|
5431
5462
|
return /* @__PURE__ */ e.jsxs(
|
|
5432
5463
|
Cs,
|
|
@@ -5441,7 +5472,7 @@ function Zl() {
|
|
|
5441
5472
|
className: "flex",
|
|
5442
5473
|
minSize: 20,
|
|
5443
5474
|
defaultSize: 40,
|
|
5444
|
-
children: /* @__PURE__ */ e.jsx(
|
|
5475
|
+
children: /* @__PURE__ */ e.jsx(yl, {})
|
|
5445
5476
|
}
|
|
5446
5477
|
),
|
|
5447
5478
|
/* @__PURE__ */ e.jsx(Ns, { withHandle: !0, className: "border" }),
|
|
@@ -5460,7 +5491,7 @@ function Zl() {
|
|
|
5460
5491
|
minSize: 20,
|
|
5461
5492
|
defaultSize: 25,
|
|
5462
5493
|
maxSize: 30,
|
|
5463
|
-
children: /* @__PURE__ */ e.jsx(
|
|
5494
|
+
children: /* @__PURE__ */ e.jsx(er, {})
|
|
5464
5495
|
}
|
|
5465
5496
|
) }),
|
|
5466
5497
|
/* @__PURE__ */ e.jsx(Ns, { className: "border" }),
|
|
@@ -5472,15 +5503,15 @@ function Zl() {
|
|
|
5472
5503
|
}
|
|
5473
5504
|
);
|
|
5474
5505
|
}
|
|
5475
|
-
function
|
|
5476
|
-
|
|
5477
|
-
const n = m((
|
|
5506
|
+
function ar({ authToken: s, onSave: t, onClose: a }) {
|
|
5507
|
+
O((r) => r.themeStyle);
|
|
5508
|
+
const n = m((r) => r.actions.setOnSave), l = m((r) => r.actions.setOnClose), o = O((r) => r.actions.setAuthToken);
|
|
5478
5509
|
return Z(() => {
|
|
5479
5510
|
t && n(t), a && l(a);
|
|
5480
5511
|
}, [t, n, a, l]), Z(() => {
|
|
5481
5512
|
s && s.accessToken && o(s);
|
|
5482
5513
|
}, [s, o]), /* @__PURE__ */ e.jsx(us, { FallbackComponent: ka, children: /* @__PURE__ */ e.jsxs(
|
|
5483
|
-
|
|
5514
|
+
xn,
|
|
5484
5515
|
{
|
|
5485
5516
|
style: {
|
|
5486
5517
|
// borderRadius: currentStyle?.chart?.options?.borderRadius,
|
|
@@ -5489,17 +5520,17 @@ function er({ authToken: s, onSave: t, onClose: a }) {
|
|
|
5489
5520
|
className: "rounded-none",
|
|
5490
5521
|
role: "editor-panel",
|
|
5491
5522
|
children: [
|
|
5492
|
-
/* @__PURE__ */ e.jsx(
|
|
5493
|
-
/* @__PURE__ */ e.jsx(
|
|
5523
|
+
/* @__PURE__ */ e.jsx(pn, { className: "rounded-none border-r-[1.5px]", children: /* @__PURE__ */ e.jsx(Aa, {}) }),
|
|
5524
|
+
/* @__PURE__ */ e.jsx(fn, { children: /* @__PURE__ */ e.jsx(sr, {}) })
|
|
5494
5525
|
]
|
|
5495
5526
|
}
|
|
5496
5527
|
) });
|
|
5497
5528
|
}
|
|
5498
|
-
function
|
|
5499
|
-
|
|
5500
|
-
const s =
|
|
5501
|
-
function l(
|
|
5502
|
-
s && (n(s,
|
|
5529
|
+
function tr() {
|
|
5530
|
+
O((r) => r.selectedCardId);
|
|
5531
|
+
const s = O((r) => r.selectedSheetId), { setIsVisualEditing: t } = O((r) => r.actions), a = O((r) => r.isVisualEditing), n = O((r) => r.actions.updateFrame);
|
|
5532
|
+
function l(r) {
|
|
5533
|
+
s && (n(s, r), t(!1));
|
|
5503
5534
|
}
|
|
5504
5535
|
function o() {
|
|
5505
5536
|
t(!1);
|
|
@@ -5511,27 +5542,27 @@ function sr() {
|
|
|
5511
5542
|
className: W("flex grow", {
|
|
5512
5543
|
"max-h-0 overflow-hidden": !a
|
|
5513
5544
|
}),
|
|
5514
|
-
children: /* @__PURE__ */ e.jsx(
|
|
5545
|
+
children: /* @__PURE__ */ e.jsx(ar, { onSave: l, onClose: o })
|
|
5515
5546
|
}
|
|
5516
5547
|
);
|
|
5517
5548
|
}
|
|
5518
|
-
function
|
|
5519
|
-
m((
|
|
5520
|
-
const s = m((
|
|
5521
|
-
m((
|
|
5522
|
-
const t = m((
|
|
5523
|
-
|
|
5524
|
-
(
|
|
5549
|
+
function nr() {
|
|
5550
|
+
m((r) => r.selectedConnectionId), m((r) => r.selectedDatamodelId);
|
|
5551
|
+
const s = m((r) => r.selectedDatabaseName);
|
|
5552
|
+
m((r) => r.selectedSchemaName);
|
|
5553
|
+
const t = m((r) => r.selectedTableName), a = O((r) => r.dashboard.filters) || [];
|
|
5554
|
+
O((r) => r.actions.addFilter), O((r) => r.actions.removeFilter), O(
|
|
5555
|
+
(r) => r.actions.removeFilterValue
|
|
5525
5556
|
);
|
|
5526
|
-
const { modelItems: n, columns: l } =
|
|
5527
|
-
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((
|
|
5557
|
+
const { modelItems: n, columns: l } = Re(), { assignFilter: o } = Xa();
|
|
5558
|
+
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((r) => {
|
|
5528
5559
|
const c = a == null ? void 0 : a.find(
|
|
5529
|
-
(d) => d.column === de(
|
|
5560
|
+
(d) => d.column === de(r.column_name) && d.table === t && d.database === s
|
|
5530
5561
|
);
|
|
5531
5562
|
return /* @__PURE__ */ e.jsx(
|
|
5532
5563
|
"div",
|
|
5533
5564
|
{
|
|
5534
|
-
onClick: () => o(
|
|
5565
|
+
onClick: () => o(r),
|
|
5535
5566
|
className: W(
|
|
5536
5567
|
"group flex cursor-pointer items-center justify-between border border-dashed border-background px-3 py-[6px] text-sm transition-colors hover:bg-muted/50",
|
|
5537
5568
|
{
|
|
@@ -5539,29 +5570,29 @@ function ar() {
|
|
|
5539
5570
|
}
|
|
5540
5571
|
),
|
|
5541
5572
|
children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
5542
|
-
/* @__PURE__ */ e.jsx(Ea, { column:
|
|
5543
|
-
/* @__PURE__ */ e.jsx("span", { children:
|
|
5573
|
+
/* @__PURE__ */ e.jsx(Ea, { column: r }),
|
|
5574
|
+
/* @__PURE__ */ e.jsx("span", { children: r.column_name })
|
|
5544
5575
|
] })
|
|
5545
5576
|
},
|
|
5546
|
-
|
|
5577
|
+
r.column_name
|
|
5547
5578
|
);
|
|
5548
5579
|
}) });
|
|
5549
5580
|
}
|
|
5550
|
-
function
|
|
5551
|
-
|
|
5552
|
-
const s =
|
|
5581
|
+
function lr() {
|
|
5582
|
+
O((t) => t.showFilters);
|
|
5583
|
+
const s = O(
|
|
5553
5584
|
(t) => t.actions.setShowFilters
|
|
5554
5585
|
);
|
|
5555
5586
|
return /* @__PURE__ */ e.jsxs("section", { className: "relative flex grow flex-col border-l px-4", children: [
|
|
5556
5587
|
/* @__PURE__ */ e.jsxs("div", { className: "mt-4 flex items-center justify-between gap-2 px-3", children: [
|
|
5557
5588
|
/* @__PURE__ */ e.jsx(R, { className: "text-lg", children: "Filters" }),
|
|
5558
5589
|
/* @__PURE__ */ e.jsx(
|
|
5559
|
-
|
|
5590
|
+
z,
|
|
5560
5591
|
{
|
|
5561
5592
|
onClick: () => s(!1),
|
|
5562
5593
|
className: "h-7 w-7 p-0",
|
|
5563
5594
|
variant: "ghost",
|
|
5564
|
-
children: /* @__PURE__ */ e.jsx(
|
|
5595
|
+
children: /* @__PURE__ */ e.jsx(Qe, {})
|
|
5565
5596
|
}
|
|
5566
5597
|
)
|
|
5567
5598
|
] }),
|
|
@@ -5571,7 +5602,7 @@ function tr() {
|
|
|
5571
5602
|
ColumnsComponent: () => (
|
|
5572
5603
|
// schemaName, tableName, columns
|
|
5573
5604
|
/* @__PURE__ */ e.jsx(
|
|
5574
|
-
|
|
5605
|
+
nr,
|
|
5575
5606
|
{}
|
|
5576
5607
|
)
|
|
5577
5608
|
)
|
|
@@ -5579,8 +5610,8 @@ function tr() {
|
|
|
5579
5610
|
) })
|
|
5580
5611
|
] });
|
|
5581
5612
|
}
|
|
5582
|
-
function
|
|
5583
|
-
const s =
|
|
5613
|
+
function rr() {
|
|
5614
|
+
const s = O((a) => a.showFilters), t = O((a) => a.isVisualEditing);
|
|
5584
5615
|
return /* @__PURE__ */ e.jsxs(
|
|
5585
5616
|
"div",
|
|
5586
5617
|
{
|
|
@@ -5590,17 +5621,17 @@ function nr() {
|
|
|
5590
5621
|
"flex grow": !t
|
|
5591
5622
|
}),
|
|
5592
5623
|
children: [
|
|
5593
|
-
/* @__PURE__ */ e.jsx(
|
|
5594
|
-
s && /* @__PURE__ */ e.jsx("div", { role: "filter-aside-container", className: "flex", children: /* @__PURE__ */ e.jsx(
|
|
5624
|
+
/* @__PURE__ */ e.jsx(gn, {}),
|
|
5625
|
+
s && /* @__PURE__ */ e.jsx("div", { role: "filter-aside-container", className: "flex", children: /* @__PURE__ */ e.jsx(lr, {}) })
|
|
5595
5626
|
]
|
|
5596
5627
|
}
|
|
5597
5628
|
);
|
|
5598
5629
|
}
|
|
5599
|
-
function
|
|
5600
|
-
const s =
|
|
5630
|
+
function ir() {
|
|
5631
|
+
const s = O((n) => n.dashboard), t = O((n) => n.actions.setDashboard), a = O(
|
|
5601
5632
|
(n) => n.showDashboardJSON
|
|
5602
5633
|
);
|
|
5603
|
-
return
|
|
5634
|
+
return O(
|
|
5604
5635
|
(n) => n.actions.setShowDashboardJSON
|
|
5605
5636
|
), /* @__PURE__ */ e.jsx(
|
|
5606
5637
|
"div",
|
|
@@ -5609,7 +5640,7 @@ function lr() {
|
|
|
5609
5640
|
hidden: !a
|
|
5610
5641
|
}),
|
|
5611
5642
|
children: /* @__PURE__ */ e.jsx(
|
|
5612
|
-
|
|
5643
|
+
jn,
|
|
5613
5644
|
{
|
|
5614
5645
|
onChange: (n) => {
|
|
5615
5646
|
if (n)
|
|
@@ -5640,65 +5671,65 @@ function lr() {
|
|
|
5640
5671
|
}
|
|
5641
5672
|
);
|
|
5642
5673
|
}
|
|
5643
|
-
function
|
|
5674
|
+
function ur({
|
|
5644
5675
|
showControls: s = !1,
|
|
5645
5676
|
showFooter: t = !0,
|
|
5646
5677
|
...a
|
|
5647
5678
|
}) {
|
|
5648
|
-
return /* @__PURE__ */ e.jsx(us, { FallbackComponent: ka, children: /* @__PURE__ */ e.jsxs(
|
|
5649
|
-
/* @__PURE__ */ e.jsx(
|
|
5650
|
-
/* @__PURE__ */ e.jsxs(
|
|
5651
|
-
/* @__PURE__ */ e.jsx(
|
|
5652
|
-
/* @__PURE__ */ e.jsxs(
|
|
5653
|
-
s && /* @__PURE__ */ e.jsx(
|
|
5654
|
-
/* @__PURE__ */ e.jsx(
|
|
5655
|
-
/* @__PURE__ */ e.jsx(
|
|
5679
|
+
return /* @__PURE__ */ e.jsx(us, { FallbackComponent: ka, children: /* @__PURE__ */ e.jsxs(bn, { dashboardProps: a, children: [
|
|
5680
|
+
/* @__PURE__ */ e.jsx(yn, {}),
|
|
5681
|
+
/* @__PURE__ */ e.jsxs(vn, { children: [
|
|
5682
|
+
/* @__PURE__ */ e.jsx(ir, {}),
|
|
5683
|
+
/* @__PURE__ */ e.jsxs(Cn, { ...a, children: [
|
|
5684
|
+
s && /* @__PURE__ */ e.jsx(nl, {}),
|
|
5685
|
+
/* @__PURE__ */ e.jsx(tr, {}),
|
|
5686
|
+
/* @__PURE__ */ e.jsx(rr, {})
|
|
5656
5687
|
] })
|
|
5657
5688
|
] })
|
|
5658
5689
|
] }) });
|
|
5659
5690
|
}
|
|
5660
5691
|
export {
|
|
5661
|
-
|
|
5662
|
-
|
|
5663
|
-
|
|
5664
|
-
|
|
5692
|
+
Pe as A,
|
|
5693
|
+
Sn as B,
|
|
5694
|
+
wn as C,
|
|
5695
|
+
ur as D,
|
|
5665
5696
|
Ia as E,
|
|
5666
|
-
|
|
5697
|
+
Ma as F,
|
|
5667
5698
|
Tn as G,
|
|
5668
|
-
|
|
5669
|
-
|
|
5670
|
-
|
|
5671
|
-
|
|
5672
|
-
|
|
5673
|
-
|
|
5674
|
-
|
|
5675
|
-
|
|
5676
|
-
|
|
5677
|
-
|
|
5699
|
+
Ln as H,
|
|
5700
|
+
An as I,
|
|
5701
|
+
Yn as J,
|
|
5702
|
+
Vn as L,
|
|
5703
|
+
Da as M,
|
|
5704
|
+
Hn as N,
|
|
5705
|
+
Ta as P,
|
|
5706
|
+
Bn as S,
|
|
5707
|
+
Jn as T,
|
|
5708
|
+
Wn as U,
|
|
5678
5709
|
Ps as a,
|
|
5679
5710
|
Bs as b,
|
|
5680
5711
|
Oa as c,
|
|
5681
5712
|
za as d,
|
|
5682
5713
|
Fa as e,
|
|
5683
|
-
|
|
5684
|
-
|
|
5685
|
-
|
|
5686
|
-
|
|
5687
|
-
|
|
5688
|
-
|
|
5714
|
+
kn as f,
|
|
5715
|
+
On as g,
|
|
5716
|
+
zn as h,
|
|
5717
|
+
Fn as i,
|
|
5718
|
+
Dn as j,
|
|
5719
|
+
In as k,
|
|
5689
5720
|
Mn as l,
|
|
5690
|
-
|
|
5691
|
-
|
|
5692
|
-
|
|
5693
|
-
|
|
5694
|
-
|
|
5695
|
-
|
|
5696
|
-
|
|
5697
|
-
|
|
5698
|
-
|
|
5699
|
-
|
|
5700
|
-
|
|
5701
|
-
|
|
5721
|
+
En as m,
|
|
5722
|
+
qn as n,
|
|
5723
|
+
Rn as o,
|
|
5724
|
+
Ve as p,
|
|
5725
|
+
_n as q,
|
|
5726
|
+
$n as r,
|
|
5727
|
+
Pn as s,
|
|
5728
|
+
La as t,
|
|
5729
|
+
Un as u,
|
|
5730
|
+
Gn as v,
|
|
5731
|
+
Qn as w,
|
|
5732
|
+
Kn as x,
|
|
5702
5733
|
Us as y,
|
|
5703
|
-
|
|
5734
|
+
Re as z
|
|
5704
5735
|
};
|