@flozy/editor 1.2.0 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. package/dist/Editor/CollaborativeEditor.js +5 -3
  2. package/dist/Editor/CommonEditor.js +17 -3
  3. package/dist/Editor/Editor.css +132 -16
  4. package/dist/Editor/Elements/Accordion/AccordionButton.js +2 -2
  5. package/dist/Editor/Elements/AppHeader/AppHeaderButton.js +2 -2
  6. package/dist/Editor/Elements/Button/ButtonToolIcon.js +2 -2
  7. package/dist/Editor/Elements/Carousel/CarouselButton.js +2 -2
  8. package/dist/Editor/Elements/ChipText/ChipTextButton.js +5 -1
  9. package/dist/Editor/Elements/Color Picker/ColorPicker.css +26 -6
  10. package/dist/Editor/Elements/Color Picker/ColorPicker.js +58 -44
  11. package/dist/Editor/Elements/DrawerMenu/DrawerMenu.js +6 -1
  12. package/dist/Editor/Elements/DrawerMenu/DrawerMenuButton.js +2 -2
  13. package/dist/Editor/Elements/Embed/Embed.js +72 -34
  14. package/dist/Editor/Elements/Grid/GridButton.js +2 -2
  15. package/dist/Editor/Elements/Link/LinkButton.js +87 -38
  16. package/dist/Editor/Elements/NewLine/NewLineButton.js +7 -1
  17. package/dist/Editor/Elements/PageSettings/PageSettingsButton.js +2 -2
  18. package/dist/Editor/Elements/Signature/Signature.css +75 -0
  19. package/dist/Editor/Elements/Signature/SignatureButton.js +2 -2
  20. package/dist/Editor/Elements/Signature/SignatureOptions/UploadSignature.js +20 -3
  21. package/dist/Editor/Elements/Signature/SignaturePopup.js +203 -150
  22. package/dist/Editor/Elements/Table/TableSelector.js +112 -41
  23. package/dist/Editor/Toolbar/Toolbar.js +1 -1
  24. package/dist/Editor/Toolbar/styles.css +8 -2
  25. package/dist/Editor/common/ColorPickerButton.js +6 -2
  26. package/dist/Editor/common/EditorIcons.js +81 -0
  27. package/dist/Editor/common/Icon.js +40 -20
  28. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +38 -19
  29. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +27 -9
  30. package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +38 -20
  31. package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +14 -3
  32. package/dist/Editor/common/StyleBuilder/fieldTypes/text.js +8 -4
  33. package/dist/Editor/common/StyleBuilder/index.js +68 -28
  34. package/dist/Editor/common/Uploader.js +29 -23
  35. package/dist/Editor/common/iconslist.js +883 -0
  36. package/package.json +1 -1
@@ -1,6 +1,7 @@
1
1
  import React, { useState } from "react";
2
- import { Dialog, DialogTitle, DialogContent, DialogActions, Button, Tabs, Tab, Grid } from "@mui/material";
2
+ import { Dialog, DialogTitle, DialogContent, DialogActions, Button, Tabs, Tab, Grid, IconButton, Typography } from "@mui/material";
3
3
  import FieldMap from "./fieldTypes";
4
+ import CloseIcon from "@mui/icons-material/Close";
4
5
  import { jsx as _jsx } from "react/jsx-runtime";
5
6
  import { jsxs as _jsxs } from "react/jsx-runtime";
