@flozy/editor 5.4.1 → 5.4.2

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 (192) hide show
  1. package/dist/Editor/ChatEditor.js +25 -34
  2. package/dist/Editor/CommonEditor.js +29 -15
  3. package/dist/Editor/Editor.css +100 -18
  4. package/dist/Editor/Elements/AI/AIInput.js +0 -1
  5. package/dist/Editor/Elements/AI/CustomSelect.js +19 -11
  6. package/dist/Editor/Elements/AI/PopoverAIInput.js +58 -52
  7. package/dist/Editor/Elements/AI/Styles.js +24 -6
  8. package/dist/Editor/Elements/Accordion/Accordion.js +8 -1
  9. package/dist/Editor/Elements/AppHeader/AppHeader.js +6 -6
  10. package/dist/Editor/Elements/Button/EditorButton.js +9 -2
  11. package/dist/Editor/Elements/Carousel/CarouselItem.js +11 -3
  12. package/dist/Editor/Elements/Color Picker/ColorButtons.js +7 -5
  13. package/dist/Editor/Elements/Color Picker/Styles.js +7 -3
  14. package/dist/Editor/Elements/Color Picker/defaultColors.js +2 -2
  15. package/dist/Editor/Elements/DataView/DataView.js +124 -0
  16. package/dist/Editor/Elements/DataView/DataViewButton.js +23 -0
  17. package/dist/Editor/Elements/DataView/Layouts/ColumnView.js +67 -0
  18. package/dist/Editor/Elements/DataView/Layouts/DataTypes/CheckType.js +33 -0
  19. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/Select.js +162 -0
  20. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/SimpleSelect.js +40 -0
  21. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/styles.js +67 -0
  22. package/dist/Editor/Elements/DataView/Layouts/DataTypes/DateType.js +35 -0
  23. package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +39 -0
  24. package/dist/Editor/Elements/DataView/Layouts/DataTypes/NumberType.js +30 -0
  25. package/dist/Editor/Elements/DataView/Layouts/DataTypes/PersonType.js +30 -0
  26. package/dist/Editor/Elements/DataView/Layouts/DataTypes/SelectType.js +35 -0
  27. package/dist/Editor/Elements/DataView/Layouts/DataTypes/TextType.js +36 -0
  28. package/dist/Editor/Elements/DataView/Layouts/DataTypes/index.js +17 -0
  29. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseField.js +29 -0
  30. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseSort.js +38 -0
  31. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/index.js +74 -0
  32. package/dist/Editor/Elements/DataView/Layouts/FilterSort/index.js +64 -0
  33. package/dist/Editor/Elements/DataView/Layouts/FilterSort/styles.js +106 -0
  34. package/dist/Editor/Elements/DataView/Layouts/FilterView.js +174 -0
  35. package/dist/Editor/Elements/DataView/Layouts/Formula.js +29 -0
  36. package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +113 -0
  37. package/dist/Editor/Elements/DataView/Layouts/Options/AddProperty.js +37 -0
  38. package/dist/Editor/Elements/DataView/Layouts/Options/AllProperties.js +111 -0
  39. package/dist/Editor/Elements/DataView/Layouts/Options/ChangeProperty.js +60 -0
  40. package/dist/Editor/Elements/DataView/Layouts/Options/ColumnsList.js +36 -0
  41. package/dist/Editor/Elements/DataView/Layouts/Options/Constants.js +101 -0
  42. package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +160 -0
  43. package/dist/Editor/Elements/DataView/Layouts/Options/EditProperty.js +190 -0
  44. package/dist/Editor/Elements/DataView/Layouts/Options/FilterProperty.js +42 -0
  45. package/dist/Editor/Elements/DataView/Layouts/Options/PropertyList.js +30 -0
  46. package/dist/Editor/Elements/DataView/Layouts/Options/index.js +110 -0
  47. package/dist/Editor/Elements/DataView/Layouts/Options/styles.js +179 -0
  48. package/dist/Editor/Elements/DataView/Layouts/TableStyles.js +112 -0
  49. package/dist/Editor/Elements/DataView/Layouts/TableView.js +227 -0
  50. package/dist/Editor/Elements/DataView/Layouts/ViewData.js +80 -0
  51. package/dist/Editor/Elements/DataView/Layouts/colStyles.js +10 -0
  52. package/dist/Editor/Elements/DataView/Layouts/index.js +25 -0
  53. package/dist/Editor/Elements/DataView/Providers/DataViewProvider.js +281 -0
  54. package/dist/Editor/Elements/DataView/Utils/globalSearch.js +15 -0
  55. package/dist/Editor/Elements/DataView/Utils/multiSortRows.js +74 -0
  56. package/dist/Editor/Elements/DataView/styles.js +154 -0
  57. package/dist/Editor/Elements/Divider/Divider.js +36 -20
  58. package/dist/Editor/Elements/Embed/Image.js +51 -16
  59. package/dist/Editor/Elements/Embed/Video.js +26 -3
  60. package/dist/Editor/Elements/Form/Form.js +39 -2
  61. package/dist/Editor/Elements/Form/FormElements/FormCheckbox.js +7 -1
  62. package/dist/Editor/Elements/Form/FormElements/FormDate.js +7 -1
  63. package/dist/Editor/Elements/Form/FormElements/FormEmail.js +7 -1
  64. package/dist/Editor/Elements/Form/FormElements/FormNumbers.js +7 -1
  65. package/dist/Editor/Elements/Form/FormElements/FormRadioButton.js +7 -1
  66. package/dist/Editor/Elements/Form/FormElements/FormText.js +7 -1
  67. package/dist/Editor/Elements/Form/FormElements/FormTextArea.js +6 -1
  68. package/dist/Editor/Elements/Form/FormPopup.js +12 -9
  69. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +1 -1
  70. package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +20 -1
  71. package/dist/Editor/Elements/FreeGrid/breakpointConstants.js +4 -4
  72. package/dist/Editor/Elements/FreeGrid/styles.js +2 -1
  73. package/dist/Editor/Elements/Grid/GridButton.js +2 -2
  74. package/dist/Editor/Elements/Grid/GridItem.js +47 -36
  75. package/dist/Editor/Elements/Grid/Styles.js +50 -0
  76. package/dist/Editor/Elements/Link/LinkButton.js +1 -1
  77. package/dist/Editor/Elements/List/CheckList.js +2 -1
  78. package/dist/Editor/Elements/Search/SearchAttachment.js +1 -0
  79. package/dist/Editor/Elements/Search/SearchButton.js +1 -0
  80. package/dist/Editor/Elements/Signature/Signature.css +1 -1
  81. package/dist/Editor/Elements/Signature/SignatureOptions/TypeSignature.js +2 -2
  82. package/dist/Editor/Elements/Signature/SignaturePopup.js +17 -52
  83. package/dist/Editor/Elements/SimpleText/index.js +8 -1
  84. package/dist/Editor/Elements/SimpleText/style.js +20 -1
  85. package/dist/Editor/Elements/Table/AddRowCol.js +77 -0
  86. package/dist/Editor/Elements/Table/DragButton.js +142 -0
  87. package/dist/Editor/Elements/Table/DragStyles.js +70 -0
  88. package/dist/Editor/Elements/Table/Draggable.js +25 -0
  89. package/dist/Editor/Elements/Table/Droppable.js +53 -0
  90. package/dist/Editor/Elements/Table/Styles.js +82 -79
  91. package/dist/Editor/Elements/Table/Table.js +258 -140
  92. package/dist/Editor/Elements/Table/TableCell.js +365 -111
  93. package/dist/Editor/Elements/Table/TablePopup.js +9 -3
  94. package/dist/Editor/Elements/Table/TableRow.js +10 -2
  95. package/dist/Editor/Elements/Table/TableTool.js +101 -0
  96. package/dist/Editor/Elements/Table/tableHelper.js +71 -0
  97. package/dist/Editor/Elements/TopBanner/TopBanner.js +2 -1
  98. package/dist/Editor/MiniEditor.js +15 -1
  99. package/dist/Editor/Styles/EditorStyles.js +13 -4
  100. package/dist/Editor/Toolbar/FormatTools/BlockButton.js +10 -0
  101. package/dist/Editor/Toolbar/FormatTools/Dropdown.js +7 -12
  102. package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +26 -4
  103. package/dist/Editor/Toolbar/FormatTools/MarkButton.js +3 -0
  104. package/dist/Editor/Toolbar/FormatTools/TextSize.js +5 -5
  105. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +3 -6
  106. package/dist/Editor/Toolbar/Mini/Styles.js +4 -1
  107. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/InfinityAITool.js +7 -3
  108. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +6 -4
  109. package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +19 -15
  110. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +555 -57
  111. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +73 -16
  112. package/dist/Editor/Toolbar/PopupTool/index.js +3 -5
  113. package/dist/Editor/Toolbar/Toolbar.js +6 -0
  114. package/dist/Editor/Toolbar/toolbarGroups.js +4 -0
  115. package/dist/Editor/assets/svg/BrainIcon.js +2 -2
  116. package/dist/Editor/assets/svg/SettingsIcon.js +4 -4
  117. package/dist/Editor/assets/svg/TableIcons.js +220 -0
  118. package/dist/Editor/common/ColorPickerButton.js +85 -45
  119. package/dist/Editor/common/DnD/Draggable.js +2 -1
  120. package/dist/Editor/common/FontLoader/FontLoader.js +4 -4
  121. package/dist/Editor/common/Icon.js +23 -20
  122. package/dist/Editor/common/ImageSelector/Options/Upload.js +2 -1
  123. package/dist/Editor/common/ImageSelector/Styles.js +47 -6
  124. package/dist/Editor/common/ImageSelector/UploadStyles.js +18 -6
  125. package/dist/Editor/common/LinkSettings/NavComponents.js +2 -1
  126. package/dist/Editor/common/LinkSettings/index.js +2 -1
  127. package/dist/Editor/common/MentionsPopup/Styles.js +143 -8
  128. package/dist/Editor/common/MentionsPopup/index.js +1 -1
  129. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +108 -12
  130. package/dist/Editor/common/RnD/GuideLines/styles.js +3 -3
  131. package/dist/Editor/common/RnD/ShadowElement.js +1 -1
  132. package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +14 -2
  133. package/dist/Editor/common/RnD/Utils/gridDropItem.js +9 -6
  134. package/dist/Editor/common/RnD/VirtualElement/index.js +5 -1
  135. package/dist/Editor/common/RnD/index.js +3 -2
  136. package/dist/Editor/common/Section/index.js +3 -3
  137. package/dist/Editor/common/Section/styles.js +5 -1
  138. package/dist/Editor/common/Select/index.js +20 -0
  139. package/dist/Editor/common/Select/styles.js +17 -0
  140. package/dist/Editor/common/Shorthands/elements.js +13 -1
  141. package/dist/Editor/common/StyleBuilder/fieldStyle.js +2 -1
  142. package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +9 -3
  143. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +35 -7
  144. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +15 -2
  145. package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +10 -2
  146. package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +2 -1
  147. package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +1 -1
  148. package/dist/Editor/common/StyleBuilder/fieldTypes/icons.js +2 -0
  149. package/dist/Editor/common/StyleBuilder/fieldTypes/index.js +3 -1
  150. package/dist/Editor/common/StyleBuilder/fieldTypes/lineSpacing.js +79 -0
  151. package/dist/Editor/common/StyleBuilder/fieldTypes/radiusStyle.js +11 -11
  152. package/dist/Editor/common/StyleBuilder/fieldTypes/saveAsTemplate.js +22 -6
  153. package/dist/Editor/common/StyleBuilder/fieldTypes/selectBox.js +21 -2
  154. package/dist/Editor/common/StyleBuilder/fieldTypes/text.js +20 -4
  155. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +12 -2
  156. package/dist/Editor/common/StyleBuilder/formStyle.js +268 -149
  157. package/dist/Editor/common/StyleBuilder/index.js +101 -20
  158. package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +4 -0
  159. package/dist/Editor/common/StyleBuilder/tableStyle.js +69 -25
  160. package/dist/Editor/common/SwipeableDrawer/style.js +15 -4
  161. package/dist/Editor/common/ToolbarIcon.js +1 -1
  162. package/dist/Editor/common/Uploader.js +46 -36
  163. package/dist/Editor/common/iconListV2.js +616 -60
  164. package/dist/Editor/common/iconslist.js +23 -17
  165. package/dist/Editor/commonStyle.js +417 -11
  166. package/dist/Editor/helper/deserialize/index.js +25 -13
  167. package/dist/Editor/helper/enforceDateFormat.js +41 -0
  168. package/dist/Editor/helper/index.js +17 -4
  169. package/dist/Editor/helper/theme.js +24 -1
  170. package/dist/Editor/hooks/useMouseMove.js +5 -2
  171. package/dist/Editor/hooks/useTable.js +210 -0
  172. package/dist/Editor/plugins/withCustomDeleteBackward.js +36 -4
  173. package/dist/Editor/plugins/withEmbeds.js +30 -26
  174. package/dist/Editor/plugins/withHTML.js +61 -10
  175. package/dist/Editor/plugins/withLayout.js +1 -0
  176. package/dist/Editor/utils/SlateUtilityFunctions.js +39 -12
  177. package/dist/Editor/utils/brains.js +1 -1
  178. package/dist/Editor/utils/button.js +4 -4
  179. package/dist/Editor/utils/chatEditor/SlateUtilityFunctions.js +26 -1
  180. package/dist/Editor/utils/customHooks/useResize.js +7 -4
  181. package/dist/Editor/utils/customHooks/useTableResize.js +6 -2
  182. package/dist/Editor/utils/dataView.js +43 -0
  183. package/dist/Editor/utils/embed.js +2 -1
  184. package/dist/Editor/utils/events.js +0 -1
  185. package/dist/Editor/utils/font.js +11 -4
  186. package/dist/Editor/utils/formfield.js +8 -4
  187. package/dist/Editor/utils/helper.js +103 -2
  188. package/dist/Editor/utils/insertNewLine.js +19 -1
  189. package/dist/Editor/utils/pageSettings.js +14 -2
  190. package/dist/Editor/utils/serializeToText.js +2 -0
  191. package/dist/Editor/utils/table.js +228 -24
  192. package/package.json +2 -2
