@tekus/design-system 5.18.0 → 5.19.0

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 (39) hide show
  1. package/assets/tokens/tk-foundations.json +3 -3
  2. package/components/checkbox/src/checkbox.component.d.ts +9 -2
  3. package/components/drawer/index.d.ts +5 -0
  4. package/components/drawer/public-api.d.ts +3 -0
  5. package/components/drawer/src/drawer.component.d.ts +78 -0
  6. package/components/drawer/src/drawer.types.d.ts +19 -0
  7. package/components/drawer/src/services/drawer.service.d.ts +15 -0
  8. package/components/icon/core/icons/arrows-rotate.d.ts +2 -0
  9. package/components/icon/core/icons/edit.d.ts +2 -0
  10. package/components/icon/core/icons/globe-pointer.d.ts +2 -0
  11. package/components/icon/core/icons/grip-vertical.d.ts +2 -0
  12. package/components/multiselect/src/multiselect.component.d.ts +115 -19
  13. package/components/panel/index.d.ts +5 -0
  14. package/components/panel/public-api.d.ts +1 -0
  15. package/components/panel/src/panel.component.d.ts +82 -0
  16. package/components/table/src/table.component.d.ts +45 -1
  17. package/components/table/src/table.interface.d.ts +1 -1
  18. package/fesm2022/tekus-design-system-components-checkbox.mjs +32 -14
  19. package/fesm2022/tekus-design-system-components-checkbox.mjs.map +1 -1
  20. package/fesm2022/tekus-design-system-components-drawer.mjs +172 -0
  21. package/fesm2022/tekus-design-system-components-drawer.mjs.map +1 -0
  22. package/fesm2022/tekus-design-system-components-icon.mjs +56 -0
  23. package/fesm2022/tekus-design-system-components-icon.mjs.map +1 -1
  24. package/fesm2022/tekus-design-system-components-multiselect.mjs +164 -45
  25. package/fesm2022/tekus-design-system-components-multiselect.mjs.map +1 -1
  26. package/fesm2022/tekus-design-system-components-panel.mjs +102 -0
  27. package/fesm2022/tekus-design-system-components-panel.mjs.map +1 -0
  28. package/fesm2022/tekus-design-system-components-select.mjs +3 -8
  29. package/fesm2022/tekus-design-system-components-select.mjs.map +1 -1
  30. package/fesm2022/tekus-design-system-components-table.mjs +72 -5
  31. package/fesm2022/tekus-design-system-components-table.mjs.map +1 -1
  32. package/fesm2022/tekus-design-system-components-toolbar.mjs +2 -2
  33. package/fesm2022/tekus-design-system-components-toolbar.mjs.map +1 -1
  34. package/fesm2022/tekus-design-system-core-types.mjs +31 -1
  35. package/fesm2022/tekus-design-system-core-types.mjs.map +1 -1
  36. package/fesm2022/tekus-design-system-core.mjs +31 -1
  37. package/fesm2022/tekus-design-system-core.mjs.map +1 -1
  38. package/package.json +13 -5
  39. package/styles/variables.css +3 -3
@@ -1,27 +1,35 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter, Output, Input, Component } from '@angular/core';
2
+ import { inject, signal, model, input, output, computed, Component } from '@angular/core';
3
3
  import * as i1 from '@angular/forms';
4
- import { FormControl, ReactiveFormsModule } from '@angular/forms';
4
+ import { NgControl, ReactiveFormsModule, FormsModule } from '@angular/forms';
5
5
  import * as i2 from 'primeng/multiselect';
6
6
  import { MultiSelectModule } from 'primeng/multiselect';
7
7
  import * as i3 from 'primeng/floatlabel';
8
8
  import { FloatLabelModule } from 'primeng/floatlabel';
9
+ import * as i4 from 'primeng/message';
10
+ import { MessageModule } from 'primeng/message';
9
11
 