6
7
  const StyleContent = props => {
@@ -51,6 +52,7 @@ const StyleTabs = props => {
51
52
  variant: "scrollable",
52
53
  scrollButtons: "auto",
53
54
  "aria-label": "scrollable auto tabs example",
55
+ className: "editorTabs",
54
56
  children: renderTabs.map((m, i) => {
55
57
  return /*#__PURE__*/_jsx(Tab, {
56
58
  value: m.value,
@@ -83,36 +85,74 @@ const StyleBuilder = props => {
83
85
  const handleSave = () => {
84
86
  onSave(elementProps);
85
87
  };
86
- return /*#__PURE__*/_jsxs(Dialog, {
88
+ return /*#__PURE__*/_jsx(Dialog, {
87
89
  open: true,
88
90
  fullWidth: true,
89
- children: [/*#__PURE__*/_jsxs(DialogTitle, {
90
- children: [title, " "]
91
- }), /*#__PURE__*/_jsxs(DialogContent, {
92
- children: [/*#__PURE__*/_jsx(StyleTabs, {
93
- renderTabs: renderTabs,
94
- value: tab,
95
- handleChange: handleChange
96
- }), /*#__PURE__*/_jsx(StyleContent, {
97
- renderTabs: renderTabs,
98
- value: tab,
99
- element: elementProps,
100
- onChange: onElementPropsChange,
101
- customProps: customProps
102
- })]
103
- }), /*#__PURE__*/_jsxs(DialogActions, {
104
- children: [onDelete ? /*#__PURE__*/_jsx(Button, {
105
- onClick: onDelete,
106
- color: "error",
107
- children: "Delete"
108
- }) : null, /*#__PURE__*/_jsx(Button, {
109
- onClick: onClose,
110
- children: "Cancel"
111
- }), /*#__PURE__*/_jsx(Button, {
112
- onClick: handleSave,
113
- children: "Save"
91
+ children: /*#__PURE__*/_jsxs(Grid, {
92
+ item: true,
93
+ xs: 12,
94
+ sx: {
95
+ p: 3
96
+ },
97
+ children: [/*#__PURE__*/_jsx(DialogTitle, {
98
+ sx: {
99
+ p: 0,
100
+ pb: 2
101
+ },
102
+ children: /*#__PURE__*/_jsxs(Grid, {
103
+ container: true,
104
+ justifyContent: "space-between",
105
+ children: [/*#__PURE__*/_jsx(Typography, {
106
+ variant: "h6",
107
+ className: "popupTitle",
108
+ children: title
109
+ }), /*#__PURE__*/_jsx(Grid, {
110
+ style: {
111
+ display: "flex"
112
+ },
113
+ children: /*#__PURE__*/_jsx(IconButton, {
114
+ onClick: onClose,
115
+ className: "close-popupbtn",
116
+ children: /*#__PURE__*/_jsx(CloseIcon, {})
117
+ })
118
+ })]
119
+ })
120
+ }), /*#__PURE__*/_jsxs(DialogContent, {
121
+ sx: {
122
+ p: 0
123
+ },
124
+ children: [/*#__PURE__*/_jsx(StyleTabs, {
125
+ renderTabs: renderTabs,
126
+ value: tab,
127
+ handleChange: handleChange
128
+ }), /*#__PURE__*/_jsx(StyleContent, {
129
+ renderTabs: renderTabs,
130
+ value: tab,
131
+ element: elementProps,
132
+ onChange: onElementPropsChange,
133
+ customProps: customProps
134
+ })]
135
+ }), /*#__PURE__*/_jsxs(DialogActions, {
136
+ sx: {
137
+ p: 0,
138
+ pt: 2
139
+ },
140
+ children: [onDelete ? /*#__PURE__*/_jsx(Button, {
141
+ onClick: onDelete,
142
+ color: "error",
143
+ className: "deleteBtn",
144
+ children: "Delete"
145
+ }) : null, /*#__PURE__*/_jsx(Button, {
146
+ onClick: onClose,
147
+ className: "secondaryBtn",
148
+ children: "Cancel"
149
+ }), /*#__PURE__*/_jsx(Button, {
150
+ onClick: handleSave,
151
+ className: "primaryBtn",
152
+ children: "Save"
153
+ })]
114
154
  })]
115
- })]
155
+ })
116
156
  });
117
157
  };
118
158
  export default StyleBuilder;
@@ -43,32 +43,38 @@ const Uploader = props => {
43
43
  };
44
44
  return /*#__PURE__*/_jsxs(Grid, {
45
45
  container: true,
46
- padding: 3,
47
- children: [/*#__PURE__*/_jsxs(Grid, {
46
+ sx: {
47
+ pt: 3
48
+ },
49
+ children: [/*#__PURE__*/_jsx(Grid, {
48
50
  item: true,
49
51
  xs: 12,
50
- style: {
51
- display: "flex"
52
- },
53
- justifyContent: "center",
54
- alignItems: "center",
55
- children: [/*#__PURE__*/_jsxs(Button, {
56
- component: "label",
57
- variant: "contained",
58
- startIcon: /*#__PURE__*/_jsx(CloudUploadIcon, {}),
59
- children: ["Upload file", /*#__PURE__*/_jsx("input", {
60
- type: "file",
61
- style: {
62
- opacity: 0
52
+ children: /*#__PURE__*/_jsxs(Grid, {
53
+ container: true,
54
+ justifyContent: "space-between",
55
+ children: [/*#__PURE__*/_jsxs(Button, {
56
+ component: "label",
57
+ sx: {
58
+ display: 'inline-flex',
59
+ width: '154px',
60
+ whiteSpace: 'nowrap'
63
61
  },
64
- onChange: handleChange
65
- })]
66
- }), /*#__PURE__*/_jsx("input", {
67
- type: "checkbox",
68
- value: "none",
69
- checked: value === "none",
70
- onChange: onRemoveBG
71
- }), " ", "None"]
62
+ variant: "contained",
63
+ startIcon: /*#__PURE__*/_jsx(CloudUploadIcon, {}),
64
+ children: ["Upload file", /*#__PURE__*/_jsx("input", {
65
+ type: "file",
66
+ style: {
67
+ opacity: 0
68
+ },
69
+ onChange: handleChange
70
+ })]
71
+ }), base64 ? /*#__PURE__*/_jsx(Button, {
72
+ variant: "contained",
73
+ color: "secondary",
74
+ onClick: onRemoveBG,
75
+ children: "Clear"
76
+ }) : '']
77
+ })
72
78
  }), uploading ? "Uploading..." : "", /*#__PURE__*/_jsx(Grid, {
73
79
  item: true,
74
80
  xs: 12,