shirkasoft-ui-components 1.14.0 → 2.0.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/README.md +4 -8
- package/fesm2022/shirkasoft-ui-components-breadcrumb.mjs +189 -100
- package/fesm2022/shirkasoft-ui-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-button.mjs +363 -69
- package/fesm2022/shirkasoft-ui-components-button.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-chart.mjs +206 -142
- package/fesm2022/shirkasoft-ui-components-chart.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-config.mjs +905 -843
- package/fesm2022/shirkasoft-ui-components-config.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-confirm-dialog.mjs +307 -142
- package/fesm2022/shirkasoft-ui-components-confirm-dialog.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-date-picker.mjs +1624 -1440
- package/fesm2022/shirkasoft-ui-components-date-picker.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-fieldset.mjs +347 -92
- package/fesm2022/shirkasoft-ui-components-fieldset.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-file-upload.mjs +484 -300
- package/fesm2022/shirkasoft-ui-components-file-upload.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-icons.mjs +1028 -533
- package/fesm2022/shirkasoft-ui-components-icons.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-knob.mjs +389 -201
- package/fesm2022/shirkasoft-ui-components-knob.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-loading.mjs +505 -128
- package/fesm2022/shirkasoft-ui-components-loading.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-modal.mjs +311 -314
- package/fesm2022/shirkasoft-ui-components-modal.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-notification.mjs +188 -142
- package/fesm2022/shirkasoft-ui-components-notification.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-price-input.mjs +517 -327
- package/fesm2022/shirkasoft-ui-components-price-input.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-rail-sidebar.mjs +669 -289
- package/fesm2022/shirkasoft-ui-components-rail-sidebar.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-select.mjs +1014 -819
- package/fesm2022/shirkasoft-ui-components-select.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-sidebar.mjs +508 -184
- package/fesm2022/shirkasoft-ui-components-sidebar.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-skeleton.mjs +197 -57
- package/fesm2022/shirkasoft-ui-components-skeleton.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-table.mjs +1916 -1698
- package/fesm2022/shirkasoft-ui-components-table.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-tabs.mjs +419 -175
- package/fesm2022/shirkasoft-ui-components-tabs.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-tag.mjs +175 -49
- package/fesm2022/shirkasoft-ui-components-tag.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-text-field.mjs +687 -402
- package/fesm2022/shirkasoft-ui-components-text-field.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-theme-picker.mjs +310 -124
- package/fesm2022/shirkasoft-ui-components-theme-picker.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-theme.mjs +141 -174
- package/fesm2022/shirkasoft-ui-components-theme.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-timeline.mjs +791 -203
- package/fesm2022/shirkasoft-ui-components-timeline.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-toggle.mjs +179 -109
- package/fesm2022/shirkasoft-ui-components-toggle.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-tooltip.mjs +244 -180
- package/fesm2022/shirkasoft-ui-components-tooltip.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-utils.mjs +95 -134
- package/fesm2022/shirkasoft-ui-components-utils.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components-wizard.mjs +673 -165
- package/fesm2022/shirkasoft-ui-components-wizard.mjs.map +1 -1
- package/fesm2022/shirkasoft-ui-components.mjs +0 -9
- package/package.json +5 -5
- package/types/shirkasoft-ui-components-breadcrumb.d.ts +59 -44
- package/types/shirkasoft-ui-components-button.d.ts +142 -49
- package/types/shirkasoft-ui-components-chart.d.ts +59 -44
- package/types/shirkasoft-ui-components-config.d.ts +193 -204
- package/types/shirkasoft-ui-components-confirm-dialog.d.ts +107 -66
- package/types/shirkasoft-ui-components-date-picker.d.ts +527 -398
- package/types/shirkasoft-ui-components-fieldset.d.ts +135 -60
- package/types/shirkasoft-ui-components-file-upload.d.ts +176 -112
- package/types/shirkasoft-ui-components-icons.d.ts +1302 -1294
- package/types/shirkasoft-ui-components-knob.d.ts +144 -78
- package/types/shirkasoft-ui-components-loading.d.ts +155 -64
- package/types/shirkasoft-ui-components-modal.d.ts +134 -136
- package/types/shirkasoft-ui-components-notification.d.ts +63 -59
- package/types/shirkasoft-ui-components-price-input.d.ts +198 -113
- package/types/shirkasoft-ui-components-rail-sidebar.d.ts +262 -142
- package/types/shirkasoft-ui-components-select.d.ts +301 -196
- package/types/shirkasoft-ui-components-sidebar.d.ts +198 -93
- package/types/shirkasoft-ui-components-skeleton.d.ts +68 -27
- package/types/shirkasoft-ui-components-table.d.ts +849 -660
- package/types/shirkasoft-ui-components-tabs.d.ts +102 -61
- package/types/shirkasoft-ui-components-tag.d.ts +54 -23
- package/types/shirkasoft-ui-components-text-field.d.ts +231 -127
- package/types/shirkasoft-ui-components-theme-picker.d.ts +92 -58
- package/types/shirkasoft-ui-components-theme.d.ts +56 -64
- package/types/shirkasoft-ui-components-timeline.d.ts +325 -150
- package/types/shirkasoft-ui-components-toggle.d.ts +73 -49
- package/types/shirkasoft-ui-components-tooltip.d.ts +64 -43
- package/types/shirkasoft-ui-components-utils.d.ts +15 -16
- package/types/shirkasoft-ui-components-wizard.d.ts +236 -87
- package/types/shirkasoft-ui-components.d.ts +1 -2
- package/fesm2022/shirkasoft-ui-components.mjs.map +0 -1
|
@@ -1,291 +1,671 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import * as i1 from
|
|
4
|
-
import {
|
|
5
|
-
import { LucideMenu, LucideX, ShkIconDirective } from
|
|
6
|
-
import { getIcon } from
|
|
7
|
-
import { TooltipComponent } from
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Shirkasoft UI Components.
|
|
11
|
-
* Authors: Roberto Valladares Martin (Ansem13), Julio César García García (Sanjuli14).
|
|
12
|
-
* Belongs to Shirkasoft.
|
|
13
|
-
*/
|
|
14
|
-
/** Counter used to generate unique element ids per instance. */
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, HostListener, Injector, PLATFORM_ID, afterNextRender, computed, effect, inject, input, model, output, signal, untracked, viewChild } from "@angular/core";
|
|
3
|
+
import * as i1 from "@angular/common";
|
|
4
|
+
import { CommonModule, isPlatformBrowser } from "@angular/common";
|
|
5
|
+
import { LucideMenu, LucideX, ShkIconDirective } from "shirkasoft-ui-components/icons";
|
|
6
|
+
import { getIcon } from "shirkasoft-ui-components/utils";
|
|
7
|
+
import { TooltipComponent } from "shirkasoft-ui-components/tooltip";
|
|
15
8
|
let nextRailId = 0;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.27", type: RailSidebarComponent, isStandalone: true, selector: "shk-rail-sidebar", inputs: { sections: { classPropertyName: "sections", publicName: "sections", isSignal: true, isRequired: false, transformFunction: null }, activeUrl: { classPropertyName: "activeUrl", publicName: "activeUrl", isSignal: true, isRequired: false, transformFunction: null }, activeSectionKey: { classPropertyName: "activeSectionKey", publicName: "activeSectionKey", isSignal: true, isRequired: false, transformFunction: null }, collapsed: { classPropertyName: "collapsed", publicName: "collapsed", isSignal: true, isRequired: false, transformFunction: null }, activeLang: { classPropertyName: "activeLang", publicName: "activeLang", isSignal: true, isRequired: false, transformFunction: null }, langs: { classPropertyName: "langs", publicName: "langs", isSignal: true, isRequired: false, transformFunction: null }, logo: { classPropertyName: "logo", publicName: "logo", isSignal: true, isRequired: false, transformFunction: null }, appName: { classPropertyName: "appName", publicName: "appName", isSignal: true, isRequired: false, transformFunction: null }, userRole: { classPropertyName: "userRole", publicName: "userRole", isSignal: true, isRequired: false, transformFunction: null }, labelPipe: { classPropertyName: "labelPipe", publicName: "labelPipe", isSignal: true, isRequired: false, transformFunction: null }, railWidth: { classPropertyName: "railWidth", publicName: "railWidth", isSignal: true, isRequired: false, transformFunction: null }, expandedWidth: { classPropertyName: "expandedWidth", publicName: "expandedWidth", isSignal: true, isRequired: false, transformFunction: null }, workspaceTooltip: { classPropertyName: "workspaceTooltip", publicName: "workspaceTooltip", isSignal: true, isRequired: false, transformFunction: null }, logoutTooltip: { classPropertyName: "logoutTooltip", publicName: "logoutTooltip", isSignal: true, isRequired: false, transformFunction: null }, collapseTooltip: { classPropertyName: "collapseTooltip", publicName: "collapseTooltip", isSignal: true, isRequired: false, transformFunction: null }, expandTooltip: { classPropertyName: "expandTooltip", publicName: "expandTooltip", isSignal: true, isRequired: false, transformFunction: null }, responsive: { classPropertyName: "responsive", publicName: "responsive", isSignal: true, isRequired: false, transformFunction: null }, mobileBreakpoint: { classPropertyName: "mobileBreakpoint", publicName: "mobileBreakpoint", isSignal: true, isRequired: false, transformFunction: null }, showMobileToggle: { classPropertyName: "showMobileToggle", publicName: "showMobileToggle", isSignal: true, isRequired: false, transformFunction: null }, mobileOpen: { classPropertyName: "mobileOpen", publicName: "mobileOpen", isSignal: true, isRequired: false, transformFunction: null }, openMenuLabel: { classPropertyName: "openMenuLabel", publicName: "openMenuLabel", isSignal: true, isRequired: false, transformFunction: null }, closeMenuLabel: { classPropertyName: "closeMenuLabel", publicName: "closeMenuLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { activeSectionKey: "activeSectionKeyChange", collapsed: "collapsedChange", mobileOpen: "mobileOpenChange", sectionSelected: "sectionSelected", itemClick: "itemClick", setLang: "setLang", logoutRequested: "logoutRequested", toggleSidebar: "toggleSidebar", workspaceClick: "workspaceClick" }, host: { listeners: { "window:resize": "onResize()", "document:keydown.escape": "onEscape()" }, properties: { "class.rail-is-mobile": "isMobile()" } }, viewQueries: [{ propertyName: "hamburgerBtn", first: true, predicate: ["hamburger"], descendants: true, isSignal: true }, { propertyName: "closeBtn", first: true, predicate: ["closeBtn"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (isMobile()) {\n <!-- Mobile: hamburger button + backdrop (the aside becomes a drawer) -->\n @if (showMobileToggle() && !mobileOpen()) {\n <button\n #hamburger\n type=\"button\"\n class=\"rail-hamburger _shk-bg-panel-raised border _shk-border _shk-text-surface-700\"\n [attr.aria-label]=\"openMenuLabel()\"\n aria-expanded=\"false\"\n [attr.aria-controls]=\"uid\"\n (click)=\"openMobile()\"\n >\n <svg [shkIcon]=\"getIcon('menu')\" class=\"w-5 h-5\"></svg>\n </button>\n }\n <div class=\"rail-backdrop\" [class.is-open]=\"mobileOpen()\" (click)=\"closeMobile()\"></div>\n}\n\n<aside\n [id]=\"uid\"\n class=\"h-full flex overflow-hidden shrink-0 _shk-bg-panel border-r _shk-border\"\n [class.rail-drawer]=\"isMobile()\"\n [class.is-open]=\"isMobile() && mobileOpen()\"\n [attr.role]=\"isMobile() ? 'dialog' : null\"\n [attr.aria-modal]=\"isMobile() && mobileOpen() ? 'true' : null\"\n [attr.aria-label]=\"isMobile() ? appName() || openMenuLabel() : null\"\n [attr.inert]=\"isMobile() && !mobileOpen() ? '' : null\"\n [style.width]=\"width()\"\n>\n <!-- Rail: vertical icon column -->\n <div\n class=\"h-full flex flex-col items-center shrink-0 px-[0.3rem] py-2 gap-1 border-r _shk-border\"\n [style.width]=\"railWidth()\"\n >\n <!-- Workspace / logo -->\n <div class=\"flex items-center justify-center w-full\">\n <button\n type=\"button\"\n (click)=\"onWorkspace()\"\n [class.is-collapsed]=\"!expanded()\"\n class=\"rail-workspace w-[3.2rem] h-[3.2rem] rounded-xl _shk-bg-surface-100 border-none grid place-items-center p-0 relative transition-all\"\n [title]=\"workspaceTooltip()\"\n >\n @if (logo()) {\n <img [src]=\"logo()\" alt=\"Logo\" class=\"rail-app-icon w-8 h-8 object-contain\" />\n } @else {\n <svg [shkIcon]=\"getIcon('menu')\" class=\"rail-app-icon w-6 h-6 _shk-text-surface-700\"></svg>\n }\n @if (!expanded()) {\n <svg [shkIcon]=\"getIcon('panel-right')\" class=\"rail-toggle-icon w-5 h-5 _shk-text-surface-700\"></svg>\n }\n </button>\n </div>\n\n <!-- Section actions -->\n <div class=\"rail-actions flex-1 flex flex-col items-center gap-1 pt-1\">\n @for (section of sections(); track section.key) {\n <shk-tooltip [text]=\"label(section.label)\" position=\"right\" mode=\"fixed\">\n <button\n type=\"button\"\n (click)=\"onSectionClick(section)\"\n class=\"rail-icon w-[3.4rem] h-[3.4rem] rounded-[0.85rem] grid place-items-center transition-all cursor-pointer\"\n [class.is-active]=\"isSectionActive(section)\"\n [attr.aria-label]=\"label(section.label)\"\n >\n <svg [shkIcon]=\"getIcon(section.icon)\" class=\"w-5 h-5\"></svg>\n </button>\n </shk-tooltip>\n }\n </div>\n\n <!-- Bottom: language + logout -->\n <div class=\"rail-bottom mt-auto flex flex-col items-center gap-1\">\n <button\n type=\"button\"\n (click)=\"onToggleLang()\"\n class=\"rail-icon w-[3.4rem] h-[3.4rem] rounded-[0.85rem] grid place-items-center transition-all cursor-pointer\"\n [title]=\"activeLang()\"\n >\n <div class=\"flex flex-col items-center gap-[0.15rem]\">\n <svg [shkIcon]=\"getIcon('languages')\" class=\"w-5 h-5\"></svg>\n <span class=\"rail-lang-code text-[0.5rem] font-bold tracking-[0.05em] leading-none\">{{ activeLang() | uppercase }}</span>\n </div>\n </button>\n\n <button\n type=\"button\"\n (click)=\"onLogout()\"\n class=\"rail-icon rail-logout w-[3.4rem] h-[3.4rem] rounded-[0.85rem] grid place-items-center transition-all cursor-pointer\"\n [title]=\"logoutTooltip()\"\n >\n <svg [shkIcon]=\"getIcon('log-out')\" class=\"w-5 h-5\"></svg>\n </button>\n </div>\n </div>\n\n <!-- Nav: section panel (hidden when collapsed) -->\n @if (expanded()) {\n <div class=\"flex-1 min-w-0 flex flex-col _shk-bg-panel\">\n <!-- Brand header -->\n <div class=\"flex items-center justify-between gap-2 px-3 py-4 border-b _shk-border\">\n <span class=\"nav-app text-base font-bold whitespace-nowrap overflow-hidden text-ellipsis _shk-text-surface-800\">\n {{ appName() }}\n </span>\n <button\n #closeBtn\n type=\"button\"\n (click)=\"onToggleSidebar()\"\n class=\"nav-toggle w-[1.8rem] h-[1.8rem] rounded-lg border-none bg-transparent grid place-items-center cursor-pointer shrink-0 transition-colors _shk-text-surface-700 hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]\"\n [title]=\"isMobile() ? closeMenuLabel() : collapseTooltip()\"\n [attr.aria-label]=\"isMobile() ? closeMenuLabel() : collapseTooltip()\"\n >\n <svg [shkIcon]=\"isMobile() ? closeIcon : getIcon('panel-right')\" class=\"w-4 h-4\"></svg>\n </button>\n </div>\n\n <!-- Menu -->\n <nav class=\"flex-1 overflow-y-auto _shk-scrollbar px-2 py-3\">\n @if (activeSection()) {\n <div class=\"px-2 pb-3\">\n <span class=\"nav-section-label text-xs font-bold tracking-[0.08em] uppercase _shk-text-surface-400 block whitespace-nowrap overflow-hidden text-ellipsis\">\n {{ label(activeSection()!.label) }}\n </span>\n </div>\n }\n\n <ul class=\"space-y-1\">\n @for (item of navItems(); track item.id) {\n @if (item.separator) {\n <li class=\"my-2 border-t _shk-border\"></li>\n }\n\n @if (item.children?.length) {\n <!-- Expandable group -->\n <li>\n <button\n type=\"button\"\n (click)=\"toggleGroup(item)\"\n class=\"w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm font-medium transition-all duration-200\"\n [class._shk-bg-primary]=\"isGroupActive(item)\"\n [class._shk-text-white]=\"isGroupActive(item)\"\n [class.shadow-md]=\"isGroupActive(item)\"\n [class._shk-text-surface-700]=\"!isGroupActive(item)\"\n [class.hover:[background-color:var(--shk-surface-100)]]=\"!isGroupActive(item)\"\n [class.dark:hover:[background-color:var(--shk-surface-200)]]=\"!isGroupActive(item)\"\n >\n @if (item.icon) {\n <svg [shkIcon]=\"getIcon(item.icon)\" class=\"w-5 h-5 shrink-0\"></svg>\n }\n <span class=\"flex-1 text-left whitespace-nowrap overflow-hidden\">{{ label(item.label) }}</span>\n <svg\n [shkIcon]=\"getIcon('chevron-down')\"\n class=\"w-4 h-4 transition-transform duration-200 shrink-0\"\n [class.rotate-180]=\"isGroupExpanded(item)\"\n ></svg>\n </button>\n\n @if (isGroupExpanded(item)) {\n <ul class=\"ml-3 mt-1 space-y-1 border-l-2 _shk-border pl-2\">\n @for (child of item.children; track child.id) {\n <li>\n <button\n type=\"button\"\n (click)=\"onItemClick(child)\"\n class=\"w-full flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200\"\n [class._shk-bg-primary-soft]=\"isItemActive(child)\"\n [class._shk-bg-primary-soft-dark]=\"isItemActive(child)\"\n [class._shk-text-primary-700]=\"isItemActive(child)\"\n [class.dark:[color:var(--shk-primary-300)]]=\"isItemActive(child)\"\n [class._shk-text-surface-600]=\"!isItemActive(child)\"\n [class.hover:[background-color:var(--shk-surface-100)]]=\"!isItemActive(child)\"\n [class.dark:hover:[background-color:var(--shk-surface-200)]]=\"!isItemActive(child)\"\n [class.hover:[color:var(--shk-surface-900)]]=\"!isItemActive(child)\"\n [class.dark:hover:[color:var(--shk-surface-700)]]=\"!isItemActive(child)\"\n >\n @if (child.icon) {\n <svg [shkIcon]=\"getIcon(child.icon)\" class=\"w-4 h-4 shrink-0\"></svg>\n }\n <span class=\"whitespace-nowrap overflow-hidden\">{{ label(child.label) }}</span>\n @if (isItemActive(child)) {\n <span class=\"w-1.5 h-1.5 rounded-full _shk-bg-primary shrink-0 ml-auto\"></span>\n }\n </button>\n </li>\n }\n </ul>\n }\n </li>\n } @else {\n <!-- Standalone item -->\n <li>\n <button\n type=\"button\"\n (click)=\"onItemClick(item)\"\n class=\"w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm font-medium transition-all duration-200\"\n [class._shk-bg-primary]=\"isItemActive(item)\"\n [class._shk-text-white]=\"isItemActive(item)\"\n [class.shadow-md]=\"isItemActive(item)\"\n [class._shk-text-surface-700]=\"!isItemActive(item)\"\n [class.hover:[background-color:var(--shk-surface-100)]]=\"!isItemActive(item)\"\n [class.dark:hover:[background-color:var(--shk-surface-200)]]=\"!isItemActive(item)\"\n >\n @if (item.icon) {\n <svg [shkIcon]=\"getIcon(item.icon)\" class=\"w-5 h-5 shrink-0\"></svg>\n }\n <span class=\"flex-1 text-left whitespace-nowrap overflow-hidden\">{{ label(item.label) }}</span>\n @if (item.badge !== undefined) {\n <span class=\"text-xs font-bold px-2 py-0.5 rounded-full _shk-bg-primary _shk-text-white shrink-0\">\n {{ item.badge }}\n </span>\n }\n </button>\n </li>\n }\n }\n </ul>\n </nav>\n </div>\n }\n</aside>\n", styles: [":host{display:block;height:100%}:host(.rail-is-mobile){position:relative;width:0;min-width:0;flex:0 0 0;overflow:visible}.rail-hamburger{position:absolute;top:.75rem;left:.75rem;z-index:var(--shk-rail-hamburger-z, 1);display:grid;place-items:center;width:2.5rem;height:2.5rem;border-radius:.625rem;box-shadow:0 1px 3px #0000001f;cursor:pointer;transition:background-color .15s ease}.rail-hamburger:hover{background-color:var(--shk-surface-100)}.rail-hamburger:focus-visible{outline:2px solid var(--shk-primary-500);outline-offset:2px}.rail-backdrop{position:fixed;inset:0;z-index:49;background-color:var(--shk-bg-overlay, rgba(0, 0, 0, .4));opacity:0;pointer-events:none;transition:opacity .25s ease}.rail-backdrop.is-open{opacity:1;pointer-events:auto}.rail-drawer{position:fixed;top:0;left:0;bottom:0;z-index:50;height:100dvh;max-width:85vw;transform:translate(-100%);visibility:hidden;transition:transform .25s ease,visibility 0s linear .25s}.rail-drawer.is-open{transform:translate(0);visibility:visible;box-shadow:0 10px 30px #00000040;transition:transform .25s ease}@media(prefers-reduced-motion:reduce){.rail-drawer,.rail-drawer.is-open,.rail-backdrop{transition:none}}.rail-workspace{cursor:pointer;transition:opacity .2s ease,box-shadow .2s ease}.rail-workspace.is-collapsed:hover{cursor:col-resize}.rail-workspace .rail-app-icon,.rail-workspace .rail-toggle-icon{grid-area:1 / 1 / 2 / 2;transition:opacity .2s ease}.rail-toggle-icon,.rail-workspace.is-collapsed:hover .rail-app-icon{opacity:0}.rail-workspace.is-collapsed:hover .rail-toggle-icon{opacity:1}.rail-icon{background:transparent;color:var(--shk-surface-700);border:1px solid transparent;transition:transform .18s ease,color .18s ease,background-color .18s ease,box-shadow .18s ease}.rail-icon svg{stroke-width:1.8}.rail-icon:hover{background:var(--shk-surface-100);color:var(--shk-primary-600)}.dark .rail-icon:hover{background:var(--shk-surface-200);color:var(--shk-primary-400)}.rail-icon.is-active{background:var(--shk-primary-600);color:#fff;box-shadow:0 1px 2px #0003}.dark .rail-icon.is-active{background:var(--shk-primary-500);color:#fff}.rail-logout:hover{color:var(--shk-error-500)}.dark .rail-logout:hover{color:var(--shk-error-400)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: ShkIconDirective, selector: "svg[shkIcon]", inputs: ["shkIcon", "size", "strokeWidth", "color"] }, { kind: "component", type: TooltipComponent, selector: "shk-tooltip", inputs: ["text", "position", "mode", "offset"] }, { kind: "pipe", type: i1.UpperCasePipe, name: "uppercase" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
}, template: "@if (isMobile()) {\n <!-- Mobile: hamburger button + backdrop (the aside becomes a drawer) -->\n @if (showMobileToggle() && !mobileOpen()) {\n <button\n #hamburger\n type=\"button\"\n class=\"rail-hamburger _shk-bg-panel-raised border _shk-border _shk-text-surface-700\"\n [attr.aria-label]=\"openMenuLabel()\"\n aria-expanded=\"false\"\n [attr.aria-controls]=\"uid\"\n (click)=\"openMobile()\"\n >\n <svg [shkIcon]=\"getIcon('menu')\" class=\"w-5 h-5\"></svg>\n </button>\n }\n <div class=\"rail-backdrop\" [class.is-open]=\"mobileOpen()\" (click)=\"closeMobile()\"></div>\n}\n\n<aside\n [id]=\"uid\"\n class=\"h-full flex overflow-hidden shrink-0 _shk-bg-panel border-r _shk-border\"\n [class.rail-drawer]=\"isMobile()\"\n [class.is-open]=\"isMobile() && mobileOpen()\"\n [attr.role]=\"isMobile() ? 'dialog' : null\"\n [attr.aria-modal]=\"isMobile() && mobileOpen() ? 'true' : null\"\n [attr.aria-label]=\"isMobile() ? appName() || openMenuLabel() : null\"\n [attr.inert]=\"isMobile() && !mobileOpen() ? '' : null\"\n [style.width]=\"width()\"\n>\n <!-- Rail: vertical icon column -->\n <div\n class=\"h-full flex flex-col items-center shrink-0 px-[0.3rem] py-2 gap-1 border-r _shk-border\"\n [style.width]=\"railWidth()\"\n >\n <!-- Workspace / logo -->\n <div class=\"flex items-center justify-center w-full\">\n <button\n type=\"button\"\n (click)=\"onWorkspace()\"\n [class.is-collapsed]=\"!expanded()\"\n class=\"rail-workspace w-[3.2rem] h-[3.2rem] rounded-xl _shk-bg-surface-100 border-none grid place-items-center p-0 relative transition-all\"\n [title]=\"workspaceTooltip()\"\n >\n @if (logo()) {\n <img [src]=\"logo()\" alt=\"Logo\" class=\"rail-app-icon w-8 h-8 object-contain\" />\n } @else {\n <svg [shkIcon]=\"getIcon('menu')\" class=\"rail-app-icon w-6 h-6 _shk-text-surface-700\"></svg>\n }\n @if (!expanded()) {\n <svg [shkIcon]=\"getIcon('panel-right')\" class=\"rail-toggle-icon w-5 h-5 _shk-text-surface-700\"></svg>\n }\n </button>\n </div>\n\n <!-- Section actions -->\n <div class=\"rail-actions flex-1 flex flex-col items-center gap-1 pt-1\">\n @for (section of sections(); track section.key) {\n <shk-tooltip [text]=\"label(section.label)\" position=\"right\" mode=\"fixed\">\n <button\n type=\"button\"\n (click)=\"onSectionClick(section)\"\n class=\"rail-icon w-[3.4rem] h-[3.4rem] rounded-[0.85rem] grid place-items-center transition-all cursor-pointer\"\n [class.is-active]=\"isSectionActive(section)\"\n [attr.aria-label]=\"label(section.label)\"\n >\n <svg [shkIcon]=\"getIcon(section.icon)\" class=\"w-5 h-5\"></svg>\n </button>\n </shk-tooltip>\n }\n </div>\n\n <!-- Bottom: language + logout -->\n <div class=\"rail-bottom mt-auto flex flex-col items-center gap-1\">\n <button\n type=\"button\"\n (click)=\"onToggleLang()\"\n class=\"rail-icon w-[3.4rem] h-[3.4rem] rounded-[0.85rem] grid place-items-center transition-all cursor-pointer\"\n [title]=\"activeLang()\"\n >\n <div class=\"flex flex-col items-center gap-[0.15rem]\">\n <svg [shkIcon]=\"getIcon('languages')\" class=\"w-5 h-5\"></svg>\n <span class=\"rail-lang-code text-[0.5rem] font-bold tracking-[0.05em] leading-none\">{{ activeLang() | uppercase }}</span>\n </div>\n </button>\n\n <button\n type=\"button\"\n (click)=\"onLogout()\"\n class=\"rail-icon rail-logout w-[3.4rem] h-[3.4rem] rounded-[0.85rem] grid place-items-center transition-all cursor-pointer\"\n [title]=\"logoutTooltip()\"\n >\n <svg [shkIcon]=\"getIcon('log-out')\" class=\"w-5 h-5\"></svg>\n </button>\n </div>\n </div>\n\n <!-- Nav: section panel (hidden when collapsed) -->\n @if (expanded()) {\n <div class=\"flex-1 min-w-0 flex flex-col _shk-bg-panel\">\n <!-- Brand header -->\n <div class=\"flex items-center justify-between gap-2 px-3 py-4 border-b _shk-border\">\n <span class=\"nav-app text-base font-bold whitespace-nowrap overflow-hidden text-ellipsis _shk-text-surface-800\">\n {{ appName() }}\n </span>\n <button\n #closeBtn\n type=\"button\"\n (click)=\"onToggleSidebar()\"\n class=\"nav-toggle w-[1.8rem] h-[1.8rem] rounded-lg border-none bg-transparent grid place-items-center cursor-pointer shrink-0 transition-colors _shk-text-surface-700 hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]\"\n [title]=\"isMobile() ? closeMenuLabel() : collapseTooltip()\"\n [attr.aria-label]=\"isMobile() ? closeMenuLabel() : collapseTooltip()\"\n >\n <svg [shkIcon]=\"isMobile() ? closeIcon : getIcon('panel-right')\" class=\"w-4 h-4\"></svg>\n </button>\n </div>\n\n <!-- Menu -->\n <nav class=\"flex-1 overflow-y-auto _shk-scrollbar px-2 py-3\">\n @if (activeSection()) {\n <div class=\"px-2 pb-3\">\n <span class=\"nav-section-label text-xs font-bold tracking-[0.08em] uppercase _shk-text-surface-400 block whitespace-nowrap overflow-hidden text-ellipsis\">\n {{ label(activeSection()!.label) }}\n </span>\n </div>\n }\n\n <ul class=\"space-y-1\">\n @for (item of navItems(); track item.id) {\n @if (item.separator) {\n <li class=\"my-2 border-t _shk-border\"></li>\n }\n\n @if (item.children?.length) {\n <!-- Expandable group -->\n <li>\n <button\n type=\"button\"\n (click)=\"toggleGroup(item)\"\n class=\"w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm font-medium transition-all duration-200\"\n [class._shk-bg-primary]=\"isGroupActive(item)\"\n [class._shk-text-white]=\"isGroupActive(item)\"\n [class.shadow-md]=\"isGroupActive(item)\"\n [class._shk-text-surface-700]=\"!isGroupActive(item)\"\n [class.hover:[background-color:var(--shk-surface-100)]]=\"!isGroupActive(item)\"\n [class.dark:hover:[background-color:var(--shk-surface-200)]]=\"!isGroupActive(item)\"\n >\n @if (item.icon) {\n <svg [shkIcon]=\"getIcon(item.icon)\" class=\"w-5 h-5 shrink-0\"></svg>\n }\n <span class=\"flex-1 text-left whitespace-nowrap overflow-hidden\">{{ label(item.label) }}</span>\n <svg\n [shkIcon]=\"getIcon('chevron-down')\"\n class=\"w-4 h-4 transition-transform duration-200 shrink-0\"\n [class.rotate-180]=\"isGroupExpanded(item)\"\n ></svg>\n </button>\n\n @if (isGroupExpanded(item)) {\n <ul class=\"ml-3 mt-1 space-y-1 border-l-2 _shk-border pl-2\">\n @for (child of item.children; track child.id) {\n <li>\n <button\n type=\"button\"\n (click)=\"onItemClick(child)\"\n class=\"w-full flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200\"\n [class._shk-bg-primary-soft]=\"isItemActive(child)\"\n [class._shk-bg-primary-soft-dark]=\"isItemActive(child)\"\n [class._shk-text-primary-700]=\"isItemActive(child)\"\n [class.dark:[color:var(--shk-primary-300)]]=\"isItemActive(child)\"\n [class._shk-text-surface-600]=\"!isItemActive(child)\"\n [class.hover:[background-color:var(--shk-surface-100)]]=\"!isItemActive(child)\"\n [class.dark:hover:[background-color:var(--shk-surface-200)]]=\"!isItemActive(child)\"\n [class.hover:[color:var(--shk-surface-900)]]=\"!isItemActive(child)\"\n [class.dark:hover:[color:var(--shk-surface-700)]]=\"!isItemActive(child)\"\n >\n @if (child.icon) {\n <svg [shkIcon]=\"getIcon(child.icon)\" class=\"w-4 h-4 shrink-0\"></svg>\n }\n <span class=\"whitespace-nowrap overflow-hidden\">{{ label(child.label) }}</span>\n @if (isItemActive(child)) {\n <span class=\"w-1.5 h-1.5 rounded-full _shk-bg-primary shrink-0 ml-auto\"></span>\n }\n </button>\n </li>\n }\n </ul>\n }\n </li>\n } @else {\n <!-- Standalone item -->\n <li>\n <button\n type=\"button\"\n (click)=\"onItemClick(item)\"\n class=\"w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm font-medium transition-all duration-200\"\n [class._shk-bg-primary]=\"isItemActive(item)\"\n [class._shk-text-white]=\"isItemActive(item)\"\n [class.shadow-md]=\"isItemActive(item)\"\n [class._shk-text-surface-700]=\"!isItemActive(item)\"\n [class.hover:[background-color:var(--shk-surface-100)]]=\"!isItemActive(item)\"\n [class.dark:hover:[background-color:var(--shk-surface-200)]]=\"!isItemActive(item)\"\n >\n @if (item.icon) {\n <svg [shkIcon]=\"getIcon(item.icon)\" class=\"w-5 h-5 shrink-0\"></svg>\n }\n <span class=\"flex-1 text-left whitespace-nowrap overflow-hidden\">{{ label(item.label) }}</span>\n @if (item.badge !== undefined) {\n <span class=\"text-xs font-bold px-2 py-0.5 rounded-full _shk-bg-primary _shk-text-white shrink-0\">\n {{ item.badge }}\n </span>\n }\n </button>\n </li>\n }\n }\n </ul>\n </nav>\n </div>\n }\n</aside>\n", styles: [":host{display:block;height:100%}:host(.rail-is-mobile){position:relative;width:0;min-width:0;flex:0 0 0;overflow:visible}.rail-hamburger{position:absolute;top:.75rem;left:.75rem;z-index:var(--shk-rail-hamburger-z, 1);display:grid;place-items:center;width:2.5rem;height:2.5rem;border-radius:.625rem;box-shadow:0 1px 3px #0000001f;cursor:pointer;transition:background-color .15s ease}.rail-hamburger:hover{background-color:var(--shk-surface-100)}.rail-hamburger:focus-visible{outline:2px solid var(--shk-primary-500);outline-offset:2px}.rail-backdrop{position:fixed;inset:0;z-index:49;background-color:var(--shk-bg-overlay, rgba(0, 0, 0, .4));opacity:0;pointer-events:none;transition:opacity .25s ease}.rail-backdrop.is-open{opacity:1;pointer-events:auto}.rail-drawer{position:fixed;top:0;left:0;bottom:0;z-index:50;height:100dvh;max-width:85vw;transform:translate(-100%);visibility:hidden;transition:transform .25s ease,visibility 0s linear .25s}.rail-drawer.is-open{transform:translate(0);visibility:visible;box-shadow:0 10px 30px #00000040;transition:transform .25s ease}@media(prefers-reduced-motion:reduce){.rail-drawer,.rail-drawer.is-open,.rail-backdrop{transition:none}}.rail-workspace{cursor:pointer;transition:opacity .2s ease,box-shadow .2s ease}.rail-workspace.is-collapsed:hover{cursor:col-resize}.rail-workspace .rail-app-icon,.rail-workspace .rail-toggle-icon{grid-area:1 / 1 / 2 / 2;transition:opacity .2s ease}.rail-toggle-icon,.rail-workspace.is-collapsed:hover .rail-app-icon{opacity:0}.rail-workspace.is-collapsed:hover .rail-toggle-icon{opacity:1}.rail-icon{background:transparent;color:var(--shk-surface-700);border:1px solid transparent;transition:transform .18s ease,color .18s ease,background-color .18s ease,box-shadow .18s ease}.rail-icon svg{stroke-width:1.8}.rail-icon:hover{background:var(--shk-surface-100);color:var(--shk-primary-600)}.dark .rail-icon:hover{background:var(--shk-surface-200);color:var(--shk-primary-400)}.rail-icon.is-active{background:var(--shk-primary-600);color:#fff;box-shadow:0 1px 2px #0003}.dark .rail-icon.is-active{background:var(--shk-primary-500);color:#fff}.rail-logout:hover{color:var(--shk-error-500)}.dark .rail-logout:hover{color:var(--shk-error-400)}\n"] }]
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
9
|
+
var RailSidebarComponent = class RailSidebarComponent {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.isBrowser = isPlatformBrowser(inject(PLATFORM_ID));
|
|
12
|
+
this.injector = inject(Injector);
|
|
13
|
+
this.uid = `shk-rail-${nextRailId++}`;
|
|
14
|
+
this.sections = input([], ...ngDevMode ? [{ debugName: "sections" }] : /* istanbul ignore next */ []);
|
|
15
|
+
this.activeUrl = input("", ...ngDevMode ? [{ debugName: "activeUrl" }] : /* istanbul ignore next */ []);
|
|
16
|
+
this.activeSectionKey = model("", ...ngDevMode ? [{ debugName: "activeSectionKey" }] : /* istanbul ignore next */ []);
|
|
17
|
+
this.collapsed = model(false, ...ngDevMode ? [{ debugName: "collapsed" }] : /* istanbul ignore next */ []);
|
|
18
|
+
this.activeLang = input("es", ...ngDevMode ? [{ debugName: "activeLang" }] : /* istanbul ignore next */ []);
|
|
19
|
+
this.langs = input(["es", "en"], ...ngDevMode ? [{ debugName: "langs" }] : /* istanbul ignore next */ []);
|
|
20
|
+
this.logo = input("", ...ngDevMode ? [{ debugName: "logo" }] : /* istanbul ignore next */ []);
|
|
21
|
+
this.appName = input("", ...ngDevMode ? [{ debugName: "appName" }] : /* istanbul ignore next */ []);
|
|
22
|
+
this.userRole = input("", ...ngDevMode ? [{ debugName: "userRole" }] : /* istanbul ignore next */ []);
|
|
23
|
+
this.labelPipe = input((label) => label, ...ngDevMode ? [{ debugName: "labelPipe" }] : /* istanbul ignore next */ []);
|
|
24
|
+
this.railWidth = input("4.5rem", ...ngDevMode ? [{ debugName: "railWidth" }] : /* istanbul ignore next */ []);
|
|
25
|
+
this.expandedWidth = input("16.5rem", ...ngDevMode ? [{ debugName: "expandedWidth" }] : /* istanbul ignore next */ []);
|
|
26
|
+
this.workspaceTooltip = input("Inicio", ...ngDevMode ? [{ debugName: "workspaceTooltip" }] : /* istanbul ignore next */ []);
|
|
27
|
+
this.logoutTooltip = input("Cerrar sesión", ...ngDevMode ? [{ debugName: "logoutTooltip" }] : /* istanbul ignore next */ []);
|
|
28
|
+
this.collapseTooltip = input("Colapsar", ...ngDevMode ? [{ debugName: "collapseTooltip" }] : /* istanbul ignore next */ []);
|
|
29
|
+
this.expandTooltip = input("Expandir", ...ngDevMode ? [{ debugName: "expandTooltip" }] : /* istanbul ignore next */ []);
|
|
30
|
+
this.responsive = input(true, ...ngDevMode ? [{ debugName: "responsive" }] : /* istanbul ignore next */ []);
|
|
31
|
+
this.mobileBreakpoint = input(1024, ...ngDevMode ? [{ debugName: "mobileBreakpoint" }] : /* istanbul ignore next */ []);
|
|
32
|
+
this.showMobileToggle = input(true, ...ngDevMode ? [{ debugName: "showMobileToggle" }] : /* istanbul ignore next */ []);
|
|
33
|
+
this.mobileOpen = model(false, ...ngDevMode ? [{ debugName: "mobileOpen" }] : /* istanbul ignore next */ []);
|
|
34
|
+
this.openMenuLabel = input("Abrir menú", ...ngDevMode ? [{ debugName: "openMenuLabel" }] : /* istanbul ignore next */ []);
|
|
35
|
+
this.closeMenuLabel = input("Cerrar menú", ...ngDevMode ? [{ debugName: "closeMenuLabel" }] : /* istanbul ignore next */ []);
|
|
36
|
+
this.sectionSelected = output();
|
|
37
|
+
this.itemClick = output();
|
|
38
|
+
this.setLang = output();
|
|
39
|
+
this.logoutRequested = output();
|
|
40
|
+
this.toggleSidebar = output();
|
|
41
|
+
this.workspaceClick = output();
|
|
42
|
+
this.getIcon = (name) => getIcon(name, LucideMenu);
|
|
43
|
+
this.closeIcon = LucideX;
|
|
44
|
+
this.viewportWidth = signal(this.isBrowser ? window.innerWidth : Number.MAX_SAFE_INTEGER, ...ngDevMode ? [{ debugName: "viewportWidth" }] : /* istanbul ignore next */ []);
|
|
45
|
+
this.isMobile = computed(() => this.responsive() && this.viewportWidth() < this.mobileBreakpoint(), ...ngDevMode ? [{ debugName: "isMobile" }] : /* istanbul ignore next */ []);
|
|
46
|
+
this.expanded = computed(() => this.isMobile() || !this.collapsed(), ...ngDevMode ? [{ debugName: "expanded" }] : /* istanbul ignore next */ []);
|
|
47
|
+
this.hamburgerBtn = viewChild("hamburger", ...ngDevMode ? [{ debugName: "hamburgerBtn" }] : /* istanbul ignore next */ []);
|
|
48
|
+
this.closeBtn = viewChild("closeBtn", ...ngDevMode ? [{ debugName: "closeBtn" }] : /* istanbul ignore next */ []);
|
|
49
|
+
this.expandedGroups = signal(/* @__PURE__ */ new Set(), ...ngDevMode ? [{ debugName: "expandedGroups" }] : /* istanbul ignore next */ []);
|
|
50
|
+
this.width = computed(() => this.expanded() ? this.expandedWidth() : this.railWidth(), ...ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []);
|
|
51
|
+
this.activeSection = computed(() => this.sections().find((s) => s.key === this.activeSectionKey()) ?? null, ...ngDevMode ? [{ debugName: "activeSection" }] : /* istanbul ignore next */ []);
|
|
52
|
+
this.navItems = computed(() => {
|
|
53
|
+
const role = this.userRole();
|
|
54
|
+
return (this.activeSection()?.items ?? []).filter((item) => {
|
|
55
|
+
if (!item.roles || item.roles.length === 0) return true;
|
|
56
|
+
return role ? item.roles.includes(role) : false;
|
|
57
|
+
});
|
|
58
|
+
}, ...ngDevMode ? [{ debugName: "navItems" }] : /* istanbul ignore next */ []);
|
|
59
|
+
effect(() => {
|
|
60
|
+
if (!this.isMobile() && untracked(this.mobileOpen)) this.mobileOpen.set(false);
|
|
61
|
+
});
|
|
62
|
+
effect((onCleanup) => {
|
|
63
|
+
if (!this.isBrowser || !(this.isMobile() && this.mobileOpen())) return;
|
|
64
|
+
const body = document.body;
|
|
65
|
+
const previous = body.style.overflow;
|
|
66
|
+
body.style.overflow = "hidden";
|
|
67
|
+
onCleanup(() => body.style.overflow = previous);
|
|
68
|
+
});
|
|
69
|
+
effect(() => {
|
|
70
|
+
const url = this.activeUrl();
|
|
71
|
+
if (!url) return;
|
|
72
|
+
const section = this.sections().find((s) => {
|
|
73
|
+
if (s.matchPrefixes?.length) return s.matchPrefixes.some((prefix) => url.startsWith(prefix));
|
|
74
|
+
return s.routerLink ? url.startsWith(s.routerLink) : false;
|
|
75
|
+
});
|
|
76
|
+
if (section) this.activeSectionKey.set(section.key);
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
onResize() {
|
|
80
|
+
if (this.isBrowser) this.viewportWidth.set(window.innerWidth);
|
|
81
|
+
}
|
|
82
|
+
onEscape() {
|
|
83
|
+
if (this.isMobile() && this.mobileOpen()) this.closeMobile();
|
|
84
|
+
}
|
|
85
|
+
openMobile() {
|
|
86
|
+
this.mobileOpen.set(true);
|
|
87
|
+
afterNextRender(() => this.closeBtn()?.nativeElement.focus(), { injector: this.injector });
|
|
88
|
+
}
|
|
89
|
+
closeMobile() {
|
|
90
|
+
if (!this.mobileOpen()) return;
|
|
91
|
+
this.mobileOpen.set(false);
|
|
92
|
+
afterNextRender(() => this.hamburgerBtn()?.nativeElement.focus(), { injector: this.injector });
|
|
93
|
+
}
|
|
94
|
+
label(label) {
|
|
95
|
+
return this.labelPipe()(label);
|
|
96
|
+
}
|
|
97
|
+
isSectionActive(section) {
|
|
98
|
+
return section.key === this.activeSectionKey();
|
|
99
|
+
}
|
|
100
|
+
isItemActive(item) {
|
|
101
|
+
if (!item.routerLink) return false;
|
|
102
|
+
return this.bestMatchItem() === item;
|
|
103
|
+
}
|
|
104
|
+
isGroupActive(item) {
|
|
105
|
+
return item.children?.some((c) => c.routerLink && this.matchesUrl(c.routerLink, this.activeUrl())) ?? false;
|
|
106
|
+
}
|
|
107
|
+
matchesUrl(routerLink, url) {
|
|
108
|
+
return url === routerLink || url.startsWith(routerLink + "/");
|
|
109
|
+
}
|
|
110
|
+
bestMatchItem() {
|
|
111
|
+
const url = this.activeUrl();
|
|
112
|
+
let best = null;
|
|
113
|
+
for (const item of this.navItems()) {
|
|
114
|
+
if (item.routerLink && this.matchesUrl(item.routerLink, url)) {
|
|
115
|
+
if (!best || item.routerLink.length > best.routerLink.length) best = item;
|
|
116
|
+
}
|
|
117
|
+
for (const child of item.children ?? []) {
|
|
118
|
+
if (!child.routerLink || !this.matchesUrl(child.routerLink, url)) continue;
|
|
119
|
+
if (!best || child.routerLink.length > best.routerLink.length) best = child;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
return best;
|
|
123
|
+
}
|
|
124
|
+
isGroupExpanded(item) {
|
|
125
|
+
return this.expandedGroups().has(item.id);
|
|
126
|
+
}
|
|
127
|
+
toggleGroup(item) {
|
|
128
|
+
this.expandedGroups.update((set) => {
|
|
129
|
+
const next = new Set(set);
|
|
130
|
+
if (next.has(item.id)) next.delete(item.id);
|
|
131
|
+
else next.add(item.id);
|
|
132
|
+
return next;
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
onSectionClick(section) {
|
|
136
|
+
this.activeSectionKey.set(section.key);
|
|
137
|
+
this.sectionSelected.emit({
|
|
138
|
+
key: section.key,
|
|
139
|
+
routerLink: section.routerLink
|
|
140
|
+
});
|
|
141
|
+
if (!this.isMobile() && this.collapsed()) {
|
|
142
|
+
this.collapsed.set(false);
|
|
143
|
+
this.toggleSidebar.emit(false);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
onItemClick(item) {
|
|
147
|
+
if (item.disabled) return;
|
|
148
|
+
this.itemClick.emit(item);
|
|
149
|
+
if (this.isMobile()) this.closeMobile();
|
|
150
|
+
}
|
|
151
|
+
onWorkspace() {
|
|
152
|
+
this.workspaceClick.emit();
|
|
153
|
+
if (!this.isMobile() && this.collapsed()) {
|
|
154
|
+
this.collapsed.set(false);
|
|
155
|
+
this.toggleSidebar.emit(false);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
onLogout() {
|
|
159
|
+
this.logoutRequested.emit();
|
|
160
|
+
if (this.isMobile()) this.closeMobile();
|
|
161
|
+
}
|
|
162
|
+
onToggleLang() {
|
|
163
|
+
const langs = this.langs();
|
|
164
|
+
if (langs.length === 0) return;
|
|
165
|
+
const next = langs[(langs.indexOf(this.activeLang()) + 1) % langs.length] ?? langs[0];
|
|
166
|
+
this.setLang.emit(next);
|
|
167
|
+
}
|
|
168
|
+
onToggleSidebar() {
|
|
169
|
+
if (this.isMobile()) {
|
|
170
|
+
this.closeMobile();
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
this.collapsed.update((v) => !v);
|
|
174
|
+
this.toggleSidebar.emit(this.collapsed());
|
|
175
|
+
}
|
|
176
|
+
static {
|
|
177
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
178
|
+
minVersion: "12.0.0",
|
|
179
|
+
version: "22.3.2",
|
|
180
|
+
ngImport: i0,
|
|
181
|
+
type: RailSidebarComponent,
|
|
182
|
+
deps: [],
|
|
183
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
static {
|
|
187
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
188
|
+
minVersion: "17.0.0",
|
|
189
|
+
version: "22.3.2",
|
|
190
|
+
type: RailSidebarComponent,
|
|
191
|
+
isStandalone: true,
|
|
192
|
+
selector: "shk-rail-sidebar",
|
|
193
|
+
inputs: {
|
|
194
|
+
sections: {
|
|
195
|
+
classPropertyName: "sections",
|
|
196
|
+
publicName: "sections",
|
|
197
|
+
isSignal: true,
|
|
198
|
+
isRequired: false,
|
|
199
|
+
transformFunction: null
|
|
200
|
+
},
|
|
201
|
+
activeUrl: {
|
|
202
|
+
classPropertyName: "activeUrl",
|
|
203
|
+
publicName: "activeUrl",
|
|
204
|
+
isSignal: true,
|
|
205
|
+
isRequired: false,
|
|
206
|
+
transformFunction: null
|
|
207
|
+
},
|
|
208
|
+
activeSectionKey: {
|
|
209
|
+
classPropertyName: "activeSectionKey",
|
|
210
|
+
publicName: "activeSectionKey",
|
|
211
|
+
isSignal: true,
|
|
212
|
+
isRequired: false,
|
|
213
|
+
transformFunction: null
|
|
214
|
+
},
|
|
215
|
+
collapsed: {
|
|
216
|
+
classPropertyName: "collapsed",
|
|
217
|
+
publicName: "collapsed",
|
|
218
|
+
isSignal: true,
|
|
219
|
+
isRequired: false,
|
|
220
|
+
transformFunction: null
|
|
221
|
+
},
|
|
222
|
+
activeLang: {
|
|
223
|
+
classPropertyName: "activeLang",
|
|
224
|
+
publicName: "activeLang",
|
|
225
|
+
isSignal: true,
|
|
226
|
+
isRequired: false,
|
|
227
|
+
transformFunction: null
|
|
228
|
+
},
|
|
229
|
+
langs: {
|
|
230
|
+
classPropertyName: "langs",
|
|
231
|
+
publicName: "langs",
|
|
232
|
+
isSignal: true,
|
|
233
|
+
isRequired: false,
|
|
234
|
+
transformFunction: null
|
|
235
|
+
},
|
|
236
|
+
logo: {
|
|
237
|
+
classPropertyName: "logo",
|
|
238
|
+
publicName: "logo",
|
|
239
|
+
isSignal: true,
|
|
240
|
+
isRequired: false,
|
|
241
|
+
transformFunction: null
|
|
242
|
+
},
|
|
243
|
+
appName: {
|
|
244
|
+
classPropertyName: "appName",
|
|
245
|
+
publicName: "appName",
|
|
246
|
+
isSignal: true,
|
|
247
|
+
isRequired: false,
|
|
248
|
+
transformFunction: null
|
|
249
|
+
},
|
|
250
|
+
userRole: {
|
|
251
|
+
classPropertyName: "userRole",
|
|
252
|
+
publicName: "userRole",
|
|
253
|
+
isSignal: true,
|
|
254
|
+
isRequired: false,
|
|
255
|
+
transformFunction: null
|
|
256
|
+
},
|
|
257
|
+
labelPipe: {
|
|
258
|
+
classPropertyName: "labelPipe",
|
|
259
|
+
publicName: "labelPipe",
|
|
260
|
+
isSignal: true,
|
|
261
|
+
isRequired: false,
|
|
262
|
+
transformFunction: null
|
|
263
|
+
},
|
|
264
|
+
railWidth: {
|
|
265
|
+
classPropertyName: "railWidth",
|
|
266
|
+
publicName: "railWidth",
|
|
267
|
+
isSignal: true,
|
|
268
|
+
isRequired: false,
|
|
269
|
+
transformFunction: null
|
|
270
|
+
},
|
|
271
|
+
expandedWidth: {
|
|
272
|
+
classPropertyName: "expandedWidth",
|
|
273
|
+
publicName: "expandedWidth",
|
|
274
|
+
isSignal: true,
|
|
275
|
+
isRequired: false,
|
|
276
|
+
transformFunction: null
|
|
277
|
+
},
|
|
278
|
+
workspaceTooltip: {
|
|
279
|
+
classPropertyName: "workspaceTooltip",
|
|
280
|
+
publicName: "workspaceTooltip",
|
|
281
|
+
isSignal: true,
|
|
282
|
+
isRequired: false,
|
|
283
|
+
transformFunction: null
|
|
284
|
+
},
|
|
285
|
+
logoutTooltip: {
|
|
286
|
+
classPropertyName: "logoutTooltip",
|
|
287
|
+
publicName: "logoutTooltip",
|
|
288
|
+
isSignal: true,
|
|
289
|
+
isRequired: false,
|
|
290
|
+
transformFunction: null
|
|
291
|
+
},
|
|
292
|
+
collapseTooltip: {
|
|
293
|
+
classPropertyName: "collapseTooltip",
|
|
294
|
+
publicName: "collapseTooltip",
|
|
295
|
+
isSignal: true,
|
|
296
|
+
isRequired: false,
|
|
297
|
+
transformFunction: null
|
|
298
|
+
},
|
|
299
|
+
expandTooltip: {
|
|
300
|
+
classPropertyName: "expandTooltip",
|
|
301
|
+
publicName: "expandTooltip",
|
|
302
|
+
isSignal: true,
|
|
303
|
+
isRequired: false,
|
|
304
|
+
transformFunction: null
|
|
305
|
+
},
|
|
306
|
+
responsive: {
|
|
307
|
+
classPropertyName: "responsive",
|
|
308
|
+
publicName: "responsive",
|
|
309
|
+
isSignal: true,
|
|
310
|
+
isRequired: false,
|
|
311
|
+
transformFunction: null
|
|
312
|
+
},
|
|
313
|
+
mobileBreakpoint: {
|
|
314
|
+
classPropertyName: "mobileBreakpoint",
|
|
315
|
+
publicName: "mobileBreakpoint",
|
|
316
|
+
isSignal: true,
|
|
317
|
+
isRequired: false,
|
|
318
|
+
transformFunction: null
|
|
319
|
+
},
|
|
320
|
+
showMobileToggle: {
|
|
321
|
+
classPropertyName: "showMobileToggle",
|
|
322
|
+
publicName: "showMobileToggle",
|
|
323
|
+
isSignal: true,
|
|
324
|
+
isRequired: false,
|
|
325
|
+
transformFunction: null
|
|
326
|
+
},
|
|
327
|
+
mobileOpen: {
|
|
328
|
+
classPropertyName: "mobileOpen",
|
|
329
|
+
publicName: "mobileOpen",
|
|
330
|
+
isSignal: true,
|
|
331
|
+
isRequired: false,
|
|
332
|
+
transformFunction: null
|
|
333
|
+
},
|
|
334
|
+
openMenuLabel: {
|
|
335
|
+
classPropertyName: "openMenuLabel",
|
|
336
|
+
publicName: "openMenuLabel",
|
|
337
|
+
isSignal: true,
|
|
338
|
+
isRequired: false,
|
|
339
|
+
transformFunction: null
|
|
340
|
+
},
|
|
341
|
+
closeMenuLabel: {
|
|
342
|
+
classPropertyName: "closeMenuLabel",
|
|
343
|
+
publicName: "closeMenuLabel",
|
|
344
|
+
isSignal: true,
|
|
345
|
+
isRequired: false,
|
|
346
|
+
transformFunction: null
|
|
347
|
+
}
|
|
348
|
+
},
|
|
349
|
+
outputs: {
|
|
350
|
+
activeSectionKey: "activeSectionKeyChange",
|
|
351
|
+
collapsed: "collapsedChange",
|
|
352
|
+
mobileOpen: "mobileOpenChange",
|
|
353
|
+
sectionSelected: "sectionSelected",
|
|
354
|
+
itemClick: "itemClick",
|
|
355
|
+
setLang: "setLang",
|
|
356
|
+
logoutRequested: "logoutRequested",
|
|
357
|
+
toggleSidebar: "toggleSidebar",
|
|
358
|
+
workspaceClick: "workspaceClick"
|
|
359
|
+
},
|
|
360
|
+
host: {
|
|
361
|
+
listeners: {
|
|
362
|
+
"window:resize": "onResize()",
|
|
363
|
+
"document:keydown.escape": "onEscape()"
|
|
364
|
+
},
|
|
365
|
+
properties: { "class.rail-is-mobile": "isMobile()" }
|
|
366
|
+
},
|
|
367
|
+
viewQueries: [{
|
|
368
|
+
propertyName: "hamburgerBtn",
|
|
369
|
+
first: true,
|
|
370
|
+
predicate: ["hamburger"],
|
|
371
|
+
descendants: true,
|
|
372
|
+
isSignal: true
|
|
373
|
+
}, {
|
|
374
|
+
propertyName: "closeBtn",
|
|
375
|
+
first: true,
|
|
376
|
+
predicate: ["closeBtn"],
|
|
377
|
+
descendants: true,
|
|
378
|
+
isSignal: true
|
|
379
|
+
}],
|
|
380
|
+
ngImport: i0,
|
|
381
|
+
template: "@if (isMobile()) {\n <!-- Mobile: hamburger button + backdrop (the aside becomes a drawer) -->\n @if (showMobileToggle() && !mobileOpen()) {\n <button\n #hamburger\n type=\"button\"\n class=\"rail-hamburger _shk-bg-panel-raised border _shk-border _shk-text-surface-700\"\n [attr.aria-label]=\"openMenuLabel()\"\n aria-expanded=\"false\"\n [attr.aria-controls]=\"uid\"\n (click)=\"openMobile()\"\n >\n <svg [shkIcon]=\"getIcon('menu')\" class=\"w-5 h-5\"></svg>\n </button>\n }\n <div class=\"rail-backdrop\" [class.is-open]=\"mobileOpen()\" (click)=\"closeMobile()\"></div>\n}\n\n<aside\n [id]=\"uid\"\n class=\"h-full flex overflow-hidden shrink-0 _shk-bg-panel border-r _shk-border\"\n [class.rail-drawer]=\"isMobile()\"\n [class.is-open]=\"isMobile() && mobileOpen()\"\n [attr.role]=\"isMobile() ? 'dialog' : null\"\n [attr.aria-modal]=\"isMobile() && mobileOpen() ? 'true' : null\"\n [attr.aria-label]=\"isMobile() ? appName() || openMenuLabel() : null\"\n [attr.inert]=\"isMobile() && !mobileOpen() ? '' : null\"\n [style.width]=\"width()\"\n>\n <!-- Rail: vertical icon column -->\n <div\n class=\"h-full flex flex-col items-center shrink-0 px-[0.3rem] py-2 gap-1 border-r _shk-border\"\n [style.width]=\"railWidth()\"\n >\n <!-- Workspace / logo -->\n <div class=\"flex items-center justify-center w-full\">\n <button\n type=\"button\"\n (click)=\"onWorkspace()\"\n [class.is-collapsed]=\"!expanded()\"\n class=\"rail-workspace w-[3.2rem] h-[3.2rem] rounded-xl _shk-bg-surface-100 border-none grid place-items-center p-0 relative transition-all\"\n [title]=\"workspaceTooltip()\"\n >\n @if (logo()) {\n <img [src]=\"logo()\" alt=\"Logo\" class=\"rail-app-icon w-8 h-8 object-contain\" />\n } @else {\n <svg [shkIcon]=\"getIcon('menu')\" class=\"rail-app-icon w-6 h-6 _shk-text-surface-700\"></svg>\n }\n @if (!expanded()) {\n <svg [shkIcon]=\"getIcon('panel-right')\" class=\"rail-toggle-icon w-5 h-5 _shk-text-surface-700\"></svg>\n }\n </button>\n </div>\n\n <!-- Section actions -->\n <div class=\"rail-actions flex-1 flex flex-col items-center gap-1 pt-1\">\n @for (section of sections(); track section.key) {\n <shk-tooltip [text]=\"label(section.label)\" position=\"right\" mode=\"fixed\">\n <button\n type=\"button\"\n (click)=\"onSectionClick(section)\"\n class=\"rail-icon w-[3.4rem] h-[3.4rem] rounded-[0.85rem] grid place-items-center transition-all cursor-pointer\"\n [class.is-active]=\"isSectionActive(section)\"\n [attr.aria-label]=\"label(section.label)\"\n >\n <svg [shkIcon]=\"getIcon(section.icon)\" class=\"w-5 h-5\"></svg>\n </button>\n </shk-tooltip>\n }\n </div>\n\n <!-- Bottom: language + logout -->\n <div class=\"rail-bottom mt-auto flex flex-col items-center gap-1\">\n <button\n type=\"button\"\n (click)=\"onToggleLang()\"\n class=\"rail-icon w-[3.4rem] h-[3.4rem] rounded-[0.85rem] grid place-items-center transition-all cursor-pointer\"\n [title]=\"activeLang()\"\n >\n <div class=\"flex flex-col items-center gap-[0.15rem]\">\n <svg [shkIcon]=\"getIcon('languages')\" class=\"w-5 h-5\"></svg>\n <span class=\"rail-lang-code text-[0.5rem] font-bold tracking-[0.05em] leading-none\">{{ activeLang() | uppercase }}</span>\n </div>\n </button>\n\n <button\n type=\"button\"\n (click)=\"onLogout()\"\n class=\"rail-icon rail-logout w-[3.4rem] h-[3.4rem] rounded-[0.85rem] grid place-items-center transition-all cursor-pointer\"\n [title]=\"logoutTooltip()\"\n >\n <svg [shkIcon]=\"getIcon('log-out')\" class=\"w-5 h-5\"></svg>\n </button>\n </div>\n </div>\n\n <!-- Nav: section panel (hidden when collapsed) -->\n @if (expanded()) {\n <div class=\"flex-1 min-w-0 flex flex-col _shk-bg-panel\">\n <!-- Brand header -->\n <div class=\"flex items-center justify-between gap-2 px-3 py-4 border-b _shk-border\">\n <span class=\"nav-app text-base font-bold whitespace-nowrap overflow-hidden text-ellipsis _shk-text-surface-800\">\n {{ appName() }}\n </span>\n <button\n #closeBtn\n type=\"button\"\n (click)=\"onToggleSidebar()\"\n class=\"nav-toggle w-[1.8rem] h-[1.8rem] rounded-lg border-none bg-transparent grid place-items-center cursor-pointer shrink-0 transition-colors _shk-text-surface-700 hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]\"\n [title]=\"isMobile() ? closeMenuLabel() : collapseTooltip()\"\n [attr.aria-label]=\"isMobile() ? closeMenuLabel() : collapseTooltip()\"\n >\n <svg [shkIcon]=\"isMobile() ? closeIcon : getIcon('panel-right')\" class=\"w-4 h-4\"></svg>\n </button>\n </div>\n\n <!-- Menu -->\n <nav class=\"flex-1 overflow-y-auto _shk-scrollbar px-2 py-3\">\n @if (activeSection()) {\n <div class=\"px-2 pb-3\">\n <span class=\"nav-section-label text-xs font-bold tracking-[0.08em] uppercase _shk-text-surface-400 block whitespace-nowrap overflow-hidden text-ellipsis\">\n {{ label(activeSection()!.label) }}\n </span>\n </div>\n }\n\n <ul class=\"space-y-1\">\n @for (item of navItems(); track item.id) {\n @if (item.separator) {\n <li class=\"my-2 border-t _shk-border\"></li>\n }\n\n @if (item.children?.length) {\n <!-- Expandable group -->\n <li>\n <button\n type=\"button\"\n (click)=\"toggleGroup(item)\"\n class=\"w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm font-medium transition-all duration-200\"\n [class._shk-bg-primary]=\"isGroupActive(item)\"\n [class._shk-text-white]=\"isGroupActive(item)\"\n [class.shadow-md]=\"isGroupActive(item)\"\n [class._shk-text-surface-700]=\"!isGroupActive(item)\"\n [class.hover:[background-color:var(--shk-surface-100)]]=\"!isGroupActive(item)\"\n [class.dark:hover:[background-color:var(--shk-surface-200)]]=\"!isGroupActive(item)\"\n >\n @if (item.icon) {\n <svg [shkIcon]=\"getIcon(item.icon)\" class=\"w-5 h-5 shrink-0\"></svg>\n }\n <span class=\"flex-1 text-left whitespace-nowrap overflow-hidden\">{{ label(item.label) }}</span>\n <svg\n [shkIcon]=\"getIcon('chevron-down')\"\n class=\"w-4 h-4 transition-transform duration-200 shrink-0\"\n [class.rotate-180]=\"isGroupExpanded(item)\"\n ></svg>\n </button>\n\n @if (isGroupExpanded(item)) {\n <ul class=\"ml-3 mt-1 space-y-1 border-l-2 _shk-border pl-2\">\n @for (child of item.children; track child.id) {\n <li>\n <button\n type=\"button\"\n (click)=\"onItemClick(child)\"\n class=\"w-full flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200\"\n [class._shk-bg-primary-soft]=\"isItemActive(child)\"\n [class._shk-bg-primary-soft-dark]=\"isItemActive(child)\"\n [class._shk-text-primary-700]=\"isItemActive(child)\"\n [class.dark:[color:var(--shk-primary-300)]]=\"isItemActive(child)\"\n [class._shk-text-surface-600]=\"!isItemActive(child)\"\n [class.hover:[background-color:var(--shk-surface-100)]]=\"!isItemActive(child)\"\n [class.dark:hover:[background-color:var(--shk-surface-200)]]=\"!isItemActive(child)\"\n [class.hover:[color:var(--shk-surface-900)]]=\"!isItemActive(child)\"\n [class.dark:hover:[color:var(--shk-surface-700)]]=\"!isItemActive(child)\"\n >\n @if (child.icon) {\n <svg [shkIcon]=\"getIcon(child.icon)\" class=\"w-4 h-4 shrink-0\"></svg>\n }\n <span class=\"whitespace-nowrap overflow-hidden\">{{ label(child.label) }}</span>\n @if (isItemActive(child)) {\n <span class=\"w-1.5 h-1.5 rounded-full _shk-bg-primary shrink-0 ml-auto\"></span>\n }\n </button>\n </li>\n }\n </ul>\n }\n </li>\n } @else {\n <!-- Standalone item -->\n <li>\n <button\n type=\"button\"\n (click)=\"onItemClick(item)\"\n class=\"w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm font-medium transition-all duration-200\"\n [class._shk-bg-primary]=\"isItemActive(item)\"\n [class._shk-text-white]=\"isItemActive(item)\"\n [class.shadow-md]=\"isItemActive(item)\"\n [class._shk-text-surface-700]=\"!isItemActive(item)\"\n [class.hover:[background-color:var(--shk-surface-100)]]=\"!isItemActive(item)\"\n [class.dark:hover:[background-color:var(--shk-surface-200)]]=\"!isItemActive(item)\"\n >\n @if (item.icon) {\n <svg [shkIcon]=\"getIcon(item.icon)\" class=\"w-5 h-5 shrink-0\"></svg>\n }\n <span class=\"flex-1 text-left whitespace-nowrap overflow-hidden\">{{ label(item.label) }}</span>\n @if (item.badge !== undefined) {\n <span class=\"text-xs font-bold px-2 py-0.5 rounded-full _shk-bg-primary _shk-text-white shrink-0\">\n {{ item.badge }}\n </span>\n }\n </button>\n </li>\n }\n }\n </ul>\n </nav>\n </div>\n }\n</aside>\n",
|
|
382
|
+
styles: [":host{display:block;height:100%}:host(.rail-is-mobile){position:relative;width:0;min-width:0;flex:0 0 0;overflow:visible}.rail-hamburger{position:absolute;top:.75rem;left:.75rem;z-index:var(--shk-rail-hamburger-z, 1);display:grid;place-items:center;width:2.5rem;height:2.5rem;border-radius:.625rem;box-shadow:0 1px 3px #0000001f;cursor:pointer;transition:background-color .15s ease}.rail-hamburger:hover{background-color:var(--shk-surface-100)}.rail-hamburger:focus-visible{outline:2px solid var(--shk-primary-500);outline-offset:2px}.rail-backdrop{position:fixed;inset:0;z-index:49;background-color:var(--shk-bg-overlay, rgba(0, 0, 0, .4));opacity:0;pointer-events:none;transition:opacity .25s ease}.rail-backdrop.is-open{opacity:1;pointer-events:auto}.rail-drawer{position:fixed;top:0;left:0;bottom:0;z-index:50;height:100dvh;max-width:85vw;transform:translate(-100%);visibility:hidden;transition:transform .25s ease,visibility 0s linear .25s}.rail-drawer.is-open{transform:translate(0);visibility:visible;box-shadow:0 10px 30px #00000040;transition:transform .25s ease}@media(prefers-reduced-motion:reduce){.rail-drawer,.rail-drawer.is-open,.rail-backdrop{transition:none}}.rail-workspace{cursor:pointer;transition:opacity .2s ease,box-shadow .2s ease}.rail-workspace.is-collapsed:hover{cursor:col-resize}.rail-workspace .rail-app-icon,.rail-workspace .rail-toggle-icon{grid-area:1 / 1 / 2 / 2;transition:opacity .2s ease}.rail-toggle-icon,.rail-workspace.is-collapsed:hover .rail-app-icon{opacity:0}.rail-workspace.is-collapsed:hover .rail-toggle-icon{opacity:1}.rail-icon{background:transparent;color:var(--shk-surface-700);border:1px solid transparent;transition:transform .18s ease,color .18s ease,background-color .18s ease,box-shadow .18s ease}.rail-icon svg{stroke-width:1.8}.rail-icon:hover{background:var(--shk-surface-100);color:var(--shk-primary-600)}.dark .rail-icon:hover{background:var(--shk-surface-200);color:var(--shk-primary-400)}.rail-icon.is-active{background:var(--shk-primary-600);color:#fff;box-shadow:0 1px 2px #0003}.dark .rail-icon.is-active{background:var(--shk-primary-500);color:#fff}.rail-logout:hover{color:var(--shk-error-500)}.dark .rail-logout:hover{color:var(--shk-error-400)}\n"],
|
|
383
|
+
dependencies: [
|
|
384
|
+
{
|
|
385
|
+
kind: "ngmodule",
|
|
386
|
+
type: CommonModule
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
kind: "directive",
|
|
390
|
+
type: ShkIconDirective,
|
|
391
|
+
selector: "svg[shkIcon]",
|
|
392
|
+
inputs: [
|
|
393
|
+
"shkIcon",
|
|
394
|
+
"size",
|
|
395
|
+
"strokeWidth",
|
|
396
|
+
"color"
|
|
397
|
+
]
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
kind: "component",
|
|
401
|
+
type: TooltipComponent,
|
|
402
|
+
selector: "shk-tooltip",
|
|
403
|
+
inputs: [
|
|
404
|
+
"text",
|
|
405
|
+
"position",
|
|
406
|
+
"mode",
|
|
407
|
+
"offset"
|
|
408
|
+
]
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
kind: "pipe",
|
|
412
|
+
type: i1.UpperCasePipe,
|
|
413
|
+
name: "uppercase"
|
|
414
|
+
}
|
|
415
|
+
],
|
|
416
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
417
|
+
});
|
|
418
|
+
}
|
|
419
|
+
};
|
|
420
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
421
|
+
minVersion: "12.0.0",
|
|
422
|
+
version: "22.3.2",
|
|
423
|
+
ngImport: i0,
|
|
424
|
+
type: RailSidebarComponent,
|
|
425
|
+
decorators: [{
|
|
426
|
+
type: Component,
|
|
427
|
+
args: [{
|
|
428
|
+
selector: "shk-rail-sidebar",
|
|
429
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
430
|
+
imports: [
|
|
431
|
+
CommonModule,
|
|
432
|
+
ShkIconDirective,
|
|
433
|
+
TooltipComponent
|
|
434
|
+
],
|
|
435
|
+
host: { "[class.rail-is-mobile]": "isMobile()" },
|
|
436
|
+
template: "@if (isMobile()) {\n <!-- Mobile: hamburger button + backdrop (the aside becomes a drawer) -->\n @if (showMobileToggle() && !mobileOpen()) {\n <button\n #hamburger\n type=\"button\"\n class=\"rail-hamburger _shk-bg-panel-raised border _shk-border _shk-text-surface-700\"\n [attr.aria-label]=\"openMenuLabel()\"\n aria-expanded=\"false\"\n [attr.aria-controls]=\"uid\"\n (click)=\"openMobile()\"\n >\n <svg [shkIcon]=\"getIcon('menu')\" class=\"w-5 h-5\"></svg>\n </button>\n }\n <div class=\"rail-backdrop\" [class.is-open]=\"mobileOpen()\" (click)=\"closeMobile()\"></div>\n}\n\n<aside\n [id]=\"uid\"\n class=\"h-full flex overflow-hidden shrink-0 _shk-bg-panel border-r _shk-border\"\n [class.rail-drawer]=\"isMobile()\"\n [class.is-open]=\"isMobile() && mobileOpen()\"\n [attr.role]=\"isMobile() ? 'dialog' : null\"\n [attr.aria-modal]=\"isMobile() && mobileOpen() ? 'true' : null\"\n [attr.aria-label]=\"isMobile() ? appName() || openMenuLabel() : null\"\n [attr.inert]=\"isMobile() && !mobileOpen() ? '' : null\"\n [style.width]=\"width()\"\n>\n <!-- Rail: vertical icon column -->\n <div\n class=\"h-full flex flex-col items-center shrink-0 px-[0.3rem] py-2 gap-1 border-r _shk-border\"\n [style.width]=\"railWidth()\"\n >\n <!-- Workspace / logo -->\n <div class=\"flex items-center justify-center w-full\">\n <button\n type=\"button\"\n (click)=\"onWorkspace()\"\n [class.is-collapsed]=\"!expanded()\"\n class=\"rail-workspace w-[3.2rem] h-[3.2rem] rounded-xl _shk-bg-surface-100 border-none grid place-items-center p-0 relative transition-all\"\n [title]=\"workspaceTooltip()\"\n >\n @if (logo()) {\n <img [src]=\"logo()\" alt=\"Logo\" class=\"rail-app-icon w-8 h-8 object-contain\" />\n } @else {\n <svg [shkIcon]=\"getIcon('menu')\" class=\"rail-app-icon w-6 h-6 _shk-text-surface-700\"></svg>\n }\n @if (!expanded()) {\n <svg [shkIcon]=\"getIcon('panel-right')\" class=\"rail-toggle-icon w-5 h-5 _shk-text-surface-700\"></svg>\n }\n </button>\n </div>\n\n <!-- Section actions -->\n <div class=\"rail-actions flex-1 flex flex-col items-center gap-1 pt-1\">\n @for (section of sections(); track section.key) {\n <shk-tooltip [text]=\"label(section.label)\" position=\"right\" mode=\"fixed\">\n <button\n type=\"button\"\n (click)=\"onSectionClick(section)\"\n class=\"rail-icon w-[3.4rem] h-[3.4rem] rounded-[0.85rem] grid place-items-center transition-all cursor-pointer\"\n [class.is-active]=\"isSectionActive(section)\"\n [attr.aria-label]=\"label(section.label)\"\n >\n <svg [shkIcon]=\"getIcon(section.icon)\" class=\"w-5 h-5\"></svg>\n </button>\n </shk-tooltip>\n }\n </div>\n\n <!-- Bottom: language + logout -->\n <div class=\"rail-bottom mt-auto flex flex-col items-center gap-1\">\n <button\n type=\"button\"\n (click)=\"onToggleLang()\"\n class=\"rail-icon w-[3.4rem] h-[3.4rem] rounded-[0.85rem] grid place-items-center transition-all cursor-pointer\"\n [title]=\"activeLang()\"\n >\n <div class=\"flex flex-col items-center gap-[0.15rem]\">\n <svg [shkIcon]=\"getIcon('languages')\" class=\"w-5 h-5\"></svg>\n <span class=\"rail-lang-code text-[0.5rem] font-bold tracking-[0.05em] leading-none\">{{ activeLang() | uppercase }}</span>\n </div>\n </button>\n\n <button\n type=\"button\"\n (click)=\"onLogout()\"\n class=\"rail-icon rail-logout w-[3.4rem] h-[3.4rem] rounded-[0.85rem] grid place-items-center transition-all cursor-pointer\"\n [title]=\"logoutTooltip()\"\n >\n <svg [shkIcon]=\"getIcon('log-out')\" class=\"w-5 h-5\"></svg>\n </button>\n </div>\n </div>\n\n <!-- Nav: section panel (hidden when collapsed) -->\n @if (expanded()) {\n <div class=\"flex-1 min-w-0 flex flex-col _shk-bg-panel\">\n <!-- Brand header -->\n <div class=\"flex items-center justify-between gap-2 px-3 py-4 border-b _shk-border\">\n <span class=\"nav-app text-base font-bold whitespace-nowrap overflow-hidden text-ellipsis _shk-text-surface-800\">\n {{ appName() }}\n </span>\n <button\n #closeBtn\n type=\"button\"\n (click)=\"onToggleSidebar()\"\n class=\"nav-toggle w-[1.8rem] h-[1.8rem] rounded-lg border-none bg-transparent grid place-items-center cursor-pointer shrink-0 transition-colors _shk-text-surface-700 hover:[background-color:var(--shk-surface-100)] dark:hover:[background-color:var(--shk-surface-200)]\"\n [title]=\"isMobile() ? closeMenuLabel() : collapseTooltip()\"\n [attr.aria-label]=\"isMobile() ? closeMenuLabel() : collapseTooltip()\"\n >\n <svg [shkIcon]=\"isMobile() ? closeIcon : getIcon('panel-right')\" class=\"w-4 h-4\"></svg>\n </button>\n </div>\n\n <!-- Menu -->\n <nav class=\"flex-1 overflow-y-auto _shk-scrollbar px-2 py-3\">\n @if (activeSection()) {\n <div class=\"px-2 pb-3\">\n <span class=\"nav-section-label text-xs font-bold tracking-[0.08em] uppercase _shk-text-surface-400 block whitespace-nowrap overflow-hidden text-ellipsis\">\n {{ label(activeSection()!.label) }}\n </span>\n </div>\n }\n\n <ul class=\"space-y-1\">\n @for (item of navItems(); track item.id) {\n @if (item.separator) {\n <li class=\"my-2 border-t _shk-border\"></li>\n }\n\n @if (item.children?.length) {\n <!-- Expandable group -->\n <li>\n <button\n type=\"button\"\n (click)=\"toggleGroup(item)\"\n class=\"w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm font-medium transition-all duration-200\"\n [class._shk-bg-primary]=\"isGroupActive(item)\"\n [class._shk-text-white]=\"isGroupActive(item)\"\n [class.shadow-md]=\"isGroupActive(item)\"\n [class._shk-text-surface-700]=\"!isGroupActive(item)\"\n [class.hover:[background-color:var(--shk-surface-100)]]=\"!isGroupActive(item)\"\n [class.dark:hover:[background-color:var(--shk-surface-200)]]=\"!isGroupActive(item)\"\n >\n @if (item.icon) {\n <svg [shkIcon]=\"getIcon(item.icon)\" class=\"w-5 h-5 shrink-0\"></svg>\n }\n <span class=\"flex-1 text-left whitespace-nowrap overflow-hidden\">{{ label(item.label) }}</span>\n <svg\n [shkIcon]=\"getIcon('chevron-down')\"\n class=\"w-4 h-4 transition-transform duration-200 shrink-0\"\n [class.rotate-180]=\"isGroupExpanded(item)\"\n ></svg>\n </button>\n\n @if (isGroupExpanded(item)) {\n <ul class=\"ml-3 mt-1 space-y-1 border-l-2 _shk-border pl-2\">\n @for (child of item.children; track child.id) {\n <li>\n <button\n type=\"button\"\n (click)=\"onItemClick(child)\"\n class=\"w-full flex items-center gap-3 px-3 py-2 rounded-lg text-sm font-medium transition-all duration-200\"\n [class._shk-bg-primary-soft]=\"isItemActive(child)\"\n [class._shk-bg-primary-soft-dark]=\"isItemActive(child)\"\n [class._shk-text-primary-700]=\"isItemActive(child)\"\n [class.dark:[color:var(--shk-primary-300)]]=\"isItemActive(child)\"\n [class._shk-text-surface-600]=\"!isItemActive(child)\"\n [class.hover:[background-color:var(--shk-surface-100)]]=\"!isItemActive(child)\"\n [class.dark:hover:[background-color:var(--shk-surface-200)]]=\"!isItemActive(child)\"\n [class.hover:[color:var(--shk-surface-900)]]=\"!isItemActive(child)\"\n [class.dark:hover:[color:var(--shk-surface-700)]]=\"!isItemActive(child)\"\n >\n @if (child.icon) {\n <svg [shkIcon]=\"getIcon(child.icon)\" class=\"w-4 h-4 shrink-0\"></svg>\n }\n <span class=\"whitespace-nowrap overflow-hidden\">{{ label(child.label) }}</span>\n @if (isItemActive(child)) {\n <span class=\"w-1.5 h-1.5 rounded-full _shk-bg-primary shrink-0 ml-auto\"></span>\n }\n </button>\n </li>\n }\n </ul>\n }\n </li>\n } @else {\n <!-- Standalone item -->\n <li>\n <button\n type=\"button\"\n (click)=\"onItemClick(item)\"\n class=\"w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm font-medium transition-all duration-200\"\n [class._shk-bg-primary]=\"isItemActive(item)\"\n [class._shk-text-white]=\"isItemActive(item)\"\n [class.shadow-md]=\"isItemActive(item)\"\n [class._shk-text-surface-700]=\"!isItemActive(item)\"\n [class.hover:[background-color:var(--shk-surface-100)]]=\"!isItemActive(item)\"\n [class.dark:hover:[background-color:var(--shk-surface-200)]]=\"!isItemActive(item)\"\n >\n @if (item.icon) {\n <svg [shkIcon]=\"getIcon(item.icon)\" class=\"w-5 h-5 shrink-0\"></svg>\n }\n <span class=\"flex-1 text-left whitespace-nowrap overflow-hidden\">{{ label(item.label) }}</span>\n @if (item.badge !== undefined) {\n <span class=\"text-xs font-bold px-2 py-0.5 rounded-full _shk-bg-primary _shk-text-white shrink-0\">\n {{ item.badge }}\n </span>\n }\n </button>\n </li>\n }\n }\n </ul>\n </nav>\n </div>\n }\n</aside>\n",
|
|
437
|
+
styles: [":host{display:block;height:100%}:host(.rail-is-mobile){position:relative;width:0;min-width:0;flex:0 0 0;overflow:visible}.rail-hamburger{position:absolute;top:.75rem;left:.75rem;z-index:var(--shk-rail-hamburger-z, 1);display:grid;place-items:center;width:2.5rem;height:2.5rem;border-radius:.625rem;box-shadow:0 1px 3px #0000001f;cursor:pointer;transition:background-color .15s ease}.rail-hamburger:hover{background-color:var(--shk-surface-100)}.rail-hamburger:focus-visible{outline:2px solid var(--shk-primary-500);outline-offset:2px}.rail-backdrop{position:fixed;inset:0;z-index:49;background-color:var(--shk-bg-overlay, rgba(0, 0, 0, .4));opacity:0;pointer-events:none;transition:opacity .25s ease}.rail-backdrop.is-open{opacity:1;pointer-events:auto}.rail-drawer{position:fixed;top:0;left:0;bottom:0;z-index:50;height:100dvh;max-width:85vw;transform:translate(-100%);visibility:hidden;transition:transform .25s ease,visibility 0s linear .25s}.rail-drawer.is-open{transform:translate(0);visibility:visible;box-shadow:0 10px 30px #00000040;transition:transform .25s ease}@media(prefers-reduced-motion:reduce){.rail-drawer,.rail-drawer.is-open,.rail-backdrop{transition:none}}.rail-workspace{cursor:pointer;transition:opacity .2s ease,box-shadow .2s ease}.rail-workspace.is-collapsed:hover{cursor:col-resize}.rail-workspace .rail-app-icon,.rail-workspace .rail-toggle-icon{grid-area:1 / 1 / 2 / 2;transition:opacity .2s ease}.rail-toggle-icon,.rail-workspace.is-collapsed:hover .rail-app-icon{opacity:0}.rail-workspace.is-collapsed:hover .rail-toggle-icon{opacity:1}.rail-icon{background:transparent;color:var(--shk-surface-700);border:1px solid transparent;transition:transform .18s ease,color .18s ease,background-color .18s ease,box-shadow .18s ease}.rail-icon svg{stroke-width:1.8}.rail-icon:hover{background:var(--shk-surface-100);color:var(--shk-primary-600)}.dark .rail-icon:hover{background:var(--shk-surface-200);color:var(--shk-primary-400)}.rail-icon.is-active{background:var(--shk-primary-600);color:#fff;box-shadow:0 1px 2px #0003}.dark .rail-icon.is-active{background:var(--shk-primary-500);color:#fff}.rail-logout:hover{color:var(--shk-error-500)}.dark .rail-logout:hover{color:var(--shk-error-400)}\n"]
|
|
438
|
+
}]
|
|
439
|
+
}],
|
|
440
|
+
ctorParameters: () => [],
|
|
441
|
+
propDecorators: {
|
|
442
|
+
sections: [{
|
|
443
|
+
type: i0.Input,
|
|
444
|
+
args: [{
|
|
445
|
+
isSignal: true,
|
|
446
|
+
alias: "sections",
|
|
447
|
+
required: false
|
|
448
|
+
}]
|
|
449
|
+
}],
|
|
450
|
+
activeUrl: [{
|
|
451
|
+
type: i0.Input,
|
|
452
|
+
args: [{
|
|
453
|
+
isSignal: true,
|
|
454
|
+
alias: "activeUrl",
|
|
455
|
+
required: false
|
|
456
|
+
}]
|
|
457
|
+
}],
|
|
458
|
+
activeSectionKey: [{
|
|
459
|
+
type: i0.Input,
|
|
460
|
+
args: [{
|
|
461
|
+
isSignal: true,
|
|
462
|
+
alias: "activeSectionKey",
|
|
463
|
+
required: false
|
|
464
|
+
}]
|
|
465
|
+
}, {
|
|
466
|
+
type: i0.Output,
|
|
467
|
+
args: ["activeSectionKeyChange"]
|
|
468
|
+
}],
|
|
469
|
+
collapsed: [{
|
|
470
|
+
type: i0.Input,
|
|
471
|
+
args: [{
|
|
472
|
+
isSignal: true,
|
|
473
|
+
alias: "collapsed",
|
|
474
|
+
required: false
|
|
475
|
+
}]
|
|
476
|
+
}, {
|
|
477
|
+
type: i0.Output,
|
|
478
|
+
args: ["collapsedChange"]
|
|
479
|
+
}],
|
|
480
|
+
activeLang: [{
|
|
481
|
+
type: i0.Input,
|
|
482
|
+
args: [{
|
|
483
|
+
isSignal: true,
|
|
484
|
+
alias: "activeLang",
|
|
485
|
+
required: false
|
|
486
|
+
}]
|
|
487
|
+
}],
|
|
488
|
+
langs: [{
|
|
489
|
+
type: i0.Input,
|
|
490
|
+
args: [{
|
|
491
|
+
isSignal: true,
|
|
492
|
+
alias: "langs",
|
|
493
|
+
required: false
|
|
494
|
+
}]
|
|
495
|
+
}],
|
|
496
|
+
logo: [{
|
|
497
|
+
type: i0.Input,
|
|
498
|
+
args: [{
|
|
499
|
+
isSignal: true,
|
|
500
|
+
alias: "logo",
|
|
501
|
+
required: false
|
|
502
|
+
}]
|
|
503
|
+
}],
|
|
504
|
+
appName: [{
|
|
505
|
+
type: i0.Input,
|
|
506
|
+
args: [{
|
|
507
|
+
isSignal: true,
|
|
508
|
+
alias: "appName",
|
|
509
|
+
required: false
|
|
510
|
+
}]
|
|
511
|
+
}],
|
|
512
|
+
userRole: [{
|
|
513
|
+
type: i0.Input,
|
|
514
|
+
args: [{
|
|
515
|
+
isSignal: true,
|
|
516
|
+
alias: "userRole",
|
|
517
|
+
required: false
|
|
518
|
+
}]
|
|
519
|
+
}],
|
|
520
|
+
labelPipe: [{
|
|
521
|
+
type: i0.Input,
|
|
522
|
+
args: [{
|
|
523
|
+
isSignal: true,
|
|
524
|
+
alias: "labelPipe",
|
|
525
|
+
required: false
|
|
526
|
+
}]
|
|
527
|
+
}],
|
|
528
|
+
railWidth: [{
|
|
529
|
+
type: i0.Input,
|
|
530
|
+
args: [{
|
|
531
|
+
isSignal: true,
|
|
532
|
+
alias: "railWidth",
|
|
533
|
+
required: false
|
|
534
|
+
}]
|
|
535
|
+
}],
|
|
536
|
+
expandedWidth: [{
|
|
537
|
+
type: i0.Input,
|
|
538
|
+
args: [{
|
|
539
|
+
isSignal: true,
|
|
540
|
+
alias: "expandedWidth",
|
|
541
|
+
required: false
|
|
542
|
+
}]
|
|
543
|
+
}],
|
|
544
|
+
workspaceTooltip: [{
|
|
545
|
+
type: i0.Input,
|
|
546
|
+
args: [{
|
|
547
|
+
isSignal: true,
|
|
548
|
+
alias: "workspaceTooltip",
|
|
549
|
+
required: false
|
|
550
|
+
}]
|
|
551
|
+
}],
|
|
552
|
+
logoutTooltip: [{
|
|
553
|
+
type: i0.Input,
|
|
554
|
+
args: [{
|
|
555
|
+
isSignal: true,
|
|
556
|
+
alias: "logoutTooltip",
|
|
557
|
+
required: false
|
|
558
|
+
}]
|
|
559
|
+
}],
|
|
560
|
+
collapseTooltip: [{
|
|
561
|
+
type: i0.Input,
|
|
562
|
+
args: [{
|
|
563
|
+
isSignal: true,
|
|
564
|
+
alias: "collapseTooltip",
|
|
565
|
+
required: false
|
|
566
|
+
}]
|
|
567
|
+
}],
|
|
568
|
+
expandTooltip: [{
|
|
569
|
+
type: i0.Input,
|
|
570
|
+
args: [{
|
|
571
|
+
isSignal: true,
|
|
572
|
+
alias: "expandTooltip",
|
|
573
|
+
required: false
|
|
574
|
+
}]
|
|
575
|
+
}],
|
|
576
|
+
responsive: [{
|
|
577
|
+
type: i0.Input,
|
|
578
|
+
args: [{
|
|
579
|
+
isSignal: true,
|
|
580
|
+
alias: "responsive",
|
|
581
|
+
required: false
|
|
582
|
+
}]
|
|
583
|
+
}],
|
|
584
|
+
mobileBreakpoint: [{
|
|
585
|
+
type: i0.Input,
|
|
586
|
+
args: [{
|
|
587
|
+
isSignal: true,
|
|
588
|
+
alias: "mobileBreakpoint",
|
|
589
|
+
required: false
|
|
590
|
+
}]
|
|
591
|
+
}],
|
|
592
|
+
showMobileToggle: [{
|
|
593
|
+
type: i0.Input,
|
|
594
|
+
args: [{
|
|
595
|
+
isSignal: true,
|
|
596
|
+
alias: "showMobileToggle",
|
|
597
|
+
required: false
|
|
598
|
+
}]
|
|
599
|
+
}],
|
|
600
|
+
mobileOpen: [{
|
|
601
|
+
type: i0.Input,
|
|
602
|
+
args: [{
|
|
603
|
+
isSignal: true,
|
|
604
|
+
alias: "mobileOpen",
|
|
605
|
+
required: false
|
|
606
|
+
}]
|
|
607
|
+
}, {
|
|
608
|
+
type: i0.Output,
|
|
609
|
+
args: ["mobileOpenChange"]
|
|
610
|
+
}],
|
|
611
|
+
openMenuLabel: [{
|
|
612
|
+
type: i0.Input,
|
|
613
|
+
args: [{
|
|
614
|
+
isSignal: true,
|
|
615
|
+
alias: "openMenuLabel",
|
|
616
|
+
required: false
|
|
617
|
+
}]
|
|
618
|
+
}],
|
|
619
|
+
closeMenuLabel: [{
|
|
620
|
+
type: i0.Input,
|
|
621
|
+
args: [{
|
|
622
|
+
isSignal: true,
|
|
623
|
+
alias: "closeMenuLabel",
|
|
624
|
+
required: false
|
|
625
|
+
}]
|
|
626
|
+
}],
|
|
627
|
+
sectionSelected: [{
|
|
628
|
+
type: i0.Output,
|
|
629
|
+
args: ["sectionSelected"]
|
|
630
|
+
}],
|
|
631
|
+
itemClick: [{
|
|
632
|
+
type: i0.Output,
|
|
633
|
+
args: ["itemClick"]
|
|
634
|
+
}],
|
|
635
|
+
setLang: [{
|
|
636
|
+
type: i0.Output,
|
|
637
|
+
args: ["setLang"]
|
|
638
|
+
}],
|
|
639
|
+
logoutRequested: [{
|
|
640
|
+
type: i0.Output,
|
|
641
|
+
args: ["logoutRequested"]
|
|
642
|
+
}],
|
|
643
|
+
toggleSidebar: [{
|
|
644
|
+
type: i0.Output,
|
|
645
|
+
args: ["toggleSidebar"]
|
|
646
|
+
}],
|
|
647
|
+
workspaceClick: [{
|
|
648
|
+
type: i0.Output,
|
|
649
|
+
args: ["workspaceClick"]
|
|
650
|
+
}],
|
|
651
|
+
hamburgerBtn: [{
|
|
652
|
+
type: i0.ViewChild,
|
|
653
|
+
args: ["hamburger", { isSignal: true }]
|
|
654
|
+
}],
|
|
655
|
+
closeBtn: [{
|
|
656
|
+
type: i0.ViewChild,
|
|
657
|
+
args: ["closeBtn", { isSignal: true }]
|
|
658
|
+
}],
|
|
659
|
+
onResize: [{
|
|
660
|
+
type: HostListener,
|
|
661
|
+
args: ["window:resize"]
|
|
662
|
+
}],
|
|
663
|
+
onEscape: [{
|
|
664
|
+
type: HostListener,
|
|
665
|
+
args: ["document:keydown.escape"]
|
|
666
|
+
}]
|
|
667
|
+
}
|
|
668
|
+
});
|
|
290
669
|
export { RailSidebarComponent };
|
|
291
|
-
|
|
670
|
+
|
|
671
|
+
//# sourceMappingURL=shirkasoft-ui-components-rail-sidebar.mjs.map
|