@flozy/editor 5.3.6 → 5.3.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. package/dist/Editor/CommonEditor.js +14 -8
  2. package/dist/Editor/Editor.css +58 -22
  3. package/dist/Editor/Elements/Accordion/Accordion.js +8 -1
  4. package/dist/Editor/Elements/AppHeader/AppHeader.js +6 -6
  5. package/dist/Editor/Elements/Button/EditorButton.js +9 -2
  6. package/dist/Editor/Elements/Color Picker/ColorButtons.js +4 -2
  7. package/dist/Editor/Elements/DataView/DataView.js +124 -0
  8. package/dist/Editor/Elements/DataView/DataViewButton.js +23 -0
  9. package/dist/Editor/Elements/DataView/Layouts/ColumnView.js +67 -0
  10. package/dist/Editor/Elements/DataView/Layouts/DataTypes/CheckType.js +33 -0
  11. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/Select.js +162 -0
  12. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/SimpleSelect.js +40 -0
  13. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/styles.js +67 -0
  14. package/dist/Editor/Elements/DataView/Layouts/DataTypes/DateType.js +35 -0
  15. package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +39 -0
  16. package/dist/Editor/Elements/DataView/Layouts/DataTypes/NumberType.js +30 -0
  17. package/dist/Editor/Elements/DataView/Layouts/DataTypes/PersonType.js +30 -0
  18. package/dist/Editor/Elements/DataView/Layouts/DataTypes/SelectType.js +35 -0
  19. package/dist/Editor/Elements/DataView/Layouts/DataTypes/TextType.js +36 -0
  20. package/dist/Editor/Elements/DataView/Layouts/DataTypes/index.js +17 -0
  21. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseField.js +29 -0
  22. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseSort.js +38 -0
  23. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/index.js +74 -0
  24. package/dist/Editor/Elements/DataView/Layouts/FilterSort/index.js +64 -0
  25. package/dist/Editor/Elements/DataView/Layouts/FilterSort/styles.js +106 -0
  26. package/dist/Editor/Elements/DataView/Layouts/FilterView.js +174 -0
  27. package/dist/Editor/Elements/DataView/Layouts/Formula.js +29 -0
  28. package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +113 -0
  29. package/dist/Editor/Elements/DataView/Layouts/Options/AddProperty.js +37 -0
  30. package/dist/Editor/Elements/DataView/Layouts/Options/AllProperties.js +111 -0
  31. package/dist/Editor/Elements/DataView/Layouts/Options/ChangeProperty.js +60 -0
  32. package/dist/Editor/Elements/DataView/Layouts/Options/ColumnsList.js +36 -0
  33. package/dist/Editor/Elements/DataView/Layouts/Options/Constants.js +101 -0
  34. package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +160 -0
  35. package/dist/Editor/Elements/DataView/Layouts/Options/EditProperty.js +190 -0
  36. package/dist/Editor/Elements/DataView/Layouts/Options/FilterProperty.js +42 -0
  37. package/dist/Editor/Elements/DataView/Layouts/Options/PropertyList.js +30 -0
  38. package/dist/Editor/Elements/DataView/Layouts/Options/index.js +110 -0
  39. package/dist/Editor/Elements/DataView/Layouts/Options/styles.js +179 -0
  40. package/dist/Editor/Elements/DataView/Layouts/TableStyles.js +112 -0
  41. package/dist/Editor/Elements/DataView/Layouts/TableView.js +227 -0
  42. package/dist/Editor/Elements/DataView/Layouts/ViewData.js +80 -0
  43. package/dist/Editor/Elements/DataView/Layouts/colStyles.js +10 -0
  44. package/dist/Editor/Elements/DataView/Layouts/index.js +25 -0
  45. package/dist/Editor/Elements/DataView/Providers/DataViewProvider.js +281 -0
  46. package/dist/Editor/Elements/DataView/Utils/globalSearch.js +15 -0
  47. package/dist/Editor/Elements/DataView/Utils/multiSortRows.js +74 -0
  48. package/dist/Editor/Elements/DataView/styles.js +154 -0
  49. package/dist/Editor/Elements/Divider/Divider.js +24 -9
  50. package/dist/Editor/Elements/Embed/Image.js +31 -12
  51. package/dist/Editor/Elements/Embed/Video.js +13 -2
  52. package/dist/Editor/Elements/Form/Form.js +1 -0
  53. package/dist/Editor/Elements/FreeGrid/breakpointConstants.js +4 -4
  54. package/dist/Editor/Elements/FreeGrid/styles.js +2 -1
  55. package/dist/Editor/Elements/Grid/GridItem.js +2 -0
  56. package/dist/Editor/Elements/Grid/Styles.js +44 -0
  57. package/dist/Editor/Elements/List/CheckList.js +2 -1
  58. package/dist/Editor/Elements/Search/SearchAttachment.js +1 -0
  59. package/dist/Editor/Elements/Signature/SignaturePopup.js +4 -4
  60. package/dist/Editor/Elements/SimpleText/index.js +8 -1
  61. package/dist/Editor/Elements/SimpleText/style.js +10 -1
  62. package/dist/Editor/Elements/Table/Table.js +2 -4
  63. package/dist/Editor/Elements/Table/TableCell.js +5 -10
  64. package/dist/Editor/Elements/TopBanner/TopBanner.js +2 -1
  65. package/dist/Editor/MiniEditor.js +15 -1
  66. package/dist/Editor/Styles/EditorStyles.js +5 -3
  67. package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +17 -1
  68. package/dist/Editor/Toolbar/FormatTools/TextSize.js +5 -3
  69. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +210 -72
  70. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +56 -8
  71. package/dist/Editor/Toolbar/Toolbar.js +6 -0
  72. package/dist/Editor/Toolbar/toolbarGroups.js +4 -0
  73. package/dist/Editor/assets/svg/SettingsIcon.js +4 -4
  74. package/dist/Editor/common/ColorPickerButton.js +5 -3
  75. package/dist/Editor/common/DnD/Draggable.js +2 -1
  76. package/dist/Editor/common/FontLoader/FontLoader.js +4 -4
  77. package/dist/Editor/common/Icon.js +6 -0
  78. package/dist/Editor/common/ImageSelector/Options/Upload.js +2 -1
  79. package/dist/Editor/common/ImageSelector/Styles.js +47 -6
  80. package/dist/Editor/common/ImageSelector/UploadStyles.js +18 -6
  81. package/dist/Editor/common/MentionsPopup/Styles.js +109 -122
  82. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +1 -0
  83. package/dist/Editor/common/RnD/GuideLines/styles.js +3 -3
  84. package/dist/Editor/common/RnD/ShadowElement.js +1 -1
  85. package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +14 -2
  86. package/dist/Editor/common/RnD/Utils/gridDropItem.js +9 -6
  87. package/dist/Editor/common/RnD/index.js +2 -1
  88. package/dist/Editor/common/Section/index.js +3 -3
  89. package/dist/Editor/common/Section/styles.js +5 -1
  90. package/dist/Editor/common/Shorthands/elements.js +13 -1
  91. package/dist/Editor/common/StyleBuilder/fieldStyle.js +2 -1
  92. package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +9 -3
  93. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +27 -3
  94. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +15 -2
  95. package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +10 -2
  96. package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +2 -1
  97. package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +1 -1
  98. package/dist/Editor/common/StyleBuilder/fieldTypes/icons.js +2 -0
  99. package/dist/Editor/common/StyleBuilder/fieldTypes/index.js +3 -1
  100. package/dist/Editor/common/StyleBuilder/fieldTypes/lineSpacing.js +79 -0
  101. package/dist/Editor/common/StyleBuilder/fieldTypes/radiusStyle.js +4 -4
  102. package/dist/Editor/common/StyleBuilder/fieldTypes/saveAsTemplate.js +22 -6
  103. package/dist/Editor/common/StyleBuilder/fieldTypes/selectBox.js +21 -2
  104. package/dist/Editor/common/StyleBuilder/fieldTypes/text.js +15 -4
  105. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +7 -0
  106. package/dist/Editor/common/StyleBuilder/index.js +17 -9
  107. package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +4 -0
  108. package/dist/Editor/common/ToolbarIcon.js +1 -1
  109. package/dist/Editor/common/Uploader.js +46 -36
  110. package/dist/Editor/common/iconListV2.js +348 -130
  111. package/dist/Editor/common/iconslist.js +6 -3
  112. package/dist/Editor/commonStyle.js +290 -4
  113. package/dist/Editor/helper/deserialize/index.js +19 -23
  114. package/dist/Editor/helper/enforceDateFormat.js +41 -0
  115. package/dist/Editor/helper/index.js +16 -3
  116. package/dist/Editor/helper/theme.js +24 -1
  117. package/dist/Editor/hooks/useMouseMove.js +5 -2
  118. package/dist/Editor/hooks/useTable.js +22 -19
  119. package/dist/Editor/plugins/withCustomDeleteBackward.js +33 -2
  120. package/dist/Editor/plugins/withEmbeds.js +30 -26
  121. package/dist/Editor/utils/SlateUtilityFunctions.js +27 -4
  122. package/dist/Editor/utils/button.js +4 -4
  123. package/dist/Editor/utils/dataView.js +43 -0
  124. package/dist/Editor/utils/helper.js +50 -10
  125. package/dist/Editor/utils/pageSettings.js +14 -2
  126. package/package.json +2 -2
