react-semaphor 0.0.149 → 0.0.151
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-HaGAyQCj.js +228 -0
- package/dist/chunks/{dashboard-plus-VO-o8Q5m.js → dashboard-plus-VCeGU3HQ.js} +2314 -2125
- package/dist/chunks/{index-A53WxJ05.js → index-AxU4CKu3.js} +14704 -17210
- package/dist/chunks/index-lMbivOVQ.js +364 -0
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +9 -9
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +2 -2
- package/dist/types/main.d.ts +2 -2
- package/package.json +1 -1
- package/dist/chunks/2DAFLIRC-HTB0OzHP.js +0 -1086
- package/dist/chunks/2DAFLIRC-LUJ-HNQs.js +0 -9088
- package/dist/chunks/dashboard-plus-V8yyjys7.js +0 -228
- package/dist/chunks/index-tGO1Iq1M.js +0 -364
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-lMbivOVQ.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-lMbivOVQ.js"),d=require("./chunks/dashboard-plus-HaGAyQCj.js"),I=require("react");require("react-dom");function N({card:t,footer:u,className:m,...c}){const{customCards:r}=e.useSemaphorContext(),h=I.useRef(null),{isError:p,isLoading:n,isFetching:i,cfg:x,visualKey:C,handleDatapointClick:f}=e.useDashboardCard(t),a=e.useDashboardStore(s=>s.themeStyle),l=e.useDashboardStore(s=>s.selectedSheetId),E=e.useDashboardStore(s=>s.selectedCardId),j=e.useDashboardStore(s=>s.isDashboardEditing),{setCardTitle:g,setCardDescription:D,setSelectedCardId:b}=e.useDashboardActions();function S(s){s.stopPropagation(),b(l,t.id)}function T(){if(r&&r.length>0){const s=r.find(o=>o.cardId===t.id);if(s&&s.replaceDefault){const o=s.content;if(o)return e.jsxRuntimeExports.jsx(o,{card:t})}}return t.type==="kpi"?t.data&&t.data.length>0&&e.jsxRuntimeExports.jsx(e.KPICard,{isLoading:n||i,card:t}):y}function R(){if(p)return e.jsxRuntimeExports.jsx("p",{className:"text-sm",children:"Oops! It seems like something went wrong. Please review your connection or filters."});if(t.type==="table"&&t.data&&t.data.length>0)return e.jsxRuntimeExports.jsxs(e.ScrollArea,{children:[e.jsxRuntimeExports.jsx(e.TableVisual,{card:t,data:t.data}),e.jsxRuntimeExports.jsx(e.ScrollBar,{orientation:"horizontal"})]});if(r&&r.length>0){const s=r.find(o=>o.cardId===t.id);if(s&&s.content){const o=s.content;return e.jsxRuntimeExports.jsx(o,{card:t})}}if(x)return e.jsxRuntimeExports.jsx(e.ChartJsVisual,{cfg:x,onDatapointClick:f},C)}function A(){if(r&&r.length>0){const s=r.find(o=>o.cardId===t.id);if(s&&s.footer){const o=s.footer;if(o)return e.jsxRuntimeExports.jsx(o,{card:t})}}return u||null}if(!t.id)return null;const y=e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsxs(e.CardHeader,{className:"pb-4",children:[e.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxRuntimeExports.jsx(e.Editable,{text:t.title,onSave:s=>g(l,t.id,s),children:e.jsxRuntimeExports.jsx(e.CardTitle,{className:"text-base",children:t.title})}),t.refreshInterval&&e.jsxRuntimeExports.jsxs(e.Tooltip,{children:[e.jsxRuntimeExports.jsx(e.TooltipTrigger,{className:"pr-1",children:e.jsxRuntimeExports.jsx("div",{className:e.cn("h-2 w-2 rounded-full bg-green-500 transition-opacity",{"opacity-10":n||i})})}),e.jsxRuntimeExports.jsx(e.TooltipContent,{side:"right",align:"center",children:e.jsxRuntimeExports.jsx("p",{className:"text-xs",children:`Realtime (${t==null?void 0:t.refreshInterval})`})})]}),!t.refreshInterval&&(n||i)&&e.jsxRuntimeExports.jsx(e.LoaderCircle,{className:"h-4 w-4 animate-spin text-muted-foreground"})]}),e.jsxRuntimeExports.jsx(e.Editable,{text:(t==null?void 0:t.description)||"",onSave:s=>D(l,t.id,s),children:e.jsxRuntimeExports.jsxs(e.CardDescription,{children:[" ",t.description]})})]}),e.jsxRuntimeExports.jsx(e.CardContent,{className:"relative flex grow flex-col overflow-auto pb-0",children:R()}),e.jsxRuntimeExports.jsx(e.CardFooter,{children:A()})]});return e.jsxRuntimeExports.jsx(e.Card,{tabIndex:-1,ref:h,role:"dashboard-card",onClick:S,className:e.cn("relative flex h-full flex-col rounded-sm",{"border-dashed border-foreground/50":E===t.id&&j},a==null?void 0:a.dashboardCard,m),...c,children:T()})}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.cleanCard=e.cleanCard;exports.createSqlGenConfig=e.createSqlGenConfig;exports.fmt=e.fmt;exports.getBookmarkKey=e.getBookmarkKey;exports.getColumnDataType=e.getColumnDataType;exports.getDashbaordStateWithoutData=e.getDashbaordStateWithoutData;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=d.SelectComponent;exports.Surfboard=d.DashboardPlus;exports.useEditorAside=d.useEditorAside;exports.DashboardCard=N;
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { u as _, a as k, b as n, c as w, j as s, C as
|
|
2
|
-
import { B as se, s as te, D as ae, q as oe, N as ne,
|
|
3
|
-
import { S as
|
|
1
|
+
import { u as _, a as k, b as n, c as w, j as s, C as F, E as f, d as P, T as R, e as B, f as h, g as L, L as q, h as K, i as O, k as Y, l as G, K as V, S as z, m as H, n as J, o as M } from "./chunks/index-AxU4CKu3.js";
|
|
2
|
+
import { B as se, s as te, D as ae, q as oe, N as ne, I as re, r as ie, M as le, w as de, t as ue, O as ce, y as fe, J as he, x as Ce, A as xe, v as me, z as pe, F as ge, p as je, H as De, G as be } from "./chunks/index-AxU4CKu3.js";
|
|
3
|
+
import { S as Te, D as Ee, u as Ie } from "./chunks/dashboard-plus-VCeGU3HQ.js";
|
|
4
4
|
import Q from "react";
|
|
5
5
|
import "react-dom";
|
|
6
6
|
function $({
|
|
@@ -72,14 +72,14 @@ function $({
|
|
|
72
72
|
if (!e.id)
|
|
73
73
|
return null;
|
|
74
74
|
const y = /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
75
|
-
/* @__PURE__ */ s.jsxs(
|
|
75
|
+
/* @__PURE__ */ s.jsxs(F, { className: "pb-4", children: [
|
|
76
76
|
/* @__PURE__ */ s.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
77
77
|
/* @__PURE__ */ s.jsx(
|
|
78
78
|
f,
|
|
79
79
|
{
|
|
80
80
|
text: e.title,
|
|
81
81
|
onSave: (t) => S(d, e.id, t),
|
|
82
|
-
children: /* @__PURE__ */ s.jsx(
|
|
82
|
+
children: /* @__PURE__ */ s.jsx(P, { className: "text-base", children: e.title })
|
|
83
83
|
}
|
|
84
84
|
),
|
|
85
85
|
e.refreshInterval && /* @__PURE__ */ s.jsxs(R, { children: [
|
|
@@ -140,9 +140,9 @@ export {
|
|
|
140
140
|
$ as DashboardCard,
|
|
141
141
|
oe as DashboardWC,
|
|
142
142
|
ne as NUMBER_DATA_TYPES,
|
|
143
|
-
|
|
143
|
+
Te as SelectComponent,
|
|
144
144
|
re as SemaphorQueryClient,
|
|
145
|
-
|
|
145
|
+
Ee as Surfboard,
|
|
146
146
|
ie as TEXT_DATA_TYPES,
|
|
147
147
|
le as cleanCard,
|
|
148
148
|
de as createSqlGenConfig,
|
|
@@ -159,6 +159,6 @@ export {
|
|
|
159
159
|
w as useDashboardActions,
|
|
160
160
|
n as useDashboardStore,
|
|
161
161
|
De as useEditorActions,
|
|
162
|
-
|
|
163
|
-
|
|
162
|
+
Ie as useEditorAside,
|
|
163
|
+
be as useEditorStore
|
|
164
164
|
};
|
package/dist/surfboard/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../chunks/dashboard-plus-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../chunks/dashboard-plus-HaGAyQCj.js");require("../chunks/index-lMbivOVQ.js");require("react");require("react-dom");exports.Surfboard=r.DashboardPlus;
|
package/dist/surfboard/index.js
CHANGED
package/dist/types/main.d.ts
CHANGED
|
@@ -699,7 +699,7 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
|
|
|
699
699
|
static?: boolean | undefined;
|
|
700
700
|
isDraggable?: boolean | undefined;
|
|
701
701
|
isResizable?: boolean | undefined;
|
|
702
|
-
resizeHandles?: ("
|
|
702
|
+
resizeHandles?: ("w" | "s" | "e" | "n" | "sw" | "nw" | "se" | "ne")[] | undefined;
|
|
703
703
|
isBounded?: boolean | undefined;
|
|
704
704
|
}[] | undefined;
|
|
705
705
|
layouts?: {
|
|
@@ -717,7 +717,7 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
|
|
|
717
717
|
static?: boolean | undefined;
|
|
718
718
|
isDraggable?: boolean | undefined;
|
|
719
719
|
isResizable?: boolean | undefined;
|
|
720
|
-
resizeHandles?: ("
|
|
720
|
+
resizeHandles?: ("w" | "s" | "e" | "n" | "sw" | "nw" | "se" | "ne")[] | undefined;
|
|
721
721
|
isBounded?: boolean | undefined;
|
|
722
722
|
}[];
|
|
723
723
|
} | undefined;
|