@flozy/editor 9.9.6 → 9.9.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 (26) hide show
  1. package/dist/Editor/Elements/EmbedScript/Code.js +14 -2
  2. package/dist/Editor/Elements/EmbedScript/EmbedScriptPopup.js +57 -28
  3. package/dist/Editor/Elements/EmbedScript/styles.js +89 -0
  4. package/dist/Editor/Elements/Form/Form.js +179 -168
  5. package/dist/Editor/Elements/Form/FormField.js +10 -4
  6. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +5 -1
  7. package/dist/Editor/Elements/FreeGrid/Options/More.js +1 -1
  8. package/dist/Editor/Elements/FreeGrid/styles.js +58 -7
  9. package/dist/Editor/assets/svg/SettingsIcon.js +1 -0
  10. package/dist/Editor/common/LinkSettings/NavComponents.js +34 -8
  11. package/dist/Editor/common/LinkSettings/index.js +84 -68
  12. package/dist/Editor/common/LinkSettings/style.js +245 -30
  13. package/dist/Editor/common/RnD/ElementOptions/Actions.js +13 -14
  14. package/dist/Editor/common/RnD/ElementOptions/Icons/LinkIcon.js +1 -0
  15. package/dist/Editor/common/RnD/ElementOptions/index.js +2 -2
  16. package/dist/Editor/common/RnD/ElementOptions/styles.js +28 -1
  17. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +4 -4
  18. package/dist/Editor/common/RnD/ElementSettings/styles.js +147 -12
  19. package/dist/Editor/common/RnD/OptionsPopup/index.js +8 -5
  20. package/dist/Editor/common/RnD/OptionsPopup/style.js +121 -19
  21. package/dist/Editor/common/Select/index.js +2 -0
  22. package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +13 -6
  23. package/dist/Editor/common/iconListV2.js +101 -6
  24. package/dist/Editor/common/iconslist.js +3 -0
  25. package/dist/Editor/commonStyle.js +78 -0
  26. package/package.json +1 -1
@@ -2,11 +2,13 @@ import React, { useState } from "react";
2
2
  import { Transforms, Node } from "slate";
3
3
  import { useSlateStatic, ReactEditor } from "slate-react";
4
4
  import { IconButton, Tooltip, Grid, useTheme } from "@mui/material";
5
- import DeleteIcon from "@mui/icons-material/Delete";
6
- import SettingsIcon from "@mui/icons-material/Settings";
7
5
  import FormElements from "./FormElements";
8
6
  import FieldPopup from "./FieldPopup";
9
7
  import { getBreakPointsValue, groupByBreakpoint } from "../../helper/theme";
8
+ import { DeleteIcon } from "../../assets/svg/AIIcons";
9
+ import { SettingsIcon } from "../../assets/svg/TableIcons";
10
+ import { useEditorContext } from "../../hooks/useMouseMove";
11
+ import useCommonStyle from "../../commonStyle";
10
12
  import { jsx as _jsx } from "react/jsx-runtime";
11
13
  import { jsxs as _jsxs } from "react/jsx-runtime";
