@easyv/config 1.2.15 → 1.2.17

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.
@@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports["default"] = void 0;
8
8
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
9
- /**
10
- * TODO:有个触发回调的类型
9
+ /**
10
+ * TODO:有个触发回调的类型
11
11
  */
12
12
  var defaultAction = 'click';
13
13
  var defaultCallback = {
package/lib/label.js CHANGED
@@ -45,6 +45,7 @@ var _default = function _default() {
45
45
  _ref$font$letterSpaci = _ref$font.letterSpacing,
46
46
  letterSpacing = _ref$font$letterSpaci === void 0 ? defaultLabel.font.letterSpacing : _ref$font$letterSpaci,
47
47
  position = _ref.position,
48
+ reverse = _ref.reverse,
48
49
  _ref$translate = _ref.translate;
49
50
  _ref$translate = _ref$translate === void 0 ? defaultLabel.translate : _ref$translate;
50
51
  var x = _ref$translate.x,
@@ -94,6 +95,13 @@ var _default = function _default() {
94
95
  value: "chartStart"
95
96
  }]
96
97
  }
98
+ }, reverse !== undefined && {
99
+ rule: [["position", "$neq", "middle"], ["position", "$neq", "chartStart"]],
100
+ name: "reverse",
101
+ displayName: "负值反向",
102
+ type: "boolean",
103
+ value: reverse,
104
+ tip: "开启后负值的标签会与正值对称显示"
97
105
  }, _objectSpread({
98
106
  _rule: [["show", "$eq", true]]
99
107
  }, (0, _.translate)(x, y)), (0, _.sc)("suffix", "后缀", "", [(0, _.sc)("content", "内容", "input", ""), (0, _.sc)("font", "字体样式", "textStyle", (0, _.font)()), (0, _.translate)()], {
package/lib/legend.js CHANGED
@@ -15,6 +15,33 @@ var _require = require('.'),
15
15
  font = _require.font,
16
16
  showConfig = _require.show,
17
17
  showRule = _require.showRule;
18
+ var loopConfig = {
19
+ rule: [['show', '$eq', true]],
20
+ name: 'loop',
21
+ displayName: '滚动',
22
+ value: [{
23
+ type: 'boolean',
24
+ name: 'show',
25
+ displayName: '',
26
+ value: false
27
+ }, {
28
+ type: "number",
29
+ name: "height",
30
+ displayName: "限制高度",
31
+ value: 120,
32
+ config: {
33
+ suffix: 'px'
34
+ }
35
+ }, {
36
+ type: "number",
37
+ name: "interval",
38
+ displayName: "轮播间隔",
39
+ value: 3,
40
+ config: {
41
+ suffix: 's'
42
+ }
43
+ }]
44
+ };
18
45
  var defaultFont = font({
19
46
  fontFamily: 'Mircosoft Yahei',
20
47
  fontSize: 12,
@@ -728,7 +755,7 @@ var legendOfPie = function legendOfPie() {
728
755
  options: ['left top', 'center top', 'right top', 'center left', '', 'center right', 'left bottom', 'center bottom', 'right bottom']
729
756
  }
730
757
  }, translateConfig(x, y)]
731
- })],
758
+ }), loopConfig],
732
759
  config: {
733
760
  defaultOpen: true
734
761
  }
