@flozy/editor 1.4.0 → 1.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (38) hide show
  1. package/dist/Editor/CommonEditor.js +9 -6
  2. package/dist/Editor/Editor.css +1 -1
  3. package/dist/Editor/Elements/AppHeader/AppHeader.js +21 -7
  4. package/dist/Editor/Elements/Button/EditorButton.js +43 -10
  5. package/dist/Editor/Elements/ChipText/ChipText.js +7 -2
  6. package/dist/Editor/Elements/Form/Form.js +2 -2
  7. package/dist/Editor/Elements/Form/FormElements/FormText.js +9 -7
  8. package/dist/Editor/Elements/Form/FormElements/FormTextArea.js +51 -0
  9. package/dist/Editor/Elements/Form/FormElements/index.js +3 -1
  10. package/dist/Editor/Elements/Form/FormField.js +2 -3
  11. package/dist/Editor/Elements/Grid/Grid.js +1 -1
  12. package/dist/Editor/Elements/Grid/GridItem.js +47 -13
  13. package/dist/Editor/Elements/Grid/templates/default_grid.js +144 -0
  14. package/dist/Editor/Elements/PageSettings/PageSettingsButton.js +5 -1
  15. package/dist/Editor/Toolbar/FormatTools/Autocomplete.js +33 -0
  16. package/dist/Editor/Toolbar/FormatTools/Text.js +29 -0
  17. package/dist/Editor/Toolbar/FormatTools/index.js +3 -1
  18. package/dist/Editor/Toolbar/PopupTool/index.js +0 -3
  19. package/dist/Editor/Toolbar/Toolbar.js +16 -9
  20. package/dist/Editor/common/StyleBuilder/appHeaderStyle.js +35 -0
  21. package/dist/Editor/common/StyleBuilder/buttonStyle.js +36 -0
  22. package/dist/Editor/common/StyleBuilder/fieldStyle.js +10 -2
  23. package/dist/Editor/common/StyleBuilder/fieldTypes/alignment.js +1 -1
  24. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +11 -4
  25. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +11 -4
  26. package/dist/Editor/common/StyleBuilder/fieldTypes/icons.js +107 -0
  27. package/dist/Editor/common/StyleBuilder/fieldTypes/index.js +3 -1
  28. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +10 -3
  29. package/dist/Editor/common/StyleBuilder/formButtonStyle.js +8 -0
  30. package/dist/Editor/common/StyleBuilder/gridItemStyle.js +62 -4
  31. package/dist/Editor/common/StyleBuilder/gridStyle.js +33 -5
  32. package/dist/Editor/common/StyleBuilder/index.js +2 -2
  33. package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +2 -2
  34. package/dist/Editor/utils/SlateUtilityFunctions.js +1 -1
  35. package/dist/Editor/utils/form.js +8 -0
  36. package/dist/Editor/utils/formfield.js +7 -1
  37. package/dist/Editor/utils/grid.js +2 -8
  38. package/package.json +1 -1
@@ -30,7 +30,7 @@ const StyleContent = props => {
30
30
  style: {
31
31
  marginTop: "12px"
32
32
  },
33
- children: [...fields].map(m => {
33
+ children: [...fields].map((m, i) => {
34
34
  const FieldComponent = FieldMap[m.type];
35
35
  return FieldComponent ? /*#__PURE__*/_jsx(FieldComponent, {
36
36
  data: m,
@@ -39,7 +39,7 @@ const StyleContent = props => {
39
39
  elementProps: element,
40
40
  customProps: customProps,
41
41
  handleClose: handleClose
42
- }, `ei_stt_tab_${value}_${m.key}`) : null;
42
+ }, `ei_stt_tab_${value}_${m.key}_${i}`) : null;
43
43
  })
44
44
  })
45
45
  }, value);
@@ -7,11 +7,11 @@ const pageSettingsStyle = [{
7
7
  type: "color"
8
8
  }, {
9
9
  label: "Background URL",
10
- key: "pageColor",
10
+ key: "pageBgImage",
11
11
  type: "text"
12
12
  }, {
13
13
  label: "Background Image",
14
- key: "pageColor",
14
+ key: "pageBgImage",
15
15
  type: "backgroundImage"
16
16
  }, {
17
17
  label: "Background",
@@ -166,7 +166,7 @@ export const getMarked = (leaf, children) => {
166
166
  });
167
167
  }
168
168
  if (leaf.fontSize) {
169
- const size = sizeMap[leaf.fontSize];
169
+ const size = sizeMap[leaf.fontSize] || leaf.fontSize;
170
170
  children = /*#__PURE__*/_jsx("span", {
171
171
  style: {
172
172
  fontSize: size
@@ -8,6 +8,14 @@ export const insertForm = (editor, item) => {
8
8
  props: {
9
9
  onSubmit: null
10
10
  },
11
+ buttonProps: {
12
+ bannerSpacing: {
13
+ left: 12,
14
+ right: 12,
15
+ top: 12,
16
+ bottom: 12
17
+ }
18
+ },
11
19
  children: [{
12
20
  ...formField()
13
21
  }, {
@@ -9,7 +9,13 @@ export const formField = () => {
9
9
  children: [{
10
10
  text: ""
11
11
  }],
12
- bgColor: "rgba(255, 255, 255, 0)"
12
+ bgColor: "rgba(255, 255, 255, 0)",
13
+ bannerSpacing: {
14
+ left: 16,
15
+ right: 16,
16
+ top: 16,
17
+ bottom: 16
18
+ }
13
19
  };
14
20
  };
15
21
  export const insertGridItem = editor => {
@@ -1,13 +1,7 @@
1
1
  import { Transforms } from "slate";
2
- import { gridItem } from "./gridItem";
2
+ import default_grid from "../Elements/Grid/templates/default_grid";
3
3
  export const insertGrid = (editor, item) => {
4
- const grid = !item ? {
5
- type: "grid",
6
- grid: "container",
7
- children: [{
8
- ...gridItem()
9
- }]
10
- } : item;
4
+ const grid = !item ? JSON.parse(default_grid) : item;
11
5
  const {
12
6
  selection
13
7
  } = editor;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flozy/editor",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
4
4
  "description": "An Editor for flozy app brain",
5
5
  "files": [
6
6
  "dist"