@fluid-topics/ft-app-context 1.3.3 → 1.3.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.
@@ -1,5 +1,5 @@
1
1
  import { FtReduxStore, Optional } from "@fluid-topics/ft-wc-utils";
2
- import { FtDefaultLocales, FtMetadataConfiguration, FtPrivacyPolicyConfiguration, FtSession, FtUiLocale } from "@fluid-topics/public-api";
2
+ import { FtDefaultLocales, FtMetadataConfiguration, FtPrivacyPolicyConfiguration, FtSearchLocale, 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 {
@@ -7,6 +7,7 @@ export interface FtAppInfoState {
7
7
  apiIntegrationIdentifier: Optional<string>;
8
8
  uiLocale: string;
9
9
  availableUiLocales: Array<FtUiLocale>;
10
+ availableContentLocales: Array<FtSearchLocale>;
10
11
  defaultLocales: FtDefaultLocales | undefined;
11
12
  searchInAllLanguagesAllowed: boolean;
12
13
  metadataConfiguration: Optional<FtMetadataConfiguration>;
@@ -23,6 +23,7 @@ export const ftAppInfoStore = FtReduxStore.get({
23
23
  apiIntegrationIdentifier: undefined,
24
24
  uiLocale: document.documentElement.lang || "en-US",
25
25
  availableUiLocales: [],
26
+ availableContentLocales: [],
26
27
  defaultLocales: undefined,
27
28
  searchInAllLanguagesAllowed: false,
28
29
  metadataConfiguration: undefined,
@@ -74,15 +74,15 @@ export class FtI18nServiceInternalClass extends FtServiceWithCache {
74
74
  let context;
75
75
  try {
76
76
  context = await this.cache.get(name, () => this.messageContextProvider(this.currentUiLocale, name));
77
+ if (isNewContext) {
78
+ await this.notify(name);
79
+ }
77
80
  }
78
81
  catch (e) {
79
82
  if (!(e instanceof CanceledPromiseError) && isNewContext) {
80
83
  console.error(e);
81
84
  }
82
85
  }
83
- if (isNewContext) {
84
- await this.notify(name);
85
- }
86
86
  return context;
87
87
  }
88
88
  subscribe(contextName, callback) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-topics/ft-app-context",
3
- "version": "1.3.3",
3
+ "version": "1.3.5",
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.3",
22
+ "@fluid-topics/ft-wc-utils": "1.3.5",
23
23
  "lit": "3.1.0"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@fluid-topics/public-api": "1.0.99"
27
27
  },
28
- "gitHead": "1b75383f913a10dc67e677d1b44eea930ed5e41f"
28
+ "gitHead": "87377b99617257593de238b08c41d2638617f501"
29
29
  }