@gooddata/sdk-ui-pluggable-application 11.28.0-alpha.1 → 11.28.0-alpha.11

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/esm/context.d.ts CHANGED
@@ -1,5 +1,28 @@
1
1
  import { type PropsWithChildren } from "react";
2
+ import { type IAnalyticalBackend } from "@gooddata/sdk-backend-spi";
2
3
  import { type IPlatformContext } from "@gooddata/sdk-pluggable-application-model";
4
+ /**
5
+ * Platform context extended with a client-created backend instance.
6
+ *
7
+ * @remarks
8
+ * Client applications receive `IPlatformContext` from the shell (which
9
+ * contains auth credentials but no backend). They create their own backend
10
+ * using those credentials and produce an `IClientPlatformContext` which
11
+ * includes the backend instance.
12
+ *
13
+ * The backend's `internal_backendSpecificFunctions` field carries any
14
+ * backend-specific escape hatches (e.g., tiger-specific functions)
15
+ * automatically.
16
+ *
17
+ * @public
18
+ */
19
+ export interface IClientPlatformContext extends IPlatformContext {
20
+ /**
21
+ * Backend instance created by the client application from the
22
+ * auth credentials in the platform context.
23
+ */
24
+ backend: IAnalyticalBackend;
25
+ }
3
26
  /**
4
27
  * Props for {@link PlatformContextProvider}.
5
28
  *
@@ -7,9 +30,9 @@ import { type IPlatformContext } from "@gooddata/sdk-pluggable-application-model
7
30
  */
8
31
  export interface IPlatformContextProviderProps extends PropsWithChildren {
9
32
  /**
10
- * Platform context snapshot.
33
+ * Client platform context snapshot (includes the client-created backend).
11
34
  */
12
- value: IPlatformContext;
35
+ value: IClientPlatformContext;
13
36
  }
14
37
  /**
15
38
  * React provider that binds platform context into React context.
@@ -18,15 +41,15 @@ export interface IPlatformContextProviderProps extends PropsWithChildren {
18
41
  */
19
42
  export declare function PlatformContextProvider({ value, children }: IPlatformContextProviderProps): import("react/jsx-runtime").JSX.Element;
20
43
  /**
21
- * Returns platform context snapshot (or undefined if not available yet).
44
+ * Returns client platform context snapshot (or undefined if not available yet).
22
45
  *
23
46
  * @public
24
47
  */
25
- export declare function usePlatformContext(): IPlatformContext | undefined;
48
+ export declare function usePlatformContext(): IClientPlatformContext | undefined;
26
49
  /**
27
- * Returns platform context snapshot and throws if it's not available.
50
+ * Returns client platform context snapshot and throws if it's not available.
28
51
  *
29
52
  * @public
30
53
  */
31
- export declare function usePlatformContextStrict(context?: string): IPlatformContext;
54
+ export declare function usePlatformContextStrict(context?: string): IClientPlatformContext;
32
55
  //# sourceMappingURL=context.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,iBAAiB,EAA6B,MAAM,OAAO,CAAC;AAI1E,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAKlF;;;;GAIG;AACH,MAAM,WAAW,6BAA8B,SAAQ,iBAAiB;IACpE;;OAEG;IACH,KAAK,EAAE,gBAAgB,CAAC;CAC3B;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,6BAA6B,2CAEzF;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,IAAI,gBAAgB,GAAG,SAAS,CAEjE;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,SAA6B,GAAG,gBAAgB,CAO/F"}
