@databrainhq/plugin 0.9.12 → 0.9.14

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.
@@ -4,6 +4,7 @@ export declare type FilterFieldType = {
4
4
  operator: string;
5
5
  value?: string | string[] | number | number[] | boolean | boolean[] | null;
6
6
  as?: string;
7
+ defaultValues?: any;
7
8
  };
8
9
  export declare type FilterFieldProps = {
9
10
  tableName: string;
@@ -3,7 +3,7 @@ import { FilterFieldType } from '@/components/FilterField';
3
3
  declare type AppliedFilterProps = {
4
4
  appliedFilter: FilterFieldType[];
5
5
  setAppliedFilters: React.Dispatch<React.SetStateAction<FilterFieldType[]>>;
6
- onRemove: (filters: FilterFieldType[]) => void;
6
+ onChangeFilters: (updatedFilters: FilterFieldType[]) => void;
7
7
  };
8
- export declare const AppliedFilter: ({ appliedFilter, setAppliedFilters, onRemove, }: AppliedFilterProps) => JSX.Element;
8
+ export declare const AppliedFilter: ({ appliedFilter, setAppliedFilters, onChangeFilters, }: AppliedFilterProps) => JSX.Element;
9
9
  export default AppliedFilter;
@@ -7,8 +7,6 @@ declare type GlobalFiltersProps = {
7
7
  onApply: (filters: MetricCardProps['globalFilters']) => void;
8
8
  renderAdditionalHeaderContent?: () => JSX.Element;
9
9
  externalDashboardId: string;
10
- appliedfilters: any;
11
- setAppliedFilters: any;
12
10
  };
13
11
  export declare const getFormattedFilterValue: (obj: {
14
12
  operator: string;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ declare type SwitchProps = {
3
+ name?: string;
4
+ styles: Record<string, string>;
5
+ placeholder?: string | [string, string];
6
+ enabled?: boolean;
7
+ };
8
+ export declare const Switch: React.FC<SwitchProps>;
9
+ export {};
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ declare type ToggleProps = {
3
+ name?: string;
4
+ styles: Record<string, string>;
5
+ placeholder?: string | [string, string];
6
+ enabled?: boolean;
7
+ };
8
+ export declare const Toggle: React.FC<ToggleProps>;
9
+ export {};
@@ -2,9 +2,10 @@ import React from 'react';
2
2
  declare type SwitchButtonProps = {
3
3
  onChange?: (enabled: boolean) => void;
4
4
  enabled?: boolean;
5
+ variant?: 'switch' | 'toggle';
5
6
  label?: string;
6
7
  className?: string;
7
- placeholder?: string;
8
+ placeholder?: string | [string, string];
8
9
  labelClassName?: string;
9
10
  defaultEnabled?: boolean;
10
11
  name?: string;