@ngx-smz/layout 21.2.0 → 21.9.0-next.10
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/ngx-smz-layout.mjs +353 -508
- package/fesm2022/ngx-smz-layout.mjs.map +1 -1
- package/package.json +5 -2
- package/resources/layout/variables/_common.scss +20 -20
- package/resources/layout/variables/_dark.scss +5 -5
- package/resources/layout/variables/_legacy-common.scss +47 -47
- package/resources/layout/variables/_light.scss +5 -5
- package/types/ngx-smz-layout.d.ts +6 -8
|
@@ -1,31 +1,15 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { signal, computed, Injectable, InjectionToken, provideAppInitializer, inject, makeEnvironmentProviders, effect,
|
|
2
|
+
import { signal, computed, Injectable, InjectionToken, provideAppInitializer, inject, makeEnvironmentProviders, effect, Component, EventEmitter, Output, Input, Directive, HostBinding, ViewChild } from '@angular/core';
|
|
3
3
|
import * as i3 from '@angular/common';
|
|
4
4
|
import { CommonModule, Location } from '@angular/common';
|
|
5
5
|
import * as i1 from '@angular/router';
|
|
6
6
|
import { Router, NavigationEnd, RouterModule } from '@angular/router';
|
|
7
7
|
import { Subject, filter as filter$1 } from 'rxjs';
|
|
8
|
-
import * as i3$2 from 'primeng/styleclass';
|
|
9
|
-
import { StyleClassModule } from 'primeng/styleclass';
|
|
10
8
|
import * as i2 from '@angular/forms';
|
|
11
9
|
import { FormsModule } from '@angular/forms';
|
|
12
|
-
import {
|
|
13
|
-
import Aura from '@primeuix/themes/aura';
|
|
14
|
-
import Lara from '@primeuix/themes/lara';
|
|
15
|
-
import Nora from '@primeuix/themes/nora';
|
|
16
|
-
import { PrimeNG } from 'primeng/config';
|
|
17
|
-
import * as i3$1 from 'primeng/selectbutton';
|
|
18
|
-
import { SelectButtonModule } from 'primeng/selectbutton';
|
|
10
|
+
import { SmzThemeService, SmzSelectButtonComponent, SmzStyleClassDirective, SmzTooltipDirective, SmzMenuListComponent, SmzButtonComponent, SmzRippleDirective } from '@ngx-smz/ui-kit';
|
|
19
11
|
import { takeWhile, filter } from 'rxjs/operators';
|
|
20
|
-
import * as i4 from 'primeng/tooltip';
|
|
21
|
-
import { TooltipModule } from 'primeng/tooltip';
|
|
22
|
-
import * as i5 from 'primeng/menu';
|
|
23
|
-
import { MenuModule } from 'primeng/menu';
|
|
24
|
-
import * as i1$1 from 'primeng/button';
|
|
25
|
-
import { ButtonModule } from 'primeng/button';
|
|
26
12
|
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
27
|
-
import * as i4$1 from 'primeng/ripple';
|
|
28
|
-
import { RippleModule } from 'primeng/ripple';
|
|
29
13
|
|
|
30
14
|
/**
|
|
31
15
|
* Clones the menu tree and sets `visible: false` where the host denies access via `hasClaim`.
|
|
@@ -373,28 +357,43 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
373
357
|
}]
|
|
374
358
|
}], ctorParameters: () => [] });
|
|
375
359
|
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
360
|
+
/* Paletas do Tailwind usadas pelo seletor de cor primaria do configurador. */
|
|
361
|
+
const PRIMARY_PALETTES = {
|
|
362
|
+
emerald: { 50: '#ecfdf5', 100: '#d1fae5', 200: '#a7f3d0', 300: '#6ee7b7', 400: '#34d399', 500: '#10b981', 600: '#059669', 700: '#047857', 800: '#065f46', 900: '#064e3b', 950: '#022c22' },
|
|
363
|
+
green: { 50: '#f0fdf4', 100: '#dcfce7', 200: '#bbf7d0', 300: '#86efac', 400: '#4ade80', 500: '#22c55e', 600: '#16a34a', 700: '#15803d', 800: '#166534', 900: '#14532d', 950: '#052e16' },
|
|
364
|
+
lime: { 50: '#f7fee7', 100: '#ecfccb', 200: '#d9f99d', 300: '#bef264', 400: '#a3e635', 500: '#84cc16', 600: '#65a30d', 700: '#4d7c0f', 800: '#3f6212', 900: '#365314', 950: '#1a2e05' },
|
|
365
|
+
orange: { 50: '#fff7ed', 100: '#ffedd5', 200: '#fed7aa', 300: '#fdba74', 400: '#fb923c', 500: '#f97316', 600: '#ea580c', 700: '#c2410c', 800: '#9a3412', 900: '#7c2d12', 950: '#431407' },
|
|
366
|
+
amber: { 50: '#fffbeb', 100: '#fef3c7', 200: '#fde68a', 300: '#fcd34d', 400: '#fbbf24', 500: '#f59e0b', 600: '#d97706', 700: '#b45309', 800: '#92400e', 900: '#78350f', 950: '#451a03' },
|
|
367
|
+
yellow: { 50: '#fefce8', 100: '#fef9c3', 200: '#fef08a', 300: '#fde047', 400: '#facc15', 500: '#eab308', 600: '#ca8a04', 700: '#a16207', 800: '#854d0e', 900: '#713f12', 950: '#422006' },
|
|
368
|
+
teal: { 50: '#f0fdfa', 100: '#ccfbf1', 200: '#99f6e4', 300: '#5eead4', 400: '#2dd4bf', 500: '#14b8a6', 600: '#0d9488', 700: '#0f766e', 800: '#115e59', 900: '#134e4a', 950: '#042f2e' },
|
|
369
|
+
cyan: { 50: '#ecfeff', 100: '#cffafe', 200: '#a5f3fc', 300: '#67e8f9', 400: '#22d3ee', 500: '#06b6d4', 600: '#0891b2', 700: '#0e7490', 800: '#155e75', 900: '#164e63', 950: '#083344' },
|
|
370
|
+
sky: { 50: '#f0f9ff', 100: '#e0f2fe', 200: '#bae6fd', 300: '#7dd3fc', 400: '#38bdf8', 500: '#0ea5e9', 600: '#0284c7', 700: '#0369a1', 800: '#075985', 900: '#0c4a6e', 950: '#082f49' },
|
|
371
|
+
blue: { 50: '#eff6ff', 100: '#dbeafe', 200: '#bfdbfe', 300: '#93c5fd', 400: '#60a5fa', 500: '#3b82f6', 600: '#2563eb', 700: '#1d4ed8', 800: '#1e40af', 900: '#1e3a8a', 950: '#172554' },
|
|
372
|
+
indigo: { 50: '#eef2ff', 100: '#e0e7ff', 200: '#c7d2fe', 300: '#a5b4fc', 400: '#818cf8', 500: '#6366f1', 600: '#4f46e5', 700: '#4338ca', 800: '#3730a3', 900: '#312e81', 950: '#1e1b4b' },
|
|
373
|
+
violet: { 50: '#f5f3ff', 100: '#ede9fe', 200: '#ddd6fe', 300: '#c4b5fd', 400: '#a78bfa', 500: '#8b5cf6', 600: '#7c3aed', 700: '#6d28d9', 800: '#5b21b6', 900: '#4c1d95', 950: '#2e1065' },
|
|
374
|
+
purple: { 50: '#faf5ff', 100: '#f3e8ff', 200: '#e9d5ff', 300: '#d8b4fe', 400: '#c084fc', 500: '#a855f7', 600: '#9333ea', 700: '#7e22ce', 800: '#6b21a8', 900: '#581c87', 950: '#3b0764' },
|
|
375
|
+
fuchsia: { 50: '#fdf4ff', 100: '#fae8ff', 200: '#f5d0fe', 300: '#f0abfc', 400: '#e879f9', 500: '#d946ef', 600: '#c026d3', 700: '#a21caf', 800: '#86198f', 900: '#701a75', 950: '#4a044e' },
|
|
376
|
+
pink: { 50: '#fdf2f8', 100: '#fce7f3', 200: '#fbcfe8', 300: '#f9a8d4', 400: '#f472b6', 500: '#ec4899', 600: '#db2777', 700: '#be185d', 800: '#9d174d', 900: '#831843', 950: '#500724' },
|
|
377
|
+
rose: { 50: '#fff1f2', 100: '#ffe4e6', 200: '#fecdd3', 300: '#fda4af', 400: '#fb7185', 500: '#f43f5e', 600: '#e11d48', 700: '#be123c', 800: '#9f1239', 900: '#881337', 950: '#4c0519' },
|
|
380
378
|
};
|
|
379
|
+
|
|
381
380
|
class AppConfigurator {
|
|
382
381
|
router = inject(Router);
|
|
383
|
-
config = inject(PrimeNG);
|
|
384
382
|
layoutService = inject(LayoutService);
|
|
385
|
-
|
|
386
|
-
primeNG = inject(PrimeNG);
|
|
387
|
-
presets = Object.keys(presets);
|
|
383
|
+
theme = inject(SmzThemeService);
|
|
388
384
|
showMenuModeButton = signal(!this.router.url.includes('auth'), ...(ngDevMode ? [{ debugName: "showMenuModeButton" }] : []));
|
|
389
385
|
menuModeOptions = [
|
|
390
386
|
{ label: 'Static', value: 'static' },
|
|
391
387
|
{ label: 'Overlay', value: 'overlay' }
|
|
392
388
|
];
|
|
393
|
-
|
|
394
|
-
//
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
389
|
+
constructor() {
|
|
390
|
+
// Reaplica cor primaria e superficie quando o modo claro/escuro muda (as sobrescritas inline vencem o CSS do tema).
|
|
391
|
+
effect(() => {
|
|
392
|
+
this.layoutService.layoutConfig().darkTheme;
|
|
393
|
+
this.layoutService.layoutConfig().primary;
|
|
394
|
+
this.layoutService.layoutConfig().surface;
|
|
395
|
+
queueMicrotask(() => this.applyCurrent());
|
|
396
|
+
});
|
|
398
397
|
}
|
|
399
398
|
surfaces = [
|
|
400
399
|
{
|
|
@@ -538,149 +537,12 @@ class AppConfigurator {
|
|
|
538
537
|
return this.layoutService.layoutConfig().primary;
|
|
539
538
|
}, ...(ngDevMode ? [{ debugName: "selectedPrimaryColor" }] : []));
|
|
540
539
|
selectedSurfaceColor = computed(() => this.layoutService.layoutConfig().surface, ...(ngDevMode ? [{ debugName: "selectedSurfaceColor" }] : []));
|
|
541
|
-
selectedPreset = computed(() => this.layoutService.layoutConfig().preset, ...(ngDevMode ? [{ debugName: "selectedPreset" }] : []));
|
|
542
540
|
menuMode = computed(() => this.layoutService.layoutConfig().menuMode, ...(ngDevMode ? [{ debugName: "menuMode" }] : []));
|
|
543
541
|
primaryColors = computed(() => {
|
|
544
|
-
const presetPalette = presets[this.layoutService.layoutConfig().preset].primitive;
|
|
545
|
-
const colors = ['emerald', 'green', 'lime', 'orange', 'amber', 'yellow', 'teal', 'cyan', 'sky', 'blue', 'indigo', 'violet', 'purple', 'fuchsia', 'pink', 'rose'];
|
|
546
542
|
const palettes = [{ name: 'noir', palette: {} }];
|
|
547
|
-
|
|
548
|
-
palettes.push({
|
|
549
|
-
name: color,
|
|
550
|
-
palette: presetPalette?.[color]
|
|
551
|
-
});
|
|
552
|
-
});
|
|
543
|
+
Object.entries(PRIMARY_PALETTES).forEach(([name, palette]) => palettes.push({ name, palette }));
|
|
553
544
|
return palettes;
|
|
554
545
|
}, ...(ngDevMode ? [{ debugName: "primaryColors" }] : []));
|
|
555
|
-
getPresetExt() {
|
|
556
|
-
const color = this.primaryColors().find((c) => c.name === this.selectedPrimaryColor()) || {};
|
|
557
|
-
const preset = this.layoutService.layoutConfig().preset;
|
|
558
|
-
if (color.name === 'noir') {
|
|
559
|
-
return {
|
|
560
|
-
semantic: {
|
|
561
|
-
primary: {
|
|
562
|
-
50: '{surface.50}',
|
|
563
|
-
100: '{surface.100}',
|
|
564
|
-
200: '{surface.200}',
|
|
565
|
-
300: '{surface.300}',
|
|
566
|
-
400: '{surface.400}',
|
|
567
|
-
500: '{surface.500}',
|
|
568
|
-
600: '{surface.600}',
|
|
569
|
-
700: '{surface.700}',
|
|
570
|
-
800: '{surface.800}',
|
|
571
|
-
900: '{surface.900}',
|
|
572
|
-
950: '{surface.950}'
|
|
573
|
-
},
|
|
574
|
-
colorScheme: {
|
|
575
|
-
light: {
|
|
576
|
-
primary: {
|
|
577
|
-
color: '{primary.950}',
|
|
578
|
-
contrastColor: '#ffffff',
|
|
579
|
-
hoverColor: '{primary.800}',
|
|
580
|
-
activeColor: '{primary.700}'
|
|
581
|
-
},
|
|
582
|
-
highlight: {
|
|
583
|
-
background: '{primary.950}',
|
|
584
|
-
focusBackground: '{primary.700}',
|
|
585
|
-
color: '#ffffff',
|
|
586
|
-
focusColor: '#ffffff'
|
|
587
|
-
}
|
|
588
|
-
},
|
|
589
|
-
dark: {
|
|
590
|
-
primary: {
|
|
591
|
-
color: '{primary.50}',
|
|
592
|
-
contrastColor: '{primary.950}',
|
|
593
|
-
hoverColor: '{primary.200}',
|
|
594
|
-
activeColor: '{primary.300}'
|
|
595
|
-
},
|
|
596
|
-
highlight: {
|
|
597
|
-
background: '{primary.50}',
|
|
598
|
-
focusBackground: '{primary.300}',
|
|
599
|
-
color: '{primary.950}',
|
|
600
|
-
focusColor: '{primary.950}'
|
|
601
|
-
}
|
|
602
|
-
}
|
|
603
|
-
}
|
|
604
|
-
}
|
|
605
|
-
};
|
|
606
|
-
}
|
|
607
|
-
else {
|
|
608
|
-
if (preset === 'Nora') {
|
|
609
|
-
return {
|
|
610
|
-
semantic: {
|
|
611
|
-
primary: color.palette,
|
|
612
|
-
colorScheme: {
|
|
613
|
-
light: {
|
|
614
|
-
primary: {
|
|
615
|
-
color: '{primary.600}',
|
|
616
|
-
contrastColor: '#ffffff',
|
|
617
|
-
hoverColor: '{primary.700}',
|
|
618
|
-
activeColor: '{primary.800}'
|
|
619
|
-
},
|
|
620
|
-
highlight: {
|
|
621
|
-
background: '{primary.600}',
|
|
622
|
-
focusBackground: '{primary.700}',
|
|
623
|
-
color: '#ffffff',
|
|
624
|
-
focusColor: '#ffffff'
|
|
625
|
-
}
|
|
626
|
-
},
|
|
627
|
-
dark: {
|
|
628
|
-
primary: {
|
|
629
|
-
color: '{primary.500}',
|
|
630
|
-
contrastColor: '{surface.900}',
|
|
631
|
-
hoverColor: '{primary.400}',
|
|
632
|
-
activeColor: '{primary.300}'
|
|
633
|
-
},
|
|
634
|
-
highlight: {
|
|
635
|
-
background: '{primary.500}',
|
|
636
|
-
focusBackground: '{primary.400}',
|
|
637
|
-
color: '{surface.900}',
|
|
638
|
-
focusColor: '{surface.900}'
|
|
639
|
-
}
|
|
640
|
-
}
|
|
641
|
-
}
|
|
642
|
-
}
|
|
643
|
-
};
|
|
644
|
-
}
|
|
645
|
-
else {
|
|
646
|
-
return {
|
|
647
|
-
semantic: {
|
|
648
|
-
primary: color.palette,
|
|
649
|
-
colorScheme: {
|
|
650
|
-
light: {
|
|
651
|
-
primary: {
|
|
652
|
-
color: '{primary.500}',
|
|
653
|
-
contrastColor: '#ffffff',
|
|
654
|
-
hoverColor: '{primary.600}',
|
|
655
|
-
activeColor: '{primary.700}'
|
|
656
|
-
},
|
|
657
|
-
highlight: {
|
|
658
|
-
background: '{primary.50}',
|
|
659
|
-
focusBackground: '{primary.100}',
|
|
660
|
-
color: '{primary.700}',
|
|
661
|
-
focusColor: '{primary.800}'
|
|
662
|
-
}
|
|
663
|
-
},
|
|
664
|
-
dark: {
|
|
665
|
-
primary: {
|
|
666
|
-
color: '{primary.400}',
|
|
667
|
-
contrastColor: '{surface.900}',
|
|
668
|
-
hoverColor: '{primary.300}',
|
|
669
|
-
activeColor: '{primary.200}'
|
|
670
|
-
},
|
|
671
|
-
highlight: {
|
|
672
|
-
background: 'color-mix(in srgb, {primary.400}, transparent 84%)',
|
|
673
|
-
focusBackground: 'color-mix(in srgb, {primary.400}, transparent 76%)',
|
|
674
|
-
color: 'rgba(255,255,255,.87)',
|
|
675
|
-
focusColor: 'rgba(255,255,255,.87)'
|
|
676
|
-
}
|
|
677
|
-
}
|
|
678
|
-
}
|
|
679
|
-
}
|
|
680
|
-
};
|
|
681
|
-
}
|
|
682
|
-
}
|
|
683
|
-
}
|
|
684
546
|
updateColors(event, type, color) {
|
|
685
547
|
if (type === 'primary') {
|
|
686
548
|
this.layoutService.layoutConfig.update((state) => ({ ...state, primary: color.name }));
|
|
@@ -688,135 +550,131 @@ class AppConfigurator {
|
|
|
688
550
|
else if (type === 'surface') {
|
|
689
551
|
this.layoutService.layoutConfig.update((state) => ({ ...state, surface: color.name }));
|
|
690
552
|
}
|
|
691
|
-
this.applyTheme(type, color);
|
|
692
553
|
event.stopPropagation();
|
|
693
554
|
}
|
|
694
|
-
applyTheme(type, color) {
|
|
695
|
-
if (type === 'primary') {
|
|
696
|
-
updatePreset(this.getPresetExt());
|
|
697
|
-
}
|
|
698
|
-
else if (type === 'surface') {
|
|
699
|
-
updateSurfacePalette(color.palette);
|
|
700
|
-
}
|
|
701
|
-
}
|
|
702
|
-
onPresetChange(event) {
|
|
703
|
-
this.layoutService.layoutConfig.update((state) => ({ ...state, preset: event }));
|
|
704
|
-
const preset = presets[event];
|
|
705
|
-
const surfacePalette = this.surfaces.find((s) => s.name === this.selectedSurfaceColor())?.palette;
|
|
706
|
-
$t().preset(preset).preset(this.getPresetExt()).surfacePalette(surfacePalette).use({ useDefaultOptions: true });
|
|
707
|
-
}
|
|
708
555
|
onMenuModeChange(event) {
|
|
709
556
|
this.layoutService.layoutConfig.update((prev) => ({ ...prev, menuMode: event }));
|
|
710
557
|
}
|
|
558
|
+
applyCurrent() {
|
|
559
|
+
const config = this.layoutService.layoutConfig();
|
|
560
|
+
const dark = !!config.darkTheme;
|
|
561
|
+
this.theme.reset();
|
|
562
|
+
const primary = this.primaryColors().find((c) => c.name === config.primary);
|
|
563
|
+
if (primary?.name === 'noir') {
|
|
564
|
+
this.theme.setPrimaryPalette(dark ? { 500: '#f8fafc', 400: '#f8fafc', 300: '#e2e8f0', 200: '#cbd5e1', 600: '#1e293b', 700: '#334155' } : { 500: '#0f172a', 600: '#1e293b', 700: '#334155' }, dark);
|
|
565
|
+
}
|
|
566
|
+
else if (primary?.palette && Object.keys(primary.palette).length) {
|
|
567
|
+
this.theme.setPrimaryPalette(primary.palette, dark);
|
|
568
|
+
}
|
|
569
|
+
const surface = this.surfaces.find((s) => s.name === config.surface)?.palette;
|
|
570
|
+
if (surface) {
|
|
571
|
+
const p = surface;
|
|
572
|
+
this.theme.setColors(dark
|
|
573
|
+
? { 'surface-0': p[950], 'surface-1': p[900], 'surface-2': p[800], 'surface-3': p[700], fg: p[50], 'fg-muted': p[300], 'fg-subtle': p[400], line: p[700], 'line-strong': p[600] }
|
|
574
|
+
: { 'surface-0': p[50], 'surface-1': p[0], 'surface-2': p[0], 'surface-3': p[100], fg: p[900], 'fg-muted': p[600], 'fg-subtle': p[400], line: p[200], 'line-strong': p[300] });
|
|
575
|
+
}
|
|
576
|
+
}
|
|
711
577
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AppConfigurator, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
712
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: AppConfigurator, isStandalone: true, selector: "app-configurator", host: { classAttribute: "hidden absolute top-[3.25rem] right-0 w-72 p-4 bg-surface-0 dark:bg-surface-900 border border-surface rounded-border origin-top shadow-[0px_3px_5px_rgba(0,0,0,0.02),0px_0px_2px_rgba(0,0,0,0.05),0px_1px_4px_rgba(0,0,0,0.08)]" }, ngImport: i0, template: `
|
|
713
|
-
<div class="flex flex-col gap-4">
|
|
714
|
-
<div>
|
|
715
|
-
<span class="text-sm text-muted-color font-semibold">Primary</span>
|
|
716
|
-
<div class="pt-2 flex gap-2 flex-wrap justify-start">
|
|
717
|
-
@for (primaryColor of primaryColors(); track primaryColor.name) {
|
|
718
|
-
<button
|
|
719
|
-
type="button"
|
|
720
|
-
[title]="primaryColor.name"
|
|
721
|
-
(click)="updateColors($event, 'primary', primaryColor)"
|
|
722
|
-
[ngClass]="{ 'outline-primary': primaryColor.name === selectedPrimaryColor() }"
|
|
723
|
-
class="border-none w-5 h-5 rounded-full p-0 cursor-pointer outline-none outline-offset-1"
|
|
724
|
-
[style]="{
|
|
725
|
-
'background-color': primaryColor?.name === 'noir' ? 'var(--text-color)' : primaryColor?.palette?.['500']
|
|
726
|
-
}"
|
|
727
|
-
></button>
|
|
728
|
-
}
|
|
729
|
-
</div>
|
|
730
|
-
</div>
|
|
731
|
-
<div>
|
|
732
|
-
<span class="text-sm text-muted-color font-semibold">Surface</span>
|
|
733
|
-
<div class="pt-2 flex gap-2 flex-wrap justify-start">
|
|
734
|
-
@for (surface of surfaces; track surface.name) {
|
|
735
|
-
<button
|
|
736
|
-
type="button"
|
|
737
|
-
[title]="surface.name"
|
|
738
|
-
(click)="updateColors($event, 'surface', surface)"
|
|
739
|
-
[ngClass]="{ 'outline-primary': selectedSurfaceColor() ? selectedSurfaceColor() === surface.name : layoutService.layoutConfig().darkTheme ? surface.name === 'zinc' : surface.name === 'slate' }"
|
|
740
|
-
class="border-none w-5 h-5 rounded-full p-0 cursor-pointer outline-none outline-offset-1"
|
|
741
|
-
[style]="{
|
|
742
|
-
'background-color': surface?.name === 'noir' ? 'var(--text-color)' : surface?.palette?.['500']
|
|
743
|
-
}"
|
|
744
|
-
></button>
|
|
745
|
-
}
|
|
746
|
-
</div>
|
|
747
|
-
</div>
|
|
748
|
-
|
|
749
|
-
<
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
</div>
|
|
757
|
-
}
|
|
758
|
-
</div>
|
|
759
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: SelectButtonModule }, { kind: "component", type: i3$1.SelectButton, selector: "p-selectButton, p-selectbutton, p-select-button", inputs: ["options", "optionLabel", "optionValue", "optionDisabled", "unselectable", "tabindex", "multiple", "allowEmpty", "styleClass", "ariaLabelledBy", "dataKey", "autofocus", "size", "fluid"], outputs: ["onOptionClick", "onChange"] }] });
|
|
578
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: AppConfigurator, isStandalone: true, selector: "app-configurator", host: { classAttribute: "hidden absolute top-[3.25rem] right-0 w-72 p-4 bg-surface-0 dark:bg-surface-900 border border-surface rounded-border origin-top shadow-[0px_3px_5px_rgba(0,0,0,0.02),0px_0px_2px_rgba(0,0,0,0.05),0px_1px_4px_rgba(0,0,0,0.08)]" }, ngImport: i0, template: `
|
|
579
|
+
<div class="flex flex-col gap-4">
|
|
580
|
+
<div>
|
|
581
|
+
<span class="text-sm text-muted-color font-semibold">Primary</span>
|
|
582
|
+
<div class="pt-2 flex gap-2 flex-wrap justify-start">
|
|
583
|
+
@for (primaryColor of primaryColors(); track primaryColor.name) {
|
|
584
|
+
<button
|
|
585
|
+
type="button"
|
|
586
|
+
[title]="primaryColor.name"
|
|
587
|
+
(click)="updateColors($event, 'primary', primaryColor)"
|
|
588
|
+
[ngClass]="{ 'outline-primary': primaryColor.name === selectedPrimaryColor() }"
|
|
589
|
+
class="border-none w-5 h-5 rounded-full p-0 cursor-pointer outline-none outline-offset-1"
|
|
590
|
+
[style]="{
|
|
591
|
+
'background-color': primaryColor?.name === 'noir' ? 'var(--text-color)' : primaryColor?.palette?.['500']
|
|
592
|
+
}"
|
|
593
|
+
></button>
|
|
594
|
+
}
|
|
595
|
+
</div>
|
|
596
|
+
</div>
|
|
597
|
+
<div>
|
|
598
|
+
<span class="text-sm text-muted-color font-semibold">Surface</span>
|
|
599
|
+
<div class="pt-2 flex gap-2 flex-wrap justify-start">
|
|
600
|
+
@for (surface of surfaces; track surface.name) {
|
|
601
|
+
<button
|
|
602
|
+
type="button"
|
|
603
|
+
[title]="surface.name"
|
|
604
|
+
(click)="updateColors($event, 'surface', surface)"
|
|
605
|
+
[ngClass]="{ 'outline-primary': selectedSurfaceColor() ? selectedSurfaceColor() === surface.name : layoutService.layoutConfig().darkTheme ? surface.name === 'zinc' : surface.name === 'slate' }"
|
|
606
|
+
class="border-none w-5 h-5 rounded-full p-0 cursor-pointer outline-none outline-offset-1"
|
|
607
|
+
[style]="{
|
|
608
|
+
'background-color': surface?.name === 'noir' ? 'var(--text-color)' : surface?.palette?.['500']
|
|
609
|
+
}"
|
|
610
|
+
></button>
|
|
611
|
+
}
|
|
612
|
+
</div>
|
|
613
|
+
</div>
|
|
614
|
+
@if (showMenuModeButton()) {
|
|
615
|
+
<div class="flex flex-col gap-2">
|
|
616
|
+
<span class="text-sm text-muted-color font-semibold">Menu Mode</span>
|
|
617
|
+
<ui-select-button [ngModel]="menuMode()" (ngModelChange)="onMenuModeChange($event)" [options]="menuModeOptions" [allowEmpty]="false" size="small"></ui-select-button>
|
|
618
|
+
</div>
|
|
619
|
+
}
|
|
620
|
+
</div>
|
|
621
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: SmzSelectButtonComponent, selector: "ui-select-button", inputs: ["options", "optionLabel", "optionValue", "optionDisabled", "dataKey", "multiple", "allowEmpty", "size", "styleClass", "appendTo"], outputs: ["changed"] }] });
|
|
760
622
|
}
|
|
761
623
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AppConfigurator, decorators: [{
|
|
762
624
|
type: Component,
|
|
763
625
|
args: [{
|
|
764
626
|
selector: 'app-configurator',
|
|
765
627
|
standalone: true,
|
|
766
|
-
imports: [CommonModule, FormsModule,
|
|
767
|
-
template: `
|
|
768
|
-
<div class="flex flex-col gap-4">
|
|
769
|
-
<div>
|
|
770
|
-
<span class="text-sm text-muted-color font-semibold">Primary</span>
|
|
771
|
-
<div class="pt-2 flex gap-2 flex-wrap justify-start">
|
|
772
|
-
@for (primaryColor of primaryColors(); track primaryColor.name) {
|
|
773
|
-
<button
|
|
774
|
-
type="button"
|
|
775
|
-
[title]="primaryColor.name"
|
|
776
|
-
(click)="updateColors($event, 'primary', primaryColor)"
|
|
777
|
-
[ngClass]="{ 'outline-primary': primaryColor.name === selectedPrimaryColor() }"
|
|
778
|
-
class="border-none w-5 h-5 rounded-full p-0 cursor-pointer outline-none outline-offset-1"
|
|
779
|
-
[style]="{
|
|
780
|
-
'background-color': primaryColor?.name === 'noir' ? 'var(--text-color)' : primaryColor?.palette?.['500']
|
|
781
|
-
}"
|
|
782
|
-
></button>
|
|
783
|
-
}
|
|
784
|
-
</div>
|
|
785
|
-
</div>
|
|
786
|
-
<div>
|
|
787
|
-
<span class="text-sm text-muted-color font-semibold">Surface</span>
|
|
788
|
-
<div class="pt-2 flex gap-2 flex-wrap justify-start">
|
|
789
|
-
@for (surface of surfaces; track surface.name) {
|
|
790
|
-
<button
|
|
791
|
-
type="button"
|
|
792
|
-
[title]="surface.name"
|
|
793
|
-
(click)="updateColors($event, 'surface', surface)"
|
|
794
|
-
[ngClass]="{ 'outline-primary': selectedSurfaceColor() ? selectedSurfaceColor() === surface.name : layoutService.layoutConfig().darkTheme ? surface.name === 'zinc' : surface.name === 'slate' }"
|
|
795
|
-
class="border-none w-5 h-5 rounded-full p-0 cursor-pointer outline-none outline-offset-1"
|
|
796
|
-
[style]="{
|
|
797
|
-
'background-color': surface?.name === 'noir' ? 'var(--text-color)' : surface?.palette?.['500']
|
|
798
|
-
}"
|
|
799
|
-
></button>
|
|
800
|
-
}
|
|
801
|
-
</div>
|
|
802
|
-
</div>
|
|
803
|
-
|
|
804
|
-
<
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
<p-selectbutton [ngModel]="menuMode()" (ngModelChange)="onMenuModeChange($event)" [options]="menuModeOptions" [allowEmpty]="false" size="small" />
|
|
811
|
-
</div>
|
|
812
|
-
}
|
|
813
|
-
</div>
|
|
628
|
+
imports: [CommonModule, FormsModule, SmzSelectButtonComponent],
|
|
629
|
+
template: `
|
|
630
|
+
<div class="flex flex-col gap-4">
|
|
631
|
+
<div>
|
|
632
|
+
<span class="text-sm text-muted-color font-semibold">Primary</span>
|
|
633
|
+
<div class="pt-2 flex gap-2 flex-wrap justify-start">
|
|
634
|
+
@for (primaryColor of primaryColors(); track primaryColor.name) {
|
|
635
|
+
<button
|
|
636
|
+
type="button"
|
|
637
|
+
[title]="primaryColor.name"
|
|
638
|
+
(click)="updateColors($event, 'primary', primaryColor)"
|
|
639
|
+
[ngClass]="{ 'outline-primary': primaryColor.name === selectedPrimaryColor() }"
|
|
640
|
+
class="border-none w-5 h-5 rounded-full p-0 cursor-pointer outline-none outline-offset-1"
|
|
641
|
+
[style]="{
|
|
642
|
+
'background-color': primaryColor?.name === 'noir' ? 'var(--text-color)' : primaryColor?.palette?.['500']
|
|
643
|
+
}"
|
|
644
|
+
></button>
|
|
645
|
+
}
|
|
646
|
+
</div>
|
|
647
|
+
</div>
|
|
648
|
+
<div>
|
|
649
|
+
<span class="text-sm text-muted-color font-semibold">Surface</span>
|
|
650
|
+
<div class="pt-2 flex gap-2 flex-wrap justify-start">
|
|
651
|
+
@for (surface of surfaces; track surface.name) {
|
|
652
|
+
<button
|
|
653
|
+
type="button"
|
|
654
|
+
[title]="surface.name"
|
|
655
|
+
(click)="updateColors($event, 'surface', surface)"
|
|
656
|
+
[ngClass]="{ 'outline-primary': selectedSurfaceColor() ? selectedSurfaceColor() === surface.name : layoutService.layoutConfig().darkTheme ? surface.name === 'zinc' : surface.name === 'slate' }"
|
|
657
|
+
class="border-none w-5 h-5 rounded-full p-0 cursor-pointer outline-none outline-offset-1"
|
|
658
|
+
[style]="{
|
|
659
|
+
'background-color': surface?.name === 'noir' ? 'var(--text-color)' : surface?.palette?.['500']
|
|
660
|
+
}"
|
|
661
|
+
></button>
|
|
662
|
+
}
|
|
663
|
+
</div>
|
|
664
|
+
</div>
|
|
665
|
+
@if (showMenuModeButton()) {
|
|
666
|
+
<div class="flex flex-col gap-2">
|
|
667
|
+
<span class="text-sm text-muted-color font-semibold">Menu Mode</span>
|
|
668
|
+
<ui-select-button [ngModel]="menuMode()" (ngModelChange)="onMenuModeChange($event)" [options]="menuModeOptions" [allowEmpty]="false" size="small"></ui-select-button>
|
|
669
|
+
</div>
|
|
670
|
+
}
|
|
671
|
+
</div>
|
|
814
672
|
`,
|
|
815
673
|
host: {
|
|
816
674
|
class: 'hidden absolute top-[3.25rem] right-0 w-72 p-4 bg-surface-0 dark:bg-surface-900 border border-surface rounded-border origin-top shadow-[0px_3px_5px_rgba(0,0,0,0.02),0px_0px_2px_rgba(0,0,0,0.05),0px_1px_4px_rgba(0,0,0,0.08)]'
|
|
817
675
|
}
|
|
818
676
|
}]
|
|
819
|
-
}] });
|
|
677
|
+
}], ctorParameters: () => [] });
|
|
820
678
|
|
|
821
679
|
class InjectComponentService {
|
|
822
680
|
componentRefs = new Map();
|
|
@@ -1176,7 +1034,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
1176
1034
|
}], ctorParameters: () => [] });
|
|
1177
1035
|
|
|
1178
1036
|
class AppTopbar {
|
|
1179
|
-
primeNG = inject(PrimeNG);
|
|
1180
1037
|
data = inject(SMZ_UI_LAYOUT_CONFIG).topbar;
|
|
1181
1038
|
layoutService = inject(LayoutService);
|
|
1182
1039
|
navigationService = inject(NavigationService);
|
|
@@ -1188,184 +1045,184 @@ class AppTopbar {
|
|
|
1188
1045
|
event.target.src = placeholder;
|
|
1189
1046
|
}
|
|
1190
1047
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AppTopbar, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1191
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: AppTopbar, isStandalone: true, selector: "app-topbar", ngImport: i0, template: `
|
|
1192
|
-
@if (data(); as topbar) {
|
|
1193
|
-
<div class="layout-topbar">
|
|
1194
|
-
<div class="layout-topbar-logo-container">
|
|
1195
|
-
@if (topbar.showMenuToggle) {
|
|
1196
|
-
<button class="layout-menu-button layout-topbar-action" (click)="layoutService.onMenuToggle()">
|
|
1197
|
-
<i class="
|
|
1198
|
-
</button>
|
|
1199
|
-
}
|
|
1200
|
-
<a class="layout-topbar-logo" routerLink="/">
|
|
1201
|
-
@if (topbar.logoPath?.light && !layoutService.isDarkTheme()) {
|
|
1202
|
-
<img [src]="topbar.logoPath?.light" [alt]="topbar.logoPath?.light" class="max-h-9 min-h-8" />
|
|
1203
|
-
}
|
|
1204
|
-
@if (topbar.logoPath?.dark && layoutService.isDarkTheme()) {
|
|
1205
|
-
<img [src]="topbar.logoPath?.dark" [alt]="topbar.logoPath?.dark" class="max-h-9 min-h-8" />
|
|
1206
|
-
}
|
|
1207
|
-
</a>
|
|
1208
|
-
@if (topbar.appName) {
|
|
1209
|
-
<span class="layout-topbar-app-name">{{ topbar.appName }}</span>
|
|
1210
|
-
}
|
|
1211
|
-
</div>
|
|
1212
|
-
<div class="layout-topbar-left-actions">
|
|
1213
|
-
@if (topbar.showBackButton || pageTitleService.hasTitle()) {
|
|
1214
|
-
<span class="topbar-separator"></span>
|
|
1215
|
-
}
|
|
1216
|
-
@if (topbar.showBackButton && navigationService.canGoBackSignal()) {
|
|
1217
|
-
<button class="layout-menu-button layout-topbar-action" (click)="navigationService.goBack()">
|
|
1218
|
-
<i class="
|
|
1219
|
-
</button>
|
|
1220
|
-
}
|
|
1221
|
-
@if (pageTitleService.hasTitle()) {
|
|
1222
|
-
<span class="layout-topbar-page-title">
|
|
1223
|
-
<span>{{ pageTitleService.title() }}</span>
|
|
1224
|
-
</span>
|
|
1225
|
-
}
|
|
1226
|
-
</div>
|
|
1227
|
-
<div class="layout-topbar-right-actions">
|
|
1228
|
-
<button class="layout-topbar-menu-button layout-topbar-action"
|
|
1229
|
-
<i class="
|
|
1230
|
-
</button>
|
|
1231
|
-
<div class="layout-topbar-menu hidden lg:block">
|
|
1232
|
-
<div class="layout-topbar-menu-content">
|
|
1233
|
-
@for (item of topbar.menuItems; track item) {
|
|
1234
|
-
@if (item.component != null) {
|
|
1235
|
-
<ng-template [componentInjector]="item.component"></ng-template>
|
|
1236
|
-
}
|
|
1237
|
-
@else {
|
|
1238
|
-
<button type="button" class="layout-topbar-action" (click)="item.callback()" [routerLink]="item.routerLink" [
|
|
1239
|
-
<i [ngClass]="item.icon"></i>
|
|
1240
|
-
<span>{{ item.label }}</span>
|
|
1241
|
-
</button>
|
|
1242
|
-
}
|
|
1243
|
-
}
|
|
1244
|
-
</div>
|
|
1245
|
-
</div>
|
|
1246
|
-
<div class="layout-config-menu">
|
|
1247
|
-
@if (topbar.showDarkModeToggle) {
|
|
1248
|
-
<button type="button" class="layout-topbar-action" (click)="toggleDarkMode()"
|
|
1249
|
-
<i [ngClass]="{ '
|
|
1250
|
-
</button>
|
|
1251
|
-
}
|
|
1252
|
-
@if (topbar.showConfigurator) {
|
|
1253
|
-
<div class="relative">
|
|
1254
|
-
<button class="layout-topbar-action layout-topbar-action-highlight"
|
|
1255
|
-
<i class="
|
|
1256
|
-
</button>
|
|
1257
|
-
<app-configurator></app-configurator>
|
|
1258
|
-
</div>
|
|
1259
|
-
}
|
|
1260
|
-
@if (topbar.showProfileMenu !== false) {
|
|
1261
|
-
@for (feature of topbar.features; track feature) {
|
|
1262
|
-
<
|
|
1263
|
-
@if (feature.avatar && feature.avatar() != null) {
|
|
1264
|
-
<img [src]="feature.avatar()" [alt]="feature.label" class="layout-topbar-action w-8 h-8 rounded-full" (click)="menu.toggle($event)" [
|
|
1265
|
-
}
|
|
1266
|
-
@else {
|
|
1267
|
-
<button type="button" class="layout-topbar-action" (click)="menu.toggle($event)" [
|
|
1268
|
-
<i [ngClass]="feature.icon()"></i>
|
|
1269
|
-
</button>
|
|
1270
|
-
}
|
|
1271
|
-
}
|
|
1272
|
-
}
|
|
1273
|
-
</div>
|
|
1274
|
-
</div>
|
|
1275
|
-
</div>
|
|
1276
|
-
}`, isInline: true, dependencies: [{ kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "
|
|
1048
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.1", type: AppTopbar, isStandalone: true, selector: "app-topbar", ngImport: i0, template: `
|
|
1049
|
+
@if (data(); as topbar) {
|
|
1050
|
+
<div class="layout-topbar">
|
|
1051
|
+
<div class="layout-topbar-logo-container">
|
|
1052
|
+
@if (topbar.showMenuToggle) {
|
|
1053
|
+
<button class="layout-menu-button layout-topbar-action" (click)="layoutService.onMenuToggle()">
|
|
1054
|
+
<i class="fa-solid fa-bars"></i>
|
|
1055
|
+
</button>
|
|
1056
|
+
}
|
|
1057
|
+
<a class="layout-topbar-logo" routerLink="/">
|
|
1058
|
+
@if (topbar.logoPath?.light && !layoutService.isDarkTheme()) {
|
|
1059
|
+
<img [src]="topbar.logoPath?.light" [alt]="topbar.logoPath?.light" class="max-h-9 min-h-8" />
|
|
1060
|
+
}
|
|
1061
|
+
@if (topbar.logoPath?.dark && layoutService.isDarkTheme()) {
|
|
1062
|
+
<img [src]="topbar.logoPath?.dark" [alt]="topbar.logoPath?.dark" class="max-h-9 min-h-8" />
|
|
1063
|
+
}
|
|
1064
|
+
</a>
|
|
1065
|
+
@if (topbar.appName) {
|
|
1066
|
+
<span class="layout-topbar-app-name">{{ topbar.appName }}</span>
|
|
1067
|
+
}
|
|
1068
|
+
</div>
|
|
1069
|
+
<div class="layout-topbar-left-actions">
|
|
1070
|
+
@if (topbar.showBackButton || pageTitleService.hasTitle()) {
|
|
1071
|
+
<span class="topbar-separator"></span>
|
|
1072
|
+
}
|
|
1073
|
+
@if (topbar.showBackButton && navigationService.canGoBackSignal()) {
|
|
1074
|
+
<button class="layout-menu-button layout-topbar-action" (click)="navigationService.goBack()">
|
|
1075
|
+
<i class="fa-solid fa-arrow-left"></i>
|
|
1076
|
+
</button>
|
|
1077
|
+
}
|
|
1078
|
+
@if (pageTitleService.hasTitle()) {
|
|
1079
|
+
<span class="layout-topbar-page-title">
|
|
1080
|
+
<span>{{ pageTitleService.title() }}</span>
|
|
1081
|
+
</span>
|
|
1082
|
+
}
|
|
1083
|
+
</div>
|
|
1084
|
+
<div class="layout-topbar-right-actions">
|
|
1085
|
+
<button class="layout-topbar-menu-button layout-topbar-action" smzStyleClass="@next" enterFromClass="hidden" enterActiveClass="animate-scalein" leaveToClass="hidden" leaveActiveClass="animate-fadeout" [hideOnOutsideClick]="true">
|
|
1086
|
+
<i class="fa-solid fa-ellipsis-vertical"></i>
|
|
1087
|
+
</button>
|
|
1088
|
+
<div class="layout-topbar-menu hidden lg:block">
|
|
1089
|
+
<div class="layout-topbar-menu-content">
|
|
1090
|
+
@for (item of topbar.menuItems; track item) {
|
|
1091
|
+
@if (item.component != null) {
|
|
1092
|
+
<ng-template [componentInjector]="item.component"></ng-template>
|
|
1093
|
+
}
|
|
1094
|
+
@else {
|
|
1095
|
+
<button type="button" class="layout-topbar-action" (click)="item.callback()" [routerLink]="item.routerLink" [smzTooltip]="item.tooltip">
|
|
1096
|
+
<i [ngClass]="item.icon"></i>
|
|
1097
|
+
<span>{{ item.label }}</span>
|
|
1098
|
+
</button>
|
|
1099
|
+
}
|
|
1100
|
+
}
|
|
1101
|
+
</div>
|
|
1102
|
+
</div>
|
|
1103
|
+
<div class="layout-config-menu">
|
|
1104
|
+
@if (topbar.showDarkModeToggle) {
|
|
1105
|
+
<button type="button" class="layout-topbar-action" (click)="toggleDarkMode()" smzTooltip="Dark/Light">
|
|
1106
|
+
<i [ngClass]="{ 'fa-solid': true, 'fa-moon': layoutService.isDarkTheme(), 'fa-sun': !layoutService.isDarkTheme() }"></i>
|
|
1107
|
+
</button>
|
|
1108
|
+
}
|
|
1109
|
+
@if (topbar.showConfigurator) {
|
|
1110
|
+
<div class="relative">
|
|
1111
|
+
<button class="layout-topbar-action layout-topbar-action-highlight" smzTooltip="Configurações" smzStyleClass="@next" enterFromClass="hidden" enterActiveClass="animate-scalein" leaveToClass="hidden" leaveActiveClass="animate-fadeout" [hideOnOutsideClick]="true">
|
|
1112
|
+
<i class="fa-solid fa-palette"></i>
|
|
1113
|
+
</button>
|
|
1114
|
+
<app-configurator></app-configurator>
|
|
1115
|
+
</div>
|
|
1116
|
+
}
|
|
1117
|
+
@if (topbar.showProfileMenu !== false) {
|
|
1118
|
+
@for (feature of topbar.features; track feature) {
|
|
1119
|
+
<ui-menu #menu [model]="feature.menuItems" [popup]="true"></ui-menu>
|
|
1120
|
+
@if (feature.avatar && feature.avatar() != null) {
|
|
1121
|
+
<img [src]="feature.avatar()" [alt]="feature.label" class="layout-topbar-action w-8 h-8 rounded-full" (click)="menu.toggle($event)" [smzTooltip]="feature.tooltip" (error)="handleMissingImage($event, feature.placeholder)"/>
|
|
1122
|
+
}
|
|
1123
|
+
@else {
|
|
1124
|
+
<button type="button" class="layout-topbar-action" (click)="menu.toggle($event)" [smzTooltip]="feature.tooltip">
|
|
1125
|
+
<i [ngClass]="feature.icon()"></i>
|
|
1126
|
+
</button>
|
|
1127
|
+
}
|
|
1128
|
+
}
|
|
1129
|
+
}
|
|
1130
|
+
</div>
|
|
1131
|
+
</div>
|
|
1132
|
+
</div>
|
|
1133
|
+
}`, isInline: true, dependencies: [{ kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: SmzStyleClassDirective, selector: "[smzStyleClass]", inputs: ["smzStyleClass", "enterFromClass", "enterActiveClass", "enterToClass", "leaveFromClass", "leaveActiveClass", "leaveToClass", "hideOnOutsideClick", "toggleClass"] }, { kind: "component", type: AppConfigurator, selector: "app-configurator" }, { kind: "directive", type: ComponentInjectorDirective, selector: "ng-template[componentInjector]", inputs: ["componentInjector", "context"], outputs: ["componentCreated"] }, { kind: "directive", type: SmzTooltipDirective, selector: "[smzTooltip]", inputs: ["smzTooltip", "tooltipPosition", "showDelay", "hideDelay", "tooltipEvent", "escape", "tooltipStyleClass", "tooltipZIndex", "tooltipDisabled", "tooltipOptions", "appendTo"] }, { kind: "component", type: SmzMenuListComponent, selector: "ui-menu", inputs: ["model", "popup", "style", "styleClass", "autoZIndex", "appendTo", "baseZIndex"], outputs: ["shown", "hidden"] }] });
|
|
1277
1134
|
}
|
|
1278
1135
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AppTopbar, decorators: [{
|
|
1279
1136
|
type: Component,
|
|
1280
1137
|
args: [{
|
|
1281
1138
|
selector: 'app-topbar',
|
|
1282
1139
|
standalone: true,
|
|
1283
|
-
imports: [RouterModule, CommonModule,
|
|
1284
|
-
template: `
|
|
1285
|
-
@if (data(); as topbar) {
|
|
1286
|
-
<div class="layout-topbar">
|
|
1287
|
-
<div class="layout-topbar-logo-container">
|
|
1288
|
-
@if (topbar.showMenuToggle) {
|
|
1289
|
-
<button class="layout-menu-button layout-topbar-action" (click)="layoutService.onMenuToggle()">
|
|
1290
|
-
<i class="
|
|
1291
|
-
</button>
|
|
1292
|
-
}
|
|
1293
|
-
<a class="layout-topbar-logo" routerLink="/">
|
|
1294
|
-
@if (topbar.logoPath?.light && !layoutService.isDarkTheme()) {
|
|
1295
|
-
<img [src]="topbar.logoPath?.light" [alt]="topbar.logoPath?.light" class="max-h-9 min-h-8" />
|
|
1296
|
-
}
|
|
1297
|
-
@if (topbar.logoPath?.dark && layoutService.isDarkTheme()) {
|
|
1298
|
-
<img [src]="topbar.logoPath?.dark" [alt]="topbar.logoPath?.dark" class="max-h-9 min-h-8" />
|
|
1299
|
-
}
|
|
1300
|
-
</a>
|
|
1301
|
-
@if (topbar.appName) {
|
|
1302
|
-
<span class="layout-topbar-app-name">{{ topbar.appName }}</span>
|
|
1303
|
-
}
|
|
1304
|
-
</div>
|
|
1305
|
-
<div class="layout-topbar-left-actions">
|
|
1306
|
-
@if (topbar.showBackButton || pageTitleService.hasTitle()) {
|
|
1307
|
-
<span class="topbar-separator"></span>
|
|
1308
|
-
}
|
|
1309
|
-
@if (topbar.showBackButton && navigationService.canGoBackSignal()) {
|
|
1310
|
-
<button class="layout-menu-button layout-topbar-action" (click)="navigationService.goBack()">
|
|
1311
|
-
<i class="
|
|
1312
|
-
</button>
|
|
1313
|
-
}
|
|
1314
|
-
@if (pageTitleService.hasTitle()) {
|
|
1315
|
-
<span class="layout-topbar-page-title">
|
|
1316
|
-
<span>{{ pageTitleService.title() }}</span>
|
|
1317
|
-
</span>
|
|
1318
|
-
}
|
|
1319
|
-
</div>
|
|
1320
|
-
<div class="layout-topbar-right-actions">
|
|
1321
|
-
<button class="layout-topbar-menu-button layout-topbar-action"
|
|
1322
|
-
<i class="
|
|
1323
|
-
</button>
|
|
1324
|
-
<div class="layout-topbar-menu hidden lg:block">
|
|
1325
|
-
<div class="layout-topbar-menu-content">
|
|
1326
|
-
@for (item of topbar.menuItems; track item) {
|
|
1327
|
-
@if (item.component != null) {
|
|
1328
|
-
<ng-template [componentInjector]="item.component"></ng-template>
|
|
1329
|
-
}
|
|
1330
|
-
@else {
|
|
1331
|
-
<button type="button" class="layout-topbar-action" (click)="item.callback()" [routerLink]="item.routerLink" [
|
|
1332
|
-
<i [ngClass]="item.icon"></i>
|
|
1333
|
-
<span>{{ item.label }}</span>
|
|
1334
|
-
</button>
|
|
1335
|
-
}
|
|
1336
|
-
}
|
|
1337
|
-
</div>
|
|
1338
|
-
</div>
|
|
1339
|
-
<div class="layout-config-menu">
|
|
1340
|
-
@if (topbar.showDarkModeToggle) {
|
|
1341
|
-
<button type="button" class="layout-topbar-action" (click)="toggleDarkMode()"
|
|
1342
|
-
<i [ngClass]="{ '
|
|
1343
|
-
</button>
|
|
1344
|
-
}
|
|
1345
|
-
@if (topbar.showConfigurator) {
|
|
1346
|
-
<div class="relative">
|
|
1347
|
-
<button class="layout-topbar-action layout-topbar-action-highlight"
|
|
1348
|
-
<i class="
|
|
1349
|
-
</button>
|
|
1350
|
-
<app-configurator></app-configurator>
|
|
1351
|
-
</div>
|
|
1352
|
-
}
|
|
1353
|
-
@if (topbar.showProfileMenu !== false) {
|
|
1354
|
-
@for (feature of topbar.features; track feature) {
|
|
1355
|
-
<
|
|
1356
|
-
@if (feature.avatar && feature.avatar() != null) {
|
|
1357
|
-
<img [src]="feature.avatar()" [alt]="feature.label" class="layout-topbar-action w-8 h-8 rounded-full" (click)="menu.toggle($event)" [
|
|
1358
|
-
}
|
|
1359
|
-
@else {
|
|
1360
|
-
<button type="button" class="layout-topbar-action" (click)="menu.toggle($event)" [
|
|
1361
|
-
<i [ngClass]="feature.icon()"></i>
|
|
1362
|
-
</button>
|
|
1363
|
-
}
|
|
1364
|
-
}
|
|
1365
|
-
}
|
|
1366
|
-
</div>
|
|
1367
|
-
</div>
|
|
1368
|
-
</div>
|
|
1140
|
+
imports: [RouterModule, CommonModule, SmzStyleClassDirective, AppConfigurator, ComponentInjectorDirective, SmzTooltipDirective, SmzMenuListComponent, SmzButtonComponent],
|
|
1141
|
+
template: `
|
|
1142
|
+
@if (data(); as topbar) {
|
|
1143
|
+
<div class="layout-topbar">
|
|
1144
|
+
<div class="layout-topbar-logo-container">
|
|
1145
|
+
@if (topbar.showMenuToggle) {
|
|
1146
|
+
<button class="layout-menu-button layout-topbar-action" (click)="layoutService.onMenuToggle()">
|
|
1147
|
+
<i class="fa-solid fa-bars"></i>
|
|
1148
|
+
</button>
|
|
1149
|
+
}
|
|
1150
|
+
<a class="layout-topbar-logo" routerLink="/">
|
|
1151
|
+
@if (topbar.logoPath?.light && !layoutService.isDarkTheme()) {
|
|
1152
|
+
<img [src]="topbar.logoPath?.light" [alt]="topbar.logoPath?.light" class="max-h-9 min-h-8" />
|
|
1153
|
+
}
|
|
1154
|
+
@if (topbar.logoPath?.dark && layoutService.isDarkTheme()) {
|
|
1155
|
+
<img [src]="topbar.logoPath?.dark" [alt]="topbar.logoPath?.dark" class="max-h-9 min-h-8" />
|
|
1156
|
+
}
|
|
1157
|
+
</a>
|
|
1158
|
+
@if (topbar.appName) {
|
|
1159
|
+
<span class="layout-topbar-app-name">{{ topbar.appName }}</span>
|
|
1160
|
+
}
|
|
1161
|
+
</div>
|
|
1162
|
+
<div class="layout-topbar-left-actions">
|
|
1163
|
+
@if (topbar.showBackButton || pageTitleService.hasTitle()) {
|
|
1164
|
+
<span class="topbar-separator"></span>
|
|
1165
|
+
}
|
|
1166
|
+
@if (topbar.showBackButton && navigationService.canGoBackSignal()) {
|
|
1167
|
+
<button class="layout-menu-button layout-topbar-action" (click)="navigationService.goBack()">
|
|
1168
|
+
<i class="fa-solid fa-arrow-left"></i>
|
|
1169
|
+
</button>
|
|
1170
|
+
}
|
|
1171
|
+
@if (pageTitleService.hasTitle()) {
|
|
1172
|
+
<span class="layout-topbar-page-title">
|
|
1173
|
+
<span>{{ pageTitleService.title() }}</span>
|
|
1174
|
+
</span>
|
|
1175
|
+
}
|
|
1176
|
+
</div>
|
|
1177
|
+
<div class="layout-topbar-right-actions">
|
|
1178
|
+
<button class="layout-topbar-menu-button layout-topbar-action" smzStyleClass="@next" enterFromClass="hidden" enterActiveClass="animate-scalein" leaveToClass="hidden" leaveActiveClass="animate-fadeout" [hideOnOutsideClick]="true">
|
|
1179
|
+
<i class="fa-solid fa-ellipsis-vertical"></i>
|
|
1180
|
+
</button>
|
|
1181
|
+
<div class="layout-topbar-menu hidden lg:block">
|
|
1182
|
+
<div class="layout-topbar-menu-content">
|
|
1183
|
+
@for (item of topbar.menuItems; track item) {
|
|
1184
|
+
@if (item.component != null) {
|
|
1185
|
+
<ng-template [componentInjector]="item.component"></ng-template>
|
|
1186
|
+
}
|
|
1187
|
+
@else {
|
|
1188
|
+
<button type="button" class="layout-topbar-action" (click)="item.callback()" [routerLink]="item.routerLink" [smzTooltip]="item.tooltip">
|
|
1189
|
+
<i [ngClass]="item.icon"></i>
|
|
1190
|
+
<span>{{ item.label }}</span>
|
|
1191
|
+
</button>
|
|
1192
|
+
}
|
|
1193
|
+
}
|
|
1194
|
+
</div>
|
|
1195
|
+
</div>
|
|
1196
|
+
<div class="layout-config-menu">
|
|
1197
|
+
@if (topbar.showDarkModeToggle) {
|
|
1198
|
+
<button type="button" class="layout-topbar-action" (click)="toggleDarkMode()" smzTooltip="Dark/Light">
|
|
1199
|
+
<i [ngClass]="{ 'fa-solid': true, 'fa-moon': layoutService.isDarkTheme(), 'fa-sun': !layoutService.isDarkTheme() }"></i>
|
|
1200
|
+
</button>
|
|
1201
|
+
}
|
|
1202
|
+
@if (topbar.showConfigurator) {
|
|
1203
|
+
<div class="relative">
|
|
1204
|
+
<button class="layout-topbar-action layout-topbar-action-highlight" smzTooltip="Configurações" smzStyleClass="@next" enterFromClass="hidden" enterActiveClass="animate-scalein" leaveToClass="hidden" leaveActiveClass="animate-fadeout" [hideOnOutsideClick]="true">
|
|
1205
|
+
<i class="fa-solid fa-palette"></i>
|
|
1206
|
+
</button>
|
|
1207
|
+
<app-configurator></app-configurator>
|
|
1208
|
+
</div>
|
|
1209
|
+
}
|
|
1210
|
+
@if (topbar.showProfileMenu !== false) {
|
|
1211
|
+
@for (feature of topbar.features; track feature) {
|
|
1212
|
+
<ui-menu #menu [model]="feature.menuItems" [popup]="true"></ui-menu>
|
|
1213
|
+
@if (feature.avatar && feature.avatar() != null) {
|
|
1214
|
+
<img [src]="feature.avatar()" [alt]="feature.label" class="layout-topbar-action w-8 h-8 rounded-full" (click)="menu.toggle($event)" [smzTooltip]="feature.tooltip" (error)="handleMissingImage($event, feature.placeholder)"/>
|
|
1215
|
+
}
|
|
1216
|
+
@else {
|
|
1217
|
+
<button type="button" class="layout-topbar-action" (click)="menu.toggle($event)" [smzTooltip]="feature.tooltip">
|
|
1218
|
+
<i [ngClass]="feature.icon()"></i>
|
|
1219
|
+
</button>
|
|
1220
|
+
}
|
|
1221
|
+
}
|
|
1222
|
+
}
|
|
1223
|
+
</div>
|
|
1224
|
+
</div>
|
|
1225
|
+
</div>
|
|
1369
1226
|
}`
|
|
1370
1227
|
}]
|
|
1371
1228
|
}] });
|
|
@@ -1454,11 +1311,11 @@ class AppMenuitem {
|
|
|
1454
1311
|
<div class="layout-menuitem-root-text">{{ item.label }}</div>
|
|
1455
1312
|
}
|
|
1456
1313
|
@if ((!item.routerLink || item.items) && item.visible !== false) {
|
|
1457
|
-
<a [attr.href]="item.url" (click)="itemClick($event)" [ngClass]="item.styleClass" [attr.target]="item.target" tabindex="0"
|
|
1314
|
+
<a [attr.href]="item.url" (click)="itemClick($event)" [ngClass]="item.styleClass" [attr.target]="item.target" tabindex="0" smzRipple>
|
|
1458
1315
|
<i [ngClass]="item.icon" class="layout-menuitem-icon"></i>
|
|
1459
1316
|
<span class="layout-menuitem-text">{{ item.label }}</span>
|
|
1460
1317
|
@if (item.items) {
|
|
1461
|
-
<i class="
|
|
1318
|
+
<i class="fa-solid fa-fw fa-angle-down layout-submenu-toggler"></i>
|
|
1462
1319
|
}
|
|
1463
1320
|
</a>
|
|
1464
1321
|
}
|
|
@@ -1478,12 +1335,12 @@ class AppMenuitem {
|
|
|
1478
1335
|
[queryParams]="item.queryParams"
|
|
1479
1336
|
[attr.target]="item.target"
|
|
1480
1337
|
tabindex="0"
|
|
1481
|
-
|
|
1338
|
+
smzRipple
|
|
1482
1339
|
>
|
|
1483
1340
|
<i [ngClass]="item.icon" class="layout-menuitem-icon"></i>
|
|
1484
1341
|
<span class="layout-menuitem-text">{{ item.label }}</span>
|
|
1485
1342
|
@if (item.items) {
|
|
1486
|
-
<i class="
|
|
1343
|
+
<i class="fa-solid fa-fw fa-angle-down layout-submenu-toggler"></i>
|
|
1487
1344
|
}
|
|
1488
1345
|
</a>
|
|
1489
1346
|
}
|
|
@@ -1498,7 +1355,7 @@ class AppMenuitem {
|
|
|
1498
1355
|
</ul>
|
|
1499
1356
|
}
|
|
1500
1357
|
</ng-container>
|
|
1501
|
-
`, isInline: true, dependencies: [{ kind: "component", type: AppMenuitem, selector: "[app-menuitem]", inputs: ["item", "index", "root", "parentKey"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "
|
|
1358
|
+
`, isInline: true, dependencies: [{ kind: "component", type: AppMenuitem, selector: "[app-menuitem]", inputs: ["item", "index", "root", "parentKey"] }, { kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i3.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i1.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "directive", type: SmzRippleDirective, selector: "[smzRipple]" }], animations: [
|
|
1502
1359
|
trigger('children', [
|
|
1503
1360
|
state('collapsed', style({
|
|
1504
1361
|
height: '0'
|
|
@@ -1515,18 +1372,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
1515
1372
|
args: [{
|
|
1516
1373
|
// eslint-disable-next-line @angular-eslint/component-selector
|
|
1517
1374
|
selector: '[app-menuitem]',
|
|
1518
|
-
imports: [CommonModule, RouterModule,
|
|
1375
|
+
imports: [CommonModule, RouterModule, SmzRippleDirective],
|
|
1519
1376
|
template: `
|
|
1520
1377
|
<ng-container>
|
|
1521
1378
|
@if (root && item.visible !== false) {
|
|
1522
1379
|
<div class="layout-menuitem-root-text">{{ item.label }}</div>
|
|
1523
1380
|
}
|
|
1524
1381
|
@if ((!item.routerLink || item.items) && item.visible !== false) {
|
|
1525
|
-
<a [attr.href]="item.url" (click)="itemClick($event)" [ngClass]="item.styleClass" [attr.target]="item.target" tabindex="0"
|
|
1382
|
+
<a [attr.href]="item.url" (click)="itemClick($event)" [ngClass]="item.styleClass" [attr.target]="item.target" tabindex="0" smzRipple>
|
|
1526
1383
|
<i [ngClass]="item.icon" class="layout-menuitem-icon"></i>
|
|
1527
1384
|
<span class="layout-menuitem-text">{{ item.label }}</span>
|
|
1528
1385
|
@if (item.items) {
|
|
1529
|
-
<i class="
|
|
1386
|
+
<i class="fa-solid fa-fw fa-angle-down layout-submenu-toggler"></i>
|
|
1530
1387
|
}
|
|
1531
1388
|
</a>
|
|
1532
1389
|
}
|
|
@@ -1546,12 +1403,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
1546
1403
|
[queryParams]="item.queryParams"
|
|
1547
1404
|
[attr.target]="item.target"
|
|
1548
1405
|
tabindex="0"
|
|
1549
|
-
|
|
1406
|
+
smzRipple
|
|
1550
1407
|
>
|
|
1551
1408
|
<i [ngClass]="item.icon" class="layout-menuitem-icon"></i>
|
|
1552
1409
|
<span class="layout-menuitem-text">{{ item.label }}</span>
|
|
1553
1410
|
@if (item.items) {
|
|
1554
|
-
<i class="
|
|
1411
|
+
<i class="fa-solid fa-fw fa-angle-down layout-submenu-toggler"></i>
|
|
1555
1412
|
}
|
|
1556
1413
|
</a>
|
|
1557
1414
|
}
|
|
@@ -1841,29 +1698,29 @@ class AppFloatingConfigurator {
|
|
|
1841
1698
|
this.LayoutService.layoutConfig.update((state) => ({ ...state, darkTheme: !state.darkTheme }));
|
|
1842
1699
|
}
|
|
1843
1700
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AppFloatingConfigurator, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1844
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.1", type: AppFloatingConfigurator, isStandalone: true, selector: "app-floating-configurator", ngImport: i0, template: `
|
|
1845
|
-
<div class="fixed flex gap-4 top-8 right-8">
|
|
1846
|
-
<
|
|
1847
|
-
<div class="relative">
|
|
1848
|
-
<
|
|
1849
|
-
<app-configurator />
|
|
1850
|
-
</div>
|
|
1851
|
-
</div>
|
|
1852
|
-
`, isInline: true, dependencies: [{ kind: "
|
|
1701
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.1", type: AppFloatingConfigurator, isStandalone: true, selector: "app-floating-configurator", ngImport: i0, template: `
|
|
1702
|
+
<div class="fixed flex gap-4 top-8 right-8">
|
|
1703
|
+
<button smzButton type="button" (click)="toggleDarkMode()" [rounded]="true" [icon]="isDarkTheme() ? 'fa-solid fa-moon' : 'fa-solid fa-sun'" severity="secondary"></button>
|
|
1704
|
+
<div class="relative">
|
|
1705
|
+
<button smzButton icon="fa-solid fa-palette" smzStyleClass="@next" enterFromClass="hidden" enterActiveClass="animate-scalein" leaveToClass="hidden" leaveActiveClass="animate-fadeout" [hideOnOutsideClick]="true" type="button" rounded></button>
|
|
1706
|
+
<app-configurator />
|
|
1707
|
+
</div>
|
|
1708
|
+
</div>
|
|
1709
|
+
`, isInline: true, dependencies: [{ kind: "component", type: SmzButtonComponent, selector: "button[smzButton], a[smzButton]", inputs: ["label", "icon", "iconPosition", "severity", "variant", "size", "text", "outlined", "rounded", "loading", "styleClass"] }, { kind: "directive", type: SmzStyleClassDirective, selector: "[smzStyleClass]", inputs: ["smzStyleClass", "enterFromClass", "enterActiveClass", "enterToClass", "leaveFromClass", "leaveActiveClass", "leaveToClass", "hideOnOutsideClick", "toggleClass"] }, { kind: "component", type: AppConfigurator, selector: "app-configurator" }] });
|
|
1853
1710
|
}
|
|
1854
1711
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AppFloatingConfigurator, decorators: [{
|
|
1855
1712
|
type: Component,
|
|
1856
1713
|
args: [{
|
|
1857
1714
|
selector: 'app-floating-configurator',
|
|
1858
|
-
imports: [
|
|
1859
|
-
template: `
|
|
1860
|
-
<div class="fixed flex gap-4 top-8 right-8">
|
|
1861
|
-
<
|
|
1862
|
-
<div class="relative">
|
|
1863
|
-
<
|
|
1864
|
-
<app-configurator />
|
|
1865
|
-
</div>
|
|
1866
|
-
</div>
|
|
1715
|
+
imports: [SmzButtonComponent, SmzStyleClassDirective, AppConfigurator],
|
|
1716
|
+
template: `
|
|
1717
|
+
<div class="fixed flex gap-4 top-8 right-8">
|
|
1718
|
+
<button smzButton type="button" (click)="toggleDarkMode()" [rounded]="true" [icon]="isDarkTheme() ? 'fa-solid fa-moon' : 'fa-solid fa-sun'" severity="secondary"></button>
|
|
1719
|
+
<div class="relative">
|
|
1720
|
+
<button smzButton icon="fa-solid fa-palette" smzStyleClass="@next" enterFromClass="hidden" enterActiveClass="animate-scalein" leaveToClass="hidden" leaveActiveClass="animate-fadeout" [hideOnOutsideClick]="true" type="button" rounded></button>
|
|
1721
|
+
<app-configurator />
|
|
1722
|
+
</div>
|
|
1723
|
+
</div>
|
|
1867
1724
|
`
|
|
1868
1725
|
}]
|
|
1869
1726
|
}] });
|
|
@@ -1887,7 +1744,7 @@ class ErrorPagesConfigService {
|
|
|
1887
1744
|
]
|
|
1888
1745
|
},
|
|
1889
1746
|
access: {
|
|
1890
|
-
icon: '
|
|
1747
|
+
icon: 'fa-solid fa-fw fa-lock',
|
|
1891
1748
|
title: 'Acesso restrito',
|
|
1892
1749
|
message: 'Acesso restrito',
|
|
1893
1750
|
imagePath: 'assets/images/asset-access.svg',
|
|
@@ -1902,7 +1759,7 @@ class ErrorPagesConfigService {
|
|
|
1902
1759
|
]
|
|
1903
1760
|
},
|
|
1904
1761
|
error: {
|
|
1905
|
-
icon: '
|
|
1762
|
+
icon: 'fa-solid fa-fw fa-circle-exclamation',
|
|
1906
1763
|
title: 'Ocorreu um erro',
|
|
1907
1764
|
message: 'Ocorreu um erro ao carregar a página.',
|
|
1908
1765
|
imagePath: 'assets/images/asset-error.svg',
|
|
@@ -1949,7 +1806,7 @@ class AccessPageComponent {
|
|
|
1949
1806
|
<div class="col-12 mb-[2em] max-w-prose p-0 text-[1.4em] font-medium leading-relaxed text-text-color">{{ config.access.message }}</div>
|
|
1950
1807
|
<div class="grid grid-nogutter items-center justify-start gap-2">
|
|
1951
1808
|
@for (button of config.access.buttons; track button) {
|
|
1952
|
-
<
|
|
1809
|
+
<button smzButton [label]="button.label" [routerLink]="button.url" (click)="button.command()" class="mt-8" [severity]="button.severity"></button>
|
|
1953
1810
|
}
|
|
1954
1811
|
</div>
|
|
1955
1812
|
</div>
|
|
@@ -1959,14 +1816,14 @@ class AccessPageComponent {
|
|
|
1959
1816
|
<img class="m-0 h-screen w-full object-cover p-0" [src]="config.access.backgroundPath" alt="" />
|
|
1960
1817
|
</div>
|
|
1961
1818
|
</div>
|
|
1962
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "
|
|
1819
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: SmzButtonComponent, selector: "button[smzButton], a[smzButton]", inputs: ["label", "icon", "iconPosition", "severity", "variant", "size", "text", "outlined", "rounded", "loading", "styleClass"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] });
|
|
1963
1820
|
}
|
|
1964
1821
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: AccessPageComponent, decorators: [{
|
|
1965
1822
|
type: Component,
|
|
1966
1823
|
args: [{
|
|
1967
1824
|
selector: 'app-access',
|
|
1968
1825
|
standalone: true,
|
|
1969
|
-
imports: [CommonModule,
|
|
1826
|
+
imports: [CommonModule, SmzButtonComponent, RouterModule, SmzRippleDirective, SmzButtonComponent],
|
|
1970
1827
|
template: `
|
|
1971
1828
|
<div class="relative m-0 grid h-screen w-screen items-center justify-center overflow-hidden p-0">
|
|
1972
1829
|
|
|
@@ -1977,7 +1834,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
1977
1834
|
<div class="col-12 mb-[2em] max-w-prose p-0 text-[1.4em] font-medium leading-relaxed text-text-color">{{ config.access.message }}</div>
|
|
1978
1835
|
<div class="grid grid-nogutter items-center justify-start gap-2">
|
|
1979
1836
|
@for (button of config.access.buttons; track button) {
|
|
1980
|
-
<
|
|
1837
|
+
<button smzButton [label]="button.label" [routerLink]="button.url" (click)="button.command()" class="mt-8" [severity]="button.severity"></button>
|
|
1981
1838
|
}
|
|
1982
1839
|
</div>
|
|
1983
1840
|
</div>
|
|
@@ -2004,7 +1861,7 @@ class ErrorPageComponent {
|
|
|
2004
1861
|
<div class="col-12 mb-[2em] max-w-prose p-0 text-[1.4em] font-medium leading-relaxed text-text-color">{{ config.error.message }}</div>
|
|
2005
1862
|
<div class="grid grid-nogutter items-center justify-start gap-2">
|
|
2006
1863
|
@for (button of config.error.buttons; track button) {
|
|
2007
|
-
<
|
|
1864
|
+
<button smzButton [label]="button.label" [routerLink]="button.url" (click)="button.command()" class="mt-8" [severity]="button.severity"></button>
|
|
2008
1865
|
}
|
|
2009
1866
|
</div>
|
|
2010
1867
|
</div>
|
|
@@ -2014,13 +1871,13 @@ class ErrorPageComponent {
|
|
|
2014
1871
|
<img class="m-0 h-screen w-full object-cover p-0" [src]="config.error.backgroundPath" alt="" />
|
|
2015
1872
|
</div>
|
|
2016
1873
|
</div>
|
|
2017
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "
|
|
1874
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: SmzButtonComponent, selector: "button[smzButton], a[smzButton]", inputs: ["label", "icon", "iconPosition", "severity", "variant", "size", "text", "outlined", "rounded", "loading", "styleClass"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] });
|
|
2018
1875
|
}
|
|
2019
1876
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: ErrorPageComponent, decorators: [{
|
|
2020
1877
|
type: Component,
|
|
2021
1878
|
args: [{
|
|
2022
1879
|
selector: 'app-error',
|
|
2023
|
-
imports: [CommonModule,
|
|
1880
|
+
imports: [CommonModule, SmzButtonComponent, SmzRippleDirective, RouterModule, SmzButtonComponent],
|
|
2024
1881
|
standalone: true,
|
|
2025
1882
|
template: `
|
|
2026
1883
|
<div class="relative m-0 grid h-screen w-screen items-center justify-center overflow-hidden p-0">
|
|
@@ -2032,7 +1889,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
2032
1889
|
<div class="col-12 mb-[2em] max-w-prose p-0 text-[1.4em] font-medium leading-relaxed text-text-color">{{ config.error.message }}</div>
|
|
2033
1890
|
<div class="grid grid-nogutter items-center justify-start gap-2">
|
|
2034
1891
|
@for (button of config.error.buttons; track button) {
|
|
2035
|
-
<
|
|
1892
|
+
<button smzButton [label]="button.label" [routerLink]="button.url" (click)="button.command()" class="mt-8" [severity]="button.severity"></button>
|
|
2036
1893
|
}
|
|
2037
1894
|
</div>
|
|
2038
1895
|
</div>
|
|
@@ -2079,13 +1936,7 @@ class NotfoundPageComponent {
|
|
|
2079
1936
|
|
|
2080
1937
|
<div class="col-12 grid grid-nogutter items-center justify-start gap-2">
|
|
2081
1938
|
@for (button of config.notfound.buttons; track button.url) {
|
|
2082
|
-
<
|
|
2083
|
-
[label]="button.label"
|
|
2084
|
-
[routerLink]="button.url"
|
|
2085
|
-
(onClick)="button.command()"
|
|
2086
|
-
class="mt-8"
|
|
2087
|
-
[severity]="button.severity"
|
|
2088
|
-
/>
|
|
1939
|
+
<button smzButton [label]="button.label" [routerLink]="button.url" (click)="button.command()" class="mt-8" [severity]="button.severity"></button>
|
|
2089
1940
|
}
|
|
2090
1941
|
</div>
|
|
2091
1942
|
</div>
|
|
@@ -2099,14 +1950,14 @@ class NotfoundPageComponent {
|
|
|
2099
1950
|
/>
|
|
2100
1951
|
</div>
|
|
2101
1952
|
</div>
|
|
2102
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "
|
|
1953
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i1.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: SmzButtonComponent, selector: "button[smzButton], a[smzButton]", inputs: ["label", "icon", "iconPosition", "severity", "variant", "size", "text", "outlined", "rounded", "loading", "styleClass"] }] });
|
|
2103
1954
|
}
|
|
2104
1955
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImport: i0, type: NotfoundPageComponent, decorators: [{
|
|
2105
1956
|
type: Component,
|
|
2106
1957
|
args: [{
|
|
2107
1958
|
selector: 'app-notfound',
|
|
2108
1959
|
standalone: true,
|
|
2109
|
-
imports: [CommonModule, RouterModule,
|
|
1960
|
+
imports: [CommonModule, RouterModule, SmzButtonComponent, SmzRippleDirective],
|
|
2110
1961
|
template: `
|
|
2111
1962
|
<div class="relative m-0 grid h-screen w-screen items-center justify-center overflow-hidden p-0">
|
|
2112
1963
|
|
|
@@ -2137,13 +1988,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.1", ngImpor
|
|
|
2137
1988
|
|
|
2138
1989
|
<div class="col-12 grid grid-nogutter items-center justify-start gap-2">
|
|
2139
1990
|
@for (button of config.notfound.buttons; track button.url) {
|
|
2140
|
-
<
|
|
2141
|
-
[label]="button.label"
|
|
2142
|
-
[routerLink]="button.url"
|
|
2143
|
-
(onClick)="button.command()"
|
|
2144
|
-
class="mt-8"
|
|
2145
|
-
[severity]="button.severity"
|
|
2146
|
-
/>
|
|
1991
|
+
<button smzButton [label]="button.label" [routerLink]="button.url" (click)="button.command()" class="mt-8" [severity]="button.severity"></button>
|
|
2147
1992
|
}
|
|
2148
1993
|
</div>
|
|
2149
1994
|
</div>
|