beyond-rails 0.0.205 → 0.0.211

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: f84184cdf5a61c85e88fe53777de533a82fb8fb12d4c692bab16030947fa10ce
4
- data.tar.gz: b4ca0e7e8f38d2ad7cc7397ec53a8e762dd5efbebd9083c8e9ab05b88a3692fc
3
+ metadata.gz: 6407e05c31dcab18c92de68c77c556eecb6d50cf900a4981bd025e14c0dd2329
4
+ data.tar.gz: 8754a1b9acc9ba94fcea7dce15c47de426a5eff296baae03dca5d4c122280540
5
5
  SHA512:
6
- metadata.gz: 347a98b761bb5ae247cedb09105381edade5beac81ae3845b7cef02570aaf3034871a37877248e5cf276870b10c8d362022967a10c90509c41f382fc0e3a4f6f
7
- data.tar.gz: f7563a13190a39ddd6a63dafceef653096eef974900d50ba832a08834126f724802fe4206dd93aa61c874a007d45a2251905b0e786438b519e1f75ff95c5fb62
6
+ metadata.gz: 357f6a9f9537bf40ce92fbd7ff28f8b6a8575a842c0934c4b803115d44a5163c0441a792a2bb59ae107ff93a3cf6405038400b9cbe45cf6044a9a34bdcb44959
7
+ data.tar.gz: 01fa95db2b046ab26f27db76e04166d67501c3d29a7eca762cb07487bd98865da31e239c3454ce41940c8417f2869563de86d21625d03f267dad6b8aeb30caae
@@ -14,6 +14,7 @@ export default class TimeInput {
14
14
  this.options = options
15
15
  this.tz = options.tz || DEFAULT_TIMEZONE
16
16
  this.timePattern = options.timePattern || 'HH:mm'
17
+ this._skipDomChecking = true
17
18
 
18
19
  this.init()
19
20
  }
@@ -1,11 +1,20 @@
1
1
  import { isFunction } from '../utils'
2
+ import isUndef from '../utils/isUndef'
2
3
  import createdComponents from '../consts/createdComponents'
3
4
 
5
+ const domMap = new Map()
6
+
4
7
  export default function supportDom(target) {
5
8
 
6
9
  return class extends target {
7
10
 
8
11
  init() {
12
+ if (domMap.has(this.dom) && isUndef(this._skipDomChecking)) {
13
+ console.warn('This dom has already been initialized.', this.dom)
14
+ return
15
+ }
16
+ this.setDomToMap()
17
+
9
18
  this._listeners = []
10
19
  this._externalListeners = []
11
20
  if (isFunction(super.init)) {
@@ -14,6 +23,20 @@ export default function supportDom(target) {
14
23
  createdComponents.push(this)
15
24
  }
16
25
 
26
+ setDomToMap() {
27
+ const { dom } = this
28
+ if (dom) {
29
+ domMap.set(dom, true)
30
+ }
31
+ }
32
+
33
+ deleteDomFromMap() {
34
+ const { dom } = this
35
+ if (dom) {
36
+ domMap.delete(dom)
37
+ }
38
+ }
39
+
17
40
  on(name, func) {
18
41
  this._externalListeners.push({ name, func })
19
42
  }
@@ -36,6 +59,7 @@ export default function supportDom(target) {
36
59
  }
37
60
 
38
61
  destroy() {
62
+ this.deleteDomFromMap()
39
63
  this._externalListeners.length = 0
40
64
  this.removeEvents()
41
65
  if (isFunction(super.destroy)) {
@@ -2,10 +2,8 @@
2
2
  [class^="icon-"] {
3
3
  font-size: 11px;
4
4
  color: #4f566b;
5
- margin-left: 4px;
5
+ margin-left: .7em;
6
6
  display: inline-block;
7
- vertical-align: middle;
8
- transform: translateY(-1px);
9
7
  }
10
8
  [class^="icon-"].no-text {
11
9
  margin-left: 0;
@@ -75,6 +75,17 @@ fieldset {
75
75
  }
76
76
  }
77
77
 
78
+ label.required {
79
+ &:after {
80
+ display: inline-block;
81
+ margin-left: 4px;
82
+ content: '*';
83
+ color: #6772e5;
84
+ font-size: 16px;
85
+ transform: translateY(-2px);
86
+ }
87
+ }
88
+
78
89
  .form-inline {
79
90
  display: flex;
80
91
  align-items: center;
@@ -93,7 +104,7 @@ fieldset {
93
104
  .hint.hint-danger {
94
105
  color: #e03953;
95
106
  &:before {
96
- font-family: 'icomoon';
107
+ font-family: $beyond-icon-font-name;
97
108
  margin-right: 4px;
98
109
  display: inline-block;
99
110
  transform: translateY(1px);
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.205
4
+ version: 0.0.211
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-09-22 00:00:00.000000000 Z
12
+ date: 2020-09-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sassc