@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 CHANGED
@@ -1,26 +1,26 @@
1
- # @databrainhq/plugin
2
-
3
- > Databrain app ui plugin.
4
-
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)
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
+ [![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)
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;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
2
  import { ConstructMetricProps } from '@/types/metricCreate';
3
- export declare const MetricForm: ({ dateTimeColumnList, columnList, database, companyId, tableName, setData, setError, setLoading, setQuery, clientId, clientColumn, }: ConstructMetricProps) => JSX.Element;
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;
@@ -15,3 +15,4 @@ export declare const STRING_TYPES: string[];
15
15
  export declare const DATE_TYPES: string[];
16
16
  export declare const ARRAY_TYPES: string[];
17
17
  export declare const BOOLEAN_TYPES: string[];
18
+ export declare const configTabs: string[];
@@ -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
  };