ud-components 0.11.0 → 0.11.2

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.
@@ -26,6 +26,12 @@ export declare class AutocompleteComponent implements OnInit, OnChanges, OnDestr
26
26
  disabled: boolean;
27
27
  hint: string;
28
28
  size: UdInputSize;
29
+ /**
30
+ * On blur, put the selected option's label back (or clear the box when
31
+ * nothing is selected), so typed-but-unpicked text never sits next to a
32
+ * different value. Turn off for fields whose parent accepts free text.
33
+ */
34
+ restoreOnBlur: boolean;
29
35
  searchChange: EventEmitter<string>;
30
36
  focused: boolean;
31
37
  searchControl: FormControl<string | null>;
@@ -33,17 +39,21 @@ export declare class AutocompleteComponent implements OnInit, OnChanges, OnDestr
33
39
  private controlContainer;
34
40
  private destroy$;
35
41
  private labelMap;
42
+ /** Survives the options being swapped out by a later search. */
43
+ private selected?;
36
44
  get formControl(): FormControl;
37
45
  ngOnChanges(changes: SimpleChanges): void;
38
46
  onFocus(): void;
47
+ onBlur(): void;
39
48
  ngOnInit(): void;
40
49
  ngOnDestroy(): void;
41
50
  /** Called when the user selects an option from the dropdown */
42
51
  onOptionSelected(value: any): void;
43
52
  /** Display function for mat-autocomplete — shows the label, not the raw value */
44
53
  displayFn: (value: any) => string;
54
+ private selectedLabel;
45
55
  private filter;
46
56
  private buildLabelMap;
47
57
  static ɵfac: i0.ɵɵFactoryDeclaration<AutocompleteComponent, never>;
48
- static ɵcmp: i0.ɵɵComponentDeclaration<AutocompleteComponent, "ud-autocomplete", never, { "controlName": { "alias": "controlName"; "required": true; }; "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "iconFontSet": { "alias": "iconFontSet"; "required": false; }; "options": { "alias": "options"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "size": { "alias": "size"; "required": false; }; }, { "searchChange": "searchChange"; }, never, never, true, never>;
58
+ static ɵcmp: i0.ɵɵComponentDeclaration<AutocompleteComponent, "ud-autocomplete", never, { "controlName": { "alias": "controlName"; "required": true; }; "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "icon": { "alias": "icon"; "required": false; }; "iconFontSet": { "alias": "iconFontSet"; "required": false; }; "options": { "alias": "options"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "hint": { "alias": "hint"; "required": false; }; "size": { "alias": "size"; "required": false; }; "restoreOnBlur": { "alias": "restoreOnBlur"; "required": false; }; }, { "searchChange": "searchChange"; }, never, never, true, never>;
49
59
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ud-components",
3
- "version": "0.11.0",
3
+ "version": "0.11.2",
4
4
  "peerDependencies": {
5
5
  "@angular/cdk": ">=19",
6
6
  "@angular/common": ">=19",