semaphor 0.0.26 → 0.0.28
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 +42 -2
- package/dist/react-semaphor.js +13011 -12872
- package/dist/react-semaphor.umd.cjs +109 -109
- package/package.json +1 -1
package/dist/react-semaphor.d.ts
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
/// <reference types="react-grid-layout" />
|
|
3
3
|
|
|
4
|
+
import { BubbleDataPoint } from 'chart.js';
|
|
5
|
+
import { Chart as Chart_2 } from 'chart.js';
|
|
6
|
+
import { ChartConfiguration } from 'chart.js';
|
|
7
|
+
import { ChartTypeRegistry } from 'chart.js';
|
|
4
8
|
import { Draft } from 'immer';
|
|
5
9
|
import { FC } from 'react';
|
|
6
10
|
import { FontSpec } from 'chart.js';
|
|
7
11
|
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
8
12
|
import { Layout } from 'react-grid-layout';
|
|
13
|
+
import { Point } from 'chart.js';
|
|
14
|
+
import { default as React_2 } from 'react';
|
|
9
15
|
import { StoreApi } from 'zustand';
|
|
10
16
|
import { UseBoundStore } from 'zustand';
|
|
11
17
|
|
|
@@ -143,12 +149,27 @@ declare type CardWithFooter = BaseCustomCard & {
|
|
|
143
149
|
|
|
144
150
|
export declare function cleanCard(card: TCard): TCard;
|
|
145
151
|
|
|
152
|
+
export declare type ConnectionPolicy = {
|
|
153
|
+
connectionId?: string;
|
|
154
|
+
name: string;
|
|
155
|
+
params: Params;
|
|
156
|
+
};
|
|
157
|
+
|
|
146
158
|
export declare function createSqlGenConfig(column: TDataColumn, preSqlGen: SqlGen, calc?: AggregateCalc): SqlGen;
|
|
147
159
|
|
|
148
160
|
export declare type CustomCard = CardWithContent | CardWithFooter;
|
|
149
161
|
|
|
150
162
|
export declare function Dashboard(props: DashboardProps): JSX_2.Element;
|
|
151
163
|
|
|
164
|
+
export declare function DashboardCard({ card, footer, className, ...props }: DashboardCardProps): JSX_2.Element | null;
|
|
165
|
+
|
|
166
|
+
declare type DashboardCardProps = {
|
|
167
|
+
card: TCard;
|
|
168
|
+
footer?: React_2.ReactNode;
|
|
169
|
+
showControls?: boolean;
|
|
170
|
+
fetchCardData?: boolean;
|
|
171
|
+
} & React_2.HTMLAttributes<HTMLDivElement>;
|
|
172
|
+
|
|
152
173
|
export declare function DashboardPlus({ showControls, showFooter, ...rest }: DashboardPlusProps): JSX_2.Element;
|
|
153
174
|
|
|
154
175
|
declare type DashboardPlusProps = {
|
|
@@ -302,9 +323,13 @@ export declare type LoadingProps = {
|
|
|
302
323
|
|
|
303
324
|
export declare const NUMBER_DATA_TYPES: string[];
|
|
304
325
|
|
|
326
|
+
declare type Params = {
|
|
327
|
+
[key: string]: string | number | string[] | number[];
|
|
328
|
+
};
|
|
329
|
+
|
|
305
330
|
export declare const resolveDataType: (value: any) => string;
|
|
306
331
|
|
|
307
|
-
export declare function SelectComponent({ title, items, value, isLoading, isError, onChange, }: SelectProps): JSX_2.Element;
|
|
332
|
+
export declare function SelectComponent({ title, items, value, isLoading, isError, onChange, className, showIcon, }: SelectProps): JSX_2.Element;
|
|
308
333
|
|
|
309
334
|
declare type SelectProps = {
|
|
310
335
|
title: string;
|
|
@@ -316,6 +341,8 @@ declare type SelectProps = {
|
|
|
316
341
|
isLoading: boolean;
|
|
317
342
|
isError: boolean;
|
|
318
343
|
onChange?: (value: string) => void;
|
|
344
|
+
className?: string;
|
|
345
|
+
showIcon?: boolean;
|
|
319
346
|
};
|
|
320
347
|
|
|
321
348
|
export declare function SemaphorQueryClient({ children, }: {
|
|
@@ -394,6 +421,8 @@ export declare type TCardPreferences = {
|
|
|
394
421
|
};
|
|
395
422
|
};
|
|
396
423
|
|
|
424
|
+
declare type TChartConfiguration = ChartConfiguration;
|
|
425
|
+
|
|
397
426
|
declare type TChartType = 'bar' | 'horizontalBar' | 'line' | 'pie' | 'doughnut' | 'radar' | 'polarArea' | 'bubble' | 'scatter' | 'stackedBar' | 'table' | 'kpi' | 'custom';
|
|
398
427
|
|
|
399
428
|
export declare type TDashboard = {
|
|
@@ -464,6 +493,17 @@ export declare function useActions(): {
|
|
|
464
493
|
setOnRemoveCard: (onRemoveCard: (card: TCard, sheetId: string) => void) => void;
|
|
465
494
|
};
|
|
466
495
|
|
|
496
|
+
export declare function useCard(cardId: string): {
|
|
497
|
+
data: any;
|
|
498
|
+
card: TCard;
|
|
499
|
+
isError: boolean;
|
|
500
|
+
isLoading: boolean;
|
|
501
|
+
isFetching: boolean;
|
|
502
|
+
visualKey: number;
|
|
503
|
+
handleDatapointClick: (chart: Chart_2<keyof ChartTypeRegistry, (number | [number, number] | Point | BubbleDataPoint | null)[], unknown>, datasetIndex: number, clickIndex: number, value: number) => void;
|
|
504
|
+
cfg: TChartConfiguration | undefined;
|
|
505
|
+
};
|
|
506
|
+
|
|
467
507
|
export declare function useDashboard({ id, version, authToken, customStyle, currentTheme, onSave, onEvent, }: UseDashboardProps): {
|
|
468
508
|
isLoading: boolean;
|
|
469
509
|
isError: boolean;
|
|
@@ -853,7 +893,7 @@ export declare function useEditorAside(token?: AuthToken, connectionQueryKey?: s
|
|
|
853
893
|
isColumnsLoadingOrFetching: boolean;
|
|
854
894
|
isColumnsError: boolean;
|
|
855
895
|
isAPIConnection: boolean;
|
|
856
|
-
tableName:
|
|
896
|
+
tableName: any;
|
|
857
897
|
schemaName: string;
|
|
858
898
|
handleConnectionChange: (value: string) => void;
|
|
859
899
|
handleDatabaseChange: (value: string) => void;
|