@flozy/editor 7.0.5 → 7.0.7
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.
- package/dist/Editor/CommonEditor.js +2 -5
- package/dist/Editor/Editor.css +1 -1
- package/dist/Editor/Elements/AI/PopoverAIInput.js +12 -2
- package/dist/Editor/Elements/Button/EditorButton.js +0 -1
- package/dist/Editor/Elements/DataView/DataView.js +3 -4
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/NumberType.js +1 -5
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/TextType.js +1 -5
- package/dist/Editor/Elements/DataView/Layouts/FilterView.js +19 -23
- package/dist/Editor/Elements/Form/Form.js +0 -1
- package/dist/Editor/Elements/FreeGrid/styles.js +0 -1
- package/dist/Editor/Elements/List/CheckList.js +1 -2
- package/dist/Editor/Elements/Search/SearchAttachment.js +0 -1
- package/dist/Editor/Elements/Search/SearchList.js +1 -8
- package/dist/Editor/Elements/SimpleText/index.js +1 -8
- package/dist/Editor/Elements/SimpleText/style.js +1 -5
- package/dist/Editor/Elements/Table/Table.js +15 -15
- package/dist/Editor/Elements/Table/TableCell.js +9 -14
- package/dist/Editor/MiniEditor.js +2 -4
- package/dist/Editor/Toolbar/PopupTool/AddTemplates.js +28 -37
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectAlignment.js +1 -3
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectFontSize.js +1 -1
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectList.js +1 -3
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +8 -3
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +3 -9
- package/dist/Editor/Toolbar/PopupTool/TemplateCard.js +1 -1
- package/dist/Editor/Toolbar/PopupTool/TextFormat.js +0 -45
- package/dist/Editor/Toolbar/PopupTool/index.js +0 -2
- package/dist/Editor/common/ImageSelector/Options/Upload.js +1 -1
- package/dist/Editor/common/ImageSelector/UploadStyles.js +1 -2
- package/dist/Editor/common/MentionsPopup/index.js +1 -0
- package/dist/Editor/common/RnD/ElementSettings/styles.js +0 -1
- package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +0 -6
- package/dist/Editor/common/Section/index.js +2 -2
- package/dist/Editor/common/StyleBuilder/fieldTypes/index.js +1 -3
- package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +0 -4
- package/dist/Editor/commonStyle.js +0 -5
- package/dist/Editor/helper/theme.js +1 -24
- package/dist/Editor/hooks/useMouseMove.js +2 -5
- package/dist/Editor/plugins/withHTML.js +1 -7
- package/dist/Editor/utils/SlateUtilityFunctions.js +7 -23
- package/dist/Editor/utils/customHooks/useTableResize.js +1 -2
- package/dist/Editor/utils/helper.js +0 -41
- package/dist/Editor/utils/pageSettings.js +2 -14
- package/dist/Editor/utils/table.js +0 -21
- package/package.json +1 -1
- package/dist/Editor/common/StyleBuilder/fieldTypes/lineSpacing.js +0 -79
- package/dist/Editor/helper/ensureWrappedVariables.js +0 -28
@@ -1,79 +0,0 @@
|
|
1
|
-
import React, { useState } from "react";
|
2
|
-
import { Grid, Slider, Typography, Box } from "@mui/material";
|
3
|
-
import { getBreakPointsValue } from "../../../helper/theme";
|
4
|
-
import useWindowResize from "../../../hooks/useWindowResize";
|
5
|
-
import { useEditorContext } from "../../../hooks/useMouseMove";
|
6
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
7
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
8
|
-
const LineSpacing = props => {
|
9
|
-
const {
|
10
|
-
value: val,
|
11
|
-
data,
|
12
|
-
onChange
|
13
|
-
} = props;
|
14
|
-
const {
|
15
|
-
theme
|
16
|
-
} = useEditorContext();
|
17
|
-
const {
|
18
|
-
key
|
19
|
-
} = data;
|
20
|
-
const [size] = useWindowResize();
|
21
|
-
const pro_value = getBreakPointsValue(val, size?.device);
|
22
|
-
const [value, setValue] = useState(pro_value);
|
23
|
-
let breakpointValue = getBreakPointsValue(val, null);
|
24
|
-
breakpointValue = typeof breakpointValue['lg'] === 'object' ? breakpointValue['lg'] : breakpointValue;
|
25
|
-
useState(() => {
|
26
|
-
setValue(pro_value);
|
27
|
-
}, [pro_value]);
|
28
|
-
const handleChange = e => {
|
29
|
-
onChange({
|
30
|
-
[key]: {
|
31
|
-
...breakpointValue,
|
32
|
-
[size?.device]: e.target.value
|
33
|
-
}
|
34
|
-
});
|
35
|
-
};
|
36
|
-
return /*#__PURE__*/_jsxs(Grid, {
|
37
|
-
item: true,
|
38
|
-
xs: 12,
|
39
|
-
children: [/*#__PURE__*/_jsx(Typography, {
|
40
|
-
variant: "body1",
|
41
|
-
color: "primary",
|
42
|
-
style: {
|
43
|
-
fontSize: "14px",
|
44
|
-
fontWeight: 500
|
45
|
-
},
|
46
|
-
children: data?.label
|
47
|
-
}), /*#__PURE__*/_jsxs(Grid, {
|
48
|
-
container: true,
|
49
|
-
wrap: "nowrap",
|
50
|
-
className: "sld-wrpr",
|
51
|
-
children: [/*#__PURE__*/_jsx(Slider, {
|
52
|
-
className: "spacingSlider",
|
53
|
-
defaultValue: value || 1.43,
|
54
|
-
"aria-label": "Default",
|
55
|
-
valueLabelDisplay: "auto",
|
56
|
-
min: 0.5,
|
57
|
-
max: 3.0,
|
58
|
-
step: 0.1,
|
59
|
-
name: "lineHeight",
|
60
|
-
onChange: handleChange
|
61
|
-
}), /*#__PURE__*/_jsx(Box, {
|
62
|
-
component: "input",
|
63
|
-
sx: {
|
64
|
-
background: theme?.palette?.editor?.background,
|
65
|
-
color: theme?.palette?.editor?.textColor
|
66
|
-
},
|
67
|
-
name: "lineHeight",
|
68
|
-
value: pro_value,
|
69
|
-
className: "sliderInput",
|
70
|
-
onChange: handleChange,
|
71
|
-
type: "number",
|
72
|
-
placeholder: "0",
|
73
|
-
disabled: true,
|
74
|
-
defaultValue: pro_value || 1.43
|
75
|
-
})]
|
76
|
-
})]
|
77
|
-
});
|
78
|
-
};
|
79
|
-
export default LineSpacing;
|
@@ -1,28 +0,0 @@
|
|
1
|
-
export const ensureWrappedVariables = content => {
|
2
|
-
return content.map(node => {
|
3
|
-
if (node.children) {
|
4
|
-
return {
|
5
|
-
...node,
|
6
|
-
children: node.children.reduce((result, child, index, arr) => {
|
7
|
-
if (child.type === "variables") {
|
8
|
-
if (index === 0 || !arr[index - 1].text || arr[index - 1].text.trim() === "") {
|
9
|
-
result.push({
|
10
|
-
text: ""
|
11
|
-
});
|
12
|
-
}
|
13
|
-
result.push(child);
|
14
|
-
if (index === arr.length - 1 || !arr[index + 1]?.text || arr[index + 1]?.text.trim() === "") {
|
15
|
-
result.push({
|
16
|
-
text: ""
|
17
|
-
});
|
18
|
-
}
|
19
|
-
} else {
|
20
|
-
result.push(child);
|
21
|
-
}
|
22
|
-
return result;
|
23
|
-
}, [])
|
24
|
-
};
|
25
|
-
}
|
26
|
-
return node;
|
27
|
-
});
|
28
|
-
};
|