@tekus/design-system 5.33.1 → 5.34.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.
@@ -0,0 +1,36 @@
1
+ import * as _angular_core from '@angular/core';
2
+
3
+ /**
4
+ * @component ChipComponent
5
+ * @description
6
+ * A component used to display compact elements like labels, filters, or attributes.
7
+ * It wraps PrimeNG's `p-chip` component with custom styling and behavior.
8
+ *
9
+ * This component supports:
10
+ * - `label`: The text to display.
11
+ * - `icon`: Optional icon before the text.
12
+ * - `image`: Optional avatar image.
13
+ * - `removable`: Displays a close button that triggers the `removed` output.
14
+ *
15
+ * @usage
16
+ * ### Basic Usage
17
+ * ```html
18
+ * <tk-chip label="Design"></tk-chip>
19
+ * ```
20
+ */
21
+ declare class ChipComponent {
22
+ /** The text label to display on the chip. */
23
+ label: _angular_core.InputSignal<string | undefined>;
24
+ /** Icon class to display before the label. */
25
+ icon: _angular_core.InputSignal<string | undefined>;
26
+ /** Whether the chip is removable. If true, displays a close icon. */
27
+ removable: _angular_core.InputSignal<boolean>;
28
+ /** Custom icon class for the close button. */
29
+ removeIcon: _angular_core.InputSignal<string | undefined>;
30
+ /** Event emitted when the close/remove button is clicked. */
31
+ removed: _angular_core.OutputEmitterRef<Event>;
32
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ChipComponent, never>;
33
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ChipComponent, "tk-chip", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "removable": { "alias": "removable"; "required": false; "isSignal": true; }; "removeIcon": { "alias": "removeIcon"; "required": false; "isSignal": true; }; }, { "removed": "removed"; }, never, never, true, never>;
34
+ }
35
+
36
+ export { ChipComponent };
@@ -5,6 +5,7 @@ import { SeverityType } from '@tekus/design-system/components/modal';
5
5
  import { TkCloseInterceptor, TkDialogRef } from '@tekus/design-system/core/types';
6
6
 
7
7
  type DrawerSizeType = 'small' | 'large';
