react-semaphor 0.0.290 → 0.0.292
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{dashboard-plus-LDgc9sdb.js → dashboard-plus-eyWVJq6T.js} +654 -652
- package/dist/chunks/dashboard-plus-q0Cnhdqi.js +245 -0
- package/dist/chunks/{index-CGIUYFBx.js → index-1VxGNVLM.js} +66 -66
- package/dist/chunks/{index-s1-3fkbc.js → index-LkldbtTC.js} +5944 -5873
- package/dist/chunks/{lucide-react-TsHimnSy.js → lucide-react-2J4rEryP.js} +3 -3
- package/dist/chunks/{lucide-react-Tu85lAAG.js → lucide-react-ByG-z-68.js} +1 -1
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +4 -4
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunks/dashboard-plus-tpC9RwP9.js +0 -245
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { J as V, L as Xe, b as T, c as
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
1
|
+
import { J as V, L as Xe, b as T, c as zs, u as Ce, j as e, M as Os, O as Fs, P as M, Q as Is, R as Ts, U as Ms, V as Ls, W as Ds, X as _, Y as ne, Z as oa, _ as ca, $ as da, a0 as ua, a1 as it, a2 as ot, a3 as ct, a4 as Ws, f as Y, a5 as Ke, a6 as dt, a7 as ha, a8 as Je, a9 as Qe, T as Es, e as ma, g as As, aa as fe, ab as ge, ac as je, ad as be, ae as ze, af as ye, ag as W, ah as Vs, G as o, ai as qs, aj as Rs, ak as _s, w as xa, v as pa, t as xe, al as ut, r as ht, N as fa, s as mt, am as xt, B as pt, an as ga, ao as ft, S as Hs, z as gt, n as Ys, A as ja, ap as vs, aq as de, ar as ke, as as ue, at as hs, au as ba, av as jt, aw as bt, ax as ya, ay as yt, az as vt, aA as Ct, aB as Nt, aC as St, aD as Cs, aE as wt, aF as kt, aG as Ue, aH as Ns, aI as qe, aJ as Ss, aK as Xs, aL as zt, aM as Ot, aN as Ft, aO as It, aP as Tt, aQ as Mt, aR as ys, aS as Lt, aT as Zs, aU as Dt, aV as ea, aW as Et, aX as At, aY as Vt, aZ as va, H as he, a_ as $s, a$ as Ca, l as qt, C as Rt, E as rs, d as _t, h as Ht, b0 as $t, i as Pt, o as Bt, b1 as Ut, m as Gt, b2 as Kt, b3 as ms, b4 as Na, b5 as Sa, b6 as wa, b7 as is, b8 as ka, b9 as os, ba as sa, bb as Jt, bc as Qt, bd as xs, be as ps, bf as fs, bg as Wt, bh as Yt, bi as za, K as Xt, bj as Zt, bk as en, bl as gs, bm as Me, bn as sn, bo as Be, bp as Oa, bq as an, br as tn, bs as cs, bt as nn, bu as ln, bv as rn, bw as aa, bx as on, by as cn, bz as dn, bA as un, bB as hn, bC as mn, bD as xn, bE as pn, bF as Le, bG as G, bH as K, bI as Ps, bJ as J, bK as fn, bL as Fa, bM as gn, bN as jn, bO as bn, bP as yn, bQ as vn, bR as Cn, bS as Nn, bT as Sn, bU as wn } from "./index-LkldbtTC.js";
|
|
2
|
+
import * as ta from "react";
|
|
3
|
+
import ve, { useState as R, useMemo as ws, useEffect as Z, useRef as We, Suspense as kn } 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 zn = V("Box", [
|
|
12
12
|
[
|
|
13
13
|
"path",
|
|
14
14
|
{
|
|
@@ -25,7 +25,7 @@ const kn = 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 On = V("ChartArea", [
|
|
29
29
|
["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
|
|
30
30
|
[
|
|
31
31
|
"path",
|
|
@@ -41,7 +41,7 @@ const zn = V("ChartArea", [
|
|
|
41
41
|
* This source code is licensed under the ISC license.
|
|
42
42
|
* See the LICENSE file in the root directory of this source tree.
|
|
43
43
|
*/
|
|
44
|
-
const
|
|
44
|
+
const Bs = V("ChartColumnIncreasing", [
|
|
45
45
|
["path", { d: "M13 17V9", key: "1fwyjl" }],
|
|
46
46
|
["path", { d: "M18 17V5", key: "sfb6ij" }],
|
|
47
47
|
["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
|
|
@@ -53,7 +53,7 @@ const Ps = V("ChartColumnIncreasing", [
|
|
|
53
53
|
* This source code is licensed under the ISC license.
|
|
54
54
|
* See the LICENSE file in the root directory of this source tree.
|
|
55
55
|
*/
|
|
56
|
-
const
|
|
56
|
+
const Us = V("ChartLine", [
|
|
57
57
|
["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
|
|
58
58
|
["path", { d: "m19 9-5 5-4-4-3 3", key: "2osh9i" }]
|
|
59
59
|
]);
|
|
@@ -63,7 +63,7 @@ const Bs = V("ChartLine", [
|
|
|
63
63
|
* This source code is licensed under the ISC license.
|
|
64
64
|
* See the LICENSE file in the root directory of this source tree.
|
|
65
65
|
*/
|
|
66
|
-
const
|
|
66
|
+
const Ia = V("ChartNoAxesGantt", [
|
|
67
67
|
["path", { d: "M8 6h10", key: "9lnwnk" }],
|
|
68
68
|
["path", { d: "M6 12h9", key: "1g9pqf" }],
|
|
69
69
|
["path", { d: "M11 18h7", key: "c8dzvl" }]
|
|
@@ -74,7 +74,7 @@ const Fa = V("ChartNoAxesGantt", [
|
|
|
74
74
|
* This source code is licensed under the ISC license.
|
|
75
75
|
* See the LICENSE file in the root directory of this source tree.
|
|
76
76
|
*/
|
|
77
|
-
const
|
|
77
|
+
const Ta = V("ChartPie", [
|
|
78
78
|
[
|
|
79
79
|
"path",
|
|
80
80
|
{
|
|
@@ -90,7 +90,7 @@ const Ia = V("ChartPie", [
|
|
|
90
90
|
* This source code is licensed under the ISC license.
|
|
91
91
|
* See the LICENSE file in the root directory of this source tree.
|
|
92
92
|
*/
|
|
93
|
-
const
|
|
93
|
+
const Ma = V("ChartScatter", [
|
|
94
94
|
["circle", { cx: "7.5", cy: "7.5", r: ".5", fill: "currentColor", key: "kqv944" }],
|
|
95
95
|
["circle", { cx: "18.5", cy: "5.5", r: ".5", fill: "currentColor", key: "lysivs" }],
|
|
96
96
|
["circle", { cx: "11.5", cy: "11.5", r: ".5", fill: "currentColor", key: "byv1b8" }],
|
|
@@ -104,7 +104,7 @@ const Ta = 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 Fn = 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 On = 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 In = 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 Fn = 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 Tn = 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" }]
|
|
@@ -138,7 +138,7 @@ const In = V("Database", [
|
|
|
138
138
|
* This source code is licensed under the ISC license.
|
|
139
139
|
* See the LICENSE file in the root directory of this source tree.
|
|
140
140
|
*/
|
|
141
|
-
const
|
|
141
|
+
const La = V("EllipsisVertical", [
|
|
142
142
|
["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
|
|
143
143
|
["circle", { cx: "12", cy: "5", r: "1", key: "gxeob9" }],
|
|
144
144
|
["circle", { cx: "12", cy: "19", r: "1", key: "lyex9k" }]
|
|
@@ -149,7 +149,7 @@ const Ma = 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 Mn = V("Eraser", [
|
|
153
153
|
[
|
|
154
154
|
"path",
|
|
155
155
|
{
|
|
@@ -166,7 +166,7 @@ const Tn = 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 Ln = 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 Mn = 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
|
{
|
|
@@ -195,7 +195,7 @@ const Ln = V("Eye", [
|
|
|
195
195
|
* This source code is licensed under the ISC license.
|
|
196
196
|
* See the LICENSE file in the root directory of this source tree.
|
|
197
197
|
*/
|
|
198
|
-
const
|
|
198
|
+
const En = V("Glasses", [
|
|
199
199
|
["circle", { cx: "6", cy: "15", r: "4", key: "vux9w4" }],
|
|
200
200
|
["circle", { cx: "18", cy: "15", r: "4", key: "18o8ve" }],
|
|
201
201
|
["path", { d: "M14 15a2 2 0 0 0-2-2 2 2 0 0 0-2 2", key: "1ag4bs" }],
|
|
@@ -208,7 +208,7 @@ const Dn = 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 An = 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
|
[
|
|
@@ -225,7 +225,7 @@ const En = V("Hammer", [
|
|
|
225
225
|
* This source code is licensed under the ISC license.
|
|
226
226
|
* See the LICENSE file in the root directory of this source tree.
|
|
227
227
|
*/
|
|
228
|
-
const
|
|
228
|
+
const Vn = V("Hash", [
|
|
229
229
|
["line", { x1: "4", x2: "20", y1: "9", y2: "9", key: "4lhtct" }],
|
|
230
230
|
["line", { x1: "4", x2: "20", y1: "15", y2: "15", key: "vyu0kd" }],
|
|
231
231
|
["line", { x1: "10", x2: "8", y1: "3", y2: "21", key: "1ggp8o" }],
|
|
@@ -237,7 +237,7 @@ const An = 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 qn = 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 Vn = 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 Da = V("Key", [
|
|
257
257
|
["path", { d: "m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4", key: "g0fldk" }],
|
|
258
258
|
["path", { d: "m21 2-9.6 9.6", key: "1j0ho8" }],
|
|
259
259
|
["circle", { cx: "7.5", cy: "15.5", r: "5.5", key: "yqb3hr" }]
|
|
@@ -264,7 +264,7 @@ const La = V("Key", [
|
|
|
264
264
|
* This source code is licensed under the ISC license.
|
|
265
265
|
* See the LICENSE file in the root directory of this source tree.
|
|
266
266
|
*/
|
|
267
|
-
const
|
|
267
|
+
const Rn = V("ListEnd", [
|
|
268
268
|
["path", { d: "M16 12H3", key: "1a2rj7" }],
|
|
269
269
|
["path", { d: "M16 6H3", key: "1wxfjs" }],
|
|
270
270
|
["path", { d: "M10 18H3", key: "13769t" }],
|
|
@@ -277,7 +277,7 @@ const qn = V("ListEnd", [
|
|
|
277
277
|
* This source code is licensed under the ISC license.
|
|
278
278
|
* See the LICENSE file in the root directory of this source tree.
|
|
279
279
|
*/
|
|
280
|
-
const
|
|
280
|
+
const _n = V("ListStart", [
|
|
281
281
|
["path", { d: "M16 12H3", key: "1a2rj7" }],
|
|
282
282
|
["path", { d: "M16 18H3", key: "12xzn7" }],
|
|
283
283
|
["path", { d: "M10 6H3", key: "lf8lx7" }],
|
|
@@ -290,7 +290,7 @@ const Rn = V("ListStart", [
|
|
|
290
290
|
* This source code is licensed under the ISC license.
|
|
291
291
|
* See the LICENSE file in the root directory of this source tree.
|
|
292
292
|
*/
|
|
293
|
-
const
|
|
293
|
+
const Hn = V("ListX", [
|
|
294
294
|
["path", { d: "M11 12H3", key: "51ecnj" }],
|
|
295
295
|
["path", { d: "M16 6H3", key: "1wxfjs" }],
|
|
296
296
|
["path", { d: "M16 18H3", key: "12xzn7" }],
|
|
@@ -312,7 +312,7 @@ const Ye = V("LoaderCircle", [
|
|
|
312
312
|
* This source code is licensed under the ISC license.
|
|
313
313
|
* See the LICENSE file in the root directory of this source tree.
|
|
314
314
|
*/
|
|
315
|
-
const
|
|
315
|
+
const Ea = V("Map", [
|
|
316
316
|
[
|
|
317
317
|
"path",
|
|
318
318
|
{
|
|
@@ -329,7 +329,7 @@ const Da = V("Map", [
|
|
|
329
329
|
* This source code is licensed under the ISC license.
|
|
330
330
|
* See the LICENSE file in the root directory of this source tree.
|
|
331
331
|
*/
|
|
332
|
-
const
|
|
332
|
+
const $n = V("MessageSquareMore", [
|
|
333
333
|
["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" }],
|
|
334
334
|
["path", { d: "M8 10h.01", key: "19clt8" }],
|
|
335
335
|
["path", { d: "M12 10h.01", key: "1nrarc" }],
|
|
@@ -341,7 +341,7 @@ const Hn = V("MessageSquareMore", [
|
|
|
341
341
|
* This source code is licensed under the ISC license.
|
|
342
342
|
* See the LICENSE file in the root directory of this source tree.
|
|
343
343
|
*/
|
|
344
|
-
const
|
|
344
|
+
const Pn = V("Network", [
|
|
345
345
|
["rect", { x: "16", y: "16", width: "6", height: "6", rx: "1", key: "4q2zg0" }],
|
|
346
346
|
["rect", { x: "2", y: "16", width: "6", height: "6", rx: "1", key: "8cvhb9" }],
|
|
347
347
|
["rect", { x: "9", y: "2", width: "6", height: "6", rx: "1", key: "1egb70" }],
|
|
@@ -354,7 +354,7 @@ const $n = V("Network", [
|
|
|
354
354
|
* This source code is licensed under the ISC license.
|
|
355
355
|
* See the LICENSE file in the root directory of this source tree.
|
|
356
356
|
*/
|
|
357
|
-
const
|
|
357
|
+
const Aa = V("Pencil", [
|
|
358
358
|
[
|
|
359
359
|
"path",
|
|
360
360
|
{
|
|
@@ -370,7 +370,7 @@ const Ea = V("Pencil", [
|
|
|
370
370
|
* This source code is licensed under the ISC license.
|
|
371
371
|
* See the LICENSE file in the root directory of this source tree.
|
|
372
372
|
*/
|
|
373
|
-
const
|
|
373
|
+
const Bn = V("Play", [
|
|
374
374
|
["polygon", { points: "6 3 20 12 6 21 6 3", key: "1oa8hb" }]
|
|
375
375
|
]);
|
|
376
376
|
/**
|
|
@@ -379,7 +379,7 @@ const Pn = V("Play", [
|
|
|
379
379
|
* This source code is licensed under the ISC license.
|
|
380
380
|
* See the LICENSE file in the root directory of this source tree.
|
|
381
381
|
*/
|
|
382
|
-
const
|
|
382
|
+
const Un = V("Plug2", [
|
|
383
383
|
["path", { d: "M9 2v6", key: "17ngun" }],
|
|
384
384
|
["path", { d: "M15 2v6", key: "s7yy2p" }],
|
|
385
385
|
["path", { d: "M12 17v5", key: "bb1du9" }],
|
|
@@ -392,7 +392,7 @@ const Bn = V("Plug2", [
|
|
|
392
392
|
* This source code is licensed under the ISC license.
|
|
393
393
|
* See the LICENSE file in the root directory of this source tree.
|
|
394
394
|
*/
|
|
395
|
-
const
|
|
395
|
+
const Gn = V("Save", [
|
|
396
396
|
[
|
|
397
397
|
"path",
|
|
398
398
|
{
|
|
@@ -409,7 +409,7 @@ const Un = V("Save", [
|
|
|
409
409
|
* This source code is licensed under the ISC license.
|
|
410
410
|
* See the LICENSE file in the root directory of this source tree.
|
|
411
411
|
*/
|
|
412
|
-
const
|
|
412
|
+
const Va = V("Shapes", [
|
|
413
413
|
[
|
|
414
414
|
"path",
|
|
415
415
|
{
|
|
@@ -426,7 +426,7 @@ const Aa = V("Shapes", [
|
|
|
426
426
|
* This source code is licensed under the ISC license.
|
|
427
427
|
* See the LICENSE file in the root directory of this source tree.
|
|
428
428
|
*/
|
|
429
|
-
const
|
|
429
|
+
const Kn = V("ShieldQuestion", [
|
|
430
430
|
[
|
|
431
431
|
"path",
|
|
432
432
|
{
|
|
@@ -443,7 +443,7 @@ const Gn = V("ShieldQuestion", [
|
|
|
443
443
|
* This source code is licensed under the ISC license.
|
|
444
444
|
* See the LICENSE file in the root directory of this source tree.
|
|
445
445
|
*/
|
|
446
|
-
const
|
|
446
|
+
const Jn = V("Sigma", [
|
|
447
447
|
[
|
|
448
448
|
"path",
|
|
449
449
|
{
|
|
@@ -458,7 +458,7 @@ const Kn = V("Sigma", [
|
|
|
458
458
|
* This source code is licensed under the ISC license.
|
|
459
459
|
* See the LICENSE file in the root directory of this source tree.
|
|
460
460
|
*/
|
|
461
|
-
const
|
|
461
|
+
const Qn = V("SwatchBook", [
|
|
462
462
|
["path", { d: "M11 17a4 4 0 0 1-8 0V5a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2Z", key: "1ldrpk" }],
|
|
463
463
|
["path", { d: "M16.7 13H19a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2H7", key: "11i5po" }],
|
|
464
464
|
["path", { d: "M 7 17h.01", key: "1euzgo" }],
|
|
@@ -476,7 +476,7 @@ const Jn = V("SwatchBook", [
|
|
|
476
476
|
* This source code is licensed under the ISC license.
|
|
477
477
|
* See the LICENSE file in the root directory of this source tree.
|
|
478
478
|
*/
|
|
479
|
-
const
|
|
479
|
+
const Wn = V("Tag", [
|
|
480
480
|
[
|
|
481
481
|
"path",
|
|
482
482
|
{
|
|
@@ -492,7 +492,7 @@ const Qn = V("Tag", [
|
|
|
492
492
|
* This source code is licensed under the ISC license.
|
|
493
493
|
* See the LICENSE file in the root directory of this source tree.
|
|
494
494
|
*/
|
|
495
|
-
const
|
|
495
|
+
const Yn = V("ToggleLeft", [
|
|
496
496
|
["rect", { width: "20", height: "12", x: "2", y: "6", rx: "6", ry: "6", key: "f2vt7d" }],
|
|
497
497
|
["circle", { cx: "8", cy: "12", r: "2", key: "1nvbw3" }]
|
|
498
498
|
]);
|
|
@@ -502,7 +502,7 @@ const Wn = V("ToggleLeft", [
|
|
|
502
502
|
* This source code is licensed under the ISC license.
|
|
503
503
|
* See the LICENSE file in the root directory of this source tree.
|
|
504
504
|
*/
|
|
505
|
-
const
|
|
505
|
+
const Gs = V("Type", [
|
|
506
506
|
["polyline", { points: "4 7 4 4 20 4 20 7", key: "1nosan" }],
|
|
507
507
|
["line", { x1: "9", x2: "15", y1: "20", y2: "20", key: "swin9y" }],
|
|
508
508
|
["line", { x1: "12", x2: "12", y1: "4", y2: "20", key: "1tx1rr" }]
|
|
@@ -513,11 +513,11 @@ const Us = V("Type", [
|
|
|
513
513
|
* This source code is licensed under the ISC license.
|
|
514
514
|
* See the LICENSE file in the root directory of this source tree.
|
|
515
515
|
*/
|
|
516
|
-
const
|
|
516
|
+
const Xn = V("User", [
|
|
517
517
|
["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
|
|
518
518
|
["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
|
|
519
519
|
]);
|
|
520
|
-
function
|
|
520
|
+
function qa(s) {
|
|
521
521
|
var n;
|
|
522
522
|
return {
|
|
523
523
|
...s,
|
|
@@ -529,14 +529,14 @@ function Va(s) {
|
|
|
529
529
|
var i;
|
|
530
530
|
return {
|
|
531
531
|
...l,
|
|
532
|
-
cards: (i = l.cards) == null ? void 0 : i.map((r) =>
|
|
532
|
+
cards: (i = l.cards) == null ? void 0 : i.map((r) => Zn(r))
|
|
533
533
|
};
|
|
534
534
|
})
|
|
535
535
|
};
|
|
536
536
|
})
|
|
537
537
|
};
|
|
538
538
|
}
|
|
539
|
-
function
|
|
539
|
+
function Zn(s) {
|
|
540
540
|
var n, a, t, l;
|
|
541
541
|
return {
|
|
542
542
|
...s,
|
|
@@ -551,12 +551,12 @@ function Xn(s) {
|
|
|
551
551
|
}))
|
|
552
552
|
}
|
|
553
553
|
},
|
|
554
|
-
customCfg:
|
|
554
|
+
customCfg: el(s.customCfg),
|
|
555
555
|
// if customCfg is present, clean it, otherwise return null{
|
|
556
556
|
data: []
|
|
557
557
|
};
|
|
558
558
|
}
|
|
559
|
-
function
|
|
559
|
+
function el(s) {
|
|
560
560
|
var n, a;
|
|
561
561
|
return s ? {
|
|
562
562
|
...s,
|
|
@@ -570,7 +570,7 @@ function Zn(s) {
|
|
|
570
570
|
}
|
|
571
571
|
} : null;
|
|
572
572
|
}
|
|
573
|
-
async function
|
|
573
|
+
async function sl(s, n, a, t) {
|
|
574
574
|
if (!t)
|
|
575
575
|
return null;
|
|
576
576
|
const l = JSON.stringify(n);
|
|
@@ -581,7 +581,7 @@ async function el(s, n, a, t) {
|
|
|
581
581
|
operation: "create"
|
|
582
582
|
});
|
|
583
583
|
}
|
|
584
|
-
async function
|
|
584
|
+
async function ks(s, n) {
|
|
585
585
|
if (!n)
|
|
586
586
|
return null;
|
|
587
587
|
const { id: a, template: t, filterValues: l, isDefault: i, shared: r } = s;
|
|
@@ -594,19 +594,19 @@ async function ws(s, n) {
|
|
|
594
594
|
operation: "update"
|
|
595
595
|
});
|
|
596
596
|
}
|
|
597
|
-
async function
|
|
597
|
+
async function al(s, n) {
|
|
598
598
|
return n ? await Xe("https://semaphor.cloud/api/v1/lens", n, {
|
|
599
599
|
operation: "delete",
|
|
600
600
|
lensId: s
|
|
601
601
|
}) : null;
|
|
602
602
|
}
|
|
603
|
-
function
|
|
604
|
-
const [s, n] = R(""), [a, t] = R(!1), l = T((v) => v.lenses), { setLenses: i, setSelectedLensId: r } =
|
|
603
|
+
function tl() {
|
|
604
|
+
const [s, n] = R(""), [a, t] = R(!1), l = T((v) => v.lenses), { setLenses: i, setSelectedLensId: r } = zs(), [d, c] = R(!1), [u, m] = R(!1), y = T((v) => v.dashboard), b = T((v) => v.filterValues), { authToken: h } = Ce();
|
|
605
605
|
async function p() {
|
|
606
606
|
c(!0);
|
|
607
|
-
const v =
|
|
607
|
+
const v = qa(
|
|
608
608
|
y
|
|
609
|
-
), I = await
|
|
609
|
+
), I = await sl(
|
|
610
610
|
s,
|
|
611
611
|
v,
|
|
612
612
|
b,
|
|
@@ -614,23 +614,23 @@ function al() {
|
|
|
614
614
|
);
|
|
615
615
|
I && (i([...l || [], I]), r(I.id), m(!1)), c(!1);
|
|
616
616
|
}
|
|
617
|
-
return /* @__PURE__ */ e.jsxs(
|
|
618
|
-
/* @__PURE__ */ e.jsx(
|
|
617
|
+
return /* @__PURE__ */ e.jsxs(Os, { open: u, onOpenChange: m, children: [
|
|
618
|
+
/* @__PURE__ */ e.jsx(Fs, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
619
619
|
M,
|
|
620
620
|
{
|
|
621
621
|
variant: "secondary",
|
|
622
622
|
className: "h-7 p-2",
|
|
623
623
|
size: "sm",
|
|
624
624
|
children: [
|
|
625
|
-
/* @__PURE__ */ e.jsx(
|
|
625
|
+
/* @__PURE__ */ e.jsx(Is, { className: "mr-2 h-4 w-4", strokeWidth: 1.5 }),
|
|
626
626
|
"Lens"
|
|
627
627
|
]
|
|
628
628
|
}
|
|
629
629
|
) }),
|
|
630
|
-
/* @__PURE__ */ e.jsxs(
|
|
631
|
-
/* @__PURE__ */ e.jsxs(
|
|
632
|
-
/* @__PURE__ */ e.jsx(
|
|
633
|
-
/* @__PURE__ */ e.jsx(
|
|
630
|
+
/* @__PURE__ */ e.jsxs(Ts, { className: "sm:max-w-[425px]", children: [
|
|
631
|
+
/* @__PURE__ */ e.jsxs(Ms, { children: [
|
|
632
|
+
/* @__PURE__ */ e.jsx(Ls, { children: "Create Lens" }),
|
|
633
|
+
/* @__PURE__ */ e.jsx(Ds, { children: "Lenses are private by default and are only visible to you." })
|
|
634
634
|
] }),
|
|
635
635
|
/* @__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: [
|
|
636
636
|
/* @__PURE__ */ e.jsx(_, { className: "text-right", children: "Name" }),
|
|
@@ -647,7 +647,7 @@ function al() {
|
|
|
647
647
|
)
|
|
648
648
|
] }) }),
|
|
649
649
|
a && /* @__PURE__ */ e.jsx("p", { className: "text-sm", children: "The lens name already exists. Use a differnet name." }),
|
|
650
|
-
/* @__PURE__ */ e.jsx(
|
|
650
|
+
/* @__PURE__ */ e.jsx(oa, { children: /* @__PURE__ */ e.jsx(
|
|
651
651
|
M,
|
|
652
652
|
{
|
|
653
653
|
size: "sm",
|
|
@@ -661,13 +661,13 @@ function al() {
|
|
|
661
661
|
] })
|
|
662
662
|
] });
|
|
663
663
|
}
|
|
664
|
-
function
|
|
665
|
-
const [s, n] = R(!1), a = T((m) => m.lenses), t = T((m) => m.selectedLensId), { setLenses: l, setSelectedLensId: i } =
|
|
664
|
+
function nl() {
|
|
665
|
+
const [s, n] = R(!1), a = T((m) => m.lenses), t = T((m) => m.selectedLensId), { setLenses: l, setSelectedLensId: i } = zs(), { authToken: r } = Ce();
|
|
666
666
|
async function d(m) {
|
|
667
667
|
i(m);
|
|
668
668
|
}
|
|
669
669
|
async function c(m) {
|
|
670
|
-
if (await
|
|
670
|
+
if (await al(m, r == null ? void 0 : r.accessToken)) {
|
|
671
671
|
const b = a == null ? void 0 : a.filter((h) => h.id !== m);
|
|
672
672
|
l(b || []), i("original");
|
|
673
673
|
}
|
|
@@ -685,30 +685,30 @@ function tl() {
|
|
|
685
685
|
...m,
|
|
686
686
|
isDefault: !m.isDefault
|
|
687
687
|
};
|
|
688
|
-
await
|
|
688
|
+
await ks(b, r == null ? void 0 : r.accessToken);
|
|
689
689
|
const h = a == null ? void 0 : a.find((p) => p.isDefault);
|
|
690
690
|
if (h && h.id !== m.id) {
|
|
691
691
|
const p = {
|
|
692
692
|
...h,
|
|
693
693
|
isDefault: !1
|
|
694
694
|
};
|
|
695
|
-
await
|
|
695
|
+
await ks(p, r == null ? void 0 : r.accessToken);
|
|
696
696
|
}
|
|
697
697
|
}
|
|
698
|
-
return /* @__PURE__ */ e.jsxs(
|
|
699
|
-
/* @__PURE__ */ e.jsx(
|
|
700
|
-
/* @__PURE__ */ e.jsxs(
|
|
701
|
-
/* @__PURE__ */ e.jsx(
|
|
702
|
-
/* @__PURE__ */ e.jsx(
|
|
698
|
+
return /* @__PURE__ */ e.jsxs(ca, { open: s, onOpenChange: n, children: [
|
|
699
|
+
/* @__PURE__ */ e.jsx(da, { asChild: !0, children: /* @__PURE__ */ e.jsx(M, { variant: "ghost", className: "h-7 p-2", children: /* @__PURE__ */ e.jsx(En, { className: "h-4 w-4", strokeWidth: 1.5 }) }) }),
|
|
700
|
+
/* @__PURE__ */ e.jsxs(ua, { align: "end", className: "w-60", children: [
|
|
701
|
+
/* @__PURE__ */ e.jsx(it, { className: "px-3", children: "Lenses" }),
|
|
702
|
+
/* @__PURE__ */ e.jsx(ot, {}),
|
|
703
703
|
/* @__PURE__ */ e.jsxs(
|
|
704
|
-
|
|
704
|
+
ct,
|
|
705
705
|
{
|
|
706
706
|
value: t,
|
|
707
707
|
onValueChange: d,
|
|
708
708
|
children: [
|
|
709
|
-
/* @__PURE__ */ e.jsx(
|
|
709
|
+
/* @__PURE__ */ e.jsx(Ws, { value: "original", children: "Original" }),
|
|
710
710
|
a == null ? void 0 : a.map((m) => /* @__PURE__ */ e.jsxs(
|
|
711
|
-
|
|
711
|
+
Ws,
|
|
712
712
|
{
|
|
713
713
|
className: "group flex justify-between gap-2",
|
|
714
714
|
value: m.id,
|
|
@@ -716,7 +716,7 @@ function tl() {
|
|
|
716
716
|
/* @__PURE__ */ e.jsx("p", { children: m.name }),
|
|
717
717
|
/* @__PURE__ */ e.jsxs("span", { className: "flex items-center gap-3", children: [
|
|
718
718
|
/* @__PURE__ */ e.jsx(
|
|
719
|
-
|
|
719
|
+
qn,
|
|
720
720
|
{
|
|
721
721
|
onClick: (y) => {
|
|
722
722
|
y.preventDefault(), u(m);
|
|
@@ -752,7 +752,7 @@ function tl() {
|
|
|
752
752
|
] })
|
|
753
753
|
] });
|
|
754
754
|
}
|
|
755
|
-
function
|
|
755
|
+
function ll() {
|
|
756
756
|
const { authToken: s } = Ce(), n = T((f) => f.lenses), a = T((f) => f.selectedLensId), t = n == null ? void 0 : n.find((f) => f.id === a), l = T((f) => f.dashboard);
|
|
757
757
|
T((f) => f.selectedSheetId);
|
|
758
758
|
const i = T(
|
|
@@ -765,10 +765,10 @@ function nl() {
|
|
|
765
765
|
(f) => f.actions.setShowFilters
|
|
766
766
|
), { addFrame: h, setSelectedFrameId: p } = T(
|
|
767
767
|
(f) => f.actions
|
|
768
|
-
), { getSelectedSheet: v, setIsDashboardEditing: I, setShowDashboardJSON: C } = T((f) => f.actions), w = v(), { tenantId: z, endUserId: S } =
|
|
769
|
-
() =>
|
|
768
|
+
), { getSelectedSheet: v, setIsDashboardEditing: I, setShowDashboardJSON: C } = T((f) => f.actions), w = v(), { tenantId: z, endUserId: S } = ws(
|
|
769
|
+
() => dt(s == null ? void 0 : s.accessToken),
|
|
770
770
|
[s == null ? void 0 : s.accessToken]
|
|
771
|
-
), L =
|
|
771
|
+
), L = ws(() => z || S, [z, S]), x = () => {
|
|
772
772
|
if (!i || !w)
|
|
773
773
|
return;
|
|
774
774
|
const f = {
|
|
@@ -798,14 +798,14 @@ function nl() {
|
|
|
798
798
|
async function j() {
|
|
799
799
|
if (d(!0), !a || !t)
|
|
800
800
|
return;
|
|
801
|
-
const f =
|
|
801
|
+
const f = qa(
|
|
802
802
|
l
|
|
803
803
|
), F = JSON.stringify(f), A = {
|
|
804
804
|
...t,
|
|
805
805
|
template: F,
|
|
806
806
|
filterValues: c
|
|
807
807
|
};
|
|
808
|
-
await
|
|
808
|
+
await ks(A, s == null ? void 0 : s.accessToken), Qe.success("Lens saved"), y == null || y(f), d(!1);
|
|
809
809
|
}
|
|
810
810
|
return u ? null : /* @__PURE__ */ e.jsxs(
|
|
811
811
|
"div",
|
|
@@ -815,8 +815,8 @@ function nl() {
|
|
|
815
815
|
children: [
|
|
816
816
|
!u && /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ e.jsx(_, { children: t == null ? void 0 : t.name }) }),
|
|
817
817
|
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
|
|
818
|
-
i && !u && L && /* @__PURE__ */ e.jsx(
|
|
819
|
-
!u && L && /* @__PURE__ */ e.jsx(
|
|
818
|
+
i && !u && L && /* @__PURE__ */ e.jsx(tl, {}),
|
|
819
|
+
!u && L && /* @__PURE__ */ e.jsx(nl, {}),
|
|
820
820
|
i && !u && /* @__PURE__ */ e.jsxs(
|
|
821
821
|
M,
|
|
822
822
|
{
|
|
@@ -826,7 +826,7 @@ function nl() {
|
|
|
826
826
|
disabled: !i,
|
|
827
827
|
onClick: x,
|
|
828
828
|
children: [
|
|
829
|
-
/* @__PURE__ */ e.jsx(
|
|
829
|
+
/* @__PURE__ */ e.jsx(Is, { className: "mr-2 h-4 w-4", strokeWidth: 1.5 }),
|
|
830
830
|
"Frame"
|
|
831
831
|
]
|
|
832
832
|
}
|
|
@@ -838,7 +838,7 @@ function nl() {
|
|
|
838
838
|
className: "h-7 p-2",
|
|
839
839
|
onClick: k,
|
|
840
840
|
size: "sm",
|
|
841
|
-
children: /* @__PURE__ */ e.jsx(
|
|
841
|
+
children: /* @__PURE__ */ e.jsx(Aa, { className: "h-4 w-4", strokeWidth: 1.5 })
|
|
842
842
|
}
|
|
843
843
|
),
|
|
844
844
|
i && !u && /* @__PURE__ */ e.jsx(
|
|
@@ -862,7 +862,7 @@ function nl() {
|
|
|
862
862
|
disabled: r,
|
|
863
863
|
onClick: j,
|
|
864
864
|
size: "sm",
|
|
865
|
-
children: /* @__PURE__ */ e.jsx(
|
|
865
|
+
children: /* @__PURE__ */ e.jsx(Gn, { className: "h-4 w-4", strokeWidth: 1.5 })
|
|
866
866
|
}
|
|
867
867
|
),
|
|
868
868
|
!m && !u && i && /* @__PURE__ */ e.jsx(
|
|
@@ -872,7 +872,7 @@ function nl() {
|
|
|
872
872
|
variant: "ghost",
|
|
873
873
|
onClick: () => b(!0),
|
|
874
874
|
size: "sm",
|
|
875
|
-
children: /* @__PURE__ */ e.jsx(
|
|
875
|
+
children: /* @__PURE__ */ e.jsx(ha, { className: "h-4 w-4", strokeWidth: 1.5 })
|
|
876
876
|
}
|
|
877
877
|
),
|
|
878
878
|
!u && i && !1,
|
|
@@ -898,39 +898,39 @@ function Pe({
|
|
|
898
898
|
const y = t ? "Loading..." : l ? "Error" : a;
|
|
899
899
|
function b() {
|
|
900
900
|
if (s === "Connection")
|
|
901
|
-
return /* @__PURE__ */ e.jsx(
|
|
901
|
+
return /* @__PURE__ */ e.jsx(Un, { className: "size-4 rotate-90" });
|
|
902
902
|
if (s === "Database")
|
|
903
|
-
return /* @__PURE__ */ e.jsx(
|
|
903
|
+
return /* @__PURE__ */ e.jsx(Tn, { className: "size-4" });
|
|
904
904
|
if (s === "Schema")
|
|
905
|
-
return /* @__PURE__ */ e.jsx(
|
|
905
|
+
return /* @__PURE__ */ e.jsx(Pn, { className: "size-4" });
|
|
906
906
|
if (s === "Table")
|
|
907
|
-
return /* @__PURE__ */ e.jsx(
|
|
907
|
+
return /* @__PURE__ */ e.jsx(Vs, { className: "size-4" });
|
|
908
908
|
if (s === "Model")
|
|
909
|
-
return /* @__PURE__ */ e.jsx(
|
|
909
|
+
return /* @__PURE__ */ e.jsx(zn, { className: "size-4" });
|
|
910
910
|
}
|
|
911
911
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
912
|
-
u && /* @__PURE__ */ e.jsx("div", { className: "shrink-0", children: i ? /* @__PURE__ */ e.jsxs(
|
|
913
|
-
/* @__PURE__ */ e.jsx(
|
|
914
|
-
/* @__PURE__ */ e.jsx(
|
|
912
|
+
u && /* @__PURE__ */ e.jsx("div", { className: "shrink-0", children: i ? /* @__PURE__ */ e.jsxs(Es, { children: [
|
|
913
|
+
/* @__PURE__ */ e.jsx(ma, { children: b() }),
|
|
914
|
+
/* @__PURE__ */ e.jsx(As, { className: "text-xs", align: "start", children: i })
|
|
915
915
|
] }) : b() }),
|
|
916
|
-
/* @__PURE__ */ e.jsxs(
|
|
916
|
+
/* @__PURE__ */ e.jsxs(fe, { disabled: m, value: y, onValueChange: r, children: [
|
|
917
917
|
/* @__PURE__ */ e.jsx(
|
|
918
|
-
|
|
918
|
+
ge,
|
|
919
919
|
{
|
|
920
920
|
className: Y(
|
|
921
921
|
"h-9 w-full focus:ring-1 focus:ring-offset-0",
|
|
922
922
|
c
|
|
923
923
|
),
|
|
924
924
|
children: /* @__PURE__ */ e.jsx(
|
|
925
|
-
|
|
925
|
+
je,
|
|
926
926
|
{
|
|
927
927
|
placeholder: t ? "Loading..." : l ? "Error" : `Select ${s}`
|
|
928
928
|
}
|
|
929
929
|
)
|
|
930
930
|
}
|
|
931
931
|
),
|
|
932
|
-
/* @__PURE__ */ e.jsx(
|
|
933
|
-
t ? /* @__PURE__ */ e.jsx(
|
|
932
|
+
/* @__PURE__ */ e.jsx(be, { children: /* @__PURE__ */ e.jsxs(ze, { children: [
|
|
933
|
+
t ? /* @__PURE__ */ e.jsx(ye, { children: "Loading..." }) : /* @__PURE__ */ e.jsx(ye, { children: s }),
|
|
934
934
|
/* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
935
935
|
d && /* @__PURE__ */ e.jsx(W, { value: "none", children: "None" }, "none"),
|
|
936
936
|
n && n.map((h, p) => /* @__PURE__ */ e.jsx(W, { value: h.id, children: h.name }, p))
|
|
@@ -940,22 +940,22 @@ function Pe({
|
|
|
940
940
|
] })
|
|
941
941
|
] });
|
|
942
942
|
}
|
|
943
|
-
function
|
|
943
|
+
function rl({ column: s }) {
|
|
944
944
|
const [n, a] = R(!1), t = o((h) => h.selectedTableName), l = o(
|
|
945
945
|
(h) => h.selectedSchemaName
|
|
946
946
|
), i = o(
|
|
947
947
|
(h) => h.selectedDatamodelId
|
|
948
|
-
), r = o((h) => h.sqlGen), { modelItems: d } =
|
|
948
|
+
), r = o((h) => h.sqlGen), { modelItems: d } = Re(), c = o((h) => h.actions.setSqlGen), u = o((h) => h.actions.setCardSql), m = o((h) => h.actions.setRunSql);
|
|
949
949
|
function y(h, p) {
|
|
950
950
|
var w;
|
|
951
|
-
const v =
|
|
951
|
+
const v = xa(h, r, p), I = (w = d == null ? void 0 : d.find(
|
|
952
952
|
(z) => z.id === i
|
|
953
953
|
)) == null ? void 0 : w.name;
|
|
954
954
|
c(v);
|
|
955
|
-
const C =
|
|
955
|
+
const C = pa(
|
|
956
956
|
v,
|
|
957
|
-
|
|
958
|
-
|
|
957
|
+
xe(l || ""),
|
|
958
|
+
xe(t),
|
|
959
959
|
I
|
|
960
960
|
);
|
|
961
961
|
C && (u(C), m(!0)), a(!1);
|
|
@@ -1004,10 +1004,10 @@ function ll({ column: s }) {
|
|
|
1004
1004
|
)
|
|
1005
1005
|
] });
|
|
1006
1006
|
}
|
|
1007
|
-
return /* @__PURE__ */ e.jsxs(
|
|
1008
|
-
/* @__PURE__ */ e.jsx(
|
|
1007
|
+
return /* @__PURE__ */ e.jsxs(qs, { openDelay: 0, open: n, onOpenChange: a, children: [
|
|
1008
|
+
/* @__PURE__ */ e.jsx(Rs, { asChild: !0, children: /* @__PURE__ */ e.jsx(La, { className: "invisible size-3.5 cursor-pointer text-foreground/40 group-hover:visible" }) }),
|
|
1009
1009
|
/* @__PURE__ */ e.jsx(
|
|
1010
|
-
|
|
1010
|
+
_s,
|
|
1011
1011
|
{
|
|
1012
1012
|
align: "center",
|
|
1013
1013
|
className: "w-20 rounded-md p-0 shadow-none",
|
|
@@ -1016,19 +1016,19 @@ function ll({ column: s }) {
|
|
|
1016
1016
|
)
|
|
1017
1017
|
] });
|
|
1018
1018
|
}
|
|
1019
|
-
function
|
|
1020
|
-
return /* @__PURE__ */ e.jsxs(
|
|
1021
|
-
/* @__PURE__ */ e.jsx(
|
|
1019
|
+
function Ra({ column: s }) {
|
|
1020
|
+
return /* @__PURE__ */ e.jsxs(Es, { children: [
|
|
1021
|
+
/* @__PURE__ */ e.jsx(ut, { asChild: !0, children: ht.includes(s.data_type.toLowerCase()) ? (
|
|
1022
1022
|
// <span className=" font-thin">T</span>
|
|
1023
|
-
/* @__PURE__ */ e.jsx(
|
|
1024
|
-
) :
|
|
1023
|
+
/* @__PURE__ */ e.jsx(Gs, { className: "size-3" })
|
|
1024
|
+
) : fa.includes(s.data_type.toLowerCase()) ? (
|
|
1025
1025
|
//
|
|
1026
|
-
/* @__PURE__ */ e.jsx(
|
|
1027
|
-
) :
|
|
1028
|
-
/* @__PURE__ */ e.jsx(
|
|
1026
|
+
/* @__PURE__ */ e.jsx(Vn, { className: "size-3" })
|
|
1027
|
+
) : mt.includes(s.data_type.toLowerCase()) ? /* @__PURE__ */ e.jsx(xt, { className: "size-3" }) : pt.includes(s.data_type.toLowerCase()) ? /* @__PURE__ */ e.jsx(Yn, { className: "size-3" }) : /* @__PURE__ */ e.jsx(Kn, { className: "size-3" }) }),
|
|
1028
|
+
/* @__PURE__ */ e.jsx(As, { children: /* @__PURE__ */ e.jsx("p", { className: "font-mono text-xs", children: s.data_type }) })
|
|
1029
1029
|
] });
|
|
1030
1030
|
}
|
|
1031
|
-
function
|
|
1031
|
+
function il({
|
|
1032
1032
|
schemaName: s,
|
|
1033
1033
|
tableName: n,
|
|
1034
1034
|
columns: a,
|
|
@@ -1046,14 +1046,14 @@ function rl({
|
|
|
1046
1046
|
(j) => j.dashboard.aiScopeTables
|
|
1047
1047
|
), { setAIScopeTables: y } = T((j) => j.actions), b = o((j) => j.actions.setRunSql), h = o((j) => j.actions.setSqlGen), p = o(
|
|
1048
1048
|
(j) => j.actions.setIsShowingVisual
|
|
1049
|
-
), v = o((j) => j.actions.setCardSql), { connectionType: I, modelItems: C } =
|
|
1049
|
+
), v = o((j) => j.actions.setCardSql), { connectionType: I, modelItems: C } = Re();
|
|
1050
1050
|
function w(j) {
|
|
1051
1051
|
var q;
|
|
1052
|
-
const f =
|
|
1052
|
+
const f = xa(j, l);
|
|
1053
1053
|
h(f);
|
|
1054
1054
|
const F = (q = C == null ? void 0 : C.find(
|
|
1055
1055
|
($) => $.id === u
|
|
1056
|
-
)) == null ? void 0 : q.name, A =
|
|
1056
|
+
)) == null ? void 0 : q.name, A = pa(f, xe(s), xe(n), F);
|
|
1057
1057
|
A && (v(A), b(!0));
|
|
1058
1058
|
}
|
|
1059
1059
|
function z() {
|
|
@@ -1092,11 +1092,11 @@ function rl({
|
|
|
1092
1092
|
}
|
|
1093
1093
|
function L() {
|
|
1094
1094
|
var q;
|
|
1095
|
-
let j =
|
|
1095
|
+
let j = ja(s, n);
|
|
1096
1096
|
const f = (q = C == null ? void 0 : C.find(
|
|
1097
1097
|
($) => $.id === u
|
|
1098
1098
|
)) == null ? void 0 : q.name;
|
|
1099
|
-
console.log("modelName", f), u && u !== "none" && (j = `${
|
|
1099
|
+
console.log("modelName", f), u && u !== "none" && (j = `${vs}.${f}`);
|
|
1100
1100
|
let F = j;
|
|
1101
1101
|
return (($) => /[A-Z]/.test($))(n) && (F = F.split(".").map((B) => `"${B}"`).join(".")), F;
|
|
1102
1102
|
}
|
|
@@ -1113,7 +1113,7 @@ function rl({
|
|
|
1113
1113
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex grow flex-col space-y-4 px-4", children: [
|
|
1114
1114
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-center gap-1", children: [
|
|
1115
1115
|
/* @__PURE__ */ e.jsx(
|
|
1116
|
-
|
|
1116
|
+
ga,
|
|
1117
1117
|
{
|
|
1118
1118
|
title: `${z() ? "Remove from" : "Add to"} AI Scope`,
|
|
1119
1119
|
pressed: z(),
|
|
@@ -1121,7 +1121,7 @@ function rl({
|
|
|
1121
1121
|
variant: "outline",
|
|
1122
1122
|
className: "h-9 px-2",
|
|
1123
1123
|
children: /* @__PURE__ */ e.jsx(
|
|
1124
|
-
|
|
1124
|
+
ft,
|
|
1125
1125
|
{
|
|
1126
1126
|
className: Y("size-4", {
|
|
1127
1127
|
"text-primary": z(),
|
|
@@ -1140,7 +1140,7 @@ function rl({
|
|
|
1140
1140
|
variant: "secondary",
|
|
1141
1141
|
className: "flex",
|
|
1142
1142
|
children: [
|
|
1143
|
-
t !== "Success" ? /* @__PURE__ */ e.jsx(Ye, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(
|
|
1143
|
+
t !== "Success" ? /* @__PURE__ */ e.jsx(Ye, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(Qn, { className: "mr-2 size-4" }),
|
|
1144
1144
|
"Top 10"
|
|
1145
1145
|
]
|
|
1146
1146
|
}
|
|
@@ -1154,14 +1154,14 @@ function rl({
|
|
|
1154
1154
|
variant: "secondary",
|
|
1155
1155
|
className: "flex",
|
|
1156
1156
|
children: [
|
|
1157
|
-
t !== "Success" ? /* @__PURE__ */ e.jsx(Ye, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(
|
|
1157
|
+
t !== "Success" ? /* @__PURE__ */ e.jsx(Ye, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(Jn, { className: "mr-2 size-4" }),
|
|
1158
1158
|
"Count"
|
|
1159
1159
|
]
|
|
1160
1160
|
}
|
|
1161
1161
|
)
|
|
1162
1162
|
] }),
|
|
1163
1163
|
/* @__PURE__ */ e.jsxs(
|
|
1164
|
-
|
|
1164
|
+
Hs,
|
|
1165
1165
|
{
|
|
1166
1166
|
className: "flex-1 basis-0 overflow-y-auto border-b border-t border-muted py-3",
|
|
1167
1167
|
children: [
|
|
@@ -1172,12 +1172,12 @@ function rl({
|
|
|
1172
1172
|
className: Y(
|
|
1173
1173
|
"group mx-3 flex cursor-pointer items-center justify-between rounded px-2 py-[6px] text-sm transition-colors hover:bg-muted/50",
|
|
1174
1174
|
{
|
|
1175
|
-
"bg-muted":
|
|
1175
|
+
"bg-muted": gt(j, l)
|
|
1176
1176
|
}
|
|
1177
1177
|
),
|
|
1178
1178
|
children: [
|
|
1179
1179
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
1180
|
-
/* @__PURE__ */ e.jsx(
|
|
1180
|
+
/* @__PURE__ */ e.jsx(Ra, { column: j }),
|
|
1181
1181
|
/* @__PURE__ */ e.jsx("span", { children: j.column_name })
|
|
1182
1182
|
] }),
|
|
1183
1183
|
/* @__PURE__ */ e.jsx(
|
|
@@ -1185,23 +1185,23 @@ function rl({
|
|
|
1185
1185
|
{
|
|
1186
1186
|
onClick: (f) => f.stopPropagation(),
|
|
1187
1187
|
className: "flex items-center justify-end",
|
|
1188
|
-
children:
|
|
1188
|
+
children: fa.includes(j.data_type) && /* @__PURE__ */ e.jsx(rl, { column: j })
|
|
1189
1189
|
}
|
|
1190
1190
|
)
|
|
1191
1191
|
]
|
|
1192
1192
|
},
|
|
1193
1193
|
j.column_name
|
|
1194
1194
|
)),
|
|
1195
|
-
/* @__PURE__ */ e.jsx(
|
|
1196
|
-
/* @__PURE__ */ e.jsx(
|
|
1195
|
+
/* @__PURE__ */ e.jsx(Ys, { orientation: "vertical" }),
|
|
1196
|
+
/* @__PURE__ */ e.jsx(Ys, { orientation: "horizontal" })
|
|
1197
1197
|
]
|
|
1198
1198
|
}
|
|
1199
1199
|
)
|
|
1200
1200
|
] });
|
|
1201
1201
|
}
|
|
1202
|
-
function
|
|
1202
|
+
function Re(s, n) {
|
|
1203
1203
|
var es, $e, ss, as, ts;
|
|
1204
|
-
let a =
|
|
1204
|
+
let a = ws(() => [], []);
|
|
1205
1205
|
const t = Ce().authToken || s, l = o(
|
|
1206
1206
|
(N) => N.selectedConnectionId
|
|
1207
1207
|
), i = o(
|
|
@@ -1372,10 +1372,10 @@ function qe(s, n) {
|
|
|
1372
1372
|
function se(N) {
|
|
1373
1373
|
b(N === "none" ? "" : N), h(""), p(""), N !== "none" && N !== "" && y("");
|
|
1374
1374
|
}
|
|
1375
|
-
function
|
|
1375
|
+
function me(N) {
|
|
1376
1376
|
m(N);
|
|
1377
1377
|
}
|
|
1378
|
-
function
|
|
1378
|
+
function Ee(N) {
|
|
1379
1379
|
y(N === "none" ? "" : N), N !== "none" && N !== "" && b("");
|
|
1380
1380
|
}
|
|
1381
1381
|
q && (($e = q == null ? void 0 : q.databases) == null ? void 0 : $e.length) > 0, U && ((ss = U == null ? void 0 : U.schemas) == null ? void 0 : ss.length) > 0, le && ((as = le == null ? void 0 : le.columns) == null ? void 0 : as.length) > 0 && (a = le.columns.map((N) => ({
|
|
@@ -1388,16 +1388,16 @@ function qe(s, n) {
|
|
|
1388
1388
|
name: N.name,
|
|
1389
1389
|
type: N.type
|
|
1390
1390
|
})
|
|
1391
|
-
),
|
|
1391
|
+
), Ae = (ts = x == null ? void 0 : x.datamodels) == null ? void 0 : ts.map((N) => ({
|
|
1392
1392
|
id: N.id,
|
|
1393
1393
|
name: N.name
|
|
1394
1394
|
})), He = q == null ? void 0 : q.databases.map((N) => ({
|
|
1395
1395
|
id: N.database_name,
|
|
1396
1396
|
name: N.database_name
|
|
1397
|
-
})),
|
|
1397
|
+
})), Js = U == null ? void 0 : U.schemas.map((N) => ({
|
|
1398
1398
|
id: N.schema_name,
|
|
1399
1399
|
name: N.schema_name
|
|
1400
|
-
})),
|
|
1400
|
+
})), Ve = E == null ? void 0 : E.tables.map((N) => ({
|
|
1401
1401
|
id: N.table_name,
|
|
1402
1402
|
name: N.table_name
|
|
1403
1403
|
}));
|
|
@@ -1405,16 +1405,16 @@ function qe(s, n) {
|
|
|
1405
1405
|
connectionItems: Ze,
|
|
1406
1406
|
isConnectionsLoading: S,
|
|
1407
1407
|
isConnectionsError: L,
|
|
1408
|
-
modelItems:
|
|
1408
|
+
modelItems: Ae,
|
|
1409
1409
|
isModelsLoading: k,
|
|
1410
1410
|
isModelsError: j,
|
|
1411
1411
|
databaseItems: He,
|
|
1412
1412
|
isDatabasesLoadingOrFetching: $ || B,
|
|
1413
1413
|
isDatabaseError: X,
|
|
1414
|
-
schemaItems:
|
|
1414
|
+
schemaItems: Js,
|
|
1415
1415
|
isSchemaLoadingOrFetching: oe || O,
|
|
1416
1416
|
isSchemaError: H,
|
|
1417
|
-
tableItems:
|
|
1417
|
+
tableItems: Ve,
|
|
1418
1418
|
isTableLoadingOrFetching: D || ae,
|
|
1419
1419
|
isTableError: P,
|
|
1420
1420
|
columns: a,
|
|
@@ -1424,13 +1424,13 @@ function qe(s, n) {
|
|
|
1424
1424
|
connectionType: F,
|
|
1425
1425
|
tableName: Fe,
|
|
1426
1426
|
schemaName: Ie,
|
|
1427
|
-
handleConnectionChange:
|
|
1428
|
-
handleDatamodelChange:
|
|
1427
|
+
handleConnectionChange: me,
|
|
1428
|
+
handleDatamodelChange: Ee,
|
|
1429
1429
|
handleDatabaseChange: se,
|
|
1430
1430
|
handleSchemaChange: we
|
|
1431
1431
|
};
|
|
1432
1432
|
}
|
|
1433
|
-
function
|
|
1433
|
+
function _a({
|
|
1434
1434
|
ColumnsComponent: s
|
|
1435
1435
|
}) {
|
|
1436
1436
|
var ae;
|
|
@@ -1471,10 +1471,10 @@ function Ra({
|
|
|
1471
1471
|
handleDatamodelChange: B,
|
|
1472
1472
|
tableName: X,
|
|
1473
1473
|
schemaName: te
|
|
1474
|
-
} =
|
|
1474
|
+
} = Re();
|
|
1475
1475
|
function U() {
|
|
1476
1476
|
return s ? s(te, X, b) : /* @__PURE__ */ e.jsx(
|
|
1477
|
-
|
|
1477
|
+
il,
|
|
1478
1478
|
{
|
|
1479
1479
|
schemaName: te,
|
|
1480
1480
|
tableName: X,
|
|
@@ -1506,9 +1506,9 @@ function Ra({
|
|
|
1506
1506
|
function H() {
|
|
1507
1507
|
if (n && !F && (!t || t === "none") && (!a || a === "none"))
|
|
1508
1508
|
return /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-3", children: [
|
|
1509
|
-
/* @__PURE__ */ e.jsx("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e.jsx(
|
|
1509
|
+
/* @__PURE__ */ e.jsx("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e.jsx(ue, {}) }),
|
|
1510
1510
|
/* @__PURE__ */ e.jsx("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e.jsx(_, { children: "OR" }) }),
|
|
1511
|
-
/* @__PURE__ */ e.jsx("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e.jsx(
|
|
1511
|
+
/* @__PURE__ */ e.jsx("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e.jsx(ue, {}) })
|
|
1512
1512
|
] });
|
|
1513
1513
|
}
|
|
1514
1514
|
function Q() {
|
|
@@ -1589,14 +1589,14 @@ function Ra({
|
|
|
1589
1589
|
variant: "secondary",
|
|
1590
1590
|
className: "w-full",
|
|
1591
1591
|
children: [
|
|
1592
|
-
/* @__PURE__ */ e.jsx(
|
|
1592
|
+
/* @__PURE__ */ e.jsx($n, { className: "mr-2 size-4" }),
|
|
1593
1593
|
"Help"
|
|
1594
1594
|
]
|
|
1595
1595
|
}
|
|
1596
1596
|
) })
|
|
1597
1597
|
] });
|
|
1598
1598
|
}
|
|
1599
|
-
function
|
|
1599
|
+
function ol(s) {
|
|
1600
1600
|
const n = s.toUpperCase().indexOf("WHERE"), a = s.toUpperCase().indexOf("GROUP BY"), t = s.toUpperCase().indexOf("LIMIT"), l = s.toUpperCase().indexOf("ORDER BY");
|
|
1601
1601
|
let i = s.length;
|
|
1602
1602
|
if (l !== -1 && (i = l), t !== -1 && t < i && (i = t), n !== -1) {
|
|
@@ -1612,16 +1612,16 @@ function il(s) {
|
|
|
1612
1612
|
return `${r} {{ filters | where }} ${d}`;
|
|
1613
1613
|
}
|
|
1614
1614
|
}
|
|
1615
|
-
function
|
|
1615
|
+
function cl({
|
|
1616
1616
|
error: s,
|
|
1617
1617
|
setShowAIDialog: n,
|
|
1618
1618
|
setUserInputforAI: a,
|
|
1619
1619
|
setTriggerAIRun: t
|
|
1620
1620
|
}) {
|
|
1621
|
-
return /* @__PURE__ */ e.jsxs(
|
|
1622
|
-
/* @__PURE__ */ e.jsx(
|
|
1623
|
-
/* @__PURE__ */ e.jsx(
|
|
1624
|
-
/* @__PURE__ */ e.jsx(
|
|
1621
|
+
return /* @__PURE__ */ e.jsxs(qs, { openDelay: 0, children: [
|
|
1622
|
+
/* @__PURE__ */ e.jsx(Rs, { asChild: !0, children: /* @__PURE__ */ e.jsx(M, { variant: "link", className: "h-5 p-0", children: /* @__PURE__ */ e.jsx(Fn, { className: "h-4 w-4 text-red-500" }) }) }),
|
|
1623
|
+
/* @__PURE__ */ e.jsx(_s, { align: "start", className: "min-w-fit max-w-[500px]", children: /* @__PURE__ */ e.jsx("div", { className: "flex justify-between space-x-4", children: /* @__PURE__ */ e.jsxs("div", { className: "flex grow flex-col space-y-2", children: [
|
|
1624
|
+
/* @__PURE__ */ e.jsx(Hs, { 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 }) }),
|
|
1625
1625
|
/* @__PURE__ */ e.jsxs(
|
|
1626
1626
|
M,
|
|
1627
1627
|
{
|
|
@@ -1631,7 +1631,7 @@ function ol({
|
|
|
1631
1631
|
size: "sm",
|
|
1632
1632
|
variant: "outline",
|
|
1633
1633
|
children: [
|
|
1634
|
-
/* @__PURE__ */ e.jsx(
|
|
1634
|
+
/* @__PURE__ */ e.jsx(An, { className: "mr-2 h-4 w-4" }),
|
|
1635
1635
|
"Debug with AI"
|
|
1636
1636
|
]
|
|
1637
1637
|
}
|
|
@@ -1639,7 +1639,7 @@ function ol({
|
|
|
1639
1639
|
] }) }) })
|
|
1640
1640
|
] });
|
|
1641
1641
|
}
|
|
1642
|
-
function
|
|
1642
|
+
function dl({
|
|
1643
1643
|
text: s,
|
|
1644
1644
|
onCheckedChange: n,
|
|
1645
1645
|
checked: a
|
|
@@ -1649,7 +1649,7 @@ function cl({
|
|
|
1649
1649
|
/* @__PURE__ */ e.jsx("label", { className: "text-xs leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", children: s })
|
|
1650
1650
|
] });
|
|
1651
1651
|
}
|
|
1652
|
-
function
|
|
1652
|
+
function ul() {
|
|
1653
1653
|
const { authToken: s } = Ce(), n = o(
|
|
1654
1654
|
(i) => i.selectedConnectionId
|
|
1655
1655
|
), { data: a } = de({
|
|
@@ -1665,10 +1665,10 @@ function dl() {
|
|
|
1665
1665
|
);
|
|
1666
1666
|
return t == null ? void 0 : t.type;
|
|
1667
1667
|
}
|
|
1668
|
-
function
|
|
1669
|
-
const { authToken: s } = Ce(), n = We(null), a = o((c) => c.applyFilters), [t, l] = R(""), i = o((c) => c.filterValues), r = o((c) => c.card.sql), d =
|
|
1668
|
+
function hl() {
|
|
1669
|
+
const { authToken: s } = Ce(), n = We(null), a = o((c) => c.applyFilters), [t, l] = R(""), i = o((c) => c.filterValues), r = o((c) => c.card.sql), d = ul();
|
|
1670
1670
|
return /* @__PURE__ */ e.jsxs(
|
|
1671
|
-
|
|
1671
|
+
qs,
|
|
1672
1672
|
{
|
|
1673
1673
|
openDelay: 0,
|
|
1674
1674
|
onOpenChange: async (c) => {
|
|
@@ -1687,20 +1687,20 @@ function ul() {
|
|
|
1687
1687
|
console.log(u), u.sql ? (console.log(u.records), l(u.sql)) : l("Error");
|
|
1688
1688
|
},
|
|
1689
1689
|
children: [
|
|
1690
|
-
/* @__PURE__ */ e.jsx(
|
|
1691
|
-
/* @__PURE__ */ e.jsxs(
|
|
1690
|
+
/* @__PURE__ */ e.jsx(Rs, { asChild: !0, children: a && /* @__PURE__ */ e.jsx("p", { className: "p-0 text-xs hover:cursor-pointer", children: "| Filter Query" }) }),
|
|
1691
|
+
/* @__PURE__ */ e.jsxs(_s, { align: "end", className: "w-[600px]", children: [
|
|
1692
1692
|
/* @__PURE__ */ e.jsx("div", { className: "flex justify-between space-x-4", children: /* @__PURE__ */ e.jsx("div", { className: "rounded-sm bg-muted p-2", children: /* @__PURE__ */ e.jsxs("code", { ref: n, className: "font-mono text-sm", children: [
|
|
1693
1693
|
t,
|
|
1694
1694
|
/* @__PURE__ */ e.jsx(
|
|
1695
|
-
|
|
1695
|
+
ba,
|
|
1696
1696
|
{
|
|
1697
|
-
onClick: () =>
|
|
1697
|
+
onClick: () => jt(n),
|
|
1698
1698
|
className: "ml-3 inline-block h-4 w-4 opacity-70 hover:cursor-pointer hover:opacity-100"
|
|
1699
1699
|
}
|
|
1700
1700
|
)
|
|
1701
1701
|
] }) }) }),
|
|
1702
1702
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 pt-2", children: [
|
|
1703
|
-
/* @__PURE__ */ e.jsx(
|
|
1703
|
+
/* @__PURE__ */ e.jsx(bt, { className: "h-4 w-4 opacity-70" }),
|
|
1704
1704
|
/* @__PURE__ */ e.jsx("span", { className: "text-xs text-muted-foreground", children: "A preview of the query with filters applied." })
|
|
1705
1705
|
] })
|
|
1706
1706
|
] })
|
|
@@ -1708,7 +1708,7 @@ function ul() {
|
|
|
1708
1708
|
}
|
|
1709
1709
|
);
|
|
1710
1710
|
}
|
|
1711
|
-
const
|
|
1711
|
+
const ml = `
|
|
1712
1712
|
|
|
1713
1713
|
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.
|
|
1714
1714
|
|
|
@@ -1755,7 +1755,7 @@ SELECT label, measure FROM table
|
|
|
1755
1755
|
- Label - Category
|
|
1756
1756
|
- Measure - Number
|
|
1757
1757
|
`;
|
|
1758
|
-
function
|
|
1758
|
+
function xl({
|
|
1759
1759
|
open: s,
|
|
1760
1760
|
setOpen: n,
|
|
1761
1761
|
userInput: a,
|
|
@@ -1771,7 +1771,7 @@ function ml({
|
|
|
1771
1771
|
Table Columns: ${C == null ? void 0 : C.map((O) => `${O.column_name} | ${O.data_type}`).join(", ")}
|
|
1772
1772
|
User SQL: ${w}
|
|
1773
1773
|
${b && `Base Queries: ${JSON.stringify(b)} `}`, L = ` 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.
|
|
1774
|
-
Visual Query Syntax: ${
|
|
1774
|
+
Visual Query Syntax: ${ml}`, { data: x, isLoading: k, isFetching: j, isError: f, refetch: F } = de({
|
|
1775
1775
|
queryKey: ["ai-query"],
|
|
1776
1776
|
queryFn: () => ke(
|
|
1777
1777
|
"https://semaphor.cloud/api/v1/ai",
|
|
@@ -1854,7 +1854,7 @@ function ml({
|
|
|
1854
1854
|
pre: ({ node: O, ...H }) => /* @__PURE__ */ e.jsxs("pre", { className: "space-y-2 rounded-sm bg-muted/50 p-3", style: B, children: [
|
|
1855
1855
|
/* @__PURE__ */ e.jsx("code", { className: "whitespace-normal text-sm", children: H.children }),
|
|
1856
1856
|
/* @__PURE__ */ e.jsxs("div", { className: "flex justify-start gap-2", children: [
|
|
1857
|
-
/* @__PURE__ */ e.jsx(M, { onClick: U, size: "sm", variant: "outline", children: /* @__PURE__ */ e.jsx(
|
|
1857
|
+
/* @__PURE__ */ e.jsx(M, { onClick: U, size: "sm", variant: "outline", children: /* @__PURE__ */ e.jsx(ba, {}) }),
|
|
1858
1858
|
/* @__PURE__ */ e.jsx(
|
|
1859
1859
|
M,
|
|
1860
1860
|
{
|
|
@@ -1864,7 +1864,7 @@ function ml({
|
|
|
1864
1864
|
},
|
|
1865
1865
|
size: "sm",
|
|
1866
1866
|
variant: "outline",
|
|
1867
|
-
children: /* @__PURE__ */ e.jsx(
|
|
1867
|
+
children: /* @__PURE__ */ e.jsx(Ct, {})
|
|
1868
1868
|
}
|
|
1869
1869
|
)
|
|
1870
1870
|
] })
|
|
@@ -1885,13 +1885,13 @@ function ml({
|
|
|
1885
1885
|
{
|
|
1886
1886
|
className: "flex items-start rounded-md bg-muted p-3 text-sm",
|
|
1887
1887
|
children: [
|
|
1888
|
-
/* @__PURE__ */ e.jsx(
|
|
1888
|
+
/* @__PURE__ */ e.jsx(Xn, { className: "mr-2 h-5 w-5" }),
|
|
1889
1889
|
/* @__PURE__ */ e.jsx("div", { children: O.content })
|
|
1890
1890
|
]
|
|
1891
1891
|
},
|
|
1892
1892
|
H
|
|
1893
1893
|
) : O.role === "ai" ? /* @__PURE__ */ e.jsx(
|
|
1894
|
-
|
|
1894
|
+
vt,
|
|
1895
1895
|
{
|
|
1896
1896
|
className: "w-full overflow-auto py-1",
|
|
1897
1897
|
components: te,
|
|
@@ -1900,8 +1900,8 @@ function ml({
|
|
|
1900
1900
|
H
|
|
1901
1901
|
) : /* @__PURE__ */ e.jsx("div", {}, H));
|
|
1902
1902
|
}
|
|
1903
|
-
return /* @__PURE__ */ e.jsxs(
|
|
1904
|
-
/* @__PURE__ */ e.jsx(
|
|
1903
|
+
return /* @__PURE__ */ e.jsxs(Os, { open: s, onOpenChange: n, children: [
|
|
1904
|
+
/* @__PURE__ */ e.jsx(Fs, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
1905
1905
|
M,
|
|
1906
1906
|
{
|
|
1907
1907
|
size: "sm",
|
|
@@ -1911,13 +1911,13 @@ function ml({
|
|
|
1911
1911
|
}
|
|
1912
1912
|
) }),
|
|
1913
1913
|
/* @__PURE__ */ e.jsxs(
|
|
1914
|
-
|
|
1914
|
+
Ts,
|
|
1915
1915
|
{
|
|
1916
1916
|
className: "flex flex-col justify-between overflow-auto sm:max-w-[425px] md:max-h-[625px] md:min-w-[625px]",
|
|
1917
1917
|
children: [
|
|
1918
|
-
/* @__PURE__ */ e.jsxs(
|
|
1919
|
-
/* @__PURE__ */ e.jsx(
|
|
1920
|
-
/* @__PURE__ */ e.jsx(
|
|
1918
|
+
/* @__PURE__ */ e.jsxs(Ms, { children: [
|
|
1919
|
+
/* @__PURE__ */ e.jsx(Ls, { children: "Assistant" }),
|
|
1920
|
+
/* @__PURE__ */ e.jsx(Ds, { children: "What can I help you with?" })
|
|
1921
1921
|
] }),
|
|
1922
1922
|
/* @__PURE__ */ e.jsx(
|
|
1923
1923
|
"div",
|
|
@@ -1932,7 +1932,7 @@ function ml({
|
|
|
1932
1932
|
{
|
|
1933
1933
|
children: /* @__PURE__ */ e.jsxs("div", { className: "flex w-full items-center rounded-md border", children: [
|
|
1934
1934
|
/* @__PURE__ */ e.jsx(
|
|
1935
|
-
|
|
1935
|
+
ya,
|
|
1936
1936
|
{
|
|
1937
1937
|
autoFocus: !0,
|
|
1938
1938
|
ref: r,
|
|
@@ -1960,7 +1960,7 @@ function ml({
|
|
|
1960
1960
|
size: "sm",
|
|
1961
1961
|
variant: "ghost",
|
|
1962
1962
|
onClick: q,
|
|
1963
|
-
children: !k && !j ? /* @__PURE__ */ e.jsx(
|
|
1963
|
+
children: !k && !j ? /* @__PURE__ */ e.jsx(yt, {}) : /* @__PURE__ */ e.jsx(Ye, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" })
|
|
1964
1964
|
}
|
|
1965
1965
|
)
|
|
1966
1966
|
] })
|
|
@@ -1971,17 +1971,17 @@ function ml({
|
|
|
1971
1971
|
)
|
|
1972
1972
|
] });
|
|
1973
1973
|
}
|
|
1974
|
-
var
|
|
1974
|
+
var Ha = {
|
|
1975
1975
|
color: void 0,
|
|
1976
1976
|
size: void 0,
|
|
1977
1977
|
className: void 0,
|
|
1978
1978
|
style: void 0,
|
|
1979
1979
|
attr: void 0
|
|
1980
|
-
},
|
|
1981
|
-
function
|
|
1980
|
+
}, na = ve.createContext && /* @__PURE__ */ ve.createContext(Ha), pl = ["attr", "size", "title"];
|
|
1981
|
+
function fl(s, n) {
|
|
1982
1982
|
if (s == null)
|
|
1983
1983
|
return {};
|
|
1984
|
-
var a =
|
|
1984
|
+
var a = gl(s, n), t, l;
|
|
1985
1985
|
if (Object.getOwnPropertySymbols) {
|
|
1986
1986
|
var i = Object.getOwnPropertySymbols(s);
|
|
1987
1987
|
for (l = 0; l < i.length; l++)
|
|
@@ -1989,7 +1989,7 @@ function pl(s, n) {
|
|
|
1989
1989
|
}
|
|
1990
1990
|
return a;
|
|
1991
1991
|
}
|
|
1992
|
-
function
|
|
1992
|
+
function gl(s, n) {
|
|
1993
1993
|
if (s == null)
|
|
1994
1994
|
return {};
|
|
1995
1995
|
var a = {}, t = Object.keys(s), l, i;
|
|
@@ -2007,7 +2007,7 @@ function ds() {
|
|
|
2007
2007
|
return s;
|
|
2008
2008
|
}, ds.apply(this, arguments);
|
|
2009
2009
|
}
|
|
2010
|
-
function
|
|
2010
|
+
function la(s, n) {
|
|
2011
2011
|
var a = Object.keys(s);
|
|
2012
2012
|
if (Object.getOwnPropertySymbols) {
|
|
2013
2013
|
var t = Object.getOwnPropertySymbols(s);
|
|
@@ -2020,22 +2020,22 @@ function na(s, n) {
|
|
|
2020
2020
|
function us(s) {
|
|
2021
2021
|
for (var n = 1; n < arguments.length; n++) {
|
|
2022
2022
|
var a = arguments[n] != null ? arguments[n] : {};
|
|
2023
|
-
n % 2 ?
|
|
2024
|
-
|
|
2025
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(s, Object.getOwnPropertyDescriptors(a)) :
|
|
2023
|
+
n % 2 ? la(Object(a), !0).forEach(function(t) {
|
|
2024
|
+
jl(s, t, a[t]);
|
|
2025
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(s, Object.getOwnPropertyDescriptors(a)) : la(Object(a)).forEach(function(t) {
|
|
2026
2026
|
Object.defineProperty(s, t, Object.getOwnPropertyDescriptor(a, t));
|
|
2027
2027
|
});
|
|
2028
2028
|
}
|
|
2029
2029
|
return s;
|
|
2030
2030
|
}
|
|
2031
|
-
function
|
|
2032
|
-
return n =
|
|
2031
|
+
function jl(s, n, a) {
|
|
2032
|
+
return n = bl(n), n in s ? Object.defineProperty(s, n, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : s[n] = a, s;
|
|
2033
2033
|
}
|
|
2034
|
-
function
|
|
2035
|
-
var n =
|
|
2034
|
+
function bl(s) {
|
|
2035
|
+
var n = yl(s, "string");
|
|
2036
2036
|
return typeof n == "symbol" ? n : String(n);
|
|
2037
2037
|
}
|
|
2038
|
-
function
|
|
2038
|
+
function yl(s, n) {
|
|
2039
2039
|
if (typeof s != "object" || s === null)
|
|
2040
2040
|
return s;
|
|
2041
2041
|
var a = s[Symbol.toPrimitive];
|
|
@@ -2047,24 +2047,24 @@ function bl(s, n) {
|
|
|
2047
2047
|
}
|
|
2048
2048
|
return (n === "string" ? String : Number)(s);
|
|
2049
2049
|
}
|
|
2050
|
-
function
|
|
2051
|
-
return s && s.map((n, a) => /* @__PURE__ */
|
|
2050
|
+
function $a(s) {
|
|
2051
|
+
return s && s.map((n, a) => /* @__PURE__ */ ve.createElement(n.tag, us({
|
|
2052
2052
|
key: a
|
|
2053
|
-
}, n.attr),
|
|
2053
|
+
}, n.attr), $a(n.child)));
|
|
2054
2054
|
}
|
|
2055
2055
|
function Ne(s) {
|
|
2056
|
-
return (n) => /* @__PURE__ */
|
|
2056
|
+
return (n) => /* @__PURE__ */ ve.createElement(vl, ds({
|
|
2057
2057
|
attr: us({}, s.attr)
|
|
2058
|
-
}, n),
|
|
2058
|
+
}, n), $a(s.child));
|
|
2059
2059
|
}
|
|
2060
|
-
function
|
|
2060
|
+
function vl(s) {
|
|
2061
2061
|
var n = (a) => {
|
|
2062
2062
|
var {
|
|
2063
2063
|
attr: t,
|
|
2064
2064
|
size: l,
|
|
2065
2065
|
title: i
|
|
2066
|
-
} = s, r =
|
|
2067
|
-
return a.className && (c = a.className), s.className && (c = (c ? c + " " : "") + s.className), /* @__PURE__ */
|
|
2066
|
+
} = s, r = fl(s, pl), d = l || a.size || "1em", c;
|
|
2067
|
+
return a.className && (c = a.className), s.className && (c = (c ? c + " " : "") + s.className), /* @__PURE__ */ ve.createElement("svg", ds({
|
|
2068
2068
|
stroke: "currentColor",
|
|
2069
2069
|
fill: "currentColor",
|
|
2070
2070
|
strokeWidth: "0"
|
|
@@ -2076,15 +2076,15 @@ function yl(s) {
|
|
|
2076
2076
|
height: d,
|
|
2077
2077
|
width: d,
|
|
2078
2078
|
xmlns: "http://www.w3.org/2000/svg"
|
|
2079
|
-
}), i && /* @__PURE__ */
|
|
2079
|
+
}), i && /* @__PURE__ */ ve.createElement("title", null, i), s.children);
|
|
2080
2080
|
};
|
|
2081
|
-
return
|
|
2081
|
+
return na !== void 0 ? /* @__PURE__ */ ve.createElement(na.Consumer, null, (a) => n(a)) : n(Ha);
|
|
2082
2082
|
}
|
|
2083
|
-
function
|
|
2083
|
+
function Cl(s) {
|
|
2084
2084
|
return Ne({ 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);
|
|
2085
2085
|
}
|
|
2086
|
-
function
|
|
2087
|
-
const { theme: s } =
|
|
2086
|
+
function Nl() {
|
|
2087
|
+
const { theme: s } = Nt(), n = We(), a = We(), [t, l] = R(!1), [i, r] = R(!1), [d, c] = R(!1), [u, m] = R(""), [y, b] = R(!1), { authToken: h } = Ce(), p = T((g) => g.selectedSheetId), v = T((g) => g.dashboard.baseQueries), I = o((g) => g.card), C = T((g) => g.theme), w = o((g) => g.isShowingVisual);
|
|
2088
2088
|
T((g) => g.onAcceptChanges);
|
|
2089
2089
|
const z = o(
|
|
2090
2090
|
(g) => g.selectedConnectionId
|
|
@@ -2098,7 +2098,7 @@ function Cl() {
|
|
|
2098
2098
|
T(
|
|
2099
2099
|
(g) => g.actions.updateFrameCard
|
|
2100
2100
|
);
|
|
2101
|
-
const k = o((g) => g.selectedTableName), j = o((g) => g.card.sql), f = o((g) => g.card.python), F =
|
|
2101
|
+
const k = o((g) => g.selectedTableName), j = o((g) => g.card.sql), f = o((g) => g.card.python), F = St(j, v), A = o((g) => g.selectedConnectionId), q = o((g) => g.frame), $ = T((g) => g.dashboard.filters), B = T((g) => g.filterValues), X = $ == null ? void 0 : $.filter(
|
|
2102
2102
|
(g) => g.sheetId === p || !g.sheetId
|
|
2103
2103
|
), te = B == null ? void 0 : B.filter(
|
|
2104
2104
|
(g) => (X == null ? void 0 : X.some((re) => re.id === g.filterId)) || g.filterId.endsWith(p)
|
|
@@ -2117,13 +2117,13 @@ function Cl() {
|
|
|
2117
2117
|
(g) => g.actions.setIsSqlRunning
|
|
2118
2118
|
), {
|
|
2119
2119
|
data: se,
|
|
2120
|
-
isLoading:
|
|
2121
|
-
isFetching:
|
|
2120
|
+
isLoading: me,
|
|
2121
|
+
isFetching: Ee,
|
|
2122
2122
|
isSuccess: Ze,
|
|
2123
|
-
isError:
|
|
2123
|
+
isError: Ae,
|
|
2124
2124
|
error: He,
|
|
2125
|
-
status:
|
|
2126
|
-
refetch:
|
|
2125
|
+
status: Js,
|
|
2126
|
+
refetch: Ve
|
|
2127
2127
|
} = de({
|
|
2128
2128
|
queryKey: [F, f],
|
|
2129
2129
|
queryFn: () => Xe(
|
|
@@ -2132,9 +2132,9 @@ function Cl() {
|
|
|
2132
2132
|
{
|
|
2133
2133
|
connection_id: A,
|
|
2134
2134
|
sql: F,
|
|
2135
|
-
python: f ===
|
|
2135
|
+
python: f === Xs ? "" : f,
|
|
2136
2136
|
active_filters: U ? te : [],
|
|
2137
|
-
cache_config:
|
|
2137
|
+
cache_config: zt()
|
|
2138
2138
|
}
|
|
2139
2139
|
),
|
|
2140
2140
|
enabled: !1,
|
|
@@ -2145,19 +2145,19 @@ function Cl() {
|
|
|
2145
2145
|
position: "top-center",
|
|
2146
2146
|
richColors: !0
|
|
2147
2147
|
}), ae((se == null ? void 0 : se.output) || ""), se.records.length > 0)) {
|
|
2148
|
-
const { dimensionKeys: g } =
|
|
2148
|
+
const { dimensionKeys: g } = Cs(se.records);
|
|
2149
2149
|
O(g);
|
|
2150
2150
|
}
|
|
2151
2151
|
}, [se, ce, O, ae]), Z(() => {
|
|
2152
|
-
Fe && (
|
|
2153
|
-
}, [Fe,
|
|
2154
|
-
(
|
|
2152
|
+
Fe && (Ve(), Ie(!1));
|
|
2153
|
+
}, [Fe, Ve, Ie]), Z(() => {
|
|
2154
|
+
(me || Ee) && we(!0), (Ae || Ze) && we(!1), Ae ? (D(He.message), ce([]), O([]), ae("")) : D("");
|
|
2155
2155
|
}, [
|
|
2156
|
-
|
|
2157
|
-
|
|
2156
|
+
me,
|
|
2157
|
+
Ee,
|
|
2158
2158
|
se,
|
|
2159
2159
|
ae,
|
|
2160
|
-
|
|
2160
|
+
Ae,
|
|
2161
2161
|
Ze,
|
|
2162
2162
|
we,
|
|
2163
2163
|
ce,
|
|
@@ -2181,10 +2181,10 @@ function Cl() {
|
|
|
2181
2181
|
if (ie == "All__Header")
|
|
2182
2182
|
return g[0].id;
|
|
2183
2183
|
if (ie && ie.endsWith("__Header")) {
|
|
2184
|
-
const
|
|
2185
|
-
(
|
|
2184
|
+
const lt = ie.split("__")[0], Qs = g.find(
|
|
2185
|
+
(rt) => rt.tabTitle === lt
|
|
2186
2186
|
);
|
|
2187
|
-
return
|
|
2187
|
+
return Qs ? Qs.id : g[0].id;
|
|
2188
2188
|
}
|
|
2189
2189
|
return re;
|
|
2190
2190
|
}
|
|
@@ -2193,7 +2193,7 @@ function Cl() {
|
|
|
2193
2193
|
}
|
|
2194
2194
|
function as() {
|
|
2195
2195
|
let g = j;
|
|
2196
|
-
j && !j.includes("{{") && (g =
|
|
2196
|
+
j && !j.includes("{{") && (g = ol(j), Q(g));
|
|
2197
2197
|
const re = {
|
|
2198
2198
|
...I,
|
|
2199
2199
|
lastSelectedSchema: x,
|
|
@@ -2205,7 +2205,7 @@ function Cl() {
|
|
|
2205
2205
|
sql: g,
|
|
2206
2206
|
customCfg: w ? I.customCfg : null
|
|
2207
2207
|
}, Te = q.cards.map(
|
|
2208
|
-
(
|
|
2208
|
+
(bs) => bs.id === I.id ? re : bs
|
|
2209
2209
|
), ie = {
|
|
2210
2210
|
...q,
|
|
2211
2211
|
cards: Te,
|
|
@@ -2227,14 +2227,14 @@ function Cl() {
|
|
|
2227
2227
|
rules: [],
|
|
2228
2228
|
colors: {
|
|
2229
2229
|
// 'editor.background': activeTheme === 'light' ? '#ffffff' : '#020817',
|
|
2230
|
-
"editor.background": ie === "light" ? "#ffffff" :
|
|
2230
|
+
"editor.background": ie === "light" ? "#ffffff" : wt("--semaphor-background")
|
|
2231
2231
|
}
|
|
2232
2232
|
}), g.editor.setTheme("default");
|
|
2233
2233
|
}
|
|
2234
2234
|
return re && g && re.addCommand(
|
|
2235
2235
|
g.KeyMod.Shift | g.KeyCode.Enter,
|
|
2236
2236
|
function() {
|
|
2237
|
-
return console.log("Executing query..."),
|
|
2237
|
+
return console.log("Executing query..."), Ve(), !1;
|
|
2238
2238
|
}
|
|
2239
2239
|
), () => {
|
|
2240
2240
|
};
|
|
@@ -2242,7 +2242,7 @@ function Cl() {
|
|
|
2242
2242
|
function N(g) {
|
|
2243
2243
|
n.current = g;
|
|
2244
2244
|
}
|
|
2245
|
-
function
|
|
2245
|
+
function tt() {
|
|
2246
2246
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2247
2247
|
i && /* @__PURE__ */ e.jsx(
|
|
2248
2248
|
"div",
|
|
@@ -2252,14 +2252,14 @@ function Cl() {
|
|
|
2252
2252
|
children: /* @__PURE__ */ e.jsxs("div", { className: "w-[99%]", children: [
|
|
2253
2253
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 pt-3", children: [
|
|
2254
2254
|
/* @__PURE__ */ e.jsx(
|
|
2255
|
-
|
|
2255
|
+
dl,
|
|
2256
2256
|
{
|
|
2257
2257
|
checked: U,
|
|
2258
2258
|
onCheckedChange: () => le(!U),
|
|
2259
2259
|
text: "Apply Filters"
|
|
2260
2260
|
}
|
|
2261
2261
|
),
|
|
2262
|
-
/* @__PURE__ */ e.jsx(
|
|
2262
|
+
/* @__PURE__ */ e.jsx(hl, {}),
|
|
2263
2263
|
te && i && /* @__PURE__ */ e.jsx(
|
|
2264
2264
|
Ke,
|
|
2265
2265
|
{
|
|
@@ -2303,7 +2303,7 @@ function Cl() {
|
|
|
2303
2303
|
}
|
|
2304
2304
|
),
|
|
2305
2305
|
te && !i && /* @__PURE__ */ e.jsx(
|
|
2306
|
-
|
|
2306
|
+
ha,
|
|
2307
2307
|
{
|
|
2308
2308
|
onClick: () => r(!0),
|
|
2309
2309
|
className: Y(
|
|
@@ -2316,16 +2316,16 @@ function Cl() {
|
|
|
2316
2316
|
)
|
|
2317
2317
|
] });
|
|
2318
2318
|
}
|
|
2319
|
-
function
|
|
2319
|
+
function nt() {
|
|
2320
2320
|
return /* @__PURE__ */ e.jsxs(
|
|
2321
|
-
|
|
2321
|
+
Ns,
|
|
2322
2322
|
{
|
|
2323
2323
|
className: "flex grow pb-1",
|
|
2324
2324
|
direction: "vertical",
|
|
2325
2325
|
role: "editor-resizable-group",
|
|
2326
2326
|
children: [
|
|
2327
2327
|
/* @__PURE__ */ e.jsxs(
|
|
2328
|
-
|
|
2328
|
+
qe,
|
|
2329
2329
|
{
|
|
2330
2330
|
id: "1",
|
|
2331
2331
|
order: 1,
|
|
@@ -2370,9 +2370,9 @@ function Cl() {
|
|
|
2370
2370
|
}
|
|
2371
2371
|
),
|
|
2372
2372
|
t && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2373
|
-
/* @__PURE__ */ e.jsx(
|
|
2373
|
+
/* @__PURE__ */ e.jsx(Ss, { withHandle: !0, className: "border" }),
|
|
2374
2374
|
/* @__PURE__ */ e.jsxs(
|
|
2375
|
-
|
|
2375
|
+
qe,
|
|
2376
2376
|
{
|
|
2377
2377
|
id: "2",
|
|
2378
2378
|
order: 2,
|
|
@@ -2392,7 +2392,7 @@ function Cl() {
|
|
|
2392
2392
|
onChange: (g) => {
|
|
2393
2393
|
E(g && g.trim() || "");
|
|
2394
2394
|
},
|
|
2395
|
-
value: f ||
|
|
2395
|
+
value: f || Xs,
|
|
2396
2396
|
options: {
|
|
2397
2397
|
minimap: {
|
|
2398
2398
|
enabled: !1
|
|
@@ -2435,8 +2435,8 @@ function Cl() {
|
|
|
2435
2435
|
role: "sql-editor",
|
|
2436
2436
|
className: "relative flex grow justify-between overflow-y-scroll",
|
|
2437
2437
|
children: [
|
|
2438
|
-
|
|
2439
|
-
|
|
2438
|
+
nt(),
|
|
2439
|
+
tt()
|
|
2440
2440
|
]
|
|
2441
2441
|
}
|
|
2442
2442
|
),
|
|
@@ -2451,21 +2451,21 @@ function Cl() {
|
|
|
2451
2451
|
M,
|
|
2452
2452
|
{
|
|
2453
2453
|
title: "Shift + Enter",
|
|
2454
|
-
disabled:
|
|
2454
|
+
disabled: me || Ee,
|
|
2455
2455
|
onClick: () => {
|
|
2456
|
-
|
|
2456
|
+
Ve();
|
|
2457
2457
|
},
|
|
2458
2458
|
className: "shrink-0",
|
|
2459
2459
|
size: "sm",
|
|
2460
2460
|
variant: "outline",
|
|
2461
2461
|
children: [
|
|
2462
|
-
|
|
2462
|
+
me || Ee ? /* @__PURE__ */ e.jsx(Ye, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(Bn, { className: "mr-2 h-4 w-4" }),
|
|
2463
2463
|
"Run"
|
|
2464
2464
|
]
|
|
2465
2465
|
}
|
|
2466
2466
|
),
|
|
2467
|
-
|
|
2468
|
-
|
|
2467
|
+
Ae && /* @__PURE__ */ e.jsx(
|
|
2468
|
+
cl,
|
|
2469
2469
|
{
|
|
2470
2470
|
error: He.message,
|
|
2471
2471
|
setShowAIDialog: c,
|
|
@@ -2481,24 +2481,24 @@ function Cl() {
|
|
|
2481
2481
|
size: "sm",
|
|
2482
2482
|
variant: "outline",
|
|
2483
2483
|
children: [
|
|
2484
|
-
/* @__PURE__ */ e.jsx(
|
|
2484
|
+
/* @__PURE__ */ e.jsx(Mn, { className: "mr-2 size-4" }),
|
|
2485
2485
|
"Clear"
|
|
2486
2486
|
]
|
|
2487
2487
|
}
|
|
2488
2488
|
),
|
|
2489
2489
|
/* @__PURE__ */ e.jsx(
|
|
2490
|
-
|
|
2490
|
+
ga,
|
|
2491
2491
|
{
|
|
2492
2492
|
pressed: t,
|
|
2493
2493
|
onPressedChange: (g) => l(g),
|
|
2494
2494
|
className: "",
|
|
2495
2495
|
size: "sm",
|
|
2496
2496
|
variant: "outline",
|
|
2497
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2497
|
+
children: /* @__PURE__ */ e.jsx(Cl, { className: "size-4 text-foreground/70" })
|
|
2498
2498
|
}
|
|
2499
2499
|
),
|
|
2500
2500
|
/* @__PURE__ */ e.jsx(
|
|
2501
|
-
|
|
2501
|
+
xl,
|
|
2502
2502
|
{
|
|
2503
2503
|
open: d,
|
|
2504
2504
|
setOpen: c,
|
|
@@ -2517,7 +2517,7 @@ function Cl() {
|
|
|
2517
2517
|
size: "sm",
|
|
2518
2518
|
variant: "outline",
|
|
2519
2519
|
children: [
|
|
2520
|
-
/* @__PURE__ */ e.jsx(
|
|
2520
|
+
/* @__PURE__ */ e.jsx(kt, { className: "mr-2 size-4 font-bold text-green-600" }),
|
|
2521
2521
|
"Accept"
|
|
2522
2522
|
]
|
|
2523
2523
|
}
|
|
@@ -2544,9 +2544,9 @@ function Cl() {
|
|
|
2544
2544
|
)
|
|
2545
2545
|
);
|
|
2546
2546
|
}
|
|
2547
|
-
function
|
|
2547
|
+
function Sl({ data: s }) {
|
|
2548
2548
|
var r;
|
|
2549
|
-
const [n, a] =
|
|
2549
|
+
const [n, a] = ve.useState([]), l = Object.keys(s[0]).map((d) => ({
|
|
2550
2550
|
// header: key,
|
|
2551
2551
|
accessorKey: d,
|
|
2552
2552
|
header: ({ column: c }) => {
|
|
@@ -2558,47 +2558,47 @@ function Nl({ data: s }) {
|
|
|
2558
2558
|
onClick: () => c.toggleSorting(c.getIsSorted() === "asc"),
|
|
2559
2559
|
children: [
|
|
2560
2560
|
d,
|
|
2561
|
-
u === "asc" ? /* @__PURE__ */ e.jsx(
|
|
2561
|
+
u === "asc" ? /* @__PURE__ */ e.jsx(Ot, { className: "ml-2 h-5 w-5" }) : u === "desc" ? /* @__PURE__ */ e.jsx(Ft, { className: "ml-2 h-5 w-5" }) : null
|
|
2562
2562
|
]
|
|
2563
2563
|
}
|
|
2564
2564
|
) });
|
|
2565
2565
|
}
|
|
2566
|
-
})), i =
|
|
2566
|
+
})), i = It({
|
|
2567
2567
|
data: s,
|
|
2568
2568
|
columns: l,
|
|
2569
|
-
getCoreRowModel:
|
|
2570
|
-
getPaginationRowModel:
|
|
2569
|
+
getCoreRowModel: Et(),
|
|
2570
|
+
getPaginationRowModel: At(),
|
|
2571
2571
|
onSortingChange: a,
|
|
2572
|
-
getSortedRowModel:
|
|
2572
|
+
getSortedRowModel: Vt(),
|
|
2573
2573
|
manualPagination: !0,
|
|
2574
2574
|
state: {
|
|
2575
2575
|
sorting: n
|
|
2576
2576
|
}
|
|
2577
2577
|
});
|
|
2578
|
-
return /* @__PURE__ */ e.jsxs(
|
|
2579
|
-
/* @__PURE__ */ e.jsx(
|
|
2578
|
+
return /* @__PURE__ */ e.jsxs(Tt, { children: [
|
|
2579
|
+
/* @__PURE__ */ e.jsx(Mt, { children: i.getHeaderGroups().map((d) => /* @__PURE__ */ e.jsx(ys, { children: d.headers.map((c) => /* @__PURE__ */ e.jsx(Lt, { className: "sticky top-0 bg-muted", children: c.isPlaceholder ? null : Zs(
|
|
2580
2580
|
c.column.columnDef.header,
|
|
2581
2581
|
c.getContext()
|
|
2582
2582
|
) }, c.id)) }, d.id)) }),
|
|
2583
|
-
/* @__PURE__ */ e.jsx(
|
|
2584
|
-
|
|
2583
|
+
/* @__PURE__ */ e.jsx(Dt, { children: (r = i.getRowModel().rows) != null && r.length ? i.getRowModel().rows.map((d) => /* @__PURE__ */ e.jsx(
|
|
2584
|
+
ys,
|
|
2585
2585
|
{
|
|
2586
2586
|
className: "whitespace-nowrap py-2",
|
|
2587
2587
|
"data-state": d.getIsSelected() && "selected",
|
|
2588
|
-
children: d.getVisibleCells().map((c) => /* @__PURE__ */ e.jsx(
|
|
2588
|
+
children: d.getVisibleCells().map((c) => /* @__PURE__ */ e.jsx(ea, { children: Zs(c.column.columnDef.cell, c.getContext()) }, c.id))
|
|
2589
2589
|
},
|
|
2590
2590
|
d.id
|
|
2591
|
-
)) : /* @__PURE__ */ e.jsx(
|
|
2591
|
+
)) : /* @__PURE__ */ e.jsx(ys, { children: /* @__PURE__ */ e.jsx(ea, { colSpan: l.length, className: "h-24 text-center", children: "No results." }) }) })
|
|
2592
2592
|
] });
|
|
2593
2593
|
}
|
|
2594
|
-
function
|
|
2594
|
+
function wl({ card: s }) {
|
|
2595
2595
|
var u, m, y, b, h, p, v, I, C, w;
|
|
2596
2596
|
const n = T((z) => z.themeStyle), a = {
|
|
2597
2597
|
colors: ((m = (u = n == null ? void 0 : n.chart) == null ? void 0 : u.dataset) == null ? void 0 : m.backgroundColor) || []
|
|
2598
2598
|
};
|
|
2599
2599
|
(y = s.customCardPreferences) != null && y.inputData;
|
|
2600
|
-
const { getCard: t } =
|
|
2601
|
-
if (
|
|
2600
|
+
const { getCard: t } = va(((b = s.customCardPreferences) == null ? void 0 : b.url) || ""), l = ((h = s.customCardPreferences) == null ? void 0 : h.visualType) || "single", i = o((z) => z.frame);
|
|
2601
|
+
if (he(), !((p = s.customCardPreferences) != null && p.componentName))
|
|
2602
2602
|
return null;
|
|
2603
2603
|
const r = t(
|
|
2604
2604
|
(v = s.customCardPreferences) == null ? void 0 : v.componentName
|
|
@@ -2612,7 +2612,7 @@ function Sl({ card: s }) {
|
|
|
2612
2612
|
return L || null;
|
|
2613
2613
|
});
|
|
2614
2614
|
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(
|
|
2615
|
-
|
|
2615
|
+
kn,
|
|
2616
2616
|
{
|
|
2617
2617
|
fallback: /* @__PURE__ */ e.jsx(e.Fragment, {}),
|
|
2618
2618
|
children: [
|
|
@@ -2644,17 +2644,17 @@ function Sl({ card: s }) {
|
|
|
2644
2644
|
(w = s.customCardPreferences) == null ? void 0 : w.componentName
|
|
2645
2645
|
) });
|
|
2646
2646
|
}
|
|
2647
|
-
function
|
|
2647
|
+
function Pa({
|
|
2648
2648
|
// card,
|
|
2649
2649
|
// showCard,
|
|
2650
2650
|
className: s,
|
|
2651
2651
|
...n
|
|
2652
2652
|
}) {
|
|
2653
2653
|
var I, C;
|
|
2654
|
-
|
|
2654
|
+
ve.useState(0);
|
|
2655
2655
|
const a = T((w) => w.themeStyle), t = o((w) => w.card), l = ((I = t.customCardPreferences) == null ? void 0 : I.showCardHeader) ?? !0, i = o((w) => w.frame), r = T((w) => w.dashboard.filters);
|
|
2656
2656
|
T((w) => w.filterValues), o((w) => w.actions.setRunSql);
|
|
2657
|
-
const { updateFilter: d } =
|
|
2657
|
+
const { updateFilter: d } = zs(), c = r == null ? void 0 : r.find((w) => w.id === i.filterId), u = o((w) => w.actions.setCard), { data: m, isLoading: y, isFetching: b, isError: h } = $s(t);
|
|
2658
2658
|
if (Z(() => {
|
|
2659
2659
|
}, [
|
|
2660
2660
|
t.data,
|
|
@@ -2666,7 +2666,7 @@ function $a({
|
|
|
2666
2666
|
]), !t.id)
|
|
2667
2667
|
return null;
|
|
2668
2668
|
let p;
|
|
2669
|
-
t.data && t.data.length > 0 && (p =
|
|
2669
|
+
t.data && t.data.length > 0 && (p = Ca({
|
|
2670
2670
|
data: t.data,
|
|
2671
2671
|
cardType: t.type,
|
|
2672
2672
|
cfg: t.cfg,
|
|
@@ -2675,23 +2675,23 @@ function $a({
|
|
|
2675
2675
|
topoJson: m
|
|
2676
2676
|
}));
|
|
2677
2677
|
function v(w) {
|
|
2678
|
-
return /* @__PURE__ */ e.jsx(
|
|
2678
|
+
return /* @__PURE__ */ e.jsx(wl, { card: w });
|
|
2679
2679
|
}
|
|
2680
2680
|
return /* @__PURE__ */ e.jsxs(
|
|
2681
|
-
|
|
2681
|
+
qt,
|
|
2682
2682
|
{
|
|
2683
2683
|
role: "editor-visual-card",
|
|
2684
2684
|
className: Y("relative flex h-full flex-col rounded-none", s),
|
|
2685
2685
|
...n,
|
|
2686
2686
|
children: [
|
|
2687
|
-
l && /* @__PURE__ */ e.jsxs(
|
|
2687
|
+
l && /* @__PURE__ */ e.jsxs(Rt, { className: "flex flex-row items-start justify-between py-4", children: [
|
|
2688
2688
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
2689
2689
|
/* @__PURE__ */ e.jsx(
|
|
2690
2690
|
rs,
|
|
2691
2691
|
{
|
|
2692
2692
|
text: t.title,
|
|
2693
2693
|
onSave: (w) => u({ ...t, title: w }),
|
|
2694
|
-
children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-5", children: /* @__PURE__ */ e.jsx(
|
|
2694
|
+
children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-5", children: /* @__PURE__ */ e.jsx(_t, { className: "text-base", children: t.title || "Edit title..." }) })
|
|
2695
2695
|
},
|
|
2696
2696
|
t.title
|
|
2697
2697
|
),
|
|
@@ -2700,7 +2700,7 @@ function $a({
|
|
|
2700
2700
|
{
|
|
2701
2701
|
text: t.description || "",
|
|
2702
2702
|
onSave: (w) => u({ ...t, description: w }),
|
|
2703
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2703
|
+
children: /* @__PURE__ */ e.jsx(Ht, { children: t.description || "Edit description..." })
|
|
2704
2704
|
},
|
|
2705
2705
|
t.description
|
|
2706
2706
|
)
|
|
@@ -2715,30 +2715,30 @@ function $a({
|
|
|
2715
2715
|
children: /* @__PURE__ */ e.jsx(_, { children: c.title })
|
|
2716
2716
|
}
|
|
2717
2717
|
),
|
|
2718
|
-
|
|
2718
|
+
$t(c)
|
|
2719
2719
|
] })
|
|
2720
2720
|
] }),
|
|
2721
|
-
/* @__PURE__ */ e.jsxs(
|
|
2721
|
+
/* @__PURE__ */ e.jsxs(Pt, { className: "flex grow flex-col", children: [
|
|
2722
2722
|
t.type === "custom" && v(t),
|
|
2723
2723
|
!["table", "custom"].includes(t.type) && p && // <ChartJsVisual key={visualKey} cfg={cfg} />
|
|
2724
2724
|
/* @__PURE__ */ e.jsx(
|
|
2725
|
-
|
|
2725
|
+
Bt,
|
|
2726
2726
|
{
|
|
2727
2727
|
cfg: p
|
|
2728
2728
|
},
|
|
2729
2729
|
JSON.stringify(p) + JSON.stringify(t.preferences) + ((C = t == null ? void 0 : t.preferences) == null ? void 0 : C.customVisualCode)
|
|
2730
2730
|
),
|
|
2731
2731
|
t.type === "table" && t.data && t.data.length > 0 && // All of the below css classes are #IMPORTANT for the table to scroll properly
|
|
2732
|
-
/* @__PURE__ */ e.jsx(
|
|
2732
|
+
/* @__PURE__ */ e.jsx(Ut, { className: "flex min-h-0 flex-1 grow basis-0", children: /* @__PURE__ */ e.jsx(Gt, { card: t, data: t == null ? void 0 : t.data }) })
|
|
2733
2733
|
] })
|
|
2734
2734
|
]
|
|
2735
2735
|
}
|
|
2736
2736
|
);
|
|
2737
2737
|
}
|
|
2738
|
-
function
|
|
2738
|
+
function kl() {
|
|
2739
2739
|
const [s, n] = R(!1), [a, t] = R(""), [l, i] = R(""), [r, d] = R(""), [c, u] = R(""), m = o((S) => S.card), y = o(
|
|
2740
2740
|
(S) => S.card.customCfg
|
|
2741
|
-
), { data: b } =
|
|
2741
|
+
), { data: b } = $s(m), { setCardCustomCfg: h, setCustomVisualCode: p } = he();
|
|
2742
2742
|
function v(S) {
|
|
2743
2743
|
var k, j;
|
|
2744
2744
|
const L = {
|
|
@@ -2757,7 +2757,7 @@ function wl() {
|
|
|
2757
2757
|
var L, x;
|
|
2758
2758
|
if (!m.data || m.data.length === 0)
|
|
2759
2759
|
return;
|
|
2760
|
-
const S =
|
|
2760
|
+
const S = Ca({
|
|
2761
2761
|
data: m.data,
|
|
2762
2762
|
cardType: m.type,
|
|
2763
2763
|
cfg: m.cfg,
|
|
@@ -2781,33 +2781,33 @@ function wl() {
|
|
|
2781
2781
|
function z() {
|
|
2782
2782
|
let S;
|
|
2783
2783
|
if (y) {
|
|
2784
|
-
const L =
|
|
2784
|
+
const L = sa.cloneDeep(m.cfg), x = sa.merge(L, y);
|
|
2785
2785
|
return S = v(x), S;
|
|
2786
2786
|
}
|
|
2787
2787
|
return a ? (S = v(JSON.parse(a)), S) : "";
|
|
2788
2788
|
}
|
|
2789
|
-
return /* @__PURE__ */ e.jsxs(
|
|
2790
|
-
/* @__PURE__ */ e.jsx(
|
|
2789
|
+
return /* @__PURE__ */ e.jsxs(Os, { open: s, onOpenChange: n, children: [
|
|
2790
|
+
/* @__PURE__ */ e.jsx(Fs, { asChild: !0, children: /* @__PURE__ */ e.jsx(
|
|
2791
2791
|
M,
|
|
2792
2792
|
{
|
|
2793
2793
|
onClick: I,
|
|
2794
2794
|
className: ` ${y && "border-foreground/50 dark:border-foreground/70"}`,
|
|
2795
2795
|
size: "sm",
|
|
2796
2796
|
variant: "outline",
|
|
2797
|
-
children: /* @__PURE__ */ e.jsx(
|
|
2797
|
+
children: /* @__PURE__ */ e.jsx(Kt, { className: "h-4 w-4" })
|
|
2798
2798
|
}
|
|
2799
2799
|
) }),
|
|
2800
2800
|
/* @__PURE__ */ e.jsxs(
|
|
2801
|
-
|
|
2801
|
+
Ts,
|
|
2802
2802
|
{
|
|
2803
2803
|
className: "max-h-[70vh] min-h-[70vh] overflow-auto sm:min-w-[900px] lg:min-w-[1200px]",
|
|
2804
2804
|
children: [
|
|
2805
|
-
/* @__PURE__ */ e.jsxs(
|
|
2805
|
+
/* @__PURE__ */ e.jsxs(Ms, { className: "", children: [
|
|
2806
2806
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
2807
|
-
/* @__PURE__ */ e.jsx(
|
|
2808
|
-
/* @__PURE__ */ e.jsxs(
|
|
2809
|
-
/* @__PURE__ */ e.jsx(
|
|
2810
|
-
|
|
2807
|
+
/* @__PURE__ */ e.jsx(Ls, { children: "Customize Card" }),
|
|
2808
|
+
/* @__PURE__ */ e.jsxs(Es, { children: [
|
|
2809
|
+
/* @__PURE__ */ e.jsx(ma, { children: /* @__PURE__ */ e.jsx(
|
|
2810
|
+
Da,
|
|
2811
2811
|
{
|
|
2812
2812
|
onClick: () => {
|
|
2813
2813
|
navigator.clipboard.writeText(m.id);
|
|
@@ -2815,10 +2815,10 @@ function wl() {
|
|
|
2815
2815
|
className: "size-3 cursor-pointer text-muted-foreground/70 transition-colors hover:text-muted-foreground"
|
|
2816
2816
|
}
|
|
2817
2817
|
) }),
|
|
2818
|
-
/* @__PURE__ */ e.jsx(
|
|
2818
|
+
/* @__PURE__ */ e.jsx(As, { side: "right", align: "center", children: /* @__PURE__ */ e.jsx("p", { className: "text-xs", children: "Copy Card ID" }) })
|
|
2819
2819
|
] })
|
|
2820
2820
|
] }),
|
|
2821
|
-
/* @__PURE__ */ e.jsxs(
|
|
2821
|
+
/* @__PURE__ */ e.jsxs(Ds, { children: [
|
|
2822
2822
|
"See the configuration options and documentation",
|
|
2823
2823
|
/* @__PURE__ */ e.jsx(
|
|
2824
2824
|
"a",
|
|
@@ -2832,11 +2832,11 @@ function wl() {
|
|
|
2832
2832
|
] })
|
|
2833
2833
|
] }),
|
|
2834
2834
|
/* @__PURE__ */ e.jsxs("div", { className: "flex grow gap-2", children: [
|
|
2835
|
-
/* @__PURE__ */ e.jsx(
|
|
2836
|
-
/* @__PURE__ */ e.jsxs(
|
|
2837
|
-
/* @__PURE__ */ e.jsxs(
|
|
2835
|
+
/* @__PURE__ */ e.jsx(ms, { FallbackComponent: Na, children: /* @__PURE__ */ e.jsx(Pa, { className: "w-1/2 rounded shadow-none" }) }),
|
|
2836
|
+
/* @__PURE__ */ e.jsxs(Sa, { defaultValue: "custom-config", className: "flex w-1/2 flex-col", children: [
|
|
2837
|
+
/* @__PURE__ */ e.jsxs(wa, { className: "justify-start rounded-sm rounded-b-none border border-b-0", children: [
|
|
2838
2838
|
/* @__PURE__ */ e.jsxs(is, { value: "custom-config", children: [
|
|
2839
|
-
y && /* @__PURE__ */ e.jsx(
|
|
2839
|
+
y && /* @__PURE__ */ e.jsx(ka, { className: "mr-1 h-5 w-5 text-green-600" }),
|
|
2840
2840
|
y ? "Custom Config" : "Default Config"
|
|
2841
2841
|
] }),
|
|
2842
2842
|
/* @__PURE__ */ e.jsx(is, { className: "", value: "output", children: "Output" }),
|
|
@@ -2848,7 +2848,7 @@ function wl() {
|
|
|
2848
2848
|
className: "bg-red-x mt-0 grow rounded-b border border-t-0 p-2",
|
|
2849
2849
|
value: "output",
|
|
2850
2850
|
children: /* @__PURE__ */ e.jsx(
|
|
2851
|
-
|
|
2851
|
+
ya,
|
|
2852
2852
|
{
|
|
2853
2853
|
disabled: !0,
|
|
2854
2854
|
value: a,
|
|
@@ -2917,7 +2917,7 @@ function wl() {
|
|
|
2917
2917
|
)
|
|
2918
2918
|
] })
|
|
2919
2919
|
] }),
|
|
2920
|
-
/* @__PURE__ */ e.jsxs(
|
|
2920
|
+
/* @__PURE__ */ e.jsxs(oa, { className: "flex items-center", children: [
|
|
2921
2921
|
/* @__PURE__ */ e.jsx(_, { className: "mr-2 text-red-500", children: c }),
|
|
2922
2922
|
/* @__PURE__ */ e.jsx(
|
|
2923
2923
|
M,
|
|
@@ -2936,57 +2936,57 @@ function wl() {
|
|
|
2936
2936
|
)
|
|
2937
2937
|
] });
|
|
2938
2938
|
}
|
|
2939
|
-
function
|
|
2939
|
+
function Ba(s) {
|
|
2940
2940
|
return Ne({ tag: "svg", attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M926.8 397.1l-396-288a31.81 31.81 0 0 0-37.6 0l-396 288a31.99 31.99 0 0 0-11.6 35.8l151.3 466a32 32 0 0 0 30.4 22.1h489.5c13.9 0 26.1-8.9 30.4-22.1l151.3-466c4.2-13.2-.5-27.6-11.7-35.8zM838.6 417l-98.5 32-200-144.7V199.9L838.6 417zM466 567.2l-89.1 122.3-55.2-169.2L466 567.2zm-116.3-96.8L484 373.3v140.8l-134.3-43.7zM512 599.2l93.9 128.9H418.1L512 599.2zm28.1-225.9l134.2 97.1L540.1 514V373.3zM558 567.2l144.3-46.9-55.2 169.2L558 567.2zm-74-367.3v104.4L283.9 449l-98.5-32L484 199.9zM169.3 470.8l86.5 28.1 80.4 246.4-53.8 73.9-113.1-348.4zM327.1 853l50.3-69h269.3l50.3 69H327.1zm414.5-33.8l-53.8-73.9 80.4-246.4 86.5-28.1-113.1 348.4z" }, child: [] }] })(s);
|
|
2941
2941
|
}
|
|
2942
|
-
function
|
|
2942
|
+
function Ua(s) {
|
|
2943
2943
|
return Ne({ tag: "svg", attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M137.39,24.06A16,16,0,0,0,120,40V80.67a15.86,15.86,0,0,0,13.25,15.76A32,32,0,1,1,96,129.68c-.41-8.22,1.27-15,5-20.26h0a15.86,15.86,0,0,0-1.69-20.47L71.69,60.68a16,16,0,0,0-23.63,1.1A103.6,103.6,0,0,0,55,202.05,103.24,103.24,0,0,0,128,232h1.49A104.3,104.3,0,0,0,232,129.48C232.75,75.18,191.19,28.88,137.39,24.06ZM60.32,71.94l27.61,28.19,0,.06A43.29,43.29,0,0,0,80.44,120H40.36A87.13,87.13,0,0,1,60.32,71.94ZM40.37,136h40.3A48,48,0,0,0,120,175.34v40.3A88,88,0,0,1,40.37,136Zm149.77,54.14A87.45,87.45,0,0,1,136,215.61V175.34a47.55,47.55,0,0,0,24.73-12.23A48,48,0,0,0,136,80.66L136,40c45.52,4.08,80.67,43.28,80,89.25A87.45,87.45,0,0,1,190.14,190.14Z" }, child: [] }] })(s);
|
|
2944
2944
|
}
|
|
2945
|
-
function
|
|
2945
|
+
function Ga(s) {
|
|
2946
2946
|
return Ne({ tag: "svg", attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm87.63,96H191.48A64.1,64.1,0,0,0,136,64.52V40.37A88.13,88.13,0,0,1,215.63,120ZM120,120H80.68A48.09,48.09,0,0,1,120,80.68Zm0,16v39.32A48.09,48.09,0,0,1,80.68,136Zm16,0h39.32A48.09,48.09,0,0,1,136,175.32Zm0-16V80.68A48.09,48.09,0,0,1,175.32,120ZM120,40.37V64.52A64.1,64.1,0,0,0,64.52,120H40.37A88.13,88.13,0,0,1,120,40.37ZM40.37,136H64.52A64.1,64.1,0,0,0,120,191.48v24.15A88.13,88.13,0,0,1,40.37,136ZM136,215.63V191.48A64.1,64.1,0,0,0,191.48,136h24.15A88.13,88.13,0,0,1,136,215.63Z" }, child: [] }] })(s);
|
|
2947
2947
|
}
|
|
2948
|
-
function
|
|
2948
|
+
function Ka(s) {
|
|
2949
2949
|
return Ne({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }, child: [] }, { tag: "path", attr: { d: "M6 16m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" }, child: [] }, { tag: "path", attr: { d: "M16 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" }, child: [] }, { tag: "path", attr: { d: "M14.5 7.5m-4.5 0a4.5 4.5 0 1 0 9 0a4.5 4.5 0 1 0 -9 0" }, child: [] }] })(s);
|
|
2950
2950
|
}
|
|
2951
|
-
function
|
|
2951
|
+
function Ja(s) {
|
|
2952
2952
|
return Ne({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "m2 19.99 7.5-7.51 4 4 7.09-7.97L22 9.92l-8.5 9.56-4-4-6 6.01-1.5-1.5zm1.5-4.5 6-6.01 4 4L22 3.92l-1.41-1.41-7.09 7.97-4-4L2 13.99l1.5 1.5z" }, child: [] }] })(s);
|
|
2953
2953
|
}
|
|
2954
|
-
function
|
|
2954
|
+
function Qa(s) {
|
|
2955
2955
|
return Ne({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "M4 9h4v11H4zM4 4h4v4H4zM10 7h4v4h-4zM16 10h4v4h-4zM16 15h4v5h-4zM10 12h4v8h-4z" }, child: [] }] })(s);
|
|
2956
2956
|
}
|
|
2957
|
-
function
|
|
2957
|
+
function Wa(s) {
|
|
2958
2958
|
return Ne({ tag: "svg", attr: { version: "1.2", baseProfile: "tiny", viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M4 18c-.552 0-1-.448-1-1v-6.382l-.553.276c-.495.248-1.095.046-1.342-.447-.247-.494-.046-1.094.448-1.342l2-1c.31-.155.678-.139.973.044.294.183.474.504.474.851v8c0 .552-.448 1-1 1zM13 18h-5c-.404 0-.769-.244-.924-.617-.155-.374-.069-.804.217-1.09l4-4c.254-.254.394-.591.394-.95 0-.358-.14-.695-.394-.949-.508-.508-1.39-.508-1.9.001-.253.252-.393.589-.393.948 0 .552-.448 1-1 1s-1-.448-1-1c0-.894.348-1.733.98-2.364 1.265-1.263 3.464-1.263 4.727.001.632.631.979 1.471.979 2.363 0 .893-.348 1.733-.979 2.364l-2.293 2.293h2.586c.552 0 1 .448 1 1s-.448 1-1 1zM20.955 12.377c.338-.457.545-1.016.545-1.627 0-1.517-1.234-2.75-2.75-2.75-1.031 0-1.966.569-2.44 1.484-.254.49-.063 1.094.428 1.348.49.254 1.094.062 1.348-.428.128-.249.383-.404.664-.404.414 0 .75.336.75.75s-.336.75-.75.75c-.552 0-1 .448-1 1s.448 1 1 1c.689 0 1.25.561 1.25 1.25s-.561 1.25-1.25 1.25-1.25-.561-1.25-1.25c0-.552-.448-1-1-1s-1 .448-1 1c0 1.792 1.458 3.25 3.25 3.25s3.25-1.458 3.25-3.25c0-.939-.406-1.779-1.045-2.373z" }, child: [] }] })(s);
|
|
2959
2959
|
}
|
|
2960
|
-
function
|
|
2960
|
+
function Ya(s) {
|
|
2961
2961
|
return Ne({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M217 25v14h78V25h-78zm0 32v46h14V71h50v32h14V57h-78zm32 32v14h14V89h-14zm-64 32v46h30v-46h-30zm48 0v14h46v-14h-46zm64 0v46h30v-46h-30zm-64 32v14h46v-14h-46zm-80 32v46h62v-46h-62zm80 0v14h46v-14h-46zm64 0v46h62v-46h-62zm-64 32v14h46v-14h-46zm-112 32v46h94v-46h-94zm112 0v14h46v-14h-46zm64 0v46h94v-46h-94zm-64 32v14h46v-14h-46zM89 313v46h126v-46H89zm144 0v14h46v-14h-46zm64 0v46h126v-46H297zm-64 32v14h46v-14h-46zM57 377v46h158v-46H57zm176 0v14h46v-14h-46zm64 0v46h158v-46H297zm-64 32v14h46v-14h-46zM25 441v46h190v-46H25zm208 0v14h46v-14h-46zm64 0v46h190v-46H297zm-64 32v14h46v-14h-46z" }, child: [] }] })(s);
|
|
2962
2962
|
}
|
|
2963
|
-
function
|
|
2963
|
+
function Xa(s) {
|
|
2964
2964
|
const [n, a] = R(null);
|
|
2965
2965
|
return Z(() => {
|
|
2966
2966
|
s && (async () => {
|
|
2967
|
-
const i = (await import("./lucide-react-
|
|
2967
|
+
const i = (await import("./lucide-react-2J4rEryP.js"))[s];
|
|
2968
2968
|
a(i);
|
|
2969
2969
|
})();
|
|
2970
2970
|
}, [s]), n;
|
|
2971
2971
|
}
|
|
2972
|
-
function
|
|
2972
|
+
function Za() {
|
|
2973
2973
|
const { authToken: s } = Ce(), { data: n, isLoading: a, isFetching: t, isError: l } = de({
|
|
2974
2974
|
queryKey: ["plugins", s == null ? void 0 : s.accessToken],
|
|
2975
|
-
queryFn: () =>
|
|
2975
|
+
queryFn: () => Jt(s == null ? void 0 : s.accessToken)
|
|
2976
2976
|
// staleTime: Infinity,
|
|
2977
2977
|
});
|
|
2978
2978
|
return { data: n, isLoading: a, isFetching: t, isError: l };
|
|
2979
2979
|
}
|
|
2980
|
-
function
|
|
2980
|
+
function zl({
|
|
2981
2981
|
onChartTypeChange: s
|
|
2982
2982
|
}) {
|
|
2983
|
-
const [n, a] = R([]), { data: t } =
|
|
2983
|
+
const [n, a] = R([]), { data: t } = Za();
|
|
2984
2984
|
return Z(() => {
|
|
2985
2985
|
(async () => {
|
|
2986
2986
|
var i;
|
|
2987
2987
|
if (t) {
|
|
2988
2988
|
const d = (await Promise.all(
|
|
2989
|
-
(i = t == null ? void 0 : t.plugins) == null ? void 0 : i.map(async (c) => (await
|
|
2989
|
+
(i = t == null ? void 0 : t.plugins) == null ? void 0 : i.map(async (c) => (await Qt(c.value)).visuals.map((y) => ({
|
|
2990
2990
|
name: y.name,
|
|
2991
2991
|
icon: y.icon,
|
|
2992
2992
|
url: c.value
|
|
@@ -2996,9 +2996,9 @@ function kl({
|
|
|
2996
2996
|
}
|
|
2997
2997
|
})();
|
|
2998
2998
|
}, [t]), n.length === 0 ? null : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2999
|
-
/* @__PURE__ */ e.jsx(
|
|
2999
|
+
/* @__PURE__ */ e.jsx(ue, { className: "my-2" }),
|
|
3000
3000
|
/* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-4 place-items-center", children: n.map((l, i) => /* @__PURE__ */ e.jsx(
|
|
3001
|
-
|
|
3001
|
+
Ol,
|
|
3002
3002
|
{
|
|
3003
3003
|
text: l.name,
|
|
3004
3004
|
onClick: () => s("custom", l),
|
|
@@ -3008,17 +3008,17 @@ function kl({
|
|
|
3008
3008
|
)) })
|
|
3009
3009
|
] });
|
|
3010
3010
|
}
|
|
3011
|
-
const
|
|
3011
|
+
const Ol = ({
|
|
3012
3012
|
text: s,
|
|
3013
3013
|
icon: n,
|
|
3014
3014
|
onClick: a
|
|
3015
3015
|
}) => {
|
|
3016
|
-
const t =
|
|
3016
|
+
const t = Xa(n || ""), l = s.charAt(0).toUpperCase();
|
|
3017
3017
|
return /* @__PURE__ */ e.jsx(M, { onClick: a, title: s, variant: "ghost", children: t ? /* @__PURE__ */ e.jsx(t, { className: "h-4 w-4" }) : l });
|
|
3018
3018
|
};
|
|
3019
|
-
function
|
|
3019
|
+
function Fl() {
|
|
3020
3020
|
var m, y;
|
|
3021
|
-
const [s, n] = R(!1), a = o((b) => b.card), t = a.type, { setCardType: l, setCardPreferences: i, setChartOrientation: r } = o((b) => b.actions), { setCardCustomCfg: d, setCustomCardPreferences: c } =
|
|
3021
|
+
const [s, n] = R(!1), a = o((b) => b.card), t = a.type, { setCardType: l, setCardPreferences: i, setChartOrientation: r } = o((b) => b.actions), { setCardCustomCfg: d, setCustomCardPreferences: c } = he();
|
|
3022
3022
|
function u(b, h) {
|
|
3023
3023
|
d(null), i({}), l(b), h && c({
|
|
3024
3024
|
type: "component",
|
|
@@ -3028,9 +3028,9 @@ function Ol() {
|
|
|
3028
3028
|
icon: h.icon
|
|
3029
3029
|
}), n(!1);
|
|
3030
3030
|
}
|
|
3031
|
-
return /* @__PURE__ */ e.jsxs(
|
|
3032
|
-
/* @__PURE__ */ e.jsx(
|
|
3033
|
-
|
|
3031
|
+
return /* @__PURE__ */ e.jsxs(xs, { open: s, onOpenChange: n, children: [
|
|
3032
|
+
/* @__PURE__ */ e.jsx(ps, { asChild: !0, children: /* @__PURE__ */ e.jsx(M, { size: "sm", variant: "outline", children: /* @__PURE__ */ e.jsx(
|
|
3033
|
+
Il,
|
|
3034
3034
|
{
|
|
3035
3035
|
className: "h-4 w-4",
|
|
3036
3036
|
chartType: t,
|
|
@@ -3038,7 +3038,7 @@ function Ol() {
|
|
|
3038
3038
|
componentName: (y = a.customCardPreferences) == null ? void 0 : y.componentName
|
|
3039
3039
|
}
|
|
3040
3040
|
) }) }),
|
|
3041
|
-
/* @__PURE__ */ e.jsxs(
|
|
3041
|
+
/* @__PURE__ */ e.jsxs(fs, { className: "w-50", children: [
|
|
3042
3042
|
/* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-4 place-items-center", children: [
|
|
3043
3043
|
/* @__PURE__ */ e.jsx(
|
|
3044
3044
|
M,
|
|
@@ -3046,7 +3046,7 @@ function Ol() {
|
|
|
3046
3046
|
onClick: () => u("bar"),
|
|
3047
3047
|
className: "font-normal",
|
|
3048
3048
|
variant: "ghost",
|
|
3049
|
-
children: /* @__PURE__ */ e.jsx(
|
|
3049
|
+
children: /* @__PURE__ */ e.jsx(Bs, { className: "size-5" })
|
|
3050
3050
|
}
|
|
3051
3051
|
),
|
|
3052
3052
|
/* @__PURE__ */ e.jsx(
|
|
@@ -3054,7 +3054,7 @@ function Ol() {
|
|
|
3054
3054
|
{
|
|
3055
3055
|
onClick: () => u("line"),
|
|
3056
3056
|
variant: "ghost",
|
|
3057
|
-
children: /* @__PURE__ */ e.jsx(
|
|
3057
|
+
children: /* @__PURE__ */ e.jsx(Us, { className: "size-5" })
|
|
3058
3058
|
}
|
|
3059
3059
|
),
|
|
3060
3060
|
/* @__PURE__ */ e.jsx(
|
|
@@ -3062,7 +3062,7 @@ function Ol() {
|
|
|
3062
3062
|
{
|
|
3063
3063
|
onClick: () => u("stackedBar"),
|
|
3064
3064
|
variant: "ghost",
|
|
3065
|
-
children: /* @__PURE__ */ e.jsx(
|
|
3065
|
+
children: /* @__PURE__ */ e.jsx(Qa, { className: "size-5", strokeWidth: 0 })
|
|
3066
3066
|
}
|
|
3067
3067
|
),
|
|
3068
3068
|
/* @__PURE__ */ e.jsx(
|
|
@@ -3070,7 +3070,7 @@ function Ol() {
|
|
|
3070
3070
|
{
|
|
3071
3071
|
onClick: () => u("stackedLine"),
|
|
3072
3072
|
variant: "ghost",
|
|
3073
|
-
children: /* @__PURE__ */ e.jsx(
|
|
3073
|
+
children: /* @__PURE__ */ e.jsx(Ja, { className: "size-5", strokeWidth: 0 })
|
|
3074
3074
|
}
|
|
3075
3075
|
),
|
|
3076
3076
|
/* @__PURE__ */ e.jsx(
|
|
@@ -3078,7 +3078,7 @@ function Ol() {
|
|
|
3078
3078
|
{
|
|
3079
3079
|
onClick: () => u("scatter"),
|
|
3080
3080
|
variant: "ghost",
|
|
3081
|
-
children: /* @__PURE__ */ e.jsx(
|
|
3081
|
+
children: /* @__PURE__ */ e.jsx(Ma, { className: "size-5" })
|
|
3082
3082
|
}
|
|
3083
3083
|
),
|
|
3084
3084
|
/* @__PURE__ */ e.jsx(
|
|
@@ -3086,7 +3086,7 @@ function Ol() {
|
|
|
3086
3086
|
{
|
|
3087
3087
|
onClick: () => u("bubble"),
|
|
3088
3088
|
variant: "ghost",
|
|
3089
|
-
children: /* @__PURE__ */ e.jsx(
|
|
3089
|
+
children: /* @__PURE__ */ e.jsx(Ka, { className: "size-4" })
|
|
3090
3090
|
}
|
|
3091
3091
|
),
|
|
3092
3092
|
/* @__PURE__ */ e.jsx(
|
|
@@ -3094,7 +3094,7 @@ function Ol() {
|
|
|
3094
3094
|
{
|
|
3095
3095
|
onClick: () => u("pie"),
|
|
3096
3096
|
variant: "ghost",
|
|
3097
|
-
children: /* @__PURE__ */ e.jsx(
|
|
3097
|
+
children: /* @__PURE__ */ e.jsx(Ta, { className: "size-5" })
|
|
3098
3098
|
}
|
|
3099
3099
|
),
|
|
3100
3100
|
/* @__PURE__ */ e.jsx(
|
|
@@ -3102,7 +3102,7 @@ function Ol() {
|
|
|
3102
3102
|
{
|
|
3103
3103
|
onClick: () => u("doughnut"),
|
|
3104
3104
|
variant: "ghost",
|
|
3105
|
-
children: /* @__PURE__ */ e.jsx(
|
|
3105
|
+
children: /* @__PURE__ */ e.jsx(Ua, { className: "size-5", strokeWidth: 1 })
|
|
3106
3106
|
}
|
|
3107
3107
|
),
|
|
3108
3108
|
/* @__PURE__ */ e.jsx(
|
|
@@ -3111,7 +3111,7 @@ function Ol() {
|
|
|
3111
3111
|
onClick: () => u("radar"),
|
|
3112
3112
|
variant: "ghost",
|
|
3113
3113
|
children: /* @__PURE__ */ e.jsx(
|
|
3114
|
-
|
|
3114
|
+
Ba,
|
|
3115
3115
|
{
|
|
3116
3116
|
className: "size-5 font-extralight",
|
|
3117
3117
|
strokeWidth: 0.5
|
|
@@ -3124,7 +3124,7 @@ function Ol() {
|
|
|
3124
3124
|
{
|
|
3125
3125
|
onClick: () => u("polarArea"),
|
|
3126
3126
|
variant: "ghost",
|
|
3127
|
-
children: /* @__PURE__ */ e.jsx(
|
|
3127
|
+
children: /* @__PURE__ */ e.jsx(Ga, { className: "size-5" })
|
|
3128
3128
|
}
|
|
3129
3129
|
),
|
|
3130
3130
|
/* @__PURE__ */ e.jsx(
|
|
@@ -3132,7 +3132,7 @@ function Ol() {
|
|
|
3132
3132
|
{
|
|
3133
3133
|
onClick: () => u("pyramid"),
|
|
3134
3134
|
variant: "ghost",
|
|
3135
|
-
children: /* @__PURE__ */ e.jsx(
|
|
3135
|
+
children: /* @__PURE__ */ e.jsx(Ya, { className: "size-5" })
|
|
3136
3136
|
}
|
|
3137
3137
|
),
|
|
3138
3138
|
/* @__PURE__ */ e.jsx(
|
|
@@ -3140,7 +3140,7 @@ function Ol() {
|
|
|
3140
3140
|
{
|
|
3141
3141
|
onClick: () => u("range"),
|
|
3142
3142
|
variant: "ghost",
|
|
3143
|
-
children: /* @__PURE__ */ e.jsx(
|
|
3143
|
+
children: /* @__PURE__ */ e.jsx(Ia, { className: "size-5" })
|
|
3144
3144
|
}
|
|
3145
3145
|
),
|
|
3146
3146
|
/* @__PURE__ */ e.jsx(
|
|
@@ -3148,7 +3148,7 @@ function Ol() {
|
|
|
3148
3148
|
{
|
|
3149
3149
|
onClick: () => u("table"),
|
|
3150
3150
|
variant: "ghost",
|
|
3151
|
-
children: /* @__PURE__ */ e.jsx(
|
|
3151
|
+
children: /* @__PURE__ */ e.jsx(Vs, { className: "size-5" })
|
|
3152
3152
|
}
|
|
3153
3153
|
),
|
|
3154
3154
|
/* @__PURE__ */ e.jsx(
|
|
@@ -3156,7 +3156,7 @@ function Ol() {
|
|
|
3156
3156
|
{
|
|
3157
3157
|
onClick: () => u("kpi"),
|
|
3158
3158
|
variant: "ghost",
|
|
3159
|
-
children: /* @__PURE__ */ e.jsx(
|
|
3159
|
+
children: /* @__PURE__ */ e.jsx(Wa, { className: "size-6" })
|
|
3160
3160
|
}
|
|
3161
3161
|
),
|
|
3162
3162
|
/* @__PURE__ */ e.jsx(
|
|
@@ -3164,7 +3164,7 @@ function Ol() {
|
|
|
3164
3164
|
{
|
|
3165
3165
|
onClick: () => u("text"),
|
|
3166
3166
|
variant: "ghost",
|
|
3167
|
-
children: /* @__PURE__ */ e.jsx(
|
|
3167
|
+
children: /* @__PURE__ */ e.jsx(Gs, { className: "size-4" })
|
|
3168
3168
|
}
|
|
3169
3169
|
),
|
|
3170
3170
|
/* @__PURE__ */ e.jsx(
|
|
@@ -3172,7 +3172,7 @@ function Ol() {
|
|
|
3172
3172
|
{
|
|
3173
3173
|
onClick: () => u("map"),
|
|
3174
3174
|
variant: "ghost",
|
|
3175
|
-
children: /* @__PURE__ */ e.jsx(
|
|
3175
|
+
children: /* @__PURE__ */ e.jsx(Ea, { className: "size-4" })
|
|
3176
3176
|
}
|
|
3177
3177
|
),
|
|
3178
3178
|
/* @__PURE__ */ e.jsx(
|
|
@@ -3180,71 +3180,71 @@ function Ol() {
|
|
|
3180
3180
|
{
|
|
3181
3181
|
onClick: () => u("custom"),
|
|
3182
3182
|
variant: "ghost",
|
|
3183
|
-
children: /* @__PURE__ */ e.jsx(
|
|
3183
|
+
children: /* @__PURE__ */ e.jsx(Va, { className: "size-4" })
|
|
3184
3184
|
}
|
|
3185
3185
|
)
|
|
3186
3186
|
] }),
|
|
3187
|
-
/* @__PURE__ */ e.jsx(
|
|
3187
|
+
/* @__PURE__ */ e.jsx(zl, { onChartTypeChange: u })
|
|
3188
3188
|
] })
|
|
3189
3189
|
] });
|
|
3190
3190
|
}
|
|
3191
|
-
function
|
|
3191
|
+
function Il({
|
|
3192
3192
|
chartType: s,
|
|
3193
3193
|
className: n,
|
|
3194
3194
|
customIcon: a,
|
|
3195
3195
|
componentName: t
|
|
3196
3196
|
}) {
|
|
3197
|
-
const l =
|
|
3197
|
+
const l = Xa(a || "");
|
|
3198
3198
|
switch (s) {
|
|
3199
3199
|
case "bar":
|
|
3200
|
-
return /* @__PURE__ */ e.jsx(Ps, { className: n });
|
|
3201
|
-
case "line":
|
|
3202
3200
|
return /* @__PURE__ */ e.jsx(Bs, { className: n });
|
|
3201
|
+
case "line":
|
|
3202
|
+
return /* @__PURE__ */ e.jsx(Us, { className: n });
|
|
3203
3203
|
case "pie":
|
|
3204
|
-
return /* @__PURE__ */ e.jsx(
|
|
3204
|
+
return /* @__PURE__ */ e.jsx(Ta, { className: n });
|
|
3205
3205
|
case "radar":
|
|
3206
|
-
return /* @__PURE__ */ e.jsx(
|
|
3206
|
+
return /* @__PURE__ */ e.jsx(Ba, { className: n });
|
|
3207
3207
|
case "scatter":
|
|
3208
|
-
return /* @__PURE__ */ e.jsx(
|
|
3208
|
+
return /* @__PURE__ */ e.jsx(Ma, { className: n });
|
|
3209
3209
|
case "bubble":
|
|
3210
|
-
return /* @__PURE__ */ e.jsx(
|
|
3210
|
+
return /* @__PURE__ */ e.jsx(Ka, { className: n });
|
|
3211
3211
|
case "doughnut":
|
|
3212
|
-
return /* @__PURE__ */ e.jsx(
|
|
3212
|
+
return /* @__PURE__ */ e.jsx(Ua, { className: n });
|
|
3213
3213
|
case "stackedBar":
|
|
3214
|
-
return /* @__PURE__ */ e.jsx(
|
|
3214
|
+
return /* @__PURE__ */ e.jsx(Qa, { className: "size-4 text-foreground/70" });
|
|
3215
3215
|
case "stackedLine":
|
|
3216
|
-
return /* @__PURE__ */ e.jsx(
|
|
3216
|
+
return /* @__PURE__ */ e.jsx(Ja, { className: "size-4 text-foreground/70" });
|
|
3217
3217
|
case "polarArea":
|
|
3218
|
-
return /* @__PURE__ */ e.jsx(
|
|
3218
|
+
return /* @__PURE__ */ e.jsx(Ga, { className: n });
|
|
3219
3219
|
case "pyramid":
|
|
3220
|
-
return /* @__PURE__ */ e.jsx(
|
|
3220
|
+
return /* @__PURE__ */ e.jsx(Ya, { className: n });
|
|
3221
3221
|
case "range":
|
|
3222
|
-
return /* @__PURE__ */ e.jsx(
|
|
3222
|
+
return /* @__PURE__ */ e.jsx(Ia, { className: n });
|
|
3223
3223
|
case "kpi":
|
|
3224
|
-
return /* @__PURE__ */ e.jsx(
|
|
3224
|
+
return /* @__PURE__ */ e.jsx(Wa, { className: n });
|
|
3225
3225
|
case "text":
|
|
3226
|
-
return /* @__PURE__ */ e.jsx(
|
|
3226
|
+
return /* @__PURE__ */ e.jsx(Gs, { className: n });
|
|
3227
3227
|
case "map":
|
|
3228
|
-
return /* @__PURE__ */ e.jsx(
|
|
3228
|
+
return /* @__PURE__ */ e.jsx(Ea, { className: n });
|
|
3229
3229
|
case "custom":
|
|
3230
|
-
return a && l ? /* @__PURE__ */ e.jsx(l, { className: n }) : t ? t == null ? void 0 : t.charAt(0).toUpperCase() : /* @__PURE__ */ e.jsx(
|
|
3230
|
+
return a && l ? /* @__PURE__ */ e.jsx(l, { className: n }) : t ? t == null ? void 0 : t.charAt(0).toUpperCase() : /* @__PURE__ */ e.jsx(Va, { className: n });
|
|
3231
3231
|
default:
|
|
3232
|
-
return /* @__PURE__ */ e.jsx(
|
|
3232
|
+
return /* @__PURE__ */ e.jsx(Vs, { className: n });
|
|
3233
3233
|
}
|
|
3234
3234
|
}
|
|
3235
|
-
function
|
|
3235
|
+
function Tl() {
|
|
3236
3236
|
var l;
|
|
3237
|
-
const s = o((i) => i.card), n = ((l = s.customCardPreferences) == null ? void 0 : l.showCardHeader) ?? !0, { setCustomCardPreferences: a } =
|
|
3237
|
+
const s = o((i) => i.card), n = ((l = s.customCardPreferences) == null ? void 0 : l.showCardHeader) ?? !0, { setCustomCardPreferences: a } = he(), t = (i) => {
|
|
3238
3238
|
s.customCardPreferences && a({
|
|
3239
3239
|
...s.customCardPreferences,
|
|
3240
3240
|
showCardHeader: i === !0
|
|
3241
3241
|
});
|
|
3242
3242
|
};
|
|
3243
|
-
return /* @__PURE__ */ e.jsxs(
|
|
3244
|
-
/* @__PURE__ */ e.jsx(
|
|
3245
|
-
/* @__PURE__ */ e.jsxs(
|
|
3243
|
+
return /* @__PURE__ */ e.jsxs(ca, { children: [
|
|
3244
|
+
/* @__PURE__ */ e.jsx(da, { asChild: !0, children: /* @__PURE__ */ e.jsx(La, { className: "size-4 cursor-pointer text-muted-foreground/70 transition-colors hover:text-muted-foreground" }) }),
|
|
3245
|
+
/* @__PURE__ */ e.jsxs(ua, { align: "start", className: "w-40 text-muted-foreground", children: [
|
|
3246
3246
|
/* @__PURE__ */ e.jsx(
|
|
3247
|
-
|
|
3247
|
+
Wt,
|
|
3248
3248
|
{
|
|
3249
3249
|
checked: n,
|
|
3250
3250
|
onCheckedChange: t,
|
|
@@ -3252,14 +3252,14 @@ function Il() {
|
|
|
3252
3252
|
}
|
|
3253
3253
|
),
|
|
3254
3254
|
/* @__PURE__ */ e.jsxs(
|
|
3255
|
-
|
|
3255
|
+
Yt,
|
|
3256
3256
|
{
|
|
3257
3257
|
onClick: () => {
|
|
3258
3258
|
navigator.clipboard.writeText(s.id), Qe.success("Card ID copied to clipboard");
|
|
3259
3259
|
},
|
|
3260
3260
|
className: "cursor-pointer space-x-2",
|
|
3261
3261
|
children: [
|
|
3262
|
-
/* @__PURE__ */ e.jsx(
|
|
3262
|
+
/* @__PURE__ */ e.jsx(Da, { className: "size-4" }),
|
|
3263
3263
|
/* @__PURE__ */ e.jsx("span", { children: "Copy Card ID" })
|
|
3264
3264
|
]
|
|
3265
3265
|
}
|
|
@@ -3267,10 +3267,10 @@ function Il() {
|
|
|
3267
3267
|
] })
|
|
3268
3268
|
] });
|
|
3269
3269
|
}
|
|
3270
|
-
function
|
|
3270
|
+
function ra() {
|
|
3271
3271
|
const s = o((x) => x.frame), n = o((x) => x.card), a = o((x) => x.card.data), t = o((x) => x.isShowingVisual), l = o((x) => x.isSqlRunning), i = o((x) => x.queryError), r = o((x) => x.pythonStdOut), d = o((x) => x.actions.setRunSql);
|
|
3272
3272
|
o((x) => x.onSave), o((x) => x.onClose), o((x) => x.actions.setCardSql), o((x) => x.actions.setCardType), o((x) => x.actions.setSqlGen);
|
|
3273
|
-
const { setFrame: c, setCard: u, updateCardInFrame: m } =
|
|
3273
|
+
const { setFrame: c, setCard: u, updateCardInFrame: m } = he();
|
|
3274
3274
|
if (!n)
|
|
3275
3275
|
return /* @__PURE__ */ e.jsx(e.Fragment, { children: "No Active Card" });
|
|
3276
3276
|
function y() {
|
|
@@ -3350,20 +3350,20 @@ function la() {
|
|
|
3350
3350
|
displayTab: j
|
|
3351
3351
|
});
|
|
3352
3352
|
},
|
|
3353
|
-
children: k.displayTab === !0 || k.displayTab === void 0 ? /* @__PURE__ */ e.jsx(
|
|
3353
|
+
children: k.displayTab === !0 || k.displayTab === void 0 ? /* @__PURE__ */ e.jsx(Dn, { className: "mr-2 size-3.5 text-muted-foreground hover:text-foreground" }) : /* @__PURE__ */ e.jsx(Ln, { className: "mr-2 size-3.5 text-muted-foreground hover:text-foreground" })
|
|
3354
3354
|
}
|
|
3355
3355
|
);
|
|
3356
3356
|
}
|
|
3357
3357
|
function S() {
|
|
3358
3358
|
return /* @__PURE__ */ e.jsxs(
|
|
3359
|
-
|
|
3359
|
+
Sa,
|
|
3360
3360
|
{
|
|
3361
3361
|
onValueChange: v,
|
|
3362
3362
|
value: s.activeCardId,
|
|
3363
3363
|
className: "flex grow flex-col",
|
|
3364
3364
|
children: [
|
|
3365
3365
|
s.cards.map((x) => /* @__PURE__ */ e.jsx(os, { className: "mt-0 grow", value: x.id, children: L() }, x.id)),
|
|
3366
|
-
/* @__PURE__ */ e.jsx(
|
|
3366
|
+
/* @__PURE__ */ e.jsx(wa, { className: "group mx-6 justify-between", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
|
|
3367
3367
|
s.cards.map((x, k) => /* @__PURE__ */ e.jsx(
|
|
3368
3368
|
rs,
|
|
3369
3369
|
{
|
|
@@ -3384,7 +3384,7 @@ function la() {
|
|
|
3384
3384
|
z(s, x),
|
|
3385
3385
|
x.tabTitle || x.title,
|
|
3386
3386
|
s.activeCardId === x.id && s.cards.length > 1 && /* @__PURE__ */ e.jsx(
|
|
3387
|
-
|
|
3387
|
+
za,
|
|
3388
3388
|
{
|
|
3389
3389
|
className: "ml-2 size-3.5 text-muted-foreground hover:text-foreground",
|
|
3390
3390
|
onClick: () => p(x.id)
|
|
@@ -3402,7 +3402,7 @@ function la() {
|
|
|
3402
3402
|
className: "ml-1 h-8 px-2 hover:bg-muted-foreground/50",
|
|
3403
3403
|
variant: "outline",
|
|
3404
3404
|
onClick: y,
|
|
3405
|
-
children: /* @__PURE__ */ e.jsx(
|
|
3405
|
+
children: /* @__PURE__ */ e.jsx(Is, { className: "h-4 w-4" })
|
|
3406
3406
|
}
|
|
3407
3407
|
),
|
|
3408
3408
|
/* @__PURE__ */ e.jsx(
|
|
@@ -3411,7 +3411,7 @@ function la() {
|
|
|
3411
3411
|
className: "invisible ml-1 h-8 px-2 hover:bg-muted-foreground/50 group-hover:visible",
|
|
3412
3412
|
variant: "outline",
|
|
3413
3413
|
onClick: h,
|
|
3414
|
-
children: /* @__PURE__ */ e.jsx(
|
|
3414
|
+
children: /* @__PURE__ */ e.jsx(In, { className: "h-4 w-4" })
|
|
3415
3415
|
}
|
|
3416
3416
|
)
|
|
3417
3417
|
] }) })
|
|
@@ -3420,26 +3420,26 @@ function la() {
|
|
|
3420
3420
|
);
|
|
3421
3421
|
}
|
|
3422
3422
|
function L() {
|
|
3423
|
-
return n.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(
|
|
3423
|
+
return n.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(Xt, { isLoading: l, card: n }) }) }) : n.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(Zt, { isLoading: l, card: n }) }) }) : /* @__PURE__ */ e.jsx(ms, { FallbackComponent: Na, children: /* @__PURE__ */ e.jsx(Pa, { className: "grow border-none shadow-none" }) });
|
|
3424
3424
|
}
|
|
3425
3425
|
return /* @__PURE__ */ e.jsxs("div", { className: "relative flex h-full flex-col py-3", children: [
|
|
3426
3426
|
l && /* @__PURE__ */ e.jsx(Ye, { className: "absolute bottom-0 left-0 right-0 top-0 z-10 m-auto h-10 w-10 animate-spin text-foreground/10" }),
|
|
3427
3427
|
/* @__PURE__ */ e.jsxs("div", { className: "mb-0 flex min-h-10 items-center justify-end gap-2 px-6", children: [
|
|
3428
3428
|
t && /* @__PURE__ */ e.jsxs("div", { className: "flex grow items-center gap-2", children: [
|
|
3429
|
-
/* @__PURE__ */ e.jsx(
|
|
3430
|
-
!["table", "custom"].includes(n.type) && /* @__PURE__ */ e.jsx(
|
|
3431
|
-
/* @__PURE__ */ e.jsx(
|
|
3429
|
+
/* @__PURE__ */ e.jsx(Fl, {}),
|
|
3430
|
+
!["table", "custom"].includes(n.type) && /* @__PURE__ */ e.jsx(kl, {}),
|
|
3431
|
+
/* @__PURE__ */ e.jsx(Tl, {})
|
|
3432
3432
|
] }),
|
|
3433
|
-
/* @__PURE__ */ e.jsx(
|
|
3433
|
+
/* @__PURE__ */ e.jsx(Ll, {})
|
|
3434
3434
|
] }),
|
|
3435
3435
|
t ? S() : /* @__PURE__ */ e.jsxs("div", { className: "flex min-h-0 w-full flex-1 grow basis-0 px-6", children: [
|
|
3436
|
-
r && /* @__PURE__ */ e.jsx(
|
|
3437
|
-
n.data && n.data.length > 0 && /* @__PURE__ */ e.jsx(
|
|
3436
|
+
r && /* @__PURE__ */ e.jsx(Ml, {}),
|
|
3437
|
+
n.data && n.data.length > 0 && /* @__PURE__ */ e.jsx(Sl, { data: a || [] }),
|
|
3438
3438
|
i && /* @__PURE__ */ e.jsx("span", { className: "font-mono text-sm", children: i })
|
|
3439
3439
|
] })
|
|
3440
3440
|
] });
|
|
3441
3441
|
}
|
|
3442
|
-
function
|
|
3442
|
+
function Ml() {
|
|
3443
3443
|
const s = o((a) => a.pythonStdOut);
|
|
3444
3444
|
if (!s)
|
|
3445
3445
|
return null;
|
|
@@ -3453,17 +3453,17 @@ function Tl() {
|
|
|
3453
3453
|
className: "bg-muted p-2 font-mono text-sm"
|
|
3454
3454
|
}
|
|
3455
3455
|
),
|
|
3456
|
-
/* @__PURE__ */ e.jsx(
|
|
3456
|
+
/* @__PURE__ */ e.jsx(ue, { className: "mb-2" })
|
|
3457
3457
|
] });
|
|
3458
3458
|
}
|
|
3459
|
-
function
|
|
3459
|
+
function Ll() {
|
|
3460
3460
|
const s = o((a) => a.isShowingVisual), n = o(
|
|
3461
3461
|
(a) => a.actions.setIsShowingVisual
|
|
3462
3462
|
);
|
|
3463
3463
|
return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
3464
3464
|
/* @__PURE__ */ e.jsx(_, { htmlFor: "visualize", children: "Chart" }),
|
|
3465
3465
|
/* @__PURE__ */ e.jsx(
|
|
3466
|
-
|
|
3466
|
+
en,
|
|
3467
3467
|
{
|
|
3468
3468
|
checked: s,
|
|
3469
3469
|
onCheckedChange: () => n(!s),
|
|
@@ -3473,13 +3473,13 @@ function Ml() {
|
|
|
3473
3473
|
)
|
|
3474
3474
|
] });
|
|
3475
3475
|
}
|
|
3476
|
-
function
|
|
3476
|
+
function Dl({
|
|
3477
3477
|
options: s,
|
|
3478
3478
|
value: n,
|
|
3479
3479
|
onValueChange: a
|
|
3480
3480
|
}) {
|
|
3481
3481
|
return /* @__PURE__ */ e.jsx(
|
|
3482
|
-
|
|
3482
|
+
gs,
|
|
3483
3483
|
{
|
|
3484
3484
|
value: n,
|
|
3485
3485
|
onValueChange: a,
|
|
@@ -3492,23 +3492,23 @@ function Ll({
|
|
|
3492
3492
|
}
|
|
3493
3493
|
);
|
|
3494
3494
|
}
|
|
3495
|
-
function
|
|
3495
|
+
function pe({
|
|
3496
3496
|
label: s,
|
|
3497
3497
|
options: n,
|
|
3498
3498
|
value: a,
|
|
3499
3499
|
onValueChange: t,
|
|
3500
3500
|
className: l
|
|
3501
3501
|
}) {
|
|
3502
|
-
return /* @__PURE__ */ e.jsxs(
|
|
3502
|
+
return /* @__PURE__ */ e.jsxs(fe, { value: a, onValueChange: t, children: [
|
|
3503
3503
|
/* @__PURE__ */ e.jsx(
|
|
3504
|
-
|
|
3504
|
+
ge,
|
|
3505
3505
|
{
|
|
3506
3506
|
className: Y("w-full focus:ring-0 focus:ring-offset-0", l),
|
|
3507
|
-
children: /* @__PURE__ */ e.jsx(
|
|
3507
|
+
children: /* @__PURE__ */ e.jsx(je, { placeholder: s })
|
|
3508
3508
|
}
|
|
3509
3509
|
),
|
|
3510
|
-
/* @__PURE__ */ e.jsx(
|
|
3511
|
-
/* @__PURE__ */ e.jsx(
|
|
3510
|
+
/* @__PURE__ */ e.jsx(be, { children: /* @__PURE__ */ e.jsxs(ze, { children: [
|
|
3511
|
+
/* @__PURE__ */ e.jsx(ye, { children: s }),
|
|
3512
3512
|
n.map((i) => /* @__PURE__ */ e.jsx(W, { value: i.value, children: i.label }, i.value))
|
|
3513
3513
|
] }) })
|
|
3514
3514
|
] });
|
|
@@ -3527,18 +3527,18 @@ function Ge({
|
|
|
3527
3527
|
children: [
|
|
3528
3528
|
/* @__PURE__ */ e.jsxs("summary", { className: "flex cursor-pointer list-none items-center justify-between gap-4", children: [
|
|
3529
3529
|
/* @__PURE__ */ e.jsx(_, { children: n }),
|
|
3530
|
-
/* @__PURE__ */ e.jsx(
|
|
3530
|
+
/* @__PURE__ */ e.jsx(sn, { className: "h-4 w-4" })
|
|
3531
3531
|
] }),
|
|
3532
3532
|
/* @__PURE__ */ e.jsx("div", { className: "transition-all ease-in-out", children: s })
|
|
3533
3533
|
]
|
|
3534
3534
|
}
|
|
3535
3535
|
);
|
|
3536
3536
|
}
|
|
3537
|
-
function
|
|
3537
|
+
function El() {
|
|
3538
3538
|
var v, I;
|
|
3539
3539
|
const s = o(
|
|
3540
3540
|
(C) => C.card.customCardPreferences
|
|
3541
|
-
), { data: n } =
|
|
3541
|
+
), { data: n } = Za(), a = (n == null ? void 0 : n.plugins) || [], t = o((C) => C.card), l = o((C) => C.frame), i = (s == null ? void 0 : s.visualType) || "single", { setCustomCardPreferences: r } = he(), { components: d, manifest: c } = va(
|
|
3542
3542
|
(s == null ? void 0 : s.url) || ""
|
|
3543
3543
|
), u = (v = c == null ? void 0 : c.visuals) == null ? void 0 : v.find(
|
|
3544
3544
|
(C) => C.name === (s == null ? void 0 : s.componentName)
|
|
@@ -3576,7 +3576,7 @@ function Dl() {
|
|
|
3576
3576
|
children: [
|
|
3577
3577
|
/* @__PURE__ */ e.jsx("div", { className: "col-span-4 flex items-center", children: L }),
|
|
3578
3578
|
/* @__PURE__ */ e.jsx(
|
|
3579
|
-
|
|
3579
|
+
pe,
|
|
3580
3580
|
{
|
|
3581
3581
|
className: "col-span-6 h-8 w-full justify-between",
|
|
3582
3582
|
label: "",
|
|
@@ -3610,7 +3610,7 @@ function Dl() {
|
|
|
3610
3610
|
},
|
|
3611
3611
|
w
|
|
3612
3612
|
) : C === "select" ? /* @__PURE__ */ e.jsx(
|
|
3613
|
-
|
|
3613
|
+
pe,
|
|
3614
3614
|
{
|
|
3615
3615
|
className: "h-8 w-full",
|
|
3616
3616
|
label: "",
|
|
@@ -3650,7 +3650,7 @@ function Dl() {
|
|
|
3650
3650
|
children: [
|
|
3651
3651
|
/* @__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: [
|
|
3652
3652
|
/* @__PURE__ */ e.jsx("div", { className: "space-y-2", children: /* @__PURE__ */ e.jsx("div", { className: "px-2", children: /* @__PURE__ */ e.jsx(
|
|
3653
|
-
|
|
3653
|
+
pe,
|
|
3654
3654
|
{
|
|
3655
3655
|
className: "h-8 w-full",
|
|
3656
3656
|
label: "",
|
|
@@ -3666,7 +3666,7 @@ function Dl() {
|
|
|
3666
3666
|
}
|
|
3667
3667
|
) }) }),
|
|
3668
3668
|
((s == null ? void 0 : s.type) === "component" || (s == null ? void 0 : s.type) === void 0) && /* @__PURE__ */ e.jsx(
|
|
3669
|
-
|
|
3669
|
+
Dl,
|
|
3670
3670
|
{
|
|
3671
3671
|
options: [
|
|
3672
3672
|
{ value: "single", label: "Single Visual" },
|
|
@@ -3679,7 +3679,7 @@ function Dl() {
|
|
|
3679
3679
|
((s == null ? void 0 : s.type) === "component" || (s == null ? void 0 : s.type) === void 0) && s && /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
3680
3680
|
/* @__PURE__ */ e.jsx(_, { children: "Component" }),
|
|
3681
3681
|
/* @__PURE__ */ e.jsx("div", { className: "space-y-2 px-2", children: d && /* @__PURE__ */ e.jsx(
|
|
3682
|
-
|
|
3682
|
+
pe,
|
|
3683
3683
|
{
|
|
3684
3684
|
className: "h-8 w-full",
|
|
3685
3685
|
label: "",
|
|
@@ -3700,7 +3700,7 @@ function Dl() {
|
|
|
3700
3700
|
) })
|
|
3701
3701
|
] }) })
|
|
3702
3702
|
] }) }) }),
|
|
3703
|
-
/* @__PURE__ */ e.jsx(
|
|
3703
|
+
/* @__PURE__ */ e.jsx(ue, { className: "my-4" }),
|
|
3704
3704
|
((I = t == null ? void 0 : t.customCardPreferences) == null ? void 0 : I.componentName) && /* @__PURE__ */ e.jsxs(Ge, { summary: "Component Settings", children: [
|
|
3705
3705
|
u && u.dataInputs && /* @__PURE__ */ e.jsxs("div", { className: "space-y-3", children: [
|
|
3706
3706
|
/* @__PURE__ */ e.jsx(_, { children: "Input Mapping" }),
|
|
@@ -3712,7 +3712,7 @@ function Dl() {
|
|
|
3712
3712
|
}
|
|
3713
3713
|
);
|
|
3714
3714
|
}
|
|
3715
|
-
function
|
|
3715
|
+
function De() {
|
|
3716
3716
|
const [s, n] = R([]);
|
|
3717
3717
|
o(
|
|
3718
3718
|
(m) => m.card.cfg
|
|
@@ -3811,7 +3811,7 @@ function Re() {
|
|
|
3811
3811
|
/* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-2", children: ((h = a == null ? void 0 : a.onClickFilter) == null ? void 0 : h.find(
|
|
3812
3812
|
(p) => p.columnIndex === y
|
|
3813
3813
|
)) && /* @__PURE__ */ e.jsx(
|
|
3814
|
-
|
|
3814
|
+
Aa,
|
|
3815
3815
|
{
|
|
3816
3816
|
onClick: () => {
|
|
3817
3817
|
n((p) => {
|
|
@@ -3831,7 +3831,7 @@ function Re() {
|
|
|
3831
3831
|
})
|
|
3832
3832
|
] });
|
|
3833
3833
|
}
|
|
3834
|
-
function
|
|
3834
|
+
function js() {
|
|
3835
3835
|
var r, d, c;
|
|
3836
3836
|
const s = o((u) => u.card.preferences), n = o(
|
|
3837
3837
|
(u) => u.card.cfg
|
|
@@ -3841,7 +3841,7 @@ function gs() {
|
|
|
3841
3841
|
l(u);
|
|
3842
3842
|
}
|
|
3843
3843
|
return /* @__PURE__ */ e.jsxs(
|
|
3844
|
-
|
|
3844
|
+
gs,
|
|
3845
3845
|
{
|
|
3846
3846
|
value: ((d = s == null ? void 0 : s.chartOptions) == null ? void 0 : d.indexAxis) || ((c = n == null ? void 0 : n.options) == null ? void 0 : c.indexAxis) || "x",
|
|
3847
3847
|
onValueChange: i,
|
|
@@ -3861,12 +3861,12 @@ function gs() {
|
|
|
3861
3861
|
);
|
|
3862
3862
|
}
|
|
3863
3863
|
const ns = "focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0";
|
|
3864
|
-
function
|
|
3864
|
+
function ia(s, n) {
|
|
3865
3865
|
var t, l, i;
|
|
3866
|
-
const a =
|
|
3866
|
+
const a = Oa(s, n);
|
|
3867
3867
|
return ((i = (l = (t = s == null ? void 0 : s.chartOptions) == null ? void 0 : t.scales) == null ? void 0 : l[a]) == null ? void 0 : i.type) || "linear";
|
|
3868
3868
|
}
|
|
3869
|
-
function
|
|
3869
|
+
function et() {
|
|
3870
3870
|
var te, U, oe, O, H, Q;
|
|
3871
3871
|
const [s, n] = R(!1), a = o((E) => {
|
|
3872
3872
|
var D;
|
|
@@ -3874,25 +3874,25 @@ function Za() {
|
|
|
3874
3874
|
}), t = o((E) => {
|
|
3875
3875
|
var D;
|
|
3876
3876
|
return (D = E.card) == null ? void 0 : D.cfg;
|
|
3877
|
-
}), l =
|
|
3878
|
-
|
|
3877
|
+
}), l = Oa(a, t), [i, r] = R(
|
|
3878
|
+
ia(a)
|
|
3879
3879
|
), [d, c] = R(
|
|
3880
3880
|
((oe = (U = (te = a == null ? void 0 : a.chartOptions) == null ? void 0 : te.scales) == null ? void 0 : U[l]) == null ? void 0 : oe.min) || ""
|
|
3881
3881
|
), [u, m] = R(
|
|
3882
3882
|
((Q = (H = (O = a == null ? void 0 : a.chartOptions) == null ? void 0 : O.scales) == null ? void 0 : H[l]) == null ? void 0 : Q.max) || ""
|
|
3883
3883
|
), [y, b] = R(d || u ? "custom" : "auto"), [h, p] = R(""), [v, I] = R(0), [C, w] = R(""), [z, S] = R(""), [L, x] = R(""), k = o(
|
|
3884
3884
|
(E) => E.actions.setCardPreferences
|
|
3885
|
-
), { updateCardInFrame: j } =
|
|
3885
|
+
), { updateCardInFrame: j } = he(), f = o((E) => E.card), F = o((E) => {
|
|
3886
3886
|
var D;
|
|
3887
3887
|
return (D = E.card) == null ? void 0 : D.type;
|
|
3888
3888
|
}), A = ["pie", "doughnut", "polarArea"].includes(F);
|
|
3889
3889
|
Z(() => {
|
|
3890
|
-
var E, D, ae, P, ee, le, Se, ce, Oe, Fe, Ie, we, se,
|
|
3891
|
-
r(
|
|
3890
|
+
var E, D, ae, P, ee, le, Se, ce, Oe, Fe, Ie, we, se, me;
|
|
3891
|
+
r(ia(a)), c(
|
|
3892
3892
|
((ae = (D = (E = a == null ? void 0 : a.chartOptions) == null ? void 0 : E.scales) == null ? void 0 : D[l]) == null ? void 0 : ae.min) === 0 ? 0 : ""
|
|
3893
3893
|
), m(((le = (ee = (P = a == null ? void 0 : a.chartOptions) == null ? void 0 : P.scales) == null ? void 0 : ee[l]) == null ? void 0 : le.max) || ""), p(
|
|
3894
3894
|
((Fe = (Oe = (ce = (Se = a == null ? void 0 : a.chartOptions) == null ? void 0 : Se.scales) == null ? void 0 : ce[l]) == null ? void 0 : Oe.ticks) == null ? void 0 : Fe.stepSize) || ""
|
|
3895
|
-
), I(((Ie = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : Ie.decimalPlaces) || 0), w(((we = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : we.suffix) || ""), S(((se = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : se.currency) || ""), x(((
|
|
3895
|
+
), I(((Ie = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : Ie.decimalPlaces) || 0), w(((we = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : we.suffix) || ""), S(((se = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : se.currency) || ""), x(((me = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : me.locale) || "");
|
|
3896
3896
|
}, [s, a, l]);
|
|
3897
3897
|
function q(E, D) {
|
|
3898
3898
|
return D === "" || /^[0-9\b]+$/.test(D) ? Number(D) : Number(E);
|
|
@@ -3919,30 +3919,30 @@ function Za() {
|
|
|
3919
3919
|
}
|
|
3920
3920
|
),
|
|
3921
3921
|
/* @__PURE__ */ e.jsxs(
|
|
3922
|
-
|
|
3922
|
+
fe,
|
|
3923
3923
|
{
|
|
3924
3924
|
value: z || "none",
|
|
3925
3925
|
onValueChange: (D) => S(D === "none" ? "" : D),
|
|
3926
3926
|
children: [
|
|
3927
|
-
/* @__PURE__ */ e.jsx(
|
|
3928
|
-
/* @__PURE__ */ e.jsx(
|
|
3929
|
-
/* @__PURE__ */ e.jsx(
|
|
3927
|
+
/* @__PURE__ */ e.jsx(ge, { className: "col-span-2 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(je, {}) }),
|
|
3928
|
+
/* @__PURE__ */ e.jsx(be, { children: /* @__PURE__ */ e.jsxs(ze, { children: [
|
|
3929
|
+
/* @__PURE__ */ e.jsx(ye, { children: "Currency" }),
|
|
3930
3930
|
/* @__PURE__ */ e.jsx(W, { value: "none", children: "None" }),
|
|
3931
3931
|
E.map((D) => /* @__PURE__ */ e.jsx(W, { value: D, children: D }, D))
|
|
3932
3932
|
] }) })
|
|
3933
3933
|
]
|
|
3934
3934
|
}
|
|
3935
3935
|
),
|
|
3936
|
-
/* @__PURE__ */ e.jsxs(
|
|
3936
|
+
/* @__PURE__ */ e.jsxs(fe, { value: L, onValueChange: (D) => x(D), children: [
|
|
3937
3937
|
/* @__PURE__ */ e.jsx(
|
|
3938
|
-
|
|
3938
|
+
ge,
|
|
3939
3939
|
{
|
|
3940
3940
|
className: "col-span-2 h-8 w-full focus:ring-1 focus:ring-offset-0",
|
|
3941
|
-
children: /* @__PURE__ */ e.jsx(
|
|
3941
|
+
children: /* @__PURE__ */ e.jsx(je, {})
|
|
3942
3942
|
}
|
|
3943
3943
|
),
|
|
3944
|
-
/* @__PURE__ */ e.jsx(
|
|
3945
|
-
/* @__PURE__ */ e.jsx(
|
|
3944
|
+
/* @__PURE__ */ e.jsx(be, { children: /* @__PURE__ */ e.jsxs(ze, { children: [
|
|
3945
|
+
/* @__PURE__ */ e.jsx(ye, { children: "Locale" }),
|
|
3946
3946
|
cs.map((D) => /* @__PURE__ */ e.jsx(W, { value: D.locale, children: D.locale }, D.locale))
|
|
3947
3947
|
] }) })
|
|
3948
3948
|
] })
|
|
@@ -4035,9 +4035,9 @@ function Za() {
|
|
|
4035
4035
|
};
|
|
4036
4036
|
j(ae);
|
|
4037
4037
|
}
|
|
4038
|
-
return /* @__PURE__ */ e.jsxs(
|
|
4039
|
-
/* @__PURE__ */ e.jsx(
|
|
4040
|
-
/* @__PURE__ */ e.jsx(
|
|
4038
|
+
return /* @__PURE__ */ e.jsxs(xs, { onOpenChange: (E) => n(E), children: [
|
|
4039
|
+
/* @__PURE__ */ e.jsx(ps, { asChild: !0, children: /* @__PURE__ */ e.jsx(an, { className: "size-4 cursor-pointer text-muted-foreground hover:text-foreground" }) }),
|
|
4040
|
+
/* @__PURE__ */ e.jsx(fs, { align: "center", className: "max-w-65", children: /* @__PURE__ */ e.jsxs("div", { className: "grid gap-4", children: [
|
|
4041
4041
|
/* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
4042
4042
|
/* @__PURE__ */ e.jsx("h4", { className: "font-medium leading-none", children: "Scale Options" }),
|
|
4043
4043
|
/* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted-foreground", children: "Set the scale for the number axis" })
|
|
@@ -4046,15 +4046,15 @@ function Za() {
|
|
|
4046
4046
|
/* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-3 items-center gap-2", children: [
|
|
4047
4047
|
/* @__PURE__ */ e.jsx(_, { htmlFor: "scale", children: "Type" }),
|
|
4048
4048
|
/* @__PURE__ */ e.jsxs(
|
|
4049
|
-
|
|
4049
|
+
fe,
|
|
4050
4050
|
{
|
|
4051
4051
|
disabled: A,
|
|
4052
4052
|
value: i,
|
|
4053
4053
|
onValueChange: (E) => r(E),
|
|
4054
4054
|
children: [
|
|
4055
|
-
/* @__PURE__ */ e.jsx(
|
|
4056
|
-
/* @__PURE__ */ e.jsx(
|
|
4057
|
-
/* @__PURE__ */ e.jsx(
|
|
4055
|
+
/* @__PURE__ */ e.jsx(ge, { className: "col-span-2 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(je, {}) }),
|
|
4056
|
+
/* @__PURE__ */ e.jsx(be, { id: "type", children: /* @__PURE__ */ e.jsxs(ze, { children: [
|
|
4057
|
+
/* @__PURE__ */ e.jsx(ye, { children: "Option" }),
|
|
4058
4058
|
/* @__PURE__ */ e.jsx(W, { value: "linear", children: "Linear" }),
|
|
4059
4059
|
/* @__PURE__ */ e.jsx(W, { value: "logarithmic", children: "Logarithmic" })
|
|
4060
4060
|
] }) })
|
|
@@ -4065,7 +4065,7 @@ function Za() {
|
|
|
4065
4065
|
i == "linear" && /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-3 items-center gap-2 py-1", children: [
|
|
4066
4066
|
/* @__PURE__ */ e.jsx(_, { htmlFor: "scale-option", children: "Setup" }),
|
|
4067
4067
|
/* @__PURE__ */ e.jsxs(
|
|
4068
|
-
|
|
4068
|
+
gs,
|
|
4069
4069
|
{
|
|
4070
4070
|
disabled: A,
|
|
4071
4071
|
id: "scale-option",
|
|
@@ -4088,7 +4088,7 @@ function Za() {
|
|
|
4088
4088
|
] }),
|
|
4089
4089
|
y === "custom" && i == "linear" && B(),
|
|
4090
4090
|
$(),
|
|
4091
|
-
/* @__PURE__ */ e.jsx(
|
|
4091
|
+
/* @__PURE__ */ e.jsx(tn, {}),
|
|
4092
4092
|
/* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-3", children: /* @__PURE__ */ e.jsx(
|
|
4093
4093
|
M,
|
|
4094
4094
|
{
|
|
@@ -4102,7 +4102,7 @@ function Za() {
|
|
|
4102
4102
|
] }) })
|
|
4103
4103
|
] });
|
|
4104
4104
|
}
|
|
4105
|
-
function
|
|
4105
|
+
function Al({ idx: s }) {
|
|
4106
4106
|
var d;
|
|
4107
4107
|
const n = o((c) => {
|
|
4108
4108
|
var u;
|
|
@@ -4116,7 +4116,7 @@ function El({ idx: s }) {
|
|
|
4116
4116
|
(c) => c.actions.setCardPreferences
|
|
4117
4117
|
), l = (d = n == null ? void 0 : n.chartOptions) == null ? void 0 : d.indexAxis, i = a == null ? void 0 : a.find((c) => c.idx === s);
|
|
4118
4118
|
function r(c, u) {
|
|
4119
|
-
(c === "end" || c === "start") &&
|
|
4119
|
+
(c === "end" || c === "start") && nn(ln());
|
|
4120
4120
|
const m = {
|
|
4121
4121
|
display: c !== "none",
|
|
4122
4122
|
align: c,
|
|
@@ -4146,9 +4146,9 @@ function El({ idx: s }) {
|
|
|
4146
4146
|
});
|
|
4147
4147
|
}
|
|
4148
4148
|
}
|
|
4149
|
-
return /* @__PURE__ */ e.jsxs(
|
|
4150
|
-
/* @__PURE__ */ e.jsx(
|
|
4151
|
-
/* @__PURE__ */ e.jsx(
|
|
4149
|
+
return /* @__PURE__ */ e.jsxs(xs, { children: [
|
|
4150
|
+
/* @__PURE__ */ e.jsx(ps, { children: /* @__PURE__ */ e.jsx(Wn, { className: "invisible size-4 rotate-[135deg] cursor-pointer text-muted-foreground hover:text-foreground group-hover:visible" }) }),
|
|
4151
|
+
/* @__PURE__ */ e.jsx(fs, { className: "w-fit p-1", children: /* @__PURE__ */ e.jsxs("div", { className: "flex gap-1", children: [
|
|
4152
4152
|
/* @__PURE__ */ e.jsx(
|
|
4153
4153
|
M,
|
|
4154
4154
|
{
|
|
@@ -4156,7 +4156,7 @@ function El({ idx: s }) {
|
|
|
4156
4156
|
size: "sm",
|
|
4157
4157
|
variant: "secondary",
|
|
4158
4158
|
className: "h-7 p-1 text-xs font-normal",
|
|
4159
|
-
children: /* @__PURE__ */ e.jsx(
|
|
4159
|
+
children: /* @__PURE__ */ e.jsx(za, { className: "size-4" })
|
|
4160
4160
|
}
|
|
4161
4161
|
),
|
|
4162
4162
|
/* @__PURE__ */ e.jsx(
|
|
@@ -4167,7 +4167,7 @@ function El({ idx: s }) {
|
|
|
4167
4167
|
variant: "secondary",
|
|
4168
4168
|
className: "h-7 p-1 text-xs font-normal",
|
|
4169
4169
|
children: /* @__PURE__ */ e.jsx(
|
|
4170
|
-
|
|
4170
|
+
Rn,
|
|
4171
4171
|
{
|
|
4172
4172
|
className: Y("h-4 w-4", {
|
|
4173
4173
|
"rotate-90": l === "y"
|
|
@@ -4184,7 +4184,7 @@ function El({ idx: s }) {
|
|
|
4184
4184
|
variant: "secondary",
|
|
4185
4185
|
className: "h-7 p-1 text-xs font-normal",
|
|
4186
4186
|
children: /* @__PURE__ */ e.jsx(
|
|
4187
|
-
|
|
4187
|
+
Hn,
|
|
4188
4188
|
{
|
|
4189
4189
|
className: Y("h-4 w-4", {
|
|
4190
4190
|
"rotate-90": l === "y"
|
|
@@ -4201,7 +4201,7 @@ function El({ idx: s }) {
|
|
|
4201
4201
|
variant: "secondary",
|
|
4202
4202
|
className: "h-7 p-1 text-xs font-normal",
|
|
4203
4203
|
children: /* @__PURE__ */ e.jsx(
|
|
4204
|
-
|
|
4204
|
+
_n,
|
|
4205
4205
|
{
|
|
4206
4206
|
className: Y("h-4 w-4", {
|
|
4207
4207
|
"rotate-90": l === "y"
|
|
@@ -4213,7 +4213,7 @@ function El({ idx: s }) {
|
|
|
4213
4213
|
] }) })
|
|
4214
4214
|
] });
|
|
4215
4215
|
}
|
|
4216
|
-
function
|
|
4216
|
+
function st() {
|
|
4217
4217
|
const s = o((c) => c.card), n = o(
|
|
4218
4218
|
(c) => {
|
|
4219
4219
|
var u, m, y;
|
|
@@ -4223,15 +4223,15 @@ function et() {
|
|
|
4223
4223
|
keys: l,
|
|
4224
4224
|
metricKeys: i,
|
|
4225
4225
|
dimensionKeys: r
|
|
4226
|
-
} =
|
|
4226
|
+
} = Cs(s.data || []);
|
|
4227
4227
|
let d = i;
|
|
4228
4228
|
if (["stackedBar", "stackedLine"].includes(s.type)) {
|
|
4229
|
-
const c =
|
|
4229
|
+
const c = rn({
|
|
4230
4230
|
dataArray: s.data || [],
|
|
4231
4231
|
groupKey: r[0],
|
|
4232
4232
|
pivotKey: r[1],
|
|
4233
4233
|
valueKey: d[0]
|
|
4234
|
-
}), { metricKeys: u } =
|
|
4234
|
+
}), { metricKeys: u } = Cs(c);
|
|
4235
4235
|
d = u;
|
|
4236
4236
|
}
|
|
4237
4237
|
return l.length === 0 ? null : /* @__PURE__ */ e.jsxs("div", { className: "space-y-4", children: [
|
|
@@ -4242,13 +4242,13 @@ function et() {
|
|
|
4242
4242
|
/* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
4243
4243
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between gap-5", children: [
|
|
4244
4244
|
/* @__PURE__ */ e.jsx(_, { children: t }),
|
|
4245
|
-
/* @__PURE__ */ e.jsx(
|
|
4245
|
+
/* @__PURE__ */ e.jsx(et, {})
|
|
4246
4246
|
] }),
|
|
4247
|
-
/* @__PURE__ */ e.jsx("div", { className: "my-1 space-y-1", children: d.map((c, u) => /* @__PURE__ */ e.jsx(
|
|
4247
|
+
/* @__PURE__ */ e.jsx("div", { className: "my-1 space-y-1", children: d.map((c, u) => /* @__PURE__ */ e.jsx(Vl, { col: c, idx: u }, c)) })
|
|
4248
4248
|
] })
|
|
4249
4249
|
] });
|
|
4250
4250
|
}
|
|
4251
|
-
function
|
|
4251
|
+
function Vl({ col: s, idx: n }) {
|
|
4252
4252
|
const a = o((d) => {
|
|
4253
4253
|
var c;
|
|
4254
4254
|
return (c = d.card) == null ? void 0 : c.preferences;
|
|
@@ -4287,52 +4287,52 @@ function Al({ col: s, idx: n }) {
|
|
|
4287
4287
|
/* @__PURE__ */ e.jsx("p", { children: s }),
|
|
4288
4288
|
/* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
|
|
4289
4289
|
/* @__PURE__ */ e.jsx(
|
|
4290
|
-
|
|
4290
|
+
Bs,
|
|
4291
4291
|
{
|
|
4292
4292
|
onClick: () => r("bar"),
|
|
4293
4293
|
className: "invisible size-4 cursor-pointer text-muted-foreground hover:text-foreground group-hover:visible"
|
|
4294
4294
|
}
|
|
4295
4295
|
),
|
|
4296
4296
|
/* @__PURE__ */ e.jsx(
|
|
4297
|
-
|
|
4297
|
+
Us,
|
|
4298
4298
|
{
|
|
4299
4299
|
onClick: () => r("line"),
|
|
4300
4300
|
className: "invisible size-4 cursor-pointer text-muted-foreground hover:text-foreground group-hover:visible"
|
|
4301
4301
|
}
|
|
4302
4302
|
),
|
|
4303
4303
|
/* @__PURE__ */ e.jsx(
|
|
4304
|
-
|
|
4304
|
+
On,
|
|
4305
4305
|
{
|
|
4306
4306
|
onClick: () => r("area"),
|
|
4307
4307
|
className: "invisible size-4 cursor-pointer text-muted-foreground hover:text-foreground group-hover:visible"
|
|
4308
4308
|
}
|
|
4309
4309
|
),
|
|
4310
4310
|
/* @__PURE__ */ e.jsx(
|
|
4311
|
-
|
|
4311
|
+
ue,
|
|
4312
4312
|
{
|
|
4313
4313
|
orientation: "vertical",
|
|
4314
4314
|
className: "invisible size-4 cursor-pointer py-2 text-muted-foreground hover:text-foreground group-hover:visible"
|
|
4315
4315
|
}
|
|
4316
4316
|
),
|
|
4317
|
-
/* @__PURE__ */ e.jsx(
|
|
4317
|
+
/* @__PURE__ */ e.jsx(Al, { idx: n })
|
|
4318
4318
|
] })
|
|
4319
4319
|
] });
|
|
4320
4320
|
}
|
|
4321
|
-
function
|
|
4321
|
+
function at() {
|
|
4322
4322
|
const s = o((b) => b.selectedConnectionId), n = o((b) => b.selectedDatamodelId), a = o((b) => b.selectedDatabaseName), t = o((b) => b.selectedSchemaName), l = o((b) => b.selectedTableName), i = T((b) => b.dashboard.filters) || [], r = T((b) => b.actions.addFilter), d = T((b) => b.actions.removeFilter), c = T(
|
|
4323
4323
|
(b) => b.actions.removeFilterValue
|
|
4324
|
-
), { modelItems: u, tableName: m } =
|
|
4324
|
+
), { modelItems: u, tableName: m } = Re();
|
|
4325
4325
|
function y(b, h = "dashboard") {
|
|
4326
4326
|
var x;
|
|
4327
|
-
const p =
|
|
4328
|
-
let w =
|
|
4327
|
+
const p = xe(b.column_name), v = xe(a || ""), I = xe(t || ""), C = xe(m);
|
|
4328
|
+
let w = ja(
|
|
4329
4329
|
I,
|
|
4330
4330
|
C
|
|
4331
4331
|
), z = `${w}.${p}`;
|
|
4332
4332
|
const S = (x = u == null ? void 0 : u.find(
|
|
4333
4333
|
(k) => k.id === n
|
|
4334
4334
|
)) == null ? void 0 : x.name;
|
|
4335
|
-
n && n !== "none" && (z = `${
|
|
4335
|
+
n && n !== "none" && (z = `${vs}.${S}.${p}`, w = `${vs}.${S}`);
|
|
4336
4336
|
const L = i == null ? void 0 : i.find(
|
|
4337
4337
|
(k) => k.column === z && k.table === C && (k.database === v || k.database === a)
|
|
4338
4338
|
);
|
|
@@ -4352,7 +4352,7 @@ function st() {
|
|
|
4352
4352
|
// database: 'NA',
|
|
4353
4353
|
connectionId: s,
|
|
4354
4354
|
operation: "in",
|
|
4355
|
-
sql:
|
|
4355
|
+
sql: aa(
|
|
4356
4356
|
b.data_type,
|
|
4357
4357
|
w,
|
|
4358
4358
|
p
|
|
@@ -4370,7 +4370,7 @@ function st() {
|
|
|
4370
4370
|
database: a || "",
|
|
4371
4371
|
connectionId: s || "",
|
|
4372
4372
|
operation: "in",
|
|
4373
|
-
sql:
|
|
4373
|
+
sql: aa(
|
|
4374
4374
|
b.data_type,
|
|
4375
4375
|
w,
|
|
4376
4376
|
p
|
|
@@ -4384,7 +4384,7 @@ function st() {
|
|
|
4384
4384
|
function _e() {
|
|
4385
4385
|
const s = T(
|
|
4386
4386
|
(d) => d.dashboard.filters
|
|
4387
|
-
), n = o((d) => d.frame), { setFrame: a } =
|
|
4387
|
+
), n = o((d) => d.frame), { setFrame: a } = he(), { columns: t } = Re(), { assignFilter: l } = at();
|
|
4388
4388
|
function i(d) {
|
|
4389
4389
|
const c = l(d, "frame");
|
|
4390
4390
|
a({ ...n, filterId: c });
|
|
@@ -4392,18 +4392,18 @@ function _e() {
|
|
|
4392
4392
|
const r = s == null ? void 0 : s.find((d) => d.id === n.filterId);
|
|
4393
4393
|
return /* @__PURE__ */ e.jsxs("div", { className: "space-y-3", children: [
|
|
4394
4394
|
/* @__PURE__ */ e.jsx(_, { children: "Card Filter" }),
|
|
4395
|
-
/* @__PURE__ */ e.jsx(
|
|
4396
|
-
r && /* @__PURE__ */ e.jsx(
|
|
4395
|
+
/* @__PURE__ */ e.jsx(ql, { onSelect: i, columns: t }),
|
|
4396
|
+
r && /* @__PURE__ */ e.jsx(on, { filter: r })
|
|
4397
4397
|
] });
|
|
4398
4398
|
}
|
|
4399
|
-
function
|
|
4399
|
+
function ql({
|
|
4400
4400
|
columns: s,
|
|
4401
4401
|
onSelect: n
|
|
4402
4402
|
}) {
|
|
4403
4403
|
var r;
|
|
4404
|
-
const [a, t] =
|
|
4405
|
-
return /* @__PURE__ */ e.jsxs(
|
|
4406
|
-
/* @__PURE__ */ e.jsx(
|
|
4404
|
+
const [a, t] = ta.useState(!1), [l, i] = ta.useState("");
|
|
4405
|
+
return /* @__PURE__ */ e.jsxs(xs, { open: a, onOpenChange: t, children: [
|
|
4406
|
+
/* @__PURE__ */ e.jsx(ps, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
|
|
4407
4407
|
M,
|
|
4408
4408
|
{
|
|
4409
4409
|
size: "sm",
|
|
@@ -4413,16 +4413,16 @@ function Vl({
|
|
|
4413
4413
|
className: "w-full justify-between font-normal",
|
|
4414
4414
|
children: [
|
|
4415
4415
|
l ? (r = s.find((d) => d.column_name === l)) == null ? void 0 : r.column_name : "Select Column...",
|
|
4416
|
-
/* @__PURE__ */ e.jsx(
|
|
4416
|
+
/* @__PURE__ */ e.jsx(cn, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
|
|
4417
4417
|
]
|
|
4418
4418
|
}
|
|
4419
4419
|
) }),
|
|
4420
|
-
/* @__PURE__ */ e.jsx(
|
|
4421
|
-
/* @__PURE__ */ e.jsx(
|
|
4422
|
-
/* @__PURE__ */ e.jsxs(
|
|
4423
|
-
/* @__PURE__ */ e.jsx(
|
|
4424
|
-
/* @__PURE__ */ e.jsx(
|
|
4425
|
-
|
|
4420
|
+
/* @__PURE__ */ e.jsx(fs, { className: "w-[200px] p-0", children: /* @__PURE__ */ e.jsxs(dn, { children: [
|
|
4421
|
+
/* @__PURE__ */ e.jsx(un, { placeholder: "Search column", className: "h-9" }),
|
|
4422
|
+
/* @__PURE__ */ e.jsxs(hn, { children: [
|
|
4423
|
+
/* @__PURE__ */ e.jsx(mn, { children: "No framework found." }),
|
|
4424
|
+
/* @__PURE__ */ e.jsx(xn, { children: s.map((d) => /* @__PURE__ */ e.jsxs(
|
|
4425
|
+
pn,
|
|
4426
4426
|
{
|
|
4427
4427
|
value: d.column_name,
|
|
4428
4428
|
onSelect: (c) => {
|
|
@@ -4432,7 +4432,7 @@ function Vl({
|
|
|
4432
4432
|
children: [
|
|
4433
4433
|
d.column_name,
|
|
4434
4434
|
/* @__PURE__ */ e.jsx(
|
|
4435
|
-
|
|
4435
|
+
ka,
|
|
4436
4436
|
{
|
|
4437
4437
|
className: Y(
|
|
4438
4438
|
"ml-auto h-4 w-4",
|
|
@@ -4448,12 +4448,12 @@ function Vl({
|
|
|
4448
4448
|
] }) })
|
|
4449
4449
|
] });
|
|
4450
4450
|
}
|
|
4451
|
-
function
|
|
4451
|
+
function Rl({
|
|
4452
4452
|
cardType: s
|
|
4453
4453
|
}) {
|
|
4454
4454
|
return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(Le, { defaultValue: ["item-2"], type: "multiple", children: [
|
|
4455
4455
|
/* @__PURE__ */ e.jsxs(G, { value: "item-1", children: [
|
|
4456
|
-
/* @__PURE__ */ e.jsx(K, { children: `${
|
|
4456
|
+
/* @__PURE__ */ e.jsx(K, { children: `${Ps(s)} Chart` }),
|
|
4457
4457
|
/* @__PURE__ */ e.jsxs(J, { className: "space-y-4 font-mono text-xs", children: [
|
|
4458
4458
|
/* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT x-axis, y-axis-1, y-axis-2,... FROM table" }),
|
|
4459
4459
|
/* @__PURE__ */ e.jsxs("ul", { className: "ml-6 list-disc text-xs [&>li]:mt-2", children: [
|
|
@@ -4480,20 +4480,20 @@ function ql({
|
|
|
4480
4480
|
/* @__PURE__ */ e.jsxs(G, { value: "item-2", children: [
|
|
4481
4481
|
/* @__PURE__ */ e.jsx(K, { children: "Settings" }),
|
|
4482
4482
|
/* @__PURE__ */ e.jsxs(J, { className: "space-y-4 px-2", children: [
|
|
4483
|
-
/* @__PURE__ */ e.jsx(
|
|
4484
|
-
/* @__PURE__ */ e.jsx(
|
|
4483
|
+
/* @__PURE__ */ e.jsx(js, {}),
|
|
4484
|
+
/* @__PURE__ */ e.jsx(st, {})
|
|
4485
4485
|
] })
|
|
4486
4486
|
] }),
|
|
4487
4487
|
/* @__PURE__ */ e.jsxs(G, { value: "item-3", children: [
|
|
4488
4488
|
/* @__PURE__ */ e.jsx(K, { children: "Filters" }),
|
|
4489
4489
|
/* @__PURE__ */ e.jsxs(J, { className: "space-y-4 px-2", children: [
|
|
4490
|
-
/* @__PURE__ */ e.jsx(
|
|
4490
|
+
/* @__PURE__ */ e.jsx(De, {}),
|
|
4491
4491
|
/* @__PURE__ */ e.jsx(_e, {})
|
|
4492
4492
|
] })
|
|
4493
4493
|
] })
|
|
4494
4494
|
] }) });
|
|
4495
4495
|
}
|
|
4496
|
-
function
|
|
4496
|
+
function Ks() {
|
|
4497
4497
|
var l, i, r;
|
|
4498
4498
|
const s = o(
|
|
4499
4499
|
(d) => d.card.cfg
|
|
@@ -4522,18 +4522,18 @@ function Gs() {
|
|
|
4522
4522
|
return /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
4523
4523
|
/* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
4524
4524
|
/* @__PURE__ */ e.jsx("label", { className: "font-medium", children: "Data Labels" }),
|
|
4525
|
-
!["pyramid"].includes(a) && /* @__PURE__ */ e.jsx(
|
|
4525
|
+
!["pyramid"].includes(a) && /* @__PURE__ */ e.jsx(et, {})
|
|
4526
4526
|
] }),
|
|
4527
4527
|
/* @__PURE__ */ e.jsxs(
|
|
4528
|
-
|
|
4528
|
+
fe,
|
|
4529
4529
|
{
|
|
4530
4530
|
value: (r = (i = (l = s == null ? void 0 : s.options) == null ? void 0 : l.plugins) == null ? void 0 : i.datalabels) == null ? void 0 : r.anchor,
|
|
4531
4531
|
onValueChange: t,
|
|
4532
4532
|
defaultValue: "none",
|
|
4533
4533
|
children: [
|
|
4534
|
-
/* @__PURE__ */ e.jsx(
|
|
4535
|
-
/* @__PURE__ */ e.jsx(
|
|
4536
|
-
/* @__PURE__ */ e.jsx(
|
|
4534
|
+
/* @__PURE__ */ e.jsx(ge, { className: "h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(je, { placeholder: "Select position" }) }),
|
|
4535
|
+
/* @__PURE__ */ e.jsx(be, { children: /* @__PURE__ */ e.jsxs(ze, { children: [
|
|
4536
|
+
/* @__PURE__ */ e.jsx(ye, { children: "Data Labels" }),
|
|
4537
4537
|
/* @__PURE__ */ e.jsx(W, { value: "none", children: "None" }),
|
|
4538
4538
|
a !== "pyramid" && /* @__PURE__ */ e.jsx(W, { value: "start", children: "Start" }),
|
|
4539
4539
|
/* @__PURE__ */ e.jsx(W, { value: "center", children: "Center" }),
|
|
@@ -4544,7 +4544,7 @@ function Gs() {
|
|
|
4544
4544
|
)
|
|
4545
4545
|
] });
|
|
4546
4546
|
}
|
|
4547
|
-
function
|
|
4547
|
+
function _l({
|
|
4548
4548
|
cardType: s
|
|
4549
4549
|
}) {
|
|
4550
4550
|
function n(a) {
|
|
@@ -4576,23 +4576,23 @@ function Rl({
|
|
|
4576
4576
|
}
|
|
4577
4577
|
return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(Le, { defaultValue: ["item-2"], type: "multiple", children: [
|
|
4578
4578
|
/* @__PURE__ */ e.jsxs(G, { value: "item-1", children: [
|
|
4579
|
-
/* @__PURE__ */ e.jsx(K, { children: `${
|
|
4579
|
+
/* @__PURE__ */ e.jsx(K, { children: `${Ps(s)} Chart` }),
|
|
4580
4580
|
/* @__PURE__ */ e.jsx(J, { className: "space-y-4 font-mono text-xs", children: n(s) })
|
|
4581
4581
|
] }),
|
|
4582
4582
|
/* @__PURE__ */ e.jsxs(G, { value: "item-2", children: [
|
|
4583
4583
|
/* @__PURE__ */ e.jsx(K, { children: "Settings" }),
|
|
4584
|
-
/* @__PURE__ */ e.jsx(J, { className: "px-2", children: /* @__PURE__ */ e.jsx(
|
|
4584
|
+
/* @__PURE__ */ e.jsx(J, { className: "px-2", children: /* @__PURE__ */ e.jsx(Ks, {}) })
|
|
4585
4585
|
] }),
|
|
4586
4586
|
/* @__PURE__ */ e.jsxs(G, { value: "item-3", children: [
|
|
4587
4587
|
/* @__PURE__ */ e.jsx(K, { children: "Filters" }),
|
|
4588
4588
|
/* @__PURE__ */ e.jsxs(J, { className: "space-y-4 px-2", children: [
|
|
4589
|
-
/* @__PURE__ */ e.jsx(
|
|
4589
|
+
/* @__PURE__ */ e.jsx(De, {}),
|
|
4590
4590
|
/* @__PURE__ */ e.jsx(_e, {})
|
|
4591
4591
|
] })
|
|
4592
4592
|
] })
|
|
4593
4593
|
] }) });
|
|
4594
4594
|
}
|
|
4595
|
-
const
|
|
4595
|
+
const Hl = {
|
|
4596
4596
|
datasets: [
|
|
4597
4597
|
{
|
|
4598
4598
|
type: "line",
|
|
@@ -4605,7 +4605,7 @@ const _l = {
|
|
|
4605
4605
|
data: []
|
|
4606
4606
|
}
|
|
4607
4607
|
]
|
|
4608
|
-
},
|
|
4608
|
+
}, $l = {
|
|
4609
4609
|
datasets: [
|
|
4610
4610
|
{
|
|
4611
4611
|
fill: "origin",
|
|
@@ -4615,7 +4615,7 @@ const _l = {
|
|
|
4615
4615
|
}
|
|
4616
4616
|
]
|
|
4617
4617
|
};
|
|
4618
|
-
function
|
|
4618
|
+
function Pl() {
|
|
4619
4619
|
const s = o((n) => n.card.type);
|
|
4620
4620
|
return /* @__PURE__ */ e.jsxs("div", { className: "space-y-6 p-6", children: [
|
|
4621
4621
|
/* @__PURE__ */ e.jsx(
|
|
@@ -4624,18 +4624,18 @@ function $l() {
|
|
|
4624
4624
|
className: " ",
|
|
4625
4625
|
type: "single",
|
|
4626
4626
|
collapsible: !0,
|
|
4627
|
-
children:
|
|
4627
|
+
children: Bl(s)
|
|
4628
4628
|
}
|
|
4629
4629
|
),
|
|
4630
|
-
/* @__PURE__ */ e.jsx("section", { className: "", children: ["line", "bar"].includes(s) && /* @__PURE__ */ e.jsx(
|
|
4630
|
+
/* @__PURE__ */ e.jsx("section", { className: "", children: ["line", "bar"].includes(s) && /* @__PURE__ */ e.jsx(js, {}) }),
|
|
4631
4631
|
!["kpi"].includes(s) && /* @__PURE__ */ e.jsxs("div", { className: "space-y-4", children: [
|
|
4632
|
-
/* @__PURE__ */ e.jsx(
|
|
4633
|
-
/* @__PURE__ */ e.jsx(
|
|
4632
|
+
/* @__PURE__ */ e.jsx(Ks, {}),
|
|
4633
|
+
/* @__PURE__ */ e.jsx(De, {}),
|
|
4634
4634
|
/* @__PURE__ */ e.jsx(_e, {})
|
|
4635
4635
|
] })
|
|
4636
4636
|
] });
|
|
4637
4637
|
}
|
|
4638
|
-
function
|
|
4638
|
+
function Bl(s) {
|
|
4639
4639
|
if (["line", "bar"].includes(s))
|
|
4640
4640
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
4641
4641
|
/* @__PURE__ */ e.jsxs(G, { value: "item-1", children: [
|
|
@@ -4656,7 +4656,7 @@ function Pl(s) {
|
|
|
4656
4656
|
/* @__PURE__ */ e.jsx("b", { children: "Customize" }),
|
|
4657
4657
|
" and change the `type` property in the dataset."
|
|
4658
4658
|
] }),
|
|
4659
|
-
/* @__PURE__ */ e.jsx("pre", { children: JSON.stringify(
|
|
4659
|
+
/* @__PURE__ */ e.jsx("pre", { children: JSON.stringify(Hl, null, 2) })
|
|
4660
4660
|
] })
|
|
4661
4661
|
] }),
|
|
4662
4662
|
/* @__PURE__ */ e.jsxs(G, { value: "item-3", children: [
|
|
@@ -4677,7 +4677,7 @@ function Pl(s) {
|
|
|
4677
4677
|
),
|
|
4678
4678
|
"for more options."
|
|
4679
4679
|
] }),
|
|
4680
|
-
/* @__PURE__ */ e.jsx("pre", { children: JSON.stringify(
|
|
4680
|
+
/* @__PURE__ */ e.jsx("pre", { children: JSON.stringify($l, null, 2) })
|
|
4681
4681
|
] })
|
|
4682
4682
|
] })
|
|
4683
4683
|
] });
|
|
@@ -4732,7 +4732,7 @@ function Pl(s) {
|
|
|
4732
4732
|
] })
|
|
4733
4733
|
] }) });
|
|
4734
4734
|
}
|
|
4735
|
-
function
|
|
4735
|
+
function Ul() {
|
|
4736
4736
|
var c, u, m, y, b;
|
|
4737
4737
|
const s = o((h) => h.card.preferences), n = o(
|
|
4738
4738
|
(h) => h.actions.setCardPreferences
|
|
@@ -4792,7 +4792,7 @@ function Bl() {
|
|
|
4792
4792
|
/* @__PURE__ */ e.jsxs("div", { className: "w-full space-y-1", children: [
|
|
4793
4793
|
/* @__PURE__ */ e.jsx(_, { children: "Locale" }),
|
|
4794
4794
|
/* @__PURE__ */ e.jsxs(
|
|
4795
|
-
|
|
4795
|
+
fe,
|
|
4796
4796
|
{
|
|
4797
4797
|
value: t || "en-US",
|
|
4798
4798
|
onValueChange: (h) => {
|
|
@@ -4805,9 +4805,9 @@ function Bl() {
|
|
|
4805
4805
|
);
|
|
4806
4806
|
},
|
|
4807
4807
|
children: [
|
|
4808
|
-
/* @__PURE__ */ e.jsx(
|
|
4809
|
-
/* @__PURE__ */ e.jsx(
|
|
4810
|
-
/* @__PURE__ */ e.jsx(
|
|
4808
|
+
/* @__PURE__ */ e.jsx(ge, { className: "col-span-6 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(je, {}) }),
|
|
4809
|
+
/* @__PURE__ */ e.jsx(be, { children: /* @__PURE__ */ e.jsxs(ze, { children: [
|
|
4810
|
+
/* @__PURE__ */ e.jsx(ye, { children: "Format" }),
|
|
4811
4811
|
cs.map((h) => /* @__PURE__ */ e.jsx(W, { value: h.locale, children: h.locale }, h.locale))
|
|
4812
4812
|
] }) })
|
|
4813
4813
|
]
|
|
@@ -4817,7 +4817,7 @@ function Bl() {
|
|
|
4817
4817
|
/* @__PURE__ */ e.jsxs("div", { className: "w-full space-y-1", children: [
|
|
4818
4818
|
/* @__PURE__ */ e.jsx(_, { children: "Currency" }),
|
|
4819
4819
|
/* @__PURE__ */ e.jsxs(
|
|
4820
|
-
|
|
4820
|
+
fe,
|
|
4821
4821
|
{
|
|
4822
4822
|
value: l || "none",
|
|
4823
4823
|
onValueChange: (h) => {
|
|
@@ -4830,9 +4830,9 @@ function Bl() {
|
|
|
4830
4830
|
);
|
|
4831
4831
|
},
|
|
4832
4832
|
children: [
|
|
4833
|
-
/* @__PURE__ */ e.jsx(
|
|
4834
|
-
/* @__PURE__ */ e.jsx(
|
|
4835
|
-
/* @__PURE__ */ e.jsx(
|
|
4833
|
+
/* @__PURE__ */ e.jsx(ge, { className: "col-span-6 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(je, {}) }),
|
|
4834
|
+
/* @__PURE__ */ e.jsx(be, { children: /* @__PURE__ */ e.jsxs(ze, { children: [
|
|
4835
|
+
/* @__PURE__ */ e.jsx(ye, { children: "Currency" }),
|
|
4836
4836
|
/* @__PURE__ */ e.jsx(W, { value: "none", children: "None" }, "none"),
|
|
4837
4837
|
d.map((h) => /* @__PURE__ */ e.jsx(W, { value: h, children: h }, h))
|
|
4838
4838
|
] }) })
|
|
@@ -4845,7 +4845,7 @@ function Bl() {
|
|
|
4845
4845
|
/* @__PURE__ */ e.jsxs("div", { className: "w-full space-y-1", children: [
|
|
4846
4846
|
/* @__PURE__ */ e.jsx(_, { children: "Decimals" }),
|
|
4847
4847
|
/* @__PURE__ */ e.jsxs(
|
|
4848
|
-
|
|
4848
|
+
fe,
|
|
4849
4849
|
{
|
|
4850
4850
|
value: ((y = (m = s == null ? void 0 : s.formatNumber) == null ? void 0 : m.decimalPlaces) == null ? void 0 : y.toString()) || "0",
|
|
4851
4851
|
onValueChange: (h) => {
|
|
@@ -4858,8 +4858,8 @@ function Bl() {
|
|
|
4858
4858
|
);
|
|
4859
4859
|
},
|
|
4860
4860
|
children: [
|
|
4861
|
-
/* @__PURE__ */ e.jsx(
|
|
4862
|
-
/* @__PURE__ */ e.jsx(
|
|
4861
|
+
/* @__PURE__ */ e.jsx(ge, { className: "col-span-3 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(je, {}) }),
|
|
4862
|
+
/* @__PURE__ */ e.jsx(be, { children: ["0", "1", "2", "3", "4"].map((h) => /* @__PURE__ */ e.jsx(W, { value: h, children: h }, h)) })
|
|
4863
4863
|
]
|
|
4864
4864
|
}
|
|
4865
4865
|
)
|
|
@@ -4886,9 +4886,9 @@ function Bl() {
|
|
|
4886
4886
|
] })
|
|
4887
4887
|
] })
|
|
4888
4888
|
] }) }),
|
|
4889
|
-
/* @__PURE__ */ e.jsx(
|
|
4889
|
+
/* @__PURE__ */ e.jsx(ue, { className: "my-3" }),
|
|
4890
4890
|
/* @__PURE__ */ e.jsx(
|
|
4891
|
-
|
|
4891
|
+
fn,
|
|
4892
4892
|
{
|
|
4893
4893
|
colorRanges: i,
|
|
4894
4894
|
setColorRanges: r
|
|
@@ -4897,7 +4897,7 @@ function Bl() {
|
|
|
4897
4897
|
] })
|
|
4898
4898
|
] });
|
|
4899
4899
|
}
|
|
4900
|
-
function
|
|
4900
|
+
function Gl() {
|
|
4901
4901
|
return /* @__PURE__ */ e.jsxs("div", { className: "space-y-6 px-6 py-2", children: [
|
|
4902
4902
|
/* @__PURE__ */ e.jsx(Le, { type: "single", collapsible: !0, children: /* @__PURE__ */ e.jsxs(G, { value: "item-1", children: [
|
|
4903
4903
|
/* @__PURE__ */ e.jsx(K, { className: "", children: "KPI Query" }),
|
|
@@ -4923,12 +4923,12 @@ function Ul() {
|
|
|
4923
4923
|
] })
|
|
4924
4924
|
] })
|
|
4925
4925
|
] }) }),
|
|
4926
|
-
/* @__PURE__ */ e.jsx("section", { className: "", children: /* @__PURE__ */ e.jsx(
|
|
4926
|
+
/* @__PURE__ */ e.jsx("section", { className: "", children: /* @__PURE__ */ e.jsx(Ul, {}) }),
|
|
4927
4927
|
/* @__PURE__ */ e.jsx("div", {}),
|
|
4928
4928
|
/* @__PURE__ */ e.jsx("div", {})
|
|
4929
4929
|
] });
|
|
4930
4930
|
}
|
|
4931
|
-
const
|
|
4931
|
+
const Kl = [
|
|
4932
4932
|
{
|
|
4933
4933
|
label: "Mercator",
|
|
4934
4934
|
value: "mercator"
|
|
@@ -4985,7 +4985,7 @@ const Gl = [
|
|
|
4985
4985
|
label: "Natural Earth 1",
|
|
4986
4986
|
value: "naturalEarth1"
|
|
4987
4987
|
}
|
|
4988
|
-
],
|
|
4988
|
+
], Jl = [
|
|
4989
4989
|
"blues",
|
|
4990
4990
|
"brBG",
|
|
4991
4991
|
"buGn",
|
|
@@ -5024,15 +5024,15 @@ const Gl = [
|
|
|
5024
5024
|
"ylGnBu",
|
|
5025
5025
|
"ylOrBr",
|
|
5026
5026
|
"ylOrRd"
|
|
5027
|
-
],
|
|
5027
|
+
], Ql = Jl.map((s) => ({
|
|
5028
5028
|
label: s,
|
|
5029
5029
|
value: s
|
|
5030
5030
|
}));
|
|
5031
|
-
function
|
|
5031
|
+
function Wl() {
|
|
5032
5032
|
var c, u, m, y, b, h, p, v, I, C, w, z, S, L, x, k, j, f;
|
|
5033
5033
|
const s = o((F) => F.card), n = (u = (c = s == null ? void 0 : s.preferences) == null ? void 0 : c.mapVisualOptions) == null ? void 0 : u.topoJsonUrl, [a, t] = R(
|
|
5034
5034
|
((y = (m = s == null ? void 0 : s.preferences) == null ? void 0 : m.mapVisualOptions) == null ? void 0 : y.customTopoJsonUrl) || ""
|
|
5035
|
-
), { setCardPreferences: l } =
|
|
5035
|
+
), { setCardPreferences: l } = he(), { data: i } = $s(s), r = Object.keys((i == null ? void 0 : i.objects) || {}).map((F) => ({
|
|
5036
5036
|
label: F,
|
|
5037
5037
|
value: F
|
|
5038
5038
|
})) || [], d = [
|
|
@@ -5051,10 +5051,10 @@ function Ql() {
|
|
|
5051
5051
|
];
|
|
5052
5052
|
return /* @__PURE__ */ e.jsxs("div", { className: "p-6", children: [
|
|
5053
5053
|
/* @__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" }) }),
|
|
5054
|
-
/* @__PURE__ */ e.jsx(
|
|
5054
|
+
/* @__PURE__ */ e.jsx(ue, { className: "my-4" }),
|
|
5055
5055
|
/* @__PURE__ */ e.jsx(Ge, { open: !0, summary: "Settings", children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-3 px-2", children: [
|
|
5056
5056
|
/* @__PURE__ */ e.jsx(
|
|
5057
|
-
|
|
5057
|
+
pe,
|
|
5058
5058
|
{
|
|
5059
5059
|
className: "h-9",
|
|
5060
5060
|
options: d,
|
|
@@ -5096,7 +5096,7 @@ function Ql() {
|
|
|
5096
5096
|
/* @__PURE__ */ e.jsxs("div", { className: "space-y-1", children: [
|
|
5097
5097
|
/* @__PURE__ */ e.jsx(_, { children: "Map Object" }),
|
|
5098
5098
|
/* @__PURE__ */ e.jsx(
|
|
5099
|
-
|
|
5099
|
+
pe,
|
|
5100
5100
|
{
|
|
5101
5101
|
className: "h-9",
|
|
5102
5102
|
options: r,
|
|
@@ -5118,10 +5118,10 @@ function Ql() {
|
|
|
5118
5118
|
/* @__PURE__ */ e.jsxs("div", { className: "space-y-1", children: [
|
|
5119
5119
|
/* @__PURE__ */ e.jsx(_, { children: "Projection" }),
|
|
5120
5120
|
/* @__PURE__ */ e.jsx(
|
|
5121
|
-
|
|
5121
|
+
pe,
|
|
5122
5122
|
{
|
|
5123
5123
|
className: "h-9",
|
|
5124
|
-
options:
|
|
5124
|
+
options: Kl,
|
|
5125
5125
|
value: ((v = (p = s.preferences) == null ? void 0 : p.mapVisualOptions) == null ? void 0 : v.projection) || "",
|
|
5126
5126
|
label: "Projection",
|
|
5127
5127
|
onValueChange: (F) => {
|
|
@@ -5140,10 +5140,10 @@ function Ql() {
|
|
|
5140
5140
|
/* @__PURE__ */ e.jsxs("div", { className: "space-y-1", children: [
|
|
5141
5141
|
/* @__PURE__ */ e.jsx(_, { children: "Colors" }),
|
|
5142
5142
|
/* @__PURE__ */ e.jsx(
|
|
5143
|
-
|
|
5143
|
+
pe,
|
|
5144
5144
|
{
|
|
5145
5145
|
className: "h-9",
|
|
5146
|
-
options:
|
|
5146
|
+
options: Ql,
|
|
5147
5147
|
value: ((C = (I = s.preferences) == null ? void 0 : I.mapVisualOptions) == null ? void 0 : C.colorScale) || "",
|
|
5148
5148
|
label: "Select Color Scale",
|
|
5149
5149
|
onValueChange: (F) => {
|
|
@@ -5161,8 +5161,8 @@ function Ql() {
|
|
|
5161
5161
|
] })
|
|
5162
5162
|
] })
|
|
5163
5163
|
] }) }),
|
|
5164
|
-
/* @__PURE__ */ e.jsx(
|
|
5165
|
-
/* @__PURE__ */ e.jsx(Ge, { className: "
|
|
5164
|
+
/* @__PURE__ */ e.jsx(ue, { className: "my-4" }),
|
|
5165
|
+
/* @__PURE__ */ e.jsx(Ge, { className: "", summary: "Scale Options", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
5166
5166
|
/* @__PURE__ */ e.jsx(
|
|
5167
5167
|
ne,
|
|
5168
5168
|
{
|
|
@@ -5228,10 +5228,12 @@ function Ql() {
|
|
|
5228
5228
|
}
|
|
5229
5229
|
}
|
|
5230
5230
|
)
|
|
5231
|
-
] }) })
|
|
5231
|
+
] }) }),
|
|
5232
|
+
/* @__PURE__ */ e.jsx(ue, { className: "my-4" }),
|
|
5233
|
+
/* @__PURE__ */ e.jsx(De, {})
|
|
5232
5234
|
] });
|
|
5233
5235
|
}
|
|
5234
|
-
function
|
|
5236
|
+
function Yl() {
|
|
5235
5237
|
var t;
|
|
5236
5238
|
const s = o((l) => l.card.preferences), { setCardPreferences: n } = o((l) => l.actions);
|
|
5237
5239
|
function a(l) {
|
|
@@ -5244,7 +5246,7 @@ function Wl() {
|
|
|
5244
5246
|
});
|
|
5245
5247
|
}
|
|
5246
5248
|
return /* @__PURE__ */ e.jsxs(
|
|
5247
|
-
|
|
5249
|
+
gs,
|
|
5248
5250
|
{
|
|
5249
5251
|
value: (t = s == null ? void 0 : s.textVisualOptions) != null && t.isDynamicText ? "dynamic" : "static",
|
|
5250
5252
|
onValueChange: a,
|
|
@@ -5270,7 +5272,7 @@ function ls({
|
|
|
5270
5272
|
}) {
|
|
5271
5273
|
return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(Le, { defaultValue: ["item-2"], type: "multiple", children: [
|
|
5272
5274
|
/* @__PURE__ */ e.jsxs(G, { value: "item-1", children: [
|
|
5273
|
-
/* @__PURE__ */ e.jsx(K, { children: `${
|
|
5275
|
+
/* @__PURE__ */ e.jsx(K, { children: `${Ps(s)} ${a}` }),
|
|
5274
5276
|
/* @__PURE__ */ e.jsx(J, { children: n || /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
|
|
5275
5277
|
/* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT label, measure FROM table" }),
|
|
5276
5278
|
/* @__PURE__ */ e.jsxs("ul", { className: "ml-6 list-disc text-xs [&>li]:mt-2", children: [
|
|
@@ -5296,32 +5298,32 @@ function ls({
|
|
|
5296
5298
|
/* @__PURE__ */ e.jsxs(G, { value: "item-2", children: [
|
|
5297
5299
|
/* @__PURE__ */ e.jsx(K, { children: "Settings" }),
|
|
5298
5300
|
/* @__PURE__ */ e.jsxs(J, { className: "space-y-4 px-2", children: [
|
|
5299
|
-
s === "range" && /* @__PURE__ */ e.jsx(
|
|
5300
|
-
s !== "text" && /* @__PURE__ */ e.jsx(
|
|
5301
|
-
s === "text" && /* @__PURE__ */ e.jsx(
|
|
5301
|
+
s === "range" && /* @__PURE__ */ e.jsx(js, {}),
|
|
5302
|
+
s !== "text" && /* @__PURE__ */ e.jsx(Ks, {}),
|
|
5303
|
+
s === "text" && /* @__PURE__ */ e.jsx(Yl, {})
|
|
5302
5304
|
] })
|
|
5303
5305
|
] }),
|
|
5304
5306
|
!["range", "text"].includes(s) && /* @__PURE__ */ e.jsxs(G, { value: "item-3", children: [
|
|
5305
5307
|
/* @__PURE__ */ e.jsx(K, { children: "Filters" }),
|
|
5306
5308
|
/* @__PURE__ */ e.jsxs(J, { className: "space-y-4 px-2", children: [
|
|
5307
|
-
/* @__PURE__ */ e.jsx(
|
|
5309
|
+
/* @__PURE__ */ e.jsx(De, {}),
|
|
5308
5310
|
/* @__PURE__ */ e.jsx(_e, {})
|
|
5309
5311
|
] })
|
|
5310
5312
|
] })
|
|
5311
5313
|
] }) });
|
|
5312
5314
|
}
|
|
5313
|
-
function
|
|
5315
|
+
function Xl() {
|
|
5314
5316
|
const s = o(
|
|
5315
5317
|
(t) => {
|
|
5316
5318
|
var l, i;
|
|
5317
5319
|
return (i = (l = t == null ? void 0 : t.card) == null ? void 0 : l.preferences) == null ? void 0 : i.sortChart;
|
|
5318
5320
|
}
|
|
5319
|
-
), { setSortChart: n } =
|
|
5321
|
+
), { setSortChart: n } = he();
|
|
5320
5322
|
function a() {
|
|
5321
5323
|
return /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
5322
5324
|
/* @__PURE__ */ e.jsx(_, { children: "Sort" }),
|
|
5323
5325
|
/* @__PURE__ */ e.jsx(
|
|
5324
|
-
|
|
5326
|
+
pe,
|
|
5325
5327
|
{
|
|
5326
5328
|
className: "h-8",
|
|
5327
5329
|
label: "Sort Chart",
|
|
@@ -5376,21 +5378,21 @@ function Yl() {
|
|
|
5376
5378
|
/* @__PURE__ */ e.jsxs(G, { value: "item-2", children: [
|
|
5377
5379
|
/* @__PURE__ */ e.jsx(K, { children: "Settings" }),
|
|
5378
5380
|
/* @__PURE__ */ e.jsxs(J, { className: "space-y-4 px-2", children: [
|
|
5379
|
-
/* @__PURE__ */ e.jsx(
|
|
5381
|
+
/* @__PURE__ */ e.jsx(js, {}),
|
|
5380
5382
|
a(),
|
|
5381
|
-
/* @__PURE__ */ e.jsx(
|
|
5383
|
+
/* @__PURE__ */ e.jsx(st, {})
|
|
5382
5384
|
] })
|
|
5383
5385
|
] }),
|
|
5384
5386
|
/* @__PURE__ */ e.jsxs(G, { value: "item-3", children: [
|
|
5385
5387
|
/* @__PURE__ */ e.jsx(K, { children: "Filters" }),
|
|
5386
5388
|
/* @__PURE__ */ e.jsxs(J, { className: "space-y-4 px-2", children: [
|
|
5387
|
-
/* @__PURE__ */ e.jsx(
|
|
5389
|
+
/* @__PURE__ */ e.jsx(De, {}),
|
|
5388
5390
|
/* @__PURE__ */ e.jsx(_e, {})
|
|
5389
5391
|
] })
|
|
5390
5392
|
] })
|
|
5391
5393
|
] }) });
|
|
5392
5394
|
}
|
|
5393
|
-
function
|
|
5395
|
+
function Zl({}) {
|
|
5394
5396
|
const s = o((t) => {
|
|
5395
5397
|
var l;
|
|
5396
5398
|
return (l = t.card) == null ? void 0 : l.preferences;
|
|
@@ -5406,7 +5408,7 @@ function Xl({}) {
|
|
|
5406
5408
|
/* @__PURE__ */ e.jsx(Le, { defaultValue: ["item-3"], type: "multiple", children: /* @__PURE__ */ e.jsxs(G, { value: "item-3", children: [
|
|
5407
5409
|
/* @__PURE__ */ e.jsx(K, { children: "Filters" }),
|
|
5408
5410
|
/* @__PURE__ */ e.jsxs(J, { className: "space-y-4 px-2", children: [
|
|
5409
|
-
/* @__PURE__ */ e.jsx(
|
|
5411
|
+
/* @__PURE__ */ e.jsx(De, {}),
|
|
5410
5412
|
/* @__PURE__ */ e.jsx(_e, {})
|
|
5411
5413
|
] })
|
|
5412
5414
|
] }) }),
|
|
@@ -5423,7 +5425,7 @@ function Xl({}) {
|
|
|
5423
5425
|
] })
|
|
5424
5426
|
] });
|
|
5425
5427
|
}
|
|
5426
|
-
const
|
|
5428
|
+
const er = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
|
|
5427
5429
|
/* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT dimension, cohort, metric FROM table" }),
|
|
5428
5430
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
5429
5431
|
"See ",
|
|
@@ -5439,7 +5441,7 @@ const Zl = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-
|
|
|
5439
5441
|
),
|
|
5440
5442
|
" in the docs."
|
|
5441
5443
|
] })
|
|
5442
|
-
] }),
|
|
5444
|
+
] }), sr = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
|
|
5443
5445
|
/* @__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" }),
|
|
5444
5446
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
5445
5447
|
"See ",
|
|
@@ -5455,7 +5457,7 @@ const Zl = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-
|
|
|
5455
5457
|
),
|
|
5456
5458
|
" in the docs."
|
|
5457
5459
|
] })
|
|
5458
|
-
] }),
|
|
5460
|
+
] }), ar = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
|
|
5459
5461
|
/* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT text FROM table limit 1" }),
|
|
5460
5462
|
/* @__PURE__ */ e.jsxs("div", { children: [
|
|
5461
5463
|
"See ",
|
|
@@ -5472,22 +5474,22 @@ const Zl = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-
|
|
|
5472
5474
|
" in the docs."
|
|
5473
5475
|
] })
|
|
5474
5476
|
] });
|
|
5475
|
-
function
|
|
5477
|
+
function tr() {
|
|
5476
5478
|
const s = o((a) => a.card.type);
|
|
5477
5479
|
function n(a) {
|
|
5478
5480
|
switch (a) {
|
|
5479
5481
|
case "stackedBar":
|
|
5480
5482
|
case "stackedLine":
|
|
5481
|
-
return /* @__PURE__ */ e.jsx(
|
|
5483
|
+
return /* @__PURE__ */ e.jsx(Xl, {});
|
|
5482
5484
|
case "pyramid":
|
|
5483
|
-
return /* @__PURE__ */ e.jsx(ls, { docContent:
|
|
5485
|
+
return /* @__PURE__ */ e.jsx(ls, { docContent: er, cardType: a });
|
|
5484
5486
|
case "kpi":
|
|
5485
|
-
return /* @__PURE__ */ e.jsx(
|
|
5487
|
+
return /* @__PURE__ */ e.jsx(Gl, {});
|
|
5486
5488
|
case "line":
|
|
5487
5489
|
case "bar":
|
|
5488
|
-
return /* @__PURE__ */ e.jsx(
|
|
5490
|
+
return /* @__PURE__ */ e.jsx(Rl, { cardType: a });
|
|
5489
5491
|
case "range":
|
|
5490
|
-
return /* @__PURE__ */ e.jsx(ls, { docContent:
|
|
5492
|
+
return /* @__PURE__ */ e.jsx(ls, { docContent: sr, cardType: a });
|
|
5491
5493
|
case "pie":
|
|
5492
5494
|
case "doughnut":
|
|
5493
5495
|
case "polarArea":
|
|
@@ -5495,83 +5497,83 @@ function ar() {
|
|
|
5495
5497
|
return /* @__PURE__ */ e.jsx(ls, { cardType: a });
|
|
5496
5498
|
case "bubble":
|
|
5497
5499
|
case "scatter":
|
|
5498
|
-
return /* @__PURE__ */ e.jsx(
|
|
5500
|
+
return /* @__PURE__ */ e.jsx(_l, { cardType: a });
|
|
5499
5501
|
case "table":
|
|
5500
|
-
return /* @__PURE__ */ e.jsx(
|
|
5502
|
+
return /* @__PURE__ */ e.jsx(Zl, { cardType: a });
|
|
5501
5503
|
case "text":
|
|
5502
5504
|
return /* @__PURE__ */ e.jsx(
|
|
5503
5505
|
ls,
|
|
5504
5506
|
{
|
|
5505
|
-
docContent:
|
|
5507
|
+
docContent: ar,
|
|
5506
5508
|
cardType: a,
|
|
5507
5509
|
suffix: "Visual"
|
|
5508
5510
|
}
|
|
5509
5511
|
);
|
|
5510
5512
|
case "map":
|
|
5511
|
-
return /* @__PURE__ */ e.jsx(
|
|
5513
|
+
return /* @__PURE__ */ e.jsx(Wl, {});
|
|
5512
5514
|
case "custom":
|
|
5513
|
-
return /* @__PURE__ */ e.jsx(
|
|
5515
|
+
return /* @__PURE__ */ e.jsx(El, {});
|
|
5514
5516
|
default:
|
|
5515
|
-
return /* @__PURE__ */ e.jsx(
|
|
5517
|
+
return /* @__PURE__ */ e.jsx(Pl, {});
|
|
5516
5518
|
}
|
|
5517
5519
|
}
|
|
5518
|
-
return /* @__PURE__ */ e.jsx(
|
|
5520
|
+
return /* @__PURE__ */ e.jsx(Hs, { className: "h-full w-full text-sm", children: n(s) });
|
|
5519
5521
|
}
|
|
5520
|
-
function
|
|
5522
|
+
function nr() {
|
|
5521
5523
|
const s = o((n) => n.isShowingVisual);
|
|
5522
5524
|
return /* @__PURE__ */ e.jsxs(
|
|
5523
|
-
|
|
5525
|
+
Ns,
|
|
5524
5526
|
{
|
|
5525
5527
|
direction: "vertical",
|
|
5526
5528
|
className: "min-h-[250px] min-w-full max-w-lg",
|
|
5527
5529
|
children: [
|
|
5528
5530
|
/* @__PURE__ */ e.jsx(
|
|
5529
|
-
|
|
5531
|
+
qe,
|
|
5530
5532
|
{
|
|
5531
5533
|
role: "query-section",
|
|
5532
5534
|
className: "flex",
|
|
5533
5535
|
minSize: 20,
|
|
5534
5536
|
defaultSize: 40,
|
|
5535
|
-
children: /* @__PURE__ */ e.jsx(
|
|
5537
|
+
children: /* @__PURE__ */ e.jsx(Nl, {})
|
|
5536
5538
|
}
|
|
5537
5539
|
),
|
|
5538
|
-
/* @__PURE__ */ e.jsx(
|
|
5540
|
+
/* @__PURE__ */ e.jsx(Ss, { withHandle: !0, className: "border" }),
|
|
5539
5541
|
/* @__PURE__ */ e.jsx(
|
|
5540
|
-
|
|
5542
|
+
qe,
|
|
5541
5543
|
{
|
|
5542
5544
|
className: "pb-1",
|
|
5543
5545
|
role: "visual-section",
|
|
5544
5546
|
minSize: 0,
|
|
5545
5547
|
defaultSize: 60,
|
|
5546
|
-
children: s ? /* @__PURE__ */ e.jsxs(
|
|
5548
|
+
children: s ? /* @__PURE__ */ e.jsxs(Ns, { direction: "horizontal", children: [
|
|
5547
5549
|
/* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx(
|
|
5548
|
-
|
|
5550
|
+
qe,
|
|
5549
5551
|
{
|
|
5550
5552
|
className: "flex min-w-[275px]",
|
|
5551
5553
|
minSize: 20,
|
|
5552
5554
|
defaultSize: 25,
|
|
5553
5555
|
maxSize: 30,
|
|
5554
|
-
children: /* @__PURE__ */ e.jsx(
|
|
5556
|
+
children: /* @__PURE__ */ e.jsx(tr, {})
|
|
5555
5557
|
}
|
|
5556
5558
|
) }),
|
|
5557
|
-
/* @__PURE__ */ e.jsx(
|
|
5558
|
-
/* @__PURE__ */ e.jsx(
|
|
5559
|
-
] }) : /* @__PURE__ */ e.jsx(
|
|
5559
|
+
/* @__PURE__ */ e.jsx(Ss, { className: "border" }),
|
|
5560
|
+
/* @__PURE__ */ e.jsx(qe, { minSize: 40, defaultSize: 75, maxSize: 100, children: /* @__PURE__ */ e.jsx(ra, {}) })
|
|
5561
|
+
] }) : /* @__PURE__ */ e.jsx(ra, {})
|
|
5560
5562
|
}
|
|
5561
5563
|
)
|
|
5562
5564
|
]
|
|
5563
5565
|
}
|
|
5564
5566
|
);
|
|
5565
5567
|
}
|
|
5566
|
-
function
|
|
5568
|
+
function lr({ authToken: s, onSave: n, onClose: a }) {
|
|
5567
5569
|
T((r) => r.themeStyle);
|
|
5568
5570
|
const t = o((r) => r.actions.setOnSave), l = o((r) => r.actions.setOnClose), i = T((r) => r.actions.setAuthToken);
|
|
5569
5571
|
return Z(() => {
|
|
5570
5572
|
n && t(n), a && l(a);
|
|
5571
5573
|
}, [n, t, a, l]), Z(() => {
|
|
5572
5574
|
s && s.accessToken && i(s);
|
|
5573
|
-
}, [s, i]), /* @__PURE__ */ e.jsx(
|
|
5574
|
-
|
|
5575
|
+
}, [s, i]), /* @__PURE__ */ e.jsx(ms, { FallbackComponent: Fa, children: /* @__PURE__ */ e.jsxs(
|
|
5576
|
+
gn,
|
|
5575
5577
|
{
|
|
5576
5578
|
style: {
|
|
5577
5579
|
// borderRadius: currentStyle?.chart?.options?.borderRadius,
|
|
@@ -5580,13 +5582,13 @@ function nr({ authToken: s, onSave: n, onClose: a }) {
|
|
|
5580
5582
|
className: "rounded-none",
|
|
5581
5583
|
role: "editor-panel",
|
|
5582
5584
|
children: [
|
|
5583
|
-
/* @__PURE__ */ e.jsx(
|
|
5584
|
-
/* @__PURE__ */ e.jsx(
|
|
5585
|
+
/* @__PURE__ */ e.jsx(jn, { className: "rounded-none border-r-[1.5px]", children: /* @__PURE__ */ e.jsx(_a, {}) }),
|
|
5586
|
+
/* @__PURE__ */ e.jsx(bn, { children: /* @__PURE__ */ e.jsx(nr, {}) })
|
|
5585
5587
|
]
|
|
5586
5588
|
}
|
|
5587
5589
|
) });
|
|
5588
5590
|
}
|
|
5589
|
-
function
|
|
5591
|
+
function rr() {
|
|
5590
5592
|
T((r) => r.selectedCardId);
|
|
5591
5593
|
const s = T((r) => r.selectedSheetId), { setIsVisualEditing: n } = T((r) => r.actions), a = T((r) => r.isVisualEditing), t = T((r) => r.actions.updateFrame);
|
|
5592
5594
|
function l(r) {
|
|
@@ -5603,11 +5605,11 @@ function lr() {
|
|
|
5603
5605
|
block: a,
|
|
5604
5606
|
hidden: !a
|
|
5605
5607
|
}),
|
|
5606
|
-
children: /* @__PURE__ */ e.jsx(
|
|
5608
|
+
children: /* @__PURE__ */ e.jsx(lr, { onSave: l, onClose: i })
|
|
5607
5609
|
}
|
|
5608
5610
|
);
|
|
5609
5611
|
}
|
|
5610
|
-
function
|
|
5612
|
+
function ir() {
|
|
5611
5613
|
o((r) => r.selectedConnectionId), o((r) => r.selectedDatamodelId);
|
|
5612
5614
|
const s = o((r) => r.selectedDatabaseName);
|
|
5613
5615
|
o((r) => r.selectedSchemaName);
|
|
@@ -5615,10 +5617,10 @@ function rr() {
|
|
|
5615
5617
|
T((r) => r.actions.addFilter), T((r) => r.actions.removeFilter), T(
|
|
5616
5618
|
(r) => r.actions.removeFilterValue
|
|
5617
5619
|
);
|
|
5618
|
-
const { modelItems: t, columns: l } =
|
|
5620
|
+
const { modelItems: t, columns: l } = Re(), { assignFilter: i } = at();
|
|
5619
5621
|
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) => {
|
|
5620
5622
|
const d = a == null ? void 0 : a.find(
|
|
5621
|
-
(c) => c.column ===
|
|
5623
|
+
(c) => c.column === xe(r.column_name) && c.table === n && c.database === s
|
|
5622
5624
|
);
|
|
5623
5625
|
return /* @__PURE__ */ e.jsx(
|
|
5624
5626
|
"div",
|
|
@@ -5631,7 +5633,7 @@ function rr() {
|
|
|
5631
5633
|
}
|
|
5632
5634
|
),
|
|
5633
5635
|
children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
5634
|
-
/* @__PURE__ */ e.jsx(
|
|
5636
|
+
/* @__PURE__ */ e.jsx(Ra, { column: r }),
|
|
5635
5637
|
/* @__PURE__ */ e.jsx("span", { children: r.column_name })
|
|
5636
5638
|
] })
|
|
5637
5639
|
},
|
|
@@ -5639,7 +5641,7 @@ function rr() {
|
|
|
5639
5641
|
);
|
|
5640
5642
|
}) });
|
|
5641
5643
|
}
|
|
5642
|
-
function
|
|
5644
|
+
function or() {
|
|
5643
5645
|
T((n) => n.showFilters);
|
|
5644
5646
|
const s = T(
|
|
5645
5647
|
(n) => n.actions.setShowFilters
|
|
@@ -5658,12 +5660,12 @@ function ir() {
|
|
|
5658
5660
|
)
|
|
5659
5661
|
] }),
|
|
5660
5662
|
/* @__PURE__ */ e.jsx("div", { className: "flex grow", children: /* @__PURE__ */ e.jsx(
|
|
5661
|
-
|
|
5663
|
+
_a,
|
|
5662
5664
|
{
|
|
5663
5665
|
ColumnsComponent: () => (
|
|
5664
5666
|
// schemaName, tableName, columns
|
|
5665
5667
|
/* @__PURE__ */ e.jsx(
|
|
5666
|
-
|
|
5668
|
+
ir,
|
|
5667
5669
|
{}
|
|
5668
5670
|
)
|
|
5669
5671
|
)
|
|
@@ -5671,7 +5673,7 @@ function ir() {
|
|
|
5671
5673
|
) })
|
|
5672
5674
|
] });
|
|
5673
5675
|
}
|
|
5674
|
-
function
|
|
5676
|
+
function cr() {
|
|
5675
5677
|
const s = T((a) => a.showFilters), n = T((a) => a.isVisualEditing);
|
|
5676
5678
|
return /* @__PURE__ */ e.jsxs(
|
|
5677
5679
|
"div",
|
|
@@ -5682,13 +5684,13 @@ function or() {
|
|
|
5682
5684
|
flex: !n
|
|
5683
5685
|
}),
|
|
5684
5686
|
children: [
|
|
5685
|
-
/* @__PURE__ */ e.jsx(
|
|
5686
|
-
s && /* @__PURE__ */ e.jsx("div", { role: "filter-aside-container", className: "flex", children: /* @__PURE__ */ e.jsx(
|
|
5687
|
+
/* @__PURE__ */ e.jsx(yn, {}),
|
|
5688
|
+
s && /* @__PURE__ */ e.jsx("div", { role: "filter-aside-container", className: "flex", children: /* @__PURE__ */ e.jsx(or, {}) })
|
|
5687
5689
|
]
|
|
5688
5690
|
}
|
|
5689
5691
|
);
|
|
5690
5692
|
}
|
|
5691
|
-
function
|
|
5693
|
+
function dr() {
|
|
5692
5694
|
const s = T((t) => t.dashboard), n = T((t) => t.actions.setDashboard), a = T(
|
|
5693
5695
|
(t) => t.showDashboardJSON
|
|
5694
5696
|
);
|
|
@@ -5701,7 +5703,7 @@ function cr() {
|
|
|
5701
5703
|
hidden: !a
|
|
5702
5704
|
}),
|
|
5703
5705
|
children: /* @__PURE__ */ e.jsx(
|
|
5704
|
-
|
|
5706
|
+
vn,
|
|
5705
5707
|
{
|
|
5706
5708
|
onChange: (t) => {
|
|
5707
5709
|
if (t)
|
|
@@ -5732,65 +5734,65 @@ function cr() {
|
|
|
5732
5734
|
}
|
|
5733
5735
|
);
|
|
5734
5736
|
}
|
|
5735
|
-
function
|
|
5737
|
+
function xr({
|
|
5736
5738
|
showControls: s = !1,
|
|
5737
5739
|
showFooter: n = !0,
|
|
5738
5740
|
...a
|
|
5739
5741
|
}) {
|
|
5740
|
-
return /* @__PURE__ */ e.jsx(
|
|
5741
|
-
/* @__PURE__ */ e.jsx(
|
|
5742
|
-
/* @__PURE__ */ e.jsxs(
|
|
5743
|
-
/* @__PURE__ */ e.jsx(
|
|
5744
|
-
/* @__PURE__ */ e.jsxs(
|
|
5745
|
-
s && /* @__PURE__ */ e.jsx(
|
|
5746
|
-
/* @__PURE__ */ e.jsx(
|
|
5747
|
-
/* @__PURE__ */ e.jsx(
|
|
5742
|
+
return /* @__PURE__ */ e.jsx(ms, { FallbackComponent: Fa, children: /* @__PURE__ */ e.jsxs(Cn, { dashboardProps: a, children: [
|
|
5743
|
+
/* @__PURE__ */ e.jsx(Nn, {}),
|
|
5744
|
+
/* @__PURE__ */ e.jsxs(Sn, { children: [
|
|
5745
|
+
/* @__PURE__ */ e.jsx(dr, {}),
|
|
5746
|
+
/* @__PURE__ */ e.jsxs(wn, { ...a, children: [
|
|
5747
|
+
s && /* @__PURE__ */ e.jsx(ll, {}),
|
|
5748
|
+
/* @__PURE__ */ e.jsx(rr, {}),
|
|
5749
|
+
/* @__PURE__ */ e.jsx(cr, {})
|
|
5748
5750
|
] })
|
|
5749
5751
|
] })
|
|
5750
5752
|
] }) });
|
|
5751
5753
|
}
|
|
5752
5754
|
export {
|
|
5753
|
-
|
|
5754
|
-
|
|
5755
|
-
|
|
5756
|
-
|
|
5757
|
-
|
|
5758
|
-
|
|
5759
|
-
|
|
5760
|
-
|
|
5761
|
-
|
|
5762
|
-
|
|
5755
|
+
Qn as A,
|
|
5756
|
+
zn as B,
|
|
5757
|
+
On as C,
|
|
5758
|
+
xr as D,
|
|
5759
|
+
La as E,
|
|
5760
|
+
Yn as F,
|
|
5761
|
+
En as G,
|
|
5762
|
+
An as H,
|
|
5763
|
+
Gs as I,
|
|
5764
|
+
Da as K,
|
|
5763
5765
|
Ye as L,
|
|
5764
|
-
|
|
5765
|
-
|
|
5766
|
-
|
|
5766
|
+
Ea as M,
|
|
5767
|
+
Pn as N,
|
|
5768
|
+
Aa as P,
|
|
5767
5769
|
Pe as S,
|
|
5768
|
-
|
|
5769
|
-
|
|
5770
|
-
|
|
5771
|
-
|
|
5772
|
-
|
|
5773
|
-
|
|
5774
|
-
|
|
5775
|
-
|
|
5776
|
-
|
|
5777
|
-
|
|
5778
|
-
|
|
5779
|
-
|
|
5780
|
-
|
|
5781
|
-
|
|
5782
|
-
|
|
5783
|
-
|
|
5784
|
-
|
|
5785
|
-
|
|
5786
|
-
|
|
5787
|
-
|
|
5788
|
-
|
|
5789
|
-
|
|
5790
|
-
|
|
5791
|
-
|
|
5792
|
-
|
|
5793
|
-
|
|
5794
|
-
|
|
5795
|
-
|
|
5770
|
+
Wn as T,
|
|
5771
|
+
Xn as U,
|
|
5772
|
+
Bs as a,
|
|
5773
|
+
Us as b,
|
|
5774
|
+
Zn as c,
|
|
5775
|
+
Ia as d,
|
|
5776
|
+
Ta as e,
|
|
5777
|
+
Ma as f,
|
|
5778
|
+
qa as g,
|
|
5779
|
+
Fn as h,
|
|
5780
|
+
In as i,
|
|
5781
|
+
Tn as j,
|
|
5782
|
+
Mn as k,
|
|
5783
|
+
Dn as l,
|
|
5784
|
+
Ln as m,
|
|
5785
|
+
Vn as n,
|
|
5786
|
+
qn as o,
|
|
5787
|
+
Rn as p,
|
|
5788
|
+
_n as q,
|
|
5789
|
+
Hn as r,
|
|
5790
|
+
$n as s,
|
|
5791
|
+
Bn as t,
|
|
5792
|
+
Re as u,
|
|
5793
|
+
Un as v,
|
|
5794
|
+
Gn as w,
|
|
5795
|
+
Va as x,
|
|
5796
|
+
Kn as y,
|
|
5797
|
+
Jn as z
|
|
5796
5798
|
};
|