@tekus/design-system 5.8.0 → 5.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/autocomplete/src/autocomplete.component.d.ts +52 -2
- package/components/select/src/select.component.d.ts +23 -2
- package/fesm2022/tekus-design-system-components-autocomplete.mjs +73 -7
- package/fesm2022/tekus-design-system-components-autocomplete.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-pagination.mjs +2 -2
- package/fesm2022/tekus-design-system-components-pagination.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-select.mjs +38 -16
- package/fesm2022/tekus-design-system-components-select.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-toolbar.mjs +1 -1
- package/fesm2022/tekus-design-system-components-toolbar.mjs.map +1 -1
- package/package.json +13 -13
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { ControlValueAccessor } from '@angular/forms';
|
|
1
|
+
import { ControlValueAccessor, NgControl, FormControl } from '@angular/forms';
|
|
2
|
+
import { AutoComplete } from 'primeng/autocomplete';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
4
|
type AutocompleteValue<T = unknown> = T | T[] | null;
|
|
4
5
|
export declare class AutocompleteComponent<T = unknown> implements ControlValueAccessor {
|
|
6
|
+
readonly ngControl: NgControl | null;
|
|
5
7
|
/**
|
|
6
8
|
* @property {string} id
|
|
7
9
|
* @description
|
|
@@ -10,6 +12,19 @@ export declare class AutocompleteComponent<T = unknown> implements ControlValueA
|
|
|
10
12
|
* @default 'autocomplete'
|
|
11
13
|
*/
|
|
12
14
|
id: import("@angular/core").InputSignal<string>;
|
|
15
|
+
/**
|
|
16
|
+
* @property {InputSignal<string>} icon
|
|
17
|
+
* @description
|
|
18
|
+
* Icon to display next to the input (e.g., 'magnifying-glass').
|
|
19
|
+
*/
|
|
20
|
+
icon: import("@angular/core").InputSignal<string>;
|
|
21
|
+
/**
|
|
22
|
+
* @property {InputSignal<FormControl>} control
|
|
23
|
+
* @description
|
|
24
|
+
* External FormControl used to read/set the input value.
|
|
25
|
+
* If not provided, an internal FormControl is created.
|
|
26
|
+
*/
|
|
27
|
+
control: import("@angular/core").InputSignal<FormControl<any> | undefined>;
|
|
13
28
|
/**
|
|
14
29
|
* @property {string} label
|
|
15
30
|
* @description
|
|
@@ -24,6 +39,18 @@ export declare class AutocompleteComponent<T = unknown> implements ControlValueA
|
|
|
24
39
|
* @default false
|
|
25
40
|
*/
|
|
26
41
|
disabled: import("@angular/core").InputSignal<boolean>;
|
|
42
|
+
/**
|
|
43
|
+
* @property {InputSignal<string>} errorMessage
|
|
44
|
+
* @description
|
|
45
|
+
* Message to display when the control is invalid and touched.
|
|
46
|
+
*/
|
|
47
|
+
errorMessage: import("@angular/core").InputSignal<string>;
|
|
48
|
+
/**
|
|
49
|
+
* @property {InputSignal<string>} hint
|
|
50
|
+
* @description
|
|
51
|
+
* Hint text to display below the input.
|
|
52
|
+
*/
|
|
53
|
+
hint: import("@angular/core").InputSignal<string>;
|
|
27
54
|
/**
|
|
28
55
|
* @property {AutocompleteValue<T>} value
|
|
29
56
|
* @description
|
|
@@ -90,7 +117,30 @@ export declare class AutocompleteComponent<T = unknown> implements ControlValueA
|
|
|
90
117
|
* @param {AutocompleteValue<T>} value - The new selected value(s).
|
|
91
118
|
*/
|
|
92
119
|
handleChange(value: AutocompleteValue<T>): void;
|
|
120
|
+
/**
|
|
121
|
+
* @property {AutoComplete} autoComplete
|
|
122
|
+
* @description
|
|
123
|
+
* Reference to the underlying PrimeNG AutoComplete component.
|
|
124
|
+
* Used to access the native input element for chip creation on blur.
|
|
125
|
+
*/
|
|
126
|
+
autoComplete: AutoComplete;
|
|
127
|
+
/**
|
|
128
|
+
* @method handleBlur
|
|
129
|
+
* @description
|
|
130
|
+
* Handles the blur event of the autocomplete input.
|
|
131
|
+
* Captures any pending text in the input field and converts it into a chip/value.
|
|
132
|
+
* This ensures that typing text and clicking away behaves similarly to pressing "Enter".
|
|
133
|
+
*/
|
|
134
|
+
handleBlur(): void;
|
|
135
|
+
/**
|
|
136
|
+
* @method effectiveControl
|
|
137
|
+
* @description
|
|
138
|
+
* Gets the active FormControl for the component.
|
|
139
|
+
* Returns the injected NgControl's control if available, otherwise falls back to the local `control` input.
|
|
140
|
+
* This getter is crucial for unifying validation status checks in the template.
|
|
141
|
+
*/
|
|
142
|
+
get effectiveControl(): FormControl<any>;
|
|
93
143
|
static ɵfac: i0.ɵɵFactoryDeclaration<AutocompleteComponent<any>, never>;
|
|
94
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<AutocompleteComponent<any>, "tk-autocomplete", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "model": { "alias": "model"; "required": false; "isSignal": true; }; }, { "model": "modelChange"; "modelChange": "modelChange"; }, never, never, true, never>;
|
|
144
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AutocompleteComponent<any>, "tk-autocomplete", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "control": { "alias": "control"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "model": { "alias": "model"; "required": false; "isSignal": true; }; }, { "model": "modelChange"; "modelChange": "modelChange"; }, never, never, true, never>;
|
|
95
145
|
}
|
|
96
146
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { ControlValueAccessor } from '@angular/forms';
|
|
1
|
+
import { ControlValueAccessor, NgControl, FormControl } from '@angular/forms';
|
|
2
2
|
import * as i0 from "@angular/core";
|
|
3
3
|
export declare class SelectComponent<T = unknown> implements ControlValueAccessor {
|
|
4
|
+
readonly ngControl: NgControl | null;
|
|
4
5
|
/**
|
|
5
6
|
* @property {string} id
|
|
6
7
|
* @description
|
|
@@ -9,6 +10,13 @@ export declare class SelectComponent<T = unknown> implements ControlValueAccesso
|
|
|
9
10
|
* @default 'select'
|
|
10
11
|
*/
|
|
11
12
|
id: import("@angular/core").InputSignal<string>;
|
|
13
|
+
/**
|
|
14
|
+
* @property {InputSignal<FormControl>} control
|
|
15
|
+
* @description
|
|
16
|
+
* External FormControl used to read/set the input value.
|
|
17
|
+
* If not provided, an internal FormControl is created.
|
|
18
|
+
*/
|
|
19
|
+
control: import("@angular/core").InputSignal<FormControl<any> | undefined>;
|
|
12
20
|
/**
|
|
13
21
|
* @property {T[]} options
|
|
14
22
|
* @description
|
|
@@ -54,6 +62,18 @@ export declare class SelectComponent<T = unknown> implements ControlValueAccesso
|
|
|
54
62
|
*/
|
|
55
63
|
disabled: import("@angular/core").InputSignal<boolean>;
|
|
56
64
|
internalDisabled: import("@angular/core").WritableSignal<boolean>;
|
|
65
|
+
/**
|
|
66
|
+
* @property {InputSignal<string>} errorMessage
|
|
67
|
+
* @description
|
|
68
|
+
* Message to display when the control is invalid and touched.
|
|
69
|
+
*/
|
|
70
|
+
errorMessage: import("@angular/core").InputSignal<string>;
|
|
71
|
+
/**
|
|
72
|
+
* @property {InputSignal<string>} hint
|
|
73
|
+
* @description
|
|
74
|
+
* Hint text to display below the input.
|
|
75
|
+
*/
|
|
76
|
+
hint: import("@angular/core").InputSignal<string>;
|
|
57
77
|
/**
|
|
58
78
|
* @property {Signal<T | null>} model
|
|
59
79
|
* @description
|
|
@@ -113,6 +133,7 @@ export declare class SelectComponent<T = unknown> implements ControlValueAccesso
|
|
|
113
133
|
handleChange(event: {
|
|
114
134
|
value: T | null;
|
|
115
135
|
}): void;
|
|
136
|
+
get effectiveControl(): FormControl<any>;
|
|
116
137
|
static ɵfac: i0.ɵɵFactoryDeclaration<SelectComponent<any>, never>;
|
|
117
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SelectComponent<any>, "tk-select", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "optionLabel": { "alias": "optionLabel"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "showClear": { "alias": "showClear"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "model": { "alias": "model"; "required": false; "isSignal": true; }; }, { "model": "modelChange"; "modelChange": "modelChange"; }, never, never, true, never>;
|
|
138
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SelectComponent<any>, "tk-select", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "control": { "alias": "control"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "optionLabel": { "alias": "optionLabel"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "showClear": { "alias": "showClear"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "model": { "alias": "model"; "required": false; "isSignal": true; }; }, { "model": "modelChange"; "modelChange": "modelChange"; }, never, never, true, never>;
|
|
118
139
|
}
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, signal, model, output, effect, forwardRef, Component } from '@angular/core';
|
|
2
|
+
import { inject, input, signal, model, output, effect, forwardRef, ViewChild, Component } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/forms';
|
|
4
|
-
import { FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
4
|
+
import { NgControl, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
5
5
|
import * as i2 from 'primeng/floatlabel';
|
|
6
6
|
import { FloatLabelModule } from 'primeng/floatlabel';
|
|
7
7
|
import { AutoComplete } from 'primeng/autocomplete';
|
|
8
|
+
import * as i3 from 'primeng/message';
|
|
9
|
+
import { MessageModule } from 'primeng/message';
|
|
10
|
+
import { IconComponent } from '@tekus/design-system/components/icon';
|
|
8
11
|
|
|
9
12
|
class AutocompleteComponent {
|
|
10
13
|
constructor() {
|
|
14
|
+
this.ngControl = inject(NgControl, { self: true, optional: true });
|
|
11
15
|
/**
|
|
12
16
|
* @property {string} id
|
|
13
17
|
* @description
|
|
@@ -16,6 +20,19 @@ class AutocompleteComponent {
|
|
|
16
20
|
* @default 'autocomplete'
|
|
17
21
|
*/
|
|
18
22
|
this.id = input('autocomplete');
|
|
23
|
+
/**
|
|
24
|
+
* @property {InputSignal<string>} icon
|
|
25
|
+
* @description
|
|
26
|
+
* Icon to display next to the input (e.g., 'magnifying-glass').
|
|
27
|
+
*/
|
|
28
|
+
this.icon = input('');
|
|
29
|
+
/**
|
|
30
|
+
* @property {InputSignal<FormControl>} control
|
|
31
|
+
* @description
|
|
32
|
+
* External FormControl used to read/set the input value.
|
|
33
|
+
* If not provided, an internal FormControl is created.
|
|
34
|
+
*/
|
|
35
|
+
this.control = input();
|
|
19
36
|
/**
|
|
20
37
|
* @property {string} label
|
|
21
38
|
* @description
|
|
@@ -30,6 +47,18 @@ class AutocompleteComponent {
|
|
|
30
47
|
* @default false
|
|
31
48
|
*/
|
|
32
49
|
this.disabled = input(false);
|
|
50
|
+
/**
|
|
51
|
+
* @property {InputSignal<string>} errorMessage
|
|
52
|
+
* @description
|
|
53
|
+
* Message to display when the control is invalid and touched.
|
|
54
|
+
*/
|
|
55
|
+
this.errorMessage = input('');
|
|
56
|
+
/**
|
|
57
|
+
* @property {InputSignal<string>} hint
|
|
58
|
+
* @description
|
|
59
|
+
* Hint text to display below the input.
|
|
60
|
+
*/
|
|
61
|
+
this.hint = input('');
|
|
33
62
|
/**
|
|
34
63
|
* @property {AutocompleteValue<T>} value
|
|
35
64
|
* @description
|
|
@@ -61,6 +90,9 @@ class AutocompleteComponent {
|
|
|
61
90
|
// -----------------------------------
|
|
62
91
|
this.onChangeFn = () => { };
|
|
63
92
|
this.onTouchedFn = () => { };
|
|
93
|
+
if (this.ngControl) {
|
|
94
|
+
this.ngControl.valueAccessor = this;
|
|
95
|
+
}
|
|
64
96
|
/**
|
|
65
97
|
* disabled → internalDisabled
|
|
66
98
|
*/
|
|
@@ -128,26 +160,60 @@ class AutocompleteComponent {
|
|
|
128
160
|
this.onTouchedFn();
|
|
129
161
|
this.model.set(value);
|
|
130
162
|
this.modelChange.emit(value);
|
|
163
|
+
this.effectiveControl?.setValue(value);
|
|
164
|
+
this.effectiveControl?.markAsDirty();
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* @method handleBlur
|
|
168
|
+
* @description
|
|
169
|
+
* Handles the blur event of the autocomplete input.
|
|
170
|
+
* Captures any pending text in the input field and converts it into a chip/value.
|
|
171
|
+
* This ensures that typing text and clicking away behaves similarly to pressing "Enter".
|
|
172
|
+
*/
|
|
173
|
+
handleBlur() {
|
|
174
|
+
if (this.autoComplete?.inputEL) {
|
|
175
|
+
const inputValue = this.autoComplete.inputEL.nativeElement.value;
|
|
176
|
+
if (inputValue && inputValue.trim() !== '') {
|
|
177
|
+
const newValue = inputValue.trim();
|
|
178
|
+
const currentValues = Array.isArray(this.value) ? [...this.value] : [];
|
|
179
|
+
currentValues.push(newValue);
|
|
180
|
+
this.handleChange(currentValues);
|
|
181
|
+
this.autoComplete.inputEL.nativeElement.value = '';
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* @method effectiveControl
|
|
187
|
+
* @description
|
|
188
|
+
* Gets the active FormControl for the component.
|
|
189
|
+
* Returns the injected NgControl's control if available, otherwise falls back to the local `control` input.
|
|
190
|
+
* This getter is crucial for unifying validation status checks in the template.
|
|
191
|
+
*/
|
|
192
|
+
get effectiveControl() {
|
|
193
|
+
return this.ngControl?.control || this.control();
|
|
131
194
|
}
|
|
132
195
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: AutocompleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
133
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.
|
|
196
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: AutocompleteComponent, isStandalone: true, selector: "tk-autocomplete", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, control: { classPropertyName: "control", publicName: "control", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", 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" }, providers: [
|
|
134
197
|
{
|
|
135
198
|
provide: NG_VALUE_ACCESSOR,
|
|
136
199
|
useExisting: forwardRef(() => AutocompleteComponent),
|
|
137
200
|
multi: true,
|
|
138
201
|
},
|
|
139
|
-
], ngImport: i0, template: "<p-floatlabel class=\"w-full\">\n <
|
|
202
|
+
], viewQueries: [{ propertyName: "autoComplete", first: true, predicate: AutoComplete, descendants: true }], ngImport: i0, template: "<p-floatlabel class=\"w-full\">\n <div class=\"tk-autocomplete-wrapper\">\n @if (icon()) {\n <tk-icon [icon]=\"icon()\" class=\"tk-autocomplete-icon\"></tk-icon>\n }\n <p-autocomplete\n [ngModel]=\"value\"\n (ngModelChange)=\"handleChange($event)\"\n [disabled]=\"disabled()\"\n [inputId]=\"id()\"\n [typeahead]=\"false\"\n multiple\n fluid\n (onBlur)=\"handleBlur()\"\n [class.ng-invalid]=\"effectiveControl?.invalid && (effectiveControl?.dirty || effectiveControl?.touched)\"\n [class.ng-dirty]=\"effectiveControl?.dirty\"\n [class.ng-touched]=\"effectiveControl?.touched\" />\n <label [for]=\"id()\">{{ label() }}</label>\n </div>\n</p-floatlabel>\n\n<div class=\"tk-autocomplete-bottom\">\n <div class=\"tk-autocomplete-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>\n", styles: [":host ::ng-deep .p-autocomplete-input-multiple{width:100%;border:none;border-bottom:1px solid var(--tk-color-border-default, #cecdcd);border-radius:0;background-color:transparent}:host ::ng-deep .p-autocomplete-input-multiple:focus{border-color:var(--tk-color-base-primary-600, #140065)}:host ::ng-deep p-autocomplete{flex:1;width:100%}:host ::ng-deep .tk-autocomplete-wrapper:has(.tk-autocomplete-icon) .p-autocomplete-input-multiple{padding-left:var(--tk-spacing-base-200, 2rem)}:host ::ng-deep p-autocomplete.ng-invalid.ng-dirty .p-autocomplete-input-multiple,:host ::ng-deep p-autocomplete.ng-invalid.ng-touched .p-autocomplete-input-multiple{border-color:var(--tk-color-base-red-700, #cf2604)}: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-color-base-surface-500, #8a8a8b);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-floatlabel .tk-autocomplete-wrapper:has(.tk-autocomplete-icon) label{left:var(--tk-spacing-base-200, 2rem)}:host ::ng-deep .p-floatlabel:has(p-autocomplete.ng-invalid.ng-dirty) label,:host ::ng-deep .p-floatlabel:has(p-autocomplete.ng-invalid.ng-touched) label{color:var(--tk-color-base-red-700, #cf2604)!important}:host ::ng-deep .p-autocomplete-chip-icon{display:flex;color:var(--tk-surface-700, #424243)}:host ::ng-deep .p-autocomplete-chip{border-radius:var(--tk-borderRadius-full, 999px)!important;color:var(--tk-surface-700, #424243)}:host ::ng-deep .p-chip-label{display:inline-block;max-width:10ch;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host ::ng-deep .p-autocomplete-input-multiple-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}: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-autocomplete-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-autocomplete-messages{flex:1;margin-right:var(--tk-spacing-base-100, 1rem)}:host ::ng-deep .tk-autocomplete-wrapper{position:relative;display:flex;align-items:center;width:100%}:host ::ng-deep .tk-autocomplete-icon{position:absolute;left:0;top:50%;transform:translateY(-50%)}\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: AutoComplete, selector: "p-autoComplete, p-autocomplete, p-auto-complete", inputs: ["minLength", "delay", "style", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "disabled", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "maxlength", "name", "required", "size", "appendTo", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "field", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "overlayOptions", "suggestions", "itemSize", "optionLabel", "optionValue", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover", "typeahead", "variant", "fluid"], outputs: ["completeMethod", "onSelect", "onUnselect", "onFocus", "onBlur", "onDropdownClick", "onClear", "onKeyUp", "onShow", "onHide", "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: "component", type: IconComponent, selector: "tk-icon", inputs: ["icon", "styleIcon", "color", "size", "disabled"], outputs: ["iconChange", "styleIconChange", "colorChange", "sizeChange", "disabledChange"] }] }); }
|
|
140
203
|
}
|
|
141
204
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: AutocompleteComponent, decorators: [{
|
|
142
205
|
type: Component,
|
|
143
|
-
args: [{ selector: 'tk-autocomplete', standalone: true, imports: [FormsModule, AutoComplete, FloatLabelModule], providers: [
|
|
206
|
+
args: [{ selector: 'tk-autocomplete', standalone: true, imports: [FormsModule, AutoComplete, FloatLabelModule, MessageModule, IconComponent], providers: [
|
|
144
207
|
{
|
|
145
208
|
provide: NG_VALUE_ACCESSOR,
|
|
146
209
|
useExisting: forwardRef(() => AutocompleteComponent),
|
|
147
210
|
multi: true,
|
|
148
211
|
},
|
|
149
|
-
], template: "<p-floatlabel class=\"w-full\">\n <
|
|
150
|
-
}], ctorParameters: () => []
|
|
212
|
+
], template: "<p-floatlabel class=\"w-full\">\n <div class=\"tk-autocomplete-wrapper\">\n @if (icon()) {\n <tk-icon [icon]=\"icon()\" class=\"tk-autocomplete-icon\"></tk-icon>\n }\n <p-autocomplete\n [ngModel]=\"value\"\n (ngModelChange)=\"handleChange($event)\"\n [disabled]=\"disabled()\"\n [inputId]=\"id()\"\n [typeahead]=\"false\"\n multiple\n fluid\n (onBlur)=\"handleBlur()\"\n [class.ng-invalid]=\"effectiveControl?.invalid && (effectiveControl?.dirty || effectiveControl?.touched)\"\n [class.ng-dirty]=\"effectiveControl?.dirty\"\n [class.ng-touched]=\"effectiveControl?.touched\" />\n <label [for]=\"id()\">{{ label() }}</label>\n </div>\n</p-floatlabel>\n\n<div class=\"tk-autocomplete-bottom\">\n <div class=\"tk-autocomplete-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>\n", styles: [":host ::ng-deep .p-autocomplete-input-multiple{width:100%;border:none;border-bottom:1px solid var(--tk-color-border-default, #cecdcd);border-radius:0;background-color:transparent}:host ::ng-deep .p-autocomplete-input-multiple:focus{border-color:var(--tk-color-base-primary-600, #140065)}:host ::ng-deep p-autocomplete{flex:1;width:100%}:host ::ng-deep .tk-autocomplete-wrapper:has(.tk-autocomplete-icon) .p-autocomplete-input-multiple{padding-left:var(--tk-spacing-base-200, 2rem)}:host ::ng-deep p-autocomplete.ng-invalid.ng-dirty .p-autocomplete-input-multiple,:host ::ng-deep p-autocomplete.ng-invalid.ng-touched .p-autocomplete-input-multiple{border-color:var(--tk-color-base-red-700, #cf2604)}: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-color-base-surface-500, #8a8a8b);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-floatlabel .tk-autocomplete-wrapper:has(.tk-autocomplete-icon) label{left:var(--tk-spacing-base-200, 2rem)}:host ::ng-deep .p-floatlabel:has(p-autocomplete.ng-invalid.ng-dirty) label,:host ::ng-deep .p-floatlabel:has(p-autocomplete.ng-invalid.ng-touched) label{color:var(--tk-color-base-red-700, #cf2604)!important}:host ::ng-deep .p-autocomplete-chip-icon{display:flex;color:var(--tk-surface-700, #424243)}:host ::ng-deep .p-autocomplete-chip{border-radius:var(--tk-borderRadius-full, 999px)!important;color:var(--tk-surface-700, #424243)}:host ::ng-deep .p-chip-label{display:inline-block;max-width:10ch;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host ::ng-deep .p-autocomplete-input-multiple-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}: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-autocomplete-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-autocomplete-messages{flex:1;margin-right:var(--tk-spacing-base-100, 1rem)}:host ::ng-deep .tk-autocomplete-wrapper{position:relative;display:flex;align-items:center;width:100%}:host ::ng-deep .tk-autocomplete-icon{position:absolute;left:0;top:50%;transform:translateY(-50%)}\n"] }]
|
|
213
|
+
}], ctorParameters: () => [], propDecorators: { autoComplete: [{
|
|
214
|
+
type: ViewChild,
|
|
215
|
+
args: [AutoComplete]
|
|
216
|
+
}] } });
|
|
151
217
|
|
|
152
218
|
/**
|
|
153
219
|
* Generated bundle index. Do not edit.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tekus-design-system-components-autocomplete.mjs","sources":["../../../projects/design-system/components/autocomplete/src/autocomplete.component.ts","../../../projects/design-system/components/autocomplete/src/autocomplete.component.html","../../../projects/design-system/components/autocomplete/tekus-design-system-components-autocomplete.ts"],"sourcesContent":["import {\n Component,\n effect,\n model,\n forwardRef,\n input,\n output,\n signal,\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n NG_VALUE_ACCESSOR,\n FormsModule,\n} from '@angular/forms';\nimport { FloatLabelModule } from 'primeng/floatlabel';\nimport { AutoComplete } from 'primeng/autocomplete';\n\ntype AutocompleteValue<T = unknown> = T | T[] | null;\n\n@Component({\n selector: 'tk-autocomplete',\n standalone: true,\n imports: [FormsModule, AutoComplete, FloatLabelModule],\n templateUrl: './autocomplete.component.html',\n styleUrl: './autocomplete.component.scss',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AutocompleteComponent),\n multi: true,\n },\n ],\n})\nexport class AutocompleteComponent<T = unknown>\n implements ControlValueAccessor\n{\n /**\n * @property {string} id\n * @description\n * HTML id attribute for the autocomplete input.\n *\n * @default 'autocomplete'\n */\n id = input<string>('autocomplete');\n\n /**\n * @property {string} label\n * @description\n * Floating label displayed above the autocomplete input.\n */\n label = input<string>('');\n\n /**\n * @property {boolean} disabled\n * @description\n * Determines whether the autocomplete field is disabled.\n *\n * @default false\n */\n disabled = input<boolean>(false);\n\n /**\n * @property {AutocompleteValue<T>} value\n * @description\n * Internal selected value. Synced with Angular forms and the model signal.\n *\n * @internal\n */\n value: AutocompleteValue<T> = null;\n\n internalDisabled = signal(false);\n\n /**\n * @property {Signal<AutocompleteValue<T>>} model\n * @description\n * Two-way binding model using Angular signals.\n * Allows usage with the syntax: `[(model)]=\"myValue\"`.\n */\n model = model<AutocompleteValue<T>>();\n\n /**\n * @event modelChange\n * @description\n * Emits whenever the value changes.\n * Payload: the selected item(s) of type `AutocompleteValue<T>`.\n *\n * @example\n * <tk-autocomplete (modelChange)=\"onChange($event)\"></tk-autocomplete>\n */\n modelChange = output<AutocompleteValue<T>>();\n\n // -----------------------------------\n // CVA CALLBACKS\n // -----------------------------------\n\n private onChangeFn: (value: AutocompleteValue<T>) => void = () => {};\n private onTouchedFn = () => {};\n\n constructor() {\n /**\n * disabled → internalDisabled\n */\n effect(() => {\n this.internalDisabled.set(this.disabled());\n });\n\n /**\n * model → internal value + forms\n */\n effect(() => {\n const v = this.model();\n if (v !== this.value) {\n this.value = v ?? null;\n this.onChangeFn(this.value);\n }\n });\n }\n\n /**\n * @method writeValue\n * @description\n * Receives value updates from Angular Forms and writes them into the component.\n *\n * @param {AutocompleteValue<T>} value - New value from the forms API.\n */\n writeValue(value: AutocompleteValue<T>): void {\n this.model.set(value);\n }\n\n /**\n * @method registerOnChange\n * @description\n * Registers a callback that is invoked when the component's value changes.\n */\n registerOnChange(fn: (value: AutocompleteValue<T>) => void): void {\n this.onChangeFn = fn;\n }\n\n /**\n * @method registerOnTouched\n * @description\n * Registers a callback invoked when the component is touched.\n */\n registerOnTouched(fn: () => void): void {\n this.onTouchedFn = fn;\n }\n\n /**\n * @method setDisabledState\n * @description\n * Updates the disabled state of the autocomplete control.\n *\n * @param {boolean} isDisabled - Whether the component should be disabled.\n */\n setDisabledState(isDisabled: boolean): void {\n this.internalDisabled.set(isDisabled);\n }\n\n /**\n * @method handleChange\n * @description\n * Handles value changes from the autocomplete component.\n * Updates Angular Forms, Signals, and emits the modelChange event.\n *\n * @param {AutocompleteValue<T>} value - The new selected value(s).\n */\n handleChange(value: AutocompleteValue<T>) {\n this.value = value;\n this.onChangeFn(value);\n this.onTouchedFn();\n this.model.set(value);\n this.modelChange.emit(value);\n }\n}\n","<p-floatlabel class=\"w-full\">\n <p-autocomplete\n [ngModel]=\"value\"\n (ngModelChange)=\"handleChange($event)\"\n [disabled]=\"disabled()\"\n [inputId]=\"id()\"\n [typeahead]=\"false\"\n multiple\n fluid />\n <label [for]=\"id()\">{{ label() }}</label>\n</p-floatlabel>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAiCa,qBAAqB,CAAA;AAiEhC,IAAA,WAAA,GAAA;AA9DA;;;;;;AAMG;AACH,QAAA,IAAA,CAAA,EAAE,GAAG,KAAK,CAAS,cAAc,CAAC;AAElC;;;;AAIG;AACH,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAS,EAAE,CAAC;AAEzB;;;;;;AAMG;AACH,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,CAAC;AAEhC;;;;;;AAMG;QACH,IAAK,CAAA,KAAA,GAAyB,IAAI;AAElC,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,KAAK,CAAC;AAEhC;;;;;AAKG;QACH,IAAK,CAAA,KAAA,GAAG,KAAK,EAAwB;AAErC;;;;;;;;AAQG;QACH,IAAW,CAAA,WAAA,GAAG,MAAM,EAAwB;;;;AAMpC,QAAA,IAAA,CAAA,UAAU,GAA0C,MAAK,GAAG;AAC5D,QAAA,IAAA,CAAA,WAAW,GAAG,MAAK,GAAG;AAG5B;;AAEG;QACH,MAAM,CAAC,MAAK;YACV,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,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AA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,qDAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,SAAA,EAAA,gBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,YAAY,stCAAE,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;;4FAW1C,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAdjC,SAAS;+BACE,iBAAiB,EAAA,UAAA,EACf,IAAI,EAAA,OAAA,EACP,CAAC,WAAW,EAAE,YAAY,EAAE,gBAAgB,CAAC,EAG3C,SAAA,EAAA;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,2BAA2B,CAAC;AACpD,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACF,qBAAA,EAAA,QAAA,EAAA,2SAAA,EAAA,MAAA,EAAA,CAAA,+uCAAA,CAAA,EAAA;;;AE/BH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"tekus-design-system-components-autocomplete.mjs","sources":["../../../projects/design-system/components/autocomplete/src/autocomplete.component.ts","../../../projects/design-system/components/autocomplete/src/autocomplete.component.html","../../../projects/design-system/components/autocomplete/tekus-design-system-components-autocomplete.ts"],"sourcesContent":["import {\n Component,\n effect,\n model,\n forwardRef,\n input,\n output,\n signal,\n inject,\n ViewChild,\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n NG_VALUE_ACCESSOR,\n FormsModule, \n NgControl, \n FormControl \n} from '@angular/forms';\nimport { FloatLabelModule } from 'primeng/floatlabel';\nimport { AutoComplete } from 'primeng/autocomplete';\nimport { MessageModule } from 'primeng/message';\nimport { IconComponent } from '@tekus/design-system/components/icon';\ntype AutocompleteValue<T = unknown> = T | T[] | null;\n\n@Component({\n selector: 'tk-autocomplete',\n standalone: true,\n imports: [FormsModule, AutoComplete, FloatLabelModule, MessageModule, IconComponent],\n templateUrl: './autocomplete.component.html',\n styleUrl: './autocomplete.component.scss',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => AutocompleteComponent),\n multi: true,\n },\n ],\n})\nexport class AutocompleteComponent<T = unknown>\n implements ControlValueAccessor\n{\n readonly ngControl = inject(NgControl, { self: true, optional: true });\n /**\n * @property {string} id\n * @description\n * HTML id attribute for the autocomplete input.\n *\n * @default 'autocomplete'\n */\n id = input<string>('autocomplete');\n\n /**\n * @property {InputSignal<string>} icon\n * @description\n * Icon to display next to the input (e.g., 'magnifying-glass').\n */\n icon = input<string>('');\n\n /**\n * @property {InputSignal<FormControl>} control\n * @description\n * External FormControl used to read/set the input value.\n * If not provided, an internal FormControl is created.\n */\n control = input<FormControl>();\n\n /**\n * @property {string} label\n * @description\n * Floating label displayed above the autocomplete input.\n */\n label = input<string>('');\n\n /**\n * @property {boolean} disabled\n * @description\n * Determines whether the autocomplete field is disabled.\n *\n * @default false\n */\n disabled = input<boolean>(false);\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 * @property {AutocompleteValue<T>} value\n * @description\n * Internal selected value. Synced with Angular forms and the model signal.\n *\n * @internal\n */\n value: AutocompleteValue<T> = null;\n\n internalDisabled = signal(false);\n\n /**\n * @property {Signal<AutocompleteValue<T>>} model\n * @description\n * Two-way binding model using Angular signals.\n * Allows usage with the syntax: `[(model)]=\"myValue\"`.\n */\n model = model<AutocompleteValue<T>>();\n\n /**\n * @event modelChange\n * @description\n * Emits whenever the value changes.\n * Payload: the selected item(s) of type `AutocompleteValue<T>`.\n *\n * @example\n * <tk-autocomplete (modelChange)=\"onChange($event)\"></tk-autocomplete>\n */\n modelChange = output<AutocompleteValue<T>>();\n\n // -----------------------------------\n // CVA CALLBACKS\n // -----------------------------------\n\n private onChangeFn: (value: AutocompleteValue<T>) => void = () => {};\n private onTouchedFn = () => {};\n\n constructor() {\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n /**\n * disabled → internalDisabled\n */\n effect(() => {\n this.internalDisabled.set(this.disabled());\n });\n\n /**\n * model → internal value + forms\n */\n effect(() => {\n const v = this.model();\n if (v !== this.value) {\n this.value = v ?? null;\n this.onChangeFn(this.value);\n }\n });\n }\n\n /**\n * @method writeValue\n * @description\n * Receives value updates from Angular Forms and writes them into the component.\n *\n * @param {AutocompleteValue<T>} value - New value from the forms API.\n */\n writeValue(value: AutocompleteValue<T>): void {\n this.model.set(value);\n }\n\n /**\n * @method registerOnChange\n * @description\n * Registers a callback that is invoked when the component's value changes.\n */\n registerOnChange(fn: (value: AutocompleteValue<T>) => void): void {\n this.onChangeFn = fn;\n }\n\n /**\n * @method registerOnTouched\n * @description\n * Registers a callback invoked when the component is touched.\n */\n registerOnTouched(fn: () => void): void {\n this.onTouchedFn = fn;\n }\n\n /**\n * @method setDisabledState\n * @description\n * Updates the disabled state of the autocomplete control.\n *\n * @param {boolean} isDisabled - Whether the component should be disabled.\n */\n setDisabledState(isDisabled: boolean): void {\n this.internalDisabled.set(isDisabled);\n }\n\n /**\n * @method handleChange\n * @description\n * Handles value changes from the autocomplete component.\n * Updates Angular Forms, Signals, and emits the modelChange event.\n *\n * @param {AutocompleteValue<T>} value - The new selected value(s).\n */\n handleChange(value: AutocompleteValue<T>) {\n this.value = value;\n this.onChangeFn(value);\n this.onTouchedFn();\n this.model.set(value);\n this.modelChange.emit(value);\n this.effectiveControl?.setValue(value);\n this.effectiveControl?.markAsDirty();\n }\n\n /**\n * @property {AutoComplete} autoComplete\n * @description\n * Reference to the underlying PrimeNG AutoComplete component.\n * Used to access the native input element for chip creation on blur.\n */\n @ViewChild(AutoComplete) autoComplete!: AutoComplete;\n\n /**\n * @method handleBlur\n * @description\n * Handles the blur event of the autocomplete input.\n * Captures any pending text in the input field and converts it into a chip/value.\n * This ensures that typing text and clicking away behaves similarly to pressing \"Enter\".\n */\n handleBlur() {\n if (this.autoComplete?.inputEL) {\n const inputValue = this.autoComplete.inputEL.nativeElement.value;\n if (inputValue && inputValue.trim() !== '') {\n const newValue = inputValue.trim();\n const currentValues = Array.isArray(this.value) ? [...this.value] : [];\n currentValues.push(newValue);\n \n this.handleChange(currentValues as unknown as AutocompleteValue<T>);\n\n this.autoComplete.inputEL.nativeElement.value = '';\n }\n }\n }\n\n /**\n * @method effectiveControl\n * @description\n * Gets the active FormControl for the component.\n * Returns the injected NgControl's control if available, otherwise falls back to the local `control` input.\n * This getter is crucial for unifying validation status checks in the template.\n */\n get effectiveControl() {\n return (this.ngControl?.control as FormControl) || this.control();\n }\n}\n","<p-floatlabel class=\"w-full\">\n <div class=\"tk-autocomplete-wrapper\">\n @if (icon()) {\n <tk-icon [icon]=\"icon()\" class=\"tk-autocomplete-icon\"></tk-icon>\n }\n <p-autocomplete\n [ngModel]=\"value\"\n (ngModelChange)=\"handleChange($event)\"\n [disabled]=\"disabled()\"\n [inputId]=\"id()\"\n [typeahead]=\"false\"\n multiple\n fluid\n (onBlur)=\"handleBlur()\"\n [class.ng-invalid]=\"effectiveControl?.invalid && (effectiveControl?.dirty || effectiveControl?.touched)\"\n [class.ng-dirty]=\"effectiveControl?.dirty\"\n [class.ng-touched]=\"effectiveControl?.touched\" />\n <label [for]=\"id()\">{{ label() }}</label>\n </div>\n</p-floatlabel>\n\n<div class=\"tk-autocomplete-bottom\">\n <div class=\"tk-autocomplete-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>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;MAsCa,qBAAqB,CAAA;AA+FhC,IAAA,WAAA,GAAA;AA5FS,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AACtE;;;;;;AAMG;AACH,QAAA,IAAA,CAAA,EAAE,GAAG,KAAK,CAAS,cAAc,CAAC;AAElC;;;;AAIG;AACH,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAS,EAAE,CAAC;AAExB;;;;;AAKG;QACH,IAAO,CAAA,OAAA,GAAG,KAAK,EAAe;AAE9B;;;;AAIG;AACH,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAS,EAAE,CAAC;AAEzB;;;;;;AAMG;AACH,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,CAAC;AAE/B;;;;AAIE;AACH,QAAA,IAAA,CAAA,YAAY,GAAG,KAAK,CAAS,EAAE,CAAC;AAEhC;;;;AAIG;AACH,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAS,EAAE,CAAC;AAExB;;;;;;AAMG;QACH,IAAK,CAAA,KAAA,GAAyB,IAAI;AAElC,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,KAAK,CAAC;AAEhC;;;;;AAKG;QACH,IAAK,CAAA,KAAA,GAAG,KAAK,EAAwB;AAErC;;;;;;;;AAQG;QACH,IAAW,CAAA,WAAA,GAAG,MAAM,EAAwB;;;;AAMpC,QAAA,IAAA,CAAA,UAAU,GAA0C,MAAK,GAAG;AAC5D,QAAA,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,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,aAAa,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,WAAA,EAAA,OAAA,EAAA,MAAA,EAAA,UAAA,CAAA,EAAA,OAAA,EAAA,CAAA,YAAA,EAAA,iBAAA,EAAA,aAAA,EAAA,YAAA,EAAA,gBAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAWxE,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAdjC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,EACf,UAAA,EAAA,IAAI,EACP,OAAA,EAAA,CAAC,WAAW,EAAE,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,aAAa,CAAC,EAGzE,SAAA,EAAA;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,2BAA2B,CAAC;AACpD,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACF,qBAAA,EAAA,QAAA,EAAA,mqCAAA,EAAA,MAAA,EAAA,CAAA,2wFAAA,CAAA,EAAA;wDAwLwB,YAAY,EAAA,CAAA;sBAApC,SAAS;uBAAC,YAAY;;;AE5NzB;;AAEG;;;;"}
|
|
@@ -147,11 +147,11 @@ class PaginationComponent {
|
|
|
147
147
|
});
|
|
148
148
|
}
|
|
149
149
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: PaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
150
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.15", type: PaginationComponent, isStandalone: true, selector: "tk-pagination", inputs: { hidden: { classPropertyName: "hidden", publicName: "hidden", isSignal: true, isRequired: false, transformFunction: null }, pageIndex: { classPropertyName: "pageIndex", publicName: "pageIndex", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, length: { classPropertyName: "length", publicName: "length", isSignal: true, isRequired: true, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pageChange: "pageChange" }, ngImport: i0, template: "<div class=\"pagination\" [class.hidden]=\"hidden()\">\n <div class=\"flex items-center\">\n <span class=\"mx-1 pagination__caption\">Items per page: </span>\n <p-select\n [options]=\"options()\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [ngModel]=\"pageSizeInternal()\"\n (ngModelChange)=\"onPageSizeChange($event)\" />\n </div>\n <p-paginator\n [first]=\"pageIndexInternal()\"\n [rows]=\"pageSizeInternal()\"\n [totalRecords]=\"length()\"\n (onPageChange)=\"onPageChange($event)\"\n [showCurrentPageReport]=\"true\"\n currentPageReportTemplate=\"{first} - {last} of {totalRecords}\"\n [showPageLinks]=\"false\"\n [showFirstLastIcon]=\"false\"></p-paginator>\n</div>\n", styles: [".pagination{display:flex;flex-direction:row;justify-content:
|
|
150
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.15", type: PaginationComponent, isStandalone: true, selector: "tk-pagination", inputs: { hidden: { classPropertyName: "hidden", publicName: "hidden", isSignal: true, isRequired: false, transformFunction: null }, pageIndex: { classPropertyName: "pageIndex", publicName: "pageIndex", isSignal: true, isRequired: false, transformFunction: null }, pageSize: { classPropertyName: "pageSize", publicName: "pageSize", isSignal: true, isRequired: false, transformFunction: null }, length: { classPropertyName: "length", publicName: "length", isSignal: true, isRequired: true, transformFunction: null }, pageSizeOptions: { classPropertyName: "pageSizeOptions", publicName: "pageSizeOptions", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pageChange: "pageChange" }, ngImport: i0, template: "<div class=\"pagination\" [class.hidden]=\"hidden()\">\n <div class=\"flex items-center\">\n <span class=\"mx-1 pagination__caption\">Items per page: </span>\n <p-select\n [options]=\"options()\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [ngModel]=\"pageSizeInternal()\"\n (ngModelChange)=\"onPageSizeChange($event)\" />\n </div>\n <p-paginator\n [first]=\"pageIndexInternal()\"\n [rows]=\"pageSizeInternal()\"\n [totalRecords]=\"length()\"\n (onPageChange)=\"onPageChange($event)\"\n [showCurrentPageReport]=\"true\"\n currentPageReportTemplate=\"{first} - {last} of {totalRecords}\"\n [showPageLinks]=\"false\"\n [showFirstLastIcon]=\"false\"></p-paginator>\n</div>\n", styles: [".pagination{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;flex-wrap:wrap}.pagination__caption{font-size:var(--tk-font-size-sm, .875rem);color:var(--tk-surface-600, #5d5d5e)}:host ::ng-deep .p-paginator-current{font-size:var(--tk-font-size-sm, .875rem);color:var(--tk-surface-600, #5d5d5e)}:host ::ng-deep .p-paginator-next-icon,:host ::ng-deep .p-paginator-prev-icon{width:18px!important;height:18px!important}:host ::ng-deep .p-select,:host ::ng-deep .p-inputwrapper{border:none;border-bottom:1px solid var(--tk-color-border-default, #cecdcd);border-radius:0;color:var(--tk-color-text-default, #191a1b);box-shadow:none}:host ::ng-deep .p-select:focus,:host ::ng-deep .p-inputwrapper:focus{border-color:var(--tk-color-accent-default, #16006f)}:host ::ng-deep .p-select-option span{color:var(--tk-color-text-default, #191a1b)!important}:host ::ng-deep .p-select-option:hover{background-color:var(--tk-primary-100, #b7b0d2)!important}:host ::ng-deep .p-select-dropdown-icon{color:var(--tk-surface-700, #424243)!important}.hidden{display:none!important}\n"], dependencies: [{ kind: "ngmodule", type: PaginatorModule }, { kind: "component", type: i1.Paginator, selector: "p-paginator", inputs: ["pageLinkSize", "style", "styleClass", "alwaysShow", "dropdownAppendTo", "templateLeft", "templateRight", "appendTo", "dropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showFirstLastIcon", "totalRecords", "rows", "rowsPerPageOptions", "showJumpToPageDropdown", "showJumpToPageInput", "jumpToPageItemTemplate", "showPageLinks", "locale", "dropdownItemTemplate", "first"], outputs: ["onPageChange"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.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"] }] }); }
|
|
151
151
|
}
|
|
152
152
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: PaginationComponent, decorators: [{
|
|
153
153
|
type: Component,
|
|
154
|
-
args: [{ selector: 'tk-pagination', imports: [PaginatorModule, FormsModule, Select], template: "<div class=\"pagination\" [class.hidden]=\"hidden()\">\n <div class=\"flex items-center\">\n <span class=\"mx-1 pagination__caption\">Items per page: </span>\n <p-select\n [options]=\"options()\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [ngModel]=\"pageSizeInternal()\"\n (ngModelChange)=\"onPageSizeChange($event)\" />\n </div>\n <p-paginator\n [first]=\"pageIndexInternal()\"\n [rows]=\"pageSizeInternal()\"\n [totalRecords]=\"length()\"\n (onPageChange)=\"onPageChange($event)\"\n [showCurrentPageReport]=\"true\"\n currentPageReportTemplate=\"{first} - {last} of {totalRecords}\"\n [showPageLinks]=\"false\"\n [showFirstLastIcon]=\"false\"></p-paginator>\n</div>\n", styles: [".pagination{display:flex;flex-direction:row;justify-content:
|
|
154
|
+
args: [{ selector: 'tk-pagination', imports: [PaginatorModule, FormsModule, Select], template: "<div class=\"pagination\" [class.hidden]=\"hidden()\">\n <div class=\"flex items-center\">\n <span class=\"mx-1 pagination__caption\">Items per page: </span>\n <p-select\n [options]=\"options()\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [ngModel]=\"pageSizeInternal()\"\n (ngModelChange)=\"onPageSizeChange($event)\" />\n </div>\n <p-paginator\n [first]=\"pageIndexInternal()\"\n [rows]=\"pageSizeInternal()\"\n [totalRecords]=\"length()\"\n (onPageChange)=\"onPageChange($event)\"\n [showCurrentPageReport]=\"true\"\n currentPageReportTemplate=\"{first} - {last} of {totalRecords}\"\n [showPageLinks]=\"false\"\n [showFirstLastIcon]=\"false\"></p-paginator>\n</div>\n", styles: [".pagination{display:flex;flex-direction:row;justify-content:flex-end;align-items:center;flex-wrap:wrap}.pagination__caption{font-size:var(--tk-font-size-sm, .875rem);color:var(--tk-surface-600, #5d5d5e)}:host ::ng-deep .p-paginator-current{font-size:var(--tk-font-size-sm, .875rem);color:var(--tk-surface-600, #5d5d5e)}:host ::ng-deep .p-paginator-next-icon,:host ::ng-deep .p-paginator-prev-icon{width:18px!important;height:18px!important}:host ::ng-deep .p-select,:host ::ng-deep .p-inputwrapper{border:none;border-bottom:1px solid var(--tk-color-border-default, #cecdcd);border-radius:0;color:var(--tk-color-text-default, #191a1b);box-shadow:none}:host ::ng-deep .p-select:focus,:host ::ng-deep .p-inputwrapper:focus{border-color:var(--tk-color-accent-default, #16006f)}:host ::ng-deep .p-select-option span{color:var(--tk-color-text-default, #191a1b)!important}:host ::ng-deep .p-select-option:hover{background-color:var(--tk-primary-100, #b7b0d2)!important}:host ::ng-deep .p-select-dropdown-icon{color:var(--tk-surface-700, #424243)!important}.hidden{display:none!important}\n"] }]
|
|
155
155
|
}], ctorParameters: () => [] });
|
|
156
156
|
|
|
157
157
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tekus-design-system-components-pagination.mjs","sources":["../../../projects/design-system/components/pagination/src/pagination.component.ts","../../../projects/design-system/components/pagination/src/pagination.component.html","../../../projects/design-system/components/pagination/tekus-design-system-components-pagination.ts"],"sourcesContent":["import {\n Component,\n computed,\n input,\n output,\n signal,\n effect,\n} from '@angular/core';\nimport { PaginatorModule, PaginatorState } from 'primeng/paginator';\nimport { FormsModule } from '@angular/forms';\nimport { Select } from 'primeng/select';\n\n@Component({\n selector: 'tk-pagination',\n imports: [PaginatorModule, FormsModule, Select],\n templateUrl: './pagination.component.html',\n styleUrl: './pagination.component.scss',\n})\nexport class PaginationComponent {\n /**\n * @property {boolean} hidden\n * @description\n * When true, hides the entire pagination component from view without affecting internal logic.\n * Useful when you need to keep the component in the DOM (e.g., for @ViewChildren queries)\n * but want to control its visibility externally.\n *\n * @default false\n */\n hidden = input<boolean>(false);\n\n /**\n * @property {number} pageIndex\n * @description\n * The index of the first record on the current page.\n * This value is used as the `[first]` input in the PrimeNG Paginator (zero-based).\n *\n * @default 0\n */\n pageIndex = input<number>(0);\n\n /**\n * @property {number} pageSize\n * @description\n * The number of items (rows) to display per page.\n *\n * @default 10\n */\n pageSize = input<number>(10);\n\n /**\n * @property {number} length\n * @description\n * The total number of records in the collection (`totalRecords`).\n *\n * @required\n */\n length = input.required<number>();\n\n /**\n * @property {number[]} pageSizeOptions\n * @description\n * Array of available options for the 'Items per page' selector.\n *\n * @default [5, 10, 20, 50]\n */\n pageSizeOptions = input<number[]>([5, 10, 20, 50]);\n\n /**\n * @property {Signal<number>} pageIndexInternal\n * @description\n * Internal, writable signal representing the current `first` index.\n * It is updated based on user interaction (page change).\n * Initialized with the value of `pageIndex()`.\n *\n * @internal\n */\n pageIndexInternal = signal<number>(this.pageIndex());\n\n /**\n * @property {Signal<number>} pageSizeInternal\n * @description\n * Internal, writable signal representing the current page size (`rows`).\n * It is updated based on user interaction (select change).\n * Initialized with the value of `pageSize()`.\n *\n * @internal\n */\n pageSizeInternal = signal<number>(this.pageSize());\n\n /**\n * @event pageChange\n * @description\n * Emits the complete pagination state (`PaginatorState`) when the user\n * changes the page or the page size.\n *\n * @payload {PaginatorState}\n * @example\n * <tk-pagination (pageChange)=\"loadData($event)\"></tk-pagination>\n */\n pageChange = output<PaginatorState>();\n\n constructor() {\n /**\n * @effect pageIndex → pageIndexInternal\n * @description\n * Synchronizes the `pageIndex` Input with the internal signal `pageIndexInternal`.\n * This allows the parent component to update the pagination state externally.\n */\n effect(() => {\n this.pageIndexInternal.set(this.pageIndex());\n });\n\n /**\n * @effect pageSize → pageSizeInternal\n * @description\n * Synchronizes the `pageSize` Input with the internal signal `pageSizeInternal`.\n * Allows the parent component to control the page size externally.\n */\n effect(() => {\n this.pageSizeInternal.set(this.pageSize());\n });\n }\n\n /**\n * @property {Signal<{label: string, value: number}[]>} options\n * @description\n * Computed signal that transforms the `pageSizeOptions` number array\n * into the `{label: string, value: number}` format required by the PrimeNG Select component.\n */\n options = computed(() =>\n this.pageSizeOptions().map(value => ({\n label: value.toString(),\n value: value,\n }))\n );\n\n // -----------------------------------\n // EVENT HANDLERS\n // -----------------------------------\n\n /**\n * @method onPageChange\n * @description\n * Handles the native `(onPageChange)` event emitted by the `p-paginator`.\n * Updates the internal state and notifies the parent component.\n *\n * @param {PaginatorState} event - The current pagination state.\n */\n onPageChange(event: PaginatorState) {\n this.pageIndexInternal.set(event.first ?? this.pageIndexInternal());\n this.pageSizeInternal.set(event.rows! ?? this.pageSizeInternal());\n this.pageChange.emit(event);\n }\n\n /**\n * @method onPageSizeChange\n * @description\n * Handles the `(ngModelChange)` event from the `p-select` when changing \"Items per page\".\n * Resets the `pageIndexInternal` to 0 to jump to the first page and emits the new state.\n *\n * @param {number} newSize - The newly selected page size.\n */\n onPageSizeChange(newSize: number) {\n this.pageSizeInternal.set(newSize);\n this.pageIndexInternal.set(0);\n\n // Emit the new state to the parent component\n this.pageChange.emit({\n first: 0,\n rows: newSize,\n page: 0,\n pageCount: Math.ceil(this.length() / newSize),\n } as PaginatorState);\n }\n}\n","<div class=\"pagination\" [class.hidden]=\"hidden()\">\n <div class=\"flex items-center\">\n <span class=\"mx-1 pagination__caption\">Items per page: </span>\n <p-select\n [options]=\"options()\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [ngModel]=\"pageSizeInternal()\"\n (ngModelChange)=\"onPageSizeChange($event)\" />\n </div>\n <p-paginator\n [first]=\"pageIndexInternal()\"\n [rows]=\"pageSizeInternal()\"\n [totalRecords]=\"length()\"\n (onPageChange)=\"onPageChange($event)\"\n [showCurrentPageReport]=\"true\"\n currentPageReportTemplate=\"{first} - {last} of {totalRecords}\"\n [showPageLinks]=\"false\"\n [showFirstLastIcon]=\"false\"></p-paginator>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAkBa,mBAAmB,CAAA;AAmF9B,IAAA,WAAA,GAAA;AAlFA;;;;;;;;AAQG;AACH,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK,CAAU,KAAK,CAAC;AAE9B;;;;;;;AAOG;AACH,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAS,CAAC,CAAC;AAE5B;;;;;;AAMG;AACH,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAS,EAAE,CAAC;AAE5B;;;;;;AAMG;AACH,QAAA,IAAA,CAAA,MAAM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,KAAK,CAAC;;AAG7B;;;;;;;AAOG;AACH,IAAA,gBAAgB,CAAC,OAAe,EAAA;AAC9B,QAAA,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,OAAO,CAAC;AAClC,QAAA,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,CAAC;;AAG7B,QAAA,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;AACnB,YAAA,KAAK,EAAE,CAAC;AACR,YAAA,IAAI,EAAE,OAAO;AACb,YAAA,IAAI,EAAE,CAAC;YACP,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,OAAO,CAAC;AAC5B,SAAA,CAAC;;+GA1JX,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAnB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,mBAAmB,4wBClBhC,iuBAoBA,EAAA,MAAA,EAAA,CAAA,
|
|
1
|
+
{"version":3,"file":"tekus-design-system-components-pagination.mjs","sources":["../../../projects/design-system/components/pagination/src/pagination.component.ts","../../../projects/design-system/components/pagination/src/pagination.component.html","../../../projects/design-system/components/pagination/tekus-design-system-components-pagination.ts"],"sourcesContent":["import {\n Component,\n computed,\n input,\n output,\n signal,\n effect,\n} from '@angular/core';\nimport { PaginatorModule, PaginatorState } from 'primeng/paginator';\nimport { FormsModule } from '@angular/forms';\nimport { Select } from 'primeng/select';\n\n@Component({\n selector: 'tk-pagination',\n imports: [PaginatorModule, FormsModule, Select],\n templateUrl: './pagination.component.html',\n styleUrl: './pagination.component.scss',\n})\nexport class PaginationComponent {\n /**\n * @property {boolean} hidden\n * @description\n * When true, hides the entire pagination component from view without affecting internal logic.\n * Useful when you need to keep the component in the DOM (e.g., for @ViewChildren queries)\n * but want to control its visibility externally.\n *\n * @default false\n */\n hidden = input<boolean>(false);\n\n /**\n * @property {number} pageIndex\n * @description\n * The index of the first record on the current page.\n * This value is used as the `[first]` input in the PrimeNG Paginator (zero-based).\n *\n * @default 0\n */\n pageIndex = input<number>(0);\n\n /**\n * @property {number} pageSize\n * @description\n * The number of items (rows) to display per page.\n *\n * @default 10\n */\n pageSize = input<number>(10);\n\n /**\n * @property {number} length\n * @description\n * The total number of records in the collection (`totalRecords`).\n *\n * @required\n */\n length = input.required<number>();\n\n /**\n * @property {number[]} pageSizeOptions\n * @description\n * Array of available options for the 'Items per page' selector.\n *\n * @default [5, 10, 20, 50]\n */\n pageSizeOptions = input<number[]>([5, 10, 20, 50]);\n\n /**\n * @property {Signal<number>} pageIndexInternal\n * @description\n * Internal, writable signal representing the current `first` index.\n * It is updated based on user interaction (page change).\n * Initialized with the value of `pageIndex()`.\n *\n * @internal\n */\n pageIndexInternal = signal<number>(this.pageIndex());\n\n /**\n * @property {Signal<number>} pageSizeInternal\n * @description\n * Internal, writable signal representing the current page size (`rows`).\n * It is updated based on user interaction (select change).\n * Initialized with the value of `pageSize()`.\n *\n * @internal\n */\n pageSizeInternal = signal<number>(this.pageSize());\n\n /**\n * @event pageChange\n * @description\n * Emits the complete pagination state (`PaginatorState`) when the user\n * changes the page or the page size.\n *\n * @payload {PaginatorState}\n * @example\n * <tk-pagination (pageChange)=\"loadData($event)\"></tk-pagination>\n */\n pageChange = output<PaginatorState>();\n\n constructor() {\n /**\n * @effect pageIndex → pageIndexInternal\n * @description\n * Synchronizes the `pageIndex` Input with the internal signal `pageIndexInternal`.\n * This allows the parent component to update the pagination state externally.\n */\n effect(() => {\n this.pageIndexInternal.set(this.pageIndex());\n });\n\n /**\n * @effect pageSize → pageSizeInternal\n * @description\n * Synchronizes the `pageSize` Input with the internal signal `pageSizeInternal`.\n * Allows the parent component to control the page size externally.\n */\n effect(() => {\n this.pageSizeInternal.set(this.pageSize());\n });\n }\n\n /**\n * @property {Signal<{label: string, value: number}[]>} options\n * @description\n * Computed signal that transforms the `pageSizeOptions` number array\n * into the `{label: string, value: number}` format required by the PrimeNG Select component.\n */\n options = computed(() =>\n this.pageSizeOptions().map(value => ({\n label: value.toString(),\n value: value,\n }))\n );\n\n // -----------------------------------\n // EVENT HANDLERS\n // -----------------------------------\n\n /**\n * @method onPageChange\n * @description\n * Handles the native `(onPageChange)` event emitted by the `p-paginator`.\n * Updates the internal state and notifies the parent component.\n *\n * @param {PaginatorState} event - The current pagination state.\n */\n onPageChange(event: PaginatorState) {\n this.pageIndexInternal.set(event.first ?? this.pageIndexInternal());\n this.pageSizeInternal.set(event.rows! ?? this.pageSizeInternal());\n this.pageChange.emit(event);\n }\n\n /**\n * @method onPageSizeChange\n * @description\n * Handles the `(ngModelChange)` event from the `p-select` when changing \"Items per page\".\n * Resets the `pageIndexInternal` to 0 to jump to the first page and emits the new state.\n *\n * @param {number} newSize - The newly selected page size.\n */\n onPageSizeChange(newSize: number) {\n this.pageSizeInternal.set(newSize);\n this.pageIndexInternal.set(0);\n\n // Emit the new state to the parent component\n this.pageChange.emit({\n first: 0,\n rows: newSize,\n page: 0,\n pageCount: Math.ceil(this.length() / newSize),\n } as PaginatorState);\n }\n}\n","<div class=\"pagination\" [class.hidden]=\"hidden()\">\n <div class=\"flex items-center\">\n <span class=\"mx-1 pagination__caption\">Items per page: </span>\n <p-select\n [options]=\"options()\"\n optionLabel=\"label\"\n optionValue=\"value\"\n [ngModel]=\"pageSizeInternal()\"\n (ngModelChange)=\"onPageSizeChange($event)\" />\n </div>\n <p-paginator\n [first]=\"pageIndexInternal()\"\n [rows]=\"pageSizeInternal()\"\n [totalRecords]=\"length()\"\n (onPageChange)=\"onPageChange($event)\"\n [showCurrentPageReport]=\"true\"\n currentPageReportTemplate=\"{first} - {last} of {totalRecords}\"\n [showPageLinks]=\"false\"\n [showFirstLastIcon]=\"false\"></p-paginator>\n</div>\n","/**\n * Generated bundle index. Do not edit.\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AAA,EAAA,UAAA,EAAA,YAAA,EAAA,YAAA,EAAA,uBAAA,EAAA,uBAAA,EAAA,aAAA,EAAA,SAAA,CAAA,EAAA,OAAA,EAAA,CAAA,UAAA,EAAA,UAAA,EAAA,SAAA,EAAA,QAAA,EAAA,SAAA,EAAA,QAAA,EAAA,QAAA,EAAA,SAAA,EAAA,YAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAInC,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAN/B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,eAAe,WAChB,CAAC,eAAe,EAAE,WAAW,EAAE,MAAM,CAAC,EAAA,QAAA,EAAA,iuBAAA,EAAA,MAAA,EAAA,CAAA,4jCAAA,CAAA,EAAA;;;AEdjD;;AAEG;;;;"}
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { input, signal, model, output, effect,
|
|
2
|
+
import { inject, input, signal, model, output, effect, Component } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/forms';
|
|
4
|
-
import { FormsModule,
|
|
4
|
+
import { NgControl, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
5
5
|
import * as i2 from 'primeng/floatlabel';
|
|
6
6
|
import { FloatLabelModule } from 'primeng/floatlabel';
|
|
7
7
|
import { Select } from 'primeng/select';
|
|
8
|
+
import * as i3 from 'primeng/message';
|
|
9
|
+
import { MessageModule } from 'primeng/message';
|
|
8
10
|
|
|
9
11
|
class SelectComponent {
|
|
10
12
|
constructor() {
|
|
13
|
+
this.ngControl = inject(NgControl, { self: true, optional: true });
|
|
11
14
|
/**
|
|
12
15
|
* @property {string} id
|
|
13
16
|
* @description
|
|
@@ -16,6 +19,13 @@ class SelectComponent {
|
|
|
16
19
|
* @default 'select'
|
|
17
20
|
*/
|
|
18
21
|
this.id = input('select');
|
|
22
|
+
/**
|
|
23
|
+
* @property {InputSignal<FormControl>} control
|
|
24
|
+
* @description
|
|
25
|
+
* External FormControl used to read/set the input value.
|
|
26
|
+
* If not provided, an internal FormControl is created.
|
|
27
|
+
*/
|
|
28
|
+
this.control = input();
|
|
19
29
|
/**
|
|
20
30
|
* @property {T[]} options
|
|
21
31
|
* @description
|
|
@@ -61,6 +71,18 @@ class SelectComponent {
|
|
|
61
71
|
*/
|
|
62
72
|
this.disabled = input(false);
|
|
63
73
|
this.internalDisabled = signal(false);
|
|
74
|
+
/**
|
|
75
|
+
* @property {InputSignal<string>} errorMessage
|
|
76
|
+
* @description
|
|
77
|
+
* Message to display when the control is invalid and touched.
|
|
78
|
+
*/
|
|
79
|
+
this.errorMessage = input('');
|
|
80
|
+
/**
|
|
81
|
+
* @property {InputSignal<string>} hint
|
|
82
|
+
* @description
|
|
83
|
+
* Hint text to display below the input.
|
|
84
|
+
*/
|
|
85
|
+
this.hint = input('');
|
|
64
86
|
/**
|
|
65
87
|
* @property {Signal<T | null>} model
|
|
66
88
|
* @description
|
|
@@ -81,6 +103,9 @@ class SelectComponent {
|
|
|
81
103
|
// CVA callbacks
|
|
82
104
|
this.onChangeFn = () => { };
|
|
83
105
|
this.onTouchedFn = () => { };
|
|
106
|
+
if (this.ngControl) {
|
|
107
|
+
this.ngControl.valueAccessor = this;
|
|
108
|
+
}
|
|
84
109
|
/**
|
|
85
110
|
* @effect disabled → internalDisabled
|
|
86
111
|
* @description
|
|
@@ -164,25 +189,22 @@ class SelectComponent {
|
|
|
164
189
|
this.model.set(value);
|
|
165
190
|
// 3. Notify external listeners
|
|
166
191
|
this.modelChange.emit(value);
|
|
192
|
+
// 4. Explicitly update effective control to ensure UI consistency (matches input-text)
|
|
193
|
+
if (this.effectiveControl) {
|
|
194
|
+
this.effectiveControl.setValue(value);
|
|
195
|
+
this.effectiveControl.markAsDirty();
|
|
196
|
+
this.effectiveControl.markAsTouched();
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
get effectiveControl() {
|
|
200
|
+
return this.ngControl?.control || this.control();
|
|
167
201
|
}
|
|
168
202
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
169
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.
|
|
170
|
-
{
|
|
171
|
-
provide: NG_VALUE_ACCESSOR,
|
|
172
|
-
useExisting: forwardRef(() => SelectComponent),
|
|
173
|
-
multi: true,
|
|
174
|
-
},
|
|
175
|
-
], 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 (onChange)=\"handleChange($event)\" />\n <label [for]=\"id()\">{{ label() }}</label>\n</p-floatlabel>\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-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)}: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}\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"] }] }); }
|
|
203
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", 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 }] }); }
|
|
176
204
|
}
|
|
177
205
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: SelectComponent, decorators: [{
|
|
178
206
|
type: Component,
|
|
179
|
-
args: [{ selector: 'tk-select', imports: [FormsModule, Select, FloatLabelModule],
|
|
180
|
-
{
|
|
181
|
-
provide: NG_VALUE_ACCESSOR,
|
|
182
|
-
useExisting: forwardRef(() => SelectComponent),
|
|
183
|
-
multi: true,
|
|
184
|
-
},
|
|
185
|
-
], 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 (onChange)=\"handleChange($event)\" />\n <label [for]=\"id()\">{{ label() }}</label>\n</p-floatlabel>\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-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)}: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}\n"] }]
|
|
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"] }]
|
|
186
208
|
}], ctorParameters: () => [] });
|
|
187
209
|
|
|
188
210
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tekus-design-system-components-select.mjs","sources":["../../../projects/design-system/components/select/src/select.component.ts","../../../projects/design-system/components/select/src/select.component.html","../../../projects/design-system/components/select/tekus-design-system-components-select.ts"],"sourcesContent":["import {\n Component,\n effect,\n model,\n forwardRef,\n input,\n output,\n signal,\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n NG_VALUE_ACCESSOR,\n FormsModule,\n} from '@angular/forms';\nimport { FloatLabelModule } from 'primeng/floatlabel';\nimport { Select } from 'primeng/select';\n\n@Component({\n selector: 'tk-select',\n imports: [FormsModule, Select, FloatLabelModule],\n templateUrl: './select.component.html',\n styleUrl: './select.component.scss',\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => SelectComponent),\n multi: true,\n },\n ],\n})\nexport class SelectComponent<T = unknown> implements ControlValueAccessor {\n /**\n * @property {string} id\n * @description\n * HTML id attribute for the multiselect input.\n *\n * @default 'select'\n */\n id = input<string>('select');\n /**\n * @property {T[]} options\n * @description\n * Array of available options displayed in the dropdown.\n */\n options = input<T[]>([]);\n\n /**\n * @property {string} optionLabel\n * @description\n * Name of the property used to display the text of each option.\n *\n * @default 'label'\n */\n optionLabel = input<string>('label');\n\n /**\n * @property {string} label\n * @description\n * Floating label displayed above the select input.\n */\n label = input<string>('');\n\n /**\n * @property {boolean} showClear\n * @description\n * Enables the clear button to remove the current selection.\n *\n * @default true\n */\n showClear = input<boolean>(true);\n\n /**\n * @property {T | null} value\n * @description\n * Internal selected value. Synced with Angular forms and the model signal.\n *\n * @internal\n */\n value: T | null = null;\n\n /**\n * @property {boolean} disabled\n * @description\n * Determines whether the select field is disabled.\n *\n * @default false\n */\n disabled = input<boolean>(false);\n internalDisabled = signal(false);\n\n /**\n * @property {Signal<T | null>} model\n * @description\n * Two-way binding model using Angular signals.\n * Allows usage with the syntax: `[(model)]=\"myValue\"`.\n */\n model = model<T | null>();\n\n /**\n * @event modelChange\n * @description\n * Emits whenever the value changes.\n * Payload: the selected item of type `T` or `null`.\n *\n * @example\n * <tk-select (modelChange)=\"onChange($event)\"></tk-select>\n */\n modelChange = output<T | null>();\n\n // CVA callbacks\n private onChangeFn: (value: T | null) => void = () => {};\n private onTouchedFn = () => {};\n\n constructor() {\n /**\n * @effect disabled → internalDisabled\n * @description\n * Synchronizes the disabled input signal with the internal disabled state.\n */\n effect(() => {\n this.internalDisabled.set(this.disabled());\n });\n\n /**\n * @effect model → internal value\n * @description\n * Synchronizes changes coming from the Signal `model()` back into the internal value.\n * Ensures consistency between Angular Forms, PrimeNG UI events, and Signals.\n */\n effect(() => {\n const v = this.model();\n if (v !== this.value) {\n this.value = v ?? null;\n this.onChangeFn(v ?? null);\n }\n });\n }\n\n // -----------------------------------\n // CONTROL VALUE ACCESSOR (Forms API)\n // -----------------------------------\n\n /**\n * @method writeValue\n * @description\n * Receives value updates from Angular Forms and writes them into the component.\n *\n * @param {T | null} value - New value from the forms API.\n */\n writeValue(value: T | null): void {\n this.model.set(value);\n }\n\n /**\n * @method registerOnChange\n * @description\n * Registers a callback that is invoked when the component's value changes.\n */\n registerOnChange(fn: (value: T | null) => void): void {\n this.onChangeFn = fn;\n }\n\n /**\n * @method registerOnTouched\n * @description\n * Registers a callback invoked when the component is touched.\n */\n registerOnTouched(fn: () => void): void {\n this.onTouchedFn = fn;\n }\n\n /**\n * @method setDisabledState\n * @description\n * Updates the disabled state of the select control.\n *\n * @param {boolean} isDisabled - Whether the component should be disabled.\n */\n setDisabledState(isDisabled: boolean): void {\n this.internalDisabled.set(isDisabled);\n }\n\n // -----------------------------------\n // UI EVENTS\n // -----------------------------------\n\n /**\n * @method handleChange\n * @description\n * Handles the selection event emitted by the PrimeNG Select component.\n * Updates Angular Forms, Signals, and emits the modelChange event.\n *\n * @param event - Event containing the `value` of the selected option.\n */\n handleChange(event: { value: T | null }) {\n const value = event.value ?? null;\n\n // Update internal state\n this.value = value;\n\n // 1. Update Angular Forms\n this.onChangeFn(value);\n this.onTouchedFn();\n\n // 2. Update signals\n this.model.set(value);\n\n // 3. Notify external listeners\n this.modelChange.emit(value);\n }\n}\n","<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 (onChange)=\"handleChange($event)\" />\n <label [for]=\"id()\">{{ label() }}</label>\n</p-floatlabel>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;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A,EAAA,QAAA,EC5BH,gWAYA,EDOY,MAAA,EAAA,CAAA,+hDAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,WAAW,EAAE,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,eAAA,EAAA,QAAA,EAAA,2CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA,EAAA,qDAAA,EAAA,MAAA,EAAA,CAAA,MAAA,EAAA,UAAA,EAAA,SAAA,EAAA,gBAAA,CAAA,EAAA,OAAA,EAAA,CAAA,eAAA,CAAA,EAAA,QAAA,EAAA,CAAA,SAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,MAAM,gpCAAE,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;;4FAWpC,eAAe,EAAA,UAAA,EAAA,CAAA;kBAb3B,SAAS;+BACE,WAAW,EAAA,OAAA,EACZ,CAAC,WAAW,EAAE,MAAM,EAAE,gBAAgB,CAAC,EAGrC,SAAA,EAAA;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,iBAAiB;AAC1B,4BAAA,WAAW,EAAE,UAAU,CAAC,qBAAqB,CAAC;AAC9C,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACF,qBAAA,EAAA,QAAA,EAAA,gWAAA,EAAA,MAAA,EAAA,CAAA,+hDAAA,CAAA,EAAA;;;AE5BH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"tekus-design-system-components-select.mjs","sources":["../../../projects/design-system/components/select/src/select.component.ts","../../../projects/design-system/components/select/src/select.component.html","../../../projects/design-system/components/select/tekus-design-system-components-select.ts"],"sourcesContent":["import {\n Component,\n effect,\n model,\n\n input,\n output,\n signal,\n inject\n} from '@angular/core';\nimport {\n ControlValueAccessor,\n FormsModule,\n NgControl, \n FormControl, \n ReactiveFormsModule\n} from '@angular/forms';\nimport { FloatLabelModule } from 'primeng/floatlabel';\nimport { Select } from 'primeng/select';\nimport { MessageModule } from 'primeng/message';\n\n@Component({\n selector: 'tk-select',\n imports: [FormsModule, Select, FloatLabelModule, MessageModule, ReactiveFormsModule],\n templateUrl: './select.component.html',\n styleUrl: './select.component.scss',\n\n})\nexport class SelectComponent<T = unknown> implements ControlValueAccessor {\n readonly ngControl = inject(NgControl, { self: true, optional: true });\n /**\n * @property {string} id\n * @description\n * HTML id attribute for the multiselect input.\n *\n * @default 'select'\n */\n id = input<string>('select');\n\n /**\n * @property {InputSignal<FormControl>} control\n * @description\n * External FormControl used to read/set the input value.\n * If not provided, an internal FormControl is created.\n */\n control = input<FormControl>();\n \n /**\n * @property {T[]} options\n * @description\n * Array of available options displayed in the dropdown.\n */\n options = input<T[]>([]);\n\n /**\n * @property {string} optionLabel\n * @description\n * Name of the property used to display the text of each option.\n *\n * @default 'label'\n */\n optionLabel = input<string>('label');\n\n /**\n * @property {string} label\n * @description\n * Floating label displayed above the select input.\n */\n label = input<string>('');\n\n /**\n * @property {boolean} showClear\n * @description\n * Enables the clear button to remove the current selection.\n *\n * @default true\n */\n showClear = input<boolean>(true);\n\n /**\n * @property {T | null} value\n * @description\n * Internal selected value. Synced with Angular forms and the model signal.\n *\n * @internal\n */\n value: T | null = null;\n\n /**\n * @property {boolean} disabled\n * @description\n * Determines whether the select field is disabled.\n *\n * @default false\n */\n disabled = input<boolean>(false);\n internalDisabled = signal(false);\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 * @property {Signal<T | null>} model\n * @description\n * Two-way binding model using Angular signals.\n * Allows usage with the syntax: `[(model)]=\"myValue\"`.\n */\n model = model<T | null>();\n\n /**\n * @event modelChange\n * @description\n * Emits whenever the value changes.\n * Payload: the selected item of type `T` or `null`.\n *\n * @example\n * <tk-select (modelChange)=\"onChange($event)\"></tk-select>\n */\n modelChange = output<T | null>();\n\n // CVA callbacks\n private onChangeFn: (value: T | null) => void = () => {};\n private onTouchedFn = () => {};\n\n constructor() {\n if (this.ngControl) {\n this.ngControl.valueAccessor = this;\n }\n /**\n * @effect disabled → internalDisabled\n * @description\n * Synchronizes the disabled input signal with the internal disabled state.\n */\n effect(() => {\n this.internalDisabled.set(this.disabled());\n });\n\n /**\n * @effect model → internal value\n * @description\n * Synchronizes changes coming from the Signal `model()` back into the internal value.\n * Ensures consistency between Angular Forms, PrimeNG UI events, and Signals.\n */\n effect(() => {\n const v = this.model();\n if (v !== this.value) {\n this.value = v ?? null;\n this.onChangeFn(v ?? null);\n }\n });\n }\n\n // -----------------------------------\n // CONTROL VALUE ACCESSOR (Forms API)\n // -----------------------------------\n\n /**\n * @method writeValue\n * @description\n * Receives value updates from Angular Forms and writes them into the component.\n *\n * @param {T | null} value - New value from the forms API.\n */\n writeValue(value: T | null): void {\n this.model.set(value);\n }\n\n /**\n * @method registerOnChange\n * @description\n * Registers a callback that is invoked when the component's value changes.\n */\n registerOnChange(fn: (value: T | null) => void): void {\n this.onChangeFn = fn;\n }\n\n /**\n * @method registerOnTouched\n * @description\n * Registers a callback invoked when the component is touched.\n */\n registerOnTouched(fn: () => void): void {\n this.onTouchedFn = fn;\n }\n\n /**\n * @method setDisabledState\n * @description\n * Updates the disabled state of the select control.\n *\n * @param {boolean} isDisabled - Whether the component should be disabled.\n */\n setDisabledState(isDisabled: boolean): void {\n this.internalDisabled.set(isDisabled);\n }\n\n // -----------------------------------\n // UI EVENTS\n // -----------------------------------\n\n /**\n * @method handleChange\n * @description\n * Handles the selection event emitted by the PrimeNG Select component.\n * Updates Angular Forms, Signals, and emits the modelChange event.\n *\n * @param event - Event containing the `value` of the selected option.\n */\n handleChange(event: { value: T | null }) {\n const value = event.value ?? null;\n\n // Update internal state\n this.value = value;\n\n // 1. Update Angular Forms\n this.onChangeFn(value);\n this.onTouchedFn();\n\n // 2. Update signals\n this.model.set(value);\n\n // 3. Notify external listeners\n this.modelChange.emit(value);\n\n // 4. Explicitly update effective control to ensure UI consistency (matches input-text)\n if (this.effectiveControl) {\n this.effectiveControl.setValue(value);\n this.effectiveControl.markAsDirty();\n this.effectiveControl.markAsTouched();\n }\n }\n get effectiveControl() {\n return (this.ngControl?.control as FormControl) || this.control();\n }\n}\n\n","<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>","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;MA4Ba,eAAe,CAAA;AA2G1B,IAAA,WAAA,GAAA;AA1GS,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,SAAS,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE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,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,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,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,mBAAmB,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAKxE,eAAe,EAAA,UAAA,EAAA,CAAA;kBAP3B,SAAS;+BACE,WAAW,EAAA,OAAA,EACZ,CAAC,WAAW,EAAE,MAAM,EAAE,gBAAgB,EAAE,aAAa,EAAE,mBAAmB,CAAC,EAAA,QAAA,EAAA,q/BAAA,EAAA,MAAA,EAAA,CAAA,m7FAAA,CAAA,EAAA;;;AEvBtF;;AAEG;;;;"}
|
|
@@ -111,7 +111,7 @@ class ToolbarComponent {
|
|
|
111
111
|
this.filterModel.set(value);
|
|
112
112
|
}
|
|
113
113
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ToolbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
114
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: ToolbarComponent, isStandalone: true, selector: "tk-toolbar", inputs: { searchModel: { classPropertyName: "searchModel", publicName: "searchModel", isSignal: true, isRequired: false, transformFunction: null }, filterModel: { classPropertyName: "filterModel", publicName: "filterModel", isSignal: true, isRequired: false, transformFunction: null }, filterOptions: { classPropertyName: "filterOptions", publicName: "filterOptions", isSignal: true, isRequired: false, transformFunction: null }, filterOptionLabel: { classPropertyName: "filterOptionLabel", publicName: "filterOptionLabel", isSignal: true, isRequired: false, transformFunction: null }, filterFloatLabel: { classPropertyName: "filterFloatLabel", publicName: "filterFloatLabel", isSignal: true, isRequired: false, transformFunction: null }, searchFloatLabel: { classPropertyName: "searchFloatLabel", publicName: "searchFloatLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { searchModel: "searchModelChange", filterModel: "filterModelChange" }, ngImport: i0, template: "<div class=\"toolbar\">\n @if (showSearchInput()) {\n <div class=\"toolbar__input-container\">\n <tk-input-text\n [label]=\"searchFloatLabel()\"\n icon=\"magnifying-glass\"\n [clearable]=\"true\"\n [value]=\"searchModel()\"\n (valueChange)=\"searchModel.set($event)\">\n </tk-input-text>\n </div>\n } @if (showFilterSelect()) {\n <div class=\"toolbar__input-container\">\n <tk-select\n [options]=\"filterOptions()\"\n [optionLabel]=\"filterOptionLabel()\"\n [label]=\"filterFloatLabel()\"\n (modelChange)=\"onSelectedOption($event ?? null)\">\n </tk-select>\n </div>\n }\n <div class=\"toolbar__buttons\">\n @if (searchModel() !== undefined) {\n <tk-button\n [icon]=\"'magnifying-glass'\"\n severity=\"secondary\"\n [variant]=\"!showSearchInput() ? 'outlined' : undefined\"\n (clicked)=\"toggleSearchInput()\">\n </tk-button>\n } @if (filterModel() !== undefined) {\n <tk-button\n [icon]=\"'filter'\"\n severity=\"secondary\"\n [variant]=\"!showFilterSelect() ? 'outlined' : undefined\"\n (clicked)=\"toggleFilterSelect()\">\n </tk-button>\n }\n </div>\n</div>\n", styles: [".toolbar{display:flex;justify-content:center;flex-wrap:wrap;gap:var(--tk-spacing-base-50, .5rem);row-gap:var(--tk-spacing-base-150, 1.5rem)}.toolbar__input-container{width:15rem}.toolbar__buttons{display:flex;gap:var(--tk-spacing-base-50, .5rem);margin-top:var(--tk-spacing-base-50, .5rem)}@media (max-width: 768px){.toolbar{justify-content:flex-start}}:host ::ng-deep .tk-input-bottom{display:none}:host ::ng-deep .p-button-outlined{border:1px solid transparent!important}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "tk-button", inputs: ["label", "disabled", "type", "severity", "variant", "link", "icon", "tooltipText"], outputs: ["clicked"] }, { kind: "component", type: InputTextComponent, selector: "tk-input-text", inputs: ["value", "control", "label", "type", "id", "icon", "clearable", "errorMessage", "hint", "maxLength"], outputs: ["valueChange"] }, { kind: "component", type: SelectComponent, selector: "tk-select", inputs: ["id", "options", "optionLabel", "label", "showClear", "disabled", "model"], outputs: ["modelChange"] }] }); }
|
|
114
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: ToolbarComponent, isStandalone: true, selector: "tk-toolbar", inputs: { searchModel: { classPropertyName: "searchModel", publicName: "searchModel", isSignal: true, isRequired: false, transformFunction: null }, filterModel: { classPropertyName: "filterModel", publicName: "filterModel", isSignal: true, isRequired: false, transformFunction: null }, filterOptions: { classPropertyName: "filterOptions", publicName: "filterOptions", isSignal: true, isRequired: false, transformFunction: null }, filterOptionLabel: { classPropertyName: "filterOptionLabel", publicName: "filterOptionLabel", isSignal: true, isRequired: false, transformFunction: null }, filterFloatLabel: { classPropertyName: "filterFloatLabel", publicName: "filterFloatLabel", isSignal: true, isRequired: false, transformFunction: null }, searchFloatLabel: { classPropertyName: "searchFloatLabel", publicName: "searchFloatLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { searchModel: "searchModelChange", filterModel: "filterModelChange" }, ngImport: i0, template: "<div class=\"toolbar\">\n @if (showSearchInput()) {\n <div class=\"toolbar__input-container\">\n <tk-input-text\n [label]=\"searchFloatLabel()\"\n icon=\"magnifying-glass\"\n [clearable]=\"true\"\n [value]=\"searchModel()\"\n (valueChange)=\"searchModel.set($event)\">\n </tk-input-text>\n </div>\n } @if (showFilterSelect()) {\n <div class=\"toolbar__input-container\">\n <tk-select\n [options]=\"filterOptions()\"\n [optionLabel]=\"filterOptionLabel()\"\n [label]=\"filterFloatLabel()\"\n (modelChange)=\"onSelectedOption($event ?? null)\">\n </tk-select>\n </div>\n }\n <div class=\"toolbar__buttons\">\n @if (searchModel() !== undefined) {\n <tk-button\n [icon]=\"'magnifying-glass'\"\n severity=\"secondary\"\n [variant]=\"!showSearchInput() ? 'outlined' : undefined\"\n (clicked)=\"toggleSearchInput()\">\n </tk-button>\n } @if (filterModel() !== undefined) {\n <tk-button\n [icon]=\"'filter'\"\n severity=\"secondary\"\n [variant]=\"!showFilterSelect() ? 'outlined' : undefined\"\n (clicked)=\"toggleFilterSelect()\">\n </tk-button>\n }\n </div>\n</div>\n", styles: [".toolbar{display:flex;justify-content:center;flex-wrap:wrap;gap:var(--tk-spacing-base-50, .5rem);row-gap:var(--tk-spacing-base-150, 1.5rem)}.toolbar__input-container{width:15rem}.toolbar__buttons{display:flex;gap:var(--tk-spacing-base-50, .5rem);margin-top:var(--tk-spacing-base-50, .5rem)}@media (max-width: 768px){.toolbar{justify-content:flex-start}}:host ::ng-deep .tk-input-bottom{display:none}:host ::ng-deep .p-button-outlined{border:1px solid transparent!important}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "tk-button", inputs: ["label", "disabled", "type", "severity", "variant", "link", "icon", "tooltipText"], outputs: ["clicked"] }, { kind: "component", type: InputTextComponent, selector: "tk-input-text", inputs: ["value", "control", "label", "type", "id", "icon", "clearable", "errorMessage", "hint", "maxLength"], outputs: ["valueChange"] }, { kind: "component", type: SelectComponent, selector: "tk-select", inputs: ["id", "control", "options", "optionLabel", "label", "showClear", "disabled", "errorMessage", "hint", "model"], outputs: ["modelChange"] }] }); }
|
|
115
115
|
}
|
|
116
116
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: ToolbarComponent, decorators: [{
|
|
117
117
|
type: Component,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tekus-design-system-components-toolbar.mjs","sources":["../../../projects/design-system/components/toolbar/src/toolbar.component.ts","../../../projects/design-system/components/toolbar/src/toolbar.component.html","../../../projects/design-system/components/toolbar/tekus-design-system-components-toolbar.ts"],"sourcesContent":["import { Component, model, signal, input } from '@angular/core';\nimport { ButtonComponent } from '@tekus/design-system/components/button';\nimport { SelectComponent } from '@tekus/design-system/components/select';\nimport { InputTextComponent } from '@tekus/design-system/components/input-text';\n\n@Component({\n selector: 'tk-toolbar',\n imports: [ButtonComponent, InputTextComponent, SelectComponent],\n templateUrl: './toolbar.component.html',\n styleUrl: './toolbar.component.scss',\n})\nexport class ToolbarComponent {\n /**\n * @property {ModelSignal<string>} searchModel\n * @description\n * Two-way bindable signal for the search input value.\n * Supports [(searchModel)]=\"variable\" syntax for two-way binding.\n * @default ''\n */\n searchModel = model<string>('');\n\n /**\n * @property {ModelSignal<Record<string, string> | null>} filterModel\n * @description\n * Two-way bindable signal for the filter select value.\n * Supports [(filterModel)]=\"variable\" syntax for two-way binding.\n * @default null\n */\n filterModel = model<Record<string, string> | null>(null);\n\n /**\n * @property {WritableSignal<boolean>} showSearchInput\n * @description\n * Controls the visibility of the search input. Toggles when the search button is clicked.\n * @default false\n */\n showSearchInput = signal<boolean>(false);\n\n /**\n * @property {WritableSignal<boolean>} showFilterSelect\n * @description\n * Controls the visibility of the filter select. Toggles when the filter button is clicked.\n * @default false\n */\n showFilterSelect = signal<boolean>(false);\n\n /**\n * @property {InputSignal<Array<{ label: string; value: string }>>} filterOptions\n * @description\n * Array of options available in the filter select dropdown.\n * Each option is an object with `label` (displayed text) and `value` (internal identifier).\n *\n * @default\n * [\n * { label: 'Option 1', value: 'option1' },\n * { label: 'Option 2', value: 'option2' },\n * { label: 'Option 3', value: 'option3' }\n * ]\n */\n filterOptions = input<Array<{ label: string; value: string }>>([\n { label: 'Option 1', value: 'option1' },\n { label: 'Option 2', value: 'option2' },\n { label: 'Option 3', value: 'option3' },\n ]);\n\n /**\n * @property {InputSignal<string>} filterOptionLabel\n * @description\n * Property name used to display the label in the select dropdown options.\n * This corresponds to the key in each option object that contains the display text.\n *\n * @default 'label'\n */\n filterOptionLabel = input<string>('label');\n\n /**\n * @property {InputSignal<string>} filterFloatLabel\n * @description\n * Label text displayed above the filter select input using the FloatLabel wrapper.\n * This is the placeholder/label that floats when the select is focused or has a value.\n *\n * @default 'Filtrar'\n */\n filterFloatLabel = input<string>('Filtrar');\n\n /**\n * @property {InputSignal<string>} searchFloatLabel\n * @description\n * Label text displayed above the search input using the FloatLabel wrapper.\n * This is the placeholder/label that floats when the search input is focused or has a value.\n *\n * @default 'Buscar'\n */\n searchFloatLabel = input<string>('Buscar');\n\n /**\n * @method toggleSearchInput\n * @description\n * Toggles the visibility of the search input field.\n */\n toggleSearchInput(): void {\n this.showSearchInput.update(value => !value);\n this.searchModel.set('');\n }\n\n /**\n * @method toggleFilterSelect\n * @description\n * Toggles the visibility of the filter select dropdown.\n */\n toggleFilterSelect(): void {\n this.showFilterSelect.update(value => !value);\n this.filterModel.set(null);\n }\n\n /**\n * @method onSelectedOption\n * @description\n * Handles filter select changes and updates the filterModel signal.\n *\n * @param value - Selected option value from tk-select\n */\n onSelectedOption(value: Record<string, string> | null): void {\n this.filterModel.set(value);\n }\n}\n","<div class=\"toolbar\">\n @if (showSearchInput()) {\n <div class=\"toolbar__input-container\">\n <tk-input-text\n [label]=\"searchFloatLabel()\"\n icon=\"magnifying-glass\"\n [clearable]=\"true\"\n [value]=\"searchModel()\"\n (valueChange)=\"searchModel.set($event)\">\n </tk-input-text>\n </div>\n } @if (showFilterSelect()) {\n <div class=\"toolbar__input-container\">\n <tk-select\n [options]=\"filterOptions()\"\n [optionLabel]=\"filterOptionLabel()\"\n [label]=\"filterFloatLabel()\"\n (modelChange)=\"onSelectedOption($event ?? null)\">\n </tk-select>\n </div>\n }\n <div class=\"toolbar__buttons\">\n @if (searchModel() !== undefined) {\n <tk-button\n [icon]=\"'magnifying-glass'\"\n severity=\"secondary\"\n [variant]=\"!showSearchInput() ? 'outlined' : undefined\"\n (clicked)=\"toggleSearchInput()\">\n </tk-button>\n } @if (filterModel() !== undefined) {\n <tk-button\n [icon]=\"'filter'\"\n severity=\"secondary\"\n [variant]=\"!showFilterSelect() ? 'outlined' : undefined\"\n (clicked)=\"toggleFilterSelect()\">\n </tk-button>\n }\n </div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAWa,gBAAgB,CAAA;AAN7B,IAAA,WAAA,GAAA;AAOE;;;;;;AAMG;AACH,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAS,EAAE,CAAC;AAE/B;;;;;;AAMG;AACH,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAgC,IAAI,CAAC;AAExD;;;;;AAKG;AACH,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAU,KAAK,CAAC;AAExC;;;;;AAKG;AACH,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAU,KAAK,CAAC;AAEzC;;;;;;;;;;;;AAYG;QACH,IAAa,CAAA,aAAA,GAAG,KAAK,CAA0C;AAC7D,YAAA,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE;AACvC,YAAA,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE;AACvC,YAAA,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE;AACxC,SAAA,CAAC;AAEF;;;;;;;AAOG;AACH,QAAA,IAAA,CAAA,iBAAiB,GAAG,KAAK,CAAS,OAAO,CAAC;AAE1C;;;;;;;AAOG;AACH,QAAA,IAAA,CAAA,gBAAgB,GAAG,KAAK,CAAS,SAAS,CAAC;AAE3C;;;;;;;AAOG;AACH,QAAA,IAAA,CAAA,gBAAgB,GAAG,KAAK,CAAS,QAAQ,CAAC;AAgC3C;AA9BC;;;;AAIG;IACH,iBAAiB,GAAA;AACf,QAAA,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC;AAC5C,QAAA,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,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,YAAY,WACb,CAAC,eAAe,EAAE,kBAAkB,EAAE,eAAe,CAAC,EAAA,QAAA,EAAA,uqCAAA,EAAA,MAAA,EAAA,CAAA,6dAAA,CAAA,EAAA;;;AEPjE;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"tekus-design-system-components-toolbar.mjs","sources":["../../../projects/design-system/components/toolbar/src/toolbar.component.ts","../../../projects/design-system/components/toolbar/src/toolbar.component.html","../../../projects/design-system/components/toolbar/tekus-design-system-components-toolbar.ts"],"sourcesContent":["import { Component, model, signal, input } from '@angular/core';\nimport { ButtonComponent } from '@tekus/design-system/components/button';\nimport { SelectComponent } from '@tekus/design-system/components/select';\nimport { InputTextComponent } from '@tekus/design-system/components/input-text';\n\n@Component({\n selector: 'tk-toolbar',\n imports: [ButtonComponent, InputTextComponent, SelectComponent],\n templateUrl: './toolbar.component.html',\n styleUrl: './toolbar.component.scss',\n})\nexport class ToolbarComponent {\n /**\n * @property {ModelSignal<string>} searchModel\n * @description\n * Two-way bindable signal for the search input value.\n * Supports [(searchModel)]=\"variable\" syntax for two-way binding.\n * @default ''\n */\n searchModel = model<string>('');\n\n /**\n * @property {ModelSignal<Record<string, string> | null>} filterModel\n * @description\n * Two-way bindable signal for the filter select value.\n * Supports [(filterModel)]=\"variable\" syntax for two-way binding.\n * @default null\n */\n filterModel = model<Record<string, string> | null>(null);\n\n /**\n * @property {WritableSignal<boolean>} showSearchInput\n * @description\n * Controls the visibility of the search input. Toggles when the search button is clicked.\n * @default false\n */\n showSearchInput = signal<boolean>(false);\n\n /**\n * @property {WritableSignal<boolean>} showFilterSelect\n * @description\n * Controls the visibility of the filter select. Toggles when the filter button is clicked.\n * @default false\n */\n showFilterSelect = signal<boolean>(false);\n\n /**\n * @property {InputSignal<Array<{ label: string; value: string }>>} filterOptions\n * @description\n * Array of options available in the filter select dropdown.\n * Each option is an object with `label` (displayed text) and `value` (internal identifier).\n *\n * @default\n * [\n * { label: 'Option 1', value: 'option1' },\n * { label: 'Option 2', value: 'option2' },\n * { label: 'Option 3', value: 'option3' }\n * ]\n */\n filterOptions = input<Array<{ label: string; value: string }>>([\n { label: 'Option 1', value: 'option1' },\n { label: 'Option 2', value: 'option2' },\n { label: 'Option 3', value: 'option3' },\n ]);\n\n /**\n * @property {InputSignal<string>} filterOptionLabel\n * @description\n * Property name used to display the label in the select dropdown options.\n * This corresponds to the key in each option object that contains the display text.\n *\n * @default 'label'\n */\n filterOptionLabel = input<string>('label');\n\n /**\n * @property {InputSignal<string>} filterFloatLabel\n * @description\n * Label text displayed above the filter select input using the FloatLabel wrapper.\n * This is the placeholder/label that floats when the select is focused or has a value.\n *\n * @default 'Filtrar'\n */\n filterFloatLabel = input<string>('Filtrar');\n\n /**\n * @property {InputSignal<string>} searchFloatLabel\n * @description\n * Label text displayed above the search input using the FloatLabel wrapper.\n * This is the placeholder/label that floats when the search input is focused or has a value.\n *\n * @default 'Buscar'\n */\n searchFloatLabel = input<string>('Buscar');\n\n /**\n * @method toggleSearchInput\n * @description\n * Toggles the visibility of the search input field.\n */\n toggleSearchInput(): void {\n this.showSearchInput.update(value => !value);\n this.searchModel.set('');\n }\n\n /**\n * @method toggleFilterSelect\n * @description\n * Toggles the visibility of the filter select dropdown.\n */\n toggleFilterSelect(): void {\n this.showFilterSelect.update(value => !value);\n this.filterModel.set(null);\n }\n\n /**\n * @method onSelectedOption\n * @description\n * Handles filter select changes and updates the filterModel signal.\n *\n * @param value - Selected option value from tk-select\n */\n onSelectedOption(value: Record<string, string> | null): void {\n this.filterModel.set(value);\n }\n}\n","<div class=\"toolbar\">\n @if (showSearchInput()) {\n <div class=\"toolbar__input-container\">\n <tk-input-text\n [label]=\"searchFloatLabel()\"\n icon=\"magnifying-glass\"\n [clearable]=\"true\"\n [value]=\"searchModel()\"\n (valueChange)=\"searchModel.set($event)\">\n </tk-input-text>\n </div>\n } @if (showFilterSelect()) {\n <div class=\"toolbar__input-container\">\n <tk-select\n [options]=\"filterOptions()\"\n [optionLabel]=\"filterOptionLabel()\"\n [label]=\"filterFloatLabel()\"\n (modelChange)=\"onSelectedOption($event ?? null)\">\n </tk-select>\n </div>\n }\n <div class=\"toolbar__buttons\">\n @if (searchModel() !== undefined) {\n <tk-button\n [icon]=\"'magnifying-glass'\"\n severity=\"secondary\"\n [variant]=\"!showSearchInput() ? 'outlined' : undefined\"\n (clicked)=\"toggleSearchInput()\">\n </tk-button>\n } @if (filterModel() !== undefined) {\n <tk-button\n [icon]=\"'filter'\"\n severity=\"secondary\"\n [variant]=\"!showFilterSelect() ? 'outlined' : undefined\"\n (clicked)=\"toggleFilterSelect()\">\n </tk-button>\n }\n </div>\n</div>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAWa,gBAAgB,CAAA;AAN7B,IAAA,WAAA,GAAA;AAOE;;;;;;AAMG;AACH,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAS,EAAE,CAAC;AAE/B;;;;;;AAMG;AACH,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAgC,IAAI,CAAC;AAExD;;;;;AAKG;AACH,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAU,KAAK,CAAC;AAExC;;;;;AAKG;AACH,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAU,KAAK,CAAC;AAEzC;;;;;;;;;;;;AAYG;QACH,IAAa,CAAA,aAAA,GAAG,KAAK,CAA0C;AAC7D,YAAA,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE;AACvC,YAAA,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE;AACvC,YAAA,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE;AACxC,SAAA,CAAC;AAEF;;;;;;;AAOG;AACH,QAAA,IAAA,CAAA,iBAAiB,GAAG,KAAK,CAAS,O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EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,kBAAkB,mMAAE,eAAe,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,CAAA,IAAA,EAAA,SAAA,EAAA,SAAA,EAAA,aAAA,EAAA,OAAA,EAAA,WAAA,EAAA,UAAA,EAAA,cAAA,EAAA,MAAA,EAAA,OAAA,CAAA,EAAA,OAAA,EAAA,CAAA,aAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA;;4FAInD,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAN5B,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,YAAY,WACb,CAAC,eAAe,EAAE,kBAAkB,EAAE,eAAe,CAAC,EAAA,QAAA,EAAA,uqCAAA,EAAA,MAAA,EAAA,CAAA,6dAAA,CAAA,EAAA;;;AEPjE;;AAEG;;;;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tekus/design-system",
|
|
3
3
|
"description": "Tekus design system library",
|
|
4
|
-
"version": "5.8.
|
|
4
|
+
"version": "5.8.2",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"peerDependencies": {
|
|
7
7
|
"@angular/core": "^19.2.15",
|
|
@@ -39,26 +39,18 @@
|
|
|
39
39
|
"types": "./core/index.d.ts",
|
|
40
40
|
"default": "./fesm2022/tekus-design-system-core.mjs"
|
|
41
41
|
},
|
|
42
|
-
"./core/types": {
|
|
43
|
-
"types": "./core/types/index.d.ts",
|
|
44
|
-
"default": "./fesm2022/tekus-design-system-core-types.mjs"
|
|
45
|
-
},
|
|
46
|
-
"./directives/gird-item": {
|
|
47
|
-
"types": "./directives/gird-item/index.d.ts",
|
|
48
|
-
"default": "./fesm2022/tekus-design-system-directives-gird-item.mjs"
|
|
49
|
-
},
|
|
50
42
|
"./components/autocomplete": {
|
|
51
43
|
"types": "./components/autocomplete/index.d.ts",
|
|
52
44
|
"default": "./fesm2022/tekus-design-system-components-autocomplete.mjs"
|
|
53
45
|
},
|
|
54
|
-
"./components/button": {
|
|
55
|
-
"types": "./components/button/index.d.ts",
|
|
56
|
-
"default": "./fesm2022/tekus-design-system-components-button.mjs"
|
|
57
|
-
},
|
|
58
46
|
"./components/checkbox": {
|
|
59
47
|
"types": "./components/checkbox/index.d.ts",
|
|
60
48
|
"default": "./fesm2022/tekus-design-system-components-checkbox.mjs"
|
|
61
49
|
},
|
|
50
|
+
"./components/button": {
|
|
51
|
+
"types": "./components/button/index.d.ts",
|
|
52
|
+
"default": "./fesm2022/tekus-design-system-components-button.mjs"
|
|
53
|
+
},
|
|
62
54
|
"./components/date-picker": {
|
|
63
55
|
"types": "./components/date-picker/index.d.ts",
|
|
64
56
|
"default": "./fesm2022/tekus-design-system-components-date-picker.mjs"
|
|
@@ -111,6 +103,14 @@
|
|
|
111
103
|
"types": "./components/tooltip/index.d.ts",
|
|
112
104
|
"default": "./fesm2022/tekus-design-system-components-tooltip.mjs"
|
|
113
105
|
},
|
|
106
|
+
"./core/types": {
|
|
107
|
+
"types": "./core/types/index.d.ts",
|
|
108
|
+
"default": "./fesm2022/tekus-design-system-core-types.mjs"
|
|
109
|
+
},
|
|
110
|
+
"./directives/gird-item": {
|
|
111
|
+
"types": "./directives/gird-item/index.d.ts",
|
|
112
|
+
"default": "./fesm2022/tekus-design-system-directives-gird-item.mjs"
|
|
113
|
+
},
|
|
114
114
|
"./utils/sanitizer-utils": {
|
|
115
115
|
"types": "./utils/sanitizer-utils/index.d.ts",
|
|
116
116
|
"default": "./fesm2022/tekus-design-system-utils-sanitizer-utils.mjs"
|