myio-js-library 0.1.34 → 0.1.35

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.
package/dist/index.cjs CHANGED
@@ -7509,12 +7509,12 @@ var SettingsModalView = class {
7509
7509
  constructor(config) {
7510
7510
  this.config = config;
7511
7511
  this.createModal();
7512
- this.attachEventListeners();
7513
7512
  }
7514
7513
  render(initialData) {
7515
7514
  this.originalActiveElement = document.activeElement;
7516
7515
  document.body.appendChild(this.container);
7517
7516
  this.populateForm(initialData);
7517
+ this.attachEventListeners();
7518
7518
  this.setupAccessibility();
7519
7519
  this.setupFocusTrap();
7520
7520
  this.applyTheme();
@@ -7601,7 +7601,7 @@ var SettingsModalView = class {
7601
7601
  </div>
7602
7602
  <div class="modal-footer">
7603
7603
  <button type="button" class="btn-cancel">Fechar</button>
7604
- <button type="submit" class="btn-save btn-primary">Salvar</button>
7604
+ <button type="button" class="btn-save btn-primary">Salvar</button>
7605
7605
  </div>
7606
7606
  </div>
7607
7607
  </div>
@@ -7983,6 +7983,16 @@ var SettingsModalView = class {
7983
7983
  this.config.onClose();
7984
7984
  });
7985
7985
  }
7986
+ const saveBtn = this.modal.querySelector(".btn-save");
7987
+ if (saveBtn) {
7988
+ saveBtn.addEventListener("click", (event) => {
7989
+ event.preventDefault();
7990
+ event.stopPropagation();
7991
+ this.hideError();
7992
+ const formData = this.getFormData();
7993
+ this.config.onSave(formData);
7994
+ });
7995
+ }
7986
7996
  this.container.addEventListener("click", (event) => {
7987
7997
  const target = event.target;
7988
7998
  if (target.classList.contains("myio-settings-modal-overlay") && this.config.closeOnBackdrop !== false) {
package/dist/index.js CHANGED
@@ -7442,12 +7442,12 @@ var SettingsModalView = class {
7442
7442
  constructor(config) {
7443
7443
  this.config = config;
7444
7444
  this.createModal();
7445
- this.attachEventListeners();
7446
7445
  }
7447
7446
  render(initialData) {
7448
7447
  this.originalActiveElement = document.activeElement;
7449
7448
  document.body.appendChild(this.container);
7450
7449
  this.populateForm(initialData);
7450
+ this.attachEventListeners();
7451
7451
  this.setupAccessibility();
7452
7452
  this.setupFocusTrap();
7453
7453
  this.applyTheme();
@@ -7534,7 +7534,7 @@ var SettingsModalView = class {
7534
7534
  </div>
7535
7535
  <div class="modal-footer">
7536
7536
  <button type="button" class="btn-cancel">Fechar</button>
7537
- <button type="submit" class="btn-save btn-primary">Salvar</button>
7537
+ <button type="button" class="btn-save btn-primary">Salvar</button>
7538
7538
  </div>
7539
7539
  </div>
7540
7540
  </div>
@@ -7916,6 +7916,16 @@ var SettingsModalView = class {
7916
7916
  this.config.onClose();
7917
7917
  });
7918
7918
  }
7919
+ const saveBtn = this.modal.querySelector(".btn-save");
7920
+ if (saveBtn) {
7921
+ saveBtn.addEventListener("click", (event) => {
7922
+ event.preventDefault();
7923
+ event.stopPropagation();
7924
+ this.hideError();
7925
+ const formData = this.getFormData();
7926
+ this.config.onSave(formData);
7927
+ });
7928
+ }
7919
7929
  this.container.addEventListener("click", (event) => {
7920
7930
  const target = event.target;
7921
7931
  if (target.classList.contains("myio-settings-modal-overlay") && this.config.closeOnBackdrop !== false) {
@@ -7431,12 +7431,12 @@
7431
7431
  constructor(config) {
7432
7432
  this.config = config;
7433
7433
  this.createModal();
7434
- this.attachEventListeners();
7435
7434
  }
7436
7435
  render(initialData) {
7437
7436
  this.originalActiveElement = document.activeElement;
7438
7437
  document.body.appendChild(this.container);
7439
7438
  this.populateForm(initialData);
7439
+ this.attachEventListeners();
7440
7440
  this.setupAccessibility();
7441
7441
  this.setupFocusTrap();
7442
7442
  this.applyTheme();
@@ -7523,7 +7523,7 @@
7523
7523
  </div>
7524
7524
  <div class="modal-footer">
7525
7525
  <button type="button" class="btn-cancel">Fechar</button>
7526
- <button type="submit" class="btn-save btn-primary">Salvar</button>
7526
+ <button type="button" class="btn-save btn-primary">Salvar</button>
7527
7527
  </div>
7528
7528
  </div>
7529
7529
  </div>
@@ -7905,6 +7905,16 @@
7905
7905
  this.config.onClose();
7906
7906
  });
7907
7907
  }
7908
+ const saveBtn = this.modal.querySelector(".btn-save");
7909
+ if (saveBtn) {
7910
+ saveBtn.addEventListener("click", (event) => {
7911
+ event.preventDefault();
7912
+ event.stopPropagation();
7913
+ this.hideError();
7914
+ const formData = this.getFormData();
7915
+ this.config.onSave(formData);
7916
+ });
7917
+ }
7908
7918
  this.container.addEventListener("click", (event) => {
7909
7919
  const target = event.target;
7910
7920
  if (target.classList.contains("myio-settings-modal-overlay") && this.config.closeOnBackdrop !== false) {