@databrainhq/plugin 0.14.55 → 0.14.57
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/dist/components/Chart/index.d.ts +4 -2
- package/dist/components/Icons/Logos/index.d.ts +2 -0
- package/dist/components/MetricCreation/components/MetricOutput/MetricOutput.d.ts +1 -1
- package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/index.d.ts +3 -2
- package/dist/components/MetricList/MetricList.d.ts +1 -0
- package/dist/components/MetricList/components/FullScreenView/index.d.ts +4 -1
- package/dist/components/MetricList/components/MetricCards/MetricCard.d.ts +4 -1
- package/dist/components/PivotTable/PivotTableV2.d.ts +7 -1
- package/dist/components/Text/index.d.ts +1 -1
- package/dist/consts/api.d.ts +4 -2
- package/dist/consts/metricOptions.d.ts +3 -1
- package/dist/helpers/createMetric.d.ts +9 -0
- package/dist/helpers/getColumnType.d.ts +1 -1
- package/dist/helpers/index.d.ts +1 -0
- package/dist/hooks/useDatasetMetric.d.ts +2 -1
- package/dist/hooks/useGenerateMetric.d.ts +3 -2
- package/dist/hooks/useMetricCard.d.ts +7 -2
- package/dist/queries/index.d.ts +1 -0
- package/dist/queries/metric.mutation.d.ts +9 -1
- package/dist/queries/metric.query.d.ts +6 -1
- package/dist/types/app.d.ts +24 -2
- package/dist/types/metricCreate.d.ts +31 -4
- package/dist/types/queryTypes.d.ts +5 -0
- package/dist/usa-c14e93e4.mjs +15112 -0
- package/dist/utils/fetcher.d.ts +2 -0
- package/dist/webcomponents.es.js +46052 -45406
- package/dist/webcomponents.umd.js +203 -202
- package/dist/world-8db01cf5.mjs +45896 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ChartSettingsType } from '@/types';
|
|
2
|
+
import { ChartSettingsType, OnDrillPivotTableParams, PivotDrillState } from '@/types';
|
|
3
3
|
export type ChartProps = {
|
|
4
4
|
chartOptions: ChartSettingsType;
|
|
5
5
|
data: Record<string, any>[];
|
|
@@ -11,6 +11,8 @@ export type ChartProps = {
|
|
|
11
11
|
isShowFullScreenEnabled?: boolean;
|
|
12
12
|
filterValues?: Record<string, any>;
|
|
13
13
|
onMaximize?: () => void;
|
|
14
|
+
onDrillPivotTable?: (value: OnDrillPivotTableParams) => void;
|
|
15
|
+
pivotDrillState: PivotDrillState;
|
|
14
16
|
};
|
|
15
17
|
/**
|
|
16
18
|
* @name Chart - The metric visualization component.
|
|
@@ -22,4 +24,4 @@ export type ChartProps = {
|
|
|
22
24
|
* @prop colors (optional) - the admin provided chart color palettes.
|
|
23
25
|
* @returns JSX - chart visaulization content.
|
|
24
26
|
*/
|
|
25
|
-
export declare const Chart: React.MemoExoticComponent<({ chartOptions, data, events, colors, config, className, isShowFullScreen, isShowFullScreenEnabled, onMaximize, }: ChartProps) => React.JSX.Element>;
|
|
27
|
+
export declare const Chart: React.MemoExoticComponent<({ chartOptions, data, events, colors, config, className, isShowFullScreen, isShowFullScreenEnabled, onMaximize, onDrillPivotTable, pivotDrillState, }: ChartProps) => React.JSX.Element>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MetricOutputProps } from '@/types/metricCreate';
|
|
3
|
-
export declare const MetricOutput: ({ data, error, isLoading, previewTableDataList, moreTabs, chartColors, chartSettings, setChartSettings, isUpdateMetric, isDisableSqlBtn, setShowSqlModal, isEnablePivotTable, groupbyList, hasNumberKeys, isEnableGauge, outputHeaderProps, metrics, dimensions, onGenerateChart, setMetrics, setColumn, isEnableSingleDimension, isEnableSingleMetrics, functionOptions, configuration, dbName, }: MetricOutputProps) => React.JSX.Element;
|
|
3
|
+
export declare const MetricOutput: ({ data, error, isLoading, previewTableDataList, moreTabs, chartColors, chartSettings, setChartSettings, isUpdateMetric, isDisableSqlBtn, setShowSqlModal, isEnablePivotTable, groupbyList, hasNumberKeys, isEnableGauge, outputHeaderProps, metrics, dimensions, onGenerateChart, setMetrics, setColumn, isEnableSingleDimension, isEnableSingleMetrics, functionOptions, configuration, dbName, pivotDrillState, }: MetricOutputProps) => React.JSX.Element;
|
package/dist/components/MetricCreation/components/MetricOutput/components/ChartTab/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ClickActionsConfig, ChartSettingsType } from '@/types';
|
|
2
|
+
import { ClickActionsConfig, ChartSettingsType, PivotDrillState } from '@/types';
|
|
3
3
|
type Props = {
|
|
4
4
|
data?: Record<string, any>[];
|
|
5
5
|
isLoading: boolean;
|
|
@@ -15,6 +15,7 @@ type Props = {
|
|
|
15
15
|
hasNumberKeys: boolean;
|
|
16
16
|
isEnableGauge: boolean;
|
|
17
17
|
error: string;
|
|
18
|
+
pivotDrillState: PivotDrillState;
|
|
18
19
|
};
|
|
19
|
-
export declare const ChartTab: ({ data, isLoading, headerChild, chartSettings, setChartSettings, chartColors, handleChartRightClick, chartClickConfig, chartPopupChild, isEnablePivotTable, groupbyList, hasNumberKeys, isEnableGauge, error, }: Props) => React.JSX.Element;
|
|
20
|
+
export declare const ChartTab: ({ data, isLoading, headerChild, chartSettings, setChartSettings, chartColors, handleChartRightClick, chartClickConfig, chartPopupChild, isEnablePivotTable, groupbyList, hasNumberKeys, isEnableGauge, pivotDrillState, error, }: Props) => React.JSX.Element;
|
|
20
21
|
export {};
|
|
@@ -15,6 +15,7 @@ export type FullScreenViewProps = {
|
|
|
15
15
|
onMinimize: () => void;
|
|
16
16
|
onArchive?: (metricId: string) => void;
|
|
17
17
|
clientId: string;
|
|
18
|
+
encryptedClient?: string;
|
|
18
19
|
tenancyLevel: string;
|
|
19
20
|
externalDashboardId: string;
|
|
20
21
|
userProvidedDashboardId: string;
|
|
@@ -31,5 +32,7 @@ export type FullScreenViewProps = {
|
|
|
31
32
|
id: string;
|
|
32
33
|
isInProgress: boolean;
|
|
33
34
|
}[];
|
|
35
|
+
isFrontendApp: boolean;
|
|
36
|
+
guestToken?: string;
|
|
34
37
|
};
|
|
35
|
-
export declare const FullScreenView: ({ metric, colors, rlsFilters, metricFilterOptions, onMinimize, onArchive, clientId, tenancyLevel, companyId, externalDashboardId, userProvidedDashboardId, isAllowedToUpdateMetrics, sharingSettingsId, appFilters, isInternalApp, isShowChartConfigTab, isHideChartSettings, isHideTablePreview, isAllClient, globalFilters, onDownload, downloadMetrics, }: FullScreenViewProps) => React.JSX.Element;
|
|
38
|
+
export declare const FullScreenView: ({ metric, colors, rlsFilters, metricFilterOptions, onMinimize, onArchive, clientId, tenancyLevel, companyId, externalDashboardId, userProvidedDashboardId, isAllowedToUpdateMetrics, sharingSettingsId, appFilters, isInternalApp, isShowChartConfigTab, isHideChartSettings, isHideTablePreview, isAllClient, globalFilters, onDownload, downloadMetrics, isFrontendApp, guestToken, encryptedClient, }: FullScreenViewProps) => React.JSX.Element;
|
|
@@ -10,6 +10,7 @@ export type MetricCardProps = {
|
|
|
10
10
|
};
|
|
11
11
|
metricItem: any;
|
|
12
12
|
client: ClientType['value'];
|
|
13
|
+
encryptedClient?: ClientType['value'];
|
|
13
14
|
onMaximize?: (metric: ExternalMetrics, rlsFilters?: {
|
|
14
15
|
param: any;
|
|
15
16
|
filterValues: Record<string, string>;
|
|
@@ -59,5 +60,7 @@ export type MetricCardProps = {
|
|
|
59
60
|
label?: string;
|
|
60
61
|
};
|
|
61
62
|
};
|
|
63
|
+
isFrontendApp: boolean;
|
|
64
|
+
guestToken?: string;
|
|
62
65
|
};
|
|
63
|
-
export declare const MetricCard: ({ globalFilters, metricItem, onMaximize, client, colors, param, companyTenancyType, renderHeaderName, isDisableCardClick, onArchive, chartRendererType, isDisableMorePopup, appFilters, isInternalApp, setCrossDashboardFilters, crossDashboardFilters, metricFilterOptions, onDownloadRawCsv, enableDownloadCsv, enableMultiMetricFilters, disableActions, metricFilterPosition, isAllClient, dropdownTheme, optionsIcon, downloadMetrics, onDownload, appearanceOptions, }: MetricCardProps) => React.JSX.Element;
|
|
66
|
+
export declare const MetricCard: ({ globalFilters, metricItem, onMaximize, client, colors, param, companyTenancyType, renderHeaderName, isDisableCardClick, onArchive, chartRendererType, isDisableMorePopup, appFilters, isInternalApp, setCrossDashboardFilters, crossDashboardFilters, metricFilterOptions, onDownloadRawCsv, enableDownloadCsv, enableMultiMetricFilters, disableActions, metricFilterPosition, isAllClient, dropdownTheme, optionsIcon, downloadMetrics, onDownload, appearanceOptions, isFrontendApp, guestToken, encryptedClient, }: MetricCardProps) => React.JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { Aggregate, OnDrillPivotTableParams, PivotDrillState } from '@/types';
|
|
2
3
|
type DataRow = Record<string, any>;
|
|
3
4
|
type PivotTableProps = {
|
|
4
5
|
data: DataRow[];
|
|
@@ -10,8 +11,13 @@ type PivotTableProps = {
|
|
|
10
11
|
color?: string;
|
|
11
12
|
isEnabled?: boolean;
|
|
12
13
|
};
|
|
14
|
+
measures: Aggregate[];
|
|
15
|
+
isEnableStripedRows: boolean;
|
|
16
|
+
dimensions: string[];
|
|
17
|
+
onDrillPivotTable?: (value: OnDrillPivotTableParams) => void;
|
|
18
|
+
pivotDrillState: PivotDrillState;
|
|
13
19
|
};
|
|
14
|
-
export declare const PivotTableV2: ({ props: { data, rows, columns, values, headerSettings }, }: {
|
|
20
|
+
export declare const PivotTableV2: ({ props: { data, rows, columns, values, headerSettings, measures, isEnableStripedRows, dimensions, onDrillPivotTable, pivotDrillState, }, }: {
|
|
15
21
|
props: PivotTableProps;
|
|
16
22
|
}) => React.JSX.Element;
|
|
17
23
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Colors } from '@/types';
|
|
3
3
|
interface Props {
|
|
4
|
-
variant?: 'heading-lg' | 'heading' | 'body-text-lg' | 'body-text' | 'body-text-sm' | 'btn' | 'label' | 'display' | 'body-text-xs';
|
|
4
|
+
variant?: 'heading-xl' | 'heading-lg' | 'heading' | 'body-text-lg' | 'body-text' | 'body-text-sm' | 'btn' | 'label' | 'sub-label' | 'display' | 'body-text-xs';
|
|
5
5
|
color?: Colors;
|
|
6
6
|
children: React.ReactNode;
|
|
7
7
|
onClick?: () => void;
|
package/dist/consts/api.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare const API_BASE_URL: any;
|
|
2
2
|
export declare const DASHBOARD_PATH = "/api/v2/dashboard";
|
|
3
3
|
export declare const METRIC_PATH = "/api/v2/metric";
|
|
4
|
+
export declare const NEW_METRIC_PATH = "/api/v3/metric";
|
|
4
5
|
export declare const DASHBOARD_DATA_QUERY = "dashboardData";
|
|
5
6
|
export declare const DASHBOARD_EMBEDDED_METRIC_PATH: string;
|
|
6
7
|
export declare const DASHBOARD_EMBEDDED_METRIC_QUERY = "embeddedMetric";
|
|
@@ -33,7 +34,10 @@ export declare const DASHBOARD_CHAT_RESPONSE_MUTATION = "getOpenaiChatResponse";
|
|
|
33
34
|
export declare const DASHBOARD_THEME_PATH: string;
|
|
34
35
|
export declare const DASHBOARD_THEME_QUERY = "getTheme";
|
|
35
36
|
export declare const METRIC_QUERY_PATH: string;
|
|
37
|
+
export declare const NEW_METRIC_QUERY_PATH: string;
|
|
36
38
|
export declare const METRIC_QUERY_QUERY = "query";
|
|
39
|
+
export declare const NEW_METRIC_DATASET_METRIC_PATH: string;
|
|
40
|
+
export declare const NEW_METRIC_DATASET_METRIC_MUTATION = "newDatasetMetricCreation";
|
|
37
41
|
export declare const METRIC_RAW_DOWNLOAD_SETTINGS_PATH: string;
|
|
38
42
|
export declare const METRIC_RAW_DOWNLOAD_SETTINGS_QUERY = "rawDownloadSettings";
|
|
39
43
|
export declare const METRIC_COLUMN_PATH: string;
|
|
@@ -47,5 +51,3 @@ export declare const METRIC_MARK_ARCHIVED_MUTATION = "markArchived";
|
|
|
47
51
|
export declare const METRIC_EXECUTE_PYTHON_CODE_PATH: string;
|
|
48
52
|
export declare const METRIC_EXECUTE_PYTHON_CODE_MUTATION = "executePython";
|
|
49
53
|
export declare const METRIC_DOWNLOAD_RAW_CSV_PATH: string;
|
|
50
|
-
export declare const WORLD_MAP_PATH = "../../utils/world.json";
|
|
51
|
-
export declare const USA_MAP_PATH = "../../utils/usa.json";
|
|
@@ -123,11 +123,12 @@ export declare const REDSHIFT = "redshift";
|
|
|
123
123
|
export declare const SNOWFLAKE = "snowflake";
|
|
124
124
|
export declare const BIGQUERY = "bigquery";
|
|
125
125
|
export declare const MYSQL = "mysql";
|
|
126
|
+
export declare const MSSQL = "mssql";
|
|
126
127
|
export declare const POSTGRES = "postgres";
|
|
127
128
|
export declare const MONGODB = "mongodb";
|
|
128
129
|
export declare const DATABRICKS = "databricks";
|
|
129
130
|
export declare const CLICKHOUSE = "clickhouse";
|
|
130
|
-
export declare const
|
|
131
|
+
export declare const AWSS3 = "awss3";
|
|
131
132
|
export declare const DOWNLOAD_DATA_OPTIONS: {
|
|
132
133
|
RAW_DATA: string;
|
|
133
134
|
DOWNLOAD_WITHOUT_FILTERS: string;
|
|
@@ -141,3 +142,4 @@ export declare const CAST_COLUMN_AS: {
|
|
|
141
142
|
label: string;
|
|
142
143
|
icon: string;
|
|
143
144
|
}[];
|
|
145
|
+
export declare const arithmeticOperators: FloatingDropDownOption[];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Aggregate, Dimension, FloatingDropDownOption, RlsCondition, SelectedColumn } from '@/types';
|
|
2
|
+
export declare const functionOptions: (col?: SelectedColumn, dataType?: string) => FloatingDropDownOption[];
|
|
3
|
+
export declare const getColumnType: (column: SelectedColumn) => "default" | "custom" | "arithmetic_column";
|
|
4
|
+
export declare const getDimensionsAndAggregates: (columns: SelectedColumn[]) => {
|
|
5
|
+
dimensions: Dimension[];
|
|
6
|
+
aggregates: Aggregate[];
|
|
7
|
+
};
|
|
8
|
+
export declare const getChartFields: (colList: SelectedColumn[], dbName: string) => string[];
|
|
9
|
+
export declare const getAppliedFilters: (filterList: RlsCondition[], companyTenancyType: string, clientId: string) => RlsCondition[];
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const getColumnTypes: (data: Record<string, any>[]) => Record<string, string>;
|
|
1
|
+
export declare const getColumnTypes: (data: Record<string, any>[]) => Record<string, string>;
|
|
2
2
|
export default getColumnTypes;
|
package/dist/helpers/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import ReactAce from 'react-ace/lib/ace';
|
|
3
|
-
import { CreateNewFilter, CreateNewSort, DatasetConfig, DatasetMetricCreationConfiguration, FloatingDropDownOption, SelectedColumn, TableType } from '@/types';
|
|
3
|
+
import { CreateNewFilter, CreateNewSort, DatasetConfig, DatasetMetricCreationConfiguration, FloatingDropDownOption, PivotDrillState, SelectedColumn, TableType } from '@/types';
|
|
4
4
|
declare const useDatasetMetric: ({ ...config }: DatasetConfig) => {
|
|
5
5
|
configuration: DatasetMetricCreationConfiguration;
|
|
6
6
|
setConfiguration: import("react").Dispatch<import("react").SetStateAction<DatasetMetricCreationConfiguration>>;
|
|
@@ -41,5 +41,6 @@ declare const useDatasetMetric: ({ ...config }: DatasetConfig) => {
|
|
|
41
41
|
label: string;
|
|
42
42
|
}[];
|
|
43
43
|
getChartFields: (colList: SelectedColumn[]) => string[];
|
|
44
|
+
pivotDrillState: PivotDrillState;
|
|
44
45
|
};
|
|
45
46
|
export default useDatasetMetric;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { FieldValues } from 'react-hook-form';
|
|
3
3
|
import EChartsReact from 'echarts-for-react';
|
|
4
4
|
import { ColumnSizingState } from '@tanstack/react-table';
|
|
5
|
-
import { ChartSettingsType, ConfigType, FloatingDropDownOption, GenerateMetricState, OnChangeAliasParams, OnChangeHelperFunctionParams, SelectedColumn, SetChartFieldParams, TableObjectType } from '@/types';
|
|
5
|
+
import { ChartSettingsType, ConfigType, FloatingDropDownOption, GenerateMetricState, OnChangeAliasParams, OnChangeHelperFunctionParams, PivotDrillState, SelectedColumn, SetChartFieldParams, TableObjectType } from '@/types';
|
|
6
6
|
declare const useGenerateMetric: (config: ConfigType) => {
|
|
7
7
|
isDisableSaveBtn: boolean;
|
|
8
8
|
setChartSettings: import("react").Dispatch<import("react").SetStateAction<ChartSettingsType>>;
|
|
@@ -45,7 +45,7 @@ declare const useGenerateMetric: (config: ConfigType) => {
|
|
|
45
45
|
selectedColumns: SelectedColumn[];
|
|
46
46
|
setSelectedColumns: import("react").Dispatch<import("react").SetStateAction<SelectedColumn[]>>;
|
|
47
47
|
functionOptions: (col?: SelectedColumn, colDatatype?: string) => FloatingDropDownOption[];
|
|
48
|
-
setChartFields: ({ chartType, chartDimensions, chartMetrics, chartAggregateColumns, }: SetChartFieldParams) => void;
|
|
48
|
+
setChartFields: ({ chartType, chartDimensions, chartMetrics, chartAggregateColumns, configAggregates, }: SetChartFieldParams) => void;
|
|
49
49
|
onSubmitSearch: () => void;
|
|
50
50
|
onChangeHelperFunction: ({ column, helperFunction, functionConfiguration, }: OnChangeHelperFunctionParams) => void;
|
|
51
51
|
onChangeAlias: ({ alias, column }: OnChangeAliasParams) => void;
|
|
@@ -59,5 +59,6 @@ declare const useGenerateMetric: (config: ConfigType) => {
|
|
|
59
59
|
}[];
|
|
60
60
|
isRef: boolean;
|
|
61
61
|
setRef: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
62
|
+
pivotDrillState: PivotDrillState;
|
|
62
63
|
};
|
|
63
64
|
export default useGenerateMetric;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ChartSettingsType, FloatingDropDownOption, RlsCondition, DatasetSettings, MetricFilterOptionsType } from '@/types';
|
|
2
|
+
import { ChartSettingsType, FloatingDropDownOption, RlsCondition, DatasetSettings, MetricFilterOptionsType, PivotDrillState, OnDrillPivotTableParams } from '@/types';
|
|
3
3
|
import { MetricCardProps } from '@/components';
|
|
4
4
|
type UseMetricCardProps = {
|
|
5
5
|
metric: Record<string, any>;
|
|
6
6
|
clientId: string;
|
|
7
|
+
encryptedClientId?: string;
|
|
7
8
|
tenancyLevel: string;
|
|
8
9
|
globalFilters?: MetricCardProps['globalFilters'];
|
|
9
10
|
rlsFilters?: any;
|
|
@@ -15,8 +16,10 @@ type UseMetricCardProps = {
|
|
|
15
16
|
crossDashboardFilters?: RlsCondition[];
|
|
16
17
|
metricFilterOptions?: MetricFilterOptionsType;
|
|
17
18
|
isAllClient?: boolean;
|
|
19
|
+
isFrontendApp: boolean;
|
|
20
|
+
guestToken?: string;
|
|
18
21
|
};
|
|
19
|
-
export declare const useMetricCard: ({ metric, globalFilters, rlsFilters, clientId, tenancyLevel, isInternalApp, appFilters, setCrossDashboardFilters, crossDashboardFilters, metricFilterOptions, isAllClient, }: UseMetricCardProps) => {
|
|
22
|
+
export declare const useMetricCard: ({ metric, globalFilters, rlsFilters, clientId, tenancyLevel, isInternalApp, appFilters, setCrossDashboardFilters, crossDashboardFilters, metricFilterOptions, isAllClient, isFrontendApp, guestToken, encryptedClientId, }: UseMetricCardProps) => {
|
|
20
23
|
onDrillLevelClick: (index: number) => void;
|
|
21
24
|
onDrillDown: (params: any, rowFilters?: {
|
|
22
25
|
columnName: string;
|
|
@@ -77,5 +80,7 @@ export declare const useMetricCard: ({ metric, globalFilters, rlsFilters, client
|
|
|
77
80
|
tableResultsDownloadData: Record<string, any>[];
|
|
78
81
|
appliedMetricFilters: RlsCondition[];
|
|
79
82
|
pivotHeaderOptions: FloatingDropDownOption[];
|
|
83
|
+
pivotDrillState: PivotDrillState;
|
|
84
|
+
onDrillPivotTable: ({ filters, nextLevel, currentValue, }: OnDrillPivotTableParams) => void;
|
|
80
85
|
};
|
|
81
86
|
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './metric.mutation';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UseMetricColumnMutationInputType, UseMetricUnderlyingDataMutationInputType, UseMetricShareCsvMutationInputType, UseMarkArchivedMutationInputType, UseExecutePythonMutationInputType } from '@/types/queryTypes';
|
|
1
|
+
import { UseMetricColumnMutationInputType, UseMetricUnderlyingDataMutationInputType, UseMetricShareCsvMutationInputType, UseMarkArchivedMutationInputType, UseExecutePythonMutationInputType, UseNewDatatsetMetricMutationInputType } from '@/types/queryTypes';
|
|
2
2
|
export declare const useMetricColumnMutation: () => import("react-query").UseMutationResult<{
|
|
3
3
|
data: unknown;
|
|
4
4
|
}, unknown, UseMetricColumnMutationInputType, unknown>;
|
|
@@ -14,3 +14,11 @@ export declare const useMarkArchivedMutation: () => import("react-query").UseMut
|
|
|
14
14
|
export declare const useExecutePythonMutation: () => import("react-query").UseMutationResult<{
|
|
15
15
|
data: unknown;
|
|
16
16
|
}, unknown, UseExecutePythonMutationInputType, unknown>;
|
|
17
|
+
export declare const useGenerateMetricDataMutation: () => import("react-query").UseMutationResult<{
|
|
18
|
+
data: unknown;
|
|
19
|
+
}, unknown, {
|
|
20
|
+
data: UseNewDatatsetMetricMutationInputType;
|
|
21
|
+
token: string;
|
|
22
|
+
clientId: string;
|
|
23
|
+
isFrontendApp: boolean;
|
|
24
|
+
}, unknown>;
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { UseMetricQueryQueryInputType } from '@/types/queryTypes';
|
|
2
|
-
export declare const useMetricDataQuery: (data
|
|
2
|
+
export declare const useMetricDataQuery: ({ clientId, data, token, isFrontendApp, }: {
|
|
3
|
+
data: UseMetricQueryQueryInputType;
|
|
4
|
+
clientId: string;
|
|
5
|
+
token?: string | undefined;
|
|
6
|
+
isFrontendApp: boolean;
|
|
7
|
+
}) => import("react-query").UseQueryResult<{
|
|
3
8
|
data: unknown;
|
|
4
9
|
}, unknown>;
|
|
5
10
|
export declare const useMetricRawDownloadSettingsQuery: (workspaceId: string) => import("react-query").UseQueryResult<{
|
package/dist/types/app.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import { ColumnSizingState } from '@tanstack/react-table';
|
|
3
|
-
import { TableObjectType } from './metricCreate';
|
|
3
|
+
import { SelectedColumn, TableObjectType, Aggregate } from './metricCreate';
|
|
4
4
|
import { CHART_TYPES, ICONS_LIST } from '@/consts';
|
|
5
5
|
export type ChildrenProps = {
|
|
6
6
|
children: ReactNode;
|
|
@@ -194,7 +194,7 @@ export type CustomSettings = {
|
|
|
194
194
|
};
|
|
195
195
|
export type Colors = 'primary' | 'primary-dark' | 'secondary' | 'secondary-dark' | 'alert' | 'alert-dark' | 'alert-light' | 'success' | 'success-dark' | 'success-light' | 'warning' | 'warning-dark' | 'info' | 'info-light' | 'white' | 'gray' | 'gray-dark' | 'light' | 'dark' | 'infoAlert';
|
|
196
196
|
export type IconType = (typeof ICONS_LIST)[number];
|
|
197
|
-
export type LogoType = 'redshift' | 'postgres' | 'mysql' | 'mongodb' | 'bigquery' | 'snowflake' | 'microsoft' | 'google' | 'elasticsearch' | 'redis' | 'databricks' | 'clickhouse' | 'mssql';
|
|
197
|
+
export type LogoType = 'redshift' | 'postgres' | 'mysql' | 'mongodb' | 'bigquery' | 'snowflake' | 'microsoft' | 'google' | 'elasticsearch' | 'redis' | 'databricks' | 'clickhouse' | 'mssql' | 'awss3';
|
|
198
198
|
export type IconSizes = 'xxs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
199
199
|
export type IconConfig = {
|
|
200
200
|
size: IconSizes;
|
|
@@ -266,6 +266,7 @@ export type LabelSettings = {
|
|
|
266
266
|
truncateLabel?: boolean;
|
|
267
267
|
truncateLabelValue?: number;
|
|
268
268
|
showLabelLine?: boolean;
|
|
269
|
+
isEnableValueSummation?: boolean;
|
|
269
270
|
XAxisStyle?: {
|
|
270
271
|
size?: number;
|
|
271
272
|
family?: string;
|
|
@@ -295,6 +296,8 @@ export type PivotSettingsType2 = {
|
|
|
295
296
|
dimensions?: string[];
|
|
296
297
|
headers?: string[];
|
|
297
298
|
isDynamicHeaders?: boolean;
|
|
299
|
+
aggregates?: Aggregate[];
|
|
300
|
+
dims?: string[];
|
|
298
301
|
};
|
|
299
302
|
export type GaugeSettingsType = {
|
|
300
303
|
metric?: string;
|
|
@@ -417,6 +420,7 @@ export type FloatingDropDownOption = {
|
|
|
417
420
|
alias?: string;
|
|
418
421
|
table?: TableObjectType;
|
|
419
422
|
isImportEnabled?: boolean;
|
|
423
|
+
column?: SelectedColumn;
|
|
420
424
|
};
|
|
421
425
|
export type FilterType = {
|
|
422
426
|
tableName: string;
|
|
@@ -620,3 +624,21 @@ export type AdminThemeOptionsType = {
|
|
|
620
624
|
};
|
|
621
625
|
};
|
|
622
626
|
export type FilterValueType = string | string[] | number | number[] | boolean | boolean[] | null | Record<string, any>;
|
|
627
|
+
export type PivotFilterType = {
|
|
628
|
+
columnName: string;
|
|
629
|
+
value: any;
|
|
630
|
+
};
|
|
631
|
+
export type OnDrillPivotTableParams = {
|
|
632
|
+
filters: PivotFilterType[];
|
|
633
|
+
nextLevel: number;
|
|
634
|
+
currentValue: string;
|
|
635
|
+
};
|
|
636
|
+
export type PivotDrillState = {
|
|
637
|
+
isLoading: boolean;
|
|
638
|
+
error: string;
|
|
639
|
+
data: {
|
|
640
|
+
key: string;
|
|
641
|
+
data: Record<string, any>[];
|
|
642
|
+
}[];
|
|
643
|
+
currentValue: string;
|
|
644
|
+
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Dispatch, SetStateAction } from 'react';
|
|
2
2
|
import { FieldValues } from 'react-hook-form';
|
|
3
|
-
import { RlsCondition, FloatingDropDownOption, ChartSettingsType, TableColumn } from '@/types';
|
|
3
|
+
import { RlsCondition, FloatingDropDownOption, ChartSettingsType, TableColumn, PivotDrillState } from '@/types';
|
|
4
4
|
import { ExternalMetrics } from '@/types/queryTypes';
|
|
5
|
+
import { MetricCardProps } from '@/components';
|
|
5
6
|
type ColumnData = {
|
|
6
7
|
name: string;
|
|
7
8
|
datatype: string;
|
|
@@ -84,6 +85,7 @@ export type SetChartFieldParams = {
|
|
|
84
85
|
chartDimensions?: string[];
|
|
85
86
|
chartAggregateColumns?: string[];
|
|
86
87
|
chartType?: ChartSettingsType['chartType'];
|
|
88
|
+
configAggregates?: Aggregate[];
|
|
87
89
|
};
|
|
88
90
|
export type CastColumn = 'integer' | 'decimal' | 'date';
|
|
89
91
|
export type SelectedColumn = {
|
|
@@ -93,7 +95,7 @@ export type SelectedColumn = {
|
|
|
93
95
|
alias: string;
|
|
94
96
|
parentAlias: string;
|
|
95
97
|
helperFunction?: string;
|
|
96
|
-
type: 'DEFAULT' | 'HELPER_FUNCTION' | 'CUSTOM' | 'PYTHON';
|
|
98
|
+
type: 'DEFAULT' | 'HELPER_FUNCTION' | 'CUSTOM' | 'PYTHON' | 'ARITHMETIC';
|
|
97
99
|
index: number;
|
|
98
100
|
configType: 'DIMENSION' | 'AGGREGATE' | 'FILTER';
|
|
99
101
|
dropType: 'METRIC' | 'DIMENSION' | 'FILTER';
|
|
@@ -121,6 +123,11 @@ export type SelectedColumn = {
|
|
|
121
123
|
draggableItemData: DraggableMetricItemData;
|
|
122
124
|
keyword?: string;
|
|
123
125
|
cast?: FloatingDropDownOption;
|
|
126
|
+
arithmeticConfig?: {
|
|
127
|
+
firstOperand: SelectedColumn;
|
|
128
|
+
secondOperand: SelectedColumn;
|
|
129
|
+
operator: FloatingDropDownOption;
|
|
130
|
+
};
|
|
124
131
|
};
|
|
125
132
|
export type SelectedFilter = {
|
|
126
133
|
method: string;
|
|
@@ -234,6 +241,7 @@ export type MetricOutputProps = {
|
|
|
234
241
|
label: string;
|
|
235
242
|
}[]>>;
|
|
236
243
|
setColumn: React.Dispatch<React.SetStateAction<FloatingDropDownOption[]>>;
|
|
244
|
+
pivotDrillState: PivotDrillState;
|
|
237
245
|
};
|
|
238
246
|
export type CompanyIntegration = {
|
|
239
247
|
id: string;
|
|
@@ -340,16 +348,20 @@ export type Aggregate = {
|
|
|
340
348
|
columnName: string;
|
|
341
349
|
alias: string;
|
|
342
350
|
parentAlias: string;
|
|
343
|
-
type: 'custom' | 'default';
|
|
344
351
|
dataType: string;
|
|
345
352
|
cast?: CastColumn;
|
|
353
|
+
type: 'custom' | 'default' | 'arithmetic_column';
|
|
354
|
+
arithmeticConfig?: {
|
|
355
|
+
firstOperand: Aggregate;
|
|
356
|
+
secondOperand: Aggregate;
|
|
357
|
+
operator: string;
|
|
358
|
+
};
|
|
346
359
|
};
|
|
347
360
|
export type Dimension = {
|
|
348
361
|
columnName: string;
|
|
349
362
|
alias: string;
|
|
350
363
|
parentAlias: string;
|
|
351
364
|
timeGrain?: string;
|
|
352
|
-
type: 'custom' | 'default';
|
|
353
365
|
dataType: string;
|
|
354
366
|
helperFunction?: string;
|
|
355
367
|
labelType?: string;
|
|
@@ -357,6 +369,12 @@ export type Dimension = {
|
|
|
357
369
|
dateFormat?: string;
|
|
358
370
|
};
|
|
359
371
|
cast?: CastColumn;
|
|
372
|
+
type: 'custom' | 'default' | 'arithmetic_column';
|
|
373
|
+
arithmeticConfig?: {
|
|
374
|
+
firstOperand: Dimension;
|
|
375
|
+
secondOperand: Dimension;
|
|
376
|
+
operator: string;
|
|
377
|
+
};
|
|
360
378
|
};
|
|
361
379
|
export type Filter = {
|
|
362
380
|
method: string;
|
|
@@ -424,6 +442,9 @@ export type DatasetMetricCreationConfiguration = {
|
|
|
424
442
|
groupByColumnList?: GroupByColumn[];
|
|
425
443
|
rlsConditions?: RlsCondition[];
|
|
426
444
|
isAllClient?: boolean;
|
|
445
|
+
globalFilters?: MetricCardProps['globalFilters'];
|
|
446
|
+
isApplyMetricFilter?: boolean;
|
|
447
|
+
isApplyGlobalFilter?: boolean;
|
|
427
448
|
};
|
|
428
449
|
export type OnChangeHelperFunctionParams = {
|
|
429
450
|
column: SelectedColumn;
|
|
@@ -488,4 +509,10 @@ export type MetricFilterDemoThemeType = {
|
|
|
488
509
|
variant: 'static' | 'floating';
|
|
489
510
|
radius: string;
|
|
490
511
|
};
|
|
512
|
+
export type MetricConfigType = 'DIMENSION' | 'METRIC';
|
|
513
|
+
export type OnSaveArithmeticColumnParams = {
|
|
514
|
+
column: SelectedColumn['arithmeticConfig'];
|
|
515
|
+
type: MetricConfigType;
|
|
516
|
+
alias: string;
|
|
517
|
+
};
|
|
491
518
|
export {};
|
|
@@ -53,6 +53,7 @@ export type UseMetricQueryQueryInputType = {
|
|
|
53
53
|
offset?: number;
|
|
54
54
|
isAllClient?: boolean;
|
|
55
55
|
disableStringify?: boolean;
|
|
56
|
+
pivotHeaders?: string[];
|
|
56
57
|
};
|
|
57
58
|
export type UseMetricQueryQueryOutputType = {
|
|
58
59
|
data?: any | null;
|
|
@@ -188,6 +189,10 @@ export type UseDatatsetMetricMutationInputType = {
|
|
|
188
189
|
configuration: DatasetMetricCreationConfiguration;
|
|
189
190
|
id: string;
|
|
190
191
|
};
|
|
192
|
+
export type UseNewDatatsetMetricMutationInputType = {
|
|
193
|
+
configuration: DatasetMetricCreationConfiguration;
|
|
194
|
+
id: string;
|
|
195
|
+
};
|
|
191
196
|
export type UseCreateMetricMutationInputType = {
|
|
192
197
|
chartOptions?: any;
|
|
193
198
|
companyId?: string;
|