@databrainhq/plugin 0.8.16 → 0.8.18
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/FilterDropDown/index.d.ts +1 -1
- package/dist/components/MetricFilterDropDown/index.d.ts +4 -3
- package/dist/components/MetricList/components/LayoutAlert.d.ts +6 -0
- package/dist/components/MetricList/index.d.ts +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/hooks/useClientDashboardLayout.d.ts +2 -1
- package/dist/index.es.js +864 -715
- package/dist/index.umd.js +90 -77
- package/dist/style.css +1 -1
- package/dist/types/app.d.ts +1 -1
- package/dist/typings.d.ts +17 -17
- package/dist/utils/generated/graphql.d.ts +233 -0
- package/package.json +98 -98
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)
|
|
@@ -7,5 +7,5 @@ export declare type FilterDropDownProps = Omit<FloatingDropDownProps, 'options'
|
|
|
7
7
|
autoSelected?: boolean;
|
|
8
8
|
};
|
|
9
9
|
export declare const FilterDropDown: ({ companyId, filter, onChange, selectedOption, autoSelected, ...rest }: FilterDropDownProps) => JSX.Element;
|
|
10
|
-
export declare type MultiFilterDropDownProps = Pick<FilterDropDownProps, 'autoSelected' | 'companyId' | 'filter'> & Omit<MultiFloatingDropDownProps, 'options' | 'isDisabled'>;
|
|
10
|
+
export declare type MultiFilterDropDownProps = Pick<FilterDropDownProps, 'autoSelected' | 'companyId' | 'filter' | 'label'> & Omit<MultiFloatingDropDownProps, 'options' | 'isDisabled'>;
|
|
11
11
|
export declare const MultiFilterDropdown: React.FC<MultiFilterDropDownProps>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { RlsCondition } from '@/types';
|
|
2
|
+
import { FloatingDropDownOption, RlsCondition } from '@/types';
|
|
3
3
|
declare type Props = {
|
|
4
4
|
rlsConditions?: RlsCondition[] | undefined;
|
|
5
|
-
onChangeFilterValue?: (name: string, value: string, customValue?: Record<string, Date
|
|
5
|
+
onChangeFilterValue?: (name: string, value: string, customValue?: Record<string, Date>, stringValues?: FloatingDropDownOption[]) => void;
|
|
6
|
+
companyId: string;
|
|
6
7
|
};
|
|
7
|
-
declare const MetricFilterDropDown: ({ rlsConditions, onChangeFilterValue, }: Props) => JSX.Element;
|
|
8
|
+
export declare const MetricFilterDropDown: ({ rlsConditions, onChangeFilterValue, companyId, }: Props) => JSX.Element;
|
|
8
9
|
export default MetricFilterDropDown;
|
|
@@ -4,7 +4,8 @@ export declare type UseClientDashboardLayoutProps = {
|
|
|
4
4
|
clientId: string;
|
|
5
5
|
};
|
|
6
6
|
export declare const useClientDashboardLayout: ({ externalDashboardId, clientId, }: UseClientDashboardLayoutProps) => {
|
|
7
|
-
|
|
7
|
+
saveLayout: (newLayout: Layout[]) => Promise<void>;
|
|
8
|
+
layout: Layout[];
|
|
8
9
|
markClientLayoutChange: () => Promise<void>;
|
|
9
10
|
isLayoutChanged: boolean;
|
|
10
11
|
};
|