@bigbinary/neeto-form-frontend 1.2.41 → 1.2.42
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/index.cjs.js +9 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +9 -2
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
package/dist/index.js
CHANGED
|
@@ -27,6 +27,7 @@ import utc from 'dayjs/plugin/utc';
|
|
|
27
27
|
import weekday from 'dayjs/plugin/weekday';
|
|
28
28
|
import weekOfYear from 'dayjs/plugin/weekOfYear';
|
|
29
29
|
import path$1 from 'path';
|
|
30
|
+
import { renderToString } from 'react-dom/server';
|
|
30
31
|
|
|
31
32
|
function _extends$8() {
|
|
32
33
|
_extends$8 = Object.assign ? Object.assign.bind() : function (target) {
|
|
@@ -29937,6 +29938,12 @@ var getValue = function getValue(_ref2) {
|
|
|
29937
29938
|
}
|
|
29938
29939
|
return value;
|
|
29939
29940
|
};
|
|
29941
|
+
var getEditorContent = function getEditorContent(value) {
|
|
29942
|
+
if (typeof value !== "string") {
|
|
29943
|
+
return renderToString(value);
|
|
29944
|
+
}
|
|
29945
|
+
return value;
|
|
29946
|
+
};
|
|
29940
29947
|
var Submission = function Submission(_ref3) {
|
|
29941
29948
|
var _ref3$formId = _ref3.formId,
|
|
29942
29949
|
formId = _ref3$formId === void 0 ? "" : _ref3$formId,
|
|
@@ -29963,10 +29970,10 @@ var Submission = function Submission(_ref3) {
|
|
|
29963
29970
|
switch (kind) {
|
|
29964
29971
|
case QUESTION_KIND.RICH_TEXT.value:
|
|
29965
29972
|
return /*#__PURE__*/React__default.createElement(EditorContent, {
|
|
29966
|
-
content: getValue({
|
|
29973
|
+
content: getEditorContent(getValue({
|
|
29967
29974
|
value: value,
|
|
29968
29975
|
kind: kind
|
|
29969
|
-
})
|
|
29976
|
+
}))
|
|
29970
29977
|
});
|
|
29971
29978
|
case QUESTION_KIND.PHONE.value:
|
|
29972
29979
|
return isPresent$1(value) ? /*#__PURE__*/React__default.createElement(PhoneNumber$1, {
|