@easyv/config 1.0.54 → 1.0.55

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/lib/animation.js CHANGED
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.animationOfCarousel = exports.animationOfPie = exports["default"] = void 0;
6
+ exports.animationOfCarousel = exports.animationOfPie = exports.dataAnimation = exports["default"] = void 0;
7
7
 
8
8
  var _ = require("./");
9
9
 
@@ -55,6 +55,41 @@ var _default = function _default() {
55
55
  };
56
56
 
57
57
  exports["default"] = _default;
58
+ var defaultDataAnimation = {
59
+ show: false,
60
+ duration: 3
61
+ };
62
+
63
+ var dataAnimation = function dataAnimation() {
64
+ var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultDataAnimation,
65
+ _ref2$show = _ref2.show,
66
+ show = _ref2$show === void 0 ? defaultDataAnimation.show : _ref2$show,
67
+ _ref2$duration = _ref2.duration,
68
+ duration = _ref2$duration === void 0 ? defaultDataAnimation.duration : _ref2$duration;
69
+
70
+ return {
71
+ name: 'dataAnimation',
72
+ displayName: '数据动画',
73
+ value: [{
74
+ name: 'show',
75
+ displayName: '打开',
76
+ value: show,
77
+ type: 'boolean'
78
+ }, {
79
+ rule: [['show', '$eq', true]],
80
+ name: 'duration',
81
+ displayName: '滚动时长',
82
+ value: duration,
83
+ type: 'number',
84
+ config: {
85
+ span: 12,
86
+ suffix: 's'
87
+ }
88
+ }]
89
+ };
90
+ };
91
+
92
+ exports.dataAnimation = dataAnimation;
58
93
  var defaultAnimationOfPie = {
59
94
  show: true,
60
95
  current: {
@@ -66,20 +101,20 @@ var defaultAnimationOfPie = {
66
101
  };
67
102
 
68
103
  var animationOfPie = function animationOfPie() {
69
- var _ref2 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultAnimationOfPie,
70
- _ref2$show = _ref2.show,
71
- show = _ref2$show === void 0 ? defaultAnimationOfPie.show : _ref2$show,
72
- _ref2$current = _ref2.current;
104
+ var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultAnimationOfPie,
105
+ _ref3$show = _ref3.show,
106
+ show = _ref3$show === void 0 ? defaultAnimationOfPie.show : _ref3$show,
107
+ _ref3$current = _ref3.current;
73
108
 
74
- _ref2$current = _ref2$current === void 0 ? defaultAnimationOfPie.current : _ref2$current;
75
- var _ref2$current$heighte = _ref2$current.heighten,
76
- heighten = _ref2$current$heighte === void 0 ? defaultAnimationOfPie.current.heighten : _ref2$current$heighte,
77
- _ref2$current$opacity = _ref2$current.opacity,
78
- opacity = _ref2$current$opacity === void 0 ? defaultAnimationOfPie.current.opacity : _ref2$current$opacity,
79
- _ref2$interval = _ref2.interval,
80
- interval = _ref2$interval === void 0 ? defaultAnimationOfPie.interval : _ref2$interval,
81
- _ref2$interactive = _ref2.interactive,
82
- interactive = _ref2$interactive === void 0 ? defaultAnimationOfPie.interactive : _ref2$interactive;
109
+ _ref3$current = _ref3$current === void 0 ? defaultAnimationOfPie.current : _ref3$current;
110
+ var _ref3$current$heighte = _ref3$current.heighten,
111
+ heighten = _ref3$current$heighte === void 0 ? defaultAnimationOfPie.current.heighten : _ref3$current$heighte,
112
+ _ref3$current$opacity = _ref3$current.opacity,
113
+ opacity = _ref3$current$opacity === void 0 ? defaultAnimationOfPie.current.opacity : _ref3$current$opacity,
114
+ _ref3$interval = _ref3.interval,
115
+ interval = _ref3$interval === void 0 ? defaultAnimationOfPie.interval : _ref3$interval,
116
+ _ref3$interactive = _ref3.interactive,
117
+ interactive = _ref3$interactive === void 0 ? defaultAnimationOfPie.interactive : _ref3$interactive;
83
118
  return {
84
119
  name: 'animation',
85
120
  displayName: '轮播动画',
@@ -158,26 +193,26 @@ var defaultAnimationOfCarousel = {
158
193
  };
159
194
 
160
195
  var animationOfCarousel = function animationOfCarousel() {
161
- var _ref3 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultAnimationOfCarousel,
162
- _ref3$show = _ref3.show,
163
- show = _ref3$show === void 0 ? defaultAnimationOfCarousel.show : _ref3$show,
164
- _ref3$current = _ref3.current;
196
+ var _ref4 = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : defaultAnimationOfCarousel,
197
+ _ref4$show = _ref4.show,
198
+ show = _ref4$show === void 0 ? defaultAnimationOfCarousel.show : _ref4$show,
199
+ _ref4$current = _ref4.current;
165
200
 
166
- _ref3$current = _ref3$current === void 0 ? defaultAnimationOfCarousel.current : _ref3$current;
167
- var _ref3$current$width = _ref3$current.width,
168
- width = _ref3$current$width === void 0 ? defaultAnimationOfCarousel.current.width : _ref3$current$width,
169
- _ref3$current$color = _ref3$current.color,
170
- color = _ref3$current$color === void 0 ? defaultAnimationOfCarousel.current.color : _ref3$current$color,
171
- _ref3$current$textSty = _ref3$current.textStyle,
172
- textStyle = _ref3$current$textSty === void 0 ? defaultAnimationOfCarousel.current.font : _ref3$current$textSty,
173
- _ref3$current$gap = _ref3$current.gap,
174
- gap = _ref3$current$gap === void 0 ? defaultAnimationOfCarousel.current.gap : _ref3$current$gap,
175
- _ref3$interval = _ref3.interval,
176
- interval = _ref3$interval === void 0 ? defaultAnimationOfCarousel.interval : _ref3$interval,
177
- _ref3$rotate = _ref3.rotate,
178
- rotate = _ref3$rotate === void 0 ? defaultAnimationOfCarousel.rotate : _ref3$rotate,
179
- _ref3$interactive = _ref3.interactive,
180
- interactive = _ref3$interactive === void 0 ? defaultAnimationOfCarousel.interactive : _ref3$interactive;
201
+ _ref4$current = _ref4$current === void 0 ? defaultAnimationOfCarousel.current : _ref4$current;
202
+ var _ref4$current$width = _ref4$current.width,
203
+ width = _ref4$current$width === void 0 ? defaultAnimationOfCarousel.current.width : _ref4$current$width,
204
+ _ref4$current$color = _ref4$current.color,
205
+ color = _ref4$current$color === void 0 ? defaultAnimationOfCarousel.current.color : _ref4$current$color,
206
+ _ref4$current$textSty = _ref4$current.textStyle,
207
+ textStyle = _ref4$current$textSty === void 0 ? defaultAnimationOfCarousel.current.font : _ref4$current$textSty,
208
+ _ref4$current$gap = _ref4$current.gap,
209
+ gap = _ref4$current$gap === void 0 ? defaultAnimationOfCarousel.current.gap : _ref4$current$gap,
210
+ _ref4$interval = _ref4.interval,
211
+ interval = _ref4$interval === void 0 ? defaultAnimationOfCarousel.interval : _ref4$interval,
212
+ _ref4$rotate = _ref4.rotate,
213
+ rotate = _ref4$rotate === void 0 ? defaultAnimationOfCarousel.rotate : _ref4$rotate,
214
+ _ref4$interactive = _ref4.interactive,
215
+ interactive = _ref4$interactive === void 0 ? defaultAnimationOfCarousel.interactive : _ref4$interactive;
181
216
  return {
182
217
  name: 'animation',
183
218
  displayName: '轮播动画',
@@ -204,7 +239,7 @@ var animationOfCarousel = function animationOfCarousel() {
204
239
  name: 'textStyle',
205
240
  displayName: '类目文本样式',
206
241
  value: (0, _.font)(textStyle),
207
- type: "textStyle",
242
+ type: 'textStyle',
208
243
  markColorType: 'textColor'
209
244
  }, {
210
245
  name: 'gap',
@@ -212,7 +247,7 @@ var animationOfCarousel = function animationOfCarousel() {
212
247
  value: gap,
213
248
  type: 'number',
214
249
  config: {
215
- suffix: "px"
250
+ suffix: 'px'
216
251
  }
217
252
  }],
218
253
  config: {
@@ -242,7 +277,7 @@ var animationOfCarousel = function animationOfCarousel() {
242
277
  name: 'interactive',
243
278
  displayName: '点击交互',
244
279
  value: interactive,
245
- type: "boolean"
280
+ type: 'boolean'
246
281
  }]
247
282
  };
248
283
  };
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@easyv/config",
3
- "version": "1.0.54",
3
+ "version": "1.0.55",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
7
  "make": "babel src -d lib",
8
8
  "release": "standard-version",
9
- "publish": "npm run make && npm run release && npm publish --access public"
9
+ "publish": "npm run make && npm run release"
10
10
  },
11
11
  "keywords": [],
12
12
  "author": "",
@@ -23,5 +23,10 @@
23
23
  "babel-plugin-transform-import-styles": "0.0.11",
24
24
  "babel-preset-env": "^1.7.0",
25
25
  "standard-version": "^9.3.2"
26
+ },
27
+ "standard-version": {
28
+ "skip": {
29
+ "commit": true
30
+ }
26
31
  }
27
32
  }
package/src/animation.js CHANGED
@@ -1,4 +1,4 @@
1
- import { multiColor,font } from './';
1
+ import { multiColor, font } from './';
2
2
  const animation = {
3
3
  show: false,
4
4
  duration: 3,
@@ -43,6 +43,37 @@ export default ({
43
43
  ],
44
44
  });
45
45
 
46
+ const defaultDataAnimation = {
47
+ show: false,
48
+ duration: 3,
49
+ };
50
+ export const dataAnimation = ({
51
+ show = defaultDataAnimation.show,
52
+ duration = defaultDataAnimation.duration,
53
+ } = defaultDataAnimation) => ({
54
+ name: 'dataAnimation',
55
+ displayName: '数据动画',
56
+ value: [
57
+ {
58
+ name: 'show',
59
+ displayName: '打开',
60
+ value: show,
61
+ type: 'boolean',
62
+ },
63
+ {
64
+ rule: [['show', '$eq', true]],
65
+ name: 'duration',
66
+ displayName: '滚动时长',
67
+ value: duration,
68
+ type: 'number',
69
+ config: {
70
+ span: 12,
71
+ suffix: 's',
72
+ },
73
+ },
74
+ ],
75
+ });
76
+
46
77
  const defaultAnimationOfPie = {
47
78
  show: true,
48
79
  current: { heighten: 10, opacity: 60 },
@@ -62,10 +93,10 @@ export const animationOfPie = ({
62
93
  displayName: '轮播动画',
63
94
  value: [
64
95
  {
65
- name: 'on',
66
- displayName: '开启',
67
- value: show,
68
- type: 'boolean'
96
+ name: 'on',
97
+ displayName: '开启',
98
+ value: show,
99
+ type: 'boolean',
69
100
  },
70
101
  {
71
102
  rule: [['on', '$eq', true]],
@@ -84,8 +115,8 @@ export const animationOfPie = ({
84
115
  value: opacity,
85
116
  type: 'range',
86
117
  config: {
87
- min:0,
88
- max:100,
118
+ min: 0,
119
+ max: 100,
89
120
  suffix: '%',
90
121
  },
91
122
  },
@@ -122,38 +153,38 @@ export const animationOfPie = ({
122
153
  ],
123
154
  });
124
155
 
125
- const defaultAnimationOfCarousel= {
156
+ const defaultAnimationOfCarousel = {
126
157
  show: true,
127
- current: {
128
- width: 0.1,
158
+ current: {
159
+ width: 0.1,
129
160
  color: multiColor(),
130
- font:font(),
131
- gap: 15
161
+ font: font(),
162
+ gap: 15,
132
163
  },
133
164
  interval: 3,
134
165
  rotate: 30,
135
166
  interactive: true,
136
167
  };
137
- export const animationOfCarousel= ({
168
+ export const animationOfCarousel = ({
138
169
  show = defaultAnimationOfCarousel.show,
139
170
  current: {
140
171
  width = defaultAnimationOfCarousel.current.width,
141
172
  color = defaultAnimationOfCarousel.current.color,
142
173
  textStyle = defaultAnimationOfCarousel.current.font,
143
- gap = defaultAnimationOfCarousel.current.gap
174
+ gap = defaultAnimationOfCarousel.current.gap,
144
175
  } = defaultAnimationOfCarousel.current,
145
176
  interval = defaultAnimationOfCarousel.interval,
146
177
  rotate = defaultAnimationOfCarousel.rotate,
147
- interactive = defaultAnimationOfCarousel.interactive
178
+ interactive = defaultAnimationOfCarousel.interactive,
148
179
  } = defaultAnimationOfCarousel) => ({
149
180
  name: 'animation',
150
181
  displayName: '轮播动画',
151
182
  value: [
152
183
  {
153
- name: 'on',
154
- displayName: '开启',
155
- value: show,
156
- type: 'boolean'
184
+ name: 'on',
185
+ displayName: '开启',
186
+ value: show,
187
+ type: 'boolean',
157
188
  },
158
189
  {
159
190
  rule: [['on', '$eq', true]],
@@ -175,19 +206,19 @@ export const animationOfCarousel= ({
175
206
  {
176
207
  name: 'textStyle',
177
208
  displayName: '类目文本样式',
178
- value:font(textStyle),
179
- type:"textStyle",
180
- markColorType: 'textColor'
209
+ value: font(textStyle),
210
+ type: 'textStyle',
211
+ markColorType: 'textColor',
181
212
  },
182
213
  {
183
214
  name: 'gap',
184
215
  displayName: '类目文本间距',
185
216
  value: gap,
186
217
  type: 'number',
187
- config:{
188
- suffix:"px"
189
- }
190
- }
218
+ config: {
219
+ suffix: 'px',
220
+ },
221
+ },
191
222
  ],
192
223
  config: {
193
224
  defaultOpen: true,
@@ -210,8 +241,8 @@ export const animationOfCarousel= ({
210
241
  value: rotate,
211
242
  type: 'number',
212
243
  config: {
213
- min:0,
214
- max:360,
244
+ min: 0,
245
+ max: 360,
215
246
  suffix: '°',
216
247
  },
217
248
  },
@@ -219,7 +250,7 @@ export const animationOfCarousel= ({
219
250
  name: 'interactive',
220
251
  displayName: '点击交互',
221
252
  value: interactive,
222
- type:"boolean"
223
- }
253
+ type: 'boolean',
254
+ },
224
255
  ],
225
256
  });