@databrainhq/plugin 0.14.46 → 0.14.48
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/DateRangePicker/index.d.ts +7 -6
- package/dist/components/FilterDropDown/index.d.ts +6 -5
- package/dist/components/FilterField/index.d.ts +2 -0
- package/dist/components/GlobalFilters/SearchField.d.ts +8 -0
- package/dist/components/Icons/icons.d.ts +1 -1
- package/dist/components/MetricFilterDropDown/components/OldMetricFilterComponents.d.ts +16 -0
- package/dist/components/MetricFilterDropDown/components/SearchField.d.ts +7 -0
- package/dist/components/MetricFilterDropDown/components/StringAutoCustomFilterField.d.ts +17 -0
- package/dist/components/MetricFilterDropDown/components/StringManualFilterField.d.ts +11 -0
- package/dist/components/MetricFilterDropDown/components/TimeFilterField.d.ts +11 -0
- package/dist/components/MetricFilterDropDown/components/VariableTimeFilterField.d.ts +11 -0
- package/dist/components/MetricFilterDropDown/index.d.ts +8 -7
- package/dist/components/SkeletonLoader/index.d.ts +2 -1
- package/dist/consts/app.d.ts +25 -0
- package/dist/consts/metricOptions.d.ts +2 -0
- package/dist/helpers/getModifiedQuery.d.ts +14 -4
- package/dist/types/app.d.ts +10 -0
- package/dist/types/metricCreate.d.ts +6 -0
- package/dist/webcomponents.es.js +49898 -48736
- package/dist/webcomponents.umd.js +212 -208
- package/package.json +3 -3
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FilterClause } from '@/components';
|
|
3
|
+
import { MetricFilterDemoThemeType, OnChangeFilterValueType, RlsCondition } from '@/types';
|
|
4
|
+
type OldMetricFilterComponentProps = {
|
|
5
|
+
filter: RlsCondition;
|
|
6
|
+
onChangeFilterValue: OnChangeFilterValueType;
|
|
7
|
+
className: string;
|
|
8
|
+
isVariableFilter: boolean;
|
|
9
|
+
dropdownTheme?: MetricFilterDemoThemeType;
|
|
10
|
+
workspaceId: string;
|
|
11
|
+
filterClause: FilterClause[];
|
|
12
|
+
};
|
|
13
|
+
export declare const OldMetricFilterComponents: ({ props: { filter, onChangeFilterValue, className, isVariableFilter, dropdownTheme, filterClause, workspaceId, }, }: {
|
|
14
|
+
props: OldMetricFilterComponentProps;
|
|
15
|
+
}) => React.JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FilterClause } from '@/components/FilterDropDown';
|
|
3
|
+
import { MetricFilterDemoThemeType, OnChangeFilterValueType, RlsCondition } from '@/types';
|
|
4
|
+
type StringAutoCustomFilterFieldProps = {
|
|
5
|
+
filter: RlsCondition;
|
|
6
|
+
tenancyLevel: string;
|
|
7
|
+
clientId: string;
|
|
8
|
+
isAllClient: boolean;
|
|
9
|
+
onChangeFilterValue: OnChangeFilterValueType;
|
|
10
|
+
dropdownTheme?: MetricFilterDemoThemeType;
|
|
11
|
+
workspaceId: string;
|
|
12
|
+
filterClause: FilterClause[];
|
|
13
|
+
};
|
|
14
|
+
export declare const StringAutoCustomFilterField: ({ props: { filter, tenancyLevel, clientId, isAllClient, onChangeFilterValue, dropdownTheme, workspaceId, filterClause, }, }: {
|
|
15
|
+
props: StringAutoCustomFilterFieldProps;
|
|
16
|
+
}) => React.JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { MetricFilterDemoThemeType, OnChangeFilterValueType, RlsCondition } from '@/types';
|
|
3
|
+
type StringManualFilterFieldProps = {
|
|
4
|
+
filter: RlsCondition;
|
|
5
|
+
onChangeFilterValue: OnChangeFilterValueType;
|
|
6
|
+
dropdownTheme?: MetricFilterDemoThemeType;
|
|
7
|
+
};
|
|
8
|
+
export declare const StringManualFilterField: ({ props: { filter, onChangeFilterValue, dropdownTheme }, }: {
|
|
9
|
+
props: StringManualFilterFieldProps;
|
|
10
|
+
}) => React.JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { MetricFilterDemoThemeType, OnChangeFilterValueType, RlsCondition } from '@/types';
|
|
3
|
+
type TimeFilterFieldProps = {
|
|
4
|
+
filter: RlsCondition;
|
|
5
|
+
dropdownTheme?: MetricFilterDemoThemeType;
|
|
6
|
+
onChangeFilterValue: OnChangeFilterValueType;
|
|
7
|
+
};
|
|
8
|
+
export declare const TimeFilterField: ({ props: { filter, dropdownTheme, onChangeFilterValue }, }: {
|
|
9
|
+
props: TimeFilterFieldProps;
|
|
10
|
+
}) => React.JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { MetricFilterDemoThemeType, OnChangeFilterValueType, RlsCondition } from '@/types';
|
|
3
|
+
type VariableTimeFilterFieldProps = {
|
|
4
|
+
filter: RlsCondition;
|
|
5
|
+
dropdownTheme?: MetricFilterDemoThemeType;
|
|
6
|
+
onChangeFilterValue: OnChangeFilterValueType;
|
|
7
|
+
};
|
|
8
|
+
export declare const VariableTimeFilterField: ({ props: { filter, dropdownTheme, onChangeFilterValue }, }: {
|
|
9
|
+
props: VariableTimeFilterFieldProps;
|
|
10
|
+
}) => React.JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { FloatingDropDownOption, RlsCondition } from '@/types';
|
|
2
|
+
import { FloatingDropDownOption, MetricFilterDemoThemeType, RlsCondition } from '@/types';
|
|
3
3
|
type Props = {
|
|
4
|
-
rlsConditions
|
|
4
|
+
rlsConditions: RlsCondition;
|
|
5
5
|
onChangeFilterValue?: (name: string, value: string, customValue?: Record<string, Date>, stringValues?: FloatingDropDownOption[]) => void;
|
|
6
6
|
workspaceId: string;
|
|
7
7
|
clientId?: string;
|
|
8
8
|
className?: string;
|
|
9
9
|
rlsConditionList: RlsCondition[];
|
|
10
10
|
isAllClient?: boolean;
|
|
11
|
-
dropdownTheme?:
|
|
12
|
-
width: string;
|
|
13
|
-
variant: 'static' | 'floating';
|
|
14
|
-
radius: string;
|
|
15
|
-
};
|
|
11
|
+
dropdownTheme?: MetricFilterDemoThemeType;
|
|
16
12
|
tenancyLevel?: string;
|
|
17
13
|
};
|
|
14
|
+
export type DateSelectedOption = {
|
|
15
|
+
value: string;
|
|
16
|
+
label: string;
|
|
17
|
+
labelType?: string;
|
|
18
|
+
};
|
|
18
19
|
export declare const MetricFilterDropDown: ({ rlsConditions, onChangeFilterValue, workspaceId, clientId, className, rlsConditionList, isAllClient, dropdownTheme, tenancyLevel, }: Props) => React.JSX.Element;
|
|
19
20
|
declare const _default: React.MemoExoticComponent<({ rlsConditions, onChangeFilterValue, workspaceId, clientId, className, rlsConditionList, isAllClient, dropdownTheme, tenancyLevel, }: Props) => React.JSX.Element>;
|
|
20
21
|
export default _default;
|
|
@@ -3,6 +3,7 @@ type Props = {
|
|
|
3
3
|
height?: string;
|
|
4
4
|
className?: string;
|
|
5
5
|
variant?: 'table' | 'card' | 'list';
|
|
6
|
+
tableRows?: number;
|
|
6
7
|
};
|
|
7
|
-
export declare const SkeletonLoader: ({ height, className, variant }: Props) => React.JSX.Element;
|
|
8
|
+
export declare const SkeletonLoader: ({ height, className, variant, tableRows, }: Props) => React.JSX.Element;
|
|
8
9
|
export {};
|
package/dist/consts/app.d.ts
CHANGED
|
@@ -96,4 +96,29 @@ export declare const NUMBER_FORMAT: {
|
|
|
96
96
|
value: string;
|
|
97
97
|
}[];
|
|
98
98
|
export declare const ICONS_LIST: readonly ["new-window", "circle", "group-by", "undo", "redo", "maximize", "minimize", "fullscreen", "download", "archive", "format", "company", "profile", "users", "bar-chart", "bar-chart-2", "kebab-menu-horizontal", "kebab-menu-vertical", "paint-brush", "funnel", "funnel-simple", "cross", "columns", "gear", "presentation-chart", "chevron-down", "plus", "info", "arrow-down", "arrow-up", "arrow-left", "arrow-right", "double-arrow-left", "double-arrow-right", "expand-arrows", "eye", "eye-slash", "database", "magnifying-glass", "pencil-simple-line", "pencil-simple", "file-sql", "code", "sign-out", "save", "delete", "align-space-even", "align-bottom", "align-left", "align-right", "align-top", "trend-up", "trend-up-chart", "caret-down-fill", "caret-up-fill", "caret-up-down", "pie-chart", "table-view", "task-done-file", "right-angle", "text-rotation-angle-up", "text-rotation-none", "text-rotation-up", "preview-file", "share", "image", "text", "color-palette", "shuffle", "table", "chart", "calendar", "horizontal-rule", "short-text", "subheader", "copy", "timer", "link", "not-found", "bar-chart-horizontal", "line-chart", "line-chart-trend-up", "globe", "map", "leaderboard", "radar", "scale", "scatter-plot", "tree", "donut-chart", "scatter-chart", "waterfall-chart", "area-chart", "bubble-chart", "candlestick-chart", "string", "boolean", "date", "number", "unknown", "array", "right-join", "left-join", "outer-join", "right-full-join", "left-full-join", "inner-join", "full-join", "version-history", "roles"];
|
|
99
|
+
export declare const NUMBER = "number";
|
|
100
|
+
export declare const STRING = "string";
|
|
101
|
+
export declare const BOOLEAN = "boolean";
|
|
102
|
+
export declare const DEFAULT = "default";
|
|
99
103
|
export declare const DATE = "date";
|
|
104
|
+
export declare const AND = "AND";
|
|
105
|
+
export declare const IS_NOT_NULL = "IS NOT NULL";
|
|
106
|
+
export declare const AS_SIGNED = "AS SIGNED";
|
|
107
|
+
export declare const AS_BIGINT = "AS BIGINT";
|
|
108
|
+
export declare const AS_VARCHAR = "AS VARCHAR";
|
|
109
|
+
export declare const AS_CHAR = "AS CHAR";
|
|
110
|
+
export declare const AS_STRING = "AS STRING";
|
|
111
|
+
export declare const AS_DATE = "AS DATE";
|
|
112
|
+
export declare const CAST = "CAST";
|
|
113
|
+
export declare const IN = "IN";
|
|
114
|
+
export declare const EQUAL_OPERATOR = "=";
|
|
115
|
+
export declare const YEAR = "year";
|
|
116
|
+
export declare const LAST = "last";
|
|
117
|
+
export declare const LIKE = "like";
|
|
118
|
+
export declare const MULTI_SELECT = "MULTI_SELECT";
|
|
119
|
+
export declare const SINGLE_SELECT = "SINGLE_SELECT";
|
|
120
|
+
export declare const SEARCH = "SEARCH";
|
|
121
|
+
export declare const DATE_PICKER = "DATE_PICKER";
|
|
122
|
+
export declare const NUMBER_FIELD = "NUMBER_FIELD";
|
|
123
|
+
export declare const BETWEEN = "BETWEEN";
|
|
124
|
+
export declare const CUSTOM = "custom";
|
|
@@ -84,6 +84,7 @@ export declare const DATASET_STRING_HELPER_FUNCTIONS: {
|
|
|
84
84
|
value: string;
|
|
85
85
|
label: string;
|
|
86
86
|
}[];
|
|
87
|
+
export declare const LEAST_USED_STRING_FUNCTIONS: string[];
|
|
87
88
|
export declare const DATASET_NUMBER_HELPER_FUNCTIONS: {
|
|
88
89
|
value: string;
|
|
89
90
|
label: string;
|
|
@@ -126,3 +127,4 @@ export declare const POSTGRES = "postgres";
|
|
|
126
127
|
export declare const MONGODB = "mongodb";
|
|
127
128
|
export declare const DATABRICKS = "databricks";
|
|
128
129
|
export declare const CLICKHOUSE = "clickhouse";
|
|
130
|
+
export declare const CUSTOM_FILTER_TABLE_ALIAS = "custom_table_alias_rls";
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { FilterFieldType, MetricCardProps } from '@/components';
|
|
3
|
+
import { GlobalFilterColumn, RlsCondition } from '@/types/app';
|
|
4
|
+
type OnChangeGlobalFilterParams = {
|
|
5
|
+
value: any;
|
|
6
|
+
setAppliedFilters: React.Dispatch<React.SetStateAction<FilterFieldType[]>>;
|
|
7
|
+
column: GlobalFilterColumn;
|
|
8
|
+
operator: string;
|
|
9
|
+
type: string;
|
|
10
|
+
};
|
|
3
11
|
type GetSqlStatement = {
|
|
4
12
|
query: string;
|
|
5
13
|
clientId?: string;
|
|
@@ -29,12 +37,13 @@ export declare const replaceClientVariable: ({ clientId, query, tenancyLevel, is
|
|
|
29
37
|
export declare const replaceVariable: ({ query, rlsConditions, tenancyLevel, clientId, values, isAllClient, globalFilters, }: ReplaceVariable) => string;
|
|
30
38
|
export declare const nameSpace: (name: string, dbName: string) => string;
|
|
31
39
|
export declare const nameSpaceSpecification: (parentAlias: string, columnName: string, dbName: string) => string;
|
|
32
|
-
export declare const cteQuery: (queryStr: string, groupedConditions: Record<string, RlsCondition[]>, dbName: string) => string;
|
|
33
|
-
export declare const subQuery: (queryStr: string, groupedConditions: Record<string, RlsCondition[]>, dbName: string) => string;
|
|
34
40
|
export declare const getReplacedQuery: (table: {
|
|
35
41
|
tableName: string;
|
|
36
42
|
condition: string;
|
|
37
43
|
}, query: string, dbName: string) => string;
|
|
44
|
+
export declare const dateWhereClause: (condition: RlsCondition, dbName: string) => string;
|
|
45
|
+
export declare const otherWhereClause: (condition: RlsCondition, dbName: string) => string;
|
|
46
|
+
export declare const stringClause: (condition: RlsCondition, dbName: string) => string;
|
|
38
47
|
export declare const replaceWhereClauses: (queryStr: string, groupedConditions: Record<string, RlsCondition[]>, dbName: string) => string;
|
|
39
48
|
export declare const getModifiedQuery: ({ rlsConditions, dbName, query, }: {
|
|
40
49
|
rlsConditions: RlsCondition[];
|
|
@@ -43,4 +52,5 @@ export declare const getModifiedQuery: ({ rlsConditions, dbName, query, }: {
|
|
|
43
52
|
}) => string;
|
|
44
53
|
export declare const getSqlStatement: ({ query, clientId, rlsConditions, globalFilters, dbName, tenancyLevel, values, isAllClient, }: GetSqlStatement) => string;
|
|
45
54
|
export declare const isAppliedFilter: (filter: RlsCondition) => number | boolean | Date | undefined;
|
|
55
|
+
export declare const onChangeGlobalFilter: ({ column, setAppliedFilters, value, operator, type, }: OnChangeGlobalFilterParams) => void;
|
|
46
56
|
export {};
|
package/dist/types/app.d.ts
CHANGED
|
@@ -87,6 +87,12 @@ export type CustomSettings = {
|
|
|
87
87
|
hideYSplitLines?: boolean;
|
|
88
88
|
hideXAxisLines?: boolean;
|
|
89
89
|
hideYAxisLines?: boolean;
|
|
90
|
+
isEnableLabelFormatting?: boolean;
|
|
91
|
+
YaxislabelFormatters?: {
|
|
92
|
+
upperLimit: number;
|
|
93
|
+
lowerLimit: number;
|
|
94
|
+
label: string;
|
|
95
|
+
}[];
|
|
90
96
|
barWidth?: number;
|
|
91
97
|
barRadius?: number[];
|
|
92
98
|
xRotation?: number;
|
|
@@ -244,12 +250,14 @@ export type LabelSettings = {
|
|
|
244
250
|
family?: string;
|
|
245
251
|
weight?: number;
|
|
246
252
|
color?: string;
|
|
253
|
+
axisName?: string;
|
|
247
254
|
};
|
|
248
255
|
YAxisStyle?: {
|
|
249
256
|
size?: number;
|
|
250
257
|
family?: string;
|
|
251
258
|
weight?: number;
|
|
252
259
|
color?: string;
|
|
260
|
+
axisName?: string;
|
|
253
261
|
};
|
|
254
262
|
};
|
|
255
263
|
export type AxisSettings = {
|
|
@@ -411,6 +419,7 @@ export type GlobalFilterColumn = {
|
|
|
411
419
|
columnName: string;
|
|
412
420
|
dataType: string;
|
|
413
421
|
}[];
|
|
422
|
+
filterVariant?: FloatingDropDownOption;
|
|
414
423
|
};
|
|
415
424
|
export type GlobalFilterType = {
|
|
416
425
|
tableName: string;
|
|
@@ -482,6 +491,7 @@ export type RlsCondition = {
|
|
|
482
491
|
query: string;
|
|
483
492
|
columnName: string;
|
|
484
493
|
};
|
|
494
|
+
filterVariant?: FloatingDropDownOption;
|
|
485
495
|
};
|
|
486
496
|
export type PythonMetricFilter = {
|
|
487
497
|
name: string;
|
|
@@ -474,4 +474,10 @@ export type DatasetConfig = {
|
|
|
474
474
|
chart: string;
|
|
475
475
|
setChartSettings: React.Dispatch<React.SetStateAction<ChartSettingsType>>;
|
|
476
476
|
};
|
|
477
|
+
export type OnChangeFilterValueType = ((name: string, value: string, customValue?: Record<string, Date>, stringValues?: FloatingDropDownOption[]) => void) | undefined;
|
|
478
|
+
export type MetricFilterDemoThemeType = {
|
|
479
|
+
width: string;
|
|
480
|
+
variant: 'static' | 'floating';
|
|
481
|
+
radius: string;
|
|
482
|
+
};
|
|
477
483
|
export {};
|