angular-ui-controls 0.1.0-rc.2 → 0.1.0-rc.4

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.
@@ -0,0 +1,192 @@
1
+ # SearchFilterComponent
2
+
3
+ Search box with a category filter.
4
+
5
+ Selector `ui-search-filter`.
6
+
7
+ ## Usage
8
+
9
+ ```ts
10
+ import { SearchFilterComponent } from 'angular-ui-controls';
11
+ ```
12
+
13
+ Add `SearchFilterComponent` to the host component's imports. Add `FormsModule` for this example. Import `SearchFilterValue` from `angular-ui-controls` for the example field.
14
+
15
+ ```html
16
+ <ui-search-filter
17
+ inputId="searchFilter"
18
+ searchTextLabel="Search"
19
+ searchSelectLabel="Department filter"
20
+ [(ngModel)]="searchFilter"
21
+ [options]="departments"
22
+ labelKey="name"
23
+ valueKey="id"
24
+ />
25
+ ```
26
+
27
+ Example fields in the host component.
28
+
29
+ ```ts
30
+ searchFilter: SearchFilterValue | null = { searchVal: '', selectVal: null };
31
+ departments = [
32
+ { id: 1, name: 'Engineering' },
33
+ { id: 2, name: 'Design' },
34
+ { id: 3, name: 'Support' },
35
+ ...Array.from({ length: 75 }, (_, i) => ({ id: i + 4, name: 'Regional office ' + (i + 1) })),
36
+ ];
37
+ ```
38
+
39
+ ## Inputs
40
+
41
+ | Input | Type | Required | Default | Description |
42
+ | --------------------- | ------------------------------------ | -------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------- |
43
+ | `preventCopyPasteCut` | `boolean` | No | `false` | Blocks copy, cut, and paste on the field when enabled. |
44
+ | `idPrefix` | `string` | No | `''` | Optional namespace prepended to inner control IDs to distinguish repeated instances. |
45
+ | `inputId` | `string` | Yes | — | Identifier assigned to the inner control. Set `idPrefix` to add a prefix. |
46
+ | `searchTextLabel` | `string` | No | `''` | Label displayed above the input field. |
47
+ | `searchSelectLabel` | `string` | No | `''` | Label displayed above the dropdown. |
48
+ | `disabled` | `boolean` | No | `false` | Disables the control. Angular Forms can also update this state through setDisabledState. Uses Angular boolean attribute coercion. |
49
+ | `fieldName` | `string \| number` | No | `undefined` | Consumer-defined field identifier included in event metadata. |
50
+ | `placeholder` | `string` | No | `''` | Hint text or translation key displayed while the control is empty. |
51
+ | `readonly` | `boolean` | No | `false` | Requests the existing read-only behavior without disabling the parent form control. |
52
+ | `maxLength` | `number` | No | `undefined` | Maximum number of characters allowed. |
53
+ | `inputType` | `'text' \| 'number' \| 'percentage'` | No | `'text'` | Defines input behavior: number or percentage. |
54
+ | `errorMessage` | `string` | No | `''` | Error message displayed when validation fails. |
55
+ | `required` | `boolean` | No | `false` | Marks the control as required. Configure any parent-form validators separately. |
56
+ | `searchButtonTooltip` | `string` | No | `''` | Tooltip text or translation key for the search button. |
57
+ | `selectPlaceholder` | `string` | No | `''` | Placeholder text for select dropdown. |
58
+ | `options` | `any[]` | No | `[]` | Options rendered by the control; use the label/value key inputs for object options. |
59
+ | `labelKey` | `string` | No | `''` | Property name read from an option object to obtain its visible label. |
60
+ | `valueKey` | `string` | No | `''` | Property name used to identify or extract an option value. |
61
+ | `multiple` | `boolean` | No | `false` | Enables the existing multiple-selection mode. |
62
+ | `showClearIcon` | `boolean` | No | `false` | Show clear icon button in select dropdown. |
63
+ | `value` | `SearchFilterValue \| null` | No | `null` | Compound model; legacy searchVal/selectVal keys remain stable. |
64
+
65
+ ## Outputs
66
+
67
+ | Output | Payload | When it fires |
68
+ | ------------------------ | ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
69
+ | `modelChange` | `SearchInputModelChangeEvent` | Emits a model-change event with field metadata. |
70
+ | `inputChanged` | `SearchInputInputEvent` | Emits when the user edits the field. |
71
+ | `focusGained` | `SearchInputFocusEvent` | Emits when the inner field gains focus. |
72
+ | `focusLost` | `SearchInputBlurEvent` | Emits when the inner field loses focus. |
73
+ | `keyPressed` | `SearchInputKeydownEvent` | Emits on the inner field keydown event. |
74
+ | `keyReleased` | `SearchInputKeyupEvent` | Emits on the inner field keyup event. |
75
+ | `enterPressed` | `SearchInputKeyEnterEvent` | Emits when Enter is released in the inner field. |
76
+ | `inputClicked` | `SearchInputClickEvent` | Emits when the inner input is clicked. |
77
+ | `searchClicked` | `SearchInputInfo` | Emits when the search action is activated. |
78
+ | `selectionChange` | `any` | Emits when the selection handler processes a selection. Emits `{ selectionChange: unknown; modelValue: any; fieldName: string \| number; inputRef?: Element \| null; }` or `{ selectionChange: null; modelValue: any; fieldName: string \| number; inputRef?: Element \| null; }`. |
79
+ | `panelOpenChange` | `any` | Emits when the select panel open state changes. Emits `{ opened: boolean; selectionChange: boolean; modelValue: any; fieldName: string \| number; inputRef?: Element \| null; }`. |
80
+ | `panelOpened` | `any` | Emits when the select panel opens. |
81
+ | `panelClosed` | `any` | Emits when the select panel closes. |
82
+ | `blurred` | `any` | Emits when the control loses focus. |
83
+ | `optionClicked` | `any` | Emits when an option is clicked. Emits `{ activeOption: unknown; }`. |
84
+ | `optionSelectionChanged` | `any` | Emits when the existing option-selection handler runs. Emits `{ event: unknown; option: unknown; }`. |
85
+ | `valueChange` | `SearchFilterValue \| null` | — |
86
+
87
+ ## Local option and event types
88
+
89
+ These declarations describe the payload and option shapes. Import availability depends on the package entry point.
90
+
91
+ ```ts
92
+ export interface SearchFilterValue {
93
+ searchVal: string;
94
+ selectVal: any;
95
+ }
96
+
97
+ export interface SearchInputModelChangeEvent extends SearchInputInfo {
98
+ /** Updated input value */
99
+ modelChangeEvent: any;
100
+ }
101
+
102
+ export interface SearchInputInfo {
103
+ /** Current input value */
104
+ modelValue: any;
105
+
106
+ /** Field identifier used by parent component */
107
+ fieldName: string | number;
108
+
109
+ /** Native input element reference (if inputId is provided) */
110
+ inputRef?: Element | null;
111
+ }
112
+
113
+ export interface SearchInputInputEvent extends SearchInputInfo {
114
+ /** Native input/change event */
115
+ changeEvent: Event;
116
+ }
117
+
118
+ export interface SearchInputFocusEvent extends SearchInputInfo {
119
+ /** Native focus event */
120
+ focusEvent: FocusEvent;
121
+ }
122
+
123
+ export interface SearchInputBlurEvent extends SearchInputInfo {
124
+ /** Native blur event */
125
+ blurEvent: FocusEvent;
126
+ }
127
+
128
+ export interface SearchInputKeydownEvent extends SearchInputInfo {
129
+ /** Native keyboard event */
130
+ keyDownEvent: KeyboardEvent;
131
+ }
132
+
133
+ export interface SearchInputKeyupEvent extends SearchInputInfo {
134
+ /** Native keyboard event */
135
+ keyUpEvent: KeyboardEvent;
136
+ }
137
+
138
+ export interface SearchInputKeyEnterEvent extends SearchInputInfo {
139
+ /** Enter key or input-related event */
140
+ keyEnterEvent: Event;
141
+ }
142
+
143
+ export interface SearchInputClickEvent extends SearchInputInfo {
144
+ /** Mouse click event */
145
+ clickEvent: MouseEvent;
146
+ }
147
+ ```
148
+
149
+ ## Public instance properties
150
+
151
+ These TypeScript properties include state exposed by the class. Use the Inputs and Outputs tables for Angular template bindings.
152
+
153
+ | Property | Type | Description |
154
+ | ------------------- | -------------------------------------------- | -------------------------------------------------------------- |
155
+ | `effectiveId` | `string` | — |
156
+ | `onChangeCallback` | `(value: SearchFilterValue \| null) => void` | — |
157
+ | `onTouchedCallback` | `() => void` | — |
158
+ | `modelValue` | `string` | Getters and setters for the internal form controls. |
159
+ | `selectedValue` | `any` | — |
160
+ | `inputModelValue` | `any` | **Deprecated.** Use selectedValue for direct component access. |
161
+
162
+ ## Public instance methods
163
+
164
+ The list includes Angular Forms plumbing and component event handlers as well as methods called directly by consumers.
165
+
166
+ | Method | Signature | Description |
167
+ | ----------------------- | -------------------------------------------------------- | ----------------------------------------------- |
168
+ | `commitValue` | `(): void` | — |
169
+ | `handleFocusOut` | `(event: FocusEvent): void` | — |
170
+ | `writeValue` | `(value: SearchFilterValue \| null): void` | ControlValueAccessor implementation. |
171
+ | `registerOnChange` | `(fn: (value: SearchFilterValue \| null) => void): void` | — |
172
+ | `registerOnTouched` | `(fn: () => void): void` | — |
173
+ | `setDisabledState` | `(isDisabled: boolean): void` | — |
174
+ | `modelValueChange` | `(modelChangeEvent: string): void` | Emits when the model value changes. |
175
+ | `inputChange` | `(changeValue: Event): void` | Emits on input value change. |
176
+ | `focusChange` | `(onFocusEvent: FocusEvent): void` | Emits when input gains focus. |
177
+ | `blurChange` | `(blurEvent: FocusEvent): void` | Emits when input loses focus. |
178
+ | `keydownHandle` | `(keyDownEvent: KeyboardEvent): void` | Emits on keydown action. |
179
+ | `keyupHandle` | `(keyUpEvent: KeyboardEvent): void` | Emits on keyup action. |
180
+ | `keyEnterHandle` | `(event: Event): void` | Emits when Enter key is pressed. |
181
+ | `inputClick` | `(clickEvent: MouseEvent): void` | Emits when input field is clicked. |
182
+ | `onSearchClick` | `(): void` | Emits when search button is clicked. |
183
+ | `handleSelectionChange` | `(event: unknown): void` | Emits dropdown selection change event. |
184
+ | `openedChange` | `(opened: boolean): void` | Emits dropdown opened/closed change event. |
185
+ | `opened` | `(): void` | Emits dropdown opened event. |
186
+ | `closed` | `(): void` | Emits dropdown closed event. |
187
+ | `blur` | `(): void` | Emits select dropdown blur event. |
188
+ | `optionSelectionChange` | `(event: unknown, option: unknown): void` | Emits when a dropdown option selection changes. |
189
+ | `optionClick` | `(option: unknown): void` | Emits when a dropdown option is clicked. |
190
+ | `clearSelect` | `(): void` | Clears select dropdown value. |
191
+
192
+ [Component source](https://github.com/Abhilash-A-S/angular-ui-controls/blob/develop/projects/ui-controls/src/lib/component/search-filter/search-filter.component.ts) · [Playground example](https://github.com/Abhilash-A-S/angular-ui-controls/blob/develop/projects/demo/src/app.component.html)
@@ -0,0 +1,160 @@
1
+ # SearchInputComponent
2
+
3
+ Search box with a search action.
4
+
5
+ Selector `ui-search-input`.
6
+
7
+ ## Usage
8
+
9
+ ```ts
10
+ import { SearchInputComponent } from 'angular-ui-controls';
11
+ ```
12
+
13
+ Add `SearchInputComponent` to the host component's imports. Add `FormsModule` for this example.
14
+
15
+ ```html
16
+ <ui-search-input
17
+ inputId="searchText"
18
+ label="Search"
19
+ placeholder="Type to search..."
20
+ [(ngModel)]="searchText"
21
+ />
22
+ ```
23
+
24
+ Example fields in the host component.
25
+
26
+ ```ts
27
+ searchText = '';
28
+ ```
29
+
30
+ Use Angular Forms or `[(value)]` for binding. The tables include inherited bindings. The Required column refers to whether the template must supply the input.
31
+
32
+ ## Inputs
33
+
34
+ | Input | Type | Required | Default | Description |
35
+ | ---------------------- | ------------------------------------ | -------- | ----------- | --------------------------------------------------------------------------------------------------------------------------------- |
36
+ | `preventCopyPasteCut` | `boolean` | No | `false` | Blocks copy, cut, and paste on the field when enabled. |
37
+ | `inputId` | `string` | Yes | — | Identifier assigned to the inner control. Set `idPrefix` to add a prefix. |
38
+ | `label` | `string` | No | `''` | Label text or translation key displayed for this control. |
39
+ | `searchDisabled` | `boolean` | No | `false` | Disables the search text input independently of the search button. |
40
+ | `searchButtonDisabled` | `boolean` | No | `false` | Disables the search action button independently of the text input. |
41
+ | `fieldName` | `string \| number` | No | `undefined` | Consumer-defined field identifier included in event metadata. |
42
+ | `placeholder` | `string` | No | `''` | Hint text or translation key displayed while the control is empty. |
43
+ | `readonly` | `boolean` | No | `false` | Requests the existing read-only behavior without disabling the parent form control. |
44
+ | `maxLength` | `number` | No | `undefined` | Maximum number of characters allowed. |
45
+ | `searchButtonPosition` | `'before' \| 'after'` | No | `'after'` | Determines where the search button is rendered relative to the input. |
46
+ | `inputType` | `'text' \| 'number' \| 'percentage'` | No | `'text'` | Defines input behavior: number or percentage. |
47
+ | `errorMessage` | `string` | No | `''` | Error message displayed when validation fails. |
48
+ | `required` | `boolean` | No | `false` | Marks the control as required. Configure any parent-form validators separately. |
49
+ | `searchButtonTooltip` | `string` | No | `''` | Tooltip text or translation key for the search button. |
50
+ | `disabled` | `boolean` | No | `false` | Disables the control. Angular Forms can also update this state through setDisabledState. Uses Angular boolean attribute coercion. |
51
+ | `idPrefix` | `string` | No | `''` | Optional namespace prepended to inner control IDs to distinguish repeated instances. |
52
+ | `value` | `any` | No | `null` | Canonical value binding. Programmatic writes never emit user change events. |
53
+
54
+ ## Outputs
55
+
56
+ | Output | Payload | When it fires |
57
+ | --------------- | ----------------------------- | ----------------------------------------------------------------------- |
58
+ | `modelChange` | `SearchInputModelChangeEvent` | Emits a model-change event with field metadata. |
59
+ | `inputChanged` | `SearchInputInputEvent` | Emits when the user edits the field. |
60
+ | `focusGained` | `SearchInputFocusEvent` | Emits when the inner field gains focus. |
61
+ | `focusLost` | `SearchInputBlurEvent` | Emits when the inner field loses focus. |
62
+ | `keyPressed` | `SearchInputKeydownEvent` | Emits on the inner field keydown event. |
63
+ | `keyReleased` | `SearchInputKeyupEvent` | Emits on the inner field keyup event. |
64
+ | `enterPressed` | `SearchInputKeyEnterEvent` | Emits when Enter is released in the inner field. |
65
+ | `inputClicked` | `SearchInputClickEvent` | Emits when the inner input is clicked. |
66
+ | `searchClicked` | `SearchInputInfo` | Emits when the search action is activated. |
67
+ | `valueChange` | `any` | Emits the raw value once per committed user edit. Supports `[(value)]`. |
68
+
69
+ ## Local option and event types
70
+
71
+ These declarations describe the payload and option shapes. Import availability depends on the package entry point.
72
+
73
+ ```ts
74
+ export interface SearchInputModelChangeEvent extends SearchInputInfo {
75
+ /** Updated input value */
76
+ modelChangeEvent: any;
77
+ }
78
+
79
+ export interface SearchInputInfo {
80
+ /** Current input value */
81
+ modelValue: any;
82
+
83
+ /** Field identifier used by parent component */
84
+ fieldName: string | number;
85
+
86
+ /** Native input element reference (if inputId is provided) */
87
+ inputRef?: Element | null;
88
+ }
89
+
90
+ export interface SearchInputInputEvent extends SearchInputInfo {
91
+ /** Native input/change event */
92
+ changeEvent: Event;
93
+ }
94
+
95
+ export interface SearchInputFocusEvent extends SearchInputInfo {
96
+ /** Native focus event */
97
+ focusEvent: FocusEvent;
98
+ }
99
+
100
+ export interface SearchInputBlurEvent extends SearchInputInfo {
101
+ /** Native blur event */
102
+ blurEvent: FocusEvent;
103
+ }
104
+
105
+ export interface SearchInputKeydownEvent extends SearchInputInfo {
106
+ /** Native keyboard event */
107
+ keyDownEvent: KeyboardEvent;
108
+ }
109
+
110
+ export interface SearchInputKeyupEvent extends SearchInputInfo {
111
+ /** Native keyboard event */
112
+ keyUpEvent: KeyboardEvent;
113
+ }
114
+
115
+ export interface SearchInputKeyEnterEvent extends SearchInputInfo {
116
+ /** Enter key or input-related event */
117
+ keyEnterEvent: Event;
118
+ }
119
+
120
+ export interface SearchInputClickEvent extends SearchInputInfo {
121
+ /** Mouse click event */
122
+ clickEvent: MouseEvent;
123
+ }
124
+ ```
125
+
126
+ ## Public instance properties
127
+
128
+ These TypeScript properties include state exposed by the class. Use the Inputs and Outputs tables for Angular template bindings.
129
+
130
+ | Property | Type | Description |
131
+ | ------------------- | ---------------------------- | ------------------------------------------------------------------------------------------ |
132
+ | `modelValue` | `any` | Internal model getter/setter backed by the shared control value. |
133
+ | `onChangeCallback` | `(value: T \| null) => void` | Standard change and touch callbacks. |
134
+ | `onTouchedCallback` | `() => void` | — |
135
+ | `effectiveId` | `string` | Plain string property bound in template [id]="effectiveId" (zero function or CD overhead). |
136
+
137
+ ## Public instance methods
138
+
139
+ The list includes Angular Forms plumbing and component event handlers as well as methods called directly by consumers.
140
+
141
+ | Method | Signature | Description |
142
+ | ------------------- | ------------------------------------------ | ---------------------------------------------------------------------------------------- |
143
+ | `modelValueChange` | `(modelChangeEvent: string): void` | Emits when the model value changes. |
144
+ | `inputChange` | `(changeValue: Event): void` | Emits on input value change. |
145
+ | `focusChange` | `(onFocusEvent: FocusEvent): void` | Emits when input gains focus. |
146
+ | `blurChange` | `(blurEvent: FocusEvent): void` | Emits when input loses focus. |
147
+ | `keydownHandle` | `(keyDownEvent: KeyboardEvent): void` | Emits on keydown action. |
148
+ | `keyupHandle` | `(keyUpEvent: KeyboardEvent): void` | Emits on keyup action. |
149
+ | `keyEnterHandle` | `(event: Event): void` | Emits when Enter key is pressed. |
150
+ | `inputClick` | `(clickEvent: MouseEvent): void` | Emits when input field is clicked. |
151
+ | `onSearchClick` | `(): void` | Emits when search button field is clicked. |
152
+ | `configureId` | `(): void` | — |
153
+ | `commitValue` | `(value?: any \| null): void` | Commit a view edit after the inner control has updated its local model. |
154
+ | `handleFocusOut` | `(event: FocusEvent): void` | Touch the outer control only when focus leaves the whole composite control. |
155
+ | `writeValue` | `(value: any \| null): void` | Writes a new value from the form model to the view. |
156
+ | `registerOnChange` | `(fn: (value: any \| null) => void): void` | Registers a callback function that is called when the control's value changes in the UI. |
157
+ | `registerOnTouched` | `(fn: () => void): void` | Registers a callback function that is called when the control is touched. |
158
+ | `setDisabledState` | `(isDisabled: boolean): void` | Updates the disabled state from the form model. |
159
+
160
+ [Component source](https://github.com/Abhilash-A-S/angular-ui-controls/blob/develop/projects/ui-controls/src/lib/component/search-input/search-input.component.ts) · [Playground example](https://github.com/Abhilash-A-S/angular-ui-controls/blob/develop/projects/demo/src/app.component.html)
@@ -0,0 +1,195 @@
1
+ # SearchableSelectComponent
2
+
3
+ Searchable option list.
4
+
5
+ Selector `ui-searchable-select`.
6
+
7
+ ## Usage
8
+
9
+ ```ts
10
+ import { SearchableSelectComponent } from 'angular-ui-controls/forms';
11
+ ```
12
+
13
+ Add `SearchableSelectComponent` to the host component's imports. Add `FormsModule` for this example.
14
+
15
+ ```html
16
+ <ui-searchable-select
17
+ inputId="department"
18
+ label="Department"
19
+ [(ngModel)]="department"
20
+ [options]="departments"
21
+ labelKey="name"
22
+ valueKey="id"
23
+ [hideAllOption]="true"
24
+ />
25
+ ```
26
+
27
+ Example fields in the host component.
28
+
29
+ ```ts
30
+ department: number | null = null;
31
+ departments = [
32
+ { id: 1, name: 'Engineering' },
33
+ { id: 2, name: 'Design' },
34
+ { id: 3, name: 'Support' },
35
+ ...Array.from({ length: 75 }, (_, i) => ({ id: i + 4, name: 'Regional office ' + (i + 1) })),
36
+ ];
37
+ ```
38
+
39
+ Use Angular Forms or `[(value)]` for binding. The tables include inherited bindings. The Required column refers to whether the template must supply the input.
40
+
41
+ ## Inputs
42
+
43
+ | Input | Type | Required | Default | Description |
44
+ | --------------------------------- | -------------------------- | -------- | -------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
45
+ | `itemSize` | `number` | No | `36` | Height in pixels of each option for virtual scrolling (defaults to 36px). |
46
+ | `inputId` | `string` | Yes | — | Identifier assigned to the inner control. Set `idPrefix` to add a prefix. |
47
+ | `label` | `string` | No | `''` | Label text or translation key displayed for this control. |
48
+ | `showSearch` | `boolean` | No | `true` | Enable the search in the option. |
49
+ | `errorMessage` | `string` | No | `''` | Error message shown when validation fails. |
50
+ | `required` | `boolean` | No | `false` | Marks the control as required. Configure any parent-form validators separately. |
51
+ | `fieldName` | `string \| number` | No | `undefined` | Consumer-defined field identifier included in event metadata. |
52
+ | `selectPlaceholder` | `string` | No | `''` | Placeholder text for the select field. |
53
+ | `searchPlaceholder` | `string` | No | `''` | Placeholder text for search input. |
54
+ | `readonly` | `boolean` | No | `false` | Requests the existing read-only behavior without disabling the parent form control. |
55
+ | `showToggleAllCheckbox` | `boolean` | No | `false` | Displays "Select All" checkbox. |
56
+ | `noEntriesFoundLabel` | `string` | No | `'No Entries Found'` | Label shown when no entries are found. |
57
+ | `toggleAllCheckboxTooltipMessage` | `string` | No | `''` | Tooltip message for select-all checkbox. |
58
+ | `showSearchCheckbox` | `boolean` | No | `false` | Shows checkbox in search area. |
59
+ | `multiple` | `boolean` | No | `false` | Enables the existing multiple-selection mode. |
60
+ | `options` | `SearchableSelectOption[]` | No | `[]` | Options rendered by the control; use the label/value key inputs for object options. |
61
+ | `labelKey` | `string` | No | `''` | Property name read from an option object to obtain its visible label. |
62
+ | `valueKey` | `string` | No | `''` | Property name used to identify or extract an option value. |
63
+ | `hiddenKey` | `string` | No | `'isHidden'` | Key in option object used to determine if the option should be hidden from dropdown. Defaults to 'isHidden'. |
64
+ | `serverSideSearch` | `boolean` | No | `false` | Enables server-side/external search by bypassing local pipe filtering. |
65
+ | `searchStartsWith` | `boolean` | No | `false` | Configuration for search starts with. |
66
+ | `showClearIcon` | `boolean` | No | `false` | To clear the selected dropdown list. |
67
+ | `enableAllOption` | `boolean` | No | `false` | Key used to map model value to option. |
68
+ | `hideAllOption` | `boolean` | No | `false` | Removes the "All" option that is otherwise added automatically in multi-select mode. |
69
+ | `enableSorting` | `boolean` | No | `false` | Key used to enable / disable sorting. |
70
+ | `singleLineOption` | `boolean` | No | `false` | Keeps each option on a single line with ellipsis; full text is shown in a tooltip on hover when truncated. |
71
+ | `sortAscending` | `boolean` | No | `true` | Defines whether the list should be sorted in ascending order. |
72
+ | `sortKey` | `string` | No | `''` | Key used to sort the array. |
73
+ | `disabled` | `boolean` | No | `false` | Disables the control. Angular Forms can also update this state through setDisabledState. Uses Angular boolean attribute coercion. |
74
+ | `idPrefix` | `string` | No | `''` | Optional namespace prepended to inner control IDs to distinguish repeated instances. |
75
+ | `value` | `any` | No | `null` | Canonical value binding. Programmatic writes never emit user change events. |
76
+
77
+ ## Outputs
78
+
79
+ | Output | Payload | When it fires |
80
+ | ------------------ | -------------------------------------- | ----------------------------------------------------------------------- |
81
+ | `selectAllChange` | `SearchableSelectToggleAllEvent` | Emits when the select-all action runs. |
82
+ | `selectionChange` | `SearchableSelectSelectionChangeEvent` | Emits when the selection handler processes a selection. |
83
+ | `panelOpenChange` | `SearchableSelectOpenCloseEvent` | Emits when the select panel open state changes. |
84
+ | `panelOpened` | `SearchableSelectFieldInfo` | Emits when the select panel opens. |
85
+ | `panelClosed` | `SearchableSelectFieldInfo` | Emits when the select panel closes. |
86
+ | `blurred` | `SearchableSelectFieldInfo` | Emits when the control loses focus. |
87
+ | `optionClicked` | `SearchableSelectOptionClickEvent` | Emits when an option is clicked. |
88
+ | `searchTextChange` | `string` | Emits the updated search string for consumer filtering. |
89
+ | `valueChange` | `any` | Emits the raw value once per committed user edit. Supports `[(value)]`. |
90
+
91
+ ## Local option and event types
92
+
93
+ These declarations describe the payload and option shapes. Import availability depends on the package entry point.
94
+
95
+ ```ts
96
+ export type SearchableSelectOption =
97
+ | string
98
+ | number
99
+ | SearchableSelectOptionItem
100
+ | Record<string, any>;
101
+
102
+ export interface SearchableSelectOptionItem {
103
+ [key: string]: any;
104
+ isDisabled?: boolean;
105
+ isHidden?: boolean;
106
+ }
107
+
108
+ export interface SearchableSelectToggleAllEvent extends SearchableSelectFieldInfo {
109
+ /** True if all options are selected, false if cleared */
110
+ selectAllValue: boolean;
111
+ }
112
+
113
+ export interface SearchableSelectFieldInfo {
114
+ /** Current value(s) bound to the select */
115
+ value: any;
116
+ /** @deprecated Use value. */
117
+ modelValue: any;
118
+
119
+ /** Field identifier used in parent component */
120
+ fieldName: string | number;
121
+ /** @deprecated Use fieldName. */
122
+ textFieldName: string | number;
123
+
124
+ /** Optional reference to native input element */
125
+ inputRef?: Element | null;
126
+ }
127
+
128
+ export interface SearchableSelectSelectionChangeEvent extends SearchableSelectFieldInfo {
129
+ /** MatSelect change event containing selected value(s) */
130
+ selectionChange: MatSelectChange | null;
131
+ }
132
+
133
+ export interface SearchableSelectOpenCloseEvent extends SearchableSelectFieldInfo {
134
+ /** Boolean indicating whether the dropdown is opened or closed */
135
+ isOpen: boolean;
136
+ /** @deprecated Use isOpen. */
137
+ selectionChange: boolean;
138
+ }
139
+
140
+ export interface SearchableSelectOptionClickEvent {
141
+ /** The clicked option */
142
+ activeOption: SearchableSelectOption;
143
+ }
144
+ ```
145
+
146
+ ## Public instance properties
147
+
148
+ These TypeScript properties include state exposed by the class. Use the Inputs and Outputs tables for Angular template bindings.
149
+
150
+ | Property | Type | Description |
151
+ | -------------------------- | ----------------------------------------- | ------------------------------------------------------------------------------------------ |
152
+ | `searchText` | `string` | Search text entered by the user. |
153
+ | `hasSelectedValue` | `boolean` | — |
154
+ | `selectedValue` | `any` | Internal model bound to mat-select. |
155
+ | `inputModelValue` | `any` | **Deprecated.** Use selectedValue for direct component access. |
156
+ | `internalSelectList` | `any[]` | — |
157
+ | `modelValue` | `any` | Internal model getter/setter backed by the shared control value. |
158
+ | `filterConditionStartWith` | `boolean` | Enable/disable search in the starting/conatin mode. |
159
+ | `hiddenOptions` | `Signal<any[]>` | — |
160
+ | `trackByFn` | `(index: number, item: any) => any` | — |
161
+ | `compareObjects` | `(option1: any, option2: any) => boolean` | — |
162
+ | `onChangeCallback` | `(value: T \| null) => void` | Standard change and touch callbacks. |
163
+ | `onTouchedCallback` | `() => void` | — |
164
+ | `effectiveId` | `string` | Plain string property bound in template [id]="effectiveId" (zero function or CD overhead). |
165
+
166
+ ## Public instance methods
167
+
168
+ The list includes Angular Forms plumbing and component event handlers as well as methods called directly by consumers.
169
+
170
+ | Method | Signature | Description |
171
+ | ----------------------- | --------------------------------------------- | ---------------------------------------------------------------------------------------- |
172
+ | `writeValue` | `(value: any): void` | Intercept values written by Angular Forms framework (e.g., ngModel). |
173
+ | `getSelectedModelValue` | `(selectedValue: any): any` | — |
174
+ | `handleSelectionChange` | `(event: MatSelectChange): void` | Emits when the selected value changes in the dropdown. |
175
+ | `toggleSelectAll` | `(selectAllValue: boolean): void` | Handles select-all toggle action from search checkbox. |
176
+ | `handleOpenedChange` | `(isOpen: boolean): void` | — |
177
+ | `openedChange` | `(opened: boolean): void` | Emits when the open state of the dropdown changes. |
178
+ | `opened` | `(): void` | Emits when the dropdown panel is opened. |
179
+ | `closed` | `(): void` | Emits when the dropdown panel is closed. |
180
+ | `blur` | `(): void` | Emits when the select element loses focus. |
181
+ | `optionClick` | `(selectedOption: any): void` | Emits when a select option is clicked. |
182
+ | `searchTextModelChange` | `(changedSearchText: string): void` | — |
183
+ | `isTooltipDisabled` | `(optionRef: unknown, text: string): boolean` | — |
184
+ | `getTriggerText` | `(): string` | — |
185
+ | `optionSelectionChange` | `(event: any, option: any): void` | — |
186
+ | `open` | `(): void` | Opens the dropdown panel programmatically. |
187
+ | `clearSelect` | `(): void` | — |
188
+ | `configureId` | `(): void` | — |
189
+ | `commitValue` | `(value?: any \| null): void` | Commit a view edit after the inner control has updated its local model. |
190
+ | `handleFocusOut` | `(event: FocusEvent): void` | Touch the outer control only when focus leaves the whole composite control. |
191
+ | `registerOnChange` | `(fn: (value: any \| null) => void): void` | Registers a callback function that is called when the control's value changes in the UI. |
192
+ | `registerOnTouched` | `(fn: () => void): void` | Registers a callback function that is called when the control is touched. |
193
+ | `setDisabledState` | `(isDisabled: boolean): void` | Updates the disabled state from the form model. |
194
+
195
+ [Component source](https://github.com/Abhilash-A-S/angular-ui-controls/blob/develop/projects/ui-controls/src/lib/component/searchable-select/searchable-select.component.ts) · [Playground example](https://github.com/Abhilash-A-S/angular-ui-controls/blob/develop/projects/demo/src/app.component.html)