drizzle-cube 0.1.68 → 0.2.0
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/dist/adapters/{compiler-CghsDLXl.cjs → compiler-DP1pPIcg.cjs} +9 -9
- package/dist/adapters/{compiler-BnHK-nxh.js → compiler-gcKytLwd.js} +12 -13
- package/dist/adapters/express/index.cjs +1 -1
- package/dist/adapters/express/index.js +1 -1
- package/dist/adapters/fastify/index.cjs +1 -1
- package/dist/adapters/fastify/index.js +1 -1
- package/dist/adapters/hono/index.cjs +1 -1
- package/dist/adapters/hono/index.js +1 -1
- package/dist/adapters/nextjs/index.cjs +1 -1
- package/dist/adapters/nextjs/index.js +1 -1
- package/dist/client/charts/ChartLoader.d.ts +56 -0
- package/dist/client/charts/lazyChartConfigRegistry.d.ts +90 -0
- package/dist/client/charts.d.ts +6 -0
- package/dist/client/charts.js +38 -15
- package/dist/client/charts.js.map +1 -1
- package/dist/client/chunks/chart-activitygridchart-BRk9BNnp.js +3713 -0
- package/dist/client/chunks/chart-activitygridchart-BRk9BNnp.js.map +1 -0
- package/dist/client/chunks/chart-activitygridchart-config-D9CgNH02.js +51 -0
- package/dist/client/chunks/chart-activitygridchart-config-D9CgNH02.js.map +1 -0
- package/dist/client/chunks/chart-areachart-Beu8sO9v.js +204 -0
- package/dist/client/chunks/chart-areachart-Beu8sO9v.js.map +1 -0
- package/dist/client/chunks/chart-areachart-config-InZgxubz.js +66 -0
- package/dist/client/chunks/chart-areachart-config-InZgxubz.js.map +1 -0
- package/dist/client/chunks/chart-barchart-BzoejYkT.js +177 -0
- package/dist/client/chunks/chart-barchart-BzoejYkT.js.map +1 -0
- package/dist/client/chunks/chart-barchart-config-DxatOnVV.js +59 -0
- package/dist/client/chunks/chart-barchart-config-DxatOnVV.js.map +1 -0
- package/dist/client/chunks/chart-bubblechart-Dg7sT_Mm.js +210 -0
- package/dist/client/chunks/chart-bubblechart-Dg7sT_Mm.js.map +1 -0
- package/dist/client/chunks/chart-bubblechart-config-CcZTMTCx.js +59 -0
- package/dist/client/chunks/chart-bubblechart-config-CcZTMTCx.js.map +1 -0
- package/dist/client/chunks/chart-chartcontainer-CdwzIKP1.js +103 -0
- package/dist/client/chunks/chart-chartcontainer-CdwzIKP1.js.map +1 -0
- package/dist/client/chunks/chart-charttooltip-NrFVM1cJ.js +26 -0
- package/dist/client/chunks/chart-charttooltip-NrFVM1cJ.js.map +1 -0
- package/dist/client/chunks/chart-datatable-BvV7gLPZ.js +57 -0
- package/dist/client/chunks/chart-datatable-BvV7gLPZ.js.map +1 -0
- package/dist/client/chunks/chart-datatable-config-D7mojhYA.js +22 -0
- package/dist/client/chunks/chart-datatable-config-D7mojhYA.js.map +1 -0
- package/dist/client/chunks/chart-kpidelta-config-icJXuFxe.js +99 -0
- package/dist/client/chunks/chart-kpidelta-config-icJXuFxe.js.map +1 -0
- package/dist/client/chunks/chart-kpidelta-p1lVVG5v.js +434 -0
- package/dist/client/chunks/chart-kpidelta-p1lVVG5v.js.map +1 -0
- package/dist/client/chunks/chart-kpinumber-BFtxFeqq.js +398 -0
- package/dist/client/chunks/chart-kpinumber-BFtxFeqq.js.map +1 -0
- package/dist/client/chunks/chart-kpinumber-config-T39g03ud.js +77 -0
- package/dist/client/chunks/chart-kpinumber-config-T39g03ud.js.map +1 -0
- package/dist/client/chunks/chart-kpitext-CX1s1u8B.js +165 -0
- package/dist/client/chunks/chart-kpitext-CX1s1u8B.js.map +1 -0
- package/dist/client/chunks/chart-kpitext-config-BbJGXAVk.js +49 -0
- package/dist/client/chunks/chart-kpitext-config-BbJGXAVk.js.map +1 -0
- package/dist/client/chunks/chart-linechart-Dgb10zbj.js +155 -0
- package/dist/client/chunks/chart-linechart-Dgb10zbj.js.map +1 -0
- package/dist/client/chunks/chart-linechart-config-BS1qVC8K.js +54 -0
- package/dist/client/chunks/chart-linechart-config-BS1qVC8K.js.map +1 -0
- package/dist/client/chunks/chart-markdownchart-C3FAQFuO.js +254 -0
- package/dist/client/chunks/chart-markdownchart-C3FAQFuO.js.map +1 -0
- package/dist/client/chunks/chart-markdownchart-config-DMCD8phf.js +62 -0
- package/dist/client/chunks/chart-markdownchart-config-DMCD8phf.js.map +1 -0
- package/dist/client/chunks/chart-piechart-B-0BQh-d.js +121 -0
- package/dist/client/chunks/chart-piechart-B-0BQh-d.js.map +1 -0
- package/dist/client/chunks/chart-piechart-config-6ZK8XaSX.js +32 -0
- package/dist/client/chunks/chart-piechart-config-6ZK8XaSX.js.map +1 -0
- package/dist/client/chunks/chart-radarchart-BwZM1yTd.js +124 -0
- package/dist/client/chunks/chart-radarchart-BwZM1yTd.js.map +1 -0
- package/dist/client/chunks/chart-radarchart-config-CCWOkkwO.js +38 -0
- package/dist/client/chunks/chart-radarchart-config-CCWOkkwO.js.map +1 -0
- package/dist/client/chunks/chart-radialbarchart-CythI1zx.js +109 -0
- package/dist/client/chunks/chart-radialbarchart-CythI1zx.js.map +1 -0
- package/dist/client/chunks/chart-radialbarchart-config-DicXYrMW.js +31 -0
- package/dist/client/chunks/chart-radialbarchart-config-DicXYrMW.js.map +1 -0
- package/dist/client/chunks/chart-scatterchart-config-DgYa-5vm.js +41 -0
- package/dist/client/chunks/chart-scatterchart-config-DgYa-5vm.js.map +1 -0
- package/dist/client/chunks/chart-scatterchart-om9-qmtE.js +201 -0
- package/dist/client/chunks/chart-scatterchart-om9-qmtE.js.map +1 -0
- package/dist/client/chunks/chart-treemapchart-Dc35Miif.js +253 -0
- package/dist/client/chunks/chart-treemapchart-Dc35Miif.js.map +1 -0
- package/dist/client/chunks/chart-treemapchart-config-DGhteyBe.js +40 -0
- package/dist/client/chunks/chart-treemapchart-config-DGhteyBe.js.map +1 -0
- package/dist/client/chunks/charts-DL9XOlaK.js +286 -0
- package/dist/client/chunks/charts-DL9XOlaK.js.map +1 -0
- package/dist/client/chunks/{icons-Bky5w1eH.js → icons-D-n_woAP.js} +833 -783
- package/dist/client/chunks/icons-D-n_woAP.js.map +1 -0
- package/dist/client/chunks/index-DpEuGmcW.js +8707 -0
- package/dist/client/chunks/index-DpEuGmcW.js.map +1 -0
- package/dist/client/components/QueryBuilder/ShareWarningModal.d.ts +9 -0
- package/dist/client/components/QueryBuilder/shareUtils.d.ts +59 -0
- package/dist/client/components/QueryBuilder/types.d.ts +21 -1
- package/dist/client/components.js +11 -11
- package/dist/client/hooks.js +3 -3
- package/dist/client/index.d.ts +18 -1
- package/dist/client/index.js +9135 -39
- package/dist/client/index.js.map +1 -1
- package/dist/client/providers.js +4 -4
- package/dist/client/styles.css +1 -1
- package/dist/client-bundle-stats.html +1 -1
- package/dist/server/index.cjs +16 -16
- package/dist/server/index.d.ts +0 -286
- package/dist/server/index.js +767 -881
- package/package.json +8 -2
- package/dist/client/chunks/charts-jwgcWeFt.js +0 -2580
- package/dist/client/chunks/charts-jwgcWeFt.js.map +0 -1
- package/dist/client/chunks/components-fN-QOY6G.js +0 -21835
- package/dist/client/chunks/components-fN-QOY6G.js.map +0 -1
- package/dist/client/chunks/icons-Bky5w1eH.js.map +0 -1
- package/dist/client/chunks/providers-D7zRgZrO.js +0 -308
- package/dist/client/chunks/providers-D7zRgZrO.js.map +0 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface ShareWarningModalProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
size: number;
|
|
6
|
+
maxSize: number;
|
|
7
|
+
}
|
|
8
|
+
declare const ShareWarningModal: React.FC<ShareWarningModalProps>;
|
|
9
|
+
export default ShareWarningModal;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { CubeQuery, ChartType, ChartAxisConfig, ChartDisplayConfig } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* State that can be shared via URL
|
|
4
|
+
* Query is required, chart config is optional (may be dropped if too large)
|
|
5
|
+
*/
|
|
6
|
+
export interface ShareableState {
|
|
7
|
+
query: CubeQuery;
|
|
8
|
+
chartType?: ChartType;
|
|
9
|
+
chartConfig?: ChartAxisConfig;
|
|
10
|
+
displayConfig?: ChartDisplayConfig;
|
|
11
|
+
activeView?: 'table' | 'chart';
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Result of compression with fallback
|
|
15
|
+
*/
|
|
16
|
+
export interface CompressionResult {
|
|
17
|
+
encoded: string | null;
|
|
18
|
+
queryOnly: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Compress state to URL-safe encoded string
|
|
22
|
+
*/
|
|
23
|
+
export declare function compressAndEncode(state: ShareableState): string;
|
|
24
|
+
/**
|
|
25
|
+
* Decompress URL-safe encoded string back to state
|
|
26
|
+
* Returns null if decompression or parsing fails
|
|
27
|
+
*/
|
|
28
|
+
export declare function decodeAndDecompress(encoded: string): ShareableState | null;
|
|
29
|
+
/**
|
|
30
|
+
* Check if compressed state fits within URL length limit
|
|
31
|
+
*/
|
|
32
|
+
export declare function isShareableSize(state: ShareableState): {
|
|
33
|
+
ok: boolean;
|
|
34
|
+
size: number;
|
|
35
|
+
maxSize: number;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Compress state with automatic fallback
|
|
39
|
+
* If full state is too large, tries with query only
|
|
40
|
+
* Returns null encoded if even query-only is too large
|
|
41
|
+
*/
|
|
42
|
+
export declare function compressWithFallback(state: ShareableState): CompressionResult;
|
|
43
|
+
/**
|
|
44
|
+
* Generate full share URL with compressed state in hash
|
|
45
|
+
*/
|
|
46
|
+
export declare function generateShareUrl(state: ShareableState): string | null;
|
|
47
|
+
/**
|
|
48
|
+
* Parse share hash from current URL
|
|
49
|
+
* Returns encoded string if #share= is present, null otherwise
|
|
50
|
+
*/
|
|
51
|
+
export declare function parseShareHash(): string | null;
|
|
52
|
+
/**
|
|
53
|
+
* Clear share hash from URL without page reload
|
|
54
|
+
*/
|
|
55
|
+
export declare function clearShareHash(): void;
|
|
56
|
+
/**
|
|
57
|
+
* Get the maximum allowed hash length
|
|
58
|
+
*/
|
|
59
|
+
export declare function getMaxHashLength(): number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CubeQuery, FilterOperator, Filter, SimpleFilter, GroupFilter } from '../../types';
|
|
1
|
+
import { CubeQuery, FilterOperator, Filter, SimpleFilter, GroupFilter, ChartType, ChartAxisConfig, ChartDisplayConfig } from '../../types';
|
|
2
2
|
export interface MetaField {
|
|
3
3
|
name: string;
|
|
4
4
|
title: string;
|
|
@@ -126,6 +126,8 @@ export interface QueryBuilderProps {
|
|
|
126
126
|
initialQuery?: CubeQuery;
|
|
127
127
|
disableLocalStorage?: boolean;
|
|
128
128
|
hideSettings?: boolean;
|
|
129
|
+
enableSharing?: boolean;
|
|
130
|
+
onShare?: (url: string) => void;
|
|
129
131
|
}
|
|
130
132
|
export interface QueryBuilderRef {
|
|
131
133
|
getCurrentQuery: () => CubeQuery;
|
|
@@ -152,6 +154,7 @@ export interface CubeMetaExplorerProps {
|
|
|
152
154
|
onViewTypeChange?: (viewType: 'tree' | 'diagram') => void;
|
|
153
155
|
isExpanded?: boolean;
|
|
154
156
|
}
|
|
157
|
+
export type ShareButtonState = 'idle' | 'copied' | 'copied-no-chart';
|
|
155
158
|
export interface QueryPanelProps {
|
|
156
159
|
query: CubeQuery;
|
|
157
160
|
schema: MetaResponse | null;
|
|
@@ -175,6 +178,14 @@ export interface QueryPanelProps {
|
|
|
175
178
|
onSettingsClick?: () => void;
|
|
176
179
|
onAIAssistantClick?: () => void;
|
|
177
180
|
onSchemaClick?: () => void;
|
|
181
|
+
onShareClick?: () => void;
|
|
182
|
+
shareButtonState?: ShareButtonState;
|
|
183
|
+
isViewingShared?: boolean;
|
|
184
|
+
}
|
|
185
|
+
export interface AvailableFields {
|
|
186
|
+
dimensions: string[];
|
|
187
|
+
timeDimensions: string[];
|
|
188
|
+
measures: string[];
|
|
178
189
|
}
|
|
179
190
|
export interface ResultsPanelProps {
|
|
180
191
|
executionStatus: ExecutionStatus;
|
|
@@ -185,6 +196,15 @@ export interface ResultsPanelProps {
|
|
|
185
196
|
onDisplayLimitChange?: (limit: number) => void;
|
|
186
197
|
totalRowCount?: number | null;
|
|
187
198
|
totalRowCountStatus?: 'idle' | 'loading' | 'success' | 'error';
|
|
199
|
+
chartType?: ChartType;
|
|
200
|
+
chartConfig?: ChartAxisConfig;
|
|
201
|
+
displayConfig?: ChartDisplayConfig;
|
|
202
|
+
availableFields?: AvailableFields | null;
|
|
203
|
+
onChartTypeChange?: (type: ChartType) => void;
|
|
204
|
+
onChartConfigChange?: (config: ChartAxisConfig) => void;
|
|
205
|
+
onDisplayConfigChange?: (config: ChartDisplayConfig) => void;
|
|
206
|
+
activeView?: 'table' | 'chart';
|
|
207
|
+
onActiveViewChange?: (view: 'table' | 'chart') => void;
|
|
188
208
|
}
|
|
189
209
|
export declare const TIME_GRANULARITIES: readonly [{
|
|
190
210
|
readonly value: "hour";
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as
|
|
1
|
+
import { AnalyticsDashboard as t, AnalyticsPortlet as o, DashboardEditModal as r, DashboardGrid as s, Modal as d, PortletContainer as l, PortletEditModal as i, QueryBuilder as n } from "./index.js";
|
|
2
|
+
import { c as y, j as P, h as b, e as c, d as h, v as p } from "./chunks/charts-DL9XOlaK.js";
|
|
3
3
|
export {
|
|
4
4
|
t as AnalyticsDashboard,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
o as AnalyticsPortlet,
|
|
6
|
+
r as DashboardEditModal,
|
|
7
|
+
s as DashboardGrid,
|
|
8
8
|
d as Modal,
|
|
9
9
|
l as PortletContainer,
|
|
10
10
|
i as PortletEditModal,
|
|
11
11
|
n as QueryBuilder,
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
12
|
+
y as createDashboardLayout,
|
|
13
|
+
P as createSamplePortlet,
|
|
14
|
+
b as findNextPosition,
|
|
15
|
+
c as generatePortletId,
|
|
16
|
+
h as generateResponsiveLayouts,
|
|
17
|
+
p as validateCubeQuery
|
|
18
18
|
};
|
|
19
19
|
//# sourceMappingURL=components.js.map
|
package/dist/client/hooks.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState as b, useRef as w, useEffect as y, useCallback as C, useMemo as m } from "react";
|
|
2
|
-
import { u as L } from "./chunks/
|
|
3
|
-
import {
|
|
2
|
+
import { u as L } from "./chunks/chart-activitygridchart-BRk9BNnp.js";
|
|
3
|
+
import { A } from "./chunks/chart-activitygridchart-BRk9BNnp.js";
|
|
4
4
|
function W(e, r = {}) {
|
|
5
5
|
const { cubeApi: s, batchCoordinator: u, enableBatching: a } = L(), [l, d] = b({
|
|
6
6
|
resultSet: null,
|
|
@@ -164,7 +164,7 @@ function k() {
|
|
|
164
164
|
};
|
|
165
165
|
}
|
|
166
166
|
export {
|
|
167
|
-
|
|
167
|
+
A as useCubeMeta,
|
|
168
168
|
W as useCubeQuery,
|
|
169
169
|
Q as useDebounce,
|
|
170
170
|
D as useFilterValues,
|
package/dist/client/index.d.ts
CHANGED
|
@@ -1,8 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Drizzle Cube Client Components
|
|
3
|
+
*
|
|
4
|
+
* React components for building analytics dashboards with minimal dependencies.
|
|
5
|
+
* Designed to be embedded in existing applications with their own auth/navigation.
|
|
6
|
+
*
|
|
7
|
+
* For modular imports, consider using:
|
|
8
|
+
* - 'drizzle-cube/client/charts' - Chart components only
|
|
9
|
+
* - 'drizzle-cube/client/hooks' - React hooks only
|
|
10
|
+
* - 'drizzle-cube/client/providers' - Context providers only
|
|
11
|
+
* - 'drizzle-cube/client/components' - UI components (no charts)
|
|
12
|
+
* - 'drizzle-cube/client/utils' - Utility functions only
|
|
13
|
+
*
|
|
14
|
+
* IMPORTANT: CSS is NOT auto-imported. Add to your app entry:
|
|
15
|
+
* import 'drizzle-cube/client/styles.css'
|
|
16
|
+
*/
|
|
1
17
|
export { default as AnalyticsPortlet } from './components/AnalyticsPortlet';
|
|
2
18
|
export { default as AnalyticsDashboard } from './components/AnalyticsDashboard';
|
|
3
19
|
export { default as LoadingIndicator } from './components/LoadingIndicator';
|
|
4
20
|
export type { LoadingIndicatorProps } from './components/LoadingIndicator';
|
|
5
|
-
export {
|
|
21
|
+
export { LazyChart, preloadChart, preloadCharts, isValidChartType, getAvailableChartTypes } from './charts/ChartLoader';
|
|
22
|
+
export type { LazyChartProps } from './charts/ChartLoader';
|
|
6
23
|
export { default as DashboardGrid } from './components/DashboardGrid';
|
|
7
24
|
export { default as PortletContainer } from './components/PortletContainer';
|
|
8
25
|
export { default as PortletEditModal } from './components/PortletEditModal';
|