react-semaphor 0.0.144 → 0.0.146

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;
@@ -343,6 +338,11 @@ export declare function getSql(config: SqlGen, schemaName: string, tableName: st
343
338
 
344
339
  export declare function isColumnInSqlGen(column: TDataColumn, sqlGen: SqlGen): boolean | undefined;
345
340
 
341
+ export declare type KPICardProps = {
342
+ card: TCard;
343
+ isLoading: boolean;
344
+ };
345
+
346
346
  export declare type LoadingProps = {
347
347
  message?: string;
348
348
  };
@@ -355,8 +355,6 @@ declare type Params = {
355
355
  [key: string]: string | number | string[] | number[];
356
356
  };
357
357
 
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
358
  export declare const resolveDataType: (value: any) => string;
361
359
 
362
360
  export declare function SelectComponent({ title, items, value, isLoading, isError, connectionTooltip, onChange, className, showIcon, }: SelectProps): JSX_2.Element;
@@ -549,6 +547,8 @@ export declare type TFrame = {
549
547
  activeCardId: string;
550
548
  };
551
549
 
550
+ export declare type Theme = 'dark' | 'light' | 'system';
551
+
552
552
  export declare type TSheet = {
553
553
  id: string;
554
554
  title?: string;
@@ -567,15 +567,6 @@ export declare type TStyle = {
567
567
  dark?: StyleProps;
568
568
  };
569
569
 
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
570
  export declare function useCard(cardId: string): {
580
571
  data: any;
581
572
  card: TCard;
@@ -612,7 +603,7 @@ export declare const useDashboardStore: UseBoundStore<Omit<StoreApi<DashboardSto
612
603
  refreshToken: string;
613
604
  } | undefined;
614
605
  currentBreakpoint: Breakpoint;
615
- theme?: "light" | "dark" | "system" | undefined;
606
+ theme?: "dark" | "light" | "system" | undefined;
616
607
  themeStyle?: {
617
608
  dashboardPanel?: string | undefined;
618
609
  dashboardTabsContainer?: string | undefined;
@@ -1443,8 +1434,4 @@ export declare const useEditorStore: UseBoundStore<Omit<StoreApi<EditorStore>, "
1443
1434
  }) => void), shouldReplace?: boolean | undefined): void;
1444
1435
  }>;
1445
1436
 
1446
- export declare type WritableDraft<T> = {
1447
- -readonly [K in keyof T]: Draft<T[K]>;
1448
- };
1449
-
1450
1437
  export { }
@@ -1,36 +1,33 @@
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 { a5 as t, a4 as r, Z as d, a1 as i, a0 as D, _ as l, a3 as T, aj as u, ak as n, a2 as A, am as S, a8 as h, a6 as m, an as E, aa as b, al as C, a9 as _, ac as g, a7 as p, ab as c, ae as f, X as y, Y as P, ag as Y, af as k, ai as q, ad as B, ah as N } from "./index-sA_OCM2k.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  export {
5
5
  t 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,
8
+ i as DashboardCard,
9
+ D as DashboardPlus,
11
10
  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,
11
+ T as NUMBER_DATA_TYPES,
12
+ u as SelectComponent,
13
+ n as SemaphorQueryClient,
14
+ A as TEXT_DATA_TYPES,
17
15
  S as cleanCard,
18
- b as createSqlGenConfig,
16
+ h as createSqlGenConfig,
19
17
  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,
18
+ E as getBookmarkKey,
19
+ b as getColumnDataType,
20
+ C as getDashbaordStateWithoutData,
21
+ _ as getFilterValueType,
22
+ g as getQualifiedTableName,
23
+ p as getSql,
24
+ c as isColumnInSqlGen,
27
25
  f as resolveDataType,
28
- y as useActions,
29
- q as useCard,
30
- N as useDashboard,
31
- O as useDashboardActions,
26
+ y as useCard,
27
+ P as useDashboard,
28
+ Y as useDashboardActions,
32
29
  k as useDashboardStore,
33
- B as useEditorActions,
34
- v as useEditorAside,
35
- F as useEditorStore
30
+ q as useEditorActions,
31
+ B as useEditorAside,
32
+ N as useEditorStore
36
33
  };