@flozy/editor 4.0.5 → 4.0.6
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Editor/Elements/AI/PopoverAIInput.js +4 -8
- package/dist/Editor/Elements/Button/EditorButton.js +3 -2
- package/dist/Editor/Elements/Form/Workflow/FormWorkflow.js +12 -3
- package/dist/Editor/Elements/FreeGrid/Options/sectionItemOptions.js +1 -1
- package/dist/Editor/common/LinkSettings/NavComponents.js +5 -2
- package/dist/Editor/common/LinkSettings/index.js +2 -1
- package/dist/Editor/common/LinkSettings/navOptions.js +7 -2
- package/dist/Editor/common/StyleBuilder/fieldTypes/buttonLink.js +1 -1
- package/dist/Editor/utils/helper.js +2 -1
- package/package.json +1 -1
@@ -21,15 +21,11 @@ const scrollToAIInput = editor => {
|
|
21
21
|
} else {
|
22
22
|
selectionRect = ReactEditor.toDOMRange(editor, getNextLine(editor).at).getBoundingClientRect();
|
23
23
|
}
|
24
|
-
const
|
25
|
-
|
26
|
-
|
27
|
-
if (selectionScrollBottom > 80) {
|
24
|
+
const wrapperTop = slateWrapper.getBoundingClientRect().top;
|
25
|
+
const cursorViewPortPosition = selectionRect.top - wrapperTop;
|
26
|
+
if (cursorViewPortPosition > 80) {
|
28
27
|
// scroll to top of the slateWrapper
|
29
|
-
slateWrapper.
|
30
|
-
top: slateWrapper.scrollTop + selectionScrollBottom - 80,
|
31
|
-
behavior: "smooth"
|
32
|
-
});
|
28
|
+
slateWrapper.scrollBy(0, selectionRect.bottom - wrapperTop - 80);
|
33
29
|
}
|
34
30
|
}, 200);
|
35
31
|
} catch (err) {
|
@@ -62,13 +62,14 @@ const EditorButton = props => {
|
|
62
62
|
} = actionTrigger || {
|
63
63
|
options: []
|
64
64
|
};
|
65
|
-
const isTrigger = linkType === "
|
65
|
+
const isTrigger = linkType === "nextTrigger" || linkType === "prevTrigger";
|
66
66
|
const refURl = isTrigger ? buttonLink?.url : url;
|
67
67
|
const BtnIcon = buttonIcon ? buttonIcon : null;
|
68
68
|
windowVar.lastButtonProps = element;
|
69
69
|
const handleTrigger = async () => {
|
70
70
|
if (metadata?.buttonLink?.handler) {
|
71
|
-
|
71
|
+
const response = isTrigger ? linkType : "click";
|
72
|
+
metadata.buttonLink.handler(response);
|
72
73
|
} else if (redirectOnURLResult) {
|
73
74
|
// call api and redirect based on api result
|
74
75
|
const apiResult = await actionButtonRedirect({}, {
|
@@ -71,11 +71,11 @@ const FormWorkflow = props => {
|
|
71
71
|
children: [/*#__PURE__*/_jsx(Grid, {
|
72
72
|
item: true,
|
73
73
|
sx: classes.radioBtn,
|
74
|
-
children: /*#__PURE__*/
|
74
|
+
children: /*#__PURE__*/_jsxs(RadioGroup, {
|
75
75
|
name: "set timing",
|
76
76
|
value: schedule,
|
77
77
|
defaultValue: 1,
|
78
|
-
children: /*#__PURE__*/_jsx(FormControlLabel, {
|
78
|
+
children: [/*#__PURE__*/_jsx(FormControlLabel, {
|
79
79
|
value: "immediately",
|
80
80
|
label: "Immediately",
|
81
81
|
onChange: () => {
|
@@ -84,7 +84,16 @@ const FormWorkflow = props => {
|
|
84
84
|
control: /*#__PURE__*/_jsx(Radio, {
|
85
85
|
size: "small"
|
86
86
|
})
|
87
|
-
})
|
87
|
+
}), /*#__PURE__*/_jsx(FormControlLabel, {
|
88
|
+
value: "after",
|
89
|
+
label: "After",
|
90
|
+
onChange: () => {
|
91
|
+
setSchedule("after");
|
92
|
+
},
|
93
|
+
control: /*#__PURE__*/_jsx(Radio, {
|
94
|
+
size: "small"
|
95
|
+
})
|
96
|
+
})]
|
88
97
|
})
|
89
98
|
}), schedule === "after" && /*#__PURE__*/_jsx(Grid, {
|
90
99
|
item: true,
|
@@ -5,7 +5,7 @@ const imageOptions = ["settings", "link", "saveAsTemplate", "close"];
|
|
5
5
|
const boxOptions = ["settings", "link", "saveAsTemplate", "close"];
|
6
6
|
const appHeaderOptions = ["settings", "saveAsTemplate", "close"];
|
7
7
|
const sectionOptions = ["addElement", "settings", "moveUp", "moveDown", "saveAsTemplate", "more"];
|
8
|
-
const formOptions = ["drag", "edit", "settings", "addFormField", "workFlow", "close"];
|
8
|
+
const formOptions = ["drag", "edit", "settings", "addFormField", "workFlow", "saveAsTemplate", "close"];
|
9
9
|
const itemOptions = {
|
10
10
|
default: commonOptions,
|
11
11
|
text: textOptions,
|
@@ -134,10 +134,13 @@ export const SelectPage = props => {
|
|
134
134
|
});
|
135
135
|
};
|
136
136
|
export const Trigger = props => {
|
137
|
-
|
137
|
+
const {
|
138
|
+
nav
|
139
|
+
} = props;
|
140
|
+
return /*#__PURE__*/_jsxs(Typography, {
|
138
141
|
variant: "subtitle1",
|
139
142
|
gutterBottom: true,
|
140
|
-
children: "Choosing this will trigger the
|
143
|
+
children: ["Choosing this will trigger the ", nav.type, " step"]
|
141
144
|
});
|
142
145
|
};
|
143
146
|
const scrollToOptions = [{
|
@@ -3,8 +3,13 @@ export const getNavOptions = (hideTools = []) => {
|
|
3
3
|
label: "None",
|
4
4
|
value: ""
|
5
5
|
}, {
|
6
|
-
label: "Trigger",
|
7
|
-
value: "
|
6
|
+
label: "Next Trigger",
|
7
|
+
value: "nextTrigger",
|
8
|
+
type: "next"
|
9
|
+
}, {
|
10
|
+
label: "Previous Trigger",
|
11
|
+
value: "prevTrigger",
|
12
|
+
type: "previous"
|
8
13
|
}, {
|
9
14
|
label: "Web Address",
|
10
15
|
value: "webAddress",
|
@@ -247,7 +247,8 @@ export const handleLinkType = (url, linkType, readOnly, openInNewTab, onClick =
|
|
247
247
|
props.target = "_blank";
|
248
248
|
}
|
249
249
|
break;
|
250
|
-
case "
|
250
|
+
case "nextTrigger":
|
251
|
+
case "prevTrigger":
|
251
252
|
if (!readOnly) {
|
252
253
|
props.component = "button";
|
253
254
|
props.onClick = () => {};
|