@lowdefy/client 4.0.0-rc.11 → 4.0.0-rc.13

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/ErrorPage.js CHANGED
@@ -29,7 +29,7 @@ const ErrorPage = ({ code, description, message, name })=>/*#__PURE__*/ React.cr
29
29
  fontWeight: '100',
30
30
  paddingRight: 30
31
31
  }
32
- }, code || 500), /*#__PURE__*/ React.createElement("div", {
32
+ }, code ?? 500), /*#__PURE__*/ React.createElement("div", {
33
33
  style: {
34
34
  flex: '0 1 auto',
35
35
  paddingLeft: 30,
@@ -42,11 +42,11 @@ const ErrorPage = ({ code, description, message, name })=>/*#__PURE__*/ React.cr
42
42
  fontWeight: '300',
43
43
  paddingBottom: 10
44
44
  }
45
- }, name || 'Error'), /*#__PURE__*/ React.createElement("div", {
45
+ }, name ?? 'Error'), /*#__PURE__*/ React.createElement("div", {
46
46
  style: {
47
47
  fontSize: '0.9em'
48
48
  }
49
- }, message || 'An error has occurred.'), /*#__PURE__*/ React.createElement("div", {
49
+ }, message ?? 'An error has occurred.'), /*#__PURE__*/ React.createElement("div", {
50
50
  style: {
51
51
  fontSize: '0.9em'
52
52
  }
@@ -28,7 +28,7 @@ const LoadingContainer = ({ blockId, blockLayout, blockProperties, blockStyle, C
28
28
  }),
29
29
  areaStyle: [
30
30
  areaStyle,
31
- skeleton.areas[areaKey] && skeleton.areas[areaKey].style
31
+ skeleton.areas[areaKey]?.style
32
32
  ],
33
33
  highlightBorders: lowdefy.lowdefyGlobal.highlightBorders,
34
34
  id: `s-ar-${blockId}-${skeleton.id}-${areaKey}`,
@@ -40,7 +40,7 @@ const createIcon = (Icons)=>{
40
40
  const propertiesObj = type.isString(properties) ? {
41
41
  name: properties
42
42
  } : properties;
43
- const spin = (propertiesObj.spin || events.onClick && events.onClick.loading) && !propertiesObj.disableLoadingIcon;
43
+ const spin = (propertiesObj.spin || events.onClick?.loading) && !propertiesObj.disableLoadingIcon;
44
44
  const iconProps = {
45
45
  id: blockId,
46
46
  className: classNames({
@@ -7,7 +7,7 @@ const createLinkComponent = (lowdefy, Link)=>{
7
7
  id: id,
8
8
  className: className,
9
9
  rel: rel,
10
- "aria-label": ariaLabel || 'back',
10
+ "aria-label": ariaLabel ?? 'back',
11
11
  onClick: (...params)=>{
12
12
  lowdefy._internal.router.back();
13
13
  onClick(...params);
@@ -18,14 +18,14 @@ const createLinkComponent = (lowdefy, Link)=>{
18
18
  id: id,
19
19
  "aria-label": ariaLabel,
20
20
  className: className,
21
- href: href || `${url}${query ? `?${query}` : ''}`,
22
- rel: rel || newTab && 'noopener noreferrer',
21
+ href: href ?? `${url}${query ? `?${query}` : ''}`,
22
+ rel: rel ?? (newTab && 'noopener noreferrer'),
23
23
  target: newTab && '_blank',
24
24
  onClick: async (...params)=>{
25
25
  await onClick(...params);
26
26
  return true;
27
27
  }
28
- }, type.isFunction(children) ? children(pageId || url || id) : children);
28
+ }, type.isFunction(children) ? children(pageId ?? url ?? id) : children);
29
29
  };
30
30
  const sameOriginLink = ({ ariaLabel, children, className, id, newTab, onClick = ()=>{}, pageId, pathname, query, rel, replace, scroll, setInput, url })=>{
31
31
  if (newTab) {
@@ -35,13 +35,13 @@ const createLinkComponent = (lowdefy, Link)=>{
35
35
  "aria-label": ariaLabel,
36
36
  className: className,
37
37
  href: `${window.location.origin}${lowdefy.basePath}${pathname}${query ? `?${query}` : ''}`,
38
- rel: rel || 'noopener noreferrer',
38
+ rel: rel ?? 'noopener noreferrer',
39
39
  target: "_blank",
40
40
  onClick: async (...params)=>{
41
41
  await onClick(...params);
42
42
  return true;
43
43
  }
44
- }, type.isFunction(children) ? children(pageId || url || id) : children));
44
+ }, type.isFunction(children) ? children(pageId ?? url ?? id) : children));
45
45
  }
46
46
  return(// This code can be made simpler.
47
47
  /*#__PURE__*/ React.createElement(Link, {
@@ -59,7 +59,7 @@ const createLinkComponent = (lowdefy, Link)=>{
59
59
  setInput();
60
60
  onClick(...params);
61
61
  }
62
- }, type.isFunction(children) ? children(pageId || url || id) : children));
62
+ }, type.isFunction(children) ? children(pageId ?? url ?? id) : children));
63
63
  };
64
64
  const noLink = ({ className, children, id, onClick = ()=>{} })=>/*#__PURE__*/ React.createElement("span", {
65
65
  id: id,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowdefy/client",
3
- "version": "4.0.0-rc.11",
3
+ "version": "4.0.0-rc.13",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Lowdefy Client",
6
6
  "homepage": "https://lowdefy.com",
@@ -41,10 +41,10 @@
41
41
  },
42
42
  "dependencies": {
43
43
  "@ant-design/icons": "4.8.0",
44
- "@lowdefy/block-utils": "4.0.0-rc.11",
45
- "@lowdefy/engine": "4.0.0-rc.11",
46
- "@lowdefy/helpers": "4.0.0-rc.11",
47
- "@lowdefy/layout": "4.0.0-rc.11",
44
+ "@lowdefy/block-utils": "4.0.0-rc.13",
45
+ "@lowdefy/engine": "4.0.0-rc.13",
46
+ "@lowdefy/helpers": "4.0.0-rc.13",
47
+ "@lowdefy/layout": "4.0.0-rc.13",
48
48
  "classnames": "2.3.2",
49
49
  "react": "18.2.0",
50
50
  "react-dom": "18.2.0"
@@ -52,7 +52,7 @@
52
52
  "devDependencies": {
53
53
  "@emotion/jest": "11.10.5",
54
54
  "@jest/globals": "28.1.3",
55
- "@lowdefy/jest-yaml-transform": "4.0.0-rc.11",
55
+ "@lowdefy/jest-yaml-transform": "4.0.0-rc.13",
56
56
  "@swc/cli": "0.1.62",
57
57
  "@swc/core": "1.3.92",
58
58
  "@swc/jest": "0.2.29",
@@ -67,5 +67,5 @@
67
67
  "publishConfig": {
68
68
  "access": "public"
69
69
  },
70
- "gitHead": "dbc49d3688a6d2f44de25cc3f4bc071627f7ebfa"
70
+ "gitHead": "e0e9a9b4e4e15c899de64d6736fa6e83cf56f8e4"
71
71
  }