@databrainhq/plugin 0.14.37 → 0.14.39

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.
@@ -20,6 +20,7 @@ type Props = {
20
20
  buttonWidth?: string;
21
21
  isEnableSingleDate?: boolean;
22
22
  radius?: string;
23
+ isFilter?: boolean;
23
24
  };
24
25
  export declare const DateRangePicker: React.FC<Props>;
25
26
  export default DateRangePicker;
@@ -16,10 +16,12 @@ export type FilterDropDownProps = Omit<FloatingDropDownProps, 'options'> & {
16
16
  query: string;
17
17
  alias: string;
18
18
  };
19
+ isFilter?: boolean;
19
20
  };
20
- export declare const FilterDropDown: React.MemoExoticComponent<({ filter, onChange, selectedOption, autoSelected, workspaceId, filterClause, isDisableLabel, customTable, ...rest }: FilterDropDownProps) => React.JSX.Element>;
21
+ export declare const FilterDropDown: React.MemoExoticComponent<({ filter, onChange, selectedOption, autoSelected, workspaceId, filterClause, isDisableLabel, customTable, isFilter, ...rest }: FilterDropDownProps) => React.JSX.Element>;
21
22
  export type MultiFilterDropDownProps = Pick<FilterDropDownProps, 'autoSelected' | 'filter' | 'label' | 'workspaceId' | 'filterClause' | 'customTable'> & Omit<MultiSelectDropdownProps, 'options'> & {
22
23
  isDisablelabel?: boolean;
23
24
  radius?: string;
25
+ isFilter?: boolean;
24
26
  };
25
27
  export declare const MultiFilterDropdown: React.FC<MultiFilterDropDownProps>;
@@ -18,5 +18,6 @@ export type FloatingDropDownProps = {
18
18
  children?: React.ReactNode;
19
19
  disableAutoClose?: boolean;
20
20
  radius?: string;
21
+ isFilter?: boolean;
21
22
  };
22
- export declare const FloatingDropDown: ({ label, labelVariant, selectedOption, onChange, button, options, isDisabled, customButton, icon, buttonWidth, menuWidth, isSearchEnabled, searchPlaceholder, placeholder, children, radius, disableAutoClose, }: FloatingDropDownProps) => React.JSX.Element;
23
+ export declare const FloatingDropDown: ({ label, labelVariant, selectedOption, onChange, button, options, isDisabled, customButton, icon, buttonWidth, menuWidth, isSearchEnabled, searchPlaceholder, placeholder, children, radius, isFilter, disableAutoClose, }: FloatingDropDownProps) => React.JSX.Element;
@@ -22,6 +22,7 @@ type NumberFieldProps = {
22
22
  variant?: 'static' | 'floating';
23
23
  buttonWidth?: string;
24
24
  radius?: string;
25
+ isFilter?: boolean;
25
26
  };
26
- export declare const NumberFilterField: ({ setAppliedFilters, column, defaultValues, className, onChange, label, variant, buttonWidth, radius, }: NumberFieldProps) => React.JSX.Element;
27
+ export declare const NumberFilterField: ({ setAppliedFilters, column, defaultValues, className, onChange, label, variant, buttonWidth, radius, isFilter, }: NumberFieldProps) => React.JSX.Element;
27
28
  export default NumberFilterField;
@@ -25,6 +25,7 @@ export type MultiSelectDropdownProps = Omit<MultiSelectAccordianDropdownProps, '
25
25
  options: FloatingDropDownOption[];
26
26
  isShowSelectedOptions?: boolean;
27
27
  radius?: string;
28
+ isFilter?: boolean;
28
29
  };
29
30
  export declare const MultiSelectAccordianDropdown: ({ label, labelVariant, selectedOption, onChange, button, options, isDisabled, icon, buttonWidth, menuWidth, isSearchEnabled, searchIcon, closeControl, searchPlaceholder, radius, }: MultiSelectAccordianDropdownProps) => React.JSX.Element;
30
- export declare const MultiSelectDropdown: ({ label, labelVariant, selectedOption, onChange, button, options, isDisabled, icon, buttonWidth, menuWidth, isSearchEnabled, searchIcon, closeControl, searchPlaceholder, isShowSelectedOptions, radius, }: MultiSelectDropdownProps) => React.JSX.Element;
31
+ export declare const MultiSelectDropdown: ({ label, labelVariant, selectedOption, onChange, button, options, isDisabled, icon, buttonWidth, menuWidth, isSearchEnabled, searchIcon, closeControl, searchPlaceholder, isShowSelectedOptions, radius, isFilter, }: MultiSelectDropdownProps) => React.JSX.Element;
@@ -44,4 +44,6 @@ export declare const METRIC_SHARE_CSV_PATH: string;
44
44
  export declare const METRIC_SHARE_CSV_MUTATION = "invokeShareCsv";
45
45
  export declare const METRIC_MARK_ARCHIVED_PATH: string;
