@flozy/editor 1.6.6 → 1.6.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 +1 -0
- package/dist/Editor/Editor.css +3 -7
- package/dist/Editor/Elements/AppHeader/AppHeader.js +10 -3
- package/dist/Editor/Elements/AppHeader/AppHeaderButton.js +12 -9
- package/dist/Editor/Elements/Carousel/Carousel.js +1 -1
- package/dist/Editor/Elements/Color Picker/Styles.js +2 -2
- package/dist/Editor/Elements/Form/Form.js +23 -1
- package/dist/Editor/Elements/Form/Workflow/FormWorkflow.js +178 -0
- package/dist/Editor/Elements/Form/Workflow/ListWorkflow.js +139 -0
- package/dist/Editor/Elements/Form/Workflow/MoreOptions.js +64 -0
- package/dist/Editor/Elements/Form/Workflow/Styles.js +207 -0
- package/dist/Editor/Elements/Form/Workflow/UserInputs.js +207 -0
- package/dist/Editor/Elements/Form/Workflow/constant.js +3 -0
- package/dist/Editor/Elements/Form/Workflow/index.js +179 -0
- package/dist/Editor/Elements/Grid/GridItem.js +8 -6
- package/dist/Editor/Elements/InlineIcon/InlineIcon.js +1 -2
- package/dist/Editor/Elements/SimpleText.js +1 -3
- package/dist/Editor/Elements/TopBanner/TopBanner.js +2 -2
- package/dist/Editor/Elements/TopBanner/TopBannerButton.js +0 -1
- package/dist/Editor/Styles/EditorStyles.js +2 -2
- package/dist/Editor/Toolbar/Mini/Styles.js +4 -2
- package/dist/Editor/Toolbar/PopupTool/TextFormat.js +1 -1
- package/dist/Editor/Toolbar/Toolbar.js +2 -1
- package/dist/Editor/Toolbar/toolbarGroups.js +2 -1
- package/dist/Editor/common/Icon.js +5 -3
- package/dist/Editor/common/ImageSelector/ImageSelector.js +1 -1
- package/dist/Editor/common/MentionsPopup/Styles.js +6 -3
- package/dist/Editor/common/StyleBuilder/gridItemStyle.js +29 -0
- package/dist/Editor/common/iconslist.js +67 -1
- package/dist/Editor/hooks/useMentions.js +0 -26
- package/dist/Editor/utils/embed.js +14 -10
- package/dist/Editor/utils/emoji.js +0 -1
- package/dist/Editor/utils/form.js +1 -0
- package/dist/Editor/utils/insertAppHeader.js +66 -12
- package/package.json +2 -1
|
@@ -25,6 +25,7 @@ import MiniToolbar from "./Toolbar/Mini/MiniToolbar";
|
|
|
25
25
|
import { EditorProvider } from "./hooks/useMouseMove";
|
|
26
26
|
import TopBanner from "./Elements/TopBanner/TopBanner";
|
|
27
27
|
import editorStyles from "./Styles/EditorStyles";
|
|
28
|
+
import "animate.css";
|
|
28
29
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
29
30
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
30
31
|
const PREVIEW_IMAGE_HIDE_CLASS = ["grid-container-toolbar", "grid-item-toolbar", "element-toolbar"];
|
package/dist/Editor/Editor.css
CHANGED
|
@@ -176,14 +176,14 @@ blockquote {
|
|
|
176
176
|
|
|
177
177
|
.accordion-title {
|
|
178
178
|
position: relative;
|
|
179
|
-
background-color:
|
|
179
|
+
background-color: transparent;
|
|
180
180
|
display: flex;
|
|
181
181
|
align-items: center;
|
|
182
182
|
}
|
|
183
183
|
|
|
184
184
|
.accordion-content {
|
|
185
185
|
padding-left: 13px;
|
|
186
|
-
background-color:
|
|
186
|
+
background-color: transparent;
|
|
187
187
|
border-left: 1px solid #ccc;
|
|
188
188
|
margin-left: 14px;
|
|
189
189
|
}
|
|
@@ -473,10 +473,6 @@ blockquote {
|
|
|
473
473
|
width: 100% !important;
|
|
474
474
|
}
|
|
475
475
|
|
|
476
|
-
.grid-item > div {
|
|
477
|
-
text-align: center;
|
|
478
|
-
}
|
|
479
|
-
|
|
480
476
|
.page-builder .editor-wrapper {
|
|
481
477
|
max-width: 100% !important;
|
|
482
478
|
margin-top: 0px !important;
|
|
@@ -484,7 +480,7 @@ blockquote {
|
|
|
484
480
|
}
|
|
485
481
|
|
|
486
482
|
.embed {
|
|
487
|
-
justify-content: center;
|
|
483
|
+
justify-content: center;
|
|
488
484
|
}
|
|
489
485
|
|
|
490
486
|
.embed img {
|
|
@@ -74,7 +74,8 @@ function AppHeader(props) {
|
|
|
74
74
|
contentEditable: false,
|
|
75
75
|
style: {
|
|
76
76
|
top: "0px",
|
|
77
|
-
right: "0px"
|
|
77
|
+
right: "0px",
|
|
78
|
+
zIndex: 1000
|
|
78
79
|
},
|
|
79
80
|
children: [/*#__PURE__*/_jsx(Tooltip, {
|
|
80
81
|
title: "App Header Settings",
|
|
@@ -204,11 +205,14 @@ function AppHeader(props) {
|
|
|
204
205
|
paddingLeft: `${left}px`,
|
|
205
206
|
paddingRight: `${right}px`,
|
|
206
207
|
paddingTop: `${top}px`,
|
|
207
|
-
paddingBottom: `${bottom}px
|
|
208
|
+
paddingBottom: `${bottom}px`,
|
|
209
|
+
zIndex: 999
|
|
208
210
|
},
|
|
209
211
|
children: /*#__PURE__*/_jsxs(Toolbar, {
|
|
210
212
|
style: {
|
|
211
|
-
flexDirection: isLogoRight ? "row-reverse" : "row"
|
|
213
|
+
flexDirection: isLogoRight ? "row-reverse" : "row",
|
|
214
|
+
paddingLeft: "0px",
|
|
215
|
+
paddingRight: "0px"
|
|
212
216
|
},
|
|
213
217
|
children: [/*#__PURE__*/_jsx(IconButton, {
|
|
214
218
|
color: "inherit",
|
|
@@ -322,6 +326,9 @@ function AppHeader(props) {
|
|
|
322
326
|
}), /*#__PURE__*/_jsx(ToolBar, {})]
|
|
323
327
|
}), /*#__PURE__*/_jsx("div", {
|
|
324
328
|
contentEditable: false,
|
|
329
|
+
style: {
|
|
330
|
+
display: "none"
|
|
331
|
+
},
|
|
325
332
|
children: children
|
|
326
333
|
})]
|
|
327
334
|
}), openSetttings ? /*#__PURE__*/_jsx(AppHeaderPopup, {
|
|
@@ -1,22 +1,25 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { IconButton, Tooltip } from "@mui/material";
|
|
3
2
|
import { insertAppHeader } from "../../utils/insertAppHeader";
|
|
4
|
-
import
|
|
3
|
+
import ToolbarIcon from "../../common/ToolbarIcon";
|
|
4
|
+
import Icon from "../../common/Icon";
|
|
5
|
+
import insertNewLine from "../../utils/insertNewLine";
|
|
5
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
7
|
const AppHeaderButton = props => {
|
|
7
8
|
const {
|
|
8
|
-
editor
|
|
9
|
+
editor,
|
|
10
|
+
icoBtnType
|
|
9
11
|
} = props;
|
|
10
12
|
const handleClick = () => {
|
|
11
13
|
insertAppHeader(editor, {});
|
|
14
|
+
insertNewLine(editor);
|
|
12
15
|
};
|
|
13
|
-
return /*#__PURE__*/_jsx(
|
|
16
|
+
return /*#__PURE__*/_jsx(ToolbarIcon, {
|
|
14
17
|
title: "App Header",
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
onClick: handleClick,
|
|
19
|
+
icon: /*#__PURE__*/_jsx(Icon, {
|
|
20
|
+
icon: "appHeader"
|
|
21
|
+
}),
|
|
22
|
+
icoBtnType: icoBtnType
|
|
20
23
|
});
|
|
21
24
|
};
|
|
22
25
|
export default AppHeaderButton;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { useEffect, useState } from "react";
|
|
2
2
|
import { Transforms, Editor } from "slate";
|
|
3
|
-
import { ReactEditor,
|
|
3
|
+
import { ReactEditor, useSlateStatic } from "slate-react";
|
|
4
4
|
import Slider from "react-slick";
|
|
5
5
|
import "./slick-theme.min.css";
|
|
6
6
|
import "./slick.min.css";
|
|
@@ -29,12 +29,12 @@ const ColorPickerStyles = () => ({
|
|
|
29
29
|
width: "100%",
|
|
30
30
|
padding: "4px",
|
|
31
31
|
display: "flex",
|
|
32
|
-
|
|
32
|
+
justifyContent: "center",
|
|
33
33
|
alignItems: "center",
|
|
34
34
|
flexDirection: "column",
|
|
35
35
|
"& .buttonsWrpr": {
|
|
36
36
|
display: "flex",
|
|
37
|
-
|
|
37
|
+
justifyContent: "center",
|
|
38
38
|
alignItems: "center"
|
|
39
39
|
},
|
|
40
40
|
".more-btn-cbs": {
|
|
@@ -5,11 +5,13 @@ import { IconButton, Tooltip, Grid, Menu, MenuItem, CircularProgress } from "@mu
|
|
|
5
5
|
import DeleteIcon from "@mui/icons-material/Delete";
|
|
6
6
|
import BackupIcon from "@mui/icons-material/Backup";
|
|
7
7
|
import { GridSettingsIcon, GridAddSectionIcon } from "../../common/iconslist";
|
|
8
|
+
import SendTimeExtensionIcon from '@mui/icons-material/SendTimeExtension';
|
|
8
9
|
import FormPopup from "./FormPopup";
|
|
9
10
|
import ButtonPopup from "../Button/ButtonPopup";
|
|
10
11
|
import { formField } from "../../utils/formfield";
|
|
11
12
|
import { formSubmit } from "../../service/formSubmit";
|
|
12
13
|
import formButtonStyle from "../../common/StyleBuilder/formButtonStyle";
|
|
14
|
+
import Workflow from "./Workflow";
|
|
13
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
16
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
17
|
const Form = props => {
|
|
@@ -57,6 +59,7 @@ const Form = props => {
|
|
|
57
59
|
const editor = useSlateStatic();
|
|
58
60
|
const formEle = useRef();
|
|
59
61
|
const [openSetttings, setOpenSettings] = useState(false);
|
|
62
|
+
const [openWorkflow, setOpenWorkflow] = useState(false);
|
|
60
63
|
const [editButton, setEditButton] = useState(false);
|
|
61
64
|
const [anchorEl, setAnchorEl] = useState(null);
|
|
62
65
|
const [loading, setLoading] = useState(false);
|
|
@@ -88,6 +91,7 @@ const Form = props => {
|
|
|
88
91
|
response,
|
|
89
92
|
form_data: {
|
|
90
93
|
email: element?.email,
|
|
94
|
+
form_workflow: element?.workflow,
|
|
91
95
|
save_response: element?.saveResponse
|
|
92
96
|
}
|
|
93
97
|
};
|
|
@@ -132,6 +136,12 @@ const Form = props => {
|
|
|
132
136
|
});
|
|
133
137
|
}
|
|
134
138
|
};
|
|
139
|
+
const onWorkflow = () => {
|
|
140
|
+
setOpenWorkflow(true);
|
|
141
|
+
};
|
|
142
|
+
const closeWorkflow = () => {
|
|
143
|
+
setOpenWorkflow(false);
|
|
144
|
+
};
|
|
135
145
|
const onSaveButtonSettings = data => {
|
|
136
146
|
onSave({
|
|
137
147
|
buttonProps: {
|
|
@@ -208,6 +218,13 @@ const Form = props => {
|
|
|
208
218
|
className: "mr",
|
|
209
219
|
children: /*#__PURE__*/_jsx(DeleteIcon, {})
|
|
210
220
|
})
|
|
221
|
+
}), /*#__PURE__*/_jsx(Tooltip, {
|
|
222
|
+
title: "Workflow",
|
|
223
|
+
arrow: true,
|
|
224
|
+
children: /*#__PURE__*/_jsx(IconButton, {
|
|
225
|
+
onClick: onWorkflow,
|
|
226
|
+
children: /*#__PURE__*/_jsx(SendTimeExtensionIcon, {})
|
|
227
|
+
})
|
|
211
228
|
})]
|
|
212
229
|
});
|
|
213
230
|
};
|
|
@@ -314,7 +331,12 @@ const Form = props => {
|
|
|
314
331
|
onSave: onSave,
|
|
315
332
|
onClose: onClose,
|
|
316
333
|
customProps: customProps
|
|
317
|
-
}) : null,
|
|
334
|
+
}) : null, /*#__PURE__*/_jsx(Workflow, {
|
|
335
|
+
openWorkflow: openWorkflow,
|
|
336
|
+
element: element,
|
|
337
|
+
closeWorkflow: closeWorkflow,
|
|
338
|
+
onSave: onSave
|
|
339
|
+
}), !readOnly ? /*#__PURE__*/_jsxs(Menu, {
|
|
318
340
|
className: "editor-btn-options",
|
|
319
341
|
open: anchorEl !== null,
|
|
320
342
|
anchorEl: anchorEl,
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Grid, Radio, RadioGroup, Typography, FormControlLabel, Select, MenuItem, FormControl, TextField } from "@mui/material";
|
|
3
|
+
import FormStyles from "./Styles";
|
|
4
|
+
import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';
|
|
5
|
+
import UserInputs from "./UserInputs";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
const FormWorkflow = props => {
|
|
9
|
+
const {
|
|
10
|
+
schedule,
|
|
11
|
+
element,
|
|
12
|
+
setSchedule,
|
|
13
|
+
scheduleEvery,
|
|
14
|
+
setScheduleEvery,
|
|
15
|
+
currentInstant,
|
|
16
|
+
scheduleOn,
|
|
17
|
+
setScheduleOn,
|
|
18
|
+
subject,
|
|
19
|
+
setSubject,
|
|
20
|
+
bodyData,
|
|
21
|
+
setBodyData,
|
|
22
|
+
handleSelectedVariables,
|
|
23
|
+
handleInputReset
|
|
24
|
+
} = props;
|
|
25
|
+
const classes = FormStyles();
|
|
26
|
+
const handleBodyField = event => {
|
|
27
|
+
setBodyData(event.target.value);
|
|
28
|
+
};
|
|
29
|
+
const handleScheduleInstant = event => {
|
|
30
|
+
setScheduleEvery(event.target.value);
|
|
31
|
+
};
|
|
32
|
+
const onHandleChange = event => {
|
|
33
|
+
setScheduleOn(event.target.value);
|
|
34
|
+
};
|
|
35
|
+
const onSubjectChange = event => {
|
|
36
|
+
setSubject(event.target.value);
|
|
37
|
+
};
|
|
38
|
+
return /*#__PURE__*/_jsxs(Grid, {
|
|
39
|
+
container: true,
|
|
40
|
+
children: [/*#__PURE__*/_jsxs(Grid, {
|
|
41
|
+
item: true,
|
|
42
|
+
xs: 12,
|
|
43
|
+
children: [/*#__PURE__*/_jsx(Typography, {
|
|
44
|
+
sx: classes.subHeadings,
|
|
45
|
+
children: "Set Timings *"
|
|
46
|
+
}), /*#__PURE__*/_jsx(Typography, {
|
|
47
|
+
sx: classes.infoText,
|
|
48
|
+
children: "Invitees will receive reminder emails at specified times before scheduled events"
|
|
49
|
+
})]
|
|
50
|
+
}), /*#__PURE__*/_jsx(Grid, {
|
|
51
|
+
item: true,
|
|
52
|
+
children: /*#__PURE__*/_jsxs(Grid, {
|
|
53
|
+
container: true,
|
|
54
|
+
direction: "row",
|
|
55
|
+
alignItems: "flex-end",
|
|
56
|
+
children: [/*#__PURE__*/_jsx(Grid, {
|
|
57
|
+
item: true,
|
|
58
|
+
sx: classes.radioBtn,
|
|
59
|
+
children: /*#__PURE__*/_jsxs(RadioGroup, {
|
|
60
|
+
name: "set timing",
|
|
61
|
+
value: schedule,
|
|
62
|
+
defaultValue: 1,
|
|
63
|
+
children: [/*#__PURE__*/_jsx(FormControlLabel, {
|
|
64
|
+
value: 'immediately',
|
|
65
|
+
label: "Immediately",
|
|
66
|
+
onChange: () => {
|
|
67
|
+
setSchedule('immediately');
|
|
68
|
+
},
|
|
69
|
+
control: /*#__PURE__*/_jsx(Radio, {
|
|
70
|
+
size: "small"
|
|
71
|
+
})
|
|
72
|
+
}), /*#__PURE__*/_jsx(FormControlLabel, {
|
|
73
|
+
value: 'after',
|
|
74
|
+
label: "After",
|
|
75
|
+
onChange: () => {
|
|
76
|
+
setSchedule('after');
|
|
77
|
+
},
|
|
78
|
+
control: /*#__PURE__*/_jsx(Radio, {
|
|
79
|
+
size: "small"
|
|
80
|
+
})
|
|
81
|
+
})]
|
|
82
|
+
})
|
|
83
|
+
}), schedule === 'after' && /*#__PURE__*/_jsx(Grid, {
|
|
84
|
+
item: true,
|
|
85
|
+
children: /*#__PURE__*/_jsxs(Grid, {
|
|
86
|
+
container: true,
|
|
87
|
+
gap: 2,
|
|
88
|
+
children: [/*#__PURE__*/_jsx(Grid, {
|
|
89
|
+
item: true,
|
|
90
|
+
children: /*#__PURE__*/_jsx(FormControl, {
|
|
91
|
+
fullWidth: true,
|
|
92
|
+
size: "small",
|
|
93
|
+
children: /*#__PURE__*/_jsx(Select, {
|
|
94
|
+
value: scheduleOn,
|
|
95
|
+
onChange: onHandleChange,
|
|
96
|
+
sx: classes.select,
|
|
97
|
+
IconComponent: KeyboardArrowDownIcon,
|
|
98
|
+
children: currentInstant.map((ele, index) => /*#__PURE__*/_jsx(MenuItem, {
|
|
99
|
+
sx: classes.selectList,
|
|
100
|
+
value: ele,
|
|
101
|
+
children: ele
|
|
102
|
+
}, `${ele}_${index}`))
|
|
103
|
+
})
|
|
104
|
+
})
|
|
105
|
+
}), /*#__PURE__*/_jsx(Grid, {
|
|
106
|
+
item: true,
|
|
107
|
+
children: /*#__PURE__*/_jsx(FormControl, {
|
|
108
|
+
fullWidth: true,
|
|
109
|
+
size: "small",
|
|
110
|
+
children: /*#__PURE__*/_jsxs(Select, {
|
|
111
|
+
value: scheduleEvery,
|
|
112
|
+
onChange: handleScheduleInstant,
|
|
113
|
+
sx: classes.select,
|
|
114
|
+
IconComponent: KeyboardArrowDownIcon,
|
|
115
|
+
style: {
|
|
116
|
+
minWidth: '160px'
|
|
117
|
+
},
|
|
118
|
+
children: [/*#__PURE__*/_jsx(MenuItem, {
|
|
119
|
+
sx: classes.selectList,
|
|
120
|
+
value: 'min',
|
|
121
|
+
children: "Minutes"
|
|
122
|
+
}), /*#__PURE__*/_jsx(MenuItem, {
|
|
123
|
+
sx: classes.selectList,
|
|
124
|
+
value: 'hr',
|
|
125
|
+
children: "Hours"
|
|
126
|
+
}), /*#__PURE__*/_jsx(MenuItem, {
|
|
127
|
+
sx: classes.selectList,
|
|
128
|
+
value: 'day',
|
|
129
|
+
children: "Day"
|
|
130
|
+
})]
|
|
131
|
+
})
|
|
132
|
+
})
|
|
133
|
+
})]
|
|
134
|
+
})
|
|
135
|
+
})]
|
|
136
|
+
})
|
|
137
|
+
}), /*#__PURE__*/_jsxs(Grid, {
|
|
138
|
+
item: true,
|
|
139
|
+
xs: 12,
|
|
140
|
+
children: [/*#__PURE__*/_jsx(Typography, {
|
|
141
|
+
sx: classes.formHeadings,
|
|
142
|
+
children: "Subject *"
|
|
143
|
+
}), /*#__PURE__*/_jsx(TextField, {
|
|
144
|
+
multiline: true,
|
|
145
|
+
margin: "none",
|
|
146
|
+
value: subject,
|
|
147
|
+
onChange: onSubjectChange,
|
|
148
|
+
fullWidth: true,
|
|
149
|
+
maxRows: 5,
|
|
150
|
+
sx: {
|
|
151
|
+
"& fieldset": {
|
|
152
|
+
border: '1px solid #6F6F6F33',
|
|
153
|
+
borderRadius: "8px"
|
|
154
|
+
},
|
|
155
|
+
"& textarea": {
|
|
156
|
+
fontSize: '16px',
|
|
157
|
+
fontWeight: 500
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
})]
|
|
161
|
+
}), /*#__PURE__*/_jsxs(Grid, {
|
|
162
|
+
item: true,
|
|
163
|
+
xs: 12,
|
|
164
|
+
children: [/*#__PURE__*/_jsx(Typography, {
|
|
165
|
+
sx: classes.formHeadings,
|
|
166
|
+
children: "Body *"
|
|
167
|
+
}), /*#__PURE__*/_jsx(UserInputs, {
|
|
168
|
+
element: element,
|
|
169
|
+
type: 2,
|
|
170
|
+
subject: bodyData,
|
|
171
|
+
handleField: handleBodyField,
|
|
172
|
+
handleSelectedVariables: handleSelectedVariables,
|
|
173
|
+
handleInputReset: handleInputReset
|
|
174
|
+
})]
|
|
175
|
+
})]
|
|
176
|
+
});
|
|
177
|
+
};
|
|
178
|
+
export default FormWorkflow;
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Grid, Typography } from "@mui/material";
|
|
3
|
+
import FormStyles from "./Styles";
|
|
4
|
+
import MoreOptions from "./MoreOptions";
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
const ListWorkflow = props => {
|
|
8
|
+
const {
|
|
9
|
+
workflow,
|
|
10
|
+
handleEditFormWorkflow,
|
|
11
|
+
handleDeleteFormWorkflow
|
|
12
|
+
} = props;
|
|
13
|
+
const classes = FormStyles();
|
|
14
|
+
const optionsList = ["Edit", "Delete"];
|
|
15
|
+
const onMenuClick = (selectedMenu, selectedFlow) => () => {
|
|
16
|
+
if (selectedMenu === "Edit") {
|
|
17
|
+
handleEditFormWorkflow(selectedFlow);
|
|
18
|
+
} else if (selectedMenu === "Delete") {
|
|
19
|
+
handleDeleteFormWorkflow(selectedFlow);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
return /*#__PURE__*/_jsx(Grid, {
|
|
23
|
+
container: true,
|
|
24
|
+
gap: 2,
|
|
25
|
+
children: workflow?.map((flow, index) => /*#__PURE__*/_jsx(Grid, {
|
|
26
|
+
item: true,
|
|
27
|
+
xs: 12,
|
|
28
|
+
children: /*#__PURE__*/_jsxs(Grid, {
|
|
29
|
+
container: true,
|
|
30
|
+
sx: classes.flowListCard,
|
|
31
|
+
alignItems: "center",
|
|
32
|
+
justifyContent: "space-between",
|
|
33
|
+
children: [/*#__PURE__*/_jsx(Grid, {
|
|
34
|
+
item: true,
|
|
35
|
+
xs: 11,
|
|
36
|
+
children: /*#__PURE__*/_jsxs(Grid, {
|
|
37
|
+
container: true,
|
|
38
|
+
gap: 1,
|
|
39
|
+
children: [/*#__PURE__*/_jsx(Grid, {
|
|
40
|
+
item: true,
|
|
41
|
+
xs: 12,
|
|
42
|
+
children: /*#__PURE__*/_jsxs(Grid, {
|
|
43
|
+
container: true,
|
|
44
|
+
alignItems: "center",
|
|
45
|
+
children: [/*#__PURE__*/_jsx(Grid, {
|
|
46
|
+
item: true,
|
|
47
|
+
children: /*#__PURE__*/_jsx(Typography, {
|
|
48
|
+
sx: classes.listHeading,
|
|
49
|
+
children: "Subject:"
|
|
50
|
+
})
|
|
51
|
+
}), /*#__PURE__*/_jsx(Grid, {
|
|
52
|
+
item: true,
|
|
53
|
+
children: /*#__PURE__*/_jsx(Typography, {
|
|
54
|
+
sx: classes.listSubHeading,
|
|
55
|
+
style: {
|
|
56
|
+
paddingLeft: '24px'
|
|
57
|
+
},
|
|
58
|
+
children: flow.subject_data
|
|
59
|
+
})
|
|
60
|
+
})]
|
|
61
|
+
})
|
|
62
|
+
}), /*#__PURE__*/_jsx(Grid, {
|
|
63
|
+
item: true,
|
|
64
|
+
xs: 12,
|
|
65
|
+
children: /*#__PURE__*/_jsxs(Grid, {
|
|
66
|
+
container: true,
|
|
67
|
+
alignItems: "center",
|
|
68
|
+
children: [/*#__PURE__*/_jsx(Grid, {
|
|
69
|
+
item: true,
|
|
70
|
+
children: /*#__PURE__*/_jsx(Typography, {
|
|
71
|
+
sx: classes.listHeading,
|
|
72
|
+
children: "Body:"
|
|
73
|
+
})
|
|
74
|
+
}), /*#__PURE__*/_jsx(Grid, {
|
|
75
|
+
item: true,
|
|
76
|
+
children: /*#__PURE__*/_jsx(Typography, {
|
|
77
|
+
sx: classes.listSubHeading,
|
|
78
|
+
style: {
|
|
79
|
+
paddingLeft: '40px'
|
|
80
|
+
},
|
|
81
|
+
children: flow.body_data
|
|
82
|
+
})
|
|
83
|
+
})]
|
|
84
|
+
})
|
|
85
|
+
}), /*#__PURE__*/_jsx(Grid, {
|
|
86
|
+
item: true,
|
|
87
|
+
xs: 12,
|
|
88
|
+
children: /*#__PURE__*/_jsxs(Grid, {
|
|
89
|
+
container: true,
|
|
90
|
+
alignItems: "center",
|
|
91
|
+
children: [/*#__PURE__*/_jsx(Grid, {
|
|
92
|
+
item: true,
|
|
93
|
+
children: /*#__PURE__*/_jsx(Typography, {
|
|
94
|
+
sx: classes.listHeading,
|
|
95
|
+
children: "Scheduled:"
|
|
96
|
+
})
|
|
97
|
+
}), /*#__PURE__*/_jsx(Grid, {
|
|
98
|
+
item: true,
|
|
99
|
+
children: /*#__PURE__*/_jsxs(Grid, {
|
|
100
|
+
container: true,
|
|
101
|
+
children: [/*#__PURE__*/_jsx(Grid, {
|
|
102
|
+
item: true,
|
|
103
|
+
children: /*#__PURE__*/_jsx(Typography, {
|
|
104
|
+
sx: classes.listSubHeading,
|
|
105
|
+
style: {
|
|
106
|
+
paddingLeft: '5px'
|
|
107
|
+
},
|
|
108
|
+
children: flow.schedule_type
|
|
109
|
+
})
|
|
110
|
+
}), flow.schedule_type === 'after' && /*#__PURE__*/_jsx(Grid, {
|
|
111
|
+
item: true,
|
|
112
|
+
children: /*#__PURE__*/_jsxs(Typography, {
|
|
113
|
+
sx: classes.listSubHeading,
|
|
114
|
+
style: {
|
|
115
|
+
paddingLeft: '5px'
|
|
116
|
+
},
|
|
117
|
+
children: [flow.schedule_on, flow.schedule_every]
|
|
118
|
+
})
|
|
119
|
+
})]
|
|
120
|
+
})
|
|
121
|
+
})]
|
|
122
|
+
})
|
|
123
|
+
})]
|
|
124
|
+
})
|
|
125
|
+
}), /*#__PURE__*/_jsx(Grid, {
|
|
126
|
+
item: true,
|
|
127
|
+
xs: 1,
|
|
128
|
+
children: /*#__PURE__*/_jsx(MoreOptions, {
|
|
129
|
+
classes: classes,
|
|
130
|
+
menus: optionsList,
|
|
131
|
+
selectedFlow: index,
|
|
132
|
+
onMenuClick: onMenuClick
|
|
133
|
+
})
|
|
134
|
+
})]
|
|
135
|
+
})
|
|
136
|
+
}, `workflow_list_${index}`))
|
|
137
|
+
});
|
|
138
|
+
};
|
|
139
|
+
export default ListWorkflow;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import { IconButton, Menu, MenuItem, Tooltip } from "@mui/material";
|
|
3
|
+
import { MoreHorizontal } from "../../../common/iconslist";
|
|
4
|
+
import Icon from "../../../common/Icon";
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
8
|
+
function MoreOptions(props) {
|
|
9
|
+
const {
|
|
10
|
+
classes,
|
|
11
|
+
menus,
|
|
12
|
+
onMenuClick,
|
|
13
|
+
selectedFlow
|
|
14
|
+
} = props;
|
|
15
|
+
|
|
16
|
+
//state
|
|
17
|
+
const [anchorEl, setAnchorEl] = useState(null);
|
|
18
|
+
const handleClick = event => {
|
|
19
|
+
event.stopPropagation();
|
|
20
|
+
setAnchorEl(event.currentTarget);
|
|
21
|
+
};
|
|
22
|
+
const handleClose = event => {
|
|
23
|
+
event.stopPropagation();
|
|
24
|
+
setAnchorEl(null);
|
|
25
|
+
};
|
|
26
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
27
|
+
children: [/*#__PURE__*/_jsx(Tooltip, {
|
|
28
|
+
arrow: true,
|
|
29
|
+
title: "More Options",
|
|
30
|
+
children: /*#__PURE__*/_jsxs(IconButton, {
|
|
31
|
+
sx: classes.moreOption,
|
|
32
|
+
onClick: handleClick,
|
|
33
|
+
children: [/*#__PURE__*/_jsx(Icon, {
|
|
34
|
+
icon: "moreHorizantal"
|
|
35
|
+
}), /*#__PURE__*/_jsx(MoreHorizontal, {
|
|
36
|
+
width: "24px",
|
|
37
|
+
height: "24px"
|
|
38
|
+
})]
|
|
39
|
+
})
|
|
40
|
+
}), /*#__PURE__*/_jsx(Menu, {
|
|
41
|
+
id: "basic-menu",
|
|
42
|
+
open: Boolean(anchorEl),
|
|
43
|
+
anchorEl: anchorEl,
|
|
44
|
+
onClose: handleClose,
|
|
45
|
+
anchorOrigin: {
|
|
46
|
+
vertical: "bottom",
|
|
47
|
+
horizontal: "right"
|
|
48
|
+
},
|
|
49
|
+
transformOrigin: {
|
|
50
|
+
vertical: "top",
|
|
51
|
+
horizontal: "right"
|
|
52
|
+
},
|
|
53
|
+
children: menus.map((m, i) => /*#__PURE__*/_jsx(MenuItem, {
|
|
54
|
+
sx: {
|
|
55
|
+
color: "#64748B",
|
|
56
|
+
paddingRight: "100px"
|
|
57
|
+
},
|
|
58
|
+
onClick: onMenuClick(m, selectedFlow),
|
|
59
|
+
children: m
|
|
60
|
+
}, `menu_${i}_${m}`))
|
|
61
|
+
})]
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
export default MoreOptions;
|