@main-class/template 3.11.2 → 4.0.0-next.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/fesm2022/main-class-template.mjs +919 -451
- package/fesm2022/main-class-template.mjs.map +1 -1
- package/package.json +13 -8
- package/theming.scss +18 -11
- package/types/main-class-template.d.ts +194 -0
- package/acesso/acesso.component.d.ts +0 -35
- package/base/base.component.d.ts +0 -27
- package/base/base.service.d.ts +0 -32
- package/footer/footer.component.d.ts +0 -11
- package/header/header.component.d.ts +0 -17
- package/index.d.ts +0 -5
- package/menu/menu-config.d.ts +0 -25
- package/menu/menu.component.d.ts +0 -18
- package/menu/menu.service.d.ts +0 -13
- package/public-api.d.ts +0 -11
- package/route/crud.routes.d.ts +0 -17
- package/route/siblings.routes.d.ts +0 -3
- package/route/tab.route.d.ts +0 -7
|
@@ -1,460 +1,928 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { TranslatePipe } from
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import * as
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
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
|
-
i0.ɵɵ
|
|
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
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.9", type: MenuComponent, isStandalone: true, selector: "mcl-menu", ngImport: i0, template: "<div class=\"menu\">\n <div class=\"menu__brand\">\n <router-outlet name=\"menu-header\"></router-outlet>\n </div>\n @let menus = menuConfig.menus() | async;\n\n @for (menu of menus; track menu.label) {\n @if (!menu.children?.length) {\n <div class=\"menu__list\">\n <button class=\"menu__item\"\n (click)=\"menuClicked(menu)\"\n [routerLink]=\"menu.route\" [routerLinkActive]=\"['is-active']\">\n @if (menu.icon) { <span class=\"menu__icon\"><mat-icon>{{menu.icon}}</mat-icon></span> }\n <span>{{menu.label | translate}}</span>\n </button>\n </div>\n }\n\n @if (menu.children?.length){\n @if (menu.collapsible) {\n <button class=\"menu__section menu__section--collapsible\"\n (click)=\"toggleSection(menu)\"\n [class.is-collapsed]=\"isSectionCollapsed(menu)\"\n type=\"button\">\n <span>{{menu.label | translate}}</span>\n <mat-icon class=\"menu__section-chevron\">expand_more</mat-icon>\n </button>\n <div class=\"menu__collapsible-wrapper\"\n [class.is-collapsed]=\"isSectionCollapsed(menu)\">\n <div class=\"menu__list\">\n @for (sub of menu.children; track sub.label){\n <button class=\"menu__item\"\n (click)=\"menuClicked(sub)\"\n [routerLink]=\"sub.route\" [routerLinkActive]=\"['is-active']\">\n @if (sub.icon) { <span class=\"menu__icon\"><mat-icon>{{sub.icon}}</mat-icon></span> }\n <span>{{sub.label | translate}}</span>\n </button>\n }\n </div>\n </div>\n } @else {\n <div class=\"menu__section\">\n {{menu.label | translate}}\n </div>\n\n <div class=\"menu__list\">\n @for (sub of menu.children; track sub.label){\n <button class=\"menu__item\"\n (click)=\"menuClicked(sub)\"\n [routerLink]=\"sub.route\" [routerLinkActive]=\"['is-active']\">\n @if (sub.icon) { <span class=\"menu__icon\"><mat-icon>{{sub.icon}}</mat-icon></span> }\n <span>{{sub.label | translate}}</span>\n </button>\n }\n </div>\n }\n }\n }\n\n <div class=\"menu__bottom\">\n @let user = menuConfig.user() | async;\n\n @if (!!user) {\n <button class=\"menu__user\" type=\"button\" [matMenuTriggerFor]=\"userMenu\">\n <div class=\"menu__user-avatar\" [mclImagemBackground]=\"user.photoUrl\"></div>\n <div class=\"menu__user-meta\">\n <div class=\"menu__user-name\">{{ user.name }}</div>\n @if (user.role) {\n <div class=\"menu__user-role\">{{ user.role }}</div>\n }\n </div>\n <mat-icon class=\"menu__user-caret\">unfold_more</mat-icon>\n </button>\n\n <mat-menu #userMenu class=\"mcl-user-menu\">\n <div class=\"mcl-user-menu__header\" (click)=\"$event.stopPropagation()\">\n <div class=\"mcl-user-menu__name\">{{ user.name }}</div>\n @if (user.role) {\n <div class=\"mcl-user-menu__role\">{{ user.role }}</div>\n }\n </div>\n\n @for (menu of user.menus; track menu.label) {\n <button mat-menu-item type=\"button\" (click)=\"menu.action()\">\n <mat-icon>{{ menu.icon }}</mat-icon>\n <span>{{ menu.label }}</span>\n </button>\n }\n </mat-menu>\n }\n\n <div class=\"menu__footer\">\n <router-outlet name=\"menu-bottom\"></router-outlet>\n </div>\n </div>\n</div>\n", styles: ["@charset \"UTF-8\";:host{display:block;height:100%;--menu-structural: var(--lib-color-secondary, var(--mat-sys-secondary));--menu-primary: var(--lib-color-primary, var(--mat-sys-primary));--menu-bg: var(--lib-color-surface-container-low, var(--mat-sys-surface-container-low));--menu-surface: var(--lib-color-surface, var(--mat-sys-surface));--menu-fg: var(--lib-color-on-surface, var(--mat-sys-on-surface));--menu-muted: var(--lib-color-on-surface-variant, var(--mat-sys-on-surface-variant));--menu-border: var(--lib-color-outline-variant, var(--mat-sys-outline-variant));--menu-active-bg: var(--menu-surface);--menu-active-fg: var(--menu-fg);--menu-w: 16.5rem;--menu-w-mini: 4.5rem;--menu-radius: var(--mcl-radius-sm, 8px);--menu-icon-size: 20px;--menu-icon-box: 20px}:host .menu{width:var(--menu-w);height:100%;display:flex;flex-direction:column;background:transparent;color:var(--menu-fg);overflow:hidden auto}:host .menu__brand{position:relative;display:flex;align-items:center;min-height:60px;padding:8px 1rem 0}:host .menu__section{margin:1.25rem 0 .375rem;padding:0 1rem;text-transform:uppercase;font-size:.6875rem;font-weight:600;letter-spacing:.08em;color:var(--menu-muted)}:host .menu__section--collapsible{display:flex;align-items:center;justify-content:space-between;gap:.5rem;width:calc(100% - 1rem);margin:1.25rem .5rem .375rem;padding:.375rem .5rem;border:0;border-radius:var(--menu-radius);background:transparent;cursor:pointer;transition:background-color var(--mcl-transition, .18s ease),color var(--mcl-transition, .18s ease)}:host .menu__section--collapsible:hover{background:color-mix(in oklab,var(--menu-fg) 5%,var(--menu-bg));color:var(--menu-fg)}:host .menu__section-chevron{font-size:18px;width:18px;height:18px;line-height:1;color:var(--menu-muted);transition:transform .2s ease}:host .menu__section--collapsible.is-collapsed .menu__section-chevron{transform:rotate(-90deg)}:host .menu__collapsible-wrapper{display:grid;grid-template-rows:1fr;transition:grid-template-rows .22s ease}:host .menu__collapsible-wrapper>.menu__list{overflow:hidden;min-height:0}:host .menu__collapsible-wrapper.is-collapsed{grid-template-rows:0fr}:host .menu__collapsible-wrapper.is-collapsed>.menu__list{padding-block:0}:host .menu__list{padding:.25rem .5rem .5rem;display:grid;gap:2px;transition:padding .22s ease}:host .menu__item{position:relative;display:flex;align-items:center;gap:.75rem;width:100%;min-height:40px;padding:.5rem .75rem;border:0;border-radius:var(--menu-radius);background:transparent;color:var(--menu-muted);font-size:.875rem;font-weight:500;text-align:left;text-decoration:none;cursor:pointer;-webkit-appearance:none;appearance:none;transition:background-color var(--mcl-transition, .18s ease),color var(--mcl-transition, .18s ease)}:host .menu__item:hover{background:color-mix(in oklab,var(--menu-fg) 6%,var(--menu-bg));color:var(--menu-fg)}:host .menu__item:focus-visible{outline:2px solid var(--menu-primary);outline-offset:-2px}:host .menu__item.is-active{background:var(--menu-active-bg);color:var(--menu-active-fg);font-weight:600;box-shadow:var(--mcl-shadow-1, 0 1px 3px rgba(0, 0, 0, .06))}:host .menu__icon{inline-size:var(--menu-icon-box);block-size:var(--menu-icon-box);display:inline-grid;place-items:center;flex:0 0 var(--menu-icon-box);color:var(--menu-muted);transition:color var(--mcl-transition, .18s ease)}:host .menu__item:hover .menu__icon{color:var(--menu-fg)}:host .menu__icon mat-icon{font-size:var(--menu-icon-size);width:var(--menu-icon-box);height:var(--menu-icon-box);line-height:1;display:inline-block;vertical-align:middle}:host .menu__icon mat-icon[class*=material-symbols]{font-variation-settings:\"FILL\" 0,\"wght\" 400,\"GRAD\" 0,\"opsz\" 20}:host .menu__item.is-active .menu__icon{color:var(--menu-primary)}:host .menu__label{flex:1 1 auto}:host .menu__badge{font-size:.7rem;font-weight:600;padding:.1rem .4rem;border-radius:var(--mcl-radius-full, 999px);background:color-mix(in oklab,var(--menu-primary) 12%,var(--menu-bg));color:var(--menu-primary)}:host .menu__bottom{margin-top:auto;padding:.5rem;display:grid;gap:4px}:host .menu__user{display:flex;align-items:center;gap:10px;width:100%;padding:8px 10px;border:1px solid transparent;border-radius:var(--mcl-radius-md, 12px);background:transparent;color:var(--menu-fg);text-align:left;cursor:pointer;-webkit-appearance:none;appearance:none;transition:background-color var(--mcl-transition, .18s ease),border-color var(--mcl-transition, .18s ease)}:host .menu__user:hover{background:var(--menu-surface);border-color:var(--menu-border)}:host .menu__user:focus-visible{outline:2px solid var(--menu-primary);outline-offset:-2px}:host .menu__user-avatar{inline-size:34px;block-size:34px;border-radius:50%;background-color:color-mix(in oklab,var(--menu-primary) 16%,var(--menu-bg));background-position:center center;background-size:cover;box-shadow:inset 0 0 0 1px var(--menu-border);flex:0 0 auto}:host .menu__user-meta{flex:1 1 auto;min-width:0}:host .menu__user-name{font-size:.8438rem;font-weight:600;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .menu__user-role{font-size:.72rem;line-height:1.25;color:var(--menu-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .menu__user-caret{font-size:18px;width:18px;height:18px;color:var(--menu-muted);flex:0 0 auto}:host .menu__footer:empty{display:none}:host(.is-compact) .menu__item{min-height:34px;padding-block:.375rem}:host(.is-mini) .menu{width:var(--menu-w-mini)}:host(.is-mini) .menu__label,:host(.is-mini) .menu__badge,:host(.is-mini) .menu__section{display:none}:host(.is-mini) .menu__item{justify-content:center;padding-left:.75rem}:host([dir=rtl]) .menu__item{padding:.5rem .75rem}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "directive", type: RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "component", type: MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "directive", type: ImagemDirective, selector: "[mclImagemSrc],[mclImagemBackground]", inputs: ["mclImagemSrc", "mclImagemBackground", "padrao"] }] });
|
|
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
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ApplicationRef, ChangeDetectionStrategy, Component, Injectable, InjectionToken, Injector, ViewChild, computed, inject } from "@angular/core";
|
|
3
|
+
import { BehaviorSubject, from, map, startWith } from "rxjs";
|
|
4
|
+
import * as i1 from "@angular/router";
|
|
5
|
+
import { ActivatedRoute, NavigationEnd, Router, RouterLink, RouterLinkActive, RouterModule, RouterOutlet } from "@angular/router";
|
|
6
|
+
import { TranslatePipe, TranslateService } from "@ngx-translate/core";
|
|
7
|
+
import { map as map$1 } from "rxjs/operators";
|
|
8
|
+
import { MobileService, dadosDaRota } from "@main-class/componentes/core";
|
|
9
|
+
import * as i2 from "@angular/material/icon";
|
|
10
|
+
import { MatIcon, MatIconModule } from "@angular/material/icon";
|
|
11
|
+
import { AsyncPipe, NgClass } from "@angular/common";
|
|
12
|
+
import { MatMenu, MatMenuItem, MatMenuTrigger } from "@angular/material/menu";
|
|
13
|
+
import { ImagemDirective } from "@main-class/componentes/arquivo";
|
|
14
|
+
import { MatDrawer, MatDrawerContainer, MatDrawerContent } from "@angular/material/sidenav";
|
|
15
|
+
import { MatTabLink, MatTabNav, MatTabNavPanel } from "@angular/material/tabs";
|
|
16
|
+
import { MatButtonModule } from "@angular/material/button";
|
|
17
|
+
import { MatDividerModule } from "@angular/material/divider";
|
|
18
|
+
import { MatProgressSpinnerModule } from "@angular/material/progress-spinner";
|
|
19
|
+
import { toSignal } from "@angular/core/rxjs-interop";
|
|
20
|
+
const MENU_CONFIG = new InjectionToken("MENU_CONFIG");
|
|
21
|
+
var MenuService = class MenuService {
|
|
22
|
+
delegates = [];
|
|
23
|
+
constructor() {}
|
|
24
|
+
register(delegate) {
|
|
25
|
+
this.delegates.push(delegate);
|
|
26
|
+
}
|
|
27
|
+
unregister(delegate) {
|
|
28
|
+
this.delegates.splice(this.delegates.indexOf(delegate), 1);
|
|
29
|
+
}
|
|
30
|
+
toggle() {
|
|
31
|
+
this.delegates.forEach((d) => d.toggle());
|
|
32
|
+
}
|
|
33
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
34
|
+
minVersion: "12.0.0",
|
|
35
|
+
version: "22.3.2",
|
|
36
|
+
ngImport: i0,
|
|
37
|
+
type: MenuService,
|
|
38
|
+
deps: [],
|
|
39
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
40
|
+
});
|
|
41
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
42
|
+
minVersion: "12.0.0",
|
|
43
|
+
version: "22.3.2",
|
|
44
|
+
ngImport: i0,
|
|
45
|
+
type: MenuService,
|
|
46
|
+
providedIn: "root"
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
50
|
+
minVersion: "12.0.0",
|
|
51
|
+
version: "22.3.2",
|
|
52
|
+
ngImport: i0,
|
|
53
|
+
type: MenuService,
|
|
54
|
+
decorators: [{
|
|
55
|
+
type: Injectable,
|
|
56
|
+
args: [{ providedIn: "root" }]
|
|
57
|
+
}],
|
|
58
|
+
ctorParameters: () => []
|
|
59
|
+
});
|
|
60
|
+
var BaseService = class BaseService {
|
|
61
|
+
router;
|
|
62
|
+
injector;
|
|
63
|
+
activatedRoute;
|
|
64
|
+
application;
|
|
65
|
+
translateService;
|
|
66
|
+
$tabs = new BehaviorSubject([]);
|
|
67
|
+
$mode = new BehaviorSubject("default");
|
|
68
|
+
constructor(router, injector, activatedRoute, application, translateService) {
|
|
69
|
+
this.router = router;
|
|
70
|
+
this.injector = injector;
|
|
71
|
+
this.activatedRoute = activatedRoute;
|
|
72
|
+
this.application = application;
|
|
73
|
+
this.translateService = translateService;
|
|
74
|
+
this.activatedRoute.queryParams.subscribe((qp) => {
|
|
75
|
+
if (qp["mode"] === "dialog") this.$mode.next("dialog");
|
|
76
|
+
else this.$mode.next("default");
|
|
77
|
+
});
|
|
78
|
+
this.init();
|
|
79
|
+
}
|
|
80
|
+
get title() {
|
|
81
|
+
return this.$tabs.pipe(map$1((tabs) => tabs.find((t) => !t.route)?.label));
|
|
82
|
+
}
|
|
83
|
+
get tabs() {
|
|
84
|
+
return this.$tabs.asObservable();
|
|
85
|
+
}
|
|
86
|
+
get hasTabs() {
|
|
87
|
+
return !!this.$tabs.value.length;
|
|
88
|
+
}
|
|
89
|
+
get mode() {
|
|
90
|
+
return this.$mode.asObservable();
|
|
91
|
+
}
|
|
92
|
+
async init() {
|
|
93
|
+
const updateState = async (tabs = [], activatedRoute = this.activatedRoute) => {
|
|
94
|
+
const data = dadosDaRota(activatedRoute.snapshot);
|
|
95
|
+
if (data["hasTabs"] !== null && data["hasTabs"] !== void 0 && !data["hasTabs"]) return [];
|
|
96
|
+
else {
|
|
97
|
+
if (data["tabs"]) {
|
|
98
|
+
for (const tab of data["tabs"]) if (await this.checkPermission(tab)) {
|
|
99
|
+
const route = !!tab.route ? this.router.createUrlTree(tab.route.split("/"), { relativeTo: activatedRoute }).toString() : void 0;
|
|
100
|
+
const label = this.translateService.instant(tab.label);
|
|
101
|
+
const t = tabs.find((t0) => t0.label === label);
|
|
102
|
+
if (t) t.route = route;
|
|
103
|
+
else {
|
|
104
|
+
if (!!tab.badgeProvider) tab.badgeSubscription = this.injector.get(tab.badgeProvider).badge().subscribe((badge) => tab.badge = badge);
|
|
105
|
+
tabs.push({
|
|
106
|
+
...tab,
|
|
107
|
+
label,
|
|
108
|
+
route
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
if (activatedRoute.firstChild) return await updateState(tabs, activatedRoute.firstChild);
|
|
114
|
+
}
|
|
115
|
+
return tabs;
|
|
116
|
+
};
|
|
117
|
+
this.router.events.subscribe(async (event) => {
|
|
118
|
+
if (event instanceof NavigationEnd) {
|
|
119
|
+
this.$tabs.value.forEach((tab) => {
|
|
120
|
+
tab.badgeSubscription?.unsubscribe();
|
|
121
|
+
});
|
|
122
|
+
this.$tabs.next(await updateState());
|
|
123
|
+
this.application.tick();
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
this.application.tick();
|
|
127
|
+
}
|
|
128
|
+
async checkPermission(tab) {
|
|
129
|
+
if (tab.permission && tab.permission.condition) {
|
|
130
|
+
const deps = tab.permission.deps ? tab.permission.deps.map((dep) => this.injector.get(dep)) : [];
|
|
131
|
+
return await from(tab.permission.condition(...deps)).toPromise();
|
|
132
|
+
}
|
|
133
|
+
return true;
|
|
134
|
+
}
|
|
135
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
136
|
+
minVersion: "12.0.0",
|
|
137
|
+
version: "22.3.2",
|
|
138
|
+
ngImport: i0,
|
|
139
|
+
type: BaseService,
|
|
140
|
+
deps: [
|
|
141
|
+
{ token: Router },
|
|
142
|
+
{ token: Injector },
|
|
143
|
+
{ token: ActivatedRoute },
|
|
144
|
+
{ token: ApplicationRef },
|
|
145
|
+
{ token: TranslateService }
|
|
146
|
+
],
|
|
147
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
148
|
+
});
|
|
149
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
150
|
+
minVersion: "12.0.0",
|
|
151
|
+
version: "22.3.2",
|
|
152
|
+
ngImport: i0,
|
|
153
|
+
type: BaseService,
|
|
154
|
+
providedIn: "root"
|
|
155
|
+
});
|
|
156
|
+
};
|
|
157
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
158
|
+
minVersion: "12.0.0",
|
|
159
|
+
version: "22.3.2",
|
|
160
|
+
ngImport: i0,
|
|
161
|
+
type: BaseService,
|
|
162
|
+
decorators: [{
|
|
163
|
+
type: Injectable,
|
|
164
|
+
args: [{ providedIn: "root" }]
|
|
165
|
+
}],
|
|
166
|
+
ctorParameters: () => [
|
|
167
|
+
{ type: Router },
|
|
168
|
+
{ type: Injector },
|
|
169
|
+
{ type: ActivatedRoute },
|
|
170
|
+
{ type: ApplicationRef },
|
|
171
|
+
{ type: TranslateService }
|
|
172
|
+
]
|
|
173
|
+
});
|
|
174
|
+
var MenuComponent = class MenuComponent {
|
|
175
|
+
mobileService;
|
|
176
|
+
menuService;
|
|
177
|
+
baseService;
|
|
178
|
+
menuConfig = inject(MENU_CONFIG);
|
|
179
|
+
collapsedSections = /* @__PURE__ */ new Set();
|
|
180
|
+
constructor(mobileService, menuService, baseService) {
|
|
181
|
+
this.mobileService = mobileService;
|
|
182
|
+
this.menuService = menuService;
|
|
183
|
+
this.baseService = baseService;
|
|
184
|
+
}
|
|
185
|
+
toggleSection(menu) {
|
|
186
|
+
if (this.collapsedSections.has(menu.label)) this.collapsedSections.delete(menu.label);
|
|
187
|
+
else this.collapsedSections.add(menu.label);
|
|
188
|
+
}
|
|
189
|
+
isSectionCollapsed(menu) {
|
|
190
|
+
return this.collapsedSections.has(menu.label);
|
|
191
|
+
}
|
|
192
|
+
menuClicked(menu) {
|
|
193
|
+
if (this.mobileService.mobile) this.menuService.toggle();
|
|
194
|
+
}
|
|
195
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
196
|
+
minVersion: "12.0.0",
|
|
197
|
+
version: "22.3.2",
|
|
198
|
+
ngImport: i0,
|
|
199
|
+
type: MenuComponent,
|
|
200
|
+
deps: [
|
|
201
|
+
{ token: MobileService },
|
|
202
|
+
{ token: MenuService },
|
|
203
|
+
{ token: BaseService }
|
|
204
|
+
],
|
|
205
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
206
|
+
});
|
|
207
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
208
|
+
minVersion: "17.0.0",
|
|
209
|
+
version: "22.3.2",
|
|
210
|
+
type: MenuComponent,
|
|
211
|
+
isStandalone: true,
|
|
212
|
+
selector: "mcl-menu",
|
|
213
|
+
ngImport: i0,
|
|
214
|
+
template: "<div class=\"menu\">\n <div class=\"menu__brand\">\n <router-outlet name=\"menu-header\"></router-outlet>\n </div>\n @let menus = menuConfig.menus() | async;\n\n @for (menu of menus; track menu.label) {\n @if (!menu.children?.length) {\n <div class=\"menu__list\">\n <button class=\"menu__item\"\n (click)=\"menuClicked(menu)\"\n [routerLink]=\"menu.route\" [routerLinkActive]=\"['is-active']\">\n @if (menu.icon) { <span class=\"menu__icon\"><mat-icon>{{menu.icon}}</mat-icon></span> }\n <span>{{menu.label | translate}}</span>\n </button>\n </div>\n }\n\n @if (menu.children?.length){\n @if (menu.collapsible) {\n <button class=\"menu__section menu__section--collapsible\"\n (click)=\"toggleSection(menu)\"\n [class.is-collapsed]=\"isSectionCollapsed(menu)\"\n type=\"button\">\n <span>{{menu.label | translate}}</span>\n <mat-icon class=\"menu__section-chevron\">expand_more</mat-icon>\n </button>\n <div class=\"menu__collapsible-wrapper\"\n [class.is-collapsed]=\"isSectionCollapsed(menu)\">\n <div class=\"menu__list\">\n @for (sub of menu.children; track sub.label){\n <button class=\"menu__item\"\n (click)=\"menuClicked(sub)\"\n [routerLink]=\"sub.route\" [routerLinkActive]=\"['is-active']\">\n @if (sub.icon) { <span class=\"menu__icon\"><mat-icon>{{sub.icon}}</mat-icon></span> }\n <span>{{sub.label | translate}}</span>\n </button>\n }\n </div>\n </div>\n } @else {\n <div class=\"menu__section\">\n {{menu.label | translate}}\n </div>\n\n <div class=\"menu__list\">\n @for (sub of menu.children; track sub.label){\n <button class=\"menu__item\"\n (click)=\"menuClicked(sub)\"\n [routerLink]=\"sub.route\" [routerLinkActive]=\"['is-active']\">\n @if (sub.icon) { <span class=\"menu__icon\"><mat-icon>{{sub.icon}}</mat-icon></span> }\n <span>{{sub.label | translate}}</span>\n </button>\n }\n </div>\n }\n }\n }\n\n <div class=\"menu__bottom\">\n @let user = menuConfig.user() | async;\n\n @if (!!user) {\n <button class=\"menu__user\" type=\"button\" [matMenuTriggerFor]=\"userMenu\">\n <div class=\"menu__user-avatar\" [mclImagemBackground]=\"user.photoUrl\"></div>\n <div class=\"menu__user-meta\">\n <div class=\"menu__user-name\">{{ user.name }}</div>\n @if (user.role) {\n <div class=\"menu__user-role\">{{ user.role }}</div>\n }\n </div>\n <mat-icon class=\"menu__user-caret\">unfold_more</mat-icon>\n </button>\n\n <mat-menu #userMenu class=\"mcl-user-menu\">\n <div class=\"mcl-user-menu__header\" (click)=\"$event.stopPropagation()\">\n <div class=\"mcl-user-menu__name\">{{ user.name }}</div>\n @if (user.role) {\n <div class=\"mcl-user-menu__role\">{{ user.role }}</div>\n }\n </div>\n\n @for (menu of user.menus; track menu.label) {\n <button mat-menu-item type=\"button\" (click)=\"menu.action()\">\n <mat-icon>{{ menu.icon }}</mat-icon>\n <span>{{ menu.label }}</span>\n </button>\n }\n </mat-menu>\n }\n\n <div class=\"menu__footer\">\n <router-outlet name=\"menu-bottom\"></router-outlet>\n </div>\n </div>\n</div>\n",
|
|
215
|
+
styles: ["@charset \"UTF-8\";:host{display:block;height:100%;--menu-structural: var(--lib-color-secondary, var(--mat-sys-secondary));--menu-primary: var(--lib-color-primary, var(--mat-sys-primary));--menu-bg: var(--lib-color-surface-container-low, var(--mat-sys-surface-container-low));--menu-surface: var(--lib-color-surface, var(--mat-sys-surface));--menu-fg: var(--lib-color-on-surface, var(--mat-sys-on-surface));--menu-muted: var(--lib-color-on-surface-variant, var(--mat-sys-on-surface-variant));--menu-border: var(--lib-color-outline-variant, var(--mat-sys-outline-variant));--menu-active-bg: var(--menu-surface);--menu-active-fg: var(--menu-fg);--menu-w: 16.5rem;--menu-w-mini: 4.5rem;--menu-radius: var(--mcl-radius-sm, 8px);--menu-icon-size: 20px;--menu-icon-box: 20px}:host .menu{width:var(--menu-w);height:100%;display:flex;flex-direction:column;background:transparent;color:var(--menu-fg);overflow:hidden auto}:host .menu__brand{position:relative;display:flex;align-items:center;min-height:60px;padding:8px 1rem 0}:host .menu__section{margin:1.25rem 0 .375rem;padding:0 1rem;text-transform:uppercase;font-size:.6875rem;font-weight:600;letter-spacing:.08em;color:var(--menu-muted)}:host .menu__section--collapsible{display:flex;align-items:center;justify-content:space-between;gap:.5rem;width:calc(100% - 1rem);margin:1.25rem .5rem .375rem;padding:.375rem .5rem;border:0;border-radius:var(--menu-radius);background:transparent;cursor:pointer;transition:background-color var(--mcl-transition, .18s ease),color var(--mcl-transition, .18s ease)}:host .menu__section--collapsible:hover{background:color-mix(in oklab,var(--menu-fg) 5%,var(--menu-bg));color:var(--menu-fg)}:host .menu__section-chevron{font-size:18px;width:18px;height:18px;line-height:1;color:var(--menu-muted);transition:transform .2s ease}:host .menu__section--collapsible.is-collapsed .menu__section-chevron{transform:rotate(-90deg)}:host .menu__collapsible-wrapper{display:grid;grid-template-rows:1fr;transition:grid-template-rows .22s ease}:host .menu__collapsible-wrapper>.menu__list{overflow:hidden;min-height:0}:host .menu__collapsible-wrapper.is-collapsed{grid-template-rows:0fr}:host .menu__collapsible-wrapper.is-collapsed>.menu__list{padding-block:0}:host .menu__list{padding:.25rem .5rem .5rem;display:grid;gap:2px;transition:padding .22s ease}:host .menu__item{position:relative;display:flex;align-items:center;gap:.75rem;width:100%;min-height:40px;padding:.5rem .75rem;border:0;border-radius:var(--menu-radius);background:transparent;color:var(--menu-muted);font-size:.875rem;font-weight:500;text-align:left;text-decoration:none;cursor:pointer;-webkit-appearance:none;appearance:none;transition:background-color var(--mcl-transition, .18s ease),color var(--mcl-transition, .18s ease)}:host .menu__item:hover{background:color-mix(in oklab,var(--menu-fg) 6%,var(--menu-bg));color:var(--menu-fg)}:host .menu__item:focus-visible{outline:2px solid var(--menu-primary);outline-offset:-2px}:host .menu__item.is-active{background:var(--menu-active-bg);color:var(--menu-active-fg);font-weight:600;box-shadow:var(--mcl-shadow-1, 0 1px 3px rgba(0, 0, 0, .06))}:host .menu__icon{inline-size:var(--menu-icon-box);block-size:var(--menu-icon-box);display:inline-grid;place-items:center;flex:0 0 var(--menu-icon-box);color:var(--menu-muted);transition:color var(--mcl-transition, .18s ease)}:host .menu__item:hover .menu__icon{color:var(--menu-fg)}:host .menu__icon mat-icon{font-size:var(--menu-icon-size);width:var(--menu-icon-box);height:var(--menu-icon-box);line-height:1;display:inline-block;vertical-align:middle}:host .menu__icon mat-icon[class*=material-symbols]{font-variation-settings:\"FILL\" 0,\"wght\" 400,\"GRAD\" 0,\"opsz\" 20}:host .menu__item.is-active .menu__icon{color:var(--menu-primary)}:host .menu__label{flex:1 1 auto}:host .menu__badge{font-size:.7rem;font-weight:600;padding:.1rem .4rem;border-radius:var(--mcl-radius-full, 999px);background:color-mix(in oklab,var(--menu-primary) 12%,var(--menu-bg));color:var(--menu-primary)}:host .menu__bottom{margin-top:auto;padding:.5rem;display:grid;gap:4px}:host .menu__user{display:flex;align-items:center;gap:10px;width:100%;padding:8px 10px;border:1px solid transparent;border-radius:var(--mcl-radius-md, 12px);background:transparent;color:var(--menu-fg);text-align:left;cursor:pointer;-webkit-appearance:none;appearance:none;transition:background-color var(--mcl-transition, .18s ease),border-color var(--mcl-transition, .18s ease)}:host .menu__user:hover{background:var(--menu-surface);border-color:var(--menu-border)}:host .menu__user:focus-visible{outline:2px solid var(--menu-primary);outline-offset:-2px}:host .menu__user-avatar{inline-size:34px;block-size:34px;border-radius:50%;background-color:color-mix(in oklab,var(--menu-primary) 16%,var(--menu-bg));background-position:center center;background-size:cover;box-shadow:inset 0 0 0 1px var(--menu-border);flex:0 0 auto}:host .menu__user-meta{flex:1 1 auto;min-width:0}:host .menu__user-name{font-size:.8438rem;font-weight:600;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .menu__user-role{font-size:.72rem;line-height:1.25;color:var(--menu-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .menu__user-caret{font-size:18px;width:18px;height:18px;color:var(--menu-muted);flex:0 0 auto}:host .menu__footer:empty{display:none}:host(.is-compact) .menu__item{min-height:34px;padding-block:.375rem}:host(.is-mini) .menu{width:var(--menu-w-mini)}:host(.is-mini) .menu__label,:host(.is-mini) .menu__badge,:host(.is-mini) .menu__section{display:none}:host(.is-mini) .menu__item{justify-content:center;padding-left:.75rem}:host([dir=rtl]) .menu__item{padding:.5rem .75rem}\n"],
|
|
216
|
+
dependencies: [
|
|
217
|
+
{
|
|
218
|
+
kind: "directive",
|
|
219
|
+
type: RouterLink,
|
|
220
|
+
selector: "[routerLink]",
|
|
221
|
+
inputs: [
|
|
222
|
+
"target",
|
|
223
|
+
"queryParams",
|
|
224
|
+
"fragment",
|
|
225
|
+
"queryParamsHandling",
|
|
226
|
+
"state",
|
|
227
|
+
"info",
|
|
228
|
+
"relativeTo",
|
|
229
|
+
"preserveFragment",
|
|
230
|
+
"skipLocationChange",
|
|
231
|
+
"replaceUrl",
|
|
232
|
+
"browserUrl",
|
|
233
|
+
"scroll",
|
|
234
|
+
"routerLink"
|
|
235
|
+
]
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
kind: "component",
|
|
239
|
+
type: MatIcon,
|
|
240
|
+
selector: "mat-icon",
|
|
241
|
+
inputs: [
|
|
242
|
+
"color",
|
|
243
|
+
"inline",
|
|
244
|
+
"svgIcon",
|
|
245
|
+
"fontSet",
|
|
246
|
+
"fontIcon"
|
|
247
|
+
],
|
|
248
|
+
exportAs: ["matIcon"]
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
kind: "directive",
|
|
252
|
+
type: RouterOutlet,
|
|
253
|
+
selector: "router-outlet",
|
|
254
|
+
inputs: ["name", "routerOutletData"],
|
|
255
|
+
outputs: [
|
|
256
|
+
"activate",
|
|
257
|
+
"deactivate",
|
|
258
|
+
"attach",
|
|
259
|
+
"detach"
|
|
260
|
+
],
|
|
261
|
+
exportAs: ["outlet"]
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
kind: "directive",
|
|
265
|
+
type: RouterLinkActive,
|
|
266
|
+
selector: "[routerLinkActive]",
|
|
267
|
+
inputs: [
|
|
268
|
+
"routerLinkActiveOptions",
|
|
269
|
+
"ariaCurrentWhenActive",
|
|
270
|
+
"routerLinkActive"
|
|
271
|
+
],
|
|
272
|
+
outputs: ["isActiveChange"],
|
|
273
|
+
exportAs: ["routerLinkActive"]
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
kind: "component",
|
|
277
|
+
type: MatMenu,
|
|
278
|
+
selector: "mat-menu",
|
|
279
|
+
inputs: [
|
|
280
|
+
"backdropClass",
|
|
281
|
+
"aria-label",
|
|
282
|
+
"aria-labelledby",
|
|
283
|
+
"aria-describedby",
|
|
284
|
+
"xPosition",
|
|
285
|
+
"yPosition",
|
|
286
|
+
"overlapTrigger",
|
|
287
|
+
"hasBackdrop",
|
|
288
|
+
"class",
|
|
289
|
+
"classList"
|
|
290
|
+
],
|
|
291
|
+
outputs: ["closed", "close"],
|
|
292
|
+
exportAs: ["matMenu"]
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
kind: "component",
|
|
296
|
+
type: MatMenuItem,
|
|
297
|
+
selector: "[mat-menu-item]",
|
|
298
|
+
inputs: [
|
|
299
|
+
"role",
|
|
300
|
+
"disabled",
|
|
301
|
+
"disabledInteractive",
|
|
302
|
+
"disableRipple"
|
|
303
|
+
],
|
|
304
|
+
exportAs: ["matMenuItem"]
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
kind: "directive",
|
|
308
|
+
type: MatMenuTrigger,
|
|
309
|
+
selector: "[mat-menu-trigger-for], [matMenuTriggerFor]",
|
|
310
|
+
inputs: [
|
|
311
|
+
"mat-menu-trigger-for",
|
|
312
|
+
"matMenuTriggerFor",
|
|
313
|
+
"matMenuTriggerData",
|
|
314
|
+
"matMenuTriggerRestoreFocus"
|
|
315
|
+
],
|
|
316
|
+
outputs: [
|
|
317
|
+
"menuOpened",
|
|
318
|
+
"onMenuOpen",
|
|
319
|
+
"menuClosed",
|
|
320
|
+
"onMenuClose"
|
|
321
|
+
],
|
|
322
|
+
exportAs: ["matMenuTrigger"]
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
kind: "directive",
|
|
326
|
+
type: ImagemDirective,
|
|
327
|
+
selector: "[mclImagemSrc],[mclImagemBackground]",
|
|
328
|
+
inputs: [
|
|
329
|
+
"mclImagemSrc",
|
|
330
|
+
"mclImagemBackground",
|
|
331
|
+
"padrao"
|
|
332
|
+
]
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
kind: "pipe",
|
|
336
|
+
type: AsyncPipe,
|
|
337
|
+
name: "async"
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
kind: "pipe",
|
|
341
|
+
type: TranslatePipe,
|
|
342
|
+
name: "translate"
|
|
343
|
+
}
|
|
344
|
+
],
|
|
345
|
+
changeDetection: i0.ChangeDetectionStrategy.Eager
|
|
346
|
+
});
|
|
347
|
+
};
|
|
348
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
349
|
+
minVersion: "12.0.0",
|
|
350
|
+
version: "22.3.2",
|
|
351
|
+
ngImport: i0,
|
|
352
|
+
type: MenuComponent,
|
|
353
|
+
decorators: [{
|
|
354
|
+
type: Component,
|
|
355
|
+
args: [{
|
|
356
|
+
selector: "mcl-menu",
|
|
357
|
+
imports: [
|
|
358
|
+
AsyncPipe,
|
|
359
|
+
RouterLink,
|
|
360
|
+
MatIcon,
|
|
361
|
+
TranslatePipe,
|
|
362
|
+
RouterOutlet,
|
|
363
|
+
RouterLinkActive,
|
|
364
|
+
MatMenu,
|
|
365
|
+
MatMenuItem,
|
|
366
|
+
MatMenuTrigger,
|
|
367
|
+
ImagemDirective
|
|
368
|
+
],
|
|
369
|
+
changeDetection: ChangeDetectionStrategy.Eager,
|
|
370
|
+
template: "<div class=\"menu\">\n <div class=\"menu__brand\">\n <router-outlet name=\"menu-header\"></router-outlet>\n </div>\n @let menus = menuConfig.menus() | async;\n\n @for (menu of menus; track menu.label) {\n @if (!menu.children?.length) {\n <div class=\"menu__list\">\n <button class=\"menu__item\"\n (click)=\"menuClicked(menu)\"\n [routerLink]=\"menu.route\" [routerLinkActive]=\"['is-active']\">\n @if (menu.icon) { <span class=\"menu__icon\"><mat-icon>{{menu.icon}}</mat-icon></span> }\n <span>{{menu.label | translate}}</span>\n </button>\n </div>\n }\n\n @if (menu.children?.length){\n @if (menu.collapsible) {\n <button class=\"menu__section menu__section--collapsible\"\n (click)=\"toggleSection(menu)\"\n [class.is-collapsed]=\"isSectionCollapsed(menu)\"\n type=\"button\">\n <span>{{menu.label | translate}}</span>\n <mat-icon class=\"menu__section-chevron\">expand_more</mat-icon>\n </button>\n <div class=\"menu__collapsible-wrapper\"\n [class.is-collapsed]=\"isSectionCollapsed(menu)\">\n <div class=\"menu__list\">\n @for (sub of menu.children; track sub.label){\n <button class=\"menu__item\"\n (click)=\"menuClicked(sub)\"\n [routerLink]=\"sub.route\" [routerLinkActive]=\"['is-active']\">\n @if (sub.icon) { <span class=\"menu__icon\"><mat-icon>{{sub.icon}}</mat-icon></span> }\n <span>{{sub.label | translate}}</span>\n </button>\n }\n </div>\n </div>\n } @else {\n <div class=\"menu__section\">\n {{menu.label | translate}}\n </div>\n\n <div class=\"menu__list\">\n @for (sub of menu.children; track sub.label){\n <button class=\"menu__item\"\n (click)=\"menuClicked(sub)\"\n [routerLink]=\"sub.route\" [routerLinkActive]=\"['is-active']\">\n @if (sub.icon) { <span class=\"menu__icon\"><mat-icon>{{sub.icon}}</mat-icon></span> }\n <span>{{sub.label | translate}}</span>\n </button>\n }\n </div>\n }\n }\n }\n\n <div class=\"menu__bottom\">\n @let user = menuConfig.user() | async;\n\n @if (!!user) {\n <button class=\"menu__user\" type=\"button\" [matMenuTriggerFor]=\"userMenu\">\n <div class=\"menu__user-avatar\" [mclImagemBackground]=\"user.photoUrl\"></div>\n <div class=\"menu__user-meta\">\n <div class=\"menu__user-name\">{{ user.name }}</div>\n @if (user.role) {\n <div class=\"menu__user-role\">{{ user.role }}</div>\n }\n </div>\n <mat-icon class=\"menu__user-caret\">unfold_more</mat-icon>\n </button>\n\n <mat-menu #userMenu class=\"mcl-user-menu\">\n <div class=\"mcl-user-menu__header\" (click)=\"$event.stopPropagation()\">\n <div class=\"mcl-user-menu__name\">{{ user.name }}</div>\n @if (user.role) {\n <div class=\"mcl-user-menu__role\">{{ user.role }}</div>\n }\n </div>\n\n @for (menu of user.menus; track menu.label) {\n <button mat-menu-item type=\"button\" (click)=\"menu.action()\">\n <mat-icon>{{ menu.icon }}</mat-icon>\n <span>{{ menu.label }}</span>\n </button>\n }\n </mat-menu>\n }\n\n <div class=\"menu__footer\">\n <router-outlet name=\"menu-bottom\"></router-outlet>\n </div>\n </div>\n</div>\n",
|
|
371
|
+
styles: ["@charset \"UTF-8\";:host{display:block;height:100%;--menu-structural: var(--lib-color-secondary, var(--mat-sys-secondary));--menu-primary: var(--lib-color-primary, var(--mat-sys-primary));--menu-bg: var(--lib-color-surface-container-low, var(--mat-sys-surface-container-low));--menu-surface: var(--lib-color-surface, var(--mat-sys-surface));--menu-fg: var(--lib-color-on-surface, var(--mat-sys-on-surface));--menu-muted: var(--lib-color-on-surface-variant, var(--mat-sys-on-surface-variant));--menu-border: var(--lib-color-outline-variant, var(--mat-sys-outline-variant));--menu-active-bg: var(--menu-surface);--menu-active-fg: var(--menu-fg);--menu-w: 16.5rem;--menu-w-mini: 4.5rem;--menu-radius: var(--mcl-radius-sm, 8px);--menu-icon-size: 20px;--menu-icon-box: 20px}:host .menu{width:var(--menu-w);height:100%;display:flex;flex-direction:column;background:transparent;color:var(--menu-fg);overflow:hidden auto}:host .menu__brand{position:relative;display:flex;align-items:center;min-height:60px;padding:8px 1rem 0}:host .menu__section{margin:1.25rem 0 .375rem;padding:0 1rem;text-transform:uppercase;font-size:.6875rem;font-weight:600;letter-spacing:.08em;color:var(--menu-muted)}:host .menu__section--collapsible{display:flex;align-items:center;justify-content:space-between;gap:.5rem;width:calc(100% - 1rem);margin:1.25rem .5rem .375rem;padding:.375rem .5rem;border:0;border-radius:var(--menu-radius);background:transparent;cursor:pointer;transition:background-color var(--mcl-transition, .18s ease),color var(--mcl-transition, .18s ease)}:host .menu__section--collapsible:hover{background:color-mix(in oklab,var(--menu-fg) 5%,var(--menu-bg));color:var(--menu-fg)}:host .menu__section-chevron{font-size:18px;width:18px;height:18px;line-height:1;color:var(--menu-muted);transition:transform .2s ease}:host .menu__section--collapsible.is-collapsed .menu__section-chevron{transform:rotate(-90deg)}:host .menu__collapsible-wrapper{display:grid;grid-template-rows:1fr;transition:grid-template-rows .22s ease}:host .menu__collapsible-wrapper>.menu__list{overflow:hidden;min-height:0}:host .menu__collapsible-wrapper.is-collapsed{grid-template-rows:0fr}:host .menu__collapsible-wrapper.is-collapsed>.menu__list{padding-block:0}:host .menu__list{padding:.25rem .5rem .5rem;display:grid;gap:2px;transition:padding .22s ease}:host .menu__item{position:relative;display:flex;align-items:center;gap:.75rem;width:100%;min-height:40px;padding:.5rem .75rem;border:0;border-radius:var(--menu-radius);background:transparent;color:var(--menu-muted);font-size:.875rem;font-weight:500;text-align:left;text-decoration:none;cursor:pointer;-webkit-appearance:none;appearance:none;transition:background-color var(--mcl-transition, .18s ease),color var(--mcl-transition, .18s ease)}:host .menu__item:hover{background:color-mix(in oklab,var(--menu-fg) 6%,var(--menu-bg));color:var(--menu-fg)}:host .menu__item:focus-visible{outline:2px solid var(--menu-primary);outline-offset:-2px}:host .menu__item.is-active{background:var(--menu-active-bg);color:var(--menu-active-fg);font-weight:600;box-shadow:var(--mcl-shadow-1, 0 1px 3px rgba(0, 0, 0, .06))}:host .menu__icon{inline-size:var(--menu-icon-box);block-size:var(--menu-icon-box);display:inline-grid;place-items:center;flex:0 0 var(--menu-icon-box);color:var(--menu-muted);transition:color var(--mcl-transition, .18s ease)}:host .menu__item:hover .menu__icon{color:var(--menu-fg)}:host .menu__icon mat-icon{font-size:var(--menu-icon-size);width:var(--menu-icon-box);height:var(--menu-icon-box);line-height:1;display:inline-block;vertical-align:middle}:host .menu__icon mat-icon[class*=material-symbols]{font-variation-settings:\"FILL\" 0,\"wght\" 400,\"GRAD\" 0,\"opsz\" 20}:host .menu__item.is-active .menu__icon{color:var(--menu-primary)}:host .menu__label{flex:1 1 auto}:host .menu__badge{font-size:.7rem;font-weight:600;padding:.1rem .4rem;border-radius:var(--mcl-radius-full, 999px);background:color-mix(in oklab,var(--menu-primary) 12%,var(--menu-bg));color:var(--menu-primary)}:host .menu__bottom{margin-top:auto;padding:.5rem;display:grid;gap:4px}:host .menu__user{display:flex;align-items:center;gap:10px;width:100%;padding:8px 10px;border:1px solid transparent;border-radius:var(--mcl-radius-md, 12px);background:transparent;color:var(--menu-fg);text-align:left;cursor:pointer;-webkit-appearance:none;appearance:none;transition:background-color var(--mcl-transition, .18s ease),border-color var(--mcl-transition, .18s ease)}:host .menu__user:hover{background:var(--menu-surface);border-color:var(--menu-border)}:host .menu__user:focus-visible{outline:2px solid var(--menu-primary);outline-offset:-2px}:host .menu__user-avatar{inline-size:34px;block-size:34px;border-radius:50%;background-color:color-mix(in oklab,var(--menu-primary) 16%,var(--menu-bg));background-position:center center;background-size:cover;box-shadow:inset 0 0 0 1px var(--menu-border);flex:0 0 auto}:host .menu__user-meta{flex:1 1 auto;min-width:0}:host .menu__user-name{font-size:.8438rem;font-weight:600;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .menu__user-role{font-size:.72rem;line-height:1.25;color:var(--menu-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host .menu__user-caret{font-size:18px;width:18px;height:18px;color:var(--menu-muted);flex:0 0 auto}:host .menu__footer:empty{display:none}:host(.is-compact) .menu__item{min-height:34px;padding-block:.375rem}:host(.is-mini) .menu{width:var(--menu-w-mini)}:host(.is-mini) .menu__label,:host(.is-mini) .menu__badge,:host(.is-mini) .menu__section{display:none}:host(.is-mini) .menu__item{justify-content:center;padding-left:.75rem}:host([dir=rtl]) .menu__item{padding:.5rem .75rem}\n"]
|
|
372
|
+
}]
|
|
373
|
+
}],
|
|
374
|
+
ctorParameters: () => [
|
|
375
|
+
{ type: MobileService },
|
|
376
|
+
{ type: MenuService },
|
|
377
|
+
{ type: BaseService }
|
|
378
|
+
]
|
|
379
|
+
});
|
|
380
|
+
var HeaderComponent = class HeaderComponent {
|
|
381
|
+
menuService;
|
|
382
|
+
baseService;
|
|
383
|
+
mobileService;
|
|
384
|
+
constructor(menuService, baseService, mobileService) {
|
|
385
|
+
this.menuService = menuService;
|
|
386
|
+
this.baseService = baseService;
|
|
387
|
+
this.mobileService = mobileService;
|
|
388
|
+
}
|
|
389
|
+
get mobile() {
|
|
390
|
+
return this.mobileService.mobile;
|
|
391
|
+
}
|
|
392
|
+
ngOnInit() {}
|
|
393
|
+
get title() {
|
|
394
|
+
return this.baseService.title;
|
|
395
|
+
}
|
|
396
|
+
toggleMenu() {
|
|
397
|
+
this.menuService.toggle();
|
|
398
|
+
}
|
|
399
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
400
|
+
minVersion: "12.0.0",
|
|
401
|
+
version: "22.3.2",
|
|
402
|
+
ngImport: i0,
|
|
403
|
+
type: HeaderComponent,
|
|
404
|
+
deps: [
|
|
405
|
+
{ token: MenuService },
|
|
406
|
+
{ token: BaseService },
|
|
407
|
+
{ token: MobileService }
|
|
408
|
+
],
|
|
409
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
410
|
+
});
|
|
411
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
412
|
+
minVersion: "14.0.0",
|
|
413
|
+
version: "22.3.2",
|
|
414
|
+
type: HeaderComponent,
|
|
415
|
+
isStandalone: true,
|
|
416
|
+
selector: "mcl-header",
|
|
417
|
+
ngImport: i0,
|
|
418
|
+
template: "<div class=\"header\">\n <div class=\"header__left\">\n <!-- botão do menu (mobile) -->\n <button class=\"header__btn\" type=\"button\" (click)=\"toggleMenu()\" aria-label=\"Abrir menu\">\n <mat-icon>menu</mat-icon>\n </button>\n\n <h1 class=\"header__title\">\n {{ title | async }}\n </h1>\n </div>\n\n <div class=\"header__right\">\n <router-outlet name=\"header-actions\"></router-outlet>\n </div>\n</div>\n",
|
|
419
|
+
styles: ["@charset \"UTF-8\";:host{--hdr-fg: var(--lib-color-on-surface, var(--mat-sys-on-surface));--hdr-muted: var(--lib-color-on-surface-variant, var(--mat-sys-on-surface-variant));--hdr-border: var(--lib-color-outline-variant, var(--mat-sys-outline-variant));--hdr-primary: var(--lib-color-primary, var(--mat-sys-primary));--hdr-pad-x: var(--mcl-page-pad-x, clamp(20px, 3.5vw, 32px));display:block}.header{width:100%;max-width:var(--base-maxw, 1600px);margin-inline:auto;display:grid;grid-template-columns:1fr auto;align-items:center;gap:12px;padding:clamp(18px,2.5vw,28px) var(--hdr-pad-x) 12px;color:var(--hdr-fg)}.header__left{display:flex;align-items:center;gap:8px;min-width:0}.header__right{display:flex;align-items:center;gap:8px}.header__title{margin:0;font-size:clamp(1.25rem,2vw,1.5rem);font-weight:700;letter-spacing:-.02em;line-height:1.2;color:var(--hdr-fg);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.header__btn{display:none;inline-size:40px;block-size:40px;place-items:center;border-radius:var(--mcl-radius-sm, 8px);border:1px solid transparent;background:transparent;color:var(--hdr-muted);transition:background-color var(--mcl-transition, .18s ease),color var(--mcl-transition, .18s ease)}.header__btn:hover{background:color-mix(in oklab,var(--hdr-fg) 6%,transparent);color:var(--hdr-fg)}.header__btn:focus-visible{outline:2px solid var(--hdr-primary);outline-offset:2px}.header mat-icon{font-size:22px;inline-size:22px;block-size:22px;line-height:1;vertical-align:middle}@media(max-width:959.98px){.header{padding:14px var(--hdr-pad-x) 8px}.header__btn{display:grid}}\n"],
|
|
420
|
+
dependencies: [
|
|
421
|
+
{
|
|
422
|
+
kind: "directive",
|
|
423
|
+
type: RouterOutlet,
|
|
424
|
+
selector: "router-outlet",
|
|
425
|
+
inputs: ["name", "routerOutletData"],
|
|
426
|
+
outputs: [
|
|
427
|
+
"activate",
|
|
428
|
+
"deactivate",
|
|
429
|
+
"attach",
|
|
430
|
+
"detach"
|
|
431
|
+
],
|
|
432
|
+
exportAs: ["outlet"]
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
kind: "component",
|
|
436
|
+
type: MatIcon,
|
|
437
|
+
selector: "mat-icon",
|
|
438
|
+
inputs: [
|
|
439
|
+
"color",
|
|
440
|
+
"inline",
|
|
441
|
+
"svgIcon",
|
|
442
|
+
"fontSet",
|
|
443
|
+
"fontIcon"
|
|
444
|
+
],
|
|
445
|
+
exportAs: ["matIcon"]
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
kind: "pipe",
|
|
449
|
+
type: AsyncPipe,
|
|
450
|
+
name: "async"
|
|
451
|
+
}
|
|
452
|
+
],
|
|
453
|
+
changeDetection: i0.ChangeDetectionStrategy.Eager
|
|
454
|
+
});
|
|
455
|
+
};
|
|
456
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
457
|
+
minVersion: "12.0.0",
|
|
458
|
+
version: "22.3.2",
|
|
459
|
+
ngImport: i0,
|
|
460
|
+
type: HeaderComponent,
|
|
461
|
+
decorators: [{
|
|
462
|
+
type: Component,
|
|
463
|
+
args: [{
|
|
464
|
+
selector: "mcl-header",
|
|
465
|
+
imports: [
|
|
466
|
+
RouterOutlet,
|
|
467
|
+
AsyncPipe,
|
|
468
|
+
MatIcon
|
|
469
|
+
],
|
|
470
|
+
changeDetection: ChangeDetectionStrategy.Eager,
|
|
471
|
+
template: "<div class=\"header\">\n <div class=\"header__left\">\n <!-- botão do menu (mobile) -->\n <button class=\"header__btn\" type=\"button\" (click)=\"toggleMenu()\" aria-label=\"Abrir menu\">\n <mat-icon>menu</mat-icon>\n </button>\n\n <h1 class=\"header__title\">\n {{ title | async }}\n </h1>\n </div>\n\n <div class=\"header__right\">\n <router-outlet name=\"header-actions\"></router-outlet>\n </div>\n</div>\n",
|
|
472
|
+
styles: ["@charset \"UTF-8\";:host{--hdr-fg: var(--lib-color-on-surface, var(--mat-sys-on-surface));--hdr-muted: var(--lib-color-on-surface-variant, var(--mat-sys-on-surface-variant));--hdr-border: var(--lib-color-outline-variant, var(--mat-sys-outline-variant));--hdr-primary: var(--lib-color-primary, var(--mat-sys-primary));--hdr-pad-x: var(--mcl-page-pad-x, clamp(20px, 3.5vw, 32px));display:block}.header{width:100%;max-width:var(--base-maxw, 1600px);margin-inline:auto;display:grid;grid-template-columns:1fr auto;align-items:center;gap:12px;padding:clamp(18px,2.5vw,28px) var(--hdr-pad-x) 12px;color:var(--hdr-fg)}.header__left{display:flex;align-items:center;gap:8px;min-width:0}.header__right{display:flex;align-items:center;gap:8px}.header__title{margin:0;font-size:clamp(1.25rem,2vw,1.5rem);font-weight:700;letter-spacing:-.02em;line-height:1.2;color:var(--hdr-fg);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.header__btn{display:none;inline-size:40px;block-size:40px;place-items:center;border-radius:var(--mcl-radius-sm, 8px);border:1px solid transparent;background:transparent;color:var(--hdr-muted);transition:background-color var(--mcl-transition, .18s ease),color var(--mcl-transition, .18s ease)}.header__btn:hover{background:color-mix(in oklab,var(--hdr-fg) 6%,transparent);color:var(--hdr-fg)}.header__btn:focus-visible{outline:2px solid var(--hdr-primary);outline-offset:2px}.header mat-icon{font-size:22px;inline-size:22px;block-size:22px;line-height:1;vertical-align:middle}@media(max-width:959.98px){.header{padding:14px var(--hdr-pad-x) 8px}.header__btn{display:grid}}\n"]
|
|
473
|
+
}]
|
|
474
|
+
}],
|
|
475
|
+
ctorParameters: () => [
|
|
476
|
+
{ type: MenuService },
|
|
477
|
+
{ type: BaseService },
|
|
478
|
+
{ type: MobileService }
|
|
479
|
+
]
|
|
480
|
+
});
|
|
481
|
+
var FooterComponent = class FooterComponent {
|
|
482
|
+
activatedRoute;
|
|
483
|
+
constructor(activatedRoute) {
|
|
484
|
+
this.activatedRoute = activatedRoute;
|
|
485
|
+
}
|
|
486
|
+
ngOnInit() {}
|
|
487
|
+
get direitos() {
|
|
488
|
+
return dadosDaRota(this.activatedRoute.snapshot)["direitos"];
|
|
489
|
+
}
|
|
490
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
491
|
+
minVersion: "12.0.0",
|
|
492
|
+
version: "22.3.2",
|
|
493
|
+
ngImport: i0,
|
|
494
|
+
type: FooterComponent,
|
|
495
|
+
deps: [{ token: ActivatedRoute }],
|
|
496
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
497
|
+
});
|
|
498
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
499
|
+
minVersion: "14.0.0",
|
|
500
|
+
version: "22.3.2",
|
|
501
|
+
type: FooterComponent,
|
|
502
|
+
isStandalone: true,
|
|
503
|
+
selector: "mcl-footer",
|
|
504
|
+
ngImport: i0,
|
|
505
|
+
template: "{{direitos | translate}}\n",
|
|
506
|
+
styles: [":host{display:flex;align-items:center;justify-content:center;padding:14px clamp(20px,3.5vw,32px);border-top:1px solid color-mix(in oklab,var(--lib-color-outline-variant, var(--mat-sys-outline-variant)) 60%,transparent);color:var(--lib-color-on-surface-variant, var(--mat-sys-on-surface-variant));font-size:.78rem;text-align:center}:host:empty{display:none}\n"],
|
|
507
|
+
dependencies: [{
|
|
508
|
+
kind: "pipe",
|
|
509
|
+
type: TranslatePipe,
|
|
510
|
+
name: "translate"
|
|
511
|
+
}],
|
|
512
|
+
changeDetection: i0.ChangeDetectionStrategy.Eager
|
|
513
|
+
});
|
|
514
|
+
};
|
|
515
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
516
|
+
minVersion: "12.0.0",
|
|
517
|
+
version: "22.3.2",
|
|
518
|
+
ngImport: i0,
|
|
519
|
+
type: FooterComponent,
|
|
520
|
+
decorators: [{
|
|
521
|
+
type: Component,
|
|
522
|
+
args: [{
|
|
523
|
+
selector: "mcl-footer",
|
|
524
|
+
imports: [TranslatePipe],
|
|
525
|
+
changeDetection: ChangeDetectionStrategy.Eager,
|
|
526
|
+
template: "{{direitos | translate}}\n",
|
|
527
|
+
styles: [":host{display:flex;align-items:center;justify-content:center;padding:14px clamp(20px,3.5vw,32px);border-top:1px solid color-mix(in oklab,var(--lib-color-outline-variant, var(--mat-sys-outline-variant)) 60%,transparent);color:var(--lib-color-on-surface-variant, var(--mat-sys-on-surface-variant));font-size:.78rem;text-align:center}:host:empty{display:none}\n"]
|
|
528
|
+
}]
|
|
529
|
+
}],
|
|
530
|
+
ctorParameters: () => [{ type: ActivatedRoute }]
|
|
531
|
+
});
|
|
532
|
+
var BaseComponent = class BaseComponent {
|
|
533
|
+
mobileService;
|
|
534
|
+
menuService;
|
|
535
|
+
baseService;
|
|
536
|
+
activatedRoute = inject(ActivatedRoute);
|
|
537
|
+
modeSubscription;
|
|
538
|
+
tabsSubscription;
|
|
539
|
+
tabs = [];
|
|
540
|
+
mobile = false;
|
|
541
|
+
mode = "default";
|
|
542
|
+
sidenav;
|
|
543
|
+
mobieListener = (mobile) => this.mobile = mobile;
|
|
544
|
+
get hasTabs() {
|
|
545
|
+
return this.baseService.hasTabs;
|
|
546
|
+
}
|
|
547
|
+
constructor(mobileService, menuService, baseService) {
|
|
548
|
+
this.mobileService = mobileService;
|
|
549
|
+
this.menuService = menuService;
|
|
550
|
+
this.baseService = baseService;
|
|
551
|
+
}
|
|
552
|
+
ngOnDestroy() {
|
|
553
|
+
this.tabsSubscription?.unsubscribe();
|
|
554
|
+
this.modeSubscription?.unsubscribe();
|
|
555
|
+
this.menuService.unregister(this);
|
|
556
|
+
this.mobileService.removeListener(this.mobieListener);
|
|
557
|
+
}
|
|
558
|
+
ngAfterViewInit() {
|
|
559
|
+
this.tabsSubscription = this.baseService.tabs.subscribe((tabs) => this.tabs = tabs);
|
|
560
|
+
this.modeSubscription = this.baseService.mode.subscribe((mode) => this.mode = mode);
|
|
561
|
+
}
|
|
562
|
+
async ngOnInit() {
|
|
563
|
+
this.mobile = this.mobileService.mobile;
|
|
564
|
+
this.menuService.register(this);
|
|
565
|
+
this.mobileService.addListener(this.mobieListener);
|
|
566
|
+
}
|
|
567
|
+
toggle() {
|
|
568
|
+
this.sidenav.toggle();
|
|
569
|
+
}
|
|
570
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
571
|
+
minVersion: "12.0.0",
|
|
572
|
+
version: "22.3.2",
|
|
573
|
+
ngImport: i0,
|
|
574
|
+
type: BaseComponent,
|
|
575
|
+
deps: [
|
|
576
|
+
{ token: MobileService },
|
|
577
|
+
{ token: MenuService },
|
|
578
|
+
{ token: BaseService }
|
|
579
|
+
],
|
|
580
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
581
|
+
});
|
|
582
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
583
|
+
minVersion: "17.0.0",
|
|
584
|
+
version: "22.3.2",
|
|
585
|
+
type: BaseComponent,
|
|
586
|
+
isStandalone: true,
|
|
587
|
+
selector: "mcl-base",
|
|
588
|
+
viewQueries: [{
|
|
589
|
+
propertyName: "sidenav",
|
|
590
|
+
first: true,
|
|
591
|
+
predicate: ["sidenav"],
|
|
592
|
+
descendants: true
|
|
593
|
+
}],
|
|
594
|
+
ngImport: i0,
|
|
595
|
+
template: "<mat-drawer-container [ngClass]=\"{'dialog': mode === 'dialog'}\">\n @if (mode !== 'dialog') {\n <mat-drawer [mode]=\"mobile ? 'over' : 'side'\"\n [opened]=\"!mobile\" #sidenav>\n <mcl-menu></mcl-menu>\n </mat-drawer>\n }\n <mat-drawer-content>\n <div class=\"base__sheet\">\n @if (mode !== 'dialog') {\n <mcl-header></mcl-header>\n\n @if (hasTabs && tabs.length > 1) {\n <div class=\"toolbar toolbar--breadcrumb\">\n <nav mat-tab-nav-bar class=\"path-nav\" aria-label=\"Navegação\" [tabPanel]=\"tabPanel\">\n @for (tab of tabs; track tab.label) {\n <a\n mat-tab-link\n class=\"path-link\"\n [routerLink]=\"tab.route\"\n queryParamsHandling=\"preserve\"\n [active]=\"!tab.route\">\n {{ tab.label }}\n @if (tab.badge) {\n <span class=\"path-badge\">{{ tab.badge }}</span>\n }\n </a>\n }\n </nav>\n </div>\n }\n\n }\n\n <mat-tab-nav-panel #tabPanel class=\"content\">\n <router-outlet></router-outlet>\n </mat-tab-nav-panel>\n\n @if (mode !== 'dialog') {\n <mcl-footer></mcl-footer>\n }\n </div>\n </mat-drawer-content>\n</mat-drawer-container>\n",
|
|
596
|
+
styles: ["@charset \"UTF-8\";:host{--base-bg: var(--lib-color-surface, var(--mat-sys-surface));--base-fg: var(--lib-color-on-surface, var(--mat-sys-on-surface));--base-border: var(--lib-color-outline-variant, var(--mat-sys-outline-variant));--base-muted: var(--lib-color-on-surface-variant, var(--mat-sys-on-surface-variant));--base-primary: var(--lib-color-primary, var(--mat-sys-primary));--base-canvas: var(--lib-color-surface-container-low, var(--mat-sys-surface-container-low));--base-drawer-width: 16.5rem;--base-drawer-width-collapsed: 4.5rem;--base-radius: var(--mcl-radius-lg, 16px);--base-gap: 12px;--base-maxw: 1600px;--mcl-page-pad-x: clamp(20px, 3.5vw, 32px);--base-pad-x: var(--mcl-page-pad-x)}:host ::ng-deep .mat-drawer-container{height:100dvh;background:var(--base-canvas);color:var(--base-fg)}:host ::ng-deep .mat-drawer{width:var(--base-drawer-width);border-right:0;background:var(--base-canvas)}:host ::ng-deep .mat-drawer.mat-drawer-over{background:var(--base-bg);box-shadow:var(--mcl-shadow-3, 0 12px 32px rgba(0, 0, 0, .14))}:host(.is-collapsed) ::ng-deep .mat-drawer{width:var(--base-drawer-width-collapsed)}:host ::ng-deep .mat-drawer-content{display:block;min-width:0;height:100%;overflow:auto;padding:var(--base-gap);background:var(--base-canvas)}.base__sheet{display:flex;flex-direction:column;min-height:calc(100dvh - 2 * var(--base-gap));background:var(--base-bg);border:1px solid var(--base-border);border-radius:var(--base-radius);box-shadow:var(--mcl-shadow-1, 0 1px 3px rgba(0, 0, 0, .05));overflow:clip}:host ::ng-deep .mat-drawer-container.dialog .mat-drawer-content{padding:0}:host ::ng-deep .mat-drawer-container.dialog .base__sheet{border:0;border-radius:0;box-shadow:none;min-height:100dvh}.toolbar--breadcrumb{width:100%;max-width:var(--base-maxw);margin-inline:auto;padding:4px var(--base-pad-x) 0}.path-badge{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;margin-left:6px;padding:0 5px;border-radius:var(--mcl-radius-full, 999px);font-size:.6875rem;font-weight:600;background:color-mix(in oklab,var(--base-primary) 14%,var(--base-bg));color:var(--base-primary)}:host ::ng-deep .path-nav{--mat-tab-divider-height: 0;--mat-tab-divider-color: transparent;display:inline-flex;width:fit-content;max-width:100%;padding:4px;border-radius:var(--mcl-radius-full, 999px);background:color-mix(in oklab,var(--base-fg) 5%,var(--base-bg))}:host ::ng-deep .path-nav .mat-mdc-tab-links{gap:2px}:host ::ng-deep .path-nav.mat-mdc-tab-nav-bar-stretch-tabs .mat-mdc-tab-link,:host ::ng-deep .path-nav .mat-mdc-tab-link{flex-grow:unset;min-width:0;height:32px;padding:0 16px;border-radius:var(--mcl-radius-full, 999px);color:var(--base-muted);transition:color var(--mcl-transition, .18s ease)}:host ::ng-deep .path-nav.mat-mdc-tab-nav-bar-stretch-tabs .mat-mdc-tab-link:hover,:host ::ng-deep .path-nav .mat-mdc-tab-link:hover{color:var(--base-fg)}:host ::ng-deep .path-nav.mat-mdc-tab-nav-bar-stretch-tabs .mat-mdc-tab-link.mdc-tab--active,:host ::ng-deep .path-nav .mat-mdc-tab-link.mdc-tab--active{color:var(--base-fg)}:host ::ng-deep .path-nav .mdc-tab__content{position:relative;z-index:2}:host ::ng-deep .path-nav .mdc-tab-indicator{z-index:0}:host ::ng-deep .path-nav .mdc-tab__text-label{font-size:.8125rem;font-weight:500;letter-spacing:.01em;color:inherit}:host ::ng-deep .path-nav .mat-mdc-tab-header{border-bottom:0}:host ::ng-deep .path-nav .mdc-tab-indicator .mdc-tab-indicator__content--underline{border:none;align-self:stretch;width:100%;height:100%;border-radius:var(--mcl-radius-full, 999px);background:var(--base-bg);box-shadow:var(--mcl-shadow-1, 0 1px 3px rgba(0, 0, 0, .06))}:host ::ng-deep .path-nav .mdc-tab-indicator--active .mdc-tab-indicator__content{transition-duration:.28s;transition-timing-function:cubic-bezier(.4,0,.2,1)}:host ::ng-deep .path-nav .mat-mdc-tab-header-pagination{display:none}.content{flex:1 1 auto;min-width:0;width:100%;max-width:var(--base-maxw);margin-inline:auto;padding:20px var(--base-pad-x) var(--base-pad-x);display:grid;grid-template-columns:100%;align-content:start;gap:16px}:host(.constrain){--base-maxw: 1120px}:host(.content-wide){--base-maxw: 100%}:host(.has-sticky-footer) .content{padding-bottom:calc(var(--base-pad-x) + 56px)}:where(.content a,.content button,.content [role=button],.content input,.content select,.content textarea):focus-visible{outline:2px solid var(--base-primary);outline-offset:2px;border-radius:var(--mcl-radius-sm, 8px)}@media(min-width:960px)and (max-width:1199.98px){:host{--base-drawer-width: 15rem;--mcl-page-pad-x: 20px}}@media(min-width:1800px){:host{--base-gap: 16px;--mcl-page-pad-x: 40px}}@media(max-width:959.98px){:host{--base-gap: 8px;--mcl-page-pad-x: clamp(12px, 4vw, 20px)}.content{gap:12px;padding:16px var(--base-pad-x) clamp(16px,4vw,24px)}}\n"],
|
|
597
|
+
dependencies: [
|
|
598
|
+
{
|
|
599
|
+
kind: "component",
|
|
600
|
+
type: HeaderComponent,
|
|
601
|
+
selector: "mcl-header"
|
|
602
|
+
},
|
|
603
|
+
{
|
|
604
|
+
kind: "component",
|
|
605
|
+
type: MenuComponent,
|
|
606
|
+
selector: "mcl-menu"
|
|
607
|
+
},
|
|
608
|
+
{
|
|
609
|
+
kind: "directive",
|
|
610
|
+
type: NgClass,
|
|
611
|
+
selector: "[ngClass]",
|
|
612
|
+
inputs: ["class", "ngClass"]
|
|
613
|
+
},
|
|
614
|
+
{
|
|
615
|
+
kind: "component",
|
|
616
|
+
type: MatTabNav,
|
|
617
|
+
selector: "[mat-tab-nav-bar]",
|
|
618
|
+
inputs: [
|
|
619
|
+
"fitInkBarToContent",
|
|
620
|
+
"mat-stretch-tabs",
|
|
621
|
+
"animationDuration",
|
|
622
|
+
"backgroundColor",
|
|
623
|
+
"disableRipple",
|
|
624
|
+
"color",
|
|
625
|
+
"tabPanel"
|
|
626
|
+
],
|
|
627
|
+
exportAs: ["matTabNavBar", "matTabNav"]
|
|
628
|
+
},
|
|
629
|
+
{
|
|
630
|
+
kind: "component",
|
|
631
|
+
type: MatTabNavPanel,
|
|
632
|
+
selector: "mat-tab-nav-panel",
|
|
633
|
+
inputs: ["id"],
|
|
634
|
+
exportAs: ["matTabNavPanel"]
|
|
635
|
+
},
|
|
636
|
+
{
|
|
637
|
+
kind: "component",
|
|
638
|
+
type: MatTabLink,
|
|
639
|
+
selector: "[mat-tab-link], [matTabLink]",
|
|
640
|
+
inputs: [
|
|
641
|
+
"active",
|
|
642
|
+
"disabled",
|
|
643
|
+
"disableRipple",
|
|
644
|
+
"tabIndex",
|
|
645
|
+
"id"
|
|
646
|
+
],
|
|
647
|
+
exportAs: ["matTabLink"]
|
|
648
|
+
},
|
|
649
|
+
{
|
|
650
|
+
kind: "directive",
|
|
651
|
+
type: RouterLink,
|
|
652
|
+
selector: "[routerLink]",
|
|
653
|
+
inputs: [
|
|
654
|
+
"target",
|
|
655
|
+
"queryParams",
|
|
656
|
+
"fragment",
|
|
657
|
+
"queryParamsHandling",
|
|
658
|
+
"state",
|
|
659
|
+
"info",
|
|
660
|
+
"relativeTo",
|
|
661
|
+
"preserveFragment",
|
|
662
|
+
"skipLocationChange",
|
|
663
|
+
"replaceUrl",
|
|
664
|
+
"browserUrl",
|
|
665
|
+
"scroll",
|
|
666
|
+
"routerLink"
|
|
667
|
+
]
|
|
668
|
+
},
|
|
669
|
+
{
|
|
670
|
+
kind: "directive",
|
|
671
|
+
type: RouterOutlet,
|
|
672
|
+
selector: "router-outlet",
|
|
673
|
+
inputs: ["name", "routerOutletData"],
|
|
674
|
+
outputs: [
|
|
675
|
+
"activate",
|
|
676
|
+
"deactivate",
|
|
677
|
+
"attach",
|
|
678
|
+
"detach"
|
|
679
|
+
],
|
|
680
|
+
exportAs: ["outlet"]
|
|
681
|
+
},
|
|
682
|
+
{
|
|
683
|
+
kind: "component",
|
|
684
|
+
type: FooterComponent,
|
|
685
|
+
selector: "mcl-footer"
|
|
686
|
+
},
|
|
687
|
+
{
|
|
688
|
+
kind: "component",
|
|
689
|
+
type: MatDrawerContainer,
|
|
690
|
+
selector: "mat-drawer-container",
|
|
691
|
+
inputs: ["autosize", "hasBackdrop"],
|
|
692
|
+
outputs: ["backdropClick"],
|
|
693
|
+
exportAs: ["matDrawerContainer"]
|
|
694
|
+
},
|
|
695
|
+
{
|
|
696
|
+
kind: "component",
|
|
697
|
+
type: MatDrawerContent,
|
|
698
|
+
selector: "mat-drawer-content"
|
|
699
|
+
},
|
|
700
|
+
{
|
|
701
|
+
kind: "component",
|
|
702
|
+
type: MatDrawer,
|
|
703
|
+
selector: "mat-drawer",
|
|
704
|
+
inputs: [
|
|
705
|
+
"position",
|
|
706
|
+
"mode",
|
|
707
|
+
"disableClose",
|
|
708
|
+
"autoFocus",
|
|
709
|
+
"opened"
|
|
710
|
+
],
|
|
711
|
+
outputs: [
|
|
712
|
+
"openedChange",
|
|
713
|
+
"opened",
|
|
714
|
+
"openedStart",
|
|
715
|
+
"closed",
|
|
716
|
+
"closedStart",
|
|
717
|
+
"positionChanged"
|
|
718
|
+
],
|
|
719
|
+
exportAs: ["matDrawer"]
|
|
720
|
+
}
|
|
721
|
+
],
|
|
722
|
+
changeDetection: i0.ChangeDetectionStrategy.Eager
|
|
723
|
+
});
|
|
724
|
+
};
|
|
725
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
726
|
+
minVersion: "12.0.0",
|
|
727
|
+
version: "22.3.2",
|
|
728
|
+
ngImport: i0,
|
|
729
|
+
type: BaseComponent,
|
|
730
|
+
decorators: [{
|
|
731
|
+
type: Component,
|
|
732
|
+
args: [{
|
|
733
|
+
selector: "mcl-base",
|
|
734
|
+
imports: [
|
|
735
|
+
HeaderComponent,
|
|
736
|
+
MenuComponent,
|
|
737
|
+
NgClass,
|
|
738
|
+
MatTabNav,
|
|
739
|
+
MatTabNavPanel,
|
|
740
|
+
MatTabLink,
|
|
741
|
+
RouterLink,
|
|
742
|
+
RouterOutlet,
|
|
743
|
+
FooterComponent,
|
|
744
|
+
MatDrawerContainer,
|
|
745
|
+
MatDrawerContent,
|
|
746
|
+
MatDrawer
|
|
747
|
+
],
|
|
748
|
+
changeDetection: ChangeDetectionStrategy.Eager,
|
|
749
|
+
template: "<mat-drawer-container [ngClass]=\"{'dialog': mode === 'dialog'}\">\n @if (mode !== 'dialog') {\n <mat-drawer [mode]=\"mobile ? 'over' : 'side'\"\n [opened]=\"!mobile\" #sidenav>\n <mcl-menu></mcl-menu>\n </mat-drawer>\n }\n <mat-drawer-content>\n <div class=\"base__sheet\">\n @if (mode !== 'dialog') {\n <mcl-header></mcl-header>\n\n @if (hasTabs && tabs.length > 1) {\n <div class=\"toolbar toolbar--breadcrumb\">\n <nav mat-tab-nav-bar class=\"path-nav\" aria-label=\"Navegação\" [tabPanel]=\"tabPanel\">\n @for (tab of tabs; track tab.label) {\n <a\n mat-tab-link\n class=\"path-link\"\n [routerLink]=\"tab.route\"\n queryParamsHandling=\"preserve\"\n [active]=\"!tab.route\">\n {{ tab.label }}\n @if (tab.badge) {\n <span class=\"path-badge\">{{ tab.badge }}</span>\n }\n </a>\n }\n </nav>\n </div>\n }\n\n }\n\n <mat-tab-nav-panel #tabPanel class=\"content\">\n <router-outlet></router-outlet>\n </mat-tab-nav-panel>\n\n @if (mode !== 'dialog') {\n <mcl-footer></mcl-footer>\n }\n </div>\n </mat-drawer-content>\n</mat-drawer-container>\n",
|
|
750
|
+
styles: ["@charset \"UTF-8\";:host{--base-bg: var(--lib-color-surface, var(--mat-sys-surface));--base-fg: var(--lib-color-on-surface, var(--mat-sys-on-surface));--base-border: var(--lib-color-outline-variant, var(--mat-sys-outline-variant));--base-muted: var(--lib-color-on-surface-variant, var(--mat-sys-on-surface-variant));--base-primary: var(--lib-color-primary, var(--mat-sys-primary));--base-canvas: var(--lib-color-surface-container-low, var(--mat-sys-surface-container-low));--base-drawer-width: 16.5rem;--base-drawer-width-collapsed: 4.5rem;--base-radius: var(--mcl-radius-lg, 16px);--base-gap: 12px;--base-maxw: 1600px;--mcl-page-pad-x: clamp(20px, 3.5vw, 32px);--base-pad-x: var(--mcl-page-pad-x)}:host ::ng-deep .mat-drawer-container{height:100dvh;background:var(--base-canvas);color:var(--base-fg)}:host ::ng-deep .mat-drawer{width:var(--base-drawer-width);border-right:0;background:var(--base-canvas)}:host ::ng-deep .mat-drawer.mat-drawer-over{background:var(--base-bg);box-shadow:var(--mcl-shadow-3, 0 12px 32px rgba(0, 0, 0, .14))}:host(.is-collapsed) ::ng-deep .mat-drawer{width:var(--base-drawer-width-collapsed)}:host ::ng-deep .mat-drawer-content{display:block;min-width:0;height:100%;overflow:auto;padding:var(--base-gap);background:var(--base-canvas)}.base__sheet{display:flex;flex-direction:column;min-height:calc(100dvh - 2 * var(--base-gap));background:var(--base-bg);border:1px solid var(--base-border);border-radius:var(--base-radius);box-shadow:var(--mcl-shadow-1, 0 1px 3px rgba(0, 0, 0, .05));overflow:clip}:host ::ng-deep .mat-drawer-container.dialog .mat-drawer-content{padding:0}:host ::ng-deep .mat-drawer-container.dialog .base__sheet{border:0;border-radius:0;box-shadow:none;min-height:100dvh}.toolbar--breadcrumb{width:100%;max-width:var(--base-maxw);margin-inline:auto;padding:4px var(--base-pad-x) 0}.path-badge{display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;margin-left:6px;padding:0 5px;border-radius:var(--mcl-radius-full, 999px);font-size:.6875rem;font-weight:600;background:color-mix(in oklab,var(--base-primary) 14%,var(--base-bg));color:var(--base-primary)}:host ::ng-deep .path-nav{--mat-tab-divider-height: 0;--mat-tab-divider-color: transparent;display:inline-flex;width:fit-content;max-width:100%;padding:4px;border-radius:var(--mcl-radius-full, 999px);background:color-mix(in oklab,var(--base-fg) 5%,var(--base-bg))}:host ::ng-deep .path-nav .mat-mdc-tab-links{gap:2px}:host ::ng-deep .path-nav.mat-mdc-tab-nav-bar-stretch-tabs .mat-mdc-tab-link,:host ::ng-deep .path-nav .mat-mdc-tab-link{flex-grow:unset;min-width:0;height:32px;padding:0 16px;border-radius:var(--mcl-radius-full, 999px);color:var(--base-muted);transition:color var(--mcl-transition, .18s ease)}:host ::ng-deep .path-nav.mat-mdc-tab-nav-bar-stretch-tabs .mat-mdc-tab-link:hover,:host ::ng-deep .path-nav .mat-mdc-tab-link:hover{color:var(--base-fg)}:host ::ng-deep .path-nav.mat-mdc-tab-nav-bar-stretch-tabs .mat-mdc-tab-link.mdc-tab--active,:host ::ng-deep .path-nav .mat-mdc-tab-link.mdc-tab--active{color:var(--base-fg)}:host ::ng-deep .path-nav .mdc-tab__content{position:relative;z-index:2}:host ::ng-deep .path-nav .mdc-tab-indicator{z-index:0}:host ::ng-deep .path-nav .mdc-tab__text-label{font-size:.8125rem;font-weight:500;letter-spacing:.01em;color:inherit}:host ::ng-deep .path-nav .mat-mdc-tab-header{border-bottom:0}:host ::ng-deep .path-nav .mdc-tab-indicator .mdc-tab-indicator__content--underline{border:none;align-self:stretch;width:100%;height:100%;border-radius:var(--mcl-radius-full, 999px);background:var(--base-bg);box-shadow:var(--mcl-shadow-1, 0 1px 3px rgba(0, 0, 0, .06))}:host ::ng-deep .path-nav .mdc-tab-indicator--active .mdc-tab-indicator__content{transition-duration:.28s;transition-timing-function:cubic-bezier(.4,0,.2,1)}:host ::ng-deep .path-nav .mat-mdc-tab-header-pagination{display:none}.content{flex:1 1 auto;min-width:0;width:100%;max-width:var(--base-maxw);margin-inline:auto;padding:20px var(--base-pad-x) var(--base-pad-x);display:grid;grid-template-columns:100%;align-content:start;gap:16px}:host(.constrain){--base-maxw: 1120px}:host(.content-wide){--base-maxw: 100%}:host(.has-sticky-footer) .content{padding-bottom:calc(var(--base-pad-x) + 56px)}:where(.content a,.content button,.content [role=button],.content input,.content select,.content textarea):focus-visible{outline:2px solid var(--base-primary);outline-offset:2px;border-radius:var(--mcl-radius-sm, 8px)}@media(min-width:960px)and (max-width:1199.98px){:host{--base-drawer-width: 15rem;--mcl-page-pad-x: 20px}}@media(min-width:1800px){:host{--base-gap: 16px;--mcl-page-pad-x: 40px}}@media(max-width:959.98px){:host{--base-gap: 8px;--mcl-page-pad-x: clamp(12px, 4vw, 20px)}.content{gap:12px;padding:16px var(--base-pad-x) clamp(16px,4vw,24px)}}\n"]
|
|
751
|
+
}]
|
|
752
|
+
}],
|
|
753
|
+
ctorParameters: () => [
|
|
754
|
+
{ type: MobileService },
|
|
755
|
+
{ type: MenuService },
|
|
756
|
+
{ type: BaseService }
|
|
757
|
+
],
|
|
758
|
+
propDecorators: { sidenav: [{
|
|
759
|
+
type: ViewChild,
|
|
760
|
+
args: ["sidenav"]
|
|
761
|
+
}] }
|
|
762
|
+
});
|
|
316
763
|
const DEFAULTS = {
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
764
|
+
brand: "Admin Portal",
|
|
765
|
+
logoUrl: "",
|
|
766
|
+
headline: "Bem-vindo de volta!",
|
|
767
|
+
subhead: "Acesse sua conta para continuar",
|
|
768
|
+
cardTitle: "Acesso",
|
|
769
|
+
cardSubtitle: "Entre com suas credenciais",
|
|
770
|
+
imageUrl: "",
|
|
771
|
+
videoUrl: "",
|
|
772
|
+
hideMedia: false,
|
|
773
|
+
helpLink: ""
|
|
327
774
|
};
|
|
328
|
-
class AcessoComponent {
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
}] })
|
|
351
|
-
|
|
775
|
+
var AcessoComponent = class AcessoComponent {
|
|
776
|
+
route = inject(ActivatedRoute);
|
|
777
|
+
vm = toSignal(this.route.data.pipe(map(() => ({
|
|
778
|
+
...DEFAULTS,
|
|
779
|
+
...dadosDaRota(this.route.snapshot)
|
|
780
|
+
})), startWith(DEFAULTS)), { initialValue: DEFAULTS });
|
|
781
|
+
year = computed(() => (/* @__PURE__ */ new Date()).getFullYear(), ...ngDevMode ? [{ debugName: "year" }] : /* istanbul ignore next */ []);
|
|
782
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
783
|
+
minVersion: "12.0.0",
|
|
784
|
+
version: "22.3.2",
|
|
785
|
+
ngImport: i0,
|
|
786
|
+
type: AcessoComponent,
|
|
787
|
+
deps: [],
|
|
788
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
789
|
+
});
|
|
790
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({
|
|
791
|
+
minVersion: "17.0.0",
|
|
792
|
+
version: "22.3.2",
|
|
793
|
+
type: AcessoComponent,
|
|
794
|
+
isStandalone: true,
|
|
795
|
+
selector: "mcl-acesso",
|
|
796
|
+
ngImport: i0,
|
|
797
|
+
template: "<div class=\"page\" role=\"main\" aria-label=\"Acesso\">\n <div class=\"layout\" [class.no-media]=\"vm().hideMedia\">\n @if (!vm().hideMedia) {\n <aside class=\"media\" aria-hidden=\"true\">\n <div class=\"media-surface\">\n @if (vm().videoUrl) {\n <video\n class=\"media-video\"\n [attr.poster]=\"vm().imageUrl || null\"\n [src]=\"vm().videoUrl\"\n autoplay muted loop playsinline\n ></video>\n }\n @if (!vm().videoUrl && vm().imageUrl) {\n <img\n class=\"media-image\"\n [src]=\"vm().imageUrl\"\n alt=\"\"\n loading=\"eager\" decoding=\"async\"\n />\n }\n <div class=\"media-overlay\">\n @if (vm().logoUrl) {\n <div class=\"brand-section\">\n <img\n class=\"brand-logo\"\n [src]=\"vm().logoUrl\"\n [alt]=\"vm().brand + ' logo'\"\n loading=\"eager\"\n decoding=\"async\"\n />\n </div>\n }\n <h1 class=\"headline\">{{ vm().headline }}</h1>\n <p class=\"subhead\">{{ vm().subhead }}</p>\n </div>\n </div>\n </aside>\n }\n\n <section class=\"auth\">\n <div class=\"auth-card\" role=\"region\" aria-label=\"Formulário de acesso\">\n <div class=\"card-header\">\n <div class=\"avatar\">\n <mat-icon>lock</mat-icon>\n </div>\n <div class=\"titles\">\n <h2 class=\"title\">{{ vm().cardTitle }}</h2>\n <p class=\"subtitle\">{{ vm().cardSubtitle }}</p>\n </div>\n </div>\n\n <router-outlet></router-outlet>\n\n </div>\n\n <footer class=\"footnote\">\n <span>© {{ year() }} — Todos os direitos reservados.</span>\n </footer>\n </section>\n </div>\n</div>\n",
|
|
798
|
+
styles: ["@charset \"UTF-8\";:host{display:block;height:100dvh;width:100%;margin:0;padding:0}:host{--acs-surface: var(--lib-color-surface, var(--mat-sys-surface, #ffffff));--acs-fg: var(--lib-color-on-surface, var(--mat-sys-on-surface, #1c1b1f));--acs-muted: var(--lib-color-on-surface-variant, var(--mat-sys-on-surface-variant, #757575));--acs-border: var(--lib-color-outline-variant, var(--mat-sys-outline-variant, #e0e0e0));--acs-primary: var(--lib-color-primary, var(--mat-sys-primary, #357ea6));--acs-on-primary: var(--lib-color-on-primary, var(--mat-sys-on-primary, #ffffff));--acs-surface-low: var(--lib-color-surface-container-low, var(--mat-sys-surface-container-low, #fafafa))}.page{position:relative;display:grid;grid-template-rows:1fr;height:100%;width:100%;color:var(--acs-fg);background:var(--acs-surface-low)}.layout{display:grid;grid-template-columns:1.05fr .95fr;height:100%;width:100%}.layout.no-media{grid-template-columns:1fr}.media{position:relative;overflow:hidden;height:100%;background:linear-gradient(160deg,color-mix(in oklab,var(--acs-primary) 85%,#000000),color-mix(in oklab,var(--acs-primary) 55%,#000000) 55%,color-mix(in oklab,var(--acs-primary) 35%,#000000))}.media .media-surface{position:relative;height:100%;width:100%;display:grid;align-content:end}.media .media-surface .media-video,.media .media-surface .media-image{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.media .media-surface:after{content:\"\";position:absolute;inset:0;background:linear-gradient(180deg,#0000 30%,#0000008c);pointer-events:none}.media .media-surface .media-overlay{position:relative;z-index:1;display:grid;gap:12px;padding:clamp(24px,6vw,56px);max-width:720px;color:#fff}.media .media-surface .media-overlay .brand-section .brand-logo{width:clamp(120px,14vw,200px);height:auto;max-height:120px;object-fit:contain;object-position:left center}.media .media-surface .media-overlay .headline{margin:0;color:#fff;font-size:clamp(28px,3.6vw,44px);line-height:1.1;font-weight:700;letter-spacing:-.02em}.media .media-surface .media-overlay .subhead{margin:0;color:#ffffffd9;font-size:clamp(14px,1.4vw,17px);line-height:1.5;max-width:52ch}.auth{display:grid;align-content:center;justify-items:center;height:100%;width:100%;padding:clamp(20px,4vw,40px);overflow-y:auto}.auth .auth-card{position:relative;width:min(440px,100%);padding:clamp(24px,4vw,36px);display:grid;gap:20px;border-radius:var(--mcl-radius-lg, 16px);background:var(--acs-surface);border:1px solid var(--acs-border);box-shadow:var(--mcl-shadow-2, 0 4px 12px rgba(0, 0, 0, .08))}.auth .auth-card .card-header{display:grid;gap:4px}.auth .auth-card .card-header .avatar{width:44px;height:44px;margin-bottom:8px;border-radius:var(--mcl-radius-md, 12px);display:grid;place-items:center;color:var(--acs-primary);background:color-mix(in oklab,var(--acs-primary) 12%,var(--acs-surface))}.auth .auth-card .card-header .titles .title{margin:0;font-weight:700;letter-spacing:-.015em;font-size:clamp(20px,2.2vw,26px);color:var(--acs-fg)}.auth .auth-card .card-header .titles .subtitle{margin:4px 0 0;color:var(--acs-muted);font-size:.9375rem}.auth .footnote{margin-top:16px;font-size:12px;color:var(--acs-muted)}@media(max-width:1024px){.layout{grid-template-columns:1fr;grid-template-rows:auto 1fr}.media{min-height:220px}.media .media-surface .media-overlay{padding:clamp(20px,4vw,32px)}.media .media-surface .media-overlay .headline{font-size:clamp(22px,5vw,30px)}.media .media-surface .media-overlay .brand-section .brand-logo{max-height:64px}}@media(prefers-reduced-motion:reduce){.media .media-surface .media-video{display:none}}\n"],
|
|
799
|
+
dependencies: [
|
|
800
|
+
{
|
|
801
|
+
kind: "ngmodule",
|
|
802
|
+
type: RouterModule
|
|
803
|
+
},
|
|
804
|
+
{
|
|
805
|
+
kind: "directive",
|
|
806
|
+
type: i1.RouterOutlet,
|
|
807
|
+
selector: "router-outlet",
|
|
808
|
+
inputs: ["name", "routerOutletData"],
|
|
809
|
+
outputs: [
|
|
810
|
+
"activate",
|
|
811
|
+
"deactivate",
|
|
812
|
+
"attach",
|
|
813
|
+
"detach"
|
|
814
|
+
],
|
|
815
|
+
exportAs: ["outlet"]
|
|
816
|
+
},
|
|
817
|
+
{
|
|
818
|
+
kind: "ngmodule",
|
|
819
|
+
type: MatButtonModule
|
|
820
|
+
},
|
|
821
|
+
{
|
|
822
|
+
kind: "ngmodule",
|
|
823
|
+
type: MatIconModule
|
|
824
|
+
},
|
|
825
|
+
{
|
|
826
|
+
kind: "component",
|
|
827
|
+
type: i2.MatIcon,
|
|
828
|
+
selector: "mat-icon",
|
|
829
|
+
inputs: [
|
|
830
|
+
"color",
|
|
831
|
+
"inline",
|
|
832
|
+
"svgIcon",
|
|
833
|
+
"fontSet",
|
|
834
|
+
"fontIcon"
|
|
835
|
+
],
|
|
836
|
+
exportAs: ["matIcon"]
|
|
837
|
+
},
|
|
838
|
+
{
|
|
839
|
+
kind: "ngmodule",
|
|
840
|
+
type: MatDividerModule
|
|
841
|
+
},
|
|
842
|
+
{
|
|
843
|
+
kind: "ngmodule",
|
|
844
|
+
type: MatProgressSpinnerModule
|
|
845
|
+
}
|
|
846
|
+
],
|
|
847
|
+
changeDetection: i0.ChangeDetectionStrategy.Eager
|
|
848
|
+
});
|
|
849
|
+
};
|
|
850
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
851
|
+
minVersion: "12.0.0",
|
|
852
|
+
version: "22.3.2",
|
|
853
|
+
ngImport: i0,
|
|
854
|
+
type: AcessoComponent,
|
|
855
|
+
decorators: [{
|
|
856
|
+
type: Component,
|
|
857
|
+
args: [{
|
|
858
|
+
selector: "mcl-acesso",
|
|
859
|
+
imports: [
|
|
860
|
+
RouterModule,
|
|
861
|
+
MatButtonModule,
|
|
862
|
+
MatIconModule,
|
|
863
|
+
MatDividerModule,
|
|
864
|
+
MatProgressSpinnerModule
|
|
865
|
+
],
|
|
866
|
+
changeDetection: ChangeDetectionStrategy.Eager,
|
|
867
|
+
template: "<div class=\"page\" role=\"main\" aria-label=\"Acesso\">\n <div class=\"layout\" [class.no-media]=\"vm().hideMedia\">\n @if (!vm().hideMedia) {\n <aside class=\"media\" aria-hidden=\"true\">\n <div class=\"media-surface\">\n @if (vm().videoUrl) {\n <video\n class=\"media-video\"\n [attr.poster]=\"vm().imageUrl || null\"\n [src]=\"vm().videoUrl\"\n autoplay muted loop playsinline\n ></video>\n }\n @if (!vm().videoUrl && vm().imageUrl) {\n <img\n class=\"media-image\"\n [src]=\"vm().imageUrl\"\n alt=\"\"\n loading=\"eager\" decoding=\"async\"\n />\n }\n <div class=\"media-overlay\">\n @if (vm().logoUrl) {\n <div class=\"brand-section\">\n <img\n class=\"brand-logo\"\n [src]=\"vm().logoUrl\"\n [alt]=\"vm().brand + ' logo'\"\n loading=\"eager\"\n decoding=\"async\"\n />\n </div>\n }\n <h1 class=\"headline\">{{ vm().headline }}</h1>\n <p class=\"subhead\">{{ vm().subhead }}</p>\n </div>\n </div>\n </aside>\n }\n\n <section class=\"auth\">\n <div class=\"auth-card\" role=\"region\" aria-label=\"Formulário de acesso\">\n <div class=\"card-header\">\n <div class=\"avatar\">\n <mat-icon>lock</mat-icon>\n </div>\n <div class=\"titles\">\n <h2 class=\"title\">{{ vm().cardTitle }}</h2>\n <p class=\"subtitle\">{{ vm().cardSubtitle }}</p>\n </div>\n </div>\n\n <router-outlet></router-outlet>\n\n </div>\n\n <footer class=\"footnote\">\n <span>© {{ year() }} — Todos os direitos reservados.</span>\n </footer>\n </section>\n </div>\n</div>\n",
|
|
868
|
+
styles: ["@charset \"UTF-8\";:host{display:block;height:100dvh;width:100%;margin:0;padding:0}:host{--acs-surface: var(--lib-color-surface, var(--mat-sys-surface, #ffffff));--acs-fg: var(--lib-color-on-surface, var(--mat-sys-on-surface, #1c1b1f));--acs-muted: var(--lib-color-on-surface-variant, var(--mat-sys-on-surface-variant, #757575));--acs-border: var(--lib-color-outline-variant, var(--mat-sys-outline-variant, #e0e0e0));--acs-primary: var(--lib-color-primary, var(--mat-sys-primary, #357ea6));--acs-on-primary: var(--lib-color-on-primary, var(--mat-sys-on-primary, #ffffff));--acs-surface-low: var(--lib-color-surface-container-low, var(--mat-sys-surface-container-low, #fafafa))}.page{position:relative;display:grid;grid-template-rows:1fr;height:100%;width:100%;color:var(--acs-fg);background:var(--acs-surface-low)}.layout{display:grid;grid-template-columns:1.05fr .95fr;height:100%;width:100%}.layout.no-media{grid-template-columns:1fr}.media{position:relative;overflow:hidden;height:100%;background:linear-gradient(160deg,color-mix(in oklab,var(--acs-primary) 85%,#000000),color-mix(in oklab,var(--acs-primary) 55%,#000000) 55%,color-mix(in oklab,var(--acs-primary) 35%,#000000))}.media .media-surface{position:relative;height:100%;width:100%;display:grid;align-content:end}.media .media-surface .media-video,.media .media-surface .media-image{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}.media .media-surface:after{content:\"\";position:absolute;inset:0;background:linear-gradient(180deg,#0000 30%,#0000008c);pointer-events:none}.media .media-surface .media-overlay{position:relative;z-index:1;display:grid;gap:12px;padding:clamp(24px,6vw,56px);max-width:720px;color:#fff}.media .media-surface .media-overlay .brand-section .brand-logo{width:clamp(120px,14vw,200px);height:auto;max-height:120px;object-fit:contain;object-position:left center}.media .media-surface .media-overlay .headline{margin:0;color:#fff;font-size:clamp(28px,3.6vw,44px);line-height:1.1;font-weight:700;letter-spacing:-.02em}.media .media-surface .media-overlay .subhead{margin:0;color:#ffffffd9;font-size:clamp(14px,1.4vw,17px);line-height:1.5;max-width:52ch}.auth{display:grid;align-content:center;justify-items:center;height:100%;width:100%;padding:clamp(20px,4vw,40px);overflow-y:auto}.auth .auth-card{position:relative;width:min(440px,100%);padding:clamp(24px,4vw,36px);display:grid;gap:20px;border-radius:var(--mcl-radius-lg, 16px);background:var(--acs-surface);border:1px solid var(--acs-border);box-shadow:var(--mcl-shadow-2, 0 4px 12px rgba(0, 0, 0, .08))}.auth .auth-card .card-header{display:grid;gap:4px}.auth .auth-card .card-header .avatar{width:44px;height:44px;margin-bottom:8px;border-radius:var(--mcl-radius-md, 12px);display:grid;place-items:center;color:var(--acs-primary);background:color-mix(in oklab,var(--acs-primary) 12%,var(--acs-surface))}.auth .auth-card .card-header .titles .title{margin:0;font-weight:700;letter-spacing:-.015em;font-size:clamp(20px,2.2vw,26px);color:var(--acs-fg)}.auth .auth-card .card-header .titles .subtitle{margin:4px 0 0;color:var(--acs-muted);font-size:.9375rem}.auth .footnote{margin-top:16px;font-size:12px;color:var(--acs-muted)}@media(max-width:1024px){.layout{grid-template-columns:1fr;grid-template-rows:auto 1fr}.media{min-height:220px}.media .media-surface .media-overlay{padding:clamp(20px,4vw,32px)}.media .media-surface .media-overlay .headline{font-size:clamp(22px,5vw,30px)}.media .media-surface .media-overlay .brand-section .brand-logo{max-height:64px}}@media(prefers-reduced-motion:reduce){.media .media-surface .media-video{display:none}}\n"]
|
|
869
|
+
}]
|
|
870
|
+
}]
|
|
871
|
+
});
|
|
352
872
|
function crudRoutes(config) {
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
{
|
|
381
|
-
path: 'novo',
|
|
382
|
-
component: config.creation?.component || config.update.component,
|
|
383
|
-
data: {
|
|
384
|
-
tabs: [
|
|
385
|
-
{
|
|
386
|
-
label: config.creation?.tab || 'Cadastro',
|
|
387
|
-
}
|
|
388
|
-
]
|
|
389
|
-
}
|
|
390
|
-
},
|
|
391
|
-
{
|
|
392
|
-
path: ':id',
|
|
393
|
-
component: config.update.component,
|
|
394
|
-
data: {
|
|
395
|
-
tabs: [
|
|
396
|
-
{
|
|
397
|
-
label: config.update.tab || 'Edição',
|
|
398
|
-
}
|
|
399
|
-
]
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
]
|
|
403
|
-
}
|
|
404
|
-
];
|
|
873
|
+
return [{
|
|
874
|
+
path: "",
|
|
875
|
+
data: { tabs: [{
|
|
876
|
+
label: config.list.tab || "Listagem",
|
|
877
|
+
route: `${config.baseRoute}`
|
|
878
|
+
}, {
|
|
879
|
+
label: config.creation?.tab || "Cadastro",
|
|
880
|
+
route: `${config.baseRoute}/novo`
|
|
881
|
+
}] },
|
|
882
|
+
children: [
|
|
883
|
+
{
|
|
884
|
+
path: "",
|
|
885
|
+
component: config.list.component,
|
|
886
|
+
data: { tabs: [{ label: config.list.tab || "Listagem" }] }
|
|
887
|
+
},
|
|
888
|
+
{
|
|
889
|
+
path: "novo",
|
|
890
|
+
component: config.creation?.component || config.update.component,
|
|
891
|
+
data: { tabs: [{ label: config.creation?.tab || "Cadastro" }] }
|
|
892
|
+
},
|
|
893
|
+
{
|
|
894
|
+
path: ":id",
|
|
895
|
+
component: config.update.component,
|
|
896
|
+
data: { tabs: [{ label: config.update.tab || "Edição" }] }
|
|
897
|
+
}
|
|
898
|
+
]
|
|
899
|
+
}];
|
|
405
900
|
}
|
|
406
|
-
|
|
407
901
|
function siblingsRoutes(siblings) {
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
}
|
|
425
|
-
]
|
|
426
|
-
}
|
|
427
|
-
}))
|
|
428
|
-
},
|
|
429
|
-
{
|
|
430
|
-
path: '',
|
|
431
|
-
pathMatch: 'full',
|
|
432
|
-
redirectTo: siblings[0].path
|
|
433
|
-
}
|
|
434
|
-
];
|
|
902
|
+
return [{
|
|
903
|
+
path: "",
|
|
904
|
+
data: { tabs: siblings.map((route) => ({
|
|
905
|
+
label: route.tab,
|
|
906
|
+
route: route.path
|
|
907
|
+
})) },
|
|
908
|
+
children: siblings.map((route) => ({
|
|
909
|
+
path: route.path,
|
|
910
|
+
component: route.component,
|
|
911
|
+
data: { tabs: [{ label: route.tab }] }
|
|
912
|
+
}))
|
|
913
|
+
}, {
|
|
914
|
+
path: "",
|
|
915
|
+
pathMatch: "full",
|
|
916
|
+
redirectTo: siblings[0].path
|
|
917
|
+
}];
|
|
435
918
|
}
|
|
436
|
-
|
|
437
919
|
function tabRoute(route) {
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
{
|
|
444
|
-
label: route.tab,
|
|
445
|
-
}
|
|
446
|
-
]
|
|
447
|
-
}
|
|
448
|
-
};
|
|
920
|
+
return {
|
|
921
|
+
path: route.path,
|
|
922
|
+
component: route.component,
|
|
923
|
+
data: { tabs: [{ label: route.tab }] }
|
|
924
|
+
};
|
|
449
925
|
}
|
|
450
|
-
|
|
451
|
-
/*
|
|
452
|
-
* Public API Surface of template
|
|
453
|
-
*/
|
|
454
|
-
|
|
455
|
-
/**
|
|
456
|
-
* Generated bundle index. Do not edit.
|
|
457
|
-
*/
|
|
458
|
-
|
|
459
926
|
export { AcessoComponent, BaseComponent, BaseService, FooterComponent, HeaderComponent, MENU_CONFIG, MenuComponent, MenuService, crudRoutes, siblingsRoutes, tabRoute };
|
|
460
|
-
|
|
927
|
+
|
|
928
|
+
//# sourceMappingURL=main-class-template.mjs.map
|