@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
@@ -1,7 +1,7 @@
1
1
  import React, { useEffect, useState } from "react";
2
2
  import { DialogTitle, DialogContent, DialogActions, Button, Grid, IconButton, Typography, Drawer, SwipeableDrawer, Accordion, AccordionSummary, AccordionDetails, createTheme } from "@mui/material";
3
3
  import FieldMap from "./fieldTypes";
4
- import CloseIcon from "@mui/icons-material/Close";
4
+ import CloseRoundedIcon from '@mui/icons-material/CloseRounded';
5
5
  import useCommonStyle from "../../commonStyle";
6
6
  import { useEditorContext } from "../../hooks/useMouseMove";
7
7
  import { ThemeProvider } from "@mui/material/styles";
@@ -69,6 +69,7 @@ const StyleBuilder = props => {
69
69
  const isMobile = customProps?.isMobile || false;
70
70
  const [elementProps, setElementProps] = useState(element);
71
71
  const [tab] = useState(renderTabs[0]?.value);
72
+ const [saveDisable, setSaveDisable] = useState(false);
72
73
  const tabVal = renderTabs?.find(f => f.value === tab);
73
74
  const {
74
75
  needActions = true
@@ -123,12 +124,17 @@ const StyleBuilder = props => {
123
124
  field_type: data?.element
124
125
  });
125
126
  if (data?.hasOwnProperty("name")) {
126
- setElementProps({
127
- ...elementProps,
128
- ...data,
129
- key: data?.name,
130
- label: data?.name
131
- });
127
+ if (data?.name === '') {
128
+ setSaveDisable(true);
129
+ } else {
130
+ setSaveDisable(false);
131
+ setElementProps({
132
+ ...elementProps,
133
+ ...data,
134
+ key: data?.name,
135
+ label: data?.name
136
+ });
137
+ }
132
138
  }
133
139
  };
134
140
  const handleSave = () => {
@@ -143,7 +149,8 @@ const StyleBuilder = props => {
143
149
  xs: 12,
144
150
  sx: {
145
151
  p: 2,
146
- width: isMobile ? "100%" : "350px"
152
+ width: isMobile ? "100%" : "312px",
153
+ ...classes.pageSettingPopUpRoot
147
154
  },
148
155
  children: [/*#__PURE__*/_jsx(DialogTitle, {
149
156
  sx: {
@@ -166,7 +173,7 @@ const StyleBuilder = props => {
166
173
  children: /*#__PURE__*/_jsx(IconButton, {
167
174
  onClick: onClose,
168
175
  className: "close-popupbtn",
169
- children: /*#__PURE__*/_jsx(CloseIcon, {})
176
+ children: /*#__PURE__*/_jsx(CloseRoundedIcon, {})
170
177
  })
171
178
  })]
172
179
  })
@@ -238,6 +245,7 @@ const StyleBuilder = props => {
238
245
  children: "Delete"
239
246
  }) : null, /*#__PURE__*/_jsx(Button, {
240
247
  onClick: handleSave,
248
+ disabled: saveDisable,
241
249
  className: "primaryBtn",
242
250
  children: "Save"
243
251
  })]
@@ -25,6 +25,10 @@ const pageSettingsStyle = [{
25
25
  label: "Padding",
26
26
  key: "bannerSpacing",
27
27
  type: "bannerSpacing"
28
+ }, {
29
+ label: "Line Spacing",
30
+ key: "lineHeight",
31
+ type: "lineSpacing"
28
32
  }]