@@ -1,168 +1,287 @@
1
- import { fontOptions } from "../../utils/font";
1
+ import { fontOptions, fontWeightOptions } from "../../utils/font";
2
2
  import Icon from "../Icon";
3
3
  import { jsx as _jsx } from "react/jsx-runtime";
4
- const formStyle = [{
5
- tab: "General",
6
- value: "general",
4
+ export const formStyle = [{
5
+ tab: "Form Settings",
6
+ value: "FormSetting",
7
+ hasChildrenTabs: true,
7
8
  fields: [{
8
- label: "Form Name",
9
- key: "formName",
10
- type: "text"
11
- }, {
12
- label: "Send Form to Email",
13
- key: "email",
14
- type: "text",
15
- placeholder: "Enter Email to send the response..."
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
+ }]
16
26
  }, {
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"
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
+ }]
29
61
  }, {
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
- }
62
+ tab: "Banner Spacing",
63
+ value: "bannerSpacing",
64
+ fields: [{
65
+ label: "Banner Spacing",
66
+ key: "bannerSpacing",
67
+ type: "bannerSpacing"
68
+ }]
44
69
  }, {
45
- label: "Font Size",
46
- key: "textSize",
47
- type: "fontSize",
48
- width: 5,
49
- placeholder: "16px"
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
+ }]
50
102
  }, {
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"
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
+ }]
71
119
  }, {
72
- label: "Border Width",
73
- key: "borderWidth",
74
- type: "text",
75
- placeholder: "1px"
120
+ tab: "Position",
121
+ value: "position",
122
+ fields: [{
123
+ label: "Set Postion (Vertical & Horizantal)",
124
+ key: "alignment",
125
+ type: "alignment"
126
+ }]
76
127
  }, {
77
- label: "Border Style",
78
- key: "borderStyle",
79
- type: "textOptions",
80
- options: [{
81
- text: "Solid",
82
- value: "solid"
128
+ tab: "Background",
129
+ value: "backgroundImage",
130
+ fields: [{
131
+ label: "URL",
132
+ key: "backgroundImage",
133
+ type: "text"
83
134
  }, {
84
- text: "Dotted",
85
- value: "dotted"
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
+ })
86
152
  }, {
87
- text: "Dashed",
88
- value: "dashed"
89
- }],
90
- renderOption: option => {
91
- return /*#__PURE__*/_jsx("span", {
92
- children: option.text
93
- });
94
- }
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
+ }]
95
173
  }]
