gd-bs 6.5.1 → 6.5.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.
- package/build/components/form/control.js +5 -2
- package/build/components/pagination/index.js +4 -0
- package/dist/gd-bs-icons.js +1 -1
- package/dist/gd-bs-icons.min.js +1 -1
- package/dist/gd-bs.js +1 -1
- package/dist/gd-bs.min.js +1 -1
- package/package.json +1 -1
- package/src/components/form/control.ts +7 -2
- package/src/components/pagination/index.ts +4 -0
|
@@ -661,13 +661,16 @@ var FormControl = /** @class */ (function () {
|
|
|
661
661
|
};
|
|
662
662
|
// Updates the control validation
|
|
663
663
|
FormControl.prototype.updateValidation = function (elControl, validation) {
|
|
664
|
+
// See if this is a checkbox/switch
|
|
665
|
+
var isCheckbox = elControl.querySelectorAll(".form-check").length > 0;
|
|
664
666
|
// Get the form controls
|
|
665
|
-
var elFormControls = elControl.querySelectorAll(".form-control");
|
|
667
|
+
var elFormControls = isCheckbox ? [elControl] : elControl.querySelectorAll(".form-control");
|
|
666
668
|
elFormControls = elFormControls.length == 0 ? elControl.querySelectorAll(".form-select") : elFormControls;
|
|
669
|
+
// Parse the form controls
|
|
667
670
|
for (var i = 0; i < elFormControls.length; i++) {
|
|
668
671
|
// Ensure the control exists
|
|
669
672
|
var elFormControl = elFormControls[i];
|
|
670
|
-
if (
|
|
673
|
+
if (!isCheckbox) {
|
|
671
674
|
// Clear the invalid/valid classes
|
|
672
675
|
elFormControl.classList.remove("is-invalid");
|
|
673
676
|
elFormControl.classList.remove("is-valid");
|
|
@@ -180,6 +180,8 @@ var _Pagination = /** @class */ (function (_super) {
|
|
|
180
180
|
this._items = [];
|
|
181
181
|
// Create the previous link
|
|
182
182
|
var item = this.createItem("Previous", itemTemplate);
|
|
183
|
+
item.classList.add("disabled");
|
|
184
|
+
item.classList.add("previous");
|
|
183
185
|
list.appendChild(item);
|
|
184
186
|
// Loop for the number of pages to create
|
|
185
187
|
// Parse the number of pages
|
|
@@ -192,6 +194,8 @@ var _Pagination = /** @class */ (function (_super) {
|
|
|
192
194
|
}
|
|
193
195
|
// Create the next link
|
|
194
196
|
item = this.createItem("Next", itemTemplate);
|
|
197
|
+
pages > 1 ? null : item.classList.add("disabled");
|
|
198
|
+
item.classList.add("next");
|
|
195
199
|
list.appendChild(item);
|
|
196
200
|
};
|
|
197
201
|
return _Pagination;
|