@flozy/editor 2.0.3 → 2.0.4
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Editor/Elements/Embed/Frames/InstaFrameDark.js +95 -0
- package/dist/Editor/Elements/Embed/Frames/RoundedLightB2.js +36 -0
- package/dist/Editor/Elements/Embed/Frames/index.js +5 -1
- package/dist/Editor/Elements/Form/Workflow/FormWorkflow.js +3 -12
- package/dist/Editor/common/StyleBuilder/embedImageStyle.js +8 -2
- package/dist/Editor/utils/helper.js +0 -1
- package/package.json +1 -1
@@ -0,0 +1,95 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
3
|
+
const InstaFrame = ({
|
4
|
+
href,
|
5
|
+
id
|
6
|
+
}) => {
|
7
|
+
return /*#__PURE__*/_jsxs("svg", {
|
8
|
+
xmlns: "http://www.w3.org/2000/svg",
|
9
|
+
width: "366",
|
10
|
+
height: "489",
|
11
|
+
viewBox: "0 0 366 489",
|
12
|
+
fill: "none",
|
13
|
+
children: [/*#__PURE__*/_jsx("rect", {
|
14
|
+
x: "2.5",
|
15
|
+
y: "2.5",
|
16
|
+
width: "361",
|
17
|
+
height: "484",
|
18
|
+
rx: "17.5",
|
19
|
+
fill: "#12141d",
|
20
|
+
stroke: "#D5D5D5",
|
21
|
+
strokeWidth: "5"
|
22
|
+
}), /*#__PURE__*/_jsx("rect", {
|
23
|
+
x: "27.5",
|
24
|
+
y: "28.5",
|
25
|
+
width: "35",
|
26
|
+
height: "35",
|
27
|
+
rx: "17.5",
|
28
|
+
fill: "#D5D5D5",
|
29
|
+
stroke: "#D5D5D5",
|
30
|
+
strokeWidth: "5"
|
31
|
+
}), /*#__PURE__*/_jsx("rect", {
|
32
|
+
x: "80.5",
|
33
|
+
y: "40.5",
|
34
|
+
width: "121",
|
35
|
+
height: "11",
|
36
|
+
rx: "5.5",
|
37
|
+
fill: "#D5D5D5",
|
38
|
+
stroke: "#D5D5D5",
|
39
|
+
strokeWidth: "5"
|
40
|
+
}), /*#__PURE__*/_jsx("path", {
|
41
|
+
d: "M328.287 453.992L318.575 447.922L308.863 453.992L308.863 427.284C308.863 426.962 308.991 426.654 309.219 426.426C309.447 426.198 309.755 426.07 310.077 426.07L327.073 426.07C327.395 426.07 327.704 426.198 327.932 426.426C328.159 426.654 328.287 426.962 328.287 427.284L328.287 453.992Z",
|
42
|
+
stroke: "#D5D5D5",
|
43
|
+
strokeWidth: "4",
|
44
|
+
strokeLinecap: "round",
|
45
|
+
strokeLinejoin: "round"
|
46
|
+
}), /*#__PURE__*/_jsx("path", {
|
47
|
+
d: "M48.4231 452.778C48.4231 452.778 33.248 444.28 33.248 433.961C33.248 432.137 33.8801 430.369 35.0366 428.959C36.1931 427.548 37.8027 426.581 39.5915 426.224C41.3803 425.866 43.2378 426.139 44.8479 426.996C46.4581 427.854 47.7215 429.242 48.4231 430.926V430.926C49.1247 429.242 50.3881 427.854 51.9982 426.996C53.6084 426.139 55.4659 425.866 57.2547 426.224C59.0435 426.581 60.653 427.548 61.8096 428.959C62.9661 430.369 63.5981 432.137 63.5981 433.961C63.5981 444.28 48.4231 452.778 48.4231 452.778Z",
|
48
|
+
stroke: "#D5D5D5",
|
49
|
+
strokeWidth: "4",
|
50
|
+
strokeLinecap: "round",
|
51
|
+
strokeLinejoin: "round"
|
52
|
+
}), /*#__PURE__*/_jsx("path", {
|
53
|
+
d: "M90.8913 446.86C89.0838 443.81 88.4515 440.206 89.1132 436.723C89.775 433.24 91.6851 430.119 94.4852 427.945C97.2852 425.771 100.783 424.693 104.321 424.915C107.859 425.137 111.194 426.642 113.701 429.149C116.207 431.656 117.713 434.991 117.935 438.529C118.156 442.067 117.079 445.565 114.905 448.365C112.731 451.165 109.609 453.075 106.127 453.737C102.644 454.398 99.0397 453.766 95.9901 451.959V451.959L90.952 453.385C90.7456 453.445 90.5267 453.449 90.3184 453.396C90.11 453.343 89.9198 453.234 89.7678 453.082C89.6157 452.93 89.5073 452.74 89.454 452.532C89.4007 452.323 89.4045 452.104 89.4648 451.898L90.8913 446.86Z",
|
54
|
+
stroke: "#D5D5D5",
|
55
|
+
strokeWidth: "4",
|
56
|
+
strokeLinecap: "round",
|
57
|
+
strokeLinejoin: "round"
|
58
|
+
}), /*#__PURE__*/_jsx("path", {
|
59
|
+
d: "M170.92 425.447L142.634 433.414C142.393 433.479 142.179 433.618 142.019 433.81C141.86 434.002 141.764 434.239 141.744 434.488C141.724 434.737 141.781 434.985 141.908 435.201C142.035 435.416 142.225 435.587 142.452 435.69L155.442 441.836C155.696 441.954 155.901 442.158 156.018 442.412L162.164 455.402C162.268 455.629 162.438 455.819 162.654 455.946C162.869 456.073 163.118 456.13 163.366 456.11C163.615 456.09 163.852 455.994 164.044 455.835C164.236 455.675 164.375 455.461 164.441 455.22L172.408 426.934C172.468 426.727 172.472 426.509 172.418 426.3C172.365 426.092 172.257 425.902 172.105 425.75C171.953 425.597 171.762 425.489 171.554 425.436C171.346 425.383 171.127 425.386 170.92 425.447V425.447Z",
|
60
|
+
stroke: "#D5D5D5",
|
61
|
+
strokeWidth: "4",
|
62
|
+
strokeLinecap: "round",
|
63
|
+
strokeLinejoin: "round"
|
64
|
+
}), /*#__PURE__*/_jsx("path", {
|
65
|
+
d: "M155.836 442.019L162.695 435.16",
|
66
|
+
stroke: "#D5D5D5",
|
67
|
+
strokeWidth: "4",
|
68
|
+
strokeLinecap: "round",
|
69
|
+
strokeLinejoin: "round"
|
70
|
+
}), /*#__PURE__*/_jsx("rect", {
|
71
|
+
x: "27.5",
|
72
|
+
y: "86.5",
|
73
|
+
width: "311",
|
74
|
+
height: "311",
|
75
|
+
rx: "17.5",
|
76
|
+
stroke: "#D5D5D5",
|
77
|
+
strokeWidth: "5",
|
78
|
+
fill: `url(#imageSource_${id})`
|
79
|
+
}), /*#__PURE__*/_jsx("defs", {
|
80
|
+
children: /*#__PURE__*/_jsx("pattern", {
|
81
|
+
id: `imageSource_${id}`,
|
82
|
+
patternUnits: "userSpaceOnUse",
|
83
|
+
width: "338.5",
|
84
|
+
height: "397.5",
|
85
|
+
children: /*#__PURE__*/_jsx("image", {
|
86
|
+
x: "0",
|
87
|
+
y: "0",
|
88
|
+
height: "100%",
|
89
|
+
href: href
|
90
|
+
})
|
91
|
+
})
|
92
|
+
})]
|
93
|
+
});
|
94
|
+
};
|
95
|
+
export default InstaFrame;
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
3
|
+
const RoundedLightB2 = ({
|
4
|
+
href,
|
5
|
+
id
|
6
|
+
}) => {
|
7
|
+
return /*#__PURE__*/_jsxs("svg", {
|
8
|
+
xmlns: "http://www.w3.org/2000/svg",
|
9
|
+
width: "62",
|
10
|
+
height: "62",
|
11
|
+
viewBox: "0 0 62 62",
|
12
|
+
fill: "none",
|
13
|
+
children: [/*#__PURE__*/_jsx("circle", {
|
14
|
+
cx: "31",
|
15
|
+
cy: "31",
|
16
|
+
r: "28.5",
|
17
|
+
stroke: "#E0E0E0",
|
18
|
+
strokeWidth: "5",
|
19
|
+
fill: `url(#imageSource_${id})`
|
20
|
+
}), /*#__PURE__*/_jsx("defs", {
|
21
|
+
children: /*#__PURE__*/_jsx("pattern", {
|
22
|
+
id: `imageSource_${id}`,
|
23
|
+
patternUnits: "userSpaceOnUse",
|
24
|
+
width: "124",
|
25
|
+
height: "124",
|
26
|
+
children: /*#__PURE__*/_jsx("image", {
|
27
|
+
x: "0",
|
28
|
+
y: "0",
|
29
|
+
height: "100%",
|
30
|
+
href: href
|
31
|
+
})
|
32
|
+
})
|
33
|
+
})]
|
34
|
+
});
|
35
|
+
};
|
36
|
+
export default RoundedLightB2;
|
@@ -1,11 +1,15 @@
|
|
1
1
|
import InstaFrame from "./InstaFrame";
|
2
|
+
import InstaFrameDark from "./InstaFrameDark";
|
2
3
|
import DarkFrame from "./DarkFrame";
|
3
4
|
import RoundedDark from "./RoundedDark";
|
4
5
|
import RoundedLight from "./RoundedLight";
|
6
|
+
import RoundedLightB2 from "./RoundedLightB2";
|
5
7
|
const frames = {
|
6
8
|
InstaFrame: InstaFrame,
|
9
|
+
InstaFrameDark: InstaFrameDark,
|
7
10
|
DarkFrame: DarkFrame,
|
8
11
|
RoundedDark: RoundedDark,
|
9
|
-
RoundedLight: RoundedLight
|
12
|
+
RoundedLight: RoundedLight,
|
13
|
+
RoundedLightB2: RoundedLightB2
|
10
14
|
};
|
11
15
|
export default frames;
|
@@ -67,11 +67,11 @@ const FormWorkflow = props => {
|
|
67
67
|
children: [/*#__PURE__*/_jsx(Grid, {
|
68
68
|
item: true,
|
69
69
|
sx: classes.radioBtn,
|
70
|
-
children: /*#__PURE__*/
|
70
|
+
children: /*#__PURE__*/_jsx(RadioGroup, {
|
71
71
|
name: "set timing",
|
72
72
|
value: schedule,
|
73
73
|
defaultValue: 1,
|
74
|
-
children:
|
74
|
+
children: /*#__PURE__*/_jsx(FormControlLabel, {
|
75
75
|
value: "immediately",
|
76
76
|
label: "Immediately",
|
77
77
|
onChange: () => {
|
@@ -80,16 +80,7 @@ const FormWorkflow = props => {
|
|
80
80
|
control: /*#__PURE__*/_jsx(Radio, {
|
81
81
|
size: "small"
|
82
82
|
})
|
83
|
-
})
|
84
|
-
value: "after",
|
85
|
-
label: "After",
|
86
|
-
onChange: () => {
|
87
|
-
setSchedule("after");
|
88
|
-
},
|
89
|
-
control: /*#__PURE__*/_jsx(Radio, {
|
90
|
-
size: "small"
|
91
|
-
})
|
92
|
-
})]
|
83
|
+
})
|
93
84
|
})
|
94
85
|
}), schedule === "after" && /*#__PURE__*/_jsx(Grid, {
|
95
86
|
item: true,
|
@@ -19,16 +19,22 @@ const embedImageStyle = [{
|
|
19
19
|
label: "No Frame"
|
20
20
|
}, {
|
21
21
|
value: "InstaFrame",
|
22
|
-
label: "Instagram Frame
|
22
|
+
label: "Instagram Light Frame"
|
23
|
+
}, {
|
24
|
+
value: "InstaFrameDark",
|
25
|
+
label: "Instagram Dark Frame"
|
23
26
|
}, {
|
24
27
|
value: "DarkFrame",
|
25
|
-
label: "Dark Frame
|
28
|
+
label: "Dark Frame"
|
26
29
|
}, {
|
27
30
|
value: "RoundedDark",
|
28
31
|
label: "Rounded Dark Frame"
|
29
32
|
}, {
|
30
33
|
value: "RoundedLight",
|
31
34
|
label: "Rounded Light Frame"
|
35
|
+
}, {
|
36
|
+
value: "RoundedLightB2",
|
37
|
+
label: "Rounded Light B2 Frame"
|
32
38
|
}]
|
33
39
|
}]
|
34
40
|
}, {
|
@@ -85,7 +85,6 @@ export const isEmptyNode = (editor, children, path) => {
|
|
85
85
|
try {
|
86
86
|
const isEmptyText = Node.string(Node.get(editor, path))?.length === 0;
|
87
87
|
const emptyNode = children?.length === 1 && children[0]?.children[0]?.type === undefined && children[0]?.type === "paragraph";
|
88
|
-
console.log(children[0]?.type, isEmptyText, emptyNode, children);
|
89
88
|
return isEmptyText && emptyNode;
|
90
89
|
} catch (err) {
|
91
90
|
console.log(err);
|