@databrainhq/plugin 0.8.20 → 0.8.21
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 +26 -26
- package/dist/components/AceEditorSql/AceEditorSql.d.ts +10 -0
- package/dist/components/FilterDropDown/index.d.ts +4 -2
- package/dist/components/FilterField/index.d.ts +2 -0
- package/dist/components/GlobalFilters/index.d.ts +1 -0
- package/dist/components/MetricCreation/components/ConstructMetric/ConstructMetric.d.ts +1 -1
- package/dist/components/MetricCreation/components/ConstructMetric/components/MetricForm/index.d.ts +1 -1
- package/dist/components/MetricFilterDropDown/index.d.ts +3 -1
- package/dist/consts/metricOptions.d.ts +1 -0
- package/dist/hooks/useGenerateDatasetMetrics.d.ts +4 -2
- package/dist/index.es.js +28961 -2679
- package/dist/index.umd.js +1279 -116
- package/dist/style.css +1 -1
- package/dist/types/metricCreate.d.ts +1 -0
- package/dist/typings.d.ts +17 -17
- package/dist/utils/generated/graphql.d.ts +177 -19
- package/package.json +100 -98
package/README.md
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
# @databrainhq/plugin
|
|
2
|
-
|
|
3
|
-
> Databrain app ui plugin.
|
|
4
|
-
|
|
5
|
-
[](https://www.npmjs.com/package/@databrainhq/plugin) [](https://standardjs.com)
|
|
6
|
-
|
|
7
|
-
## Install
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
npm install @databrainhq/plugin
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Usage
|
|
14
|
-
|
|
15
|
-
```tsx
|
|
16
|
-
import { Dashboard } from '@databrainhq/plugin';
|
|
17
|
-
import '@databrainhq/plugin/dist/style.css';
|
|
18
|
-
|
|
19
|
-
const Example = () => {
|
|
20
|
-
return <Dashboard token={/* Your Guest Token */} />;
|
|
21
|
-
};
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## License
|
|
25
|
-
|
|
26
|
-
MIT © [databrainhq](https://github.com/databrainhq)
|
|
1
|
+
# @databrainhq/plugin
|
|
2
|
+
|
|
3
|
+
> Databrain app ui plugin.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@databrainhq/plugin) [](https://standardjs.com)
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @databrainhq/plugin
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```tsx
|
|
16
|
+
import { Dashboard } from '@databrainhq/plugin';
|
|
17
|
+
import '@databrainhq/plugin/dist/style.css';
|
|
18
|
+
|
|
19
|
+
const Example = () => {
|
|
20
|
+
return <Dashboard token={/* Your Guest Token */} />;
|
|
21
|
+
};
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## License
|
|
25
|
+
|
|
26
|
+
MIT © [databrainhq](https://github.com/databrainhq)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ReactAce from 'react-ace/lib/ace';
|
|
3
|
+
interface Props {
|
|
4
|
+
onChange?: any;
|
|
5
|
+
value?: string;
|
|
6
|
+
onExecute?: (value?: string) => void;
|
|
7
|
+
editorRef: React.RefObject<ReactAce>;
|
|
8
|
+
}
|
|
9
|
+
declare const AceEditorSql: ({ onChange, value, onExecute, editorRef }: Props) => JSX.Element;
|
|
10
|
+
export default AceEditorSql;
|
|
@@ -5,7 +5,9 @@ export declare type FilterDropDownProps = Omit<FloatingDropDownProps, 'options'
|
|
|
5
5
|
companyId: string;
|
|
6
6
|
filter: Pick<RlsFilterObjectType, 'columnName' | 'tableName' | 'defaultValue' | 'value'>;
|
|
7
7
|
autoSelected?: boolean;
|
|
8
|
+
integrationId: string;
|
|
9
|
+
integrationName: string;
|
|
8
10
|
};
|
|
9
|
-
export declare const FilterDropDown: ({ companyId, filter, onChange, selectedOption, autoSelected, ...rest }: FilterDropDownProps) => JSX.Element;
|
|
10
|
-
export declare type MultiFilterDropDownProps = Pick<FilterDropDownProps, 'autoSelected' | 'companyId' | 'filter' | 'label'> & Omit<MultiFloatingDropDownProps, 'options' | 'isDisabled'>;
|
|
11
|
+
export declare const FilterDropDown: ({ companyId, filter, onChange, selectedOption, autoSelected, integrationId, integrationName, ...rest }: FilterDropDownProps) => JSX.Element;
|
|
12
|
+
export declare type MultiFilterDropDownProps = Pick<FilterDropDownProps, 'autoSelected' | 'companyId' | 'filter' | 'label' | 'integrationId' | 'integrationName'> & Omit<MultiFloatingDropDownProps, 'options' | 'isDisabled'>;
|
|
11
13
|
export declare const MultiFilterDropdown: React.FC<MultiFilterDropDownProps>;
|
|
@@ -15,6 +15,8 @@ export declare type FilterFieldProps = {
|
|
|
15
15
|
isResetted: boolean;
|
|
16
16
|
onChange: (field: FilterFieldType) => void;
|
|
17
17
|
companyId: string;
|
|
18
|
+
integrationId: string;
|
|
19
|
+
integrationName: string;
|
|
18
20
|
};
|
|
19
21
|
export declare const isInFilterOperator: (input: string) => boolean;
|
|
20
22
|
export declare const isNullFilterOperator: (input: string) => boolean;
|
|
@@ -6,6 +6,7 @@ declare type GlobalFiltersProps = {
|
|
|
6
6
|
companyId: string;
|
|
7
7
|
onApply: (filters: MetricCardProps['globalFilters']) => void;
|
|
8
8
|
renderAdditionalHeaderContent?: () => JSX.Element;
|
|
9
|
+
externalDashboardId: string;
|
|
9
10
|
};
|
|
10
11
|
export declare const GlobalFilters: React.FC<GlobalFiltersProps>;
|
|
11
12
|
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ConstructMetricProps } from '@/types/metricCreate';
|
|
3
|
-
export declare const ConstructMetric: ({ dateTimeColumnList, columnList, database, companyId, tableName, setData, setError, setLoading, setQuery, clientId, clientColumn, }: ConstructMetricProps) => JSX.Element;
|
|
3
|
+
export declare const ConstructMetric: ({ dateTimeColumnList, columnList, database, companyId, tableName, setData, setError, setLoading, setQuery, clientId, clientColumn, databaseId, }: ConstructMetricProps) => JSX.Element;
|
package/dist/components/MetricCreation/components/ConstructMetric/components/MetricForm/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ConstructMetricProps } from '@/types/metricCreate';
|
|
3
|
-
export declare const MetricForm: ({ dateTimeColumnList, columnList, database,
|
|
3
|
+
export declare const MetricForm: ({ dateTimeColumnList, columnList, database, tableName, setData, setError, setLoading, setQuery, clientId, clientColumn, databaseId, }: ConstructMetricProps) => JSX.Element;
|
|
@@ -4,6 +4,8 @@ declare type Props = {
|
|
|
4
4
|
rlsConditions?: RlsCondition[] | undefined;
|
|
5
5
|
onChangeFilterValue?: (name: string, value: string, customValue?: Record<string, Date>, stringValues?: FloatingDropDownOption[]) => void;
|
|
6
6
|
companyId: string;
|
|
7
|
+
integrationId: string;
|
|
8
|
+
integrationName: string;
|
|
7
9
|
};
|
|
8
|
-
export declare const MetricFilterDropDown: ({ rlsConditions, onChangeFilterValue, companyId, }: Props) => JSX.Element;
|
|
10
|
+
export declare const MetricFilterDropDown: ({ rlsConditions, onChangeFilterValue, companyId, integrationId, integrationName, }: Props) => JSX.Element;
|
|
9
11
|
export default MetricFilterDropDown;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
export declare const useGenerateDatasetMetrics: () => {
|
|
2
2
|
generateDatasetMetric: import("react-query").UseMutateFunction<import("@/utils/generated/graphql").GenerateDatasetMetricsMutation, unknown, import("@/utils/generated/graphql").Exact<{
|
|
3
|
-
companyId?: import("@/utils/generated/graphql").InputMaybe<string> | undefined;
|
|
4
3
|
userInputs?: any;
|
|
4
|
+
integrationName?: import("@/utils/generated/graphql").InputMaybe<string> | undefined;
|
|
5
|
+
integrationId?: import("@/utils/generated/graphql").InputMaybe<string> | undefined;
|
|
5
6
|
}>, unknown>;
|
|
6
7
|
isGeneratingDataset: boolean;
|
|
7
8
|
generateError: unknown;
|
|
8
9
|
fetchColumnValues: import("react-query").UseMutateFunction<import("@/utils/generated/graphql").FetchColumnDataMutation, unknown, import("@/utils/generated/graphql").Exact<{
|
|
9
|
-
companyId?: import("@/utils/generated/graphql").InputMaybe<string> | undefined;
|
|
10
10
|
tableName?: import("@/utils/generated/graphql").InputMaybe<string> | undefined;
|
|
11
11
|
columnName?: import("@/utils/generated/graphql").InputMaybe<string> | undefined;
|
|
12
|
+
integrationId?: import("@/utils/generated/graphql").InputMaybe<string> | undefined;
|
|
13
|
+
integrationName?: import("@/utils/generated/graphql").InputMaybe<string> | undefined;
|
|
12
14
|
}>, unknown>;
|
|
13
15
|
};
|