react-semaphor 0.0.97 → 0.0.99
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/react-semaphor.d.ts
CHANGED
|
@@ -69,6 +69,8 @@ declare type Actions = {
|
|
|
69
69
|
getSelectedSheetLayout: () => ReactGridLayout_2.Layout[] | undefined;
|
|
70
70
|
getSelectedSheetLayouts: () => ReactGridLayout_2.Layouts | undefined;
|
|
71
71
|
handleDataPointClickAction: (card: TCard, dataPoint: any) => void;
|
|
72
|
+
addBaseQuery: (baseQuery: BaseQuery) => void;
|
|
73
|
+
removeBaseQuery: (baseQueryId: string) => void;
|
|
72
74
|
};
|
|
73
75
|
|
|
74
76
|
declare type Actions_2 = {
|
|
@@ -125,6 +127,12 @@ declare type BaseFilter = {
|
|
|
125
127
|
connectionType?: 'database' | 'api';
|
|
126
128
|
};
|
|
127
129
|
|
|
130
|
+
export declare type BaseQuery = {
|
|
131
|
+
id: string;
|
|
132
|
+
name: string;
|
|
133
|
+
sql: string;
|
|
134
|
+
};
|
|
135
|
+
|
|
128
136
|
export declare type Bookmark = {
|
|
129
137
|
name: string;
|
|
130
138
|
default: boolean;
|
|
@@ -307,6 +315,7 @@ export declare function getDashbaordStateWithoutData(dashboardState: TDashboard)
|
|
|
307
315
|
style?: TStyle | undefined;
|
|
308
316
|
filters?: TFilter[] | undefined;
|
|
309
317
|
customCards?: CustomCard[] | undefined;
|
|
318
|
+
baseQueries?: BaseQuery[] | undefined;
|
|
310
319
|
};
|
|
311
320
|
|
|
312
321
|
export declare function getFilterValueType(filter: TFilter): "string" | "number" | "date" | "boolean";
|
|
@@ -434,6 +443,7 @@ export declare type TDashboard = {
|
|
|
434
443
|
style?: TStyle;
|
|
435
444
|
filters?: TFilter[];
|
|
436
445
|
customCards?: CustomCard[];
|
|
446
|
+
baseQueries?: BaseQuery[];
|
|
437
447
|
};
|
|
438
448
|
|
|
439
449
|
export declare type TDataColumn = {
|
|
@@ -757,6 +767,11 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
|
|
|
757
767
|
card: TCard;
|
|
758
768
|
}>;
|
|
759
769
|
})[] | undefined;
|
|
770
|
+
baseQueries?: {
|
|
771
|
+
id: string;
|
|
772
|
+
name: string;
|
|
773
|
+
sql: string;
|
|
774
|
+
}[] | undefined;
|
|
760
775
|
};
|
|
761
776
|
selectedSheetId?: string | null | undefined;
|
|
762
777
|
selectedFrameId?: string | null | undefined;
|
|
@@ -900,6 +915,8 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
|
|
|
900
915
|
getSelectedSheetLayout: () => ReactGridLayout_2.Layout[] | undefined;
|
|
901
916
|
getSelectedSheetLayouts: () => ReactGridLayout_2.Layouts | undefined;
|
|
902
917
|
handleDataPointClickAction: (card: TCard, dataPoint: any) => void;
|
|
918
|
+
addBaseQuery: (baseQuery: BaseQuery) => void;
|
|
919
|
+
removeBaseQuery: (baseQueryId: string) => void;
|
|
903
920
|
};
|
|
904
921
|
}) => void), shouldReplace?: boolean | undefined): void;
|
|
905
922
|
}>;
|
package/dist/react-semaphor.js
CHANGED
|
@@ -6111,7 +6111,7 @@ const we = NP()(
|
|
|
6111
6111
|
card: {
|
|
6112
6112
|
id: Ms(),
|
|
6113
6113
|
title: "Editor Card",
|
|
6114
|
-
description: "
|
|
6114
|
+
description: "Description",
|
|
6115
6115
|
type: "bar",
|
|
6116
6116
|
data: []
|
|
6117
6117
|
},
|
|
@@ -10227,6 +10227,21 @@ const qa = /* @__PURE__ */ Nd(Ru), pC = ["lg", "md", "sm", "xs", "xxs"], be = NP
|
|
|
10227
10227
|
showDashboardJSON: !1,
|
|
10228
10228
|
filteringCards: [],
|
|
10229
10229
|
actions: {
|
|
10230
|
+
addBaseQuery: (n) => {
|
|
10231
|
+
e((r) => {
|
|
10232
|
+
var i;
|
|
10233
|
+
r.dashboard.baseQueries || (r.dashboard.baseQueries = []), (i = r.dashboard.baseQueries) == null || i.push(n);
|
|
10234
|
+
});
|
|
10235
|
+
},
|
|
10236
|
+
removeBaseQuery: (n) => {
|
|
10237
|
+
e((r) => {
|
|
10238
|
+
var o, s;
|
|
10239
|
+
const i = (o = r.dashboard.baseQueries) == null ? void 0 : o.findIndex(
|
|
10240
|
+
(a) => a.id === n
|
|
10241
|
+
);
|
|
10242
|
+
i != null && i > -1 && ((s = r.dashboard.baseQueries) == null || s.splice(i, 1));
|
|
10243
|
+
});
|
|
10244
|
+
},
|
|
10230
10245
|
setCurrentBreakpoint: (n) => {
|
|
10231
10246
|
e(() => ({
|
|
10232
10247
|
currentBreakpoint: n
|
|
@@ -16156,6 +16171,7 @@ function Ts({
|
|
|
16156
16171
|
) : /* @__PURE__ */ w.jsx(
|
|
16157
16172
|
"input",
|
|
16158
16173
|
{
|
|
16174
|
+
onMouseDown: (g) => g.stopPropagation(),
|
|
16159
16175
|
type: "text",
|
|
16160
16176
|
className: Te(
|
|
16161
16177
|
"px-2 py-1 text-sm bg-background outline-[0.5px] outline-dashed outline-primary/50 rounded-sm",
|
|
@@ -34769,6 +34785,7 @@ const Qg = [
|
|
|
34769
34785
|
"nvarchar2",
|
|
34770
34786
|
"char",
|
|
34771
34787
|
"character",
|
|
34788
|
+
"longtext",
|
|
34772
34789
|
"nchar",
|
|
34773
34790
|
"char varying",
|
|
34774
34791
|
"nchar varying",
|
|
@@ -50641,7 +50658,8 @@ function iA({
|
|
|
50641
50658
|
text: o.title,
|
|
50642
50659
|
onSave: (l) => s({ ...o, title: l }),
|
|
50643
50660
|
children: /* @__PURE__ */ w.jsx(Og, { className: "text-base", children: o.title })
|
|
50644
|
-
}
|
|
50661
|
+
},
|
|
50662
|
+
o.title
|
|
50645
50663
|
),
|
|
50646
50664
|
/* @__PURE__ */ w.jsx(
|
|
50647
50665
|
Ts,
|
|
@@ -50652,7 +50670,8 @@ function iA({
|
|
|
50652
50670
|
" ",
|
|
50653
50671
|
o.description
|
|
50654
50672
|
] })
|
|
50655
|
-
}
|
|
50673
|
+
},
|
|
50674
|
+
o.description
|
|
50656
50675
|
)
|
|
50657
50676
|
] }),
|
|
50658
50677
|
/* @__PURE__ */ w.jsxs(Pg, { className: "flex flex-col pb-3 grow", children: [
|