10
12
  class MultiselectComponent {
11
13
  constructor() {
14
+ this.ngControl = inject(NgControl, { self: true, optional: true });
12
15
  /**
13
- * @property {FormControl<MultiSelectOption[] | null>} control
16
+ * @property {Signal<MultiSelectOption[]>} selectionPool
14
17
  * @description
15
- * External FormControl used to read/set the selected options.
16
- * If not provided, an internal FormControl is created with an empty array value.
18
+ * Internal signal to keep track of selected items even if they are filtered out from the main options list.
17
19
  */
18
- this.control = new FormControl([]);
20
+ this.selectionPool = signal([]);
21
+ /**
22
+ * @property {ModelSignal<MultiSelectOption[] | null>} model
23
+ * @description
24
+ * The model signal for two-way binding.
25
+ */
26
+ this.model = model([]);
19
27
  /**
20
28
  * @property {MultiSelectOption[]} options
21
29
  * @description
22
30
  * Array of available options shown in the multiselect dropdown.
23
31
  */
24
- this.options = [];
32
+ this.options = input([]);
25
33
  /**
26
34
  * @property {string} labelText
27
35
  * @description
@@ -29,7 +37,7 @@ class MultiselectComponent {
29
37
  *
30
38
  * @default 'Select'
31
39
  */
32
- this.labelText = 'Select';
40
+ this.labelText = input('Select');
33
41
  /**
34
42
  * @property {string} display
35
43
  * @description
@@ -37,7 +45,7 @@ class MultiselectComponent {
37
45
  *
38
46
  * @default 'chip'
39
47
  */
40
- this.display = 'chip';
48
+ this.display = input('chip');
41
49
  /**
42
50
  * @property {number} maxSelectedLabels
43
51
  * @description
@@ -45,7 +53,7 @@ class MultiselectComponent {
45
53
  *
46
54
  * @default 4
47
55
  */
48
- this.maxSelectedLabels = 4;
56
+ this.maxSelectedLabels = input(4);
49
57
  /**
50
58
  * @property {string} selectedItemsLabel
51
59
  * @description
@@ -53,7 +61,7 @@ class MultiselectComponent {
53
61
  *
54
62
  * @default '{0} elementos seleccionados'
55
63
  */
56
- this.selectedItemsLabel = '{0} elementos seleccionados';
64
+ this.selectedItemsLabel = input('{0} elementos seleccionados');
57
65
  /**
58
66
  * @property {string} emptyFilterMessage
59
67
  * @description
@@ -61,7 +69,7 @@ class MultiselectComponent {
61
69
  *
62
70
  * @default 'No hay resultados'
63
71
  */
64
- this.emptyFilterMessage = 'No hay resultados';
72
+ this.emptyFilterMessage = input('No hay resultados');
65
73
  /**
66
74
  * @property {boolean} filter
67
75
  * @description
@@ -69,13 +77,13 @@ class MultiselectComponent {
69
77
  *
70
78
  * @default true
71
79
  */
72
- this.filter = true;
80
+ this.filter = input(true);
73
81
  /**
74
82
  * @property {string} filterPlaceHolder
75
83
  * @description
76
84
  * Placeholder text for the filter input.
77
85
  */
78
- this.filterPlaceHolder = '';
86
+ this.filterPlaceHolder = input('');
79
87
  /**
80
88
  * @property {string} id
81
89
  * @description
@@ -83,13 +91,25 @@ class MultiselectComponent {
83
91
  *
84
92
  * @default 'multiselect'
85
93
  */
86
- this.id = 'multiselect';
94
+ this.id = input('multiselect');
87
95
  /**
88
96
  * @property {string} styleClass
89
97
  * @description
90
98
  * Additional CSS class applied to the multiselect container.
91
99
  */
92
- this.styleClass = '';
100
+ this.styleClass = input('');
101
+ /**
102
+ * @property {InputSignal<string>} errorMessage
103
+ * @description
104
+ * Message to display when the control is invalid and touched.
105
+ */
106
+ this.errorMessage = input('');
107
+ /**
108
+ * @property {InputSignal<string>} hint
109
+ * @description
110
+ * Hint text to display below the input.
111
+ */
112
+ this.hint = input('');
93
113
  /**
94
114
  * @event selectionChange
95
115
  * @description
@@ -99,7 +119,55 @@ class MultiselectComponent {
99
119
  * @example
100
120
  * <tk-multiselect (selectionChange)="onChange($event)"></tk-multiselect>
101
121
  */
102
- this.selectionChange = new EventEmitter();
122
+ this.selectionChange = output();
123
+ /**
124
+ * @event filterChange
125
+ * @description
126
+ * Emits the filter text when the user types in the search input.
127
+ */
128
+ this.filterChange = output();
129
+ /**
130
+ * @property internalOptions
131
+ * @description
132
+ * Computed signal that merges the current options with the selected items pool
133
+ * to ensure selected items are always visible.
134
+ */
135
+ this.internalOptions = computed(() => {
136
+ const currentFromParent = this.options();
137
+ const selected = this.selectionPool();
138
+ const merged = [...selected, ...currentFromParent];
139
+ const uniqueMap = new Map();
140
+ merged.forEach(item => {
141
+ if (item)
142
+ uniqueMap.set(item.code, item);
143
+ });
144
+ return Array.from(uniqueMap.values());
145
+ });
146
+ /**
147
+ * @callback onChange
148
+ * @description
149
+ * Callback function to notify the parent component of value changes.
150
+ */
151
+ this.onChange = () => { };
152
+ /**
153
+ * @callback onTouched
154
+ * @description
155
+ * Callback function to notify the parent component when the control is touched.
156
+ */
157
+ this.onTouched = () => { };
158
+ if (this.ngControl) {
159
+ this.ngControl.valueAccessor = this;
160
+ }
161
+ }
162
+ /**
163
+ * @method handleFilter
164
+ * @description
165
+ * Handles the filter event from the PrimeNG component and emits the filter value.
166
+ *
167
+ * @param event - The filter event object.
168
+ */
169
+ handleFilter(event) {
170
+ this.filterChange.emit(event.filter || '');
103
171
  }
104
172
  /**
105
173
  * @method handleChange
@@ -110,39 +178,90 @@ class MultiselectComponent {
110
178
  * @param event - Change event containing the `value` property with selected items.
111
179
  */
112
180
  handleChange(event) {
113
- this.selectionChange.emit(event.value);
181
+ const val = event.value || [];
182
+ this.model.set(val);
183
+ this.updateSelectionPool(val);
184
+ this.onChange(val);
185
+ this.selectionChange.emit(val);
186
+ if (this.effectiveControl) {
187
+ this.effectiveControl.setValue(val);
188
+ this.effectiveControl.markAsDirty();
189
+ this.effectiveControl.markAsTouched();
190
+ }
191
+ }
192
+ /**
193
+ * @method updateSelectionPool
194
+ * @description
195
+ * Updates the internal selection pool to ensure selected items persist
196
+ * even if they are filtered out from the main options list.
197
+ *
198
+ * @param items - The items to add to the pool.
199
+ */
200
+ updateSelectionPool(items) {
201
+ this.selectionPool.update(prev => {
202
+ const combined = [...prev, ...items];
203
+ const map = new Map();
204
+ combined.forEach(i => map.set(i.code, i));
205
+ return Array.from(map.values());
206
+ });
207
+ }
208
+ /**
209
+ * @method writeValue
210
+ * @description
211
+ * Writes a new value to the element.
212
+ * Part of the ControlValueAccessor interface.
213
+ *
214
+ * @param value - The new value.
215
+ */
216
+ writeValue(value) {
217
+ this.model.set(value || []);
218
+ if (value)
219
+ this.updateSelectionPool(value);
220
+ }
221
+ /**
222
+ * @method registerOnChange
223
+ * @description
224
+ * Registers a callback function that is called when the control's value changes in the UI.
225
+ * Part of the ControlValueAccessor interface.
226
+ *
227
+ * @param fn - The callback function.
228
+ */
229
+ registerOnChange(fn) {
230
+ this.onChange = fn;
231
+ }
232
+ /**
233
+ * @method registerOnTouched
234
+ * @description
235
+ * Registers a callback function that is called by the forms API on initialization to update the form control on 'blur'.
236
+ * Part of the ControlValueAccessor interface.
237
+ *
238
+ * @param fn - The callback function.
239
+ */
240
+ registerOnTouched(fn) {
241
+ this.onTouched = fn;
242
+ }
243
+ /**
244
+ * @method effectiveControl
245
+ * @description
246
+ * Gets the effective FormControl associated with this component,
247
+ * either from NgControl or the internal model.
248
+ */
249
+ get effectiveControl() {
250
+ return this.ngControl?.control || null;
114
251
  }
115
252
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: MultiselectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
116
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.18", type: MultiselectComponent, isStandalone: true, selector: "tk-multiselect", inputs: { control: "control", options: "options", labelText: "labelText", display: "display", maxSelectedLabels: "maxSelectedLabels", selectedItemsLabel: "selectedItemsLabel", emptyFilterMessage: "emptyFilterMessage", filter: "filter", filterPlaceHolder: "filterPlaceHolder", id: "id", styleClass: "styleClass" }, outputs: { selectionChange: "selectionChange" }, ngImport: i0, template: "<p-floatlabel>\n <p-multiselect\n optionLabel=\"name\"\n [id]=\"id\"\n [options]=\"options\"\n [formControl]=\"control\"\n [display]=\"display\"\n [maxSelectedLabels]=\"maxSelectedLabels\"\n [selectedItemsLabel]=\"selectedItemsLabel\"\n [emptyFilterMessage]=\"emptyFilterMessage\"\n [filter]=\"filter\"\n [filterPlaceHolder]=\"filterPlaceHolder\"\n [styleClass]=\"styleClass\"\n (onChange)=\"handleChange($event)\">\n </p-multiselect>\n <label [for]=\"id\">{{ labelText }}</label>\n</p-floatlabel>\n", styles: [":host ::ng-deep .p-multiselect{width:100%;border:none;border-bottom:1px solid var(--tk-color-border-default, #cecdcd);border-radius:0;background-color:transparent}:host ::ng-deep .p-multiselect:focus{border-color:var(--tk-color-accent-default, #16006f)}:host ::ng-deep .p-floatlabel:has(.p-inputwrapper-filled) label,:host ::ng-deep .p-floatlabel:has(input:focus) label{color:var(--tk-primary-500, #16006f)}:host ::ng-deep .p-floatlabel label{color:var(--tk-surface-700, #424243);font-family:var(--tk-font-family, Poppins, sans-serif);font-size:var(--tk-font-size-2xs, 1rem);font-weight:var(--tk-font-weight-400, 400);left:var(--tk-spacing-base-25, .25rem)}:host ::ng-deep .p-multiselect-option span{color:var(--tk-color-accent-default, #16006f)!important;display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host ::ng-deep .p-multiselect-option-selected{background-color:var(--tk-color-accent-muted, #b7b0d2)!important}:host ::ng-deep .p-multiselect-chip{background-color:var(--tk-surface-100, #f4f4f5);color:var(--tk-surface-700, #424243);border-radius:var(--tk-borderRadius-full, 999px)!important;padding:4px 8px}:host ::ng-deep .p-multiselect-filter{border:none;border-radius:0;box-shadow:none;border-bottom:1px solid var(--tk-surface-300, #d2d2d2)}:host ::ng-deep .p-overlay{width:-webkit-fill-available}:host ::ng-deep .p-chip-label{display:inline-block;max-width:10ch;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host ::ng-deep .p-multiselect-label{gap:.313rem;padding:var(--tk-spacing-base-75, 12px) var(--tk-spacing-base-75, 12px) var(--tk-spacing-base-75, 12px) var(--tk-spacing-base-25, 4px)!important}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MultiSelectModule }, { kind: "component", type: i2.MultiSelect, selector: "p-multiSelect, p-multiselect, p-multi-select", inputs: ["id", "ariaLabel", "style", "styleClass", "panelStyle", "panelStyleClass", "inputId", "disabled", "fluid", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "variant", "appendTo", "dataKey", "name", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "chipIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "loading", "virtualScrollItemSize", "loadingIcon", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "size", "showClear", "autofocus", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "defaultLabel", "placeholder", "options", "filterValue", "itemSize", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus", "highlightOnSelect"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "ngmodule", type: FloatLabelModule }, { kind: "component", type: i3.FloatLabel, selector: "p-floatlabel, p-floatLabel, p-float-label", inputs: ["variant"] }] }); }
253
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.18", type: MultiselectComponent, isStandalone: true, selector: "tk-multiselect", inputs: { model: { classPropertyName: "model", publicName: "model", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, labelText: { classPropertyName: "labelText", publicName: "labelText", isSignal: true, isRequired: false, transformFunction: null }, display: { classPropertyName: "display", publicName: "display", isSignal: true, isRequired: false, transformFunction: null }, maxSelectedLabels: { classPropertyName: "maxSelectedLabels", publicName: "maxSelectedLabels", isSignal: true, isRequired: false, transformFunction: null }, selectedItemsLabel: { classPropertyName: "selectedItemsLabel", publicName: "selectedItemsLabel", isSignal: true, isRequired: false, transformFunction: null }, emptyFilterMessage: { classPropertyName: "emptyFilterMessage", publicName: "emptyFilterMessage", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null }, filterPlaceHolder: { classPropertyName: "filterPlaceHolder", publicName: "filterPlaceHolder", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, styleClass: { classPropertyName: "styleClass", publicName: "styleClass", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { model: "modelChange", selectionChange: "selectionChange", filterChange: "filterChange" }, ngImport: i0, template: "<p-floatlabel>\n <p-multiselect\n optionLabel=\"name\"\n [id]=\"id()\"\n [options]=\"options()\"\n [(ngModel)]=\"model\"\n [display]=\"display()\"\n [maxSelectedLabels]=\"maxSelectedLabels()\"\n [selectedItemsLabel]=\"selectedItemsLabel()\"\n [emptyFilterMessage]=\"emptyFilterMessage()\"\n [filter]=\"filter()\"\n [filterPlaceHolder]=\"filterPlaceHolder()\"\n [styleClass]=\"styleClass()\"\n [class.ng-invalid]=\"\n effectiveControl?.invalid &&\n (effectiveControl?.dirty || effectiveControl?.touched)\n \"\n [class.ng-dirty]=\"effectiveControl?.dirty\"\n [class.ng-touched]=\"effectiveControl?.touched\"\n (onFilter)=\"handleFilter($event)\"\n (onChange)=\"handleChange($event)\">\n </p-multiselect>\n <label [for]=\"id()\">{{ labelText() }}</label>\n</p-floatlabel>\n\n<div class=\"tk-select-bottom\">\n <div class=\"tk-select-messages\">\n @if (\n effectiveControl?.invalid &&\n (effectiveControl?.dirty || effectiveControl?.touched) &&\n errorMessage()\n ) {\n <p-message severity=\"error\" size=\"small\" variant=\"simple\">{{\n errorMessage()\n }}</p-message>\n } @else if (hint()) {\n <p-message severity=\"secondary\" size=\"small\" variant=\"simple\">{{\n hint()\n }}</p-message>\n }\n </div>\n</div>\n", styles: [":host ::ng-deep .p-multiselect{width:100%;border:none;border-bottom:1px solid var(--tk-color-border-default, #cecdcd);border-radius:0;background-color:transparent}:host ::ng-deep .p-multiselect:focus{border-color:var(--tk-color-accent-default, #16006f)}:host ::ng-deep .p-floatlabel:has(.p-inputwrapper-filled) label,:host ::ng-deep .p-floatlabel:has(input:focus) label{color:var(--tk-primary-500, #16006f)}:host ::ng-deep .p-floatlabel label{color:var(--tk-surface-700, #424243);font-family:var(--tk-font-family, Poppins, sans-serif);font-size:var(--tk-font-size-2xs, 1rem);font-weight:var(--tk-font-weight-400, 400);left:var(--tk-spacing-base-25, .25rem)}:host ::ng-deep .p-multiselect-option span{color:var(--tk-color-accent-default, #16006f)!important;display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host ::ng-deep .p-multiselect-option-selected{background-color:var(--tk-color-accent-muted, #b7b0d2)!important}:host ::ng-deep .p-multiselect-chip{background-color:var(--tk-surface-100, #f4f4f5);color:var(--tk-surface-700, #424243);border-radius:var(--tk-borderRadius-full, 999px)!important;padding:4px 8px}:host ::ng-deep .p-multiselect-filter{border:none;border-radius:0;box-shadow:none;border-bottom:1px solid var(--tk-surface-300, #d2d2d2)}:host ::ng-deep .p-overlay{width:-webkit-fill-available}:host ::ng-deep .p-chip-label{display:inline-block;max-width:10ch;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host ::ng-deep .p-multiselect-label{gap:.313rem;padding:var(--tk-spacing-base-75, 12px) var(--tk-spacing-base-75, 12px) var(--tk-spacing-base-75, 12px) var(--tk-spacing-base-25, 4px)!important}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MultiSelectModule }, { kind: "component", type: i2.MultiSelect, selector: "p-multiSelect, p-multiselect, p-multi-select", inputs: ["id", "ariaLabel", "style", "styleClass", "panelStyle", "panelStyleClass", "inputId", "disabled", "fluid", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "variant", "appendTo", "dataKey", "name", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "chipIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "loading", "virtualScrollItemSize", "loadingIcon", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "size", "showClear", "autofocus", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "defaultLabel", "placeholder", "options", "filterValue", "itemSize", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus", "highlightOnSelect"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "ngmodule", type: FloatLabelModule }, { kind: "component", type: i3.FloatLabel, selector: "p-floatlabel, p-floatLabel, p-float-label", inputs: ["variant"] }, { kind: "ngmodule", type: MessageModule }, { kind: "component", type: i4.Message, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass", "closable", "icon", "closeIcon", "life", "showTransitionOptions", "hideTransitionOptions", "size", "variant"], outputs: ["onClose"] }] }); }
117
254
  }