96
174
  }, {
97
- tab: "Colors",
98
- value: "colors",
175
+ tab: "Field Settings",
176
+ value: "FieldSetting",
177
+ hasChildrenTabs: true,
99
178
  fields: [{
100
- label: "Text Color",
101
- key: "textColor",
102
- type: "color",
103
- needPreview: true
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
+ }]
104
197
  }, {
105
- label: "Background Color",
106
- key: "bgColor",
107
- type: "color"
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
+ }]
108
216
  }, {
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"
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
+ }]
128
226
  }, {
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
- })
227
+ tab: "Text Color",
228
+ value: "TextColor",
229
+ fields: [{
230
+ label: "Text Color",
231
+ key: "fieldTextColor",
232
+ type: "color",
233
+ needPreview: true
234
+ }]
146
235
  }, {
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"
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
+ }]
251
+ }, {
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
+ }]
261
+ }, {
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
+ }]
166
286
  }]
167
- }];
168
- export default formStyle;
287
+ }];
@@ -1,9 +1,11 @@
1
1
  import React, { useEffect, useState } from "react";
2
- import { DialogTitle, DialogContent, DialogActions, Button, Grid, IconButton, Typography, Drawer, SwipeableDrawer } from "@mui/material";
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
+ import { ThemeProvider } from "@mui/material/styles";
8
+ import { ExpandMoreSharp } from "@mui/icons-material";
7
9
  import { jsx as _jsx } from "react/jsx-runtime";
