@openmrs/esm-form-engine-lib 4.2.2-pre.2543 → 4.2.2-pre.2546
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,4 +1,4 @@
|
|
|
1
|
-
import React, { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
1
|
+
import React, { Suspense, useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
2
2
|
import classNames from "classnames";
|
|
3
3
|
import { Button, ButtonSet, InlineLoading } from "@carbon/react";
|
|
4
4
|
import { I18nextProvider, useTranslation } from "react-i18next";
|
|
@@ -173,9 +173,11 @@ const FormEngine = ({ formJson, patientUUID, formUUID, encounterUUID, visit, for
|
|
|
173
173
|
}) : /*#__PURE__*/ React.createElement("span", null, `${t('save', 'Save')}`))))))));
|
|
174
174
|
};
|
|
175
175
|
function I18FormEngine(props) {
|
|
176
|
-
return /*#__PURE__*/ React.createElement(
|
|
176
|
+
return /*#__PURE__*/ React.createElement(Suspense, {
|
|
177
|
+
fallback: /*#__PURE__*/ React.createElement(Loader, null)
|
|
178
|
+
}, /*#__PURE__*/ React.createElement(I18nextProvider, {
|
|
177
179
|
i18n: window.i18next,
|
|
178
180
|
defaultNS: formEngineAppName
|
|
179
|
-
}, /*#__PURE__*/ React.createElement(FormEngine, props));
|
|
181
|
+
}, /*#__PURE__*/ React.createElement(FormEngine, props)));
|
|
180
182
|
}
|
|
181
183
|
export default I18FormEngine;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form-engine.component.d.ts","sourceRoot":"","sources":["../../src/form-engine.component.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"form-engine.component.d.ts","sourceRoot":"","sources":["../../src/form-engine.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsE,MAAM,OAAO,CAAC;AAI3F,OAAO,EAAc,KAAK,KAAK,EAAE,MAAM,wBAAwB,CAAC;AAWhE,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAQtF,UAAU,eAAe;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,UAAU,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;IAC/B,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,6BAA6B,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,SAAS,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACjF,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;CACzC;AAkLD,iBAAS,aAAa,CAAC,KAAK,EAAE,eAAe,qBAQ5C;AAED,eAAe,aAAa,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
1
|
+
import React, { Suspense, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
2
2
|
import classNames from 'classnames';
|
|
3
3
|
import { Button, ButtonSet, InlineLoading } from '@carbon/react';
|
|
4
4
|
import { I18nextProvider, useTranslation } from 'react-i18next';
|
|
@@ -217,9 +217,11 @@ const FormEngine = ({
|
|
|
217
217
|
|
|
218
218
|
function I18FormEngine(props: FormEngineProps) {
|
|
219
219
|
return (
|
|
220
|
-
<
|
|
221
|
-
<
|
|
222
|
-
|
|
220
|
+
<Suspense fallback={<Loader />}>
|
|
221
|
+
<I18nextProvider i18n={window.i18next} defaultNS={formEngineAppName}>
|
|
222
|
+
<FormEngine {...props} />
|
|
223
|
+
</I18nextProvider>
|
|
224
|
+
</Suspense>
|
|
223
225
|
);
|
|
224
226
|
}
|
|
225
227
|
|