tax-mega-ui 0.0.0-stage → 0.0.1
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/index.d.ts +955 -0
- package/dist/style.css +1 -0
- package/dist/tax-mega-ui.mjs +15207 -0
- package/dist/tax-mega-ui.umd.js +13 -0
- package/package.json +67 -4
- package/README.md +0 -3
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,955 @@
|
|
|
1
|
+
import { ComponentOptionsMixin } from 'vue';
|
|
2
|
+
import { ComponentProvideOptions } from 'vue';
|
|
3
|
+
import { ComputedRef } from 'vue';
|
|
4
|
+
import { DeepReadonly } from 'vue';
|
|
5
|
+
import { DefineComponent } from 'vue';
|
|
6
|
+
import { EChartsOption } from 'echarts';
|
|
7
|
+
import { PublicProps } from 'vue';
|
|
8
|
+
import { Ref } from 'vue';
|
|
9
|
+
|
|
10
|
+
declare const __VLS_component: DefineComponent<MegaConfig, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
11
|
+
"session-ready": (session: ClientInfoData) => any;
|
|
12
|
+
"session-error": (error: Error) => any;
|
|
13
|
+
}, string, PublicProps, Readonly<MegaConfig> & Readonly<{
|
|
14
|
+
"onSession-ready"?: ((session: ClientInfoData) => any) | undefined;
|
|
15
|
+
"onSession-error"?: ((error: Error) => any) | undefined;
|
|
16
|
+
}>, {
|
|
17
|
+
locale: string;
|
|
18
|
+
debug: boolean;
|
|
19
|
+
}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
20
|
+
rootRef: HTMLDivElement;
|
|
21
|
+
}, HTMLDivElement>;
|
|
22
|
+
|
|
23
|
+
declare type __VLS_Props = {
|
|
24
|
+
initialState?: string;
|
|
25
|
+
reportId?: number;
|
|
26
|
+
cubeId?: string;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
declare type __VLS_Props_2 = {
|
|
30
|
+
dashboardId?: string | number;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
declare type __VLS_Props_3 = {
|
|
34
|
+
cubeId?: string;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
declare function __VLS_template(): {
|
|
38
|
+
attrs: Partial<{}>;
|
|
39
|
+
slots: {
|
|
40
|
+
default?(_: {}): any;
|
|
41
|
+
};
|
|
42
|
+
refs: {
|
|
43
|
+
rootRef: HTMLDivElement;
|
|
44
|
+
};
|
|
45
|
+
rootEl: HTMLDivElement;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
declare type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
49
|
+
|
|
50
|
+
declare type __VLS_WithTemplateSlots<T, S> = T & {
|
|
51
|
+
new (): {
|
|
52
|
+
$slots: S;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
declare class ApiClient {
|
|
57
|
+
private readonly system;
|
|
58
|
+
private readonly apiConfig;
|
|
59
|
+
private readonly authConfig;
|
|
60
|
+
constructor(system: string, apiConfig: ApiConfig, authConfig: AuthConfig);
|
|
61
|
+
private buildHeaders;
|
|
62
|
+
private buildUrl;
|
|
63
|
+
private request;
|
|
64
|
+
clientInfo(): Promise<ClientInfoData>;
|
|
65
|
+
listConnections(): Promise<DataConnection[]>;
|
|
66
|
+
getConnection(id: string): Promise<DataConnection>;
|
|
67
|
+
testConnection(id: string): Promise<TestResult>;
|
|
68
|
+
getConnectionCatalog(connectionId: string): Promise<ConnectionCatalog>;
|
|
69
|
+
listTableFields(params: ListTableFieldsParams): Promise<TableField[]>;
|
|
70
|
+
listCubes(params?: ListCubesParams): Promise<ListCubesResult>;
|
|
71
|
+
listCubesConfig(params?: ListCubesParams): Promise<ListCubesResult>;
|
|
72
|
+
getCube(id: string): Promise<Cube>;
|
|
73
|
+
createCube(data: CreateCubeRequest): Promise<Cube>;
|
|
74
|
+
updateCube(id: string, data: UpdateCubeRequest): Promise<Cube>;
|
|
75
|
+
deleteCube(id: string): Promise<void>;
|
|
76
|
+
listCustomMeasures(cubeId: string): Promise<ListCustomMeasuresResult>;
|
|
77
|
+
createCustomMeasure(cubeId: string, data: CreateCustomMeasureRequest): Promise<CustomMeasure>;
|
|
78
|
+
updateCustomMeasure(cubeId: string, measureId: string, data: UpdateCustomMeasureRequest): Promise<CustomMeasure>;
|
|
79
|
+
deleteCustomMeasure(cubeId: string, measureId: string): Promise<void>;
|
|
80
|
+
queryFilter(req: FilterQueryRequest, init?: RequestInit): Promise<FilterQueryResponse>;
|
|
81
|
+
listReports(params?: ListReportsParams): Promise<Report_2[]>;
|
|
82
|
+
getReport(id: number): Promise<Report_2>;
|
|
83
|
+
createReport(data: CreateReportRequest): Promise<Report_2>;
|
|
84
|
+
updateReport(id: number, data: UpdateReportRequest): Promise<Report_2>;
|
|
85
|
+
deleteReport(id: number): Promise<void>;
|
|
86
|
+
listDashboards(): Promise<DashboardMeta[]>;
|
|
87
|
+
getDashboard(id: number | string): Promise<DashboardDetail>;
|
|
88
|
+
createDashboard(data: CreateDashboardRequest): Promise<Dashboard>;
|
|
89
|
+
updateDashboard(id: number | string, data: UpdateDashboardRequest): Promise<Dashboard>;
|
|
90
|
+
deleteDashboard(id: number | string): Promise<void>;
|
|
91
|
+
makeDashboardPublic(id: number | string): Promise<Dashboard>;
|
|
92
|
+
makeDashboardPrivate(id: number | string): Promise<Dashboard>;
|
|
93
|
+
createDashboardItem(dashboardId: number | string, data: CreateDashboardItemRequest): Promise<DashboardItem>;
|
|
94
|
+
updateDashboardItem(dashboardId: number | string, itemId: number | string, data: UpdateDashboardItemRequest): Promise<DashboardItem>;
|
|
95
|
+
deleteDashboardItem(dashboardId: number | string, itemId: number | string): Promise<void>;
|
|
96
|
+
queryPivot(req: PivotQueryRequest, init?: RequestInit): Promise<PivotQueryResponse>;
|
|
97
|
+
exportPivot(req: PivotQueryRequest, init?: RequestInit): Promise<{
|
|
98
|
+
blob: Blob;
|
|
99
|
+
filename: string;
|
|
100
|
+
}>;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
declare interface ApiConfig {
|
|
104
|
+
baseURL: string;
|
|
105
|
+
timeout?: number;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
declare interface AuthConfig {
|
|
109
|
+
getCredentials: () => Record<string, string> | Promise<Record<string, string>>;
|
|
110
|
+
onUnauthorized?: () => void;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export declare function buildShareUrl(token: string, href?: string): string;
|
|
114
|
+
|
|
115
|
+
declare type ChartDataLabelMode = 'off' | 'on';
|
|
116
|
+
|
|
117
|
+
declare type ChartLegendMode = 'auto' | 'show' | 'hide';
|
|
118
|
+
|
|
119
|
+
declare type ChartLegendPosition = 'top' | 'bottom';
|
|
120
|
+
|
|
121
|
+
declare type ChartRingLabelMode = 'off' | 'percent' | 'name' | 'namePercent';
|
|
122
|
+
|
|
123
|
+
declare type ChartStackLabelMode = 'off' | 'value' | 'percent';
|
|
124
|
+
|
|
125
|
+
export declare interface ChartTheme {
|
|
126
|
+
colors?: string[];
|
|
127
|
+
compareOpacity?: number;
|
|
128
|
+
compareLineStyle?: 'dashed' | 'dotted';
|
|
129
|
+
ringRadius?: [string, string];
|
|
130
|
+
ringCompareRadius?: [string, string][];
|
|
131
|
+
legendPosition?: ChartLegendPosition;
|
|
132
|
+
grid?: {
|
|
133
|
+
left?: string | number;
|
|
134
|
+
right?: string | number;
|
|
135
|
+
top?: string | number;
|
|
136
|
+
bottom?: string | number;
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export declare interface ClientInfoData {
|
|
141
|
+
system: string;
|
|
142
|
+
user: ClientInfoUser;
|
|
143
|
+
roleGroups: string[];
|
|
144
|
+
scopeKeys: string[];
|
|
145
|
+
cubeConfig: boolean;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
export declare interface ClientInfoUser {
|
|
149
|
+
id: number;
|
|
150
|
+
name: string;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
declare interface ConnectionCatalog {
|
|
154
|
+
databases: ConnectionCatalogDatabase[];
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
declare interface ConnectionCatalogDatabase {
|
|
158
|
+
name: string;
|
|
159
|
+
tables: string[];
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
declare type CreateCubeRequest = Omit<Cube, 'id' | 'createdAt' | 'updatedAt' | 'status'> & {
|
|
163
|
+
status?: boolean;
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
declare interface CreateCustomMeasureRequest {
|
|
167
|
+
measureId: string;
|
|
168
|
+
title: string;
|
|
169
|
+
format: string;
|
|
170
|
+
formula: string;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
declare interface CreateDashboardItemRequest {
|
|
174
|
+
reportId: number;
|
|
175
|
+
x?: number;
|
|
176
|
+
y?: number;
|
|
177
|
+
w?: number;
|
|
178
|
+
h?: number;
|
|
179
|
+
displayConfig?: DashboardDisplayConfig;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
declare interface CreateDashboardRequest {
|
|
183
|
+
name: string;
|
|
184
|
+
description?: string;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
declare interface CreateReportRequest {
|
|
188
|
+
name: string;
|
|
189
|
+
cubeId: string;
|
|
190
|
+
state: string;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export declare interface Cube {
|
|
194
|
+
id: string;
|
|
195
|
+
title: string;
|
|
196
|
+
description?: string;
|
|
197
|
+
isDefault?: boolean;
|
|
198
|
+
connectionId: string;
|
|
199
|
+
database?: string;
|
|
200
|
+
table: string;
|
|
201
|
+
primaryTimeField: string;
|
|
202
|
+
primaryTimeGranularity: string;
|
|
203
|
+
defaultSplitGranularity?: string;
|
|
204
|
+
sourceTimezoneOffset?: number;
|
|
205
|
+
availableTimezones?: number[];
|
|
206
|
+
defaultTimezone?: number;
|
|
207
|
+
defaultTimeRange?: string;
|
|
208
|
+
defaultCompareEnabled?: boolean;
|
|
209
|
+
defaultMeasureIds?: string[];
|
|
210
|
+
defaultSplitIds?: string[];
|
|
211
|
+
defaultVisType?: string;
|
|
212
|
+
dataDelayMinutes?: number;
|
|
213
|
+
maxDayRange?: number;
|
|
214
|
+
maxHourRange?: number;
|
|
215
|
+
maxMonthRange?: number;
|
|
216
|
+
maxMinuteRange?: number;
|
|
217
|
+
maxRowLimit?: number | number[];
|
|
218
|
+
defaultRowLimit?: number;
|
|
219
|
+
defaultFilterLimit?: number;
|
|
220
|
+
maxDrillDepth?: number;
|
|
221
|
+
manualRefresh?: boolean;
|
|
222
|
+
dimensions: Dimension[];
|
|
223
|
+
measures: Measure[];
|
|
224
|
+
cubeGroups?: string[];
|
|
225
|
+
access: CubeAccess;
|
|
226
|
+
scope: CubeScope;
|
|
227
|
+
status: boolean;
|
|
228
|
+
createdAt?: string;
|
|
229
|
+
updatedAt?: string;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
export declare interface CubeAccess {
|
|
233
|
+
restricted?: boolean;
|
|
234
|
+
roleGroups: string[];
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
export declare interface CubeScope {
|
|
238
|
+
restricted?: boolean;
|
|
239
|
+
mappings: CubeScopeMapping[];
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export declare interface CubeScopeMapping {
|
|
243
|
+
scope: string;
|
|
244
|
+
field: string;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
declare interface CubeState {
|
|
248
|
+
cubeId: string | null;
|
|
249
|
+
filters: PivotFilter[];
|
|
250
|
+
splits: PivotSplit[];
|
|
251
|
+
measures: string[];
|
|
252
|
+
measureFilters: MeasureFilter[];
|
|
253
|
+
customMeasures: string[];
|
|
254
|
+
timeRange: DateRange | null;
|
|
255
|
+
timezone: number | null;
|
|
256
|
+
visual: VisType;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
declare interface CustomMeasure {
|
|
260
|
+
id: number;
|
|
261
|
+
ownerId?: number;
|
|
262
|
+
cubeId: string;
|
|
263
|
+
measureId: string;
|
|
264
|
+
title: string;
|
|
265
|
+
format: string;
|
|
266
|
+
formula: string;
|
|
267
|
+
createdAt?: string;
|
|
268
|
+
updatedAt?: string;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
declare interface CustomMeasureDef {
|
|
272
|
+
id: string;
|
|
273
|
+
title: string;
|
|
274
|
+
format: string;
|
|
275
|
+
formula: string;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
declare interface Dashboard {
|
|
279
|
+
id: number;
|
|
280
|
+
name: string;
|
|
281
|
+
description?: string;
|
|
282
|
+
ownerId: number;
|
|
283
|
+
visibility: DashboardVisibility;
|
|
284
|
+
layoutConfig?: DashboardLayoutConfig;
|
|
285
|
+
globalState?: PivotQueryOverlay;
|
|
286
|
+
items: DashboardItem[];
|
|
287
|
+
updatedAt: string;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
declare interface DashboardDetail extends Dashboard {
|
|
291
|
+
reports: Record<string, DashboardItemReport>;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
declare interface DashboardDisplayConfig {
|
|
295
|
+
visStyle?: Partial<VisStyle>;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
declare interface DashboardItem {
|
|
299
|
+
id: number;
|
|
300
|
+
reportId: number;
|
|
301
|
+
x: number;
|
|
302
|
+
y: number;
|
|
303
|
+
w: number;
|
|
304
|
+
h: number;
|
|
305
|
+
displayConfig?: DashboardDisplayConfig;
|
|
306
|
+
sortOrder: number;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
declare interface DashboardItemReport {
|
|
310
|
+
id: number;
|
|
311
|
+
name: string;
|
|
312
|
+
cubeId: string;
|
|
313
|
+
state: string;
|
|
314
|
+
ownerId?: number;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
declare interface DashboardLayoutConfig {
|
|
318
|
+
columns?: number;
|
|
319
|
+
rowHeight?: number;
|
|
320
|
+
margin?: [number, number];
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
declare interface DashboardMeta {
|
|
324
|
+
id: number;
|
|
325
|
+
name: string;
|
|
326
|
+
description?: string;
|
|
327
|
+
ownerId: number;
|
|
328
|
+
visibility: DashboardVisibility;
|
|
329
|
+
itemCount?: number;
|
|
330
|
+
updatedAt: string;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
declare type DashboardVisibility = 'private' | 'public';
|
|
334
|
+
|
|
335
|
+
export declare interface DataConnection {
|
|
336
|
+
id: string;
|
|
337
|
+
title: string;
|
|
338
|
+
defaultDatabase: string;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
declare interface DateRange {
|
|
342
|
+
current: [string, string];
|
|
343
|
+
previous: [string, string] | null;
|
|
344
|
+
compare?: boolean;
|
|
345
|
+
relative?: boolean;
|
|
346
|
+
savedAt?: string;
|
|
347
|
+
dataOmission?: boolean;
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
export declare function decodeReportState(raw: string): SavedReportSnapshot;
|
|
351
|
+
|
|
352
|
+
export declare function decodeShareState(token: string): SavedReportSnapshot;
|
|
353
|
+
|
|
354
|
+
export declare interface Dimension {
|
|
355
|
+
id: string;
|
|
356
|
+
field: string;
|
|
357
|
+
title: string;
|
|
358
|
+
kind: DimensionKind;
|
|
359
|
+
granularities?: string[];
|
|
360
|
+
description?: string;
|
|
361
|
+
lookup?: DimensionLookup;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
declare type DimensionKind = 'time' | 'string' | 'number';
|
|
365
|
+
|
|
366
|
+
export declare interface DimensionLookup {
|
|
367
|
+
database?: string;
|
|
368
|
+
table: string;
|
|
369
|
+
keyField: string;
|
|
370
|
+
labelField: string;
|
|
371
|
+
unmatched?: string;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
export declare function encodeReportState(snapshot: SavedReportSnapshot): string;
|
|
375
|
+
|
|
376
|
+
export declare function encodeShareState(snapshot: SavedReportSnapshot): string;
|
|
377
|
+
|
|
378
|
+
declare interface FilterQueryFilter {
|
|
379
|
+
dimensionId: string;
|
|
380
|
+
type?: 'include' | 'exclude' | 'range';
|
|
381
|
+
values?: string[];
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
declare interface FilterQueryRequest {
|
|
385
|
+
cubeId: string;
|
|
386
|
+
dimensionId: string;
|
|
387
|
+
timezone: number;
|
|
388
|
+
timeRange: DateRange;
|
|
389
|
+
filters: FilterQueryFilter[];
|
|
390
|
+
search?: string;
|
|
391
|
+
limit?: number;
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
declare interface FilterQueryResponse {
|
|
395
|
+
values: FilterValueItem[];
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
declare interface FilterValueItem {
|
|
399
|
+
id: string;
|
|
400
|
+
name?: string;
|
|
401
|
+
count?: number;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
declare interface ListCubesParams {
|
|
405
|
+
id?: string;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
declare interface ListCubesResult {
|
|
409
|
+
cubes: Cube[];
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
declare interface ListCustomMeasuresResult {
|
|
413
|
+
customMeasures: CustomMeasure[];
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
declare interface ListReportsParams {
|
|
417
|
+
cubeId?: string;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
declare interface ListTableFieldsParams {
|
|
421
|
+
connectionId: string;
|
|
422
|
+
database?: string;
|
|
423
|
+
table: string;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
export declare interface Measure {
|
|
427
|
+
id: string;
|
|
428
|
+
field: string;
|
|
429
|
+
title: string;
|
|
430
|
+
format: string;
|
|
431
|
+
formula: string;
|
|
432
|
+
aggregation: string;
|
|
433
|
+
description?: string;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
declare type MeasureCompareOperator = 'gt' | 'gte' | 'lt' | 'lte' | 'eq' | 'neq' | 'between';
|
|
437
|
+
|
|
438
|
+
declare interface MeasureFilter {
|
|
439
|
+
measureId: string;
|
|
440
|
+
operator: MeasureCompareOperator;
|
|
441
|
+
value: number | [number, number];
|
|
442
|
+
target?: MeasureFilterTarget;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
declare type MeasureFilterTarget = 'current' | 'previous' | 'both';
|
|
446
|
+
|
|
447
|
+
export declare interface MegaConfig {
|
|
448
|
+
system: string;
|
|
449
|
+
api: ApiConfig;
|
|
450
|
+
auth: AuthConfig;
|
|
451
|
+
roleGroupOptions?: MegaRoleGroupOption[];
|
|
452
|
+
locale?: string;
|
|
453
|
+
theme?: MegaTheme;
|
|
454
|
+
i18n?: MegaI18n | MegaTranslate;
|
|
455
|
+
features?: MegaFeatures;
|
|
456
|
+
debug?: boolean;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
export declare const MegaConfigProvider: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
460
|
+
|
|
461
|
+
declare interface MegaContext {
|
|
462
|
+
config: MegaConfig;
|
|
463
|
+
apiClient: ApiClient;
|
|
464
|
+
t: MegaTranslate;
|
|
465
|
+
session: DeepReadonly<Ref<ClientInfoData | null>>;
|
|
466
|
+
sessionLoading: DeepReadonly<Ref<boolean>>;
|
|
467
|
+
sessionError: DeepReadonly<Ref<Error | null>>;
|
|
468
|
+
refreshSession: () => Promise<void>;
|
|
469
|
+
cubes: Readonly<Ref<Cube[]>>;
|
|
470
|
+
cubesLoading: DeepReadonly<Ref<boolean>>;
|
|
471
|
+
cubesError: DeepReadonly<Ref<Error | null>>;
|
|
472
|
+
refreshCubes: () => Promise<void>;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
export declare const MegaCube: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
476
|
+
"cube-change": (payload: {
|
|
477
|
+
cubeId: string;
|
|
478
|
+
}) => any;
|
|
479
|
+
}, string, PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
480
|
+
"onCube-change"?: ((payload: {
|
|
481
|
+
cubeId: string;
|
|
482
|
+
}) => any) | undefined;
|
|
483
|
+
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLElement>;
|
|
484
|
+
|
|
485
|
+
export declare const MegaCubeConfig: DefineComponent<__VLS_Props_3, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
486
|
+
change: () => any;
|
|
487
|
+
}, string, PublicProps, Readonly<__VLS_Props_3> & Readonly<{
|
|
488
|
+
onChange?: (() => any) | undefined;
|
|
489
|
+
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {}, HTMLElement>;
|
|
490
|
+
|
|
491
|
+
export declare interface MegaCubeFeatures {
|
|
492
|
+
report?: boolean;
|
|
493
|
+
download?: boolean;
|
|
494
|
+
share?: boolean;
|
|
495
|
+
timezone?: boolean;
|
|
496
|
+
customMeasure?: boolean;
|
|
497
|
+
launchJson?: boolean;
|
|
498
|
+
buildShareUrl?: (token: string) => string;
|
|
499
|
+
onChartOption?: (visual: VisType, option: EChartsOption, ctx: {
|
|
500
|
+
cube: Cube;
|
|
501
|
+
state: CubeState;
|
|
502
|
+
}) => EChartsOption;
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
export declare const MegaDashboard: DefineComponent<__VLS_Props_2, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
|
|
506
|
+
change: (payload: {
|
|
507
|
+
dashboardId: number;
|
|
508
|
+
}) => any;
|
|
509
|
+
"open-cube": (payload: {
|
|
510
|
+
cubeId: string;
|
|
511
|
+
state?: string;
|
|
512
|
+
reportId?: number;
|
|
513
|
+
}) => any;
|
|
514
|
+
}, string, PublicProps, Readonly<__VLS_Props_2> & Readonly<{
|
|
515
|
+
onChange?: ((payload: {
|
|
516
|
+
dashboardId: number;
|
|
517
|
+
}) => any) | undefined;
|
|
518
|
+
"onOpen-cube"?: ((payload: {
|
|
519
|
+
cubeId: string;
|
|
520
|
+
state?: string;
|
|
521
|
+
reportId?: number;
|
|
522
|
+
}) => any) | undefined;
|
|
523
|
+
}>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
|
|
524
|
+
scrollRef: HTMLDivElement;
|
|
525
|
+
}, HTMLElement>;
|
|
526
|
+
|
|
527
|
+
export declare interface MegaFeatures {
|
|
528
|
+
cube?: MegaCubeFeatures;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
declare type MegaI18n = Record<string, string>;
|
|
532
|
+
|
|
533
|
+
export declare interface MegaRoleGroupOption {
|
|
534
|
+
label: string;
|
|
535
|
+
value: string;
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
export declare interface MegaTheme {
|
|
539
|
+
chart?: ChartTheme;
|
|
540
|
+
colorPrimary?: string;
|
|
541
|
+
colorSuccess?: string;
|
|
542
|
+
colorWarning?: string;
|
|
543
|
+
colorError?: string;
|
|
544
|
+
colorText?: string;
|
|
545
|
+
colorTextSecondary?: string;
|
|
546
|
+
colorBg?: string;
|
|
547
|
+
colorBgElevated?: string;
|
|
548
|
+
colorBorder?: string;
|
|
549
|
+
fontSize?: string;
|
|
550
|
+
fontSizeSm?: string;
|
|
551
|
+
fontSizeLg?: string;
|
|
552
|
+
borderRadius?: string;
|
|
553
|
+
spacing?: string;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
declare type MegaTranslate = (key: string, params?: MegaTranslateParams) => string;
|
|
557
|
+
|
|
558
|
+
declare type MegaTranslateParams = Record<string, string | number>;
|
|
559
|
+
|
|
560
|
+
declare interface PivotFilter {
|
|
561
|
+
dimensionId: string;
|
|
562
|
+
type?: 'include' | 'exclude' | 'range';
|
|
563
|
+
values?: string[];
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
declare interface PivotQueryColumn {
|
|
567
|
+
id: string;
|
|
568
|
+
name: string;
|
|
569
|
+
kind: 'time' | 'string' | 'number' | 'measure';
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
declare interface PivotQueryCompare {
|
|
573
|
+
rows?: Record<string, unknown>[];
|
|
574
|
+
totals?: Record<string, number>;
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
declare interface PivotQueryCustomMeasure {
|
|
578
|
+
id: string;
|
|
579
|
+
title: string;
|
|
580
|
+
format: string;
|
|
581
|
+
formula: string;
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
declare interface PivotQueryDimension {
|
|
585
|
+
id: string;
|
|
586
|
+
granularity?: string;
|
|
587
|
+
interval?: number;
|
|
588
|
+
sort?: {
|
|
589
|
+
field: string;
|
|
590
|
+
order: 'ASC' | 'DESC';
|
|
591
|
+
};
|
|
592
|
+
limit?: number;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
declare interface PivotQueryMeasureFilter {
|
|
596
|
+
measureId: string;
|
|
597
|
+
operator: 'gt' | 'gte' | 'lt' | 'lte' | 'eq' | 'neq' | 'between';
|
|
598
|
+
value: number | [number, number];
|
|
599
|
+
target?: 'current' | 'previous' | 'both';
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
declare interface PivotQueryMeta {
|
|
603
|
+
queryTime: number;
|
|
604
|
+
rowCount: number;
|
|
605
|
+
truncated: boolean;
|
|
606
|
+
timeFill?: PivotQueryTimeFillMeta;
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
declare interface PivotQueryOverlay {
|
|
610
|
+
filters?: CubeState['filters'];
|
|
611
|
+
measures?: CubeState['measures'];
|
|
612
|
+
timeRange?: CubeState['timeRange'];
|
|
613
|
+
timezone?: CubeState['timezone'];
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
declare interface PivotQueryRequest {
|
|
617
|
+
cubeId: string;
|
|
618
|
+
timezone: number;
|
|
619
|
+
timeRange: DateRange;
|
|
620
|
+
dimensions: PivotQueryDimension[];
|
|
621
|
+
measures: string[];
|
|
622
|
+
customMeasures?: PivotQueryCustomMeasure[];
|
|
623
|
+
filters: FilterQueryFilter[];
|
|
624
|
+
measureFilters?: PivotQueryMeasureFilter[];
|
|
625
|
+
visual: string;
|
|
626
|
+
limit?: number;
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
declare interface PivotQueryResponse {
|
|
630
|
+
columns: PivotQueryColumn[];
|
|
631
|
+
rows: Record<string, unknown>[];
|
|
632
|
+
tree?: PivotQueryTreeNode[];
|
|
633
|
+
totals?: Record<string, number>;
|
|
634
|
+
compare?: PivotQueryCompare;
|
|
635
|
+
meta: PivotQueryMeta;
|
|
636
|
+
}
|
|
637
|
+
|
|
638
|
+
declare interface PivotQueryTimeFillMeta {
|
|
639
|
+
applied: boolean;
|
|
640
|
+
reason?: 'chart_visual' | 'none';
|
|
641
|
+
granularity?: 'd' | 'h' | '5min' | 'min';
|
|
642
|
+
rangeStart?: string;
|
|
643
|
+
rangeEnd?: string;
|
|
644
|
+
cappedToNow?: boolean;
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
declare interface PivotQueryTreeCell {
|
|
648
|
+
value: unknown;
|
|
649
|
+
compareValue?: unknown;
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
declare interface PivotQueryTreeNode {
|
|
653
|
+
key: string;
|
|
654
|
+
label: string;
|
|
655
|
+
cells: Record<string, PivotQueryTreeCell>;
|
|
656
|
+
children?: PivotQueryTreeNode[];
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
declare interface PivotSplit {
|
|
660
|
+
id: string;
|
|
661
|
+
granularity?: string;
|
|
662
|
+
interval?: number;
|
|
663
|
+
limit?: number;
|
|
664
|
+
sort?: {
|
|
665
|
+
field: string;
|
|
666
|
+
order: 'ASC' | 'DESC';
|
|
667
|
+
};
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
export declare function readShareTokenFromLocation(href?: string): string | null;
|
|
671
|
+
|
|
672
|
+
declare interface Report_2 {
|
|
673
|
+
id: number;
|
|
674
|
+
name: string;
|
|
675
|
+
cubeId: string;
|
|
676
|
+
state: string;
|
|
677
|
+
ownerId?: number;
|
|
678
|
+
createdAt: string;
|
|
679
|
+
updatedAt: string;
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
export declare const REPORT_STATE_VERSION = 1;
|
|
683
|
+
|
|
684
|
+
export declare interface ResolvedMegaCubeFeatures {
|
|
685
|
+
report: boolean;
|
|
686
|
+
download: boolean;
|
|
687
|
+
share: boolean;
|
|
688
|
+
timezone: boolean;
|
|
689
|
+
customMeasure: boolean;
|
|
690
|
+
launchJson: boolean;
|
|
691
|
+
buildShareUrl?: (token: string) => string;
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
export declare interface SavedReportSnapshot {
|
|
695
|
+
version: typeof REPORT_STATE_VERSION;
|
|
696
|
+
query: CubeState;
|
|
697
|
+
visStyle: VisStyle;
|
|
698
|
+
customMeasureDefs: CustomMeasureDef[];
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
export declare function shareTokenToInitialState(token: string): string;
|
|
702
|
+
|
|
703
|
+
declare interface TableField {
|
|
704
|
+
name: string;
|
|
705
|
+
type: string;
|
|
706
|
+
comment?: string;
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
declare interface TestResult {
|
|
710
|
+
ok: boolean;
|
|
711
|
+
message?: string;
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
declare type UpdateCubeRequest = Partial<Omit<Cube, 'id' | 'createdAt' | 'updatedAt'>>;
|
|
715
|
+
|
|
716
|
+
declare interface UpdateCustomMeasureRequest {
|
|
717
|
+
title?: string;
|
|
718
|
+
format?: string;
|
|
719
|
+
formula?: string;
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
declare interface UpdateDashboardItemRequest {
|
|
723
|
+
x?: number;
|
|
724
|
+
y?: number;
|
|
725
|
+
w?: number;
|
|
726
|
+
h?: number;
|
|
727
|
+
displayConfig?: DashboardDisplayConfig;
|
|
728
|
+
sortOrder?: number;
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
declare interface UpdateDashboardRequest {
|
|
732
|
+
name?: string;
|
|
733
|
+
description?: string;
|
|
734
|
+
layoutConfig?: DashboardLayoutConfig;
|
|
735
|
+
globalState?: PivotQueryOverlay | null;
|
|
736
|
+
visibility?: DashboardVisibility;
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
declare interface UpdateReportRequest {
|
|
740
|
+
name?: string;
|
|
741
|
+
state?: string;
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
export declare function useMegaConfig(): MegaContext;
|
|
745
|
+
|
|
746
|
+
export declare function useMegaCubeFeatures(): ComputedRef<ResolvedMegaCubeFeatures>;
|
|
747
|
+
|
|
748
|
+
export declare function useMegaCubes(): {
|
|
749
|
+
cubes: Readonly<Ref<Cube[], Cube[]>>;
|
|
750
|
+
usableCubes: ComputedRef<Cube[]>;
|
|
751
|
+
cubesLoading: Readonly<Ref<boolean, boolean>>;
|
|
752
|
+
cubesError: Readonly<Ref<Error | null, Error | null>>;
|
|
753
|
+
refreshCubes: () => Promise<void>;
|
|
754
|
+
};
|
|
755
|
+
|
|
756
|
+
export declare function useMegaCubesConfig(): {
|
|
757
|
+
cubesConfig: Readonly<Ref< {
|
|
758
|
+
id: string;
|
|
759
|
+
title: string;
|
|
760
|
+
description?: string | undefined;
|
|
761
|
+
isDefault?: boolean | undefined;
|
|
762
|
+
connectionId: string;
|
|
763
|
+
database?: string | undefined;
|
|
764
|
+
table: string;
|
|
765
|
+
primaryTimeField: string;
|
|
766
|
+
primaryTimeGranularity: string;
|
|
767
|
+
defaultSplitGranularity?: string | undefined;
|
|
768
|
+
sourceTimezoneOffset?: number | undefined;
|
|
769
|
+
availableTimezones?: number[] | undefined;
|
|
770
|
+
defaultTimezone?: number | undefined;
|
|
771
|
+
defaultTimeRange?: string | undefined;
|
|
772
|
+
defaultCompareEnabled?: boolean | undefined;
|
|
773
|
+
defaultMeasureIds?: string[] | undefined;
|
|
774
|
+
defaultSplitIds?: string[] | undefined;
|
|
775
|
+
defaultVisType?: string | undefined;
|
|
776
|
+
dataDelayMinutes?: number | undefined;
|
|
777
|
+
maxDayRange?: number | undefined;
|
|
778
|
+
maxHourRange?: number | undefined;
|
|
779
|
+
maxMonthRange?: number | undefined;
|
|
780
|
+
maxMinuteRange?: number | undefined;
|
|
781
|
+
maxRowLimit?: number | number[] | undefined;
|
|
782
|
+
defaultRowLimit?: number | undefined;
|
|
783
|
+
defaultFilterLimit?: number | undefined;
|
|
784
|
+
maxDrillDepth?: number | undefined;
|
|
785
|
+
manualRefresh?: boolean | undefined;
|
|
786
|
+
dimensions: {
|
|
787
|
+
id: string;
|
|
788
|
+
field: string;
|
|
789
|
+
title: string;
|
|
790
|
+
kind: DimensionKind;
|
|
791
|
+
granularities?: string[] | undefined;
|
|
792
|
+
description?: string | undefined;
|
|
793
|
+
lookup?: {
|
|
794
|
+
database?: string | undefined;
|
|
795
|
+
table: string;
|
|
796
|
+
keyField: string;
|
|
797
|
+
labelField: string;
|
|
798
|
+
unmatched?: string | undefined;
|
|
799
|
+
} | undefined;
|
|
800
|
+
}[];
|
|
801
|
+
measures: {
|
|
802
|
+
id: string;
|
|
803
|
+
field: string;
|
|
804
|
+
title: string;
|
|
805
|
+
format: string;
|
|
806
|
+
formula: string;
|
|
807
|
+
aggregation: string;
|
|
808
|
+
description?: string | undefined;
|
|
809
|
+
}[];
|
|
810
|
+
cubeGroups?: string[] | undefined;
|
|
811
|
+
access: {
|
|
812
|
+
restricted?: boolean | undefined;
|
|
813
|
+
roleGroups: string[];
|
|
814
|
+
};
|
|
815
|
+
scope: {
|
|
816
|
+
restricted?: boolean | undefined;
|
|
817
|
+
mappings: {
|
|
818
|
+
scope: string;
|
|
819
|
+
field: string;
|
|
820
|
+
}[];
|
|
821
|
+
};
|
|
822
|
+
status: boolean;
|
|
823
|
+
createdAt?: string | undefined;
|
|
824
|
+
updatedAt?: string | undefined;
|
|
825
|
+
}[], Cube[] | {
|
|
826
|
+
id: string;
|
|
827
|
+
title: string;
|
|
828
|
+
description?: string | undefined;
|
|
829
|
+
isDefault?: boolean | undefined;
|
|
830
|
+
connectionId: string;
|
|
831
|
+
database?: string | undefined;
|
|
832
|
+
table: string;
|
|
833
|
+
primaryTimeField: string;
|
|
834
|
+
primaryTimeGranularity: string;
|
|
835
|
+
defaultSplitGranularity?: string | undefined;
|
|
836
|
+
sourceTimezoneOffset?: number | undefined;
|
|
837
|
+
availableTimezones?: number[] | undefined;
|
|
838
|
+
defaultTimezone?: number | undefined;
|
|
839
|
+
defaultTimeRange?: string | undefined;
|
|
840
|
+
defaultCompareEnabled?: boolean | undefined;
|
|
841
|
+
defaultMeasureIds?: string[] | undefined;
|
|
842
|
+
defaultSplitIds?: string[] | undefined;
|
|
843
|
+
defaultVisType?: string | undefined;
|
|
844
|
+
dataDelayMinutes?: number | undefined;
|
|
845
|
+
maxDayRange?: number | undefined;
|
|
846
|
+
maxHourRange?: number | undefined;
|
|
847
|
+
maxMonthRange?: number | undefined;
|
|
848
|
+
maxMinuteRange?: number | undefined;
|
|
849
|
+
maxRowLimit?: number | number[] | undefined;
|
|
850
|
+
defaultRowLimit?: number | undefined;
|
|
851
|
+
defaultFilterLimit?: number | undefined;
|
|
852
|
+
maxDrillDepth?: number | undefined;
|
|
853
|
+
manualRefresh?: boolean | undefined;
|
|
854
|
+
dimensions: {
|
|
855
|
+
id: string;
|
|
856
|
+
field: string;
|
|
857
|
+
title: string;
|
|
858
|
+
kind: DimensionKind;
|
|
859
|
+
granularities?: string[] | undefined;
|
|
860
|
+
description?: string | undefined;
|
|
861
|
+
lookup?: {
|
|
862
|
+
database?: string | undefined;
|
|
863
|
+
table: string;
|
|
864
|
+
keyField: string;
|
|
865
|
+
labelField: string;
|
|
866
|
+
unmatched?: string | undefined;
|
|
867
|
+
} | undefined;
|
|
868
|
+
}[];
|
|
869
|
+
measures: {
|
|
870
|
+
id: string;
|
|
871
|
+
field: string;
|
|
872
|
+
title: string;
|
|
873
|
+
format: string;
|
|
874
|
+
formula: string;
|
|
875
|
+
aggregation: string;
|
|
876
|
+
description?: string | undefined;
|
|
877
|
+
}[];
|
|
878
|
+
cubeGroups?: string[] | undefined;
|
|
879
|
+
access: {
|
|
880
|
+
restricted?: boolean | undefined;
|
|
881
|
+
roleGroups: string[];
|
|
882
|
+
};
|
|
883
|
+
scope: {
|
|
884
|
+
restricted?: boolean | undefined;
|
|
885
|
+
mappings: {
|
|
886
|
+
scope: string;
|
|
887
|
+
field: string;
|
|
888
|
+
}[];
|
|
889
|
+
};
|
|
890
|
+
status: boolean;
|
|
891
|
+
createdAt?: string | undefined;
|
|
892
|
+
updatedAt?: string | undefined;
|
|
893
|
+
}[]>>;
|
|
894
|
+
cubesConfigLoading: Readonly<Ref<boolean, boolean>>;
|
|
895
|
+
cubesConfigError: Readonly<Ref<Error | null, Error | null>>;
|
|
896
|
+
refreshCubesConfig: () => Promise<void>;
|
|
897
|
+
};
|
|
898
|
+
|
|
899
|
+
export declare function useMegaSession(): {
|
|
900
|
+
session: Readonly<Ref< {
|
|
901
|
+
readonly system: string;
|
|
902
|
+
readonly user: {
|
|
903
|
+
readonly id: number;
|
|
904
|
+
readonly name: string;
|
|
905
|
+
};
|
|
906
|
+
readonly roleGroups: readonly string[];
|
|
907
|
+
readonly scopeKeys: readonly string[];
|
|
908
|
+
readonly cubeConfig: boolean;
|
|
909
|
+
} | null, {
|
|
910
|
+
readonly system: string;
|
|
911
|
+
readonly user: {
|
|
912
|
+
readonly id: number;
|
|
913
|
+
readonly name: string;
|
|
914
|
+
};
|
|
915
|
+
readonly roleGroups: readonly string[];
|
|
916
|
+
readonly scopeKeys: readonly string[];
|
|
917
|
+
readonly cubeConfig: boolean;
|
|
918
|
+
} | null>>;
|
|
919
|
+
sessionLoading: Readonly<Ref<boolean, boolean>>;
|
|
920
|
+
sessionError: Readonly<Ref<Error | null, Error | null>>;
|
|
921
|
+
refreshSession: () => Promise<void>;
|
|
922
|
+
userId: ComputedRef<number>;
|
|
923
|
+
userName: ComputedRef<string>;
|
|
924
|
+
roleGroups: ComputedRef<readonly string[]>;
|
|
925
|
+
scopeKeys: ComputedRef<readonly string[]>;
|
|
926
|
+
cubeConfig: ComputedRef<boolean>;
|
|
927
|
+
};
|
|
928
|
+
|
|
929
|
+
declare interface VisChartStyle {
|
|
930
|
+
legend: ChartLegendMode;
|
|
931
|
+
legendPosition: ChartLegendPosition;
|
|
932
|
+
dataLabel: ChartDataLabelMode;
|
|
933
|
+
stackLabel: ChartStackLabelMode;
|
|
934
|
+
ringLabel: ChartRingLabelMode;
|
|
935
|
+
smooth: boolean;
|
|
936
|
+
seriesColors?: Record<string, string>;
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
declare interface VisStyle {
|
|
940
|
+
chart: VisChartStyle;
|
|
941
|
+
table: VisTableStyle;
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
declare type VisTableCompareLayout = 'merged' | 'split';
|
|
945
|
+
|
|
946
|
+
declare interface VisTableStyle {
|
|
947
|
+
proportion: boolean;
|
|
948
|
+
background: boolean;
|
|
949
|
+
expand: boolean;
|
|
950
|
+
compareLayout: VisTableCompareLayout;
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
declare type VisType = 'totals' | 'table' | 'lineChart' | 'stackLineChart' | 'lineChartHour' | 'barChart' | 'stackBarChart' | 'ringChart' | 'funnelChart';
|
|
954
|
+
|
|
955
|
+
export { }
|