@databrainhq/plugin 0.9.9 → 0.9.10
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 +26 -26
- package/dist/components/DateRangePicker/index.d.ts +9 -0
- package/dist/components/Select/index.d.ts +6 -2
- package/dist/components/TimeGrainField/index.d.ts +4 -1
- package/dist/index.es.js +18863 -10742
- package/dist/index.umd.js +136 -135
- package/dist/style.css +1 -1
- package/dist/typings.d.ts +17 -17
- package/package.json +98 -96
package/README.md
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
# @databrainhq/plugin
|
|
2
|
-
|
|
3
|
-
> Databrain app ui plugin.
|
|
4
|
-
|
|
5
|
-
[](https://www.npmjs.com/package/@databrainhq/plugin) [](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
|
+
[](https://www.npmjs.com/package/@databrainhq/plugin) [](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)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare type Props = {
|
|
3
|
+
label: string;
|
|
4
|
+
timeGrainValue: string;
|
|
5
|
+
setTimeGrainValue: React.Dispatch<React.SetStateAction<string>>;
|
|
6
|
+
onChange?: (value: string) => void;
|
|
7
|
+
};
|
|
8
|
+
declare const DateRangePicker: React.FC<Props>;
|
|
9
|
+
export default DateRangePicker;
|
|
@@ -6,6 +6,7 @@ declare type Option = {
|
|
|
6
6
|
label: string;
|
|
7
7
|
};
|
|
8
8
|
declare type SelectInput = {
|
|
9
|
+
name?: string;
|
|
9
10
|
label?: string;
|
|
10
11
|
value: any;
|
|
11
12
|
placeHolder?: string;
|
|
@@ -16,6 +17,7 @@ declare type SelectInput = {
|
|
|
16
17
|
className?: string;
|
|
17
18
|
containerClass?: string;
|
|
18
19
|
isSearchEnabled?: boolean;
|
|
20
|
+
icon?: JSX.Element;
|
|
19
21
|
textSize?: string;
|
|
20
22
|
labelVariant?: 'floating' | 'static';
|
|
21
23
|
};
|
|
@@ -23,7 +25,7 @@ declare type HookSelectInput = Omit<SelectInput, 'value'> & {
|
|
|
23
25
|
control: Control;
|
|
24
26
|
name: string;
|
|
25
27
|
};
|
|
26
|
-
export declare const Select: ({ label, options, onChange, value, defaultValue, children, placeHolder, className, containerClass, isSearchEnabled, textSize, labelVariant, }: SelectInput) => JSX.Element;
|
|
28
|
+
export declare const Select: ({ name, label, options, onChange, value, defaultValue, children, placeHolder, className, containerClass, isSearchEnabled, textSize, icon, labelVariant, }: SelectInput) => JSX.Element;
|
|
27
29
|
export declare const HookSelect: ({ control, name, ...rest }: HookSelectInput) => JSX.Element;
|
|
28
30
|
export declare const SelectWithSubValue: ({ label, options, onChange, value, defaultValue, }: any) => JSX.Element;
|
|
29
31
|
export declare const DropDown: ({ control, name, options, label, defaultValue, }: HookSelectInput) => JSX.Element;
|
|
@@ -33,7 +35,7 @@ declare type MultiSelectProps = {
|
|
|
33
35
|
value?: Option['value'][];
|
|
34
36
|
onChange?: (selected: Option['value'][]) => void;
|
|
35
37
|
label?: string;
|
|
36
|
-
name
|
|
38
|
+
name?: string;
|
|
37
39
|
className?: string;
|
|
38
40
|
containerClass?: string;
|
|
39
41
|
children?: React.ReactNode;
|
|
@@ -41,10 +43,12 @@ declare type MultiSelectProps = {
|
|
|
41
43
|
onClick?: any;
|
|
42
44
|
labelVariant?: 'floating' | 'static';
|
|
43
45
|
isSearchEnabled?: boolean;
|
|
46
|
+
icon?: JSX.Element;
|
|
44
47
|
};
|
|
45
48
|
export declare const MultiSelect: React.FC<MultiSelectProps>;
|
|
46
49
|
declare type HookMultiSelectProps = MultiSelectProps & {
|
|
47
50
|
control: Control<FieldValues>;
|
|
51
|
+
name: string;
|
|
48
52
|
};
|
|
49
53
|
export declare const HookMultiSelect: React.FC<HookMultiSelectProps>;
|
|
50
54
|
export {};
|
|
@@ -8,6 +8,9 @@ declare type Props = {
|
|
|
8
8
|
className?: string;
|
|
9
9
|
isDisabled?: boolean;
|
|
10
10
|
containerClass?: string;
|
|
11
|
+
onChange?: (value: string) => void;
|
|
12
|
+
labelVariant?: 'floating' | 'static';
|
|
13
|
+
label?: string;
|
|
11
14
|
};
|
|
12
|
-
export declare const TimeGrainField: ({ isShowlabel, timeGrainValue, setTimeGrainValue, register, className, isDisabled, containerClass, }: Props) => JSX.Element;
|
|
15
|
+
export declare const TimeGrainField: ({ isShowlabel, timeGrainValue, setTimeGrainValue, register, className, isDisabled, containerClass, onChange, labelVariant, label, }: Props) => JSX.Element;
|
|
13
16
|
export {};
|