@lowdefy/client 4.0.0-alpha.17 → 4.0.0-alpha.20

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.
@@ -37,11 +37,12 @@ function getCallbackUrl({ lowdefy , callbackUrl ={} }) {
37
37
  function createAuthMethods({ lowdefy , auth }) {
38
38
  // login and logout are Lowdefy function that handle action params
39
39
  // signIn and signOut are the next-auth methods
40
- function login({ authUrl , callbackUrl , providerId } = {}) {
40
+ function login({ authUrl , callbackUrl , providerId , ...rest } = {}) {
41
41
  if (type.isNone(providerId) && auth.authConfig.providers.length === 1) {
42
42
  providerId = auth.authConfig.providers[0].id;
43
43
  }
44
44
  auth.signIn(providerId, {
45
+ ...rest,
45
46
  callbackUrl: getCallbackUrl({
46
47
  lowdefy,
47
48
  callbackUrl
@@ -62,7 +62,7 @@ const CategorySwitch = ({ block , Blocks , context , loading , lowdefy })=>{
62
62
  id: `bl-${block.blockId}`,
63
63
  blockStyle: block.eval.style,
64
64
  highlightBorders: lowdefy.lowdefyGlobal.highlightBorders,
65
- layout: block.eval.layout || {},
65
+ layout: block.eval.layout,
66
66
  makeCssClass: makeCssClass
67
67
  }, /*#__PURE__*/ React.createElement(Component, {
68
68
  methods: Object.assign(block.methods, {
@@ -90,7 +90,7 @@ const CategorySwitch = ({ block , Blocks , context , loading , lowdefy })=>{
90
90
  id: `bl-${block.blockId}`,
91
91
  blockStyle: block.eval.style,
92
92
  highlightBorders: lowdefy.lowdefyGlobal.highlightBorders,
93
- layout: block.eval.layout || {},
93
+ layout: block.eval.layout,
94
94
  makeCssClass: makeCssClass
95
95
  }, /*#__PURE__*/ React.createElement(Component, {
96
96
  methods: Object.assign(block.methods, {
@@ -25,13 +25,13 @@ const Container = ({ block , Blocks , Component , context , loading , lowdefy }
25
25
  id: `ar-${block.blockId}-${areaKey}`,
26
26
  key: `ar-${block.blockId}-${areaKey}-${i}`,
27
27
  area: layoutParamsToArea({
28
- area: block.eval.areas[areaKey] || {},
28
+ area: block.eval.areas[areaKey],
29
29
  areaKey,
30
- layout: block.eval.layout || {}
30
+ layout: block.eval.layout
31
31
  }),
32
32
  areaStyle: [
33
33
  areaStyle,
34
- block.eval.areas[areaKey] && block.eval.areas[areaKey].style
34
+ block.eval.areas[areaKey]?.style
35
35
  ],
36
36
  highlightBorders: lowdefy.lowdefyGlobal.highlightBorders,
37
37
  makeCssClass: makeCssClass
@@ -48,7 +48,7 @@ const Container = ({ block , Blocks , Component , context , loading , lowdefy }
48
48
  id: `bl-${block.blockId}`,
49
49
  blockStyle: block.eval.style,
50
50
  highlightBorders: lowdefy.lowdefyGlobal.highlightBorders,
51
- layout: block.eval.layout || {},
51
+ layout: block.eval.layout,
52
52
  makeCssClass: makeCssClass
53
53
  }, /*#__PURE__*/ React.createElement(Component, {
54
54
  methods: Object.assign(block.methods, {
@@ -25,13 +25,13 @@ const List = ({ block , Blocks , Component , context , loading , lowdefy })=>{
25
25
  id: `ar-${block.blockId}-${SBlock.id}-${areaKey}`,
26
26
  key: `ar-${block.blockId}-${SBlock.id}-${areaKey}`,
27
27
  area: layoutParamsToArea({
28
- area: block.eval.areas[areaKey] || {},
28
+ area: block.eval.areas[areaKey],
29
29
  areaKey,
30
- layout: block.eval.layout || {}
30
+ layout: block.eval.layout
31
31
  }),
32
32
  areaStyle: [
33
33
  areaStyle,
34
- block.eval.areas[areaKey] && block.eval.areas[areaKey].style
34
+ block.eval.areas[areaKey]?.style
35
35
  ],
36
36
  highlightBorders: lowdefy.lowdefyGlobal.highlightBorders,
37
37
  makeCssClass: makeCssClass
@@ -52,7 +52,7 @@ const List = ({ block , Blocks , Component , context , loading , lowdefy })=>{
52
52
  id: `bl-${block.blockId}`,
53
53
  blockStyle: block.eval.style,
54
54
  highlightBorders: lowdefy.lowdefyGlobal.highlightBorders,
55
- layout: block.eval.layout || {},
55
+ layout: block.eval.layout,
56
56
  makeCssClass: makeCssClass
57
57
  }, /*#__PURE__*/ React.createElement(Component, {
58
58
  methods: Object.assign(block.methods, {
@@ -22,7 +22,7 @@ const LoadingContainer = ({ blockId , blockLayout , blockProperties , blockStyle
22
22
  Object.keys(skeleton.areas).forEach((areaKey, i)=>{
23
23
  content[areaKey] = (areaStyle)=>/*#__PURE__*/ React.createElement(Area, {
24
24
  area: layoutParamsToArea({
25
- area: skeleton.areas[areaKey] || {},
25
+ area: skeleton.areas[areaKey],
26
26
  areaKey,
27
27
  layout: skeleton.layout ?? blockLayout
28
28
  }),
@@ -23,13 +23,13 @@ const LoadingList = ({ blockId , blockLayout , blockProperties , blockStyle , Co
23
23
  Object.keys(skeleton.areas).forEach((areaKey, i)=>{
24
24
  content[areaKey] = (areaStyle)=>/*#__PURE__*/ React.createElement(Area, {
25
25
  area: layoutParamsToArea({
26
- area: skeleton.areas[areaKey] ?? {},
26
+ area: skeleton.areas[areaKey],
27
27
  areaKey,
28
28
  layout: skeleton.layout ?? blockLayout
29
29
  }),
30
30
  areaStyle: [
31
31
  areaStyle,
32
- skeleton.areas[areaKey] && skeleton.areas[areaKey].style
32
+ skeleton.areas[areaKey]?.style
33
33
  ],
34
34
  highlightBorders: lowdefy.lowdefyGlobal.highlightBorders,
35
35
  id: `s-ar-${blockId}-${skeleton.id}-${areaKey}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowdefy/client",
3
- "version": "4.0.0-alpha.17",
3
+ "version": "4.0.0-alpha.20",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Lowdefy Client",
6
6
  "homepage": "https://lowdefy.com",
@@ -43,17 +43,17 @@
43
43
  },
44
44
  "dependencies": {
45
45
  "@ant-design/icons": "4.7.0",
46
- "@lowdefy/block-utils": "4.0.0-alpha.17",
47
- "@lowdefy/engine": "4.0.0-alpha.17",
48
- "@lowdefy/helpers": "4.0.0-alpha.17",
49
- "@lowdefy/layout": "4.0.0-alpha.17",
46
+ "@lowdefy/block-utils": "4.0.0-alpha.20",
47
+ "@lowdefy/engine": "4.0.0-alpha.20",
48
+ "@lowdefy/helpers": "4.0.0-alpha.20",
49
+ "@lowdefy/layout": "4.0.0-alpha.20",
50
50
  "classnames": "2.3.1",
51
51
  "react": "18.1.0",
52
52
  "react-dom": "18.1.0"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@emotion/jest": "11.9.1",
56
- "@lowdefy/jest-yaml-transform": "4.0.0-alpha.17",
56
+ "@lowdefy/jest-yaml-transform": "4.0.0-alpha.20",
57
57
  "@swc/cli": "0.1.57",
58
58
  "@swc/core": "1.2.194",
59
59
  "@swc/jest": "0.2.21",
@@ -68,5 +68,5 @@
68
68
  "publishConfig": {
69
69
  "access": "public"
70
70
  },
71
- "gitHead": "9172974b2fe19c527d3f0ea66b8dbde827ac9c0e"
71
+ "gitHead": "cf96c282e8ea38153ea815d72e2b95e5da1359f6"
72
72
  }