gd-bs 6.6.2 → 6.6.4
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/form/control.js +71 -1
- package/dist/gd-bs-icons.js +1 -1
- package/dist/gd-bs-icons.min.js +1 -1
- package/dist/gd-bs.d.ts +24 -0
- package/dist/gd-bs.js +1 -1
- package/dist/gd-bs.min.js +1 -1
- package/package.json +1 -1
- package/src/components/form/control.ts +24 -17
- package/src/components/form/controlTypes.d.ts +24 -0
package/package.json
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
|
-
IFormControl, IFormControlProps, IFormControlPropsCheckbox,
|
|
3
|
-
|
|
2
|
+
IFormControl, IFormControlProps, IFormControlPropsCheckbox,
|
|
3
|
+
IFormControlPropsDropdown, IFormControlPropsDropdownButton, IFormControlPropsDropdownCheckbox,
|
|
4
|
+
IFormControlPropsListBox, IFormControlPropsMultiCheckbox,
|
|
5
|
+
IFormControlPropsMultiDropdown, IFormControlPropsMultiDropdownButton, IFormControlPropsMultiDropdownCheckbox,
|
|
6
|
+
IFormControlPropsMultiListBox, IFormControlPropsMultiSwitch,
|
|
4
7
|
IFormControlPropsRange, IFormControlPropsTextField, IFormControlValidationResult
|
|
5
8
|
} from "./controlTypes";
|
|
6
9
|
import { ICheckboxGroup } from "../checkboxGroup/types";
|
|
@@ -185,9 +188,10 @@ export class FormControl implements IFormControl {
|
|
|
185
188
|
formFl: false,
|
|
186
189
|
id: this._props.id,
|
|
187
190
|
isReadonly: this._props.isReadonly,
|
|
188
|
-
items: (this._props as
|
|
189
|
-
|
|
190
|
-
|
|
191
|
+
items: (this._props as IFormControlPropsDropdownButton).items,
|
|
192
|
+
label: (this.props as IFormControlPropsDropdownButton).placeholder,
|
|
193
|
+
onChange: (this._props as IFormControlPropsDropdownButton).onChange,
|
|
194
|
+
onMenuRendering: (this._props as IFormControlPropsDropdownButton).onMenuRendering,
|
|
191
195
|
required: this._props.required,
|
|
192
196
|
title: this._props.title,
|
|
193
197
|
value
|
|
@@ -202,9 +206,10 @@ export class FormControl implements IFormControl {
|
|
|
202
206
|
id: this._props.id,
|
|
203
207
|
isCheckbox: true,
|
|
204
208
|
isReadonly: this._props.isReadonly,
|
|
205
|
-
items: (this._props as
|
|
206
|
-
|
|
207
|
-
|
|
209
|
+
items: (this._props as IFormControlPropsDropdownCheckbox).items,
|
|
210
|
+
label: (this.props as IFormControlPropsDropdownCheckbox).placeholder,
|
|
211
|
+
onChange: (this._props as IFormControlPropsDropdownCheckbox).onChange,
|
|
212
|
+
onMenuRendering: (this._props as IFormControlPropsDropdownCheckbox).onMenuRendering,
|
|
208
213
|
required: this._props.required,
|
|
209
214
|
title: this._props.title,
|
|
210
215
|
value
|
|
@@ -288,10 +293,10 @@ export class FormControl implements IFormControl {
|
|
|
288
293
|
formFl: true,
|
|
289
294
|
id: this._props.id,
|
|
290
295
|
isReadonly: this._props.isReadonly,
|
|
291
|
-
items: (this._props as
|
|
296
|
+
items: (this._props as IFormControlPropsMultiDropdown).items,
|
|
292
297
|
multi: true,
|
|
293
|
-
onChange: (this._props as
|
|
294
|
-
onMenuRendering: (this._props as
|
|
298
|
+
onChange: (this._props as IFormControlPropsMultiDropdown).onChange,
|
|
299
|
+
onMenuRendering: (this._props as IFormControlPropsMultiDropdown).onMenuRendering,
|
|
295
300
|
required: this._props.required,
|
|
296
301
|
title: this._props.title,
|
|
297
302
|
value
|
|
@@ -305,10 +310,11 @@ export class FormControl implements IFormControl {
|
|
|
305
310
|
formFl: false,
|
|
306
311
|
id: this._props.id,
|
|
307
312
|
isReadonly: this._props.isReadonly,
|
|
308
|
-
items: (this._props as
|
|
313
|
+
items: (this._props as IFormControlPropsMultiDropdownButton).items,
|
|
314
|
+
label: (this._props as IFormControlPropsMultiDropdownButton).placeholder,
|
|
309
315
|
multi: true,
|
|
310
|
-
onChange: (this._props as
|
|
311
|
-
onMenuRendering: (this._props as
|
|
316
|
+
onChange: (this._props as IFormControlPropsMultiDropdownButton).onChange,
|
|
317
|
+
onMenuRendering: (this._props as IFormControlPropsMultiDropdownButton).onMenuRendering,
|
|
312
318
|
required: this._props.required,
|
|
313
319
|
title: this._props.title,
|
|
314
320
|
value
|
|
@@ -323,10 +329,11 @@ export class FormControl implements IFormControl {
|
|
|
323
329
|
id: this._props.id,
|
|
324
330
|
isCheckbox: true,
|
|
325
331
|
isReadonly: this._props.isReadonly,
|
|
326
|
-
items: (this._props as
|
|
332
|
+
items: (this._props as IFormControlPropsMultiDropdownCheckbox).items,
|
|
333
|
+
label: (this._props as IFormControlPropsMultiDropdownCheckbox).placeholder,
|
|
327
334
|
multi: true,
|
|
328
|
-
onChange: (this._props as
|
|
329
|
-
onMenuRendering: (this._props as
|
|
335
|
+
onChange: (this._props as IFormControlPropsMultiDropdownCheckbox).onChange,
|
|
336
|
+
onMenuRendering: (this._props as IFormControlPropsMultiDropdownCheckbox).onMenuRendering,
|
|
330
337
|
required: this._props.required,
|
|
331
338
|
title: this._props.title,
|
|
332
339
|
value
|
|
@@ -119,6 +119,18 @@ export interface IFormControlPropsDropdown extends IFormControlProps {
|
|
|
119
119
|
onValidate?: (control: IFormControlPropsDropdown, value: IFormControlValidationResult) => boolean | IFormControlValidationResult;
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
+
/**
|
|
123
|
+
* Form Control Properties - Dropdown Button
|
|
124
|
+
*/
|
|
125
|
+
export interface IFormControlPropsDropdownButton extends IFormControlPropsDropdown {
|
|
126
|
+
placeholder?: string;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Form Control Properties - Dropdown Checkbox
|
|
131
|
+
*/
|
|
132
|
+
export interface IFormControlPropsDropdownCheckbox extends IFormControlPropsDropdownButton { }
|
|
133
|
+
|
|
122
134
|
/**
|
|
123
135
|
* Form Control Properties - List Box
|
|
124
136
|
*/
|
|
@@ -159,6 +171,18 @@ export interface IFormControlPropsMultiDropdown extends IFormControlProps {
|
|
|
159
171
|
onValidate?: (control: IFormControlPropsDropdown, value: IFormControlValidationResult) => boolean | IFormControlValidationResult;
|
|
160
172
|
}
|
|
161
173
|
|
|
174
|
+
/**
|
|
175
|
+
* Form Control Properties - Multiple Dropdown Button
|
|
176
|
+
*/
|
|
177
|
+
export interface IFormControlPropsMultiDropdownButton extends IFormControlPropsMultiDropdown {
|
|
178
|
+
placeholder?: string;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Form Control Properties - Multiple Dropdown Checkbox
|
|
183
|
+
*/
|
|
184
|
+
export interface IFormControlPropsMultiDropdownCheckbox extends IFormControlPropsMultiDropdownButton { }
|
|
185
|
+
|
|
162
186
|
/**
|
|
163
187
|
* Form Control Properties - Multiple List Box
|
|
164
188
|
*/
|