gd-bs 6.6.67 → 6.6.69
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/bs.js +1 -0
- package/build/components/dropdown/index.js +3 -3
- package/build/icons/svgs/index.d.ts +4100 -0
- package/dist/gd-bs-icons.js +2 -0
- package/dist/gd-bs-icons.js.LICENSE.txt +9771 -0
- package/dist/gd-bs-icons.min.js +1 -0
- package/dist/gd-bs.d.ts +3268 -0
- package/dist/gd-bs.js +2 -0
- package/dist/gd-bs.js.LICENSE.txt +1403 -0
- package/dist/gd-bs.min.js +1 -0
- package/package.json +1 -1
- package/src/components/checkboxGroup/types.d.ts +7 -2
- package/src/components/dropdown/index.ts +3 -3
package/package.json
CHANGED
|
@@ -56,7 +56,7 @@ export interface ICheckboxGroup {
|
|
|
56
56
|
el: HTMLElement;
|
|
57
57
|
|
|
58
58
|
/** Gets the values. */
|
|
59
|
-
getValue: () =>
|
|
59
|
+
getValue: () => ICheckboxGroupValue;
|
|
60
60
|
|
|
61
61
|
/** Hides the checkbox group. */
|
|
62
62
|
hide: () => void;
|
|
@@ -98,13 +98,18 @@ export interface ICheckboxGroupProps extends IBaseProps<ICheckboxGroup> {
|
|
|
98
98
|
items?: Array<ICheckboxGroupItem>;
|
|
99
99
|
multi?: boolean;
|
|
100
100
|
onRender?: (el?: HTMLElement, item?: ICheckboxGroupItem) => void;
|
|
101
|
-
onChange?: (selectedItems: ICheckboxGroupItem |
|
|
101
|
+
onChange?: (selectedItems: ICheckboxGroupItem | ICheckboxGroupItem[], allItems?: ICheckboxGroupItem[], ev?: Event) => void;
|
|
102
102
|
required?: boolean;
|
|
103
103
|
title?: string;
|
|
104
104
|
type?: number;
|
|
105
105
|
value?: any;
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
+
export interface ICheckboxGroupValue {
|
|
109
|
+
selectedItems: ICheckboxGroupItem | Array<ICheckboxGroupItem>;
|
|
110
|
+
allItems: Array<ICheckboxGroupItem>;
|
|
111
|
+
}
|
|
112
|
+
|
|
108
113
|
/**
|
|
109
114
|
* Checkbox Group Types
|
|
110
115
|
*/
|
|
@@ -505,9 +505,9 @@ class _Dropdown extends Base<IDropdownProps> implements IDropdown {
|
|
|
505
505
|
items: this.generateCheckboxItems(),
|
|
506
506
|
multi: this.props.multi,
|
|
507
507
|
value: this.generateCheckboxValue(this.props.value),
|
|
508
|
-
onChange: this.props.onChange ? (
|
|
508
|
+
onChange: this.props.onChange ? (selectedItems, allItems, ev) => {
|
|
509
509
|
// Pass the current values
|
|
510
|
-
this.props.onChange(
|
|
510
|
+
this.props.onChange(selectedItems, ev);
|
|
511
511
|
} : null
|
|
512
512
|
});
|
|
513
513
|
} else {
|
|
@@ -574,7 +574,7 @@ class _Dropdown extends Base<IDropdownProps> implements IDropdown {
|
|
|
574
574
|
// See if the checkboxes exist
|
|
575
575
|
if (this._cb) {
|
|
576
576
|
// Get the values
|
|
577
|
-
let items = this._cb.getValue() as ICheckboxGroupItem[];
|
|
577
|
+
let items = (this._cb.getValue().selectedItems) as ICheckboxGroupItem[];
|
|
578
578
|
items = typeof (items["length"]) === "number" ? items : [items] as any;
|
|
579
579
|
|
|
580
580
|
// Parse the items
|