@lowdefy/layout 4.1.0 → 4.2.1
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/Area.js +15 -8
- package/dist/BlockLayout.js +2 -3
- package/dist/index.js +1 -2
- package/dist/layoutParamsToArea.js +3 -3
- package/package.json +5 -5
package/dist/Area.js
CHANGED
|
@@ -16,19 +16,26 @@
|
|
|
16
16
|
import { Row } from 'antd';
|
|
17
17
|
import { blockDefaultProps } from '@lowdefy/block-utils';
|
|
18
18
|
import gutterSetup from './gutterSetup.js';
|
|
19
|
-
|
|
19
|
+
import layoutParamsToArea from './layoutParamsToArea.js';
|
|
20
|
+
const Area = ({ area = {}, areaKey, areaStyle, children, id, layout, makeCssClass })=>{
|
|
21
|
+
const derivedArea = layoutParamsToArea({
|
|
22
|
+
area,
|
|
23
|
+
areaKey,
|
|
24
|
+
layout
|
|
25
|
+
});
|
|
26
|
+
return /*#__PURE__*/ React.createElement(Row, {
|
|
20
27
|
id: id,
|
|
21
|
-
align:
|
|
28
|
+
align: derivedArea.align,
|
|
22
29
|
className: makeCssClass(areaStyle),
|
|
23
|
-
gutter: gutterSetup(
|
|
24
|
-
justify:
|
|
30
|
+
gutter: gutterSetup(derivedArea.gutter),
|
|
31
|
+
justify: derivedArea.justify,
|
|
25
32
|
style: {
|
|
26
33
|
// antd keeps bottom margin which can cause overflow issues.
|
|
27
|
-
flexDirection:
|
|
28
|
-
flexWrap:
|
|
29
|
-
overflow:
|
|
30
|
-
border: highlightBorders && '1px dashed red'
|
|
34
|
+
flexDirection: derivedArea.direction,
|
|
35
|
+
flexWrap: derivedArea.wrap,
|
|
36
|
+
overflow: derivedArea.overflow
|
|
31
37
|
}
|
|
32
38
|
}, children);
|
|
39
|
+
};
|
|
33
40
|
Area.defaultProps = blockDefaultProps;
|
|
34
41
|
export default Area;
|
package/dist/BlockLayout.js
CHANGED
|
@@ -28,7 +28,7 @@ const alignSelf = (align)=>{
|
|
|
28
28
|
}
|
|
29
29
|
return align;
|
|
30
30
|
};
|
|
31
|
-
const BlockLayout = ({ id, blockStyle, children,
|
|
31
|
+
const BlockLayout = ({ id, blockStyle, children, layout = {}, makeCssClass })=>{
|
|
32
32
|
if (layout.disabled) {
|
|
33
33
|
return /*#__PURE__*/ React.createElement("div", {
|
|
34
34
|
id: id,
|
|
@@ -38,8 +38,7 @@ const BlockLayout = ({ id, blockStyle, children, highlightBorders, layout = {},
|
|
|
38
38
|
return /*#__PURE__*/ React.createElement(Col, {
|
|
39
39
|
...deriveLayout(layout),
|
|
40
40
|
style: {
|
|
41
|
-
alignSelf: alignSelf(layout.align)
|
|
42
|
-
border: highlightBorders && '1px dashed #8eccf5'
|
|
41
|
+
alignSelf: alignSelf(layout.align)
|
|
43
42
|
},
|
|
44
43
|
id: id,
|
|
45
44
|
className: makeCssClass(blockStyle)
|
package/dist/index.js
CHANGED
|
@@ -18,11 +18,11 @@ const layoutParamsToArea = ({ areaKey, area = {}, layout = {} })=>{
|
|
|
18
18
|
return area;
|
|
19
19
|
}
|
|
20
20
|
area.align = type.isNone(area.align) ? layout.contentAlign : area.align;
|
|
21
|
-
area.justify = type.isNone(area.justify) ? layout.contentJustify : area.justify;
|
|
22
21
|
area.direction = type.isNone(area.direction) ? layout.contentDirection : area.direction;
|
|
23
|
-
area.wrap = type.isNone(area.wrap) ? layout.contentWrap : area.wrap;
|
|
24
|
-
area.overflow = type.isNone(area.overflow) ? layout.contentOverflow : area.overflow;
|
|
25
22
|
area.gutter = type.isNone(area.gutter) ? layout.contentGutter : area.gutter;
|
|
23
|
+
area.justify = type.isNone(area.justify) ? layout.contentJustify : area.justify;
|
|
24
|
+
area.overflow = type.isNone(area.overflow) ? layout.contentOverflow : area.overflow;
|
|
25
|
+
area.wrap = type.isNone(area.wrap) ? layout.contentWrap : area.wrap;
|
|
26
26
|
return area;
|
|
27
27
|
};
|
|
28
28
|
export default layoutParamsToArea;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lowdefy/layout",
|
|
3
|
-
"version": "4.1
|
|
3
|
+
"version": "4.2.1",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "",
|
|
6
6
|
"homepage": "https://lowdefy.com",
|
|
@@ -34,8 +34,8 @@
|
|
|
34
34
|
"dist/*"
|
|
35
35
|
],
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@lowdefy/block-utils": "4.1
|
|
38
|
-
"@lowdefy/helpers": "4.1
|
|
37
|
+
"@lowdefy/block-utils": "4.2.1",
|
|
38
|
+
"@lowdefy/helpers": "4.2.1",
|
|
39
39
|
"antd": "4.24.14",
|
|
40
40
|
"react": "18.2.0",
|
|
41
41
|
"react-dom": "18.2.0"
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@emotion/jest": "11.10.5",
|
|
45
45
|
"@jest/globals": "28.1.3",
|
|
46
|
-
"@lowdefy/block-dev": "4.1
|
|
47
|
-
"@lowdefy/jest-yaml-transform": "4.1
|
|
46
|
+
"@lowdefy/block-dev": "4.2.1",
|
|
47
|
+
"@lowdefy/jest-yaml-transform": "4.2.1",
|
|
48
48
|
"@swc/cli": "0.1.63",
|
|
49
49
|
"@swc/core": "1.3.99",
|
|
50
50
|
"@swc/jest": "0.2.29",
|