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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gd-bs",
3
- "version": "6.5.1",
3
+ "version": "6.5.3",
4
4
  "description": "Bootstrap JavaScript, TypeScript and Web Components library.",
5
5
  "main": "build/index.js",
6
6
  "typings": "src/index.d.ts",
@@ -665,13 +665,18 @@ export class FormControl implements IFormControl {
665
665
 
666
666
  // Updates the control validation
667
667
  updateValidation(elControl: Element, validation: IFormControlValidationResult) {
668
+ // See if this is a checkbox/switch
669
+ let isCheckbox = elControl.querySelectorAll(".form-check").length > 0;
670
+
668
671
  // Get the form controls
669
- let elFormControls = elControl.querySelectorAll(".form-control");
672
+ let elFormControls = isCheckbox ? [elControl] : elControl.querySelectorAll(".form-control");
670
673
  elFormControls = elFormControls.length == 0 ? elControl.querySelectorAll(".form-select") : elFormControls;
674
+
675
+ // Parse the form controls
671
676
  for (let i = 0; i < elFormControls.length; i++) {
672
677
  // Ensure the control exists
673
678
  let elFormControl = elFormControls[i] as HTMLElement;
674
- if (elFormControl) {
679
+ if (!isCheckbox) {
675
680
  // Clear the invalid/valid classes
676
681
  elFormControl.classList.remove("is-invalid");
677
682
  elFormControl.classList.remove("is-valid");
@@ -182,6 +182,8 @@ class _Pagination extends Base<IPaginationProps> implements IPagination {
182
182
 
183
183
  // Create the previous link
184
184
  let item = this.createItem("Previous", itemTemplate);
185
+ item.classList.add("disabled");
186
+ item.classList.add("previous");
185
187
  list.appendChild(item);
186
188
 
187
189
  // Loop for the number of pages to create
@@ -196,6 +198,8 @@ class _Pagination extends Base<IPaginationProps> implements IPagination {
196
198
 
197
199
  // Create the next link
198
200
  item = this.createItem("Next", itemTemplate);
201
+ pages > 1 ? null : item.classList.add("disabled");
202
+ item.classList.add("next");
199
203
  list.appendChild(item);
200
204
  }
201
205
  }