@flozy/editor 4.6.2 → 4.6.4
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Editor/CommonEditor.js +17 -17
- package/dist/Editor/Editor.css +32 -1
- package/dist/Editor/Elements/AI/AIInput.js +4 -5
- package/dist/Editor/Elements/AI/PopoverAIInput.js +40 -29
- package/dist/Editor/Elements/AI/Styles.js +1 -1
- package/dist/Editor/Elements/Button/EditorButton.js +8 -4
- package/dist/Editor/Elements/Divider/Divider.js +115 -8
- package/dist/Editor/Elements/Divider/DividerPopup.js +24 -0
- package/dist/Editor/Elements/Embed/Embed.css +1 -1
- package/dist/Editor/Elements/Embed/Image.js +3 -2
- package/dist/Editor/Elements/Embed/Video.js +7 -4
- package/dist/Editor/Elements/Emoji/EmojiButton.js +1 -23
- package/dist/Editor/Elements/Form/Form.js +0 -1
- package/dist/Editor/Elements/Form/Workflow/FormWorkflow.js +3 -12
- package/dist/Editor/Elements/FreeGrid/FreeGrid.js +56 -3
- package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +2 -0
- package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +7 -3
- package/dist/Editor/Elements/FreeGrid/Options/AddElement.js +16 -2
- package/dist/Editor/Elements/FreeGrid/Options/sectionItemOptions.js +8 -2
- package/dist/Editor/Elements/FreeGrid/styles.js +83 -2
- package/dist/Editor/Elements/Signature/SignaturePopup.js +24 -7
- package/dist/Editor/Elements/Signature/Signed.js +1 -1
- package/dist/Editor/Elements/SimpleText/index.js +7 -8
- package/dist/Editor/Elements/Table/TableRow.js +1 -1
- package/dist/Editor/Styles/EditorStyles.js +2 -2
- package/dist/Editor/Toolbar/Mini/MiniToolbar.js +1 -2
- package/dist/Editor/Toolbar/PopupTool/ButtonTemplatesCard.js +35 -29
- package/dist/Editor/Toolbar/PopupTool/FullViewCard.js +35 -30
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +4 -4
- package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +22 -38
- package/dist/Editor/Toolbar/PopupTool/TextFormat.js +0 -1
- package/dist/Editor/Toolbar/PopupTool/index.js +18 -6
- package/dist/Editor/common/FontLoader/FontLoader.js +6 -6
- package/dist/Editor/common/Icon.js +1 -1
- package/dist/Editor/common/LinkSettings/index.js +3 -3
- package/dist/Editor/common/LinkSettings/navOptions.js +4 -1
- package/dist/Editor/common/RnD/DragOver/index.js +0 -1
- package/dist/Editor/common/RnD/ElementOptions/Actions.js +15 -2
- package/dist/Editor/common/RnD/ElementOptions/styles.js +5 -0
- package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +1 -1
- package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Signature.js +53 -0
- package/dist/Editor/common/RnD/ElementSettings/OtherSettings/index.js +32 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/DividerSettings.js +49 -0
- package/dist/Editor/common/RnD/ElementSettings/Settings/index.js +3 -1
- package/dist/Editor/common/RnD/ElementSettings/settingsConstants.js +5 -2
- package/dist/Editor/common/RnD/RnDCopy.js +2 -0
- package/dist/Editor/common/RnD/Utils/gridDropItem.js +5 -3
- package/dist/Editor/common/RnD/VirtualElement/index.js +1 -1
- package/dist/Editor/common/RnD/index.js +67 -37
- package/dist/Editor/common/Section/index.js +11 -1
- package/dist/Editor/common/Section/styles.js +16 -0
- package/dist/Editor/common/StyleBuilder/dividerStyles.js +56 -0
- package/dist/Editor/common/StyleBuilder/embedVideoStyle.js +19 -0
- package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +19 -4
- package/dist/Editor/common/SwipeableDrawer/index.js +4 -15
- package/dist/Editor/common/SwipeableDrawer/style.js +3 -11
- package/dist/Editor/common/Uploader.js +2 -1
- package/dist/Editor/common/iconslist.js +23 -0
- package/dist/Editor/helper/RnD/focusNode.js +74 -0
- package/dist/Editor/helper/index.js +5 -2
- package/dist/Editor/helper/theme.js +2 -2
- package/dist/Editor/hooks/useBreakpoints.js +1 -1
- package/dist/Editor/hooks/useDragging.js +51 -0
- package/dist/Editor/hooks/useMouseMove.js +5 -4
- package/dist/Editor/hooks/withCommon.js +1 -0
- package/dist/Editor/hooks/withRestrictedNodes.js +48 -0
- package/dist/Editor/utils/Decorators/highlightSelection.js +16 -0
- package/dist/Editor/utils/Decorators/index.js +3 -2
- package/dist/Editor/utils/RnD/RnDCtrlCmds.js +16 -1
- package/dist/Editor/utils/SlateUtilityFunctions.js +33 -5
- package/dist/Editor/utils/events.js +71 -0
- package/dist/Editor/utils/helper.js +16 -0
- package/package.json +1 -1
@@ -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__*/_jsx(RadioGroup, {
|
75
75
|
name: "set timing",
|
76
76
|
value: schedule,
|
77
77
|
defaultValue: 1,
|
78
|
-
children:
|
78
|
+
children: /*#__PURE__*/_jsx(FormControlLabel, {
|
79
79
|
value: "immediately",
|
80
80
|
label: "Immediately",
|
81
81
|
onChange: () => {
|
@@ -84,16 +84,7 @@ const FormWorkflow = props => {
|
|
84
84
|
control: /*#__PURE__*/_jsx(Radio, {
|
85
85
|
size: "small"
|
86
86
|
})
|
87
|
-
})
|
88
|
-
value: "after",
|
89
|
-
label: "After",
|
90
|
-
onChange: () => {
|
91
|
-
setSchedule("after");
|
92
|
-
},
|
93
|
-
control: /*#__PURE__*/_jsx(Radio, {
|
94
|
-
size: "small"
|
95
|
-
})
|
96
|
-
})]
|
87
|
+
})
|
97
88
|
})
|
98
89
|
}), schedule === "after" && /*#__PURE__*/_jsx(Grid, {
|
99
90
|
item: true,
|
@@ -47,7 +47,8 @@ const FreeGrid = props => {
|
|
47
47
|
} = element;
|
48
48
|
const {
|
49
49
|
readOnly,
|
50
|
-
customSX
|
50
|
+
customSX,
|
51
|
+
hideTools
|
51
52
|
} = customProps;
|
52
53
|
const {
|
53
54
|
updated_at,
|
@@ -206,6 +207,33 @@ const FreeGrid = props => {
|
|
206
207
|
at: [...insertAt]
|
207
208
|
});
|
208
209
|
break;
|
210
|
+
case "addSignature":
|
211
|
+
Transforms.insertNodes(editor, [{
|
212
|
+
type: "freegridItem",
|
213
|
+
childType: "signature",
|
214
|
+
children: [{
|
215
|
+
type: "signature",
|
216
|
+
children: [{
|
217
|
+
text: ""
|
218
|
+
}],
|
219
|
+
data: {
|
220
|
+
name: "",
|
221
|
+
email: "",
|
222
|
+
date: ""
|
223
|
+
}
|
224
|
+
}],
|
225
|
+
gridArea: "3 / 1 / 4 / 2",
|
226
|
+
left: 50,
|
227
|
+
marginTop: 0,
|
228
|
+
top: 0,
|
229
|
+
width: 217,
|
230
|
+
height: 173,
|
231
|
+
width_xs: 217,
|
232
|
+
height_xs: 173
|
233
|
+
}], {
|
234
|
+
at: [...insertAt]
|
235
|
+
});
|
236
|
+
break;
|
209
237
|
case "addImage":
|
210
238
|
Transforms.insertNodes(editor, [{
|
211
239
|
type: "freegridItem",
|
@@ -315,6 +343,26 @@ const FreeGrid = props => {
|
|
315
343
|
at: [...insertAt]
|
316
344
|
});
|
317
345
|
break;
|
346
|
+
case "addDivider":
|
347
|
+
Transforms.insertNodes(editor, [{
|
348
|
+
type: "freegridItem",
|
349
|
+
childType: "divider",
|
350
|
+
children: [{
|
351
|
+
type: "divider",
|
352
|
+
children: [{
|
353
|
+
text: ""
|
354
|
+
}]
|
355
|
+
}],
|
356
|
+
gridArea: "3 / 1 / 4 / 2",
|
357
|
+
left: 50,
|
358
|
+
marginTop: 0,
|
359
|
+
top: 0,
|
360
|
+
width: 170,
|
361
|
+
height: 30
|
362
|
+
}], {
|
363
|
+
at: [...insertAt]
|
364
|
+
});
|
365
|
+
break;
|
318
366
|
default:
|
319
367
|
}
|
320
368
|
// focus on newly added element
|
@@ -357,6 +405,7 @@ const FreeGrid = props => {
|
|
357
405
|
Transforms.removeNodes(editor, {
|
358
406
|
at: Path.parent(path)
|
359
407
|
});
|
408
|
+
setSelectedElement({});
|
360
409
|
} catch (err) {
|
361
410
|
console.log(err);
|
362
411
|
}
|
@@ -386,6 +435,7 @@ const FreeGrid = props => {
|
|
386
435
|
...getBreakPointsValue(sectionBorderRadius || {}, null, "overrideBorderRadius", true)
|
387
436
|
}
|
388
437
|
}, theme);
|
438
|
+
const sectionTypeOptions = (itemOptions?.section || []).filter(f => (hideTools || []).indexOf(f) === -1);
|
389
439
|
return /*#__PURE__*/_jsx(RnD, {
|
390
440
|
id: `freegrid_container_${path.join("|")}_${updated_at}_${breakpoint}`,
|
391
441
|
className: `
|
@@ -413,7 +463,7 @@ const FreeGrid = props => {
|
|
413
463
|
bottomLeft: false,
|
414
464
|
bottomRight: false
|
415
465
|
},
|
416
|
-
actions:
|
466
|
+
actions: sectionTypeOptions,
|
417
467
|
type: "parent",
|
418
468
|
optionsProps: {
|
419
469
|
placement: "right",
|
@@ -434,7 +484,8 @@ const FreeGrid = props => {
|
|
434
484
|
placement: "left",
|
435
485
|
title: "Add Element",
|
436
486
|
props: {
|
437
|
-
handleClick: handleAddElementClick
|
487
|
+
handleClick: handleAddElementClick,
|
488
|
+
hideTools: hideTools || []
|
438
489
|
}
|
439
490
|
},
|
440
491
|
more: {
|
@@ -474,6 +525,8 @@ const FreeGrid = props => {
|
|
474
525
|
backgroundSize: "cover"
|
475
526
|
},
|
476
527
|
"data-path": path.join("|"),
|
528
|
+
"data-dragoverid": path.join("|"),
|
529
|
+
"data-dragovertype": "parent",
|
477
530
|
style: {
|
478
531
|
"--cols": `100%`,
|
479
532
|
"--rows": `repeat(${repeatTimes}, ${ROW_HEIGHT}px)`
|
@@ -190,6 +190,8 @@ const FreeGridBox = props => {
|
|
190
190
|
...attributes,
|
191
191
|
className: "fgi_type_box freegrid-container-parent",
|
192
192
|
"data-path": path.join("|"),
|
193
|
+
"data-dragoverid": path.join("|"),
|
194
|
+
"data-dragovertype": "parent",
|
193
195
|
style: {
|
194
196
|
"--height": `${height}px`,
|
195
197
|
"--cols": `100%`,
|
@@ -28,7 +28,8 @@ const FreeGridItem = props => {
|
|
28
28
|
const editor = useSlateStatic();
|
29
29
|
const path = ReactEditor.findPath(editor, element);
|
30
30
|
const {
|
31
|
-
readOnly
|
31
|
+
readOnly,
|
32
|
+
hideTools
|
32
33
|
} = customProps;
|
33
34
|
const {
|
34
35
|
updated_at,
|
@@ -211,17 +212,20 @@ const FreeGridItem = props => {
|
|
211
212
|
break;
|
212
213
|
}
|
213
214
|
};
|
215
|
+
const itemTypeOptions = (itemOptions[childType] || itemOptions?.default).filter(f => (hideTools || []).indexOf(f) === -1);
|
214
216
|
return /*#__PURE__*/_jsx(RnD, {
|
215
217
|
id: `freegrid_item_${path.join("|")}_${updated_at}_${breakpoint}`,
|
216
218
|
className: `freegrid-item path-${path.length} breakpoint-${breakpoint}`,
|
217
219
|
editor: editor,
|
218
220
|
path: path,
|
219
|
-
actions:
|
221
|
+
actions: itemTypeOptions,
|
220
222
|
settingsProps: {
|
221
223
|
settings: "freegridItem",
|
222
224
|
onChange: onChangeSettings,
|
223
|
-
customProps
|
225
|
+
customProps,
|
226
|
+
onlyPopup: true // for signature popup in DnD
|
224
227
|
},
|
228
|
+
|
225
229
|
style: {
|
226
230
|
"--left": `${left || 0}px`,
|
227
231
|
"--marginTop": `${marginTop || 0}px`,
|
@@ -39,15 +39,29 @@ const FREE_GRID_ELEMENTS = [{
|
|
39
39
|
actionType: "addAppHeader",
|
40
40
|
label: "App Header",
|
41
41
|
icon: "appHeader"
|
42
|
+
}, {
|
43
|
+
actionType: "addSignature",
|
44
|
+
label: "Signature",
|
45
|
+
icon: "signature"
|
46
|
+
}, {
|
47
|
+
actionType: "addDivider",
|
48
|
+
label: "Divider",
|
49
|
+
icon: "divider"
|
42
50
|
}];
|
43
51
|
const AddElement = props => {
|
44
52
|
const {
|
45
|
-
handleClick
|
53
|
+
handleClick,
|
54
|
+
hideTools
|
46
55
|
} = props;
|
56
|
+
const ADD_ELEMENTS = FREE_GRID_ELEMENTS.filter(f => (hideTools || []).indexOf(f.actionType) === -1);
|
47
57
|
return /*#__PURE__*/_jsx(Box, {
|
58
|
+
sx: {
|
59
|
+
maxHeight: "500px",
|
60
|
+
overflowY: 'auto'
|
61
|
+
},
|
48
62
|
children: /*#__PURE__*/_jsx(List, {
|
49
63
|
className: "item-list-wrpr",
|
50
|
-
children:
|
64
|
+
children: ADD_ELEMENTS.map(m => {
|
51
65
|
return /*#__PURE__*/_jsxs(ListItemButton, {
|
52
66
|
className: "item-wrapper",
|
53
67
|
onClick: handleClick(m.actionType),
|
@@ -7,8 +7,11 @@ const boxOptions = ["settings", "link", "saveAsTemplate", "close"];
|
|
7
7
|
const appHeaderOptions = ["settings", "saveAsTemplate", "close"];
|
8
8
|
const tableOptions = ["drag", "edit", "settings", "saveAsTemplate", "close"];
|
9
9
|
const embedScriptOptions = ["embedScript", "saveAsTemplate", "close"];
|
10
|
-
const sectionOptions = ["
|
10
|
+
const sectionOptions = ["addElementInSection", "settings", "moveUp", "moveDown", "saveAsTemplate", "more"];
|
11
11
|
const formOptions = ["drag", "edit", "settings", "addFormField", "workFlow", "saveAsTemplate", "close"];
|
12
|
+
const signatureOptions = ["signatureSettings", "saveAsTemplate", "close"];
|
13
|
+
const signOptions = ["removeSign", "saveAsTemplate", "close"];
|
14
|
+
const dividerOptions = ["settings", "saveAsTemplate", "close"];
|
12
15
|
const itemOptions = {
|
13
16
|
default: commonOptions,
|
14
17
|
text: textOptions,
|
@@ -20,6 +23,9 @@ const itemOptions = {
|
|
20
23
|
section: sectionOptions,
|
21
24
|
table: tableOptions,
|
22
25
|
embedScript: embedScriptOptions,
|
23
|
-
video: videoOptions
|
26
|
+
video: videoOptions,
|
27
|
+
signature: signatureOptions,
|
28
|
+
sign: signOptions,
|
29
|
+
divider: dividerOptions
|
24
30
|
};
|
25
31
|
export default itemOptions;
|
@@ -20,6 +20,9 @@ const useFreeGridStyles = ({
|
|
20
20
|
marginLeft: `calc((100% - ${MAX_DEVICE_WIDTH}px) * 0.5)`,
|
21
21
|
"&.active-drag": {
|
22
22
|
pointerEvents: "none",
|
23
|
+
"& *": {
|
24
|
+
pointerEvents: "none"
|
25
|
+
},
|
23
26
|
zIndex: "9999 !important"
|
24
27
|
},
|
25
28
|
"&.inactive-drag": {
|
@@ -43,7 +46,7 @@ const useFreeGridStyles = ({
|
|
43
46
|
},
|
44
47
|
"&.enable-1, &.enable-2": {
|
45
48
|
"&.type_text": {
|
46
|
-
|
49
|
+
minHeight: "fit-content !important",
|
47
50
|
// for dark theme
|
48
51
|
// pages needs no color
|
49
52
|
"&.no-color": {
|
@@ -160,6 +163,51 @@ const useFreeGridStyles = ({
|
|
160
163
|
}
|
161
164
|
}
|
162
165
|
},
|
166
|
+
"& .fgi_type_signature": {
|
167
|
+
height: "100%",
|
168
|
+
"& .signature-container": {
|
169
|
+
height: "100%",
|
170
|
+
"& .signature-btn-container": {
|
171
|
+
height: "100%",
|
172
|
+
display: "flex",
|
173
|
+
flexDirection: "column",
|
174
|
+
"& .sign-placeholder": {
|
175
|
+
display: "flex",
|
176
|
+
// remove hidden sign placeholder
|
177
|
+
width: "100%",
|
178
|
+
background: theme?.palette?.editor?.background,
|
179
|
+
flexGrow: 1
|
180
|
+
},
|
181
|
+
"& button": {
|
182
|
+
margin: "6px 0px"
|
183
|
+
}
|
184
|
+
}
|
185
|
+
}
|
186
|
+
},
|
187
|
+
"& .fgi_type_sign": {
|
188
|
+
width: "100%",
|
189
|
+
height: "100%",
|
190
|
+
"& .signature-signed-wrapper": {
|
191
|
+
width: "100%",
|
192
|
+
height: "100%",
|
193
|
+
"& .signature-signed-span": {
|
194
|
+
width: "100%",
|
195
|
+
height: "100%",
|
196
|
+
"& .signed-btn": {
|
197
|
+
width: "100%",
|
198
|
+
height: "100%",
|
199
|
+
display: "flex",
|
200
|
+
flexDirection: "column",
|
201
|
+
"& img": {
|
202
|
+
width: "100% !important",
|
203
|
+
maxWidth: "none !important",
|
204
|
+
height: "70% !important",
|
205
|
+
flexGrow: 1
|
206
|
+
}
|
207
|
+
}
|
208
|
+
}
|
209
|
+
}
|
210
|
+
},
|
163
211
|
"& .fgi_type_box": {
|
164
212
|
display: "grid",
|
165
213
|
width: "100%",
|
@@ -169,9 +217,26 @@ const useFreeGridStyles = ({
|
|
169
217
|
"& .freegrid-item": {
|
170
218
|
marginLeft: "0px"
|
171
219
|
// pointerEvents: "none",
|
220
|
+
},
|
221
|
+
|
222
|
+
"&.rnd-dragOver": {
|
223
|
+
outline: "2px solid #116dff",
|
224
|
+
"&:before": {
|
225
|
+
content: '"Attach to Box"',
|
226
|
+
position: "absolute",
|
227
|
+
top: "-36px",
|
228
|
+
left: 0,
|
229
|
+
right: 0,
|
230
|
+
margin: "0px auto",
|
231
|
+
width: "fit-content",
|
232
|
+
background: "#116dff",
|
233
|
+
padding: "8px 12px",
|
234
|
+
color: "#FFF",
|
235
|
+
fontSize: "14px",
|
236
|
+
borderRadius: "7px"
|
237
|
+
}
|
172
238
|
}
|
173
239
|
},
|
174
|
-
|
175
240
|
"& .fgi_type_form": {
|
176
241
|
"& .form-field": {
|
177
242
|
"& input": {
|
@@ -252,6 +317,22 @@ const useFreeGridStyles = ({
|
|
252
317
|
[theme.breakpoints.between("xs", "md")]: {
|
253
318
|
marginLeft: `calc((100% - 320px) * 0.5)`
|
254
319
|
}
|
320
|
+
},
|
321
|
+
"&.rnd-dragOver": {
|
322
|
+
"&:before": {
|
323
|
+
content: '"Attact to this Section"',
|
324
|
+
position: "absolute",
|
325
|
+
top: 0,
|
326
|
+
left: 0,
|
327
|
+
right: 0,
|
328
|
+
margin: "0px auto",
|
329
|
+
width: "fit-content",
|
330
|
+
background: "#116dff",
|
331
|
+
padding: "8px 12px",
|
332
|
+
color: "#FFF",
|
333
|
+
fontSize: "14px",
|
334
|
+
borderRadius: "7px"
|
335
|
+
}
|
255
336
|
}
|
256
337
|
}
|
257
338
|
},
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import React, { useState } from "react";
|
2
|
-
import { Dialog, DialogTitle, DialogContent, DialogActions, Button, IconButton, Grid, TextField, Typography, Tabs, Tab, InputAdornment } from "@mui/material";
|
2
|
+
import { Dialog, DialogTitle, DialogContent, DialogActions, Button, IconButton, Grid, TextField, Typography, Tabs, Tab, InputAdornment, Box } from "@mui/material";
|
3
3
|
import CloseIcon from "@mui/icons-material/Close";
|
4
4
|
import DatePicker from "react-datepicker";
|
5
5
|
import "react-datepicker/dist/react-datepicker.css";
|
@@ -11,6 +11,7 @@ import { useEditorContext } from "../../hooks/useMouseMove";
|
|
11
11
|
import { validationMethods } from "../Form/FormElements/validations";
|
12
12
|
import { CalenderDownIconSignature, CalenderIconSignature } from "../../common/iconListV2";
|
13
13
|
import ColorPickerButton from "../../common/ColorPickerButton";
|
14
|
+
import { SignaturePlaceholderIcon } from "../../common/iconslist";
|
14
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
15
16
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
16
17
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
@@ -24,7 +25,8 @@ const SignaturePopup = props => {
|
|
24
25
|
onSave,
|
25
26
|
onClear,
|
26
27
|
customProps,
|
27
|
-
className
|
28
|
+
className,
|
29
|
+
onlyPopup
|
28
30
|
} = props;
|
29
31
|
const {
|
30
32
|
readOnly,
|
@@ -52,6 +54,9 @@ const SignaturePopup = props => {
|
|
52
54
|
};
|
53
55
|
const handleClose = () => {
|
54
56
|
setOpen(false);
|
57
|
+
if (props.handleClose) {
|
58
|
+
props.handleClose();
|
59
|
+
}
|
55
60
|
};
|
56
61
|
const handleSave = async () => {
|
57
62
|
await customProps?.services("workFlowAction", {
|
@@ -125,16 +130,28 @@ const SignaturePopup = props => {
|
|
125
130
|
isEmpty = signedData?.signature === "" && signedData?.signedText === "" || signedData?.signedBy === "" || signedData?.signedByEmail === "";
|
126
131
|
}
|
127
132
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
128
|
-
children: [/*#__PURE__*/
|
133
|
+
children: [onlyPopup ? null : /*#__PURE__*/_jsxs("div", {
|
129
134
|
className: `signature-btn-container`,
|
130
|
-
|
131
|
-
|
135
|
+
contentEditable: false,
|
136
|
+
children: [/*#__PURE__*/_jsxs(Box, {
|
137
|
+
className: "sign-placeholder",
|
138
|
+
children: [/*#__PURE__*/_jsx(SignaturePlaceholderIcon, {}), /*#__PURE__*/_jsx(Typography, {
|
139
|
+
variant: "body2",
|
140
|
+
style: {
|
141
|
+
color: "#A2B0B9"
|
142
|
+
},
|
143
|
+
children: "Your sign will be placed here"
|
144
|
+
})]
|
145
|
+
}), /*#__PURE__*/_jsx(Button, {
|
132
146
|
onClick: handleOpen,
|
147
|
+
style: {
|
148
|
+
width: "fit-content"
|
149
|
+
},
|
133
150
|
children: "Sign Here"
|
134
|
-
})
|
151
|
+
})]
|
135
152
|
}), /*#__PURE__*/_jsx(Dialog, {
|
136
153
|
className: `${className} dialogComp`,
|
137
|
-
open: open,
|
154
|
+
open: onlyPopup || open,
|
138
155
|
onClose: handleClose,
|
139
156
|
fullWidth: true,
|
140
157
|
PaperProps: {
|
@@ -6,6 +6,7 @@ import { isTextSelected } from "../../utils/helper";
|
|
6
6
|
import { useEditorContext } from "../../hooks/useMouseMove";
|
7
7
|
import SimpleTextStyle from "./style";
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
9
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
9
10
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
10
11
|
import { createElement as _createElement } from "react";
|
11
12
|
const SimpleText = props => {
|
@@ -47,20 +48,18 @@ const SimpleText = props => {
|
|
47
48
|
sx: classes.root,
|
48
49
|
key: `para_${path.join("|")}`
|
49
50
|
}, children, openAI ? null : /*#__PURE__*/_jsx("span", {
|
50
|
-
className: "placeholder-simple-text",
|
51
51
|
contentEditable: false,
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
52
|
+
className: "placeholder-simple-text",
|
53
|
+
children: isEmptyEditor ? editorPlaceholder || "Write Something..." : showPlaceHolder ? opacity && selected ? /*#__PURE__*/_jsxs(_Fragment, {
|
54
|
+
children: ["Type ", /*#__PURE__*/_jsx("span", {
|
55
|
+
contentEditable: false,
|
56
56
|
style: {
|
57
|
-
backgroundColor:
|
57
|
+
backgroundColor: '#F2F6FA',
|
58
58
|
padding: "0px 2px",
|
59
59
|
borderRadius: "2px"
|
60
60
|
},
|
61
|
-
contentEditable: false,
|
62
61
|
children: "/"
|
63
|
-
}), "
|
62
|
+
}), " to browse elements"]
|
64
63
|
}) : "" : ""
|
65
64
|
}));
|
66
65
|
};
|
@@ -215,7 +215,7 @@ const editorStyles = ({
|
|
215
215
|
},
|
216
216
|
"& .content-editable.empty": {
|
217
217
|
"&:after": {
|
218
|
-
color: placeHolderColor
|
218
|
+
color: theme?.palette?.type === "dark" ? "#99A5B6" : placeHolderColor
|
219
219
|
}
|
220
220
|
},
|
221
221
|
"& .checkbox-edit": {
|
@@ -286,7 +286,7 @@ const editorStyles = ({
|
|
286
286
|
}
|
287
287
|
},
|
288
288
|
"& ::selection": {
|
289
|
-
color: "
|
289
|
+
color: "inherit",
|
290
290
|
background: "#EAEBFE"
|
291
291
|
}
|
292
292
|
},
|
@@ -123,8 +123,7 @@ const MiniToolbar = props => {
|
|
123
123
|
label,
|
124
124
|
icon: Icon
|
125
125
|
}) => {
|
126
|
-
const isDisabled = popupType === type || type === "undo" ? !canUndo : type === "redo" ? !canRedo : false;
|
127
|
-
|
126
|
+
const isDisabled = popupType === type || type === "undo" ? !canUndo : type === "redo" ? !canRedo : false;
|
128
127
|
return /*#__PURE__*/_jsx(Tooltip, {
|
129
128
|
arrow: true,
|
130
129
|
title: label,
|
@@ -1,22 +1,28 @@
|
|
1
1
|
import React from "react";
|
2
|
-
import { Box, Card, CardMedia, Grid } from "@mui/material";
|
3
|
-
|
4
|
-
// const Select = (props) => {
|
5
|
-
// const { classes, data, onSelectTemplate } = props;
|
6
|
-
// return (
|
7
|
-
// <Box
|
8
|
-
// className="template-card-action"
|
9
|
-
// component={"div"}
|
10
|
-
// sx={classes.templateCardBtnGrp}
|
11
|
-
// style={{ padding: 0, background: "transparent"}}
|
12
|
-
// >
|
13
|
-
// <Button className="blueBtn" onClick={onSelectTemplate(data)}>
|
14
|
-
// Select
|
15
|
-
// </Button>
|
16
|
-
// </Box>
|
17
|
-
// );
|
18
|
-
// };
|
2
|
+
import { Box, Button, Card, CardMedia, Grid } from "@mui/material";
|
19
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
4
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
5
|
+
const Select = props => {
|
6
|
+
const {
|
7
|
+
classes,
|
8
|
+
data,
|
9
|
+
onSelectTemplate
|
10
|
+
} = props;
|
11
|
+
return /*#__PURE__*/_jsx(Box, {
|
12
|
+
className: "template-card-action",
|
13
|
+
component: "div",
|
14
|
+
sx: classes.templateCardBtnGrp,
|
15
|
+
style: {
|
16
|
+
padding: 0,
|
17
|
+
background: "transparent"
|
18
|
+
},
|
19
|
+
children: /*#__PURE__*/_jsx(Button, {
|
20
|
+
className: "blueBtn",
|
21
|
+
onClick: onSelectTemplate(data),
|
22
|
+
children: "Select"
|
23
|
+
})
|
24
|
+
});
|
25
|
+
};
|
20
26
|
const ButtonTemplateCard = props => {
|
21
27
|
const {
|
22
28
|
classes,
|
@@ -28,19 +34,19 @@ const ButtonTemplateCard = props => {
|
|
28
34
|
xs: 3,
|
29
35
|
children: /*#__PURE__*/_jsx(Card, {
|
30
36
|
sx: classes.paperOverrides,
|
31
|
-
children: /*#__PURE__*/
|
37
|
+
children: /*#__PURE__*/_jsxs(Box, {
|
32
38
|
sx: classes.buttonCardMediaWrpr,
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
})
|
39
|
+
children: [/*#__PURE__*/_jsx(CardMedia, {
|
40
|
+
className: `template-card-media`,
|
41
|
+
component: "div",
|
42
|
+
image: m?.thumbnail,
|
43
|
+
alt: m?.title,
|
44
|
+
sx: classes.buttonCardMedia
|
45
|
+
}), /*#__PURE__*/_jsx(Select, {
|
46
|
+
classes: classes,
|
47
|
+
onSelectTemplate: onSelectTemplate,
|
48
|
+
data: m
|
49
|
+
})]
|
44
50
|
})
|
45
51
|
})
|
46
52
|
}, `template_${m.id}`);
|
@@ -1,22 +1,27 @@
|
|
1
1
|
import React from "react";
|
2
|
-
import { Box, Card, CardMedia, Grid } from "@mui/material";
|
3
|
-
|
4
|
-
// const Select = (props) => {
|
5
|
-
// const { classes, data, onSelectTemplate } = props;
|
6
|
-
// return (
|
7
|
-
// <Box
|
8
|
-
// className="template-card-action"
|
9
|
-
// component={"div"}
|
10
|
-
// sx={classes.templateCardBtnGrp}
|
11
|
-
// style={{background: "transparent"}}
|
12
|
-
// >
|
13
|
-
// <Button className="blueBtn" onClick={onSelectTemplate(data)}>
|
14
|
-
// Select
|
15
|
-
// </Button>
|
16
|
-
// </Box>
|
17
|
-
// );
|
18
|
-
// };
|
2
|
+
import { Box, Button, Card, CardMedia, Grid } from "@mui/material";
|
19
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
4
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
5
|
+
const Select = props => {
|
6
|
+
const {
|
7
|
+
classes,
|
8
|
+
data,
|
9
|
+
onSelectTemplate
|
10
|
+
} = props;
|
11
|
+
return /*#__PURE__*/_jsx(Box, {
|
12
|
+
className: "template-card-action",
|
13
|
+
component: "div",
|
14
|
+
sx: classes.templateCardBtnGrp,
|
15
|
+
style: {
|
16
|
+
background: "transparent"
|
17
|
+
},
|
18
|
+
children: /*#__PURE__*/_jsx(Button, {
|
19
|
+
className: "blueBtn",
|
20
|
+
onClick: onSelectTemplate(data),
|
21
|
+
children: "Select"
|
22
|
+
})
|
23
|
+
});
|
24
|
+
};
|
20
25
|
const FullViewCard = props => {
|
21
26
|
const {
|
22
27
|
classes,
|
@@ -30,19 +35,19 @@ const FullViewCard = props => {
|
|
30
35
|
children: /*#__PURE__*/_jsx(Card, {
|
31
36
|
sx: classes.paperOverrides,
|
32
37
|
className: "paperOverrides",
|
33
|
-
children: /*#__PURE__*/
|
34
|
-
sx: classes.
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
})
|
38
|
+
children: /*#__PURE__*/_jsxs(Box, {
|
39
|
+
sx: classes.buttonCardMediaWrpr,
|
40
|
+
children: [/*#__PURE__*/_jsx(CardMedia, {
|
41
|
+
component: "div",
|
42
|
+
image: m?.thumbnail,
|
43
|
+
alt: m?.title,
|
44
|
+
sx: classes.fullViewCardMedia,
|
45
|
+
className: height
|
46
|
+
}), /*#__PURE__*/_jsx(Select, {
|
47
|
+
classes: classes,
|
48
|
+
onSelectTemplate: onSelectTemplate,
|
49
|
+
data: m
|
50
|
+
})]
|
46
51
|
})
|
47
52
|
})
|
48
53
|
}, `template_${m.id}`);
|