@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
@@ -18,7 +18,7 @@ import { selectText } from "../../utils/helper";
18
18
  import { removeSign } from "./ElementSettings/OtherSettings";
19
19
  import useDragging from "../../hooks/useDragging";
20
20
  import { dragOverOn } from "../../helper/RnD/focusNode";
21
- import { focusSelection, clearSelection } from "../../helper";
21
+ import { focusSelection, clearSelection, clearSelectionOnly } from "../../helper";
22
22
  import { jsx as _jsx } from "react/jsx-runtime";
23
23
  import { jsxs as _jsxs } from "react/jsx-runtime";
24
24
  import { Fragment as _Fragment } from "react/jsx-runtime";
@@ -163,6 +163,7 @@ const RnD = props => {
163
163
  }
164
164
  switch (e.detail) {
165
165
  case 1:
166
+ clearSelectionOnly(editor); //for selection removal on click outside
166
167
  if (!enable) {
167
168
  setSelectedElement({
168
169
  path: str_path,
@@ -3,13 +3,13 @@ import { useTheme } from "@mui/material";
3
3
  import { Transforms } from "slate";
4
4
  import { ReactEditor, useSlateStatic } from "slate-react";
5
5
  import { Box, IconButton, Popper, Tooltip } from "@mui/material";
6
- import TuneIcon from "@mui/icons-material/Tune";
7
6
  import SectionPopup from "../../Elements/Grid/SectionPopup";
8
7
  import { getBreakPointsValue, getTRBLBreakPoints, groupByBreakpoint } from "../../helper/theme";
9
8
  import DragHandle from "../DnD/DragHandleButton";
10
9
  import { useEditorSelection } from "../../hooks/useMouseMove";
11
10
  import SectionStyle from "./styles";
12
11
  import useWindowResize from "../../hooks/useWindowResize";
12
+ import { SectionSettingIcon } from "../iconListV2";
13
13
  import { jsx as _jsx } from "react/jsx-runtime";
14
14
  import { jsxs as _jsxs } from "react/jsx-runtime";
15
15
  import { Fragment as _Fragment } from "react/jsx-runtime";
@@ -72,13 +72,13 @@ const Section = props => {
72
72
  height: "100%"
73
73
  } : {
74
74
  left: "-28px",
75
- top: "3px"
75
+ top: "1px"
76
76
  },
77
77
  children: /*#__PURE__*/_jsx(Tooltip, {
78
78
  title: "Section Settings",
79
79
  children: /*#__PURE__*/_jsx(IconButton, {
80
80
  onClick: onSettings,
81
- children: /*#__PURE__*/_jsx(TuneIcon, {})
81
+ children: /*#__PURE__*/_jsx(SectionSettingIcon, {})
82
82
  })
83
83
  })
84
84
  }) : null;
@@ -2,8 +2,12 @@ const SectionStyle = (themeReact, theme) => ({
2
2
  root: {
3
3
  "&:hover": {
4
4
  "& .dh-para": {
5
- opacity: 1
5
+ opacity: 1,
6
+ background: 'transparent',
7
+ width: '30px'
8
+ // top: '2px'
6
9
  },
10
+
7
11
  "& .sectionIcon": {
8
12
  opacity: 1
9
13
  },
@@ -13,6 +13,7 @@ import { insertDivider } from "../../utils/divider";
13
13
  import { insertFreeGrid } from "../../utils/freegrid";
14
14
  import { Transforms } from "slate";
15
15
  import { insertInfinityAI } from "../../utils/infinityAI";
16
+ import { insertDataView } from "../../utils/dataView";
16
17
  import SearchButton from "../../Elements/Search/SearchButton";
17
18
  import { jsx as _jsx } from "react/jsx-runtime";
18
19
  const ELEMENTS_LIST = [{
@@ -158,7 +159,7 @@ const ELEMENTS_LIST = [{
158
159
  renderComponent: rest => /*#__PURE__*/_jsx(SearchButton, {
159
160
  ...rest,
160
161
  element: {
161
- name: 'Brain'
162
+ name: "Brain"
162
163
  },
163
164
  icoBtnType: "cmd"
164
165
  })
@@ -262,6 +263,17 @@ const ELEMENTS_LIST = [{
262
263
  onInsert: editor => {
263
264
  insertInfinityAI(editor);
264
265
  }
266
+ }, {
267
+ name: "Dynamic Table",
268
+ group: "Dynamic Table",
269
+ desc: "",
270
+ type: "dataView",
271
+ icon: /*#__PURE__*/_jsx(Icon, {
272
+ icon: "dataView"
273
+ }),
274
+ onInsert: editor => {
275
+ insertDataView(editor);
276
+ }
265
277
  }];
266
278
  const elements = props => {
267
279
  const {
@@ -6,7 +6,8 @@ const fieldStyle = [{
6
6
  fields: [{
7
7
  label: "Field Name",
8
8
  key: "name",
9
- type: "text"
9
+ type: "text",
10
+ required: true
10
11
  }, {
11
12
  label: "Field Type",
12
13
  key: "element",
@@ -60,9 +60,10 @@ const BackgroundImage = props => {
60
60
  item: true,
61
61
  xs: 12,
62
62
  style: {
63
- backgroundImage: base64 ? `url(${base64})` : "none",
64
- height: "200px"
63
+ backgroundImage: base64 ? `url(${base64})` : "none"
64
+ // height: "200px",
65
65
  },
66
+
66
67
  sx: classes.uploadField,
67
68
  children: /*#__PURE__*/_jsx(Grid, {
68
69
  className: "uploadImageSection",
@@ -72,6 +73,11 @@ const BackgroundImage = props => {
72
73
  children: "REMOVE"
73
74
  }) : /*#__PURE__*/_jsx(Grid, {
74
75
  className: "uploadImageText",
76
+ sx: {
77
+ padding: 0,
78
+ background: `${theme?.palette?.editor?.inputFieldBgColor}`,
79
+ border: `1px solid ${theme?.palette?.editor?.inputFieldBorder}`
80
+ },
75
81
  children: /*#__PURE__*/_jsxs(Button, {
76
82
  component: "label",
77
83
  variant: "text",
@@ -86,7 +92,7 @@ const BackgroundImage = props => {
86
92
  style: {
87
93
  paddingLeft: "8px"
88
94
  },
89
- children: "upload your image"
95
+ children: "Upload a image"
90
96
  })]
91
97
  })
92
98
  })
@@ -1,8 +1,9 @@
1
1
  import React, { useState } from "react";
2
- import { Checkbox, FormControlLabel, Grid, Slider, Typography, Box } from "@mui/material";
2
+ import { Checkbox, FormControlLabel, Grid, Slider, Typography, Box, IconButton } from "@mui/material";
3
3
  import { squreStyle } from "./radiusStyle";
4
4
  import { getBreakPointsValue } from "../../../helper/theme";
5
5
  import useWindowResize from "../../../hooks/useWindowResize";
6
+ import { CheckedBoxCheckIcon } from "../../iconListV2";
6
7
  import { jsx as _jsx } from "react/jsx-runtime";
7
8
  import { jsxs as _jsxs } from "react/jsx-runtime";
8
9
  const BANNER_SPACING_KEYS = ["top", "left", "right", "bottom"];
@@ -81,7 +82,18 @@ const BannerSpacing = props => {
81
82
  onChange: handleChange
82
83
  }), /*#__PURE__*/_jsx(Box, {
83
84
  component: "input",
84
- sx: classes.sapcingInput,
85
+ sx: {
86
+ ...classes.sapcingInput,
87
+ "::-webkit-outer-spin-button": {
88
+ WebkitAppearance: "none",
89
+ margin: 0
90
+ },
91
+ "::-webkit-inner-spin-button": {
92
+ WebkitAppearance: "none",
93
+ margin: 0
94
+ },
95
+ MozAppearance: "textfield"
96
+ },
85
97
  name: "top",
86
98
  value: !lockSpacing ? "" : pro_value?.top,
87
99
  className: "sliderInput",
@@ -92,10 +104,22 @@ const BannerSpacing = props => {
92
104
  })]
93
105
  }), /*#__PURE__*/_jsx(FormControlLabel, {
94
106
  className: "ccheckbox-primary",
107
+ sx: {
108
+ ...classes.customCheckBox
109
+ },
95
110
  control: /*#__PURE__*/_jsx(Checkbox, {
96
111
  value: !lockSpacing,
97
112
  checked: !lockSpacing,
98
- onChange: onLockSpacing
113
+ onChange: onLockSpacing,
114
+ variant: "outlined",
115
+ className: "checkBox",
116
+ checkedIcon: /*#__PURE__*/_jsx(IconButton, {
117
+ className: "checkedIcon",
118
+ children: /*#__PURE__*/_jsx(CheckedBoxCheckIcon, {})
119
+ }),
120
+ icon: /*#__PURE__*/_jsx(IconButton, {
121
+ className: "unCheckedIcon"
122
+ })
99
123
  }),
100
124
  label: /*#__PURE__*/_jsx(Typography, {
101
125
  variant: "body1",
@@ -1,8 +1,9 @@
1
1
  import React from "react";
2
- import { Grid, Typography, Slider, FormControlLabel, Checkbox, Box } from "@mui/material";
2
+ import { Grid, Typography, Slider, FormControlLabel, Checkbox, Box, IconButton } from "@mui/material";
3
3
  import { radiusStyle } from "./radiusStyle";
4
4
  import useWindowResize from "../../../hooks/useWindowResize";
5
5
  import { getBreakPointsValue, getCustomizationValue } from "../../../helper/theme";
6
+ import { CheckedBoxCheckIcon } from "../../iconListV2";
6
7
  import { jsx as _jsx } from "react/jsx-runtime";
7
8
  import { jsxs as _jsxs } from "react/jsx-runtime";
8
9
  const BORDER_RADIUS_KEYS = ["topLeft", "topRight", "bottomLeft", "bottomRight"];
@@ -90,10 +91,22 @@ const BorderRadius = props => {
90
91
  })]
91
92
  }), /*#__PURE__*/_jsx(FormControlLabel, {
92
93
  className: "ccheckbox-primary",
94
+ sx: {
95
+ ...classes.customCheckBox
96
+ },
93
97
  control: /*#__PURE__*/_jsx(Checkbox, {
94
98
  value: !lockRadius,
95
99
  checked: !lockRadius,
96
- onChange: onLockRadius
100
+ onChange: onLockRadius,
101
+ variant: "outlined",
102
+ className: "checkBox",
103
+ checkedIcon: /*#__PURE__*/_jsx(IconButton, {
104
+ className: "checkedIcon",
105
+ children: /*#__PURE__*/_jsx(CheckedBoxCheckIcon, {})
106
+ }),
107
+ icon: /*#__PURE__*/_jsx(IconButton, {
108
+ className: "unCheckedIcon"
109
+ })
97
110
  }),
98
111
  label: /*#__PURE__*/_jsx(Typography, {
99
112
  variant: "body1",
@@ -1,6 +1,7 @@
1
1
  import { Box, Card, Checkbox, FormControlLabel, Grid, Tooltip, Typography } from "@mui/material";
2
2
  import React from "react";
3
3
  import Icon from "../../Icon";
4
+ import { useEditorContext } from "../../../hooks/useMouseMove";
4
5
  import { jsx as _jsx } from "react/jsx-runtime";
5
6
  import { Fragment as _Fragment } from "react/jsx-runtime";
6
7
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -15,7 +16,10 @@ const RenderCard = ({
15
16
  return /*#__PURE__*/_jsx(Card, {
16
17
  sx: {
17
18
  position: 'relative',
18
- padding: "10px"
19
+ padding: "10px",
20
+ '& .MuiCheckbox-root svg': {
21
+ fill: 'unset !important'
22
+ }
19
23
  },
20
24
  children: /*#__PURE__*/_jsx(FormControlLabel, {
21
25
  control: /*#__PURE__*/_jsx(Checkbox, {
@@ -81,6 +85,9 @@ const CardsMapping = props => {
81
85
  selectedCard,
82
86
  infoIcon
83
87
  } = data;
88
+ const {
89
+ theme
90
+ } = useEditorContext();
84
91
  const activeCard = value === selectedCard;
85
92
  const handleChange = e => {
86
93
  if (selectedCard === data?.value) {
@@ -99,7 +106,8 @@ const CardsMapping = props => {
99
106
  sx: {
100
107
  marginBottom: "12px",
101
108
  "& .MuiPaper-root": {
102
- border: activeCard ? "1px solid #2563EB" : "1px solid #C8D8FA",
109
+ background: theme?.palette?.editor?.miniToolBarBackground,
110
+ border: activeCard ? "1px solid #2563EB" : `1px solid ${theme?.palette?.editor?.inputFieldBorder}`,
103
111
  borderRadius: "8px",
104
112
  boxShadow: activeCard ? "0px 4px 16px 0px #2563EB40" : "unset"
105
113
  }
@@ -16,6 +16,7 @@ const Color = props => {
16
16
  hideGradient
17
17
  } = data;
18
18
  const [recentColors, setRecentColors] = useState({});
19
+ const getLable = label === 'Text' ? 'Select text color' : label === 'Background' ? 'Select background color' : label;
19
20
  useEffect(() => {
20
21
  const storedColors = JSON.parse(localStorage.getItem("recentColors"));
21
22
  if (storedColors) {
@@ -73,7 +74,7 @@ const Color = props => {
73
74
  }), /*#__PURE__*/_jsx(TextField, {
74
75
  fullWidth: true,
75
76
  value: value,
76
- placeholder: `${label} color code`,
77
+ placeholder: getLable || `${label} color code`,
77
78
  InputLabelProps: {
78
79
  shrink: true
79
80
  },
@@ -73,7 +73,7 @@ const FontSize = props => {
73
73
  size: "small",
74
74
  inputProps: {
75
75
  style: {
76
- textAlign: "center",
76
+ // textAlign: "center",
77
77
  padding: "11px"
78
78
  }
79
79
  },
@@ -91,12 +91,14 @@ const Icons = props => {
91
91
  overflowY: "auto",
92
92
  paddingTop: "5px"
93
93
  },
94
+ className: "muiIconsListParent",
94
95
  children: list.map(m => {
95
96
  return /*#__PURE__*/_jsx(Tooltip, {
96
97
  title: m,
97
98
  arrow: true,
98
99
  children: /*#__PURE__*/_jsx(IconButton, {
99
100
  onClick: onSelectIcon(m),
101
+ className: "muiIconsList",
100
102
  children: /*#__PURE__*/_jsx(MUIIcon, {
101
103
  iconName: m,
102
104
  props: customProps
@@ -18,6 +18,7 @@ import FontSize from "./fontSize";
18
18
  import SelectSwitch from "./selectSwitch";
19
19
  import CardsMapping from "./card";
20
20
  import MetaDataMapping from "./metaDataMapping";
21
+ import LineSpacing from "./lineSpacing";
21
22
  const FieldMap = {
22
23
  text: Text,
23
24
  bannerSpacing: BannerSpacing,
@@ -38,6 +39,7 @@ const FieldMap = {
38
39
  fontSize: FontSize,
39
40
  selectSwitch: SelectSwitch,
40
41
  card: CardsMapping,
41
- metadatamapping: MetaDataMapping
42
+ metadatamapping: MetaDataMapping,
43
+ lineSpacing: LineSpacing
42
44
  };
43
45
  export default FieldMap;
@@ -0,0 +1,79 @@
1
+ import React, { useState } from "react";
2
+ import { Grid, Slider, Typography, Box } from "@mui/material";
3
+ import { getBreakPointsValue } from "../../../helper/theme";
4
+ import useWindowResize from "../../../hooks/useWindowResize";
5
+ import { useEditorContext } from "../../../hooks/useMouseMove";
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ import { jsxs as _jsxs } from "react/jsx-runtime";
8
+ const LineSpacing = props => {
9
+ const {
10
+ value: val,
11
+ data,
12
+ onChange
13
+ } = props;
14
+ const {
15
+ theme
16
+ } = useEditorContext();
17
+ const {
18
+ key
19
+ } = data;
20
+ const [size] = useWindowResize();
21
+ const pro_value = getBreakPointsValue(val, size?.device);
22
+ const [value, setValue] = useState(pro_value);
23
+ let breakpointValue = getBreakPointsValue(val, null);
24
+ breakpointValue = typeof breakpointValue['lg'] === 'object' ? breakpointValue['lg'] : breakpointValue;
25
+ useState(() => {
26
+ setValue(pro_value);
27
+ }, [pro_value]);
28
+ const handleChange = e => {
29
+ onChange({
30
+ [key]: {
31
+ ...breakpointValue,
32
+ [size?.device]: e.target.value
33
+ }
34
+ });
35
+ };
36
+ return /*#__PURE__*/_jsxs(Grid, {
37
+ item: true,
38
+ xs: 12,
39
+ children: [/*#__PURE__*/_jsx(Typography, {
40
+ variant: "body1",
41
+ color: "primary",
42
+ style: {
43
+ fontSize: "14px",
44
+ fontWeight: 500
45
+ },
46
+ children: data?.label
47
+ }), /*#__PURE__*/_jsxs(Grid, {
48
+ container: true,
49
+ wrap: "nowrap",
50
+ className: "sld-wrpr",
51
+ children: [/*#__PURE__*/_jsx(Slider, {
52
+ className: "spacingSlider",
53
+ defaultValue: value || 1.43,
54
+ "aria-label": "Default",
55
+ valueLabelDisplay: "auto",
56
+ min: 0.5,
57
+ max: 3.0,
58
+ step: 0.1,
59
+ name: "lineHeight",
60
+ onChange: handleChange
61
+ }), /*#__PURE__*/_jsx(Box, {
62
+ component: "input",
63
+ sx: {
64
+ background: theme?.palette?.editor?.background,
65
+ color: theme?.palette?.editor?.textColor
66
+ },
67
+ name: "lineHeight",
68
+ value: pro_value,
69
+ className: "sliderInput",
70
+ onChange: handleChange,
71
+ type: "number",
72
+ placeholder: "0",
73
+ disabled: true,
74
+ defaultValue: pro_value || 1.43
75
+ })]
76
+ })]
77
+ });
78
+ };
79
+ export default LineSpacing;
@@ -53,7 +53,7 @@ export const radiusStyle = {
53
53
  export const squreStyle = {
54
54
  topLeft: {
55
55
  position: "absolute",
56
- left: "-35px",
56
+ left: "-37px",
57
57
  top: "50%",
58
58
  transform: "translateY(-50%)",
59
59
  width: "30px",
@@ -71,7 +71,7 @@ export const squreStyle = {
71
71
  // top: "-28px",
72
72
  left: "50%",
73
73
  transform: "translateX(-50%)",
74
- top: "-35px",
74
+ top: "-37px",
75
75
  width: "30px",
76
76
  height: "30px",
77
77
  // borderTop: `2px solid #2563eb`,
@@ -85,7 +85,7 @@ export const squreStyle = {
85
85
  // left: "-25px",
86
86
  top: "50%",
87
87
  transform: "translateY(-50%)",
88
- right: "-35px",
88
+ right: "-37px",
89
89
  width: "30px",
90
90
  height: "30px",
91
91
  // borderBottom: `2px solid #2563eb`,
@@ -96,7 +96,7 @@ export const squreStyle = {
96
96
  },
97
97
  bottomRight: {
98
98
  position: "absolute",
99
- bottom: "-35px",
99
+ bottom: "-37px",
100
100
  // right: "-25px",
101
101
  left: "50%",
102
102
  transform: "translateX(-50%)",
@@ -3,6 +3,8 @@ import { Grid, Button, Typography, Select, MenuItem, TextField } from "@mui/mate
3
3
  import CloudUploadIcon from "@mui/icons-material/CloudUpload";
4
4
  import { convertBase64 } from "../../../utils/helper";
5
5
  import { uploadFile } from "../../../service/fileupload";
6
+ import { useEditorContext } from "../../../hooks/useMouseMove";
7
+ import useCommonStyle from "../../../commonStyle";
6
8
  import { jsx as _jsx } from "react/jsx-runtime";
7
9
  import { jsxs as _jsxs } from "react/jsx-runtime";
8
10
  import { Fragment as _Fragment } from "react/jsx-runtime";
@@ -30,6 +32,10 @@ const SaveAsTemplate = props => {
30
32
  });
31
33
  const [base64, setBase64] = useState(value);
32
34
  const [uploading, setUploading] = useState(false);
35
+ const {
36
+ theme
37
+ } = useEditorContext();
38
+ const classes = useCommonStyle(theme);
33
39
  const handleChange = async e => {
34
40
  const file = e.target.files[0];
35
41
  const strImage = await convertBase64(file);
@@ -76,6 +82,9 @@ const SaveAsTemplate = props => {
76
82
  onSaveTemplate(formData, params);
77
83
  handleClose();
78
84
  };
85
+ if (!onSaveTemplate) {
86
+ return null;
87
+ }
79
88
  return /*#__PURE__*/_jsxs(_Fragment, {
80
89
  children: [/*#__PURE__*/_jsx(Grid, {
81
90
  item: true,
@@ -149,9 +158,14 @@ const SaveAsTemplate = props => {
149
158
  justifyContent: "space-between",
150
159
  alignItems: "center",
151
160
  children: [/*#__PURE__*/_jsxs(Button, {
152
- component: "label",
153
- variant: "contained",
161
+ component: "label"
162
+ // variant="contained"
163
+ ,
164
+ className: "gradientFillBtn",
154
165
  startIcon: /*#__PURE__*/_jsx(CloudUploadIcon, {}),
166
+ sx: {
167
+ ...classes.gradientFillBtn
168
+ },
155
169
  children: ["Upload file", /*#__PURE__*/_jsx("input", {
156
170
  type: "file",
157
171
  style: {
@@ -194,12 +208,14 @@ const SaveAsTemplate = props => {
194
208
  },
195
209
  className: "action-btn-wrpr",
196
210
  children: [/*#__PURE__*/_jsx(Button, {
197
- className: "savebtn",
211
+ className: "savebtn gradientFillBtn",
198
212
  onClick: handleSave,
199
213
  sx: {
200
- fontWeight: 700
201
- },
202
- variant: "contained",
214
+ fontWeight: 700,
215
+ ...classes.gradientFillBtn
216
+ }
217
+ // variant="contained"
218
+ ,
203
219
  children: saveText
204
220
  }), closeText ? /*#__PURE__*/_jsx(Button, {
205
221
  className: "closebtn",
@@ -1,5 +1,8 @@
1
1
  import React, { useEffect, useState, useRef } from "react";
2
- import { Grid, Checkbox, FormControlLabel, FormHelperText } from "@mui/material";
2
+ import { Grid, Checkbox, FormControlLabel, FormHelperText, IconButton } from "@mui/material";
3
+ import useCommonStyle from "../../../commonStyle";
4
+ import { useEditorContext } from "../../../hooks/useMouseMove";
5
+ import { CheckedBoxCheckIcon } from "../../iconListV2";
3
6
  import { jsx as _jsx } from "react/jsx-runtime";
4
7
  import { jsxs as _jsxs } from "react/jsx-runtime";
5
8
  const SelectBox = props => {
@@ -15,6 +18,10 @@ const SelectBox = props => {
15
18
  } = data;
16
19
  const [checkedValue, setCheckedValue] = useState(false);
17
20
  const isFirstRender = useRef(true);
21
+ const {
22
+ theme
23
+ } = useEditorContext();
24
+ const classes = useCommonStyle(theme);
18
25
  useEffect(() => {
19
26
  if (isFirstRender.current && elementProps.element === "email" && value === undefined) {
20
27
  setCheckedValue(true);
@@ -35,10 +42,22 @@ const SelectBox = props => {
35
42
  marginBottom: "12px"
36
43
  },
37
44
  children: [/*#__PURE__*/_jsx(FormControlLabel, {
45
+ className: "ccheckbox-primary",
46
+ sx: {
47
+ ...classes.customCheckBox
48
+ },
38
49
  control: /*#__PURE__*/_jsx(Checkbox, {
39
50
  value: value,
40
51
  checked: checkedValue,
41
- onChange: handleChange
52
+ onChange: handleChange,
53
+ className: "checkBox",
54
+ checkedIcon: /*#__PURE__*/_jsx(IconButton, {
55
+ className: "checkedIcon",
56
+ children: /*#__PURE__*/_jsx(CheckedBoxCheckIcon, {})
57
+ }),
58
+ icon: /*#__PURE__*/_jsx(IconButton, {
59
+ className: "unCheckedIcon"
60
+ })
42
61
  }),
43
62
  label: placeholder
44
63
  }), /*#__PURE__*/_jsx(FormHelperText, {
@@ -11,13 +11,21 @@ const Text = props => {
11
11
  const {
12
12
  key,
13
13
  placeholder,
14
- width
14
+ width,
15
+ required = false
15
16
  } = data;
16
17
  const [value, setValue] = useState(pro_value);
18
+ const [error, setError] = useState(false);
17
19
  const handleChange = e => {
18
- setValue(e.target.value);
20
+ const newValue = e.target.value;
21
+ setValue(newValue);
22
+ if (required && !newValue.trim()) {
23
+ setError(true);
24
+ } else {
25
+ setError(false);
26
+ }
19
27
  onChange({
20
- [key]: e.target.value
28
+ [key]: newValue
21
29
  });
22
30
  };
23
31
  return /*#__PURE__*/_jsxs(Grid, {
@@ -39,7 +47,10 @@ const Text = props => {
39
47
  value: value,
40
48
  onChange: handleChange,
41
49
  size: "small",
42
- fullWidth: true
50
+ fullWidth: true,
51
+ required: required,
52
+ error: error,
53
+ helperText: error ? 'This field is required' : ''
43
54
  })]
44
55
  });
45
56
  };
@@ -5,6 +5,7 @@ import useWindowResize from "../../../hooks/useWindowResize";
5
5
  import { useEditorContext } from "../../../hooks/useMouseMove";
6
6
  import FontFamilyAutocomplete from "../../../Toolbar/FormatTools/FontFamilyAutocomplete";
7
7
  import { useSlate } from "slate-react";
8
+ import KeyboardArrowDownRoundedIcon from "@mui/icons-material/KeyboardArrowDownRounded";
8
9
 
9
10
  // hideMetaDataOptions -- pass true to hide metadata option in select field
10
11
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -90,6 +91,12 @@ const TextOptions = props => {
90
91
  marginBottom: "16px"
91
92
  },
92
93
  sx: classes.textOptions,
94
+ IconComponent: KeyboardArrowDownRoundedIcon,
95
+ MenuProps: {
96
+ sx: {
97
+ ...classes.textOptionsList
98
+ }
99
+ },
93
100
  children: updatedOption?.map((m, i) => {
94
101
  return m?.value === "listSubHeader" ? /*#__PURE__*/_jsx(ListSubheader, {
95
102
  children: m?.label