@flozy/editor 3.1.8 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (26) hide show
  1. package/dist/Editor/CommonEditor.js +13 -26
  2. package/dist/Editor/Editor.css +5 -0
  3. package/dist/Editor/Elements/AppHeader/AppHeader.js +33 -29
  4. package/dist/Editor/Elements/Button/EditorButton.js +32 -86
  5. package/dist/Editor/Elements/Color Picker/Styles.js +4 -1
  6. package/dist/Editor/Elements/Embed/Image.js +56 -22
  7. package/dist/Editor/Elements/Form/Form.js +1 -1
  8. package/dist/Editor/Styles/EditorStyles.js +6 -2
  9. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectFontSize.js +1 -1
  10. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +1 -1
  11. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +43 -13
  12. package/dist/Editor/{Elements/Button/ButtonNavSettings → common/LinkSettings}/index.js +10 -36
  13. package/dist/Editor/common/StyleBuilder/embedImageStyle.js +24 -24
  14. package/dist/Editor/common/StyleBuilder/fieldTypes/index.js +0 -2
  15. package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +46 -3
  16. package/dist/Editor/helper/deserialize/index.js +32 -11
  17. package/dist/Editor/helper/index.js +34 -2
  18. package/dist/Editor/plugins/withTable.js +1 -1
  19. package/dist/Editor/utils/events.js +3 -1
  20. package/dist/Editor/utils/helper.js +88 -3
  21. package/dist/Editor/utils/insertAppHeader.js +14 -10
  22. package/package.json +1 -1
  23. package/dist/Editor/common/StyleBuilder/fieldTypes/borderWidth.js +0 -75
  24. /package/dist/Editor/{Elements/Button/ButtonNavSettings → common/LinkSettings}/NavComponents.js +0 -0
  25. /package/dist/Editor/{Elements/Button/ButtonNavSettings → common/LinkSettings}/navOptions.js +0 -0
  26. /package/dist/Editor/{Elements/Button/ButtonNavSettings → common/LinkSettings}/style.js +0 -0
@@ -13,24 +13,28 @@ export const createAppHeaderNode = ({
13
13
  appLogo: "none",
14
14
  menus: menus || [{
15
15
  type: "menu",
16
- url: "/",
17
- target: "_blank",
18
- text: "Home"
16
+ url: "home",
17
+ target: "",
18
+ text: "Home",
19
+ linkType: "page"
19
20
  }, {
20
21
  type: "menu",
21
- url: "/wireframe2",
22
- target: "_blank",
23
- text: "Wireframe"
22
+ url: "wireframe2",
23
+ target: "",
24
+ text: "Wireframe",
25
+ linkType: "page"
24
26
  }, {
25
27
  type: "menu",
26
28
  url: "https://www.google.com",
27
- target: "_blank",
28
- text: "Work"
29
+ target: "",
30
+ text: "Work",
31
+ linkType: "webAddress"
29
32
  }, {
30
33
  type: "menu",
31
34
  url: "https://www.google.com",
32
- target: "_blank",
33
- text: "Contact"
35
+ target: "",
36
+ text: "Contact",
37
+ linkType: "webAddress"
34
38
  }],
35
39
  menuStyle: "stacked",
36
40
  children: [{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flozy/editor",
3
- "version": "3.1.8",
3
+ "version": "3.2.0",
4
4
  "description": "An Editor for flozy app brain",
5
5
  "files": [
6
6
  "dist"
@@ -1,75 +0,0 @@
1
- import React from "react";
2
- import { Grid, IconButton, InputAdornment, TextField, Typography } from "@mui/material";
3
- import { jsx as _jsx } from "react/jsx-runtime";
4
- import { jsxs as _jsxs } from "react/jsx-runtime";
5
- const borderWidth = props => {
6
- const {
7
- value,
8
- data,
9
- onChange
10
- } = props;
11
- const {
12
- key
13
- } = data;
14
- const widthType = "px";
15
- const wkey = "borderWidth";
16
- const handleChange = e => {
17
- onChange({
18
- [key]: {
19
- ...(value || {}),
20
- [e.target.name]: isNaN(e.target.value) ? "" : parseInt(e.target.value)
21
- }
22
- });
23
- };
24
- const onSizeType = cData => () => {
25
- onChange({
26
- [key]: {
27
- ...(value || {}),
28
- ...cData
29
- }
30
- });
31
- };
32
- return /*#__PURE__*/_jsxs(Grid, {
33
- item: true,
34
- xs: 12,
35
- style: {
36
- marginBottom: "12px"
37
- },
38
- children: [/*#__PURE__*/_jsx(Typography, {
39
- variant: "body1",
40
- color: "primary",
41
- sx: {
42
- fontSize: "14px",
43
- fontWeight: "500",
44
- marginBottom: "5px"
45
- },
46
- children: "Border Width"
47
- }), /*#__PURE__*/_jsx(TextField, {
48
- fullWidth: true,
49
- name: wkey,
50
- size: "small",
51
- value: value ? value[wkey] : "1",
52
- placeholder: "Border Width",
53
- onChange: handleChange,
54
- InputProps: {
55
- endAdornment: /*#__PURE__*/_jsx(InputAdornment, {
56
- position: "end",
57
- children: /*#__PURE__*/_jsx(IconButton, {
58
- className: widthType === "px" ? "active" : "",
59
- size: "small",
60
- onClick: onSizeType({
61
- widthType: "px",
62
- widthInPercent: null,
63
- width: isNaN(value?.borderWidth) ? 1 : value?.borderWidth || 1
64
- }),
65
- children: /*#__PURE__*/_jsx(Typography, {
66
- variant: "body2",
67
- children: "PX"
68
- })
69
- })
70
- })
71
- }
72
- })]
73
- });
74
- };
75
- export default borderWidth;