satis 2.1.20 → 2.1.21
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ca75490dbab4611d2d0a1b319d18476d2fbc0f6f632a9445a5774c9413dd2cc
|
4
|
+
data.tar.gz: bd10e5cf8b817f3d504bedf42aab73b2b36c1696abf09cb411ceaf2c1a8c8647
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e6e64c1b2953ecdbf9e8c7a2c9fa641ffbb45e8306a1d1d2661ca6a065c10adfd3eb1938fd5b42926c64ee78e55d7b4efde94fc5b8acf0cf4e426531b86e228
|
7
|
+
data.tar.gz: 6b3bc08e281f8c740984aff0c8a37eb14d62f6f28e91ea1c8287b565f5c2c5f835738d75795e6aa785d9bdb73c377a25dea9589fff84ac31c734d158ad8021fc
|
@@ -43,7 +43,7 @@ export default class extends ApplicationController {
|
|
43
43
|
* Make sure that the toggle happens after the event bubble so any listeners are able to
|
44
44
|
* process before we overwrite the template nodes that are possibly updated and reinsert new nodes.
|
45
45
|
*/
|
46
|
-
setTimeout(()=>{
|
46
|
+
setTimeout(() => {
|
47
47
|
this.toggle(this.currentValue)
|
48
48
|
})
|
49
49
|
}
|
@@ -57,8 +57,10 @@ export default class extends ApplicationController {
|
|
57
57
|
|
58
58
|
this.insertionTarget.childNodes.forEach(iNode => {
|
59
59
|
if (iNode.getAttribute("data-toggleable-node-id") == targetNodeId) {
|
60
|
-
child.
|
61
|
-
|
60
|
+
if (child.parentElement) {
|
61
|
+
child.outerHTML = iNode.outerHTML
|
62
|
+
iNode.remove()
|
63
|
+
}
|
62
64
|
}
|
63
65
|
})
|
64
66
|
})
|
@@ -70,7 +72,7 @@ export default class extends ApplicationController {
|
|
70
72
|
// Reinsert elements
|
71
73
|
this.toggleableTargets.forEach((element) => {
|
72
74
|
if (element.getAttribute("data-toggle-value") == value || (element.getAttribute("data-toggle-not-value") != null && element.getAttribute("data-toggle-not-value") != value)) {
|
73
|
-
element.content.childNodes.forEach(node =>
|
75
|
+
element.content.childNodes.forEach(node => this.setUniqueId(node))
|
74
76
|
|
75
77
|
let toggleContent = document.importNode(element.content, true)
|
76
78
|
toggleContent.childNodes.forEach((child) => {
|
@@ -91,8 +93,8 @@ export default class extends ApplicationController {
|
|
91
93
|
}
|
92
94
|
}
|
93
95
|
|
94
|
-
setUniqueId(node)
|
95
|
-
if(node.getAttribute("data-toggleable-node-id")) return;
|
96
|
+
setUniqueId(node) {
|
97
|
+
if (node.getAttribute("data-toggleable-node-id")) return;
|
96
98
|
const dateString = Date.now().toString(36);
|
97
99
|
const randomness = Math.random().toString(36).substring(2);
|
98
100
|
node.setAttribute("data-toggleable-node-id", dateString + randomness)
|
data/lib/satis/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: satis
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tom de Grunt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-06-
|
11
|
+
date: 2024-06-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: browser
|