@flozy/editor 5.5.6 → 5.5.8

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 (210) hide show
  1. package/dist/Editor/ChatEditor.js +34 -25
  2. package/dist/Editor/CommonEditor.js +16 -33
  3. package/dist/Editor/Editor.css +20 -105
  4. package/dist/Editor/Elements/AI/AIInput.js +1 -0
  5. package/dist/Editor/Elements/AI/CustomSelect.js +10 -17
  6. package/dist/Editor/Elements/AI/PopoverAIInput.js +53 -59
  7. package/dist/Editor/Elements/AI/Styles.js +6 -24
  8. package/dist/Editor/Elements/Accordion/Accordion.js +1 -8
  9. package/dist/Editor/Elements/AppHeader/AppHeader.js +6 -6
  10. package/dist/Editor/Elements/Button/EditorButton.js +2 -9
  11. package/dist/Editor/Elements/Carousel/CarouselItem.js +3 -11
  12. package/dist/Editor/Elements/Color Picker/ColorButtons.js +5 -7
  13. package/dist/Editor/Elements/Color Picker/Styles.js +3 -8
  14. package/dist/Editor/Elements/Color Picker/defaultColors.js +2 -2
  15. package/dist/Editor/Elements/Divider/Divider.js +20 -36
  16. package/dist/Editor/Elements/Embed/Image.js +16 -51
  17. package/dist/Editor/Elements/Embed/Video.js +3 -26
  18. package/dist/Editor/Elements/Form/Form.js +2 -39
  19. package/dist/Editor/Elements/Form/FormElements/FormCheckbox.js +1 -7
  20. package/dist/Editor/Elements/Form/FormElements/FormDate.js +1 -7
  21. package/dist/Editor/Elements/Form/FormElements/FormEmail.js +1 -7
  22. package/dist/Editor/Elements/Form/FormElements/FormNumbers.js +1 -7
  23. package/dist/Editor/Elements/Form/FormElements/FormRadioButton.js +1 -7
  24. package/dist/Editor/Elements/Form/FormElements/FormText.js +1 -7
  25. package/dist/Editor/Elements/Form/FormElements/FormTextArea.js +1 -6
  26. package/dist/Editor/Elements/Form/FormPopup.js +9 -12
  27. package/dist/Editor/Elements/Form/Workflow/Styles.js +0 -2
  28. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +1 -1
  29. package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +2 -4
  30. package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +1 -20
  31. package/dist/Editor/Elements/FreeGrid/breakpointConstants.js +4 -4
  32. package/dist/Editor/Elements/FreeGrid/styles.js +1 -2
  33. package/dist/Editor/Elements/Grid/GridButton.js +2 -2
  34. package/dist/Editor/Elements/Grid/GridItem.js +36 -47
  35. package/dist/Editor/Elements/Grid/Styles.js +0 -50
  36. package/dist/Editor/Elements/Link/LinkButton.js +1 -1
  37. package/dist/Editor/Elements/List/CheckList.js +1 -2
  38. package/dist/Editor/Elements/Search/SearchAttachment.js +0 -1
  39. package/dist/Editor/Elements/Search/SearchButton.js +0 -1
  40. package/dist/Editor/Elements/Signature/Signature.css +1 -1
  41. package/dist/Editor/Elements/Signature/SignatureOptions/TypeSignature.js +2 -2
  42. package/dist/Editor/Elements/Signature/SignaturePopup.js +52 -17
  43. package/dist/Editor/Elements/SimpleText/index.js +3 -11
  44. package/dist/Editor/Elements/SimpleText/style.js +1 -20
  45. package/dist/Editor/Elements/Table/Styles.js +78 -88
  46. package/dist/Editor/Elements/Table/Table.js +140 -263
  47. package/dist/Editor/Elements/Table/TableCell.js +111 -365
  48. package/dist/Editor/Elements/Table/TablePopup.js +3 -9
  49. package/dist/Editor/Elements/Table/TableRow.js +2 -10
  50. package/dist/Editor/Elements/TopBanner/TopBanner.js +1 -2
  51. package/dist/Editor/MiniEditor.js +2 -21
  52. package/dist/Editor/Styles/EditorStyles.js +4 -13
  53. package/dist/Editor/Toolbar/FormatTools/BlockButton.js +0 -10
  54. package/dist/Editor/Toolbar/FormatTools/Dropdown.js +12 -7
  55. package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +4 -26
  56. package/dist/Editor/Toolbar/FormatTools/MarkButton.js +0 -3
  57. package/dist/Editor/Toolbar/FormatTools/TextSize.js +5 -5
  58. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +8 -8
  59. package/dist/Editor/Toolbar/Mini/Styles.js +1 -9
  60. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/InfinityAITool.js +3 -7
  61. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +4 -6
  62. package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +15 -19
  63. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +58 -557
  64. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +16 -73
  65. package/dist/Editor/Toolbar/PopupTool/index.js +5 -3
  66. package/dist/Editor/Toolbar/Toolbar.js +0 -6
  67. package/dist/Editor/Toolbar/toolbarGroups.js +0 -4
  68. package/dist/Editor/assets/svg/BrainIcon.js +2 -2
  69. package/dist/Editor/assets/svg/SettingsIcon.js +4 -4
  70. package/dist/Editor/common/ColorPickerButton.js +45 -85
  71. package/dist/Editor/common/DnD/Draggable.js +1 -2
  72. package/dist/Editor/common/FontLoader/FontLoader.js +6 -12
  73. package/dist/Editor/common/Icon.js +21 -54
  74. package/dist/Editor/common/ImageSelector/Options/Upload.js +1 -2
  75. package/dist/Editor/common/ImageSelector/Styles.js +6 -47
  76. package/dist/Editor/common/ImageSelector/UploadStyles.js +6 -18
  77. package/dist/Editor/common/LinkSettings/NavComponents.js +1 -2
  78. package/dist/Editor/common/LinkSettings/index.js +1 -2
  79. package/dist/Editor/common/MentionsPopup/Styles.js +8 -143
  80. package/dist/Editor/common/MentionsPopup/index.js +1 -1
  81. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +12 -108
  82. package/dist/Editor/common/RnD/GuideLines/styles.js +3 -3
  83. package/dist/Editor/common/RnD/ShadowElement.js +1 -1
  84. package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +2 -14
  85. package/dist/Editor/common/RnD/Utils/gridDropItem.js +6 -9
  86. package/dist/Editor/common/RnD/VirtualElement/index.js +1 -5
  87. package/dist/Editor/common/RnD/index.js +3 -4
  88. package/dist/Editor/common/Section/index.js +3 -3
  89. package/dist/Editor/common/Section/styles.js +1 -5
  90. package/dist/Editor/common/Shorthands/elements.js +1 -13
  91. package/dist/Editor/common/StyleBuilder/fieldStyle.js +1 -2
  92. package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +3 -9
  93. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +7 -35
  94. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +2 -15
  95. package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +2 -10
  96. package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +1 -2
  97. package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +1 -1
  98. package/dist/Editor/common/StyleBuilder/fieldTypes/icons.js +0 -2
  99. package/dist/Editor/common/StyleBuilder/fieldTypes/index.js +1 -3
  100. package/dist/Editor/common/StyleBuilder/fieldTypes/radiusStyle.js +11 -11
  101. package/dist/Editor/common/StyleBuilder/fieldTypes/saveAsTemplate.js +6 -22
  102. package/dist/Editor/common/StyleBuilder/fieldTypes/selectBox.js +2 -21
  103. package/dist/Editor/common/StyleBuilder/fieldTypes/text.js +4 -20
  104. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +2 -12
  105. package/dist/Editor/common/StyleBuilder/formStyle.js +149 -268
  106. package/dist/Editor/common/StyleBuilder/index.js +20 -101
  107. package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +0 -4
  108. package/dist/Editor/common/StyleBuilder/tableStyle.js +25 -69
  109. package/dist/Editor/common/SwipeableDrawer/style.js +4 -15
  110. package/dist/Editor/common/ToolbarIcon.js +1 -1
  111. package/dist/Editor/common/Uploader.js +36 -46
  112. package/dist/Editor/common/iconListV2.js +74 -598
  113. package/dist/Editor/common/iconslist.js +19 -25
  114. package/dist/Editor/commonStyle.js +15 -421
  115. package/dist/Editor/helper/deserialize/index.js +2 -31
  116. package/dist/Editor/helper/index.js +4 -17
  117. package/dist/Editor/helper/theme.js +2 -39
  118. package/dist/Editor/hooks/useBreakpoints.js +1 -1
  119. package/dist/Editor/hooks/useMouseMove.js +2 -5
  120. package/dist/Editor/plugins/withCustomDeleteBackward.js +104 -100
  121. package/dist/Editor/plugins/withEmbeds.js +26 -30
  122. package/dist/Editor/plugins/withHTML.js +12 -100
  123. package/dist/Editor/plugins/withLayout.js +0 -1
  124. package/dist/Editor/utils/SlateUtilityFunctions.js +12 -39
  125. package/dist/Editor/utils/brains.js +1 -1
  126. package/dist/Editor/utils/button.js +4 -4
  127. package/dist/Editor/utils/chatEditor/SlateUtilityFunctions.js +6 -75
  128. package/dist/Editor/utils/customHooks/useResize.js +4 -7
  129. package/dist/Editor/utils/customHooks/useTableResize.js +2 -6
  130. package/dist/Editor/utils/embed.js +1 -2
  131. package/dist/Editor/utils/events.js +1 -0
  132. package/dist/Editor/utils/font.js +4 -11
  133. package/dist/Editor/utils/formfield.js +4 -8
  134. package/dist/Editor/utils/helper.js +2 -103
  135. package/dist/Editor/utils/insertNewLine.js +1 -19
  136. package/dist/Editor/utils/pageSettings.js +2 -14
  137. package/dist/Editor/utils/serializeToText.js +0 -2
  138. package/dist/Editor/utils/table.js +24 -228
  139. package/package.json +2 -2
  140. package/dist/Editor/Elements/DataView/DataView.js +0 -124
  141. package/dist/Editor/Elements/DataView/DataViewButton.js +0 -23
  142. package/dist/Editor/Elements/DataView/Layouts/ColumnView.js +0 -83
  143. package/dist/Editor/Elements/DataView/Layouts/DataTypes/CheckType.js +0 -33
  144. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/Select.js +0 -180
  145. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/SimpleSelect.js +0 -62
  146. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/styles.js +0 -68
  147. package/dist/Editor/Elements/DataView/Layouts/DataTypes/DateType.js +0 -35
  148. package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +0 -39
  149. package/dist/Editor/Elements/DataView/Layouts/DataTypes/NumberType.js +0 -30
  150. package/dist/Editor/Elements/DataView/Layouts/DataTypes/PersonType.js +0 -30
  151. package/dist/Editor/Elements/DataView/Layouts/DataTypes/SelectType.js +0 -35
  152. package/dist/Editor/Elements/DataView/Layouts/DataTypes/TextType.js +0 -36
  153. package/dist/Editor/Elements/DataView/Layouts/DataTypes/index.js +0 -17
  154. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseField.js +0 -29
  155. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseSort.js +0 -38
  156. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/index.js +0 -86
  157. package/dist/Editor/Elements/DataView/Layouts/FilterSort/index.js +0 -71
  158. package/dist/Editor/Elements/DataView/Layouts/FilterSort/styles.js +0 -138
  159. package/dist/Editor/Elements/DataView/Layouts/FilterView.js +0 -213
  160. package/dist/Editor/Elements/DataView/Layouts/Formula.js +0 -29
  161. package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +0 -113
  162. package/dist/Editor/Elements/DataView/Layouts/Options/AddProperty.js +0 -44
  163. package/dist/Editor/Elements/DataView/Layouts/Options/AllProperties.js +0 -146
  164. package/dist/Editor/Elements/DataView/Layouts/Options/ChangeProperty.js +0 -79
  165. package/dist/Editor/Elements/DataView/Layouts/Options/ColumnsList.js +0 -57
  166. package/dist/Editor/Elements/DataView/Layouts/Options/Constants.js +0 -101
  167. package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +0 -174
  168. package/dist/Editor/Elements/DataView/Layouts/Options/EditProperty.js +0 -241
  169. package/dist/Editor/Elements/DataView/Layouts/Options/FilterProperty.js +0 -45
  170. package/dist/Editor/Elements/DataView/Layouts/Options/PropertyList.js +0 -32
  171. package/dist/Editor/Elements/DataView/Layouts/Options/index.js +0 -110
  172. package/dist/Editor/Elements/DataView/Layouts/Options/styles.js +0 -217
  173. package/dist/Editor/Elements/DataView/Layouts/TableStyles.js +0 -131
  174. package/dist/Editor/Elements/DataView/Layouts/TableView.js +0 -253
  175. package/dist/Editor/Elements/DataView/Layouts/ViewData.js +0 -85
  176. package/dist/Editor/Elements/DataView/Layouts/colStyles.js +0 -10
  177. package/dist/Editor/Elements/DataView/Layouts/index.js +0 -25
  178. package/dist/Editor/Elements/DataView/Providers/DataViewProvider.js +0 -277
  179. package/dist/Editor/Elements/DataView/Utils/globalSearch.js +0 -15
  180. package/dist/Editor/Elements/DataView/Utils/multiSortRows.js +0 -88
  181. package/dist/Editor/Elements/DataView/styles.js +0 -169
  182. package/dist/Editor/Elements/Table/AddRowCol.js +0 -77
  183. package/dist/Editor/Elements/Table/DragButton.js +0 -142
  184. package/dist/Editor/Elements/Table/DragStyles.js +0 -70
  185. package/dist/Editor/Elements/Table/Draggable.js +0 -25
  186. package/dist/Editor/Elements/Table/Droppable.js +0 -53
  187. package/dist/Editor/Elements/Table/TableTool.js +0 -101
  188. package/dist/Editor/Elements/Table/tableHelper.js +0 -71
  189. package/dist/Editor/assets/svg/ArrowDownIcon.js +0 -25
  190. package/dist/Editor/assets/svg/ArrowUpIcon.js +0 -25
  191. package/dist/Editor/assets/svg/CalenderIconTick.js +0 -64
  192. package/dist/Editor/assets/svg/ChervDown.js +0 -18
  193. package/dist/Editor/assets/svg/ChervUp.js +0 -18
  194. package/dist/Editor/assets/svg/DataTableIcon.js +0 -50
  195. package/dist/Editor/assets/svg/DuplicateIcon.js +0 -23
  196. package/dist/Editor/assets/svg/EyeIcon.js +0 -23
  197. package/dist/Editor/assets/svg/EyeSlash.js +0 -43
  198. package/dist/Editor/assets/svg/HashtagIcon.js +0 -33
  199. package/dist/Editor/assets/svg/PlusIcon.js +0 -23
  200. package/dist/Editor/assets/svg/SelectRoundedIcon.js +0 -24
  201. package/dist/Editor/assets/svg/SortByIcon.js +0 -33
  202. package/dist/Editor/assets/svg/TableIcons.js +0 -220
  203. package/dist/Editor/assets/svg/TickOutlined.js +0 -23
  204. package/dist/Editor/assets/svg/TrashCanIcon.js +0 -38
  205. package/dist/Editor/common/Select/index.js +0 -20
  206. package/dist/Editor/common/Select/styles.js +0 -17
  207. package/dist/Editor/common/StyleBuilder/fieldTypes/lineSpacing.js +0 -79
  208. package/dist/Editor/helper/enforceDateFormat.js +0 -41
  209. package/dist/Editor/hooks/useTable.js +0 -210
  210. package/dist/Editor/utils/dataView.js +0 -43
