gd-bs 6.1.1 → 6.1.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.
@@ -33,6 +33,7 @@ var CheckboxItem = /** @class */ (function () {
33
33
  if (this._elCheckbox) {
34
34
  this._elCheckbox.disabled = this._parent.isDisabled ? true : false;
35
35
  this._elCheckbox.readOnly = this._parent.isReadonly ? true : false;
36
+ this._elCheckbox.required = this._parent.required ? true : false;
36
37
  // Default the title property for the checkbox
37
38
  this._elCheckbox.title = this.props.label || this._parent.title || "";
38
39
  }
@@ -302,6 +302,7 @@ var _Dropdown = /** @class */ (function (_super) {
302
302
  dropdown.classList.add("form-select");
303
303
  dropdown.disabled = this.props.isReadonly ? true : false;
304
304
  dropdown.multiple = this.props.multi ? true : false;
305
+ dropdown.required = this.props.required ? true : false;
305
306
  this.props.title ? dropdown.title = this.props.title : null;
306
307
  }
307
308
  };
@@ -431,6 +432,10 @@ var _Dropdown = /** @class */ (function (_super) {
431
432
  // Parse the items
432
433
  for (var i = 0; i < this._items.length; i++) {
433
434
  var item = this._items[i];
435
+ // Skip disabled items
436
+ if (item.el.disabled) {
437
+ continue;
438
+ }
434
439
  // See if this item is selected
435
440
  if (item.isSelected) {
436
441
  // Add the value
@@ -114,6 +114,7 @@ var FormControl = /** @class */ (function () {
114
114
  isReadonly: this._props.isReadonly,
115
115
  items: cbProps.items,
116
116
  onChange: cbProps.onChange,
117
+ required: this._props.required,
117
118
  title: this._props.title,
118
119
  type: checkboxGroup_1.CheckboxGroupTypes.Checkbox,
119
120
  value: value
@@ -129,6 +130,7 @@ var FormControl = /** @class */ (function () {
129
130
  isReadonly: this._props.isReadonly,
130
131
  onChange: this._props.onChange,
131
132
  placeholder: this._props.placeholder,
133
+ required: this._props.required,
132
134
  title: this._props.title,
133
135
  type: inputGroup_1.InputGroupTypes.ColorPicker,
134
136
  value: value
@@ -145,6 +147,7 @@ var FormControl = /** @class */ (function () {
145
147
  isReadonly: this._props.isReadonly,
146
148
  items: this._props.items,
147
149
  onChange: this._props.onChange,
150
+ required: this._props.required,
148
151
  title: this._props.title,
149
152
  value: value
150
153
  });
@@ -160,6 +163,7 @@ var FormControl = /** @class */ (function () {
160
163
  items: this._props.items,
161
164
  onChange: this._props.onChange,
162
165
  onMenuRendering: this._props.onMenuRendering,
166
+ required: this._props.required,
163
167
  title: this._props.title,
164
168
  value: value
165
169
  });
@@ -174,6 +178,7 @@ var FormControl = /** @class */ (function () {
174
178
  isReadonly: this._props.isReadonly,
175
179
  onChange: this._props.onChange,
176
180
  placeholder: this._props.placeholder,
181
+ required: this._props.required,
177
182
  title: this._props.title,
178
183
  type: inputGroup_1.InputGroupTypes.Email,
179
184
  value: value
@@ -189,6 +194,7 @@ var FormControl = /** @class */ (function () {
189
194
  isReadonly: this._props.isReadonly,
190
195
  onChange: this._props.onChange,
191
196
  placeholder: this._props.placeholder,
197
+ required: this._props.required,
192
198
  title: this._props.title,
193
199
  type: inputGroup_1.InputGroupTypes.File,
194
200
  value: value
@@ -203,6 +209,7 @@ var FormControl = /** @class */ (function () {
203
209
  items: this._props.items,
204
210
  onChange: this._props.onChange,
205
211
  placeholder: this._props.placeholder,
212
+ required: this._props.required,
206
213
  value: value
207
214
  });
208
215
  break;
@@ -220,6 +227,7 @@ var FormControl = /** @class */ (function () {
220
227
  items: cbMultiProps.items,
221
228
  multi: true,
222
229
  onChange: cbMultiProps.onChange,
230
+ required: this._props.required,
223
231
  title: this._props.title,
224
232
  type: checkboxGroup_1.CheckboxGroupTypes.Checkbox,
225
233
  value: value
@@ -237,6 +245,7 @@ var FormControl = /** @class */ (function () {
237
245
  multi: true,
238
246
  onChange: this._props.onChange,
239
247
  onMenuRendering: this._props.onMenuRendering,
248
+ required: this._props.required,
240
249
  title: this._props.title,
241
250
  value: value
242
251
  });
@@ -251,6 +260,7 @@ var FormControl = /** @class */ (function () {
251
260
  multi: true,
252
261
  onChange: this._props.onChange,
253
262
  placeholder: this._props.placeholder,
263
+ required: this._props.required,
254
264
  value: value
255
265
  });
256
266
  break;
@@ -266,6 +276,7 @@ var FormControl = /** @class */ (function () {
266
276
  items: this._props.items,
267
277
  multi: true,
268
278
  onChange: this._props.onChange,
279
+ required: this._props.required,
269
280
  title: this._props.title,
270
281
  type: checkboxGroup_1.CheckboxGroupTypes.Radio,
271
282
  value: value
@@ -283,6 +294,7 @@ var FormControl = /** @class */ (function () {
283
294
  items: this._props.items,
284
295
  multi: true,
285
296
  onChange: this._props.onChange,
297
+ required: this._props.required,
286
298
  title: this._props.title,
287
299
  type: checkboxGroup_1.CheckboxGroupTypes.Switch,
288
300
  value: value
@@ -298,6 +310,7 @@ var FormControl = /** @class */ (function () {
298
310
  isReadonly: this._props.isReadonly,
299
311
  onChange: this._props.onChange,
300
312
  placeholder: this._props.placeholder,
313
+ required: this._props.required,
301
314
  title: this._props.title,
302
315
  type: inputGroup_1.InputGroupTypes.Password,
303
316
  value: value
@@ -314,6 +327,7 @@ var FormControl = /** @class */ (function () {
314
327
  isReadonly: this._props.isReadonly,
315
328
  items: this._props.items,
316
329
  onChange: this._props.onChange,
330
+ required: this._props.required,
317
331
  title: this._props.title,
318
332
  type: checkboxGroup_1.CheckboxGroupTypes.Radio,
319
333
  value: value
@@ -331,6 +345,7 @@ var FormControl = /** @class */ (function () {
331
345
  max: this._props.max || 100,
332
346
  onChange: this._props.onChange,
333
347
  placeholder: this._props.placeholder,
348
+ required: this._props.required,
334
349
  step: this._props.step,
335
350
  title: this._props.title,
336
351
  type: inputGroup_1.InputGroupTypes.Range,
@@ -346,6 +361,7 @@ var FormControl = /** @class */ (function () {
346
361
  isReadonly: true,
347
362
  onChange: this._props.onChange,
348
363
  placeholder: this._props.placeholder,
364
+ required: this._props.required,
349
365
  title: this._props.title,
350
366
  type: inputGroup_1.InputGroupTypes.TextField,
351
367
  value: value
@@ -362,6 +378,7 @@ var FormControl = /** @class */ (function () {
362
378
  isReadonly: this._props.isReadonly,
363
379
  items: this._props.items,
364
380
  onChange: this._props.onChange,
381
+ required: this._props.required,
365
382
  title: this._props.title,
366
383
  type: checkboxGroup_1.CheckboxGroupTypes.Switch,
367
384
  value: value
@@ -377,6 +394,7 @@ var FormControl = /** @class */ (function () {
377
394
  isReadonly: this._props.isReadonly,
378
395
  onChange: this._props.onChange,
379
396
  placeholder: this._props.placeholder,
397
+ required: this._props.required,
380
398
  rows: this._props.rows,
381
399
  title: this._props.title,
382
400
  type: inputGroup_1.InputGroupTypes.TextArea,
@@ -393,6 +411,7 @@ var FormControl = /** @class */ (function () {
393
411
  isReadonly: this._props.isReadonly,
394
412
  onChange: this._props.onChange,
395
413
  placeholder: this._props.placeholder,
414
+ required: this._props.required,
396
415
  title: this._props.title,
397
416
  type: inputGroup_1.InputGroupTypes.TextField,
398
417
  value: value
@@ -215,6 +215,7 @@ var _InputGroup = /** @class */ (function (_super) {
215
215
  this.props.placeholder ? textarea.placeholder = this.props.placeholder : null;
216
216
  textarea.disabled = this.props.isDisabled ? true : false;
217
217
  textarea.readOnly = this.props.isReadonly ? true : false;
218
+ textarea.required = this.props.required ? true : false;
218
219
  textarea.rows = this.props.rows;
219
220
  this.props.title ? textarea.title = this.props.title : null;
220
221
  }
@@ -229,6 +230,7 @@ var _InputGroup = /** @class */ (function (_super) {
229
230
  this.props.placeholder ? input.placeholder = this.props.placeholder : null;
230
231
  input.disabled = this.props.isDisabled ? true : false;
231
232
  input.readOnly = this.props.isReadonly ? true : false;
233
+ input.required = this.props.required ? true : false;
232
234
  this.props.title ? input.title = this.props.title : null;
233
235
  typeof (this.props.min) === "number" ? input.min = this.props.min + "" : null;
234
236
  typeof (this.props.max) === "number" ? input.max = this.props.max + "" : null;
@@ -80,6 +80,8 @@ var _ListBox = /** @class */ (function (_super) {
80
80
  // Disable the search box
81
81
  this._elSearchBox ? this._elSearchBox.disabled = true : null;
82
82
  }
83
+ // Set the required property
84
+ this._elSearchBox.required = this.props.required ? true : false;
83
85
  // Set the options
84
86
  this.setOptions(this.props.items);
85
87
  // Set the value if it's been defined
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.folderPlus = void 0;
4
4
  var generate_1 = require("../generate");
5
5
  function folderPlus(height, width, className) {
6
- return (0, generate_1.generateIcon)("<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-folder-plus' viewBox='0 0 16 16'> <path d='m.5 3 .04.87a1.99 1.99 0 0 0-.342 1.311l.637 7A2 2 0 0 0 2.826 14H9v-1H2.826a1 1 0 0 1-.995-.91l-.637-7A1 1 0 0 1 2.19 4h11.62a1 1 0 0 1 .996 1.09L14.54 8h1.005l.256-2.819A2 2 0 0 0 13.81 3H9.828a2 2 0 0 1-1.414-.586l-.828-.828A2 2 0 0 0 6.172 1H2.5a2 2 0 0 0-2 2zm5.672-1a1 1 0 0 1 .707.293L7.586 3H2.19c-.24 0-.47.042-.683.12L1.5 2.98a1 1 0 0 1 1-.98h3.672z'/> <path d='M13.5 10a.5.5 0 0 1 .5.5V12h1.5a.5.5 0 1 1 0 1H14v1.5a.5.5 0 1 1-1 0V13h-1.5a.5.5 0 0 1 0-1H13v-1.5a.5.5 0 0 1 .5-.5z'/> </svg>", height, width, className);
6
+ return (0, generate_1.generateIcon)("<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-folder-plus' viewBox='0 0 16 16'> <path d='m.5 3 .04.87a1.99 1.99 0 0 0-.342 1.311l.637 7A2 2 0 0 0 2.826 14H9v-1H2.826a1 1 0 0 1-.995-.91l-.637-7A1 1 0 0 1 2.19 4h11.62a1 1 0 0 1 .996 1.09L14.54 8h1.005l.256-2.819A2 2 0 0 0 13.81 3H9.828a2 2 0 0 1-1.414-.586l-.828-.828A2 2 0 0 0 6.172 1H2.5a2 2 0 0 0-2 2Zm5.672-1a1 1 0 0 1 .707.293L7.586 3H2.19c-.24 0-.47.042-.683.12L1.5 2.98a1 1 0 0 1 1-.98h3.672Z'/> <path d='M13.5 9a.5.5 0 0 1 .5.5V11h1.5a.5.5 0 1 1 0 1H14v1.5a.5.5 0 1 1-1 0V12h-1.5a.5.5 0 0 1 0-1H13V9.5a.5.5 0 0 1 .5-.5Z'/> </svg>", height, width, className);
7
7
  }
8
8
  exports.folderPlus = folderPlus;
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.postcardHeartFill = void 0;
4
4
  var generate_1 = require("../generate");
5
5
  function postcardHeartFill(height, width, className) {
6
- return (0, generate_1.generateIcon)("<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-postcard-heart-fill' viewBox='0 0 16 16'> <path fill-rule='evenodd' d='M2 2a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H2Zm6 2.5a.5.5 0 0 0-1 0v7a.5.5 0 0 0 1 0v-7Zm3.5.878c1.482-1.42 4.795 1.392 0 4.622-4.795-3.23-1.482-6.043 0-4.622ZM2 5.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5Zm0 2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5Zm0 2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5Z'/> </svg>", height, width, className);
6
+ return (0, generate_1.generateIcon)("<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-postcard-heart-fill' viewBox='0 0 16 16'> <path d='M2 2a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2H2Zm6 2.5v7a.5.5 0 0 1-1 0v-7a.5.5 0 0 1 1 0Zm3.5.878c1.482-1.42 4.795 1.392 0 4.622-4.795-3.23-1.482-6.043 0-4.622ZM2 5.5a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5Zm0 2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5Zm0 2a.5.5 0 0 1 .5-.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5Z'/> </svg>", height, width, className);
7
7
  }
8
8
  exports.postcardHeartFill = postcardHeartFill;
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.trash = void 0;
4
4
  var generate_1 = require("../generate");
5
5
  function trash(height, width, className) {
6
- return (0, generate_1.generateIcon)("<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-trash' viewBox='0 0 16 16'> <path d='M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5zm3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0V6z'/> <path fill-rule='evenodd' d='M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1v1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4H4.118zM2.5 3V2h11v1h-11z'/> </svg>", height, width, className);
6
+ return (0, generate_1.generateIcon)("<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='currentColor' class='bi bi-trash' viewBox='0 0 16 16'> <path d='M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5Zm2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5Zm3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0V6Z'/> <path d='M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1v1ZM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4H4.118ZM2.5 3h11V2h-11v1Z'/> </svg>", height, width, className);
7
7
  }
8
8
  exports.trash = trash;