@databrainhq/plugin 0.10.12 → 0.10.13

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.
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ declare const PivotTable: ({ data, pivotSettings }: any) => JSX.Element;
3
+ export default PivotTable;
@@ -1,9 +1,10 @@
1
1
  import React from 'react';
2
- import { ChartSettingsType } from '@/types';
2
+ import { ChartSettingsType, DatasetSettings } from '@/types';
3
3
  type Props = {
4
4
  data?: Record<string, any>[];
5
5
  chartSettings: ChartSettingsType;
6
6
  setChartSettings: React.Dispatch<React.SetStateAction<ChartSettingsType>>;
7
+ datasetSettings: DatasetSettings | undefined;
7
8
  };
8
- export declare const ChartConfig: ({ data, chartSettings, setChartSettings, }: Props) => JSX.Element;
9
+ export declare const ChartConfig: ({ data, chartSettings, setChartSettings, datasetSettings, }: Props) => JSX.Element;
9
10
  export {};
@@ -1,9 +1,10 @@
1
1
  import React from 'react';
2
- import { ChartSettingsType } from '@/types';
2
+ import { ChartSettingsType, DatasetSettings } from '@/types';
3
3
  import { PopoverMenuProps } from '@/components/PopoverMenu';
4
4
  export type ChartSettingsPopupProps = Partial<Pick<PopoverMenuProps, 'buttonClass' | 'menuClass' | 'menuContainerClass' | 'position' | 'className'>> & {
5
5
  data?: Record<string, any>[];
6
6
  settings: ChartSettingsType;
7
7
  setSettings: React.Dispatch<React.SetStateAction<ChartSettingsType>>;
8
+ datasetSettings: DatasetSettings | undefined;
8
9
  };
9
- export declare const ChartSettingsPopup: ({ data, settings, setSettings, buttonClass, menuClass, menuContainerClass, className, position, }: ChartSettingsPopupProps) => JSX.Element;
10
+ export declare const ChartSettingsPopup: ({ data, settings, setSettings, buttonClass, menuClass, menuContainerClass, className, position, datasetSettings, }: ChartSettingsPopupProps) => JSX.Element;
@@ -1,9 +1,11 @@
1
1
  import React from 'react';
2
2
  import { ChartSettingsType } from '@/types/app';
3
+ import { DatasetSettings } from '@/types';
3
4
  type Props = {
4
5
  data: any[] | undefined;
5
6
  chartSettings: ChartSettingsType;
6
7
  setChartSettings: React.Dispatch<React.SetStateAction<ChartSettingsType>>;
8
+ datasetSettings: DatasetSettings | undefined;
7
9
  };
8
- export declare const ChartSettings: ({ data, chartSettings, setChartSettings, }: Props) => JSX.Element;
10
+ export declare const ChartSettings: ({ data, chartSettings, setChartSettings, datasetSettings, }: Props) => JSX.Element;
9
11
  export {};
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
2
  import { ConstructMetricProps } from '@/types/metricCreate';
3
- export declare const ConstructMetric: ({ dateTimeColumnList, columnList, database, companyId, tableName, setData, setError, setLoading, setQuery, clientId, clientColumn, databaseId, }: ConstructMetricProps) => JSX.Element;
3
+ export declare const ConstructMetric: ({ dateTimeColumnList, columnList, database, companyId, tableName, setData, setError, setLoading, setQuery, clientId, clientColumn, databaseId, datasetSettings, setDatasetSettings, }: ConstructMetricProps) => JSX.Element;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
2
  import { ConstructMetricProps } from '@/types/metricCreate';
3
- export declare const MetricForm: ({ dateTimeColumnList, columnList, database, tableName, setData, setError, setLoading, setQuery, clientId, clientColumn, databaseId, }: ConstructMetricProps) => JSX.Element;
3
+ export declare const MetricForm: ({ dateTimeColumnList, columnList, database, tableName, setData, setError, setLoading, setQuery, clientId, clientColumn, databaseId, datasetSettings, setDatasetSettings, }: ConstructMetricProps) => JSX.Element;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
2
  import { MetricOutputProps } from '@/types/metricCreate';
