@vizzly/dashboard 0.6.4 → 0.7.0-dev-7b5bf5e024980d82456b6acf6f46ada82ca4f6e7
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/dashboard/src/contexts/GlobalProvider/buildImplementationMeta.d.ts +3 -0
- package/dist/dashboard/src/contexts/GlobalProvider/useGlobalProvider.d.ts +36 -2
- package/dist/dashboard/src/contexts/SessionContext/useSessionContext.d.ts +7 -3
- package/dist/dashboard/src/contexts/useDashboardAPI.d.ts +10 -1
- package/dist/dashboard/src/contexts/useDashboardStrategy/runStrategy.d.ts +3 -3
- package/dist/dashboard/src/contexts/useDashboardStrategy/types.d.ts +25 -0
- package/dist/dashboard/src/contexts/useDashboardStrategy.d.ts +3 -1
- package/dist/dashboard/src/contexts/useDataConfigurationAndIdentity.d.ts +8 -2
- package/dist/dashboard/src/index.d.ts +7 -1
- package/dist/dashboard/src/types.d.ts +4 -1
- package/dist/dashboard/src/useDashboardManager.d.ts +2 -1
- package/dist/index.js +1 -1
- package/dist/shared-logic/src/ApiConfig/ApiConfig.d.ts +1 -0
- package/dist/shared-logic/src/ComboChart/upcast.d.ts +2 -1
- package/dist/shared-logic/src/Component/types.d.ts +6 -4
- package/dist/shared-logic/src/ComponentInterface/types.d.ts +1 -0
- package/dist/shared-logic/src/ConditionalFormatting/ConditionalFormatting.d.ts +9 -0
- package/dist/shared-logic/src/ConditionalFormatting/index.d.ts +1 -0
- package/dist/shared-logic/src/Dashboard/Dashboard.d.ts +3 -0
- package/dist/shared-logic/src/Dashboard/fromRaw.d.ts +3 -4
- package/dist/shared-logic/src/Dashboard/types.d.ts +4 -1
- package/dist/shared-logic/src/DataSet/DataSet.d.ts +1 -0
- package/dist/shared-logic/src/Display/Display.d.ts +1 -0
- package/dist/shared-logic/src/Field/Field.d.ts +4 -1
- package/dist/shared-logic/src/Field/types.d.ts +2 -0
- package/dist/shared-logic/src/Project/types.d.ts +1 -0
- package/dist/shared-logic/src/QueryEngineConfig/types.d.ts +2 -1
- package/dist/shared-logic/src/Theme/Theme.d.ts +1 -1
- package/dist/shared-logic/src/api/index.d.ts +18 -11
- package/dist/shared-logic/src/api/queryEngine/createConfigFromUpload.d.ts +1 -1
- package/dist/shared-logic/src/api/queryEngine/createDashboard.d.ts +18 -0
- package/dist/shared-logic/src/api/queryEngine/multiGetDashboards.d.ts +7 -0
- package/dist/shared-logic/src/api/queryEngine/updateDashboard.d.ts +13 -0
- package/dist/shared-logic/src/api/vizzly/createDashboard.d.ts +5 -6
- package/dist/shared-logic/src/api/vizzly/getParentDashboards.d.ts +8 -2
- package/dist/shared-logic/src/api/vizzly/getProjectAccessToken.d.ts +1 -1
- package/dist/shared-logic/src/api/vizzly/multiGetDashboards.d.ts +1 -3
- package/dist/shared-logic/src/api/vizzly/multiGetEncryptedDashboards.d.ts +7 -0
- package/dist/shared-logic/src/api/vizzly/saveEncryptedProjectEncryptionSecret.d.ts +2 -0
- package/dist/shared-logic/src/api/vizzly/updateDashboard.d.ts +10 -5
- package/dist/shared-logic/src/errors/EncryptedProjectSecretAlreadyExists.d.ts +4 -0
- package/dist/shared-logic/src/errors/ProjectEncryptedSecretAlreadySaved.d.ts +4 -0
- package/dist/shared-logic/src/utils/DateTime.d.ts +3 -3
- package/dist/shared-logic/src/utils/pathHelpers.d.ts +1 -1
- package/dist/shared-ui/src/base/ListView/index.d.ts +2 -2
- package/dist/shared-ui/src/base/Modal/utils.d.ts +1 -0
- package/dist/shared-ui/src/base/Panel/Panel.d.ts +1 -1
- package/dist/shared-ui/src/base/Section/Section.d.ts +1 -1
- package/dist/shared-ui/src/base/Select.d.ts +1 -1
- package/dist/shared-ui/src/base/Toolbar/Toolbar.d.ts +8 -0
- package/dist/shared-ui/src/base/layout/Flex.styles.d.ts +1 -0
- package/dist/shared-ui/src/components/ChartHelper.d.ts +4 -1
- package/dist/shared-ui/src/components/DataTable/DataTableRow.d.ts +2 -1
- package/dist/shared-ui/src/components/DataTable/addDrillDownFilters.d.ts +6 -0
- package/dist/shared-ui/src/components/DataTable/buildConditionalFormattingBoundaries.d.ts +6 -0
- package/dist/shared-ui/src/components/LineChart/LineChartView.d.ts +2 -2
- package/dist/shared-ui/src/components/MercatorMap/View.d.ts +1 -1
- package/dist/shared-ui/src/components/Studio/AdminTools/AdminTools.d.ts +4 -1
- package/dist/shared-ui/src/components/Studio/StudioContexts.d.ts +1 -0
- package/dist/shared-ui/src/contexts/DashboardBehaviour/context.d.ts +1 -0
- package/dist/shared-ui/src/contexts/DashboardBehaviour/types.d.ts +3 -1
- package/dist/shared-ui/src/contexts/ThemeProvider/default.theme.d.ts +1 -0
- package/dist/shared-ui/src/library/ConditionalFormatting.d.ts +4 -9
- package/dist/shared-ui/src/library/DataPanel/FilterInput/AttributesToFields.d.ts +8 -0
- package/dist/shared-ui/src/library/DataPanel/FilterInput/FilterInputForm.d.ts +3 -1
- package/dist/shared-ui/src/library/DataPanel/FilterInput/IndividualFilter.d.ts +3 -1
- package/dist/shared-ui/src/library/DataPanel/FilterInput/isWipFilterComplete.d.ts +1 -1
- package/dist/shared-ui/src/library/DataPanel/FilterInput/queryFilterToWipFilter.d.ts +1 -1
- package/dist/shared-ui/src/library/DataPanel/FilterInput/types.d.ts +8 -0
- package/dist/shared-ui/src/library/DataPanel/FilterInput/useFilterInputForm.d.ts +6 -1
- package/dist/shared-ui/src/library/StylePanel/ConditionalFormatting/ConditionalFormattingModal.d.ts +6 -6
- package/dist/shared-ui/src/library/StylePanel/ConditionalFormatting/ConditionalFormattingRules.d.ts +5 -5
- package/dist/shared-ui/src/library/StylePanel/ConditionalFormatting/useConditionalFormatting.d.ts +16 -0
- package/dist/shared-ui/src/library/StylePanel/GoalLine/GoalLineRules.d.ts +0 -1
- package/dist/shared-ui/src/types.d.ts +2 -1
- package/package.json +2 -1
|
@@ -57,12 +57,20 @@ export declare const useGlobalContext: () => ({
|
|
|
57
57
|
parentDashboardId?: string | undefined;
|
|
58
58
|
dashboardId?: string | undefined;
|
|
59
59
|
cascadeFilterSelection?: boolean | undefined;
|
|
60
|
+
parentDashboard?: ((dataSets: import("../../../../shared-logic/src/DataSet/types").DataSet[]) => Promise<Partial<import("../../../../shared-logic/src/Dashboard").SaveableDashboardDefinition>[]>) | undefined;
|
|
60
61
|
} & Partial<import("../../../../shared-ui/src").VizzlyComponents.ComponentOverrides> & {
|
|
61
62
|
identity: import("../../../../shared-logic/src/Callbacks/types").identityCallback;
|
|
62
63
|
dataSets: (identityConfig: import("../../../../shared-logic/src/IdentityConfig/types").IdentityConfig) => Promise<import("../../../../shared-logic/src/DataSet/types").DataSet[] | null>;
|
|
63
64
|
data: import("../../../../shared-logic/src/Callbacks/types").loadDataCallback;
|
|
64
65
|
runQueries?: undefined;
|
|
65
66
|
queryEngineConfig?: undefined;
|
|
67
|
+
queryEngineEndpoint?: string | {
|
|
68
|
+
endpoint: string;
|
|
69
|
+
dynamicConfig?: Object | undefined;
|
|
70
|
+
customHeaders?: (() => {
|
|
71
|
+
[headerKey: string]: string;
|
|
72
|
+
}) | undefined;
|
|
73
|
+
} | undefined;
|
|
66
74
|
} & {
|
|
67
75
|
onSave: (dashboard: Dashboard) => void;
|
|
68
76
|
}) | ({
|
|
@@ -118,6 +126,7 @@ export declare const useGlobalContext: () => ({
|
|
|
118
126
|
parentDashboardId?: string | undefined;
|
|
119
127
|
dashboardId?: string | undefined;
|
|
120
128
|
cascadeFilterSelection?: boolean | undefined;
|
|
129
|
+
parentDashboard?: ((dataSets: import("../../../../shared-logic/src/DataSet/types").DataSet[]) => Promise<Partial<import("../../../../shared-logic/src/Dashboard").SaveableDashboardDefinition>[]>) | undefined;
|
|
121
130
|
} & Partial<import("../../../../shared-ui/src").VizzlyComponents.ComponentOverrides> & {
|
|
122
131
|
queryEngineEndpoint?: string | {
|
|
123
132
|
endpoint: string;
|
|
@@ -128,7 +137,7 @@ export declare const useGlobalContext: () => ({
|
|
|
128
137
|
} | undefined;
|
|
129
138
|
identity: import("../../../../shared-logic/src/Callbacks/types").identityCallback;
|
|
130
139
|
runQueries?: undefined;
|
|
131
|
-
dataSets?: undefined;
|
|
140
|
+
dataSets?: ((identityConfig: import("../../../../shared-logic/src/IdentityConfig/types").IdentityConfig) => Promise<import("../../../../shared-logic/src/DataSet/types").DataSet[] | null>) | undefined;
|
|
132
141
|
data?: undefined;
|
|
133
142
|
queryEngineConfig?: undefined;
|
|
134
143
|
} & {
|
|
@@ -186,6 +195,7 @@ export declare const useGlobalContext: () => ({
|
|
|
186
195
|
parentDashboardId?: string | undefined;
|
|
187
196
|
dashboardId?: string | undefined;
|
|
188
197
|
cascadeFilterSelection?: boolean | undefined;
|
|
198
|
+
parentDashboard?: ((dataSets: import("../../../../shared-logic/src/DataSet/types").DataSet[]) => Promise<Partial<import("../../../../shared-logic/src/Dashboard").SaveableDashboardDefinition>[]>) | undefined;
|
|
189
199
|
} & Partial<import("../../../../shared-ui/src").VizzlyComponents.ComponentOverrides> & {
|
|
190
200
|
runQueries: (queries: import("../../../../shared-logic/src/Query/types").Query<string, string, string>[], params: {
|
|
191
201
|
dataSets: import("../../../../shared-logic/src/DataSet/types").DataSet[];
|
|
@@ -197,6 +207,13 @@ export declare const useGlobalContext: () => ({
|
|
|
197
207
|
dataSets: (identityConfig: import("../../../../shared-logic/src/IdentityConfig/types").IdentityConfig) => Promise<import("../../../../shared-logic/src/DataSet/types").DataSet[] | null>;
|
|
198
208
|
queryEngineConfig: import("../../../../shared-logic/src/Callbacks/types").loadQueryEngineConfigCallback;
|
|
199
209
|
data?: undefined;
|
|
210
|
+
queryEngineEndpoint?: string | {
|
|
211
|
+
endpoint: string;
|
|
212
|
+
dynamicConfig?: Object | undefined;
|
|
213
|
+
customHeaders?: (() => {
|
|
214
|
+
[headerKey: string]: string;
|
|
215
|
+
}) | undefined;
|
|
216
|
+
} | undefined;
|
|
200
217
|
} & {
|
|
201
218
|
onSave: (dashboard: Dashboard) => void;
|
|
202
219
|
}) | undefined;
|
|
@@ -253,12 +270,20 @@ export declare const GlobalContext: import("react").Context<({
|
|
|
253
270
|
parentDashboardId?: string | undefined;
|
|
254
271
|
dashboardId?: string | undefined;
|
|
255
272
|
cascadeFilterSelection?: boolean | undefined;
|
|
273
|
+
parentDashboard?: ((dataSets: import("../../../../shared-logic/src/DataSet/types").DataSet[]) => Promise<Partial<import("../../../../shared-logic/src/Dashboard").SaveableDashboardDefinition>[]>) | undefined;
|
|
256
274
|
} & Partial<import("../../../../shared-ui/src").VizzlyComponents.ComponentOverrides> & {
|
|
257
275
|
identity: import("../../../../shared-logic/src/Callbacks/types").identityCallback;
|
|
258
276
|
dataSets: (identityConfig: import("../../../../shared-logic/src/IdentityConfig/types").IdentityConfig) => Promise<import("../../../../shared-logic/src/DataSet/types").DataSet[] | null>;
|
|
259
277
|
data: import("../../../../shared-logic/src/Callbacks/types").loadDataCallback;
|
|
260
278
|
runQueries?: undefined;
|
|
261
279
|
queryEngineConfig?: undefined;
|
|
280
|
+
queryEngineEndpoint?: string | {
|
|
281
|
+
endpoint: string;
|
|
282
|
+
dynamicConfig?: Object | undefined;
|
|
283
|
+
customHeaders?: (() => {
|
|
284
|
+
[headerKey: string]: string;
|
|
285
|
+
}) | undefined;
|
|
286
|
+
} | undefined;
|
|
262
287
|
} & {
|
|
263
288
|
onSave: (dashboard: Dashboard) => void;
|
|
264
289
|
}) | ({
|
|
@@ -314,6 +339,7 @@ export declare const GlobalContext: import("react").Context<({
|
|
|
314
339
|
parentDashboardId?: string | undefined;
|
|
315
340
|
dashboardId?: string | undefined;
|
|
316
341
|
cascadeFilterSelection?: boolean | undefined;
|
|
342
|
+
parentDashboard?: ((dataSets: import("../../../../shared-logic/src/DataSet/types").DataSet[]) => Promise<Partial<import("../../../../shared-logic/src/Dashboard").SaveableDashboardDefinition>[]>) | undefined;
|
|
317
343
|
} & Partial<import("../../../../shared-ui/src").VizzlyComponents.ComponentOverrides> & {
|
|
318
344
|
queryEngineEndpoint?: string | {
|
|
319
345
|
endpoint: string;
|
|
@@ -324,7 +350,7 @@ export declare const GlobalContext: import("react").Context<({
|
|
|
324
350
|
} | undefined;
|
|
325
351
|
identity: import("../../../../shared-logic/src/Callbacks/types").identityCallback;
|
|
326
352
|
runQueries?: undefined;
|
|
327
|
-
dataSets?: undefined;
|
|
353
|
+
dataSets?: ((identityConfig: import("../../../../shared-logic/src/IdentityConfig/types").IdentityConfig) => Promise<import("../../../../shared-logic/src/DataSet/types").DataSet[] | null>) | undefined;
|
|
328
354
|
data?: undefined;
|
|
329
355
|
queryEngineConfig?: undefined;
|
|
330
356
|
} & {
|
|
@@ -382,6 +408,7 @@ export declare const GlobalContext: import("react").Context<({
|
|
|
382
408
|
parentDashboardId?: string | undefined;
|
|
383
409
|
dashboardId?: string | undefined;
|
|
384
410
|
cascadeFilterSelection?: boolean | undefined;
|
|
411
|
+
parentDashboard?: ((dataSets: import("../../../../shared-logic/src/DataSet/types").DataSet[]) => Promise<Partial<import("../../../../shared-logic/src/Dashboard").SaveableDashboardDefinition>[]>) | undefined;
|
|
385
412
|
} & Partial<import("../../../../shared-ui/src").VizzlyComponents.ComponentOverrides> & {
|
|
386
413
|
runQueries: (queries: import("../../../../shared-logic/src/Query/types").Query<string, string, string>[], params: {
|
|
387
414
|
dataSets: import("../../../../shared-logic/src/DataSet/types").DataSet[];
|
|
@@ -393,6 +420,13 @@ export declare const GlobalContext: import("react").Context<({
|
|
|
393
420
|
dataSets: (identityConfig: import("../../../../shared-logic/src/IdentityConfig/types").IdentityConfig) => Promise<import("../../../../shared-logic/src/DataSet/types").DataSet[] | null>;
|
|
394
421
|
queryEngineConfig: import("../../../../shared-logic/src/Callbacks/types").loadQueryEngineConfigCallback;
|
|
395
422
|
data?: undefined;
|
|
423
|
+
queryEngineEndpoint?: string | {
|
|
424
|
+
endpoint: string;
|
|
425
|
+
dynamicConfig?: Object | undefined;
|
|
426
|
+
customHeaders?: (() => {
|
|
427
|
+
[headerKey: string]: string;
|
|
428
|
+
}) | undefined;
|
|
429
|
+
} | undefined;
|
|
396
430
|
} & {
|
|
397
431
|
onSave: (dashboard: Dashboard) => void;
|
|
398
432
|
}) | undefined>;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { useDataConfigurationAndIdentity } from '../useDataConfigurationAndIdentity';
|
|
2
2
|
import { IdentityConfig } from '../../../../shared-logic/src/IdentityConfig/types';
|
|
3
|
-
import { Dashboard } from '../../../../shared-logic/src/Dashboard/types';
|
|
3
|
+
import { Dashboard, SaveableDashboardDefinition } from '../../../../shared-logic/src/Dashboard/types';
|
|
4
4
|
import { QueryEngineConfig } from '../../../../shared-logic/src/QueryEngineConfig/types';
|
|
5
5
|
import { api } from '../../../../shared-logic/src/api';
|
|
6
6
|
import { VizzlyComponents } from '../../../../shared-ui/src/types';
|
|
7
7
|
import { DashboardApiInterface } from '../useDashboardAPI';
|
|
8
|
+
import { DataSet } from '../../../../shared-logic/src/DataSet/types';
|
|
9
|
+
import { Mode, Scope } from '../useDashboardStrategy/types';
|
|
8
10
|
declare type Params = {
|
|
9
11
|
parentDashboardId: string | undefined;
|
|
10
12
|
identityCallback: VizzlyComponents.identityCallback;
|
|
@@ -13,19 +15,21 @@ declare type Params = {
|
|
|
13
15
|
dashboardId?: string;
|
|
14
16
|
implementationMeta: VizzlyComponents.ImplementationMeta;
|
|
15
17
|
loadQueryEngineConfigCallback: VizzlyComponents.loadQueryEngineConfigCallback;
|
|
18
|
+
programmaticDashboard?: (dataSets: DataSet[]) => Promise<Array<Partial<SaveableDashboardDefinition>>>;
|
|
16
19
|
};
|
|
17
20
|
export declare type StillLoading = null;
|
|
18
21
|
export declare type ErrorProvided = {
|
|
19
22
|
error: ReturnType<typeof useDataConfigurationAndIdentity>['error'];
|
|
20
23
|
};
|
|
21
24
|
export declare type SessionSuccessProvidedValues = {
|
|
22
|
-
mode:
|
|
23
|
-
scope:
|
|
25
|
+
mode: Mode;
|
|
26
|
+
scope: Scope;
|
|
24
27
|
identityConfig: IdentityConfig;
|
|
25
28
|
dashboard: Dashboard | null;
|
|
26
29
|
vizzlyApiConfig: VizzlyComponents.ApiConfig;
|
|
27
30
|
queryEngineConfig: QueryEngineConfig;
|
|
28
31
|
dashboardAPI: DashboardApiInterface;
|
|
32
|
+
isProgrammaticParent: boolean;
|
|
29
33
|
};
|
|
30
34
|
export declare const useSessionContext: (params: Params) => ErrorProvided | SessionSuccessProvidedValues | StillLoading;
|
|
31
35
|
export {};
|
|
@@ -7,7 +7,9 @@ import FailedToGetDashboard from '../../../shared-logic/src/errors/FailedToGetDa
|
|
|
7
7
|
import NewVizzlyImplementation from '../../../shared-logic/src/errors/NewVizzlyImplementation';
|
|
8
8
|
import { IdentityConfig as IdentityConfigType } from '../../../shared-logic/src/IdentityConfig/types';
|
|
9
9
|
import { DataSet } from '../../../shared-logic/src/DataSet/types';
|
|
10
|
+
import * as Dashboard from '../../../shared-logic/src/Dashboard';
|
|
10
11
|
import { api } from '../../../shared-logic/src/api';
|
|
12
|
+
import { QueryEngineConfig, QueryEngineEndpoint } from '../../../shared-logic/src/QueryEngineConfig/types';
|
|
11
13
|
export declare type DashboardApiInterface = {
|
|
12
14
|
childDashboardCount: number;
|
|
13
15
|
defaultParentDashboardId: string;
|
|
@@ -29,5 +31,12 @@ export declare type LoadingDashboardApiInterface = {
|
|
|
29
31
|
isLoading: true;
|
|
30
32
|
error: DashboardApiInterface['error'];
|
|
31
33
|
};
|
|
32
|
-
declare
|
|
34
|
+
declare type DashboardStorageStrategy = {
|
|
35
|
+
strategy: 'vizzlyApi';
|
|
36
|
+
} | {
|
|
37
|
+
strategy: 'queryEngine';
|
|
38
|
+
endpoint: QueryEngineEndpoint;
|
|
39
|
+
};
|
|
40
|
+
export declare const getDashboardStorageStrategy: (queryEngineEndpoint: Function | QueryEngineEndpoint | undefined, queryEngineConfig: QueryEngineConfig | undefined) => DashboardStorageStrategy;
|
|
41
|
+
declare const useDashboardAPI: (identityConfig: IdentityConfigType | undefined, dataSets: DataSet[] | undefined, vizzlyAPI: ReturnType<typeof api>, parentDashboardId: string | undefined, dashboardStorageStrategy: DashboardStorageStrategy, programmaticDashboard?: ((dataSets: DataSet[]) => Promise<Array<Partial<Dashboard.SaveableDashboardDefinition>>>) | undefined) => DashboardApiInterface | LoadingDashboardApiInterface;
|
|
33
42
|
export default useDashboardAPI;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Strategy } from './types';
|
|
1
|
+
import { Mode, Scope, Strategy } from './types';
|
|
2
2
|
import { DashboardApiInterface } from '../useDashboardAPI';
|
|
3
3
|
export declare const runStrategy: (strategy: Strategy, dashboardAPI: DashboardApiInterface) => Promise<{
|
|
4
4
|
dashboardId: string;
|
|
5
|
-
mode:
|
|
6
|
-
scope:
|
|
5
|
+
mode: Mode;
|
|
6
|
+
scope: Scope;
|
|
7
7
|
}>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Dashboard } from '../../../../shared-logic/src/Dashboard/types';
|
|
2
|
+
declare type ExactStrategy = {
|
|
3
|
+
type: 'exact';
|
|
4
|
+
dashboardId: string;
|
|
5
|
+
};
|
|
6
|
+
declare type InstantCopyOf = {
|
|
7
|
+
type: 'instantCopyOf';
|
|
8
|
+
parentDashboardId: string;
|
|
9
|
+
};
|
|
10
|
+
export declare type Strategy = ExactStrategy | InstantCopyOf;
|
|
11
|
+
export declare enum Mode {
|
|
12
|
+
Admin = "admin",
|
|
13
|
+
EndUser = "endUser"
|
|
14
|
+
}
|
|
15
|
+
export declare enum Scope {
|
|
16
|
+
Read = "read",
|
|
17
|
+
ReadWrite = "read_write"
|
|
18
|
+
}
|
|
19
|
+
export declare type ProvidedValues = {
|
|
20
|
+
dashboard: Dashboard | null;
|
|
21
|
+
mode: Mode;
|
|
22
|
+
scope: Scope;
|
|
23
|
+
isProgrammaticParent: boolean;
|
|
24
|
+
};
|
|
25
|
+
export {};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import useDashboardAPI from './useDashboardAPI';
|
|
2
2
|
import { ProvidedValues, Strategy } from './useDashboardStrategy/types';
|
|
3
|
-
|
|
3
|
+
import { SaveableDashboardDefinition } from '../../../shared-logic/src/Dashboard';
|
|
4
|
+
import { DataSet } from '../../../shared-logic/src/DataSet/types';
|
|
5
|
+
declare const useDashboardStrategy: (strategy: Strategy | undefined, dashboardAPI: ReturnType<typeof useDashboardAPI>, programmaticDashboard?: ((dataSets: DataSet[]) => Promise<Array<Partial<SaveableDashboardDefinition>>>) | undefined) => ProvidedValues | null;
|
|
4
6
|
export default useDashboardStrategy;
|
|
@@ -2,11 +2,17 @@ import { VizzlyComponents } from '../../../shared-ui/src/types';
|
|
|
2
2
|
import FailedToLoadIdentity from '../../../shared-logic/src/errors/FailedToLoadIdentity';
|
|
3
3
|
import FailedToLoadQueryEngineConfig from '../../../shared-logic/src/errors/FailedToLoadQueryEngineConfig';
|
|
4
4
|
import { DataSet } from '../../../shared-logic/src/DataSet/types';
|
|
5
|
-
import { QueryEngineConfig } from '../../../shared-logic/src/QueryEngineConfig/types';
|
|
5
|
+
import { QueryEngineConfig, QueryEngineEndpoint } from '../../../shared-logic/src/QueryEngineConfig/types';
|
|
6
6
|
import { IdentityConfig as IdentityConfigType } from '../../../shared-logic/src/IdentityConfig/types';
|
|
7
7
|
import IdentityMustBeCallback from '../../../shared-logic/src/errors/IdentityMustBeCallback';
|
|
8
8
|
import NoDataSetResolved from '../../../shared-logic/src/errors/NoDataSetResolved';
|
|
9
|
-
export declare const useDataConfigurationAndIdentity: (identityCallback: import("../../../shared-logic/src/Callbacks/types").identityCallback, loadDataSetsCallback: import("../../../shared-logic/src/Callbacks/types").loadDataSetsCallback, loadQueryEngineConfigCallback: string | import("../../../shared-logic/src/Callbacks/types").loadQueryEngineConfigCallback
|
|
9
|
+
export declare const useDataConfigurationAndIdentity: (identityCallback: import("../../../shared-logic/src/Callbacks/types").identityCallback, loadDataSetsCallback: import("../../../shared-logic/src/Callbacks/types").loadDataSetsCallback, loadQueryEngineConfigCallback: string | import("../../../shared-logic/src/Callbacks/types").loadQueryEngineConfigCallback | {
|
|
10
|
+
endpoint: string;
|
|
11
|
+
dynamicConfig?: Object | undefined;
|
|
12
|
+
customHeaders?: (() => {
|
|
13
|
+
[headerKey: string]: string;
|
|
14
|
+
}) | undefined;
|
|
15
|
+
}) => {
|
|
10
16
|
error: FailedToLoadIdentity | FailedToLoadQueryEngineConfig | IdentityMustBeCallback | NoDataSetResolved | undefined;
|
|
11
17
|
dataSets: DataSet[] | undefined;
|
|
12
18
|
queryEngineConfig: QueryEngineConfig | undefined;
|
|
@@ -11,7 +11,13 @@ import './developerTools';
|
|
|
11
11
|
declare const Dashboard: (props: DashboardProps) => JSX.Element;
|
|
12
12
|
declare const _default: {
|
|
13
13
|
Dashboard: (props: DashboardProps) => JSX.Element;
|
|
14
|
-
useDashboardManager: (identity: import("../../shared-logic/src/Callbacks/types").identityCallback, loadQueryEngineConfig: string | import("../../shared-logic/src/Callbacks/types").loadQueryEngineConfigCallback
|
|
14
|
+
useDashboardManager: (identity: import("../../shared-logic/src/Callbacks/types").identityCallback, loadQueryEngineConfig: string | import("../../shared-logic/src/Callbacks/types").loadQueryEngineConfigCallback | {
|
|
15
|
+
endpoint: string;
|
|
16
|
+
dynamicConfig?: Object | undefined;
|
|
17
|
+
customHeaders?: (() => {
|
|
18
|
+
[headerKey: string]: string;
|
|
19
|
+
}) | undefined;
|
|
20
|
+
}, defaultParentDashboardId?: string | undefined, vizzlyApiConfigOverride?: import("../../shared-logic/src/ApiConfig").ApiConfig | undefined) => {
|
|
15
21
|
VizzlySDK: {
|
|
16
22
|
displayPositions: {
|
|
17
23
|
FIRST_ROW: number;
|
|
@@ -48,6 +48,7 @@ export declare type SharedDashboardProps = {
|
|
|
48
48
|
*/
|
|
49
49
|
dashboardId?: string;
|
|
50
50
|
cascadeFilterSelection?: boolean;
|
|
51
|
+
parentDashboard?: DashboardBehaviour['parentDashboard'];
|
|
51
52
|
} & Partial<VizzlyComponents.ComponentOverrides>;
|
|
52
53
|
export declare type CustomDashboardProps = SharedDashboardProps & {
|
|
53
54
|
runQueries: CustomDriver['runQueries'];
|
|
@@ -55,6 +56,7 @@ export declare type CustomDashboardProps = SharedDashboardProps & {
|
|
|
55
56
|
dataSets: (identityConfig: IdentityConfig) => Promise<Array<DataSet> | null>;
|
|
56
57
|
queryEngineConfig: VizzlyComponents.loadQueryEngineConfigCallback;
|
|
57
58
|
data?: never;
|
|
59
|
+
queryEngineEndpoint?: QueryEngineEndpoint;
|
|
58
60
|
};
|
|
59
61
|
export declare type InBrowserDashboardProps = SharedDashboardProps & {
|
|
60
62
|
identity: VizzlyComponents.identityCallback;
|
|
@@ -62,12 +64,13 @@ export declare type InBrowserDashboardProps = SharedDashboardProps & {
|
|
|
62
64
|
data: VizzlyComponents.loadDataCallback;
|
|
63
65
|
runQueries?: never;
|
|
64
66
|
queryEngineConfig?: never;
|
|
67
|
+
queryEngineEndpoint?: QueryEngineEndpoint;
|
|
65
68
|
};
|
|
66
69
|
export declare type SelfHostedDashboardProps = SharedDashboardProps & {
|
|
67
70
|
queryEngineEndpoint?: QueryEngineEndpoint;
|
|
68
71
|
identity: VizzlyComponents.identityCallback;
|
|
69
72
|
runQueries?: never;
|
|
70
|
-
dataSets?:
|
|
73
|
+
dataSets?: (identityConfig: IdentityConfig) => Promise<Array<DataSet> | null>;
|
|
71
74
|
data?: never;
|
|
72
75
|
queryEngineConfig?: never;
|
|
73
76
|
};
|
|
@@ -5,6 +5,7 @@ import deleteDashboard from './useDashboardManager/deleteDashboard';
|
|
|
5
5
|
import updateDashboardMeta from './useDashboardManager/updateDashboardMeta';
|
|
6
6
|
import { identityCallback, loadQueryEngineConfigCallback } from '../../shared-logic/src/Callbacks/types';
|
|
7
7
|
import { ApiConfig } from '../../shared-logic/src/ApiConfig';
|
|
8
|
+
import { QueryEngineEndpoint } from '../../shared-logic/src/QueryEngineConfig/types';
|
|
8
9
|
declare type BaseProvides<Loading extends boolean, VizzlySDK, ParentDashboardIdType> = {
|
|
9
10
|
VizzlySDK: VizzlySDK;
|
|
10
11
|
loading: Loading;
|
|
@@ -30,6 +31,6 @@ declare type BaseProvides<Loading extends boolean, VizzlySDK, ParentDashboardIdT
|
|
|
30
31
|
export declare type DashboardManagerLoadedState = BaseProvides<false, ReturnType<typeof loadVizzlySDK>, string>;
|
|
31
32
|
export declare type DashboardManagerLoadingState = BaseProvides<true, null, null>;
|
|
32
33
|
declare type Provides = DashboardManagerLoadedState | DashboardManagerLoadingState;
|
|
33
|
-
declare const useDashboardManager: (identity: identityCallback, loadQueryEngineConfig: loadQueryEngineConfigCallback |
|
|
34
|
+
declare const useDashboardManager: (identity: identityCallback, loadQueryEngineConfig: loadQueryEngineConfigCallback | QueryEngineEndpoint, defaultParentDashboardId?: string | undefined, vizzlyApiConfigOverride?: ApiConfig | undefined) => Provides;
|
|
34
35
|
declare const useInBrowserDashboardManager: (identity: identityCallback, defaultParentDashboardId?: string | undefined, vizzlyApiConfigOverride?: ApiConfig | undefined) => Provides;
|
|
35
36
|
export { useDashboardManager, useInBrowserDashboardManager };
|