gd-bs 5.4.0 → 5.4.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.
@@ -65,6 +65,8 @@ var _Carousel = /** @class */ (function (_super) {
65
65
  this.nextWhenVisible(options.slide);
66
66
  }
67
67
  }
68
+ // Call the event if it exists
69
+ this.props.onRendered ? this.props.onRendered(this.el, this.props) : null;
68
70
  };
69
71
  // Configures the events
70
72
  _Carousel.prototype.configureEvents = function () {
@@ -78,12 +80,12 @@ var _Carousel = /** @class */ (function (_super) {
78
80
  // Add a keydown event
79
81
  el.addEventListener("keydown", function (ev) {
80
82
  // See if the left arrow was pressed
81
- if (ev.keyCode == 37) {
83
+ if (ev.code == "37") {
82
84
  // Move to the previous slide
83
85
  _this.previous();
84
86
  }
85
87
  // Else, see if the right arrow was pressed
86
- else if (ev.keyCode == 39) {
88
+ else if (ev.code == "39") {
87
89
  // Move tot he next slide
88
90
  _this.next();
89
91
  }
@@ -213,6 +215,8 @@ var _Carousel = /** @class */ (function (_super) {
213
215
  this._slides.push(slide);
214
216
  // Create the item element
215
217
  slides.appendChild(slide.el);
218
+ // Call the event
219
+ this.props.onSlideRendered ? this.props.onSlideRendered(slide.el, items[i]) : null;
216
220
  }
217
221
  }
218
222
  };
@@ -43,6 +43,8 @@ var CarouselItem = /** @class */ (function () {
43
43
  // Append the content
44
44
  common_1.appendContent(this._el, this._props.content);
45
45
  }
46
+ // Call the event if it exists
47
+ this._props.onRendered ? this._props.onRendered(this._el, this._props) : null;
46
48
  };
47
49
  Object.defineProperty(CarouselItem.prototype, "el", {
48
50
  /**
@@ -199,7 +199,7 @@ var _Modal = /** @class */ (function (_super) {
199
199
  // Add a click event
200
200
  this.el.addEventListener("keydown", function (ev) {
201
201
  // See if the escape key was clicked and the modal is visible
202
- if (ev.keyCode === 27 && _this.isVisible) {
202
+ if (ev.code === "27" && _this.isVisible) {
203
203
  // Toggle the modal
204
204
  _this.toggle();
205
205
  }
@@ -98,7 +98,7 @@ var _Navbar = /** @class */ (function (_super) {
98
98
  // Set a keydown event to catch the "Enter" key being pressed
99
99
  searchbox.addEventListener("keydown", function (ev) {
100
100
  // See if the "Enter" key was pressed
101
- if (ev.keyCode == 13) {
101
+ if (ev.code == "13") {
102
102
  // Disable the postback
103
103
  ev.preventDefault();
104
104
  // See if there is a search event
@@ -157,7 +157,7 @@ var _Offcanvas = /** @class */ (function (_super) {
157
157
  // Add a click event
158
158
  this.el.addEventListener("keydown", function (ev) {
159
159
  // See if the escape key was clicked and the modal is visible
160
- if (ev.keyCode === 27 && _this.isVisible) {
160
+ if (ev.code === "27" && _this.isVisible) {
161
161
  // Toggle the modal
162
162
  _this.toggle();
163
163
  }