shirkasoft-ui-components 1.14.0 → 2.0.1

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.
Files changed (92) hide show
  1. package/README.md +12 -9
  2. package/fesm2022/shirkasoft-ui-components-breadcrumb.mjs +189 -100
  3. package/fesm2022/shirkasoft-ui-components-breadcrumb.mjs.map +1 -1
  4. package/fesm2022/shirkasoft-ui-components-button.mjs +363 -69
  5. package/fesm2022/shirkasoft-ui-components-button.mjs.map +1 -1
  6. package/fesm2022/shirkasoft-ui-components-chart.mjs +206 -142
  7. package/fesm2022/shirkasoft-ui-components-chart.mjs.map +1 -1
  8. package/fesm2022/shirkasoft-ui-components-config.mjs +905 -843
  9. package/fesm2022/shirkasoft-ui-components-config.mjs.map +1 -1
  10. package/fesm2022/shirkasoft-ui-components-confirm-dialog.mjs +307 -142
  11. package/fesm2022/shirkasoft-ui-components-confirm-dialog.mjs.map +1 -1
  12. package/fesm2022/shirkasoft-ui-components-date-picker.mjs +1697 -1440
  13. package/fesm2022/shirkasoft-ui-components-date-picker.mjs.map +1 -1
  14. package/fesm2022/shirkasoft-ui-components-fieldset.mjs +347 -92
  15. package/fesm2022/shirkasoft-ui-components-fieldset.mjs.map +1 -1
  16. package/fesm2022/shirkasoft-ui-components-file-upload.mjs +555 -300
  17. package/fesm2022/shirkasoft-ui-components-file-upload.mjs.map +1 -1
  18. package/fesm2022/shirkasoft-ui-components-icons.mjs +1028 -533
  19. package/fesm2022/shirkasoft-ui-components-icons.mjs.map +1 -1
  20. package/fesm2022/shirkasoft-ui-components-knob.mjs +389 -201
  21. package/fesm2022/shirkasoft-ui-components-knob.mjs.map +1 -1
  22. package/fesm2022/shirkasoft-ui-components-loading.mjs +505 -128
  23. package/fesm2022/shirkasoft-ui-components-loading.mjs.map +1 -1
  24. package/fesm2022/shirkasoft-ui-components-modal.mjs +311 -314
  25. package/fesm2022/shirkasoft-ui-components-modal.mjs.map +1 -1
  26. package/fesm2022/shirkasoft-ui-components-notification.mjs +188 -142
  27. package/fesm2022/shirkasoft-ui-components-notification.mjs.map +1 -1
  28. package/fesm2022/shirkasoft-ui-components-price-input.mjs +585 -327
  29. package/fesm2022/shirkasoft-ui-components-price-input.mjs.map +1 -1
  30. package/fesm2022/shirkasoft-ui-components-rail-sidebar.mjs +669 -289
  31. package/fesm2022/shirkasoft-ui-components-rail-sidebar.mjs.map +1 -1
  32. package/fesm2022/shirkasoft-ui-components-select.mjs +1076 -819
  33. package/fesm2022/shirkasoft-ui-components-select.mjs.map +1 -1
  34. package/fesm2022/shirkasoft-ui-components-sidebar.mjs +508 -184
  35. package/fesm2022/shirkasoft-ui-components-sidebar.mjs.map +1 -1
  36. package/fesm2022/shirkasoft-ui-components-skeleton.mjs +197 -57
  37. package/fesm2022/shirkasoft-ui-components-skeleton.mjs.map +1 -1
  38. package/fesm2022/shirkasoft-ui-components-table.mjs +1916 -1698
  39. package/fesm2022/shirkasoft-ui-components-table.mjs.map +1 -1
  40. package/fesm2022/shirkasoft-ui-components-tabs.mjs +419 -175
  41. package/fesm2022/shirkasoft-ui-components-tabs.mjs.map +1 -1
  42. package/fesm2022/shirkasoft-ui-components-tag.mjs +175 -49
  43. package/fesm2022/shirkasoft-ui-components-tag.mjs.map +1 -1
  44. package/fesm2022/shirkasoft-ui-components-text-field.mjs +749 -402
  45. package/fesm2022/shirkasoft-ui-components-text-field.mjs.map +1 -1
  46. package/fesm2022/shirkasoft-ui-components-theme-picker.mjs +310 -124
  47. package/fesm2022/shirkasoft-ui-components-theme-picker.mjs.map +1 -1
  48. package/fesm2022/shirkasoft-ui-components-theme.mjs +141 -174
  49. package/fesm2022/shirkasoft-ui-components-theme.mjs.map +1 -1
  50. package/fesm2022/shirkasoft-ui-components-timeline.mjs +791 -203
  51. package/fesm2022/shirkasoft-ui-components-timeline.mjs.map +1 -1
  52. package/fesm2022/shirkasoft-ui-components-toggle.mjs +179 -109
  53. package/fesm2022/shirkasoft-ui-components-toggle.mjs.map +1 -1
  54. package/fesm2022/shirkasoft-ui-components-tooltip.mjs +244 -180
  55. package/fesm2022/shirkasoft-ui-components-tooltip.mjs.map +1 -1
  56. package/fesm2022/shirkasoft-ui-components-utils.mjs +129 -133
  57. package/fesm2022/shirkasoft-ui-components-utils.mjs.map +1 -1
  58. package/fesm2022/shirkasoft-ui-components-wizard.mjs +673 -165
  59. package/fesm2022/shirkasoft-ui-components-wizard.mjs.map +1 -1
  60. package/fesm2022/shirkasoft-ui-components.mjs +0 -9
  61. package/package.json +5 -5
  62. package/types/shirkasoft-ui-components-breadcrumb.d.ts +59 -44
  63. package/types/shirkasoft-ui-components-button.d.ts +142 -49
  64. package/types/shirkasoft-ui-components-chart.d.ts +59 -44
  65. package/types/shirkasoft-ui-components-config.d.ts +193 -204
  66. package/types/shirkasoft-ui-components-confirm-dialog.d.ts +107 -66
  67. package/types/shirkasoft-ui-components-date-picker.d.ts +561 -398
  68. package/types/shirkasoft-ui-components-fieldset.d.ts +135 -60
  69. package/types/shirkasoft-ui-components-file-upload.d.ts +210 -112
  70. package/types/shirkasoft-ui-components-icons.d.ts +1302 -1294
  71. package/types/shirkasoft-ui-components-knob.d.ts +144 -78
  72. package/types/shirkasoft-ui-components-loading.d.ts +155 -64
  73. package/types/shirkasoft-ui-components-modal.d.ts +134 -136
  74. package/types/shirkasoft-ui-components-notification.d.ts +63 -59
  75. package/types/shirkasoft-ui-components-price-input.d.ts +232 -113
  76. package/types/shirkasoft-ui-components-rail-sidebar.d.ts +262 -142
  77. package/types/shirkasoft-ui-components-select.d.ts +335 -196
  78. package/types/shirkasoft-ui-components-sidebar.d.ts +198 -93
  79. package/types/shirkasoft-ui-components-skeleton.d.ts +68 -27
  80. package/types/shirkasoft-ui-components-table.d.ts +849 -660
  81. package/types/shirkasoft-ui-components-tabs.d.ts +102 -61
  82. package/types/shirkasoft-ui-components-tag.d.ts +54 -23
  83. package/types/shirkasoft-ui-components-text-field.d.ts +263 -127
  84. package/types/shirkasoft-ui-components-theme-picker.d.ts +92 -58
  85. package/types/shirkasoft-ui-components-theme.d.ts +56 -64
  86. package/types/shirkasoft-ui-components-timeline.d.ts +325 -150
  87. package/types/shirkasoft-ui-components-toggle.d.ts +73 -49
  88. package/types/shirkasoft-ui-components-tooltip.d.ts +64 -43
  89. package/types/shirkasoft-ui-components-utils.d.ts +47 -15
  90. package/types/shirkasoft-ui-components-wizard.d.ts +236 -87
  91. package/types/shirkasoft-ui-components.d.ts +1 -2
  92. package/fesm2022/shirkasoft-ui-components.mjs.map +0 -1
