@fluid-topics/ft-app-context 1.3.0 → 1.3.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/build/ft-app-context.light.js +4 -4
- package/build/ft-app-context.min.js +13 -13
- package/build/redux-stores/FtAppInfoStore.d.ts +2 -1
- package/build/redux-stores/FtAppInfoStore.js +6 -4
- package/build/redux-stores/FtUserAssetsStore.js +2 -2
- package/build/services/FtI18nService.d.ts +1 -1
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FtReduxStore, Optional } from "@fluid-topics/ft-wc-utils";
|
|
2
|
-
import { FtDefaultLocales, FtMetadataConfiguration, FtSession, FtUiLocale
|
|
2
|
+
import { FtDefaultLocales, FtMetadataConfiguration, FtPrivacyPolicyConfiguration, FtSession, FtUiLocale } from "@fluid-topics/public-api";
|
|
3
3
|
import { PayloadAction } from "@reduxjs/toolkit";
|
|
4
4
|
export declare const FtAppInfoStoreName = "ft-app-info";
|
|
5
5
|
export interface FtAppInfoState {
|
|
@@ -20,6 +20,7 @@ export interface FtAppInfoState {
|
|
|
20
20
|
forcedOffline: boolean;
|
|
21
21
|
}
|
|
22
22
|
export declare class AuthenticationChangeEvent extends CustomEvent<Optional<FtSession>> {
|
|
23
|
+
static eventName: string;
|
|
23
24
|
constructor(session: Optional<FtSession>);
|
|
24
25
|
}
|
|
25
26
|
declare const reducers: {
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import { deepEqual, FtReduxStore } from "@fluid-topics/ft-wc-utils";
|
|
2
2
|
export const FtAppInfoStoreName = "ft-app-info";
|
|
3
|
-
|
|
3
|
+
class AuthenticationChangeEvent extends CustomEvent {
|
|
4
4
|
constructor(session) {
|
|
5
|
-
super(
|
|
5
|
+
super(AuthenticationChangeEvent.eventName, { detail: session });
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
|
+
AuthenticationChangeEvent.eventName = "authentication-change";
|
|
9
|
+
export { AuthenticationChangeEvent };
|
|
8
10
|
const reducers = {
|
|
9
11
|
session: (state, action) => {
|
|
10
12
|
if (!deepEqual(state.session, action.payload)) {
|
|
11
13
|
state.session = action.payload;
|
|
12
14
|
setTimeout(() => ftAppInfoStore.dispatchEvent(new AuthenticationChangeEvent(action.payload)), 0);
|
|
13
15
|
}
|
|
14
|
-
}
|
|
16
|
+
},
|
|
15
17
|
};
|
|
16
18
|
export const ftAppInfoStore = FtReduxStore.get({
|
|
17
19
|
name: FtAppInfoStoreName,
|
|
@@ -32,5 +34,5 @@ export const ftAppInfoStore = FtReduxStore.get({
|
|
|
32
34
|
openExternalDocumentInNewTab: false,
|
|
33
35
|
navigatorOnline: true,
|
|
34
36
|
forcedOffline: false,
|
|
35
|
-
}
|
|
37
|
+
},
|
|
36
38
|
});
|
|
@@ -24,7 +24,7 @@ export declare class FtI18nServiceInternalClass extends FtServiceWithCache {
|
|
|
24
24
|
getAllContexts(): Array<FtMessageContext>;
|
|
25
25
|
prepareContext(name: string, defaultMessages?: Record<string, string>): Promise<FtMessageContext | undefined>;
|
|
26
26
|
private resolveContext;
|
|
27
|
-
resolveRawMessage(contextName: string, messageKey: string):
|
|
27
|
+
resolveRawMessage(contextName: string, messageKey: string): string;
|
|
28
28
|
resolveMessage(contextName: string, message: string, ...args: any[]): string;
|
|
29
29
|
private fetchContext;
|
|
30
30
|
subscribe(contextName: string, callback: Function): Unsubscribe;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-app-context",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "Global application context for Fluid Topics integrations",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Lit"
|
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
"url": "ssh://git@scm.mrs.antidot.net:2222/fluidtopics/ft-web-components.git"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@fluid-topics/ft-wc-utils": "1.3.
|
|
22
|
+
"@fluid-topics/ft-wc-utils": "1.3.1",
|
|
23
23
|
"lit": "3.1.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@fluid-topics/public-api": "1.0.
|
|
26
|
+
"@fluid-topics/public-api": "1.0.99"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "ba07775e09d57ec38038f07f9c03b52aea08376b"
|
|
29
29
|
}
|