46
46
  export declare const METRIC_MARK_ARCHIVED_MUTATION = "markArchived";
47
+ export declare const METRIC_EXECUTE_PYTHON_CODE_PATH: string;
48
+ export declare const METRIC_EXECUTE_PYTHON_CODE_MUTATION = "executePython";
47
49
  export declare const METRIC_DOWNLOAD_RAW_CSV_PATH: string;
@@ -8,3 +8,4 @@ export * from './useArchiveMetric';
8
8
  export * from './useEmbeddedMetric';
9
9
  export * from './useDrag';
10
10
  export * from './useDrop';
11
+ export * from './usePythonResults';
@@ -15,5 +15,6 @@ declare const useDownloadRawCsv: ({ onCloseModal, sharingSettingsId, metricItem,
15
15
  register: import("react-hook-form").UseFormRegister<FieldValues>;
16
16
  control: import("react-hook-form").Control<FieldValues, any>;
17
17
  setValue: import("react-hook-form").UseFormSetValue<FieldValues>;
18
+ errors: import("react-hook-form").FieldErrors<FieldValues>;
18
19
  };
19
20
  export default useDownloadRawCsv;
@@ -0,0 +1,17 @@
1
+ import { RlsCondition, SqlError, TableColumn } from '@/types';
2
+ export declare const usePythonResults: ({ setError, setLoading, setData, }: {
3
+ setError?: ((error: SqlError) => void) | undefined;
4
+ setLoading?: ((loading: boolean) => void) | undefined;
5
+ setData?: ((data: Record<string, any>[]) => void) | undefined;
6
+ }) => {
7
+ pythonResult: Record<string, any>[];
8
+ pythonError: string;
9
+ isLoadingPython: boolean;
10
+ pythonColumns: TableColumn[];
11
+ executePython: ({ code, clientId, rlsConditions, companyId, }: {
12
+ code: string;
13
+ clientId?: string | undefined;
14
+ rlsConditions?: RlsCondition[] | undefined;
15
+ companyId: string;
16
+ }) => Promise<void>;
17
+ };
@@ -24,5 +24,6 @@ declare const useScheduleEmail: ({ onCancel }: Params) => {
24
24
  scheduleReportConfig: any;
25
25
  onDelete: (e?: import("react").BaseSyntheticEvent<object, any, any> | undefined) => Promise<void>;
26
26
  isDeleted: boolean;
27
+ errors: import("react-hook-form").FieldErrors<FieldValues>;
27
28
  };
28
29
  export default useScheduleEmail;
@@ -1,4 +1,4 @@
1
- import { UseMetricColumnMutationInputType, UseMetricUnderlyingDataMutationInputType, UseMetricShareCsvMutationInputType, UseMarkArchivedMutationInputType } from '@/types/queryTypes';
1
+ import { UseMetricColumnMutationInputType, UseMetricUnderlyingDataMutationInputType, UseMetricShareCsvMutationInputType, UseMarkArchivedMutationInputType, UseExecutePythonMutationInputType } from '@/types/queryTypes';
2
2
  export declare const useMetricColumnMutation: () => import("react-query").UseMutationResult<{
3
3
  data: unknown;
4
4
  }, unknown, UseMetricColumnMutationInputType, unknown>;
@@ -11,3 +11,6 @@ export declare const useMetricShareCsvMutation: () => import("react-query").UseM
11
11
  export declare const useMarkArchivedMutation: () => import("react-query").UseMutationResult<{
12
12
  data: unknown;
13
13
  }, unknown, UseMarkArchivedMutationInputType, unknown>;
14
+ export declare const useExecutePythonMutation: () => import("react-query").UseMutationResult<{
15
+ data: unknown;
16
+ }, unknown, UseExecutePythonMutationInputType, unknown>;
@@ -514,6 +514,7 @@ export type AdminThemeOptionsType = {
514
514
  selectBoxSize?: 'small' | 'medium' | 'large';
515
515
  selectBoxVariant?: 'floating' | 'static';
516
516
  selectBoxBorderRadius?: string;
517
+ selectBoxTextColor?: string;
517
518
  };
518
519
  cardDescription: {
519
520
  fontSize?: string;
@@ -1,3 +1,4 @@
1
+ import { RlsCondition } from './app';
1
2
  import { DatasetMetricCreationConfiguration } from './metricCreate';
2
3
  export type UseDashboardDataQueryInputType = {
3
4
  token: string;
@@ -113,6 +114,12 @@ export type UseMarkArchivedMutationInputType = {
113
114
  id?: string;
114
115
  clientId?: string;
115
116
  };
117
+ export type UseExecutePythonMutationInputType = {
118
+ code: string;
119
+ clientId?: string;
120
+ companyId: string;
121
+ rlsConditions?: RlsCondition[];
122
+ };
116
123
  export type ExternalMetricsInsertInput = {
117
124
  chartOptions?: any;
118
125
  clientDeletedMetrics?: any;