@haloduck/ui 2.0.17 → 2.0.19

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/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { HttpClient } from '@angular/common/http';
2
2
  import { FormGroup, FormBuilder, ControlValueAccessor } from '@angular/forms';
3
3
  import * as i0 from '@angular/core';
4
- import { EventEmitter, AfterViewInit, ElementRef, OnInit, OnDestroy, Type, OnChanges, SimpleChanges, Renderer2, Injector, TemplateRef } from '@angular/core';
4
+ import { EventEmitter, AfterViewInit, OnChanges, ElementRef, SimpleChanges, OnInit, OnDestroy, Type, Renderer2, Injector, TemplateRef } from '@angular/core';
5
5
  import * as rxjs from 'rxjs';
6
6
  import { Observable, Subject } from 'rxjs';
7
7
  import { LngLat, MenuItemEx, SearchParams, TableRowProperty } from '@haloduck/core';
@@ -56,11 +56,17 @@ declare class ButtonComponent {
56
56
  interface Option {
57
57
  id?: string;
58
58
  value: string;
59
+ isSticky?: boolean;
60
+ isExclusive?: boolean;
61
+ shouldManualInput?: boolean;
62
+ manualPrefix?: string;
59
63
  }
60
64
  declare class SelectDropdownComponent {
61
65
  protected _filteredOptions: i0.WritableSignal<Option[]>;
62
66
  protected _options: Option[];
63
67
  protected _selectedOptionIds: string[];
68
+ protected manualInputValues: Record<string, string>;
69
+ protected activeManualKey: string | null;
64
70
  selectedChange: EventEmitter<string[]>;
65
71
  useFilter: boolean;
66
72
  multiselect: boolean;
@@ -72,14 +78,24 @@ declare class SelectDropdownComponent {
72
78
  get selectedOptions(): string[] | null;
73
79
  onFilterInput(event: Event): void;
74
80
  onToggleOption(option: Option): void;
81
+ isOptionSelected(option: Option): boolean;
82
+ private isIdExclusive;
83
+ private getManualKey;
84
+ private seedManualInputs;
85
+ onManualInputChange(option: Option, value: string): void;
86
+ onManualInputConfirm(option: Option): void;
87
+ onManualInputBlur(option: Option): void;
88
+ private emitSelectedChange;
89
+ private setSelected;
75
90
  static ɵfac: i0.ɵɵFactoryDeclaration<SelectDropdownComponent, never>;
76
91
  static ɵcmp: i0.ɵɵComponentDeclaration<SelectDropdownComponent, "haloduck-select-dropdown", never, { "useFilter": { "alias": "useFilter"; "required": false; }; "multiselect": { "alias": "multiselect"; "required": false; }; "atLeastOne": { "alias": "atLeastOne"; "required": false; }; "asButton": { "alias": "asButton"; "required": false; }; "options": { "alias": "options"; "required": false; }; "selectedOptionIds": { "alias": "selectedOptionIds"; "required": false; }; }, { "selectedChange": "selectedChange"; }, never, never, true, never>;
77
92
  }
78
93
 
79
- declare class SelectComponent implements ControlValueAccessor, AfterViewInit {
94
+ declare class SelectComponent implements ControlValueAccessor, AfterViewInit, OnChanges {
80
95
  private readonly translateService;
81
96
  private readonly overlay;
82
97
  private readonly viewContainerRef;
98
+ private readonly cdr;
83
99
  private overlayRef;
84
100
  selectedChange: EventEmitter<string | string[]>;
85
101
  disabled: boolean | null;
@@ -101,7 +117,8 @@ declare class SelectComponent implements ControlValueAccessor, AfterViewInit {
101
117
  label: ElementRef;
102
118
  isDropdownOpen: i0.WritableSignal<boolean>;
103
119
  selectedOptionIds: string[];
104
- get selectedOptions(): Option[];
120
+ displayedSelectedOptions: Option[];
121
+ private selectedIdToDisplayOption;
105
122
  onClick(event: MouseEvent): void;
106
123
  onKeyDown(event: KeyboardEvent): void;
107
124
  onDeselectOption(event: Event, option: Option): void;
@@ -114,6 +131,9 @@ declare class SelectComponent implements ControlValueAccessor, AfterViewInit {
114
131
  setDisabledState?(isDisabled: boolean): void;
115
132
  ngAfterViewInit(): void;
116
133
  constructor();
134
+ ngOnChanges(changes: SimpleChanges): void;
135
+ private recomputeSelectedOptions;
136
+ private isManualSelection;
117
137
  static ɵfac: i0.ɵɵFactoryDeclaration<SelectComponent, never>;
118
138
  static ɵcmp: i0.ɵɵComponentDeclaration<SelectComponent, "haloduck-select", never, { "disabled": { "alias": "disabled"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "variant": { "alias": "variant"; "required": false; }; "asButton": { "alias": "asButton"; "required": false; }; "useIcon": { "alias": "useIcon"; "required": false; }; "useFilter": { "alias": "useFilter"; "required": false; }; "multiselect": { "alias": "multiselect"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "atLeastOne": { "alias": "atLeastOne"; "required": false; }; "showAll": { "alias": "showAll"; "required": false; }; "options": { "alias": "options"; "required": false; }; "layout": { "alias": "layout"; "required": false; }; "labelWidth": { "alias": "labelWidth"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "selectedChange": "selectedChange"; }, never, ["*", "buttonIcon"], true, never>;
119
139
  }
@@ -647,10 +667,11 @@ declare class TagInputComponent implements ControlValueAccessor, AfterViewInit {
647
667
  declare class TagViewerComponent implements AfterViewInit {
648
668
  label: ElementRef;
649
669
  tags: string[];
670
+ shouldWrap: boolean;
650
671
  set value(tags: string[] | null);
651
672
  ngAfterViewInit(): void;
652
673
  static ɵfac: i0.ɵɵFactoryDeclaration<TagViewerComponent, never>;
653
- static ɵcmp: i0.ɵɵComponentDeclaration<TagViewerComponent, "haloduck-tag-viewer", never, { "value": { "alias": "value"; "required": false; }; }, {}, never, ["*"], true, never>;
674
+ static ɵcmp: i0.ɵɵComponentDeclaration<TagViewerComponent, "haloduck-tag-viewer", never, { "shouldWrap": { "alias": "shouldWrap"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, {}, never, ["*"], true, never>;
654
675
  }
655
676
 
656
677
  interface GroupedConfig {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@haloduck/ui",
3
- "version": "2.0.17",
3
+ "version": "2.0.19",
4
4
  "description": "HaloDuck UI Library - Angular",
5
5
  "keywords": [
6
6
  "angular",