@openmrs/esm-react-utils 5.0.3-pre.894 → 5.0.3-pre.898
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": "@openmrs/esm-react-utils",
|
|
3
|
-
"version": "5.0.3-pre.
|
|
3
|
+
"version": "5.0.3-pre.898",
|
|
4
4
|
"license": "MPL-2.0",
|
|
5
5
|
"description": "React utilities for OpenMRS.",
|
|
6
6
|
"browser": "dist/openmrs-esm-react-utils.js",
|
|
@@ -56,12 +56,12 @@
|
|
|
56
56
|
"react-i18next": "11.x"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@openmrs/esm-api": "^5.0.3-pre.
|
|
60
|
-
"@openmrs/esm-config": "^5.0.3-pre.
|
|
61
|
-
"@openmrs/esm-error-handling": "^5.0.3-pre.
|
|
62
|
-
"@openmrs/esm-extensions": "^5.0.3-pre.
|
|
63
|
-
"@openmrs/esm-feature-flags": "^5.0.3-pre.
|
|
64
|
-
"@openmrs/esm-globals": "^5.0.3-pre.
|
|
59
|
+
"@openmrs/esm-api": "^5.0.3-pre.898",
|
|
60
|
+
"@openmrs/esm-config": "^5.0.3-pre.898",
|
|
61
|
+
"@openmrs/esm-error-handling": "^5.0.3-pre.898",
|
|
62
|
+
"@openmrs/esm-extensions": "^5.0.3-pre.898",
|
|
63
|
+
"@openmrs/esm-feature-flags": "^5.0.3-pre.898",
|
|
64
|
+
"@openmrs/esm-globals": "^5.0.3-pre.898",
|
|
65
65
|
"dayjs": "^1.10.8",
|
|
66
66
|
"i18next": "^19.6.0",
|
|
67
67
|
"react": "^18.1.0",
|
|
@@ -70,5 +70,5 @@
|
|
|
70
70
|
"rxjs": "^6.5.3",
|
|
71
71
|
"webpack": "^5.88.0"
|
|
72
72
|
},
|
|
73
|
-
"gitHead": "
|
|
73
|
+
"gitHead": "e2d10cb63be0c37b1baa9d2b5871aec9c57453fd"
|
|
74
74
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useEffect, useRef } from "react";
|
|
1
|
+
import React, { Suspense, useEffect, useRef } from "react";
|
|
2
2
|
import { I18nextProvider } from "react-i18next";
|
|
3
3
|
import type {} from "@openmrs/esm-globals";
|
|
4
4
|
import {
|
|
@@ -89,18 +89,20 @@ export function openmrsComponentDecorator(userOpts: ComponentDecoratorOptions) {
|
|
|
89
89
|
);
|
|
90
90
|
} else {
|
|
91
91
|
const content = (
|
|
92
|
-
<
|
|
93
|
-
{
|
|
94
|
-
|
|
95
|
-
) : (
|
|
96
|
-
<I18nextProvider
|
|
97
|
-
i18n={window.i18next}
|
|
98
|
-
defaultNS={opts.moduleName}
|
|
99
|
-
>
|
|
92
|
+
<Suspense fallback={null}>
|
|
93
|
+
<ComponentContext.Provider value={this.state.config}>
|
|
94
|
+
{opts.disableTranslations ? (
|
|
100
95
|
<Comp {...this.props} />
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
96
|
+
) : (
|
|
97
|
+
<I18nextProvider
|
|
98
|
+
i18n={window.i18next}
|
|
99
|
+
defaultNS={opts.moduleName}
|
|
100
|
+
>
|
|
101
|
+
<Comp {...this.props} />
|
|
102
|
+
</I18nextProvider>
|
|
103
|
+
)}
|
|
104
|
+
</ComponentContext.Provider>
|
|
105
|
+
</Suspense>
|
|
104
106
|
);
|
|
105
107
|
|
|
106
108
|
if (opts.strictMode || !React.StrictMode) {
|