@gooddata/sdk-ui 9.0.0-alpha.1 → 9.0.0-alpha.3
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/base/index.d.ts +0 -1
- package/dist/base/index.d.ts.map +1 -1
- package/dist/base/index.js +1 -3
- package/dist/base/index.js.map +1 -1
- package/dist/execution/index.d.ts +0 -2
- package/dist/execution/index.d.ts.map +1 -1
- package/dist/execution/index.js +1 -5
- package/dist/execution/index.js.map +1 -1
- package/dist/execution/useExecutionDataView.d.ts.map +1 -1
- package/dist/execution/useExecutionDataView.js +23 -3
- package/dist/execution/useExecutionDataView.js.map +1 -1
- package/dist/sdk-ui.d.ts +0 -203
- package/esm/base/index.d.ts +0 -1
- package/esm/base/index.d.ts.map +1 -1
- package/esm/base/index.js +0 -1
- package/esm/base/index.js.map +1 -1
- package/esm/execution/index.d.ts +0 -2
- package/esm/execution/index.d.ts.map +1 -1
- package/esm/execution/index.js +0 -2
- package/esm/execution/index.js.map +1 -1
- package/esm/execution/useExecutionDataView.d.ts.map +1 -1
- package/esm/execution/useExecutionDataView.js +24 -4
- package/esm/execution/useExecutionDataView.js.map +1 -1
- package/package.json +8 -8
- package/dist/base/helpers/CatalogHelper.d.ts +0 -99
- package/dist/base/helpers/CatalogHelper.d.ts.map +0 -1
- package/dist/base/helpers/CatalogHelper.js +0 -89
- package/dist/base/helpers/CatalogHelper.js.map +0 -1
- package/dist/execution/useDataView.d.ts +0 -31
- package/dist/execution/useDataView.d.ts.map +0 -1
- package/dist/execution/useDataView.js +0 -38
- package/dist/execution/useDataView.js.map +0 -1
- package/dist/execution/useExecution.d.ts +0 -70
- package/dist/execution/useExecution.d.ts.map +0 -1
- package/dist/execution/useExecution.js +0 -28
- package/dist/execution/useExecution.js.map +0 -1
- package/esm/base/helpers/CatalogHelper.d.ts +0 -99
- package/esm/base/helpers/CatalogHelper.d.ts.map +0 -1
- package/esm/base/helpers/CatalogHelper.js +0 -85
- package/esm/base/helpers/CatalogHelper.js.map +0 -1
- package/esm/execution/useDataView.d.ts +0 -31
- package/esm/execution/useDataView.d.ts.map +0 -1
- package/esm/execution/useDataView.js +0 -34
- package/esm/execution/useDataView.js.map +0 -1
- package/esm/execution/useExecution.d.ts +0 -70
- package/esm/execution/useExecution.d.ts.map +0 -1
- package/esm/execution/useExecution.js +0 -24
- package/esm/execution/useExecution.js.map +0 -1
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { DependencyList } from "react";
|
|
2
|
-
import { IPreparedExecution } from "@gooddata/sdk-backend-spi";
|
|
3
|
-
import { DataViewWindow } from "./withExecutionLoading";
|
|
4
|
-
import { DataViewFacade, GoodDataSdkError, UseCancelablePromiseCallbacks, UseCancelablePromiseState } from "../base";
|
|
5
|
-
/**
|
|
6
|
-
* Indicates current state of useDataView hook
|
|
7
|
-
* @deprecated use {@link useExecutionDataView} instead
|
|
8
|
-
* @beta
|
|
9
|
-
*/
|
|
10
|
-
export type UseDataViewState = UseCancelablePromiseState<DataViewFacade, GoodDataSdkError>;
|
|
11
|
-
/**
|
|
12
|
-
* Callbacks for useDataView hook
|
|
13
|
-
* @deprecated use {@link useExecutionDataView} instead
|
|
14
|
-
* @beta
|
|
15
|
-
*/
|
|
16
|
-
export type UseDataViewCallbacks = UseCancelablePromiseCallbacks<DataViewFacade, GoodDataSdkError>;
|
|
17
|
-
/**
|
|
18
|
-
* This hook provides easy way to get data for the provided {@link @gooddata/sdk-backend-spi#IPreparedExecution}.
|
|
19
|
-
*
|
|
20
|
-
* @remarks
|
|
21
|
-
* You can use it to create custom visualizations on top of GoodData platform.
|
|
22
|
-
* Be aware that execution is re-executed only on dependency list change, not on execution/window/callbacks change.
|
|
23
|
-
*
|
|
24
|
-
* @deprecated use {@link useExecutionDataView} instead
|
|
25
|
-
* @beta
|
|
26
|
-
*/
|
|
27
|
-
export declare function useDataView({ execution, window, onCancel, onError, onLoading, onPending, onSuccess, }: {
|
|
28
|
-
execution: IPreparedExecution | undefined | null;
|
|
29
|
-
window?: DataViewWindow;
|
|
30
|
-
} & UseDataViewCallbacks, deps?: DependencyList): UseDataViewState;
|
|
31
|
-
//# sourceMappingURL=useDataView.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useDataView.d.ts","sourceRoot":"","sources":["../../src/execution/useDataView.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAEH,cAAc,EACd,gBAAgB,EAEhB,6BAA6B,EAC7B,yBAAyB,EAC5B,MAAM,SAAS,CAAC;AAEjB;;;;GAIG;AACH,MAAM,MAAM,gBAAgB,GAAG,yBAAyB,CAAC,cAAc,EAAE,gBAAgB,CAAC,CAAC;AAE3F;;;;GAIG;AACH,MAAM,MAAM,oBAAoB,GAAG,6BAA6B,CAAC,cAAc,EAAE,gBAAgB,CAAC,CAAC;AAEnG;;;;;;;;;GASG;AACH,wBAAgB,WAAW,CACvB,EACI,SAAS,EACT,MAAM,EACN,QAAQ,EACR,OAAO,EACP,SAAS,EACT,SAAS,EACT,SAAS,GACZ,EAAE;IACC,SAAS,EAAE,kBAAkB,GAAG,SAAS,GAAG,IAAI,CAAC;IACjD,MAAM,CAAC,EAAE,cAAc,CAAC;CAC3B,GAAG,oBAAoB,EACxB,IAAI,CAAC,EAAE,cAAc,GACtB,gBAAgB,CA2BlB"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { convertError, DataViewFacade, useCancelablePromise, } from "../base";
|
|
2
|
-
/**
|
|
3
|
-
* This hook provides easy way to get data for the provided {@link @gooddata/sdk-backend-spi#IPreparedExecution}.
|
|
4
|
-
*
|
|
5
|
-
* @remarks
|
|
6
|
-
* You can use it to create custom visualizations on top of GoodData platform.
|
|
7
|
-
* Be aware that execution is re-executed only on dependency list change, not on execution/window/callbacks change.
|
|
8
|
-
*
|
|
9
|
-
* @deprecated use {@link useExecutionDataView} instead
|
|
10
|
-
* @beta
|
|
11
|
-
*/
|
|
12
|
-
export function useDataView({ execution, window, onCancel, onError, onLoading, onPending, onSuccess, }, deps) {
|
|
13
|
-
return useCancelablePromise({
|
|
14
|
-
promise: execution
|
|
15
|
-
? () => execution
|
|
16
|
-
.execute()
|
|
17
|
-
.then((executionResult) => window
|
|
18
|
-
? executionResult.readWindow(window.offset, window.size)
|
|
19
|
-
: executionResult.readAll())
|
|
20
|
-
.then((dataView) => {
|
|
21
|
-
return DataViewFacade.for(dataView);
|
|
22
|
-
})
|
|
23
|
-
.catch((error) => {
|
|
24
|
-
throw convertError(error);
|
|
25
|
-
})
|
|
26
|
-
: null,
|
|
27
|
-
onCancel,
|
|
28
|
-
onError,
|
|
29
|
-
onLoading,
|
|
30
|
-
onPending,
|
|
31
|
-
onSuccess,
|
|
32
|
-
}, deps);
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=useDataView.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useDataView.js","sourceRoot":"","sources":["../../src/execution/useDataView.ts"],"names":[],"mappings":"AAIA,OAAO,EACH,YAAY,EACZ,cAAc,EAEd,oBAAoB,GAGvB,MAAM,SAAS,CAAC;AAgBjB;;;;;;;;;GASG;AACH,MAAM,UAAU,WAAW,CACvB,EACI,SAAS,EACT,MAAM,EACN,QAAQ,EACR,OAAO,EACP,SAAS,EACT,SAAS,EACT,SAAS,GAIW,EACxB,IAAqB;IAErB,OAAO,oBAAoB,CACvB;QACI,OAAO,EAAE,SAAS;YACd,CAAC,CAAC,GAAG,EAAE,CACD,SAAS;iBACJ,OAAO,EAAE;iBACT,IAAI,CAAC,CAAC,eAAe,EAAE,EAAE,CACtB,MAAM;gBACF,CAAC,CAAC,eAAe,CAAC,UAAU,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC;gBACxD,CAAC,CAAC,eAAe,CAAC,OAAO,EAAE,CAClC;iBACA,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;gBACf,OAAO,cAAc,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;YACxC,CAAC,CAAC;iBACD,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;gBACb,MAAM,YAAY,CAAC,KAAK,CAAC,CAAC;YAC9B,CAAC,CAAC;YACZ,CAAC,CAAC,IAAI;QACV,QAAQ;QACR,OAAO;QACP,SAAS;QACT,SAAS;QACT,SAAS;KACZ,EACD,IAAI,CACP,CAAC;AACN,CAAC"}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { IAnalyticalBackend, IPreparedExecution } from "@gooddata/sdk-backend-spi";
|
|
2
|
-
import { AttributesMeasuresOrPlaceholders, AttributesOrPlaceholders, TotalsOrPlaceholders, NullableFiltersOrPlaceholders, SortsOrPlaceholders } from "../base";
|
|
3
|
-
/**
|
|
4
|
-
* @deprecated use {@link useExecutionDataView} instead
|
|
5
|
-
* @beta
|
|
6
|
-
*/
|
|
7
|
-
export interface IUseExecutionConfig {
|
|
8
|
-
/**
|
|
9
|
-
* Data series will be built using the provided measures that are further scoped for
|
|
10
|
-
* elements of the specified attributes.
|
|
11
|
-
*/
|
|
12
|
-
seriesBy: AttributesMeasuresOrPlaceholders;
|
|
13
|
-
/**
|
|
14
|
-
* Slice all data series by elements of these attributes.
|
|
15
|
-
*/
|
|
16
|
-
slicesBy?: AttributesOrPlaceholders;
|
|
17
|
-
/**
|
|
18
|
-
* Include these totals among the data slices.
|
|
19
|
-
*/
|
|
20
|
-
totals?: TotalsOrPlaceholders;
|
|
21
|
-
/**
|
|
22
|
-
* Filters to apply on server side.
|
|
23
|
-
*/
|
|
24
|
-
filters?: NullableFiltersOrPlaceholders;
|
|
25
|
-
/**
|
|
26
|
-
* Sorting to apply on server side.
|
|
27
|
-
*/
|
|
28
|
-
sortBy?: SortsOrPlaceholders;
|
|
29
|
-
/**
|
|
30
|
-
* Resolution context for composed placeholders.
|
|
31
|
-
*/
|
|
32
|
-
placeholdersResolutionContext?: any;
|
|
33
|
-
/**
|
|
34
|
-
* Informative name of the component.
|
|
35
|
-
*
|
|
36
|
-
* @remarks
|
|
37
|
-
* This value is sent as telemetry information together with the actual execution request.
|
|
38
|
-
* We recommend to set this because it can be useful for diagnostic purposes.
|
|
39
|
-
*
|
|
40
|
-
* Defaults 'Execute'.
|
|
41
|
-
*/
|
|
42
|
-
componentName?: string;
|
|
43
|
-
/**
|
|
44
|
-
* Backend to work with.
|
|
45
|
-
*
|
|
46
|
-
* @remarks
|
|
47
|
-
* Note: the backend must come either from this property or from BackendContext. If you do not specify
|
|
48
|
-
* backend here, then the executor MUST be rendered within an existing BackendContext.
|
|
49
|
-
*/
|
|
50
|
-
backend?: IAnalyticalBackend;
|
|
51
|
-
/**
|
|
52
|
-
* Workspace where execution should be executed.
|
|
53
|
-
*
|
|
54
|
-
* @remarks
|
|
55
|
-
* Note: the workspace must come either from this property or from WorkspaceContext. If you do not specify
|
|
56
|
-
* workspace here, then the executor MUST be rendered within an existing WorkspaceContext.
|
|
57
|
-
*/
|
|
58
|
-
workspace?: string;
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* This hook provides a simplified interface for creating executions.
|
|
62
|
-
*
|
|
63
|
-
* @remarks
|
|
64
|
-
* It builds the execution on top of the backend passed to the BackendProvider, and workspace passed to the WorkspaceProvider.
|
|
65
|
-
*
|
|
66
|
-
* @deprecated use {@link useExecutionDataView} instead
|
|
67
|
-
* @beta
|
|
68
|
-
*/
|
|
69
|
-
export declare function useExecution(config: IUseExecutionConfig): IPreparedExecution;
|
|
70
|
-
//# sourceMappingURL=useExecution.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useExecution.d.ts","sourceRoot":"","sources":["../../src/execution/useExecution.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACnF,OAAO,EAIH,gCAAgC,EAChC,wBAAwB,EACxB,oBAAoB,EACpB,6BAA6B,EAC7B,mBAAmB,EACtB,MAAM,SAAS,CAAC;AAGjB;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAChC;;;OAGG;IACH,QAAQ,EAAE,gCAAgC,CAAC;IAE3C;;OAEG;IACH,QAAQ,CAAC,EAAE,wBAAwB,CAAC;IAEpC;;OAEG;IACH,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAE9B;;OAEG;IACH,OAAO,CAAC,EAAE,6BAA6B,CAAC;IAExC;;OAEG;IACH,MAAM,CAAC,EAAE,mBAAmB,CAAC;IAE7B;;OAEG;IACH,6BAA6B,CAAC,EAAE,GAAG,CAAC;IAEpC;;;;;;;;OAQG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAE7B;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,mBAAmB,GAAG,kBAAkB,CAkB5E"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { useBackend, useResolveValuesWithPlaceholders, useWorkspace, } from "../base";
|
|
2
|
-
import { createExecution } from "./createExecution";
|
|
3
|
-
/**
|
|
4
|
-
* This hook provides a simplified interface for creating executions.
|
|
5
|
-
*
|
|
6
|
-
* @remarks
|
|
7
|
-
* It builds the execution on top of the backend passed to the BackendProvider, and workspace passed to the WorkspaceProvider.
|
|
8
|
-
*
|
|
9
|
-
* @deprecated use {@link useExecutionDataView} instead
|
|
10
|
-
* @beta
|
|
11
|
-
*/
|
|
12
|
-
export function useExecution(config) {
|
|
13
|
-
const backend = useBackend(config.backend);
|
|
14
|
-
const workspace = useWorkspace(config.workspace);
|
|
15
|
-
const [seriesBy, slicesBy, totals, filters, sortBy] = useResolveValuesWithPlaceholders([config.seriesBy, config.slicesBy, config.totals, config.filters, config.sortBy], config.placeholdersResolutionContext);
|
|
16
|
-
return createExecution(Object.assign(Object.assign({}, config), { backend,
|
|
17
|
-
workspace,
|
|
18
|
-
seriesBy,
|
|
19
|
-
slicesBy,
|
|
20
|
-
totals,
|
|
21
|
-
filters,
|
|
22
|
-
sortBy }));
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=useExecution.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useExecution.js","sourceRoot":"","sources":["../../src/execution/useExecution.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,UAAU,EACV,gCAAgC,EAChC,YAAY,GAMf,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAoEpD;;;;;;;;GAQG;AACH,MAAM,UAAU,YAAY,CAAC,MAA2B;IACpD,MAAM,OAAO,GAAG,UAAU,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAC3C,MAAM,SAAS,GAAG,YAAY,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IACjD,MAAM,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,GAAG,gCAAgC,CAClF,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,EAChF,MAAM,CAAC,6BAA6B,CACvC,CAAC;IAEF,OAAO,eAAe,iCACf,MAAM,KACT,OAAO;QACP,SAAS;QACT,QAAQ;QACR,QAAQ;QACR,MAAM;QACN,OAAO;QACP,MAAM,IACR,CAAC;AACP,CAAC"}
|