beyond-rails 0.0.224 → 0.0.229
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/src/js/components/Dropdown.js +27 -5
- data/src/js/components/LineChart.js +14 -1
- data/src/sass/_main.scss +9 -0
- data/src/sass/components/_btn.scss +20 -0
- data/src/sass/components/_table.scss +16 -0
- data/src/sass/layout/_col.scss +1 -2
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6eb3a6d0140c228f4cf167707a98fcc338f005de8f44fdfc160f8f0b31cc95fe
|
4
|
+
data.tar.gz: 7bf45b85d53d4bfbb6856687d31e68fd23f53addaceb8e8c7783bc0847c60f93
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 67f40335950e4e6874d3bd6e7869610d67f9fffffe7708647703036522403f754c733f74bb6e20824255ee408bc40224a1784d56916bcfcea1b9213faaec5e02
|
7
|
+
data.tar.gz: dbd66629f50809e95d2cb86308ce40601bdccfb0681eb5167982c94a76e10a3bb217b12caa4f5484784a973ccb5dc844f25edb9f3e11042ca7c53f1d2a61884e
|
@@ -51,15 +51,28 @@ export default class Dropdown {
|
|
51
51
|
this.addEvents()
|
52
52
|
}
|
53
53
|
|
54
|
-
|
54
|
+
restoreMenuAttrs() {
|
55
|
+
const { menu, place, align } = this
|
56
|
+
if (place) {
|
57
|
+
menu.dataset.place = place
|
58
|
+
}
|
59
|
+
if (align) {
|
60
|
+
menu.dataset.align = align
|
61
|
+
}
|
62
|
+
}
|
63
|
+
|
64
|
+
hideMenu(immediate = false) {
|
55
65
|
const { menu } = this
|
56
66
|
menu.style.transform = 'scale(.8)'
|
57
67
|
menu.style.opacity = 0
|
58
|
-
setTimeout(() => menu.remove(), 300)
|
59
68
|
|
60
|
-
|
61
|
-
|
62
|
-
|
69
|
+
if (immediate) {
|
70
|
+
menu.remove()
|
71
|
+
}
|
72
|
+
else {
|
73
|
+
setTimeout(() => menu.remove(), 300)
|
74
|
+
}
|
75
|
+
this.restoreMenuAttrs()
|
63
76
|
this.isMenuVisible = false
|
64
77
|
}
|
65
78
|
|
@@ -145,4 +158,13 @@ export default class Dropdown {
|
|
145
158
|
this.adjustMenuPos()
|
146
159
|
}, 300))
|
147
160
|
}
|
161
|
+
|
162
|
+
destroy() {
|
163
|
+
// prevent next re-bind error
|
164
|
+
const { menu } = this
|
165
|
+
if (menu) {
|
166
|
+
this.hideMenu(true)
|
167
|
+
document.body.appendChild(menu)
|
168
|
+
}
|
169
|
+
}
|
148
170
|
}
|
@@ -83,6 +83,10 @@ export default class LineChart {
|
|
83
83
|
this.bindPointMouseOver()
|
84
84
|
}
|
85
85
|
|
86
|
+
get noData() {
|
87
|
+
return (this.xLabelRows.length === 0) && (this.yLabelRows.length === 0)
|
88
|
+
}
|
89
|
+
|
86
90
|
get contentWidth() {
|
87
91
|
return this.width - (this.xPadding * 2) - this.yLabelMargin -
|
88
92
|
this.yLabelWidth - (this.xLabelWidth / 2)
|
@@ -469,8 +473,13 @@ export default class LineChart {
|
|
469
473
|
this.setLabelHeights()
|
470
474
|
this.setAxisData()
|
471
475
|
this.updateLabelSizeForAutoStep()
|
476
|
+
|
477
|
+
if (this.noData) {
|
478
|
+
return this.raf(() => this.clear())
|
479
|
+
}
|
480
|
+
|
472
481
|
this.setPointPos()
|
473
|
-
this.draw()
|
482
|
+
this.raf(() => this.draw())
|
474
483
|
})
|
475
484
|
}
|
476
485
|
|
@@ -522,6 +531,10 @@ export default class LineChart {
|
|
522
531
|
this.setLabelHeights()
|
523
532
|
this.setAxisData()
|
524
533
|
this.updateLabelSizeForAutoStep()
|
534
|
+
|
535
|
+
if (this.noData) {
|
536
|
+
return this.raf(() => this.clear())
|
537
|
+
}
|
525
538
|
this.setPointPos()
|
526
539
|
this.raf(() => this.draw())
|
527
540
|
}
|
data/src/sass/_main.scss
CHANGED
@@ -153,6 +153,15 @@ $color-active: #5469d4;
|
|
153
153
|
border: 0;
|
154
154
|
}
|
155
155
|
|
156
|
+
hr {
|
157
|
+
margin-top: 20px;
|
158
|
+
margin-bottom: 20px;
|
159
|
+
border-top: 1px solid #e3e8ee;
|
160
|
+
border-left: 0;
|
161
|
+
border-right: 0;
|
162
|
+
border-bottom: 0;
|
163
|
+
}
|
164
|
+
|
156
165
|
input[type=file], /* FF, IE7+, chrome (except button) */
|
157
166
|
input[type=file]::-webkit-file-upload-button { /* chromes and blink button */
|
158
167
|
cursor: pointer;
|
@@ -97,6 +97,11 @@
|
|
97
97
|
@include ripple(48px, 0, 0);
|
98
98
|
}
|
99
99
|
|
100
|
+
.btn.btn-outline,
|
101
|
+
a.btn.btn-outline {
|
102
|
+
color: $text-color;
|
103
|
+
}
|
104
|
+
|
100
105
|
.btn.btn-outline {
|
101
106
|
background-color: #fff;
|
102
107
|
font-size: 13px;
|
@@ -186,3 +191,18 @@ button.close {
|
|
186
191
|
color: #fff;
|
187
192
|
}
|
188
193
|
}
|
194
|
+
|
195
|
+
.btn-file {
|
196
|
+
position: relative;
|
197
|
+
input[type="file"] {
|
198
|
+
position: absolute;
|
199
|
+
top: 0;
|
200
|
+
right: 0;
|
201
|
+
left: 0;
|
202
|
+
bottom: 0;
|
203
|
+
width: 100%;
|
204
|
+
padding: 0;
|
205
|
+
margin: 0;
|
206
|
+
opacity: 0;
|
207
|
+
}
|
208
|
+
}
|
@@ -4,6 +4,14 @@
|
|
4
4
|
overflow-x: auto;
|
5
5
|
-webkit-overflow-scrolling: touch;
|
6
6
|
}
|
7
|
+
|
8
|
+
%disabled-td {
|
9
|
+
cursor: not-allowed;
|
10
|
+
background-color: #ddd;
|
11
|
+
color: #333;
|
12
|
+
box-shadow: inset 0 -1px #c7c7c7;
|
13
|
+
}
|
14
|
+
|
7
15
|
.table {
|
8
16
|
width: 100%;
|
9
17
|
margin-bottom: 1rem;
|
@@ -51,6 +59,11 @@
|
|
51
59
|
padding: 7px;
|
52
60
|
box-shadow: inset 0 -1px #e3e8ee;
|
53
61
|
}
|
62
|
+
tr.disabled {
|
63
|
+
> td {
|
64
|
+
@extend %disabled-td;
|
65
|
+
}
|
66
|
+
}
|
54
67
|
tr {
|
55
68
|
transition: .3s all;
|
56
69
|
}
|
@@ -61,5 +74,8 @@
|
|
61
74
|
tr:nth-child(even) td {
|
62
75
|
background-color: #f7fafc;
|
63
76
|
}
|
77
|
+
tr.disabled:nth-child(even) td {
|
78
|
+
@extend %disabled-td;
|
79
|
+
}
|
64
80
|
}
|
65
81
|
}
|
data/src/sass/layout/_col.scss
CHANGED
@@ -49,13 +49,12 @@
|
|
49
49
|
}
|
50
50
|
|
51
51
|
@for $i from 1 through length($breakpoints) {
|
52
|
-
$breakpoint: nth($breakpoints, $i);
|
53
52
|
$size: nth($screen-sizes, $i);
|
54
53
|
.col-#{$size} {
|
55
54
|
@extend %col-basic;
|
56
55
|
}
|
57
56
|
@for $j from 1 through $col-total {
|
58
|
-
.col-#{$
|
57
|
+
.col-#{$j},
|
59
58
|
.col-#{$size}-#{$j} {
|
60
59
|
@extend %col-basic;
|
61
60
|
}
|
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.
|
4
|
+
version: 0.0.229
|
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-10-
|
12
|
+
date: 2020-10-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sassc
|
@@ -79,6 +79,20 @@ dependencies:
|
|
79
79
|
- - "~>"
|
80
80
|
- !ruby/object:Gem::Version
|
81
81
|
version: '5.0'
|
82
|
+
- !ruby/object:Gem::Dependency
|
83
|
+
name: will_paginate
|
84
|
+
requirement: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: 3.3.0
|
89
|
+
type: :runtime
|
90
|
+
prerelease: false
|
91
|
+
version_requirements: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - ">="
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: 3.3.0
|
82
96
|
description:
|
83
97
|
email: kmsh3ng@gmail.com
|
84
98
|
executables: []
|