gd-bs 6.6.68 → 6.6.70

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gd-bs",
3
- "version": "6.6.68",
3
+ "version": "6.6.70",
4
4
  "description": "Bootstrap JavaScript, TypeScript and Web Components library.",
5
5
  "main": "build/index.js",
6
6
  "typings": "src/index.d.ts",
@@ -56,7 +56,7 @@ export interface ICheckboxGroup {
56
56
  el: HTMLElement;
57
57
 
58
58
  /** Gets the values. */
59
- getValue: () => { selectedItems: ICheckboxGroupItem | Array<ICheckboxGroupItem>, allItems: Array<ICheckboxGroupItem> };
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 | Array<ICheckboxGroupItem>, allItems?: Array<ICheckboxGroupItem>, ev?: Event) => void;
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
  */
@@ -3,10 +3,10 @@ import {
3
3
  IFormControlPropsDropdown, IFormControlPropsDropdownButton, IFormControlPropsDropdownCheckbox,
4
4
  IFormControlPropsListBox, IFormControlPropsMultiCheckbox,
5
5
  IFormControlPropsMultiDropdown, IFormControlPropsMultiDropdownButton, IFormControlPropsMultiDropdownCheckbox,
6
- IFormControlPropsMultiListBox, IFormControlPropsMultiSwitch,
6
+ IFormControlPropsMultiListBox,
7
7
  IFormControlPropsRange, IFormControlPropsTextField, IFormControlValidationResult
8
8
  } from "./controlTypes";
9
- import { ICheckboxGroup } from "../checkboxGroup/types";
9
+ import { ICheckboxGroup, ICheckboxGroupValue } from "../checkboxGroup/types";
10
10
  import { IDropdown } from "../dropdown/types";
11
11
  import { IInputGroup } from "../inputGroup/types";
12
12
  import { IListBox } from "../listBox/types";
@@ -693,6 +693,11 @@ export class FormControl implements IFormControl {
693
693
  // Set the flag
694
694
  validation.isValid = value.length > 0;
695
695
  }
696
+ // Else, see if this is a checkbox
697
+ else if (this._cb) {
698
+ // Set the flag
699
+ validation.isValid = (value as ICheckboxGroupValue).selectedItems ? true : false;
700
+ }
696
701
  }
697
702
 
698
703
  // See if an event exists