@digitaldefiance/express-suite-react-components 2.5.1 → 2.5.2
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/README.md
CHANGED
package/package.json
CHANGED
|
@@ -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;
|
|
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"}
|
|
@@ -5,6 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const UserSettingsForm_1 = require("../components/UserSettingsForm");
|
|
6
6
|
const contexts_1 = require("../contexts");
|
|
7
7
|
const hooks_1 = require("../hooks");
|
|
8
|
+
const suite_core_lib_1 = require("@digitaldefiance/suite-core-lib");
|
|
8
9
|
const UserSettingsFormWrapper = ({ onSuccess, componentProps = {}, }) => {
|
|
9
10
|
const { settings, isLoading, updateSettings } = (0, hooks_1.useUserSettings)();
|
|
10
11
|
const { languages } = (0, contexts_1.useSuiteConfig)();
|
|
@@ -16,7 +17,7 @@ const UserSettingsFormWrapper = ({ onSuccess, componentProps = {}, }) => {
|
|
|
16
17
|
return result;
|
|
17
18
|
};
|
|
18
19
|
if (isLoading || !settings) {
|
|
19
|
-
return (0, jsx_runtime_1.
|
|
20
|
+
return (0, jsx_runtime_1.jsxs)("div", { children: [(0, suite_core_lib_1.getSuiteCoreTranslation)(suite_core_lib_1.SuiteCoreStringKey.Common_Loading), "..."] });
|
|
20
21
|
}
|
|
21
22
|
return ((0, jsx_runtime_1.jsx)(UserSettingsForm_1.UserSettingsForm, { initialValues: settings, onSubmit: handleSubmit, languages: languages, ...componentProps }));
|
|
22
23
|
};
|