@flozy/editor 10.4.4 → 10.4.5

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 (58) hide show
  1. package/dist/Editor/CommonEditor.js +2 -3
  2. package/dist/Editor/Elements/Button/EditorButton.js +2 -0
  3. package/dist/Editor/Elements/DataView/Layouts/ColumnView.js +2 -4
  4. package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +8 -23
  5. package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +1 -5
  6. package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +2 -3
  7. package/dist/Editor/Elements/DataView/Layouts/Options/index.js +0 -11
  8. package/dist/Editor/Elements/DataView/Layouts/ViewData.js +4 -8
  9. package/dist/Editor/Elements/Embed/Image.js +2 -3
  10. package/dist/Editor/Elements/EmbedScript/Code.js +2 -14
  11. package/dist/Editor/Elements/EmbedScript/EmbedScriptPopup.js +28 -57
  12. package/dist/Editor/Elements/Form/Form.js +168 -181
  13. package/dist/Editor/Elements/Form/FormElements/FormText.js +6 -23
  14. package/dist/Editor/Elements/Form/FormElements/FormTextArea.js +2 -3
  15. package/dist/Editor/Elements/Form/FormField.js +4 -10
  16. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +1 -5
  17. package/dist/Editor/Elements/FreeGrid/Options/More.js +1 -1
  18. package/dist/Editor/Elements/FreeGrid/Options/sectionItemOptions.js +1 -1
  19. package/dist/Editor/Elements/FreeGrid/styles.js +7 -61
  20. package/dist/Editor/Elements/List/CheckList.js +2 -3
  21. package/dist/Editor/Elements/Search/SearchAttachment.js +9 -40
  22. package/dist/Editor/Elements/Search/SearchButton.js +8 -9
  23. package/dist/Editor/Elements/Search/SearchList.js +7 -9
  24. package/dist/Editor/Elements/SimpleText/index.js +1 -6
  25. package/dist/Editor/Elements/Table/TableCell.js +3 -7
  26. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +18 -43
  27. package/dist/Editor/assets/svg/SettingsIcon.js +0 -1
  28. package/dist/Editor/common/Icon.js +1 -3
  29. package/dist/Editor/common/LinkSettings/NavComponents.js +8 -34
  30. package/dist/Editor/common/LinkSettings/index.js +69 -85
  31. package/dist/Editor/common/LinkSettings/style.js +30 -245
  32. package/dist/Editor/common/RnD/ElementOptions/Actions.js +14 -13
  33. package/dist/Editor/common/RnD/ElementOptions/Icons/LinkIcon.js +0 -1
  34. package/dist/Editor/common/RnD/ElementOptions/index.js +2 -2
  35. package/dist/Editor/common/RnD/ElementOptions/styles.js +1 -28
  36. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +4 -4
  37. package/dist/Editor/common/RnD/ElementSettings/styles.js +12 -147
  38. package/dist/Editor/common/RnD/OptionsPopup/index.js +5 -8
  39. package/dist/Editor/common/RnD/OptionsPopup/style.js +19 -121
  40. package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +6 -0
  41. package/dist/Editor/common/Select/index.js +0 -2
  42. package/dist/Editor/common/Shorthands/elements.js +11 -11
  43. package/dist/Editor/common/StyleBuilder/fieldTypes/lineSpacing.js +6 -7
  44. package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +6 -13
  45. package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +7 -5
  46. package/dist/Editor/common/iconListV2.js +6 -101
  47. package/dist/Editor/common/iconslist.js +0 -3
  48. package/dist/Editor/commonStyle.js +1 -70
  49. package/dist/Editor/hooks/useMouseMove.js +5 -2
  50. package/dist/Editor/utils/SlateUtilityFunctions.js +10 -12
  51. package/dist/Editor/utils/form.js +4 -4
  52. package/dist/Editor/utils/formfield.js +2 -8
  53. package/package.json +1 -1
  54. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/MultiSelect.js +0 -454
  55. package/dist/Editor/Elements/EmbedScript/styles.js +0 -89
  56. package/dist/Editor/assets/svg/ClearAllRounded.js +0 -31
  57. package/dist/Editor/assets/svg/ResetIconNew.js +0 -23
  58. package/dist/Editor/common/SnackBar/index.js +0 -43
