@lowdefy/blocks-basic 4.0.0-alpha.8 → 4.0.0-alpha.9

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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -29,9 +29,9 @@ function _extends() {
29
29
  };
30
30
  return _extends.apply(this, arguments);
31
31
  }
32
- const AnchorBlock = ({ blockId , events , components: { Icon , Link } , loading , methods , properties , })=>{
33
- const showLoading = get(events, 'onClick.loading') || loading;
34
- const disabled = properties.disabled || showLoading;
32
+ const AnchorBlock = ({ blockId , events , components: { Icon , Link } , methods , properties })=>{
33
+ const disabled = properties.disabled || get(events, 'onClick.loading');
34
+ const { icon , title , ...linkProperties } = properties;
35
35
  return(/*#__PURE__*/ React.createElement(Link, _extends({
36
36
  id: blockId,
37
37
  className: methods.makeCssClass([
@@ -45,26 +45,22 @@ const AnchorBlock = ({ blockId , events , components: { Icon , Link } , loading
45
45
  onClick: ()=>methods.triggerEvent({
46
46
  name: 'onClick'
47
47
  })
48
- }, properties), (defaultTitle)=>/*#__PURE__*/ React.createElement(React.Fragment, null, properties.icon && /*#__PURE__*/ React.createElement(Icon, {
48
+ }, linkProperties), (defaultTitle)=>/*#__PURE__*/ React.createElement(React.Fragment, null, icon && /*#__PURE__*/ React.createElement(Icon, {
49
49
  blockId: `${blockId}_icon`,
50
50
  events: events,
51
- properties: showLoading ? {
52
- name: 'LoadingOutlined',
51
+ properties: get(events, 'onClick.loading') ? {
52
+ name: 'AiOutlineLoading3Quarters',
53
53
  spin: true
54
- } : properties.icon
55
- }) + ` `, properties.title || defaultTitle)
54
+ } : icon
55
+ }), title || defaultTitle)
56
56
  ));
57
57
  };
58
58
  AnchorBlock.defaultProps = blockDefaultProps;
59
59
  AnchorBlock.meta = {
60
60
  category: 'display',
61
- loading: {
62
- type: 'SkeletonParagraph',
63
- properties: {
64
- lines: 1
65
- }
66
- },
67
- icons: [],
61
+ icons: [
62
+ 'AiOutlineLoading3Quarters'
63
+ ],
68
64
  styles: []
69
65
  };
70
66
  export default AnchorBlock;
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "icon": {
39
39
  "type": ["string", "object"],
40
- "description": "Name of an Ant Design Icon or properties of an Icon block for anchor icon.",
40
+ "description": "Name of an React-Icon (See <a href='https://react-icons.github.io/react-icons/'>all icons</a>) or properties of an Icon block for anchor icon.",
41
41
  "docs": {
42
42
  "displayType": "icon"
43
43
  }
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -33,7 +33,6 @@ const Box = ({ blockId , content , events , methods , properties })=>/*#__PURE_
33
33
  Box.defaultProps = blockDefaultProps;
34
34
  Box.meta = {
35
35
  category: 'container',
36
- loading: false,
37
36
  icons: [],
38
37
  styles: []
39
38
  };
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -50,7 +50,6 @@ let DangerousHtml = class DangerousHtml extends React.Component {
50
50
  DangerousHtml.defaultProps = blockDefaultProps;
51
51
  DangerousHtml.meta = {
52
52
  category: 'display',
53
- loading: false,
54
53
  icons: [],
55
54
  styles: []
56
55
  };
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -25,7 +25,6 @@ const HtmlBlock = ({ blockId , properties , methods })=>/*#__PURE__*/ React.cre
25
25
  HtmlBlock.defaultProps = blockDefaultProps;
26
26
  HtmlBlock.meta = {
27
27
  category: 'display',
28
- loading: false,
29
28
  icons: [],
30
29
  styles: []
31
30
  };
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -33,7 +33,6 @@ const IconBlock = ({ components: { Icon } , ...props })=>/*#__PURE__*/ React.cr
33
33
  IconBlock.defaultProps = blockDefaultProps;
34
34
  IconBlock.meta = {
35
35
  category: 'display',
36
- loading: false,
37
36
  icons: [],
38
37
  styles: []
39
38
  };
@@ -13,7 +13,7 @@
13
13
  },
14
14
  "name": {
15
15
  "type": "string",
16
- "default": "AiCloseCircleOutlined",
16
+ "default": "AiOutlineCloseCircle",
17
17
  "description": "Name of icon to be displayed."
18
18
  },
19
19
  "rotate": {
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -49,7 +49,6 @@ const ImgBlock = ({ blockId , events , properties , methods })=>{
49
49
  ImgBlock.defaultProps = blockDefaultProps;
50
50
  ImgBlock.meta = {
51
51
  category: 'display',
52
- loading: false,
53
52
  icons: [],
54
53
  styles: []
55
54
  };
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -48,7 +48,6 @@ List.defaultProps = blockDefaultProps;
48
48
  List.meta = {
49
49
  category: 'list',
50
50
  valueType: 'array',
51
- loading: false,
52
51
  icons: [],
53
52
  styles: []
54
53
  };
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -33,7 +33,6 @@ const Span = ({ blockId , content , events , methods , properties })=>/*#__PURE
33
33
  Span.defaultProps = blockDefaultProps;
34
34
  Span.meta = {
35
35
  category: 'container',
36
- loading: false,
37
36
  icons: [],
38
37
  styles: []
39
38
  };
package/dist/blocks.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
package/dist/types.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable import/namespace */ /*
2
- Copyright 2020-2021 Lowdefy, Inc
2
+ Copyright 2020-2022 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowdefy/blocks-basic",
3
- "version": "4.0.0-alpha.8",
3
+ "version": "4.0.0-alpha.9",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Basic html Lowdefy blocks.",
6
6
  "homepage": "https://lowdefy.com",
@@ -49,15 +49,15 @@
49
49
  "test": "jest --coverage"
50
50
  },
51
51
  "dependencies": {
52
- "@lowdefy/block-utils": "4.0.0-alpha.8",
53
- "@lowdefy/helpers": "4.0.0-alpha.8",
52
+ "@lowdefy/block-utils": "4.0.0-alpha.9",
53
+ "@lowdefy/helpers": "4.0.0-alpha.9",
54
54
  "dompurify": "2.3.5",
55
55
  "react": "17.0.2",
56
56
  "react-dom": "17.0.2"
57
57
  },
58
58
  "devDependencies": {
59
59
  "@emotion/jest": "11.7.1",
60
- "@lowdefy/block-dev": "4.0.0-alpha.8",
60
+ "@lowdefy/block-dev": "4.0.0-alpha.9",
61
61
  "@swc/cli": "0.1.55",
62
62
  "@swc/core": "1.2.135",
63
63
  "@swc/jest": "0.2.17",
@@ -72,5 +72,5 @@
72
72
  "publishConfig": {
73
73
  "access": "public"
74
74
  },
75
- "gitHead": "9d56b83cf45e868afe3a1eeba750fe826eb74c8c"
75
+ "gitHead": "98b544eca231bdcfca6c3a8601a891835d5ce571"
76
76
  }