gd-bs 6.9.19 → 6.9.21

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.9.19",
3
+ "version": "6.9.21",
4
4
  "description": "Bootstrap JavaScript, TypeScript and Web Components library.",
5
5
  "main": "build/index.js",
6
6
  "typings": "src/index.d.ts",
@@ -119,6 +119,9 @@ export interface IForm {
119
119
  /** Appends rows to the form */
120
120
  appendRows: (rows: Array<IFormRow>) => void;
121
121
 
122
+ /** Clears the validation on the form. */
123
+ clearValidation: () => void;
124
+
122
125
  /** The form controls */
123
126
  controls: Array<IFormControl>;
124
127
 
@@ -110,6 +110,23 @@ class _Form extends Base<IFormProps> implements IForm {
110
110
  }
111
111
  }
112
112
 
113
+ // Clears the validation on the form
114
+ clearValidation() {
115
+ // Find the controls that have been validated
116
+ let controls = this.el.querySelectorAll(".is-valid");
117
+ for (let i = 0; i < controls.length; i++) {
118
+ // Remove the class
119
+ controls[i].classList.remove("is-valid");
120
+ }
121
+
122
+ // Find the controls that have been validated
123
+ controls = this.el.querySelectorAll(".is-invalid");
124
+ for (let i = 0; i < controls.length; i++) {
125
+ // Remove the class
126
+ controls[i].classList.remove("is-invalid");
127
+ }
128
+ }
129
+
113
130
  // The forms controls
114
131
  get controls() {
115
132
  let controls: Array<IFormControl> = [];
@@ -230,9 +230,13 @@ class _Table extends Base<ITableProps> implements ITable {
230
230
  }
231
231
 
232
232
  // Method to update a row element
233
- updateRow(elRow: HTMLElement, row: any) {
233
+ updateRow(elRow: HTMLElement, row: any, hiddenColIndexes?: number[]) {
234
234
  // Parse the columns
235
235
  for (let i = 0; i < this.props.columns.length; i++) {
236
+ // See if this column is hidden
237
+ if (hiddenColIndexes && hiddenColIndexes.indexOf(i) >= 0) { continue; }
238
+
239
+ // Get the column element
236
240
  let elCol = elRow.children[i] as HTMLElement;
237
241
  if (elCol) {
238
242
  // Update the column
@@ -81,7 +81,7 @@ export interface ITable {
81
81
 
82
82
  updateColumn: (elCol: HTMLElement, colIdx: number, row: any) => void;
83
83
 
84
- updateRow: (elRow: HTMLElement, row: any) => void;
84
+ updateRow: (elRow: HTMLElement, row: any, hiddenColIndexes?: number[]) => void;
85
85
  }
86
86
 
87
87
  /**