@@ -1346,19 +1346,22 @@ export const GridAddSectionIcon = props => /*#__PURE__*/_jsxs("svg", {
1346
1346
  stroke: "#64748B",
1347
1347
  strokeWidth: "1.5",
1348
1348
  strokeLinecap: "round",
1349
- strokeLinejoin: "round"
1349
+ strokeLinejoin: "round",
1350
+ className: "fillStroke"
1350
1351
  }), /*#__PURE__*/_jsx("path", {
1351
1352
  d: "M10.1733 6.125V14.875",
1352
1353
  stroke: "#64748B",
1353
1354
  strokeWidth: "1.5",
1354
1355
  strokeLinecap: "round",
1355
- strokeLinejoin: "round"
1356
+ strokeLinejoin: "round",
1357
+ className: "fillStroke"
1356
1358
  }), /*#__PURE__*/_jsx("path", {
1357
1359
  d: "M5.79834 10.5H14.5483",
1358
1360
  stroke: "#64748B",
1359
1361
  strokeWidth: "1.5",
1360
1362
  strokeLinecap: "round",
1361
- strokeLinejoin: "round"
1363
+ strokeLinejoin: "round",
1364
+ className: "fillStroke"
1362
1365
  })]
1363
1366
  });
1364
1367
  export const FormIcon = () => {
@@ -1,7 +1,147 @@
1
1
  const useCommonStyle = theme => ({
2
2
  sideBarDrawer: {
3
3
  "& .MuiPaper-root": {
4
- backgroundColor: theme?.palette?.editor?.background
4
+ backgroundColor: theme?.palette?.editor?.textFormatBgColor,
5
+ border: `1px solid ${theme?.palette?.editor?.miniToolBarBorder}`,
6
+ "@media only screen and (min-width: 899px)": {
7
+ borderRadius: "20px",
8
+ margin: "5px",
9
+ height: "calc(100% - 10px)",
10
+ overflow: "hidden"
11
+ },
12
+ "@media only screen and (max-width: 599px)": {
13
+ borderRadius: "20px 20px 0px 0px"
14
+ }
15
+ },
16
+ "& .optionePopupHeader": {
17
+ borderBottom: `1px solid ${theme?.palette?.editor?.deviderBgColor} !important`,
18
+ padding: "0px 0px 10px 0px",
19
+ margin: "0px 10px",
20
+ "& .MuiTypography-root": {
21
+ textTransform: "capitalize"
22
+ },
23
+ "& .close-popupbtn": {
24
+ background: theme?.palette?.editor?.closeButtonBgColor,
25
+ color: `${theme?.palette?.editor?.closeButtonSvgStroke} !important`,
26
+ "& svg": {
27
+ color: `${theme?.palette?.editor?.closeButtonSvgStroke} !important`
28
+ }
29
+ }
30
+ },
31
+ "& .MuiDialogActions-root": {
32
+ // paddingTop: "10px",
33
+ "& .primaryBtn, .deleteBtn": {
34
+ height: "32px !important",
35
+ fontSize: "14px !important",
36
+ fontWeight: "600 !important",
37
+ padding: "0px 20px !important"
38
+ },
39
+ "& .deleteBtn": {
40
+ background: `${theme?.palette?.type === "light" && "#FFF7F9"} !important`
41
+ }
42
+ },
43
+ "& .MuiDialogContent-root": {
44
+ padding: "0px 5px 0px 10px!important",
45
+ height: "100%",
46
+ fontFamily: "Inter, sans-serif",
47
+ "& .MuiTypography-root": {
48
+ fontSize: "14px",
49
+ fontWeight: "500",
50
+ fontFamily: "Inter, sans-serif"
51
+ },
52
+ "& p": {
53
+ marginBottom: "7px",
54
+ marginTop: "4px"
55
+ },
56
+ "& .muiIconsListParent": {
57
+ "& svg": {
58
+ color: `${theme?.palette?.editor?.svgTextAlignStrokeColor} !important`
59
+ },
60
+ "&::-webkit-scrollbar-thumb": {
61
+ background: `none !important`
62
+ },
63
+ "&::-webkit-scrollbar-track": {
64
+ visibility: "hidden"
65
+ },
66
+ "&::-webkit-scrollbar-thumb": {
67
+ background: `${theme?.palette?.editor?.brainPopupScroll} !important`
68
+ },
69
+ "&::-webkit-scrollbar-track": {
70
+ visibility: "hidden"
71
+ }
72
+ },
73
+ "& .MuiGrid-root>.MuiGrid-item": {
74
+ paddingRight: "0px !important",
75
+ fontFamily: "Inter, sans-serif",
76
+ height: 'fit-content'
77
+ },
78
+ "& .MuiInputBase-root": {
79
+ borderRadius: "10px",
80
+ background: theme?.palette?.editor?.inputFieldBgColor,
81
+ border: `none`,
82
+ height: "36px",
83
+ boxShadow: "0px 4px 16px 0px #0000000D",
84
+ fontFamily: "Inter, sans-serif",
85
+ "&:hover .MuiOutlinedInput-notchedOutline": {
86
+ border: `1px solid ${theme?.palette?.editor?.inputFieldBorder}`
87
+ },
88
+ "& input::placeholder": {
89
+ color: "#94A3B8 !important",
90
+ opacity: "unset",
91
+ fontFamily: "Inter, sans-serif"
92
+ },
93
+ "& .colorPickerButton": {
94
+ border: `2px solid ${theme?.palette?.editor?.buttonBorder2} !important`
95
+ }
96
+ },
97
+ "& .MuiInputBase-root:has(.colorPickerButton)": {
98
+ "& .MuiInputBase-input": {
99
+ padding: "8.5px 14px 8.5px 0px",
100
+ fontFamily: "Inter, sans-serif"
101
+ }
102
+ },
103
+ "& .MuiInputBase-input": {
104
+ color: theme?.palette?.editor?.deletePopUpButtonTextColor,
105
+ textTransform: "math-auto",
106
+ fontFamily: "Inter, sans-serif"
107
+ },
108
+ "& .MuiOutlinedInput-notchedOutline": {
109
+ border: `1px solid ${theme?.palette?.editor?.inputFieldBorder}`
110
+ },
111
+ "& fieldset": {
112
+ border: `1px solid transparent`,
113
+ borderRadius: "10px"
114
+ },
115
+ "&::-webkit-scrollbar-thumb, & .MuiPaper-root ::-webkit-scrollbar-thumb": {
116
+ background: `none !important`
117
+ },
118
+ "&::-webkit-scrollbar-track, & .MuiPaper-root ::-webkit-scrollbar-track": {
119
+ visibility: "hidden"
120
+ },
121
+ "&:hover": {
122
+ "&::-webkit-scrollbar-thumb, & .MuiPaper-root ::-webkit-scrollbar-thumb": {
123
+ background: `${theme?.palette?.editor?.brainPopupScroll} !important`
124
+ },
125
+ "&::-webkit-scrollbar-track, & .MuiPaper-root ::-webkit-scrollbar-track": {
126
+ visibility: "hidden"
127
+ }
128
+ },
129
+ "& .sld-wrpr": {
130
+ paddingLeft: "5px",
131
+ "& .sliderInput": {
132
+ background: theme?.palette?.editor?.inputFieldBgColor,
133
+ border: `1px solid ${theme?.palette?.editor?.inputFieldBorder}`,
134
+ borderRadius: "10px",
135
+ width: "46px !important",
136
+ marginLeft: "10px",
137
+ height: '36px !important'
138
+ }
139
+ },
140
+ '& .MuiFormHelperText-root': {
141
+ margin: '4px 0px 0px 0px',
142
+ color: theme?.palette?.editor?.closeButtonSvgStroke,
143
+ fontFamily: "Inter, sans-serif"
144
+ }
5
145
  },
6
146
  "& .MuiTypography-root": {
7
147
  color: theme?.palette?.editor?.textColor
@@ -26,11 +166,41 @@ const useCommonStyle = theme => ({
26
166
  backgroundColor: theme?.palette?.editor?.background,
27
167
  color: theme?.palette?.editor?.textColor
28
168
  },
169
+ customCheckBox: {
170
+ padding: "0px",
171
+ "& .MuiCheckbox-root": {
172
+ padding: "8px 8px 8px 10px",
173
+ "&:hover": {
174
+ background: "unset !important"
175
+ }
176
+ },
177
+ "& button": {
178
+ width: "18px !important",
179
+ height: "18px !important",
180
+ borderRadius: "3px",
181
+ border: `1px solid ${theme?.palette?.editor?.buttonBorder3}`,
182
+ "& svg": {
183
+ width: "14px",
184
+ height: "14px"
185
+ }
186
+ },
187
+ "& .checkedIcon": {
188
+ background: "#2563EB",
189
+ borderColor: "#2563EB",
190
+ padding: "0px"
191
+ },
192
+ "& .unCheckedIcon": {
193
+ background: theme?.palette?.editor?.checkedIconBg
194
+ },
195
+ "& p": {
196
+ margin: "0px !important"
197
+ }
198
+ },
29
199
  customPaddingInput: {
30
200
  background: theme?.palette?.editor?.inputFieldBgColor,
31
201
  border: `1px solid ${theme?.palette?.editor?.inputFieldBorder}`,
32
202
  color: theme?.palette?.editor?.textColor,
33
- borderRadius: '6px'
203
+ borderRadius: "6px"
34
204
  },
35
205
  colorPickerPopup: {
36
206
  "& .MuiPaper-root": {
@@ -40,7 +210,7 @@ const useCommonStyle = theme => ({
40
210
  "& .popup_tabs": {
41
211
  backgroundColor: theme?.palette?.editor?.background,
42
212
  "@media only screen and (max-width: 899px)": {
43
- width: '100% !important'
213
+ width: "100% !important"
44
214
  }
45
215
  },
46
216
  "& .popup_tabs-header": {
@@ -78,6 +248,9 @@ const useCommonStyle = theme => ({
78
248
  }
79
249
  }
80
250
  },
251
+ colorPickerBtnBorder: {
252
+ border: `2px solid ${theme?.palette?.editor?.buttonBorder2} !important`
253
+ },
81
254
  signaturePopup: {
82
255
  "& .MuiPaper-root": {
83
256
  backgroundColor: theme?.palette?.editor?.miniToolBarBackground,
@@ -175,7 +348,7 @@ const useCommonStyle = theme => ({
175
348
  },
176
349
  "& .deleteBtn": {
177
350
  background: "transparent",
178
- margin: '0px !important'
351
+ margin: "0px !important"
179
352
  },
180
353
  "& .MuiGrid-container": {
181
354
  "& .workFlowButton": {
@@ -209,6 +382,44 @@ const useCommonStyle = theme => ({
209
382
  textOptions: {
210
383
  "& .MuiPopover-root": {
211
384
  backgroundColor: theme?.palette?.editor?.background
385
+ },
386
+ "& svg": {
387
+ width: "20px",
388
+ height: "24px",
389
+ color: `${theme?.palette?.editor?.svgTextAlignStrokeColor} !important`
390
+ }
391
+ },
392
+ textOptionsList: {
393
+ "& .MuiMenuItem-root": {
394
+ padding: "8px 12px",
395
+ fontSize: "12px",
396
+ color: theme?.palette?.editor?.menuOptionTextColor,
397
+ fontWeight: '500',
398
+ fontFamily: "Inter, sans-serif",
399
+ minHeight: '36px',
400
+ "&:hover": {
401
+ backgroundColor: theme?.palette?.editor?.menuOptionHoverBackground
402
+ }
403
+ },
404
+ '& .Mui-selected': {
405
+ background: `${theme?.palette?.editor?.menuOptionSelectedOption} !important`
406
+ },
407
+ "& .MuiListSubheader-root": {
408
+ color: "gray",
409
+ fontWeight: "bold",
410
+ fontSize: "12px"
411
+ },
412
+ "& .MuiPaper-root": {
413
+ borderRadius: '8px',
414
+ padding: '0px',
415
+ background: `${theme?.palette?.editor?.textWeightPopUpBackground} !important`
416
+ },
417
+ '& .MuiButtonBase-root': {
418
+ margin: '4px',
419
+ borderRadius: '6px'
420
+ },
421
+ '& .MuiList-root': {
422
+ padding: '0px'
212
423
  }
213
424
  },
214
425
  datePicker: {
@@ -252,6 +463,81 @@ const useCommonStyle = theme => ({
252
463
  border: `1px solid transparent !important`
253
464
  }
254
465
  }
466
+ },
467
+ buttonMoreOption: {
468
+ background: `${theme?.palette?.editor?.aiInputBackground} !important`,
469
+ border: `1px solid ${theme?.palette?.editor?.buttonBorder1} !important`,
470
+ padding: '4px !important',
471
+ '& svg': {
472
+ width: '18px !important',
473
+ height: '18px !important',
474
+ '& path': {
475
+ stroke: `${theme?.palette?.editor?.closeButtonSvgStroke} !important`
476
+ }
477
+ }
478
+ },
479
+ pageSettingPopUpRoot: {
480
+ padding: "16px 8px 16px 10px!important",
481
+ height: "100%"
482
+ },
483
+ buttonMoreOption2: {
484
+ background: `${theme?.palette?.editor?.aiInputBackground} !important`,
485
+ border: `1px solid ${theme?.palette?.editor?.buttonBorder1} !important`,
486
+ '& svg': {
487
+ '& path': {
488
+ fill: `${theme?.palette?.editor?.closeButtonSvgStroke} !important`
489
+ }
490
+ }
491
+ },
492
+ buttonMoreOption3: {
493
+ background: `${theme?.palette?.editor?.aiInputBackground} !important`,
494
+ border: `1px solid ${theme?.palette?.editor?.buttonBorder1} !important`,
495
+ padding: '5px !important',
496
+ '& svg': {
497
+ width: '16px !important',
498
+ height: '16px !important',
499
+ '& path': {
500
+ stroke: `${theme?.palette?.editor?.closeButtonSvgStroke} !important`
501
+ }
502
+ }
503
+ },
504
+ resizeButton: {
505
+ background: theme?.palette?.editor?.aiInputBackground,
506
+ border: `1px solid ${theme?.palette?.editor?.buttonBorder1}`,
507
+ padding: '5px !important',
508
+ borderRadius: '50% !important',
509
+ '& svg': {
510
+ width: '18px',
511
+ height: '18px',
512
+ '& path': {
513
+ fill: `${theme?.palette?.editor?.closeButtonSvgStroke}`
514
+ }
515
+ },
516
+ '&:hover': {
517
+ background: theme?.palette?.editor?.aiInputBackground
518
+ }
519
+ },
520
+ gradientFillBtn: {
521
+ background: `linear-gradient(112.61deg, #2C63ED 19.3%, #8360FD 88.14%) !important`,
522
+ textTransform: 'math-auto !important',
523
+ color: '#FFFFFF !important',
524
+ padding: '0px 12px !important',
525
+ height: '32px',
526
+ borderRadius: '8px',
527
+ fontWeight: '500',
528
+ fontSize: '14px'
529
+ },
530
+ emptyThumbBtn: {
531
+ background: `${theme?.palette?.editor?.sectionSettingIconHover} !important`,
532
+ color: `${theme?.palette?.editor?.textColor} !important`,
533
+ fontSize: '14px !important',
534
+ '& svg': {
535
+ width: '20px !important',
536
+ height: '20px !important',
537
+ '& path': {
538
+ stroke: `${theme?.palette?.editor?.closeButtonSvgStroke} !important`
539
+ }
540
+ }
255
541
  }
256
542
  });
257
543
  export default useCommonStyle;
@@ -20,6 +20,13 @@ const handleTableCell = (el, children) => {
20
20
  }
21
21
  };
22
22
  };
23
+ const paragraphType = el => {
24
+ const firstChild = el?.childNodes?.[0];
25
+ const isFirstChildText = firstChild?.nodeType === 3 || TEXT_TAGS[firstChild?.nodeName];
26
+ return isFirstChildText ? {
27
+ type: "paragraph"
28
+ } : {};
29
+ };
23
30
  const ELEMENT_TAGS = {
24
31
  A: el => ({
25
32
  type: "link",
@@ -59,24 +66,14 @@ const ELEMENT_TAGS = {
59
66
  OL: () => ({
60
67
  type: "orderedList"
61
68
  }),
62
- P: () => ({
63
- type: "paragraph"
64
- }),
65
- DIV: () => ({
66
- type: "paragraph"
67
- }),
69
+ P: paragraphType,
70
+ DIV: paragraphType,
68
71
  PRE: () => ({
69
72
  type: "code"
70
73
  }),
71
- META: () => ({
72
- type: "paragraph"
73
- }),
74
- STYLE: () => ({
75
- type: "paragraph"
76
- }),
77
- "GOOGLE-SHEETS-HTML-ORIGIN": () => ({
78
- type: "paragraph"
79
- }),
74
+ META: paragraphType,
75
+ STYLE: paragraphType,
76
+ "GOOGLE-SHEETS-HTML-ORIGIN": paragraphType,
80
77
  TABLE: (el, children = []) => {
81
78
  try {
82
79
  const bodyChild = children || [];
@@ -98,12 +95,8 @@ const ELEMENT_TAGS = {
98
95
  type: "table-row"
99
96
  }),
100
97
  TD: handleTableCell,
101
- COLGROUP: () => ({
102
- type: "paragraph"
103
- }),
104
- COL: () => ({
105
- type: "paragraph"
106
- })
98
+ COLGROUP: paragraphType,
99
+ COL: paragraphType
107
100
  };
108
101
 
109
102
  // COMPAT: `B` is omitted here because Google Docs uses `<b>` in weird ways.
@@ -133,7 +126,8 @@ const TEXT_TAGS = {
133
126
  const deserialize = el => {
134
127
  if (el.nodeType === 3) {
135
128
  const match = /\r|\n/.exec(el.textContent);
136
- return match ? null : el.textContent;
129
+ const text = el.textContent.replace(/\r|\n/g, "").trim();
130
+ return match && !text ? null : el.textContent;
137
131
  } else if (el.nodeType !== 1) {
138
132
  return null;
139
133
  } else if (el.nodeName === "BR") {
@@ -160,7 +154,9 @@ const deserialize = el => {
160
154
  overwriteChild,
161
155
  ...attrs
162
156
  } = ELEMENT_TAGS[nodeName](el, children);
163
- return jsx("element", attrs, overwriteChild || children);
157
+ if (attrs?.type) {
158
+ return jsx("element", attrs, overwriteChild || children);
159
+ }
164
160
  }
165
161
  if (TEXT_TAGS[nodeName]) {
166
162
  const attrs = TEXT_TAGS[nodeName](el);
@@ -0,0 +1,41 @@
1
+ function enforceDateFormat(inputElement) {
2
+ inputElement.addEventListener("input", event => {
3
+ const input = event.target;
4
+ let value = input.value;
5
+
6
+ // Allow only numbers and forward slashes
7
+ value = value.replace(/[^\d/]/g, "");
8
+
9
+ // Enforce MM/DD/YYYY structure
10
+ if (value.length > 10) {
11
+ value = value.slice(0, 10);
12
+ }
13
+ const parts = value.split("/");
14
+ if (parts.length > 1) {
15
+ parts[0] = parts[0].slice(0, 2); // Limit MM to 2 digits
16
+ if (parts[0] > 12) parts[0] = "12"; // Max month value
17
+ }
18
+
19
+ if (parts.length > 2) {
20
+ parts[1] = parts[1].slice(0, 2); // Limit DD to 2 digits
21
+ if (parts[1] > 31) parts[1] = "31"; // Max day value
22
+ }
23
+
24
+ if (parts.length > 3) {
25
+ parts[2] = parts[2].slice(0, 4); // Limit YYYY to 4 digits
26
+ }
27
+
28
+ input.value = parts.join("/");
29
+
30
+ // Optionally, validate the full date
31
+ if (input.value.length === 10) {
32
+ const [month, day, year] = input.value.split("/").map(Number);
33
+ const isValidDate = !isNaN(Date.parse(`${year}-${month}-${day}`));
34
+ if (!isValidDate) {
35
+ input.value = ""; // Clear input if invalid
36
+ alert("Invalid date format. Please enter a valid MM/DD/YYYY date.");
37
+ }
38
+ }
39
+ });
40
+ }
41
+ export default enforceDateFormat;
@@ -308,7 +308,13 @@ export const getTextColor = (color = "") => {
308
308
  color: "transparent !important",
309
309
  caretColor: "black",
310
310
  "& span": {
311
- color: "transparent !important"
311
+ color: "transparent !important",
312
+ "& ::selection": {
313
+ color: "#000 !important"
314
+ }
315
+ },
316
+ "& ::selection": {
317
+ color: "#000 !important"
312
318
  }
313
319
  } : {
314
320
  color
@@ -331,14 +337,14 @@ export const isCarouselSelected = editor => {
331
337
  return false;
332
338
  }
333
339
  const [nodeEntry] = Editor.nodes(editor, {
334
- match: n => !Editor.isEditor(n) && Element.isElement(n) && n.type === 'carousel'
340
+ match: n => !Editor.isEditor(n) && Element.isElement(n) && n.type === "carousel"
335
341
  });
336
342
  if (!nodeEntry) {
337
343
  return false;
338
344
  }
339
345
  const [node] = nodeEntry;
340
346
  const carouselDom = ReactEditor.toDOMNode(editor, node);
341
- const isEdit = carouselDom.classList.contains('carousel_slider_edit');
347
+ const isEdit = carouselDom.classList.contains("carousel_slider_edit");
342
348
  return !isEdit;
343
349
  } catch (err) {
344
350
  console.log(err);
@@ -360,4 +366,11 @@ export const clearBrainText = editor => {
360
366
  } catch (err) {
361
367
  console.log(err);
362
368
  }
369
+ };
370
+ export const clearSelectionOnly = editor => {
371
+ try {
372
+ Transforms.deselect(editor);
373
+ } catch (err) {
374
+ console.log(err);
375
+ }
363
376
  };
@@ -147,4 +147,27 @@ export const groupByBreakpoint = (styleProps, theme) => {
147
147
  }
148
148
  };
149
149
  };
150
- export const getCustomizationValue = value => isNaN(parseInt(value)) ? null : parseInt(value);
150
+ export const getCustomizationValue = value => isNaN(parseInt(value)) ? null : parseInt(value);
151
+ export const getBreakpointLineSpacing = (value, breakpoint) => {
152
+ try {
153
+ const values = getBreakPointsValue(value, breakpoint);
154
+ const cssVal = BREAKPOINTS_DEVICES.reduce((a, b) => {
155
+ if (values[b] || values["lg"]) {
156
+ const value = values[b] || values["lg"];
157
+ return {
158
+ ...a,
159
+ [b]: value
160
+ };
161
+ } else {
162
+ return a;
163
+ }
164
+ }, {});
165
+ if (breakpoint) {
166
+ return value[breakpoint] || value["lg"] || value;
167
+ } else {
168
+ return cssVal["lg"];
169
+ }
170
+ } catch (err) {
171
+ // console.log(err);
172
+ }
173
+ };
@@ -35,6 +35,7 @@ export const EditorProvider = ({
35
35
  path: null
36
36
  });
37
37
  const [fontFamilies, setFontFamilies] = useState({});
38
+ const [activeBreakPoint, setActiveBreakPoint] = useState("");
38
39
  useEffect(() => {
39
40
  window.updateSelectedItem = d => {
40
41
  setSelectedElement(d);
@@ -97,8 +98,10 @@ export const EditorProvider = ({
97
98
  setOpenAI,
98
99
  updateDragging,
99
100
  fontFamilies,
100
- setFontFamilies
101
- }), [path, editor?.selection, selectedPath, selectedElement, contextMenu, openAI, popupType, drop]);
101
+ setFontFamilies,
102
+ activeBreakPoint,
103
+ setActiveBreakPoint
104
+ }), [path, editor?.selection, selectedPath, selectedElement, contextMenu, openAI, popupType, drop, activeBreakPoint]);
102
105
  return /*#__PURE__*/_jsx(EditorContext.Provider, {
103
106
  value: otherValues,
104
107
  children: children
@@ -6,21 +6,25 @@ import { DndContext, DragOverlay, PointerSensor, useSensor, useSensors } from "@
6
6
  import { encodeToBase64, isHavingSelection } from "../utils/helper";
7
7
  import { serializeToText } from "../utils/serializeToText";
8
8
  import { createCopiedTableStructure, getRectangleBounds, tableNodeToDom } from "../Elements/Table/tableHelper";
9
+
10
+ // const selectFirstCell = (tablePath, editor, updateTableSelection) => {
11
+ // const firstCell = [...tablePath, 0, 0];
12
+
13
+ // const end = Editor.end(editor, firstCell);
14
+
15
+ // Transforms.select(editor, {
16
+ // anchor: end,
17
+ // focus: end,
18
+ // });
19
+
20
+ // updateTableSelection({
21
+ // startCellPath: firstCell,
22
+ // endCellPath: [],
23
+ // isDragging: false,
24
+ // });
25
+ // };
9
26
  import { jsx as _jsx } from "react/jsx-runtime";
10
27
  import { jsxs as _jsxs } from "react/jsx-runtime";
11
- const selectFirstCell = (tablePath, editor, updateTableSelection) => {
12
- const firstCell = [...tablePath, 0, 0];
13
- const end = Editor.end(editor, firstCell);
14
- Transforms.select(editor, {
15
- anchor: end,
16
- focus: end
17
- });
18
- updateTableSelection({
19
- startCellPath: firstCell,
20
- endCellPath: [],
21
- isDragging: false
22
- });
23
- };
24
28
  const handleDragEnd = (dragData, editor, resetAll) => {
25
29
  const {
26
30
  active,
@@ -77,9 +81,6 @@ export const TableProvider = ({
77
81
  children,
78
82
  otherProps = {}
79
83
  }) => {
80
- const {
81
- tablePath
82
- } = otherProps;
83
84
  const [hoverPath, setHoverPath] = useState(null);
84
85
  const [tableSelection, setTableSelection] = useState(getDefaultTableSelection());
85
86
  const [tableResizing, setTableResizing] = useState(null);
@@ -184,9 +185,11 @@ export const TableProvider = ({
184
185
  window.removeEventListener("cut", handleCut);
185
186
  };
186
187
  }, [tableSelection, editor, tableSelection]);
187
- useEffect(() => {
188
- selectFirstCell(tablePath, editor, updateTableSelection);
189
- }, []);
188
+
189
+ // useEffect(() => {
190
+ // selectFirstCell(tablePath, editor, updateTableSelection);
191
+ // }, []);
192
+
190
193
  return /*#__PURE__*/_jsx(TableContext.Provider, {
191
194
  value: values,
192
195
  children: /*#__PURE__*/_jsxs(DndContext, {
@@ -1,5 +1,5 @@
1
- import { Editor, Node, Path, Point, Transforms } from "slate";
2
- import { getNextNode } from "../utils/helper";
1
+ import { Editor, Node, Path, Point, Range, Transforms } from "slate";
2
+ import { containsSurrogatePair, getNextNode } from "../utils/helper";
3
3
  const BACKWARD_BLOCKS = ["list-item", "signature"];
4
4
  const isNodeTextEmpty = node => {
5
5
  const nodeText = Node.string(node);
@@ -29,6 +29,37 @@ const withCustomDeleteBackward = editor => {
29
29
  return;
30
30
  }
31
31
  }
32
+ if (selection && Range.isCollapsed(selection)) {
33
+ const [currentNode, path] = Editor.node(editor, selection);
34
+ if (currentNode && typeof currentNode.text === 'string') {
35
+ const text = currentNode.text;
36
+ if (containsSurrogatePair(text)) {
37
+ // Check if the cursor is at the end of a surrogate pair
38
+ const {
39
+ offset
40
+ } = selection.anchor;
41
+ const beforeCursor = text.slice(0, offset);
42
+ const afterCursor = text.slice(offset);
43
+ if (containsSurrogatePair(beforeCursor) || containsSurrogatePair(afterCursor)) {
44
+ // Delete the entire surrogate pair
45
+ Transforms.delete(editor, {
46
+ at: {
47
+ anchor: {
48
+ path,
49
+ offset: offset - 2
50
+ },
51
+ // Move back 2 for surrogate pair
52
+ focus: {
53
+ path,
54
+ offset
55
+ }
56
+ }
57
+ });
58
+ return;
59
+ }
60
+ }
61
+ }
62
+ }
32
63
 
33
64
  // Check if current node is a list item and is the last one, signature node
34
65
  const [node] = Editor.nodes(editor, {