react-semaphor 0.0.291 → 0.0.293
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-FhvN1zHF.js → index-4ghd54jS.js} +28042 -27804
- package/dist/chunks/{dashboard-plus-0OULctzd.js → index-fAm5iYrM.js} +2046 -2042
- package/dist/chunks/index-ljPCqLiY.js +443 -0
- package/dist/chunks/index-zdNMIsZu.js +245 -0
- package/dist/chunks/{lucide-react-KlIkHuLE.js → lucide-react-3E-f4CQ5.js} +3 -3
- package/dist/chunks/{lucide-react-C382QbK3.js → lucide-react-VOTuZL6R.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 +28 -162
- package/dist/style.css +1 -1
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/main.d.ts +0 -14
- package/package.json +3 -3
- package/dist/chunks/dashboard-plus-oC4vRia7.js +0 -245
- package/dist/chunks/index-j6u8TMrb.js +0 -443
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { B as w, C, a as f, b as I,
|
|
1
|
+
import { c as a, B as e, C as t, a as c, b as h, d, e as o, f as y, g as i, h as s, F as n, i as r, G as k, I as p, P as l, j as M, S as u, k as v, l as g, T as m, U as x, X as L } from "./index-4ghd54jS.js";
|
|
2
|
+
import { m as Pv } from "./index-4ghd54jS.js";
|
|
3
|
+
import { B as w, C, a as f, b as I, c as S, d as q, e as b, f as H, g as A, h as z, E as P, i as V, j, k as B, G as F, H as D, l as R, m as T, K as U, L as O, n as Z, o as G, p as W, M as E, q as X, N, P as K, r as J, s as Q, S as Y, t as _, u as $, v as a1, w as e1, T as t1, x as c1, y as h1, U as d1 } from "./index-fAm5iYrM.js";
|
|
4
4
|
import "react";
|
|
5
5
|
import "react-dom";
|
|
6
6
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-ljPCqLiY.js"),a=require("./index-zdNMIsZu.js");require("react");require("react-dom");/**
|
|
2
2
|
* @license lucide-react v0.453.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
package/dist/dashboard/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../chunks/index-ljPCqLiY.js");require("react");require("react-dom");exports.Dashboard=e.Dashboard;
|
package/dist/dashboard/index.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-ljPCqLiY.js"),a=require("./chunks/index-zdNMIsZu.js");require("react");require("react-dom");exports.BOOLEAN_DATA_TYPES=e.BOOLEAN_DATA_TYPES;exports.DATE_DATA_TYPES=e.DATE_DATA_TYPES;exports.Dashboard=e.Dashboard;exports.DashboardWC=e.DashboardWC;exports.NUMBER_DATA_TYPES=e.NUMBER_DATA_TYPES;exports.SemaphorQueryClient=e.SemaphorQueryClient;exports.TEXT_DATA_TYPES=e.TEXT_DATA_TYPES;exports.createSqlGenConfig=e.createSqlGenConfig;exports.fmt=e.fmt;exports.getColumnDataType=e.getColumnDataType;exports.getFilterValueType=e.getFilterValueType;exports.getQualifiedTableName=e.getQualifiedTableName;exports.getSql=e.getSql;exports.isColumnInSqlGen=e.isColumnInSqlGen;exports.resolveDataType=e.resolveDataType;exports.useCard=e.useCard;exports.useDashboardActions=e.useDashboardActions;exports.useDashboardStore=e.useDashboardStore;exports.useEditorActions=e.useEditorActions;exports.useEditorStore=e.useEditorStore;exports.SelectComponent=a.SelectComponent;exports.Surfboard=a.DashboardPlus;exports.cleanCard=a.cleanCard;exports.getDashbaordStateWithoutData=a.getDashbaordStateWithoutData;exports.useEditorAside=a.useEditorAside;
|
package/dist/index.js
CHANGED
|
@@ -1,165 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import { S as Te, D as Ee, c as Ie, g as Ae, u as ve } from "./chunks/dashboard-plus-0OULctzd.js";
|
|
5
|
-
import U from "react";
|
|
1
|
+
import { ai as o, ah as r, D as i, b$ as D, ag as T, c3 as d, af as l, ab as n, ad as u, c1 as A, c0 as S, an as E, ac as b, al as c, c2 as m, b_ as p, n as _, u as h, aY as C, a7 as f } from "./chunks/index-4ghd54jS.js";
|
|
2
|
+
import { A as Y, D as y, I as P, F as q, z as N } from "./chunks/index-fAm5iYrM.js";
|
|
3
|
+
import "react";
|
|
6
4
|
import "react-dom";
|
|
7
|
-
function se({
|
|
8
|
-
card: e,
|
|
9
|
-
footer: u,
|
|
10
|
-
className: m,
|
|
11
|
-
...x
|
|
12
|
-
}) {
|
|
13
|
-
var f;
|
|
14
|
-
const { customCards: r } = P(), p = U.useRef(null), {
|
|
15
|
-
isError: g,
|
|
16
|
-
isLoading: n,
|
|
17
|
-
isFetching: i,
|
|
18
|
-
cfg: c,
|
|
19
|
-
visualKey: j,
|
|
20
|
-
handleDatapointClick: D
|
|
21
|
-
} = F(e), l = o((t) => t.themeStyle), d = o((t) => t.selectedSheetId), b = o((t) => t.selectedCardId), S = o(
|
|
22
|
-
(t) => t.isDashboardEditing
|
|
23
|
-
), T = ((f = e.customCardPreferences) == null ? void 0 : f.showCardHeader) ?? !0, { setCardTitle: E, setCardDescription: I, setSelectedCardId: A } = k();
|
|
24
|
-
function v(t) {
|
|
25
|
-
t.stopPropagation(), A(d, e.id);
|
|
26
|
-
}
|
|
27
|
-
function N() {
|
|
28
|
-
if (r && r.length > 0) {
|
|
29
|
-
const t = r.find((a) => a.cardId === e.id);
|
|
30
|
-
if (t && t.replaceDefault) {
|
|
31
|
-
const a = t.content;
|
|
32
|
-
if (a)
|
|
33
|
-
return /* @__PURE__ */ s.jsx(a, { card: e });
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
return e.type === "kpi" ? e.data && e.data.length > 0 && /* @__PURE__ */ s.jsx(V, { isLoading: n || i, card: e }) : _;
|
|
37
|
-
}
|
|
38
|
-
function y() {
|
|
39
|
-
if (g)
|
|
40
|
-
return /* @__PURE__ */ s.jsx("p", { className: "text-sm", children: "Oops! It seems like something went wrong. Please review your connection or filters." });
|
|
41
|
-
if (e.type === "table" && e.data && e.data.length > 0)
|
|
42
|
-
return /* @__PURE__ */ s.jsxs(z, { children: [
|
|
43
|
-
/* @__PURE__ */ s.jsx(Q, { card: e, data: e.data }),
|
|
44
|
-
/* @__PURE__ */ s.jsx(W, { orientation: "horizontal" })
|
|
45
|
-
] });
|
|
46
|
-
if (r && r.length > 0) {
|
|
47
|
-
const t = r.find((a) => a.cardId === e.id);
|
|
48
|
-
if (t && t.content) {
|
|
49
|
-
const a = t.content;
|
|
50
|
-
return /* @__PURE__ */ s.jsx(a, { card: e });
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
if (c)
|
|
54
|
-
return /* @__PURE__ */ s.jsx(
|
|
55
|
-
J,
|
|
56
|
-
{
|
|
57
|
-
cfg: c,
|
|
58
|
-
onDatapointClick: D
|
|
59
|
-
},
|
|
60
|
-
j
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
|
-
function w() {
|
|
64
|
-
if (r && r.length > 0) {
|
|
65
|
-
const t = r.find((a) => a.cardId === e.id);
|
|
66
|
-
if (t && t.footer) {
|
|
67
|
-
const a = t.footer;
|
|
68
|
-
if (a)
|
|
69
|
-
return /* @__PURE__ */ s.jsx(a, { card: e });
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
return u || null;
|
|
73
|
-
}
|
|
74
|
-
if (!e.id)
|
|
75
|
-
return null;
|
|
76
|
-
const _ = /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
77
|
-
T && /* @__PURE__ */ s.jsxs(R, { className: "pb-4", children: [
|
|
78
|
-
/* @__PURE__ */ s.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
79
|
-
/* @__PURE__ */ s.jsx(
|
|
80
|
-
h,
|
|
81
|
-
{
|
|
82
|
-
text: e.title,
|
|
83
|
-
onSave: (t) => E(d, e.id, t),
|
|
84
|
-
children: /* @__PURE__ */ s.jsx(L, { className: "text-base", children: e.title })
|
|
85
|
-
}
|
|
86
|
-
),
|
|
87
|
-
e.refreshInterval && /* @__PURE__ */ s.jsxs(q, { children: [
|
|
88
|
-
/* @__PURE__ */ s.jsx(B, { className: "pr-1", children: /* @__PURE__ */ s.jsx(
|
|
89
|
-
"div",
|
|
90
|
-
{
|
|
91
|
-
className: C(
|
|
92
|
-
"h-2 w-2 rounded-full bg-green-500 transition-opacity",
|
|
93
|
-
{
|
|
94
|
-
"opacity-10": n || i
|
|
95
|
-
}
|
|
96
|
-
)
|
|
97
|
-
}
|
|
98
|
-
) }),
|
|
99
|
-
/* @__PURE__ */ s.jsx(H, { side: "right", align: "center", children: /* @__PURE__ */ s.jsx("p", { className: "text-xs", children: `Realtime (${e == null ? void 0 : e.refreshInterval})` }) })
|
|
100
|
-
] }),
|
|
101
|
-
!e.refreshInterval && (n || i) && /* @__PURE__ */ s.jsx(M, { className: "h-4 w-4 animate-spin text-muted-foreground" })
|
|
102
|
-
] }),
|
|
103
|
-
/* @__PURE__ */ s.jsx(
|
|
104
|
-
h,
|
|
105
|
-
{
|
|
106
|
-
text: (e == null ? void 0 : e.description) || "",
|
|
107
|
-
onSave: (t) => I(d, e.id, t),
|
|
108
|
-
children: /* @__PURE__ */ s.jsxs(Y, { children: [
|
|
109
|
-
" ",
|
|
110
|
-
e.description
|
|
111
|
-
] })
|
|
112
|
-
}
|
|
113
|
-
)
|
|
114
|
-
] }),
|
|
115
|
-
/* @__PURE__ */ s.jsx(G, { className: "relative flex grow flex-col overflow-auto pb-0", children: y() }),
|
|
116
|
-
/* @__PURE__ */ s.jsx(K, { children: w() })
|
|
117
|
-
] });
|
|
118
|
-
return /* @__PURE__ */ s.jsx(
|
|
119
|
-
O,
|
|
120
|
-
{
|
|
121
|
-
tabIndex: -1,
|
|
122
|
-
ref: p,
|
|
123
|
-
role: "dashboard-card",
|
|
124
|
-
onClick: v,
|
|
125
|
-
className: C(
|
|
126
|
-
"relative flex h-full flex-col rounded-sm",
|
|
127
|
-
{
|
|
128
|
-
"border-dashed border-foreground/50": b === e.id && S
|
|
129
|
-
},
|
|
130
|
-
l == null ? void 0 : l.dashboardCard,
|
|
131
|
-
m
|
|
132
|
-
),
|
|
133
|
-
...x,
|
|
134
|
-
children: N()
|
|
135
|
-
}
|
|
136
|
-
);
|
|
137
|
-
}
|
|
138
5
|
export {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
be as useEditorStore
|
|
6
|
+
o as BOOLEAN_DATA_TYPES,
|
|
7
|
+
r as DATE_DATA_TYPES,
|
|
8
|
+
i as Dashboard,
|
|
9
|
+
D as DashboardWC,
|
|
10
|
+
T as NUMBER_DATA_TYPES,
|
|
11
|
+
Y as SelectComponent,
|
|
12
|
+
d as SemaphorQueryClient,
|
|
13
|
+
y as Surfboard,
|
|
14
|
+
l as TEXT_DATA_TYPES,
|
|
15
|
+
P as cleanCard,
|
|
16
|
+
n as createSqlGenConfig,
|
|
17
|
+
u as fmt,
|
|
18
|
+
A as getColumnDataType,
|
|
19
|
+
q as getDashbaordStateWithoutData,
|
|
20
|
+
S as getFilterValueType,
|
|
21
|
+
E as getQualifiedTableName,
|
|
22
|
+
b as getSql,
|
|
23
|
+
c as isColumnInSqlGen,
|
|
24
|
+
m as resolveDataType,
|
|
25
|
+
p as useCard,
|
|
26
|
+
_ as useDashboardActions,
|
|
27
|
+
h as useDashboardStore,
|
|
28
|
+
C as useEditorActions,
|
|
29
|
+
N as useEditorAside,
|
|
30
|
+
f as useEditorStore
|
|
165
31
|
};
|