@@ -1,14 +1,15 @@
1
- import * as _angular_core from '@angular/core';
2
- import { ElementRef } from '@angular/core';
3
- import * as shirkasoft_ui_components_icons from 'shirkasoft-ui-components/icons';
4
- import { ControlValueAccessor, FormGroup, FormControl } from '@angular/forms';
5
- import { FormValueControl } from '@angular/forms/signals';
6
-
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ import * as i0 from "@angular/core";
5
+ import { ElementRef } from "@angular/core";
6
+ import { ControlValueAccessor, FormControl, FormGroup } from "@angular/forms";
7
+ import { FormValueControl, ValidationError } from "@angular/forms/signals";
7
8
  /** Option rendered by the select, optionally prefixed with a "new entry" badge. */
8
9
  interface SelectOption {
9
- label: string;
10
- value: any;
11
- custom?: boolean;
10
+ label: string;
11
+ value: any;
12
+ custom?: boolean;
12
13
  }
13
14
  /**
14
15
  * Shirkasoft UI Components.
@@ -20,191 +21,329 @@ interface SelectOption {
20
21
  * selection, searchable, keyboard navigation, pagination, custom entries and
21
22
  * reactive-form integration.
22
23
  */
23
- declare class SelectComponent implements ControlValueAccessor, FormValueControl<any> {
24
- private elementRef;
25
- /** Resolves icon names to SVG data, falling back to a chevron. */
26
- protected getIcon: (name: any) => shirkasoft_ui_components_icons.IconNode | null;
27
- /** Available options. */
28
- options: _angular_core.InputSignal<SelectOption[]>;
29
- /** Enables multi-select mode. */
30
- multiple: _angular_core.InputSignal<boolean>;
31
- /** Restricts multi-selection to the given value combinations. */
32
- validCombinations: _angular_core.InputSignal<string[][] | undefined>;
33
- /** Placeholder shown when there is no selection. */
34
- placeholder: _angular_core.InputSignal<string>;
35
- /** Label used to bind the control inside a `formGroup`. */
36
- label: _angular_core.InputSignal<string | undefined>;
37
- /** Shows a loading state while options are being fetched. */
38
- isLoading: _angular_core.InputSignal<boolean>;
39
- /** Marks that all options have been loaded (used with pagination + search). */
40
- isAllDataLoaded: _angular_core.InputSignal<boolean>;
41
- /** Allows creating new entries from the typed search term. */
42
- allowCustomEntries: _angular_core.InputSignal<boolean>;
43
- /** Parent form group to resolve the control from `label`. */
44
- formGroup: _angular_core.InputSignal<FormGroup<any> | undefined>;
45
- /** Enables the search input inside the dropdown. */
46
- isSearchable: _angular_core.InputSignal<boolean>;
47
- /** Number of options loaded per page when pagination is enabled. */
48
- itemsPerPage: _angular_core.InputSignal<number>;
49
- /** FormControl bound externally (used instead of `formGroup`/`label`). */
50
- control: _angular_core.InputSignal<FormControl<any> | undefined>;
51
- /** Paginates the option list instead of rendering it all at once. */
52
- usePagination: _angular_core.InputSignal<boolean>;
53
- /** Disables the whole select. */
54
- disabled: _angular_core.InputSignal<boolean>;
55
- /** Custom per-validation-error messages shown under the select. */
56
- errorMessages: _angular_core.InputSignal<{
57
- [key: string]: string;
58
- }>;
59
- /** Keeps the search term when options reload. */
60
- preserveSearchOnLoad: _angular_core.InputSignal<boolean>;
61
- /** Translation key of the "no records" empty message. */
62
- emptyMessageKey: _angular_core.InputSignal<string>;
63
- /** Opens the dropdown above the trigger instead of below. */
64
- dropdownUpward: _angular_core.InputSignal<boolean>;
65
- /** Shows the "no selection" option in single-select mode. */
66
- showEmptyOption: _angular_core.InputSignal<boolean>;
67
- /** Emits when the selection changes (new value or array in multiple mode). */
68
- selectionChange: _angular_core.OutputEmitterRef<any>;
69
- /** Emitted on blur/close so Signal Forms can mark the field as touched. */
70
- touch: _angular_core.OutputEmitterRef<void>;
71
- /** Emits the debounced search term while typing. */
72
- search: _angular_core.OutputEmitterRef<string>;
73
- /** Reference to the filter input inside the dropdown (when searchable). */
74
- filterInput: _angular_core.Signal<ElementRef<any> | undefined>;
75
- /** Reference to the select container element. */
76
- private selectContainer;
77
- /** Reference to the trigger button. */
78
- private selectTrigger;
79
- /** Reference to the dropdown list container. */
80
- private dropdownContainer;
81
- /** Selection value. Two-way bindable and used by Signal Forms `[formField]`. */
82
- value: _angular_core.ModelSignal<any>;
83
- /** Internal alias kept for the existing implementation. */
84
- private get _value();
85
- /** Whether the dropdown is open. */
86
- isOpen: _angular_core.WritableSignal<boolean>;
87
- /** Index of the currently focused option for keyboard navigation. */
88
- focusedIndex: _angular_core.WritableSignal<number>;
89
- /** Current search term (searchable mode). */
90
- searchTerm: _angular_core.WritableSignal<string>;
91
- /** Current page of the paginated dropdown. */
92
- currentPage: _angular_core.WritableSignal<number>;
93
- /** Tracks whether the user typed in the search input. */
94
- private searchTermChanged;
95
- /** Internal disabled state from the reactive form (setDisabledState). */
96
- private _isDisabled;
97
- /** Debounce timer handle for the search output. */
98
- private debounceTimer;
99
- /** Error-state counter used to recompute error helpers reactively. */
100
- private errorTracker;
101
- /** Whether an error has been shown at some point (for "fixed" messaging). */
102
- hadError: _angular_core.WritableSignal<boolean>;
103
- /** Whether control status/value subscriptions have been attached. */
104
- private subscribed;
105
- private valueSubscribed;
106
- /** True when the select is disabled via input or by the reactive form. */
107
- isDisabled: _angular_core.Signal<boolean>;
108
- /** Resolves the form control from `control` or from `formGroup`+`label`. */
109
- actualControl: _angular_core.Signal<FormControl<any> | undefined>;
110
- /** Whether the bound control should display its error (invalid + touched/dirty). */
111
- shouldShowError: _angular_core.Signal<boolean | undefined>;
112
- /** Whether an error was shown before and the control is now valid + touched. */
113
- wasFixedError: _angular_core.Signal<boolean | undefined>;
114
- /** Text shown in the trigger: the selected label(s) or the placeholder. */
115
- displayValue: _angular_core.Signal<any>;
116
- /** List of validation error messages for the bound control. */
117
- getErrorMessages: _angular_core.Signal<string[]>;
118
- /** Options filtered by the search term (matches first, then contains). */
119
- filteredOptions: _angular_core.Signal<SelectOption[]>;
120
- /** Options for the current page, with a synthetic custom entry when allowed. */
121
- paginatedOptions: _angular_core.Signal<SelectOption[]>;
122
- /** Non-custom options, including the empty option in single-select mode. */
123
- regularOptions: _angular_core.Signal<SelectOption[]>;
124
- /** Total pages of the filtered option list (1 when pagination is off). */
125
- totalPages: _angular_core.Signal<number>;
126
- /** Whether there is at least one selected value. */
127
- hasSelectedValues: _angular_core.Signal<any>;
128
- /** Whether the custom optional entry should be offered for the current term. */
129
- showCustomOption: _angular_core.Signal<boolean>;
130
- /** Fixed position of the dropdown relative to the viewport. */
131
- dropdownPosition: _angular_core.WritableSignal<{
132
- top: number;
133
- left: number;
134
- width: number;
135
- }>;
136
- /** Computes the fixed position of the dropdown so it's not clipped by overflow. */
137
- /** Max height of the dropdown panel (matches `max-h-[240px]` in the template). */
138
- private static readonly DROPDOWN_MAX_HEIGHT;
139
- /** Approximate height of one option row (`py-2` + `text-sm`), used before the panel is rendered. */
140
- private static readonly OPTION_HEIGHT;
141
- /**
142
- * Height the panel will take: the rendered height when the panel already
143
- * exists, otherwise an estimate from the number of rows. Before this the
144
- * position always assumed 240px, so a 3-option select near the bottom of the
145
- * viewport opened upward even though it fitted below.
146
- */
147
- private dropdownHeight;
148
- /** Computes the fixed position of the dropdown so it's not clipped by overflow. */
149
- computeDropdownPosition(): void;
150
- private transloco;
151
- /** ControlValueAccessor onChange callback. */
152
- private onChange;
153
- /** ControlValueAccessor onTouched callback. */
154
- private onTouched;
155
- private destroyRef;
156
- /** Closes the dropdown when the page/container scrolls, ignoring scrolls that start inside the component (its own options list). */
157
- private readonly scrollCloseHandler;
158
- constructor(elementRef: ElementRef);
159
- /** Sets the disabled state coming from the reactive form infrastructure. */
160
- setDisabledState(isDisabled: boolean): void;
161
- /** Marks the control as touched and updates validity and error state. */
162
- private markAsTouchedAndUpdate;
163
- /** Strips accents and lowercases text for accent-insensitive matching. */
164
- normalizeText(text: string): string;
165
- /** Keyboard handler for the trigger element (open/close/navigate/select). */
166
- onKeydown(event: KeyboardEvent): void;
167
- /** Keyboard handler for the search input inside a searchable dropdown. */
168
- handleKeyDown(event: KeyboardEvent): void;
169
- /** Moves the focused option index by `direction`, skipping disabled ones. */
170
- private moveFocus;
171
- /** Index of the currently selected option, or -1. */
172
- private getSelectedIndex;
173
- /** Whether an option is disabled based on the valid combinations rule. */
174
- isOptionDisabled(option: SelectOption): boolean;
175
- /** Whether an option is currently selected. */
176
- isSelected(option: SelectOption): boolean;
177
- /** Goes to the next options page when possible. */
178
- nextPage(): void;
179
- /** Goes to the previous options page when possible. */
180
- previousPage(): void;
181
- /** Whether a node belongs to the component or to its (portaled) dropdown panel. */
182
- private isInsideComponent;
183
- /** Closes the dropdown when a click happens outside the component. */
184
- onClickOutside(event: MouseEvent): void;
185
- /** Selects a typed free-text value as a new custom entry. */
186
- onCustomOptionClick(): void;
187
- /** Handles typing in the search input (updates term and emits search). */
188
- onInputChange(event: Event): void;
189
- /** Selects or toggles the clicked option (custom entries included). */
190
- onOptionClick(option: SelectOption): void;
191
- /** Selects a single option and updates the control/outputs. */
192
- selectOption(option: SelectOption): void;
193
- /** Toggles an option in multiple mode, honoring the valid combinations. */
194
- toggleOption(option: SelectOption): void;
195
- /** Opens/closes the dropdown and manages focus/selection state. */
196
- toggleDropdown(): void;
197
- /** trackBy for rendered options so Angular reuses DOM nodes by value. */
198
- trackByFn(index: number, option: SelectOption): any;
199
- /** Writes an external value into the internal signal (ControlValueAccessor). */
200
- writeValue(value: any): void;
201
- /** Stores the onChange callback (ControlValueAccessor). */
202
- registerOnChange(fn: any): void;
203
- /** Stores the onTouched callback (ControlValueAccessor). */
204
- registerOnTouched(fn: any): void;
205
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<SelectComponent, never>;
206
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<SelectComponent, "shk-select", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "validCombinations": { "alias": "validCombinations"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "isLoading": { "alias": "isLoading"; "required": false; "isSignal": true; }; "isAllDataLoaded": { "alias": "isAllDataLoaded"; "required": false; "isSignal": true; }; "allowCustomEntries": { "alias": "allowCustomEntries"; "required": false; "isSignal": true; }; "formGroup": { "alias": "formGroup"; "required": false; "isSignal": true; }; "isSearchable": { "alias": "isSearchable"; "required": false; "isSignal": true; }; "itemsPerPage": { "alias": "itemsPerPage"; "required": false; "isSignal": true; }; "control": { "alias": "control"; "required": false; "isSignal": true; }; "usePagination": { "alias": "usePagination"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "errorMessages": { "alias": "errorMessages"; "required": false; "isSignal": true; }; "preserveSearchOnLoad": { "alias": "preserveSearchOnLoad"; "required": false; "isSignal": true; }; "emptyMessageKey": { "alias": "emptyMessageKey"; "required": false; "isSignal": true; }; "dropdownUpward": { "alias": "dropdownUpward"; "required": false; "isSignal": true; }; "showEmptyOption": { "alias": "showEmptyOption"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "selectionChange": "selectionChange"; "touch": "touch"; "search": "search"; "value": "valueChange"; }, never, never, true, never>;
24
+ export declare class SelectComponent implements ControlValueAccessor, FormValueControl<any> {
25
+ private elementRef;
26
+ /** Resolves icon names to SVG data, falling back to a chevron. */
27
+ protected getIcon: (name: any) => import("shirkasoft-ui-components/icons").IconNode | null;
28
+ /** Available options. */
29
+ options: import("@angular/core").InputSignal<SelectOption[]>;
30
+ /** Enables multi-select mode. */
31
+ multiple: import("@angular/core").InputSignal<boolean>;
32
+ /** Restricts multi-selection to the given value combinations. */
33
+ validCombinations: import("@angular/core").InputSignal<string[][] | undefined>;
34
+ /** Placeholder shown when there is no selection. */
35
+ placeholder: import("@angular/core").InputSignal<string>;
36
+ /** Label used to bind the control inside a `formGroup`. */
37
+ label: import("@angular/core").InputSignal<string | undefined>;
38
+ /** Shows a loading state while options are being fetched. */
39
+ isLoading: import("@angular/core").InputSignal<boolean>;
40
+ /** Marks that all options have been loaded (used with pagination + search). */
41
+ isAllDataLoaded: import("@angular/core").InputSignal<boolean>;
42
+ /** Allows creating new entries from the typed search term. */
43
+ allowCustomEntries: import("@angular/core").InputSignal<boolean>;
44
+ /** Parent form group to resolve the control from `label`. */
45
+ formGroup: import("@angular/core").InputSignal<FormGroup<any> | undefined>;
46
+ /** Enables the search input inside the dropdown. */
47
+ isSearchable: import("@angular/core").InputSignal<boolean>;
48
+ /** Number of options loaded per page when pagination is enabled. */
49
+ itemsPerPage: import("@angular/core").InputSignal<number>;
50
+ /** FormControl bound externally (used instead of `formGroup`/`label`). */
51
+ control: import("@angular/core").InputSignal<FormControl<any> | undefined>;
52
+ /** Paginates the option list instead of rendering it all at once. */
53
+ usePagination: import("@angular/core").InputSignal<boolean>;
54
+ /** Disables the whole select. */
55
+ disabled: import("@angular/core").InputSignal<boolean>;
56
+ /** Errors bound automatically by the Signal Forms `[formField]` directive. */
57
+ errors: import("@angular/core").InputSignal<readonly ValidationError.WithOptionalFieldTree[]>;
58
+ /** Invalid status bound automatically by `[formField]`. */
59
+ invalid: import("@angular/core").InputSignal<boolean>;
60
+ /** Touched status bound automatically by `[formField]`. */
61
+ touched: import("@angular/core").InputSignal<boolean>;
62
+ /** Dirty status bound automatically by `[formField]`. */
63
+ dirty: import("@angular/core").InputSignal<boolean>;
64
+ /** Custom per-validation-error messages shown under the select. */
65
+ errorMessages: import("@angular/core").InputSignal<{
66
+ [key: string]: string;
67
+ }>;
68
+ /** Keeps the search term when options reload. */
69
+ preserveSearchOnLoad: import("@angular/core").InputSignal<boolean>;
70
+ /** Translation key of the "no records" empty message. */
71
+ emptyMessageKey: import("@angular/core").InputSignal<string>;
72
+ /** Opens the dropdown above the trigger instead of below. */
73
+ dropdownUpward: import("@angular/core").InputSignal<boolean>;
74
+ /** Shows the "no selection" option in single-select mode. */
75
+ showEmptyOption: import("@angular/core").InputSignal<boolean>;
76
+ /** Emits when the selection changes (new value or array in multiple mode). */
77
+ selectionChange: import("@angular/core").OutputEmitterRef<any>;
78
+ /** Emitted on blur/close so Signal Forms can mark the field as touched. */
79
+ touch: import("@angular/core").OutputEmitterRef<void>;
80
+ /** Emits the debounced search term while typing. */
81
+ search: import("@angular/core").OutputEmitterRef<string>;
82
+ /** Reference to the filter input inside the dropdown (when searchable). */
83
+ filterInput: import("@angular/core").Signal<ElementRef<any> | undefined>;
84
+ /** Reference to the select container element. */
85
+ private selectContainer;
86
+ /** Reference to the trigger button. */
87
+ private selectTrigger;
88
+ /** Reference to the dropdown list container. */
89
+ private dropdownContainer;
90
+ /** Selection value. Two-way bindable and used by Signal Forms `[formField]`. */
91
+ value: import("@angular/core").ModelSignal<any>;
92
+ /** Internal alias kept for the existing implementation. */
93
+ private get _value();
94
+ /** Whether the dropdown is open. */
95
+ isOpen: import("@angular/core").WritableSignal<boolean>;
96
+ /** Index of the currently focused option for keyboard navigation. */
97
+ focusedIndex: import("@angular/core").WritableSignal<number>;
98
+ /** Current search term (searchable mode). */
99
+ searchTerm: import("@angular/core").WritableSignal<string>;
100
+ /** Current page of the paginated dropdown. */
101
+ currentPage: import("@angular/core").WritableSignal<number>;
102
+ /** Tracks whether the user typed in the search input. */
103
+ private searchTermChanged;
104
+ /** Internal disabled state from the reactive form (setDisabledState). */
105
+ private _isDisabled;
106
+ /** Debounce timer handle for the search output. */
107
+ private debounceTimer;
108
+ /** Error-state counter used to recompute error helpers reactively. */
109
+ private errorTracker;
110
+ /** Whether an error has been shown at some point (for "fixed" messaging). */
111
+ hadError: import("@angular/core").WritableSignal<boolean>;
112
+ /** Whether control status/value subscriptions have been attached. */
113
+ private subscribed;
114
+ private valueSubscribed;
115
+ /** True when the select is disabled via input or by the reactive form. */
116
+ isDisabled: import("@angular/core").Signal<boolean>;
117
+ /** Resolves the form control from `control` or from `formGroup`+`label`. */
118
+ actualControl: import("@angular/core").Signal<FormControl<any> | undefined>;
119
+ /**
120
+ * True when the select is driven by Signal Forms instead of a reactive control.
121
+ * Detected by the absence of a reactive control: `[formField]` provides the
122
+ * state through its `errors`/`invalid`/`touched`/`dirty` inputs.
123
+ */
124
+ protected readonly usesSignalForms: import("@angular/core").Signal<boolean>;
125
+ /** Whether the select should display its validation errors. */
126
+ shouldShowError: import("@angular/core").Signal<boolean | undefined>;
127
+ /** Whether an error was shown before and the control is now valid + touched. */
128
+ wasFixedError: import("@angular/core").Signal<boolean | undefined>;
129
+ /** Text shown in the trigger: the selected label(s) or the placeholder. */
130
+ displayValue: import("@angular/core").Signal<any>;
131
+ /** List of validation error messages for the bound control. */
132
+ getErrorMessages: import("@angular/core").Signal<string[]>;
133
+ /** Options filtered by the search term (matches first, then contains). */
134
+ filteredOptions: import("@angular/core").Signal<SelectOption[]>;
135
+ /** Options for the current page, with a synthetic custom entry when allowed. */
136
+ paginatedOptions: import("@angular/core").Signal<SelectOption[]>;
137
+ /** Non-custom options, including the empty option in single-select mode. */
138
+ regularOptions: import("@angular/core").Signal<SelectOption[]>;
139
+ /** Total pages of the filtered option list (1 when pagination is off). */
140
+ totalPages: import("@angular/core").Signal<number>;
141
+ /** Whether there is at least one selected value. */
142
+ hasSelectedValues: import("@angular/core").Signal<any>;
143
+ /** Whether the custom optional entry should be offered for the current term. */
144
+ showCustomOption: import("@angular/core").Signal<boolean>;
145
+ /** Fixed position of the dropdown relative to the viewport. */
146
+ dropdownPosition: import("@angular/core").WritableSignal<{
147
+ top: number;
148
+ left: number;
149
+ width: number;
150
+ }>;
151
+ /** Computes the fixed position of the dropdown so it's not clipped by overflow. */
152
+ /** Max height of the dropdown panel (matches `max-h-[240px]` in the template). */
153
+ private static readonly DROPDOWN_MAX_HEIGHT;
154
+ /** Approximate height of one option row (`py-2` + `text-sm`), used before the panel is rendered. */
155
+ private static readonly OPTION_HEIGHT;
156
+ /**
157
+ * Height the panel will take: the rendered height when the panel already
158
+ * exists, otherwise an estimate from the number of rows. Before this the
159
+ * position always assumed 240px, so a 3-option select near the bottom of the
160
+ * viewport opened upward even though it fitted below.
161
+ */
162
+ private dropdownHeight;
163
+ /** Computes the fixed position of the dropdown so it's not clipped by overflow. */
164
+ computeDropdownPosition(): void;
165
+ private transloco;
166
+ /** ControlValueAccessor onChange callback. */
167
+ private onChange;
168
+ /** ControlValueAccessor onTouched callback. */
169
+ private onTouched;
170
+ private destroyRef;
171
+ /** Closes the dropdown when the page/container scrolls, ignoring scrolls that start inside the component (its own options list). */
172
+ private readonly scrollCloseHandler;
173
+ constructor(elementRef: ElementRef);
174
+ /** Sets the disabled state coming from the reactive form infrastructure. */
175
+ setDisabledState(isDisabled: boolean): void;
176
+ /** Marks the control as touched and updates validity and error state. */
177
+ private markAsTouchedAndUpdate;
178
+ /** Strips accents and lowercases text for accent-insensitive matching. */
179
+ normalizeText(text: string): string;
180
+ /** Keyboard handler for the trigger element (open/close/navigate/select). */
181
+ onKeydown(event: KeyboardEvent): void;
182
+ /** Keyboard handler for the search input inside a searchable dropdown. */
183
+ handleKeyDown(event: KeyboardEvent): void;
184
+ /** Moves the focused option index by `direction`, skipping disabled ones. */
185
+ private moveFocus;
186
+ /** Index of the currently selected option, or -1. */
187
+ private getSelectedIndex;
188
+ /** Whether an option is disabled based on the valid combinations rule. */
189
+ isOptionDisabled(option: SelectOption): boolean;
190
+ /** Whether an option is currently selected. */
191
+ isSelected(option: SelectOption): boolean;
192
+ /** Goes to the next options page when possible. */
193
+ nextPage(): void;
194
+ /** Goes to the previous options page when possible. */
195
+ previousPage(): void;
196
+ /** Whether a node belongs to the component or to its (portaled) dropdown panel. */
197
+ private isInsideComponent;
198
+ /** Closes the dropdown when a click happens outside the component. */
199
+ onClickOutside(event: MouseEvent): void;
200
+ /** Selects a typed free-text value as a new custom entry. */
201
+ onCustomOptionClick(): void;
202
+ /** Handles typing in the search input (updates term and emits search). */
203
+ onInputChange(event: Event): void;
204
+ /** Selects or toggles the clicked option (custom entries included). */
205
+ onOptionClick(option: SelectOption): void;
206
+ /** Selects a single option and updates the control/outputs. */
207
+ selectOption(option: SelectOption): void;
208
+ /** Toggles an option in multiple mode, honoring the valid combinations. */
209
+ toggleOption(option: SelectOption): void;
210
+ /** Opens/closes the dropdown and manages focus/selection state. */
211
+ toggleDropdown(): void;
212
+ /** trackBy for rendered options so Angular reuses DOM nodes by value. */
213
+ trackByFn(index: number, option: SelectOption): any;
214
+ /** Writes an external value into the internal signal (ControlValueAccessor). */
215
+ writeValue(value: any): void;
216
+ /** Stores the onChange callback (ControlValueAccessor). */
217
+ registerOnChange(fn: any): void;
218
+ /** Stores the onTouched callback (ControlValueAccessor). */
219
+ registerOnTouched(fn: any): void;
220
+ static ɵfac: i0.ɵɵFactoryDeclaration<SelectComponent, never>;
221
+ static ɵcmp: i0.ɵɵComponentDeclaration<SelectComponent, "shk-select", never, {
222
+ "options": {
223
+ "alias": "options";
224
+ "required": false;
225
+ "isSignal": true;
226
+ };
227
+ "multiple": {
228
+ "alias": "multiple";
229
+ "required": false;
230
+ "isSignal": true;
231
+ };
232
+ "validCombinations": {
233
+ "alias": "validCombinations";
234
+ "required": false;
235
+ "isSignal": true;
236
+ };
237
+ "placeholder": {
238
+ "alias": "placeholder";
239
+ "required": false;
240
+ "isSignal": true;
241
+ };
242
+ "label": {
243
+ "alias": "label";
244
+ "required": false;
245
+ "isSignal": true;
246
+ };
247
+ "isLoading": {
248
+ "alias": "isLoading";
249
+ "required": false;
250
+ "isSignal": true;
251
+ };
252
+ "isAllDataLoaded": {
253
+ "alias": "isAllDataLoaded";
254
+ "required": false;
255
+ "isSignal": true;
256
+ };
257
+ "allowCustomEntries": {
258
+ "alias": "allowCustomEntries";
259
+ "required": false;
260
+ "isSignal": true;
261
+ };
262
+ "formGroup": {
263
+ "alias": "formGroup";
264
+ "required": false;
265
+ "isSignal": true;
266
+ };
267
+ "isSearchable": {
268
+ "alias": "isSearchable";
269
+ "required": false;
270
+ "isSignal": true;
271
+ };
272
+ "itemsPerPage": {
273
+ "alias": "itemsPerPage";
274
+ "required": false;
275
+ "isSignal": true;
276
+ };
277
+ "control": {
278
+ "alias": "control";
279
+ "required": false;
280
+ "isSignal": true;
281
+ };
282
+ "usePagination": {
283
+ "alias": "usePagination";
284
+ "required": false;
285
+ "isSignal": true;
286
+ };
287
+ "disabled": {
288
+ "alias": "disabled";
289
+ "required": false;
290
+ "isSignal": true;
291
+ };
292
+ "errors": {
293
+ "alias": "errors";
294
+ "required": false;
295
+ "isSignal": true;
296
+ };
297
+ "invalid": {
298
+ "alias": "invalid";
299
+ "required": false;
300
+ "isSignal": true;
301
+ };
302
+ "touched": {
303
+ "alias": "touched";
304
+ "required": false;
305
+ "isSignal": true;
306
+ };
307
+ "dirty": {
308
+ "alias": "dirty";
309
+ "required": false;
310
+ "isSignal": true;
311
+ };
312
+ "errorMessages": {
313
+ "alias": "errorMessages";
314
+ "required": false;
315
+ "isSignal": true;
316
+ };
317
+ "preserveSearchOnLoad": {
318
+ "alias": "preserveSearchOnLoad";
319
+ "required": false;
320
+ "isSignal": true;
321
+ };
322
+ "emptyMessageKey": {
323
+ "alias": "emptyMessageKey";
324
+ "required": false;
325
+ "isSignal": true;
326
+ };
327
+ "dropdownUpward": {
328
+ "alias": "dropdownUpward";
329
+ "required": false;
330
+ "isSignal": true;
331
+ };
332
+ "showEmptyOption": {
333
+ "alias": "showEmptyOption";
334
+ "required": false;
335
+ "isSignal": true;
336
+ };
337
+ "value": {
338
+ "alias": "value";
339
+ "required": false;
340
+ "isSignal": true;
341
+ };
342
+ }, {
343
+ "selectionChange": "selectionChange";
344
+ "touch": "touch";
345
+ "search": "search";
346
+ "value": "valueChange";
347
+ }, never, never, true, never>;
207
348
  }
208
-
209
- export { SelectComponent };
210
- export type { SelectOption };
349
+ export type { SelectOption };