@databrainhq/plugin 0.8.2 → 0.8.3

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/README.md CHANGED
@@ -1,26 +1,26 @@
1
- # @databrainhq/plugin
2
-
3
- > Databrain app ui plugin.
4
-
5
- [![NPM](https://img.shields.io/npm/v/@databrainhq/plugin.svg)](https://www.npmjs.com/package/@databrainhq/plugin) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
6
-
7
- ## Install
8
-
9
- ```bash
10
- npm install @databrainhq/plugin
11
- ```
12
-
13
- ## Usage
14
-
15
- ```tsx
16
- import { Dashboard } from '@databrainhq/plugin';
17
- import '@databrainhq/plugin/dist/style.css';
18
-
19
- const Example = () => {
20
- return <Dashboard token={/* Your Guest Token */} />;
21
- };
22
- ```
23
-
24
- ## License
25
-
26
- MIT © [databrainhq](https://github.com/databrainhq)
1
+ # @databrainhq/plugin
2
+
3
+ > Databrain app ui plugin.
4
+
5
+ [![NPM](https://img.shields.io/npm/v/@databrainhq/plugin.svg)](https://www.npmjs.com/package/@databrainhq/plugin) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install @databrainhq/plugin
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ ```tsx
16
+ import { Dashboard } from '@databrainhq/plugin';
17
+ import '@databrainhq/plugin/dist/style.css';
18
+
19
+ const Example = () => {
20
+ return <Dashboard token={/* Your Guest Token */} />;
21
+ };
22
+ ```
23
+
24
+ ## License
25
+
26
+ MIT © [databrainhq](https://github.com/databrainhq)
@@ -1,3 +1,3 @@
1
- /// <reference types="react" />
2
- declare const TableChart: ({ data, chartClickConfig, tableSettings }: any) => JSX.Element;
3
- export default TableChart;
1
+ import React from 'react';
2
+ declare const _default: React.MemoExoticComponent<({ data, chartClickConfig, tableSettings, tableName, }: any) => JSX.Element>;
3
+ export default _default;
@@ -35,6 +35,7 @@ export declare type MetricChartProps = {
35
35
  chartClickConfig: ClickActionsConfig['chart'];
36
36
  tableSettings: TableSettings;
37
37
  chartRef: React.RefObject<EChartsReact>;
38
+ tableName?: string;
38
39
  handleChartRightClick: (params: any) => void;
39
40
  };
40
- export declare const MetricChart: ({ labels, data, chartType, funnelData, sankeyData, singleValueData, margins, legendSettings, labelSettings, axisSettings, customSettings, enableSaveAs, colors, updateGroup, isEnableGroupBy, backGroundColor, chartClickConfig, tableSettings, chartRef, handleChartRightClick, }: MetricChartProps) => JSX.Element;
41
+ export declare const MetricChart: ({ labels, data, chartType, funnelData, sankeyData, singleValueData, margins, legendSettings, labelSettings, axisSettings, customSettings, enableSaveAs, colors, updateGroup, isEnableGroupBy, backGroundColor, chartClickConfig, tableSettings, chartRef, tableName, handleChartRightClick, }: MetricChartProps) => JSX.Element;
@@ -48,7 +48,8 @@ declare type Props = {
48
48
  headerChild?: JSX.Element;
49
49
  tableSettings: TableSettings;
50
50
  setTableSettings: React.Dispatch<React.SetStateAction<TableSettings>>;
51
+ tableName?: string;
51
52
  chartColors?: string[];
52
53
  };
53
- export declare const ChartTab: ({ labels, datasets, funnelData, chartType, setChartType, data, setXAxis, setYAxisList, yAxisList, xAxis, setMeasure, setStep, step, measure, setSankeyValues, sankeyData, singleValue, setSingleValue, singleValueData, setMargins, margins, legendSettings, setLegendSettings, labelSettings, setLabelSettings, customSettings, setCustomSettings, axisSettings, setAxisSettings, updateGroup, isLoading, isEnableGroupBy, backGroundColor, setBackGroundColor, headerChild, tableSettings, setTableSettings, chartColors, }: Props) => JSX.Element;
54
+ export declare const ChartTab: ({ labels, datasets, funnelData, chartType, setChartType, data, setXAxis, setYAxisList, yAxisList, xAxis, setMeasure, setStep, step, measure, setSankeyValues, sankeyData, singleValue, setSingleValue, singleValueData, setMargins, margins, legendSettings, setLegendSettings, labelSettings, setLabelSettings, customSettings, setCustomSettings, axisSettings, setAxisSettings, updateGroup, isLoading, isEnableGroupBy, backGroundColor, setBackGroundColor, headerChild, tableSettings, setTableSettings, tableName, chartColors, }: Props) => JSX.Element;
54
55
  export {};
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ export declare const DebouncedInput: ({ value, onChange, debounce, ...props }: {
3
+ value: string | number;
4
+ onChange: (value: string | number) => void;
5
+ debounce?: number | undefined;
6
+ } & Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange">) => JSX.Element;
@@ -1,8 +1,11 @@
1
1
  /// <reference types="react" />
2
+ import { TableSettings } from '@/types';
2
3
  declare type Props = {
3
4
  data: any[] | undefined;
4
5
  isLoading: boolean;
5
6
  error: string;
7
+ tableSettings?: TableSettings;
8
+ tableName?: string;
6
9
  };
7
- export declare const Table: ({ data, isLoading, error }: Props) => JSX.Element;
10
+ export declare const Table: ({ data, isLoading, error, tableSettings, tableName, }: Props) => JSX.Element;
8
11
  export {};
@@ -0,0 +1,24 @@
1
+ export declare const required: {
2
+ required: string;
3
+ };
4
+ export declare const asEmail: {
5
+ pattern: {
6
+ value: RegExp;
7
+ message: string;
8
+ };
9
+ required: string;
10
+ };
11
+ export declare const asPassword: {
12
+ minLength: {
13
+ value: number;
14
+ message: string;
15
+ };
16
+ required: string;
17
+ };
18
+ export declare const asName: {
19
+ minLength: {
20
+ value: number;
21
+ message: string;
22
+ };
23
+ required: string;
24
+ };
@@ -0,0 +1,18 @@
1
+ /// <reference types="react" />
2
+ import { FieldValues } from 'react-hook-form';
3
+ declare const useDownloadRawCsv: () => {
4
+ isShowRawCsvModal: boolean;
5
+ setRawCsvModal: import("react").Dispatch<import("react").SetStateAction<boolean>>;
6
+ isLoading: boolean;
7
+ downloadCsvError: string;
8
+ onSubmitDownloadCsv: ({ companyId, sqlQuery, values, clientName, tenancyType, }: {
9
+ values: FieldValues;
10
+ sqlQuery: string;
11
+ companyId: string;
12
+ clientName?: string | undefined;
13
+ tenancyType?: string | undefined;
14
+ }) => void;
15
+ handleSubmit: import("react-hook-form").UseFormHandleSubmit<FieldValues>;
16
+ register: import("react-hook-form").UseFormRegister<FieldValues>;
17
+ };
18
+ export default useDownloadRawCsv;