@lowdefy/client 4.0.0-rc.10 → 4.0.0-rc.12
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 +3 -3
- package/dist/block/LoadingContainer.js +1 -1
- package/dist/createIcon.js +1 -1
- package/dist/createLinkComponent.js +10 -10
- package/package.json +9 -9
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
|
|
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
|
|
45
|
+
}, name ?? 'Error'), /*#__PURE__*/ React.createElement("div", {
|
|
46
46
|
style: {
|
|
47
47
|
fontSize: '0.9em'
|
|
48
48
|
}
|
|
49
|
-
}, message
|
|
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]
|
|
31
|
+
skeleton.areas[areaKey]?.style
|
|
32
32
|
],
|
|
33
33
|
highlightBorders: lowdefy.lowdefyGlobal.highlightBorders,
|
|
34
34
|
id: `s-ar-${blockId}-${skeleton.id}-${areaKey}`,
|
package/dist/createIcon.js
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
22
|
-
rel: rel
|
|
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
|
|
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,22 +35,22 @@ 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
|
|
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
|
|
44
|
+
}, type.isFunction(children) ? children(pageId ?? url ?? id) : children));
|
|
45
45
|
}
|
|
46
|
-
return
|
|
46
|
+
return(// This code can be made simpler.
|
|
47
|
+
/*#__PURE__*/ React.createElement(Link, {
|
|
47
48
|
href: {
|
|
48
49
|
pathname,
|
|
49
50
|
query
|
|
50
51
|
},
|
|
51
52
|
replace: replace,
|
|
52
|
-
scroll: scroll
|
|
53
|
-
}, /*#__PURE__*/ React.createElement("a", {
|
|
53
|
+
scroll: scroll,
|
|
54
54
|
id: id,
|
|
55
55
|
"aria-label": ariaLabel,
|
|
56
56
|
className: className,
|
|
@@ -59,7 +59,7 @@ const createLinkComponent = (lowdefy, Link)=>{
|
|
|
59
59
|
setInput();
|
|
60
60
|
onClick(...params);
|
|
61
61
|
}
|
|
62
|
-
}, type.isFunction(children) ? children(pageId
|
|
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.
|
|
3
|
+
"version": "4.0.0-rc.12",
|
|
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.
|
|
45
|
-
"@lowdefy/engine": "4.0.0-rc.
|
|
46
|
-
"@lowdefy/helpers": "4.0.0-rc.
|
|
47
|
-
"@lowdefy/layout": "4.0.0-rc.
|
|
44
|
+
"@lowdefy/block-utils": "4.0.0-rc.12",
|
|
45
|
+
"@lowdefy/engine": "4.0.0-rc.12",
|
|
46
|
+
"@lowdefy/helpers": "4.0.0-rc.12",
|
|
47
|
+
"@lowdefy/layout": "4.0.0-rc.12",
|
|
48
48
|
"classnames": "2.3.2",
|
|
49
49
|
"react": "18.2.0",
|
|
50
50
|
"react-dom": "18.2.0"
|
|
@@ -52,10 +52,10 @@
|
|
|
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.
|
|
55
|
+
"@lowdefy/jest-yaml-transform": "4.0.0-rc.12",
|
|
56
56
|
"@swc/cli": "0.1.62",
|
|
57
|
-
"@swc/core": "1.3.
|
|
58
|
-
"@swc/jest": "0.2.
|
|
57
|
+
"@swc/core": "1.3.92",
|
|
58
|
+
"@swc/jest": "0.2.29",
|
|
59
59
|
"@testing-library/dom": "8.19.1",
|
|
60
60
|
"@testing-library/react": "13.4.0",
|
|
61
61
|
"@testing-library/user-event": "14.4.3",
|
|
@@ -67,5 +67,5 @@
|
|
|
67
67
|
"publishConfig": {
|
|
68
68
|
"access": "public"
|
|
69
69
|
},
|
|
70
|
-
"gitHead": "
|
|
70
|
+
"gitHead": "7f3059b6778b1cb8900b1d4456681b977521d45d"
|
|
71
71
|
}
|