@databrainhq/plugin 0.4.4 → 0.4.6
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/README.md +1 -7
- package/dist/components/ErrorFallback/index.d.ts +3 -0
- package/dist/components/ExternalMetricForm/index.d.ts +1 -0
- package/dist/components/MetricFilters/index.d.ts +1 -1
- package/dist/components/{MetricCard/index.d.ts → MetricList/components/MetricCard.d.ts} +0 -0
- package/dist/components/{SingleValueCard/index.d.ts → MetricList/components/SingleValueCard.d.ts} +1 -1
- package/dist/components/MetricList/index.d.ts +1 -1
- package/dist/helpers/groupBy.d.ts +4 -0
- package/dist/hooks/useExternalMetric.d.ts +2 -3
- package/dist/index.es.js +2773 -2122
- package/dist/index.umd.js +57 -56
- package/dist/style.css +1 -1
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
# @databrainhq/plugin
|
|
2
2
|
|
|
3
|
-
### NOTE:
|
|
4
|
-
|
|
5
|
-
Before npm publish do this way:
|
|
6
|
-
|
|
7
|
-
VITE_END_POINT=.. npm install
|
|
8
|
-
|
|
9
3
|
> Databrain app ui plugin.
|
|
10
4
|
|
|
11
5
|
[](https://www.npmjs.com/package/@databrainhq/plugin) [](https://standardjs.com)
|
|
@@ -13,7 +7,7 @@ VITE_END_POINT=.. npm install
|
|
|
13
7
|
## Install
|
|
14
8
|
|
|
15
9
|
```bash
|
|
16
|
-
|
|
10
|
+
npm install @databrainhq/plugin
|
|
17
11
|
```
|
|
18
12
|
|
|
19
13
|
## Usage
|
|
@@ -9,6 +9,7 @@ declare type ExternalMetricProps = {
|
|
|
9
9
|
dashboardIds: DashboardType['id'][];
|
|
10
10
|
onDashboardChange: (selected: DashboardType['id'][]) => void;
|
|
11
11
|
companyId: string;
|
|
12
|
+
error?: string;
|
|
12
13
|
};
|
|
13
14
|
declare const _default: React.NamedExoticComponent<ExternalMetricProps>;
|
|
14
15
|
export default _default;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { MetricCardProps } from '@/components/MetricCard';
|
|
2
|
+
import { MetricCardProps } from '@/components/MetricList/components/MetricCard';
|
|
3
3
|
import { FilterType } from '@/types';
|
|
4
4
|
declare type MetricFiltersProps = {
|
|
5
5
|
filters: FilterType[];
|
|
File without changes
|
package/dist/components/{SingleValueCard/index.d.ts → MetricList/components/SingleValueCard.d.ts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { MetricCardProps } from '@/components/MetricCard';
|
|
2
|
+
import { MetricCardProps } from '@/components/MetricList/components/MetricCard';
|
|
3
3
|
declare const SingleValueCard: React.FC<Omit<MetricCardProps, 'onMaximize'>>;
|
|
4
4
|
export default SingleValueCard;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { MetricCardProps } from '@/components/MetricCard';
|
|
2
|
+
import { MetricCardProps } from '@/components/MetricList/components/MetricCard';
|
|
3
3
|
import { ClientType } from '@/types';
|
|
4
4
|
export declare type ExternalMetricListProps = {
|
|
5
5
|
globalFilters?: MetricCardProps['globalFilters'];
|
|
@@ -1,2 +1,6 @@
|
|
|
1
1
|
export declare const groupByMultipleKeys: (rawData: any[] | undefined, keys: string[], measureKey: string) => any;
|
|
2
2
|
export declare const updateGroupData: (data: any[] | undefined, keys: string[], selectedGroupBy: string[], setGroupedData: (value: React.SetStateAction<Record<string, any>[]>) => void) => void;
|
|
3
|
+
export declare const findKeys: (obj: Record<string, any>) => {
|
|
4
|
+
numberKeys: string[];
|
|
5
|
+
stringKeys: string[];
|
|
6
|
+
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { FieldValues } from 'react-hook-form';
|
|
3
2
|
import { AxisSettings, DashboardType, GroupBy, LabelSettings, LegendSettings, RlsFilterObjectType, SelectedColumns } from '@/types';
|
|
4
3
|
declare type Params = {
|
|
@@ -20,7 +19,6 @@ declare type Params = {
|
|
|
20
19
|
labelSettings: LabelSettings;
|
|
21
20
|
axisSettings: AxisSettings;
|
|
22
21
|
integrationName: string | undefined;
|
|
23
|
-
setError?: React.Dispatch<React.SetStateAction<string>>;
|
|
24
22
|
clientId?: string | null;
|
|
25
23
|
isEmbedded?: boolean;
|
|
26
24
|
rlsFilters?: RlsFilterObjectType[];
|
|
@@ -32,7 +30,8 @@ declare type Params = {
|
|
|
32
30
|
selectedGroupBy: string[];
|
|
33
31
|
groupBy: GroupBy | undefined;
|
|
34
32
|
};
|
|
35
|
-
declare const useExternalMetric: ({ companyIntegrationId, selectedColumns, query, metricQuery, integrationName, outputColumns, xAxis, yAxisList, chartType, step, measure, sankeyValues, singleValue, margins, legendSettings, labelSettings, axisSettings,
|
|
33
|
+
declare const useExternalMetric: ({ companyIntegrationId, selectedColumns, query, metricQuery, integrationName, outputColumns, xAxis, yAxisList, chartType, step, measure, sankeyValues, singleValue, margins, legendSettings, labelSettings, axisSettings, clientId, companyId, mode, timeGrain, dashboardIds, isEnableGroupBy, groupBy, selectedGroupBy, }: Params) => {
|
|
36
34
|
createExternalMetric: (data: FieldValues) => void;
|
|
35
|
+
error: string;
|
|
37
36
|
};
|
|
38
37
|
export default useExternalMetric;
|