@flozy/editor 4.0.3 → 4.0.4
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Editor/CommonEditor.js +85 -13
- package/dist/Editor/DialogWrapper.js +4 -3
- package/dist/Editor/Editor.css +28 -2
- package/dist/Editor/Elements/AI/AIInput.js +31 -33
- package/dist/Editor/Elements/AI/CustomSelect.js +19 -12
- package/dist/Editor/Elements/AI/PopoverAIInput.js +119 -132
- package/dist/Editor/Elements/AI/Styles.js +2 -2
- package/dist/Editor/Elements/AI/VoiceToText/AudioWave.js +73 -0
- package/dist/Editor/Elements/AI/VoiceToText/index.js +184 -0
- package/dist/Editor/Elements/AI/VoiceToText/style.js +40 -0
- package/dist/Editor/Elements/AI/helper.js +5 -3
- package/dist/Editor/Elements/AppHeader/AppHeader.js +36 -23
- package/dist/Editor/Elements/Button/EditorButton.js +23 -16
- package/dist/Editor/Elements/Carousel/CarouselButton.js +2 -2
- package/dist/Editor/Elements/Color Picker/ColorButtons.js +1 -1
- package/dist/Editor/Elements/Color Picker/Styles.js +1 -0
- package/dist/Editor/Elements/Embed/Image.js +15 -14
- package/dist/Editor/Elements/Embed/Video.js +12 -8
- package/dist/Editor/Elements/Emoji/EmojiButton.js +11 -7
- package/dist/Editor/Elements/Form/Form.js +43 -27
- package/dist/Editor/Elements/Form/FormField.js +21 -10
- package/dist/Editor/Elements/Form/Workflow/index.js +5 -2
- package/dist/Editor/Elements/FreeGrid/FreeGrid.js +437 -0
- package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +206 -0
- package/dist/Editor/Elements/FreeGrid/FreeGridButton.js +23 -0
- package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +236 -0
- package/dist/Editor/Elements/FreeGrid/Options/AddElement.js +44 -0
- package/dist/Editor/Elements/FreeGrid/Options/More.js +24 -0
- package/dist/Editor/Elements/FreeGrid/Options/SectionSettings.js +47 -0
- package/dist/Editor/Elements/FreeGrid/Options/sectionItemOptions.js +19 -0
- package/dist/Editor/Elements/FreeGrid/breakpointConstants.js +75 -0
- package/dist/Editor/Elements/FreeGrid/styles.js +214 -0
- package/dist/Editor/Elements/Grid/Grid.js +12 -8
- package/dist/Editor/Elements/Grid/GridItem.js +31 -21
- package/dist/Editor/Elements/Link/LinkPopup.js +69 -13
- package/dist/Editor/Elements/Link/LinkPopupStyles.js +28 -0
- package/dist/Editor/Elements/NewLine/NewLineButton.js +2 -2
- package/dist/Editor/Elements/Signature/Signature.css +13 -6
- package/dist/Editor/Elements/Signature/SignatureOptions/UploadSignature.js +2 -1
- package/dist/Editor/Elements/Signature/SignaturePopup.js +186 -31
- package/dist/Editor/Elements/SimpleText/index.js +19 -7
- package/dist/Editor/Elements/SimpleText/style.js +44 -1
- package/dist/Editor/ErrorBoundary.js +30 -0
- package/dist/Editor/Styles/EditorStyles.js +28 -0
- package/dist/Editor/Toolbar/FormatTools/Dropdown.js +1 -1
- package/dist/Editor/Toolbar/FormatTools/TextSize.js +2 -2
- package/dist/Editor/Toolbar/Mini/MiniToolbar.js +33 -5
- package/dist/Editor/Toolbar/PopupTool/ButtonTemplatesCard.js +12 -13
- package/dist/Editor/Toolbar/PopupTool/FullViewCard.js +12 -13
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/CustomSelectTool.js +3 -0
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectSuperSubscript.js +59 -0
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +2 -1
- package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +107 -40
- package/dist/Editor/Toolbar/PopupTool/TextFormat.js +57 -61
- package/dist/Editor/Toolbar/PopupTool/index.js +13 -3
- package/dist/Editor/Toolbar/Toolbar.js +7 -0
- package/dist/Editor/Toolbar/toolbarGroups.js +15 -5
- package/dist/Editor/assets/svg/AIIcons.js +153 -1
- package/dist/Editor/common/EditorCmds.js +0 -3
- package/dist/Editor/common/EditorIcons.js +7 -7
- package/dist/Editor/common/Icon.js +39 -30
- package/dist/Editor/common/ImageList.js +16 -3
- package/dist/Editor/common/ImageSelector/ImageSelector.js +30 -9
- package/dist/Editor/common/ImageSelector/Styles.js +2 -1
- package/dist/Editor/common/LinkSettings/index.js +2 -1
- package/dist/Editor/common/LinkSettings/style.js +11 -8
- package/dist/Editor/common/MentionsPopup/Styles.js +1 -1
- package/dist/Editor/common/MentionsPopup/index.js +12 -8
- package/dist/Editor/common/RnD/ContextMenu/CMenus.js +142 -0
- package/dist/Editor/common/RnD/ContextMenu/index.js +38 -0
- package/dist/Editor/common/RnD/ContextMenu/styles.js +21 -0
- package/dist/Editor/common/RnD/DragInfo/index.js +31 -0
- package/dist/Editor/common/RnD/DragInfo/styles.js +15 -0
- package/dist/Editor/common/RnD/DragOver/index.js +55 -0
- package/dist/Editor/common/RnD/DragOver/styles.js +23 -0
- package/dist/Editor/common/RnD/ElementOptions/Actions.js +102 -0
- package/dist/Editor/common/RnD/ElementOptions/Icons/LinkIcon.js +26 -0
- package/dist/Editor/common/RnD/ElementOptions/index.js +95 -0
- package/dist/Editor/common/RnD/ElementOptions/styles.js +41 -0
- package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Link.js +153 -0
- package/dist/Editor/common/RnD/ElementSettings/OtherSettings/SaveAsTemplate.js +36 -0
- package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +60 -0
- package/dist/Editor/common/RnD/ElementSettings/OtherSettings/index.js +9 -0
- package/dist/Editor/common/RnD/ElementSettings/Settings/AppHeaderSettings.js +47 -0
- package/dist/Editor/common/RnD/ElementSettings/Settings/BoxSettings.js +47 -0
- package/dist/Editor/common/RnD/ElementSettings/Settings/ButtonSettings.js +47 -0
- package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +48 -0
- package/dist/Editor/common/RnD/ElementSettings/Settings/ImageSettings.js +47 -0
- package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +30 -0
- package/dist/Editor/common/RnD/ElementSettings/Settings/VideoSettings.js +47 -0
- package/dist/Editor/common/RnD/ElementSettings/Settings/index.js +17 -0
- package/dist/Editor/common/RnD/ElementSettings/index.js +17 -0
- package/dist/Editor/common/RnD/ElementSettings/settingsConstants.js +18 -0
- package/dist/Editor/common/RnD/ElementSettings/styles.js +94 -0
- package/dist/Editor/common/RnD/GuideLines/BoundaryLine.js +52 -0
- package/dist/Editor/common/RnD/GuideLines/index.js +33 -0
- package/dist/Editor/common/RnD/GuideLines/styles.js +62 -0
- package/dist/Editor/common/RnD/OptionsPopup/index.js +50 -0
- package/dist/Editor/common/RnD/OptionsPopup/style.js +36 -0
- package/dist/Editor/common/RnD/RnDCopy.js +23 -0
- package/dist/Editor/common/RnD/ShadowElement.js +34 -0
- package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +40 -0
- package/dist/Editor/common/RnD/SwitchViewport/styles.js +24 -0
- package/dist/Editor/common/RnD/Theme/ViewportStimulator.js +63 -0
- package/dist/Editor/common/RnD/TransformHandles/CornerHandle.js +19 -0
- package/dist/Editor/common/RnD/TransformHandles/Icons/BottomRightIcon.js +13 -0
- package/dist/Editor/common/RnD/TransformHandles/SizeHandle.js +20 -0
- package/dist/Editor/common/RnD/TransformHandles/index.js +67 -0
- package/dist/Editor/common/RnD/Utils/alignmentDetection.js +26 -0
- package/dist/Editor/common/RnD/Utils/calculateDropItem.js +98 -0
- package/dist/Editor/common/RnD/Utils/collisionDetection.js +52 -0
- package/dist/Editor/common/RnD/Utils/gridDropItem.js +181 -0
- package/dist/Editor/common/RnD/Utils/index.js +251 -0
- package/dist/Editor/common/RnD/VirtualElement/index.js +77 -0
- package/dist/Editor/common/RnD/VirtualElement/styles.js +27 -0
- package/dist/Editor/common/RnD/VirtualElement/updateAutoProps.js +28 -0
- package/dist/Editor/common/RnD/index.js +567 -0
- package/dist/Editor/common/RnD/styles.js +4 -0
- package/dist/Editor/common/Section/index.js +21 -12
- package/dist/Editor/common/Section/styles.js +7 -4
- package/dist/Editor/common/Shorthands/elements.js +21 -9
- package/dist/Editor/common/StyleBuilder/boxStyle.js +30 -0
- package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +18 -10
- package/dist/Editor/common/StyleBuilder/fieldTypes/saveAsTemplate.js +18 -5
- package/dist/Editor/common/StyleBuilder/fieldTypes/text.js +4 -2
- package/dist/Editor/common/StyleBuilder/index.js +6 -4
- package/dist/Editor/common/StyleBuilder/sectionStyle.js +13 -2
- package/dist/Editor/common/iconListV2.js +843 -0
- package/dist/Editor/commonStyle.js +6 -0
- package/dist/Editor/helper/RnD/focusOnNewItem.js +39 -0
- package/dist/Editor/helper/RnD/scrollToNewSection.js +24 -0
- package/dist/Editor/helper/breakpoint.js +5 -0
- package/dist/Editor/helper/index.js +139 -0
- package/dist/Editor/helper/theme.js +50 -1
- package/dist/Editor/hooks/useBreakpoints.js +34 -0
- package/dist/Editor/hooks/useMouseMove.js +36 -8
- package/dist/Editor/hooks/useWindowMessage.js +10 -7
- package/dist/Editor/hooks/withCommon.js +2 -1
- package/dist/Editor/hooks/withErrorHandling.js +14 -0
- package/dist/Editor/utils/RnD/RnDCtrlCmds.js +197 -0
- package/dist/Editor/utils/SlateUtilityFunctions.js +36 -4
- package/dist/Editor/utils/events.js +5 -0
- package/dist/Editor/utils/form.js +7 -2
- package/dist/Editor/utils/formfield.js +1 -1
- package/dist/Editor/utils/freegrid.js +91 -0
- package/dist/Editor/utils/helper.js +43 -0
- package/dist/Editor/utils/insertAppHeader.js +47 -40
- package/package.json +6 -2
@@ -1,5 +1,5 @@
|
|
1
1
|
import React, { useState } from "react";
|
2
|
-
import { Dialog, DialogTitle, DialogContent, DialogActions, Button, IconButton, Grid, TextField, Typography, Tabs, Tab } from "@mui/material";
|
2
|
+
import { Dialog, DialogTitle, DialogContent, DialogActions, Button, IconButton, Grid, TextField, Typography, Tabs, Tab, InputAdornment } 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";
|
@@ -9,6 +9,7 @@ import { DrawSignature, PencilIcon, TypeSignature, UploadSignature } from "../..
|
|
9
9
|
import useCommonStyle from "../../commonStyle";
|
10
10
|
import { useEditorContext } from "../../hooks/useMouseMove";
|
11
11
|
import { validationMethods } from "../Form/FormElements/validations";
|
12
|
+
import { CalenderDownIconSignature, CalenderIconSignature } from "../../common/iconListV2";
|
12
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
13
14
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
14
15
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
@@ -32,12 +33,14 @@ const SignaturePopup = props => {
|
|
32
33
|
const [open, setOpen] = useState(false);
|
33
34
|
const [tab, setTab] = useState(0);
|
34
35
|
const SeletectedTab = SignatureOptions[tab];
|
36
|
+
const defaultName = metadata?.signatureDetails?.name;
|
37
|
+
const defaultEmail = metadata?.signatureDetails?.email;
|
35
38
|
const [signedData, setSignedData] = useState({
|
36
39
|
signedOn: new Date(),
|
37
40
|
signature: "",
|
38
41
|
signedText: "",
|
39
|
-
signedBy: "",
|
40
|
-
signedByEmail: ""
|
42
|
+
signedBy: defaultName || "",
|
43
|
+
signedByEmail: defaultEmail || ""
|
41
44
|
});
|
42
45
|
const [brush, setBrush] = useState({
|
43
46
|
size: 1,
|
@@ -133,7 +136,15 @@ const SignaturePopup = props => {
|
|
133
136
|
open: open,
|
134
137
|
onClose: handleClose,
|
135
138
|
fullWidth: true,
|
136
|
-
|
139
|
+
PaperProps: {
|
140
|
+
sx: {
|
141
|
+
borderRadius: '8px',
|
142
|
+
boxShadow: "0px 4px 10px 0px #00000029",
|
143
|
+
overflowY: tab === 0 ? "hidden" : "auto",
|
144
|
+
maxWidth: "560px",
|
145
|
+
...classes.signaturePopup
|
146
|
+
}
|
147
|
+
},
|
137
148
|
children: /*#__PURE__*/_jsx(Grid, {
|
138
149
|
container: true,
|
139
150
|
children: /*#__PURE__*/_jsxs(Grid, {
|
@@ -154,9 +165,13 @@ const SignaturePopup = props => {
|
|
154
165
|
item: true,
|
155
166
|
children: /*#__PURE__*/_jsx(Typography, {
|
156
167
|
variant: "h6",
|
157
|
-
className:
|
168
|
+
className: `${classes.popupTitle2}`,
|
158
169
|
color: "primary",
|
159
|
-
|
170
|
+
sx: {
|
171
|
+
fontWeight: 600,
|
172
|
+
color: "#000000"
|
173
|
+
},
|
174
|
+
children: "Signature"
|
160
175
|
})
|
161
176
|
}), /*#__PURE__*/_jsx(Grid, {
|
162
177
|
item: true,
|
@@ -196,24 +211,39 @@ const SignaturePopup = props => {
|
|
196
211
|
children: [/*#__PURE__*/_jsx(Tab, {
|
197
212
|
label: /*#__PURE__*/_jsxs(Grid, {
|
198
213
|
className: "dflex alignCenter",
|
199
|
-
children: [/*#__PURE__*/_jsx(DrawSignature, {
|
214
|
+
children: [/*#__PURE__*/_jsx(DrawSignature, {
|
215
|
+
fill: tab === 0 ? "#2563EB" : "#A2B0B9"
|
216
|
+
}), /*#__PURE__*/_jsx("span", {
|
200
217
|
className: "ml-1",
|
218
|
+
style: {
|
219
|
+
textTransform: "none"
|
220
|
+
},
|
201
221
|
children: "Draw Signature"
|
202
222
|
})]
|
203
223
|
})
|
204
224
|
}), /*#__PURE__*/_jsx(Tab, {
|
205
225
|
label: /*#__PURE__*/_jsxs(Grid, {
|
206
226
|
className: "dflex alignCenter",
|
207
|
-
children: [/*#__PURE__*/_jsx(TypeSignature, {
|
227
|
+
children: [/*#__PURE__*/_jsx(TypeSignature, {
|
228
|
+
fill: tab === 1 ? "#2563EB" : "#A2B0B9"
|
229
|
+
}), /*#__PURE__*/_jsx("span", {
|
208
230
|
className: "ml-1",
|
231
|
+
style: {
|
232
|
+
textTransform: "none"
|
233
|
+
},
|
209
234
|
children: "Type Signature"
|
210
235
|
})]
|
211
236
|
})
|
212
237
|
}), /*#__PURE__*/_jsx(Tab, {
|
213
238
|
label: /*#__PURE__*/_jsxs(Grid, {
|
214
239
|
className: "dflex alignCenter",
|
215
|
-
children: [/*#__PURE__*/_jsx(UploadSignature, {
|
240
|
+
children: [/*#__PURE__*/_jsx(UploadSignature, {
|
241
|
+
fill: tab === 2 ? "#2563EB" : "#A2B0B9"
|
242
|
+
}), /*#__PURE__*/_jsx("span", {
|
216
243
|
className: "ml-1",
|
244
|
+
style: {
|
245
|
+
textTransform: "none"
|
246
|
+
},
|
217
247
|
children: "Upload Signature"
|
218
248
|
})]
|
219
249
|
})
|
@@ -244,7 +274,9 @@ const SignaturePopup = props => {
|
|
244
274
|
xs: 6,
|
245
275
|
style: {
|
246
276
|
display: "flex",
|
247
|
-
alignItems: "center"
|
277
|
+
alignItems: "center",
|
278
|
+
fontSize: "14px",
|
279
|
+
fontFamily: '"Inter", sans-serif"'
|
248
280
|
},
|
249
281
|
children: [/*#__PURE__*/_jsx(Grid, {
|
250
282
|
style: {
|
@@ -252,6 +284,11 @@ const SignaturePopup = props => {
|
|
252
284
|
},
|
253
285
|
children: /*#__PURE__*/_jsx("label", {
|
254
286
|
htmlFor: "signedBy",
|
287
|
+
style: {
|
288
|
+
fontFamily: '"Inter", sans-serif',
|
289
|
+
fontWeight: 500,
|
290
|
+
fontSize: "14px"
|
291
|
+
},
|
255
292
|
children: "Name:"
|
256
293
|
})
|
257
294
|
}), /*#__PURE__*/_jsx(Grid, {
|
@@ -262,8 +299,28 @@ const SignaturePopup = props => {
|
|
262
299
|
id: "signedBy",
|
263
300
|
name: "signedBy",
|
264
301
|
placeholder: "Enter Name",
|
302
|
+
defaultValue: defaultName || "",
|
265
303
|
size: "small",
|
266
|
-
onChange: onChange
|
304
|
+
onChange: onChange,
|
305
|
+
sx: {
|
306
|
+
'& .MuiOutlinedInput-root': {
|
307
|
+
borderRadius: '10px',
|
308
|
+
'& fieldset': {
|
309
|
+
borderColor: "1px solid #D8DDE1"
|
310
|
+
}
|
311
|
+
// '&:hover fieldset': {
|
312
|
+
// borderColor: 'yourHoverColor',
|
313
|
+
// },
|
314
|
+
// '&.Mui-focused fieldset': {
|
315
|
+
// borderColor: 'yourFocusedColor',
|
316
|
+
// },
|
317
|
+
},
|
318
|
+
|
319
|
+
'& .MuiInputBase-input::placeholder': {
|
320
|
+
fontFamily: '"Inter", sans-serif"',
|
321
|
+
fontSize: "14px"
|
322
|
+
}
|
323
|
+
}
|
267
324
|
})
|
268
325
|
})]
|
269
326
|
}), /*#__PURE__*/_jsxs(Grid, {
|
@@ -277,8 +334,14 @@ const SignaturePopup = props => {
|
|
277
334
|
style: {
|
278
335
|
marginRight: "8px"
|
279
336
|
},
|
337
|
+
xs: 2,
|
280
338
|
children: /*#__PURE__*/_jsx("label", {
|
281
339
|
htmlFor: "signedOn",
|
340
|
+
style: {
|
341
|
+
fontFamily: '"Inter", sans-serif',
|
342
|
+
fontWeight: 500,
|
343
|
+
fontSize: "14px"
|
344
|
+
},
|
282
345
|
children: "Date:"
|
283
346
|
})
|
284
347
|
}), /*#__PURE__*/_jsx(Grid, {
|
@@ -288,45 +351,121 @@ const SignaturePopup = props => {
|
|
288
351
|
},
|
289
352
|
xs: 12,
|
290
353
|
children: /*#__PURE__*/_jsx(DatePicker, {
|
291
|
-
|
292
|
-
id: "signedOn",
|
293
|
-
name: "signedOn",
|
294
|
-
selected: signedData?.signedOn ? new Date(signedData?.signedOn) : new Date(),
|
295
|
-
value: signedData?.signedOn || "",
|
296
|
-
dateFormat: "MM/dd/yyyy",
|
354
|
+
selected: signedData.signedOn,
|
297
355
|
onChange: date => {
|
298
356
|
setSignedData({
|
299
357
|
...signedData,
|
300
|
-
signedOn: date
|
358
|
+
signedOn: date
|
301
359
|
});
|
302
|
-
}
|
360
|
+
},
|
361
|
+
dateFormat: "yyyy/MM/dd",
|
362
|
+
customInput: /*#__PURE__*/_jsx(TextField, {
|
363
|
+
fullWidth: true,
|
364
|
+
name: "signedOn",
|
365
|
+
placeholder: "Select Date",
|
366
|
+
size: "small",
|
367
|
+
InputProps: {
|
368
|
+
startAdornment: /*#__PURE__*/_jsx(InputAdornment, {
|
369
|
+
position: "start",
|
370
|
+
sx: {
|
371
|
+
padding: 0,
|
372
|
+
// Remove padding around the InputAdornment
|
373
|
+
margin: 0 // Remove any margins
|
374
|
+
},
|
375
|
+
children: /*#__PURE__*/_jsx(IconButton, {
|
376
|
+
children: /*#__PURE__*/_jsx(CalenderIconSignature, {})
|
377
|
+
})
|
378
|
+
}),
|
379
|
+
endAdornment: /*#__PURE__*/_jsx(InputAdornment, {
|
380
|
+
position: "end",
|
381
|
+
children: /*#__PURE__*/_jsx(IconButton, {
|
382
|
+
children: /*#__PURE__*/_jsx(CalenderDownIconSignature, {})
|
383
|
+
})
|
384
|
+
}),
|
385
|
+
sx: {
|
386
|
+
"& .MuiOutlinedInput-notchedOutline": {
|
387
|
+
borderColor: "transparent" // Remove the internal border
|
388
|
+
},
|
389
|
+
|
390
|
+
"& .MuiInputBase-input": {
|
391
|
+
border: "none",
|
392
|
+
// Ensure no border inside the input field
|
393
|
+
padding: "4px 0",
|
394
|
+
// Adjust padding for consistency
|
395
|
+
boxShadow: "none !important",
|
396
|
+
color: "#778599 !important"
|
397
|
+
}
|
398
|
+
}
|
399
|
+
},
|
400
|
+
sx: {
|
401
|
+
"& .MuiOutlinedInput-root": {
|
402
|
+
borderRadius: "10px",
|
403
|
+
backgroundColor: "#fff",
|
404
|
+
padding: "0px !important",
|
405
|
+
"&:hover fieldset": {
|
406
|
+
borderColor: "#D8DDE1" // Keeps the border on hover only around the outer field
|
407
|
+
},
|
408
|
+
|
409
|
+
"& fieldset": {
|
410
|
+
borderColor: "#D8DDE1" // Keeps the outer border light
|
411
|
+
}
|
412
|
+
}
|
413
|
+
}
|
414
|
+
})
|
303
415
|
})
|
304
416
|
})]
|
305
417
|
}), /*#__PURE__*/_jsxs(Grid, {
|
306
418
|
item: true,
|
307
|
-
xs:
|
419
|
+
xs: 12,
|
308
420
|
style: {
|
309
421
|
display: "flex",
|
310
422
|
alignItems: "center"
|
311
423
|
},
|
312
424
|
children: [/*#__PURE__*/_jsx(Grid, {
|
313
425
|
style: {
|
314
|
-
marginRight: "
|
426
|
+
marginRight: "6px"
|
315
427
|
},
|
428
|
+
xs: 1,
|
316
429
|
children: /*#__PURE__*/_jsx("label", {
|
317
430
|
htmlFor: "signedByEmail",
|
431
|
+
style: {
|
432
|
+
fontFamily: '"Inter", sans-serif',
|
433
|
+
fontWeight: 500,
|
434
|
+
fontSize: "14px"
|
435
|
+
},
|
318
436
|
children: "Email:"
|
319
437
|
})
|
320
438
|
}), /*#__PURE__*/_jsx(Grid, {
|
439
|
+
container: true,
|
321
440
|
item: true,
|
322
|
-
xs:
|
441
|
+
xs: 11,
|
323
442
|
children: /*#__PURE__*/_jsx(TextField, {
|
324
443
|
fullWidth: true,
|
325
444
|
id: "signedByEmail",
|
326
445
|
name: "signedByEmail",
|
327
446
|
placeholder: "Enter Email",
|
328
447
|
size: "small",
|
329
|
-
onChange: onChange
|
448
|
+
onChange: onChange,
|
449
|
+
sx: {
|
450
|
+
'& .MuiOutlinedInput-root': {
|
451
|
+
borderRadius: '10px',
|
452
|
+
'& fieldset': {
|
453
|
+
borderColor: "1px solid #D8DDE1"
|
454
|
+
}
|
455
|
+
// '&:hover fieldset': {
|
456
|
+
// borderColor: 'yourHoverColor',
|
457
|
+
// },
|
458
|
+
// '&.Mui-focused fieldset': {
|
459
|
+
// borderColor: 'yourFocusedColor',
|
460
|
+
// },
|
461
|
+
},
|
462
|
+
|
463
|
+
'& .MuiInputBase-input::placeholder': {
|
464
|
+
fontFamily: '"Inter", sans-serif"',
|
465
|
+
fontSize: "14px"
|
466
|
+
}
|
467
|
+
},
|
468
|
+
defaultValue: defaultEmail || ""
|
330
469
|
})
|
331
470
|
})]
|
332
471
|
})]
|
@@ -343,14 +482,30 @@ const SignaturePopup = props => {
|
|
343
482
|
children: [/*#__PURE__*/_jsx(Grid, {
|
344
483
|
item: true,
|
345
484
|
sx: {
|
346
|
-
mr:
|
485
|
+
mr: 3
|
347
486
|
},
|
348
|
-
children: /*#__PURE__*/
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
487
|
+
children: /*#__PURE__*/_jsxs(Grid, {
|
488
|
+
container: true,
|
489
|
+
alignItems: "center",
|
490
|
+
sx: {
|
491
|
+
display: 'flex'
|
492
|
+
},
|
493
|
+
children: [/*#__PURE__*/_jsx("input", {
|
494
|
+
type: "color",
|
495
|
+
className: "brushcolorpic signColorPicker",
|
496
|
+
onChange: onBrushColor,
|
497
|
+
size: "4",
|
498
|
+
value: brush?.color
|
499
|
+
}), /*#__PURE__*/_jsx("span", {
|
500
|
+
style: {
|
501
|
+
marginLeft: "10px",
|
502
|
+
fontFamily: '"Inter", sans-serif',
|
503
|
+
fontSize: "14px",
|
504
|
+
fontWeight: 500,
|
505
|
+
color: "#333"
|
506
|
+
},
|
507
|
+
children: brush.color
|
508
|
+
})]
|
354
509
|
})
|
355
510
|
}), /*#__PURE__*/_jsx(Grid, {
|
356
511
|
item: true,
|
@@ -381,7 +536,7 @@ const SignaturePopup = props => {
|
|
381
536
|
children: [!readOnly ? /*#__PURE__*/_jsx(Button, {
|
382
537
|
onClick: handleClear,
|
383
538
|
className: "secondaryBtn",
|
384
|
-
children: "
|
539
|
+
children: "Clear"
|
385
540
|
}) : null, /*#__PURE__*/_jsx(Button, {
|
386
541
|
onClick: handleSave,
|
387
542
|
className: `primaryBtn ${isEmpty ? "disabled" : ""}`,
|
@@ -6,7 +6,9 @@ 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";
|
11
|
+
import { createElement as _createElement } from "react";
|
10
12
|
const SimpleText = props => {
|
11
13
|
const {
|
12
14
|
theme,
|
@@ -38,15 +40,25 @@ const SimpleText = props => {
|
|
38
40
|
const showPlaceHolder = !readOnly && path.length === 1 && isEmpty;
|
39
41
|
const isEmptyEditor = !readOnly && isEmpty && editor.children.length === 1 && !selected;
|
40
42
|
const opacity = !isTextSelected(editor?.selection);
|
41
|
-
|
43
|
+
const nextType = element?.children[0]?.type;
|
44
|
+
return /*#__PURE__*/_createElement(Box, {
|
42
45
|
...element.attr,
|
43
46
|
...attributes,
|
44
|
-
className: `simple-text`,
|
47
|
+
className: `simple-text ${nextType}`,
|
45
48
|
sx: classes.root,
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
49
|
+
key: `para_${path.join("|")}`
|
50
|
+
}, children, openAI ? null : /*#__PURE__*/_jsx("span", {
|
51
|
+
className: "placeholder-simple-text",
|
52
|
+
children: isEmptyEditor ? editorPlaceholder || "Write Something..." : showPlaceHolder ? opacity && selected ? /*#__PURE__*/_jsxs(_Fragment, {
|
53
|
+
children: ["Type ", /*#__PURE__*/_jsx("span", {
|
54
|
+
style: {
|
55
|
+
backgroundColor: '#F2F6FA',
|
56
|
+
padding: "0px 2px",
|
57
|
+
borderRadius: "2px"
|
58
|
+
},
|
59
|
+
children: "/"
|
60
|
+
}), " to browse elements"]
|
61
|
+
}) : "" : ""
|
62
|
+
}));
|
51
63
|
};
|
52
64
|
export default SimpleText;
|
@@ -6,7 +6,7 @@ const SimpleTextStyle = ({
|
|
6
6
|
position: "relative",
|
7
7
|
padding: "0px",
|
8
8
|
"& .placeholder-simple-text": {
|
9
|
-
color:
|
9
|
+
color: "#94A3B8",
|
10
10
|
background: "transparent",
|
11
11
|
position: "absolute",
|
12
12
|
zIndex: -1,
|
@@ -23,6 +23,49 @@ const SimpleTextStyle = ({
|
|
23
23
|
background: "transparent",
|
24
24
|
color: invertColor(pageColor)
|
25
25
|
}
|
26
|
+
},
|
27
|
+
"& .freegrid-section": {
|
28
|
+
"&.enable-1:before": {
|
29
|
+
content: "' '",
|
30
|
+
pointerEvents: "none",
|
31
|
+
position: "absolute",
|
32
|
+
left: "2px",
|
33
|
+
top: "2px",
|
34
|
+
width: "calc(100% - 4px)",
|
35
|
+
height: "calc(100% - 4px)",
|
36
|
+
outline: "2px solid #2563EB",
|
37
|
+
zIndex: 1
|
38
|
+
},
|
39
|
+
"&:hover, &.enable-1": {
|
40
|
+
"& .freegrid-section-infos": {
|
41
|
+
pointerEvents: "none",
|
42
|
+
position: "absolute",
|
43
|
+
top: 0,
|
44
|
+
left: 0,
|
45
|
+
width: "100%",
|
46
|
+
zIndex: 1,
|
47
|
+
":before": {
|
48
|
+
position: "absolute",
|
49
|
+
content: "attr(placeholder)",
|
50
|
+
left: "0px",
|
51
|
+
top: "0px",
|
52
|
+
width: "auto",
|
53
|
+
height: "auto",
|
54
|
+
backgroundColor: "#8360FD",
|
55
|
+
padding: "4px 6px",
|
56
|
+
fontSize: "12px",
|
57
|
+
fontWeight: "500",
|
58
|
+
color: "#FFF",
|
59
|
+
lineHeight: "12px"
|
60
|
+
}
|
61
|
+
}
|
62
|
+
},
|
63
|
+
"& .bottom-handle": {
|
64
|
+
"&.parent": {
|
65
|
+
bottom: "2px !important",
|
66
|
+
zIndex: 1
|
67
|
+
}
|
68
|
+
}
|
26
69
|
}
|
27
70
|
},
|
28
71
|
section: {
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import React, { Component } from "react";
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
3
|
+
class ErrorBoundary extends Component {
|
4
|
+
constructor(props) {
|
5
|
+
super(props);
|
6
|
+
this.state = {
|
7
|
+
hasError: false
|
8
|
+
};
|
9
|
+
}
|
10
|
+
static getDerivedStateFromError(error) {
|
11
|
+
// Update state so the next render will show the fallback UI.
|
12
|
+
return {
|
13
|
+
hasError: true
|
14
|
+
};
|
15
|
+
}
|
16
|
+
componentDidCatch(error, errorInfo) {
|
17
|
+
// You can also log the error to an error reporting service
|
18
|
+
console.error("Error caught in Error Boundary: ", error, errorInfo);
|
19
|
+
}
|
20
|
+
render() {
|
21
|
+
if (this.state.hasError) {
|
22
|
+
// You can render any custom fallback UI
|
23
|
+
return /*#__PURE__*/_jsx("h1", {
|
24
|
+
children: "Something went wrong."
|
25
|
+
});
|
26
|
+
}
|
27
|
+
return this.props.children;
|
28
|
+
}
|
29
|
+
}
|
30
|
+
export default ErrorBoundary;
|
@@ -29,6 +29,33 @@ const editorStyles = ({
|
|
29
29
|
"& .MuiOutlinedInput-input": {
|
30
30
|
color: theme?.palette?.editor?.textColor || "black"
|
31
31
|
}
|
32
|
+
},
|
33
|
+
"&.stimulate-xs": {
|
34
|
+
"& .scrollable-content": {
|
35
|
+
width: "320px"
|
36
|
+
},
|
37
|
+
":before": {
|
38
|
+
content: '" "',
|
39
|
+
position: "absolute",
|
40
|
+
top: 0,
|
41
|
+
left: 0,
|
42
|
+
width: "calc(50% - 162px)",
|
43
|
+
height: "100%",
|
44
|
+
pointerEvents: "none",
|
45
|
+
backgroundColor: "#FFF",
|
46
|
+
zIndex: 10
|
47
|
+
},
|
48
|
+
":after": {
|
49
|
+
content: '" "',
|
50
|
+
position: "absolute",
|
51
|
+
top: 0,
|
52
|
+
right: 0,
|
53
|
+
width: "calc(50% - 160px)",
|
54
|
+
height: "100%",
|
55
|
+
pointerEvents: "none",
|
56
|
+
backgroundColor: "#FFF",
|
57
|
+
zIndex: 10
|
58
|
+
}
|
32
59
|
}
|
33
60
|
},
|
34
61
|
slateWrapper: {
|
@@ -243,6 +270,7 @@ const editorStyles = ({
|
|
243
270
|
}
|
244
271
|
},
|
245
272
|
"&.hideScroll": {
|
273
|
+
overflowAnchor: "none",
|
246
274
|
"&::-webkit-scrollbar-track": {
|
247
275
|
background: "none !important"
|
248
276
|
},
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React, { useEffect, useState } from "react";
|
1
|
+
import React, { useEffect, useRef, useState } from "react";
|
2
2
|
import { useSlate } from "slate-react";
|
3
3
|
import { Box, Dialog, IconButton, Paper, Popper, Tooltip } from "@mui/material";
|
4
4
|
import MENU_OPTIONS from "./Options/Options";
|
@@ -18,6 +18,11 @@ const POPUP_TYPES = {
|
|
18
18
|
addElement: AddElements,
|
19
19
|
addTemplate: AddTemplates
|
20
20
|
};
|
21
|
+
const POPUP_OFFSETS = {
|
22
|
+
textFormat: [80, 5],
|
23
|
+
addElement: [60, 5],
|
24
|
+
addTemplate: [20, 5]
|
25
|
+
};
|
21
26
|
const FULLSCREEN_POPUP = {
|
22
27
|
addTemplate: true
|
23
28
|
};
|
@@ -44,6 +49,7 @@ const MiniToolbar = props => {
|
|
44
49
|
const {
|
45
50
|
hideTools
|
46
51
|
} = customProps;
|
52
|
+
const boxRef = useRef(null); // Add ref to get the Box element
|
47
53
|
const UPDATED_MENU_OPTIONS = MENU_OPTIONS.filter(f => (hideTools || [])?.indexOf(f.type) === -1);
|
48
54
|
const {
|
49
55
|
popupType
|
@@ -82,20 +88,35 @@ const MiniToolbar = props => {
|
|
82
88
|
};
|
83
89
|
const closePopper = data => {
|
84
90
|
setData(data);
|
85
|
-
setToolTip(
|
91
|
+
setToolTip(false);
|
92
|
+
};
|
93
|
+
|
94
|
+
// Calculate center of Box for Popper/Modal positioning
|
95
|
+
const getBoxCenter = () => {
|
96
|
+
if (boxRef.current) {
|
97
|
+
const rect = boxRef.current.getBoundingClientRect();
|
98
|
+
return {
|
99
|
+
top: rect.top + rect.height / 2,
|
100
|
+
left: rect.left + rect.width / 2
|
101
|
+
};
|
102
|
+
}
|
103
|
+
return {
|
104
|
+
top: 0,
|
105
|
+
left: 0
|
106
|
+
};
|
86
107
|
};
|
87
108
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
88
109
|
children: [/*#__PURE__*/_jsx(Box, {
|
89
110
|
component: "div",
|
90
111
|
className: "mini-tool-wrpr-ei",
|
91
112
|
sx: classes.root,
|
113
|
+
ref: boxRef,
|
92
114
|
children: UPDATED_MENU_OPTIONS.map(({
|
93
115
|
type,
|
94
116
|
label,
|
95
117
|
icon: Icon
|
96
118
|
}) => {
|
97
|
-
const isDisabled = popupType === type || type === 'undo' ? !canUndo : type === 'redo' ? !canRedo : false;
|
98
|
-
|
119
|
+
const isDisabled = popupType === type || type === 'undo' ? !canUndo : type === 'redo' ? !canRedo : false;
|
99
120
|
return /*#__PURE__*/_jsx(Tooltip, {
|
100
121
|
arrow: true,
|
101
122
|
title: label,
|
@@ -123,11 +144,18 @@ const MiniToolbar = props => {
|
|
123
144
|
}), /*#__PURE__*/_jsx(DialogComp, {
|
124
145
|
open: open,
|
125
146
|
onClose: onClose,
|
126
|
-
anchorEl: anchorEl
|
147
|
+
anchorEl: anchorEl || getBoxCenter() // Positioning at center of Box
|
148
|
+
,
|
127
149
|
placement: "top",
|
128
150
|
sx: popupStyles.popupWrapper,
|
129
151
|
className: `tools-drawer ${fullScreen ? "fullscreen" : ""}`,
|
130
152
|
fullScreen: fullScreen,
|
153
|
+
modifiers: [{
|
154
|
+
name: "offset",
|
155
|
+
options: {
|
156
|
+
offset: POPUP_OFFSETS[popper] || [0, 10] // Add some space between anchor and popper
|
157
|
+
}
|
158
|
+
}],
|
131
159
|
children: PopupComponent ? /*#__PURE__*/_jsxs(Paper, {
|
132
160
|
className: "papper-wrpr",
|
133
161
|
style: {
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import { Box, Button, Card, CardMedia, Grid } from "@mui/material";
|
3
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
4
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
5
4
|
const Select = props => {
|
6
5
|
const {
|
7
6
|
classes,
|
@@ -34,19 +33,19 @@ const ButtonTemplateCard = props => {
|
|
34
33
|
xs: 3,
|
35
34
|
children: /*#__PURE__*/_jsx(Card, {
|
36
35
|
sx: classes.paperOverrides,
|
37
|
-
children: /*#__PURE__*/
|
36
|
+
children: /*#__PURE__*/_jsx(Box, {
|
38
37
|
sx: classes.buttonCardMediaWrpr,
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
})
|
38
|
+
onClick: onSelectTemplate(m),
|
39
|
+
children: /*#__PURE__*/_jsx("div", {
|
40
|
+
className: "img-wrapper",
|
41
|
+
children: /*#__PURE__*/_jsx(CardMedia, {
|
42
|
+
className: `template-card-media`,
|
43
|
+
component: "div",
|
44
|
+
image: m?.thumbnail,
|
45
|
+
alt: m?.title,
|
46
|
+
sx: classes.buttonCardMedia
|
47
|
+
})
|
48
|
+
})
|
50
49
|
})
|
51
50
|
})
|
52
51
|
}, `template_${m.id}`);
|