@arquimedes.co/eureka-forms 2.0.109 → 2.0.110
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/dist/App/App.css
CHANGED
|
@@ -9,7 +9,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
+
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import { createContext, useContext, useEffect, useMemo } from 'react';
|
|
14
14
|
import { IdFormContext } from '../../App/App';
|
|
15
15
|
import { DraftApi } from '../../Services/DraftService';
|
|
@@ -39,9 +39,15 @@ function SmartDraftRenderer(_a) {
|
|
|
39
39
|
if (mapped && !postview)
|
|
40
40
|
onChange === null || onChange === void 0 ? void 0 : onChange(mapped);
|
|
41
41
|
}, [mapped]);
|
|
42
|
-
var
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
var _c = useMemo(function () {
|
|
43
|
+
var content = convertFromRaw(cleanUpDraftParams(isFetching ? draft : mapped !== null && mapped !== void 0 ? mapped : draft));
|
|
44
|
+
return {
|
|
45
|
+
editorState: EditorState.createWithContent(content),
|
|
46
|
+
isEmpty: !content.hasText(),
|
|
47
|
+
};
|
|
48
|
+
}, [mapped, draft, isFetching]), editorState = _c.editorState, isEmpty = _c.isEmpty;
|
|
49
|
+
if (isEmpty)
|
|
50
|
+
return _jsx(_Fragment, {});
|
|
45
51
|
return (_jsx("div", __assign({ style: { margin: margin } }, { children: _jsx(DraftLoadingContext.Provider, __assign({ value: !postview && isFetching }, { children: _jsx(Editor, { readOnly: true, toolbarHidden: true, editorState: editorState, editorClassName: 'Erk-Forms-Draft', customDecorators: customDecorators }) })) })));
|
|
46
52
|
}
|
|
47
53
|
export default SmartDraftRenderer;
|
package/package.json
CHANGED