@@ -3,8 +3,6 @@ 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";
8
6
  import { jsx as _jsx } from "react/jsx-runtime";
9
7
  import { jsxs as _jsxs } from "react/jsx-runtime";
10
8
  import { Fragment as _Fragment } from "react/jsx-runtime";
@@ -32,10 +30,6 @@ const SaveAsTemplate = props => {
32
30
  });
33
31
  const [base64, setBase64] = useState(value);
34
32
  const [uploading, setUploading] = useState(false);
35
- const {
36
- theme
37
- } = useEditorContext();
38
- const classes = useCommonStyle(theme);
39
33
  const handleChange = async e => {
40
34
  const file = e.target.files[0];
41
35
  const strImage = await convertBase64(file);
@@ -82,9 +76,6 @@ const SaveAsTemplate = props => {
82
76
  onSaveTemplate(formData, params);
83
77
  handleClose();
84
78
  };
85
- if (!onSaveTemplate) {
86
- return null;
87
- }
88
79
  return /*#__PURE__*/_jsxs(_Fragment, {
89
80
  children: [/*#__PURE__*/_jsx(Grid, {
90
81
  item: true,
@@ -158,14 +149,9 @@ const SaveAsTemplate = props => {
158
149
  justifyContent: "space-between",
159
150
  alignItems: "center",
160
151
  children: [/*#__PURE__*/_jsxs(Button, {
161
- component: "label"
162
- // variant="contained"
163
- ,
164
- className: "gradientFillBtn",
152
+ component: "label",
153
+ variant: "contained",
165
154
  startIcon: /*#__PURE__*/_jsx(CloudUploadIcon, {}),
166
- sx: {
167
- ...classes.gradientFillBtn
168
- },
169
155
  children: ["Upload file", /*#__PURE__*/_jsx("input", {
170
156
  type: "file",
171
157
  style: {
@@ -208,14 +194,12 @@ const SaveAsTemplate = props => {
208
194
  },
209
195
  className: "action-btn-wrpr",
210
196
  children: [/*#__PURE__*/_jsx(Button, {
211
- className: "savebtn gradientFillBtn",
197
+ className: "savebtn",
212
198
  onClick: handleSave,
213
199
  sx: {
214
- fontWeight: 700,
215
- ...classes.gradientFillBtn
216
- }
217
- // variant="contained"
218
- ,
200
+ fontWeight: 700
201
+ },
202
+ variant: "contained",
219
203
  children: saveText
220
204
  }), closeText ? /*#__PURE__*/_jsx(Button, {
221
205
  className: "closebtn",
@@ -1,8 +1,5 @@
1
1
  import React, { useEffect, useState, useRef } from "react";
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";
2
+ import { Grid, Checkbox, FormControlLabel, FormHelperText } from "@mui/material";
6
3
  import { jsx as _jsx } from "react/jsx-runtime";
7
4
  import { jsxs as _jsxs } from "react/jsx-runtime";
8
5
  const SelectBox = props => {
@@ -18,10 +15,6 @@ const SelectBox = props => {
18
15
  } = data;
19
16
  const [checkedValue, setCheckedValue] = useState(false);
20
17
  const isFirstRender = useRef(true);
21
- const {
22
- theme
23
- } = useEditorContext();
24
- const classes = useCommonStyle(theme);
25
18
  useEffect(() => {
26
19
  if (isFirstRender.current && elementProps.element === "email" && value === undefined) {
27
20
  setCheckedValue(true);
@@ -42,22 +35,10 @@ const SelectBox = props => {
42
35
  marginBottom: "12px"
43
36
  },
44
37
  children: [/*#__PURE__*/_jsx(FormControlLabel, {
45
- className: "ccheckbox-primary",
46
- sx: {
47
- ...classes.customCheckBox
48
- },
49
38
  control: /*#__PURE__*/_jsx(Checkbox, {
50
39
  value: value,
51
40
  checked: checkedValue,
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
- })
41
+ onChange: handleChange
61
42
  }),
62
43
  label: placeholder
63
44
  }), /*#__PURE__*/_jsx(FormHelperText, {
@@ -11,21 +11,13 @@ const Text = props => {
11
11
  const {
12
12
  key,
13
13
  placeholder,
14
- width,
15
- required = false
14
+ width
16
15
  } = data;
17
16
  const [value, setValue] = useState(pro_value);
18
- const [error, setError] = useState(false);
19
17
  const handleChange = e => {
20
- const newValue = e.target.value;
21
- setValue(newValue);
22
- if (required && !newValue.trim()) {
23
- setError(true);
24
- } else {
25
- setError(false);
26
- }
18
+ setValue(e.target.value);
27
19
  onChange({
28
- [key]: newValue
20
+ [key]: e.target.value
29
21
  });
30
22
  };
31
23
  return /*#__PURE__*/_jsxs(Grid, {
@@ -47,15 +39,7 @@ const Text = props => {
47
39
  value: value,
48
40
  onChange: handleChange,
49
41
  size: "small",
50
- fullWidth: true,
51
- required: required,
52
- error: error,
53
- helperText: error ? 'This field is required' : '',
54
- sx: {
55
- '& .MuiFormHelperText-root': {
56
- color: '#d32f2f !important'
57
- }
58
- }
42
+ fullWidth: true
59
43
  })]
60
44
  });
61
45
  };
@@ -5,9 +5,6 @@ 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";
9
-
10
- // hideMetaDataOptions -- pass true to hide metadata option in select field
11
8
  import { jsx as _jsx } from "react/jsx-runtime";
12
9
  import { jsxs as _jsxs } from "react/jsx-runtime";
13
10
  import { Fragment as _Fragment } from "react/jsx-runtime";
@@ -29,8 +26,7 @@ const TextOptions = props => {
29
26
  options,
30
27
  renderOption,
31
28
  width,
32
- webFont = false,
33
- hideMetaDataOptions = false
29
+ webFont = false
34
30
  } = data;
35
31
  const {
36
32
  fontFamilies
@@ -39,7 +35,7 @@ const TextOptions = props => {
39
35
  const [size] = useWindowResize();
40
36
  const value = isBreakpoint ? getBreakPointsValue(val, size?.device) : val;
41
37
  const metaDataMappingOptions = metaMappings?.boards || [];
42
- const updatedOption = !hideMetaDataOptions && elementProps?.metadatamapping ? [...options, ...metaDataMappingOptions] : webFont ? fontFamilies?.options : options;
38
+ const updatedOption = elementProps?.metadatamapping ? [...options, ...metaDataMappingOptions] : webFont ? fontFamilies?.options : options;
43
39
  const handleChange = (e, d) => {
44
40
  if (isBreakpoint) {
45
41
  onChange({
@@ -91,12 +87,6 @@ const TextOptions = props => {
91
87
  marginBottom: "16px"
92
88
  },
93
89
  sx: classes.textOptions,
94
- IconComponent: KeyboardArrowDownRoundedIcon,
95
- MenuProps: {
96
- sx: {
97
- ...classes.textOptionsList
98
- }
99
- },
100
90
  children: updatedOption?.map((m, i) => {
101
91
  return m?.value === "listSubHeader" ? /*#__PURE__*/_jsx(ListSubheader, {
102
92
  children: m?.label
@@ -1,287 +1,168 @@
1
- import { fontOptions, fontWeightOptions } from "../../utils/font";
1
+ import { fontOptions } from "../../utils/font";
2
2
  import Icon from "../Icon";
3
3
  import { jsx as _jsx } from "react/jsx-runtime";
4
- export const formStyle = [{
5
- tab: "Form Settings",
6
- value: "FormSetting",
7
- hasChildrenTabs: true,
4
+ const formStyle = [{
5
+ tab: "General",
6
+ value: "general",
8
7
  fields: [{
9
- tab: "General",
10
- value: "general",
11
- fields: [{
12
- label: "Form Name",
13
- key: "formName",
14
- type: "text"
15
- }, {
16
- label: "Send Form to Email",
17
- key: "email",
18
- type: "text",
19
- placeholder: "Enter Email to send the response..."
20
- }, {
21
- label: "Save Response",
22
- key: "saveResponse",
23
- type: "selectBox",
24
- placeholder: "Save Response"
25
- }]
8
+ label: "Form Name",
9
+ key: "formName",
10
+ type: "text"
26
11
  }, {
27
- tab: "Form Title",
28
- value: "formTitle",
29
- fields: [{
30
- label: "Title",
31
- key: "formTitle",
32
- type: "text"
33
- }, {
34
- label: "Font Family",
35
- key: "fontFamily",
36
- type: "textOptions",
37
- hideMetaDataOptions: true,
38
- options: fontOptions,
39
- webFont: true,
40
- width: 7,
41
- renderOption: option => {
42
- return /*#__PURE__*/_jsx("span", {
43
- style: {
44
- fontFamily: option.value
45
- },
46
- children: option.text
47
- });
48
- }
49
- }, {
50
- label: "Font Size",
51
- key: "textSize",
52
- type: "fontSize",
53
- width: 5,
54
- placeholder: "16px"
55
- }, {
56
- label: "Text Align",
57
- key: "textAlign",
58
- type: "textAlign",
59
- placeholder: "16px or 1em"
60
- }]
12
+ label: "Send Form to Email",
13
+ key: "email",
14
+ type: "text",
15
+ placeholder: "Enter Email to send the response..."
61
16
  }, {
62
- tab: "Banner Spacing",
63
- value: "bannerSpacing",
64
- fields: [{
65
- label: "Banner Spacing",
66
- key: "bannerSpacing",
67
- type: "bannerSpacing"
68
- }]
17
+ label: "Save Response",
18
+ key: "saveResponse",
19
+ type: "selectBox",
20
+ placeholder: "Save Response"
21
+ }]
22
+ }, {
23
+ tab: "Form Title",
24
+ value: "formTitle",
25
+ fields: [{
26
+ label: "Title",
27
+ key: "formTitle",
28
+ type: "text"
69
29
  }, {
70
- tab: "Border",
71
- value: "border",
72
- fields: [{
73
- label: "Border Radius",
74
- key: "borderRadius",
75
- type: "borderRadius"
76
- }, {
77
- label: "Border Width",
78
- key: "borderWidth",
79
- type: "text",
80
- placeholder: "1px"
81
- }, {
82
- label: "Border Style",
83
- key: "borderStyle",
84
- type: "textOptions",
85
- hideMetaDataOptions: true,
86
- options: [{
87
- text: "Solid",
88
- value: "solid"
89
- }, {
90
- text: "Dotted",
91
- value: "dotted"
92
- }, {
93
- text: "Dashed",
94
- value: "dashed"
95
- }],
96
- renderOption: option => {
97
- return /*#__PURE__*/_jsx("span", {
98
- children: option.text
99
- });
100
- }
101
- }]
30
+ label: "Font Family",
31
+ key: "fontFamily",
32
+ type: "textOptions",
33
+ options: fontOptions,
34
+ webFont: true,
35
+ width: 7,
36
+ renderOption: option => {
37
+ return /*#__PURE__*/_jsx("span", {
38
+ style: {
39
+ fontFamily: option.value
40
+ },
41
+ children: option.text
42
+ });
43
+ }
102
44
  }, {
103
- tab: "Colors",
104
- value: "colors",
105
- fields: [{
106
- label: "Text Color",
107
- key: "textColor",
108
- type: "color",
109
- needPreview: true
110
- }, {
111
- label: "Background Color",
112
- key: "bgColor",
113
- type: "color"
114
- }, {
115
- label: "Border Color",
116
- key: "borderColor",
117
- type: "color"
118
- }]
45
+ label: "Font Size",
46
+ key: "textSize",
47
+ type: "fontSize",
48
+ width: 5,
49
+ placeholder: "16px"
50
+ }, {
51
+ label: "Text Align",
52
+ key: "textAlign",
53
+ type: "textAlign",
54
+ placeholder: "16px or 1em"
55
+ }]
56
+ }, {
57
+ tab: "Banner Spacing",
58
+ value: "bannerSpacing",
59
+ fields: [{
60
+ label: "Banner Spacing",
61
+ key: "bannerSpacing",
62
+ type: "bannerSpacing"
63
+ }]
64
+ }, {
65
+ tab: "Border",
66
+ value: "border",
67
+ fields: [{
68
+ label: "Border Radius",
69
+ key: "borderRadius",
70
+ type: "borderRadius"
119
71
  }, {
120
- tab: "Position",
121
- value: "position",
122
- fields: [{
123
- label: "Set Postion (Vertical & Horizantal)",
124
- key: "alignment",
125
- type: "alignment"
126
- }]
72
+ label: "Border Width",
73
+ key: "borderWidth",
74
+ type: "text",
75
+ placeholder: "1px"
127
76
  }, {
128
- tab: "Background",
129
- value: "backgroundImage",
130
- fields: [{
131
- label: "URL",
132
- key: "backgroundImage",
133
- type: "text"
77
+ label: "Border Style",
78
+ key: "borderStyle",
79
+ type: "textOptions",
80
+ options: [{
81
+ text: "Solid",
82
+ value: "solid"
134
83
  }, {
135
- label: "Background Image",
136
- key: "backgroundImage",
137
- type: "backgroundImage"
138
- }]
139
- }, {
140
- tab: "Add to Boards",
141
- value: "metadatamapping",
142
- fields: [{
143
- label: "Add response to contacts board",
144
- key: "metadatamapping",
145
- type: "metadatamapping",
146
- compType: "card",
147
- content: "By default, form responses are added as separate cards on the default contact board.",
148
- value: "mappingToContactBoard",
149
- infoIcon: /*#__PURE__*/_jsx(Icon, {
150
- icon: "info"
151
- })
84
+ text: "Dotted",
85
+ value: "dotted"
152
86
  }, {
153
- label: "Create a separate board",
154
- key: "metadatamapping",
155
- type: "metadatamapping",
156
- compType: "card",
157
- content: "By default, form responses are added as separate cards on a new board (Contact Us).",
158
- value: "mappingToSeparateBoard",
159
- infoIcon: /*#__PURE__*/_jsx(Icon, {
160
- icon: "info"
161
- })
162
- }]
163
- }, {
164
- tab: "Save As Template",
165
- value: "saveAsTemplate",
166
- needActions: false,
167
- hideOnFGS: true,
168
- fields: [{
169
- label: "Template Image",
170
- key: "saveAsTemplate",
171
- type: "saveAsTemplate"
172
- }]
87
+ text: "Dashed",
88
+ value: "dashed"
89
+ }],
90
+ renderOption: option => {
91
+ return /*#__PURE__*/_jsx("span", {
92
+ children: option.text
93
+ });
94
+ }
173
95
  }]
174
96
  }, {
175
- tab: "Field Settings",
176
- value: "FieldSetting",
177
- hasChildrenTabs: true,
97
+ tab: "Colors",
98
+ value: "colors",
178
99
  fields: [{
179
- tab: "Font Family",
180
- value: "FontFamily",
181
- fields: [{
182
- label: "Font Family",
183
- key: "fieldFontFamily",
184
- type: "textOptions",
185
- hideMetaDataOptions: true,
186
- options: fontOptions,
187
- webFont: true,
188
- renderOption: option => {
189
- return /*#__PURE__*/_jsx("span", {
190
- style: {
191
- fontFamily: option.value
192
- },
193
- children: option.text
194
- });
195
- }
196
- }]
197
- }, {
198
- tab: "Font Weight",
199
- value: "FontWeight",
200
- fields: [{
201
- label: "Font Weight",
202
- key: "fieldFontWeight",
203
- type: "textOptions",
204
- width: 5,
205
- options: fontWeightOptions,
206
- hideMetaDataOptions: true,
207
- renderOption: option => {
208
- return /*#__PURE__*/_jsx("span", {
209
- style: {
210
- fontWeight: option.value
211
- },
212
- children: option.text
213
- });
214
- }
215
- }]
216
- }, {
217
- tab: "Font Size",
218
- value: "FontSize",
219
- fields: [{
220
- label: "Font Size",
221
- key: "fieldTextSize",
222
- type: "fontSize",
223
- width: 5,
224
- placeholder: "16px"
225
- }]
100
+ label: "Text Color",
101
+ key: "textColor",
102
+ type: "color",
103
+ needPreview: true
226
104
  }, {
227
- tab: "Text Color",
228
- value: "TextColor",
229
- fields: [{
230
- label: "Text Color",
231
- key: "fieldTextColor",
232
- type: "color",
233
- needPreview: true
234
- }]
105
+ label: "Background Color",
106
+ key: "bgColor",
107
+ type: "color"
235
108
  }, {
236
- tab: "Background Color",
237
- value: "BackgroundColor",
238
- fields: [{
239
- label: "Background Color",
240
- key: "fieldBgColor",
241
- type: "color"
242
- }]
243
- }, {
244
- tab: "Border Color",
245
- value: "BorderColor",
246
- fields: [{
247
- label: "Border Color",
248
- key: "fieldBorderColor",
249
- type: "color"
250
- }]
109
+ label: "Border Color",
110
+ key: "borderColor",
111
+ type: "color"
112
+ }]
113
+ }, {
114
+ tab: "Position",
115
+ value: "position",
116
+ fields: [{
117
+ label: "Set Postion (Vertical & Horizantal)",
118
+ key: "alignment",
119
+ type: "alignment"
120
+ }]
121
+ }, {
122
+ tab: "Background",
123
+ value: "backgroundImage",
124
+ fields: [{
125
+ label: "URL",
126
+ key: "backgroundImage",
127
+ type: "text"
251
128
  }, {
252
- tab: "Border Width",
253
- value: "BorderWidth",
254
- fields: [{
255
- label: "Border Width",
256
- key: "fieldBorderWidth",
257
- type: "text",
258
- width: 5,
259
- placeholder: "1px"
260
- }]
129
+ label: "Background Image",
130
+ key: "backgroundImage",
131
+ type: "backgroundImage"
132
+ }]
133
+ }, {
134
+ tab: "Add to Boards",
135
+ value: "metadatamapping",
136
+ fields: [{
137
+ label: "Add response to contacts board",
138
+ key: "metadatamapping",
139
+ type: "metadatamapping",
140
+ compType: "card",
141
+ content: "By default, form responses are added as separate cards on the default contact board.",
142
+ value: "mappingToContactBoard",
143
+ infoIcon: /*#__PURE__*/_jsx(Icon, {
144
+ icon: "info"
145
+ })
261
146
  }, {
262
- tab: "Border Style",
263
- value: "BorderStyle",
264
- fields: [{
265
- label: "Border Style",
266
- key: "fieldBorderStyle",
267
- type: "textOptions",
268
- hideMetaDataOptions: true,
269
- width: 5,
270
- options: [{
271
- text: "Solid",
272
- value: "solid"
273
- }, {
274
- text: "Dotted",
275
- value: "dotted"
276
- }, {
277
- text: "Dashed",
278
- value: "dashed"
279
- }],
280
- renderOption: option => {
281
- return /*#__PURE__*/_jsx("span", {
282
- children: option.text
283
- });
284
- }
285
- }]
147
+ label: "Create a separate board",
148
+ key: "metadatamapping",
149
+ type: "metadatamapping",
150
+ compType: "card",
151
+ content: "By default, form responses are added as separate cards on a new board (Contact Us).",
152
+ value: "mappingToSeparateBoard",
153
+ infoIcon: /*#__PURE__*/_jsx(Icon, {
154
+ icon: "info"
155
+ })
156
+ }]
157
+ }, {
158
+ tab: "Save As Template",
159
+ value: "saveAsTemplate",
160
+ needActions: false,
161
+ hideOnFGS: true,
162
+ fields: [{
163
+ label: "Template Image",
164
+ key: "saveAsTemplate",
165
+ type: "saveAsTemplate"
286
166
  }]
287
- }];
167
+ }];
168
+ export default formStyle;