stimulus-library 0.7.2 → 0.7.3

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.
@@ -2886,6 +2886,9 @@ function signalConnectEvent(name) {
2886
2886
  function signalValueEvent(name) {
2887
2887
  return signalEventName(name, "value");
2888
2888
  }
2889
+ function signalVisibilityEvent(name, action) {
2890
+ return signalEventName(`${name}:${action}`, "visibility");
2891
+ }
2889
2892
  class SignalActionController extends BaseController {
2890
2893
  get _predicates() {
2891
2894
  return extractPredicates(this.whenValue);
@@ -3004,10 +3007,10 @@ class SignalVisibilityController extends BaseController {
3004
3007
  return;
3005
3008
  }
3006
3009
  if (this._predicates.every((predicate) => predicate(value))) {
3007
- this.dispatchEvent(this.el, "signal-visibility:show", { detail: { predicate: this.showValue, value } });
3010
+ this.dispatchEvent(this.el, signalVisibilityEvent(this.nameValue, "show"), { detail: { predicate: this.showValue, value } });
3008
3011
  this.removeHideClasses(this.el);
3009
3012
  } else {
3010
- this.dispatchEvent(this.el, "signal-visibility:hide", { detail: { predicate: this.showValue, value } });
3013
+ this.dispatchEvent(this.el, signalVisibilityEvent(this.nameValue, "hide"), { detail: { predicate: this.showValue, value } });
3011
3014
  this.addHideClasses(this.el);
3012
3015
  }
3013
3016
  }