beyond-rails 0.0.274 → 0.0.276

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '019b06ed5825f1ea7d525d647ba1f118d676a311ebf6c5ff652074d43b2bcf75'
4
- data.tar.gz: 24e79142445705b4ec67ef98f068b98b219bdfae0b0434e54d3e4bc100c95c9d
3
+ metadata.gz: '0587787bc9b1b01ca9b6adfee2492dbd79f4a83b275df96ea58c90bde40e7d55'
4
+ data.tar.gz: 8ef857ab342e1d0935de5fef72c256ff684c57ecc53f3b26f219b8401b06972d
5
5
  SHA512:
6
- metadata.gz: fbffbf93644151d9efb3ffa39adcf053234e78eeefaf441336e295adff02277239b6a6464993d2fa891b9ffb8acf6476eca915ebb550f033b77d67717d4dd5a8
7
- data.tar.gz: 000f1dfd749a56f479de5765897cfa20edf97cae9320ffbee308e742d434e6c24ad72b62e2979cd2445250e6441de34299e808af99e170445998ba3c1841ca84
6
+ metadata.gz: fa68191ab050166c130c418089b0127286b3998b61688ced221c0627ed055aa4a7f391273f74de49debeb13a3942ed209e47e5f17ad77e0bfa50e00d76a68a74
7
+ data.tar.gz: 07bbf67a42392542a4fb26532f4970ff47fce89b0c5c7458099fcc10fa6023bcc856064e9d21829ca246b64f1aa5f9d482bb045e21d6cd498fba8c195d41e44a
@@ -63,7 +63,12 @@ export default class Datepicker {
63
63
  this.focused = true
64
64
  this.clearInputStatus()
65
65
  this.dateInput.setActive(true)
66
- this.dateMenu.setDate({ date: this.menuDate })
66
+
67
+ this.dateMenu.setDate({
68
+ date: this.menuDate,
69
+ startDate: this.date
70
+ })
71
+
67
72
  this.dateMenu.show(this.dom)
68
73
  this.timeMenu && this.timeMenu.hide()
69
74
  }
@@ -88,7 +93,8 @@ export default class Datepicker {
88
93
  return
89
94
  }
90
95
 
91
- const res = parse(value, dateInput.datePattern, date)
96
+ const res = parse(value, dateInput.datePattern, date || new Date())
97
+
92
98
  this.nextDate = null
93
99
  if (res.toString() === 'Invalid Date') {
94
100
  return dateInput.setDanger(true)
@@ -107,16 +113,17 @@ export default class Datepicker {
107
113
  handleDateInputBlur() {
108
114
  const { nextDate, date, dateInput } = this
109
115
 
110
- if (date === null) {
116
+ if ((date === null) && (nextDate === null)) {
111
117
  dateInput.setDate(null)
112
118
  this.timeInput && this.timeInput.setDate(null)
113
119
  this._blurTimer = setTimeout(() => this.emitChange(), 50)
114
120
  }
115
121
  else if (nextDate) {
116
122
  this.date = nextDate
123
+ this.menuDate = nextDate
117
124
  dateInput.setDate(nextDate)
118
- this.dateMenu.setDate({ startDate: nextDate })
119
125
  this.nextDate = null
126
+ this.emitChange()
120
127
  }
121
128
  else {
122
129
  dateInput.setDate(date)
@@ -16,6 +16,7 @@ export default class PieChart {
16
16
  this.total = 0
17
17
 
18
18
  this.options = options
19
+ this.labelVisible = isDef(options.labelVisible) ? options.labelVisible : true
19
20
  this.height = options.height
20
21
  this.width = options.width
21
22
  this.padding = isDef(options.padding) ? options.padding : 30
@@ -236,8 +237,10 @@ export default class PieChart {
236
237
  this.total = data.reduce((t, row) => t + row.value, 0)
237
238
  this.data = this.setAngles(data)
238
239
  this.raf(() => {
239
- const labels = this.data.map(row => row.label)
240
- this.drawLabels(labels, this.styles)
240
+ if (this.labelVisible) {
241
+ const labels = this.data.map(row => row.label)
242
+ this.drawLabels(labels, this.styles)
243
+ }
241
244
  this.draw()
242
245
  })
243
246
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beyond-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.274
4
+ version: 0.0.276
5
5
  platform: ruby
6
6
  authors:
7
7
  - kmsheng
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-12-31 00:00:00.000000000 Z
12
+ date: 2021-01-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sassc
@@ -288,7 +288,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
288
288
  - !ruby/object:Gem::Version
289
289
  version: '0'
290
290
  requirements: []
291
- rubygems_version: 3.0.8
291
+ rubygems_version: 3.0.9
292
292
  signing_key:
293
293
  specification_version: 4
294
294
  summary: beyond is a collection of frontend components which aims for admin website.