@kalel1500/kalion-js 0.15.0-beta.0 → 0.15.1-beta.0

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.
@@ -492,7 +492,8 @@ var FModal = class FModal {
492
492
  $modalElement;
493
493
  $spinnerElements;
494
494
  $messageElements;
495
- static registryAbort = /* @__PURE__ */ new Map();
495
+ static registryAbortClick = /* @__PURE__ */ new Map();
496
+ static registryAbortChange = /* @__PURE__ */ new Map();
496
497
  static registryModal = /* @__PURE__ */ new Map();
497
498
  constructor(id, options) {
498
499
  this.id = id;
@@ -533,8 +534,10 @@ var FModal = class FModal {
533
534
  ...options?.instanceOptions
534
535
  });
535
536
  this.removeListener();
536
- const abortController = new AbortController();
537
- FModal.registryAbort.set(id, abortController);
537
+ const abortControllerClick = new AbortController();
538
+ const abortControllerChange = new AbortController();
539
+ FModal.registryAbortClick.set(id, abortControllerClick);
540
+ FModal.registryAbortChange.set(id, abortControllerChange);
538
541
  FModal.registryModal.set(id, this.modal);
539
542
  this.$modalElement?.addEventListener("click", async (e) => {
540
543
  const target = e.target;
@@ -562,7 +565,11 @@ var FModal = class FModal {
562
565
  }
563
566
  }
564
567
  if (options?.onModalClick) options?.onModalClick(this, target);
565
- }, { signal: abortController.signal });
568
+ }, { signal: abortControllerClick.signal });
569
+ this.$modalElement?.addEventListener("change", async (e) => {
570
+ const target = e.target;
571
+ if (options?.onModalChange) options?.onModalChange(this, target);
572
+ }, { signal: abortControllerChange.signal });
566
573
  }
567
574
  hide() {
568
575
  this.modal.hide();
@@ -583,10 +590,15 @@ var FModal = class FModal {
583
590
  FModal.removeListener(this.id);
584
591
  }
585
592
  static removeListener(id) {
586
- const abortController = FModal.registryAbort.get(id);
587
- if (abortController) {
588
- abortController.abort();
589
- FModal.registryAbort.delete(id);
593
+ const abortControllerClick = FModal.registryAbortClick.get(id);
594
+ if (abortControllerClick) {
595
+ abortControllerClick.abort();
596
+ FModal.registryAbortClick.delete(id);
597
+ }
598
+ const abortControllerChange = FModal.registryAbortChange.get(id);
599
+ if (abortControllerChange) {
600
+ abortControllerChange.abort();
601
+ FModal.registryAbortChange.delete(id);
590
602
  }
591
603
  }
592
604
  showMessage({ message, type, autoHide = false, hideAfter = 3e3 }) {