@flozy/editor 3.3.6 → 3.3.8
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 +1 -1
- package/dist/Editor/Elements/Form/Form.js +10 -9
- package/dist/Editor/common/Shorthands/elements.js +1 -1
- package/dist/Editor/common/StyleBuilder/formStyle.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/dist/Editor/utils/helper.js +1 -1
- package/package.json +2 -2
|
@@ -468,7 +468,7 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
468
468
|
toolbarOptions: toolbarOptions,
|
|
469
469
|
theme: theme
|
|
470
470
|
}) : null, /*#__PURE__*/_jsx(PopoverAIInput, {
|
|
471
|
-
otherProps: otherProps
|
|
471
|
+
otherProps: otherProps || {}
|
|
472
472
|
}), footer && (fullScreen || readOnly) && /*#__PURE__*/_jsx(Typography, {
|
|
473
473
|
sx: {
|
|
474
474
|
color: "rgb(100, 116, 139)",
|
|
@@ -26,13 +26,13 @@ const Form = props => {
|
|
|
26
26
|
readOnly,
|
|
27
27
|
site_id,
|
|
28
28
|
page_id,
|
|
29
|
-
|
|
30
|
-
onFormSubmit
|
|
29
|
+
onFormSubmit = () => {}
|
|
31
30
|
} = customProps;
|
|
32
31
|
const {
|
|
33
32
|
buttonProps,
|
|
34
33
|
textColor,
|
|
35
34
|
formName,
|
|
35
|
+
uid,
|
|
36
36
|
borderWidth,
|
|
37
37
|
borderColor,
|
|
38
38
|
borderStyle,
|
|
@@ -78,6 +78,8 @@ const Form = props => {
|
|
|
78
78
|
if (event) {
|
|
79
79
|
event.preventDefault();
|
|
80
80
|
}
|
|
81
|
+
let headerHtml = document?.getElementsByClassName('app-logo');
|
|
82
|
+
headerHtml = headerHtml[0]?.outerHTML;
|
|
81
83
|
if ((readOnly || test) && formEle && formEle?.current) {
|
|
82
84
|
const formData = new FormData(formEle?.current);
|
|
83
85
|
setLoading(true);
|
|
@@ -96,7 +98,8 @@ const Form = props => {
|
|
|
96
98
|
meta_data.push({
|
|
97
99
|
[isMetaKey?.element_metadatakey]: pair[1],
|
|
98
100
|
type: "board",
|
|
99
|
-
metadatamapping: element?.metadatamapping
|
|
101
|
+
metadatamapping: element?.metadatamapping,
|
|
102
|
+
headerHtml: headerHtml
|
|
100
103
|
});
|
|
101
104
|
}
|
|
102
105
|
const fieldData = getFieldProps("name", pair[0]);
|
|
@@ -124,22 +127,20 @@ const Form = props => {
|
|
|
124
127
|
rules: rule?.length > 0 && rule
|
|
125
128
|
});
|
|
126
129
|
}
|
|
127
|
-
// response = {
|
|
128
|
-
// ...response,
|
|
129
|
-
// [pair[0]]: pair[1],
|
|
130
|
-
// };
|
|
131
130
|
const placeholder = fieldData?.name === pair[0] ? fieldData?.placeholder : "";
|
|
132
131
|
response?.push({
|
|
132
|
+
fieldKey: pair[0],
|
|
133
133
|
[pair[0]]: pair[1],
|
|
134
134
|
placeholder: placeholder,
|
|
135
|
-
|
|
136
|
-
|
|
135
|
+
form_name: formName,
|
|
136
|
+
headerHtml: headerHtml
|
|
137
137
|
});
|
|
138
138
|
}
|
|
139
139
|
let params = {
|
|
140
140
|
page_id: page_id,
|
|
141
141
|
site_id: site_id,
|
|
142
142
|
form_id: `${formName}`,
|
|
143
|
+
uid: `${page_id}_${uid ? uid : formName}`,
|
|
143
144
|
response: response,
|
|
144
145
|
form_data: {
|
|
145
146
|
user_email: user_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: "",
|
|
@@ -133,7 +133,7 @@ const formStyle = [{
|
|
|
133
133
|
tab: "Add to Boards",
|
|
134
134
|
value: "metadatamapping",
|
|
135
135
|
fields: [{
|
|
136
|
-
label: "Add
|
|
136
|
+
label: "Add response to contacts board",
|
|
137
137
|
key: "metadatamapping",
|
|
138
138
|
type: "metadatamapping",
|
|
139
139
|
compType: "card",
|
|
@@ -246,7 +246,7 @@ export const handleLinkType = (url, linkType, readOnly, openInNewTab, onClick =
|
|
|
246
246
|
const [page, section] = url?.split("#") || [];
|
|
247
247
|
const sec = section ? `#${section}` : "";
|
|
248
248
|
const isHome = page === "home" || !page;
|
|
249
|
-
props.href = isHome ? `${sec}` :
|
|
249
|
+
props.href = isHome ? `${sec}` : `./${url}`;
|
|
250
250
|
if (openInNewTab) {
|
|
251
251
|
props.target = "_blank";
|
|
252
252
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flozy/editor",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.8",
|
|
4
4
|
"description": "An Editor for flozy app brain",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"storybook": "storybook dev -p 6006",
|
|
65
65
|
"build-storybook": "storybook build",
|
|
66
66
|
"publish:npm": "rm -rf dist && mkdir dist && babel src/components -d dist --copy-files",
|
|
67
|
-
"publish:local": "rm -rf /Users/
|
|
67
|
+
"publish:local": "rm -rf /Users/agenciflow08/Documents/flozy/client/node_modules/@flozy/editor/dist && babel src/components -d /Users/agenciflow08/Documents/flozy/client/node_modules/@flozy/editor/dist --copy-files"
|
|
68
68
|
},
|
|
69
69
|
"eslintConfig": {
|
|
70
70
|
"extends": [
|