shirkasoft-ui-components 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/fesm2022/shirkasoft-ui-components-breadcrumb.mjs +199 -0
  2. package/fesm2022/shirkasoft-ui-components-breadcrumb.mjs.map +1 -0
  3. package/fesm2022/shirkasoft-ui-components-button.mjs +148 -0
  4. package/fesm2022/shirkasoft-ui-components-button.mjs.map +1 -0
  5. package/fesm2022/shirkasoft-ui-components-chart.mjs +153 -0
  6. package/fesm2022/shirkasoft-ui-components-chart.mjs.map +1 -0
  7. package/fesm2022/shirkasoft-ui-components-confirm-dialog.mjs +143 -0
  8. package/fesm2022/shirkasoft-ui-components-confirm-dialog.mjs.map +1 -0
  9. package/fesm2022/shirkasoft-ui-components-date-picker.mjs +638 -0
  10. package/fesm2022/shirkasoft-ui-components-date-picker.mjs.map +1 -0
  11. package/fesm2022/shirkasoft-ui-components-fieldset.mjs +94 -0
  12. package/fesm2022/shirkasoft-ui-components-fieldset.mjs.map +1 -0
  13. package/fesm2022/shirkasoft-ui-components-file-upload.mjs +242 -0
  14. package/fesm2022/shirkasoft-ui-components-file-upload.mjs.map +1 -0
  15. package/fesm2022/shirkasoft-ui-components-knob.mjs +269 -0
  16. package/fesm2022/shirkasoft-ui-components-knob.mjs.map +1 -0
  17. package/fesm2022/shirkasoft-ui-components-loading.mjs +255 -0
  18. package/fesm2022/shirkasoft-ui-components-loading.mjs.map +1 -0
  19. package/fesm2022/shirkasoft-ui-components-modal.mjs +290 -0
  20. package/fesm2022/shirkasoft-ui-components-modal.mjs.map +1 -0
  21. package/fesm2022/shirkasoft-ui-components-notification.mjs +143 -0
  22. package/fesm2022/shirkasoft-ui-components-notification.mjs.map +1 -0
  23. package/fesm2022/shirkasoft-ui-components-price-input.mjs +64 -0
  24. package/fesm2022/shirkasoft-ui-components-price-input.mjs.map +1 -0
  25. package/fesm2022/shirkasoft-ui-components-rail-sidebar.mjs +205 -0
  26. package/fesm2022/shirkasoft-ui-components-rail-sidebar.mjs.map +1 -0
  27. package/fesm2022/shirkasoft-ui-components-select.mjs +737 -0
  28. package/fesm2022/shirkasoft-ui-components-select.mjs.map +1 -0
  29. package/fesm2022/shirkasoft-ui-components-sidebar.mjs +185 -0
  30. package/fesm2022/shirkasoft-ui-components-sidebar.mjs.map +1 -0
  31. package/fesm2022/shirkasoft-ui-components-skeleton.mjs +74 -0
  32. package/fesm2022/shirkasoft-ui-components-skeleton.mjs.map +1 -0
  33. package/fesm2022/shirkasoft-ui-components-table.mjs +689 -0
  34. package/fesm2022/shirkasoft-ui-components-table.mjs.map +1 -0
  35. package/fesm2022/shirkasoft-ui-components-tabs.mjs +249 -0
  36. package/fesm2022/shirkasoft-ui-components-tabs.mjs.map +1 -0
  37. package/fesm2022/shirkasoft-ui-components-tag.mjs +70 -0
  38. package/fesm2022/shirkasoft-ui-components-tag.mjs.map +1 -0
  39. package/fesm2022/shirkasoft-ui-components-text-field.mjs +370 -0
  40. package/fesm2022/shirkasoft-ui-components-text-field.mjs.map +1 -0
  41. package/fesm2022/shirkasoft-ui-components-timeline.mjs +222 -0
  42. package/fesm2022/shirkasoft-ui-components-timeline.mjs.map +1 -0
  43. package/fesm2022/shirkasoft-ui-components-toggle.mjs +186 -0
  44. package/fesm2022/shirkasoft-ui-components-toggle.mjs.map +1 -0
  45. package/fesm2022/shirkasoft-ui-components-tooltip.mjs +169 -0
  46. package/fesm2022/shirkasoft-ui-components-tooltip.mjs.map +1 -0
  47. package/fesm2022/shirkasoft-ui-components-utils.mjs +64 -0
  48. package/fesm2022/shirkasoft-ui-components-utils.mjs.map +1 -0
  49. package/fesm2022/shirkasoft-ui-components-wizard.mjs +167 -0
  50. package/fesm2022/shirkasoft-ui-components-wizard.mjs.map +1 -0
  51. package/fesm2022/shirkasoft-ui-components.mjs +0 -5729
  52. package/fesm2022/shirkasoft-ui-components.mjs.map +1 -1
  53. package/package.json +101 -1
  54. package/types/shirkasoft-ui-components-breadcrumb.d.ts +68 -0
  55. package/types/shirkasoft-ui-components-button.d.ts +59 -0
  56. package/types/shirkasoft-ui-components-chart.d.ts +65 -0
  57. package/types/shirkasoft-ui-components-confirm-dialog.d.ts +88 -0
  58. package/types/shirkasoft-ui-components-date-picker.d.ts +200 -0
  59. package/types/shirkasoft-ui-components-fieldset.d.ts +72 -0
  60. package/types/shirkasoft-ui-components-file-upload.d.ts +87 -0
  61. package/types/shirkasoft-ui-components-knob.d.ts +69 -0
  62. package/types/shirkasoft-ui-components-loading.d.ts +94 -0
  63. package/types/shirkasoft-ui-components-modal.d.ts +139 -0
  64. package/types/shirkasoft-ui-components-notification.d.ts +82 -0
  65. package/types/shirkasoft-ui-components-price-input.d.ts +41 -0
  66. package/types/shirkasoft-ui-components-rail-sidebar.d.ts +121 -0
  67. package/types/shirkasoft-ui-components-select.d.ts +182 -0
  68. package/types/shirkasoft-ui-components-sidebar.d.ts +106 -0
  69. package/types/shirkasoft-ui-components-skeleton.d.ts +36 -0
  70. package/types/shirkasoft-ui-components-table.d.ts +293 -0
  71. package/types/shirkasoft-ui-components-tabs.d.ts +102 -0
  72. package/types/shirkasoft-ui-components-tag.d.ts +31 -0
  73. package/types/shirkasoft-ui-components-text-field.d.ts +120 -0
  74. package/types/shirkasoft-ui-components-timeline.d.ts +178 -0
  75. package/types/shirkasoft-ui-components-toggle.d.ts +48 -0
  76. package/types/shirkasoft-ui-components-tooltip.d.ts +47 -0
  77. package/types/shirkasoft-ui-components-utils.d.ts +9 -0
  78. package/types/shirkasoft-ui-components-wizard.d.ts +101 -0
  79. package/types/shirkasoft-ui-components.d.ts +1 -2333
