@flozy/editor 10.6.5 → 10.6.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/dist/Editor/CommonEditor.js +17 -1
  2. package/dist/Editor/Editor.css +26 -0
  3. package/dist/Editor/Elements/Accordion/Accordion.js +46 -9
  4. package/dist/Editor/Elements/Accordion/AccordionSummary.js +2 -25
  5. package/dist/Editor/Elements/AppHeader/AppHeader.js +7 -2
  6. package/dist/Editor/Elements/Button/EditorButton.js +2 -2
  7. package/dist/Editor/Elements/Carousel/CarouselItem.js +2 -1
  8. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/SelectV1.js +510 -0
  9. package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +10 -10
  10. package/dist/Editor/Elements/DataView/Layouts/DataTypes/SelectType.js +28 -9
  11. package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +12 -5
  12. package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +44 -18
  13. package/dist/Editor/Elements/Divider/Divider.js +1 -1
  14. package/dist/Editor/Elements/Embed/Embed.css +4 -0
  15. package/dist/Editor/Elements/Form/Form.js +3 -3
  16. package/dist/Editor/Elements/Form/FormElements/FormTextArea.js +0 -1
  17. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +4 -1
  18. package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +1 -0
  19. package/dist/Editor/Elements/Grid/Grid.js +14 -2
  20. package/dist/Editor/Elements/Signature/Signature.css +2 -1
  21. package/dist/Editor/Elements/Signature/SignatureOptions/DrawSignature.js +18 -5
  22. package/dist/Editor/Elements/Signature/SignatureOptions/UploadSignature.js +16 -3
  23. package/dist/Editor/Elements/Table/AddRowCol.js +8 -2
  24. package/dist/Editor/Elements/Table/DragButton.js +0 -1
  25. package/dist/Editor/Elements/Table/Draggable.js +6 -2
  26. package/dist/Editor/Elements/Table/Styles.js +7 -0
  27. package/dist/Editor/Elements/Table/TableCell.js +24 -5
  28. package/dist/Editor/Elements/Title/title.js +2 -5
  29. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +4 -4
  30. package/dist/Editor/Toolbar/PopupTool/index.js +7 -3
  31. package/dist/Editor/common/Checkbox/index.js +46 -0
  32. package/dist/Editor/common/Checkbox/styles.js +45 -0
  33. package/dist/Editor/common/ColorPickerButton.js +3 -0
  34. package/dist/Editor/common/LinkSettings/NavComponents.js +45 -65
  35. package/dist/Editor/common/LinkSettings/index.js +17 -28
  36. package/dist/Editor/common/LinkSettings/navOptions.js +2 -2
  37. package/dist/Editor/common/LinkSettings/style.js +164 -244
  38. package/dist/Editor/common/RadioGroup/index.js +48 -0
  39. package/dist/Editor/common/RadioGroup/styles.js +29 -0
  40. package/dist/Editor/common/RnD/ElementOptions/Actions.js +4 -5
  41. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Signature.js +4 -3
  42. package/dist/Editor/common/RnD/ElementSettings/styles.js +0 -1
  43. package/dist/Editor/common/RnD/OptionsPopup/style.js +0 -1
  44. package/dist/Editor/common/RnD/Utils/gridDropItem.js +0 -1
  45. package/dist/Editor/common/RnD/Utils/index.js +55 -24
  46. package/dist/Editor/common/RnD/VirtualElement/helper.js +3 -2
  47. package/dist/Editor/common/RnD/index.js +30 -27
  48. package/dist/Editor/common/Select/index.js +44 -7
  49. package/dist/Editor/common/Select/styles.js +30 -2
  50. package/dist/Editor/common/StyleBuilder/accordionTitleBtnStyle.js +2 -2
  51. package/dist/Editor/common/StyleBuilder/accordionTitleStyle.js +12 -9
  52. package/dist/Editor/common/SwipeableDrawer/style.js +14 -12
  53. package/dist/Editor/common/iconListV2.js +76 -0
  54. package/dist/Editor/commonStyle.js +12 -0
  55. package/dist/Editor/helper/deserialize/index.js +6 -4
  56. package/dist/Editor/helper/index.js +4 -0
  57. package/dist/Editor/hooks/useTable.js +5 -4
  58. package/dist/Editor/plugins/withCustomDeleteBackward.js +6 -1
  59. package/dist/Editor/plugins/withHTML.js +11 -4
  60. package/dist/Editor/utils/SlateUtilityFunctions.js +21 -32
  61. package/dist/Editor/utils/accordion.js +129 -39
  62. package/dist/Editor/utils/customHooks/useTableResize.js +49 -9
  63. package/dist/Editor/utils/events.js +17 -5
  64. package/dist/Editor/utils/formfield.js +1 -0
  65. package/dist/Editor/utils/helper.js +53 -9
  66. package/dist/Editor/utils/insertAppHeader.js +1 -1
  67. package/dist/Editor/utils/signature.js +2 -9
  68. package/dist/Editor/utils/updateFormName.js +22 -0
  69. package/package.json +1 -1