29
33
  }, {
30
34
  tab: "Max Width",
@@ -39,7 +39,7 @@ const ToolbarIcon = props => {
39
39
  title: title,
40
40
  arrow: true,
41
41
  children: /*#__PURE__*/_jsxs(IconButton, {
42
- className: `${className} ${icoBtnType}`,
42
+ className: `${className} ${icoBtnType} accordionIcon`,
43
43
  onClick: onClick,
44
44
  style: style,
45
45
  children: [icon, renderIconText()]
@@ -4,6 +4,7 @@ import { convertBase64 } from "../utils/helper";
4
4
  import { uploadFile } from "../service/fileupload";
5
5
  import Icon from "./Icon";
6
6
  import UploadStyles from "../common/ImageSelector/UploadStyles";
7
+ import { useEditorContext } from "../hooks/useMouseMove";
7
8
  import { jsx as _jsx } from "react/jsx-runtime";
8
9
  import { Fragment as _Fragment } from "react/jsx-runtime";
9
10
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -18,6 +19,9 @@ const Uploader = props => {
18
19
  const [base64, setBase64] = useState(value?.url);
19
20
  const [fileName, setFileName] = useState("");
20
21
  const [uploading, setUploading] = useState(false);
22
+ const {
23
+ theme
24
+ } = useEditorContext();
21
25
  const handleChange = async e => {
22
26
  const uFile = e.target.files[0];
23
27
  const strImage = await convertBase64(uFile);
@@ -79,51 +83,57 @@ const Uploader = props => {
79
83
  });
80
84
  }
81
85
  };
82
- return /*#__PURE__*/_jsxs(Grid, {
83
- container: true,
84
- sx: classes.uploadContainer,
86
+ return /*#__PURE__*/_jsxs(_Fragment, {
85
87
  children: [/*#__PURE__*/_jsx(Grid, {
86
88
  item: true,
87
89
  xs: 12,
88
90
  children: uploading ? "Uploading..." : ""
89
91
  }), /*#__PURE__*/_jsx(Grid, {
90
- item: true,
91
- xs: 12,
92
- className: "btn--wrpr",
93
- style: {
94
- ...getBackground()
95
- },
96
- sx: classes.uploadField,
97
- children: !uploading ? /*#__PURE__*/_jsx(Grid, {
98
- className: "uploadImageSection",
99
- children: base64 ? renderThumb() : /*#__PURE__*/_jsx(Grid, {
100
- className: "uploadImageText",
101
- children: /*#__PURE__*/_jsxs(Button, {
102
- component: "label",
103
- variant: "text",
104
- style: {
105
- background: "none",
106
- width: "100%"
92
+ container: true,
93
+ sx: classes.uploadContainer,
94
+ children: /*#__PURE__*/_jsx(Grid, {
95
+ item: true,
96
+ xs: 12,
97
+ className: "btn--wrpr",
98
+ style: {
99
+ ...getBackground()
100
+ },
101
+ sx: classes.uploadField,
102
+ children: !uploading ? /*#__PURE__*/_jsx(Grid, {
103
+ className: "uploadImageSection",
104
+ children: base64 ? renderThumb() : /*#__PURE__*/_jsx(Grid, {
105
+ className: "uploadImageText",
106
+ sx: {
107
+ background: `${theme?.palette?.editor?.inputFieldBgColor}`,
108
+ border: `1px solid ${theme?.palette?.editor?.inputFieldBorder}`
107
109
  },
108
- sx: classes.uploadIcon,
109
- children: [/*#__PURE__*/_jsx("input", {
110
- type: "file",
111
- style: {
112
- opacity: 0,
113
- width: "0px"
114
- },
115
- onChange: handleChange
116
- }), /*#__PURE__*/_jsx(Icon, {
117
- icon: "fileUpload"
118
- }), /*#__PURE__*/_jsxs("span", {
110
+ children: /*#__PURE__*/_jsxs(Button, {
111
+ component: "label",
112
+ variant: "text",
119
113
  style: {
120
- paddingLeft: "8px"
114
+ background: "none",
115
+ width: "100%"
121
116
  },
122
- children: ["upload ", title || "image"]
123
- })]
117
+ sx: classes.uploadIcon,
118
+ children: [/*#__PURE__*/_jsx("input", {
119
+ type: "file",
120
+ style: {
121
+ opacity: 0,
122
+ width: "0px"
123
+ },
124
+ onChange: handleChange
125
+ }), /*#__PURE__*/_jsx(Icon, {
126
+ icon: "fileUpload"
127
+ }), /*#__PURE__*/_jsxs("span", {
128
+ style: {
129
+ paddingLeft: "8px"
130
+ },
131
+ children: ["upload ", title || "image"]
132
+ })]
133
+ })
124
134
  })
125
- })
126
- }) : null
135
+ }) : null
136
+ })
127
137
  })]
128
138
  });
129
139
  };