@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.
- package/dist/components/ColorField/ColorField.d.ts +2 -1
- package/dist/components/FilterField/index.d.ts +8 -0
- package/dist/components/GlobalFilters/Filters.d.ts +4 -19
- package/dist/components/GlobalFilters/HorizontalFilters.d.ts +2 -2
- package/dist/components/GlobalFilters/NumberFilterField.d.ts +2 -8
- package/dist/components/GlobalFilters/index.d.ts +5 -6
- package/dist/components/Icons/icons.d.ts +1 -1
- package/dist/components/MetricList/components/MetricCards/MetricCard.d.ts +16 -1
- package/dist/consts/app.d.ts +5 -1
- package/dist/containers/Metric/EmbeddedMetric.d.ts +16 -1
- package/dist/containers/Metric/index.d.ts +16 -1
- package/dist/helpers/getModifiedQuery.d.ts +2 -1
- package/dist/types/app.d.ts +33 -0
- package/dist/webcomponents.es.js +32410 -32000
- package/dist/webcomponents.umd.js +179 -175
- package/package.json +1 -1
|
@@ -44,5 +44,20 @@ export type MetricCardProps = {
|
|
|
44
44
|
isInProgress: boolean;
|
|
45
45
|
}[];
|
|
46
46
|
onDownload: (id: string, isEnable: boolean) => void;
|
|
47
|
+
appearanceOptions?: {
|
|
48
|
+
appearanceOptionsPosition?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
49
|
+
dynamicBehaviour?: {
|
|
50
|
+
isEnabled?: boolean;
|
|
51
|
+
label?: string;
|
|
52
|
+
};
|
|
53
|
+
cumulativeBar?: {
|
|
54
|
+
isEnabled?: boolean;
|
|
55
|
+
label?: string;
|
|
56
|
+
};
|
|
57
|
+
stackedBars?: {
|
|
58
|
+
isEnabled?: boolean;
|
|
59
|
+
label?: string;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
47
62
|
};
|
|
48
|
-
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, }: MetricCardProps) => React.JSX.Element;
|
|
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;
|
package/dist/consts/app.d.ts
CHANGED
|
@@ -55,6 +55,10 @@ export declare const BOXPLOT = "boxplot";
|
|
|
55
55
|
export declare const TABLE = "table";
|
|
56
56
|
export declare const GENERAL = "general";
|
|
57
57
|
export declare const CONFIG = "configuration";
|
|
58
|
+
export declare const TOP_LEFT = "top-left";
|
|
59
|
+
export declare const TOP_RIGHT = "top-right";
|
|
60
|
+
export declare const BOTTOM_LEFT = "bottom-left";
|
|
61
|
+
export declare const BOTTOM_RIGHT = "bottom-right";
|
|
58
62
|
export declare const DESTINATIONS: Record<string, string>;
|
|
59
63
|
export declare const DATABASE_NAME = "{{DATABASE_NAME}}";
|
|
60
64
|
export declare const CLIENT_NAME_VAR_NUM = "'client_id_variable'";
|
|
@@ -87,4 +91,4 @@ export declare const NUMBER_FORMAT: {
|
|
|
87
91
|
label: string;
|
|
88
92
|
value: string;
|
|
89
93
|
}[];
|
|
90
|
-
export declare const ICONS_LIST: readonly ["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"];
|
|
94
|
+
export declare const ICONS_LIST: readonly ["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"];
|
|
@@ -21,5 +21,20 @@ export interface EmbeddedMetricProps {
|
|
|
21
21
|
};
|
|
22
22
|
themeName?: string;
|
|
23
23
|
setAdminTheme: (theme?: AdminThemeOptionsType) => void;
|
|
24
|
+
appearanceOptions?: {
|
|
25
|
+
appearanceOptionsPosition?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
26
|
+
dynamicBehaviour?: {
|
|
27
|
+
isEnabled?: boolean;
|
|
28
|
+
label?: string | undefined;
|
|
29
|
+
};
|
|
30
|
+
cumulativeBar?: {
|
|
31
|
+
isEnabled?: boolean;
|
|
32
|
+
label?: string | undefined;
|
|
33
|
+
};
|
|
34
|
+
stackedBars?: {
|
|
35
|
+
isEnabled?: boolean;
|
|
36
|
+
label?: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
24
39
|
}
|
|
25
|
-
export declare const EmbeddedMetric: React.MemoExoticComponent<({ token, chartColors, metricId, chartRendererType, variant, onMinimize, isHideChartSettings, isHideTablePreview, enableDownloadCsv, enableEmailCsv, metricFilterOptions, enableMultiMetricFilters, metricFilterPosition, disableFullscreen, optionsIcon, customMessages, themeName, setAdminTheme, }: EmbeddedMetricProps) => React.JSX.Element>;
|
|
40
|
+
export declare const EmbeddedMetric: React.MemoExoticComponent<({ token, chartColors, metricId, chartRendererType, variant, onMinimize, isHideChartSettings, isHideTablePreview, enableDownloadCsv, enableEmailCsv, metricFilterOptions, enableMultiMetricFilters, metricFilterPosition, disableFullscreen, optionsIcon, customMessages, themeName, setAdminTheme, appearanceOptions, }: EmbeddedMetricProps) => React.JSX.Element>;
|
|
@@ -38,6 +38,21 @@ export interface MetricProps extends HTMLAttributes<HTMLElement> {
|
|
|
38
38
|
tokenExpiry?: string;
|
|
39
39
|
};
|
|
40
40
|
themeName?: string;
|
|
41
|
+
appearanceOptions?: {
|
|
42
|
+
appearanceOptionsPosition?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
43
|
+
dynamicBehaviour?: {
|
|
44
|
+
isEnabled?: boolean;
|
|
45
|
+
label?: string;
|
|
46
|
+
};
|
|
47
|
+
cumulativeBar?: {
|
|
48
|
+
isEnabled?: boolean;
|
|
49
|
+
label?: string;
|
|
50
|
+
};
|
|
51
|
+
stackedBars?: {
|
|
52
|
+
isEnabled?: boolean;
|
|
53
|
+
label?: string;
|
|
54
|
+
};
|
|
55
|
+
};
|
|
41
56
|
}
|
|
42
57
|
/**
|
|
43
58
|
* @name Metric - A react component to display a single metric card.
|
|
@@ -59,4 +74,4 @@ export interface MetricProps extends HTMLAttributes<HTMLElement> {
|
|
|
59
74
|
* @prop {object} style (optional) - The usual css style prop to provide inline styles.
|
|
60
75
|
* @prop {object} theme (optional) - Theme config object to apply to the UI.
|
|
61
76
|
*/
|
|
62
|
-
export declare const Metric: React.MemoExoticComponent<({ theme, width, height, style, className, metricFilterOptions, ...metricProps }: MetricProps) => React.JSX.Element>;
|
|
77
|
+
export declare const Metric: React.MemoExoticComponent<({ theme, width, height, style, className, metricFilterOptions, appearanceOptions, ...metricProps }: MetricProps) => React.JSX.Element>;
|
|
@@ -17,8 +17,9 @@ export type ReplaceVariable = {
|
|
|
17
17
|
tenancyLevel: string;
|
|
18
18
|
values?: Record<string, string>;
|
|
19
19
|
isAllClient?: boolean;
|
|
20
|
+
globalFilters?: MetricCardProps['globalFilters'];
|
|
20
21
|
};
|
|
21
|
-
export declare const replaceVariable: ({ query, rlsConditions, tenancyLevel, clientId, values, isAllClient, }: ReplaceVariable) => string;
|
|
22
|
+
export declare const replaceVariable: ({ query, rlsConditions, tenancyLevel, clientId, values, isAllClient, globalFilters, }: ReplaceVariable) => string;
|
|
22
23
|
export declare const nameSpace: (name: string, dbName: string) => string;
|
|
23
24
|
export declare const nameSpaceSpecification: (parentAlias: string, columnName: string, dbName: string) => string;
|
|
24
25
|
export declare const cteQuery: (queryStr: string, groupedConditions: Record<string, RlsCondition[]>, dbName: string) => string;
|
package/dist/types/app.d.ts
CHANGED
|
@@ -382,6 +382,39 @@ export type FilterType = {
|
|
|
382
382
|
tableName: string;
|
|
383
383
|
columns: Schema['columnsWithDataType'];
|
|
384
384
|
};
|
|
385
|
+
export type GlobalFilterColumn = {
|
|
386
|
+
filterType?: string;
|
|
387
|
+
selectedTable?: string;
|
|
388
|
+
variableStrings?: string[];
|
|
389
|
+
as: any;
|
|
390
|
+
dataType: string;
|
|
391
|
+
name: string;
|
|
392
|
+
isDefault?: boolean;
|
|
393
|
+
label?: string;
|
|
394
|
+
isShowHorizontal?: boolean;
|
|
395
|
+
defaultValue?: GlobalFiltersDefaultValue;
|
|
396
|
+
isClientScoped?: boolean;
|
|
397
|
+
clientColumn?: string;
|
|
398
|
+
clientColumnType?: string;
|
|
399
|
+
isManualOptions?: boolean;
|
|
400
|
+
manualOptions?: string[];
|
|
401
|
+
dependOn?: FloatingDropDownOption[];
|
|
402
|
+
selectedCustomColumn?: {
|
|
403
|
+
query: string;
|
|
404
|
+
columnName: string;
|
|
405
|
+
};
|
|
406
|
+
options?: FloatingDropDownOption[];
|
|
407
|
+
isVariableFilter?: boolean;
|
|
408
|
+
applyOnTables?: {
|
|
409
|
+
tableName: string;
|
|
410
|
+
columnName: string;
|
|
411
|
+
dataType: string;
|
|
412
|
+
}[];
|
|
413
|
+
};
|
|
414
|
+
export type GlobalFilterType = {
|
|
415
|
+
tableName: string;
|
|
416
|
+
columns: GlobalFilterColumn[];
|
|
417
|
+
};
|
|
385
418
|
export type JoinField = {
|
|
386
419
|
a: string;
|
|
387
420
|
b: string;
|