@databrainhq/plugin 0.9.32 → 0.9.33

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,11 @@
1
+ declare const generateTimeRangeWhereClause: ({ isTimeColumn, timeColumnName, timeCount, timeGrain, timeRangeIndicator, databaseType, endDate, startDate, }: {
2
+ timeColumnName: string;
3
+ timeRangeIndicator: string;
4
+ timeCount: number;
5
+ timeGrain: string;
6
+ isTimeColumn: boolean;
7
+ startDate?: Date | undefined;
8
+ endDate?: Date | undefined;
9
+ databaseType?: string | undefined;
10
+ }) => string;
11
+ export default generateTimeRangeWhereClause;
@@ -0,0 +1,11 @@
1
+ import { DateOptionType } from '@/types';
2
+ type Params = {
3
+ timeColumn: string;
4
+ data: Record<string, any>[];
5
+ dimensionColumn: string;
6
+ measureColumn: string;
7
+ option: DateOptionType;
8
+ };
9
+ declare const getTimeFilteredData: ({ data, dimensionColumn, measureColumn, timeColumn, option, }: Params) => any[];
10
+ export default getTimeFilteredData;
11
+ export declare const getTimeGroupData: ({ data, dimensionColumn, measureColumn, timeColumn, option, }: Params) => any[];