@digitaldefiance/express-suite-react-components 4.19.22 → 4.19.24

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@digitaldefiance/express-suite-react-components",
3
- "version": "4.19.22",
3
+ "version": "4.19.24",
4
4
  "homepage": "https://github.com/Digital-Defiance/react-components",
5
5
  "description": "React MUI components for Digital Defiance Express Suite",
6
6
  "repository": {
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@digitaldefiance/i18n-lib": "4.6.4",
35
- "@digitaldefiance/suite-core-lib": "4.19.16",
35
+ "@digitaldefiance/suite-core-lib": "4.19.17",
36
36
  "@emotion/react": "^11.14.0",
37
37
  "@emotion/styled": "^11.14.0",
38
38
  "@mui/icons-material": "^7.0.2",
@@ -38,7 +38,7 @@ const useUserSettings = ({ authenticatedApi, isAuthenticated, }) => {
38
38
  }
39
39
  if (setting.siteLanguage !== undefined &&
40
40
  setting.siteLanguage !== currentLanguage) {
41
- changeLanguage(setting.siteLanguage);
41
+ await changeLanguage(setting.siteLanguage);
42
42
  }
43
43
  // Send to server if authenticated and we have complete settings (including email)
44
44
  if (isAuthenticated && merged.email) {
@@ -1 +1 @@
1
- {"version":3,"file":"UserSettingsFormWrapper.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-express-suite-react-components/src/wrappers/UserSettingsFormWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3B,OAAO,EAA4C,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAKjH,MAAM,WAAW,4BAA4B;IAC3C,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,cAAc,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,eAAe,GAAG,UAAU,GAAG,WAAW,CAAC,CAAC,CAAC;CACnG;AAED,eAAO,MAAM,uBAAuB,EAAE,EAAE,CAAC,4BAA4B,CA2BpE,CAAC"}
1
+ {"version":3,"file":"UserSettingsFormWrapper.d.ts","sourceRoot":"","sources":["../../../../../packages/digitaldefiance-express-suite-react-components/src/wrappers/UserSettingsFormWrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAC3B,OAAO,EAA4C,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAKjH,MAAM,WAAW,4BAA4B;IAC3C,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,cAAc,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,qBAAqB,EAAE,eAAe,GAAG,UAAU,GAAG,WAAW,CAAC,CAAC,CAAC;CACnG;AAED,eAAO,MAAM,uBAAuB,EAAE,EAAE,CAAC,4BAA4B,CA6BpE,CAAC"}
@@ -7,7 +7,7 @@ const contexts_1 = require("../contexts");
7
7
  const hooks_1 = require("../hooks");
8
8
  const suite_core_lib_1 = require("@digitaldefiance/suite-core-lib");
9
9
  const UserSettingsFormWrapper = ({ onSuccess, componentProps = {}, }) => {
10
- const { settings, isLoading, updateSettings } = (0, hooks_1.useUserSettingsPublic)();
10
+ const { settings, updateSettings } = (0, hooks_1.useUserSettingsPublic)();
11
11
  const { languages } = (0, contexts_1.useSuiteConfig)();
12
12
  const handleSubmit = async (values) => {
13
13
  const result = await updateSettings(values);
@@ -16,7 +16,9 @@ const UserSettingsFormWrapper = ({ onSuccess, componentProps = {}, }) => {
16
16
  }
17
17
  return result;
18
18
  };
19
- if (isLoading || !settings) {
19
+ // Only show loading on initial load, not during updates
20
+ // Once we have settings, keep showing the form even during updates
21
+ if (!settings) {
20
22
  return (0, jsx_runtime_1.jsxs)("div", { children: [(0, suite_core_lib_1.getSuiteCoreTranslation)(suite_core_lib_1.SuiteCoreStringKey.Common_Loading), "..."] });
21
23
  }
22
24
  return ((0, jsx_runtime_1.jsx)(UserSettingsForm_1.UserSettingsForm, { initialValues: settings, onSubmit: handleSubmit, languages: languages, ...componentProps }));