@fovestta2/web-angular 1.0.21 → 1.0.22

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.
@@ -6,11 +6,22 @@ export interface DropdownOption {
6
6
  label: string;
7
7
  value: string | number;
8
8
  }
9
+ export interface DropdownGroup {
10
+ label: string;
11
+ items: DropdownOption[];
12
+ }
13
+ export interface DropdownViewItem {
14
+ isGroupLabel: boolean;
15
+ label: string;
16
+ value?: string | number;
17
+ option?: DropdownOption;
18
+ isChild?: boolean;
19
+ }
9
20
  export declare class FvDropdownComponent implements OnInit, OnDestroy, OnChanges {
10
21
  private el;
11
22
  label: string;
12
23
  placeholder: string;
13
- options: DropdownOption[];
24
+ options: (DropdownOption | DropdownGroup)[];
14
25
  schema: ValidationSchema;
15
26
  control: FormControl;
16
27
  disabled: boolean;
@@ -22,7 +33,7 @@ export declare class FvDropdownComponent implements OnInit, OnDestroy, OnChanges
22
33
  isOpen: boolean;
23
34
  private subscription?;
24
35
  searchControl: FormControl<string | null>;
25
- filteredOptions: DropdownOption[];
36
+ filteredOptions: DropdownViewItem[];
26
37
  highlightedIndex: number;
27
38
  constructor(el: ElementRef);
28
39
  ngOnInit(): void;
@@ -30,20 +41,23 @@ export declare class FvDropdownComponent implements OnInit, OnDestroy, OnChanges
30
41
  ngOnChanges(changes: SimpleChanges): void;
31
42
  private validateValue;
32
43
  filterOptions(term: string): void;
44
+ private generateViewItems;
45
+ private isGroup;
46
+ private findOption;
33
47
  toggleDropdown(): void;
34
48
  openDropdown(): void;
35
49
  onContainerClick(event: MouseEvent): void;
36
50
  closeDropdown(): void;
37
- selectOption(option: DropdownOption): void;
51
+ selectOption(viewItem: DropdownViewItem): void;
38
52
  onKeyDown(event: KeyboardEvent): void;
53
+ private moveHighlight;
39
54
  private scrollToHighlighted;
40
55
  onBlur(): void;
41
56
  onClickOutside(event: MouseEvent): void;
42
57
  onInputFocus(): void;
43
58
  isRequired(): boolean;
44
59
  getErrorMessage(): string;
45
- getSelectedLabel(): string;
46
- isSelected(option: DropdownOption): boolean;
60
+ isSelected(viewItem: DropdownViewItem): boolean;
47
61
  static ɵfac: i0.ɵɵFactoryDeclaration<FvDropdownComponent, never>;
48
62
  static ɵcmp: i0.ɵɵComponentDeclaration<FvDropdownComponent, "fv-dropdown", never, { "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "options": { "alias": "options"; "required": false; }; "schema": { "alias": "schema"; "required": false; }; "control": { "alias": "control"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; }, { "valueChange": "valueChange"; "blur": "blur"; "focus": "focus"; }, never, never, true, never>;
49
63
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fovestta2/web-angular",
3
- "version": "1.0.21",
3
+ "version": "1.0.22",
4
4
  "description": "Angular UI controls for Fovestta",
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^18.0.0",
package/public-api.d.ts CHANGED
@@ -5,7 +5,7 @@ export * from './lib/fv-month-year-field/fv-month-year-field.component';
5
5
  export * from './lib/fv-number-field/fv-number-field.component';
6
6
  export * from './lib/fv-checkbox/fv-checkbox.component';
7
7
  export { FvRadioGroupComponent, type RadioOption, } from './lib/fv-radio-group/fv-radio-group.component';
8
- export { FvDropdownComponent, type DropdownOption, } from './lib/fv-dropdown/fv-dropdown.component';
8
+ export { FvDropdownComponent, type DropdownOption, type DropdownGroup, } from './lib/fv-dropdown/fv-dropdown.component';
9
9
  export { FvFileSelectorComponent, type FileInfo, } from './lib/fv-file-selector/fv-file-selector.component';
10
10
  export { FvImageSelectorComponent, type ImageInfo, } from './lib/fv-image-selector/fv-image-selector.component';
11
11
  export * from './lib/fv-rich-text-editor/fv-rich-text-editor.component';