118
255
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: MultiselectComponent, decorators: [{
119
256
  type: Component,
120
- args: [{ selector: 'tk-multiselect', standalone: true, imports: [ReactiveFormsModule, MultiSelectModule, FloatLabelModule], template: "<p-floatlabel>\n <p-multiselect\n optionLabel=\"name\"\n [id]=\"id\"\n [options]=\"options\"\n [formControl]=\"control\"\n [display]=\"display\"\n [maxSelectedLabels]=\"maxSelectedLabels\"\n [selectedItemsLabel]=\"selectedItemsLabel\"\n [emptyFilterMessage]=\"emptyFilterMessage\"\n [filter]=\"filter\"\n [filterPlaceHolder]=\"filterPlaceHolder\"\n [styleClass]=\"styleClass\"\n (onChange)=\"handleChange($event)\">\n </p-multiselect>\n <label [for]=\"id\">{{ labelText }}</label>\n</p-floatlabel>\n", styles: [":host ::ng-deep .p-multiselect{width:100%;border:none;border-bottom:1px solid var(--tk-color-border-default, #cecdcd);border-radius:0;background-color:transparent}:host ::ng-deep .p-multiselect:focus{border-color:var(--tk-color-accent-default, #16006f)}:host ::ng-deep .p-floatlabel:has(.p-inputwrapper-filled) label,:host ::ng-deep .p-floatlabel:has(input:focus) label{color:var(--tk-primary-500, #16006f)}:host ::ng-deep .p-floatlabel label{color:var(--tk-surface-700, #424243);font-family:var(--tk-font-family, Poppins, sans-serif);font-size:var(--tk-font-size-2xs, 1rem);font-weight:var(--tk-font-weight-400, 400);left:var(--tk-spacing-base-25, .25rem)}:host ::ng-deep .p-multiselect-option span{color:var(--tk-color-accent-default, #16006f)!important;display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host ::ng-deep .p-multiselect-option-selected{background-color:var(--tk-color-accent-muted, #b7b0d2)!important}:host ::ng-deep .p-multiselect-chip{background-color:var(--tk-surface-100, #f4f4f5);color:var(--tk-surface-700, #424243);border-radius:var(--tk-borderRadius-full, 999px)!important;padding:4px 8px}:host ::ng-deep .p-multiselect-filter{border:none;border-radius:0;box-shadow:none;border-bottom:1px solid var(--tk-surface-300, #d2d2d2)}:host ::ng-deep .p-overlay{width:-webkit-fill-available}:host ::ng-deep .p-chip-label{display:inline-block;max-width:10ch;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host ::ng-deep .p-multiselect-label{gap:.313rem;padding:var(--tk-spacing-base-75, 12px) var(--tk-spacing-base-75, 12px) var(--tk-spacing-base-75, 12px) var(--tk-spacing-base-25, 4px)!important}\n"] }]
121
- }], propDecorators: { control: [{
122
- type: Input
123
- }], options: [{
124
- type: Input
125
- }], labelText: [{
126
- type: Input
127
- }], display: [{
128
- type: Input
129
- }], maxSelectedLabels: [{
130
- type: Input
131
- }], selectedItemsLabel: [{
132
- type: Input
133
- }], emptyFilterMessage: [{
134
- type: Input
135
- }], filter: [{
136
- type: Input
137
- }], filterPlaceHolder: [{
138
- type: Input
139
- }], id: [{
140
- type: Input
141
- }], styleClass: [{
142
- type: Input
143
- }], selectionChange: [{
144
- type: Output
145
- }] } });
257
+ args: [{ selector: 'tk-multiselect', standalone: true, imports: [
258
+ ReactiveFormsModule,
259
+ FormsModule,
260
+ MultiSelectModule,
261
+ FloatLabelModule,
262
+ MessageModule
263
+ ], template: "<p-floatlabel>\n <p-multiselect\n optionLabel=\"name\"\n [id]=\"id()\"\n [options]=\"options()\"\n [(ngModel)]=\"model\"\n [display]=\"display()\"\n [maxSelectedLabels]=\"maxSelectedLabels()\"\n [selectedItemsLabel]=\"selectedItemsLabel()\"\n [emptyFilterMessage]=\"emptyFilterMessage()\"\n [filter]=\"filter()\"\n [filterPlaceHolder]=\"filterPlaceHolder()\"\n [styleClass]=\"styleClass()\"\n [class.ng-invalid]=\"\n effectiveControl?.invalid &&\n (effectiveControl?.dirty || effectiveControl?.touched)\n \"\n [class.ng-dirty]=\"effectiveControl?.dirty\"\n [class.ng-touched]=\"effectiveControl?.touched\"\n (onFilter)=\"handleFilter($event)\"\n (onChange)=\"handleChange($event)\">\n </p-multiselect>\n <label [for]=\"id()\">{{ labelText() }}</label>\n</p-floatlabel>\n\n<div class=\"tk-select-bottom\">\n <div class=\"tk-select-messages\">\n @if (\n effectiveControl?.invalid &&\n (effectiveControl?.dirty || effectiveControl?.touched) &&\n errorMessage()\n ) {\n <p-message severity=\"error\" size=\"small\" variant=\"simple\">{{\n errorMessage()\n }}</p-message>\n } @else if (hint()) {\n <p-message severity=\"secondary\" size=\"small\" variant=\"simple\">{{\n hint()\n }}</p-message>\n }\n </div>\n</div>\n", styles: [":host ::ng-deep .p-multiselect{width:100%;border:none;border-bottom:1px solid var(--tk-color-border-default, #cecdcd);border-radius:0;background-color:transparent}:host ::ng-deep .p-multiselect:focus{border-color:var(--tk-color-accent-default, #16006f)}:host ::ng-deep .p-floatlabel:has(.p-inputwrapper-filled) label,:host ::ng-deep .p-floatlabel:has(input:focus) label{color:var(--tk-primary-500, #16006f)}:host ::ng-deep .p-floatlabel label{color:var(--tk-surface-700, #424243);font-family:var(--tk-font-family, Poppins, sans-serif);font-size:var(--tk-font-size-2xs, 1rem);font-weight:var(--tk-font-weight-400, 400);left:var(--tk-spacing-base-25, .25rem)}:host ::ng-deep .p-multiselect-option span{color:var(--tk-color-accent-default, #16006f)!important;display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host ::ng-deep .p-multiselect-option-selected{background-color:var(--tk-color-accent-muted, #b7b0d2)!important}:host ::ng-deep .p-multiselect-chip{background-color:var(--tk-surface-100, #f4f4f5);color:var(--tk-surface-700, #424243);border-radius:var(--tk-borderRadius-full, 999px)!important;padding:4px 8px}:host ::ng-deep .p-multiselect-filter{border:none;border-radius:0;box-shadow:none;border-bottom:1px solid var(--tk-surface-300, #d2d2d2)}:host ::ng-deep .p-overlay{width:-webkit-fill-available}:host ::ng-deep .p-chip-label{display:inline-block;max-width:10ch;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host ::ng-deep .p-multiselect-label{gap:.313rem;padding:var(--tk-spacing-base-75, 12px) var(--tk-spacing-base-75, 12px) var(--tk-spacing-base-75, 12px) var(--tk-spacing-base-25, 4px)!important}\n"] }]
264
+ }], ctorParameters: () => [] });
146
265
 