@@ -1,8 +1,8 @@
1
- import { Autocomplete, Checkbox, FormControlLabel, IconButton, MenuItem, TextField, Typography, createFilterOptions } from "@mui/material";
1
+ import { Autocomplete, TextField, Typography, createFilterOptions } from "@mui/material";
2
2
  import { useEffect, useMemo, useState } from "react";
3
3
  import { useSlate } from "slate-react";
4
4
  import Select from "../Select";
5
- import { CheckedBoxCheckIcon } from "../iconListV2";
5
+ import Checkbox from "../Checkbox";
6
6
  import { jsx as _jsx } from "react/jsx-runtime";
7
7
  import { Fragment as _Fragment } from "react/jsx-runtime";
8
8
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -28,24 +28,10 @@ const OpenInNewTab = props => {
28
28
  onNewTabChange,
29
29
  translation
30
30
  } = props;
31
- return nav?.showOpenInNewTab ? /*#__PURE__*/_jsx(FormControlLabel, {
32
- className: "ccheckbox-primary",
33
- control: /*#__PURE__*/_jsx(Checkbox, {
34
- checked: openInNewTab,
35
- onChange: onNewTabChange,
36
- className: "checkBox",
37
- checkedIcon: /*#__PURE__*/_jsx(IconButton, {
38
- className: "checkedIcon",
39
- children: /*#__PURE__*/_jsx(CheckedBoxCheckIcon, {})
40
- }),
41
- icon: /*#__PURE__*/_jsx(IconButton, {
42
- className: "unCheckedIcon"
43
- })
44
- }),
45
- label: /*#__PURE__*/_jsx(Typography, {
46
- variant: "body2",
47
- children: "Open in new tab"
48
- })
31
+ return nav?.showOpenInNewTab ? /*#__PURE__*/_jsx(Checkbox, {
32
+ checked: openInNewTab,
33
+ onChange: onNewTabChange,
34
+ label: translation("Open in new tab")
49
35
  }) : null;
50
36
  };
51
37
  export const TextInput = props => {
@@ -72,8 +58,7 @@ export const SelectPage = props => {
72
58
  value,
73
59
  onChange,
74
60
  services,
75
- translation,
76
- classes
61
+ translation
77
62
  } = props;
78
63
  const [pages, setPages] = useState([]);
79
64
  const editor = useSlate();
@@ -126,28 +111,42 @@ export const SelectPage = props => {
126
111
  }, [value, pages]);
127
112
  const isCurrentPage = page?.value === "_currentPage";
128
113
  return /*#__PURE__*/_jsxs("div", {
129
- children: [/*#__PURE__*/_jsx(FreeSoloCreateOption, {
130
- label: page?.label,
131
- setValue: val => onChange(val?.value || ""),
132
- placeholder: translation("Select Page"),
114
+ children: [/*#__PURE__*/_jsx(Select, {
133
115
  options: pages,
116
+ value: page?.value,
117
+ onChange: e => onChange(e.target.value || ""),
134
118
  disabled: isCurrentPage,
135
- classes: classes
136
- }), /*#__PURE__*/_jsx(FreeSoloCreateOption, {
137
- label: section?.label,
138
- setValue: val => {
139
- let url = page?.value;
140
- if (val?.value) {
141
- url += `#${val?.value}`;
142
- }
143
- onChange(url);
144
- },
145
- placeholder: translation("Select Section or anchor"),
119
+ label: translation("Select Page"),
120
+ showDefault: true,
121
+ translation: translation
122
+ }), /*#__PURE__*/_jsx(Select, {
146
123
  options: page?.sections?.map(p => ({
147
124
  label: p,
148
125
  value: p
149
126
  })),
150
- classes: classes
127
+ value: section?.value,
128
+ onChange: e => {
129
+ const {
130
+ value = ""
131
+ } = e.target;
132
+ let url = page?.value;
133
+ if (value) {
134
+ url += `#${value}`;
135
+ } else {
136
+ const [page] = url.split("#");
137
+ url = page;
138
+ }
139
+ onChange(url);
140
+ },
141
+ disabled: isCurrentPage,
142
+ label: translation("Select Section or anchor"),
143
+ labelProps: {
144
+ sx: {
145
+ padding: "10px 0px 4px 0px"
146
+ }
147
+ },
148
+ showDefault: true,
149
+ translation: translation
151
150
  }), isCurrentPage ? null : /*#__PURE__*/_jsx(OpenInNewTab, {
152
151
  ...props
153
152
  })]
@@ -176,34 +175,15 @@ export const ScrollTopBottom = props => {
176
175
  const {
177
176
  value,
178
177
  onChange,
179
- translation,
180
- classes
178
+ translation
181
179
  } = props;
182
- return /*#__PURE__*/_jsxs(_Fragment, {
183
- children: [/*#__PURE__*/_jsx(Typography, {
184
- variant: "body2",
185
- sx: {
186
- paddingBottom: "4px"
187
- },
188
- children: translation("Choose Top/Bottom of page")
189
- }), /*#__PURE__*/_jsx(Select, {
190
- size: "small",
191
- fullWidth: true,
192
- value: value,
193
- onChange: e => onChange(e.target.value),
194
- MenuProps: {
195
- sx: classes.customSelect
196
- },
197
- children: scrollToOptions.map((option, i) => {
198
- return /*#__PURE__*/_jsx(MenuItem, {
199
- value: option.value,
200
- children: /*#__PURE__*/_jsx(Typography, {
201
- variant: "body2",
202
- children: translation(option.label)
203
- })
204
- }, i);
205
- })
206
- })]
180
+ return /*#__PURE__*/_jsx(Select, {
181
+ options: scrollToOptions,
182
+ value: value,
183
+ onChange: e => onChange(e.target.value),
184
+ label: translation("Choose Top/Bottom of page"),
185
+ showDefault: true,
186
+ translation: translation
207
187
  });
208
188
  };
209
189
  const filter = createFilterOptions();
@@ -5,7 +5,7 @@ import DialogContent from "@mui/material/DialogContent";
5
5
  import DialogActions from "@mui/material/DialogActions";
6
6
  import IconButton from "@mui/material/IconButton";
7
7
  import CloseRoundedIcon from "@mui/icons-material/CloseRounded";
8
- import { Box, FormControl, FormControlLabel, Grid, MenuItem, Radio, RadioGroup, Typography, useMediaQuery } from "@mui/material";
8
+ import { Box, FormControl, Grid, Typography, useMediaQuery } from "@mui/material";
9
9
  import { useState } from "react";
10
10
  import LinkSettingsStyles from "./style";
11
11
  import { getNavOptions } from "./navOptions";
@@ -13,6 +13,7 @@ import { ScrollTopBottom, SelectPage, TextInput, Trigger } from "./NavComponents
13
13
  import SwipeableDrawer from "../SwipeableDrawer";
14
14
  import { useEditorContext } from "../../hooks/useMouseMove";
15
15
  import Select from "../Select";
16
+ import RadioGroup from "../RadioGroup";
16
17
  import { jsx as _jsx } from "react/jsx-runtime";
17
18
  import { jsxs as _jsxs } from "react/jsx-runtime";
18
19
  import { Fragment as _Fragment } from "react/jsx-runtime";
@@ -46,7 +47,7 @@ export default function LinkSettings(props) {
46
47
  tagName,
47
48
  translation
48
49
  } = customProps;
49
- const isMobile = useMediaQuery('(max-width: 899px)');
50
+ const isMobile = useMediaQuery("(max-width: 899px)");
50
51
  const navOptions = getNavOptions(customProps.hideTools, tagName, allowTrigger);
51
52
  const classes = LinkSettingsStyles(theme);
52
53
  const [nav, setNav] = useState(getNav(navType, navOptions));
@@ -68,7 +69,7 @@ export default function LinkSettings(props) {
68
69
  open: true,
69
70
  onClose: handleClose,
70
71
  children: /*#__PURE__*/_jsxs(Grid, {
71
- sx: classes.drawerContainer,
72
+ sx: classes.swipeableDrawerContainer,
72
73
  children: [/*#__PURE__*/_jsx(Typography, {
73
74
  variant: "subtitle1",
74
75
  gutterBottom: true,
@@ -78,8 +79,7 @@ export default function LinkSettings(props) {
78
79
  className: "link-settings-title",
79
80
  children: translation("dialogueTitle")
80
81
  }), /*#__PURE__*/_jsx(Select, {
81
- size: "small",
82
- fullWidth: true,
82
+ options: navOptions,
83
83
  value: nav?.value,
84
84
  onChange: e => {
85
85
  const {
@@ -90,19 +90,10 @@ export default function LinkSettings(props) {
90
90
  setNavValue("");
91
91
  },
92
92
  displayEmpty: true,
93
+ translation: translation,
93
94
  MenuProps: {
94
- sx: classes.customSelect,
95
- disablePortal: true
96
- },
97
- children: navOptions.map((navOption, i) => {
98
- return /*#__PURE__*/_jsx(MenuItem, {
99
- value: navOption.value,
100
- children: /*#__PURE__*/_jsx(Typography, {
101
- variant: "body2",
102
- children: translation(navOption.label)
103
- })
104
- }, i);
105
- })
95
+ sx: classes.customSelect
96
+ }
106
97
  }), /*#__PURE__*/_jsx(Box, {
107
98
  sx: {
108
99
  paddingTop: "14px"
@@ -167,18 +158,16 @@ export default function LinkSettings(props) {
167
158
  children: /*#__PURE__*/_jsx(FormControl, {
168
159
  sx: classes.customRadioBtn,
169
160
  children: /*#__PURE__*/_jsx(RadioGroup, {
161
+ options: navOptions,
170
162
  value: nav?.value,
171
- children: navOptions?.map((navOption, i) => {
172
- return /*#__PURE__*/_jsx(FormControlLabel, {
173
- value: navOption.value,
174
- control: /*#__PURE__*/_jsx(Radio, {}),
175
- label: translation(navOption.label),
176
- onChange: () => {
177
- setNav(navOption);
178
- setNavValue("");
179
- }
180
- }, i);
181
- })
163
+ onChange: navOption => {
164
+ setNav(navOption);
165
+ setNavValue("");
166
+ },
167
+ translation: translation,
168
+ radioProps: {
169
+ disableRipple: true
170
+ }
182
171
  })
183
172
  })
184
173
  }), /*#__PURE__*/_jsx(Grid, {
@@ -26,11 +26,11 @@ export const getNavOptions = (hideTools = [], tagName = "", allowTrigger) => {
26
26
  }, {
27
27
  label: "Email",
28
28
  value: "email",
29
- placeholder: "email"
29
+ placeholder: "mail@example.com"
30
30
  }, {
31
31
  label: "Phone number",
32
32
  value: "phone",
33
- placeholder: "phone"
33
+ placeholder: "+1 (702) 123-4567"
34
34
  }];
35
35
  navOptions = navOptions.filter(n => !hideTools.includes(n.value));
36
36
  if (!allowTrigger) {