package/package.json CHANGED
@@ -1,31 +1,31 @@
1
- {
2
- "name": "@easyv/config",
3
- "version": "1.2.15",
4
- "description": "",
5
- "main": "index.js",
6
- "scripts": {
7
- "make": "babel src -d lib",
8
- "release": "standard-version"
9
- },
10
- "keywords": [],
11
- "author": "",
12
- "license": "ISC",
13
- "devDependencies": {
14
- "@babel/cli": "^7.6.0",
15
- "@babel/core": "^7.11.5",
16
- "@babel/plugin-proposal-class-properties": "^7.10.4",
17
- "@babel/plugin-proposal-export-default-from": "^7.10.4",
18
- "@babel/plugin-transform-runtime": "^7.11.5",
19
- "@babel/preset-env": "^7.11.5",
20
- "@babel/preset-react": "^7.10.4",
21
- "@babel/runtime": "^7.17.7",
22
- "babel-plugin-transform-import-styles": "0.0.11",
23
- "babel-preset-env": "^1.7.0",
24
- "standard-version": "^9.3.2"
25
- },
26
- "standard-version": {
27
- "skip": {
28
- "commit": true
29
- }
30
- }
31
- }
1
+ {
2
+ "name": "@easyv/config",
3
+ "version": "1.2.17",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "make": "babel src -d lib",
8
+ "release": "standard-version"
9
+ },
10
+ "keywords": [],
11
+ "author": "",
12
+ "license": "ISC",
13
+ "devDependencies": {
14
+ "@babel/cli": "^7.6.0",
15
+ "@babel/core": "^7.11.5",
16
+ "@babel/plugin-proposal-class-properties": "^7.10.4",
17
+ "@babel/plugin-proposal-export-default-from": "^7.10.4",
18
+ "@babel/plugin-transform-runtime": "^7.11.5",
19
+ "@babel/preset-env": "^7.11.5",
20
+ "@babel/preset-react": "^7.10.4",
21
+ "@babel/runtime": "^7.17.7",
22
+ "babel-plugin-transform-import-styles": "0.0.11",
23
+ "babel-preset-env": "^1.7.0",
24
+ "standard-version": "^9.3.2"
25
+ },
26
+ "standard-version": {
27
+ "skip": {
28
+ "commit": true
29
+ }
30
+ }
31
+ }
package/src/control.js CHANGED
@@ -1,117 +1,117 @@
1
- const defaultControl={
2
- height:20,
3
- color:"rgba(20, 95, 255, 0.1)",
4
- margin:{
5
- left:40,
6
- right:40
7
- },
8
- gap:20,
9
- drag:{
10
- start:0,
11
- width:30,
12
- color:"RGBA(255, 255, 255, .3)"
13
- }
14
- }
15
-
16
- export const control = ({
17
- height = defaultControl.height,
18
- color = defaultControl.color,
19
- margin:{
20
- left = defaultControl.margin.left,
21
- right = defaultControl.margin.right
22
- } = defaultControl.margin,
23
- gap = defaultControl.gap,
24
- drag:{
25
- start = defaultControl.drag.start,
26
- width = defaultControl.drag.width,
27
- color:dragColor = defaultControl.drag.color
28
- } = defaultControl.drag
29
- } = defaultControl) => {
30
- return {
31
- name: "control",
32
- displayName: "控制条",
33
- value: [
34
- {
35
- name: "height",
36
- displayName: "高度",
37
- value: height,
38
- type: "number",
39
- },
40
- {
41
- name: "color",
42
- displayName: "背景颜色",
43
- value: color,
44
- type: "color",
45
- },
46
- {
47
- type: "group",
48
- name: "margin",
49
- displayName: "边距",
50
- value: [
51
- {
52
- name: "left",
53
- displayName: "左边距",
54
- value: left,
55
- type: "number",
56
- config: {
57
- span: 12,
58
- },
59
- },
60
- {
61
- name: "right",
62
- displayName: "右边距",
63
- value: right,
64
- type: "number",
65
- config: {
66
- span: 12,
67
- },
68
- },
69
- ],
70
- },
71
- {
72
- name:"gap",
73
- displayName:"上间距",
74
- type:"number",
75
- value:gap,
76
- config:{
77
- suffix:"px"
78
- },
79
- tip:"与X轴的距离"
80
- },
81
- {
82
- name: "drag",
83
- displayName: "详情区域",
84
- value: [
85
- {
86
- name: "start",
87
- displayName: "起始位置",
88
- value: start,
89
- type: "range",
90
- config: {
91
- suffix: "%",
92
- min: 0,
93
- max:100
94
- },
95
- },
96
- {
97
- name: "width",
98
- displayName: "宽度",
99
- value: width,
100
- type: "range",
101
- config: {
102
- suffix: "%",
103
- min: 1,
104
- max:100
105
- },
106
- },
107
- {
108
- name: "color",
109
- displayName: "颜色",
110
- value: dragColor,
111
- type: "color",
112
- },
113
- ],
114
- },
115
- ],
116
- };
117
- };
1
+ const defaultControl={
2
+ height:20,
3
+ color:"rgba(20, 95, 255, 0.1)",
4
+ margin:{
5
+ left:40,
6
+ right:40
7
+ },
8
+ gap:20,
9
+ drag:{
10
+ start:0,
11
+ width:30,
12
+ color:"RGBA(255, 255, 255, .3)"
13
+ }
14
+ }
15
+
16
+ export const control = ({
17
+ height = defaultControl.height,
18
+ color = defaultControl.color,
19
+ margin:{
20
+ left = defaultControl.margin.left,
21
+ right = defaultControl.margin.right
22
+ } = defaultControl.margin,
23
+ gap = defaultControl.gap,
24
+ drag:{
25
+ start = defaultControl.drag.start,
26
+ width = defaultControl.drag.width,
27
+ color:dragColor = defaultControl.drag.color
28
+ } = defaultControl.drag
29
+ } = defaultControl) => {
30
+ return {
31
+ name: "control",
32
+ displayName: "控制条",
33
+ value: [
34
+ {
35
+ name: "height",
36
+ displayName: "高度",
37
+ value: height,
38
+ type: "number",
39
+ },
40
+ {
41
+ name: "color",
42
+ displayName: "背景颜色",
43
+ value: color,
44
+ type: "color",
45
+ },
46
+ {
47
+ type: "group",
48
+ name: "margin",
49
+ displayName: "边距",
50
+ value: [
51
+ {
52
+ name: "left",
53
+ displayName: "左边距",
54
+ value: left,
55
+ type: "number",
56
+ config: {
57
+ span: 12,
58
+ },
59
+ },
60
+ {
61
+ name: "right",
62
+ displayName: "右边距",
63
+ value: right,
64
+ type: "number",
65
+ config: {
66
+ span: 12,
67
+ },
68
+ },
69
+ ],
70
+ },
71
+ {
72
+ name:"gap",
73
+ displayName:"上间距",
74
+ type:"number",
75
+ value:gap,
76
+ config:{
77
+ suffix:"px"
78
+ },
79
+ tip:"与X轴的距离"
80
+ },
81
+ {
82
+ name: "drag",
83
+ displayName: "详情区域",
84
+ value: [
85
+ {
86
+ name: "start",
87
+ displayName: "起始位置",
88
+ value: start,
89
+ type: "range",
90
+ config: {
91
+ suffix: "%",
92
+ min: 0,
93
+ max:100
94
+ },
95
+ },
96
+ {
97
+ name: "width",
98
+ displayName: "宽度",
99
+ value: width,
100
+ type: "range",
101
+ config: {
102
+ suffix: "%",
103
+ min: 1,
104
+ max:100
105
+ },
106
+ },
107
+ {
108
+ name: "color",
109
+ displayName: "颜色",
110
+ value: dragColor,
111
+ type: "color",
112
+ },
113
+ ],
114
+ },
115
+ ],
116
+ };
117
+ };
package/src/extent.js CHANGED
@@ -1,42 +1,42 @@
1
- const extent = {
2
- min: "0",
3
- max: "",
4
- customDisplayName: "数值范围",
5
- customName: "extent",
6
- customSuffix: "",
7
- };
8
- export default ({
9
- min = extent.min,
10
- max = extent.max,
11
- customDisplayName = extent.customDisplayName,
12
- customName = extent.customName,
13
- customSuffix = extent.customSuffix,
14
- } = extent) => {
15
- return {
16
- name: customName,
17
- displayName: customDisplayName,
18
- value: [
19
- {
20
- name: "min",
21
- displayName: "最小值",
22
- value: min,
23
- type: "input",
24
- config: {
25
- span: 12,
26
- suffix: customSuffix,
27
- },
28
- },
29
- {
30
- name: "max",
31
- displayName: "最大值",
32
- value: max,
33
- type: "input",
34
- config: {
35
- span: 12,
36
- suffix: customSuffix,
37
- },
38
- },
39
- ],
40
- type: "group",
41
- };
42
- };
1
+ const extent = {
2
+ min: "0",
3
+ max: "",
4
+ customDisplayName: "数值范围",
5
+ customName: "extent",
6
+ customSuffix: "",
7
+ };
8
+ export default ({
9
+ min = extent.min,
10
+ max = extent.max,
11
+ customDisplayName = extent.customDisplayName,
12
+ customName = extent.customName,
13
+ customSuffix = extent.customSuffix,
14
+ } = extent) => {
15
+ return {
16
+ name: customName,
17
+ displayName: customDisplayName,
18
+ value: [
19
+ {
20
+ name: "min",
21
+ displayName: "最小值",
22
+ value: min,
23
+ type: "input",
24
+ config: {
25
+ span: 12,
26
+ suffix: customSuffix,
27
+ },
28
+ },
29
+ {
30
+ name: "max",
31
+ displayName: "最大值",
32
+ value: max,
33
+ type: "input",
34
+ config: {
35
+ span: 12,
36
+ suffix: customSuffix,
37
+ },
38
+ },
39
+ ],
40
+ type: "group",
41
+ };
42
+ };
package/src/index.js CHANGED
@@ -1,106 +1,106 @@
1
- import show, { showRule } from './show';
2
- import font from './font';
3
- import translate, { translate3d } from './translate';
4
- import gridLine from './gridLine';
5
- import tickLine from './tickLine';
6
- import axisLine from './axisLine';
7
- import extent from './extent';
8
- import unit from './unit';
9
- import margin from './margin';
10
- import multiColor from './multiColor';
11
- import animation, {
12
- dataAnimation,
13
- animationOfPie,
14
- animationOfCarousel,
15
- } from './animation';
16
- import dimension from './dimension';
17
- import label, {
18
- labelOfPie,
19
- labelOfRose,
20
- axisLabel,
21
- valueAsixLabel,
22
- } from './label';
23
- import legend, { legendOfPie, legendOfRose, legendOfDoublePie } from './legend';
24
- import tooltip from './tooltip';
25
- import axes, { valueAxis, categoryAxis } from './axes';
26
- import mapping from './mapping';
27
- import { imageGroup } from './imageGroup';
28
- import {
29
- bandSeries,
30
- lineSeries,
31
- areaSeries,
32
- pieSeries,
33
- purePieSeries,
34
- } from './series';
35
- import pie, {
36
- rosePie,
37
- rosePieDecorate,
38
- donut,
39
- carouselDonut,
40
- nestRosePie,
41
- carouselDonut2,
42
- current as pieCurrent,
43
- } from './pie';
44
- import brush from './brush';
45
- import interaction from './interaction';
46
- import sc from './sc';
47
- import shadow from './shadow';
48
- import textOverflow from './textOverflow';
49
- import baseLine from './baseLine';
50
- import { control } from './control';
51
- import pieTooltip from './pieTooltip';
52
- export {
53
- pieTooltip,
54
- control,
55
- show,
56
- showRule,
57
- font,
58
- tooltip,
59
- translate,
60
- translate3d,
61
- textOverflow,
62
- extent,
63
- unit,
64
- margin,
65
- multiColor,
66
- animation,
67
- dataAnimation,
68
- animationOfPie,
69
- animationOfCarousel,
70
- dimension,
71
- gridLine,
72
- tickLine,
73
- axisLine,
74
- valueAxis,
75
- categoryAxis,
76
- axes,
77
- imageGroup,
78
- mapping,
79
- bandSeries,
80
- lineSeries,
81
- areaSeries,
82
- pieSeries,
83
- purePieSeries,
84
- brush,
85
- interaction,
86
- legend,
87
- legendOfPie,
88
- legendOfRose,
89
- legendOfDoublePie,
90
- label,
91
- labelOfPie,
92
- labelOfRose,
93
- axisLabel,
94
- valueAsixLabel,
95
- pie,
96
- rosePie,
97
- nestRosePie,
98
- rosePieDecorate,
99
- donut,
100
- carouselDonut,
101
- carouselDonut2,
102
- pieCurrent,
103
- sc,
104
- shadow,
105
- baseLine
106
- };
1
+ import show, { showRule } from './show';
2
+ import font from './font';
3
+ import translate, { translate3d } from './translate';
4
+ import gridLine from './gridLine';
5
+ import tickLine from './tickLine';
6
+ import axisLine from './axisLine';
7
+ import extent from './extent';
8
+ import unit from './unit';
9
+ import margin from './margin';
10
+ import multiColor from './multiColor';
11
+ import animation, {
12
+ dataAnimation,
13
+ animationOfPie,
14
+ animationOfCarousel,
15
+ } from './animation';
16
+ import dimension from './dimension';
17
+ import label, {
18
+ labelOfPie,
19
+ labelOfRose,
20
+ axisLabel,
21
+ valueAsixLabel,
22
+ } from './label';
23
+ import legend, { legendOfPie, legendOfRose, legendOfDoublePie } from './legend';
24
+ import tooltip from './tooltip';
25
+ import axes, { valueAxis, categoryAxis } from './axes';
26
+ import mapping from './mapping';
27
+ import { imageGroup } from './imageGroup';
28
+ import {
29
+ bandSeries,
30
+ lineSeries,
31
+ areaSeries,
32
+ pieSeries,
33
+ purePieSeries,
34
+ } from './series';
35
+ import pie, {
36
+ rosePie,
37
+ rosePieDecorate,
38
+ donut,
39
+ carouselDonut,
40
+ nestRosePie,
41
+ carouselDonut2,
42
+ current as pieCurrent,
43
+ } from './pie';
44
+ import brush from './brush';
45
+ import interaction from './interaction';
46
+ import sc from './sc';
47
+ import shadow from './shadow';
48
+ import textOverflow from './textOverflow';
49
+ import baseLine from './baseLine';
50
+ import { control } from './control';
51
+ import pieTooltip from './pieTooltip';
52
+ export {
53
+ pieTooltip,
54
+ control,
55
+ show,
56
+ showRule,
57
+ font,
58
+ tooltip,
59
+ translate,
60
+ translate3d,
61
+ textOverflow,
62
+ extent,
63
+ unit,
64
+ margin,
65
+ multiColor,
66
+ animation,
67
+ dataAnimation,
68
+ animationOfPie,
69
+ animationOfCarousel,
70
+ dimension,
71
+ gridLine,
72
+ tickLine,
73
+ axisLine,
74
+ valueAxis,
75
+ categoryAxis,
76
+ axes,
77
+ imageGroup,
78
+ mapping,
79
+ bandSeries,
80
+ lineSeries,
81
+ areaSeries,
82
+ pieSeries,
83
+ purePieSeries,
84
+ brush,
85
+ interaction,
86
+ legend,
87
+ legendOfPie,
88
+ legendOfRose,
89
+ legendOfDoublePie,
90
+ label,
91
+ labelOfPie,
92
+ labelOfRose,
93
+ axisLabel,
94
+ valueAsixLabel,
95
+ pie,
96
+ rosePie,
97
+ nestRosePie,
98
+ rosePieDecorate,
99
+ donut,
100
+ carouselDonut,
101
+ carouselDonut2,
102
+ pieCurrent,
103
+ sc,
104
+ shadow,
105
+ baseLine
106
+ };