12
14
  const FormField = props => {
@@ -38,6 +40,10 @@ const FormField = props => {
38
40
  ...element,
39
41
  metadatamapping
40
42
  };
43
+ const {
44
+ theme: appTheme
45
+ } = useEditorContext();
46
+ const classes = useCommonStyle(appTheme);
41
47
  const [openSetttings, setOpenSettings] = useState(false);
42
48
  const onSettings = () => {
43
49
  setOpenSettings(true);
@@ -77,7 +83,6 @@ const FormField = props => {
77
83
  top: "24px",
78
84
  bottom: 0,
79
85
  margin: "auto",
80
- height: "42px",
81
86
  zIndex: 101
82
87
  },
83
88
  children: [/*#__PURE__*/_jsx(Tooltip, {
@@ -110,7 +115,8 @@ const FormField = props => {
110
115
  className: "form-field",
111
116
  sx: {
112
117
  position: "relative",
113
- ...fieldSX
118
+ ...fieldSX,
119
+ ...classes?.fieldBtnSettings
114
120
  },
115
121
  children: [!readOnly && /*#__PURE__*/_jsx(FieldToolbar, {}), /*#__PURE__*/_jsx(FormElement, {
116
122
  fieldProps: elementProps
@@ -34,11 +34,15 @@ export const useFreeGrid = () => {
34
34
  return useContext(FreeGridContext);
35
35
  };
36
36
  const FreeGrid = props => {
37
+ const {
38
+ theme: appTheme
39
+ } = useEditorContext();
37
40
  const theme = useTheme();
38
41
  const breakpoint = useBreakpoints(theme);
39
42
  const classes = useFreeGridStyles({
40
43
  theme,
41
- MAX_DEVICE_WIDTH: MAX_DEVICE_WIDTH[breakpoint]
44
+ MAX_DEVICE_WIDTH: MAX_DEVICE_WIDTH[breakpoint],
45
+ appTheme
42
46
  });
43
47
  const editor = useSlateStatic();
44
48
  const {
@@ -10,7 +10,7 @@ const More = props => {
10
10
  } = props;
11
11
  return /*#__PURE__*/_jsx(Box, {
12
12
  children: /*#__PURE__*/_jsxs(List, {
13
- className: "item-list-wrpr",
13
+ className: "item-list-wrpr sectionMoreOption",
14
14
  children: [/*#__PURE__*/_jsx(ListItemButton, {
15
15
  className: "item-wrapper",
16
16
  onClick: handleClick("addSection"),
@@ -1,6 +1,7 @@
1
1
  const useFreeGridStyles = ({
2
2
  theme,
3
- MAX_DEVICE_WIDTH
3
+ MAX_DEVICE_WIDTH,
4
+ appTheme
4
5
  }) => ({
5
6
  root: {
6
7
  "&.freegrid-container": {
@@ -316,6 +317,36 @@ const useFreeGridStyles = ({
316
317
  backgroundColor: "#FFF",
317
318
  overflow: "hidden"
318
319
  },
320
+ "& .fgi_type_embedScript:not(:has(.has-code))": {
321
+ background: appTheme?.palette?.editor?.sectionSettingIconHover,
322
+ color: appTheme?.palette?.editor?.textColor,
323
+ fontSize: "14px",
324
+ borderRadius: "12px",
325
+ display: "flex",
326
+ flexDirection: "column",
327
+ justifyContent: "center",
328
+ alignItems: "center",
329
+ height: "100%",
330
+ textAlign: "center",
331
+ "& svg": {
332
+ width: "20px",
333
+ height: "20px",
334
+ "& path": {
335
+ stroke: appTheme?.palette?.editor?.closeButtonSvgStroke
336
+ }
337
+ },
338
+ "& .code-icon": {
339
+ display: "flex",
340
+ marginRight: "5px"
341
+ },
342
+ "& .empty-code": {
343
+ display: "flex"
344
+ },
345
+ "& .code-name": {
346
+ display: "flex",
347
+ alignItems: "anchor-center"
348
+ }
349
+ },
319
350
  "& .fgi_type_text": {
320
351
  "& .edt-headings": {
321
352
  margin: "0px"
@@ -356,21 +387,41 @@ const useFreeGridStyles = ({
356
387
  sectionPopper: {
357
388
  zIndex: 1200,
358
389
  width: "40px",
359
- left: "-58px !important",
390
+ left: "-63px !important",
360
391
  borderRadius: "8px",
392
+ marginRight: "5px !important",
361
393
  "& .papper-root": {
362
394
  fontFamily: "sans-serif",
363
395
  boxShadow: "-4px -3px 12px 4px rgba(0, 0, 0, 0.12)",
364
- background: "#FFF",
396
+ background: `${appTheme?.palette?.editor?.miniToolBarBackground} !important`,
397
+ border: `1px solid ${appTheme?.palette?.editor?.miniToolBarBorder}`,
398
+ borderRadius: "10px",
365
399
  "& .MuiIconButton-root": {
366
- padding: "10px",
400
+ padding: "9px",
367
401
  color: "#000",
368
- background: "#FFF",
402
+ background: `${appTheme?.palette?.editor?.miniToolBarBackground} !important`,
369
403
  "& svg": {
370
404
  width: "20px",
371
- height: "20px"
405
+ height: "20px",
406
+ color: appTheme?.palette?.editor?.closeButtonSvgStroke
407
+ },
408
+ "& .settingsIcon": {
409
+ "& path": {
410
+ stroke: appTheme?.palette?.editor?.closeButtonSvgStroke
411
+ }
372
412
  },
373
- "&.active,&:hover ": {}
413
+ "&.active": {
414
+ "& svg": {
415
+ width: "20px",
416
+ height: "20px",
417
+ color: "#2563EB"
418
+ },
419
+ "& .settingsIcon": {
420
+ "& path": {
421
+ stroke: "#2563EB"
422
+ }
423
+ }
424
+ }
374
425
  }
375
426
  }
376
427
  },
@@ -7,6 +7,7 @@ const SettingsIcon = props => {
7
7
  viewBox: "0 0 18 18",
8
8
  fill: "none",
9
9
  xmlns: "http://www.w3.org/2000/svg",
10
+ className: "settingsIcon",
10
11
  ...props,
11
12
  children: [/*#__PURE__*/_jsx("path", {
12
13
  d: "M9 11.25C10.2426 11.25 11.25 10.2426 11.25 9C11.25 7.75736 10.2426 6.75 9 6.75C7.75736 6.75 6.75 7.75736 6.75 9C6.75 10.2426 7.75736 11.25 9 11.25Z",
@@ -1,7 +1,8 @@
1
- import { Autocomplete, Checkbox, FormControlLabel, MenuItem, TextField, Typography, createFilterOptions } from "@mui/material";
1
+ import { Autocomplete, Checkbox, FormControlLabel, IconButton, MenuItem, 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
6
  import { jsx as _jsx } from "react/jsx-runtime";
6
7
  import { Fragment as _Fragment } from "react/jsx-runtime";
7
8
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -31,11 +32,19 @@ const OpenInNewTab = props => {
31
32
  className: "ccheckbox-primary",
32
33
  control: /*#__PURE__*/_jsx(Checkbox, {
33
34
  checked: openInNewTab,
34
- onChange: onNewTabChange
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
+ })
35
44
  }),
36
45
  label: /*#__PURE__*/_jsx(Typography, {
37
46
  variant: "body2",
38
- children: translation("Open in new tab")
47
+ children: "Open in new tab"
39
48
  })
40
49
  }) : null;
41
50
  };
@@ -47,6 +56,11 @@ export const TextInput = props => {
47
56
  ...props,
48
57
  onChange: e => {
49
58
  props.onChange(e.target.value);
59
+ },
60
+ sx: {
61
+ "&::placeholder": {
62
+ color: "gray"
63
+ }
50
64
  }
51
65
  }), /*#__PURE__*/_jsx(OpenInNewTab, {
52
66
  ...props
@@ -58,7 +72,8 @@ export const SelectPage = props => {
58
72
  value,
59
73
  onChange,
60
74
  services,
61
- translation
75
+ translation,
76
+ classes
62
77
  } = props;
63
78
  const [pages, setPages] = useState([]);
64
79
  const editor = useSlate();
@@ -116,7 +131,8 @@ export const SelectPage = props => {
116
131
  setValue: val => onChange(val?.value || ""),
117
132
  placeholder: translation("Select Page"),
118
133
  options: pages,
119
- disabled: isCurrentPage
134
+ disabled: isCurrentPage,
135
+ classes: classes
120
136
  }), /*#__PURE__*/_jsx(FreeSoloCreateOption, {
121
137
  label: section?.label,
122
138
  setValue: val => {
@@ -130,7 +146,8 @@ export const SelectPage = props => {
130
146
  options: page?.sections?.map(p => ({
131
147
  label: p,
132
148
  value: p
133
- }))
149
+ })),
150
+ classes: classes
134
151
  }), isCurrentPage ? null : /*#__PURE__*/_jsx(OpenInNewTab, {
135
152
  ...props
136
153
  })]
@@ -144,6 +161,7 @@ export const Trigger = props => {
144
161
  return /*#__PURE__*/_jsx(Typography, {
145
162
  variant: "subtitle1",
146
163
  gutterBottom: true,
164
+ className: "trigger-text",
147
165
  children: `${translation("Choosing this will trigger the")} ${translation(nav.type)} ${translation("step")}`
148
166
  });
149
167
  };
@@ -194,7 +212,8 @@ export function FreeSoloCreateOption({
194
212
  setValue,
195
213
  options = [],
196
214
  placeholder = "",
197
- disabled = false
215
+ disabled = false,
216
+ classes
198
217
  }) {
199
218
  return /*#__PURE__*/_jsx(Autocomplete, {
200
219
  freeSolo: true,
@@ -260,6 +279,13 @@ export function FreeSoloCreateOption({
260
279
  sx: {
261
280
  marginTop: "10px"
262
281
  },
263
- disabled: disabled
282
+ disabled: disabled,
283
+ slotProps: {
284
+ popper: {
285
+ sx: {
286
+ ...classes.customAutoComplete
287
+ }
288
+ }
289
+ }
264
290
  });
265
291
  }
@@ -4,8 +4,8 @@ import DialogTitle from "@mui/material/DialogTitle";
4
4
  import DialogContent from "@mui/material/DialogContent";
5
5
  import DialogActions from "@mui/material/DialogActions";
6
6
  import IconButton from "@mui/material/IconButton";
7
- import CloseIcon from "@mui/icons-material/Close";
8
- import { Box, FormControl, FormControlLabel, Grid, MenuItem, Radio, RadioGroup, Typography } from "@mui/material";
7
+ import CloseRoundedIcon from "@mui/icons-material/CloseRounded";
8
+ import { Box, FormControl, FormControlLabel, Grid, MenuItem, Radio, RadioGroup, Typography, useMediaQuery } from "@mui/material";
9
9
  import { useState } from "react";
10
10
  import LinkSettingsStyles from "./style";
11
11
  import { getNavOptions } from "./navOptions";
@@ -43,10 +43,10 @@ export default function LinkSettings(props) {
43
43
  allowTrigger
44
44
  } = props;
45
45
  const {
46
- isMobile,
47
46
  tagName,
48
47
  translation
49
48
  } = customProps;
49
+ const isMobile = useMediaQuery('(max-width: 899px)');
50
50
  const navOptions = getNavOptions(customProps.hideTools, tagName, allowTrigger);
51
51
  const classes = LinkSettingsStyles(theme);
52
52
  const [nav, setNav] = useState(getNav(navType, navOptions));
@@ -64,66 +64,70 @@ export default function LinkSettings(props) {
64
64
  });
65
65
  };
66
66
  if (isMobile) {
67
- return /*#__PURE__*/_jsxs(SwipeableDrawer, {
67
+ return /*#__PURE__*/_jsx(SwipeableDrawer, {
68
68
  open: true,
69
69
  onClose: handleClose,
70
- children: [/*#__PURE__*/_jsx(Typography, {
71
- variant: "subtitle1",
72
- gutterBottom: true,
73
- sx: {
74
- fontWeight: 600
75
- },
76
- children: translation("dialogueTitle")
77
- }), /*#__PURE__*/_jsx(Select, {
78
- size: "small",
79
- fullWidth: true,
80
- value: nav?.value,
81
- onChange: e => {
82
- const {
83
- value
84
- } = e.target;
85
- const selected = getNav(value, navOptions);
86
- setNav(selected);
87
- setNavValue("");
88
- },
89
- displayEmpty: true,
90
- MenuProps: {
91
- sx: classes.customSelect
92
- },
93
- children: navOptions.map((navOption, i) => {
94
- return /*#__PURE__*/_jsx(MenuItem, {
95
- value: navOption.value,
96
- children: /*#__PURE__*/_jsx(Typography, {
97
- variant: "body2",
98
- children: translation(navOption.label)
99
- })
100
- }, i);
101
- })
102
- }), /*#__PURE__*/_jsx(Box, {
103
- sx: {
104
- paddingTop: "14px"
105
- },
106
- children: NavSettings && /*#__PURE__*/_jsx(NavSettings, {
107
- placeholder: translation(nav?.placeholder),
108
- nav: nav,
109
- onChange: onChange,
110
- value: navValue,
111
- openInNewTab: openInNewTab,
112
- onNewTabChange: () => setOpenInNewTab(prev => !prev),
113
- services: customProps.services,
114
- classes: classes,
115
- translation: translation
116
- })
117
- }), /*#__PURE__*/_jsx(Box, {
118
- component: "div",
119
- sx: classes.mobileActionBtns,
120
- children: /*#__PURE__*/_jsx(ActionsButtons, {
121
- classes: classes,
122
- onCancel: handleClose,
123
- onSave: onSubmit,
124
- translation: translation
125
- })
126
- })]
70
+ children: /*#__PURE__*/_jsxs(Grid, {
71
+ sx: classes.drawerContainer,
72
+ children: [/*#__PURE__*/_jsx(Typography, {
73
+ variant: "subtitle1",
74
+ gutterBottom: true,
75
+ sx: {
76
+ fontWeight: 600
77
+ },
78
+ className: "link-settings-title",
79
+ children: translation("dialogueTitle")
80
+ }), /*#__PURE__*/_jsx(Select, {
81
+ size: "small",
82
+ fullWidth: true,
83
+ value: nav?.value,
84
+ onChange: e => {
85
+ const {
86
+ value
87
+ } = e.target;
88
+ const selected = getNav(value, navOptions);
89
+ setNav(selected);
90
+ setNavValue("");
91
+ },
92
+ displayEmpty: true,
93
+ MenuProps: {
94
+ sx: classes.customSelect
95
+ },
96
+ children: navOptions.map((navOption, i) => {
97
+ return /*#__PURE__*/_jsx(MenuItem, {
98
+ value: navOption.value,
99
+ children: /*#__PURE__*/_jsx(Typography, {
100
+ variant: "body2",
101
+ children: translation(navOption.label)
102
+ })
103
+ }, i);
104
+ })
105
+ }), /*#__PURE__*/_jsx(Box, {
106
+ sx: {
107
+ paddingTop: "14px"
108
+ },
109
+ children: NavSettings && /*#__PURE__*/_jsx(NavSettings, {
110
+ placeholder: translation(nav?.placeholder),
111
+ nav: nav,
112
+ onChange: onChange,
113
+ value: navValue,
114
+ openInNewTab: openInNewTab,
115
+ onNewTabChange: () => setOpenInNewTab(prev => !prev),
116
+ services: customProps.services,
117
+ classes: classes,
118
+ translation: translation
119
+ })
120
+ }), /*#__PURE__*/_jsx(Box, {
121
+ component: "div",
122
+ sx: classes.mobileActionBtns,
123
+ children: /*#__PURE__*/_jsx(ActionsButtons, {
124
+ classes: classes,
125
+ onCancel: handleClose,
126
+ onSave: onSubmit,
127
+ translation: translation
128
+ })
129
+ })]
130
+ })
127
131
  });
128
132
  } else {
129
133
  return /*#__PURE__*/_jsxs(Dialog, {
@@ -132,15 +136,25 @@ export default function LinkSettings(props) {
132
136
  sx: classes.dialogContainer,
133
137
  fullWidth: true,
134
138
  maxWidth: "sm",
135
- children: [/*#__PURE__*/_jsx(DialogTitle, {
136
- children: translation("dialogueTitle")
137
- }), /*#__PURE__*/_jsx(IconButton, {
138
- "aria-label": "close",
139
- onClick: handleClose,
140
- sx: classes.closeIcon,
141
- children: /*#__PURE__*/_jsx(CloseIcon, {})
139
+ children: [/*#__PURE__*/_jsxs(Grid, {
140
+ container: true,
141
+ direction: "row",
142
+ sx: {
143
+ justifyContent: "space-between",
144
+ alignItems: "center"
145
+ },
146
+ className: "dialog-title",
147
+ children: [/*#__PURE__*/_jsx(DialogTitle, {
148
+ children: translation("dialogueTitle")
149
+ }), /*#__PURE__*/_jsx(IconButton, {
150
+ "aria-label": "close",
151
+ onClick: handleClose,
152
+ sx: classes.closeIcon,
153
+ children: /*#__PURE__*/_jsx(CloseRoundedIcon, {})
154
+ })]
142
155
  }), /*#__PURE__*/_jsx(DialogContent, {
143
156
  dividers: true,
157
+ className: "link-settings-content",
144
158
  children: /*#__PURE__*/_jsxs(Grid, {
145
159
  container: true,
146
160
  spacing: 2,
@@ -148,7 +162,9 @@ export default function LinkSettings(props) {
148
162
  item: true,
149
163
  xs: 6,
150
164
  sx: classes.gridDivider,
165
+ className: "radioBtnGrp",
151
166
  children: /*#__PURE__*/_jsx(FormControl, {
167
+ sx: classes.customRadioBtn,
152
168
  children: /*#__PURE__*/_jsx(RadioGroup, {
153
169
  value: nav?.value,
154
170
  children: navOptions?.map((navOption, i) => {