satis 2.1.1 → 2.1.4

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: 950e9a9dad35322c97b45ac960a2a51c1b9ebbccd88974cde2447393f983a8fe
4
- data.tar.gz: 3aebee88a5740e8a8f71f552d069aa883458eb0d08bd8f1c99569f3e43c742b0
3
+ metadata.gz: e26b602df93c17a3366b1e9accf81411659f3b9447183f3b5c8649aa432a6ca4
4
+ data.tar.gz: 7215147b9fe4b0a6e566ffbf883d2bf715c68c449e4c3da5a5fdfee876e7a956
5
5
  SHA512:
6
- metadata.gz: b01661a77ea550e6a39fde7d0b8b50c9b0eba7a68912a122ec12ce25e4e4ee2b27146919dc84271e84ef45132ba44d702bbbc767849cd6a221bd9deb1a7d6e8c
7
- data.tar.gz: 1b20cef8cf3c25a4fdd9cfd8eeb8d3e1a4b9f2a327fee7a596554335a8f3d41cc7c31e7403d672271a9f1ed26a3fdf42109555148248b30207eff68c06c9b1b7
6
+ metadata.gz: 962845e850d1d1311902e45edfea4b349e7b0bdc233cabda73fcb477b5d24321ddddd6d52156d3187a053f5cd4cdd003be176ac373da73d99898c27f22e7c493
7
+ data.tar.gz: 617295f950f9891e74a8c96f5212e3edac351cc488b167479bb4e2ee1d37097f4e2d675825d6f6b4c59a513d86e664d4ee5e1be666741c27478587a0f0e4d03e
@@ -26,7 +26,9 @@ export default class SidebarMenuItemComponentController extends ApplicationContr
26
26
 
27
27
  if (this.hasSubmenuTarget) {
28
28
  this.submenuTarget.classList.remove("hidden")
29
- this.indicatorTarget.setAttribute("data-fa-transform", "rotate-90")
29
+ if(!this.submenuTarget.classList.contains("hidden") && !this.indicatorTarget.hasAttribute("data-fa-transform")){
30
+ this.indicatorTarget.setAttribute("data-fa-transform", "rotate-90")
31
+ }
30
32
  if (this.linkTarget){
31
33
  this.linkTarget.classList.add("focus")
32
34
  }
@@ -44,6 +46,20 @@ export default class SidebarMenuItemComponentController extends ApplicationContr
44
46
  }
45
47
  event.preventDefault()
46
48
  }
49
+ else {
50
+ if(this.linkInUrl || (this.linkTarget.href.length <= 0 && !this.hasActiveLinks)){
51
+ if (this.hasSubmenuTarget){
52
+ this.submenuTarget.classList.toggle("hidden")
53
+ if(!this.submenuTarget.classList.contains("hidden") && !this.indicatorTarget.hasAttribute("data-fa-transform")){
54
+ this.indicatorTarget.setAttribute("data-fa-transform", "rotate-90")
55
+ } else{
56
+ this.indicatorTarget.removeAttribute("data-fa-transform", "rotate-90")
57
+ }
58
+ event.preventDefault()
59
+
60
+ }
61
+ }
62
+ }
47
63
  }
48
64
 
49
65
  get linkInUrl() {
@@ -51,9 +51,12 @@ export default class FieldsForController extends ApplicationController {
51
51
 
52
52
  // Find template and add event listeners
53
53
  let templateElement = this.insertionPointTarget.querySelector(".template")
54
- templateElement.querySelectorAll("input,select").forEach((input) => {
55
- input.addEventListener("change", this.boundMonitorChanges)
56
- })
54
+ setTimeout(() => {
55
+ // add a delay so host can finish dom manipulation and everything is ready
56
+ templateElement.querySelectorAll("input,select").forEach((input) => {
57
+ input.addEventListener("change", this.boundMonitorChanges)
58
+ })
59
+ }, 500)
57
60
  }
58
61
 
59
62
  monitorChanges(event) {
data/lib/satis/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Satis
2
- VERSION = "2.1.1"
2
+ VERSION = "2.1.4"
3
3
  end
data/package.json CHANGED
@@ -5,5 +5,5 @@
5
5
  "postcss-mixins": "^9.0.4",
6
6
  "tailwindcss": "^3.4.1"
7
7
  },
8
- "version": "2.0.9"
8
+ "version": "2.1.4"
9
9
  }
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.1
4
+ version: 2.1.4
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-04-04 00:00:00.000000000 Z
11
+ date: 2024-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: browser