@flozy/editor 3.3.5 → 3.3.7
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/Editor/CommonEditor.js +4 -0
- package/dist/Editor/Elements/Form/Form.js +14 -8
- package/dist/Editor/common/Shorthands/elements.js +1 -1
- package/dist/Editor/service/formSubmit.js +1 -1
- package/dist/Editor/utils/SlateUtilityFunctions.js +4 -0
- package/dist/Editor/utils/form.js +1 -0
- package/package.json +1 -1
|
@@ -69,6 +69,8 @@ const Leaf = ({
|
|
|
69
69
|
const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
|
|
70
70
|
const {
|
|
71
71
|
id,
|
|
72
|
+
site_id,
|
|
73
|
+
page_title,
|
|
72
74
|
content,
|
|
73
75
|
onSave,
|
|
74
76
|
editor: collaborativeEditor,
|
|
@@ -276,6 +278,8 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
276
278
|
...(otherProps || {}),
|
|
277
279
|
readOnly: isReadOnly,
|
|
278
280
|
page_id: id,
|
|
281
|
+
site_id: site_id,
|
|
282
|
+
page_title: page_title,
|
|
279
283
|
onDrawerOpen: onDrawerOpen
|
|
280
284
|
};
|
|
281
285
|
const renderElement = useCallback(props => {
|
|
@@ -32,6 +32,7 @@ const Form = props => {
|
|
|
32
32
|
buttonProps,
|
|
33
33
|
textColor,
|
|
34
34
|
formName,
|
|
35
|
+
uid,
|
|
35
36
|
borderWidth,
|
|
36
37
|
borderColor,
|
|
37
38
|
borderStyle,
|
|
@@ -80,7 +81,7 @@ const Form = props => {
|
|
|
80
81
|
if ((readOnly || test) && formEle && formEle?.current) {
|
|
81
82
|
const formData = new FormData(formEle?.current);
|
|
82
83
|
setLoading(true);
|
|
83
|
-
|
|
84
|
+
const response = [];
|
|
84
85
|
let user_email = "";
|
|
85
86
|
let meta_data = [];
|
|
86
87
|
const validations = [];
|
|
@@ -123,18 +124,23 @@ const Form = props => {
|
|
|
123
124
|
rules: rule?.length > 0 && rule
|
|
124
125
|
});
|
|
125
126
|
}
|
|
126
|
-
response = {
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
};
|
|
127
|
+
// response = {
|
|
128
|
+
// ...response,
|
|
129
|
+
// [pair[0]]: pair[1],
|
|
130
|
+
// };
|
|
131
|
+
const placeholder = fieldData?.name === pair[0] ? fieldData?.placeholder : "";
|
|
132
|
+
response?.push({
|
|
133
|
+
[pair[0]]: pair[1],
|
|
134
|
+
placeholder: placeholder,
|
|
135
|
+
form_name: formName
|
|
136
|
+
});
|
|
130
137
|
}
|
|
131
138
|
let params = {
|
|
132
139
|
page_id: page_id,
|
|
133
140
|
site_id: site_id,
|
|
134
141
|
form_id: `${formName}`,
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
},
|
|
142
|
+
uid: `${page_id}_${uid ? uid : formName}`,
|
|
143
|
+
response: response,
|
|
138
144
|
form_data: {
|
|
139
145
|
user_email: user_email,
|
|
140
146
|
email: element?.email,
|
|
@@ -115,7 +115,7 @@ const ELEMENTS_LIST = [{
|
|
|
115
115
|
icon: /*#__PURE__*/_jsx(Icon, {
|
|
116
116
|
icon: "embed"
|
|
117
117
|
}),
|
|
118
|
-
onInsert: editor => insertDefaultEmbed(editor, "
|
|
118
|
+
onInsert: editor => insertDefaultEmbed(editor, "embed", "")
|
|
119
119
|
}, {
|
|
120
120
|
name: "Calendly",
|
|
121
121
|
desc: "",
|