react-semaphor 0.0.314 → 0.0.315
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{index-Dmus-D6V.js → index-BeiJEe0p.js} +2 -2
- package/dist/chunks/{index-D_-dUS3l.js → index-CQr4rRQo.js} +40 -40
- package/dist/chunks/{index-ferxOK5X.js → index-CeBN3gPY.js} +3038 -3019
- package/dist/chunks/{index-DpHx4EnC.js → index-x7NTgf-0.js} +123 -122
- package/dist/chunks/{lucide-react-CG3dBfrI.js → lucide-react-B9GnH8Nu.js} +3 -3
- package/dist/chunks/{lucide-react-GtfGOQ42.js → lucide-react-r40q1Zfi.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 +2 -2
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as V, p as Os, u as z, n as zs, o as Ie, q as e, r as Fs, s as Is, t as O, j as Ts, v as
|
|
1
|
+
import { c as V, p as Os, u as z, n as zs, o as Ie, q as e, r as Fs, s as Is, t as O, j as Ts, v as Ds, w as Ms, x as Ls, y as Es, L as R, z as le, A as la, E as ra, H as ia, J as oa, K as st, M as at, N as tt, O as Js, Q as W, R as Ge, V as m, W as nt, F as ca, Y as Qe, Z as Je, _ as da, $ as lt, a0 as ua, a1 as he, a2 as xe, a3 as pe, a4 as fe, a5 as Se, a6 as ge, a7 as J, T as As, a8 as Vs, a9 as qs, aa as Rs, ab as ma, ac as ha, ad as ue, ae as rt, af as it, ag as xa, ah as ot, C as ct, ai as dt, aj as pa, B as ut, ak as We, al as mt, am as Ks, an as fa, ao as ys, ap as Ne, aq as ze, ar as oe, as as ga, at as ht, au as xt, av as pt, aw as ft, I as gt, ax as jt, ay as bt, az as yt, aA as Ve, aB as vs, aC as vt, a as Ct, aD as Be, aE as Cs, aF as Ae, aG as Ns, aH as Nt, aI as St, aJ as wt, aK as kt, aL as Ot, aM as zt, aN as bs, aO as Ft, aP as Ws, aQ as It, aR as Ys, aS as Tt, aT as Dt, aU as Mt, aV as Lt, aW as ja, aX as re, aY as _s, aZ as ba, a_ as Et, a$ as At, b0 as ls, b1 as Vt, b2 as qt, b3 as Rt, b4 as _t, b5 as Ht, b6 as $t, b7 as Pt, l as Bt, b8 as us, b9 as ya, ba as va, bb as Ca, bc as rs, bd as Na, be as is, bf as Xs, bg as Ut, bh as Gt, bi as ms, bj as hs, bk as xs, bl as Qt, X as Sa, bm as Jt, bn as Kt, bo as Wt, bp as ps, bq as Fe, f as Yt, br as Pe, bs as Hs, bt as wa, bu as Xt, bv as Zt, bw as os, bx as en, by as sn, bz as an, bA as Zs, bB as tn, bC as nn, bD as ln, bE as rn, bF as on, bG as cn, bH as dn, bI as un, bJ as Te, bK as B, bL as U, bM as $s, bN as G, bO as mn, bP as ka, bQ as hn, bR as xn, bS as pn, bT as fn, bU as gn, bV as jn, bW as bn, bX as yn, bY as vn } from "./index-CeBN3gPY.js";
|
|
2
2
|
import * as ea from "react";
|
|
3
3
|
import we, { useState as q, useMemo as Ss, useEffect as Z, useRef as ws, Suspense as Cn } from "react";
|
|
4
4
|
import "react-dom";
|
|
@@ -208,7 +208,7 @@ const Tn = V("Glasses", [
|
|
|
208
208
|
* This source code is licensed under the ISC license.
|
|
209
209
|
* See the LICENSE file in the root directory of this source tree.
|
|
210
210
|
*/
|
|
211
|
-
const
|
|
211
|
+
const Dn = 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 Mn = 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 Mn = 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" }],
|
|
@@ -356,7 +356,7 @@ const _n = V("Network", [
|
|
|
356
356
|
* This source code is licensed under the ISC license.
|
|
357
357
|
* See the LICENSE file in the root directory of this source tree.
|
|
358
358
|
*/
|
|
359
|
-
const
|
|
359
|
+
const Da = V("Pencil", [
|
|
360
360
|
[
|
|
361
361
|
"path",
|
|
362
362
|
{
|
|
@@ -411,7 +411,7 @@ const Pn = V("Save", [
|
|
|
411
411
|
* This source code is licensed under the ISC license.
|
|
412
412
|
* See the LICENSE file in the root directory of this source tree.
|
|
413
413
|
*/
|
|
414
|
-
const
|
|
414
|
+
const Ma = V("Shapes", [
|
|
415
415
|
[
|
|
416
416
|
"path",
|
|
417
417
|
{
|
|
@@ -629,8 +629,8 @@ function el() {
|
|
|
629
629
|
]
|
|
630
630
|
}
|
|
631
631
|
) }),
|
|
632
|
-
/* @__PURE__ */ e.jsxs(
|
|
633
|
-
/* @__PURE__ */ e.jsxs(
|
|
632
|
+
/* @__PURE__ */ e.jsxs(Ds, { className: "sm:max-w-[425px]", children: [
|
|
633
|
+
/* @__PURE__ */ e.jsxs(Ms, { children: [
|
|
634
634
|
/* @__PURE__ */ e.jsx(Ls, { children: "Create Lens" }),
|
|
635
635
|
/* @__PURE__ */ e.jsx(Es, { children: "Lenses are private by default and are only visible to you." })
|
|
636
636
|
] }),
|
|
@@ -769,10 +769,10 @@ function al() {
|
|
|
769
769
|
(f) => f.actions.setShowFilters
|
|
770
770
|
), { addFrame: j, setSelectedFrameId: b } = z(
|
|
771
771
|
(f) => f.actions
|
|
772
|
-
), { getSelectedSheet: I, setIsDashboardEditing: C, setShowDashboardJSON:
|
|
772
|
+
), { getSelectedSheet: I, setIsDashboardEditing: C, setShowDashboardJSON: D } = z((f) => f.actions), F = I(), { tenantId: A, endUserId: N } = Ss(
|
|
773
773
|
() => nt(s == null ? void 0 : s.accessToken),
|
|
774
774
|
[s == null ? void 0 : s.accessToken]
|
|
775
|
-
), S = Ss(() => A || N, [A, N]),
|
|
775
|
+
), S = Ss(() => A || N, [A, N]), M = () => {
|
|
776
776
|
if (!o || !F) return;
|
|
777
777
|
const f = {
|
|
778
778
|
connectionId: i,
|
|
@@ -827,7 +827,7 @@ function al() {
|
|
|
827
827
|
className: "h-7 p-2",
|
|
828
828
|
size: "sm",
|
|
829
829
|
disabled: !o,
|
|
830
|
-
onClick:
|
|
830
|
+
onClick: M,
|
|
831
831
|
children: [
|
|
832
832
|
/* @__PURE__ */ e.jsx(Ts, { className: "mr-2 h-4 w-4", strokeWidth: 1.5 }),
|
|
833
833
|
"Frame"
|
|
@@ -841,7 +841,7 @@ function al() {
|
|
|
841
841
|
className: "h-7 p-2",
|
|
842
842
|
onClick: h,
|
|
843
843
|
size: "sm",
|
|
844
|
-
children: /* @__PURE__ */ e.jsx(
|
|
844
|
+
children: /* @__PURE__ */ e.jsx(Da, { className: "h-4 w-4", strokeWidth: 1.5 })
|
|
845
845
|
}
|
|
846
846
|
),
|
|
847
847
|
o && !u && /* @__PURE__ */ e.jsx(
|
|
@@ -851,7 +851,7 @@ function al() {
|
|
|
851
851
|
role: "close",
|
|
852
852
|
className: "h-7 p-2",
|
|
853
853
|
onClick: () => {
|
|
854
|
-
C(!1),
|
|
854
|
+
C(!1), D(!1);
|
|
855
855
|
},
|
|
856
856
|
size: "sm",
|
|
857
857
|
children: /* @__PURE__ */ e.jsx(Ge, { className: "h-4 w-4", strokeWidth: 1.5 })
|
|
@@ -950,10 +950,10 @@ function tl({ column: s }) {
|
|
|
950
950
|
(x) => x.selectedDatamodelId
|
|
951
951
|
), i = m((x) => x.sqlGen), { modelItems: c } = qe(), d = m((x) => x.actions.setSqlGen), p = m((x) => x.actions.setCardSql), u = m((x) => x.actions.setRunSql);
|
|
952
952
|
function y(x, j) {
|
|
953
|
-
var
|
|
954
|
-
const b = ma(x, i, j), I = (
|
|
953
|
+
var D;
|
|
954
|
+
const b = ma(x, i, j), I = (D = c == null ? void 0 : c.find(
|
|
955
955
|
(F) => F.id === o
|
|
956
|
-
)) == null ? void 0 :
|
|
956
|
+
)) == null ? void 0 : D.name;
|
|
957
957
|
d(b);
|
|
958
958
|
const C = ha(
|
|
959
959
|
b,
|
|
@@ -1026,7 +1026,7 @@ function Ea({ column: s }) {
|
|
|
1026
1026
|
/* @__PURE__ */ e.jsx(Us, { className: "size-3" })
|
|
1027
1027
|
) : xa.includes(s.data_type.toLowerCase()) ? (
|
|
1028
1028
|
//
|
|
1029
|
-
/* @__PURE__ */ e.jsx(
|
|
1029
|
+
/* @__PURE__ */ e.jsx(Mn, { className: "size-3" })
|
|
1030
1030
|
) : ot.includes(s.data_type.toLowerCase()) ? /* @__PURE__ */ e.jsx(ct, { className: "size-3" }) : dt.includes(s.data_type.toLowerCase()) ? /* @__PURE__ */ e.jsx(Jn, { className: "size-3" }) : /* @__PURE__ */ e.jsx(Bn, { className: "size-3" }) }),
|
|
1031
1031
|
/* @__PURE__ */ e.jsx(ua, { children: /* @__PURE__ */ e.jsx("p", { className: "font-mono text-xs", children: s.data_type }) })
|
|
1032
1032
|
] });
|
|
@@ -1050,7 +1050,7 @@ function nl({
|
|
|
1050
1050
|
), { setAIScopeTables: y } = z((h) => h.actions), g = m((h) => h.actions.setRunSql), x = m((h) => h.actions.setSqlGen), j = m(
|
|
1051
1051
|
(h) => h.actions.setIsShowingVisual
|
|
1052
1052
|
), b = m((h) => h.actions.setCardSql), { connectionType: I, modelItems: C } = qe();
|
|
1053
|
-
function
|
|
1053
|
+
function D(h) {
|
|
1054
1054
|
var L;
|
|
1055
1055
|
const v = ma(h, l);
|
|
1056
1056
|
x(v);
|
|
@@ -1109,7 +1109,7 @@ function nl({
|
|
|
1109
1109
|
const v = I === "MSSQL" ? `SELECT top 10 * FROM ${h}` : `SELECT * FROM ${h} LIMIT 10`;
|
|
1110
1110
|
b(v), g(!0);
|
|
1111
1111
|
}
|
|
1112
|
-
function
|
|
1112
|
+
function M() {
|
|
1113
1113
|
const h = N();
|
|
1114
1114
|
b(`SELECT COUNT(*) as count FROM ${h}`), g(!0);
|
|
1115
1115
|
}
|
|
@@ -1152,7 +1152,7 @@ function nl({
|
|
|
1152
1152
|
O,
|
|
1153
1153
|
{
|
|
1154
1154
|
disabled: n !== "Success",
|
|
1155
|
-
onClick:
|
|
1155
|
+
onClick: M,
|
|
1156
1156
|
size: "sm",
|
|
1157
1157
|
variant: "secondary",
|
|
1158
1158
|
className: "flex",
|
|
@@ -1171,7 +1171,7 @@ function nl({
|
|
|
1171
1171
|
a == null ? void 0 : a.map((h) => /* @__PURE__ */ e.jsxs(
|
|
1172
1172
|
"div",
|
|
1173
1173
|
{
|
|
1174
|
-
onClick: () =>
|
|
1174
|
+
onClick: () => D(h),
|
|
1175
1175
|
className: W(
|
|
1176
1176
|
"group mx-3 flex cursor-pointer items-center justify-between rounded px-2 py-[6px] text-sm transition-colors hover:bg-muted/50",
|
|
1177
1177
|
{
|
|
@@ -1232,7 +1232,7 @@ function qe(s, t) {
|
|
|
1232
1232
|
function C(r) {
|
|
1233
1233
|
return !!(l && i && i !== "NA" && c && d || l && (r === "S3" || r === "API") || o && o);
|
|
1234
1234
|
}
|
|
1235
|
-
function
|
|
1235
|
+
function D(r) {
|
|
1236
1236
|
return l && r ? !(r === "API" || r === "S3") : !1;
|
|
1237
1237
|
}
|
|
1238
1238
|
const {
|
|
@@ -1249,7 +1249,7 @@ function qe(s, t) {
|
|
|
1249
1249
|
// Only fetch if authToken is present
|
|
1250
1250
|
}), {
|
|
1251
1251
|
data: S,
|
|
1252
|
-
isLoading:
|
|
1252
|
+
isLoading: M,
|
|
1253
1253
|
isError: h
|
|
1254
1254
|
} = Ne({
|
|
1255
1255
|
queryKey: ["models", l],
|
|
@@ -1279,7 +1279,7 @@ function qe(s, t) {
|
|
|
1279
1279
|
connection_id: l
|
|
1280
1280
|
}
|
|
1281
1281
|
),
|
|
1282
|
-
enabled:
|
|
1282
|
+
enabled: D(f)
|
|
1283
1283
|
// !!selectedConnectionId && !isNonDbConnection, //currentConnection?.type !== 'API', // Only fetch if connectionId is present
|
|
1284
1284
|
}), {
|
|
1285
1285
|
data: K,
|
|
@@ -1324,7 +1324,7 @@ function qe(s, t) {
|
|
|
1324
1324
|
enabled: I(f)
|
|
1325
1325
|
}), {
|
|
1326
1326
|
data: te,
|
|
1327
|
-
isLoading:
|
|
1327
|
+
isLoading: Me,
|
|
1328
1328
|
isFetching: ke,
|
|
1329
1329
|
isError: be
|
|
1330
1330
|
} = Ne({
|
|
@@ -1409,7 +1409,7 @@ function qe(s, t) {
|
|
|
1409
1409
|
isConnectionsLoading: A,
|
|
1410
1410
|
isConnectionsError: N,
|
|
1411
1411
|
modelItems: He,
|
|
1412
|
-
isModelsLoading:
|
|
1412
|
+
isModelsLoading: M,
|
|
1413
1413
|
isModelsError: h,
|
|
1414
1414
|
databaseItems: Ee,
|
|
1415
1415
|
isDatabasesLoadingOrFetching: H || P,
|
|
@@ -1421,7 +1421,7 @@ function qe(s, t) {
|
|
|
1421
1421
|
isTableLoadingOrFetching: T || se,
|
|
1422
1422
|
isTableError: $,
|
|
1423
1423
|
columns: a,
|
|
1424
|
-
isColumnsLoadingOrFetching:
|
|
1424
|
+
isColumnsLoadingOrFetching: Me || ke,
|
|
1425
1425
|
isColumnsError: be,
|
|
1426
1426
|
isNonDbConnection: k,
|
|
1427
1427
|
connectionType: f,
|
|
@@ -1459,12 +1459,12 @@ function Aa({
|
|
|
1459
1459
|
isConnectionsError: b,
|
|
1460
1460
|
isModelsError: I,
|
|
1461
1461
|
isDatabasesLoadingOrFetching: C,
|
|
1462
|
-
isDatabaseError:
|
|
1462
|
+
isDatabaseError: D,
|
|
1463
1463
|
isSchemaLoadingOrFetching: F,
|
|
1464
1464
|
isSchemaError: A,
|
|
1465
1465
|
isColumnsError: N,
|
|
1466
1466
|
isColumnsLoadingOrFetching: S,
|
|
1467
|
-
isTableLoadingOrFetching:
|
|
1467
|
+
isTableLoadingOrFetching: M,
|
|
1468
1468
|
isTableError: h,
|
|
1469
1469
|
connectionType: v,
|
|
1470
1470
|
isNonDbConnection: f,
|
|
@@ -1497,7 +1497,7 @@ function Aa({
|
|
|
1497
1497
|
{
|
|
1498
1498
|
showNone: !0,
|
|
1499
1499
|
onChange: L,
|
|
1500
|
-
isError:
|
|
1500
|
+
isError: D,
|
|
1501
1501
|
isLoading: C,
|
|
1502
1502
|
items: u,
|
|
1503
1503
|
value: n || "",
|
|
@@ -1553,7 +1553,7 @@ function Aa({
|
|
|
1553
1553
|
onChange: i,
|
|
1554
1554
|
isError: h,
|
|
1555
1555
|
items: y,
|
|
1556
|
-
isLoading:
|
|
1556
|
+
isLoading: M,
|
|
1557
1557
|
value: o || "",
|
|
1558
1558
|
title: "Table"
|
|
1559
1559
|
}
|
|
@@ -1637,7 +1637,7 @@ function rl({
|
|
|
1637
1637
|
size: "sm",
|
|
1638
1638
|
variant: "outline",
|
|
1639
1639
|
children: [
|
|
1640
|
-
/* @__PURE__ */ e.jsx(
|
|
1640
|
+
/* @__PURE__ */ e.jsx(Dn, { className: "mr-2 h-4 w-4" }),
|
|
1641
1641
|
"Debug with AI"
|
|
1642
1642
|
]
|
|
1643
1643
|
}
|
|
@@ -1702,15 +1702,15 @@ function ol({
|
|
|
1702
1702
|
triggerAIRun: l,
|
|
1703
1703
|
setTriggerAIRun: o
|
|
1704
1704
|
}) {
|
|
1705
|
-
const i = ws(null), c = ws(null), { authToken: d } = Ie(), [p, u] = q(!1), y = m((w) => w.actions.setCardSql), g = z((w) => w.dashboard.baseQueries), x = m((w) => w.actions.setRunSql), j = m((w) => w.actions.setCardType), [b, I] = q([]), C = m((w) => w.currentColumns),
|
|
1705
|
+
const i = ws(null), c = ws(null), { authToken: d } = Ie(), [p, u] = q(!1), y = m((w) => w.actions.setCardSql), g = z((w) => w.dashboard.baseQueries), x = m((w) => w.actions.setRunSql), j = m((w) => w.actions.setCardType), [b, I] = q([]), C = m((w) => w.currentColumns), D = m((w) => w.card.sql), F = m((w) => w.selectedTableName), A = `
|
|
1706
1706
|
${a}
|
|
1707
1707
|
|
|
1708
1708
|
Database Query Dialect: ${F === "api" || F === "s3" ? "DuckDb" : ""}
|
|
1709
1709
|
Table Name: ${F}
|
|
1710
1710
|
Table Columns: ${C == null ? void 0 : C.map((w) => `${w.column_name} | ${w.data_type}`).join(", ")}
|
|
1711
|
-
User SQL: ${
|
|
1711
|
+
User SQL: ${D}
|
|
1712
1712
|
${g && `Base Queries: ${JSON.stringify(g)} `}`, N = ` When the user asks for a specific chart please use the following query structure to generate the chart query. Do not make up the column names. Use only the table columns provided above for the query. Replace x-axis, y-axis, and lables with the appropriate column names.
|
|
1713
|
-
Visual Query Syntax: ${il}`, { data: S, isLoading:
|
|
1713
|
+
Visual Query Syntax: ${il}`, { data: S, isLoading: M, isFetching: h, isError: v, refetch: f } = Ne({
|
|
1714
1714
|
queryKey: ["ai-query"],
|
|
1715
1715
|
queryFn: () => ze(
|
|
1716
1716
|
"https://semaphor.cloud/api/v1/ai",
|
|
@@ -1849,11 +1849,11 @@ function ol({
|
|
|
1849
1849
|
}
|
|
1850
1850
|
) }),
|
|
1851
1851
|
/* @__PURE__ */ e.jsxs(
|
|
1852
|
-
|
|
1852
|
+
Ds,
|
|
1853
1853
|
{
|
|
1854
1854
|
className: "flex flex-col justify-between overflow-auto sm:max-w-[425px] md:max-h-[625px] md:min-w-[625px]",
|
|
1855
1855
|
children: [
|
|
1856
|
-
/* @__PURE__ */ e.jsxs(
|
|
1856
|
+
/* @__PURE__ */ e.jsxs(Ms, { children: [
|
|
1857
1857
|
/* @__PURE__ */ e.jsx(Ls, { children: "Assistant" }),
|
|
1858
1858
|
/* @__PURE__ */ e.jsx(Es, { children: "What can I help you with?" })
|
|
1859
1859
|
] }),
|
|
@@ -1885,7 +1885,7 @@ function ol({
|
|
|
1885
1885
|
className: W(
|
|
1886
1886
|
"max-h-10 min-h-7 resize-none border-none focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0"
|
|
1887
1887
|
),
|
|
1888
|
-
disabled:
|
|
1888
|
+
disabled: M || h,
|
|
1889
1889
|
value: a,
|
|
1890
1890
|
onChange: (w) => n(w.target.value)
|
|
1891
1891
|
}
|
|
@@ -1898,7 +1898,7 @@ function ol({
|
|
|
1898
1898
|
size: "sm",
|
|
1899
1899
|
variant: "ghost",
|
|
1900
1900
|
onClick: L,
|
|
1901
|
-
children: !
|
|
1901
|
+
children: !M && !h ? /* @__PURE__ */ e.jsx(ht, {}) : /* @__PURE__ */ e.jsx(Ke, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" })
|
|
1902
1902
|
}
|
|
1903
1903
|
)
|
|
1904
1904
|
] })
|
|
@@ -2035,7 +2035,7 @@ function jl() {
|
|
|
2035
2035
|
queryData: null
|
|
2036
2036
|
}), { theme: a } = jt(), n = bt(), l = ws(), o = yt(), [i, c] = q(!1), [d, p] = q(!1), [u, y] = q(!1), [g, x] = q(""), [j, b] = q(!1), I = z((r) => r.selectedSheetId);
|
|
2037
2037
|
z((r) => r.dashboard.baseQueries);
|
|
2038
|
-
const C = m((r) => r.card),
|
|
2038
|
+
const C = m((r) => r.card), D = z((r) => r.theme), F = m((r) => r.isShowingVisual);
|
|
2039
2039
|
z((r) => r.onAcceptChanges);
|
|
2040
2040
|
const A = m(
|
|
2041
2041
|
(r) => r.selectedConnectionId
|
|
@@ -2043,7 +2043,7 @@ function jl() {
|
|
|
2043
2043
|
(r) => r.selectedDatabaseName
|
|
2044
2044
|
), S = m(
|
|
2045
2045
|
(r) => r.selectedDatamodelId
|
|
2046
|
-
),
|
|
2046
|
+
), M = m(
|
|
2047
2047
|
(r) => r.selectedSchemaName
|
|
2048
2048
|
);
|
|
2049
2049
|
z(
|
|
@@ -2067,7 +2067,7 @@ function jl() {
|
|
|
2067
2067
|
m(
|
|
2068
2068
|
(r) => r.actions.setApplyFilters
|
|
2069
2069
|
);
|
|
2070
|
-
const te = m((r) => r.onClose),
|
|
2070
|
+
const te = m((r) => r.onClose), Me = m((r) => r.actions.setSqlGen), ke = m((r) => r.runSql), be = m((r) => r.actions.setRunSql);
|
|
2071
2071
|
m((r) => r.actions.setCardCfg);
|
|
2072
2072
|
const ye = m(
|
|
2073
2073
|
(r) => r.actions.setIsSqlRunning
|
|
@@ -2115,7 +2115,7 @@ function jl() {
|
|
|
2115
2115
|
s.queryData || t({
|
|
2116
2116
|
queryKey: He,
|
|
2117
2117
|
queryData: r
|
|
2118
|
-
}), n.setQueryData(He, null), _(""),
|
|
2118
|
+
}), n.setQueryData(He, null), _(""), Me({}), K(""), $({});
|
|
2119
2119
|
}
|
|
2120
2120
|
const Ye = (r) => {
|
|
2121
2121
|
l.current = r;
|
|
@@ -2145,7 +2145,7 @@ function jl() {
|
|
|
2145
2145
|
v && !v.includes("{{") && (r = ll(v), _(r));
|
|
2146
2146
|
const ne = {
|
|
2147
2147
|
...C,
|
|
2148
|
-
lastSelectedSchema:
|
|
2148
|
+
lastSelectedSchema: M,
|
|
2149
2149
|
lastSelectedDatamodelId: S,
|
|
2150
2150
|
lastSelectedDatabase: N,
|
|
2151
2151
|
lastSelectedTable: h,
|
|
@@ -2168,7 +2168,7 @@ function jl() {
|
|
|
2168
2168
|
}
|
|
2169
2169
|
Z(() => {
|
|
2170
2170
|
if (!o) return;
|
|
2171
|
-
const r = l.current, ne = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light", ve =
|
|
2171
|
+
const r = l.current, ne = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light", ve = D === "system" ? ne : D;
|
|
2172
2172
|
return o.editor.defineTheme("default", {
|
|
2173
2173
|
// base: theme === 'light' ? 'hc-light' : 'vs-dark',
|
|
2174
2174
|
base: ve === "light" ? "vs" : "vs-dark",
|
|
@@ -2188,7 +2188,7 @@ function jl() {
|
|
|
2188
2188
|
}
|
|
2189
2189
|
), () => {
|
|
2190
2190
|
};
|
|
2191
|
-
}, [a,
|
|
2191
|
+
}, [a, D, o]);
|
|
2192
2192
|
function ss() {
|
|
2193
2193
|
return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
|
|
2194
2194
|
d && /* @__PURE__ */ e.jsx(
|
|
@@ -2237,7 +2237,7 @@ function jl() {
|
|
|
2237
2237
|
renderLineHighlight: "none"
|
|
2238
2238
|
}
|
|
2239
2239
|
},
|
|
2240
|
-
|
|
2240
|
+
D
|
|
2241
2241
|
)
|
|
2242
2242
|
] })
|
|
2243
2243
|
}
|
|
@@ -2506,9 +2506,9 @@ function bl({ data: s }) {
|
|
|
2506
2506
|
data: s,
|
|
2507
2507
|
columns: l,
|
|
2508
2508
|
getCoreRowModel: Tt(),
|
|
2509
|
-
getPaginationRowModel:
|
|
2509
|
+
getPaginationRowModel: Dt(),
|
|
2510
2510
|
onSortingChange: a,
|
|
2511
|
-
getSortedRowModel:
|
|
2511
|
+
getSortedRowModel: Mt(),
|
|
2512
2512
|
manualPagination: !0,
|
|
2513
2513
|
state: {
|
|
2514
2514
|
sorting: t
|
|
@@ -2531,7 +2531,7 @@ function bl({ data: s }) {
|
|
|
2531
2531
|
] });
|
|
2532
2532
|
}
|
|
2533
2533
|
function yl({ card: s }) {
|
|
2534
|
-
var g, x, j, b, I, C,
|
|
2534
|
+
var g, x, j, b, I, C, D, F, A, N;
|
|
2535
2535
|
const { authToken: t } = Ie(), a = Lt(t == null ? void 0 : t.accessToken), n = z((S) => S.themeStyle), l = {
|
|
2536
2536
|
colors: ((x = (g = n == null ? void 0 : n.chart) == null ? void 0 : g.dataset) == null ? void 0 : x.backgroundColor) || []
|
|
2537
2537
|
};
|
|
@@ -2542,14 +2542,14 @@ function yl({ card: s }) {
|
|
|
2542
2542
|
if (!((C = s.customCardPreferences) != null && C.componentName))
|
|
2543
2543
|
return null;
|
|
2544
2544
|
const p = o(
|
|
2545
|
-
(
|
|
2545
|
+
(D = s.customCardPreferences) == null ? void 0 : D.componentName
|
|
2546
2546
|
), u = (S) => {
|
|
2547
2547
|
console.log("data", S), s.customCardPreferences;
|
|
2548
2548
|
}, y = Object.keys(
|
|
2549
2549
|
((F = s.customCardPreferences) == null ? void 0 : F.dataInputCardIds) || {}
|
|
2550
2550
|
).map((S) => {
|
|
2551
2551
|
var v, f, k;
|
|
2552
|
-
const
|
|
2552
|
+
const M = (f = (v = s.customCardPreferences) == null ? void 0 : v.dataInputCardIds) == null ? void 0 : f[S].cardId, h = (k = c == null ? void 0 : c.cards) == null ? void 0 : k.find((L) => L.id === M);
|
|
2553
2553
|
return h || null;
|
|
2554
2554
|
});
|
|
2555
2555
|
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(
|
|
@@ -2574,8 +2574,8 @@ function yl({ card: s }) {
|
|
|
2574
2574
|
onDataChange: u,
|
|
2575
2575
|
settings: y.map(
|
|
2576
2576
|
(S) => {
|
|
2577
|
-
var
|
|
2578
|
-
return (
|
|
2577
|
+
var M;
|
|
2578
|
+
return (M = S == null ? void 0 : S.customCardPreferences) == null ? void 0 : M.settings;
|
|
2579
2579
|
}
|
|
2580
2580
|
),
|
|
2581
2581
|
data: y.map((S) => (S == null ? void 0 : S.data) || [])
|
|
@@ -2686,7 +2686,7 @@ function vl() {
|
|
|
2686
2686
|
return JSON.stringify(S, null, 1);
|
|
2687
2687
|
}
|
|
2688
2688
|
function C() {
|
|
2689
|
-
var S,
|
|
2689
|
+
var S, M;
|
|
2690
2690
|
if (!(g != null && g.records) || (g == null ? void 0 : g.records.length) === 0) return;
|
|
2691
2691
|
const N = ba({
|
|
2692
2692
|
data: g == null ? void 0 : g.records,
|
|
@@ -2695,9 +2695,9 @@ function vl() {
|
|
|
2695
2695
|
preferences: u.preferences,
|
|
2696
2696
|
topoJson: x
|
|
2697
2697
|
});
|
|
2698
|
-
N && (n(JSON.stringify(N, null, 1)), (S = u == null ? void 0 : u.preferences) != null && S.customVisualCode && c((
|
|
2698
|
+
N && (n(JSON.stringify(N, null, 1)), (S = u == null ? void 0 : u.preferences) != null && S.customVisualCode && c((M = u == null ? void 0 : u.preferences) == null ? void 0 : M.customVisualCode), y && o(JSON.stringify(y, null, 1)));
|
|
2699
2699
|
}
|
|
2700
|
-
function
|
|
2700
|
+
function D() {
|
|
2701
2701
|
if (i && b(i), !!l)
|
|
2702
2702
|
try {
|
|
2703
2703
|
const N = JSON.parse(l);
|
|
@@ -2712,8 +2712,8 @@ function vl() {
|
|
|
2712
2712
|
function A() {
|
|
2713
2713
|
let N;
|
|
2714
2714
|
if (y) {
|
|
2715
|
-
const S = Xs.cloneDeep(u.cfg),
|
|
2716
|
-
return N = I(
|
|
2715
|
+
const S = Xs.cloneDeep(u.cfg), M = Xs.merge(S, y);
|
|
2716
|
+
return N = I(M), N;
|
|
2717
2717
|
}
|
|
2718
2718
|
return a ? (N = I(JSON.parse(a)), N) : "";
|
|
2719
2719
|
}
|
|
@@ -2729,11 +2729,11 @@ function vl() {
|
|
|
2729
2729
|
}
|
|
2730
2730
|
) }),
|
|
2731
2731
|
/* @__PURE__ */ e.jsxs(
|
|
2732
|
-
|
|
2732
|
+
Ds,
|
|
2733
2733
|
{
|
|
2734
2734
|
className: "max-h-[70vh] min-h-[70vh] overflow-auto sm:min-w-[900px] lg:min-w-[1200px]",
|
|
2735
2735
|
children: [
|
|
2736
|
-
/* @__PURE__ */ e.jsxs(
|
|
2736
|
+
/* @__PURE__ */ e.jsxs(Ms, { className: "", children: [
|
|
2737
2737
|
/* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e.jsx(Ls, { children: "Customize Card" }) }),
|
|
2738
2738
|
/* @__PURE__ */ e.jsxs(Es, { children: [
|
|
2739
2739
|
"See the configuration options and documentation",
|
|
@@ -2845,7 +2845,7 @@ function vl() {
|
|
|
2845
2845
|
children: "Reset"
|
|
2846
2846
|
}
|
|
2847
2847
|
),
|
|
2848
|
-
/* @__PURE__ */ e.jsx(O, { onClick:
|
|
2848
|
+
/* @__PURE__ */ e.jsx(O, { onClick: D, variant: "outline", children: "Apply" }),
|
|
2849
2849
|
/* @__PURE__ */ e.jsx(O, { onClick: () => t(!1), variant: "outline", children: "Close" })
|
|
2850
2850
|
] })
|
|
2851
2851
|
]
|
|
@@ -2881,7 +2881,7 @@ function Ja(s) {
|
|
|
2881
2881
|
const [t, a] = q(null);
|
|
2882
2882
|
return Z(() => {
|
|
2883
2883
|
s && (async () => {
|
|
2884
|
-
const o = (await import("./lucide-react-
|
|
2884
|
+
const o = (await import("./lucide-react-B9GnH8Nu.js"))[s];
|
|
2885
2885
|
a(o);
|
|
2886
2886
|
})();
|
|
2887
2887
|
}, [s]), t;
|
|
@@ -3097,7 +3097,7 @@ function Sl() {
|
|
|
3097
3097
|
{
|
|
3098
3098
|
onClick: () => p("custom"),
|
|
3099
3099
|
variant: "ghost",
|
|
3100
|
-
children: /* @__PURE__ */ e.jsx(
|
|
3100
|
+
children: /* @__PURE__ */ e.jsx(Ma, { className: "size-4" })
|
|
3101
3101
|
}
|
|
3102
3102
|
)
|
|
3103
3103
|
] }),
|
|
@@ -3144,7 +3144,7 @@ function wl({
|
|
|
3144
3144
|
case "map":
|
|
3145
3145
|
return /* @__PURE__ */ e.jsx(Ta, { className: t });
|
|
3146
3146
|
case "custom":
|
|
3147
|
-
return a && l ? /* @__PURE__ */ e.jsx(l, { className: t }) : n ? n == null ? void 0 : n.charAt(0).toUpperCase() : /* @__PURE__ */ e.jsx(
|
|
3147
|
+
return a && l ? /* @__PURE__ */ e.jsx(l, { className: t }) : n ? n == null ? void 0 : n.charAt(0).toUpperCase() : /* @__PURE__ */ e.jsx(Ma, { className: t });
|
|
3148
3148
|
default:
|
|
3149
3149
|
return /* @__PURE__ */ e.jsx(As, { className: t });
|
|
3150
3150
|
}
|
|
@@ -3230,7 +3230,7 @@ function ta() {
|
|
|
3230
3230
|
const f = v.cards.find((k) => k.id === h);
|
|
3231
3231
|
f.sql && i(!0), d(f);
|
|
3232
3232
|
}
|
|
3233
|
-
const
|
|
3233
|
+
const D = (h, v) => {
|
|
3234
3234
|
console.log("handleDragStart", v), h.dataTransfer.setData("tabIndex", v.toString());
|
|
3235
3235
|
}, F = (h) => {
|
|
3236
3236
|
h.preventDefault();
|
|
@@ -3263,7 +3263,7 @@ function ta() {
|
|
|
3263
3263
|
value: s.activeCardId,
|
|
3264
3264
|
className: "flex grow flex-col",
|
|
3265
3265
|
children: [
|
|
3266
|
-
s.cards.map((h) => /* @__PURE__ */ e.jsx(is, { className: "mt-0 grow", value: h.id, children:
|
|
3266
|
+
s.cards.map((h) => /* @__PURE__ */ e.jsx(is, { className: "mt-0 grow", value: h.id, children: M() }, h.id)),
|
|
3267
3267
|
/* @__PURE__ */ e.jsx(Ca, { className: "group mx-6 justify-between", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
|
|
3268
3268
|
s.cards.map((h, v) => /* @__PURE__ */ e.jsx(
|
|
3269
3269
|
ls,
|
|
@@ -3276,7 +3276,7 @@ function ta() {
|
|
|
3276
3276
|
rs,
|
|
3277
3277
|
{
|
|
3278
3278
|
draggable: !0,
|
|
3279
|
-
onDragStart: (f) =>
|
|
3279
|
+
onDragStart: (f) => D(f, v),
|
|
3280
3280
|
onDragOver: F,
|
|
3281
3281
|
onDrop: (f) => A(f, v),
|
|
3282
3282
|
className: "",
|
|
@@ -3320,7 +3320,7 @@ function ta() {
|
|
|
3320
3320
|
}
|
|
3321
3321
|
);
|
|
3322
3322
|
}
|
|
3323
|
-
function
|
|
3323
|
+
function M() {
|
|
3324
3324
|
return t.type === "kpi" ? /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e.jsx("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e.jsx(Jt, { card: t, data: u == null ? void 0 : u.records }) }) }) : t.type === "text" ? /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e.jsx("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e.jsx(We, { className: "mx-3 my-6 h-[300px] overflow-y-auto break-words px-3", children: /* @__PURE__ */ e.jsx(
|
|
3325
3325
|
Kt,
|
|
3326
3326
|
{
|
|
@@ -3450,12 +3450,12 @@ function Il() {
|
|
|
3450
3450
|
), p = (b = d == null ? void 0 : d.visuals) == null ? void 0 : b.find(
|
|
3451
3451
|
(C) => C.name === (s == null ? void 0 : s.componentName)
|
|
3452
3452
|
);
|
|
3453
|
-
function u(C,
|
|
3453
|
+
function u(C, D) {
|
|
3454
3454
|
if (!s) return;
|
|
3455
3455
|
const A = {
|
|
3456
3456
|
...(s == null ? void 0 : s.dataInputCardIds) || {},
|
|
3457
3457
|
[C]: {
|
|
3458
|
-
cardId:
|
|
3458
|
+
cardId: D,
|
|
3459
3459
|
hookRef: null
|
|
3460
3460
|
}
|
|
3461
3461
|
};
|
|
@@ -3466,7 +3466,7 @@ function Il() {
|
|
|
3466
3466
|
}
|
|
3467
3467
|
function y(C) {
|
|
3468
3468
|
var F, A;
|
|
3469
|
-
const
|
|
3469
|
+
const D = (F = l == null ? void 0 : l.cards) == null ? void 0 : F.filter((N) => {
|
|
3470
3470
|
var S;
|
|
3471
3471
|
return ((S = N == null ? void 0 : N.customCardPreferences) == null ? void 0 : S.visualType) !== "multiple";
|
|
3472
3472
|
}).map((N) => ({
|
|
@@ -3474,7 +3474,7 @@ function Il() {
|
|
|
3474
3474
|
label: N.tabTitle || N.title
|
|
3475
3475
|
}));
|
|
3476
3476
|
return /* @__PURE__ */ e.jsx("div", { className: "space-y-2", children: (A = C == null ? void 0 : C.dataInputs) == null ? void 0 : A.map((N, S) => {
|
|
3477
|
-
var
|
|
3477
|
+
var M, h;
|
|
3478
3478
|
return /* @__PURE__ */ e.jsxs(
|
|
3479
3479
|
"div",
|
|
3480
3480
|
{
|
|
@@ -3486,8 +3486,8 @@ function Il() {
|
|
|
3486
3486
|
{
|
|
3487
3487
|
className: "col-span-6 h-8 w-full justify-between",
|
|
3488
3488
|
label: "",
|
|
3489
|
-
options:
|
|
3490
|
-
value: ((h = (
|
|
3489
|
+
options: D || [],
|
|
3490
|
+
value: ((h = (M = s == null ? void 0 : s.dataInputCardIds) == null ? void 0 : M[S]) == null ? void 0 : h.cardId) || "",
|
|
3491
3491
|
onValueChange: (v) => u(S, v)
|
|
3492
3492
|
}
|
|
3493
3493
|
)
|
|
@@ -3497,43 +3497,43 @@ function Il() {
|
|
|
3497
3497
|
);
|
|
3498
3498
|
}) });
|
|
3499
3499
|
}
|
|
3500
|
-
function g(C,
|
|
3500
|
+
function g(C, D, F = []) {
|
|
3501
3501
|
var A, N;
|
|
3502
3502
|
return s ? C === "input" ? /* @__PURE__ */ e.jsx(
|
|
3503
3503
|
le,
|
|
3504
3504
|
{
|
|
3505
3505
|
className: `h-8 w-full ${Pe}`,
|
|
3506
|
-
value: ((A = s == null ? void 0 : s.settings) == null ? void 0 : A[
|
|
3506
|
+
value: ((A = s == null ? void 0 : s.settings) == null ? void 0 : A[D]) || "",
|
|
3507
3507
|
onChange: (S) => {
|
|
3508
3508
|
i({
|
|
3509
3509
|
...s,
|
|
3510
3510
|
settings: {
|
|
3511
3511
|
...s == null ? void 0 : s.settings,
|
|
3512
|
-
[
|
|
3512
|
+
[D]: S.target.value
|
|
3513
3513
|
}
|
|
3514
3514
|
});
|
|
3515
3515
|
}
|
|
3516
3516
|
},
|
|
3517
|
-
|
|
3517
|
+
D
|
|
3518
3518
|
) : C === "select" ? /* @__PURE__ */ e.jsx(
|
|
3519
3519
|
me,
|
|
3520
3520
|
{
|
|
3521
3521
|
className: "h-8 w-full",
|
|
3522
3522
|
label: "",
|
|
3523
3523
|
options: F,
|
|
3524
|
-
value: ((N = s == null ? void 0 : s.settings) == null ? void 0 : N[
|
|
3524
|
+
value: ((N = s == null ? void 0 : s.settings) == null ? void 0 : N[D]) || "",
|
|
3525
3525
|
onValueChange: (S) => {
|
|
3526
3526
|
i({
|
|
3527
3527
|
...s,
|
|
3528
|
-
settings: { ...s == null ? void 0 : s.settings, [
|
|
3528
|
+
settings: { ...s == null ? void 0 : s.settings, [D]: S }
|
|
3529
3529
|
});
|
|
3530
3530
|
}
|
|
3531
3531
|
}
|
|
3532
3532
|
) : null : null;
|
|
3533
3533
|
}
|
|
3534
3534
|
function x(C) {
|
|
3535
|
-
const
|
|
3536
|
-
return /* @__PURE__ */ e.jsx("div", { className: "space-y-3", children:
|
|
3535
|
+
const D = Object.entries((C == null ? void 0 : C.settings) || {});
|
|
3536
|
+
return /* @__PURE__ */ e.jsx("div", { className: "space-y-3", children: D.map(([F, A]) => /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
|
|
3537
3537
|
/* @__PURE__ */ e.jsx(R, { children: A.title }),
|
|
3538
3538
|
g(
|
|
3539
3539
|
A.ui,
|
|
@@ -3618,7 +3618,7 @@ function Il() {
|
|
|
3618
3618
|
}
|
|
3619
3619
|
);
|
|
3620
3620
|
}
|
|
3621
|
-
function
|
|
3621
|
+
function De() {
|
|
3622
3622
|
const [s, t] = q([]);
|
|
3623
3623
|
m(
|
|
3624
3624
|
(u) => u.card.cfg
|
|
@@ -3717,7 +3717,7 @@ function Me() {
|
|
|
3717
3717
|
/* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-2", children: ((x = a == null ? void 0 : a.onClickFilter) == null ? void 0 : x.find(
|
|
3718
3718
|
(j) => j.columnIndex === y
|
|
3719
3719
|
)) && /* @__PURE__ */ e.jsx(
|
|
3720
|
-
|
|
3720
|
+
Da,
|
|
3721
3721
|
{
|
|
3722
3722
|
onClick: () => {
|
|
3723
3723
|
t((j) => {
|
|
@@ -3786,19 +3786,19 @@ function Wa() {
|
|
|
3786
3786
|
((ae = (K = (ie = a == null ? void 0 : a.chartOptions) == null ? void 0 : ie.scales) == null ? void 0 : K[l]) == null ? void 0 : ae.min) || ""
|
|
3787
3787
|
), [p, u] = q(
|
|
3788
3788
|
((ee = (_ = (w = a == null ? void 0 : a.chartOptions) == null ? void 0 : w.scales) == null ? void 0 : _[l]) == null ? void 0 : ee.max) || ""
|
|
3789
|
-
), [y, g] = q(c || p ? "custom" : "auto"), [x, j] = q(""), [b, I] = q(0), [C,
|
|
3789
|
+
), [y, g] = q(c || p ? "custom" : "auto"), [x, j] = q(""), [b, I] = q(0), [C, D] = q(""), [F, A] = q(""), [N, S] = q(""), M = m(
|
|
3790
3790
|
(E) => E.actions.setCardPreferences
|
|
3791
3791
|
), { updateCardInFrame: h } = re(), v = m((E) => E.card), f = m((E) => {
|
|
3792
3792
|
var T;
|
|
3793
3793
|
return (T = E.card) == null ? void 0 : T.type;
|
|
3794
3794
|
}), k = ["pie", "doughnut", "polarArea"].includes(f);
|
|
3795
3795
|
Z(() => {
|
|
3796
|
-
var E, T, se, $, X, te,
|
|
3796
|
+
var E, T, se, $, X, te, Me, ke, be, ye, Q, ce, de, Oe;
|
|
3797
3797
|
i(na(a)), d(
|
|
3798
3798
|
((se = (T = (E = a == null ? void 0 : a.chartOptions) == null ? void 0 : E.scales) == null ? void 0 : T[l]) == null ? void 0 : se.min) === 0 ? 0 : ""
|
|
3799
3799
|
), u(((te = (X = ($ = a == null ? void 0 : a.chartOptions) == null ? void 0 : $.scales) == null ? void 0 : X[l]) == null ? void 0 : te.max) || ""), j(
|
|
3800
|
-
((ye = (be = (ke = (
|
|
3801
|
-
), I(((Q = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : Q.decimalPlaces) || 0),
|
|
3800
|
+
((ye = (be = (ke = (Me = a == null ? void 0 : a.chartOptions) == null ? void 0 : Me.scales) == null ? void 0 : ke[l]) == null ? void 0 : be.ticks) == null ? void 0 : ye.stepSize) || ""
|
|
3801
|
+
), I(((Q = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : Q.decimalPlaces) || 0), D(((ce = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : ce.suffix) || ""), A(((de = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : de.currency) || ""), S(((Oe = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : Oe.locale) || "");
|
|
3802
3802
|
}, [s, a, l]);
|
|
3803
3803
|
function L(E, T) {
|
|
3804
3804
|
return T === "" || /^[0-9\b]+$/.test(T) ? Number(T) : Number(E);
|
|
@@ -3934,7 +3934,7 @@ function Wa() {
|
|
|
3934
3934
|
locale: N
|
|
3935
3935
|
}
|
|
3936
3936
|
};
|
|
3937
|
-
console.log(T),
|
|
3937
|
+
console.log(T), M(T);
|
|
3938
3938
|
const se = {
|
|
3939
3939
|
...v,
|
|
3940
3940
|
preferences: T
|
|
@@ -4150,11 +4150,11 @@ function Ya() {
|
|
|
4150
4150
|
/* @__PURE__ */ e.jsx(R, { children: l }),
|
|
4151
4151
|
/* @__PURE__ */ e.jsx(Wa, {})
|
|
4152
4152
|
] }),
|
|
4153
|
-
/* @__PURE__ */ e.jsx("div", { className: "my-1 space-y-1", children: d.map((p, u) => /* @__PURE__ */ e.jsx(
|
|
4153
|
+
/* @__PURE__ */ e.jsx("div", { className: "my-1 space-y-1", children: d.map((p, u) => /* @__PURE__ */ e.jsx(Dl, { col: p, idx: u }, p)) })
|
|
4154
4154
|
] })
|
|
4155
4155
|
] });
|
|
4156
4156
|
}
|
|
4157
|
-
function
|
|
4157
|
+
function Dl({ col: s, idx: t }) {
|
|
4158
4158
|
const a = m((c) => {
|
|
4159
4159
|
var d;
|
|
4160
4160
|
return (d = c.card) == null ? void 0 : d.preferences;
|
|
@@ -4231,24 +4231,24 @@ function Xa() {
|
|
|
4231
4231
|
function y(g, x = "dashboard") {
|
|
4232
4232
|
var S;
|
|
4233
4233
|
const j = ue(g.column_name), b = ue(a || ""), I = ue(n || ""), C = ue(u);
|
|
4234
|
-
let
|
|
4234
|
+
let D = fa(
|
|
4235
4235
|
I,
|
|
4236
4236
|
C
|
|
4237
|
-
), F = `${
|
|
4237
|
+
), F = `${D}.${j}`;
|
|
4238
4238
|
const A = (S = p == null ? void 0 : p.find(
|
|
4239
|
-
(
|
|
4239
|
+
(M) => M.id === t
|
|
4240
4240
|
)) == null ? void 0 : S.name;
|
|
4241
|
-
t && t !== "none" && (F = `${ys}.${A}.${j}`,
|
|
4241
|
+
t && t !== "none" && (F = `${ys}.${A}.${j}`, D = `${ys}.${A}`);
|
|
4242
4242
|
const N = o == null ? void 0 : o.find(
|
|
4243
|
-
(
|
|
4243
|
+
(M) => M.column === F && M.table === C && (M.database === b || M.database === a)
|
|
4244
4244
|
);
|
|
4245
4245
|
if (N)
|
|
4246
4246
|
d(N.id), c(N.id);
|
|
4247
4247
|
else {
|
|
4248
|
-
const
|
|
4248
|
+
const M = Qe();
|
|
4249
4249
|
return u === "api" && s ? (i({
|
|
4250
4250
|
location: x,
|
|
4251
|
-
id:
|
|
4251
|
+
id: M,
|
|
4252
4252
|
//uuidv4(),
|
|
4253
4253
|
column: F,
|
|
4254
4254
|
title: g.column_name,
|
|
@@ -4260,12 +4260,12 @@ function Xa() {
|
|
|
4260
4260
|
operation: "in",
|
|
4261
4261
|
sql: Zs(
|
|
4262
4262
|
g.data_type,
|
|
4263
|
-
|
|
4263
|
+
D,
|
|
4264
4264
|
j
|
|
4265
4265
|
)
|
|
4266
4266
|
//DATE_DATA_TYPES.includes(column.data_type) ? dateSql : sql,
|
|
4267
|
-
}),
|
|
4268
|
-
id:
|
|
4267
|
+
}), M) : (i({
|
|
4268
|
+
id: M,
|
|
4269
4269
|
//uuidv4(),
|
|
4270
4270
|
location: x,
|
|
4271
4271
|
column: F,
|
|
@@ -4278,11 +4278,11 @@ function Xa() {
|
|
|
4278
4278
|
operation: "in",
|
|
4279
4279
|
sql: Zs(
|
|
4280
4280
|
g.data_type,
|
|
4281
|
-
|
|
4281
|
+
D,
|
|
4282
4282
|
j
|
|
4283
4283
|
)
|
|
4284
4284
|
//DATE_DATA_TYPES.includes(column.data_type) ? dateSql : sql,
|
|
4285
|
-
}),
|
|
4285
|
+
}), M);
|
|
4286
4286
|
}
|
|
4287
4287
|
}
|
|
4288
4288
|
return { assignFilter: y };
|
|
@@ -4298,11 +4298,11 @@ function Re() {
|
|
|
4298
4298
|
const i = s == null ? void 0 : s.find((c) => c.id === t.filterId);
|
|
4299
4299
|
return /* @__PURE__ */ e.jsxs("div", { className: "space-y-3", children: [
|
|
4300
4300
|
/* @__PURE__ */ e.jsx(R, { children: "Card Filter" }),
|
|
4301
|
-
/* @__PURE__ */ e.jsx(
|
|
4301
|
+
/* @__PURE__ */ e.jsx(Ml, { onSelect: o, columns: n }),
|
|
4302
4302
|
i && /* @__PURE__ */ e.jsx(tn, { filter: i })
|
|
4303
4303
|
] });
|
|
4304
4304
|
}
|
|
4305
|
-
function
|
|
4305
|
+
function Ml({
|
|
4306
4306
|
columns: s,
|
|
4307
4307
|
onSelect: t
|
|
4308
4308
|
}) {
|
|
@@ -4393,7 +4393,7 @@ function Ll({
|
|
|
4393
4393
|
/* @__PURE__ */ e.jsxs(B, { value: "item-3", children: [
|
|
4394
4394
|
/* @__PURE__ */ e.jsx(U, { children: "Filters" }),
|
|
4395
4395
|
/* @__PURE__ */ e.jsxs(G, { className: "space-y-4 px-2", children: [
|
|
4396
|
-
/* @__PURE__ */ e.jsx(
|
|
4396
|
+
/* @__PURE__ */ e.jsx(De, {}),
|
|
4397
4397
|
/* @__PURE__ */ e.jsx(Re, {})
|
|
4398
4398
|
] })
|
|
4399
4399
|
] })
|
|
@@ -4491,7 +4491,7 @@ function El({
|
|
|
4491
4491
|
/* @__PURE__ */ e.jsxs(B, { value: "item-3", children: [
|
|
4492
4492
|
/* @__PURE__ */ e.jsx(U, { children: "Filters" }),
|
|
4493
4493
|
/* @__PURE__ */ e.jsxs(G, { className: "space-y-4 px-2", children: [
|
|
4494
|
-
/* @__PURE__ */ e.jsx(
|
|
4494
|
+
/* @__PURE__ */ e.jsx(De, {}),
|
|
4495
4495
|
/* @__PURE__ */ e.jsx(Re, {})
|
|
4496
4496
|
] })
|
|
4497
4497
|
] })
|
|
@@ -4535,7 +4535,7 @@ function ql() {
|
|
|
4535
4535
|
/* @__PURE__ */ e.jsx("section", { className: "", children: ["line", "bar"].includes(s) && /* @__PURE__ */ e.jsx(fs, {}) }),
|
|
4536
4536
|
!["kpi"].includes(s) && /* @__PURE__ */ e.jsxs("div", { className: "space-y-4", children: [
|
|
4537
4537
|
/* @__PURE__ */ e.jsx(Gs, {}),
|
|
4538
|
-
/* @__PURE__ */ e.jsx(
|
|
4538
|
+
/* @__PURE__ */ e.jsx(De, {}),
|
|
4539
4539
|
/* @__PURE__ */ e.jsx(Re, {})
|
|
4540
4540
|
] })
|
|
4541
4541
|
] });
|
|
@@ -4935,7 +4935,7 @@ const $l = [
|
|
|
4935
4935
|
value: s
|
|
4936
4936
|
}));
|
|
4937
4937
|
function Ul() {
|
|
4938
|
-
var d, p, u, y, g, x, j, b, I, C,
|
|
4938
|
+
var d, p, u, y, g, x, j, b, I, C, D, F, A, N, S, M, h, v;
|
|
4939
4939
|
const s = m((f) => f.card), t = (p = (d = s == null ? void 0 : s.preferences) == null ? void 0 : d.mapVisualOptions) == null ? void 0 : p.topoJsonUrl, [a, n] = q(
|
|
4940
4940
|
((y = (u = s == null ? void 0 : s.preferences) == null ? void 0 : u.mapVisualOptions) == null ? void 0 : y.customTopoJsonUrl) || ""
|
|
4941
4941
|
), { setCardPreferences: l } = re(), { data: o } = _s(s), i = Object.keys((o == null ? void 0 : o.objects) || {}).map((f) => ({
|
|
@@ -5075,7 +5075,7 @@ function Ul() {
|
|
|
5075
5075
|
className: `h-9 w-full ${Pe}`,
|
|
5076
5076
|
type: "number",
|
|
5077
5077
|
step: 0.1,
|
|
5078
|
-
value: ((F = (
|
|
5078
|
+
value: ((F = (D = s.preferences) == null ? void 0 : D.mapVisualOptions) == null ? void 0 : F.projectionScale) || 1,
|
|
5079
5079
|
onChange: (f) => {
|
|
5080
5080
|
var k;
|
|
5081
5081
|
l({
|
|
@@ -5118,7 +5118,7 @@ function Ul() {
|
|
|
5118
5118
|
className: `h-9 w-full ${Pe}`,
|
|
5119
5119
|
type: "number",
|
|
5120
5120
|
step: 10,
|
|
5121
|
-
value: ((v = (h = (
|
|
5121
|
+
value: ((v = (h = (M = s.preferences) == null ? void 0 : M.mapVisualOptions) == null ? void 0 : h.projectionOffset) == null ? void 0 : v[1]) || 0,
|
|
5122
5122
|
onChange: (f) => {
|
|
5123
5123
|
var k, L, H, P;
|
|
5124
5124
|
l({
|
|
@@ -5136,7 +5136,7 @@ function Ul() {
|
|
|
5136
5136
|
)
|
|
5137
5137
|
] }) }),
|
|
5138
5138
|
/* @__PURE__ */ e.jsx(oe, { className: "my-4" }),
|
|
5139
|
-
/* @__PURE__ */ e.jsx(
|
|
5139
|
+
/* @__PURE__ */ e.jsx(De, {})
|
|
5140
5140
|
] });
|
|
5141
5141
|
}
|
|
5142
5142
|
function Gl() {
|
|
@@ -5176,7 +5176,8 @@ function ns({
|
|
|
5176
5176
|
docContent: t,
|
|
5177
5177
|
suffix: a = "Chart"
|
|
5178
5178
|
}) {
|
|
5179
|
-
|
|
5179
|
+
let n = "pie-chart";
|
|
5180
|
+
return s === "radar" && (n = "radar-chart"), /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(Te, { defaultValue: ["item-2"], type: "multiple", children: [
|
|
5180
5181
|
/* @__PURE__ */ e.jsxs(B, { value: "item-1", children: [
|
|
5181
5182
|
/* @__PURE__ */ e.jsx(U, { children: `${$s(s)} ${a}` }),
|
|
5182
5183
|
/* @__PURE__ */ e.jsx(G, { children: t || /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
|
|
@@ -5191,9 +5192,9 @@ function ns({
|
|
|
5191
5192
|
"a",
|
|
5192
5193
|
{
|
|
5193
5194
|
target: "_blank",
|
|
5194
|
-
onClick: (
|
|
5195
|
+
onClick: (l) => l.stopPropagation(),
|
|
5195
5196
|
className: "text-blue-700",
|
|
5196
|
-
href:
|
|
5197
|
+
href: `https://docs.semaphor.cloud/concepts/visuals#${n}`,
|
|
5197
5198
|
children: "example"
|
|
5198
5199
|
}
|
|
5199
5200
|
),
|
|
@@ -5212,7 +5213,7 @@ function ns({
|
|
|
5212
5213
|
!["range", "text"].includes(s) && /* @__PURE__ */ e.jsxs(B, { value: "item-3", children: [
|
|
5213
5214
|
/* @__PURE__ */ e.jsx(U, { children: "Filters" }),
|
|
5214
5215
|
/* @__PURE__ */ e.jsxs(G, { className: "space-y-4 px-2", children: [
|
|
5215
|
-
/* @__PURE__ */ e.jsx(
|
|
5216
|
+
/* @__PURE__ */ e.jsx(De, {}),
|
|
5216
5217
|
/* @__PURE__ */ e.jsx(Re, {})
|
|
5217
5218
|
] })
|
|
5218
5219
|
] })
|
|
@@ -5292,7 +5293,7 @@ function Ql() {
|
|
|
5292
5293
|
/* @__PURE__ */ e.jsxs(B, { value: "item-3", children: [
|
|
5293
5294
|
/* @__PURE__ */ e.jsx(U, { children: "Filters" }),
|
|
5294
5295
|
/* @__PURE__ */ e.jsxs(G, { className: "space-y-4 px-2", children: [
|
|
5295
|
-
/* @__PURE__ */ e.jsx(
|
|
5296
|
+
/* @__PURE__ */ e.jsx(De, {}),
|
|
5296
5297
|
/* @__PURE__ */ e.jsx(Re, {})
|
|
5297
5298
|
] })
|
|
5298
5299
|
] })
|
|
@@ -5314,7 +5315,7 @@ function Jl({}) {
|
|
|
5314
5315
|
/* @__PURE__ */ e.jsx(Te, { defaultValue: ["item-3"], type: "multiple", children: /* @__PURE__ */ e.jsxs(B, { value: "item-3", children: [
|
|
5315
5316
|
/* @__PURE__ */ e.jsx(U, { children: "Filters" }),
|
|
5316
5317
|
/* @__PURE__ */ e.jsxs(G, { className: "space-y-4 px-2", children: [
|
|
5317
|
-
/* @__PURE__ */ e.jsx(
|
|
5318
|
+
/* @__PURE__ */ e.jsx(De, {}),
|
|
5318
5319
|
/* @__PURE__ */ e.jsx(Re, {})
|
|
5319
5320
|
] })
|
|
5320
5321
|
] }) }),
|
|
@@ -5664,13 +5665,13 @@ export {
|
|
|
5664
5665
|
Ia as E,
|
|
5665
5666
|
La as F,
|
|
5666
5667
|
Tn as G,
|
|
5667
|
-
|
|
5668
|
+
Dn as H,
|
|
5668
5669
|
En as I,
|
|
5669
5670
|
Wn as J,
|
|
5670
5671
|
An as L,
|
|
5671
5672
|
Ta as M,
|
|
5672
5673
|
_n as N,
|
|
5673
|
-
|
|
5674
|
+
Da as P,
|
|
5674
5675
|
Pn as S,
|
|
5675
5676
|
Qn as T,
|
|
5676
5677
|
Kn as U,
|
|
@@ -5685,7 +5686,7 @@ export {
|
|
|
5685
5686
|
zn as i,
|
|
5686
5687
|
In as j,
|
|
5687
5688
|
Fn as k,
|
|
5688
|
-
|
|
5689
|
+
Mn as l,
|
|
5689
5690
|
Ln as m,
|
|
5690
5691
|
Vn as n,
|
|
5691
5692
|
qn as o,
|
|
@@ -5693,7 +5694,7 @@ export {
|
|
|
5693
5694
|
Rn as q,
|
|
5694
5695
|
Hn as r,
|
|
5695
5696
|
$n as s,
|
|
5696
|
-
|
|
5697
|
+
Ma as t,
|
|
5697
5698
|
Bn as u,
|
|
5698
5699
|
Un as v,
|
|
5699
5700
|
Gn as w,
|