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/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?: 'light' | 'dark' | 'system';
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?: "light" | "dark" | "system" | undefined;
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 { }
@@ -1,36 +1,32 @@
1
- import { a7 as t, a6 as r, Z as d, a2 as D, a1 as i, a0 as T, _ as l, a5 as u, a3 as A, am as n, an as E, a4 as h, ap as S, aa as b, a8 as m, aq as _, ac as C, ao as p, ab as g, ae as c, a9 as P, ad as Y, ah as f, af as y, X as q, Y as N, aj as O, ai as k, al as B, ag as v, ak as F } from "./index-bic-Qj-S.js";
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
- t as BOOLEAN_DATA_TYPES,
5
+ o as BOOLEAN_DATA_TYPES,
6
6
  r as DATE_DATA_TYPES,
7
7
  d as Dashboard,
8
- D as DashboardCard,
9
- i as DashboardPlus,
10
- T as DashboardProvider,
11
- l as DashboardWC,
12
- u as NUMBER_DATA_TYPES,
13
- A as PYTHON_DEFAULT_CODE,
14
- n as SelectComponent,
15
- E as SemaphorQueryClient,
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
- _ as getBookmarkKey,
21
- C as getColumnDataType,
22
- p as getDashbaordStateWithoutData,
23
- g as getFilterValueType,
24
- c as getQualifiedTableName,
25
- P as getSql,
26
- Y as isColumnInSqlGen,
27
- f as resolveDataType,
28
- y as useActions,
29
- q as useCard,
30
- N as useDashboard,
31
- O as useDashboardActions,
32
- k as useDashboardStore,
33
- B as useEditorActions,
34
- v as useEditorAside,
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
  };