8
+ type DrawerDirectionType = 'right' | 'bottom';
8
9
  interface DrawerHeaderAction {
9
10
  label: string;
10
11
  severity: SeverityType;
@@ -20,6 +21,7 @@ interface DrawerConfig<T = unknown> {
20
21
  hasTabs?: boolean;
21
22
  headerAction?: DrawerHeaderAction;
22
23
  size?: DrawerSizeType;
24
+ direction?: DrawerDirectionType;
23
25
  closable?: boolean;
24
26
  dismissible?: boolean;
25
27
  data?: Partial<T>;
@@ -81,6 +83,8 @@ declare class DrawerComponent<T = unknown> implements OnDestroy {
81
83
  hasTabs: _angular_core.InputSignal<boolean>;
82
84
  /** Drawer size: 'small' (500px), 'large' (1024px) */
83
85
  size: _angular_core.InputSignal<DrawerSizeType>;
86
+ /** Drawer direction: 'right' (default) or 'bottom' */
87
+ direction: _angular_core.InputSignal<DrawerDirectionType>;
84
88
  /** Whether the drawer can be closed by the user via close button */
85
89
  closable: _angular_core.InputSignal<boolean>;
86
90
  /** Whether clicking the mask closes the drawer */
@@ -91,10 +95,17 @@ declare class DrawerComponent<T = unknown> implements OnDestroy {
91
95
  interceptor: _angular_core.InputSignal<TkCloseInterceptor | undefined>;
92
96
  isContentString: _angular_core.Signal<boolean>;
93
97
  hasHeaderAction: _angular_core.Signal<boolean>;
94
- /** Computed: drawer width (responsive) and max-width based on `size`. Always right position. */
98
+ /** Computed: drawer style based on size and direction. */
95
99
  drawerStyle: _angular_core.Signal<{
100
+ width: string;
101
+ height: string;
102
+ maxHeight: string;
103
+ maxWidth?: undefined;
104
+ } | {
96
105
  width: string;
97
106
  maxWidth: string;
107
+ height?: undefined;
108
+ maxHeight?: undefined;
98
109
  }>;
99
110
  /** Visibility flag. Use model for two-way binding when using drawer in template. */
100
111
  isOpened: _angular_core.ModelSignal<boolean>;
@@ -137,7 +148,7 @@ declare class DrawerComponent<T = unknown> implements OnDestroy {
137
148
  handleHeaderAction(action: (() => void) | undefined, returnValue: unknown): void;
138
149
  private resetClosureState;
139
150
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<DrawerComponent<any>, never>;
140
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<DrawerComponent<any>, "tk-drawer", never, { "dialogRef": { "alias": "dialogRef"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": true; "isSignal": true; }; "content": { "alias": "content"; "required": false; "isSignal": true; }; "headerAction": { "alias": "headerAction"; "required": false; "isSignal": true; }; "tag": { "alias": "tag"; "required": false; "isSignal": true; }; "subtle": { "alias": "subtle"; "required": false; "isSignal": true; }; "hasTabs": { "alias": "hasTabs"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "closable": { "alias": "closable"; "required": false; "isSignal": true; }; "dismissible": { "alias": "dismissible"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "interceptor": { "alias": "interceptor"; "required": false; "isSignal": true; }; "isOpened": { "alias": "isOpened"; "required": false; "isSignal": true; }; }, { "isOpened": "isOpenedChange"; "closed": "closed"; }, never, never, true, never>;
151
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<DrawerComponent<any>, "tk-drawer", never, { "dialogRef": { "alias": "dialogRef"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": true; "isSignal": true; }; "content": { "alias": "content"; "required": false; "isSignal": true; }; "headerAction": { "alias": "headerAction"; "required": false; "isSignal": true; }; "tag": { "alias": "tag"; "required": false; "isSignal": true; }; "subtle": { "alias": "subtle"; "required": false; "isSignal": true; }; "hasTabs": { "alias": "hasTabs"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "direction": { "alias": "direction"; "required": false; "isSignal": true; }; "closable": { "alias": "closable"; "required": false; "isSignal": true; }; "dismissible": { "alias": "dismissible"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "interceptor": { "alias": "interceptor"; "required": false; "isSignal": true; }; "isOpened": { "alias": "isOpened"; "required": false; "isSignal": true; }; }, { "isOpened": "isOpenedChange"; "closed": "closed"; }, never, ["*"], true, never>;
141
152
  }
142
153
 
143
154
  declare class DrawerService {
@@ -151,4 +162,4 @@ declare class DrawerService {
151
162
  }
152
163
 
153
164
  export { DrawerComponent, DrawerService };
154
- export type { DrawerConfig, DrawerHeaderAction, DrawerSizeType };
165
+ export type { DrawerConfig, DrawerDirectionType, DrawerHeaderAction, DrawerSizeType };
@@ -177,6 +177,16 @@ declare class MultiselectComponent implements ControlValueAccessor, OnDestroy {
177
177
  * Placeholder text for the filter input.
178
178
  */
179
179
  filterPlaceHolder: _angular_core.InputSignal<string>;
180
+ /**
181
+ * Target element or selector to append the overlay panel to.
182
+ * @default undefined
183
+ */
184
+ appendTo: _angular_core.InputSignal<string | HTMLElement | null | undefined>;
185
+ /**
186
+ * Custom style class to apply to the overlay panel.
187
+ * @default undefined
188
+ */
189
+ panelStyleClass: _angular_core.InputSignal<string | undefined>;
180
190
  /**
181
191
  * @property {string} id
182
192
  * @description
@@ -360,7 +370,7 @@ declare class MultiselectComponent implements ControlValueAccessor, OnDestroy {
360
370
  */
361
371
  get effectiveControl(): FormControl | null;
362
372
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<MultiselectComponent, never>;
363
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<MultiselectComponent, "tk-multiselect", never, { "model": { "alias": "model"; "required": false; "isSignal": true; }; "dataSource": { "alias": "dataSource"; "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; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; "isSignal": true; }; "fetchParams": { "alias": "fetchParams"; "required": false; "isSignal": true; }; "sortField": { "alias": "sortField"; "required": false; "isSignal": true; }; "sortOrder": { "alias": "sortOrder"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "model": "modelChange"; "dataSource": "dataSourceChange"; "selectionChange": "selectionChange"; "filterChange": "filterChange"; }, never, never, true, never>;
373
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<MultiselectComponent, "tk-multiselect", never, { "model": { "alias": "model"; "required": false; "isSignal": true; }; "dataSource": { "alias": "dataSource"; "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; }; "appendTo": { "alias": "appendTo"; "required": false; "isSignal": true; }; "panelStyleClass": { "alias": "panelStyleClass"; "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; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; "isSignal": true; }; "fetchParams": { "alias": "fetchParams"; "required": false; "isSignal": true; }; "sortField": { "alias": "sortField"; "required": false; "isSignal": true; }; "sortOrder": { "alias": "sortOrder"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "model": "modelChange"; "dataSource": "dataSourceChange"; "selectionChange": "selectionChange"; "filterChange": "filterChange"; }, never, never, true, never>;
364
374
  }
365
375
 
366
376
  export { MultiselectComponent, TkMultiSelectManager };
@@ -97,7 +97,11 @@ declare class TableComponent<T = unknown> {
97
97
  /** Tracks which column's filter overlay is currently open */
98
98
  readonly activeFilterColumn: _angular_core.WritableSignal<string | null>;
99
99
  /** Stores the selected filter value per column field (null = no filter) */
100
- readonly columnFilters: _angular_core.WritableSignal<Record<string, string | null>>;
100
+ readonly columnFilters: _angular_core.ModelSignal<Record<string, string | null>>;
101
+ /** Two-way bindable signal for the active sort field */
102
+ readonly sortField: _angular_core.ModelSignal<string | null>;
103
+ /** Two-way bindable signal for the active sort order (1 for asc, -1 for desc) */
104
+ readonly sortOrder: _angular_core.ModelSignal<1 | -1 | null>;
101
105
  /** Position of the filter overlay (fixed, relative to viewport) */
102
106
  readonly filterOverlayPosition: _angular_core.WritableSignal<{
103
107
  top: number;
@@ -221,7 +225,7 @@ declare class TableComponent<T = unknown> {
221
225
  */
222
226
  onImageError(event: Event, fallback?: string): void;
223
227
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<TableComponent<any>, never>;
224
- static ɵcmp: _angular_core.ɵɵ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>;
228
+ static ɵcmp: _angular_core.ɵɵ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; }; "columnFilters": { "alias": "columnFilters"; "required": false; "isSignal": true; }; "sortField": { "alias": "sortField"; "required": false; "isSignal": true; }; "sortOrder": { "alias": "sortOrder"; "required": false; "isSignal": true; }; }, { "selection": "selectionChange"; "columnFilters": "columnFiltersChange"; "sortField": "sortFieldChange"; "sortOrder": "sortOrderChange"; }, never, never, true, never>;
225
229
  }
226
230
 
227
231
  export { TableComponent };
@@ -1,156 +1,243 @@
1
1
  import * as _angular_core from '@angular/core';
2
+ import { MenuItem } from 'primeng/api';
3
+ import { Popover } from 'primeng/popover';
4
+ import { TkAction } from '@tekus/design-system/components/action-group';
5
+ import { MultiSelectOption } from '@tekus/design-system/components/multiselect';
6
+ import { ButtonSeverity, Variant } from '@tekus/design-system/components/button';
7
+
8
+ /**
9
+ * Configuration for a toolbar filter item.
10
+ */
11
+ interface TkToolbarFilterConfig {
12
+ key: string;
13
+ label: string;
14
+ options: MultiSelectOption[];
15
+ }
16
+ /**
17
+ * Definition for toolbar selection or mass actions.
18
+ */
19
+ interface TkToolbarAction {
20
+ icon?: string;
21
+ label: string;
22
+ action: () => void;
23
+ disabled?: boolean;
24
+ severity?: ButtonSeverity;
25
+ variant?: Variant;
26
+ }
2
27
 
3
28
  declare class ToolbarComponent {
29
+ private readonly breakpointObserver;
30
+ /** Responsive flag using BreakpointObserver */
31
+ isMobile: _angular_core.Signal<boolean>;
4
32
  /**
5
- * @property {ModelSignal<string>} searchModel
6
- * @description
7
33
  * Two-way bindable signal for the search input value.
8
- * Supports [(searchModel)]="variable" syntax for two-way binding.
9
- * @default ''
10
34
  */
11
35
  searchModel: _angular_core.ModelSignal<string>;
12
36
  /**
13
- * @property {ModelSignal<Record<string, string> | null>} filterModel
14
- * @description
15
- * Two-way bindable signal for the filter select value.
16
- * Supports [(filterModel)]="variable" syntax for two-way binding.
17
- * @default null
37
+ * Label/placeholder text displayed inside the search input.
38
+ * @default 'Buscar'
18
39
  */
19
- filterModel: _angular_core.ModelSignal<Record<string, string> | null>;
40
+ searchFloatLabel: _angular_core.InputSignal<string>;
20
41
  /**
21
- * @property {WritableSignal<boolean>} showSearchInput
22
- * @description
23
- * Controls the visibility of the search input. Toggles when the search button is clicked.
24
- * @default false
42
+ * Controls the visibility of the search input field.
43
+ * @default true
44
+ */
45
+ searchVisible: _angular_core.InputSignal<boolean>;
46
+ /**
47
+ * Two-way bindable signal for the layout view toggle ('table' or 'cards').
48
+ * @default 'table'
25
49
  */
26
- showSearchInput: _angular_core.WritableSignal<boolean>;
50
+ view: _angular_core.ModelSignal<"table" | "cards">;
27
51
  /**
28
- * @property {WritableSignal<boolean>} showFilterSelect
29
- * @description
30
- * Controls the visibility of the filter select. Toggles when the filter button is clicked.
52
+ * Controls the visibility of the layout view toggle button.
31
53
  * @default false
32
54
  */
33
- showFilterSelect: _angular_core.WritableSignal<boolean>;
34
- /**
35
- * @property {InputSignal<Array<{ label: string; value: string }>>} filterOptions
36
- * @description
37
- * Array of options available in the filter select dropdown.
38
- * Each option is an object with `label` (displayed text) and `value` (internal identifier).
39
- *
40
- * @default
41
- * [
42
- * { label: 'Option 1', value: 'option1' },
43
- * { label: 'Option 2', value: 'option2' },
44
- * { label: 'Option 3', value: 'option3' }
45
- * ]
46
- */
47
- filterOptions: _angular_core.InputSignal<{
48
- label: string;
49
- value: string;
50
- }[]>;
55
+ viewToggleVisible: _angular_core.InputSignal<boolean>;
51
56
  /**
52
- * @property {InputSignal<string>} filterOptionLabel
53
- * @description
54
- * Property name used to display the label in the select dropdown options.
55
- * This corresponds to the key in each option object that contains the display text.
56
- *
57
- * @default 'label'
57
+ * Dynamic list of filters and their available selection options.
58
+ * @default []
58
59
  */
60
+ filters: _angular_core.InputSignal<TkToolbarFilterConfig[]>;
61
+ /** Backwards compatibility: Writable model signal for the selected option in a single filter select (deprecated) */
62
+ filterModel: _angular_core.ModelSignal<Record<string, string> | null>;
63
+ /** Backwards compatibility: Input for dropdown options (deprecated) */
64
+ filterOptions: _angular_core.InputSignal<any[]>;
65
+ /** Backwards compatibility: Input for the option label key (deprecated) */
59
66
  filterOptionLabel: _angular_core.InputSignal<string>;
67
+ /** Backwards compatibility: Input for the label of the single select dropdown (deprecated) */
68
+ filterFloatLabel: _angular_core.InputSignal<string>;
69
+ /** Backwards compatibility: Controls whether filter button is shown (deprecated) */
70
+ filterVisible: _angular_core.InputSignal<boolean>;
60
71
  /**
61
- * @property {InputSignal<string>} filterFloatLabel
62
- * @description
63
- * Label text displayed above the filter select input using the FloatLabel wrapper.
64
- * This is the placeholder/label that floats when the select is focused or has a value.
65
- *
66
- * @default 'Filtrar'
72
+ * Two-way bindable signal for currently selected filter values.
73
+ * Format: { [filterKey]: MultiSelectOption[] }
74
+ * @default {}
67
75
  */
68
- filterFloatLabel: _angular_core.InputSignal<string>;
76
+ filterValues: _angular_core.ModelSignal<Record<string, MultiSelectOption[]>>;
69
77
  /**
70
- * @property {InputSignal<string>} searchFloatLabel
71
- * @description
72
- * Label text displayed above the search input using the FloatLabel wrapper.
73
- * This is the placeholder/label that floats when the search input is focused or has a value.
74
- *
75
- * @default 'Buscar'
78
+ * Label/text for the clear button.
79
+ * @default 'Limpiar'
76
80
  */
77
- searchFloatLabel: _angular_core.InputSignal<string>;
81
+ clearLabel: _angular_core.InputSignal<string>;
78
82
  /**
79
- * @property {InputSignal<boolean>} searchVisible
80
- * @description
81
- * Controls the visibility of the search button.
82
- * @default true
83
+ * Label/text for the delete action button.
84
+ * @default 'Eliminar'
83
85
  */
84
- searchVisible: _angular_core.InputSignal<boolean>;
86
+ deleteLabel: _angular_core.InputSignal<string>;
85
87
  /**
86
- * @property {InputSignal<boolean>} filterVisible
87
- * @description
88
- * Controls the visibility of the filter button.
89
- * @default true
88
+ * Label/text for the filters header.
89
+ * @default 'Filtros'
90
90
  */
91
- filterVisible: _angular_core.InputSignal<boolean>;
91
+ filterLabel: _angular_core.InputSignal<string>;
92
+ /** Label for selected item singular form (e.g. 'seleccionado') */
93
+ selectedLabel: _angular_core.InputSignal<string>;
94
+ /** Label for selected item plural form (e.g. 'seleccionados') */
95
+ selectedPluralLabel: _angular_core.InputSignal<string>;
96
+ /** Label/text for the apply button in overlays (e.g. 'Aplicar') */
97
+ applyLabel: _angular_core.InputSignal<string>;
98
+ /** Tooltip text for the reload action button (e.g. 'Actualizar') */
99
+ reloadTooltip: _angular_core.InputSignal<string>;
100
+ /** Tooltip text for the sort action button (e.g. 'Ordenar') */
101
+ sortTooltip: _angular_core.InputSignal<string>;
102
+ /** Tooltip text for view cards layout button (e.g. 'Vista tarjeta') */
103
+ viewCardsTooltip: _angular_core.InputSignal<string>;
104
+ /** Tooltip text for view table layout button (e.g. 'Vista tabla') */
105
+ viewTableTooltip: _angular_core.InputSignal<string>;
106
+ /**
107
+ * Available list of sorting options.
108
+ * @default []
109
+ */
110
+ sortOptions: _angular_core.InputSignal<{
111
+ label: string;
112
+ value: string;
113
+ }[]>;
114
+ /**
115
+ * Label/text for the sorting header.
116
+ * @default 'Ordenar por'
117
+ */
118
+ sortLabel: _angular_core.InputSignal<string>;
119
+ /**
120
+ * Two-way bindable signal for the active sort option value.
121
+ * @default null
122
+ */
123
+ sortValue: _angular_core.ModelSignal<string | null>;
92
124
  /**
93
- * @property {InputSignal<boolean>} reloadVisible
94
- * @description
95
125
  * Controls the visibility of the reload button.
96
126
  * @default false
97
127
  */
98
128
  reloadVisible: _angular_core.InputSignal<boolean>;
99
129
  /**
100
- * @property {InputSignal<number | null>} reloadInterval
101
- * @description
102
130
  * Sets the interval for automatic reload in milliseconds.
103
131
  * If null, automatic reload is disabled.
104
132
  * @default null
105
133
  */
106
134
  reloadInterval: _angular_core.InputSignal<number | null>;
107
135
  /**
108
- * @property {InputSignal<boolean>} loading
109
- * @description
110
136
  * Controls the loading state of the reload button, triggering a rotation animation.
111
137
  * @default false
112
138
  */
113
139
  loading: _angular_core.InputSignal<boolean>;
114
140
  /**
115
- * @property {OutputEmitter<void>} reload
116
- * @description
117
- * Emits an event when the reload button is clicked or the automatic interval is reached.
141
+ * Secondary or mass actions collapsed into the tk-action-group dropdown.
142
+ * @default []
118
143
  */
119
- reload: _angular_core.OutputEmitterRef<void>;
144
+ globalActions: _angular_core.InputSignal<TkAction[]>;
120
145
  /**
121
- * @method constructor
122
- * @description
123
- * Initializes the automatic reload logic using a declarative RxJS approach.
146
+ * Number of items selected in the list.
147
+ * @default 0
124
148
  */
125
- constructor();
149
+ selectionCount: _angular_core.InputSignal<number>;
150
+ /**
151
+ * Two-way bindable signal for checking/unchecking the select-all checkbox.
152
+ * @default false
153
+ */
154
+ allSelected: _angular_core.ModelSignal<boolean>;
126
155
  /**
127
- * @method toggleSearchInput
128
- * @description
129
- * Toggles the visibility of the search input field.
156
+ * Two-way bindable signal for the indeterminate state of the select-all checkbox.
157
+ * @default false
130
158
  */
131
- toggleSearchInput(): void;
159
+ indeterminate: _angular_core.ModelSignal<boolean>;
132
160
  /**
133
- * @method toggleFilterSelect
134
- * @description
135
- * Toggles the visibility of the filter select dropdown.
161
+ * Actions available when one or more items are selected.
162
+ * @default []
136
163
  */
137
- toggleFilterSelect(): void;
164
+ selectionActions: _angular_core.InputSignal<TkToolbarAction[]>;
138
165
  /**
139
- * @method onSelectedOption
140
- * @description
141
- * Handles filter select changes and updates the filterModel signal.
142
- *
143
- * @param value - Selected option value from tk-select
166
+ * Maximum number of selection action buttons visible directly before grouping the rest.
167
+ * @default 1
144
168
  */
145
- onSelectedOption(value: Record<string, string> | null): void;
169
+ maxVisibleSelectionActions: _angular_core.InputSignal<number>;
146
170
  /**
147
- * @method onReload
148
- * @description
149
- * Emits the reload event.
171
+ * Emits an event when the reload button is clicked or the automatic interval is reached.
150
172
  */
173
+ reload: _angular_core.OutputEmitterRef<void>;
174
+ /**
175
+ * Emits when filters are applied.
176
+ */
177
+ appliedFilters: _angular_core.OutputEmitterRef<Record<string, MultiSelectOption[]>>;
178
+ /**
179
+ * Emits when sorting changes.
180
+ */
181
+ appliedSort: _angular_core.OutputEmitterRef<string | null>;
182
+ /** Temporary filter values held before the user clicks "Aplicar" */
183
+ tempFilterValues: _angular_core.WritableSignal<Record<string, MultiSelectOption[]>>;
184
+ /** Temporary sort value held before the user clicks "Aplicar" in mobile drawer */
185
+ tempSortValue: _angular_core.WritableSignal<string | null>;
186
+ /** Controls visibility of mobile drawers */
187
+ showFilterDrawer: _angular_core.WritableSignal<boolean>;
188
+ showSortDrawer: _angular_core.WritableSignal<boolean>;
189
+ filterPopover: _angular_core.Signal<Popover | undefined>;
190
+ sortPopover: _angular_core.Signal<Popover | undefined>;
191
+ /** Computes whether any filters are currently active */
192
+ hasActiveFilters: _angular_core.Signal<boolean>;
193
+ /** Computes whether sorting is active */
194
+ hasActiveSort: _angular_core.Signal<boolean>;
195
+ /** Reload button visibility: only visible if reload is allowed AND filters or sorting is active */
196
+ shouldShowReload: _angular_core.Signal<boolean>;
197
+ /** Computes the final filters configuration, adapting old filterOptions format to the new filters schema */
198
+ derivedFilters: _angular_core.Signal<TkToolbarFilterConfig[]>;
199
+ /** Active chips representing individual filter selections */
200
+ activeChips: _angular_core.Signal<{
201
+ filterKey: string;
202
+ code: string;
203
+ label: string;
204
+ }[]>;
205
+ /** Visibility of the active filters bar (below tools) */
206
+ shouldShowActiveFiltersBar: _angular_core.Signal<boolean>;
207
+ /** Visible selection actions as buttons */
208
+ visibleSelectionActions: _angular_core.Signal<TkToolbarAction[]>;
209
+ /** Overflow selection actions as menu items for dropdown */
210
+ overflowSelectionActions: _angular_core.Signal<MenuItem[]>;
211
+ constructor();
212
+ /** Toggles filters overlay and initializes temporary state */
213
+ openFilters(event: Event): void;
214
+ /** Updates temporary filter values for a specific filter key */
215
+ onTempFilterChange(key: string, value: MultiSelectOption[]): void;
216
+ /** Saves temporary filter selections and triggers apply */
217
+ applyFilters(): void;
218
+ /** Clears temporary filters inside popover/drawer */
219
+ clearTempFilters(): void;
220
+ /** Clears all applied filters */
221
+ clearAllFilters(): void;
222
+ /** Removes a single filter chip */
223
+ removeChip(chip: {
224
+ filterKey: string;
225
+ code: string;
226
+ }): void;
227
+ /** Toggles sorting overlay */
228
+ openSort(event: Event): void;
229
+ /** Selects a sort option (toggles if already selected) and hides overlay */
230
+ selectSortOption(value: string, isMobileDrawer?: boolean): void;
231
+ /** Toggles temporary sorting selection on mobile drawer */
232
+ toggleSortOptionMobile(value: string): void;
233
+ /** Applies selected sorting on mobile */
234
+ applySortMobile(): void;
235
+ /** Toggle layout view */
236
+ toggleView(): void;
151
237
  onReload(): void;
152
238
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<ToolbarComponent, never>;
153
- static ɵcmp: _angular_core.ɵɵ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>;
239
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ToolbarComponent, "tk-toolbar", never, { "searchModel": { "alias": "searchModel"; "required": false; "isSignal": true; }; "searchFloatLabel": { "alias": "searchFloatLabel"; "required": false; "isSignal": true; }; "searchVisible": { "alias": "searchVisible"; "required": false; "isSignal": true; }; "view": { "alias": "view"; "required": false; "isSignal": true; }; "viewToggleVisible": { "alias": "viewToggleVisible"; "required": false; "isSignal": true; }; "filters": { "alias": "filters"; "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; }; "filterVisible": { "alias": "filterVisible"; "required": false; "isSignal": true; }; "filterValues": { "alias": "filterValues"; "required": false; "isSignal": true; }; "clearLabel": { "alias": "clearLabel"; "required": false; "isSignal": true; }; "deleteLabel": { "alias": "deleteLabel"; "required": false; "isSignal": true; }; "filterLabel": { "alias": "filterLabel"; "required": false; "isSignal": true; }; "selectedLabel": { "alias": "selectedLabel"; "required": false; "isSignal": true; }; "selectedPluralLabel": { "alias": "selectedPluralLabel"; "required": false; "isSignal": true; }; "applyLabel": { "alias": "applyLabel"; "required": false; "isSignal": true; }; "reloadTooltip": { "alias": "reloadTooltip"; "required": false; "isSignal": true; }; "sortTooltip": { "alias": "sortTooltip"; "required": false; "isSignal": true; }; "viewCardsTooltip": { "alias": "viewCardsTooltip"; "required": false; "isSignal": true; }; "viewTableTooltip": { "alias": "viewTableTooltip"; "required": false; "isSignal": true; }; "sortOptions": { "alias": "sortOptions"; "required": false; "isSignal": true; }; "sortLabel": { "alias": "sortLabel"; "required": false; "isSignal": true; }; "sortValue": { "alias": "sortValue"; "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; }; "globalActions": { "alias": "globalActions"; "required": false; "isSignal": true; }; "selectionCount": { "alias": "selectionCount"; "required": false; "isSignal": true; }; "allSelected": { "alias": "allSelected"; "required": false; "isSignal": true; }; "indeterminate": { "alias": "indeterminate"; "required": false; "isSignal": true; }; "selectionActions": { "alias": "selectionActions"; "required": false; "isSignal": true; }; "maxVisibleSelectionActions": { "alias": "maxVisibleSelectionActions"; "required": false; "isSignal": true; }; }, { "searchModel": "searchModelChange"; "view": "viewChange"; "filterModel": "filterModelChange"; "filterValues": "filterValuesChange"; "sortValue": "sortValueChange"; "allSelected": "allSelectedChange"; "indeterminate": "indeterminateChange"; "reload": "reload"; "appliedFilters": "appliedFilters"; "appliedSort": "appliedSort"; }, never, never, true, never>;
154
240
  }
155
241
 
156
242
  export { ToolbarComponent };
243
+ export type { TkToolbarAction, TkToolbarFilterConfig };