@lowdefy/blocks-echarts 4.0.0-alpha.1 → 4.0.0-alpha.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/README.md +3 -2
- package/dist/blocks/EChart/EChart.js +22 -24
- package/dist/{index.js → blocks.js} +2 -10
- package/dist/{blocks/EChart/index.js → types.js} +15 -15
- package/package.json +26 -18
package/README.md
CHANGED
|
@@ -45,15 +45,16 @@ pages:
|
|
|
45
45
|
type: line
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
+
<!-- TODO
|
|
48
49
|
## Other Lowdefy Blocks Packages
|
|
49
50
|
|
|
50
51
|
- [@lowdefy/blocks-template](https://github.com/lowdefy/blocks-template): Lowdefy template for creating blocks.
|
|
51
52
|
- [@lowdefy/blocks-basic](https://github.com/lowdefy/lowdefy/tree/main/packages/blocks/blocksBasic): Official Lowdefy blocks some basic Html elements.
|
|
52
53
|
- [@lowdefy/blocks-antd](https://github.com/lowdefy/lowdefy/tree/main/packages/blocks/blocksAntd): Official Lowdefy blocks for [Antd design](https://ant.design/).
|
|
53
|
-
- [@lowdefy/blocks-color-selectors](https://github.com/lowdefy/lowdefy/tree/main/packages/blocks/
|
|
54
|
+
- [@lowdefy/blocks-color-selectors](https://github.com/lowdefy/lowdefy/tree/main/packages/blocks/blocksColorSelectors): Official Lowdefy blocks for [react-colorful](https://casesandberg.github.io/react-colorful/).
|
|
54
55
|
- [@lowdefy/blocks-markdown](https://github.com/lowdefy/lowdefy/tree/main/packages/blocks/blocksMarkdown): Official Lowdefy blocks to render Markdown.
|
|
55
56
|
- [@lowdefy/blocks-amcharts](https://github.com/lowdefy/blocks-amcharts): Lowdefy blocks to render [AmCharts v4](https://www.amcharts.com/).
|
|
56
|
-
- [@lowdefy/blocks-aggrid](https://github.com/lowdefy/blocks-aggrid): Lowdefy blocks to render [Ag-Grid](https://www.ag-grid.com/) tables.
|
|
57
|
+
- [@lowdefy/blocks-aggrid](https://github.com/lowdefy/blocks-aggrid): Lowdefy blocks to render [Ag-Grid](https://www.ag-grid.com/) tables. -->
|
|
57
58
|
|
|
58
59
|
## More Lowdefy resources
|
|
59
60
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
1
|
/*
|
|
3
|
-
Copyright 2020-
|
|
2
|
+
Copyright 2020-2022 Lowdefy, Inc
|
|
4
3
|
|
|
5
4
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
5
|
you may not use this file except in compliance with the License.
|
|
@@ -18,35 +17,30 @@ import { blockDefaultProps } from '@lowdefy/block-utils';
|
|
|
18
17
|
import { registerTheme } from 'echarts';
|
|
19
18
|
import ReactECharts from 'echarts-for-react';
|
|
20
19
|
let EChart = class EChart extends React.Component {
|
|
21
|
-
triggerEvent(name,
|
|
20
|
+
triggerEvent(name, event) {
|
|
22
21
|
this.props.methods.triggerEvent({
|
|
23
22
|
name,
|
|
24
|
-
event
|
|
23
|
+
event
|
|
25
24
|
});
|
|
26
25
|
}
|
|
27
26
|
render() {
|
|
28
|
-
return(/*#__PURE__*/
|
|
27
|
+
return(/*#__PURE__*/ React.createElement("div", {
|
|
29
28
|
style: {
|
|
30
29
|
height: this.props.properties.height || 300,
|
|
31
30
|
width: this.props.properties.width || '100%'
|
|
31
|
+
}
|
|
32
|
+
}, /*#__PURE__*/ React.createElement(ReactECharts, {
|
|
33
|
+
lazyUpdate: true,
|
|
34
|
+
notMerge: true,
|
|
35
|
+
onEvents: this.onEvents || {},
|
|
36
|
+
option: this.props.properties.option || {},
|
|
37
|
+
opts: {
|
|
38
|
+
height: this.props.properties.height || 300,
|
|
39
|
+
...this.props.properties.init || {}
|
|
32
40
|
},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
onEvents: this.onEvents || {
|
|
37
|
-
},
|
|
38
|
-
option: this.props.properties.option || {
|
|
39
|
-
},
|
|
40
|
-
opts: {
|
|
41
|
-
height: this.props.properties.height || 300,
|
|
42
|
-
...this.props.properties.init || {
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
style: this.props.properties.style || {
|
|
46
|
-
},
|
|
47
|
-
theme: this.props.properties.theme && `custom_theme_${this.props.blockId}`
|
|
48
|
-
})
|
|
49
|
-
}));
|
|
41
|
+
style: this.props.properties.style || {},
|
|
42
|
+
theme: this.props.properties.theme && `custom_theme_${this.props.blockId}`
|
|
43
|
+
})));
|
|
50
44
|
}
|
|
51
45
|
constructor(props){
|
|
52
46
|
super(props);
|
|
@@ -126,12 +120,16 @@ let EChart = class EChart extends React.Component {
|
|
|
126
120
|
this.onEvents = Object.keys(this.allEvents).reduce((acc, eventName)=>{
|
|
127
121
|
if (props.events[eventName]) acc[eventName] = this.allEvents[eventName];
|
|
128
122
|
return acc;
|
|
129
|
-
}, {
|
|
130
|
-
});
|
|
123
|
+
}, {});
|
|
131
124
|
if (props.properties.theme) {
|
|
132
125
|
registerTheme(`custom_theme_${props.blockId}`, props.properties.theme);
|
|
133
126
|
}
|
|
134
127
|
}
|
|
135
128
|
};
|
|
136
129
|
EChart.defaultProps = blockDefaultProps;
|
|
130
|
+
EChart.meta = {
|
|
131
|
+
category: 'display',
|
|
132
|
+
icons: [],
|
|
133
|
+
styles: []
|
|
134
|
+
};
|
|
137
135
|
export default EChart;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Copyright 2020-
|
|
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.
|
|
@@ -12,12 +12,4 @@
|
|
|
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
|
-
export default {
|
|
17
|
-
blocks: {
|
|
18
|
-
EChart
|
|
19
|
-
},
|
|
20
|
-
import: {
|
|
21
|
-
styles: []
|
|
22
|
-
}
|
|
23
|
-
};
|
|
15
|
+
*/ export { default as EChart } from './blocks/EChart/EChart.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright 2020-
|
|
1
|
+
/* eslint-disable import/namespace */ /*
|
|
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.
|
|
@@ -12,18 +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
|
-
meta
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
|
28
28
|
}
|
|
29
29
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lowdefy/blocks-echarts",
|
|
3
|
-
"version": "4.0.0-alpha.
|
|
3
|
+
"version": "4.0.0-alpha.12",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "ECharts Blocks for Lowdefy.",
|
|
6
6
|
"homepage": "https://lowdefy.com",
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
"lowdefy",
|
|
9
9
|
"lowdefy blocks",
|
|
10
10
|
"echarts",
|
|
11
|
-
"charts"
|
|
11
|
+
"charts",
|
|
12
|
+
"lowdefy plugin"
|
|
12
13
|
],
|
|
13
14
|
"bugs": {
|
|
14
15
|
"url": "https://github.com/lowdefy/lowdefy/issues"
|
|
@@ -21,6 +22,10 @@
|
|
|
21
22
|
{
|
|
22
23
|
"name": "Gerrie van Wyk",
|
|
23
24
|
"url": "https://github.com/Gervwyk"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "Sandile Memela",
|
|
28
|
+
"url": "https://github.com/sah-memela"
|
|
24
29
|
}
|
|
25
30
|
],
|
|
26
31
|
"repository": {
|
|
@@ -28,7 +33,11 @@
|
|
|
28
33
|
"url": "https://github.com/lowdefy/lowdefy.git"
|
|
29
34
|
},
|
|
30
35
|
"type": "module",
|
|
31
|
-
"exports":
|
|
36
|
+
"exports": {
|
|
37
|
+
"./*": "./dist/*",
|
|
38
|
+
"./blocks": "./dist/blocks.js",
|
|
39
|
+
"./types": "./dist/types.js"
|
|
40
|
+
},
|
|
32
41
|
"files": [
|
|
33
42
|
"dist/*"
|
|
34
43
|
],
|
|
@@ -42,29 +51,28 @@
|
|
|
42
51
|
"test": "jest --coverage"
|
|
43
52
|
},
|
|
44
53
|
"dependencies": {
|
|
45
|
-
"@lowdefy/block-utils": "4.0.0-alpha.
|
|
46
|
-
"echarts": "5.
|
|
47
|
-
"echarts-for-react": "3.0.
|
|
48
|
-
"react": "
|
|
49
|
-
"react-dom": "
|
|
54
|
+
"@lowdefy/block-utils": "4.0.0-alpha.12",
|
|
55
|
+
"echarts": "5.3.0",
|
|
56
|
+
"echarts-for-react": "3.0.2",
|
|
57
|
+
"react": "17.0.2",
|
|
58
|
+
"react-dom": "17.0.2"
|
|
50
59
|
},
|
|
51
60
|
"devDependencies": {
|
|
52
|
-
"@
|
|
53
|
-
"@
|
|
54
|
-
"@
|
|
55
|
-
"@swc/
|
|
56
|
-
"@swc/
|
|
57
|
-
"@
|
|
58
|
-
"@testing-library/dom": "8.10.1",
|
|
61
|
+
"@emotion/jest": "11.7.1",
|
|
62
|
+
"@lowdefy/block-dev": "4.0.0-alpha.12",
|
|
63
|
+
"@swc/cli": "0.1.55",
|
|
64
|
+
"@swc/core": "1.2.135",
|
|
65
|
+
"@swc/jest": "0.2.17",
|
|
66
|
+
"@testing-library/dom": "8.11.3",
|
|
59
67
|
"@testing-library/react": "13.0.0-alpha.4",
|
|
60
68
|
"@testing-library/user-event": "14.0.0-alpha.14",
|
|
61
69
|
"copyfiles": "2.4.1",
|
|
62
|
-
"jest": "27.
|
|
70
|
+
"jest": "27.5.1",
|
|
63
71
|
"jest-serializer-html": "7.1.0",
|
|
64
|
-
"jest-transform-yaml": "0.
|
|
72
|
+
"jest-transform-yaml": "1.0.0"
|
|
65
73
|
},
|
|
66
74
|
"publishConfig": {
|
|
67
75
|
"access": "public"
|
|
68
76
|
},
|
|
69
|
-
"gitHead": "
|
|
77
|
+
"gitHead": "41b6138a81bee7da362dad06345bc9f87b2c2133"
|
|
70
78
|
}
|