147
266
  /**
148
267
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"tekus-design-system-components-multiselect.mjs","sources":["../../../projects/design-system/components/multiselect/src/multiselect.component.ts","../../../projects/design-system/components/multiselect/src/multiselect.component.html","../../../projects/design-system/components/multiselect/tekus-design-system-components-multiselect.ts"],"sourcesContent":["import { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { FormControl, ReactiveFormsModule } from '@angular/forms';\nimport { MultiSelectModule } from 'primeng/multiselect';\nimport { FloatLabelModule } from 'primeng/floatlabel';\nimport { MultiSelectOption } from './multiselect.types';\n@Component({\n selector: 'tk-multiselect',\n standalone: true,\n imports: [ReactiveFormsModule, MultiSelectModule, FloatLabelModule],\n templateUrl: './multiselect.component.html',\n styleUrls: ['./multiselect.component.scss'],\n})\nexport class MultiselectComponent {\n /**\n * @property {FormControl<MultiSelectOption[] | null>} control\n * @description\n * External FormControl used to read/set the selected options.\n * If not provided, an internal FormControl is created with an empty array value.\n */\n @Input() control = new FormControl<MultiSelectOption[] | null>([]);\n\n /**\n * @property {MultiSelectOption[]} options\n * @description\n * Array of available options shown in the multiselect dropdown.\n */\n @Input() options: MultiSelectOption[] = [];\n\n /**\n * @property {string} labelText\n * @description\n * Label displayed above the multiselect input.\n *\n * @default 'Select'\n */\n @Input() labelText: string = 'Select';\n\n /**\n * @property {string} display\n * @description\n * Display mode for selected items. Examples: 'chip', 'comma'.\n *\n * @default 'chip'\n */\n @Input() display: string = 'chip';\n\n /**\n * @property {number} maxSelectedLabels\n * @description\n * Maximum number of labels shown when multiple items are selected.\n *\n * @default 4\n */\n @Input() maxSelectedLabels: number = 4;\n\n /**\n * @property {string} selectedItemsLabel\n * @description\n * Label template used when multiple items are selected (supports placeholders).\n *\n * @default '{0} elementos seleccionados'\n */\n @Input() selectedItemsLabel: string = '{0} elementos seleccionados';\n\n /**\n * @property {string} emptyFilterMessage\n * @description\n * Message displayed when the filter returns no results.\n *\n * @default 'No hay resultados'\n */\n @Input() emptyFilterMessage: string = 'No hay resultados';\n\n /**\n * @property {boolean} filter\n * @description\n * Enables the search/filter input inside the multiselect dropdown.\n *\n * @default true\n */\n @Input() filter: boolean = true;\n\n /**\n * @property {string} filterPlaceHolder\n * @description\n * Placeholder text for the filter input.\n */\n @Input() filterPlaceHolder: string = '';\n\n /**\n * @property {string} id\n * @description\n * HTML id attribute for the multiselect input.\n *\n * @default 'multiselect'\n */\n @Input() id: string = 'multiselect';\n\n /**\n * @property {string} styleClass\n * @description\n * Additional CSS class applied to the multiselect container.\n */\n @Input() styleClass: string = '';\n\n /**\n * @event selectionChange\n * @description\n * Emits when the selected options change.\n * Payload: an array of selected MultiSelectOption or null.\n *\n * @example\n * <tk-multiselect (selectionChange)=\"onChange($event)\"></tk-multiselect>\n */\n @Output() selectionChange = new EventEmitter<MultiSelectOption[] | null>();\n\n /**\n * @method handleChange\n * @description\n * Handler forwarded from the PrimeNG MultiSelect change event.\n * Emits the selectionChange output with the selected values.\n *\n * @param event - Change event containing the `value` property with selected items.\n */\n handleChange(event: { value: MultiSelectOption[] | null }): void {\n this.selectionChange.emit(event.value);\n }\n}\n","<p-floatlabel>\n <p-multiselect\n optionLabel=\"name\"\n [id]=\"id\"\n [options]=\"options\"\n [formControl]=\"control\"\n [display]=\"display\"\n [maxSelectedLabels]=\"maxSelectedLabels\"\n [selectedItemsLabel]=\"selectedItemsLabel\"\n [emptyFilterMessage]=\"emptyFilterMessage\"\n [filter]=\"filter\"\n [filterPlaceHolder]=\"filterPlaceHolder\"\n [styleClass]=\"styleClass\"\n (onChange)=\"handleChange($event)\">\n </p-multiselect>\n <label [for]=\"id\">{{ labelText }}</label>\n</p-floatlabel>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;MAYa,oBAAoB,CAAA;AAPjC,IAAA,WAAA,GAAA;AAQE;;;;;AAKG;AACM,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,WAAW,CAA6B,EAAE,CAAC;AAElE;;;;AAIG;QACM,IAAO,CAAA,OAAA,GAAwB,EAAE;AAE1C;;;;;;AAMG;QACM,IAAS,CAAA,SAAA,GAAW,QAAQ;AAErC;;;;;;AAMG;QACM,IAAO,CAAA,OAAA,GAAW,MAAM;AAEjC;;;;;;AAMG;QACM,IAAiB,CAAA,iBAAA,GAAW,CAAC;AAEtC;;;;;;AAMG;QACM,IAAkB,CA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AAA,EAAA,UAAA,EAAA,IAAA,EAAA,iBAAiB,q6CAAE,gBAAgB,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,UAAA,EAAA,QAAA,EAAA,2CAAA,EAAA,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAIvD,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAPhC,SAAS;+BACE,gBAAgB,EAAA,UAAA,EACd,IAAI,EACP,OAAA,EAAA,CAAC,mBAAmB,EAAE,iBAAiB,EAAE,gBAAgB,CAAC,EAAA,QAAA,EAAA,4hBAAA,EAAA,MAAA,EAAA,CAAA,yoDAAA,CAAA,EAAA;8BAW1D,OAAO,EAAA,CAAA;sBAAf;gBAOQ,OAAO,EAAA,CAAA;sBAAf;gBASQ,SAAS,EAAA,CAAA;sBAAjB;gBASQ,OAAO,EAAA,CAAA;sBAAf;gBASQ,iBAAiB,EAAA,CAAA;sBAAzB;gBASQ,kBAAkB,EAAA,CAAA;sBAA1B;gBASQ,kBAAkB,EAAA,CAAA;sBAA1B;gBASQ,MAAM,EAAA,CAAA;sBAAd;gBAOQ,iBAAiB,EAAA,CAAA;sBAAzB;gBASQ,EAAE,EAAA,CAAA;sBAAV;gBAOQ,UAAU,EAAA,CAAA;sBAAlB;gBAWS,eAAe,EAAA,CAAA;sBAAxB;;;AElHH;;AAEG;;;;"}
1
+ {"version":3,"file":"tekus-design-system-components-multiselect.mjs","sources":["../../../projects/design-system/components/multiselect/src/multiselect.component.ts","../../../projects/design-system/components/multiselect/src/multiselect.component.html","../../../projects/design-system/components/multiselect/tekus-design-system-components-multiselect.ts"],"sourcesContent":["import {\n Component,\n computed,\n inject,\n input,\n model,\n output,\n signal,\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n FormControl,\n FormsModule,\n NgControl,\n ReactiveFormsModule,\n} from '@angular/forms';\nimport { MultiSelectModule } from 'primeng/multiselect';\nimport { FloatLabelModule } from 'primeng/floatlabel';\nimport { MultiSelectOption } from './multiselect.types';\nimport { MessageModule } from 'primeng/message';\n@Component({\n selector: 'tk-multiselect',\n standalone: true,\n imports: [\n ReactiveFormsModule,\n FormsModule,\n MultiSelectModule,\n FloatLabelModule,\n MessageModule\n ],\n templateUrl: './multiselect.component.html',\n styleUrls: ['./multiselect.component.scss'],\n})\nexport class MultiselectComponent implements ControlValueAccessor {\n readonly ngControl = inject(NgControl, { self: true, optional: true });\n\n constructor() {\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n /**\n * @property {Signal<MultiSelectOption[]>} selectionPool\n * @description\n * Internal signal to keep track of selected items even if they are filtered out from the main options list.\n */\n private readonly selectionPool = signal<MultiSelectOption[]>([]);\n\n /**\n * @property {ModelSignal<MultiSelectOption[] | null>} model\n * @description\n * The model signal for two-way binding.\n */\n readonly model = model<MultiSelectOption[] | null>([]);\n\n /**\n * @property {MultiSelectOption[]} options\n * @description\n * Array of available options shown in the multiselect dropdown.\n */\n options = input<MultiSelectOption[]>([]);\n\n /**\n * @property {string} labelText\n * @description\n * Label displayed above the multiselect input.\n *\n * @default 'Select'\n */\n labelText = input<string>('Select');\n\n /**\n * @property {string} display\n * @description\n * Display mode for selected items. Examples: 'chip', 'comma'.\n *\n * @default 'chip'\n */\n display = input<string>('chip');\n\n /**\n * @property {number} maxSelectedLabels\n * @description\n * Maximum number of labels shown when multiple items are selected.\n *\n * @default 4\n */\n maxSelectedLabels = input<number>(4);\n\n /**\n * @property {string} selectedItemsLabel\n * @description\n * Label template used when multiple items are selected (supports placeholders).\n *\n * @default '{0} elementos seleccionados'\n */\n selectedItemsLabel = input<string>('{0} elementos seleccionados');\n\n /**\n * @property {string} emptyFilterMessage\n * @description\n * Message displayed when the filter returns no results.\n *\n * @default 'No hay resultados'\n */\n emptyFilterMessage = input<string>('No hay resultados');\n\n /**\n * @property {boolean} filter\n * @description\n * Enables the search/filter input inside the multiselect dropdown.\n *\n * @default true\n */\n filter = input<boolean>(true);\n\n /**\n * @property {string} filterPlaceHolder\n * @description\n * Placeholder text for the filter input.\n */\n filterPlaceHolder = input<string>('');\n\n /**\n * @property {string} id\n * @description\n * HTML id attribute for the multiselect input.\n *\n * @default 'multiselect'\n */\n id = input<string>('multiselect');\n\n /**\n * @property {string} styleClass\n * @description\n * Additional CSS class applied to the multiselect container.\n */\n styleClass = input<string>('');\n\n /**\n * @property {InputSignal<string>} errorMessage\n * @description\n * Message to display when the control is invalid and touched.\n */\n errorMessage = input<string>('');\n\n /**\n * @property {InputSignal<string>} hint\n * @description\n * Hint text to display below the input.\n */\n hint = input<string>('');\n\n /**\n * @event selectionChange\n * @description\n * Emits when the selected options change.\n * Payload: an array of selected MultiSelectOption or null.\n *\n * @example\n * <tk-multiselect (selectionChange)=\"onChange($event)\"></tk-multiselect>\n */\n selectionChange = output<MultiSelectOption[] | null>();\n\n /**\n * @event filterChange\n * @description\n * Emits the filter text when the user types in the search input.\n */\n readonly filterChange = output<string>();\n\n /**\n * @property internalOptions\n * @description\n * Computed signal that merges the current options with the selected items pool\n * to ensure selected items are always visible.\n */\n readonly internalOptions = computed(() => {\n const currentFromParent = this.options();\n const selected = this.selectionPool();\n\n const merged = [...selected, ...currentFromParent];\n const uniqueMap = new Map();\n\n merged.forEach(item => {\n if (item) uniqueMap.set(item.code, item);\n });\n\n return Array.from(uniqueMap.values());\n });\n\n /**\n * @method handleFilter\n * @description\n * Handles the filter event from the PrimeNG component and emits the filter value.\n *\n * @param event - The filter event object.\n */\n handleFilter(event: { filter: string }) {\n this.filterChange.emit(event.filter || '');\n }\n\n /**\n * @callback onChange\n * @description\n * Callback function to notify the parent component of value changes.\n */\n onChange: (value: MultiSelectOption[] | null) => void = () => {};\n\n /**\n * @callback onTouched\n * @description\n * Callback function to notify the parent component when the control is touched.\n */\n onTouched: () => void = () => {};\n\n /**\n * @method handleChange\n * @description\n * Handler forwarded from the PrimeNG MultiSelect change event.\n * Emits the selectionChange output with the selected values.\n *\n * @param event - Change event containing the `value` property with selected items.\n */\n handleChange(event: { value: MultiSelectOption[] | null }): void {\n const val = event.value || [];\n this.model.set(val);\n this.updateSelectionPool(val);\n\n this.onChange(val);\n this.selectionChange.emit(val);\n\n if (this.effectiveControl) {\n this.effectiveControl.setValue(val);\n this.effectiveControl.markAsDirty();\n this.effectiveControl.markAsTouched();\n }\n }\n\n /**\n * @method updateSelectionPool\n * @description\n * Updates the internal selection pool to ensure selected items persist\n * even if they are filtered out from the main options list.\n *\n * @param items - The items to add to the pool.\n */\n private updateSelectionPool(items: MultiSelectOption[]) {\n this.selectionPool.update(prev => {\n const combined = [...prev, ...items];\n const map = new Map();\n combined.forEach(i => map.set(i.code, i));\n return Array.from(map.values());\n });\n }\n\n /**\n * @method writeValue\n * @description\n * Writes a new value to the element.\n * Part of the ControlValueAccessor interface.\n *\n * @param value - The new value.\n */\n writeValue(value: MultiSelectOption[] | null): void {\n this.model.set(value || []);\n if (value) this.updateSelectionPool(value);\n }\n\n /**\n * @method registerOnChange\n * @description\n * Registers a callback function that is called when the control's value changes in the UI.\n * Part of the ControlValueAccessor interface.\n *\n * @param fn - The callback function.\n */\n registerOnChange(fn: (value: MultiSelectOption[] | null) => void): void {\n this.onChange = fn;\n }\n\n /**\n * @method registerOnTouched\n * @description\n * Registers a callback function that is called by the forms API on initialization to update the form control on 'blur'.\n * Part of the ControlValueAccessor interface.\n *\n * @param fn - The callback function.\n */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n /**\n * @method effectiveControl\n * @description\n * Gets the effective FormControl associated with this component,\n * either from NgControl or the internal model.\n */\n get effectiveControl(): FormControl | null {\n return (this.ngControl?.control as FormControl) || null;\n }\n}\n","<p-floatlabel>\n <p-multiselect\n optionLabel=\"name\"\n [id]=\"id()\"\n [options]=\"options()\"\n [(ngModel)]=\"model\"\n [display]=\"display()\"\n [maxSelectedLabels]=\"maxSelectedLabels()\"\n [selectedItemsLabel]=\"selectedItemsLabel()\"\n [emptyFilterMessage]=\"emptyFilterMessage()\"\n [filter]=\"filter()\"\n [filterPlaceHolder]=\"filterPlaceHolder()\"\n [styleClass]=\"styleClass()\"\n [class.ng-invalid]=\"\n effectiveControl?.invalid &&\n (effectiveControl?.dirty || effectiveControl?.touched)\n \"\n [class.ng-dirty]=\"effectiveControl?.dirty\"\n [class.ng-touched]=\"effectiveControl?.touched\"\n (onFilter)=\"handleFilter($event)\"\n (onChange)=\"handleChange($event)\">\n </p-multiselect>\n <label [for]=\"id()\">{{ labelText() }}</label>\n</p-floatlabel>\n\n<div class=\"tk-select-bottom\">\n <div class=\"tk-select-messages\">\n @if (\n effectiveControl?.invalid &&\n (effectiveControl?.dirty || effectiveControl?.touched) &&\n errorMessage()\n ) {\n <p-message severity=\"error\" size=\"small\" variant=\"simple\">{{\n errorMessage()\n }}</p-message>\n } @else if (hint()) {\n <p-message severity=\"secondary\" size=\"small\" variant=\"simple\">{{\n hint()\n }}</p-message>\n }\n </div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;MAiCa,oBAAoB,CAAA;AAG/B,IAAA,WAAA,GAAA;AAFS,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAQtE;;;;AAIG;AACc,QAAA,IAAA,CAAA,aAAa,GAAG,MAAM,CAAsB,EAAE,CAAC;AAEhE;;;;AAIG;AACM,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAA6B,EAAE,CAAC;AAEtD;;;;AAIG;AACH,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAsB,EAAE,CAAC;AAExC;;;;;;AAMG;AACH,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAS,QAAQ,CAAC;AAEnC;;;;;;AAMG;AACH,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAS,MAAM,CAAC;AA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AAA,EAAA,EAAA,CAAA,UAAA,EAAA,QAAA,EAAA,2CAAA,EAAA,MAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAChB,aAAa,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,OAAA,EAAA,YAAA,EAAA,UAAA,EAAA,MAAA,EAAA,WAAA,EAAA,MAAA,EAAA,uBAAA,EAAA,uBAAA,EAAA,MAAA,EAAA,SAAA,CAAA,EAAA,OAAA,EAAA,CAAA,SAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAKJ,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAbhC,SAAS;+BACE,gBAAgB,EAAA,UAAA,EACd,IAAI,EACP,OAAA,EAAA;wBACP,mBAAmB;wBACnB,WAAW;wBACX,iBAAiB;wBACjB,gBAAgB;wBAChB;AACD,qBAAA,EAAA,QAAA,EAAA,6zCAAA,EAAA,MAAA,EAAA,CAAA,yoDAAA,CAAA,EAAA;;;AE7BH;;AAEG;;;;"}
@@ -0,0 +1,102 @@
1
+ import * as i0 from '@angular/core';
2
+ import { EventEmitter, Output, Input, Component } from '@angular/core';
3
+ import * as i1 from 'primeng/panel';
4
+ import { PanelModule } from 'primeng/panel';
5
+ import { IconComponent } from '@tekus/design-system/components/icon';
6
+ import * as i2 from 'primeng/api';
7
+
8
+ /**
9
+ * @component PanelComponent
10
+ * @description
11
+ * Panel is a container component with an optional content toggle feature.
12
+ * It wraps PrimeNG's Panel component and provides a consistent design across the application.
13
+ *
14
+ * The panel can be toggled between expanded and collapsed states using the chevron icon
15
+ * in the header. The component uses custom tk-icon for the toggle icons.
16
+ *
17
+ * @usage
18
+ * ```html
19
+ * <tk-panel
20
+ * header="Panel Title"
21
+ * [toggleable]="true"
22
+ * [collapsed]="false">
23
+ * <p>Panel content goes here</p>
24
+ * </tk-panel>
25
+ * ```
26
+ */
27
+ class PanelComponent {
28
+ constructor() {
29
+ /**
30
+ * @property {boolean} toggleable
31
+ * @description
32
+ * When enabled, the panel content can be expanded and collapsed.
33
+ *
34
+ * @default false
35
+ */
36
+ this.toggleable = false;
37
+ /**
38
+ * @property {boolean} collapsed
39
+ * @description
40
+ * Defines whether the panel is collapsed or expanded.
41
+ * Supports two-way binding.
42
+ *
43
+ * @default false
44
+ */
45
+ this.collapsed = false;
46
+ /**
47
+ * @event collapsedChange
48
+ * @description
49
+ * Emits when the collapsed state changes.
50
+ * Enables two-way binding with [(collapsed)].
51
+ */
52
+ this.collapsedChange = new EventEmitter();
53
+ /**
54
+ * @event toggled
55
+ * @description
56
+ * Callback to invoke when the panel is toggled.
57
+ * Emits an object with the collapsed state.
58
+ *
59
+ * @example
60
+ * ```html
61
+ * <tk-panel (toggled)="handleToggle($event)"></tk-panel>
62
+ * ```
63
+ */
64
+ this.toggled = new EventEmitter();
65
+ }
66
+ /**
67
+ * @method handleToggle
68
+ * @description
69
+ * Handles the toggle event from the PrimeNG panel.
70
+ * Updates the collapsed state and emits the appropriate events.
71
+ *
72
+ * @param event - The toggle event from PrimeNG panel
73
+ */
74
+ handleToggle(event) {
75
+ this.collapsed = event.collapsed ?? false;
76
+ this.collapsedChange.emit(this.collapsed);
77
+ this.toggled.emit({ collapsed: this.collapsed });
78
+ }
79
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: PanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
80
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.18", type: PanelComponent, isStandalone: true, selector: "tk-panel", inputs: { header: "header", toggleable: "toggleable", collapsed: "collapsed" }, outputs: { collapsedChange: "collapsedChange", toggled: "toggled" }, ngImport: i0, template: "<p-panel\n class=\"tk-panel\"\n [header]=\"header\"\n [toggleable]=\"toggleable\"\n [collapsed]=\"collapsed\"\n (onAfterToggle)=\"handleToggle($event)\">\n \n <ng-template pTemplate=\"headericons\">\n @if (toggleable) {\n <div class=\"tk-panel-toggle-icon\">\n @if (collapsed) {\n <tk-icon [icon]=\"'chevron-down'\"></tk-icon>\n } @else {\n <tk-icon [icon]=\"'chevron-up'\"></tk-icon>\n }\n </div>\n }\n </ng-template>\n\n <ng-content></ng-content>\n</p-panel>\n", styles: [":host{display:block;width:100%}:host ::ng-deep .tk-panel{width:100%}:host ::ng-deep .tk-panel .p-panel-header .p-panel-title{color:var(--tk-color-text-default, #000000)}:host ::ng-deep .tk-panel .p-panel-header .p-panel-header-actions button .p-button-icon{display:none!important}:host ::ng-deep .tk-panel .p-panel-header .p-panel-header-actions button{background:transparent!important;border:none!important;padding:0!important;width:auto!important;min-width:auto!important;box-shadow:none!important}:host ::ng-deep .tk-panel .p-panel-header .p-panel-header-actions button:hover{background:transparent!important}:host ::ng-deep .tk-panel .p-panel-content{background:var(--tk-color-background-default, #ffffff);border-radius:var(--tk-borderRadius-s, .5rem);margin:var(--tk-spacing-paddingY-s, .5rem);margin-top:var(--tk-spacing-paddingY-none, 0rem)}:host ::ng-deep .tk-panel .tk-panel-toggle-icon{display:flex;align-items:center;justify-content:center;pointer-events:none;min-width:var(--tk-size-base-200, 2rem);min-height:var(--tk-size-base-200, 2rem)}\n"], dependencies: [{ kind: "ngmodule", type: PanelModule }, { kind: "component", type: i1.Panel, selector: "p-panel", inputs: ["toggleable", "header", "collapsed", "style", "styleClass", "iconPos", "expandIcon", "collapseIcon", "showHeader", "toggler", "transitionOptions", "toggleButtonProps"], outputs: ["collapsedChange", "onBeforeToggle", "onAfterToggle"] }, { kind: "directive", type: i2.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: IconComponent, selector: "tk-icon", inputs: ["icon", "styleIcon", "color", "size", "disabled"], outputs: ["iconChange", "styleIconChange", "colorChange", "sizeChange", "disabledChange"] }] }); }
81
+ }
82
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: PanelComponent, decorators: [{
83
+ type: Component,
84
+ args: [{ selector: 'tk-panel', standalone: true, imports: [PanelModule, IconComponent], template: "<p-panel\n class=\"tk-panel\"\n [header]=\"header\"\n [toggleable]=\"toggleable\"\n [collapsed]=\"collapsed\"\n (onAfterToggle)=\"handleToggle($event)\">\n \n <ng-template pTemplate=\"headericons\">\n @if (toggleable) {\n <div class=\"tk-panel-toggle-icon\">\n @if (collapsed) {\n <tk-icon [icon]=\"'chevron-down'\"></tk-icon>\n } @else {\n <tk-icon [icon]=\"'chevron-up'\"></tk-icon>\n }\n </div>\n }\n </ng-template>\n\n <ng-content></ng-content>\n</p-panel>\n", styles: [":host{display:block;width:100%}:host ::ng-deep .tk-panel{width:100%}:host ::ng-deep .tk-panel .p-panel-header .p-panel-title{color:var(--tk-color-text-default, #000000)}:host ::ng-deep .tk-panel .p-panel-header .p-panel-header-actions button .p-button-icon{display:none!important}:host ::ng-deep .tk-panel .p-panel-header .p-panel-header-actions button{background:transparent!important;border:none!important;padding:0!important;width:auto!important;min-width:auto!important;box-shadow:none!important}:host ::ng-deep .tk-panel .p-panel-header .p-panel-header-actions button:hover{background:transparent!important}:host ::ng-deep .tk-panel .p-panel-content{background:var(--tk-color-background-default, #ffffff);border-radius:var(--tk-borderRadius-s, .5rem);margin:var(--tk-spacing-paddingY-s, .5rem);margin-top:var(--tk-spacing-paddingY-none, 0rem)}:host ::ng-deep .tk-panel .tk-panel-toggle-icon{display:flex;align-items:center;justify-content:center;pointer-events:none;min-width:var(--tk-size-base-200, 2rem);min-height:var(--tk-size-base-200, 2rem)}\n"] }]
85
+ }], propDecorators: { header: [{
86
+ type: Input
87
+ }], toggleable: [{
88
+ type: Input
89
+ }], collapsed: [{
90
+ type: Input
91
+ }], collapsedChange: [{
92
+ type: Output
93
+ }], toggled: [{
94
+ type: Output
95
+ }] } });
96
+
97
+ /**
98
+ * Generated bundle index. Do not edit.
99
+ */
100
+
101
+ export { PanelComponent };
102
+ //# sourceMappingURL=tekus-design-system-components-panel.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tekus-design-system-components-panel.mjs","sources":["../../../projects/design-system/components/panel/src/panel.component.ts","../../../projects/design-system/components/panel/src/panel.component.html","../../../projects/design-system/components/panel/tekus-design-system-components-panel.ts"],"sourcesContent":["import { Component, EventEmitter, Input, Output } from '@angular/core';\nimport { PanelModule } from 'primeng/panel';\nimport { IconComponent } from '@tekus/design-system/components/icon';\n\n/**\n * @component PanelComponent\n * @description\n * Panel is a container component with an optional content toggle feature.\n * It wraps PrimeNG's Panel component and provides a consistent design across the application.\n * \n * The panel can be toggled between expanded and collapsed states using the chevron icon\n * in the header. The component uses custom tk-icon for the toggle icons.\n *\n * @usage\n * ```html\n * <tk-panel \n * header=\"Panel Title\" \n * [toggleable]=\"true\"\n * [collapsed]=\"false\">\n * <p>Panel content goes here</p>\n * </tk-panel>\n * ```\n */\n@Component({\n selector: 'tk-panel',\n standalone: true,\n imports: [PanelModule, IconComponent],\n templateUrl: './panel.component.html',\n styleUrls: ['./panel.component.scss'],\n})\nexport class PanelComponent {\n /**\n * @property {string} header\n * @description\n * Header text displayed at the top of the panel.\n * \n * @default undefined\n */\n @Input() header?: string;\n\n /**\n * @property {boolean} toggleable\n * @description\n * When enabled, the panel content can be expanded and collapsed.\n * \n * @default false\n */\n @Input() toggleable = false;\n\n /**\n * @property {boolean} collapsed\n * @description\n * Defines whether the panel is collapsed or expanded.\n * Supports two-way binding.\n * \n * @default false\n */\n @Input() collapsed = false;\n\n /**\n * @event collapsedChange\n * @description\n * Emits when the collapsed state changes.\n * Enables two-way binding with [(collapsed)].\n */\n @Output() collapsedChange = new EventEmitter<boolean>();\n\n /**\n * @event toggled\n * @description\n * Callback to invoke when the panel is toggled.\n * Emits an object with the collapsed state.\n * \n * @example\n * ```html\n * <tk-panel (toggled)=\"handleToggle($event)\"></tk-panel>\n * ```\n */\n @Output() toggled = new EventEmitter<{ collapsed: boolean }>();\n\n /**\n * @method handleToggle\n * @description\n * Handles the toggle event from the PrimeNG panel.\n * Updates the collapsed state and emits the appropriate events.\n * \n * @param event - The toggle event from PrimeNG panel\n */\n handleToggle(event: { collapsed: boolean | undefined }): void {\n this.collapsed = event.collapsed ?? false;\n this.collapsedChange.emit(this.collapsed);\n this.toggled.emit({ collapsed: this.collapsed });\n }\n}\n","<p-panel\n class=\"tk-panel\"\n [header]=\"header\"\n [toggleable]=\"toggleable\"\n [collapsed]=\"collapsed\"\n (onAfterToggle)=\"handleToggle($event)\">\n \n <ng-template pTemplate=\"headericons\">\n @if (toggleable) {\n <div class=\"tk-panel-toggle-icon\">\n @if (collapsed) {\n <tk-icon [icon]=\"'chevron-down'\"></tk-icon>\n } @else {\n <tk-icon [icon]=\"'chevron-up'\"></tk-icon>\n }\n </div>\n }\n </ng-template>\n\n <ng-content></ng-content>\n</p-panel>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;AAIA;;;;;;;;;;;;;;;;;;AAkBG;MAQU,cAAc,CAAA;AAP3B,IAAA,WAAA,GAAA;AAiBE;;;;;;AAMG;QACM,IAAU,CAAA,UAAA,GAAG,KAAK;AAE3B;;;;;;;AAOG;QACM,IAAS,CAAA,SAAA,GAAG,KAAK;AAE1B;;;;;AAKG;AACO,QAAA,IAAA,CAAA,eAAe,GAAG,IAAI,YAAY,EAAW;AAEvD;;;;;;;;;;AAUG;AACO,QAAA,IAAA,CAAA,OAAO,GAAG,IAAI,YAAY,EAA0B;AAe/D;AAbC;;;;;;;AAOG;AACH,IAAA,YAAY,CAAC,KAAyC,EAAA;QACpD,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,IAAI,KAAK;QACzC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC;AACzC,QAA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U,EAAA,CAAA;sBAAlB;gBAUQ,SAAS,EAAA,CAAA;sBAAjB;gBAQS,eAAe,EAAA,CAAA;sBAAxB;gBAaS,OAAO,EAAA,CAAA;sBAAhB;;;AE9EH;;AAEG;;;;"}
@@ -180,16 +180,11 @@ class SelectComponent {
180
180
  */
181
181
  handleChange(event) {
182
182
  const value = event.value ?? null;
183
- // Update internal state
184
183
  this.value = value;
185
- // 1. Update Angular Forms
186
184
  this.onChangeFn(value);
187
185
  this.onTouchedFn();
188
- // 2. Update signals
189
186
  this.model.set(value);
190
- // 3. Notify external listeners
191
187
  this.modelChange.emit(value);
192
- // 4. Explicitly update effective control to ensure UI consistency (matches input-text)
193
188
  if (this.effectiveControl) {
194
189
  this.effectiveControl.setValue(value);
195
190
  this.effectiveControl.markAsDirty();
@@ -197,14 +192,14 @@ class SelectComponent {
197
192
  }
198
193
  }
199
194
  get effectiveControl() {
200
- return this.ngControl?.control || this.control();
195
+ return this.ngControl?.control || null;
201
196
  }
202
197
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: SelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
203
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.18", type: SelectComponent, isStandalone: true, selector: "tk-select", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionLabel: { classPropertyName: "optionLabel", publicName: "optionLabel", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, model: { classPropertyName: "model", publicName: "model", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { model: "modelChange", modelChange: "modelChange" }, ngImport: i0, template: "<p-floatlabel class=\"w-full\">\n <p-select\n [id]=\"id()\"\n class=\"w-full\"\n [options]=\"options()\"\n [optionLabel]=\"optionLabel()\"\n [showClear]=\"showClear()\"\n [disabled]=\"disabled()\"\n [ngModel]=\"value\"\n [class.ng-invalid]=\"effectiveControl?.invalid && (effectiveControl?.dirty || effectiveControl?.touched)\"\n [class.ng-dirty]=\"effectiveControl?.dirty\"\n [class.ng-touched]=\"effectiveControl?.touched\"\n (onChange)=\"handleChange($event)\" />\n <label [for]=\"id()\">{{ label() }}</label>\n</p-floatlabel>\n\n<div class=\"tk-select-bottom\">\n <div class=\"tk-select-messages\">\n @if ((effectiveControl?.invalid && (effectiveControl?.dirty || effectiveControl?.touched)) && errorMessage()) {\n <p-message severity=\"error\" size=\"small\" variant=\"simple\">{{ errorMessage() }}</p-message>\n } @else if (hint()) {\n <p-message severity=\"secondary\" size=\"small\" variant=\"simple\">{{ hint() }}</p-message>\n }\n </div>\n</div>", styles: [":host ::ng-deep .p-select{width:100%;border:none;border-bottom:1px solid var(--tk-color-border-default, #cecdcd);border-radius:0;color:var(--tk-color-text-default, #191a1b);background-color:transparent}:host ::ng-deep .p-select:focus{border-color:var(--tk-color-accent-default, #16006f)}:host ::ng-deep .p-select.ng-invalid.ng-dirty,:host ::ng-deep .p-select.ng-invalid.ng-touched{border-color:var(--tk-color-base-red-700, #cf2604)}:host ::ng-deep .p-select-label{padding:var(--tk-spacing-base-75, 12px) var(--tk-spacing-base-75, 12px) var(--tk-spacing-base-75, 12px) var(--tk-spacing-base-25, 4px)!important}:host ::ng-deep .p-floatlabel .p-inputwrapper-focus~label{color:var(--tk-primary-600, #140065);top:-.688rem}:host ::ng-deep .p-floatlabel:has(.p-inputwrapper-filled) label,:host ::ng-deep .p-floatlabel:has(input.p-filled) label{top:-.75rem;color:var(--tk-color-base-surface-950, #191a1b)}:host ::ng-deep .p-floatlabel label{color:var(--tk-color-base-surface-500, #8a8a8b);font-family:var(--tk-font-family, Poppins, sans-serif);font-weight:var(--tk-font-weight-400, 400);left:var(--tk-spacing-base-25, .25rem);transition-duration:.2s}:host ::ng-deep .p-floatlabel:has(.p-select:focus) label,:host ::ng-deep .p-floatlabel:has(.p-inputwrapper-focus) label{color:var(--tk-color-base-primary-600, #140065);top:-.75rem}:host ::ng-deep .p-floatlabel:has(.p-inputwrapper-filled) label,:host ::ng-deep .p-floatlabel:has(.p-filled) label{top:-.75rem;color:var(--tk-color-base-surface-950, #191a1b)}:host ::ng-deep .p-floatlabel:has(.p-inputwrapper-focus) label{color:var(--tk-color-base-primary-600, #140065)}:host ::ng-deep .p-floatlabel:has(.p-select.ng-invalid.ng-dirty) label,:host ::ng-deep .p-floatlabel:has(.p-select.ng-invalid.ng-touched) label{color:var(--tk-color-base-red-700, #cf2604)}:host ::ng-deep .p-select-option span{color:var(--tk-color-text-default, #191a1b)!important;display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host ::ng-deep .p-select-option:hover{background-color:var(--tk-primary-100, #b7b0d2)!important}:host ::ng-deep .p-select-option[data-p-highlight=true]{background-color:var(--tk-primary-100, #b7b0d2)!important;color:var(--tk-primary-500, #16006f)!important}:host ::ng-deep .p-select-clear-icon{color:var(--tk-surface-700, #424243)!important}:host ::ng-deep .p-select-option-check-icon{color:transparent}:host ::ng-deep p-message[severity=error] .p-inline-message-text,:host ::ng-deep p-message[severity=error] span{color:var(--tk-color-base-red-700, #cf2604)}:host ::ng-deep p-message[severity=secondary] .p-inline-message-text,:host ::ng-deep p-message[severity=secondary] span{color:var(--tk-color-base-surface-600, #5d5d5e)}:host ::ng-deep .tk-select-bottom{display:flex;justify-content:space-between;align-items:flex-start;margin-top:var(--tk-spacing-base-25, .25rem);min-height:var(--tk-spacing-base-125, 1.25rem)}:host ::ng-deep .tk-select-messages{flex:1;margin-right:var(--tk-spacing-base-100, 1rem)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "size", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "fluid", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: FloatLabelModule }, { kind: "component", type: i2.FloatLabel, selector: "p-floatlabel, p-floatLabel, p-float-label", inputs: ["variant"] }, { kind: "ngmodule", type: MessageModule }, { kind: "component", type: i3.Message, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass", "closable", "icon", "closeIcon", "life", "showTransitionOptions", "hideTransitionOptions", "size", "variant"], outputs: ["onClose"] }, { kind: "ngmodule", type: ReactiveFormsModule }] }); }
198
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.18", type: SelectComponent, isStandalone: true, selector: "tk-select", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, optionLabel: { classPropertyName: "optionLabel", publicName: "optionLabel", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, showClear: { classPropertyName: "showClear", publicName: "showClear", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, model: { classPropertyName: "model", publicName: "model", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { model: "modelChange", modelChange: "modelChange" }, ngImport: i0, template: "<p-floatlabel class=\"w-full\">\n <p-select\n [id]=\"id()\"\n class=\"w-full\"\n [options]=\"options()\"\n [optionLabel]=\"optionLabel()\"\n [showClear]=\"showClear()\"\n [disabled]=\"disabled()\"\n [ngModel]=\"value\"\n [class.ng-invalid]=\"\n effectiveControl?.invalid &&\n (effectiveControl?.dirty || effectiveControl?.touched)\n \"\n [class.ng-dirty]=\"effectiveControl?.dirty\"\n [class.ng-touched]=\"effectiveControl?.touched\"\n (onChange)=\"handleChange($event)\" />\n <label [for]=\"id()\">{{ label() }}</label>\n</p-floatlabel>\n\n<div class=\"tk-select-bottom\">\n <div class=\"tk-select-messages\">\n @if (\n effectiveControl?.invalid &&\n (effectiveControl?.dirty || effectiveControl?.touched) &&\n errorMessage()\n ) {\n <p-message severity=\"error\" size=\"small\" variant=\"simple\">{{\n errorMessage()\n }}</p-message>\n } @else if (hint()) {\n <p-message severity=\"secondary\" size=\"small\" variant=\"simple\">{{\n hint()\n }}</p-message>\n }\n </div>\n</div>\n", styles: [":host ::ng-deep .p-select{width:100%;border:none;border-bottom:1px solid var(--tk-color-border-default, #cecdcd);border-radius:0;color:var(--tk-color-text-default, #191a1b);background-color:transparent}:host ::ng-deep .p-select:focus{border-color:var(--tk-color-accent-default, #16006f)}:host ::ng-deep .p-select.ng-invalid.ng-dirty,:host ::ng-deep .p-select.ng-invalid.ng-touched{border-color:var(--tk-color-base-red-700, #cf2604)}:host ::ng-deep .p-select-label{padding:var(--tk-spacing-base-75, 12px) var(--tk-spacing-base-75, 12px) var(--tk-spacing-base-75, 12px) var(--tk-spacing-base-25, 4px)!important}:host ::ng-deep .p-floatlabel .p-inputwrapper-focus~label{color:var(--tk-primary-600, #140065);top:-.688rem}:host ::ng-deep .p-floatlabel:has(.p-inputwrapper-filled) label,:host ::ng-deep .p-floatlabel:has(input.p-filled) label{top:-.75rem;color:var(--tk-color-base-surface-950, #191a1b)}:host ::ng-deep .p-floatlabel label{color:var(--tk-color-base-surface-500, #8a8a8b);font-family:var(--tk-font-family, Poppins, sans-serif);font-weight:var(--tk-font-weight-400, 400);left:var(--tk-spacing-base-25, .25rem);transition-duration:.2s}:host ::ng-deep .p-floatlabel:has(.p-select:focus) label,:host ::ng-deep .p-floatlabel:has(.p-inputwrapper-focus) label{color:var(--tk-color-base-primary-600, #140065);top:-.75rem}:host ::ng-deep .p-floatlabel:has(.p-inputwrapper-filled) label,:host ::ng-deep .p-floatlabel:has(.p-filled) label{top:-.75rem;color:var(--tk-color-base-surface-950, #191a1b)}:host ::ng-deep .p-floatlabel:has(.p-inputwrapper-focus) label{color:var(--tk-color-base-primary-600, #140065)}:host ::ng-deep .p-floatlabel:has(.p-select.ng-invalid.ng-dirty) label,:host ::ng-deep .p-floatlabel:has(.p-select.ng-invalid.ng-touched) label{color:var(--tk-color-base-red-700, #cf2604)}:host ::ng-deep .p-select-option span{color:var(--tk-color-text-default, #191a1b)!important;display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host ::ng-deep .p-select-option:hover{background-color:var(--tk-primary-100, #b7b0d2)!important}:host ::ng-deep .p-select-option[data-p-highlight=true]{background-color:var(--tk-primary-100, #b7b0d2)!important;color:var(--tk-primary-500, #16006f)!important}:host ::ng-deep .p-select-clear-icon{color:var(--tk-surface-700, #424243)!important}:host ::ng-deep .p-select-option-check-icon{color:transparent}:host ::ng-deep p-message[severity=error] .p-inline-message-text,:host ::ng-deep p-message[severity=error] span{color:var(--tk-color-base-red-700, #cf2604)}:host ::ng-deep p-message[severity=secondary] .p-inline-message-text,:host ::ng-deep p-message[severity=secondary] span{color:var(--tk-color-base-surface-600, #5d5d5e)}:host ::ng-deep .tk-select-bottom{display:flex;justify-content:space-between;align-items:flex-start;margin-top:var(--tk-spacing-base-25, .25rem);min-height:var(--tk-spacing-base-125, 1.25rem)}:host ::ng-deep .tk-select-messages{flex:1;margin-right:var(--tk-spacing-base-100, 1rem)}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "variant", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "size", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "fluid", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: FloatLabelModule }, { kind: "component", type: i2.FloatLabel, selector: "p-floatlabel, p-floatLabel, p-float-label", inputs: ["variant"] }, { kind: "ngmodule", type: MessageModule }, { kind: "component", type: i3.Message, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass", "closable", "icon", "closeIcon", "life", "showTransitionOptions", "hideTransitionOptions", "size", "variant"], outputs: ["onClose"] }, { kind: "ngmodule", type: ReactiveFormsModule }] }); }
204
199
  }