1
+ {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,iBAAiB,EAA6B,MAAM,OAAO,CAAC;AAI1E,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAElF;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,sBAAuB,SAAQ,gBAAgB;IAC5D;;;OAGG;IACH,OAAO,EAAE,kBAAkB,CAAC;CAC/B;AAKD;;;;GAIG;AACH,MAAM,WAAW,6BAA8B,SAAQ,iBAAiB;IACpE;;OAEG;IACH,KAAK,EAAE,sBAAsB,CAAC;CACjC;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,6BAA6B,2CAEzF;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,IAAI,sBAAsB,GAAG,SAAS,CAEvE;AAED;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,SAA6B,GAAG,sBAAsB,CAOrG"}
package/esm/context.js CHANGED
@@ -13,7 +13,7 @@ export function PlatformContextProvider({ value, children }) {
13
13
  return _jsx(PlatformContext.Provider, { value: value, children: children });
14
14
  }
15
15
  /**
16
- * Returns platform context snapshot (or undefined if not available yet).
16
+ * Returns client platform context snapshot (or undefined if not available yet).
17
17
  *
18
18
  * @public
19
19
  */
@@ -21,7 +21,7 @@ export function usePlatformContext() {
21
21
  return useContext(PlatformContext);
22
22
  }
23
23
  /**
24
- * Returns platform context snapshot and throws if it's not available.
24
+ * Returns client platform context snapshot and throws if it's not available.
25
25
  *
26
26
  * @public
27
27
  */
@@ -1 +1 @@
1
- {"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.tsx"],"names":[],"mappings":";AAAA,gCAAgC;AAEhC,OAAO,EAA0B,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAE1E,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAIzC,MAAM,eAAe,GAAG,aAAa,CAA+B,SAAS,CAAC,CAAC;AAC/E,eAAe,CAAC,WAAW,GAAG,iBAAiB,CAAC;AAchD;;;;GAIG;AACH,MAAM,UAAU,uBAAuB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAiC,EAAE;IACxF,OAAO,KAAC,eAAe,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YAAG,QAAQ,GAA4B,CAAC;AAAA,CACxF;AAED;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,GAAiC;IAC/D,OAAO,UAAU,CAAC,eAAe,CAAC,CAAC;AAAA,CACtC;AAED;;;;GAIG;AACH,MAAM,UAAU,wBAAwB,CAAC,OAAO,GAAG,0BAA0B,EAAoB;IAC7F,MAAM,KAAK,GAAG,kBAAkB,EAAE,CAAC;IACnC,SAAS,CACL,KAAK,EACL,GAAG,OAAO,6HAA6H,CAC1I,CAAC;IACF,OAAO,KAAK,CAAC;AAAA,CAChB"}
1
+ {"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.tsx"],"names":[],"mappings":";AAAA,gCAAgC;AAEhC,OAAO,EAA0B,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAE1E,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AA4BzC,MAAM,eAAe,GAAG,aAAa,CAAqC,SAAS,CAAC,CAAC;AACrF,eAAe,CAAC,WAAW,GAAG,iBAAiB,CAAC;AAchD;;;;GAIG;AACH,MAAM,UAAU,uBAAuB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAiC,EAAE;IACxF,OAAO,KAAC,eAAe,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YAAG,QAAQ,GAA4B,CAAC;AAAA,CACxF;AAED;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,GAAuC;IACrE,OAAO,UAAU,CAAC,eAAe,CAAC,CAAC;AAAA,CACtC;AAED;;;;GAIG;AACH,MAAM,UAAU,wBAAwB,CAAC,OAAO,GAAG,0BAA0B,EAA0B;IACnG,MAAM,KAAK,GAAG,kBAAkB,EAAE,CAAC;IACnC,SAAS,CACL,KAAK,EACL,GAAG,OAAO,6HAA6H,CAC1I,CAAC;IACF,OAAO,KAAK,CAAC;AAAA,CAChB"}
package/esm/index.d.ts CHANGED
@@ -3,5 +3,5 @@
3
3
  *
4
4
  * @packageDocumentation
5
5
  */
6
- export { PlatformContextProvider, type IPlatformContextProviderProps, usePlatformContext, usePlatformContextStrict, } from "./context.js";
6
+ export { type IClientPlatformContext, PlatformContextProvider, type IPlatformContextProviderProps, usePlatformContext, usePlatformContextStrict, } from "./context.js";
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AAEH,OAAO,EACH,uBAAuB,EACvB,KAAK,6BAA6B,EAClC,kBAAkB,EAClB,wBAAwB,GAC3B,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AAEH,OAAO,EACH,KAAK,sBAAsB,EAC3B,uBAAuB,EACvB,KAAK,6BAA6B,EAClC,kBAAkB,EAClB,wBAAwB,GAC3B,MAAM,cAAc,CAAC"}
package/esm/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC,oDAAoD;AAEpD;;;;GAIG;AAEH,OAAO,EACH,uBAAuB,EAEvB,kBAAkB,EAClB,wBAAwB,GAC3B,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC,oDAAoD;AAEpD;;;;GAIG;AAEH,OAAO,EAEH,uBAAuB,EAEvB,kBAAkB,EAClB,wBAAwB,GAC3B,MAAM,cAAc,CAAC"}
@@ -4,10 +4,34 @@
4
4
  * @packageDocumentation