3
- export declare const MetricOutput: ({ data, error, isLoading, previewTableDataList, moreTabs, chartColors, chartSettings, setChartSettings, isUpdateMetric, }: MetricOutputProps) => JSX.Element;
3
+ export declare const MetricOutput: ({ data, error, isLoading, previewTableDataList, moreTabs, chartColors, chartSettings, setChartSettings, isUpdateMetric, datasetSettings, }: MetricOutputProps) => JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { ClickActionsConfig, ChartSettingsType } from '@/types';
2
+ import { ClickActionsConfig, ChartSettingsType, DatasetSettings } from '@/types';
3
3
  type Props = {
4
4
  data?: Record<string, any>[];
5
5
  isLoading: boolean;
@@ -10,6 +10,7 @@ type Props = {
10
10
  setChartSettings: React.Dispatch<React.SetStateAction<ChartSettingsType>>;
11
11
  handleChartRightClick?: (params: any) => void;
12
12
  chartClickConfig?: ClickActionsConfig['chart'];
13
+ datasetSettings: DatasetSettings | undefined;
13
14
  };
14
- export declare const ChartTab: ({ data, isLoading, headerChild, chartSettings, setChartSettings, chartColors, handleChartRightClick, chartClickConfig, chartPopupChild, }: Props) => JSX.Element;
15
+ export declare const ChartTab: ({ data, isLoading, headerChild, chartSettings, setChartSettings, chartColors, handleChartRightClick, chartClickConfig, chartPopupChild, datasetSettings, }: Props) => JSX.Element;
15
16
  export {};
@@ -20,6 +20,7 @@ export declare const CHART_TYPES: {
20
20
  boxplot: string;
21
21
  table: string;
22
22
  timeSeries: string;
23
+ pivot: string;
23
24
  };
24
25
  export declare const STATUS_TAB = "STATUS_TAB";
25
26
  export declare const STREAM_TAB = "STREAM_TAB";
@@ -1,6 +1,7 @@
1
1
  import { FieldValues } from 'react-hook-form';
2
2
  import { ExternalMetrics } from '@/utils/generated/graphql';
3
3
  import { DashboardType, GroupBy, RlsFilterObjectType, SelectedColumns, ChartSettingsType } from '@/types/app';
4
+ import { DatasetSettings } from '@/types';
4
5
  type Params = {
5
6
  onSuccess: () => void;
6
7
  companyIntegrationId: string | undefined;
@@ -23,8 +24,9 @@ type Params = {
23
24
  selectedGroupBy: string[];
24
25
  groupBy: GroupBy | undefined;
25
26
  metric?: ExternalMetrics;
27
+ datasetMetricSettings?: DatasetSettings;
26
28
  };
27
- export declare const useExternalMetric: ({ onSuccess, companyIntegrationId, selectedColumns, query, metricQuery, integrationName, outputColumns, chartSettings, clientId, companyId, isLiveMode, timeGrain, dashboardIds, isEnableGroupBy, groupBy, selectedGroupBy, userProvidedDashboardId, metric, }: Params) => {
29
+ export declare const useExternalMetric: ({ onSuccess, companyIntegrationId, selectedColumns, query, metricQuery, integrationName, outputColumns, chartSettings, clientId, companyId, isLiveMode, timeGrain, dashboardIds, isEnableGroupBy, groupBy, selectedGroupBy, userProvidedDashboardId, metric, datasetMetricSettings, }: Params) => {
28
30
  createExternalMetric: (data: FieldValues) => void;
29
31
  updateExternalMetric: (data: FieldValues) => void;
30
32
  error: string;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { ChartSettingsType, FloatingDropDownOption, RlsCondition } from '@/types';
2
+ import { ChartSettingsType, FloatingDropDownOption, RlsCondition, DatasetSettings } from '@/types';
3
3
  import { ExternalMetrics } from '@/utils/generated/graphql';
4
4
  import { MetricCardProps } from '@/components';
5
5
  type UseMetricCardProps = {
@@ -13,6 +13,8 @@ type UseMetricCardProps = {
13
13
  param: any;
14
14
  filterValues: Record<string, any>;
15
15
  };
16
+ datasetSettings?: DatasetSettings;
17
+ setDatasetSettings?: React.Dispatch<React.SetStateAction<DatasetSettings>>;
16
18
  };
17
19
  export declare const useMetricCard: ({ metric, globalFilters, rlsFilters, clientId, chartSettings, setChartSettings, tenancyLevel, }: UseMetricCardProps) => {
18
20
  onDrillDown: (params: any) => void;