@@ -1236,37 +1236,27 @@ export function ToggleFullScreenIcon() {
1236
1236
  }
1237
1237
  export function CodeElementIcon() {
1238
1238
  return /*#__PURE__*/_jsxs("svg", {
1239
- width: "24",
1240
- height: "24",
1241
- viewBox: "0 0 24 24",
1239
+ width: "12",
1240
+ height: "9",
1241
+ viewBox: "0 0 12 9",
1242
1242
  fill: "none",
1243
1243
  xmlns: "http://www.w3.org/2000/svg",
1244
1244
  className: "commonSvgStyle",
1245
1245
  children: [/*#__PURE__*/_jsx("path", {
1246
- d: "M8 10L6 12L8 14",
1246
+ d: "M6.83331 1L4.83331 8",
1247
1247
  stroke: "#64748B",
1248
- strokeWidth: "1.5",
1249
1248
  strokeMiterlimit: "10",
1250
1249
  strokeLinecap: "round",
1251
1250
  strokeLinejoin: "round"
1252
1251
  }), /*#__PURE__*/_jsx("path", {
1253
- d: "M16 10L18 12L16 14",
1252
+ d: "M8.83331 2.32983L10.6666 4.32983L8.83331 6.32983",
1254
1253
  stroke: "#64748B",
1255
- strokeWidth: "1.5",
1256
- strokeMiterlimit: "10",
1257
- strokeLinecap: "round",
1258
- strokeLinejoin: "round"
1259
- }), /*#__PURE__*/_jsx("path", {
1260
- d: "M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z",
1261
- stroke: "#64748B",
1262
- strokeWidth: "1.5",
1263
1254
  strokeMiterlimit: "10",
1264
1255
  strokeLinecap: "round",
1265
1256
  strokeLinejoin: "round"
1266
1257
  }), /*#__PURE__*/_jsx("path", {
1267
- d: "M13 9.66992L11 14.33",
1258
+ d: "M2.83333 2.32983L1 4.32983L2.83333 6.32983",
1268
1259
  stroke: "#64748B",
1269
- strokeWidth: "1.5",
1270
1260
  strokeMiterlimit: "10",
1271
1261
  strokeLinecap: "round",
1272
1262
  strokeLinejoin: "round"
@@ -1441,89 +1431,4 @@ export function SectionDragIcon() {
1441
1431
  fill: "#94A3B8"
1442
1432
  })]
1443
1433
  });
1444
- }
1445
- export function PenIcon() {
1446
- return /*#__PURE__*/_jsxs("svg", {
1447
- width: "17",
1448
- height: "17",
1449
- viewBox: "0 0 17 17",
1450
- fill: "none",
1451
- xmlns: "http://www.w3.org/2000/svg",
1452
- className: "commonSvgStyle",
1453
- children: [/*#__PURE__*/_jsx("path", {
1454
- d: "M9.74898 3.14435L3.93357 9.29977C3.71398 9.53352 3.50148 9.99393 3.45898 10.3127L3.1969 12.6077C3.10482 13.4364 3.69982 14.0031 4.52148 13.8614L6.80232 13.4719C7.12107 13.4152 7.56732 13.1814 7.7869 12.9406L13.6023 6.78518C14.6081 5.72268 15.0615 4.51143 13.4961 3.03102C11.9377 1.56477 10.7548 2.08185 9.74898 3.14435Z",
1455
- stroke: "#64748B",
1456
- strokeWidth: "1.2",
1457
- strokeMiterlimit: "10",
1458
- strokeLinecap: "round",
1459
- strokeLinejoin: "round"
1460
- }), /*#__PURE__*/_jsx("path", {
1461
- d: "M8.77734 4.17188C9.08193 6.12688 10.6686 7.62146 12.6378 7.81979",
1462
- stroke: "#64748B",
1463
- strokeWidth: "1.2",
1464
- strokeMiterlimit: "10",
1465
- strokeLinecap: "round",
1466
- strokeLinejoin: "round"
1467
- })]
1468
- });
1469
- }
1470
- export function SaveTemplIcon() {
1471
- return /*#__PURE__*/_jsxs("svg", {
1472
- width: "18",
1473
- height: "18",
1474
- viewBox: "0 0 18 18",
1475
- fill: "none",
1476
- xmlns: "http://www.w3.org/2000/svg",
1477
- className: "commonSvgStyle",
1478
- children: [/*#__PURE__*/_jsx("path", {
1479
- d: "M9 1.5V6.75L10.5 5.25",
1480
- stroke: "#64748B",
1481
- strokeWidth: "1.2",
1482
- strokeLinecap: "round",
1483
- strokeLinejoin: "round"
1484
- }), /*#__PURE__*/_jsx("path", {
1485
- d: "M9 6.75L7.5 5.25",
1486
- stroke: "#64748B",
1487
- strokeWidth: "1.2",
1488
- strokeLinecap: "round",
1489
- strokeLinejoin: "round"
1490
- }), /*#__PURE__*/_jsx("path", {
1491
- d: "M1.48438 9.75H4.79187C5.07687 9.75 5.33188 9.9075 5.45938 10.1625L6.33687 11.9175C6.59187 12.4275 7.10938 12.75 7.67938 12.75H10.3269C10.8969 12.75 11.4144 12.4275 11.6694 11.9175L12.5469 10.1625C12.6744 9.9075 12.9369 9.75 13.2144 9.75H16.4844",
1492
- stroke: "#64748B",
1493
- strokeWidth: "1.2",
1494
- strokeLinecap: "round",
1495
- strokeLinejoin: "round"
1496
- }), /*#__PURE__*/_jsx("path", {
1497
- d: "M5.25 3.09766C2.595 3.48766 1.5 5.04766 1.5 8.25016V11.2502C1.5 15.0002 3 16.5002 6.75 16.5002H11.25C15 16.5002 16.5 15.0002 16.5 11.2502V8.25016C16.5 5.04766 15.405 3.48766 12.75 3.09766",
1498
- stroke: "#64748B",
1499
- strokeWidth: "1.2",
1500
- strokeLinecap: "round",
1501
- strokeLinejoin: "round"
1502
- })]
1503
- });
1504
- }
1505
- export function UploadIconCloud() {
1506
- return /*#__PURE__*/_jsxs("svg", {
1507
- width: "16",
1508
- height: "16",
1509
- viewBox: "0 0 16 16",
1510
- fill: "none",
1511
- xmlns: "http://www.w3.org/2000/svg",
1512
- className: "commonSvgStyle uploadIcon",
1513
- children: [/*#__PURE__*/_jsx("path", {
1514
- d: "M6.00065 14.6673H4.66732C2.00065 14.6673 1.33398 14.0007 1.33398 11.334V4.66732C1.33398 2.00065 2.00065 1.33398 4.66732 1.33398H5.66732C6.66732 1.33398 6.88733 1.62733 7.26733 2.13399L8.26733 3.46733C8.52067 3.80066 8.66732 4.00065 9.33398 4.00065H11.334C14.0007 4.00065 14.6673 4.66732 14.6673 7.33398V8.66732",
1515
- stroke: "#64748B",
1516
- strokeWidth: "1.2",
1517
- strokeMiterlimit: "10",
1518
- strokeLinecap: "round",
1519
- strokeLinejoin: "round"
1520
- }), /*#__PURE__*/_jsx("path", {
1521
- d: "M9.17305 12.2136C7.60638 12.3269 7.60638 14.5936 9.17305 14.7069H12.8797C13.3264 14.7069 13.7664 14.5402 14.093 14.2402C15.193 13.2802 14.6064 11.3602 13.1597 11.1802C12.6397 8.05358 8.11973 9.24024 9.18639 12.2202",
1522
- stroke: "#64748B",
1523
- strokeWidth: "1.2",
1524
- strokeMiterlimit: "10",
1525
- strokeLinecap: "round",
1526
- strokeLinejoin: "round"
1527
- })]
1528
- });
1529
1434
  }
@@ -1273,7 +1273,6 @@ export const GridSettingsIcon = props => /*#__PURE__*/_jsxs("svg", {
1273
1273
  height: "22",
1274
1274
  viewBox: "0 0 22 22",
1275
1275
  fill: "none",
1276
- className: "commonSvgStyle",
1277
1276
  children: [/*#__PURE__*/_jsx("path", {
1278
1277
  d: "M11 13.75C12.5188 13.75 13.75 12.5188 13.75 11C13.75 9.48122 12.5188 8.25 11 8.25C9.48122 8.25 8.25 9.48122 8.25 11C8.25 12.5188 9.48122 13.75 11 13.75Z",
1279
1278
  stroke: "#64748B",
@@ -1342,7 +1341,6 @@ export const GridAddSectionIcon = props => /*#__PURE__*/_jsxs("svg", {
1342
1341
  height: "20",
1343
1342
  viewBox: "0 0 20 20",
1344
1343
  fill: "none",
1345
- className: "addIconCircle",
1346
1344
  children: [/*#__PURE__*/_jsx("path", {
1347
1345
  d: "M10 19C14.9706 19 19 14.9706 19 10C19 5.02944 14.9706 1 10 1C5.02944 1 1 5.02944 1 10C1 14.9706 5.02944 19 10 19Z",
1348
1346
  stroke: "#64748B",
@@ -1788,7 +1786,6 @@ export const Text = props => /*#__PURE__*/_jsxs("svg", {
1788
1786
  viewBox: "0 0 15 14",
1789
1787
  fill: "none",
1790
1788
  xmlns: "http://www.w3.org/2000/svg",
1791
- className: "commonSvgStyle",
1792
1789
  children: [/*#__PURE__*/_jsx("path", {
1793
1790
  d: "M2.5 4.1825V3.12083C2.5 2.45 3.0425 1.91333 3.7075 1.91333H12.1775C12.8483 1.91333 13.385 2.45583 13.385 3.12083V4.1825",
1794
1791
  stroke: props?.stroke || "#000",
@@ -132,7 +132,7 @@ const useCommonStyle = theme => ({
132
132
  background: theme?.palette?.editor?.inputFieldBgColor,
133
133
  border: `1px solid ${theme?.palette?.editor?.inputFieldBorder}`,
134
134
  borderRadius: "10px",
135
- width: "52px !important",
135
+ width: "46px !important",
136
136
  marginLeft: "10px",
137
137
  height: '36px !important'
138
138
  },
@@ -596,75 +596,6 @@ const useCommonStyle = theme => ({
596
596
  stroke: `${theme?.palette?.editor?.closeButtonSvgStroke} !important`
597
597
  }
598
598
  }
599
- },
600
- formStyles: {
601
- "& input": {
602
- background: theme?.palette?.editor?.inputFieldBgColor,
603
- borderColor: theme?.palette?.editor?.inputFieldBorder,
604
- height: "44px",
605
- fontSize: "14px",
606
- color: theme?.palette?.editor?.textColor
607
- },
608
- "& .form-btn-wrpr": {
609
- "& button": {
610
- fontWeight: 500,
611
- height: "44px"
612
- }
613
- }
614
- },
615
- formMenuStyle: {
616
- "& .MuiPaper-root": {
617
- background: "transparent",
618
- boxShadow: "none"
619
- },
620
- "& .MuiList-root": {
621
- padding: "2px 0px 0px 16px"
622
- },
623
- "& .MuiButtonBase-root": {
624
- padding: "2px"
625
- },
626
- "& li": {
627
- marginLeft: "5px",
628
- "&:hover": {
629
- background: "transparent"
630
- },
631
- "& button": {
632
- height: "28px",
633
- width: "28px",
634
- borderRadius: "50%",
635
- background: theme?.palette?.editor?.signatureFontBtnBg,
636
- border: `1px solid ${theme?.palette?.editor?.buttonBorder1} !important`,
637
- boxShadow: "0px 0px 4px 0px #00000024",
638
- "&:hover": {
639
- background: theme?.palette?.editor?.signatureFontBtnBg
640
- },
641
- "& svg": {
642
- height: "20px",
643
- width: "20px"
644
- },
645
- "& .uploadIcon": {
646
- height: "17px",
647
- width: "17px"
648
- },
649
- "& .commonSvgStyle path": {
650
- stroke: theme?.palette?.editor?.closeButtonSvgStroke
651
- }
652
- }
653
- }
654
- },
655
- fieldBtnSettings: {
656
- "& .MuiButtonBase-root": {
657
- height: "28px",
658
- width: "28px",
659
- padding: "4px",
660
- "& svg": {
661
- width: "20px",
662
- height: "20px",
663
- "& path": {
664
- stroke: theme?.palette?.editor?.closeButtonSvgStroke
665
- }
666
- }
667
- }
668
599
  }
669
600
  });
670
601
  export default useCommonStyle;
@@ -36,6 +36,7 @@ export const EditorProvider = ({
36
36
  path: null
37
37
  });
38
38
  const [fontFamilies, setFontFamilies] = useState(defaultFontFamilies);
39
+ const [activeBreakPoint, setActiveBreakPoint] = useState("");
39
40
  useEffect(() => {
40
41
  window.updateSelectedItem = d => {
41
42
  setSelectedElement(d);
@@ -98,8 +99,10 @@ export const EditorProvider = ({
98
99
  setOpenAI,
99
100
  updateDragging,
100
101
  fontFamilies,
101
- setFontFamilies
102
- }), [path, editor?.selection, selectedPath, selectedElement, contextMenu, openAI, popupType, drop]);
102
+ setFontFamilies,
103
+ activeBreakPoint,
104
+ setActiveBreakPoint
105
+ }), [path, editor?.selection, selectedPath, selectedElement, contextMenu, openAI, popupType, drop, activeBreakPoint]);
103
106
  return /*#__PURE__*/_jsx(EditorContext.Provider, {
104
107
  value: otherValues,
105
108
  children: children
@@ -34,7 +34,7 @@ import SimpleText from "../Elements/SimpleText";
34
34
  import CheckList from "../Elements/List/CheckList";
35
35
  import { getTextColor, isEmptyTextNode } from "../helper";
36
36
  import Attachments from "../Elements/Attachments/Attachments";
37
- import { getBreakpointLineSpacing, getBreakPointsValue, getDevice, groupByBreakpoint } from "../helper/theme";
37
+ import { getBreakPointsValue, groupByBreakpoint } from "../helper/theme";
38
38
  import Variables from "../Elements/Variables/Variable";
39
39
  import insertNewLine from "./insertNewLine";
40
40
  import Divider from "../Elements/Divider/Divider";
@@ -181,9 +181,6 @@ export const activeMark = (editor, format) => {
181
181
  };
182
182
  export const getMarked = (leaf, children, theme) => {
183
183
  const className = leaf?.doublequote ? "doublequote" : "";
184
- const lineH = leaf?.lineHeight;
185
- const breakpoint = getDevice(window.innerWidth);
186
- const lineHeight = getBreakpointLineSpacing(lineH, breakpoint);
187
184
  if (leaf.highlight) {
188
185
  children = /*#__PURE__*/_jsx("span", {
189
186
  style: {
@@ -232,7 +229,7 @@ export const getMarked = (leaf, children, theme) => {
232
229
  });
233
230
  }
234
231
  // cover under single span
235
- if (leaf.color || leaf.bgColor || leaf.fontSize || leaf.fontFamily || leaf.fontWeight || lineHeight || className) {
232
+ if (leaf.color || leaf.bgColor || leaf.fontSize || leaf.fontFamily || leaf.fontWeight || className) {
236
233
  const family = leaf?.fontFamily;
237
234
  const textStyles = getTextColor(leaf?.color);
238
235
  children = /*#__PURE__*/_jsx("span", {
@@ -300,9 +297,6 @@ export const getBlock = props => {
300
297
  const {
301
298
  translation
302
299
  } = customProps;
303
- const breakpoint = getDevice(window.innerWidth);
304
- const lineH = element?.children[0]?.lineHeight;
305
- const selectedLineHeight = getBreakpointLineSpacing(lineH, breakpoint);
306
300
  switch (element.type) {
307
301
  case "headingOne":
308
302
  return /*#__PURE__*/_jsxs("h1", {
@@ -377,7 +371,7 @@ export const getBlock = props => {
377
371
  margin: `${element?.bgColor ? "16px" : "0px"} 0px`,
378
372
  width: element?.bgColor ? "calc(100% - 16px)" : "100%",
379
373
  borderWidth: element?.color ? "0px 0px 0px 3px" : "0px",
380
- lineHeight: `${selectedLineHeight} !important`
374
+ lineHeight: 1.43
381
375
  },
382
376
  children: children
383
377
  });
@@ -431,13 +425,15 @@ export const getBlock = props => {
431
425
  className: `content-editable ${isEmpty ? "empty" : ""}`,
432
426
  placeholder: translation("List"),
433
427
  style: {
434
- color: firstChildren?.color,
435
- lineHeight: `${selectedLineHeight}`
428
+ color: firstChildren?.color
436
429
  },
437
430
  children: children
438
431
  });
439
432
  case "orderedList":
440
433
  return /*#__PURE__*/_jsx("ol", {
434
+ style: {
435
+ lineHeight: 1.43
436
+ },
441
437
  className: "listItemMargin",
442
438
  type: "1",
443
439
  ...attributes,
@@ -445,6 +441,9 @@ export const getBlock = props => {
445
441
  });
446
442
  case "unorderedList":
447
443
  return /*#__PURE__*/_jsx("ul", {
444
+ style: {
445
+ lineHeight: 1.43
446
+ },
448
447
  className: "listItemMargin",
449
448
  ...attributes,
450
449
  children: children
@@ -452,7 +451,6 @@ export const getBlock = props => {
452
451
  case "check-list-item":
453
452
  return /*#__PURE__*/_jsx(CheckList, {
454
453
  ...props,
455
- selectedLineHeight: selectedLineHeight,
456
454
  isEmpty: isEmpty
457
455
  });
458
456
  case "link":
@@ -12,10 +12,10 @@ export const FORM_NODE = () => {
12
12
  },
13
13
  buttonProps: {
14
14
  bannerSpacing: {
15
- left: 24,
16
- right: 24,
17
- top: 4,
18
- bottom: 4
15
+ left: 12,
16
+ right: 12,
17
+ top: 12,
18
+ bottom: 12
19
19
  }
20
20
  },
21
21
  workflow: [],
@@ -22,14 +22,8 @@ export const formField = data => {
22
22
  },
23
23
  fontFamily: data?.fontFamily ? data?.fontFamily : "",
24
24
  textSize: data?.textSize ? data?.textSize : "",
25
- textColor: data?.textColor && `${data?.textColor} !important`,
26
- fontWeight: data?.fontWeight ? data?.fontWeight : "500",
27
- borderRadius: {
28
- topLeft: 8,
29
- topRight: 8,
30
- bottomLeft: 8,
31
- bottomRight: 8
32
- }
25
+ textColor: data?.textColor ? data?.textColor : "",
26
+ fontWeight: data?.fontWeight ? data?.fontWeight : "500"
33
27
  };
34
28
  };
35
29
  export const insertGridItem = editor => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flozy/editor",
3
- "version": "10.4.4",
3
+ "version": "10.4.5",
4
4
  "description": "An Editor for flozy app brain",
5
5
  "files": [
6
6
  "dist"