@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
@@ -2,21 +2,21 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { jsxs as _jsxs } from "react/jsx-runtime";
3
3
  const SettingsIcon = props => {
4
4
  return /*#__PURE__*/_jsxs("svg", {
5
- width: "17",
5
+ width: "18",
6
6
  height: "18",
7
- viewBox: "0 0 17 18",
7
+ viewBox: "0 0 18 18",
8
8
  fill: "none",
9
9
  xmlns: "http://www.w3.org/2000/svg",
10
10
  ...props,
11
11
  children: [/*#__PURE__*/_jsx("path", {
12
- d: "M8.5 11.125C9.6736 11.125 10.625 10.1736 10.625 9C10.625 7.82639 9.6736 6.875 8.5 6.875C7.32639 6.875 6.375 7.82639 6.375 9C6.375 10.1736 7.32639 11.125 8.5 11.125Z",
12
+ d: "M9 11.25C10.2426 11.25 11.25 10.2426 11.25 9C11.25 7.75736 10.2426 6.75 9 6.75C7.75736 6.75 6.75 7.75736 6.75 9C6.75 10.2426 7.75736 11.25 9 11.25Z",
13
13
  stroke: "#64748B",
14
14
  strokeWidth: "1.5",
15
15
  strokeMiterlimit: "10",
16
16
  strokeLinecap: "round",
17
17
  strokeLinejoin: "round"
18
18
  }), /*#__PURE__*/_jsx("path", {
19
- d: "M1.4165 9.62343V8.37676C1.4165 7.6401 2.01859 7.03093 2.76234 7.03093C4.04442 7.03093 4.56859 6.12426 3.924 5.01218C3.55567 4.37468 3.77525 3.54593 4.41984 3.1776L5.64525 2.47635C6.20484 2.14343 6.92734 2.34176 7.26025 2.90135L7.33817 3.03593C7.97567 4.14801 9.024 4.14801 9.66859 3.03593L9.7465 2.90135C10.0794 2.34176 10.8019 2.14343 11.3615 2.47635L12.5869 3.1776C13.2315 3.54593 13.4511 4.37468 13.0828 5.01218C12.4382 6.12426 12.9623 7.03093 14.2444 7.03093C14.9811 7.03093 15.5903 7.63301 15.5903 8.37676V9.62343C15.5903 10.3601 14.9882 10.9693 14.2444 10.9693C12.9623 10.9693 12.4382 11.8759 13.0828 12.988C13.4511 13.6326 13.2315 14.4543 12.5869 14.8226L11.3615 15.5238C10.8019 15.8568 10.0794 15.6584 9.7465 15.0988L9.66859 14.9643C9.03109 13.8522 7.98275 13.8522 7.33817 14.9643L7.26025 15.0988C6.92734 15.6584 6.20484 15.8568 5.64525 15.5238L4.41984 14.8226C3.77525 14.4543 3.55567 13.6255 3.924 12.988C4.56859 11.8759 4.04442 10.9693 2.76234 10.9693C2.01859 10.9693 1.4165 10.3601 1.4165 9.62343Z",
19
+ d: "M1.5 9.6591V8.3391C1.5 7.5591 2.1375 6.9141 2.925 6.9141C4.2825 6.9141 4.8375 5.9541 4.155 4.7766C3.765 4.1016 3.9975 3.2241 4.68 2.8341L5.9775 2.0916C6.57 1.7391 7.335 1.9491 7.6875 2.5416L7.77 2.6841C8.445 3.8616 9.555 3.8616 10.2375 2.6841L10.32 2.5416C10.6725 1.9491 11.4375 1.7391 12.03 2.0916L13.3275 2.8341C14.01 3.2241 14.2425 4.1016 13.8525 4.7766C13.17 5.9541 13.725 6.9141 15.0825 6.9141C15.8625 6.9141 16.5075 7.5516 16.5075 8.3391V9.6591C16.5075 10.4391 15.87 11.0841 15.0825 11.0841C13.725 11.0841 13.17 12.0441 13.8525 13.2216C14.2425 13.9041 14.01 14.7741 13.3275 15.1641L12.03 15.9066C11.4375 16.2591 10.6725 16.0491 10.32 15.4566L10.2375 15.3141C9.5625 14.1366 8.4525 14.1366 7.77 15.3141L7.6875 15.4566C7.335 16.0491 6.57 16.2591 5.9775 15.9066L4.68 15.1641C3.9975 14.7741 3.765 13.8966 4.155 13.2216C4.8375 12.0441 4.2825 11.0841 2.925 11.0841C2.1375 11.0841 1.5 10.4391 1.5 9.6591Z",
20
20
  stroke: "#64748B",
21
21
  strokeWidth: "1.5",
22
22
  strokeMiterlimit: "10",
@@ -82,10 +82,12 @@ const ColorPickerButton = props => {
82
82
  height: "22px",
83
83
  minWidth: "22px",
84
84
  borderRadius: "26px"
85
- // border: "2px solid #E7E7E7",
86
85
  },
87
-
88
- onClick: handleColorPicker
86
+ onClick: handleColorPicker,
87
+ className: "colorPickerButton",
88
+ sx: {
89
+ ...classes.colorPickerBtnBorder
90
+ }
89
91
  }), isMobile ? /*#__PURE__*/_jsx(SwipeableDrawerComponent, {
90
92
  open: open,
91
93
  onClose: handleClose,
@@ -2,6 +2,7 @@ import React, { useEffect } from "react";
2
2
  import { useDraggable } from "@dnd-kit/core";
3
3
  import { Box } from "@mui/material";
4
4
  import DragIndicatorIcon from "@mui/icons-material/DragIndicator";
5
+ import { SectionDragIcon } from "../iconListV2";
5
6
  import { jsx as _jsx } from "react/jsx-runtime";
6
7
  const Draggable = props => {
7
8
  const {
@@ -35,7 +36,7 @@ const Draggable = props => {
35
36
  contentEditable: false,
36
37
  style: dragStyle,
37
38
  sx: classes.dragHandle,
38
- children: /*#__PURE__*/_jsx(DragIndicatorIcon, {})
39
+ children: /*#__PURE__*/_jsx(SectionDragIcon, {})
39
40
  });
40
41
  };
41
42
  export default Draggable;
@@ -41,9 +41,9 @@ const FontLoader = props => {
41
41
  // Retry loading the same batch
42
42
  loadNextBatch();
43
43
  } else {
44
- console.log(
45
- // `Max retries reached for batch: ${batch}. Moving to the next batch.`
46
- );
44
+ // console.log(
45
+ // `Max retries reached for batch: ${batch}. Moving to the next batch.`
46
+ // );
47
47
  currentIndex += batchSize;
48
48
  retryCount = 0; // Reset retry count for the next batch
49
49
  loadNextBatch();
@@ -67,7 +67,7 @@ const FontLoader = props => {
67
67
  });
68
68
  loadFontsInBatches(families);
69
69
  }).catch(err => {
70
- console.log(err);
70
+ // console.log(err);
71
71
  });
72
72
  } else {
73
73
  function correctFontArray(fontString) {
@@ -11,6 +11,7 @@ import ArrowRightIcon from "@mui/icons-material/ArrowRight";
11
11
  import ArrowDropDownIcon from "@mui/icons-material/ArrowDropDown";
12
12
  import EmailRoundedIcon from "@mui/icons-material/EmailRounded";
13
13
  import InfoOutlinedIcon from "@mui/icons-material/InfoOutlined";
14
+ import GridOnIcon from "@mui/icons-material/GridOn";
14
15
  import GppBadOutlinedIcon from "@mui/icons-material/GppBadOutlined";
15
16
  import { AccordionTextFormatIcon, BoldTextFormatIcon, BulletedListTextFormatIcon, ButtonElementIcon, CarouselElementIcon, CheckListTextFormatIcon, ColorBoxElementIcon, DividerElementIcon, DocUploadElementIcon, EmbedElementIcon, EmojiElementIcon, FormElementIcon, GridElementIcon, H1, H2, H3, ImageElementIcon, ItalicTextFormatIcon, LinkIconV2, OrderedListTextFormatIcon, SignatureElementIcon, TableElementIcon, TopBannerElementIcon, UnderlineTextFormatIcon, VideoElementIcon, CalendlyIcon, LeftAlignTextFormat, CenterAlignTextFormat, RightAlignTextFormat, JustifyTextFormat, FreeGridElement, AppHeaderElement, CodeElementIcon } from "./iconListV2";
16
17
  import MoreVertRoundedIcon from "@mui/icons-material/MoreVertRounded";
@@ -271,6 +272,11 @@ const iconList = {
271
272
  addElement: /*#__PURE__*/_jsx(AddElementIcon, {}),
272
273
  addTemplate: /*#__PURE__*/_jsx(AddTemplateIcon, {}),
273
274
  openLinkIcon: /*#__PURE__*/_jsx(OpenLinkIcon, {}),
275
+ dataView: /*#__PURE__*/_jsx(GridOnIcon, {
276
+ sx: {
277
+ fill: "#64748B"
278
+ }
279
+ }),
274
280
  editIcon: /*#__PURE__*/_jsx(EditIcon, {}),
275
281
  deleteIcon: /*#__PURE__*/_jsx(DeleteIcon, {}),
276
282
  brain: /*#__PURE__*/_jsx(BrainIcon, {}),
@@ -18,7 +18,8 @@ const Upload = props => {
18
18
  item: true,
19
19
  xs: 12,
20
20
  sx: {
21
- padding: 0
21
+ padding: 0,
22
+ height: '100%'
22
23
  },
23
24
  className: "ims-right",
24
25
  children: /*#__PURE__*/_jsx(Uploader, {
@@ -58,11 +58,32 @@ const ImageSelectorStyles = theme => ({
58
58
  borderRadius: "12px",
59
59
  backgroundColor: theme?.palette?.editor?.background
60
60
  },
61
+ "& .MuiDialogTitle-root": {
62
+ fontSize: "16px",
63
+ fontWeight: "700",
64
+ "& button": {
65
+ "& svg": {
66
+ "& rect": {
67
+ fill: theme?.palette?.editor?.closeButtonBgColor
68
+ },
69
+ "& path": {
70
+ stroke: theme?.palette?.editor?.closeButtonSvgStroke
71
+ }
72
+ }
73
+ }
74
+ },
75
+ "& .MuiDivider-root": {
76
+ background: theme?.palette?.editor?.deviderBgColor,
77
+ "@media only screen and (min-width: 899px)": {
78
+ margin: "0px 24px",
79
+ width: 'calc(100% - 48px)'
80
+ }
81
+ },
61
82
  "& .primaryBtn": {
62
83
  background: "#2563eb !important",
63
84
  boxShadow: "0px 8px 24px rgba(30, 64, 175, 0.08)",
64
85
  borderRadius: "8px !important",
65
- height: "28px !important",
86
+ height: "32px !important",
66
87
  fontWeight: "600 !important",
67
88
  fontSize: "12px !important",
68
89
  color: "#ffffff !important",
@@ -71,23 +92,43 @@ const ImageSelectorStyles = theme => ({
71
92
  marginLeft: "0px !important"
72
93
  },
73
94
  "& .secondaryBtn": {
74
- background: "#ffffff !important",
95
+ background: `${theme?.palette?.editor?.closeButtonBgColor} !important`,
75
96
  boxShadow: "0px 8px 24px rgba(30, 64, 175, 0.08)",
76
97
  borderRadius: "8px !important",
77
- height: "28px !important",
98
+ height: "32px !important",
78
99
  fontWeight: "600 !important",
79
100
  fontSize: "12px !important",
80
- color: "#2563eb !important",
81
- border: "1px solid #2563eb !important",
101
+ color: `${theme?.palette?.editor?.deletePopUpButtonTextColor} !important`,
102
+ border: `1px solid ${theme?.palette?.editor?.closeButtonBorder} !important`,
82
103
  width: "auto !important",
83
104
  marginRight: "8px !important"
105
+ },
106
+ "& .MuiGrid-root": {
107
+ "&::-webkit-scrollbar-thumb": {
108
+ background: `none !important`
109
+ },
110
+ "&::-webkit-scrollbar-track": {
111
+ visibility: "hidden"
112
+ },
113
+ "&::-webkit-scrollbar-thumb": {
114
+ background: `${theme?.palette?.editor?.brainPopupScroll} !important`
115
+ },
116
+ "&::-webkit-scrollbar-track": {
117
+ visibility: "hidden"
118
+ }
119
+ },
120
+ "& .MuiImageList-root": {
121
+ margin: '0px'
122
+ },
123
+ "& .MuiDialogContent-root": {
124
+ padding: '20px 24px 5px 24px'
84
125
  }
85
126
  },
86
127
  titleTypo: {
87
128
  fontSize: "16px",
88
129
  fontWeight: 500,
89
130
  color: theme?.palette?.editor?.textColor,
90
- fontFamily: 'Inter, sans-serif'
131
+ fontFamily: "Inter, sans-serif"
91
132
  },
92
133
  addLinkField: {
93
134
  "& .MuiOutlinedInput-input": {
@@ -1,26 +1,38 @@
1
1
  const UploadStyles = theme => ({
2
2
  uploadContainer: {
3
- border: "1px solid #2563EB",
3
+ border: `1px solid ${theme?.palette?.editor?.uploadFileBorder}`,
4
4
  padding: "10px",
5
- borderRadius: "7px",
6
- boxShadow: "0px 4px 10px rgba(0, 0, 0, 0.16)"
5
+ borderRadius: "11px",
6
+ boxShadow: "0px 4px 10px rgba(0, 0, 0, 0.16)",
7
+ background: theme?.palette?.editor?.uploadFileBg,
8
+ height: '100%',
9
+ minHeight: '150px'
7
10
  },
8
11
  uploadField: {
9
12
  width: "100%",
10
13
  backgroundSize: "100% auto",
11
14
  backgroundRepeat: "no-repeat",
12
15
  backgroundPosition: "center",
13
- height: "250px",
16
+ height: "auto",
14
17
  position: "relative",
15
- backgroundColor: theme?.palette?.editor?.background,
18
+ backgroundColor: theme?.palette?.editor?.uploadFileInnerBg,
16
19
  borderRadius: "9px",
17
- border: "1px dashed #2563EB"
20
+ border: "1px dashed #2563EB",
21
+ minHeight: '150px'
18
22
  },
19
23
  uploadIcon: {
24
+ display: "grid !important",
20
25
  "& svg": {
26
+ display: 'flex',
27
+ width: '100%',
21
28
  "& path": {
22
29
  stroke: "#2563EB"
23
30
  }
31
+ },
32
+ '& span': {
33
+ display: 'flex',
34
+ width: '100%',
35
+ marginTop: '5px'
24
36
  }
25
37
  }
26
38
  });
@@ -3,9 +3,10 @@ const usePopupStyles = theme => ({
3
3
  position: "absolute",
4
4
  zIndex: 1300,
5
5
  borderRadius: "10px",
6
+ // padding: "0px",
6
7
  boxShadow: "0px 4px 10px 0px #00000029",
7
8
  overflow: "hidden",
8
- padding: "8px 0px !important",
9
+ // padding: "8px 0px !important",
9
10
  background: `${theme?.palette?.editor?.miniToolBarBackground} !important`,
10
11
  "& .MuiPaper-root": {
11
12
  background: `${theme?.palette?.editor?.miniToolBarBackground} !important`,
@@ -21,131 +22,12 @@ const usePopupStyles = theme => ({
21
22
  "& button": {
22
23
  padding: "0px 0px 0px 4px !important",
23
24
  "& svg": {
24
- width: "18px !important",
25
- margin: "5px 12px 6px 6px !important"
25
+ width: "21px !important",
26
+ margin: "5px 12px 6px 4px !important"
26
27
  },
27
28
  "&:hover": {
28
29
  borderRadius: "10px",
29
30
  background: `${theme?.palette?.editor?.menuOptionHoverBackground} !important`
30
- // "& svg": {
31
- // fill: "#007bff",
32
- // },
33
- }
34
- },
35
-
36
- "& .active": {
37
- border: "unset !important",
38
- "& .MuiPaper-root": {
39
- background: `${theme?.palette?.editor?.menuOptionSelectedOption} !important`,
40
- borderRadius: "7px",
41
- "& .MuiBox-root": {
42
- "& .MuiCardContent-root": {
43
- "& .MuiTypography-root": {
44
- color: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`
45
- }
46
- }
47
- }
48
- },
49
- "& button": {
50
- background: `${theme?.palette?.editor?.menuOptionSelectedOption} !important`,
51
- borderRadius: "7px",
52
- "& svg": {
53
- "& path": {
54
- stroke: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`
55
- }
56
- },
57
- "& span": {
58
- "& .MuiTypography-root": {
59
- color: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`
60
- }
61
- },
62
- "& .BrainIcon": {
63
- "& .bainIconPathStroke": {
64
- fill: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`,
65
- stroke: "unset !important"
66
- },
67
- "& .bainIconPathStroke2": {
68
- stroke: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`,
69
- fill: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`
70
- }
71
- }
72
- },
73
- "& .MuiCardMedia-root": {
74
- "& .signatureElementIcon": {
75
- "& path": {
76
- fill: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`
77
- }
78
- },
79
- "& .commonSvgStyle": {
80
- "& path": {
81
- stroke: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`
82
- }
83
- },
84
- "& .calederIconSvg": {
85
- "& path": {
86
- stroke: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`
87
- },
88
- "& rect": {
89
- stroke: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`
90
- }
91
- },
92
- "& .colorBoxElementIcon": {
93
- "& path": {
94
- stroke: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`,
95
- fill: "none"
96
- }
97
- },
98
- "& .gridElementIcon": {
99
- "& path": {
100
- stroke: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`
101
- }
102
- },
103
- "& .newLineElementIcon": {
104
- "& path": {
105
- fill: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`
106
- }
107
- },
108
- "& .blockQuoteSvg": {
109
- fill: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`
110
- },
111
- "& .orderedListIcon": {
112
- "& path": {
113
- stroke: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`
114
- },
115
- "& text": {
116
- fill: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`
117
- }
118
- },
119
- "& .bulletedListTextIcon": {
120
- "& path": {
121
- fill: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`,
122
- stroke: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`
123
- },
124
- "& circle": {
125
- fill: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`
126
- }
127
- },
128
- "& .checkedListTextIcon": {
129
- "& path": {
130
- stroke: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`
131
- }
132
- },
133
- "& .accordianListTextIcon": {
134
- // stroke: `${theme?.palette?.editor?.svgTextAlignStrokeColor} !important`,
135
- "& svg": {
136
- fill: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`,
137
- stroke: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`
138
- },
139
- "& path": {
140
- fill: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`,
141
- stroke: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`
142
- }
143
- },
144
- "& .accordianIconSvgTextFormat": {
145
- "& path": {
146
- stroke: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`
147
- }
148
- }
149
31
  }
150
32
  },
151
33
  "&:hover": {
@@ -171,6 +53,111 @@ const usePopupStyles = theme => ({
171
53
  },
172
54
  "& button": {
173
55
  color: theme?.palette?.editor?.textColor
56
+ },
57
+ "@media only screen and (min-width: 899px)": {
58
+ maxHeight: "400px"
59
+ },
60
+ "& .orderedListIcon, .bulletedListTextIcon, .checkedListTextIcon, .accordianIconSvgTextFormat": {
61
+ width: "20px !important"
62
+ },
63
+ "&::-webkit-scrollbar-thumb": {
64
+ background: `none !important`
65
+ },
66
+ "&::-webkit-scrollbar-track": {
67
+ visibility: "hidden"
68
+ },
69
+ "&::-webkit-scrollbar-thumb": {
70
+ background: `${theme?.palette?.editor?.brainPopupScroll} !important`
71
+ },
72
+ "&::-webkit-scrollbar-track": {
73
+ visibility: "hidden"
74
+ },
75
+ "& svg": {
76
+ width: "20px",
77
+ height: "20px"
78
+ },
79
+ "& .signatureElementIcon": {
80
+ "& path": {
81
+ fill: `${theme?.palette?.editor?.closeButtonSvgStroke}`
82
+ }
83
+ },
84
+ "& .commonSvgStyle": {
85
+ "& path": {
86
+ stroke: `${theme?.palette?.editor?.closeButtonSvgStroke}`
87
+ }
88
+ },
89
+ "& .commonSvgStyle2": {
90
+ "& path": {
91
+ stroke: `${theme?.palette?.editor?.closeButtonSvgStroke}`
92
+ }
93
+ },
94
+ "& .colorBoxElementIcon": {
95
+ "& path": {
96
+ stroke: `${theme?.palette?.editor?.closeButtonSvgStroke}`,
97
+ fill: "none"
98
+ }
99
+ },
100
+ "& .gridElementIcon": {
101
+ "& path": {
102
+ stroke: `${theme?.palette?.editor?.closeButtonSvgStroke}`
103
+ }
104
+ },
105
+ "& .newLineElementIcon": {
106
+ "& path": {
107
+ fill: `${theme?.palette?.editor?.closeButtonSvgStroke}`
108
+ }
109
+ },
110
+ "& .orderedListIcon": {
111
+ "& .strokePathList": {
112
+ stroke: theme?.palette?.editor?.closeButtonSvgStroke
113
+ },
114
+ "& .fillPathList": {
115
+ fill: theme?.palette?.editor?.closeButtonSvgStroke
116
+ }
117
+ },
118
+ "& .bulletedListTextIcon": {
119
+ "& path": {
120
+ fill: theme?.palette?.editor?.closeButtonSvgStroke,
121
+ stroke: theme?.palette?.editor?.closeButtonSvgStroke
122
+ },
123
+ "& circle": {
124
+ fill: theme?.palette?.editor?.closeButtonSvgStroke
125
+ }
126
+ },
127
+ "& .checkedListTextIcon": {
128
+ "& path": {
129
+ stroke: theme?.palette?.editor?.closeButtonSvgStroke
130
+ }
131
+ },
132
+ "& .accordianIconSvgTextFormat": {
133
+ "& path": {
134
+ stroke: theme?.palette?.editor?.closeButtonSvgStroke
135
+ }
136
+ },
137
+ "& .blockQuoteSvg": {
138
+ fill: theme?.palette?.editor?.closeButtonSvgStroke,
139
+ stroke: theme?.palette?.editor?.closeButtonSvgStroke
140
+ },
141
+ "& .BrainIcon": {
142
+ "& .bainIconPathStroke": {
143
+ fill: theme?.palette?.editor?.closeButtonSvgStroke,
144
+ stroke: "unset !important"
145
+ },
146
+ "& .bainIconPathStroke2": {
147
+ stroke: theme?.palette?.editor?.closeButtonSvgStroke,
148
+ fill: theme?.palette?.editor?.closeButtonSvgStroke
149
+ }
150
+ },
151
+ "& .calederIconSvg": {
152
+ '& rect': {
153
+ stroke: theme?.palette?.editor?.closeButtonSvgStroke
154
+ },
155
+ '& .strokePath': {
156
+ stroke: theme?.palette?.editor?.closeButtonSvgStroke
157
+ },
158
+ '& .fillPath': {
159
+ fill: theme?.palette?.editor?.closeButtonSvgStroke
160
+ }
174
161
  }
175
162
  },
176
163
  groupHeader: {
@@ -62,6 +62,7 @@ const FormSettings = props => {
62
62
  MuiAccordion: {
63
63
  styleOverrides: {
64
64
  root: {
65
+ background: theme?.palette?.editor?.miniToolBarBackground,
65
66
  "& .MuiAccordionSummary-root": {
66
67
  flexDirection: "row-reverse",
67
68
  "& .MuiSvgIcon-root": {
@@ -22,7 +22,7 @@ const useGuideLineStyle = ({
22
22
  backgroundColor: "#FFF",
23
23
  pointerEvents: "none",
24
24
  zIndex: 1,
25
- [theme.breakpoints.between("xs", "md")]: {
25
+ [theme?.breakpoints?.between("xs", "md")]: {
26
26
  left: "calc(50% - 160px)"
27
27
  }
28
28
  },
@@ -35,13 +35,13 @@ const useGuideLineStyle = ({
35
35
  backgroundColor: "#FFF",
36
36
  pointerEvents: "none",
37
37
  zIndex: 1,
38
- [theme.breakpoints.between("xs", "md")]: {
38
+ [theme?.breakpoints?.between("xs", "md")]: {
39
39
  left: "calc(50% + 160px)"
40
40
  }
41
41
  },
42
42
  "& .white-wrapper": {
43
43
  overflowX: "hidden",
44
- [theme.breakpoints.between("xs", "md")]: {
44
+ [theme?.breakpoints?.between("xs", "md")]: {
45
45
  position: "absolute",
46
46
  width: "calc(50% - 162px)",
47
47
  height: "calc(100% - 2px)",
@@ -10,7 +10,7 @@ const useShadowElementStyles = ({
10
10
  position: "relative",
11
11
  backgroundColor: "rgba(0,0,0,0)",
12
12
  marginLeft: `calc((100% - 980px) * 0.5)`,
13
- [theme.breakpoints.between("xs", "md")]: {
13
+ [theme?.breakpoints?.between("xs", "md")]: {
14
14
  marginLeft: `calc((100% - 320px) * 0.5)`
15
15
  }
16
16
  }
@@ -3,24 +3,35 @@ import PersonalVideoIcon from "@mui/icons-material/PersonalVideo";
3
3
  import PhoneIphoneIcon from "@mui/icons-material/PhoneIphone";
4
4
  import useSwitchViewport from "./styles";
5
5
  import { useEffect } from "react";
6
+ import { useEditorContext } from "../../../hooks/useMouseMove";
6
7
  import { jsx as _jsx } from "react/jsx-runtime";
7
8
  import { jsxs as _jsxs } from "react/jsx-runtime";
8
9
  const SwitchViewport = props => {
9
10
  const {
10
11
  breakpoint,
11
- onChange
12
+ onChange,
13
+ show
12
14
  } = props;
13
15
  const classes = useSwitchViewport();
16
+ const {
17
+ setSelectedElement,
18
+ setActiveBreakPoint
19
+ } = useEditorContext();
14
20
  useEffect(() => {
15
- console.log(breakpoint);
21
+ // to reset selection on viewport changes - FS-6589
22
+ setSelectedElement({});
16
23
  }, [breakpoint]);
17
24
  return /*#__PURE__*/_jsxs(Box, {
18
25
  sx: classes.root,
26
+ style: {
27
+ display: show ? "block" : "none"
28
+ },
19
29
  children: [/*#__PURE__*/_jsx(Tooltip, {
20
30
  title: "Desktop View",
21
31
  children: /*#__PURE__*/_jsx(IconButton, {
22
32
  className: `${!breakpoint || breakpoint === "lg" ? "active" : ""}`,
23
33
  onClick: () => {
34
+ setActiveBreakPoint("");
24
35
  onChange("");
25
36
  },
26
37
  children: /*#__PURE__*/_jsx(PersonalVideoIcon, {})
@@ -30,6 +41,7 @@ const SwitchViewport = props => {
30
41
  children: /*#__PURE__*/_jsx(IconButton, {
31
42
  className: `${breakpoint === "xs" ? "active" : ""}`,
32
43
  onClick: () => {
44
+ setActiveBreakPoint("xs");
33
45
  onChange("xs");
34
46
  },
35
47
  children: /*#__PURE__*/_jsx(PhoneIphoneIcon, {})
@@ -1,5 +1,6 @@
1
1
  import { Transforms, Node, Path } from "slate";
2
2
  import { ReactEditor } from "slate-react";
3
+ import { handleNegativeInteger } from "../../../utils/helper";
3
4
  export const ROW_HEIGHT = 50;
4
5
  const MARGIN_OF = {
5
6
  xs: 160,
@@ -75,7 +76,7 @@ const reRenderChildNodes = (editor, path) => {
75
76
  console.log(err);
76
77
  }
77
78
  };
78
- function isContainerElement(editor, moveTopath, props) {
79
+ function isContainerElement(editor, moveTopath, props, appenBp) {
79
80
  try {
80
81
  const {
81
82
  path,
@@ -91,6 +92,7 @@ function isContainerElement(editor, moveTopath, props) {
91
92
  parentNode = Node.get(editor, Path.parent(dragItemPath));
92
93
  }
93
94
  const moveToNode = Node.get(editor, moveTopath);
95
+ const leftOfMoveToNode = moveToNode[`left${appenBp}`];
94
96
  if (moveToNode.type === "freegridBox") {
95
97
  if (parentNode.type === "freegridBox") {
96
98
  // same box
@@ -98,10 +100,10 @@ function isContainerElement(editor, moveTopath, props) {
98
100
  return props.calX;
99
101
  } else {
100
102
  // for different box
101
- return parseInt(props.x - window.innerWidth / 2 + MARGIN_OF[props.breakpoint] - props.diffX - moveToNode.left);
103
+ return parseInt(props.x - window.innerWidth / 2 + MARGIN_OF[props.breakpoint] - props.diffX - leftOfMoveToNode);
102
104
  }
103
105
  } else {
104
- return props.calX - moveToNode?.left;
106
+ return props.calX - leftOfMoveToNode;
105
107
  }
106
108
  } else if (moveToNode.type === "freegrid") {
107
109
  if (parentNode.type === "freegridBox") {
@@ -133,14 +135,16 @@ export function onDropItem(props, parentClass) {
133
135
  const from = parentPath.split("|").map(m => parseInt(m));
134
136
  let newPath = [];
135
137
  newPath = moveTo;
136
- const cCalx = isContainerElement(editor, moveTo, props);
138
+ const appenBp = breakpoint === "lg" ? "" : `_${breakpoint}`;
139
+ const cCalx = isContainerElement(editor, moveTo, props, appenBp);
140
+
137
141
  // const posX = parseInt(
138
142
  // cx - window.innerWidth / 2 + MARGIN_OF[breakpoint] - diffX
139
143
  // );
140
144
  const toSectionNode = Node.get(editor, newPath);
141
145
  const addToSectionDOM = ReactEditor.toDOMNode(editor, toSectionNode);
142
146
  const rect = addToSectionDOM.getBoundingClientRect();
143
- const y = endPosition.y - startPosition.diffY - rect.top;
147
+ const y = handleNegativeInteger(endPosition.y - startPosition.diffY - rect.top);
144
148
 
145
149
  // Calculate grid position
146
150
  const row = Math.floor(y / ROW_HEIGHT) + 1;
@@ -150,7 +154,6 @@ export function onDropItem(props, parentClass) {
150
154
 
151
155
  // Update grid area
152
156
  const gridArea = `${row} / 1 / ${row + 1} / 2`;
153
- const appenBp = breakpoint === "lg" ? "" : `_${breakpoint}`;
154
157
  Transforms.setNodes(editor, {
155
158
  [`gridArea${appenBp}`]: gridArea,
156
159
  [`left${appenBp}`]: cCalx,