8
10
  import { jsxs as _jsxs } from "react/jsx-runtime";
9
11
  import { Fragment as _Fragment } from "react/jsx-runtime";
@@ -67,12 +69,44 @@ const StyleBuilder = props => {
67
69
  const isMobile = customProps?.isMobile || false;
68
70
  const [elementProps, setElementProps] = useState(element);
69
71
  const [tab] = useState(renderTabs[0]?.value);
72
+ const [saveDisable, setSaveDisable] = useState(false);
70
73
  const tabVal = renderTabs?.find(f => f.value === tab);
71
74
  const {
72
75
  needActions = true
73
76
  } = tabVal || {
74
77
  needActions: true
75
78
  };
79
+ const {
80
+ hideTools
81
+ } = customProps || {};
82
+ const muiTheme = createTheme({
83
+ components: {
84
+ MuiAccordion: {
85
+ styleOverrides: {
86
+ root: {
87
+ "& .MuiAccordionSummary-root": {
88
+ flexDirection: "row-reverse",
89
+ "& .MuiSvgIcon-root": {
90
+ color: theme?.palette?.primary?.main
91
+ },
92
+ "& .Mui-expanded": {
93
+ "& .MuiSvgIcon-root": {
94
+ color: theme?.palette?.text?.blueText
95
+ }
96
+ }
97
+ },
98
+ padding: "0px",
99
+ "&.Mui-expanded": {
100
+ margin: "0"
101
+ }
102
+ }
103
+ },
104
+ defaultProps: {
105
+ elevation: 0
106
+ }
107
+ }
108
+ }
109
+ });
76
110
  useEffect(() => {
77
111
  if (customProps?.onDrawerOpen) {
78
112
  customProps?.onDrawerOpen(true);
@@ -90,12 +124,17 @@ const StyleBuilder = props => {
90
124
  field_type: data?.element
91
125
  });
92
126
  if (data?.hasOwnProperty("name")) {
93
- setElementProps({
94
- ...elementProps,
95
- ...data,
96
- key: data?.name,
97
- label: data?.name
98
- });
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
+ }
99
138
  }
100
139
  };
101
140
  const handleSave = () => {
@@ -110,7 +149,8 @@ const StyleBuilder = props => {
110
149
  xs: 12,
111
150
  sx: {
112
151
  p: 2,
113
- width: isMobile ? "100%" : "350px"
152
+ width: isMobile ? "100%" : "312px",
153
+ ...classes.pageSettingPopUpRoot
114
154
  },
115
155
  children: [/*#__PURE__*/_jsx(DialogTitle, {
116
156
  sx: {
@@ -133,29 +173,69 @@ const StyleBuilder = props => {
133
173
  children: /*#__PURE__*/_jsx(IconButton, {
134
174
  onClick: onClose,
135
175
  className: "close-popupbtn",
136
- children: /*#__PURE__*/_jsx(CloseIcon, {})
176
+ children: /*#__PURE__*/_jsx(CloseRoundedIcon, {})
137
177
  })
138
178
  })]
139
179
  })
140
180
  }), /*#__PURE__*/_jsx(DialogContent, {
141
181
  sx: {
142
182
  maxHeight: isMobile ? `500px` : `${window.innerHeight - 125}px`,
143
- padding: "8px"
183
+ padding: "0px"
144
184
  },
145
185
  children: renderTabs.map((m, i) => {
146
- return /*#__PURE__*/_jsx(StyleContent, {
147
- renderTabs: renderTabs,
148
- value: m.value,
149
- element: elementProps,
150
- onChange: onElementPropsChange,
151
- customProps: customProps,
152
- handleClose: handleClose
153
- }, `tab_${m.value}_$${i}`);
186
+ if (m?.hasChildrenTabs) {
187
+ return /*#__PURE__*/_jsx(ThemeProvider, {
188
+ theme: muiTheme,
189
+ children: /*#__PURE__*/_jsxs(Accordion, {
190
+ defaultExpanded: true,
191
+ children: [/*#__PURE__*/_jsx(AccordionSummary, {
192
+ expandIcon: /*#__PURE__*/_jsx(ExpandMoreSharp, {}),
193
+ sx: {
194
+ padding: "0px"
195
+ },
196
+ children: /*#__PURE__*/_jsx(Typography, {
197
+ variant: "body1",
198
+ className: "settingsHeader",
199
+ color: "primary",
200
+ style: {
201
+ fontSize: "14px !important",
202
+ fontWeight: "400 !important"
203
+ },
204
+ children: m?.tab
205
+ })
206
+ }), /*#__PURE__*/_jsx(AccordionDetails, {
207
+ sx: {
208
+ padding: "5px"
209
+ },
210
+ children: m?.fields.filter(f => (hideTools || []).indexOf(f.value) === -1).map((field, index) => {
211
+ return /*#__PURE__*/_jsx(StyleContent, {
212
+ renderTabs: [field],
213
+ value: field.value,
214
+ element: elementProps,
215
+ onChange: onElementPropsChange,
216
+ customProps: customProps,
217
+ handleClose: handleClose
218
+ }, `tab_${field.value}_${index}`);
219
+ })
220
+ })]
221
+ }, `accordion_${i}`)
222
+ }, i);
223
+ } else {
224
+ return /*#__PURE__*/_jsx(StyleContent, {
225
+ renderTabs: renderTabs,
226
+ value: m.value,
227
+ element: elementProps,
228
+ onChange: onElementPropsChange,
229
+ customProps: customProps,
230
+ handleClose: handleClose
231
+ }, `tab_${m.value}_$${i}`);
232
+ }
154
233
  })
155
234
  }), needActions ? /*#__PURE__*/_jsxs(DialogActions, {
156
235
  sx: {
157
236
  p: 0,
158
237
  pt: 2,
238
+ pl: 1,
159
239
  justifyContent: "space-between"
160
240
  },
161
241
  children: [onDelete ? /*#__PURE__*/_jsx(Button, {
@@ -165,6 +245,7 @@ const StyleBuilder = props => {
165
245
  children: "Delete"
166
246
  }) : null, /*#__PURE__*/_jsx(Button, {
167
247
  onClick: handleSave,
248
+ disabled: saveDisable,
168
249
  className: "primaryBtn",
169
250
  children: "Save"
170
251
  })]
@@ -180,7 +261,7 @@ const StyleBuilder = props => {
180
261
  style: {
181
262
  zIndex: "1300"
182
263
  },
183
- sx: classes.bottomBarDrawer,
264
+ sx: classes.sideBarDrawer,
184
265
  children: renderDrawerMenu()
185
266
  }) : /*#__PURE__*/_jsx(Drawer, {
186
267
  open: true,
@@ -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",