@gooddata/sdk-ui-pluggable-application 11.41.0-alpha.3 → 11.41.0-alpha.5
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/AppProviders.d.ts +1 -0
- package/esm/AppProviders.d.ts.map +1 -0
- package/esm/backend.d.ts +1 -0
- package/esm/backend.d.ts.map +1 -0
- package/esm/context.d.ts +1 -0
- package/esm/context.d.ts.map +1 -0
- package/esm/events.d.ts +15 -1
- package/esm/events.d.ts.map +1 -0
- package/esm/events.js +6 -2
- package/esm/index.d.ts +1 -0
- package/esm/index.d.ts.map +1 -0
- package/esm/sdk-ui-pluggable-application.d.ts +14 -1
- package/package.json +9 -9
package/esm/AppProviders.d.ts
CHANGED
|
@@ -59,3 +59,4 @@ export interface IAppProvidersProps {
|
|
|
59
59
|
* @alpha
|
|
60
60
|
*/
|
|
61
61
|
export declare function AppProviders({ ctx, packageName, resolveMessages: resolveMessagesFn, defaultMessages, defaultLanguage, children }: PropsWithChildren<IAppProvidersProps>): import("react/jsx-runtime").JSX.Element;
|
|
62
|
+
//# sourceMappingURL=AppProviders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppProviders.d.ts","sourceRoot":"","sources":["../src/AppProviders.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,iBAAiB,EAAW,MAAM,OAAO,CAAC;AAIxD,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAClF,OAAO,EAEH,KAAK,aAAa,EAIrB,MAAM,kBAAkB,CAAC;AAK1B;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IAC/B;;OAEG;IACH,GAAG,EAAE,gBAAgB,CAAC;IAEtB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,eAAe,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,OAAO,CAAC,aAAa,CAAC,CAAC;IAE5D;;;OAGG;IACH,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;IAE/C;;;;OAIG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,YAAY,CAAC,EACzB,GAAG,EACH,WAAW,EACX,eAAe,EAAE,iBAAiB,EAClC,eAAe,EACf,eAAyB,EACzB,QAAQ,EACX,EAAE,iBAAiB,CAAC,kBAAkB,CAAC,2CAqBvC"}
|
package/esm/backend.d.ts
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../src/backend.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAMpE,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAElF;;;;GAIG;AACH,MAAM,WAAW,8BAA8B;IAC3C;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,sBAAsB,CAClC,IAAI,EAAE,gBAAgB,EACtB,OAAO,EAAE,8BAA8B,GACxC,kBAAkB,CAuBpB"}
|
package/esm/context.d.ts
CHANGED
|
@@ -0,0 +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,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/events.d.ts
CHANGED
|
@@ -14,6 +14,15 @@ export interface IPluggableAppEventsContextValue {
|
|
|
14
14
|
* Emits a standard platform-context reload request to host.
|
|
15
15
|
*/
|
|
16
16
|
emitPlatformContextReload: () => void;
|
|
17
|
+
/**
|
|
18
|
+
* Sets the page-title segment of the browser tab title on the host.
|
|
19
|
+
*
|
|
20
|
+
* @remarks
|
|
21
|
+
* The host owns `document.title` and composes it as `"{pageTitle} - {brand}"`. Pass
|
|
22
|
+
* `undefined` to fall back to the application's manifest title. No-ops when the application
|
|
23
|
+
* runs standalone (outside the host).
|
|
24
|
+
*/
|
|
25
|
+
setDocumentTitle: (pageTitle: string | undefined) => void;
|
|
17
26
|
}
|
|
18
27
|
/**
|
|
19
28
|
* Props for {@link PluggableAppEventsProvider}.
|
|
@@ -25,16 +34,21 @@ export interface IPluggableAppEventsProviderProps extends PropsWithChildren {
|
|
|
25
34
|
* Host callback passed through pluggable mount options.
|
|
26
35
|
*/
|
|
27
36
|
onEvent?: (event: IPluggableAppEvent) => void;
|
|
37
|
+
/**
|
|
38
|
+
* Host callback (from pluggable mount options) to set the page-title segment of the tab title.
|
|
39
|
+
*/
|
|
40
|
+
onDocumentTitleChange?: (pageTitle: string | undefined) => void;
|
|
28
41
|
}
|
|
29
42
|
/**
|
|
30
43
|
* React provider exposing pluggable-to-host event helpers.
|
|
31
44
|
*
|
|
32
45
|
* @alpha
|
|
33
46
|
*/
|
|
34
|
-
export declare function PluggableAppEventsProvider({ onEvent, children }: IPluggableAppEventsProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
47
|
+
export declare function PluggableAppEventsProvider({ onEvent, onDocumentTitleChange, children }: IPluggableAppEventsProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
35
48
|
/**
|
|
36
49
|
* Returns event helpers for communication with host.
|
|
37
50
|
*
|
|
38
51
|
* @alpha
|
|
39
52
|
*/
|
|
40
53
|
export declare function usePluggableAppEvents(): IPluggableAppEventsContextValue;
|
|
54
|
+
//# sourceMappingURL=events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,iBAAiB,EAAmD,MAAM,OAAO,CAAC;AAEhG,OAAO,EACH,KAAK,kBAAkB,EAE1B,MAAM,2CAA2C,CAAC;AAEnD;;;;GAIG;AACH,MAAM,WAAW,+BAA+B;IAC5C;;OAEG;IACH,IAAI,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAC1C;;OAEG;IACH,yBAAyB,EAAE,MAAM,IAAI,CAAC;IACtC;;;;;;;OAOG;IACH,gBAAgB,EAAE,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;CAC7D;AAED;;;;GAIG;AACH,MAAM,WAAW,gCAAiC,SAAQ,iBAAiB;IACvE;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAC9C;;OAEG;IACH,qBAAqB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;CACnE;AAWD;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,EACvC,OAAO,EACP,qBAAqB,EACrB,QAAQ,EACX,EAAE,gCAAgC,2CA6BlC;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,IAAI,+BAA+B,CAEvE"}
|
package/esm/events.js
CHANGED
|
@@ -6,6 +6,7 @@ const noop = () => undefined;
|
|
|
6
6
|
const PluggableAppEventsContext = createContext({
|
|
7
7
|
emit: noop,
|
|
8
8
|
emitPlatformContextReload: noop,
|
|
9
|
+
setDocumentTitle: noop,
|
|
9
10
|
});
|
|
10
11
|
PluggableAppEventsContext.displayName = "PluggableAppEventsContext";
|
|
11
12
|
/**
|
|
@@ -13,14 +14,17 @@ PluggableAppEventsContext.displayName = "PluggableAppEventsContext";
|
|
|
13
14
|
*
|
|
14
15
|
* @alpha
|
|
15
16
|
*/
|
|
16
|
-
export function PluggableAppEventsProvider({ onEvent, children }) {
|
|
17
|
+
export function PluggableAppEventsProvider({ onEvent, onDocumentTitleChange, children, }) {
|
|
17
18
|
const emit = useCallback((event) => {
|
|
18
19
|
onEvent?.(event);
|
|
19
20
|
}, [onEvent]);
|
|
20
21
|
const emitPlatformContextReload = useCallback(() => {
|
|
21
22
|
emit(reloadPlatformContextRequested());
|
|
22
23
|
}, [emit]);
|
|
23
|
-
|
|
24
|
+
const setDocumentTitle = useCallback((pageTitle) => {
|
|
25
|
+
onDocumentTitleChange?.(pageTitle);
|
|
26
|
+
}, [onDocumentTitleChange]);
|
|
27
|
+
return (_jsx(PluggableAppEventsContext.Provider, { value: useMemo(() => ({ emit, emitPlatformContextReload, setDocumentTitle }), [emit, emitPlatformContextReload, setDocumentTitle]), children: children }));
|
|
24
28
|
}
|
|
25
29
|
/**
|
|
26
30
|
* Returns event helpers for communication with host.
|
package/esm/index.d.ts
CHANGED
|
@@ -7,3 +7,4 @@ export { type IClientPlatformContext, PlatformContextProvider, type IPlatformCon
|
|
|
7
7
|
export { createBackendForModule, type ICreateBackendForModuleOptions } from "./backend.js";
|
|
8
8
|
export { AppProviders, type IAppProvidersProps } from "./AppProviders.js";
|
|
9
9
|
export { type IPluggableAppEventsContextValue, type IPluggableAppEventsProviderProps, PluggableAppEventsProvider, usePluggableAppEvents, } from "./events.js";
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
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;AAEtB,OAAO,EAAE,sBAAsB,EAAE,KAAK,8BAA8B,EAAE,MAAM,cAAc,CAAC;AAE3F,OAAO,EAAE,YAAY,EAAE,KAAK,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EACH,KAAK,+BAA+B,EACpC,KAAK,gCAAgC,EACrC,0BAA0B,EAC1B,qBAAqB,GACxB,MAAM,aAAa,CAAC"}
|
|
@@ -163,6 +163,15 @@ export declare interface IPluggableAppEventsContextValue {
|
|
|
163
163
|
* Emits a standard platform-context reload request to host.
|
|
164
164
|
*/
|
|
165
165
|
emitPlatformContextReload: () => void;
|
|
166
|
+
/**
|
|
167
|
+
* Sets the page-title segment of the browser tab title on the host.
|
|
168
|
+
*
|
|
169
|
+
* @remarks
|
|
170
|
+
* The host owns `document.title` and composes it as `"{pageTitle} - {brand}"`. Pass
|
|
171
|
+
* `undefined` to fall back to the application's manifest title. No-ops when the application
|
|
172
|
+
* runs standalone (outside the host).
|
|
173
|
+
*/
|
|
174
|
+
setDocumentTitle: (pageTitle: string | undefined) => void;
|
|
166
175
|
}
|
|
167
176
|
|
|
168
177
|
/**
|
|
@@ -175,6 +184,10 @@ export declare interface IPluggableAppEventsProviderProps extends PropsWithChild
|
|
|
175
184
|
* Host callback passed through pluggable mount options.
|
|
176
185
|
*/
|
|
177
186
|
onEvent?: (event: IPluggableAppEvent) => void;
|
|
187
|
+
/**
|
|
188
|
+
* Host callback (from pluggable mount options) to set the page-title segment of the tab title.
|
|
189
|
+
*/
|
|
190
|
+
onDocumentTitleChange?: (pageTitle: string | undefined) => void;
|
|
178
191
|
}
|
|
179
192
|
|
|
180
193
|
/**
|
|
@@ -189,7 +202,7 @@ export declare function PlatformContextProvider({ value, children }: IPlatformCo
|
|
|
189
202
|
*
|
|
190
203
|
* @alpha
|
|
191
204
|
*/
|
|
192
|
-
export declare function PluggableAppEventsProvider({ onEvent, children }: IPluggableAppEventsProviderProps): JSX.Element;
|
|
205
|
+
export declare function PluggableAppEventsProvider({ onEvent, onDocumentTitleChange, children }: IPluggableAppEventsProviderProps): JSX.Element;
|
|
193
206
|
|
|
194
207
|
/**
|
|
195
208
|
* Returns client platform context snapshot (or undefined if not available yet).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-ui-pluggable-application",
|
|
3
|
-
"version": "11.41.0-alpha.
|
|
3
|
+
"version": "11.41.0-alpha.5",
|
|
4
4
|
"description": "GoodData SDK React helpers for pluggable applications",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "GoodData Corporation",
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
"react-intl": "7.1.11",
|
|
25
25
|
"ts-invariant": "0.10.3",
|
|
26
26
|
"tslib": "2.8.1",
|
|
27
|
-
"@gooddata/sdk-backend-base": "11.41.0-alpha.
|
|
28
|
-
"@gooddata/sdk-backend-
|
|
29
|
-
"@gooddata/sdk-
|
|
30
|
-
"@gooddata/sdk-model": "11.41.0-alpha.
|
|
31
|
-
"@gooddata/sdk-
|
|
32
|
-
"@gooddata/sdk-ui": "11.41.0-alpha.
|
|
27
|
+
"@gooddata/sdk-backend-base": "11.41.0-alpha.5",
|
|
28
|
+
"@gooddata/sdk-backend-tiger": "11.41.0-alpha.5",
|
|
29
|
+
"@gooddata/sdk-model": "11.41.0-alpha.5",
|
|
30
|
+
"@gooddata/sdk-pluggable-application-model": "11.41.0-alpha.5",
|
|
31
|
+
"@gooddata/sdk-backend-spi": "11.41.0-alpha.5",
|
|
32
|
+
"@gooddata/sdk-ui": "11.41.0-alpha.5"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@microsoft/api-documenter": "^7.17.0",
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
"react-dom": "19.1.1",
|
|
62
62
|
"typescript": "5.9.3",
|
|
63
63
|
"vitest": "4.1.8",
|
|
64
|
-
"@gooddata/eslint-config": "11.41.0-alpha.
|
|
65
|
-
"@gooddata/oxlint-config": "11.41.0-alpha.
|
|
64
|
+
"@gooddata/eslint-config": "11.41.0-alpha.5",
|
|
65
|
+
"@gooddata/oxlint-config": "11.41.0-alpha.5"
|
|
66
66
|
},
|
|
67
67
|
"peerDependencies": {
|
|
68
68
|
"react": "^18.0.0 || ^19.0.0",
|