gd-bs 6.6.69 → 6.6.71
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 +5 -0
- package/dist/gd-bs-icons.js +1 -1
- package/dist/gd-bs-icons.min.js +1 -1
- package/dist/gd-bs.d.ts +11 -11
- 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 +8 -2
- package/src/components/form/controlTypes.d.ts +11 -11
package/dist/gd-bs.d.ts
CHANGED
|
@@ -1205,7 +1205,7 @@ declare module 'gd-bs/components/form/controlTypes' {
|
|
|
1205
1205
|
onControlRendering?: (control: IFormControlProps) => void | PromiseLike<IFormControlProps>;
|
|
1206
1206
|
onControlRendered?: (control: IFormControl) => void | PromiseLike<IFormControl>;
|
|
1207
1207
|
onGetValue?: (control: IFormControlProps) => any;
|
|
1208
|
-
onValidate?: (control: IFormControlProps,
|
|
1208
|
+
onValidate?: (control: IFormControlProps, results: IFormControlValidationResult) => boolean | IFormControlValidationResult;
|
|
1209
1209
|
required?: boolean;
|
|
1210
1210
|
title?: string;
|
|
1211
1211
|
type?: number;
|
|
@@ -1225,7 +1225,7 @@ declare module 'gd-bs/components/form/controlTypes' {
|
|
|
1225
1225
|
onChange?: (selectedItem: ICheckboxGroupItem, allItems?: Array<ICheckboxGroupItem>, ev?: Event) => void;
|
|
1226
1226
|
onControlRendering?: (control: IFormControlPropsCheckbox) => void | PromiseLike<IFormControlPropsCheckbox>;
|
|
1227
1227
|
onGetValue?: (control: IFormControlPropsCheckbox) => any;
|
|
1228
|
-
onValidate?: (control: IFormControlPropsCheckbox,
|
|
1228
|
+
onValidate?: (control: IFormControlPropsCheckbox, results: IFormControlValidationResult<ICheckboxGroupItem>, allItems?: Array<ICheckboxGroupItem>) => boolean | IFormControlValidationResult<ICheckboxGroupItem>;
|
|
1229
1229
|
}
|
|
1230
1230
|
|
|
1231
1231
|
/**
|
|
@@ -1237,7 +1237,7 @@ declare module 'gd-bs/components/form/controlTypes' {
|
|
|
1237
1237
|
onControlRendering?: (control: IFormControlPropsDropdown) => void | PromiseLike<IFormControlPropsDropdown>;
|
|
1238
1238
|
onGetValue?: (control: IFormControlPropsDropdown) => any;
|
|
1239
1239
|
onMenuRendering?: (props: IPopoverProps) => IPopoverProps;
|
|
1240
|
-
onValidate?: (control: IFormControlPropsDropdown,
|
|
1240
|
+
onValidate?: (control: IFormControlPropsDropdown, results: IFormControlValidationResult<IDropdownItem>) => boolean | IFormControlValidationResult<IDropdownItem>;
|
|
1241
1241
|
}
|
|
1242
1242
|
|
|
1243
1243
|
/**
|
|
@@ -1261,7 +1261,7 @@ declare module 'gd-bs/components/form/controlTypes' {
|
|
|
1261
1261
|
onChange?: (items: IDropdownItem, ev?: Event) => void;
|
|
1262
1262
|
onControlRendering?: (control: IFormControlPropsListBox) => void | PromiseLike<IFormControlPropsListBox>;
|
|
1263
1263
|
onGetValue?: (control: IFormControlPropsListBox) => any;
|
|
1264
|
-
onValidate?: (control: IFormControlPropsListBox,
|
|
1264
|
+
onValidate?: (control: IFormControlPropsListBox, results: IFormControlValidationResult<IDropdownItem>) => boolean | IFormControlValidationResult<IDropdownItem>;
|
|
1265
1265
|
placeholder?: string;
|
|
1266
1266
|
}
|
|
1267
1267
|
|
|
@@ -1277,7 +1277,7 @@ declare module 'gd-bs/components/form/controlTypes' {
|
|
|
1277
1277
|
onChange?: (selectedItems: Array<ICheckboxGroupItem>, allItems?: Array<ICheckboxGroupItem>, ev?: Event) => void;
|
|
1278
1278
|
onControlRendering?: (control: IFormControlPropsCheckbox) => void | PromiseLike<IFormControlPropsCheckbox>;
|
|
1279
1279
|
onGetValue?: (control: IFormControlPropsCheckbox) => any;
|
|
1280
|
-
onValidate?: (control: IFormControlPropsCheckbox,
|
|
1280
|
+
onValidate?: (control: IFormControlPropsCheckbox, results: IFormControlValidationResult<Array<ICheckboxGroupItem>>, allItems?: Array<ICheckboxGroupItem>) => boolean | IFormControlValidationResult<Array<ICheckboxGroupItem>>;
|
|
1281
1281
|
renderRow?: boolean;
|
|
1282
1282
|
}
|
|
1283
1283
|
|
|
@@ -1290,7 +1290,7 @@ declare module 'gd-bs/components/form/controlTypes' {
|
|
|
1290
1290
|
onControlRendering?: (control: IFormControlPropsDropdown) => void | PromiseLike<IFormControlPropsDropdown>;
|
|
1291
1291
|
onGetValue?: (control: IFormControlPropsDropdown) => any;
|
|
1292
1292
|
onMenuRendering?: (props: IPopoverProps) => IPopoverProps;
|
|
1293
|
-
onValidate?: (control: IFormControlPropsDropdown,
|
|
1293
|
+
onValidate?: (control: IFormControlPropsDropdown, results: IFormControlValidationResult<Array<IDropdownItem>>) => boolean | IFormControlValidationResult<Array<IDropdownItem>>;
|
|
1294
1294
|
}
|
|
1295
1295
|
|
|
1296
1296
|
/**
|
|
@@ -1314,7 +1314,7 @@ declare module 'gd-bs/components/form/controlTypes' {
|
|
|
1314
1314
|
onChange?: (items: Array<IDropdownItem>, ev?: Event) => void;
|
|
1315
1315
|
onControlRendering?: (control: IFormControlPropsListBox) => void | PromiseLike<IFormControlPropsListBox>;
|
|
1316
1316
|
onGetValue?: (control: IFormControlPropsListBox) => any;
|
|
1317
|
-
onValidate?: (control: IFormControlPropsListBox,
|
|
1317
|
+
onValidate?: (control: IFormControlPropsListBox, results: IFormControlValidationResult<Array<IDropdownItem>>) => boolean | IFormControlValidationResult<Array<IDropdownItem>>;
|
|
1318
1318
|
placeholder?: string;
|
|
1319
1319
|
}
|
|
1320
1320
|
|
|
@@ -1331,7 +1331,7 @@ declare module 'gd-bs/components/form/controlTypes' {
|
|
|
1331
1331
|
min?: number;
|
|
1332
1332
|
onControlRendering?: (control: IFormControlPropsNumberField) => void | PromiseLike<IFormControlPropsNumberField>;
|
|
1333
1333
|
onGetValue?: (control: IFormControlPropsNumberField) => any;
|
|
1334
|
-
onValidate?: (control: IFormControlPropsNumberField,
|
|
1334
|
+
onValidate?: (control: IFormControlPropsNumberField, results: IFormControlValidationResult<string>) => boolean | IFormControlValidationResult<string>;
|
|
1335
1335
|
step?: number;
|
|
1336
1336
|
}
|
|
1337
1337
|
|
|
@@ -1354,7 +1354,7 @@ declare module 'gd-bs/components/form/controlTypes' {
|
|
|
1354
1354
|
onChange?: (value: string, ev?: Event) => void;
|
|
1355
1355
|
onControlRendering?: (control: IFormControlPropsTextField) => void | PromiseLike<IFormControlPropsTextField>;
|
|
1356
1356
|
onGetValue?: (control: IFormControlPropsTextField) => any;
|
|
1357
|
-
onValidate?: (control: IFormControlPropsTextField,
|
|
1357
|
+
onValidate?: (control: IFormControlPropsTextField, results: IFormControlValidationResult<string>) => boolean | IFormControlValidationResult<string>;
|
|
1358
1358
|
placeholder?: string;
|
|
1359
1359
|
prependedLabel?: string;
|
|
1360
1360
|
rows?: number;
|
|
@@ -1392,11 +1392,11 @@ declare module 'gd-bs/components/form/controlTypes' {
|
|
|
1392
1392
|
/**
|
|
1393
1393
|
* Form Control Validation Result
|
|
1394
1394
|
*/
|
|
1395
|
-
export interface IFormControlValidationResult {
|
|
1395
|
+
export interface IFormControlValidationResult<T = any> {
|
|
1396
1396
|
invalidMessage?: string;
|
|
1397
1397
|
isValid?: boolean;
|
|
1398
1398
|
validMessage?: string;
|
|
1399
|
-
value?:
|
|
1399
|
+
value?: T;
|
|
1400
1400
|
}
|
|
1401
1401
|
}
|
|
1402
1402
|
|