gd-bs 6.1.1 → 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/item.js +1 -0
- package/build/components/dropdown/index.js +1 -0
- package/build/components/form/control.js +19 -0
- 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 -1
- package/dist/gd-bs.js +1 -1
- package/dist/gd-bs.min.js +1 -1
- package/package.json +1 -1
- package/src/components/checkboxGroup/item.ts +1 -0
- package/src/components/checkboxGroup/types.d.ts +1 -0
- package/src/components/dropdown/index.ts +1 -0
- package/src/components/dropdown/types.d.ts +1 -0
- package/src/components/form/control.ts +19 -0
- 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
|
@@ -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
|
};
|
|
@@ -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
|