@@ -0,0 +1,121 @@
1
+ import * as _angular_core from '@angular/core';
2
+
3
+ interface RailSidebarItem {
4
+ id: string;
5
+ label: string;
6
+ icon?: string | any;
7
+ routerLink?: string;
8
+ children?: RailSidebarItem[];
9
+ roles?: string[];
10
+ badge?: string | number;
11
+ disabled?: boolean;
12
+ separator?: boolean;
13
+ }
14
+ interface RailSidebarSection {
15
+ key: string;
16
+ label: string;
17
+ icon?: string | any;
18
+ routerLink?: string;
19
+ matchPrefixes?: string[];
20
+ items?: RailSidebarItem[];
21
+ }
22
+ interface RailSidebarSectionEvent {
23
+ key: string;
24
+ routerLink?: string;
25
+ }
26
+ /**
27
+ * Shirkasoft UI Components.
28
+ * Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
29
+ * Belongs to Shirkasoft.
30
+ */
31
+ /**
32
+ * Narrow "rail" sidebar that expands into sections. Supports sections, roles,
33
+ * language switching, collapse/expand and responsive tooltips.
34
+ */
35
+ declare class RailSidebarComponent {
36
+ /** Sections presented as expandable areas of the rail. */
37
+ sections: _angular_core.InputSignal<RailSidebarSection[]>;
38
+ /** Current location url used to detect the active section/item. */
39
+ activeUrl: _angular_core.InputSignal<string>;
40
+ /** Key of the active section, bindable with [(activeSectionKey)]. */
41
+ activeSectionKey: _angular_core.ModelSignal<string>;
42
+ /** Collapsed (rail only) state, bindable with [(collapsed)]. */
43
+ collapsed: _angular_core.ModelSignal<boolean>;
44
+ /** Active language code. */
45
+ activeLang: _angular_core.InputSignal<string>;
46
+ /** Languages available in the language switcher. */
47
+ langs: _angular_core.InputSignal<string[]>;
48
+ /** Brand logo image/url. */
49
+ logo: _angular_core.InputSignal<string>;
50
+ /** Application name shown when expanded. */
51
+ appName: _angular_core.InputSignal<string>;
52
+ /** Role used to filter items that declare `roles`. */
53
+ userRole: _angular_core.InputSignal<string>;
54
+ /** Optional transform applied to item labels (e.g. i18n). */
55
+ labelPipe: _angular_core.InputSignal<(label: string) => string>;
56
+ /** Width of the collapsed rail. */
57
+ railWidth: _angular_core.InputSignal<string>;
58
+ /** Width when a section is expanded. */
59
+ expandedWidth: _angular_core.InputSignal<string>;
60
+ /** Tooltip for the workspace/home action. */
61
+ workspaceTooltip: _angular_core.InputSignal<string>;
62
+ /** Tooltip for the logout action. */
63
+ logoutTooltip: _angular_core.InputSignal<string>;
64
+ /** Tooltip for collapsing the sidebar. */
65
+ collapseTooltip: _angular_core.InputSignal<string>;
66
+ /** Tooltip for expanding the sidebar. */
67
+ expandTooltip: _angular_core.InputSignal<string>;
68
+ /** Emitted when a section is selected, with its key and optional route. */
69
+ sectionSelected: _angular_core.OutputEmitterRef<RailSidebarSectionEvent>;
70
+ /** Emitted when a navigation item is clicked. */
71
+ itemClick: _angular_core.OutputEmitterRef<RailSidebarItem>;
72
+ /** Emitted with the next language code when the user switches language. */
73
+ setLang: _angular_core.OutputEmitterRef<string>;
74
+ /** Emitted when the user requests to log out. */
75
+ logoutRequested: _angular_core.OutputEmitterRef<void>;
76
+ /** Emitted with the new collapsed state after toggling. */
77
+ toggleSidebar: _angular_core.OutputEmitterRef<boolean>;
78
+ /** Emitted when the workspace/home entry is clicked. */
79
+ workspaceClick: _angular_core.OutputEmitterRef<void>;
80
+ protected getIcon: (name: any) => any;
81
+ /** Set of group ids currently expanded. */
82
+ protected expandedGroups: _angular_core.WritableSignal<Set<string>>;
83
+ constructor();
84
+ /** Current sidebar width depending on the collapsed state. */
85
+ protected width: _angular_core.Signal<string>;
86
+ /** The section currently selected. */
87
+ protected activeSection: _angular_core.Signal<RailSidebarSection | null>;
88
+ /** Items of the active section, filtered by role. */
89
+ protected navItems: _angular_core.Signal<RailSidebarItem[]>;
90
+ /** Applies the `labelPipe` transform to a label. */
91
+ protected label(label: string): string;
92
+ /** Whether the section matches the active key. */
93
+ protected isSectionActive(section: RailSidebarSection): boolean;
94
+ /** Whether the item is the best route match for the active url. */
95
+ protected isItemActive(item: RailSidebarItem): boolean;
96
+ /** Whether one of the item's children matches the active url. */
97
+ protected isGroupActive(item: RailSidebarItem): boolean;
98
+ /** Exact or prefix match between a router link and the active url. */
99
+ private matchesUrl;
100
+ /** Longest (most specific) item whose route matches the active url. */
101
+ private bestMatchItem;
102
+ /** Whether a group is expanded. */
103
+ protected isGroupExpanded(item: RailSidebarItem): boolean;
104
+ /** Toggles the expanded state of a group. */
105
+ protected toggleGroup(item: RailSidebarItem): void;
106
+ /** Selects a section, emits `sectionSelected` and expands the rail when collapsed. */
107
+ protected onSectionClick(section: RailSidebarSection): void;
108
+ /** Emits `itemClick` for a navigation item (skipping disabled items). */
109
+ protected onItemClick(item: RailSidebarItem): void;
110
+ /** Emits `workspaceClick` and expands the sidebar if it was collapsed. */
111
+ protected onWorkspace(): void;
112
+ /** Cycles to the next language and emits `setLang`. */
113
+ protected onToggleLang(): void;
114
+ /** Toggles collapse and emits `toggleSidebar`. */
115
+ protected onToggleSidebar(): void;
116
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<RailSidebarComponent, never>;
117
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<RailSidebarComponent, "shk-rail-sidebar", never, { "sections": { "alias": "sections"; "required": false; "isSignal": true; }; "activeUrl": { "alias": "activeUrl"; "required": false; "isSignal": true; }; "activeSectionKey": { "alias": "activeSectionKey"; "required": false; "isSignal": true; }; "collapsed": { "alias": "collapsed"; "required": false; "isSignal": true; }; "activeLang": { "alias": "activeLang"; "required": false; "isSignal": true; }; "langs": { "alias": "langs"; "required": false; "isSignal": true; }; "logo": { "alias": "logo"; "required": false; "isSignal": true; }; "appName": { "alias": "appName"; "required": false; "isSignal": true; }; "userRole": { "alias": "userRole"; "required": false; "isSignal": true; }; "labelPipe": { "alias": "labelPipe"; "required": false; "isSignal": true; }; "railWidth": { "alias": "railWidth"; "required": false; "isSignal": true; }; "expandedWidth": { "alias": "expandedWidth"; "required": false; "isSignal": true; }; "workspaceTooltip": { "alias": "workspaceTooltip"; "required": false; "isSignal": true; }; "logoutTooltip": { "alias": "logoutTooltip"; "required": false; "isSignal": true; }; "collapseTooltip": { "alias": "collapseTooltip"; "required": false; "isSignal": true; }; "expandTooltip": { "alias": "expandTooltip"; "required": false; "isSignal": true; }; }, { "activeSectionKey": "activeSectionKeyChange"; "collapsed": "collapsedChange"; "sectionSelected": "sectionSelected"; "itemClick": "itemClick"; "setLang": "setLang"; "logoutRequested": "logoutRequested"; "toggleSidebar": "toggleSidebar"; "workspaceClick": "workspaceClick"; }, never, never, true, never>;
118
+ }
119
+
120
+ export { RailSidebarComponent };
121
+ export type { RailSidebarItem, RailSidebarSection, RailSidebarSectionEvent };
@@ -0,0 +1,182 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { ElementRef } from '@angular/core';
3
+ import { ControlValueAccessor, FormGroup, FormControl } from '@angular/forms';
4
+
5
+ /** Option rendered by the select, optionally prefixed with a "new entry" badge. */
6
+ interface SelectOption {
7
+ label: string;
8
+ value: any;
9
+ custom?: boolean;
10
+ }
11
+ /**
12
+ * Shirkasoft UI Components.
13
+ * Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
14
+ * Belongs to Shirkasoft.
15
+ */
16
+ /**
17
+ * Custom select that works as a ControlValueAccessor: single/multiple
18
+ * selection, searchable, keyboard navigation, pagination, custom entries and
19
+ * reactive-form integration.
20
+ */
21
+ declare class SelectComponent implements ControlValueAccessor {
22
+ private elementRef;
23
+ /** Resolves icon names to lucide components, falling back to a chevron. */
24
+ protected getIcon: (name: any) => any;
25
+ /** Available options. */
26
+ options: _angular_core.InputSignal<SelectOption[]>;
27
+ /** Enables multi-select mode. */
28
+ multiple: _angular_core.InputSignal<boolean>;
29
+ /** Restricts multi-selection to the given value combinations. */
30
+ validCombinations: _angular_core.InputSignal<string[][] | undefined>;
31
+ /** Placeholder shown when there is no selection. */
32
+ placeholder: _angular_core.InputSignal<string>;
33
+ /** Label used to bind the control inside a `formGroup`. */
34
+ label: _angular_core.InputSignal<string | undefined>;
35
+ /** Shows a loading state while options are being fetched. */
36
+ isLoading: _angular_core.InputSignal<boolean>;
37
+ /** Marks that all options have been loaded (used with pagination + search). */
38
+ isAllDataLoaded: _angular_core.InputSignal<boolean>;
39
+ /** Allows creating new entries from the typed search term. */
40
+ allowCustomEntries: _angular_core.InputSignal<boolean>;
41
+ /** Parent form group to resolve the control from `label`. */
42
+ formGroup: _angular_core.InputSignal<FormGroup<any> | undefined>;
43
+ /** Enables the search input inside the dropdown. */
44
+ isSearchable: _angular_core.InputSignal<boolean>;
45
+ /** Number of options loaded per page when pagination is enabled. */
46
+ itemsPerPage: _angular_core.InputSignal<number>;
47
+ /** FormControl bound externally (used instead of `formGroup`/`label`). */
48
+ control: _angular_core.InputSignal<FormControl<any> | undefined>;
49
+ /** Paginates the option list instead of rendering it all at once. */
50
+ usePagination: _angular_core.InputSignal<boolean>;
51
+ /** Disables the whole select. */
52
+ disabled: _angular_core.InputSignal<boolean>;
53
+ /** Custom per-validation-error messages shown under the select. */
54
+ errorMessages: _angular_core.InputSignal<{
55
+ [key: string]: string;
56
+ }>;
57
+ /** Keeps the search term when options reload. */
58
+ preserveSearchOnLoad: _angular_core.InputSignal<boolean>;
59
+ /** Translation key of the "no records" empty message. */
60
+ emptyMessageKey: _angular_core.InputSignal<string>;
61
+ /** Opens the dropdown above the trigger instead of below. */
62
+ dropdownUpward: _angular_core.InputSignal<boolean>;
63
+ /** Shows the "no selection" option in single-select mode. */
64
+ showEmptyOption: _angular_core.InputSignal<boolean>;
65
+ /** Emits when the selection changes (new value or array in multiple mode). */
66
+ selectionChange: _angular_core.OutputEmitterRef<any>;
67
+ /** Emits the debounced search term while typing. */
68
+ search: _angular_core.OutputEmitterRef<string>;
69
+ /** Reference to the filter input inside the dropdown (when searchable). */
70
+ filterInput: _angular_core.Signal<ElementRef<any> | undefined>;
71
+ /** Reference to the select container element. */
72
+ private selectContainer;
73
+ /** Reference to the trigger button. */
74
+ private selectTrigger;
75
+ /** Reference to the dropdown list container. */
76
+ private dropdownContainer;
77
+ /** Underlying selection value (mirrors the reactive control). */
78
+ private _value;
79
+ /** Whether the dropdown is open. */
80
+ isOpen: _angular_core.WritableSignal<boolean>;
81
+ /** Index of the currently focused option for keyboard navigation. */
82
+ focusedIndex: _angular_core.WritableSignal<number>;
83
+ /** Current search term (searchable mode). */
84
+ searchTerm: _angular_core.WritableSignal<string>;
85
+ /** Current page of the paginated dropdown. */
86
+ currentPage: _angular_core.WritableSignal<number>;
87
+ /** Tracks whether the user typed in the search input. */
88
+ private searchTermChanged;
89
+ /** Internal disabled state from the reactive form (setDisabledState). */
90
+ private _isDisabled;
91
+ /** Debounce timer handle for the search output. */
92
+ private debounceTimer;
93
+ /** Error-state counter used to recompute error helpers reactively. */
94
+ private errorTracker;
95
+ /** Whether an error has been shown at some point (for "fixed" messaging). */
96
+ hadError: _angular_core.WritableSignal<boolean>;
97
+ /** Whether control status/value subscriptions have been attached. */
98
+ private subscribed;
99
+ private valueSubscribed;
100
+ /** Current selection value. */
101
+ value: _angular_core.Signal<any>;
102
+ /** True when the select is disabled via input or by the reactive form. */
103
+ isDisabled: _angular_core.Signal<boolean>;
104
+ /** Resolves the form control from `control` or from `formGroup`+`label`. */
105
+ actualControl: _angular_core.Signal<FormControl<any> | undefined>;
106
+ /** Whether the bound control should display its error (invalid + touched/dirty). */
107
+ shouldShowError: _angular_core.Signal<boolean | undefined>;
108
+ /** Whether an error was shown before and the control is now valid + touched. */
109
+ wasFixedError: _angular_core.Signal<boolean | undefined>;
110
+ /** Text shown in the trigger: the selected label(s) or the placeholder. */
111
+ displayValue: _angular_core.Signal<any>;
112
+ /** List of validation error messages for the bound control. */
113
+ getErrorMessages: _angular_core.Signal<string[]>;
114
+ /** Options filtered by the search term (matches first, then contains). */
115
+ filteredOptions: _angular_core.Signal<SelectOption[]>;
116
+ /** Options for the current page, with a synthetic custom entry when allowed. */
117
+ paginatedOptions: _angular_core.Signal<SelectOption[]>;
118
+ /** Non-custom options, including the empty option in single-select mode. */
119
+ regularOptions: _angular_core.Signal<SelectOption[]>;
120
+ /** Total pages of the filtered option list (1 when pagination is off). */
121
+ totalPages: _angular_core.Signal<number>;
122
+ /** Whether there is at least one selected value. */
123
+ hasSelectedValues: _angular_core.Signal<any>;
124
+ /** Whether the custom optional entry should be offered for the current term. */
125
+ showCustomOption: _angular_core.Signal<boolean>;
126
+ private transloco;
127
+ /** ControlValueAccessor onChange callback. */
128
+ private onChange;
129
+ /** ControlValueAccessor onTouched callback. */
130
+ private onTouched;
131
+ private destroyRef;
132
+ constructor(elementRef: ElementRef);
133
+ /** Sets the disabled state coming from the reactive form infrastructure. */
134
+ setDisabledState(isDisabled: boolean): void;
135
+ /** Marks the control as touched and updates validity and error state. */
136
+ private markAsTouchedAndUpdate;
137
+ /** Strips accents and lowercases text for accent-insensitive matching. */
138
+ normalizeText(text: string): string;
139
+ /** Keyboard handler for the trigger element (open/close/navigate/select). */
140
+ onKeydown(event: KeyboardEvent): void;
141
+ /** Keyboard handler for the search input inside a searchable dropdown. */
142
+ handleKeyDown(event: KeyboardEvent): void;
143
+ /** Moves the focused option index by `direction`, skipping disabled ones. */
144
+ private moveFocus;
145
+ /** Index of the currently selected option, or -1. */
146
+ private getSelectedIndex;
147
+ /** Whether an option is disabled based on the valid combinations rule. */
148
+ isOptionDisabled(option: SelectOption): boolean;
149
+ /** Whether an option is currently selected. */
150
+ isSelected(option: SelectOption): boolean;
151
+ /** Goes to the next options page when possible. */
152
+ nextPage(): void;
153
+ /** Goes to the previous options page when possible. */
154
+ previousPage(): void;
155
+ /** Closes the dropdown when a click happens outside the component. */
156
+ onClickOutside(event: MouseEvent): void;
157
+ /** Selects a typed free-text value as a new custom entry. */
158
+ onCustomOptionClick(): void;
159
+ /** Handles typing in the search input (updates term and emits search). */
160
+ onInputChange(event: Event): void;
161
+ /** Selects or toggles the clicked option (custom entries included). */
162
+ onOptionClick(option: SelectOption): void;
163
+ /** Selects a single option and updates the control/outputs. */
164
+ selectOption(option: SelectOption): void;
165
+ /** Toggles an option in multiple mode, honoring the valid combinations. */
166
+ toggleOption(option: SelectOption): void;
167
+ /** Opens/closes the dropdown and manages focus/selection state. */
168
+ toggleDropdown(): void;
169
+ /** trackBy for rendered options so Angular reuses DOM nodes by value. */
170
+ trackByFn(index: number, option: SelectOption): any;
171
+ /** Writes an external value into the internal signal (ControlValueAccessor). */
172
+ writeValue(value: any): void;
173
+ /** Stores the onChange callback (ControlValueAccessor). */
174
+ registerOnChange(fn: any): void;
175
+ /** Stores the onTouched callback (ControlValueAccessor). */
176
+ registerOnTouched(fn: any): void;
177
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SelectComponent, never>;
178
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SelectComponent, "shk-select", never, { "options": { "alias": "options"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "validCombinations": { "alias": "validCombinations"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "isLoading": { "alias": "isLoading"; "required": false; "isSignal": true; }; "isAllDataLoaded": { "alias": "isAllDataLoaded"; "required": false; "isSignal": true; }; "allowCustomEntries": { "alias": "allowCustomEntries"; "required": false; "isSignal": true; }; "formGroup": { "alias": "formGroup"; "required": false; "isSignal": true; }; "isSearchable": { "alias": "isSearchable"; "required": false; "isSignal": true; }; "itemsPerPage": { "alias": "itemsPerPage"; "required": false; "isSignal": true; }; "control": { "alias": "control"; "required": false; "isSignal": true; }; "usePagination": { "alias": "usePagination"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "errorMessages": { "alias": "errorMessages"; "required": false; "isSignal": true; }; "preserveSearchOnLoad": { "alias": "preserveSearchOnLoad"; "required": false; "isSignal": true; }; "emptyMessageKey": { "alias": "emptyMessageKey"; "required": false; "isSignal": true; }; "dropdownUpward": { "alias": "dropdownUpward"; "required": false; "isSignal": true; }; "showEmptyOption": { "alias": "showEmptyOption"; "required": false; "isSignal": true; }; }, { "selectionChange": "selectionChange"; "search": "search"; }, never, never, true, never>;
179
+ }
180
+
181
+ export { SelectComponent };
182
+ export type { SelectOption };
@@ -0,0 +1,106 @@
1
+ import * as _angular_core from '@angular/core';
2
+
3
+ interface SidebarItem {
4
+ id: string;
5
+ label: string;
6
+ icon?: string | any;
7
+ route?: string;
8
+ children?: SidebarItem[];
9
+ roles?: string[];
10
+ badge?: string | number;
11
+ disabled?: boolean;
12
+ separator?: boolean;
13
+ }
14
+ interface SidebarGroup {
15
+ id?: string;
16
+ label?: string;
17
+ items: SidebarItem[];
18
+ }
19
+ /**
20
+ * Shirkasoft UI Components.
21
+ * Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
22
+ * Belongs to Shirkasoft.
23
+ */
24
+ /**
25
+ * Collapsible vertical navigation sidebar with groups, icons, badges,
26
+ * role-based filtering, responsive mobile drawer and tooltips.
27
+ */
28
+ declare class SidebarComponent {
29
+ private platformId;
30
+ /** Flat list of navigation items (used when no groups are provided). */
31
+ items: _angular_core.InputSignal<SidebarItem[]>;
32
+ /** Grouped navigation items; takes precedence over `items`. */
33
+ groups: _angular_core.InputSignal<SidebarGroup[]>;
34
+ /** Brand title shown at the top of the sidebar. */
35
+ title: _angular_core.InputSignal<string>;
36
+ /** Subtitle under the title. */
37
+ subtitle: _angular_core.InputSignal<string>;
38
+ /** Brand logo image/url shown at the top. */
39
+ logo: _angular_core.InputSignal<string>;
40
+ /** id of the item currently highlighted as active. */
41
+ activeItemId: _angular_core.InputSignal<string>;
42
+ /** Role used to filter items that declare `roles`. */
43
+ userRole: _angular_core.InputSignal<string>;
44
+ /** Whether the sidebar can collapse into a rail. */
45
+ collapsible: _angular_core.InputSignal<boolean>;
46
+ /** Shows the expand/collapse toggle button. */
47
+ showToggle: _angular_core.InputSignal<boolean>;
48
+ /** Enables the mobile drawer behaviour below lg breakpoint. */
49
+ responsive: _angular_core.InputSignal<boolean>;
50
+ /** Keeps the sidebar fixed while the page scrolls. */
51
+ fixed: _angular_core.InputSignal<boolean>;
52
+ /** Adds a drop shadow to the sidebar. */
53
+ hasShadow: _angular_core.InputSignal<boolean>;
54
+ /** Width in expanded state. */
55
+ expandedWidth: _angular_core.InputSignal<string>;
56
+ /** Width when collapsed. */
57
+ collapsedWidth: _angular_core.InputSignal<string>;
58
+ /** Group ids opened by default on load. */
59
+ defaultExpanded: _angular_core.InputSignal<string[]>;
60
+ /** Optional transform applied to item labels (e.g. i18n). */
61
+ labelPipe: _angular_core.InputSignal<(label: string) => string>;
62
+ /** Tooltip for the expand action. */
63
+ expandTooltip: _angular_core.InputSignal<string>;
64
+ /** Tooltip for the collapse action. */
65
+ collapseTooltip: _angular_core.InputSignal<string>;
66
+ /** Collapsed state, bindable with [(collapsed)]. */
67
+ collapsed: _angular_core.ModelSignal<boolean>;
68
+ /** Mobile drawer open state, bindable with [(mobileOpen)]. */
69
+ mobileOpen: _angular_core.ModelSignal<boolean>;
70
+ /** Emitted when a navigation item is clicked. */
71
+ itemClick: _angular_core.OutputEmitterRef<SidebarItem>;
72
+ /** Emitted with the new collapsed state after toggling. */
73
+ toggle: _angular_core.OutputEmitterRef<boolean>;
74
+ protected getIcon: (name: any) => any;
75
+ /** Currently selected item id. */
76
+ protected selectedId: _angular_core.WritableSignal<string>;
77
+ /** Set of group ids currently expanded. */
78
+ protected expandedGroups: _angular_core.WritableSignal<Set<string>>;
79
+ private isBrowser;
80
+ constructor();
81
+ /** Current sidebar width depending on the collapsed state. */
82
+ protected width: _angular_core.Signal<string>;
83
+ /** Navigation items after group flattening and role filtering. */
84
+ protected navItems: _angular_core.Signal<SidebarItem[]>;
85
+ /** Closes the mobile drawer when the window grows below lg. */
86
+ onResize(_event: Event): void;
87
+ /** Applies the `labelPipe` transform to an item label. */
88
+ protected label(item: SidebarItem): string;
89
+ /** Whether the item matches the selected id. */
90
+ protected isItemActive(item: SidebarItem): boolean;
91
+ /** Whether one of the item's children is currently active. */
92
+ protected isGroupActive(item: SidebarItem): boolean;
93
+ /** Whether a group is expanded. */
94
+ protected isGroupExpanded(item: SidebarItem): boolean;
95
+ /** Toggles the expanded state of a group. */
96
+ protected toggleGroup(item: SidebarItem): void;
97
+ /** Selects an item, emits `itemClick` and closes the mobile drawer when needed. */
98
+ protected onItemClick(item: SidebarItem): void;
99
+ /** Toggles collapse (desktop) or the mobile drawer (below lg). */
100
+ protected onToggle(): void;
101
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SidebarComponent, never>;
102
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SidebarComponent, "shk-sidebar", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "groups": { "alias": "groups"; "required": false; "isSignal": true; }; "title": { "alias": "title"; "required": false; "isSignal": true; }; "subtitle": { "alias": "subtitle"; "required": false; "isSignal": true; }; "logo": { "alias": "logo"; "required": false; "isSignal": true; }; "activeItemId": { "alias": "activeItemId"; "required": false; "isSignal": true; }; "userRole": { "alias": "userRole"; "required": false; "isSignal": true; }; "collapsible": { "alias": "collapsible"; "required": false; "isSignal": true; }; "showToggle": { "alias": "showToggle"; "required": false; "isSignal": true; }; "responsive": { "alias": "responsive"; "required": false; "isSignal": true; }; "fixed": { "alias": "fixed"; "required": false; "isSignal": true; }; "hasShadow": { "alias": "hasShadow"; "required": false; "isSignal": true; }; "expandedWidth": { "alias": "expandedWidth"; "required": false; "isSignal": true; }; "collapsedWidth": { "alias": "collapsedWidth"; "required": false; "isSignal": true; }; "defaultExpanded": { "alias": "defaultExpanded"; "required": false; "isSignal": true; }; "labelPipe": { "alias": "labelPipe"; "required": false; "isSignal": true; }; "expandTooltip": { "alias": "expandTooltip"; "required": false; "isSignal": true; }; "collapseTooltip": { "alias": "collapseTooltip"; "required": false; "isSignal": true; }; "collapsed": { "alias": "collapsed"; "required": false; "isSignal": true; }; "mobileOpen": { "alias": "mobileOpen"; "required": false; "isSignal": true; }; }, { "collapsed": "collapsedChange"; "mobileOpen": "mobileOpenChange"; "itemClick": "itemClick"; "toggle": "toggle"; }, never, ["[sidebarHeader]", "[sidebarContent]", "[sidebarFooter]"], true, never>;
103
+ }
104
+
105
+ export { SidebarComponent };
106
+ export type { SidebarGroup, SidebarItem };
@@ -0,0 +1,36 @@
1
+ import * as _angular_core from '@angular/core';
2
+
3
+ type SkeletonShape = 'rectangle' | 'circle';
4
+ type SkeletonAnimation = 'wave' | 'pulse' | 'none';
5
+ /**
6
+ * Shirkasoft UI Components.
7
+ * Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
8
+ * Belongs to Shirkasoft.
9
+ */
10
+ /** Placeholder block shown while content is loading. */
11
+ declare class SkeletonComponent {
12
+ /** Shape of the skeleton: rectangle (default) or circle. */
13
+ shape: _angular_core.InputSignal<SkeletonShape>;
14
+ /** When shape is circle, sets both width and height. */
15
+ size: _angular_core.InputSignal<string>;
16
+ /** Width of the rectangle skeleton. */
17
+ width: _angular_core.InputSignal<string>;
18
+ /** Height of the rectangle skeleton. */
19
+ height: _angular_core.InputSignal<string>;
20
+ /** Custom border radius (rectangle only). */
21
+ borderRadius: _angular_core.InputSignal<string>;
22
+ /** Animation effect: 'wave' (default), 'pulse' or 'none'. */
23
+ animation: _angular_core.InputSignal<SkeletonAnimation>;
24
+ /** Inline styles applied to the skeleton block. */
25
+ style: _angular_core.InputSignal<Record<string, string | number>>;
26
+ /** Extra CSS classes. */
27
+ styleClass: _angular_core.InputSignal<string>;
28
+ protected rootStyle: _angular_core.Signal<{
29
+ [x: string]: string | number;
30
+ }>;
31
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<SkeletonComponent, never>;
32
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<SkeletonComponent, "shk-skeleton", never, { "shape": { "alias": "shape"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "borderRadius": { "alias": "borderRadius"; "required": false; "isSignal": true; }; "animation": { "alias": "animation"; "required": false; "isSignal": true; }; "style": { "alias": "style"; "required": false; "isSignal": true; }; "styleClass": { "alias": "styleClass"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
33
+ }
34
+
35
+ export { SkeletonComponent };
36
+ export type { SkeletonAnimation, SkeletonShape };