gd-bs 5.5.8 → 5.6.1

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.
@@ -31,7 +31,7 @@ var CheckboxItem = /** @class */ (function () {
31
31
  // Set the attributes
32
32
  this._elCheckbox = this._el.querySelector("input");
33
33
  if (this._elCheckbox) {
34
- this._elCheckbox.disabled = this._parent.isReadonly || this._props.isDisabled ? true : false;
34
+ this._elCheckbox.readOnly = this._parent.isReadonly || this._props.isDisabled ? true : false;
35
35
  // Default the title property for the checkbox
36
36
  this._elCheckbox.title = this.props.label || this._parent.title || "";
37
37
  }
@@ -169,6 +169,21 @@ var _Form = /** @class */ (function (_super) {
169
169
  // Return the values
170
170
  return values;
171
171
  };
172
+ // Inserts a control into the form
173
+ _Form.prototype.insertControl = function (idx, control) {
174
+ // Create the group
175
+ var group = new group_1.FormGroup(control, this.props);
176
+ this._groups.push(group);
177
+ // Validate the index
178
+ if (idx < this.el.childElementCount) {
179
+ // Insert the control
180
+ this.el.insertBefore(group.el, this.el.childNodes[idx]);
181
+ }
182
+ else {
183
+ // Append the control
184
+ this.el.appendChild(group.el);
185
+ }
186
+ };
172
187
  // Validates the form
173
188
  _Form.prototype.isValid = function () {
174
189
  var isValid = true;
@@ -202,8 +202,7 @@ var _InputGroup = /** @class */ (function (_super) {
202
202
  // Update the textbox
203
203
  this.props.id ? textarea.id = this.props.id : null;
204
204
  this.props.placeholder ? textarea.placeholder = this.props.placeholder : null;
205
- textarea.disabled = this.props.isReadonly ? true : false;
206
- textarea.readOnly = textarea.disabled;
205
+ textarea.readOnly = this.props.isReadonly ? true : false;
207
206
  textarea.rows = this.props.rows;
208
207
  this.props.title ? textarea.title = this.props.title : null;
209
208
  }
@@ -216,8 +215,7 @@ var _InputGroup = /** @class */ (function (_super) {
216
215
  // Update the textbox
217
216
  this.props.id ? input.id = this.props.id : null;
218
217
  this.props.placeholder ? input.placeholder = this.props.placeholder : null;
219
- input.disabled = this.props.isReadonly ? true : false;
220
- input.readOnly = input.disabled;
218
+ input.readOnly = this.props.isReadonly ? true : false;
221
219
  this.props.title ? input.title = this.props.title : null;
222
220
  typeof (this.props.min) === "number" ? input.min = this.props.min + "" : null;
223
221
  typeof (this.props.max) === "number" ? input.max = this.props.max + "" : null;