@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 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
  [![NPM](https://img.shields.io/npm/v/@databrainhq/plugin.svg)](https://www.npmjs.com/package/@databrainhq/plugin) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
@@ -13,7 +7,7 @@ VITE_END_POINT=.. npm install
13
7
  ## Install
14
8
 
15
9
  ```bash
16
- VITE_END_POINT="GET YOUR END POINT FROM DATABRAIN MANAGER" npm install github:databrainhq/plugin
10
+ npm install @databrainhq/plugin
17
11
  ```
18
12
 
19
13
  ## Usage
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const _default: React.MemoExoticComponent<() => any>;
3
+ export default _default;
@@ -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[];
@@ -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, setError, clientId, companyId, mode, timeGrain, dashboardIds, isEnableGroupBy, groupBy, selectedGroupBy, }: Params) => {
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;