@lowdefy/layout 4.0.0-rc.8 → 4.0.0

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 CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2023 Lowdefy, Inc
2
+ Copyright 2020-2024 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -16,7 +16,7 @@
16
16
  import { Row } from 'antd';
17
17
  import { blockDefaultProps } from '@lowdefy/block-utils';
18
18
  import gutterSetup from './gutterSetup.js';
19
- const Area = ({ area ={} , areaStyle , children , highlightBorders , id , makeCssClass })=>/*#__PURE__*/ React.createElement(Row, {
19
+ const Area = ({ area = {}, areaStyle, children, highlightBorders, id, makeCssClass })=>/*#__PURE__*/ React.createElement(Row, {
20
20
  id: id,
21
21
  align: area.align,
22
22
  className: makeCssClass(areaStyle),
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2023 Lowdefy, Inc
2
+ Copyright 2020-2024 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -12,21 +12,7 @@
12
12
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
13
  See the License for the specific language governing permissions and
14
14
  limitations under the License.
15
- */ function _extends() {
16
- _extends = Object.assign || function(target) {
17
- for(var i = 1; i < arguments.length; i++){
18
- var source = arguments[i];
19
- for(var key in source){
20
- if (Object.prototype.hasOwnProperty.call(source, key)) {
21
- target[key] = source[key];
22
- }
23
- }
24
- }
25
- return target;
26
- };
27
- return _extends.apply(this, arguments);
28
- }
29
- import React from 'react';
15
+ */ import React from 'react';
30
16
  import { Col } from 'antd';
31
17
  import deriveLayout from './deriveLayout.js';
32
18
  import { blockDefaultProps } from '@lowdefy/block-utils';
@@ -42,21 +28,22 @@ const alignSelf = (align)=>{
42
28
  }
43
29
  return align;
44
30
  };
45
- const BlockLayout = ({ id , blockStyle , children , highlightBorders , layout ={} , makeCssClass })=>{
31
+ const BlockLayout = ({ id, blockStyle, children, highlightBorders, layout = {}, makeCssClass })=>{
46
32
  if (layout.disabled) {
47
33
  return /*#__PURE__*/ React.createElement("div", {
48
34
  id: id,
49
35
  className: makeCssClass(blockStyle)
50
36
  }, children);
51
37
  }
52
- return /*#__PURE__*/ React.createElement(Col, _extends({}, deriveLayout(layout), {
38
+ return /*#__PURE__*/ React.createElement(Col, {
39
+ ...deriveLayout(layout),
53
40
  style: {
54
41
  alignSelf: alignSelf(layout.align),
55
42
  border: highlightBorders && '1px dashed #8eccf5'
56
43
  },
57
44
  id: id,
58
45
  className: makeCssClass(blockStyle)
59
- }), children);
46
+ }, children);
60
47
  };
61
48
  BlockLayout.defaultProps = blockDefaultProps;
62
49
  export default BlockLayout;
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2023 Lowdefy, Inc
2
+ Copyright 2020-2024 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -52,7 +52,7 @@ const sanitizeSize = (value)=>{
52
52
  }
53
53
  return 'auto';
54
54
  };
55
- const deriveFlex = ({ flex , grow , shrink , size })=>{
55
+ const deriveFlex = ({ flex, grow, shrink, size })=>{
56
56
  if (type.isNone(flex) && type.isNone(grow) && type.isNone(shrink) && type.isNone(size)) {
57
57
  return false;
58
58
  }
@@ -71,7 +71,7 @@ const diffOffsetAndSpan = (obj)=>{
71
71
  }
72
72
  return obj;
73
73
  };
74
- const deriveLayout = ({ flex , offset , order , pull , push , span , grow , shrink , size , xs , sm , md , lg , xl , xxl })=>{
74
+ const deriveLayout = ({ flex, offset, order, pull, push, span, grow, shrink, size, xs, sm, md, lg, xl, xxl })=>{
75
75
  let colProps = {
76
76
  xs: {
77
77
  span: 24
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2023 Lowdefy, Inc
2
+ Copyright 2020-2024 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2023 Lowdefy, Inc
2
+ Copyright 2020-2024 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2023 Lowdefy, Inc
2
+ Copyright 2020-2024 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
13
13
  See the License for the specific language governing permissions and
14
14
  limitations under the License.
15
15
  */ import { type } from '@lowdefy/helpers';
16
- const layoutParamsToArea = ({ areaKey , area ={} , layout ={} })=>{
16
+ const layoutParamsToArea = ({ areaKey, area = {}, layout = {} })=>{
17
17
  if (areaKey !== 'content') {
18
18
  return area;
19
19
  }
package/dist/style.less CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2023 Lowdefy, Inc
2
+ Copyright 2020-2024 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowdefy/layout",
3
- "version": "4.0.0-rc.8",
3
+ "version": "4.0.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "",
6
6
  "homepage": "https://lowdefy.com",
@@ -33,38 +33,36 @@
33
33
  "files": [
34
34
  "dist/*"
35
35
  ],
36
- "scripts": {
37
- "build": "swc src --out-dir dist --config-file ../../.swcrc --delete-dir-on-start && pnpm copyfiles",
38
- "clean": "rm -rf dist",
39
- "copyfiles": "copyfiles -u 1 \"./src/**/*\" dist -e \"./src/**/*.js\" -e \"./src/**/*.yaml\" -e \"./src/**/*.snap\"",
40
- "prepublishOnly": "pnpm build",
41
- "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js"
42
- },
43
36
  "dependencies": {
44
- "@lowdefy/block-utils": "4.0.0-rc.8",
45
- "@lowdefy/helpers": "4.0.0-rc.8",
46
- "antd": "4.22.5",
37
+ "@lowdefy/block-utils": "4.0.0",
38
+ "@lowdefy/helpers": "4.0.0",
39
+ "antd": "4.24.14",
47
40
  "react": "18.2.0",
48
41
  "react-dom": "18.2.0"
49
42
  },
50
43
  "devDependencies": {
51
44
  "@emotion/jest": "11.10.5",
52
- "@jest/globals": "28.1.0",
53
- "@lowdefy/block-dev": "4.0.0-rc.8",
54
- "@lowdefy/jest-yaml-transform": "4.0.0-rc.8",
55
- "@swc/cli": "0.1.59",
56
- "@swc/core": "1.3.24",
57
- "@swc/jest": "0.2.24",
45
+ "@jest/globals": "28.1.3",
46
+ "@lowdefy/block-dev": "4.0.0",
47
+ "@lowdefy/jest-yaml-transform": "4.0.0",
48
+ "@swc/cli": "0.1.63",
49
+ "@swc/core": "1.3.99",
50
+ "@swc/jest": "0.2.29",
58
51
  "@testing-library/dom": "8.19.1",
59
52
  "@testing-library/react": "13.4.0",
60
53
  "@testing-library/user-event": "14.4.3",
61
54
  "copyfiles": "2.4.1",
62
- "jest": "28.1.0",
63
- "jest-environment-jsdom": "28.1.0",
55
+ "jest": "28.1.3",
56
+ "jest-environment-jsdom": "28.1.3",
64
57
  "jest-serializer-html": "7.1.0"
65
58
  },
66
59
  "publishConfig": {
67
60
  "access": "public"
68
61
  },
69
- "gitHead": "db883daef0443647439b6fe2db845b846ffb6d4e"
70
- }
62
+ "scripts": {
63
+ "build": "swc src --out-dir dist --config-file ../../.swcrc --delete-dir-on-start && pnpm copyfiles",
64
+ "clean": "rm -rf dist",
65
+ "copyfiles": "copyfiles -u 1 \"./src/**/*\" dist -e \"./src/**/*.js\" -e \"./src/**/*.yaml\" -e \"./src/**/*.snap\"",
66
+ "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js"
67
+ }
68
+ }