beyond-rails 0.0.285 → 0.0.290

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 99b44239e1951ebd60eb5f8b80a1609e93172b5fead61ccf423a2df51e782e49
4
- data.tar.gz: 20114de4f99d04f58660e3eabaac8a3d3adcfb42040dfa2715c36593da0c19bd
3
+ metadata.gz: f1df85284789a75ab7bf5827f6a535c2f6990469e02d4952c942a9fd460cd792
4
+ data.tar.gz: 34182edb4a1056fd15e72b161e4bbea039fc4a2df7acf55b17f167bc306d5eb3
5
5
  SHA512:
6
- metadata.gz: c07afe4d926ff5303e0a9cb197a207df07cbaf331802dc44eb68b35d38a01205f9d34e2a01b6df9d1ff8c57158a55bc05babaa2bf08ce57eb2e066c13db9837c
7
- data.tar.gz: 2cf313ed7cdd8a38be5414d89e36ab502831bf95c8869deea2dd69fe4404aa805f7b7a4d230792421afe940fea9ad5fc6492106a62f722e25c3d9f1a6b83e656
6
+ metadata.gz: ba5860674693f95ba00f823ec885a6103651abd90117dbfe8febc5fb6f9a4105ecd528f643f25a8d880cc672f9bb7e1d9369eb8b0c32020457855baba6bc2647
7
+ data.tar.gz: c0b3657bbf71261a258178d100cc4d3bd6c076ae30f4edacbadf29502eb1fcc25d198014c97f8a58b9b9251b9f6389d837a4746f0ff443b36774c6a20f1e6026
@@ -81,8 +81,18 @@ export default class Pagination {
81
81
  this.ul.insertBefore(li, this.nextBtn.parentNode)
82
82
  }
83
83
 
84
+ hideInput() {
85
+ this.input.parentNode.style.display = 'none'
86
+ }
87
+
88
+ showInput() {
89
+ this.input.parentNode.style.display = 'flex'
90
+ }
91
+
84
92
  drawRegularPages(currentPage = this.page) {
85
93
 
94
+ this.hideInput()
95
+
86
96
  range(1, this.total + 1)
87
97
  .forEach(page => {
88
98
  const li = this.getLiNode(page)
@@ -95,6 +105,8 @@ export default class Pagination {
95
105
 
96
106
  this.clearPages()
97
107
 
108
+ this.showInput()
109
+
98
110
  const { total } = this
99
111
  const beforeLast = total - 1
100
112
 
@@ -250,11 +262,20 @@ export default class Pagination {
250
262
  if (! this.isValidPage(page)) {
251
263
  return this.setInputDanger()
252
264
  }
265
+ if (page === this.page) {
266
+ return
267
+ }
253
268
  this.setInputNormal()
254
269
  this.setActiveAndChangeInputViewIfNeeded(page)
270
+ this.change(page)
255
271
  })
256
272
  }
257
273
 
274
+ setTotal(total) {
275
+ this.total = total
276
+ this.drawPages()
277
+ }
278
+
258
279
  destroy() {
259
280
  this.clearPages()
260
281
  }
@@ -185,7 +185,7 @@ export default class SearchDropdown {
185
185
  const { renderItem } = this.options
186
186
 
187
187
  const menuItems = items.map((item, i) => {
188
- return renderItem(item, i, (selectedIndex === i))
188
+ return renderItem(item, i, (selectedIndex === i), items)
189
189
  })
190
190
 
191
191
  if (this.noDataMsgVisible) {
@@ -233,26 +233,24 @@ label {
233
233
  &:before {
234
234
  font-family: $beyond-icon-font-name;
235
235
  display: inline-block;
236
+ margin-right: 4px;
237
+ transform: translateY(1px);
236
238
  }
237
239
  }
238
240
 
239
241
  .valid-feedback {
240
242
  color: $txt-color-success;
241
243
  &:before {
242
- margin-right: 4px;
243
- transform: translateY(1px);
244
244
  color: $txt-color-success;
245
- @extend .icon-check:before
245
+ @extend .icon-check:before;
246
246
  }
247
247
  }
248
248
 
249
249
  .invalid-feedback {
250
250
  color: $txt-color-danger;
251
251
  &:before {
252
- margin-right: 4px;
253
- transform: translateY(1px);
254
252
  color: $txt-color-danger;
255
- @extend .icon-exclamation-triangle:before
253
+ @extend .icon-exclamation-triangle:before;
256
254
  }
257
255
  }
258
256
 
@@ -20,6 +20,9 @@ $page-active-color: #3c4258;
20
20
 
21
21
  .pagination-wrap {
22
22
  display: flex;
23
+ .pagination-input {
24
+ display: none;
25
+ }
23
26
  > .input-group {
24
27
  width: initial;
25
28
  }
@@ -38,6 +38,14 @@ label.radio {
38
38
  }
39
39
  }
40
40
  .icon-radio {
41
+
42
+ // prevent overriden by icomoon
43
+ font-family: inherit !important;
44
+ line-height: initial !important;
45
+ &:before {
46
+ content: ''
47
+ }
48
+
41
49
  transform: translateY(-1px);
42
50
  background-color: #fff;
43
51
  border: 0;
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.285
4
+ version: 0.0.290
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: 2021-03-11 00:00:00.000000000 Z
12
+ date: 2021-06-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sassc