205
200
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: SelectComponent, decorators: [{
206
201
  type: Component,
207
- args: [{ selector: 'tk-select', imports: [FormsModule, Select, FloatLabelModule, MessageModule, ReactiveFormsModule], template: "<p-floatlabel class=\"w-full\">\n <p-select\n [id]=\"id()\"\n class=\"w-full\"\n [options]=\"options()\"\n [optionLabel]=\"optionLabel()\"\n [showClear]=\"showClear()\"\n [disabled]=\"disabled()\"\n [ngModel]=\"value\"\n [class.ng-invalid]=\"effectiveControl?.invalid && (effectiveControl?.dirty || effectiveControl?.touched)\"\n [class.ng-dirty]=\"effectiveControl?.dirty\"\n [class.ng-touched]=\"effectiveControl?.touched\"\n (onChange)=\"handleChange($event)\" />\n <label [for]=\"id()\">{{ label() }}</label>\n</p-floatlabel>\n\n<div class=\"tk-select-bottom\">\n <div class=\"tk-select-messages\">\n @if ((effectiveControl?.invalid && (effectiveControl?.dirty || effectiveControl?.touched)) && errorMessage()) {\n <p-message severity=\"error\" size=\"small\" variant=\"simple\">{{ errorMessage() }}</p-message>\n } @else if (hint()) {\n <p-message severity=\"secondary\" size=\"small\" variant=\"simple\">{{ hint() }}</p-message>\n }\n </div>\n</div>", styles: [":host ::ng-deep .p-select{width:100%;border:none;border-bottom:1px solid var(--tk-color-border-default, #cecdcd);border-radius:0;color:var(--tk-color-text-default, #191a1b);background-color:transparent}:host ::ng-deep .p-select:focus{border-color:var(--tk-color-accent-default, #16006f)}:host ::ng-deep .p-select.ng-invalid.ng-dirty,:host ::ng-deep .p-select.ng-invalid.ng-touched{border-color:var(--tk-color-base-red-700, #cf2604)}:host ::ng-deep .p-select-label{padding:var(--tk-spacing-base-75, 12px) var(--tk-spacing-base-75, 12px) var(--tk-spacing-base-75, 12px) var(--tk-spacing-base-25, 4px)!important}:host ::ng-deep .p-floatlabel .p-inputwrapper-focus~label{color:var(--tk-primary-600, #140065);top:-.688rem}:host ::ng-deep .p-floatlabel:has(.p-inputwrapper-filled) label,:host ::ng-deep .p-floatlabel:has(input.p-filled) label{top:-.75rem;color:var(--tk-color-base-surface-950, #191a1b)}:host ::ng-deep .p-floatlabel label{color:var(--tk-color-base-surface-500, #8a8a8b);font-family:var(--tk-font-family, Poppins, sans-serif);font-weight:var(--tk-font-weight-400, 400);left:var(--tk-spacing-base-25, .25rem);transition-duration:.2s}:host ::ng-deep .p-floatlabel:has(.p-select:focus) label,:host ::ng-deep .p-floatlabel:has(.p-inputwrapper-focus) label{color:var(--tk-color-base-primary-600, #140065);top:-.75rem}:host ::ng-deep .p-floatlabel:has(.p-inputwrapper-filled) label,:host ::ng-deep .p-floatlabel:has(.p-filled) label{top:-.75rem;color:var(--tk-color-base-surface-950, #191a1b)}:host ::ng-deep .p-floatlabel:has(.p-inputwrapper-focus) label{color:var(--tk-color-base-primary-600, #140065)}:host ::ng-deep .p-floatlabel:has(.p-select.ng-invalid.ng-dirty) label,:host ::ng-deep .p-floatlabel:has(.p-select.ng-invalid.ng-touched) label{color:var(--tk-color-base-red-700, #cf2604)}:host ::ng-deep .p-select-option span{color:var(--tk-color-text-default, #191a1b)!important;display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host ::ng-deep .p-select-option:hover{background-color:var(--tk-primary-100, #b7b0d2)!important}:host ::ng-deep .p-select-option[data-p-highlight=true]{background-color:var(--tk-primary-100, #b7b0d2)!important;color:var(--tk-primary-500, #16006f)!important}:host ::ng-deep .p-select-clear-icon{color:var(--tk-surface-700, #424243)!important}:host ::ng-deep .p-select-option-check-icon{color:transparent}:host ::ng-deep p-message[severity=error] .p-inline-message-text,:host ::ng-deep p-message[severity=error] span{color:var(--tk-color-base-red-700, #cf2604)}:host ::ng-deep p-message[severity=secondary] .p-inline-message-text,:host ::ng-deep p-message[severity=secondary] span{color:var(--tk-color-base-surface-600, #5d5d5e)}:host ::ng-deep .tk-select-bottom{display:flex;justify-content:space-between;align-items:flex-start;margin-top:var(--tk-spacing-base-25, .25rem);min-height:var(--tk-spacing-base-125, 1.25rem)}:host ::ng-deep .tk-select-messages{flex:1;margin-right:var(--tk-spacing-base-100, 1rem)}\n"] }]
202
+ args: [{ selector: 'tk-select', imports: [FormsModule, Select, FloatLabelModule, MessageModule, ReactiveFormsModule], template: "<p-floatlabel class=\"w-full\">\n <p-select\n [id]=\"id()\"\n class=\"w-full\"\n [options]=\"options()\"\n [optionLabel]=\"optionLabel()\"\n [showClear]=\"showClear()\"\n [disabled]=\"disabled()\"\n [ngModel]=\"value\"\n [class.ng-invalid]=\"\n effectiveControl?.invalid &&\n (effectiveControl?.dirty || effectiveControl?.touched)\n \"\n [class.ng-dirty]=\"effectiveControl?.dirty\"\n [class.ng-touched]=\"effectiveControl?.touched\"\n (onChange)=\"handleChange($event)\" />\n <label [for]=\"id()\">{{ label() }}</label>\n</p-floatlabel>\n\n<div class=\"tk-select-bottom\">\n <div class=\"tk-select-messages\">\n @if (\n effectiveControl?.invalid &&\n (effectiveControl?.dirty || effectiveControl?.touched) &&\n errorMessage()\n ) {\n <p-message severity=\"error\" size=\"small\" variant=\"simple\">{{\n errorMessage()\n }}</p-message>\n } @else if (hint()) {\n <p-message severity=\"secondary\" size=\"small\" variant=\"simple\">{{\n hint()\n }}</p-message>\n }\n </div>\n</div>\n", styles: [":host ::ng-deep .p-select{width:100%;border:none;border-bottom:1px solid var(--tk-color-border-default, #cecdcd);border-radius:0;color:var(--tk-color-text-default, #191a1b);background-color:transparent}:host ::ng-deep .p-select:focus{border-color:var(--tk-color-accent-default, #16006f)}:host ::ng-deep .p-select.ng-invalid.ng-dirty,:host ::ng-deep .p-select.ng-invalid.ng-touched{border-color:var(--tk-color-base-red-700, #cf2604)}:host ::ng-deep .p-select-label{padding:var(--tk-spacing-base-75, 12px) var(--tk-spacing-base-75, 12px) var(--tk-spacing-base-75, 12px) var(--tk-spacing-base-25, 4px)!important}:host ::ng-deep .p-floatlabel .p-inputwrapper-focus~label{color:var(--tk-primary-600, #140065);top:-.688rem}:host ::ng-deep .p-floatlabel:has(.p-inputwrapper-filled) label,:host ::ng-deep .p-floatlabel:has(input.p-filled) label{top:-.75rem;color:var(--tk-color-base-surface-950, #191a1b)}:host ::ng-deep .p-floatlabel label{color:var(--tk-color-base-surface-500, #8a8a8b);font-family:var(--tk-font-family, Poppins, sans-serif);font-weight:var(--tk-font-weight-400, 400);left:var(--tk-spacing-base-25, .25rem);transition-duration:.2s}:host ::ng-deep .p-floatlabel:has(.p-select:focus) label,:host ::ng-deep .p-floatlabel:has(.p-inputwrapper-focus) label{color:var(--tk-color-base-primary-600, #140065);top:-.75rem}:host ::ng-deep .p-floatlabel:has(.p-inputwrapper-filled) label,:host ::ng-deep .p-floatlabel:has(.p-filled) label{top:-.75rem;color:var(--tk-color-base-surface-950, #191a1b)}:host ::ng-deep .p-floatlabel:has(.p-inputwrapper-focus) label{color:var(--tk-color-base-primary-600, #140065)}:host ::ng-deep .p-floatlabel:has(.p-select.ng-invalid.ng-dirty) label,:host ::ng-deep .p-floatlabel:has(.p-select.ng-invalid.ng-touched) label{color:var(--tk-color-base-red-700, #cf2604)}:host ::ng-deep .p-select-option span{color:var(--tk-color-text-default, #191a1b)!important;display:inline-block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host ::ng-deep .p-select-option:hover{background-color:var(--tk-primary-100, #b7b0d2)!important}:host ::ng-deep .p-select-option[data-p-highlight=true]{background-color:var(--tk-primary-100, #b7b0d2)!important;color:var(--tk-primary-500, #16006f)!important}:host ::ng-deep .p-select-clear-icon{color:var(--tk-surface-700, #424243)!important}:host ::ng-deep .p-select-option-check-icon{color:transparent}:host ::ng-deep p-message[severity=error] .p-inline-message-text,:host ::ng-deep p-message[severity=error] span{color:var(--tk-color-base-red-700, #cf2604)}:host ::ng-deep p-message[severity=secondary] .p-inline-message-text,:host ::ng-deep p-message[severity=secondary] span{color:var(--tk-color-base-surface-600, #5d5d5e)}:host ::ng-deep .tk-select-bottom{display:flex;justify-content:space-between;align-items:flex-start;margin-top:var(--tk-spacing-base-25, .25rem);min-height:var(--tk-spacing-base-125, 1.25rem)}:host ::ng-deep .tk-select-messages{flex:1;margin-right:var(--tk-spacing-base-100, 1rem)}\n"] }]
208
203
  }], ctorParameters: () => [] });
209
204
 
210
205
  /**