5
5
  */
6
6
 
7
+ import { IAnalyticalBackend } from '@gooddata/sdk-backend-spi';
7
8
  import { IPlatformContext } from '@gooddata/sdk-pluggable-application-model';
8
9
  import { JSX } from 'react/jsx-runtime';
9
10
  import { PropsWithChildren } from 'react';
10
11
 
12
+ /**
13
+ * Platform context extended with a client-created backend instance.
14
+ *
15
+ * @remarks
16
+ * Client applications receive `IPlatformContext` from the shell (which
17
+ * contains auth credentials but no backend). They create their own backend
18
+ * using those credentials and produce an `IClientPlatformContext` which
19
+ * includes the backend instance.
20
+ *
21
+ * The backend's `internal_backendSpecificFunctions` field carries any
22
+ * backend-specific escape hatches (e.g., tiger-specific functions)
23
+ * automatically.
24
+ *
25
+ * @public
26
+ */
27
+ export declare interface IClientPlatformContext extends IPlatformContext {
28
+ /**
29
+ * Backend instance created by the client application from the
30
+ * auth credentials in the platform context.
31
+ */
32
+ backend: IAnalyticalBackend;
33
+ }
34
+
11
35
  /**
12
36
  * Props for {@link PlatformContextProvider}.
13
37
  *
@@ -15,9 +39,9 @@ import { PropsWithChildren } from 'react';
15
39
  */
16
40
  export declare interface IPlatformContextProviderProps extends PropsWithChildren {
17
41
  /**
18
- * Platform context snapshot.
42
+ * Client platform context snapshot (includes the client-created backend).
19
43
  */
20
- value: IPlatformContext;
44
+ value: IClientPlatformContext;
21
45
  }
22
46
 
23
47
  /**
@@ -28,17 +52,17 @@ export declare interface IPlatformContextProviderProps extends PropsWithChildren
28
52
  export declare function PlatformContextProvider({ value, children }: IPlatformContextProviderProps): JSX.Element;
29
53
 
30
54
  /**
31
- * Returns platform context snapshot (or undefined if not available yet).
55
+ * Returns client platform context snapshot (or undefined if not available yet).
32
56
  *
33
57
  * @public
34
58
  */
35
- export declare function usePlatformContext(): IPlatformContext | undefined;
59
+ export declare function usePlatformContext(): IClientPlatformContext | undefined;
36
60
 
37
61
  /**
38
- * Returns platform context snapshot and throws if it's not available.
62
+ * Returns client platform context snapshot and throws if it's not available.
39
63
  *
40
64
  * @public
41
65
  */
42
- export declare function usePlatformContextStrict(context?: string): IPlatformContext;
66
+ export declare function usePlatformContextStrict(context?: string): IClientPlatformContext;
43
67
 
44
68
  export { }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gooddata/sdk-ui-pluggable-application",
3
- "version": "11.28.0-alpha.1",
3
+ "version": "11.28.0-alpha.11",
4
4
  "description": "GoodData SDK React helpers for pluggable applications",
5
5
  "license": "MIT",
6
6
  "author": "GoodData Corporation",
@@ -23,7 +23,8 @@
23
23
  "dependencies": {
24
24
  "ts-invariant": "0.10.3",
25
25
  "tslib": "2.8.1",
26
- "@gooddata/sdk-pluggable-application-model": "11.28.0-alpha.1"
26
+ "@gooddata/sdk-backend-spi": "11.28.0-alpha.11",
27
+ "@gooddata/sdk-pluggable-application-model": "11.28.0-alpha.11"
27
28
  },
28
29
  "devDependencies": {
29
30
  "@microsoft/api-documenter": "^7.17.0",
@@ -55,8 +56,8 @@
55
56
  "react-dom": "19.1.1",
56
57
  "typescript": "5.9.3",
57
58
  "vitest": "4.1.0",
58
- "@gooddata/eslint-config": "11.28.0-alpha.1",
59
- "@gooddata/oxlint-config": "11.28.0-alpha.1"
59
+ "@gooddata/eslint-config": "11.28.0-alpha.11",
60
+ "@gooddata/oxlint-config": "11.28.0-alpha.11"
60
61
  },
61
62
  "peerDependencies": {
62
63
  "react": "^18.0.0 || ^19.0.0",