@flozy/editor 7.0.7 → 7.0.9

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 (52) hide show
  1. package/dist/Editor/CommonEditor.js +19 -19
  2. package/dist/Editor/Editor.css +5 -4
  3. package/dist/Editor/Elements/AI/PopoverAIInput.js +2 -12
  4. package/dist/Editor/Elements/Button/EditorButton.js +1 -0
  5. package/dist/Editor/Elements/DataView/DataView.js +4 -3
  6. package/dist/Editor/Elements/DataView/Layouts/DataTypes/NumberType.js +5 -1
  7. package/dist/Editor/Elements/DataView/Layouts/DataTypes/TextType.js +5 -1
  8. package/dist/Editor/Elements/DataView/Layouts/FilterView.js +23 -19
  9. package/dist/Editor/Elements/Form/Form.js +1 -0
  10. package/dist/Editor/Elements/FreeGrid/styles.js +1 -0
  11. package/dist/Editor/Elements/List/CheckList.js +2 -1
  12. package/dist/Editor/Elements/Search/SearchAttachment.js +1 -0
  13. package/dist/Editor/Elements/Search/SearchList.js +8 -1
  14. package/dist/Editor/Elements/SimpleText/index.js +19 -7
  15. package/dist/Editor/Elements/SimpleText/style.js +5 -1
  16. package/dist/Editor/Elements/Table/Table.js +15 -15
  17. package/dist/Editor/Elements/Table/TableCell.js +14 -9
  18. package/dist/Editor/MiniEditor.js +4 -2
  19. package/dist/Editor/Styles/EditorStyles.js +291 -287
  20. package/dist/Editor/Toolbar/PopupTool/AddTemplates.js +37 -28
  21. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectAlignment.js +3 -1
  22. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectFontSize.js +1 -1
  23. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectList.js +3 -1
  24. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +3 -8
  25. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +9 -3
  26. package/dist/Editor/Toolbar/PopupTool/TemplateCard.js +1 -1
  27. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +45 -0
  28. package/dist/Editor/Toolbar/PopupTool/index.js +39 -29
  29. package/dist/Editor/common/FontLoader/FontList.js +11 -11
  30. package/dist/Editor/common/FontLoader/FontLoader.js +45 -75
  31. package/dist/Editor/common/ImageSelector/Options/Upload.js +1 -1
  32. package/dist/Editor/common/ImageSelector/UploadStyles.js +2 -1
  33. package/dist/Editor/common/MentionsPopup/index.js +0 -1
  34. package/dist/Editor/common/RnD/ElementSettings/styles.js +1 -0
  35. package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +6 -0
  36. package/dist/Editor/common/Section/index.js +89 -60
  37. package/dist/Editor/common/StyleBuilder/fieldTypes/index.js +3 -1
  38. package/dist/Editor/common/StyleBuilder/fieldTypes/lineSpacing.js +79 -0
  39. package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +4 -0
  40. package/dist/Editor/commonStyle.js +5 -0
  41. package/dist/Editor/helper/deserialize/index.js +1 -1
  42. package/dist/Editor/helper/ensureWrappedVariables.js +28 -0
  43. package/dist/Editor/helper/theme.js +24 -1
  44. package/dist/Editor/hooks/useEditorScroll.js +1 -1
  45. package/dist/Editor/hooks/useMouseMove.js +6 -4
  46. package/dist/Editor/plugins/withHTML.js +7 -1
  47. package/dist/Editor/utils/SlateUtilityFunctions.js +23 -12
  48. package/dist/Editor/utils/customHooks/useTableResize.js +2 -1
  49. package/dist/Editor/utils/helper.js +41 -0
  50. package/dist/Editor/utils/pageSettings.js +14 -2
  51. package/dist/Editor/utils/table.js +21 -0
  52. package/package.json +2 -2
@@ -9,7 +9,13 @@ export const findPageSettings = editor => {
9
9
  path: null,
10
10
  element: {
11
11
  pageProps: {
12
- pageWidth: "fixed"
12
+ pageWidth: "fixed",
13
+ "lineHeight": {
14
+ "xs": 1.43,
15
+ "sm": 1.43,
16
+ "md": 1.43,
17
+ "lg": 1.43
18
+ }
13
19
  }
14
20
  }
15
21
  };
@@ -34,7 +40,13 @@ export const getPageSettings = editor => {
34
40
  path: null,
35
41
  element: {
36
42
  pageProps: {
37
- pageWidth: "fixed"
43
+ pageWidth: "fixed",
44
+ "lineHeight": {
45
+ "xs": 1.43,
46
+ "sm": 1.43,
47
+ "md": 1.43,
48
+ "lg": 1.43
49
+ }
38
50
  }
39
51
  }
40
52
  };
@@ -753,4 +753,25 @@ export const clearCellText = (editor, currentCellPath) => {
753
753
  } catch (err) {
754
754
  console.log(err);
755
755
  }
756
+ };
757
+ export const getTableColumns = element => {
758
+ const {
759
+ columns,
760
+ children
761
+ } = element || {};
762
+ if (columns) {
763
+ return columns;
764
+ }
765
+ const firstRow = children?.length ? children[0] : {};
766
+ return firstRow?.children?.length || 0;
767
+ };
768
+ export const getTableRows = element => {
769
+ const {
770
+ rows,
771
+ children
772
+ } = element || {};
773
+ if (rows) {
774
+ return rows;
775
+ }
776
+ return children?.length || 0;
756
777
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flozy/editor",
3
- "version": "7.0.7",
3
+ "version": "7.0.9",
4
4
  "description": "An Editor for flozy app brain",
5
5
  "files": [
6
6
  "dist"
@@ -69,7 +69,7 @@
69
69
  "storybook": "storybook dev -p 6006",
70
70
  "build-storybook": "NODE_OPTIONS='--max_old_space_size=4096' storybook build",
71
71
  "publish:npm": "rm -rf dist && mkdir dist && babel src/components -d dist --copy-files",
72
- "publish:local": "rm -rf /Users/agmac03/flozy/client/node_modules/@flozy/editor/dist && babel src/components -d /Users/agmac03/flozy/client/node_modules/@flozy/editor/dist --copy-files"
72
+ "publish:local": "rm -rf /Users/agmac30/Documents/CODE_BASE/flozy/client/node_modules/@flozy/editor/dist && babel src/components -d /Users/agmac30/Documents/CODE_BASE/flozy/client/node_modules/@flozy/editor/dist --copy-files"
73
73
  },
74
74
  "eslintConfig": {
75
75
  "extends": [