@lowdefy/layout 4.0.0-alpha.9 → 4.0.0-rc.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
@@ -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),
@@ -29,7 +29,6 @@ const Area = ({ area , areaStyle , children , highlightBorders , id , makeCssCla
29
29
  overflow: area.overflow,
30
30
  border: highlightBorders && '1px dashed red'
31
31
  }
32
- }, children)
33
- ;
32
+ }, children);
34
33
  Area.defaultProps = blockDefaultProps;
35
34
  export default Area;
@@ -1,3 +1,17 @@
1
+ function _extends() {
2
+ _extends = Object.assign || function(target) {
3
+ for(var i = 1; i < arguments.length; i++){
4
+ var source = arguments[i];
5
+ for(var key in source){
6
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
7
+ target[key] = source[key];
8
+ }
9
+ }
10
+ }
11
+ return target;
12
+ };
13
+ return _extends.apply(this, arguments);
14
+ }
1
15
  /*
2
16
  Copyright 2020-2022 Lowdefy, Inc
3
17
 
@@ -16,20 +30,6 @@
16
30
  import { Col } from 'antd';
17
31
  import deriveLayout from './deriveLayout.js';
18
32
  import { blockDefaultProps } from '@lowdefy/block-utils';
19
- function _extends() {
20
- _extends = Object.assign || function(target) {
21
- for(var i = 1; i < arguments.length; i++){
22
- var source = arguments[i];
23
- for(var key in source){
24
- if (Object.prototype.hasOwnProperty.call(source, key)) {
25
- target[key] = source[key];
26
- }
27
- }
28
- }
29
- return target;
30
- };
31
- return _extends.apply(this, arguments);
32
- }
33
33
  const alignSelf = (align)=>{
34
34
  if (align === 'bottom') {
35
35
  return 'flex-end';
@@ -42,21 +42,21 @@ const alignSelf = (align)=>{
42
42
  }
43
43
  return align;
44
44
  };
45
- const BlockLayout = ({ id , blockStyle , children , highlightBorders , layout , makeCssClass })=>{
46
- if (layout && layout.disabled) {
47
- return(/*#__PURE__*/ React.createElement("div", {
45
+ const BlockLayout = ({ id , blockStyle , children , highlightBorders , layout ={} , makeCssClass })=>{
46
+ if (layout.disabled) {
47
+ return /*#__PURE__*/ React.createElement("div", {
48
48
  id: id,
49
49
  className: makeCssClass(blockStyle)
50
- }, children));
50
+ }, children);
51
51
  }
52
- return(/*#__PURE__*/ React.createElement(Col, _extends({}, deriveLayout(layout), {
52
+ return /*#__PURE__*/ React.createElement(Col, _extends({}, deriveLayout(layout), {
53
53
  style: {
54
54
  alignSelf: alignSelf(layout.align),
55
55
  border: highlightBorders && '1px dashed #8eccf5'
56
56
  },
57
57
  id: id,
58
58
  className: makeCssClass(blockStyle)
59
- }), children));
59
+ }), children);
60
60
  };
61
61
  BlockLayout.defaultProps = blockDefaultProps;
62
62
  export default BlockLayout;
@@ -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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lowdefy/layout",
3
- "version": "4.0.0-alpha.9",
4
- "licence": "Apache-2.0",
3
+ "version": "4.0.0-rc.0",
4
+ "license": "Apache-2.0",
5
5
  "description": "",
6
6
  "homepage": "https://lowdefy.com",
7
7
  "keywords": [
@@ -34,36 +34,36 @@
34
34
  "dist/*"
35
35
  ],
36
36
  "scripts": {
37
- "build": "yarn swc",
37
+ "build": "swc src --out-dir dist --config-file ../../.swcrc --delete-dir-on-start && pnpm copyfiles",
38
38
  "clean": "rm -rf dist",
39
39
  "copyfiles": "copyfiles -u 1 \"./src/**/*\" dist -e \"./src/**/*.js\" -e \"./src/**/*.yaml\" -e \"./src/**/*.snap\"",
40
- "prepare": "yarn build",
41
- "swc": "swc src --out-dir dist --config-file ../../.swcrc --delete-dir-on-start && yarn copyfiles",
40
+ "prepublishOnly": "pnpm build",
42
41
  "test": "jest --coverage"
43
42
  },
44
43
  "dependencies": {
45
- "@lowdefy/block-utils": "4.0.0-alpha.9",
46
- "@lowdefy/helpers": "4.0.0-alpha.9",
47
- "antd": "4.18.2",
48
- "react": "17.0.2",
49
- "react-dom": "17.0.2"
44
+ "@lowdefy/block-utils": "4.0.0-rc.0",
45
+ "@lowdefy/helpers": "4.0.0-rc.0",
46
+ "antd": "4.22.5",
47
+ "react": "18.2.0",
48
+ "react-dom": "18.2.0"
50
49
  },
51
50
  "devDependencies": {
52
- "@emotion/jest": "11.7.1",
53
- "@lowdefy/block-dev": "4.0.0-alpha.9",
54
- "@swc/cli": "0.1.55",
55
- "@swc/core": "1.2.135",
56
- "@swc/jest": "0.2.17",
57
- "@testing-library/dom": "8.11.3",
58
- "@testing-library/react": "13.0.0-alpha.4",
59
- "@testing-library/user-event": "14.0.0-alpha.14",
51
+ "@emotion/jest": "11.9.1",
52
+ "@lowdefy/block-dev": "4.0.0-rc.0",
53
+ "@lowdefy/jest-yaml-transform": "4.0.0-rc.0",
54
+ "@swc/cli": "0.1.57",
55
+ "@swc/core": "1.2.194",
56
+ "@swc/jest": "0.2.21",
57
+ "@testing-library/dom": "8.13.0",
58
+ "@testing-library/react": "13.3.0",
59
+ "@testing-library/user-event": "14.2.0",
60
60
  "copyfiles": "2.4.1",
61
- "jest": "27.5.1",
62
- "jest-serializer-html": "7.1.0",
63
- "jest-transform-yaml": "1.0.0"
61
+ "jest": "28.1.0",
62
+ "jest-environment-jsdom": "28.1.0",
63
+ "jest-serializer-html": "7.1.0"
64
64
  },
65
65
  "publishConfig": {
66
66
  "access": "public"
67
67
  },
68
- "gitHead": "98b544eca231bdcfca6c3a8601a891835d5ce571"
68
+ "gitHead": "f6872d7ff6da421710096536fce7b2016ef8f35c"
69
69
  }