drizzle-cube 0.2.7 → 0.2.9
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/client/charts.js +11 -11
- package/dist/client/chunks/chart-activitygridchart-config-DVH-sdYZ.js +244 -0
- package/dist/client/chunks/chart-activitygridchart-config-DVH-sdYZ.js.map +1 -0
- package/dist/client/chunks/{chart-areachart-config-D8taXdn1.js → chart-areachart-config-C2iwLEgm.js} +2 -2
- package/dist/client/chunks/{chart-areachart-config-D8taXdn1.js.map → chart-areachart-config-C2iwLEgm.js.map} +1 -1
- package/dist/client/chunks/chart-barchart-Bdjz8DJp.js +171 -0
- package/dist/client/chunks/chart-barchart-Bdjz8DJp.js.map +1 -0
- package/dist/client/chunks/{chart-barchart-config-DjRZBtLb.js → chart-barchart-config-CAsUZfHw.js} +2 -2
- package/dist/client/chunks/{chart-barchart-config-DjRZBtLb.js.map → chart-barchart-config-CAsUZfHw.js.map} +1 -1
- package/dist/client/chunks/{chart-bubblechart-config-C6ck2qmg.js → chart-bubblechart-config-DRuY0m7S.js} +2 -2
- package/dist/client/chunks/{chart-bubblechart-config-C6ck2qmg.js.map → chart-bubblechart-config-DRuY0m7S.js.map} +1 -1
- package/dist/client/chunks/{chart-datatable-config-B5z0SlOJ.js → chart-datatable-config-C0MoGDgo.js} +2 -2
- package/dist/client/chunks/{chart-datatable-config-B5z0SlOJ.js.map → chart-datatable-config-C0MoGDgo.js.map} +1 -1
- package/dist/client/chunks/chart-datatable-zyVFtRJ_.js +249 -0
- package/dist/client/chunks/chart-datatable-zyVFtRJ_.js.map +1 -0
- package/dist/client/chunks/{chart-kpidelta-Cf1JmtGF.js → chart-kpidelta-CTcuIO9G.js} +2 -2
- package/dist/client/chunks/{chart-kpidelta-Cf1JmtGF.js.map → chart-kpidelta-CTcuIO9G.js.map} +1 -1
- package/dist/client/chunks/{chart-kpidelta-config-CnZfi_P2.js → chart-kpidelta-config-Bq2Ph_Sp.js} +2 -2
- package/dist/client/chunks/{chart-kpidelta-config-CnZfi_P2.js.map → chart-kpidelta-config-Bq2Ph_Sp.js.map} +1 -1
- package/dist/client/chunks/{chart-kpinumber-config-CVikHojM.js → chart-kpinumber-config-OMNhJXdH.js} +2 -2
- package/dist/client/chunks/{chart-kpinumber-config-CVikHojM.js.map → chart-kpinumber-config-OMNhJXdH.js.map} +1 -1
- package/dist/client/chunks/{chart-kpinumber-eEMpzorv.js → chart-kpinumber-slEXt8C-.js} +3 -3
- package/dist/client/chunks/{chart-kpinumber-eEMpzorv.js.map → chart-kpinumber-slEXt8C-.js.map} +1 -1
- package/dist/client/chunks/{chart-kpitext-config-B2MovXSw.js → chart-kpitext-config-BLiwQIVN.js} +2 -2
- package/dist/client/chunks/{chart-kpitext-config-B2MovXSw.js.map → chart-kpitext-config-BLiwQIVN.js.map} +1 -1
- package/dist/client/chunks/{chart-kpitext-CppmccTK.js → chart-kpitext-giq03TOK.js} +2 -2
- package/dist/client/chunks/{chart-kpitext-CppmccTK.js.map → chart-kpitext-giq03TOK.js.map} +1 -1
- package/dist/client/chunks/{chart-linechart-config-CVBVB7nS.js → chart-linechart-config-CVbDAvCB.js} +2 -2
- package/dist/client/chunks/{chart-linechart-config-CVBVB7nS.js.map → chart-linechart-config-CVbDAvCB.js.map} +1 -1
- package/dist/client/chunks/{chart-markdownchart-config-Cq5Sxrgq.js → chart-markdownchart-config-uttA9Th4.js} +2 -2
- package/dist/client/chunks/{chart-markdownchart-config-Cq5Sxrgq.js.map → chart-markdownchart-config-uttA9Th4.js.map} +1 -1
- package/dist/client/chunks/{chart-piechart-config-Bdd31Gdi.js → chart-piechart-config-J748ISAR.js} +2 -2
- package/dist/client/chunks/{chart-piechart-config-Bdd31Gdi.js.map → chart-piechart-config-J748ISAR.js.map} +1 -1
- package/dist/client/chunks/{chart-radarchart-config-BWyfn0ij.js → chart-radarchart-config-CU_MwXOg.js} +2 -2
- package/dist/client/chunks/{chart-radarchart-config-BWyfn0ij.js.map → chart-radarchart-config-CU_MwXOg.js.map} +1 -1
- package/dist/client/chunks/{chart-radialbarchart-config-lU2_NQCD.js → chart-radialbarchart-config-D0eEa2hb.js} +2 -2
- package/dist/client/chunks/{chart-radialbarchart-config-lU2_NQCD.js.map → chart-radialbarchart-config-D0eEa2hb.js.map} +1 -1
- package/dist/client/chunks/{chart-scatterchart-config-DtLnut1M.js → chart-scatterchart-config-Bh0qBq9F.js} +2 -2
- package/dist/client/chunks/{chart-scatterchart-config-DtLnut1M.js.map → chart-scatterchart-config-Bh0qBq9F.js.map} +1 -1
- package/dist/client/chunks/{chart-treemapchart-config-BEiIWQnR.js → chart-treemapchart-config-Bl0wYGhB.js} +2 -2
- package/dist/client/chunks/{chart-treemapchart-config-BEiIWQnR.js.map → chart-treemapchart-config-Bl0wYGhB.js.map} +1 -1
- package/dist/client/chunks/{charts-BsPkAFTR.js → charts-BUq4jszb.js} +25 -25
- package/dist/client/chunks/{charts-BsPkAFTR.js.map → charts-BUq4jszb.js.map} +1 -1
- package/dist/client/chunks/components-DnhfrXo3.js +9846 -0
- package/dist/client/chunks/components-DnhfrXo3.js.map +1 -0
- package/dist/client/chunks/{icons-D6z-_9sa.js → icons-B2XSxpVK.js} +213 -181
- package/dist/client/chunks/icons-B2XSxpVK.js.map +1 -0
- package/dist/client/components/AnalysisBuilder/AnalysisAxisDropZone.d.ts +27 -0
- package/dist/client/components/AnalysisBuilder/AnalysisChartConfigPanel.d.ts +21 -0
- package/dist/client/components/AnalysisBuilder/AnalysisFilterGroup.d.ts +20 -0
- package/dist/client/components/AnalysisBuilder/AnalysisFilterItem.d.ts +16 -0
- package/dist/client/components/AnalysisBuilder/AnalysisFilterSection.d.ts +14 -0
- package/dist/client/components/AnalysisBuilder/AnalysisQueryPanel.d.ts +11 -0
- package/dist/client/components/AnalysisBuilder/AnalysisResultsPanel.d.ts +13 -0
- package/dist/client/components/AnalysisBuilder/BreakdownItemCard.d.ts +12 -0
- package/dist/client/components/AnalysisBuilder/BreakdownSection.d.ts +9 -0
- package/dist/client/components/AnalysisBuilder/FieldDetailPanel.d.ts +4 -0
- package/dist/client/components/AnalysisBuilder/FieldSearchItem.d.ts +6 -0
- package/dist/client/components/AnalysisBuilder/FieldSearchModal.d.ts +2 -0
- package/dist/client/components/AnalysisBuilder/MetricItemCard.d.ts +11 -0
- package/dist/client/components/AnalysisBuilder/MetricsSection.d.ts +9 -0
- package/dist/client/components/AnalysisBuilder/index.d.ts +3 -0
- package/dist/client/components/AnalysisBuilder/types.d.ts +408 -0
- package/dist/client/components/AnalysisBuilder/utils.d.ts +103 -0
- package/dist/client/components/ChartTypeSelector.d.ts +6 -1
- package/dist/client/components/QueryBuilder/CubeMetaExplorer.d.ts +2 -2
- package/dist/client/components/QueryBuilder/QueryPanel.d.ts +2 -2
- package/dist/client/components/QueryBuilder/types.d.ts +7 -138
- package/dist/client/components/charts/DataTable.d.ts +1 -1
- package/dist/client/components.js +16 -9725
- package/dist/client/components.js.map +1 -1
- package/dist/client/icons/registry.d.ts +1 -1
- package/dist/client/icons/types.d.ts +6 -0
- package/dist/client/icons.js +1 -1
- package/dist/client/index.d.ts +1 -0
- package/dist/client/index.js +3466 -49
- package/dist/client/index.js.map +1 -1
- package/dist/client/shared/chartDefaults.d.ts +64 -0
- package/dist/client/shared/components/QueryAnalysisPanel.d.ts +7 -0
- package/dist/client/shared/index.d.ts +10 -0
- package/dist/client/shared/types.d.ts +134 -0
- package/dist/client/shared/utils.d.ts +101 -0
- package/dist/client/styles.css +1 -1
- package/dist/client/types.d.ts +1 -0
- package/dist/client/utils/index.d.ts +1 -0
- package/dist/client/utils/pivotUtils.d.ts +78 -0
- package/dist/client-bundle-stats.html +1 -1
- package/package.json +1 -1
- package/dist/client/chunks/chart-activitygridchart-config-48WqIofo.js +0 -230
- package/dist/client/chunks/chart-activitygridchart-config-48WqIofo.js.map +0 -1
- package/dist/client/chunks/chart-barchart-7bCO3dnb.js +0 -177
- package/dist/client/chunks/chart-barchart-7bCO3dnb.js.map +0 -1
- package/dist/client/chunks/chart-datatable-BTqU80Qo.js +0 -57
- package/dist/client/chunks/chart-datatable-BTqU80Qo.js.map +0 -1
- package/dist/client/chunks/icons-D6z-_9sa.js.map +0 -1
|
@@ -1,30 +1,12 @@
|
|
|
1
1
|
import { CubeQuery, FilterOperator, Filter, SimpleFilter, GroupFilter, ChartType, ChartAxisConfig, ChartDisplayConfig } from '../../types';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
shortTitle: string;
|
|
6
|
-
type: string;
|
|
7
|
-
description?: string;
|
|
8
|
-
}
|
|
9
|
-
export interface MetaCube {
|
|
10
|
-
name: string;
|
|
11
|
-
title: string;
|
|
12
|
-
description: string;
|
|
13
|
-
measures: MetaField[];
|
|
14
|
-
dimensions: MetaField[];
|
|
15
|
-
segments: MetaField[];
|
|
16
|
-
}
|
|
17
|
-
export interface MetaResponse {
|
|
18
|
-
cubes: MetaCube[];
|
|
19
|
-
}
|
|
2
|
+
import { MetaResponse, QueryAnalysis, ValidationResult, DateRangeType } from '../../shared/types';
|
|
3
|
+
export type { MetaField, MetaCube, MetaResponse, QueryAnalysis, PrimaryCubeSelectionReason, PrimaryCubeCandidate, PrimaryCubeAnalysis, JoinPathStep, JoinPathAnalysis, PreAggregationAnalysis, QuerySummary, ValidationResult, FilterOperatorMeta, DateRangeType, DateRangeOption, TimeGranularity } from '../../shared/types';
|
|
4
|
+
export { FILTER_OPERATORS, DATE_RANGE_OPTIONS, TIME_GRANULARITIES } from '../../shared/types';
|
|
20
5
|
export type ValidationStatus = 'idle' | 'validating' | 'valid' | 'invalid';
|
|
21
|
-
export type ExecutionStatus = 'idle' | 'loading' | 'success' | 'error';
|
|
6
|
+
export type ExecutionStatus = 'idle' | 'loading' | 'refreshing' | 'success' | 'error';
|
|
22
7
|
export type SchemaStatus = 'idle' | 'loading' | 'success' | 'error';
|
|
23
8
|
export interface QueryBuilderState {
|
|
24
9
|
query: CubeQuery;
|
|
25
|
-
schema: MetaResponse | null;
|
|
26
|
-
schemaStatus: SchemaStatus;
|
|
27
|
-
schemaError: string | null;
|
|
28
10
|
validationStatus: ValidationStatus;
|
|
29
11
|
validationError: string | null;
|
|
30
12
|
validationSql: {
|
|
@@ -36,86 +18,7 @@ export interface QueryBuilderState {
|
|
|
36
18
|
executionError: string | null;
|
|
37
19
|
totalRowCount: number | null;
|
|
38
20
|
totalRowCountStatus: 'idle' | 'loading' | 'success' | 'error';
|
|
39
|
-
|
|
40
|
-
export type PrimaryCubeSelectionReason = 'most_dimensions' | 'most_connected' | 'alphabetical_fallback' | 'single_cube';
|
|
41
|
-
export interface PrimaryCubeCandidate {
|
|
42
|
-
cubeName: string;
|
|
43
|
-
dimensionCount: number;
|
|
44
|
-
joinCount: number;
|
|
45
|
-
canReachAll: boolean;
|
|
46
|
-
}
|
|
47
|
-
export interface PrimaryCubeAnalysis {
|
|
48
|
-
selectedCube: string;
|
|
49
|
-
reason: PrimaryCubeSelectionReason;
|
|
50
|
-
explanation: string;
|
|
51
|
-
candidates?: PrimaryCubeCandidate[];
|
|
52
|
-
}
|
|
53
|
-
export interface JoinPathStep {
|
|
54
|
-
fromCube: string;
|
|
55
|
-
toCube: string;
|
|
56
|
-
relationship: 'belongsTo' | 'hasOne' | 'hasMany' | 'belongsToMany';
|
|
57
|
-
joinType: 'inner' | 'left' | 'right' | 'full';
|
|
58
|
-
joinColumns: Array<{
|
|
59
|
-
sourceColumn: string;
|
|
60
|
-
targetColumn: string;
|
|
61
|
-
}>;
|
|
62
|
-
junctionTable?: {
|
|
63
|
-
tableName: string;
|
|
64
|
-
sourceColumns: string[];
|
|
65
|
-
targetColumns: string[];
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
export interface JoinPathAnalysis {
|
|
69
|
-
targetCube: string;
|
|
70
|
-
pathFound: boolean;
|
|
71
|
-
path?: JoinPathStep[];
|
|
72
|
-
pathLength?: number;
|
|
73
|
-
error?: string;
|
|
74
|
-
visitedCubes?: string[];
|
|
75
|
-
}
|
|
76
|
-
export interface PreAggregationAnalysis {
|
|
77
|
-
cubeName: string;
|
|
78
|
-
cteAlias: string;
|
|
79
|
-
reason: string;
|
|
80
|
-
measures: string[];
|
|
81
|
-
joinKeys: Array<{
|
|
82
|
-
sourceColumn: string;
|
|
83
|
-
targetColumn: string;
|
|
84
|
-
}>;
|
|
85
|
-
}
|
|
86
|
-
export interface QuerySummary {
|
|
87
|
-
queryType: 'single_cube' | 'multi_cube_join' | 'multi_cube_cte';
|
|
88
|
-
joinCount: number;
|
|
89
|
-
cteCount: number;
|
|
90
|
-
hasPreAggregation: boolean;
|
|
91
|
-
}
|
|
92
|
-
export interface QueryAnalysis {
|
|
93
|
-
timestamp: string;
|
|
94
|
-
cubeCount: number;
|
|
95
|
-
cubesInvolved: string[];
|
|
96
|
-
primaryCube: PrimaryCubeAnalysis;
|
|
97
|
-
joinPaths: JoinPathAnalysis[];
|
|
98
|
-
preAggregations: PreAggregationAnalysis[];
|
|
99
|
-
querySummary: QuerySummary;
|
|
100
|
-
warnings?: string[];
|
|
101
|
-
}
|
|
102
|
-
export interface ValidationResult {
|
|
103
|
-
valid?: boolean;
|
|
104
|
-
error?: string;
|
|
105
|
-
query?: CubeQuery;
|
|
106
|
-
sql?: {
|
|
107
|
-
sql: string[];
|
|
108
|
-
params: any[];
|
|
109
|
-
};
|
|
110
|
-
queryType?: string;
|
|
111
|
-
normalizedQueries?: any[];
|
|
112
|
-
queryOrder?: string[];
|
|
113
|
-
transformedQueries?: any[];
|
|
114
|
-
pivotQuery?: any;
|
|
115
|
-
complexity?: string;
|
|
116
|
-
cubesUsed?: string[];
|
|
117
|
-
joinType?: string;
|
|
118
|
-
analysis?: QueryAnalysis;
|
|
21
|
+
resultsStale: boolean;
|
|
119
22
|
}
|
|
120
23
|
export interface ApiConfig {
|
|
121
24
|
baseApiUrl: string;
|
|
@@ -165,7 +68,6 @@ export interface QueryPanelProps {
|
|
|
165
68
|
params: any[];
|
|
166
69
|
} | null;
|
|
167
70
|
validationAnalysis?: QueryAnalysis | null;
|
|
168
|
-
onValidate: () => void;
|
|
169
71
|
onExecute: () => void;
|
|
170
72
|
onRemoveField: (fieldName: string, fieldType: 'measures' | 'dimensions' | 'timeDimensions') => void;
|
|
171
73
|
onTimeDimensionGranularityChange: (dimensionName: string, granularity: string) => void;
|
|
@@ -179,6 +81,7 @@ export interface QueryPanelProps {
|
|
|
179
81
|
onAIAssistantClick?: () => void;
|
|
180
82
|
onSchemaClick?: () => void;
|
|
181
83
|
onShareClick?: () => void;
|
|
84
|
+
canShare?: boolean;
|
|
182
85
|
shareButtonState?: ShareButtonState;
|
|
183
86
|
isViewingShared?: boolean;
|
|
184
87
|
}
|
|
@@ -191,6 +94,7 @@ export interface ResultsPanelProps {
|
|
|
191
94
|
executionStatus: ExecutionStatus;
|
|
192
95
|
executionResults: any[] | null;
|
|
193
96
|
executionError: string | null;
|
|
97
|
+
resultsStale?: boolean;
|
|
194
98
|
query: CubeQuery;
|
|
195
99
|
displayLimit?: number;
|
|
196
100
|
onDisplayLimitChange?: (limit: number) => void;
|
|
@@ -206,35 +110,6 @@ export interface ResultsPanelProps {
|
|
|
206
110
|
activeView?: 'table' | 'chart';
|
|
207
111
|
onActiveViewChange?: (view: 'table' | 'chart') => void;
|
|
208
112
|
}
|
|
209
|
-
export declare const TIME_GRANULARITIES: readonly [{
|
|
210
|
-
readonly value: "hour";
|
|
211
|
-
readonly label: "Hour";
|
|
212
|
-
}, {
|
|
213
|
-
readonly value: "day";
|
|
214
|
-
readonly label: "Day";
|
|
215
|
-
}, {
|
|
216
|
-
readonly value: "week";
|
|
217
|
-
readonly label: "Week";
|
|
218
|
-
}, {
|
|
219
|
-
readonly value: "month";
|
|
220
|
-
readonly label: "Month";
|
|
221
|
-
}, {
|
|
222
|
-
readonly value: "quarter";
|
|
223
|
-
readonly label: "Quarter";
|
|
224
|
-
}, {
|
|
225
|
-
readonly value: "year";
|
|
226
|
-
readonly label: "Year";
|
|
227
|
-
}];
|
|
228
|
-
export type TimeGranularity = typeof TIME_GRANULARITIES[number]['value'];
|
|
229
|
-
export interface FilterOperatorMeta {
|
|
230
|
-
label: string;
|
|
231
|
-
description: string;
|
|
232
|
-
requiresValues: boolean;
|
|
233
|
-
supportsMultipleValues: boolean;
|
|
234
|
-
valueType: 'string' | 'number' | 'date' | 'boolean' | 'any';
|
|
235
|
-
fieldTypes: string[];
|
|
236
|
-
}
|
|
237
|
-
export declare const FILTER_OPERATORS: Record<FilterOperator, FilterOperatorMeta>;
|
|
238
113
|
export interface FilterBuilderProps {
|
|
239
114
|
filters: Filter[];
|
|
240
115
|
schema: MetaResponse | null;
|
|
@@ -270,12 +145,6 @@ export interface FilterValueSelectorProps {
|
|
|
270
145
|
onValuesChange: (values: any[]) => void;
|
|
271
146
|
schema: MetaResponse | null;
|
|
272
147
|
}
|
|
273
|
-
export type DateRangeType = 'custom' | 'today' | 'yesterday' | 'this_week' | 'this_month' | 'this_quarter' | 'this_year' | 'last_7_days' | 'last_30_days' | 'last_week' | 'last_month' | 'last_quarter' | 'last_year' | 'last_12_months' | 'last_n_days' | 'last_n_weeks' | 'last_n_months' | 'last_n_quarters' | 'last_n_years';
|
|
274
|
-
export interface DateRangeOption {
|
|
275
|
-
value: DateRangeType;
|
|
276
|
-
label: string;
|
|
277
|
-
}
|
|
278
|
-
export declare const DATE_RANGE_OPTIONS: DateRangeOption[];
|
|
279
148
|
export interface DateRangeFilter {
|
|
280
149
|
id: string;
|
|
281
150
|
timeDimension: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { ChartProps } from '../../types';
|
|
2
|
-
export default function DataTable({ data, chartConfig, height }: ChartProps): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export default function DataTable({ data, chartConfig, displayConfig, queryObject, height }: ChartProps): import("react/jsx-runtime").JSX.Element;
|