@lowdefy/blocks-loaders 4.0.0-alpha.1 → 4.0.0-alpha.7
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/blocks/IconSpinner/IconSpinner.js +8 -0
- package/dist/blocks/LogoSpinner/LogoSpinner.js +4 -0
- package/dist/blocks/Skeleton/Skeleton.js +8 -0
- package/dist/blocks/SkeletonAvatar/SkeletonAvatar.js +9 -2
- package/dist/blocks/SkeletonButton/SkeletonButton.js +9 -2
- package/dist/blocks/SkeletonInput/SkeletonInput.js +10 -4
- package/dist/blocks/SkeletonParagraph/SkeletonParagraph.js +9 -2
- package/dist/blocks/Spinner/Spinner.js +8 -0
- package/dist/{blocks/Skeleton/index.js → blocks.js} +7 -12
- package/dist/{blocks/IconSpinner/index.js → types.js} +14 -11
- package/package.json +25 -17
- package/dist/blocks/SkeletonAvatar/index.js +0 -26
- package/dist/blocks/SkeletonButton/index.js +0 -26
- package/dist/blocks/SkeletonInput/index.js +0 -26
- package/dist/blocks/SkeletonParagraph/index.js +0 -26
- package/dist/blocks/Spinner/index.js +0 -26
- package/dist/index.js +0 -35
|
@@ -57,4 +57,12 @@ const IconSpinner = ({ properties , methods })=>{
|
|
|
57
57
|
}));
|
|
58
58
|
};
|
|
59
59
|
IconSpinner.defaultProps = blockDefaultProps;
|
|
60
|
+
IconSpinner.meta = {
|
|
61
|
+
category: 'display',
|
|
62
|
+
loading: false,
|
|
63
|
+
icons: [],
|
|
64
|
+
styles: [
|
|
65
|
+
'blocks/IconSpinner/style.less'
|
|
66
|
+
]
|
|
67
|
+
};
|
|
60
68
|
export default IconSpinner;
|
|
@@ -25,4 +25,12 @@ const Skeleton = ({ properties , methods })=>{
|
|
|
25
25
|
}));
|
|
26
26
|
};
|
|
27
27
|
Skeleton.defaultProps = blockDefaultProps;
|
|
28
|
+
Skeleton.meta = {
|
|
29
|
+
category: 'display',
|
|
30
|
+
loading: false,
|
|
31
|
+
icons: [],
|
|
32
|
+
styles: [
|
|
33
|
+
'blocks/Skeleton/style.less'
|
|
34
|
+
]
|
|
35
|
+
};
|
|
28
36
|
export default Skeleton;
|
|
@@ -38,8 +38,7 @@ const SkeletonAvatar = ({ properties , methods })=>{
|
|
|
38
38
|
...{
|
|
39
39
|
borderRadius: properties.shape === 'square' ? '0' : size / 2
|
|
40
40
|
},
|
|
41
|
-
...properties.style || {
|
|
42
|
-
}
|
|
41
|
+
...properties.style || {}
|
|
43
42
|
},
|
|
44
43
|
width: size,
|
|
45
44
|
height: size
|
|
@@ -47,4 +46,12 @@ const SkeletonAvatar = ({ properties , methods })=>{
|
|
|
47
46
|
}));
|
|
48
47
|
};
|
|
49
48
|
SkeletonAvatar.defaultProps = blockDefaultProps;
|
|
49
|
+
SkeletonAvatar.meta = {
|
|
50
|
+
category: 'display',
|
|
51
|
+
loading: false,
|
|
52
|
+
icons: [],
|
|
53
|
+
styles: [
|
|
54
|
+
'blocks/SkeletonAvatar/style.less'
|
|
55
|
+
]
|
|
56
|
+
};
|
|
50
57
|
export default SkeletonAvatar;
|
|
@@ -35,8 +35,7 @@ const SkeletonButton = ({ properties , methods })=>{
|
|
|
35
35
|
...{
|
|
36
36
|
borderRadius: properties.shape === 'round' && height / 2
|
|
37
37
|
},
|
|
38
|
-
...properties.style || {
|
|
39
|
-
}
|
|
38
|
+
...properties.style || {}
|
|
40
39
|
},
|
|
41
40
|
width: properties.width || '100%',
|
|
42
41
|
height: height
|
|
@@ -44,4 +43,12 @@ const SkeletonButton = ({ properties , methods })=>{
|
|
|
44
43
|
}));
|
|
45
44
|
};
|
|
46
45
|
SkeletonButton.defaultProps = blockDefaultProps;
|
|
46
|
+
SkeletonButton.meta = {
|
|
47
|
+
category: 'display',
|
|
48
|
+
loading: false,
|
|
49
|
+
icons: [],
|
|
50
|
+
styles: [
|
|
51
|
+
'blocks/SkeletonButton/style.less'
|
|
52
|
+
]
|
|
53
|
+
};
|
|
47
54
|
export default SkeletonButton;
|
|
@@ -39,8 +39,7 @@ const SkeletonInput = ({ properties , methods })=>{
|
|
|
39
39
|
...{
|
|
40
40
|
marginBottom: 10
|
|
41
41
|
},
|
|
42
|
-
...properties.labelStyle || {
|
|
43
|
-
}
|
|
42
|
+
...properties.labelStyle || {}
|
|
44
43
|
}
|
|
45
44
|
}
|
|
46
45
|
}),
|
|
@@ -49,12 +48,19 @@ const SkeletonInput = ({ properties , methods })=>{
|
|
|
49
48
|
properties: {
|
|
50
49
|
width: properties.width || '100%',
|
|
51
50
|
height: properties.inputHeight || inputHeight,
|
|
52
|
-
style: properties.inputStyle || {
|
|
53
|
-
}
|
|
51
|
+
style: properties.inputStyle || {}
|
|
54
52
|
}
|
|
55
53
|
})
|
|
56
54
|
]
|
|
57
55
|
}));
|
|
58
56
|
};
|
|
59
57
|
SkeletonInput.defaultProps = blockDefaultProps;
|
|
58
|
+
SkeletonInput.meta = {
|
|
59
|
+
category: 'display',
|
|
60
|
+
loading: false,
|
|
61
|
+
icons: [],
|
|
62
|
+
styles: [
|
|
63
|
+
'blocks/SkeletonInput/style.less'
|
|
64
|
+
]
|
|
65
|
+
};
|
|
60
66
|
export default SkeletonInput;
|
|
@@ -34,12 +34,19 @@ const SkeletonParagraph = ({ properties , methods })=>{
|
|
|
34
34
|
marginBottom: '1rem'
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
|
-
...properties.style || {
|
|
38
|
-
}
|
|
37
|
+
...properties.style || {}
|
|
39
38
|
}
|
|
40
39
|
}, key)
|
|
41
40
|
)
|
|
42
41
|
}));
|
|
43
42
|
};
|
|
44
43
|
SkeletonParagraph.defaultProps = blockDefaultProps;
|
|
44
|
+
SkeletonParagraph.meta = {
|
|
45
|
+
category: 'display',
|
|
46
|
+
loading: false,
|
|
47
|
+
icons: [],
|
|
48
|
+
styles: [
|
|
49
|
+
'blocks/SkeletonParagraph/style.less'
|
|
50
|
+
]
|
|
51
|
+
};
|
|
45
52
|
export default SkeletonParagraph;
|
|
@@ -51,4 +51,12 @@ const Spinner = ({ properties , methods })=>{
|
|
|
51
51
|
}));
|
|
52
52
|
};
|
|
53
53
|
Spinner.defaultProps = blockDefaultProps;
|
|
54
|
+
Spinner.meta = {
|
|
55
|
+
category: 'display',
|
|
56
|
+
loading: false,
|
|
57
|
+
icons: [],
|
|
58
|
+
styles: [
|
|
59
|
+
'blocks/Spinner/style.less'
|
|
60
|
+
]
|
|
61
|
+
};
|
|
54
62
|
export default Spinner;
|
|
@@ -12,15 +12,10 @@
|
|
|
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
|
-
*/ export default
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
meta: {
|
|
23
|
-
category: 'display',
|
|
24
|
-
loading: false
|
|
25
|
-
}
|
|
26
|
-
};
|
|
15
|
+
*/ export { default as IconSpinner } from './blocks/IconSpinner/IconSpinner.js';
|
|
16
|
+
export { default as Skeleton } from './blocks/Skeleton/Skeleton.js';
|
|
17
|
+
export { default as SkeletonAvatar } from './blocks/SkeletonAvatar/SkeletonAvatar.js';
|
|
18
|
+
export { default as SkeletonButton } from './blocks/SkeletonButton/SkeletonButton.js';
|
|
19
|
+
export { default as SkeletonInput } from './blocks/SkeletonInput/SkeletonInput.js';
|
|
20
|
+
export { default as SkeletonParagraph } from './blocks/SkeletonParagraph/SkeletonParagraph.js';
|
|
21
|
+
export { default as Spinner } from './blocks/Spinner/Spinner.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*
|
|
1
|
+
/* eslint-disable import/namespace */ /*
|
|
2
2
|
Copyright 2020-2021 Lowdefy, Inc
|
|
3
3
|
|
|
4
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
@@ -12,15 +12,18 @@
|
|
|
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
|
-
*/
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
15
|
+
*/ import * as blocks from './blocks.js';
|
|
16
|
+
const icons = {};
|
|
17
|
+
const styles = {};
|
|
18
|
+
Object.keys(blocks).forEach((block)=>{
|
|
19
|
+
icons[block] = blocks[block].meta.icons || [];
|
|
20
|
+
styles[block] = blocks[block].meta.styles || [];
|
|
21
|
+
});
|
|
22
|
+
export default {
|
|
23
|
+
blocks: Object.keys(blocks),
|
|
24
|
+
icons,
|
|
25
|
+
styles: {
|
|
26
|
+
default: [],
|
|
27
|
+
...styles
|
|
25
28
|
}
|
|
26
29
|
};
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lowdefy/blocks-loaders",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.7",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Lowdefy loader blocks.",
|
|
6
6
|
"homepage": "https://lowdefy.com",
|
|
7
7
|
"keywords": [
|
|
8
8
|
"lowdefy",
|
|
9
|
-
"lowdefy blocks"
|
|
9
|
+
"lowdefy blocks",
|
|
10
|
+
"lowdefy plugin"
|
|
10
11
|
],
|
|
11
12
|
"bugs": {
|
|
12
13
|
"url": "https://github.com/lowdefy/lowdefy/issues"
|
|
@@ -19,6 +20,10 @@
|
|
|
19
20
|
{
|
|
20
21
|
"name": "Gerrie van Wyk",
|
|
21
22
|
"url": "https://github.com/Gervwyk"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"name": "Sandile Memela",
|
|
26
|
+
"url": "https://github.com/sah-memela"
|
|
22
27
|
}
|
|
23
28
|
],
|
|
24
29
|
"repository": {
|
|
@@ -26,7 +31,11 @@
|
|
|
26
31
|
"url": "https://github.com/lowdefy/lowdefy.git"
|
|
27
32
|
},
|
|
28
33
|
"type": "module",
|
|
29
|
-
"exports":
|
|
34
|
+
"exports": {
|
|
35
|
+
"./*": "./dist/*",
|
|
36
|
+
"./blocks": "./dist/blocks.js",
|
|
37
|
+
"./types": "./dist/types.js"
|
|
38
|
+
},
|
|
30
39
|
"files": [
|
|
31
40
|
"dist/*"
|
|
32
41
|
],
|
|
@@ -40,28 +49,27 @@
|
|
|
40
49
|
"test": "jest --coverage"
|
|
41
50
|
},
|
|
42
51
|
"dependencies": {
|
|
43
|
-
"@lowdefy/block-utils": "4.0.0-alpha.
|
|
44
|
-
"@lowdefy/helpers": "4.0.0-alpha.
|
|
45
|
-
"react": "18.0.0-
|
|
46
|
-
"react-dom": "18.0.0-
|
|
52
|
+
"@lowdefy/block-utils": "4.0.0-alpha.7",
|
|
53
|
+
"@lowdefy/helpers": "4.0.0-alpha.7",
|
|
54
|
+
"react": "18.0.0-rc.0",
|
|
55
|
+
"react-dom": "18.0.0-rc.0"
|
|
47
56
|
},
|
|
48
57
|
"devDependencies": {
|
|
49
|
-
"@
|
|
50
|
-
"@
|
|
51
|
-
"@
|
|
52
|
-
"@swc/
|
|
53
|
-
"@swc/
|
|
54
|
-
"@
|
|
55
|
-
"@testing-library/dom": "8.10.1",
|
|
58
|
+
"@emotion/jest": "11.7.1",
|
|
59
|
+
"@lowdefy/block-dev": "4.0.0-alpha.7",
|
|
60
|
+
"@swc/cli": "0.1.55",
|
|
61
|
+
"@swc/core": "1.2.135",
|
|
62
|
+
"@swc/jest": "0.2.17",
|
|
63
|
+
"@testing-library/dom": "8.11.3",
|
|
56
64
|
"@testing-library/react": "13.0.0-alpha.4",
|
|
57
65
|
"@testing-library/user-event": "14.0.0-alpha.14",
|
|
58
66
|
"copyfiles": "2.4.1",
|
|
59
|
-
"jest": "27.
|
|
67
|
+
"jest": "27.5.1",
|
|
60
68
|
"jest-serializer-html": "7.1.0",
|
|
61
|
-
"jest-transform-yaml": "0.
|
|
69
|
+
"jest-transform-yaml": "1.0.0"
|
|
62
70
|
},
|
|
63
71
|
"publishConfig": {
|
|
64
72
|
"access": "public"
|
|
65
73
|
},
|
|
66
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "52ec14639d00de910cf9b8ab25bf933ca891cff5"
|
|
67
75
|
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright 2020-2021 Lowdefy, Inc
|
|
3
|
-
|
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
you may not use this file except in compliance with the License.
|
|
6
|
-
You may obtain a copy of the License at
|
|
7
|
-
|
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
|
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
See the License for the specific language governing permissions and
|
|
14
|
-
limitations under the License.
|
|
15
|
-
*/ export default {
|
|
16
|
-
import: {
|
|
17
|
-
block: 'blocks/SkeletonAvatar/SkeletonAvatar.js',
|
|
18
|
-
styles: [
|
|
19
|
-
'blocks/SkeletonAvatar/style.less'
|
|
20
|
-
]
|
|
21
|
-
},
|
|
22
|
-
meta: {
|
|
23
|
-
category: 'display',
|
|
24
|
-
loading: false
|
|
25
|
-
}
|
|
26
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright 2020-2021 Lowdefy, Inc
|
|
3
|
-
|
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
you may not use this file except in compliance with the License.
|
|
6
|
-
You may obtain a copy of the License at
|
|
7
|
-
|
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
|
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
See the License for the specific language governing permissions and
|
|
14
|
-
limitations under the License.
|
|
15
|
-
*/ export default {
|
|
16
|
-
import: {
|
|
17
|
-
block: 'blocks/SkeletonButton/SkeletonButton.js',
|
|
18
|
-
styles: [
|
|
19
|
-
'blocks/SkeletonButton/style.less'
|
|
20
|
-
]
|
|
21
|
-
},
|
|
22
|
-
meta: {
|
|
23
|
-
category: 'display',
|
|
24
|
-
loading: false
|
|
25
|
-
}
|
|
26
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright 2020-2021 Lowdefy, Inc
|
|
3
|
-
|
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
you may not use this file except in compliance with the License.
|
|
6
|
-
You may obtain a copy of the License at
|
|
7
|
-
|
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
|
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
See the License for the specific language governing permissions and
|
|
14
|
-
limitations under the License.
|
|
15
|
-
*/ export default {
|
|
16
|
-
import: {
|
|
17
|
-
block: 'blocks/SkeletonInput/SkeletonInput.js',
|
|
18
|
-
styles: [
|
|
19
|
-
'blocks/SkeletonInput/style.less'
|
|
20
|
-
]
|
|
21
|
-
},
|
|
22
|
-
meta: {
|
|
23
|
-
category: 'display',
|
|
24
|
-
loading: false
|
|
25
|
-
}
|
|
26
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright 2020-2021 Lowdefy, Inc
|
|
3
|
-
|
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
you may not use this file except in compliance with the License.
|
|
6
|
-
You may obtain a copy of the License at
|
|
7
|
-
|
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
|
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
See the License for the specific language governing permissions and
|
|
14
|
-
limitations under the License.
|
|
15
|
-
*/ export default {
|
|
16
|
-
import: {
|
|
17
|
-
block: 'blocks/SkeletonParagraph/SkeletonParagraph.js',
|
|
18
|
-
styles: [
|
|
19
|
-
'blocks/SkeletonParagraph/style.less'
|
|
20
|
-
]
|
|
21
|
-
},
|
|
22
|
-
meta: {
|
|
23
|
-
category: 'display',
|
|
24
|
-
loading: false
|
|
25
|
-
}
|
|
26
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright 2020-2021 Lowdefy, Inc
|
|
3
|
-
|
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
you may not use this file except in compliance with the License.
|
|
6
|
-
You may obtain a copy of the License at
|
|
7
|
-
|
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
|
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
See the License for the specific language governing permissions and
|
|
14
|
-
limitations under the License.
|
|
15
|
-
*/ export default {
|
|
16
|
-
import: {
|
|
17
|
-
block: 'blocks/Spinner/Spinner.js',
|
|
18
|
-
styles: [
|
|
19
|
-
'blocks/Spinner/style.less'
|
|
20
|
-
]
|
|
21
|
-
},
|
|
22
|
-
meta: {
|
|
23
|
-
category: 'display',
|
|
24
|
-
loading: false
|
|
25
|
-
}
|
|
26
|
-
};
|
package/dist/index.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright 2020-2021 Lowdefy, Inc
|
|
3
|
-
|
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
you may not use this file except in compliance with the License.
|
|
6
|
-
You may obtain a copy of the License at
|
|
7
|
-
|
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
|
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
See the License for the specific language governing permissions and
|
|
14
|
-
limitations under the License.
|
|
15
|
-
*/ import IconSpinner from './blocks/IconSpinner/IconSpinner.js';
|
|
16
|
-
import Skeleton from './blocks/Skeleton/Skeleton.js';
|
|
17
|
-
import SkeletonAvatar from './blocks/SkeletonAvatar/SkeletonAvatar.js';
|
|
18
|
-
import SkeletonButton from './blocks/SkeletonButton/SkeletonButton.js';
|
|
19
|
-
import SkeletonInput from './blocks/SkeletonInput/SkeletonInput.js';
|
|
20
|
-
import SkeletonParagraph from './blocks/SkeletonParagraph/SkeletonParagraph.js';
|
|
21
|
-
import Spinner from './blocks/Spinner/Spinner.js';
|
|
22
|
-
export default {
|
|
23
|
-
blocks: {
|
|
24
|
-
IconSpinner,
|
|
25
|
-
Skeleton,
|
|
26
|
-
SkeletonAvatar,
|
|
27
|
-
SkeletonButton,
|
|
28
|
-
SkeletonInput,
|
|
29
|
-
SkeletonParagraph,
|
|
30
|
-
Spinner
|
|
31
|
-
},
|
|
32
|
-
import: {
|
|
33
|
-
styles: []
|
|
34
|
-
}
|
|
35
|
-
};
|