@databrainhq/plugin 0.14.40 → 0.14.42

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.
@@ -7,6 +7,7 @@ type Props = {
7
7
  value: string;
8
8
  onChange: (value: string) => void;
9
9
  className?: string;
10
+ isDisabled?: boolean;
10
11
  };
11
- export declare const ColorField: ({ name, value, onChange, defaultValue, placeholder, label, className, }: Props) => React.JSX.Element;
12
+ export declare const ColorField: ({ name, value, onChange, defaultValue, placeholder, label, className, isDisabled, }: Props) => React.JSX.Element;
12
13
  export {};
@@ -2,11 +2,19 @@ import React from 'react';
2
2
  export type FilterFieldType = {
3
3
  column: string;
4
4
  operator: string;
5
+ applyOnTables?: {
6
+ tableName: string;
7
+ columnName: string;
8
+ dataType: string;
9
+ }[];
5
10
  value?: string | string[] | number | number[] | boolean | boolean[] | null | Record<string, any>;
6
11
  as?: string;
7
12
  defaultValues?: any;
8
13
  filterType?: 'global' | 'horizontal';
9
14
  isFilterApplied?: boolean;
15
+ isVariableFilter?: boolean;
16
+ variableStrings?: string[];
17
+ label: string;
10
18
  };
11
19
  export type FilterFieldProps = {
12
20
  tableName: string;
@@ -1,27 +1,12 @@
1
1
  import React from 'react';
2
2
  import { FilterFieldType } from '@/components';
3
- import { FilterType, FloatingDropDownOption } from '@/types/app';
4
- export type FilterColumn = {
5
- as: string;
6
- dataType: string;
7
- name: string;
8
- isDefault?: boolean;
9
- isShowHorizontal?: boolean;
10
- label?: string;
11
- options?: FloatingDropDownOption[];
12
- isClientScoped?: boolean;
13
- clientColumn?: string;
14
- clientColumnType?: string;
15
- isManualOptions?: boolean;
16
- manualOptions?: string[];
17
- dependOn?: FloatingDropDownOption[];
18
- };
3
+ import { GlobalFilterType, GlobalFilterColumn } from '@/types/app';
19
4
  type FiltersProps = {
20
- filterList: FilterColumn[];
21
- setFilterList: React.Dispatch<React.SetStateAction<FilterColumn[]>>;
5
+ filterList: GlobalFilterColumn[];
6
+ setFilterList: React.Dispatch<React.SetStateAction<GlobalFilterColumn[]>>;
22
7
  appliedfilters: FilterFieldType[];
23
8
  setAppliedFilters: (value: React.SetStateAction<FilterFieldType[]>) => void;
24
- filters: FilterType[];
9
+ filters: GlobalFilterType[];
25
10
  internal?: {
26
11
  isInternal: boolean;
27
12
  workspaceId: string;
@@ -1,10 +1,10 @@
1
1
  import React from 'react';
2
- import { FilterType } from '@/types/app';
2
+ import { GlobalFilterType } from '@/types/app';
3
3
  import { FilterFieldType } from '@/components';
4
4
  type HorizontalFiltersProps = {
5
5
  appliedfilters: FilterFieldType[];
6
6
  setAppliedFilters: (value: React.SetStateAction<FilterFieldType[]>) => void;
7
- filters: FilterType[];
7
+ filters: GlobalFilterType[];
8
8
  internal?: {
9
9
  isInternal: boolean;
10
10
  workspaceId: string;
@@ -1,14 +1,8 @@
1
1
  import React from 'react';
2
+ import { GlobalFilterColumn } from '@/types';
2
3
  type NumberFieldProps = {
3
4
  setAppliedFilters?: any;
4
- column?: {
5
- as: any;
6
- dataType: string;
7
- name: string;
8
- isDefault?: boolean | undefined;
9
- label?: string;
10
- isShowHorizontal?: boolean;
11
- };
5
+ column?: GlobalFilterColumn;
12
6
  defaultValues?: {
13
7
  min: number | null;
14
8
  max: number | null;
@@ -1,9 +1,8 @@
1
1
  import React from 'react';
2
- import { FilterColumn } from './Filters';
3
2
  import { FilterFieldType, MetricCardProps } from '@/components';
4
- import { FilterType } from '@/types/app';
3
+ import { GlobalFilterColumn, GlobalFilterType } from '@/types/app';
5
4
  type GlobalFiltersProps = {
6
- filters: FilterType[];
5
+ filters: GlobalFilterType[];
7
6
  onApply: (filters: MetricCardProps['globalFilters']) => void;
8
7
  renderAdditionalHeaderContent?: () => JSX.Element;
9
8
  internal?: {
@@ -26,10 +25,10 @@ export declare const getFormattedFilterValue: (obj: {
26
25
  }) => any;
27
26
  export declare const GlobalFilters: React.FC<GlobalFiltersProps>;
28
27
  type FilterPopupProps = {
29
- filters: FilterType[];
28
+ filters: GlobalFilterType[];
30
29
  renderAdditionalHeaderContent?: () => JSX.Element;
31
- filterList: FilterColumn[];
32
- setFilterList: React.Dispatch<React.SetStateAction<FilterColumn[]>>;
30
+ filterList: GlobalFilterColumn[];
31
+ setFilterList: React.Dispatch<React.SetStateAction<GlobalFilterColumn[]>>;
33
32
  appliedfilters: FilterFieldType[];
34
33
  setAppliedFilters: (value: React.SetStateAction<FilterFieldType[]>) => void;
35
34
  globalFilterRef: React.RefObject<HTMLDivElement>;