@unlk/keymaster 1.4.5 → 1.4.7

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.
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Unlock Keymaster v1.4.5 (https://keymaster.unlock.com)
2
+ * Unlock Keymaster v1.4.7 (https://keymaster.unlock.com)
3
3
  * Copyright 2022-2026 Unlk Developers
4
4
  */
5
5
  (function (global, factory) {
@@ -7459,7 +7459,7 @@
7459
7459
  }
7460
7460
  }
7461
7461
 
7462
- const NAME$3 = 'datepicker';
7462
+ const NAME$4 = 'datepicker';
7463
7463
  const DATA_KEY = 'bs.datepicker';
7464
7464
  const EVENT_KEY = `.${DATA_KEY}`;
7465
7465
  const DATA_API_KEY = '.data-api';
@@ -7468,7 +7468,7 @@
7468
7468
  class Datepicker extends BaseComponent {
7469
7469
  // Getters
7470
7470
  static get NAME() {
7471
- return NAME$3;
7471
+ return NAME$4;
7472
7472
  }
7473
7473
 
7474
7474
  // Static
@@ -7610,7 +7610,7 @@
7610
7610
  }
7611
7611
  };
7612
7612
 
7613
- const NAME$2 = 'carouselCaption';
7613
+ const NAME$3 = 'carouselCaption';
7614
7614
  const EVENT_SLID$1 = 'slid.bs.carousel';
7615
7615
  const SELECTOR_CAROUSEL$1 = '.carousel';
7616
7616
  const SELECTOR_CAPTION = '.carousel-caption-container p';
@@ -7629,7 +7629,7 @@
7629
7629
  return this._element.querySelector(SELECTOR_CAPTION) || null;
7630
7630
  }
7631
7631
  static get NAME() {
7632
- return NAME$2;
7632
+ return NAME$3;
7633
7633
  }
7634
7634
  static jQueryInterface(config) {
7635
7635
  return this.each(function () {
@@ -7642,7 +7642,7 @@
7642
7642
  });
7643
7643
  defineJQueryPlugin(CarouselCaption);
7644
7644
 
7645
- const NAME$1 = 'carouselHeight';
7645
+ const NAME$2 = 'carouselHeight';
7646
7646
  const EVENT_SLIDE = 'slide.bs.carousel';
7647
7647
  const EVENT_SLID = 'slid.bs.carousel';
7648
7648
  const SELECTOR_CAROUSEL = '.carousel';
@@ -7666,7 +7666,7 @@
7666
7666
  this._inner.style.height = '';
7667
7667
  }
7668
7668
  static get NAME() {
7669
- return NAME$1;
7669
+ return NAME$2;
7670
7670
  }
7671
7671
  static jQueryInterface(config) {
7672
7672
  return this.each(function () {
@@ -7682,7 +7682,7 @@
7682
7682
  });
7683
7683
  defineJQueryPlugin(CarouselHeight);
7684
7684
 
7685
- const NAME = 'videoModal';
7685
+ const NAME$1 = 'videoModal';
7686
7686
  const EVENT_SHOW = 'show.bs.modal';
7687
7687
  const EVENT_HIDDEN = 'hidden.bs.modal';
7688
7688
  const SELECTOR_MODAL = '.modal';
@@ -7744,6 +7744,14 @@
7744
7744
  });
7745
7745
  this._element.dataset.vimeoId = String(vimeoId);
7746
7746
  this._element.__unlkVimeoPlayer = this._vimeoPlayer;
7747
+ this._element.dispatchEvent(new CustomEvent('videomodal.ready', {
7748
+ bubbles: true,
7749
+ detail: {
7750
+ provider: 'vimeo',
7751
+ player: this._vimeoPlayer,
7752
+ videoId: vimeoId
7753
+ }
7754
+ }));
7747
7755
  return;
7748
7756
  }
7749
7757
  if (this._youtubeSrc) {
@@ -7759,6 +7767,14 @@
7759
7767
  });
7760
7768
  this._element.dataset.ytId = youtubeId;
7761
7769
  this._element.__unlkYtPlayer = this._youtubePlayer;
7770
+ this._element.dispatchEvent(new CustomEvent('videomodal.ready', {
7771
+ bubbles: true,
7772
+ detail: {
7773
+ provider: 'youtube',
7774
+ player: this._youtubePlayer,
7775
+ videoId: youtubeId
7776
+ }
7777
+ }));
7762
7778
  }
7763
7779
  }
7764
7780
  _onHide() {
@@ -7784,7 +7800,7 @@
7784
7800
  return match ? match[1] : '';
7785
7801
  }
7786
7802
  static get NAME() {
7787
- return NAME;
7803
+ return NAME$1;
7788
7804
  }
7789
7805
  static jQueryInterface(config) {
7790
7806
  return this.each(function () {
@@ -7802,6 +7818,40 @@
7802
7818
  });
7803
7819
  defineJQueryPlugin(VideoModal);
7804
7820
 
7821
+ const NAME = 'accordionScroll';
7822
+ const EVENT_SHOWN = 'shown.bs.collapse';
7823
+ const SELECTOR_ACCORDION = '.accordion';
7824
+ const SELECTOR_ITEM = '.accordion-item';
7825
+ const SELECTOR_HEADER = '.accordion-header';
7826
+ class AccordionScroll extends BaseComponent {
7827
+ _onShown(e) {
7828
+ const item = e.target.closest(SELECTOR_ITEM);
7829
+ if (!item) return;
7830
+ const header = SelectorEngine.findOne(SELECTOR_HEADER, item);
7831
+ if (!header) return;
7832
+ const rect = header.getBoundingClientRect();
7833
+ if (rect.top < 0) {
7834
+ header.scrollIntoView({
7835
+ behavior: 'smooth',
7836
+ block: 'start'
7837
+ });
7838
+ }
7839
+ }
7840
+ static get NAME() {
7841
+ return NAME;
7842
+ }
7843
+ static jQueryInterface(config) {
7844
+ return this.each(function () {
7845
+ AccordionScroll.getOrCreateInstance(this, config);
7846
+ });
7847
+ }
7848
+ }
7849
+ EventHandler.on(document, EVENT_SHOWN, SELECTOR_ACCORDION, function (e) {
7850
+ AccordionScroll.getOrCreateInstance(this)._onShown(e);
7851
+ });
7852
+ defineJQueryPlugin(AccordionScroll);
7853
+
7854
+ exports.AccordionScroll = AccordionScroll;
7805
7855
  exports.Alert = alert;
7806
7856
  exports.Button = button;
7807
7857
  exports.Carousel = carousel;