drizzle-cube 0.1.4 → 0.1.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 +4 -17
- package/dist/adapters/hono/index.js +163 -94
- package/dist/client/client/CubeClient.d.ts +1 -0
- package/dist/client/components/Modal.d.ts +2 -1
- package/dist/client/components/QueryBuilder/CubeMetaExplorer.d.ts +4 -0
- package/dist/client/components/QueryBuilder/QueryPanel.d.ts +4 -0
- package/dist/client/components/QueryBuilder/ResultsPanel.d.ts +4 -0
- package/dist/client/components/QueryBuilder/SetupPanel.d.ts +11 -0
- package/dist/client/components/QueryBuilder/index.d.ts +3 -0
- package/dist/client/components/QueryBuilder/types.d.ts +132 -0
- package/dist/client/components/QueryBuilder/utils.d.ts +42 -0
- package/dist/client/index.d.ts +1 -0
- package/dist/client/index.js +11429 -9727
- package/dist/client/styles.css +1 -1
- package/dist/server/index.d.ts +10 -0
- package/dist/server/index.js +339 -313
- package/package.json +6 -1
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { CubeQuery } from '../../types';
|
|
2
|
+
import { MetaField, MetaResponse } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Check if a field is selected in the current query
|
|
5
|
+
*/
|
|
6
|
+
export declare function isFieldSelected(fieldName: string, fieldType: 'measures' | 'dimensions' | 'timeDimensions', query: CubeQuery): boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Get all time dimension fields from schema
|
|
9
|
+
*/
|
|
10
|
+
export declare function getTimeDimensionFields(schema: MetaResponse): MetaField[];
|
|
11
|
+
/**
|
|
12
|
+
* Get all non-time dimension fields from schema
|
|
13
|
+
*/
|
|
14
|
+
export declare function getRegularDimensionFields(schema: MetaResponse): MetaField[];
|
|
15
|
+
/**
|
|
16
|
+
* Get all measure fields from schema
|
|
17
|
+
*/
|
|
18
|
+
export declare function getMeasureFields(schema: MetaResponse): MetaField[];
|
|
19
|
+
/**
|
|
20
|
+
* Check if query has any content (measures, dimensions, or timeDimensions)
|
|
21
|
+
*/
|
|
22
|
+
export declare function hasQueryContent(query: CubeQuery): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Get count of selected fields across all types
|
|
25
|
+
*/
|
|
26
|
+
export declare function getSelectedFieldsCount(query: CubeQuery): number;
|
|
27
|
+
/**
|
|
28
|
+
* Get cube name from field name (e.g., "Employees.count" -> "Employees")
|
|
29
|
+
*/
|
|
30
|
+
export declare function getCubeNameFromField(fieldName: string): string;
|
|
31
|
+
/**
|
|
32
|
+
* Group fields by cube name
|
|
33
|
+
*/
|
|
34
|
+
export declare function groupFieldsByCube(fields: MetaField[]): Record<string, MetaField[]>;
|
|
35
|
+
/**
|
|
36
|
+
* Clean query object by removing empty arrays
|
|
37
|
+
*/
|
|
38
|
+
export declare function cleanQuery(query: CubeQuery): CubeQuery;
|
|
39
|
+
/**
|
|
40
|
+
* Create an empty query object
|
|
41
|
+
*/
|
|
42
|
+
export declare function createEmptyQuery(): CubeQuery;
|
package/dist/client/index.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ export { default as PortletEditModal } from './components/PortletEditModal';
|
|
|
7
7
|
export { default as DashboardEditModal } from './components/DashboardEditModal';
|
|
8
8
|
export { default as Modal } from './components/Modal';
|
|
9
9
|
export { default as ChartConfigEditor } from './components/ChartConfigEditor';
|
|
10
|
+
export { default as QueryBuilder } from './components/QueryBuilder';
|
|
10
11
|
export { CubeProvider } from './providers/CubeProvider';
|
|
11
12
|
export { useCubeQuery } from './hooks/useCubeQuery';
|
|
12
13
|
export { createCubeClient } from './client/CubeClient';
|