@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 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)
@@ -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>) => void;
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;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export declare type LayoutAlertProps = {
3
+ onCancel: () => void;
4
+ onSave: () => void;
5
+ };
6
+ export declare const LayoutAlert: ({ onCancel, onSave }: LayoutAlertProps) => JSX.Element;
@@ -2,3 +2,4 @@ export * from './MetricList';
2
2
  export * from './components/MetricCard';
3
3
  export * from './components/SingleValueCard';
4
4
  export * from './components/ArchiveMetricModal';
5
+ export * from './components/LayoutAlert';
@@ -28,3 +28,4 @@ export * from './ToggleButton';
28
28
  export * from './Icons';
29
29
  export * from './ChartPopup';
30
30
  export * from './DrillBreadCrumb';
31
+ export * from './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
- handleLayoutChange: (_layout: Layout[], _oldItem: Layout, newItem: Layout) => Promise<void>;
7
+ saveLayout: (newLayout: Layout[]) => Promise<void>;
8
+ layout: Layout[];
8
9
  markClientLayoutChange: () => Promise<void>;
9
10
  isLayoutChanged: boolean;
10
11
  };