@tekus/design-system 5.18.0 → 5.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/tokens/tk-foundations.json +3 -3
- package/components/checkbox/src/checkbox.component.d.ts +33 -2
- package/components/drawer/index.d.ts +5 -0
- package/components/drawer/public-api.d.ts +3 -0
- package/components/drawer/src/drawer.component.d.ts +105 -0
- package/components/drawer/src/drawer.types.d.ts +22 -0
- package/components/drawer/src/services/drawer.service.d.ts +15 -0
- package/components/icon/core/icons/arrows-rotate.d.ts +2 -0
- package/components/icon/core/icons/edit.d.ts +2 -0
- package/components/icon/core/icons/globe-pointer.d.ts +2 -0
- package/components/icon/core/icons/grip-vertical.d.ts +2 -0
- package/components/modal/src/modal.component.d.ts +86 -67
- package/components/modal/src/modal.types.d.ts +22 -2
- package/components/modal/src/services/modal.service.d.ts +15 -0
- package/components/multiselect/src/multiselect.component.d.ts +115 -19
- package/components/panel/index.d.ts +5 -0
- package/components/panel/public-api.d.ts +1 -0
- package/components/panel/src/panel.component.d.ts +82 -0
- package/components/radio-button/src/radio-button.component.d.ts +33 -3
- package/components/table/src/table.component.d.ts +45 -1
- package/components/table/src/table.interface.d.ts +1 -1
- package/components/toolbar/src/toolbar.component.d.ts +55 -1
- package/core/types/public-api.d.ts +1 -0
- package/core/types/src/interception/index.d.ts +1 -0
- package/core/types/src/interception/interception.types.d.ts +21 -0
- package/fesm2022/tekus-design-system-components-checkbox.mjs +52 -16
- package/fesm2022/tekus-design-system-components-checkbox.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-drawer.mjs +280 -0
- package/fesm2022/tekus-design-system-components-drawer.mjs.map +1 -0
- package/fesm2022/tekus-design-system-components-icon.mjs +56 -0
- package/fesm2022/tekus-design-system-components-icon.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-modal.mjs +190 -89
- package/fesm2022/tekus-design-system-components-modal.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-multiselect.mjs +164 -45
- package/fesm2022/tekus-design-system-components-multiselect.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-panel.mjs +102 -0
- package/fesm2022/tekus-design-system-components-panel.mjs.map +1 -0
- package/fesm2022/tekus-design-system-components-radio-button.mjs +53 -18
- package/fesm2022/tekus-design-system-components-radio-button.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-select.mjs +3 -8
- package/fesm2022/tekus-design-system-components-select.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-table.mjs +72 -5
- package/fesm2022/tekus-design-system-components-table.mjs.map +1 -1
- package/fesm2022/tekus-design-system-components-toolbar.mjs +72 -4
- package/fesm2022/tekus-design-system-components-toolbar.mjs.map +1 -1
- package/fesm2022/tekus-design-system-core-types.mjs +31 -1
- package/fesm2022/tekus-design-system-core-types.mjs.map +1 -1
- package/fesm2022/tekus-design-system-core.mjs +31 -1
- package/fesm2022/tekus-design-system-core.mjs.map +1 -1
- package/package.json +13 -5
- package/styles/variables.css +3 -3
|
@@ -1,21 +1,27 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { FormControl } from '@angular/forms';
|
|
1
|
+
import { ControlValueAccessor, FormControl, NgControl } from '@angular/forms';
|
|
3
2
|
import { MultiSelectOption } from './multiselect.types';
|
|
4
3
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class MultiselectComponent {
|
|
4
|
+
export declare class MultiselectComponent implements ControlValueAccessor {
|
|
5
|
+
readonly ngControl: NgControl | null;
|
|
6
|
+
constructor();
|
|
6
7
|
/**
|
|
7
|
-
* @property {
|
|
8
|
+
* @property {Signal<MultiSelectOption[]>} selectionPool
|
|
8
9
|
* @description
|
|
9
|
-
*
|
|
10
|
-
* If not provided, an internal FormControl is created with an empty array value.
|
|
10
|
+
* Internal signal to keep track of selected items even if they are filtered out from the main options list.
|
|
11
11
|
*/
|
|
12
|
-
|
|
12
|
+
private readonly selectionPool;
|
|
13
|
+
/**
|
|
14
|
+
* @property {ModelSignal<MultiSelectOption[] | null>} model
|
|
15
|
+
* @description
|
|
16
|
+
* The model signal for two-way binding.
|
|
17
|
+
*/
|
|
18
|
+
readonly model: import("@angular/core").ModelSignal<MultiSelectOption[] | null>;
|
|
13
19
|
/**
|
|
14
20
|
* @property {MultiSelectOption[]} options
|
|
15
21
|
* @description
|
|
16
22
|
* Array of available options shown in the multiselect dropdown.
|
|
17
23
|
*/
|
|
18
|
-
options: MultiSelectOption[]
|
|
24
|
+
options: import("@angular/core").InputSignal<MultiSelectOption[]>;
|
|
19
25
|
/**
|
|
20
26
|
* @property {string} labelText
|
|
21
27
|
* @description
|
|
@@ -23,7 +29,7 @@ export declare class MultiselectComponent {
|
|
|
23
29
|
*
|
|
24
30
|
* @default 'Select'
|
|
25
31
|
*/
|
|
26
|
-
labelText: string
|
|
32
|
+
labelText: import("@angular/core").InputSignal<string>;
|
|
27
33
|
/**
|
|
28
34
|
* @property {string} display
|
|
29
35
|
* @description
|
|
@@ -31,7 +37,7 @@ export declare class MultiselectComponent {
|
|
|
31
37
|
*
|
|
32
38
|
* @default 'chip'
|
|
33
39
|
*/
|
|
34
|
-
display: string
|
|
40
|
+
display: import("@angular/core").InputSignal<string>;
|
|
35
41
|
/**
|
|
36
42
|
* @property {number} maxSelectedLabels
|
|
37
43
|
* @description
|
|
@@ -39,7 +45,7 @@ export declare class MultiselectComponent {
|
|
|
39
45
|
*
|
|
40
46
|
* @default 4
|
|
41
47
|
*/
|
|
42
|
-
maxSelectedLabels: number
|
|
48
|
+
maxSelectedLabels: import("@angular/core").InputSignal<number>;
|
|
43
49
|
/**
|
|
44
50
|
* @property {string} selectedItemsLabel
|
|
45
51
|
* @description
|
|
@@ -47,7 +53,7 @@ export declare class MultiselectComponent {
|
|
|
47
53
|
*
|
|
48
54
|
* @default '{0} elementos seleccionados'
|
|
49
55
|
*/
|
|
50
|
-
selectedItemsLabel: string
|
|
56
|
+
selectedItemsLabel: import("@angular/core").InputSignal<string>;
|
|
51
57
|
/**
|
|
52
58
|
* @property {string} emptyFilterMessage
|
|
53
59
|
* @description
|
|
@@ -55,7 +61,7 @@ export declare class MultiselectComponent {
|
|
|
55
61
|
*
|
|
56
62
|
* @default 'No hay resultados'
|
|
57
63
|
*/
|
|
58
|
-
emptyFilterMessage: string
|
|
64
|
+
emptyFilterMessage: import("@angular/core").InputSignal<string>;
|
|
59
65
|
/**
|
|
60
66
|
* @property {boolean} filter
|
|
61
67
|
* @description
|
|
@@ -63,13 +69,13 @@ export declare class MultiselectComponent {
|
|
|
63
69
|
*
|
|
64
70
|
* @default true
|
|
65
71
|
*/
|
|
66
|
-
filter: boolean
|
|
72
|
+
filter: import("@angular/core").InputSignal<boolean>;
|
|
67
73
|
/**
|
|
68
74
|
* @property {string} filterPlaceHolder
|
|
69
75
|
* @description
|
|
70
76
|
* Placeholder text for the filter input.
|
|
71
77
|
*/
|
|
72
|
-
filterPlaceHolder: string
|
|
78
|
+
filterPlaceHolder: import("@angular/core").InputSignal<string>;
|
|
73
79
|
/**
|
|
74
80
|
* @property {string} id
|
|
75
81
|
* @description
|
|
@@ -77,13 +83,25 @@ export declare class MultiselectComponent {
|
|
|
77
83
|
*
|
|
78
84
|
* @default 'multiselect'
|
|
79
85
|
*/
|
|
80
|
-
id: string
|
|
86
|
+
id: import("@angular/core").InputSignal<string>;
|
|
81
87
|
/**
|
|
82
88
|
* @property {string} styleClass
|
|
83
89
|
* @description
|
|
84
90
|
* Additional CSS class applied to the multiselect container.
|
|
85
91
|
*/
|
|
86
|
-
styleClass: string
|
|
92
|
+
styleClass: import("@angular/core").InputSignal<string>;
|
|
93
|
+
/**
|
|
94
|
+
* @property {InputSignal<string>} errorMessage
|
|
95
|
+
* @description
|
|
96
|
+
* Message to display when the control is invalid and touched.
|
|
97
|
+
*/
|
|
98
|
+
errorMessage: import("@angular/core").InputSignal<string>;
|
|
99
|
+
/**
|
|
100
|
+
* @property {InputSignal<string>} hint
|
|
101
|
+
* @description
|
|
102
|
+
* Hint text to display below the input.
|
|
103
|
+
*/
|
|
104
|
+
hint: import("@angular/core").InputSignal<string>;
|
|
87
105
|
/**
|
|
88
106
|
* @event selectionChange
|
|
89
107
|
* @description
|
|
@@ -93,7 +111,42 @@ export declare class MultiselectComponent {
|
|
|
93
111
|
* @example
|
|
94
112
|
* <tk-multiselect (selectionChange)="onChange($event)"></tk-multiselect>
|
|
95
113
|
*/
|
|
96
|
-
selectionChange:
|
|
114
|
+
selectionChange: import("@angular/core").OutputEmitterRef<MultiSelectOption[] | null>;
|
|
115
|
+
/**
|
|
116
|
+
* @event filterChange
|
|
117
|
+
* @description
|
|
118
|
+
* Emits the filter text when the user types in the search input.
|
|
119
|
+
*/
|
|
120
|
+
readonly filterChange: import("@angular/core").OutputEmitterRef<string>;
|
|
121
|
+
/**
|
|
122
|
+
* @property internalOptions
|
|
123
|
+
* @description
|
|
124
|
+
* Computed signal that merges the current options with the selected items pool
|
|
125
|
+
* to ensure selected items are always visible.
|
|
126
|
+
*/
|
|
127
|
+
readonly internalOptions: import("@angular/core").Signal<any[]>;
|
|
128
|
+
/**
|
|
129
|
+
* @method handleFilter
|
|
130
|
+
* @description
|
|
131
|
+
* Handles the filter event from the PrimeNG component and emits the filter value.
|
|
132
|
+
*
|
|
133
|
+
* @param event - The filter event object.
|
|
134
|
+
*/
|
|
135
|
+
handleFilter(event: {
|
|
136
|
+
filter: string;
|
|
137
|
+
}): void;
|
|
138
|
+
/**
|
|
139
|
+
* @callback onChange
|
|
140
|
+
* @description
|
|
141
|
+
* Callback function to notify the parent component of value changes.
|
|
142
|
+
*/
|
|
143
|
+
onChange: (value: MultiSelectOption[] | null) => void;
|
|
144
|
+
/**
|
|
145
|
+
* @callback onTouched
|
|
146
|
+
* @description
|
|
147
|
+
* Callback function to notify the parent component when the control is touched.
|
|
148
|
+
*/
|
|
149
|
+
onTouched: () => void;
|
|
97
150
|
/**
|
|
98
151
|
* @method handleChange
|
|
99
152
|
* @description
|
|
@@ -105,6 +158,49 @@ export declare class MultiselectComponent {
|
|
|
105
158
|
handleChange(event: {
|
|
106
159
|
value: MultiSelectOption[] | null;
|
|
107
160
|
}): void;
|
|
161
|
+
/**
|
|
162
|
+
* @method updateSelectionPool
|
|
163
|
+
* @description
|
|
164
|
+
* Updates the internal selection pool to ensure selected items persist
|
|
165
|
+
* even if they are filtered out from the main options list.
|
|
166
|
+
*
|
|
167
|
+
* @param items - The items to add to the pool.
|
|
168
|
+
*/
|
|
169
|
+
private updateSelectionPool;
|
|
170
|
+
/**
|
|
171
|
+
* @method writeValue
|
|
172
|
+
* @description
|
|
173
|
+
* Writes a new value to the element.
|
|
174
|
+
* Part of the ControlValueAccessor interface.
|
|
175
|
+
*
|
|
176
|
+
* @param value - The new value.
|
|
177
|
+
*/
|
|
178
|
+
writeValue(value: MultiSelectOption[] | null): void;
|
|
179
|
+
/**
|
|
180
|
+
* @method registerOnChange
|
|
181
|
+
* @description
|
|
182
|
+
* Registers a callback function that is called when the control's value changes in the UI.
|
|
183
|
+
* Part of the ControlValueAccessor interface.
|
|
184
|
+
*
|
|
185
|
+
* @param fn - The callback function.
|
|
186
|
+
*/
|
|
187
|
+
registerOnChange(fn: (value: MultiSelectOption[] | null) => void): void;
|
|
188
|
+
/**
|
|
189
|
+
* @method registerOnTouched
|
|
190
|
+
* @description
|
|
191
|
+
* Registers a callback function that is called by the forms API on initialization to update the form control on 'blur'.
|
|
192
|
+
* Part of the ControlValueAccessor interface.
|
|
193
|
+
*
|
|
194
|
+
* @param fn - The callback function.
|
|
195
|
+
*/
|
|
196
|
+
registerOnTouched(fn: () => void): void;
|
|
197
|
+
/**
|
|
198
|
+
* @method effectiveControl
|
|
199
|
+
* @description
|
|
200
|
+
* Gets the effective FormControl associated with this component,
|
|
201
|
+
* either from NgControl or the internal model.
|
|
202
|
+
*/
|
|
203
|
+
get effectiveControl(): FormControl | null;
|
|
108
204
|
static ɵfac: i0.ɵɵFactoryDeclaration<MultiselectComponent, never>;
|
|
109
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MultiselectComponent, "tk-multiselect", never, { "
|
|
205
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MultiselectComponent, "tk-multiselect", never, { "model": { "alias": "model"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "labelText": { "alias": "labelText"; "required": false; "isSignal": true; }; "display": { "alias": "display"; "required": false; "isSignal": true; }; "maxSelectedLabels": { "alias": "maxSelectedLabels"; "required": false; "isSignal": true; }; "selectedItemsLabel": { "alias": "selectedItemsLabel"; "required": false; "isSignal": true; }; "emptyFilterMessage": { "alias": "emptyFilterMessage"; "required": false; "isSignal": true; }; "filter": { "alias": "filter"; "required": false; "isSignal": true; }; "filterPlaceHolder": { "alias": "filterPlaceHolder"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "styleClass": { "alias": "styleClass"; "required": false; "isSignal": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; }, { "model": "modelChange"; "selectionChange": "selectionChange"; "filterChange": "filterChange"; }, never, never, true, never>;
|
|
110
206
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src/panel.component';
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* @component PanelComponent
|
|
5
|
+
* @description
|
|
6
|
+
* Panel is a container component with an optional content toggle feature.
|
|
7
|
+
* It wraps PrimeNG's Panel component and provides a consistent design across the application.
|
|
8
|
+
*
|
|
9
|
+
* The panel can be toggled between expanded and collapsed states using the chevron icon
|
|
10
|
+
* in the header. The component uses custom tk-icon for the toggle icons.
|
|
11
|
+
*
|
|
12
|
+
* @usage
|
|
13
|
+
* ```html
|
|
14
|
+
* <tk-panel
|
|
15
|
+
* header="Panel Title"
|
|
16
|
+
* [toggleable]="true"
|
|
17
|
+
* [collapsed]="false">
|
|
18
|
+
* <p>Panel content goes here</p>
|
|
19
|
+
* </tk-panel>
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare class PanelComponent {
|
|
23
|
+
/**
|
|
24
|
+
* @property {string} header
|
|
25
|
+
* @description
|
|
26
|
+
* Header text displayed at the top of the panel.
|
|
27
|
+
*
|
|
28
|
+
* @default undefined
|
|
29
|
+
*/
|
|
30
|
+
header?: string;
|
|
31
|
+
/**
|
|
32
|
+
* @property {boolean} toggleable
|
|
33
|
+
* @description
|
|
34
|
+
* When enabled, the panel content can be expanded and collapsed.
|
|
35
|
+
*
|
|
36
|
+
* @default false
|
|
37
|
+
*/
|
|
38
|
+
toggleable: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* @property {boolean} collapsed
|
|
41
|
+
* @description
|
|
42
|
+
* Defines whether the panel is collapsed or expanded.
|
|
43
|
+
* Supports two-way binding.
|
|
44
|
+
*
|
|
45
|
+
* @default false
|
|
46
|
+
*/
|
|
47
|
+
collapsed: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* @event collapsedChange
|
|
50
|
+
* @description
|
|
51
|
+
* Emits when the collapsed state changes.
|
|
52
|
+
* Enables two-way binding with [(collapsed)].
|
|
53
|
+
*/
|
|
54
|
+
collapsedChange: EventEmitter<boolean>;
|
|
55
|
+
/**
|
|
56
|
+
* @event toggled
|
|
57
|
+
* @description
|
|
58
|
+
* Callback to invoke when the panel is toggled.
|
|
59
|
+
* Emits an object with the collapsed state.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```html
|
|
63
|
+
* <tk-panel (toggled)="handleToggle($event)"></tk-panel>
|
|
64
|
+
* ```
|
|
65
|
+
*/
|
|
66
|
+
toggled: EventEmitter<{
|
|
67
|
+
collapsed: boolean;
|
|
68
|
+
}>;
|
|
69
|
+
/**
|
|
70
|
+
* @method handleToggle
|
|
71
|
+
* @description
|
|
72
|
+
* Handles the toggle event from the PrimeNG panel.
|
|
73
|
+
* Updates the collapsed state and emits the appropriate events.
|
|
74
|
+
*
|
|
75
|
+
* @param event - The toggle event from PrimeNG panel
|
|
76
|
+
*/
|
|
77
|
+
handleToggle(event: {
|
|
78
|
+
collapsed: boolean | undefined;
|
|
79
|
+
}): void;
|
|
80
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PanelComponent, never>;
|
|
81
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PanelComponent, "tk-panel", never, { "header": { "alias": "header"; "required": false; }; "toggleable": { "alias": "toggleable"; "required": false; }; "collapsed": { "alias": "collapsed"; "required": false; }; }, { "collapsedChange": "collapsedChange"; "toggled": "toggled"; }, never, ["*"], true, never>;
|
|
82
|
+
}
|
|
@@ -3,6 +3,9 @@ import { ControlValueAccessor, FormControl, NgControl } from '@angular/forms';
|
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class RadioButtonComponent implements ControlValueAccessor, OnInit, OnDestroy {
|
|
5
5
|
readonly ngControl: NgControl | null;
|
|
6
|
+
/**
|
|
7
|
+
* Initialize the component and register it as a ControlValueAccessor.
|
|
8
|
+
*/
|
|
6
9
|
constructor();
|
|
7
10
|
/**
|
|
8
11
|
* @property {ModelSignal<any>} model
|
|
@@ -49,23 +52,50 @@ export declare class RadioButtonComponent implements ControlValueAccessor, OnIni
|
|
|
49
52
|
*/
|
|
50
53
|
errorMessage: import("@angular/core").InputSignal<string>;
|
|
51
54
|
/**
|
|
52
|
-
* @property {boolean} disabled
|
|
55
|
+
* @property {ModelSignal<boolean>} disabled
|
|
53
56
|
* @description
|
|
54
57
|
* Whether the radio button is disabled.
|
|
55
58
|
*/
|
|
56
|
-
disabled: import("@angular/core").
|
|
59
|
+
disabled: import("@angular/core").ModelSignal<boolean>;
|
|
60
|
+
/**
|
|
61
|
+
* Returns the control currently in use, either from NgControl or the standalone Input.
|
|
62
|
+
*/
|
|
57
63
|
get effectiveControl(): FormControl;
|
|
58
64
|
onChange: (value: unknown) => void;
|
|
59
65
|
onTouched: () => void;
|
|
60
66
|
private readonly subscription;
|
|
67
|
+
/**
|
|
68
|
+
* Configure synchronization between the form control and component state.
|
|
69
|
+
*/
|
|
61
70
|
ngOnInit(): void;
|
|
71
|
+
/**
|
|
72
|
+
* Clean up subscriptions.
|
|
73
|
+
*/
|
|
62
74
|
ngOnDestroy(): void;
|
|
75
|
+
/**
|
|
76
|
+
* Implementation of ControlValueAccessor: Writes a new value from the form.
|
|
77
|
+
*/
|
|
63
78
|
writeValue(value: unknown): void;
|
|
79
|
+
/**
|
|
80
|
+
* Implementation of ControlValueAccessor: Registers a callback for change events.
|
|
81
|
+
*/
|
|
64
82
|
registerOnChange(fn: (value: unknown) => void): void;
|
|
83
|
+
/**
|
|
84
|
+
* Implementation of ControlValueAccessor: Registers a callback for touched events.
|
|
85
|
+
*/
|
|
65
86
|
registerOnTouched(fn: () => void): void;
|
|
87
|
+
/**
|
|
88
|
+
* Implementation of ControlValueAccessor: Sets the disabled state.
|
|
89
|
+
*/
|
|
66
90
|
setDisabledState?(isDisabled: boolean): void;
|
|
91
|
+
/**
|
|
92
|
+
* Handle model change events from the template.
|
|
93
|
+
*/
|
|
67
94
|
onModelChange(value: unknown): void;
|
|
95
|
+
/**
|
|
96
|
+
* Handle blur events to trigger onTouched.
|
|
97
|
+
*/
|
|
68
98
|
onBlur(): void;
|
|
69
99
|
static ɵfac: i0.ɵɵFactoryDeclaration<RadioButtonComponent, never>;
|
|
70
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<RadioButtonComponent, "tk-radio-button", never, { "model": { "alias": "model"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "inputId": { "alias": "inputId"; "required": false; "isSignal": true; }; "control": { "alias": "control"; "required": false; "isSignal": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; }, { "model": "modelChange"; }, never, never, true, never>;
|
|
100
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<RadioButtonComponent, "tk-radio-button", never, { "model": { "alias": "model"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "inputId": { "alias": "inputId"; "required": false; "isSignal": true; }; "control": { "alias": "control"; "required": false; "isSignal": true; }; "errorMessage": { "alias": "errorMessage"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "model": "modelChange"; "disabled": "disabledChange"; }, never, never, true, never>;
|
|
71
101
|
}
|
|
@@ -41,12 +41,56 @@ export declare class TableComponent<T = unknown> {
|
|
|
41
41
|
* ]"
|
|
42
42
|
*/
|
|
43
43
|
columns: import("@angular/core").InputSignal<TableColumn<T>[]>;
|
|
44
|
+
/**
|
|
45
|
+
* @property {InputSignal<'single' | 'multiple' | undefined>} selectionMode
|
|
46
|
+
* @description
|
|
47
|
+
* Selection mode of the table.
|
|
48
|
+
*/
|
|
49
|
+
selectionMode: import("@angular/core").InputSignal<"single" | "multiple" | undefined>;
|
|
50
|
+
/**
|
|
51
|
+
* @property {ModelSignal<any[]>} selection
|
|
52
|
+
* @description
|
|
53
|
+
* Selected row(s) in the table.
|
|
54
|
+
*/
|
|
55
|
+
selection: import("@angular/core").ModelSignal<T[]>;
|
|
56
|
+
/**
|
|
57
|
+
* @property {InputSignal<string | undefined>} dataKey
|
|
58
|
+
* @description
|
|
59
|
+
* Property name to uniquely identify a row.
|
|
60
|
+
*/
|
|
61
|
+
dataKey: import("@angular/core").InputSignal<string | undefined>;
|
|
44
62
|
initialData: T[];
|
|
45
63
|
internalData: T[];
|
|
46
64
|
isSorted: boolean | null;
|
|
65
|
+
/**
|
|
66
|
+
* @computed isAllSelected
|
|
67
|
+
* @description
|
|
68
|
+
* Returns true if all visible rows are selected.
|
|
69
|
+
*/
|
|
70
|
+
isAllSelected: import("@angular/core").Signal<boolean>;
|
|
71
|
+
/**
|
|
72
|
+
* @computed isPartiallySelected
|
|
73
|
+
* @description
|
|
74
|
+
* Returns true if some but not all rows are selected.
|
|
75
|
+
*/
|
|
76
|
+
isPartiallySelected: import("@angular/core").Signal<boolean>;
|
|
47
77
|
constructor();
|
|
78
|
+
/**
|
|
79
|
+
* @method toggleAll
|
|
80
|
+
* @description
|
|
81
|
+
* Toggles selection of all visible rows using full objects.
|
|
82
|
+
* @param checked {unknown}
|
|
83
|
+
*/
|
|
84
|
+
toggleAll(checked: unknown): void;
|
|
85
|
+
/**
|
|
86
|
+
* @method updateSelection
|
|
87
|
+
* @description
|
|
88
|
+
* Updates row selection state from checkbox interaction.
|
|
89
|
+
* @param value {any[]}
|
|
90
|
+
*/
|
|
91
|
+
updateSelection(value: T[]): void;
|
|
48
92
|
customSort(event: SortEvent): void;
|
|
49
93
|
sortTableData(event: SortEvent): void;
|
|
50
94
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableComponent<any>, never>;
|
|
51
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent<any>, "tk-table", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
95
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TableComponent<any>, "tk-table", never, { "data": { "alias": "data"; "required": false; "isSignal": true; }; "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "selection": { "alias": "selection"; "required": false; "isSignal": true; }; "dataKey": { "alias": "dataKey"; "required": false; "isSignal": true; }; }, { "selection": "selectionChange"; }, never, never, true, never>;
|
|
52
96
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TagSeverity } from '@tekus/design-system/components/tag';
|
|
2
|
-
export type TableColumnType = 'text' | 'tag' | 'actions';
|
|
2
|
+
export type TableColumnType = 'text' | 'tag' | 'actions' | 'selection' | 'checkbox';
|
|
3
3
|
export interface TableColumn<T = unknown> {
|
|
4
4
|
field?: string;
|
|
5
5
|
header: string;
|
|
@@ -74,6 +74,54 @@ export declare class ToolbarComponent {
|
|
|
74
74
|
* @default 'Buscar'
|
|
75
75
|
*/
|
|
76
76
|
searchFloatLabel: import("@angular/core").InputSignal<string>;
|
|
77
|
+
/**
|
|
78
|
+
* @property {InputSignal<boolean>} searchVisible
|
|
79
|
+
* @description
|
|
80
|
+
* Controls the visibility of the search button.
|
|
81
|
+
* @default true
|
|
82
|
+
*/
|
|
83
|
+
searchVisible: import("@angular/core").InputSignal<boolean>;
|
|
84
|
+
/**
|
|
85
|
+
* @property {InputSignal<boolean>} filterVisible
|
|
86
|
+
* @description
|
|
87
|
+
* Controls the visibility of the filter button.
|
|
88
|
+
* @default true
|
|
89
|
+
*/
|
|
90
|
+
filterVisible: import("@angular/core").InputSignal<boolean>;
|
|
91
|
+
/**
|
|
92
|
+
* @property {InputSignal<boolean>} reloadVisible
|
|
93
|
+
* @description
|
|
94
|
+
* Controls the visibility of the reload button.
|
|
95
|
+
* @default false
|
|
96
|
+
*/
|
|
97
|
+
reloadVisible: import("@angular/core").InputSignal<boolean>;
|
|
98
|
+
/**
|
|
99
|
+
* @property {InputSignal<number | null>} reloadInterval
|
|
100
|
+
* @description
|
|
101
|
+
* Sets the interval for automatic reload in milliseconds.
|
|
102
|
+
* If null, automatic reload is disabled.
|
|
103
|
+
* @default null
|
|
104
|
+
*/
|
|
105
|
+
reloadInterval: import("@angular/core").InputSignal<number | null>;
|
|
106
|
+
/**
|
|
107
|
+
* @property {InputSignal<boolean>} loading
|
|
108
|
+
* @description
|
|
109
|
+
* Controls the loading state of the reload button, triggering a rotation animation.
|
|
110
|
+
* @default false
|
|
111
|
+
*/
|
|
112
|
+
loading: import("@angular/core").InputSignal<boolean>;
|
|
113
|
+
/**
|
|
114
|
+
* @property {OutputEmitter<void>} reload
|
|
115
|
+
* @description
|
|
116
|
+
* Emits an event when the reload button is clicked or the automatic interval is reached.
|
|
117
|
+
*/
|
|
118
|
+
reload: import("@angular/core").OutputEmitterRef<void>;
|
|
119
|
+
/**
|
|
120
|
+
* @method constructor
|
|
121
|
+
* @description
|
|
122
|
+
* Initializes the automatic reload logic using a declarative RxJS approach.
|
|
123
|
+
*/
|
|
124
|
+
constructor();
|
|
77
125
|
/**
|
|
78
126
|
* @method toggleSearchInput
|
|
79
127
|
* @description
|
|
@@ -94,6 +142,12 @@ export declare class ToolbarComponent {
|
|
|
94
142
|
* @param value - Selected option value from tk-select
|
|
95
143
|
*/
|
|
96
144
|
onSelectedOption(value: Record<string, string> | null): void;
|
|
145
|
+
/**
|
|
146
|
+
* @method onReload
|
|
147
|
+
* @description
|
|
148
|
+
* Emits the reload event.
|
|
149
|
+
*/
|
|
150
|
+
onReload(): void;
|
|
97
151
|
static ɵfac: i0.ɵɵFactoryDeclaration<ToolbarComponent, never>;
|
|
98
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ToolbarComponent, "tk-toolbar", never, { "searchModel": { "alias": "searchModel"; "required": false; "isSignal": true; }; "filterModel": { "alias": "filterModel"; "required": false; "isSignal": true; }; "filterOptions": { "alias": "filterOptions"; "required": false; "isSignal": true; }; "filterOptionLabel": { "alias": "filterOptionLabel"; "required": false; "isSignal": true; }; "filterFloatLabel": { "alias": "filterFloatLabel"; "required": false; "isSignal": true; }; "searchFloatLabel": { "alias": "searchFloatLabel"; "required": false; "isSignal": true; }; }, { "searchModel": "searchModelChange"; "filterModel": "filterModelChange"; }, never, never, true, never>;
|
|
152
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ToolbarComponent, "tk-toolbar", never, { "searchModel": { "alias": "searchModel"; "required": false; "isSignal": true; }; "filterModel": { "alias": "filterModel"; "required": false; "isSignal": true; }; "filterOptions": { "alias": "filterOptions"; "required": false; "isSignal": true; }; "filterOptionLabel": { "alias": "filterOptionLabel"; "required": false; "isSignal": true; }; "filterFloatLabel": { "alias": "filterFloatLabel"; "required": false; "isSignal": true; }; "searchFloatLabel": { "alias": "searchFloatLabel"; "required": false; "isSignal": true; }; "searchVisible": { "alias": "searchVisible"; "required": false; "isSignal": true; }; "filterVisible": { "alias": "filterVisible"; "required": false; "isSignal": true; }; "reloadVisible": { "alias": "reloadVisible"; "required": false; "isSignal": true; }; "reloadInterval": { "alias": "reloadInterval"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; }, { "searchModel": "searchModelChange"; "filterModel": "filterModelChange"; "reload": "reload"; }, never, never, true, never>;
|
|
99
153
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './interception.types';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interface that can be optionally implemented by components loaded into overlays
|
|
3
|
+
* (Modals, Drawers, etc.) to intercept the closing process.
|
|
4
|
+
*/
|
|
5
|
+
export interface TkCanClose {
|
|
6
|
+
/**
|
|
7
|
+
* Function or Signal indicating if the component can be closed.
|
|
8
|
+
* When returning false, the overlay will prevent closure.
|
|
9
|
+
*/
|
|
10
|
+
canClose?: () => boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Optional hook called when a user attempt to close the overlay is blocked
|
|
13
|
+
* by the canClose() returning false.
|
|
14
|
+
*/
|
|
15
|
+
onBlockedClose?(): void;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Type definition for the overlay closing interceptor.
|
|
19
|
+
* It must be a synchronous function returning the "allowed" state.
|
|
20
|
+
*/
|
|
21
|
+
export type TkCloseInterceptor = () => boolean;
|