gd-bs 6.9.12 → 6.9.14
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/build/components/carousel/index.js +2 -2
- package/build/components/modal/index.js +1 -1
- package/build/components/navbar/index.js +1 -1
- package/build/components/offcanvas/index.js +1 -1
- package/build/components/table/index.js +27 -1
- package/dist/gd-bs-icons.js +1 -1
- package/dist/gd-bs-icons.js.LICENSE.txt +4 -4
- package/dist/gd-bs-icons.min.js +1 -1
- package/dist/gd-bs.d.ts +2 -0
- package/dist/gd-bs.js +1 -1
- package/dist/gd-bs.js.LICENSE.txt +4 -4
- package/dist/gd-bs.min.js +1 -1
- package/package.json +2 -2
- package/src/components/carousel/index.ts +2 -2
- package/src/components/modal/index.ts +1 -1
- package/src/components/navbar/index.ts +1 -1
- package/src/components/offcanvas/index.ts +1 -1
- package/src/components/table/index.ts +29 -1
- package/src/components/table/types.d.ts +2 -0
|
@@ -82,12 +82,12 @@ var _Carousel = /** @class */ (function (_super) {
|
|
|
82
82
|
// Add a keydown event
|
|
83
83
|
el.addEventListener("keydown", function (ev) {
|
|
84
84
|
// See if the left arrow was pressed
|
|
85
|
-
if (ev.
|
|
85
|
+
if (ev.key == "ArrowLeft" || ev.keyCode == 37) {
|
|
86
86
|
// Move to the previous slide
|
|
87
87
|
_this.previous();
|
|
88
88
|
}
|
|
89
89
|
// Else, see if the right arrow was pressed
|
|
90
|
-
else if (ev.
|
|
90
|
+
else if (ev.key == "ArrowRight" || ev.keyCode == 39) {
|
|
91
91
|
// Move tot he next slide
|
|
92
92
|
_this.next();
|
|
93
93
|
}
|
|
@@ -201,7 +201,7 @@ var _Modal = /** @class */ (function (_super) {
|
|
|
201
201
|
// Add a click event
|
|
202
202
|
this.el.addEventListener("keydown", function (ev) {
|
|
203
203
|
// See if the escape key was clicked and the modal is visible
|
|
204
|
-
if (ev.
|
|
204
|
+
if ((ev.key === "Escape" || ev.keyCode == 27) && _this.isVisible) {
|
|
205
205
|
// Toggle the modal
|
|
206
206
|
_this.toggle();
|
|
207
207
|
}
|
|
@@ -127,7 +127,7 @@ var _Navbar = /** @class */ (function (_super) {
|
|
|
127
127
|
// Set a keydown event to catch the "Enter" key being pressed
|
|
128
128
|
searchbox.addEventListener("keydown", function (ev) {
|
|
129
129
|
// See if the "Enter" key was pressed
|
|
130
|
-
if (ev.
|
|
130
|
+
if (ev.key == "Enter") {
|
|
131
131
|
// Disable the postback
|
|
132
132
|
ev.preventDefault();
|
|
133
133
|
// See if there is a search event
|
|
@@ -203,7 +203,7 @@ var _Offcanvas = /** @class */ (function (_super) {
|
|
|
203
203
|
// Add a click event
|
|
204
204
|
this.el.addEventListener("keydown", function (ev) {
|
|
205
205
|
// See if the escape key was clicked and the modal is visible
|
|
206
|
-
if (ev.
|
|
206
|
+
if ((ev.key === "Escape" || ev.keyCode == 27) && _this.isVisible) {
|
|
207
207
|
// Toggle the modal
|
|
208
208
|
_this.toggle();
|
|
209
209
|
}
|
|
@@ -168,7 +168,7 @@ var _Table = /** @class */ (function (_super) {
|
|
|
168
168
|
};
|
|
169
169
|
// Renders a row
|
|
170
170
|
_Table.prototype.renderRow = function (row, data, rowIdx) {
|
|
171
|
-
//
|
|
171
|
+
// Parse the columns
|
|
172
172
|
for (var i = 0; i < this.props.columns.length; i++) {
|
|
173
173
|
// Create the cell
|
|
174
174
|
this.renderCell(row, this.props.columns[i], data, rowIdx);
|
|
@@ -197,6 +197,32 @@ var _Table = /** @class */ (function (_super) {
|
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
199
|
};
|
|
200
|
+
// Method to update a row element
|
|
201
|
+
_Table.prototype.updateRow = function (elRow, row) {
|
|
202
|
+
if (row === void 0) { row = {}; }
|
|
203
|
+
// Parse the columns
|
|
204
|
+
for (var i = 0; i < this.props.columns.length; i++) {
|
|
205
|
+
var colProps = this.props.columns[i];
|
|
206
|
+
var elCol = elRow.children[i];
|
|
207
|
+
if (elCol) {
|
|
208
|
+
// See if there is an event for this column
|
|
209
|
+
if (colProps.onRenderCell) {
|
|
210
|
+
// Call the event
|
|
211
|
+
colProps.onRenderCell(elCol, colProps, row);
|
|
212
|
+
}
|
|
213
|
+
// See if there is an event for this component
|
|
214
|
+
if (this.props.onRenderCell) {
|
|
215
|
+
// Call the event
|
|
216
|
+
this.props.onRenderCell(elCol, colProps, row);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
// See if there is an event
|
|
221
|
+
if (this.props.onRenderRow) {
|
|
222
|
+
// Call the event
|
|
223
|
+
this.props.onRenderRow(elRow, row);
|
|
224
|
+
}
|
|
225
|
+
};
|
|
200
226
|
return _Table;
|
|
201
227
|
}(base_1.Base));
|
|
202
228
|
var Table = function (props, template) { return new _Table(props, template); };
|