gd-bs 6.1.0 → 6.1.2
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/checkboxGroup/index.js +1 -1
- package/build/components/checkboxGroup/item.js +8 -3
- package/build/components/dropdown/index.js +1 -0
- package/build/components/form/control.js +19 -6
- package/build/components/inputGroup/index.js +2 -0
- package/build/components/listBox/index.js +2 -0
- package/dist/gd-bs-icons.js +1 -1
- package/dist/gd-bs-icons.min.js +1 -1
- package/dist/gd-bs.d.ts +5 -3
- package/dist/gd-bs.js +1 -1
- package/dist/gd-bs.min.js +1 -1
- package/index.html +46 -8
- package/package.json +1 -1
- package/src/components/checkboxGroup/index.ts +1 -1
- package/src/components/checkboxGroup/item.ts +9 -3
- package/src/components/checkboxGroup/types.d.ts +1 -1
- package/src/components/dropdown/index.ts +1 -0
- package/src/components/dropdown/types.d.ts +1 -0
- package/src/components/form/control.ts +19 -6
- package/src/components/form/controlTypes.d.ts +0 -1
- package/src/components/inputGroup/index.ts +2 -0
- package/src/components/inputGroup/types.d.ts +1 -0
- package/src/components/listBox/index.ts +3 -0
- package/src/components/listBox/types.d.ts +2 -1
|
@@ -49,7 +49,7 @@ var _CheckboxGroup = /** @class */ (function (_super) {
|
|
|
49
49
|
}
|
|
50
50
|
// Configure the card group
|
|
51
51
|
_CheckboxGroup.prototype.configure = function (cbTemplate) {
|
|
52
|
-
var renderRow = typeof (this.props.
|
|
52
|
+
var renderRow = typeof (this.props.colSize) === "number" ? this.props.colSize > 0 : false;
|
|
53
53
|
// See if a label is defined
|
|
54
54
|
var label = this.el.querySelector("legend");
|
|
55
55
|
if (label) {
|
|
@@ -33,12 +33,17 @@ 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
|
}
|
|
39
|
-
//
|
|
40
|
-
var
|
|
41
|
-
|
|
40
|
+
// See if we are rendering a row
|
|
41
|
+
var renderRow = typeof (this._parent.colSize) === "number" ? this._parent.colSize > 0 : false;
|
|
42
|
+
if (renderRow) {
|
|
43
|
+
// Set the column size
|
|
44
|
+
var colSize = this._parent.colSize > 0 && this._parent.colSize < 13 ? this._parent.colSize : 12;
|
|
45
|
+
this._el.classList.add("col-" + colSize);
|
|
46
|
+
}
|
|
42
47
|
// See if the title property is defined
|
|
43
48
|
if (this._parent.title) {
|
|
44
49
|
// Set the title
|
|
@@ -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
|
};
|
|
@@ -114,7 +114,7 @@ var FormControl = /** @class */ (function () {
|
|
|
114
114
|
isReadonly: this._props.isReadonly,
|
|
115
115
|
items: cbProps.items,
|
|
116
116
|
onChange: cbProps.onChange,
|
|
117
|
-
|
|
117
|
+
required: this._props.required,
|
|
118
118
|
title: this._props.title,
|
|
119
119
|
type: checkboxGroup_1.CheckboxGroupTypes.Checkbox,
|
|
120
120
|
value: value
|
|
@@ -130,6 +130,7 @@ var FormControl = /** @class */ (function () {
|
|
|
130
130
|
isReadonly: this._props.isReadonly,
|
|
131
131
|
onChange: this._props.onChange,
|
|
132
132
|
placeholder: this._props.placeholder,
|
|
133
|
+
required: this._props.required,
|
|
133
134
|
title: this._props.title,
|
|
134
135
|
type: inputGroup_1.InputGroupTypes.ColorPicker,
|
|
135
136
|
value: value
|
|
@@ -146,6 +147,7 @@ var FormControl = /** @class */ (function () {
|
|
|
146
147
|
isReadonly: this._props.isReadonly,
|
|
147
148
|
items: this._props.items,
|
|
148
149
|
onChange: this._props.onChange,
|
|
150
|
+
required: this._props.required,
|
|
149
151
|
title: this._props.title,
|
|
150
152
|
value: value
|
|
151
153
|
});
|
|
@@ -161,6 +163,7 @@ var FormControl = /** @class */ (function () {
|
|
|
161
163
|
items: this._props.items,
|
|
162
164
|
onChange: this._props.onChange,
|
|
163
165
|
onMenuRendering: this._props.onMenuRendering,
|
|
166
|
+
required: this._props.required,
|
|
164
167
|
title: this._props.title,
|
|
165
168
|
value: value
|
|
166
169
|
});
|
|
@@ -175,6 +178,7 @@ var FormControl = /** @class */ (function () {
|
|
|
175
178
|
isReadonly: this._props.isReadonly,
|
|
176
179
|
onChange: this._props.onChange,
|
|
177
180
|
placeholder: this._props.placeholder,
|
|
181
|
+
required: this._props.required,
|
|
178
182
|
title: this._props.title,
|
|
179
183
|
type: inputGroup_1.InputGroupTypes.Email,
|
|
180
184
|
value: value
|
|
@@ -190,6 +194,7 @@ var FormControl = /** @class */ (function () {
|
|
|
190
194
|
isReadonly: this._props.isReadonly,
|
|
191
195
|
onChange: this._props.onChange,
|
|
192
196
|
placeholder: this._props.placeholder,
|
|
197
|
+
required: this._props.required,
|
|
193
198
|
title: this._props.title,
|
|
194
199
|
type: inputGroup_1.InputGroupTypes.File,
|
|
195
200
|
value: value
|
|
@@ -204,6 +209,7 @@ var FormControl = /** @class */ (function () {
|
|
|
204
209
|
items: this._props.items,
|
|
205
210
|
onChange: this._props.onChange,
|
|
206
211
|
placeholder: this._props.placeholder,
|
|
212
|
+
required: this._props.required,
|
|
207
213
|
value: value
|
|
208
214
|
});
|
|
209
215
|
break;
|
|
@@ -221,7 +227,7 @@ var FormControl = /** @class */ (function () {
|
|
|
221
227
|
items: cbMultiProps.items,
|
|
222
228
|
multi: true,
|
|
223
229
|
onChange: cbMultiProps.onChange,
|
|
224
|
-
|
|
230
|
+
required: this._props.required,
|
|
225
231
|
title: this._props.title,
|
|
226
232
|
type: checkboxGroup_1.CheckboxGroupTypes.Checkbox,
|
|
227
233
|
value: value
|
|
@@ -239,6 +245,7 @@ var FormControl = /** @class */ (function () {
|
|
|
239
245
|
multi: true,
|
|
240
246
|
onChange: this._props.onChange,
|
|
241
247
|
onMenuRendering: this._props.onMenuRendering,
|
|
248
|
+
required: this._props.required,
|
|
242
249
|
title: this._props.title,
|
|
243
250
|
value: value
|
|
244
251
|
});
|
|
@@ -253,6 +260,7 @@ var FormControl = /** @class */ (function () {
|
|
|
253
260
|
multi: true,
|
|
254
261
|
onChange: this._props.onChange,
|
|
255
262
|
placeholder: this._props.placeholder,
|
|
263
|
+
required: this._props.required,
|
|
256
264
|
value: value
|
|
257
265
|
});
|
|
258
266
|
break;
|
|
@@ -268,7 +276,7 @@ var FormControl = /** @class */ (function () {
|
|
|
268
276
|
items: this._props.items,
|
|
269
277
|
multi: true,
|
|
270
278
|
onChange: this._props.onChange,
|
|
271
|
-
|
|
279
|
+
required: this._props.required,
|
|
272
280
|
title: this._props.title,
|
|
273
281
|
type: checkboxGroup_1.CheckboxGroupTypes.Radio,
|
|
274
282
|
value: value
|
|
@@ -286,7 +294,7 @@ var FormControl = /** @class */ (function () {
|
|
|
286
294
|
items: this._props.items,
|
|
287
295
|
multi: true,
|
|
288
296
|
onChange: this._props.onChange,
|
|
289
|
-
|
|
297
|
+
required: this._props.required,
|
|
290
298
|
title: this._props.title,
|
|
291
299
|
type: checkboxGroup_1.CheckboxGroupTypes.Switch,
|
|
292
300
|
value: value
|
|
@@ -302,6 +310,7 @@ var FormControl = /** @class */ (function () {
|
|
|
302
310
|
isReadonly: this._props.isReadonly,
|
|
303
311
|
onChange: this._props.onChange,
|
|
304
312
|
placeholder: this._props.placeholder,
|
|
313
|
+
required: this._props.required,
|
|
305
314
|
title: this._props.title,
|
|
306
315
|
type: inputGroup_1.InputGroupTypes.Password,
|
|
307
316
|
value: value
|
|
@@ -318,7 +327,7 @@ var FormControl = /** @class */ (function () {
|
|
|
318
327
|
isReadonly: this._props.isReadonly,
|
|
319
328
|
items: this._props.items,
|
|
320
329
|
onChange: this._props.onChange,
|
|
321
|
-
|
|
330
|
+
required: this._props.required,
|
|
322
331
|
title: this._props.title,
|
|
323
332
|
type: checkboxGroup_1.CheckboxGroupTypes.Radio,
|
|
324
333
|
value: value
|
|
@@ -336,6 +345,7 @@ var FormControl = /** @class */ (function () {
|
|
|
336
345
|
max: this._props.max || 100,
|
|
337
346
|
onChange: this._props.onChange,
|
|
338
347
|
placeholder: this._props.placeholder,
|
|
348
|
+
required: this._props.required,
|
|
339
349
|
step: this._props.step,
|
|
340
350
|
title: this._props.title,
|
|
341
351
|
type: inputGroup_1.InputGroupTypes.Range,
|
|
@@ -351,6 +361,7 @@ var FormControl = /** @class */ (function () {
|
|
|
351
361
|
isReadonly: true,
|
|
352
362
|
onChange: this._props.onChange,
|
|
353
363
|
placeholder: this._props.placeholder,
|
|
364
|
+
required: this._props.required,
|
|
354
365
|
title: this._props.title,
|
|
355
366
|
type: inputGroup_1.InputGroupTypes.TextField,
|
|
356
367
|
value: value
|
|
@@ -367,7 +378,7 @@ var FormControl = /** @class */ (function () {
|
|
|
367
378
|
isReadonly: this._props.isReadonly,
|
|
368
379
|
items: this._props.items,
|
|
369
380
|
onChange: this._props.onChange,
|
|
370
|
-
|
|
381
|
+
required: this._props.required,
|
|
371
382
|
title: this._props.title,
|
|
372
383
|
type: checkboxGroup_1.CheckboxGroupTypes.Switch,
|
|
373
384
|
value: value
|
|
@@ -383,6 +394,7 @@ var FormControl = /** @class */ (function () {
|
|
|
383
394
|
isReadonly: this._props.isReadonly,
|
|
384
395
|
onChange: this._props.onChange,
|
|
385
396
|
placeholder: this._props.placeholder,
|
|
397
|
+
required: this._props.required,
|
|
386
398
|
rows: this._props.rows,
|
|
387
399
|
title: this._props.title,
|
|
388
400
|
type: inputGroup_1.InputGroupTypes.TextArea,
|
|
@@ -399,6 +411,7 @@ var FormControl = /** @class */ (function () {
|
|
|
399
411
|
isReadonly: this._props.isReadonly,
|
|
400
412
|
onChange: this._props.onChange,
|
|
401
413
|
placeholder: this._props.placeholder,
|
|
414
|
+
required: this._props.required,
|
|
402
415
|
title: this._props.title,
|
|
403
416
|
type: inputGroup_1.InputGroupTypes.TextField,
|
|
404
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
|