react-semaphor 0.0.144 → 0.0.145
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/{2DAFLIRC-DzrqZNR1.js → 2DAFLIRC--6piWoPN.js} +1 -1
- package/dist/{index-bic-Qj-S.js → index-wAmQju6Q.js} +9597 -9753
- package/dist/index.d.ts +9 -24
- package/dist/react-semaphor.js +25 -29
- package/dist/react-semaphor.umd.cjs +291 -291
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { BubbleDataPoint } from 'chart.js';
|
|
|
2
2
|
import { Chart } from 'chart.js';
|
|
3
3
|
import { ChartConfiguration } from 'chart.js';
|
|
4
4
|
import { ChartTypeRegistry } from 'chart.js';
|
|
5
|
-
import { Draft } from 'immer';
|
|
6
5
|
import { FC } from 'react';
|
|
7
6
|
import { FontSpec } from 'chart.js';
|
|
8
7
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
@@ -196,7 +195,7 @@ export declare type DashboardProps = {
|
|
|
196
195
|
id: string;
|
|
197
196
|
authToken: AuthToken | undefined;
|
|
198
197
|
style?: TStyle;
|
|
199
|
-
currentTheme?:
|
|
198
|
+
currentTheme?: Theme;
|
|
200
199
|
version?: string;
|
|
201
200
|
customCards?: CustomCard[];
|
|
202
201
|
onChartElementClicked?: (card: TCard, fieldValues: any) => void;
|
|
@@ -206,10 +205,6 @@ export declare type DashboardProps = {
|
|
|
206
205
|
ErrorComponent?: (props: ErrorProps) => React.ReactNode;
|
|
207
206
|
};
|
|
208
207
|
|
|
209
|
-
export declare function DashboardProvider({ children }: {
|
|
210
|
-
children: React_2.ReactNode;
|
|
211
|
-
}): JSX_2.Element;
|
|
212
|
-
|
|
213
208
|
export declare type DashboardStore = {
|
|
214
209
|
authToken?: AuthToken;
|
|
215
210
|
currentBreakpoint: Breakpoint;
|
|
@@ -236,8 +231,6 @@ export declare type DashboardStore = {
|
|
|
236
231
|
actions: Actions;
|
|
237
232
|
};
|
|
238
233
|
|
|
239
|
-
export declare const DashboardWC: CustomElementConstructor;
|
|
240
|
-
|
|
241
234
|
export declare const DATE_DATA_TYPES: string[];
|
|
242
235
|
|
|
243
236
|
declare type EditorStore = {
|
|
@@ -343,6 +336,11 @@ export declare function getSql(config: SqlGen, schemaName: string, tableName: st
|
|
|
343
336
|
|
|
344
337
|
export declare function isColumnInSqlGen(column: TDataColumn, sqlGen: SqlGen): boolean | undefined;
|
|
345
338
|
|
|
339
|
+
export declare type KPICardProps = {
|
|
340
|
+
card: TCard;
|
|
341
|
+
isLoading: boolean;
|
|
342
|
+
};
|
|
343
|
+
|
|
346
344
|
export declare type LoadingProps = {
|
|
347
345
|
message?: string;
|
|
348
346
|
};
|
|
@@ -355,8 +353,6 @@ declare type Params = {
|
|
|
355
353
|
[key: string]: string | number | string[] | number[];
|
|
356
354
|
};
|
|
357
355
|
|
|
358
|
-
export declare const PYTHON_DEFAULT_CODE = "import pandas as pd\ndf = pd.DataFrame(data) # 'data' contains the query result\nresult = df.to_dict('records') # must return 'result' as [dict] type\n";
|
|
359
|
-
|
|
360
356
|
export declare const resolveDataType: (value: any) => string;
|
|
361
357
|
|
|
362
358
|
export declare function SelectComponent({ title, items, value, isLoading, isError, connectionTooltip, onChange, className, showIcon, }: SelectProps): JSX_2.Element;
|
|
@@ -549,6 +545,8 @@ export declare type TFrame = {
|
|
|
549
545
|
activeCardId: string;
|
|
550
546
|
};
|
|
551
547
|
|
|
548
|
+
export declare type Theme = 'dark' | 'light' | 'system';
|
|
549
|
+
|
|
552
550
|
export declare type TSheet = {
|
|
553
551
|
id: string;
|
|
554
552
|
title?: string;
|
|
@@ -567,15 +565,6 @@ export declare type TStyle = {
|
|
|
567
565
|
dark?: StyleProps;
|
|
568
566
|
};
|
|
569
567
|
|
|
570
|
-
export declare function useActions(): {
|
|
571
|
-
getStyle: () => TStyle | undefined;
|
|
572
|
-
getDashboard: () => TDashboard | undefined;
|
|
573
|
-
setOnSaveFunction: (onSaveFunction: (dashboard: TDashboard) => void) => void;
|
|
574
|
-
setOnAddCard: (onAddCard: (card: TCard, sheetId: string) => void) => void;
|
|
575
|
-
setOnUpateCard: (onUpdateCard: (card: TCard, sheetId: string) => void) => void;
|
|
576
|
-
setOnRemoveCard: (onRemoveCard: (card: TCard, sheetId: string) => void) => void;
|
|
577
|
-
};
|
|
578
|
-
|
|
579
568
|
export declare function useCard(cardId: string): {
|
|
580
569
|
data: any;
|
|
581
570
|
card: TCard;
|
|
@@ -612,7 +601,7 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
|
|
|
612
601
|
refreshToken: string;
|
|
613
602
|
} | undefined;
|
|
614
603
|
currentBreakpoint: Breakpoint;
|
|
615
|
-
theme?: "
|
|
604
|
+
theme?: "dark" | "light" | "system" | undefined;
|
|
616
605
|
themeStyle?: {
|
|
617
606
|
dashboardPanel?: string | undefined;
|
|
618
607
|
dashboardTabsContainer?: string | undefined;
|
|
@@ -1443,8 +1432,4 @@ export declare const useEditorStore: UseBoundStore<Omit<StoreApi<EditorStore>, "
|
|
|
1443
1432
|
}) => void), shouldReplace?: boolean | undefined): void;
|
|
1444
1433
|
}>;
|
|
1445
1434
|
|
|
1446
|
-
export declare type WritableDraft<T> = {
|
|
1447
|
-
-readonly [K in keyof T]: Draft<T[K]>;
|
|
1448
|
-
};
|
|
1449
|
-
|
|
1450
1435
|
export { }
|
package/dist/react-semaphor.js
CHANGED
|
@@ -1,36 +1,32 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a4 as o, a3 as r, Z as d, a0 as i, _ as l, a2 as D, ai as T, aj as u, a1 as A, al as n, a7 as S, a5 as m, am as E, a9 as h, ak as b, a8 as _, ab as g, a6 as p, aa as C, ad as c, X as f, Y as y, af as P, ae as Y, ah as k, ac as q, ag as B } from "./index-wAmQju6Q.js";
|
|
2
2
|
import "react";
|
|
3
3
|
import "react-dom";
|
|
4
4
|
export {
|
|
5
|
-
|
|
5
|
+
o as BOOLEAN_DATA_TYPES,
|
|
6
6
|
r as DATE_DATA_TYPES,
|
|
7
7
|
d as Dashboard,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
u as
|
|
13
|
-
A as
|
|
14
|
-
n as
|
|
15
|
-
|
|
16
|
-
h as TEXT_DATA_TYPES,
|
|
17
|
-
S as cleanCard,
|
|
18
|
-
b as createSqlGenConfig,
|
|
8
|
+
i as DashboardCard,
|
|
9
|
+
l as DashboardPlus,
|
|
10
|
+
D as NUMBER_DATA_TYPES,
|
|
11
|
+
T as SelectComponent,
|
|
12
|
+
u as SemaphorQueryClient,
|
|
13
|
+
A as TEXT_DATA_TYPES,
|
|
14
|
+
n as cleanCard,
|
|
15
|
+
S as createSqlGenConfig,
|
|
19
16
|
m as fmt,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
k as
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
F as useEditorStore
|
|
17
|
+
E as getBookmarkKey,
|
|
18
|
+
h as getColumnDataType,
|
|
19
|
+
b as getDashbaordStateWithoutData,
|
|
20
|
+
_ as getFilterValueType,
|
|
21
|
+
g as getQualifiedTableName,
|
|
22
|
+
p as getSql,
|
|
23
|
+
C as isColumnInSqlGen,
|
|
24
|
+
c as resolveDataType,
|
|
25
|
+
f as useCard,
|
|
26
|
+
y as useDashboard,
|
|
27
|
+
P as useDashboardActions,
|
|
28
|
+
Y as useDashboardStore,
|
|
29
|
+
k as useEditorActions,
|
|
30
|
+
q as useEditorAside,
|
|
31
|
+
B as useEditorStore
|
|
36
32
|
};
|