react-semaphor 0.0.344 → 0.0.346
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-Bmw6Tt4N.js → index-BqTxKEWv.js} +913 -910
- package/dist/chunks/index-DhC0Hn1T.js +240 -0
- package/dist/chunks/{index-DzAvZhsF.js → index-ggRRMgwy.js} +49 -53
- package/dist/chunks/{index-CcxLUxGu.js → index-iepZTd2s.js} +2 -2
- package/dist/chunks/{lucide-react-DzzsKkzx.js → lucide-react-Be4cg6f4.js} +3 -3
- package/dist/chunks/{lucide-react-RZyiVtvC.js → lucide-react-Dq_in0Ap.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/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +1 -1
- package/dist/types/main.d.ts +2 -2
- package/package.json +1 -1
- package/dist/chunks/index-B0NJ_phi.js +0 -240
|
@@ -17731,11 +17731,11 @@ function QZ(e) {
|
|
|
17731
17731
|
(d) => d.sheetId === t || !d.sheetId
|
|
17732
17732
|
), a = o == null ? void 0 : o.filter(
|
|
17733
17733
|
(d) => (s == null ? void 0 : s.some((p) => p.id === d.filterId)) || d.filterId.endsWith(t)
|
|
17734
|
-
), l = tY(e.sql, r), c = ZZ(e.python || "");
|
|
17734
|
+
), l = tY(e == null ? void 0 : e.sql, r), c = ZZ((e == null ? void 0 : e.python) || "");
|
|
17735
17735
|
return { queryKey: [
|
|
17736
17736
|
"query",
|
|
17737
|
-
e.id,
|
|
17738
|
-
e.title,
|
|
17737
|
+
e == null ? void 0 : e.id,
|
|
17738
|
+
e == null ? void 0 : e.title,
|
|
17739
17739
|
l,
|
|
17740
17740
|
c,
|
|
17741
17741
|
n || "",
|
|
@@ -17757,33 +17757,26 @@ function Sc(e, t) {
|
|
|
17757
17757
|
return { ...Ly({
|
|
17758
17758
|
queryKey: s,
|
|
17759
17759
|
// ],
|
|
17760
|
-
queryFn: () =>
|
|
17761
|
-
|
|
17762
|
-
(
|
|
17763
|
-
|
|
17764
|
-
|
|
17765
|
-
|
|
17766
|
-
|
|
17767
|
-
|
|
17768
|
-
|
|
17769
|
-
|
|
17770
|
-
|
|
17771
|
-
|
|
17760
|
+
queryFn: async () => {
|
|
17761
|
+
var p;
|
|
17762
|
+
return !(e != null && e.connectionId) || !((p = e == null ? void 0 : e.sql) != null && p.trim()) ? null : await j_(
|
|
17763
|
+
"https://semaphor.cloud/api/v1/query",
|
|
17764
|
+
(n == null ? void 0 : n.accessToken) || (i == null ? void 0 : i.accessToken) || "",
|
|
17765
|
+
{
|
|
17766
|
+
connection_id: e.connectionId,
|
|
17767
|
+
sql: a,
|
|
17768
|
+
python: e.python === nN ? "" : e.python,
|
|
17769
|
+
active_filters: l,
|
|
17770
|
+
//filterValues,
|
|
17771
|
+
cache_config: G_()
|
|
17772
|
+
}
|
|
17773
|
+
);
|
|
17774
|
+
},
|
|
17772
17775
|
// staleTime: 1000,
|
|
17773
17776
|
refetchInterval: o,
|
|
17774
17777
|
placeholderData: BY,
|
|
17775
17778
|
//staleTime: 60_000,
|
|
17776
|
-
enabled: !!e.connectionId && !!e.sql && !0 && !r
|
|
17777
|
-
//&& !isDashboardEditing,
|
|
17778
|
-
// &&
|
|
17779
|
-
// selectedSheetId === cardSheet?.id,
|
|
17780
|
-
// enabled: !!interval && isDashboardEditing && !!card?.connectionId, // Only fetch if connectionId is present,
|
|
17781
|
-
// isDashboardEditing &&
|
|
17782
|
-
// !!card.id &&
|
|
17783
|
-
// !!card.sql &&
|
|
17784
|
-
// !isEditorSaveEvent &&
|
|
17785
|
-
// // card?.data?.length === 0 &&
|
|
17786
|
-
// !!card?.connectionId, // Only fetch if connectionId is present,
|
|
17779
|
+
enabled: !!(e != null && e.connectionId) && !!(e != null && e.sql) && !0 && !r
|
|
17787
17780
|
}), queryKey: s };
|
|
17788
17781
|
}
|
|
17789
17782
|
function k5({ frame: e }) {
|
|
@@ -39811,62 +39804,65 @@ Fn.register(nl);
|
|
|
39811
39804
|
Fn.register(Wb);
|
|
39812
39805
|
Fn.register(L4);
|
|
39813
39806
|
function uF({ cfg: e, onDatapointClick: t }) {
|
|
39814
|
-
var
|
|
39815
|
-
const [n, r] = Ae(""), i = ve((
|
|
39807
|
+
var d;
|
|
39808
|
+
const [n, r] = Ae(""), i = ve((p) => p.selectedLensId), o = Ne(null), [s, a] = Ae(), l = ve((p) => p.themeStyle);
|
|
39816
39809
|
Be(() => {
|
|
39817
39810
|
if (o.current) {
|
|
39818
|
-
const
|
|
39819
|
-
r(
|
|
39811
|
+
const p = window.getComputedStyle(o.current);
|
|
39812
|
+
r(p.fontFamily);
|
|
39820
39813
|
}
|
|
39821
39814
|
}, []), Be(() => {
|
|
39822
|
-
var
|
|
39815
|
+
var b, v, x, S;
|
|
39823
39816
|
if (!n) return;
|
|
39824
|
-
(
|
|
39817
|
+
(v = (b = l == null ? void 0 : l.chart) == null ? void 0 : b.font) != null && v.family && (Fn.defaults.font = {
|
|
39825
39818
|
...Fn.defaults.font,
|
|
39826
|
-
...(
|
|
39819
|
+
...(x = l == null ? void 0 : l.chart) == null ? void 0 : x.font,
|
|
39827
39820
|
family: n
|
|
39828
39821
|
});
|
|
39829
|
-
const
|
|
39822
|
+
const p = {
|
|
39830
39823
|
...e,
|
|
39831
39824
|
options: {
|
|
39832
39825
|
...e.options,
|
|
39833
39826
|
responsive: !0,
|
|
39834
39827
|
maintainAspectRatio: !1
|
|
39835
39828
|
}
|
|
39836
|
-
},
|
|
39837
|
-
if (!
|
|
39838
|
-
let
|
|
39829
|
+
}, h = (S = o == null ? void 0 : o.current) == null ? void 0 : S.getContext("2d");
|
|
39830
|
+
if (!h) return;
|
|
39831
|
+
let m;
|
|
39839
39832
|
try {
|
|
39840
|
-
const
|
|
39841
|
-
|
|
39842
|
-
} catch (
|
|
39843
|
-
console.log("error creating chart",
|
|
39833
|
+
const _ = mle(p, h);
|
|
39834
|
+
m = new Fn(h, _), a(m);
|
|
39835
|
+
} catch (_) {
|
|
39836
|
+
console.log("error creating chart", _);
|
|
39844
39837
|
}
|
|
39845
39838
|
return () => {
|
|
39846
|
-
|
|
39839
|
+
m && m.destroy();
|
|
39847
39840
|
};
|
|
39848
|
-
}, [(
|
|
39849
|
-
function c(
|
|
39850
|
-
var
|
|
39841
|
+
}, [(d = l == null ? void 0 : l.chart) == null ? void 0 : d.font, i, n]);
|
|
39842
|
+
function c(p) {
|
|
39843
|
+
var m, b;
|
|
39851
39844
|
if (!s) return;
|
|
39852
|
-
const
|
|
39853
|
-
|
|
39845
|
+
const h = s == null ? void 0 : s.getElementsAtEventForMode(
|
|
39846
|
+
p,
|
|
39854
39847
|
"nearest",
|
|
39855
39848
|
{ intersect: !0 },
|
|
39856
39849
|
!0
|
|
39857
39850
|
);
|
|
39858
|
-
if (
|
|
39859
|
-
const
|
|
39860
|
-
t == null || t(s,
|
|
39851
|
+
if (h && h.length > 0) {
|
|
39852
|
+
const v = h[0].datasetIndex, x = h[0].index, S = (b = (m = h[0].element) == null ? void 0 : m.$context) == null ? void 0 : b.raw;
|
|
39853
|
+
t == null || t(s, v, x, S);
|
|
39861
39854
|
}
|
|
39862
39855
|
}
|
|
39856
|
+
const u = e.type === "doughnut" || e.type === "pie";
|
|
39863
39857
|
return (
|
|
39864
39858
|
//Source: https://codepen.io/chartjs/pen/YVWZbz
|
|
39865
39859
|
/* @__PURE__ */ y.jsx(
|
|
39866
39860
|
"div",
|
|
39867
39861
|
{
|
|
39868
39862
|
onClick: c,
|
|
39869
|
-
className: "relative h-[99%]",
|
|
39863
|
+
className: be("relative h-[99%]", {
|
|
39864
|
+
"mx-20": u
|
|
39865
|
+
}),
|
|
39870
39866
|
children: /* @__PURE__ */ y.jsx("canvas", { ref: o })
|
|
39871
39867
|
}
|
|
39872
39868
|
)
|
|
@@ -61003,8 +60999,8 @@ export {
|
|
|
61003
60999
|
LTe as aH,
|
|
61004
61000
|
Sc as aI,
|
|
61005
61001
|
OC as aJ,
|
|
61006
|
-
|
|
61007
|
-
|
|
61002
|
+
nN as aK,
|
|
61003
|
+
oee as aL,
|
|
61008
61004
|
FTe as aM,
|
|
61009
61005
|
VMe as aN,
|
|
61010
61006
|
gN as aO,
|