@ngx-smz/layout 21.10.0-next.26 → 21.10.0-next.27
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-layout-errors.entry-Bpp0Hw8y.mjs +49 -0
- package/fesm2022/ngx-smz-layout-layout-errors.entry-Bpp0Hw8y.mjs.map +1 -0
- package/fesm2022/ngx-smz-layout-layout-footer.entry-CbNgTe0l.mjs +51 -0
- package/fesm2022/ngx-smz-layout-layout-footer.entry-CbNgTe0l.mjs.map +1 -0
- package/fesm2022/ngx-smz-layout-layout-gallery.fixtures-yel7nOYX.mjs +300 -0
- package/fesm2022/ngx-smz-layout-layout-gallery.fixtures-yel7nOYX.mjs.map +1 -0
- package/fesm2022/ngx-smz-layout-layout-menu.entry-BAzglN_V.mjs +99 -0
- package/fesm2022/ngx-smz-layout-layout-menu.entry-BAzglN_V.mjs.map +1 -0
- package/fesm2022/ngx-smz-layout-layout-shell.entry-CWxnFneU.mjs +78 -0
- package/fesm2022/ngx-smz-layout-layout-shell.entry-CWxnFneU.mjs.map +1 -0
- package/fesm2022/ngx-smz-layout-layout-topbar.entry-CfSpHt5E.mjs +164 -0
- package/fesm2022/ngx-smz-layout-layout-topbar.entry-CfSpHt5E.mjs.map +1 -0
- package/fesm2022/ngx-smz-layout-ngx-smz-layout-BEHAEWgI.mjs +2058 -0
- package/fesm2022/ngx-smz-layout-ngx-smz-layout-BEHAEWgI.mjs.map +1 -0
- package/fesm2022/ngx-smz-layout.mjs +1 -2032
- package/fesm2022/ngx-smz-layout.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/layout/gallery-stage.scss +36 -0
- package/types/ngx-smz-layout.d.ts +11 -1
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { SMZ_GALLERY_SCENE, SmzGalleryCaseComponent, SmzGallerySectionComponent } from '@ngx-smz/core';
|
|
4
|
+
import { f as GALLERY_ERRORS_FULL, h as GALLERY_ERRORS, S as SmzLayoutGalleryStageComponent } from './ngx-smz-layout-layout-gallery.fixtures-yel7nOYX.mjs';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Galeria: páginas de erro, acesso restrito e não encontrada. As páginas são `w-screen h-screen`, então cada
|
|
8
|
+
* cena desenha uma delas no tamanho da viewport e reduz à metade dentro da caixa. A imagem de fundo
|
|
9
|
+
* (`backgroundPath`) é um SVG embutido.
|
|
10
|
+
*/
|
|
11
|
+
class LayoutErrorsGalleryEntryComponent {
|
|
12
|
+
scene = inject(SMZ_GALLERY_SCENE);
|
|
13
|
+
scenes = {
|
|
14
|
+
default: { section: 'Erro', label: 'ErrorPageComponent · um botão danger', piece: 'error', config: { errors: GALLERY_ERRORS } },
|
|
15
|
+
'error-buttons': { section: 'Erro com vários botões', label: 'ErrorPageComponent · todas as severidades de botão', piece: 'error', config: { errors: GALLERY_ERRORS_FULL } },
|
|
16
|
+
access: { section: 'Acesso restrito', label: 'AccessPageComponent', piece: 'access', config: { errors: GALLERY_ERRORS } },
|
|
17
|
+
notfound: { section: 'Não encontrada', label: 'NotfoundPageComponent · sem atalhos', piece: 'notfound', config: { errors: GALLERY_ERRORS } },
|
|
18
|
+
'notfound-links': { section: 'Não encontrada com atalhos', label: 'NotfoundPageComponent · links e dois botões', piece: 'notfound', config: { errors: GALLERY_ERRORS_FULL } },
|
|
19
|
+
};
|
|
20
|
+
// A entrada é recriada a cada troca de cena (o host da galeria recarrega o componente).
|
|
21
|
+
current = this.scenes[this.scene()] ?? this.scenes['default'];
|
|
22
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: LayoutErrorsGalleryEntryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
23
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.5", type: LayoutErrorsGalleryEntryComponent, isStandalone: true, selector: "smz-gallery-layout-errors-entry", host: { classAttribute: "flex flex-col gap-8" }, ngImport: i0, template: `
|
|
24
|
+
<smz-gallery-section [label]="current.section" [columns]="1">
|
|
25
|
+
<smz-gallery-case [label]="current.label">
|
|
26
|
+
<smz-gallery-layout-stage width="100vw" height="100vh" [piece]="current.piece" [scale]="0.5" [config]="current.config" />
|
|
27
|
+
</smz-gallery-case>
|
|
28
|
+
</smz-gallery-section>
|
|
29
|
+
`, isInline: true, dependencies: [{ kind: "component", type: SmzGalleryCaseComponent, selector: "smz-gallery-case", inputs: ["label", "force", "target"] }, { kind: "component", type: SmzGallerySectionComponent, selector: "smz-gallery-section", inputs: ["label", "columns"] }, { kind: "component", type: SmzLayoutGalleryStageComponent, selector: "smz-gallery-layout-stage", inputs: ["piece", "config", "width", "height", "scale"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
30
|
+
}
|
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: LayoutErrorsGalleryEntryComponent, decorators: [{
|
|
32
|
+
type: Component,
|
|
33
|
+
args: [{
|
|
34
|
+
selector: 'smz-gallery-layout-errors-entry',
|
|
35
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
36
|
+
imports: [SmzGalleryCaseComponent, SmzGallerySectionComponent, SmzLayoutGalleryStageComponent],
|
|
37
|
+
host: { class: 'flex flex-col gap-8' },
|
|
38
|
+
template: `
|
|
39
|
+
<smz-gallery-section [label]="current.section" [columns]="1">
|
|
40
|
+
<smz-gallery-case [label]="current.label">
|
|
41
|
+
<smz-gallery-layout-stage width="100vw" height="100vh" [piece]="current.piece" [scale]="0.5" [config]="current.config" />
|
|
42
|
+
</smz-gallery-case>
|
|
43
|
+
</smz-gallery-section>
|
|
44
|
+
`,
|
|
45
|
+
}]
|
|
46
|
+
}] });
|
|
47
|
+
|
|
48
|
+
export { LayoutErrorsGalleryEntryComponent };
|
|
49
|
+
//# sourceMappingURL=ngx-smz-layout-layout-errors.entry-Bpp0Hw8y.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-smz-layout-layout-errors.entry-Bpp0Hw8y.mjs","sources":["../../../projects/ngx-smz-ui-layout/src/lib/gallery/entries/layout-errors.entry.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { SMZ_GALLERY_SCENE, SmzGalleryCaseComponent, SmzGallerySectionComponent } from '@ngx-smz/core';\nimport { SmzLayoutGalleryPiece, SmzLayoutGalleryStageComponent, SmzLayoutGalleryStageConfig } from '../layout-gallery-stage.component';\nimport { GALLERY_ERRORS, GALLERY_ERRORS_FULL } from '../layout-gallery.fixtures';\n\ninterface ErrorScene {\n section: string;\n label: string;\n piece: SmzLayoutGalleryPiece;\n config: SmzLayoutGalleryStageConfig;\n}\n\n/**\n * Galeria: páginas de erro, acesso restrito e não encontrada. As páginas são `w-screen h-screen`, então cada\n * cena desenha uma delas no tamanho da viewport e reduz à metade dentro da caixa. A imagem de fundo\n * (`backgroundPath`) é um SVG embutido.\n */\n@Component({\n selector: 'smz-gallery-layout-errors-entry',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [SmzGalleryCaseComponent, SmzGallerySectionComponent, SmzLayoutGalleryStageComponent],\n host: { class: 'flex flex-col gap-8' },\n template: `\n <smz-gallery-section [label]=\"current.section\" [columns]=\"1\">\n <smz-gallery-case [label]=\"current.label\">\n <smz-gallery-layout-stage width=\"100vw\" height=\"100vh\" [piece]=\"current.piece\" [scale]=\"0.5\" [config]=\"current.config\" />\n </smz-gallery-case>\n </smz-gallery-section>\n `,\n})\nexport class LayoutErrorsGalleryEntryComponent {\n protected readonly scene = inject(SMZ_GALLERY_SCENE);\n\n private readonly scenes: Record<string, ErrorScene> = {\n default: { section: 'Erro', label: 'ErrorPageComponent · um botão danger', piece: 'error', config: { errors: GALLERY_ERRORS } },\n 'error-buttons': { section: 'Erro com vários botões', label: 'ErrorPageComponent · todas as severidades de botão', piece: 'error', config: { errors: GALLERY_ERRORS_FULL } },\n access: { section: 'Acesso restrito', label: 'AccessPageComponent', piece: 'access', config: { errors: GALLERY_ERRORS } },\n notfound: { section: 'Não encontrada', label: 'NotfoundPageComponent · sem atalhos', piece: 'notfound', config: { errors: GALLERY_ERRORS } },\n 'notfound-links': { section: 'Não encontrada com atalhos', label: 'NotfoundPageComponent · links e dois botões', piece: 'notfound', config: { errors: GALLERY_ERRORS_FULL } },\n };\n\n // A entrada é recriada a cada troca de cena (o host da galeria recarrega o componente).\n protected readonly current = this.scenes[this.scene()] ?? this.scenes['default'];\n}\n"],"names":[],"mappings":";;;;;AAYA;;;;AAIG;MAcU,iCAAiC,CAAA;AACzB,IAAA,KAAK,GAAG,MAAM,CAAC,iBAAiB,CAAC;AAEnC,IAAA,MAAM,GAA+B;QACpD,OAAO,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,sCAAsC,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE,EAAE;QAC/H,eAAe,EAAE,EAAE,OAAO,EAAE,wBAAwB,EAAE,KAAK,EAAE,oDAAoD,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,mBAAmB,EAAE,EAAE;QAC5K,MAAM,EAAE,EAAE,OAAO,EAAE,iBAAiB,EAAE,KAAK,EAAE,qBAAqB,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE,EAAE;QACzH,QAAQ,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,qCAAqC,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE,EAAE;QAC5I,gBAAgB,EAAE,EAAE,OAAO,EAAE,4BAA4B,EAAE,KAAK,EAAE,6CAA6C,EAAE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AA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,iCAAiC;oBAC3C,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,OAAO,EAAE,CAAC,uBAAuB,EAAE,0BAA0B,EAAE,8BAA8B,CAAC;AAC9F,oBAAA,IAAI,EAAE,EAAE,KAAK,EAAE,qBAAqB,EAAE;AACtC,oBAAA,QAAQ,EAAE;;;;;;AAMT,EAAA,CAAA;AACF,iBAAA;;;;;"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { SmzGalleryCaseComponent, SmzGallerySectionComponent } from '@ngx-smz/core';
|
|
4
|
+
import { c as GALLERY_LOGO, S as SmzLayoutGalleryStageComponent } from './ngx-smz-layout-layout-gallery.fixtures-yel7nOYX.mjs';
|
|
5
|
+
|
|
6
|
+
/** Galeria: rodapé (`app-footer`), um caso por combinação do contrato `Footer`. O logotipo segue o modo claro/escuro. */
|
|
7
|
+
class LayoutFooterGalleryEntryComponent {
|
|
8
|
+
cases = [
|
|
9
|
+
{ label: 'vazio (só a linha superior)', config: { footer: {} } },
|
|
10
|
+
{ label: 'versão', config: { footer: { version: 'v21.10.0' } } },
|
|
11
|
+
{ label: 'copyright', config: { footer: { copyright: '© 2026 Gestão Comercial' } } },
|
|
12
|
+
{ label: 'versão e copyright', config: { footer: { version: 'v21.10.0', copyright: '© 2026 Gestão Comercial' } } },
|
|
13
|
+
{ label: 'logotipo à esquerda e versão', config: { footer: { leftLogoPath: GALLERY_LOGO, version: 'v21.10.0' } } },
|
|
14
|
+
{ label: 'logotipo à direita', config: { footer: { rightLogoPath: GALLERY_LOGO } } },
|
|
15
|
+
{
|
|
16
|
+
label: 'completo: logotipos à esquerda e à direita, versão e copyright',
|
|
17
|
+
config: { footer: { leftLogoPath: GALLERY_LOGO, rightLogoPath: GALLERY_LOGO, version: 'v21.10.0', copyright: '© 2026 Gestão Comercial' } },
|
|
18
|
+
},
|
|
19
|
+
];
|
|
20
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: LayoutFooterGalleryEntryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
21
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.5", type: LayoutFooterGalleryEntryComponent, isStandalone: true, selector: "smz-gallery-layout-footer-entry", host: { classAttribute: "flex flex-col gap-8" }, ngImport: i0, template: `
|
|
22
|
+
<smz-gallery-section label="Rodapé" [columns]="1">
|
|
23
|
+
@for (item of cases; track item.label) {
|
|
24
|
+
<smz-gallery-case [label]="item.label">
|
|
25
|
+
<smz-gallery-layout-stage piece="footer" [config]="item.config" />
|
|
26
|
+
</smz-gallery-case>
|
|
27
|
+
}
|
|
28
|
+
</smz-gallery-section>
|
|
29
|
+
`, isInline: true, dependencies: [{ kind: "component", type: SmzGalleryCaseComponent, selector: "smz-gallery-case", inputs: ["label", "force", "target"] }, { kind: "component", type: SmzGallerySectionComponent, selector: "smz-gallery-section", inputs: ["label", "columns"] }, { kind: "component", type: SmzLayoutGalleryStageComponent, selector: "smz-gallery-layout-stage", inputs: ["piece", "config", "width", "height", "scale"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
30
|
+
}
|
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: LayoutFooterGalleryEntryComponent, decorators: [{
|
|
32
|
+
type: Component,
|
|
33
|
+
args: [{
|
|
34
|
+
selector: 'smz-gallery-layout-footer-entry',
|
|
35
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
36
|
+
imports: [SmzGalleryCaseComponent, SmzGallerySectionComponent, SmzLayoutGalleryStageComponent],
|
|
37
|
+
host: { class: 'flex flex-col gap-8' },
|
|
38
|
+
template: `
|
|
39
|
+
<smz-gallery-section label="Rodapé" [columns]="1">
|
|
40
|
+
@for (item of cases; track item.label) {
|
|
41
|
+
<smz-gallery-case [label]="item.label">
|
|
42
|
+
<smz-gallery-layout-stage piece="footer" [config]="item.config" />
|
|
43
|
+
</smz-gallery-case>
|
|
44
|
+
}
|
|
45
|
+
</smz-gallery-section>
|
|
46
|
+
`,
|
|
47
|
+
}]
|
|
48
|
+
}] });
|
|
49
|
+
|
|
50
|
+
export { LayoutFooterGalleryEntryComponent };
|
|
51
|
+
//# sourceMappingURL=ngx-smz-layout-layout-footer.entry-CbNgTe0l.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-smz-layout-layout-footer.entry-CbNgTe0l.mjs","sources":["../../../projects/ngx-smz-ui-layout/src/lib/gallery/entries/layout-footer.entry.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { SmzGalleryCaseComponent, SmzGallerySectionComponent } from '@ngx-smz/core';\nimport { SmzLayoutGalleryStageComponent, SmzLayoutGalleryStageConfig } from '../layout-gallery-stage.component';\nimport { GALLERY_LOGO } from '../layout-gallery.fixtures';\n\ninterface FooterCase {\n label: string;\n config: SmzLayoutGalleryStageConfig;\n}\n\n/** Galeria: rodapé (`app-footer`), um caso por combinação do contrato `Footer`. O logotipo segue o modo claro/escuro. */\n@Component({\n selector: 'smz-gallery-layout-footer-entry',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [SmzGalleryCaseComponent, SmzGallerySectionComponent, SmzLayoutGalleryStageComponent],\n host: { class: 'flex flex-col gap-8' },\n template: `\n <smz-gallery-section label=\"Rodapé\" [columns]=\"1\">\n @for (item of cases; track item.label) {\n <smz-gallery-case [label]=\"item.label\">\n <smz-gallery-layout-stage piece=\"footer\" [config]=\"item.config\" />\n </smz-gallery-case>\n }\n </smz-gallery-section>\n `,\n})\nexport class LayoutFooterGalleryEntryComponent {\n protected readonly cases: FooterCase[] = [\n { label: 'vazio (só a linha superior)', config: { footer: {} } },\n { label: 'versão', config: { footer: { version: 'v21.10.0' } } },\n { label: 'copyright', config: { footer: { copyright: '© 2026 Gestão Comercial' } } },\n { label: 'versão e copyright', config: { footer: { version: 'v21.10.0', copyright: '© 2026 Gestão Comercial' } } },\n { label: 'logotipo à esquerda e versão', config: { footer: { leftLogoPath: GALLERY_LOGO, version: 'v21.10.0' } } },\n { label: 'logotipo à direita', config: { footer: { rightLogoPath: GALLERY_LOGO } } },\n {\n label: 'completo: logotipos à esquerda e à direita, versão e copyright',\n config: { footer: { leftLogoPath: GALLERY_LOGO, rightLogoPath: GALLERY_LOGO, version: 'v21.10.0', copyright: '© 2026 Gestão Comercial' } },\n },\n ];\n}\n"],"names":[],"mappings":";;;;;AAUA;MAgBa,iCAAiC,CAAA;AACzB,IAAA,KAAK,GAAiB;QACvC,EAAE,KAAK,EAAE,6BAA6B,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE;AAChE,QAAA,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,EAAE;AAChE,QAAA,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,EAAE,SAAS,EAAE,yBAAyB,EAAE,EAAE,EAAE;AACpF,QAAA,EAAE,KAAK,EAAE,oBAAoB,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,yBAAyB,EAAE,EAAE,EAAE;AAClH,QAAA,EAAE,KAAK,EAAE,8BAA8B,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,EAAE,YAAY,EAAE,YAAY,EAAE,OAAO,EAAE,UAAU,EAAE,EAAE,EAAE;AAClH,QAAA,EAAE,KAAK,EAAE,oBAAoB,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,EAAE,aAAa,EAAE,YAAY,EAAE,EAAE,EAAE;AACpF,QAAA;AACE,YAA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,CAAA;AACT,oBAAA,QAAQ,EAAE,iCAAiC;oBAC3C,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,OAAO,EAAE,CAAC,uBAAuB,EAAE,0BAA0B,EAAE,8BAA8B,CAAC;AAC9F,oBAAA,IAAI,EAAE,EAAE,KAAK,EAAE,qBAAqB,EAAE;AACtC,oBAAA,QAAQ,EAAE;;;;;;;;AAQT,EAAA,CAAA;AACF,iBAAA;;;;;"}
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
import { NgComponentOutlet } from '@angular/common';
|
|
2
|
+
import * as i0 from '@angular/core';
|
|
3
|
+
import { input, computed, inject, Injector, ChangeDetectorRef, DestroyRef, afterRenderEffect, signal, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
4
|
+
import { SmzThemeService } from '@ngx-smz/ui-kit';
|
|
5
|
+
import { N as NotfoundPageComponent, A as AccessPageComponent, E as ErrorPageComponent, a as AppFooter, b as AppSidebar, c as AppTopbar, d as AppLayout, S as SMZ_UI_LAYOUT_CONFIG, L as LayoutService, e as SmzUILayout, P as PageTitleService, f as NavigationService, g as ErrorPagesConfigService } from './ngx-smz-layout-ngx-smz-layout-BEHAEWgI.mjs';
|
|
6
|
+
|
|
7
|
+
const PIECES = {
|
|
8
|
+
layout: AppLayout,
|
|
9
|
+
topbar: AppTopbar,
|
|
10
|
+
sidebar: AppSidebar,
|
|
11
|
+
footer: AppFooter,
|
|
12
|
+
error: ErrorPageComponent,
|
|
13
|
+
access: AccessPageComponent,
|
|
14
|
+
notfound: NotfoundPageComponent,
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Palco da galeria para as peças do shell: renderiza uma peça dentro de uma caixa com borda, com a
|
|
18
|
+
* configuração do layout fornecida por um injector próprio (o app da galeria não precisa de
|
|
19
|
+
* `configureSmzUILayout()`), de modo que cada caso tem o seu `LayoutService`.
|
|
20
|
+
*
|
|
21
|
+
* A caixa interna tem `transform`, então os filhos com `position: fixed` (topbar, sidebar, máscara) ficam
|
|
22
|
+
* presos nela. Com `scale` diferente de 1, `width` e `height` devem ser em unidades de viewport: a peça é
|
|
23
|
+
* desenhada nesse tamanho e reduzida (páginas de erro, que são `w-screen h-screen`).
|
|
24
|
+
*/
|
|
25
|
+
class SmzLayoutGalleryStageComponent {
|
|
26
|
+
piece = input.required(...(ngDevMode ? [{ debugName: "piece" }] : /* istanbul ignore next */ []));
|
|
27
|
+
config = input({}, ...(ngDevMode ? [{ debugName: "config" }] : /* istanbul ignore next */ []));
|
|
28
|
+
width = input('100%', ...(ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []));
|
|
29
|
+
height = input('auto', ...(ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []));
|
|
30
|
+
scale = input(1, ...(ngDevMode ? [{ debugName: "scale" }] : /* istanbul ignore next */ []));
|
|
31
|
+
component = computed(() => PIECES[this.piece()], ...(ngDevMode ? [{ debugName: "component" }] : /* istanbul ignore next */ []));
|
|
32
|
+
scaled = computed(() => this.scale() !== 1, ...(ngDevMode ? [{ debugName: "scaled" }] : /* istanbul ignore next */ []));
|
|
33
|
+
boxWidth = computed(() => (this.scaled() ? `calc(${this.width()} * ${this.scale()})` : this.width()), ...(ngDevMode ? [{ debugName: "boxWidth" }] : /* istanbul ignore next */ []));
|
|
34
|
+
boxHeight = computed(() => (this.scaled() ? `calc(${this.height()} * ${this.scale()})` : this.height()), ...(ngDevMode ? [{ debugName: "boxHeight" }] : /* istanbul ignore next */ []));
|
|
35
|
+
transform = computed(() => (this.scaled() ? `scale(${this.scale()})` : 'translateZ(0)'), ...(ngDevMode ? [{ debugName: "transform" }] : /* istanbul ignore next */ []));
|
|
36
|
+
injector = computed(() => this.createInjector(this.config(), this.theme.mode() === 'dark' || this.theme.isDark()), ...(ngDevMode ? [{ debugName: "injector" }] : /* istanbul ignore next */ []));
|
|
37
|
+
theme = inject(SmzThemeService);
|
|
38
|
+
parent = inject(Injector);
|
|
39
|
+
changeDetector = inject(ChangeDetectorRef);
|
|
40
|
+
created = [];
|
|
41
|
+
constructor() {
|
|
42
|
+
inject(DestroyRef).onDestroy(() => this.created.forEach((injector) => injector.destroy()));
|
|
43
|
+
// `AppMenuitem` marca o item ativo dentro de um `Promise.then`, sem sinal nem `markForCheck`. Sem zone.js
|
|
44
|
+
// isso não é desenhado; esta volta extra de detecção garante o submenu da rota ativa expandido na captura.
|
|
45
|
+
afterRenderEffect(() => {
|
|
46
|
+
this.injector();
|
|
47
|
+
queueMicrotask(() => this.changeDetector.markForCheck());
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
createInjector(config, dark) {
|
|
51
|
+
const feature = {
|
|
52
|
+
sidebar: signal(config.sidebar ?? []),
|
|
53
|
+
footer: signal(config.footer ?? {}),
|
|
54
|
+
topbar: signal(config.topbar ?? {}),
|
|
55
|
+
// Sem `primary`/`surface`: o configurador não reaplica paleta sobre o tema da galeria.
|
|
56
|
+
layout: signal({ menuMode: 'static', darkTheme: dark, ...config.layout }),
|
|
57
|
+
state: signal({
|
|
58
|
+
staticMenuDesktopInactive: false,
|
|
59
|
+
overlayMenuActive: false,
|
|
60
|
+
configSidebarVisible: false,
|
|
61
|
+
staticMenuMobileActive: false,
|
|
62
|
+
menuHoverActive: false,
|
|
63
|
+
...config.state,
|
|
64
|
+
}),
|
|
65
|
+
hasClaim: config.hasClaim,
|
|
66
|
+
};
|
|
67
|
+
const pageTitle = {
|
|
68
|
+
title: signal(config.pageTitle ?? ''),
|
|
69
|
+
hasTitle: signal(config.pageTitle != null),
|
|
70
|
+
};
|
|
71
|
+
const navigation = {
|
|
72
|
+
canGoBackSignal: () => config.canGoBack === true,
|
|
73
|
+
goBack: () => { },
|
|
74
|
+
};
|
|
75
|
+
const injector = Injector.create({
|
|
76
|
+
parent: this.parent,
|
|
77
|
+
providers: [
|
|
78
|
+
{ provide: SMZ_UI_LAYOUT_CONFIG, useValue: feature },
|
|
79
|
+
LayoutService,
|
|
80
|
+
{
|
|
81
|
+
provide: SmzUILayout,
|
|
82
|
+
useFactory: () => {
|
|
83
|
+
const layout = new SmzUILayout();
|
|
84
|
+
layout.setConfig(feature);
|
|
85
|
+
return layout;
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
{ provide: PageTitleService, useValue: pageTitle },
|
|
89
|
+
{ provide: NavigationService, useValue: navigation },
|
|
90
|
+
{
|
|
91
|
+
provide: ErrorPagesConfigService,
|
|
92
|
+
useFactory: () => {
|
|
93
|
+
const errors = new ErrorPagesConfigService();
|
|
94
|
+
errors.updateConfig(config.errors ?? {});
|
|
95
|
+
return errors;
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
],
|
|
99
|
+
});
|
|
100
|
+
this.created.push(injector);
|
|
101
|
+
return injector;
|
|
102
|
+
}
|
|
103
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: SmzLayoutGalleryStageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
104
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.5", type: SmzLayoutGalleryStageComponent, isStandalone: true, selector: "smz-gallery-layout-stage", inputs: { piece: { classPropertyName: "piece", publicName: "piece", isSignal: true, isRequired: true, transformFunction: null }, config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, scale: { classPropertyName: "scale", publicName: "scale", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "block w-full min-w-0" }, ngImport: i0, template: `
|
|
105
|
+
<div class="relative max-w-full overflow-hidden border border-ui-line" data-smz-gallery-layout-stage [style.width]="boxWidth()" [style.height]="boxHeight()">
|
|
106
|
+
<div [style.width]="scaled() ? width() : '100%'" [style.height]="scaled() ? height() : '100%'" [style.transform]="transform()" [style.transform-origin]="'top left'">
|
|
107
|
+
<ng-container [ngComponentOutlet]="component()" [ngComponentOutletInjector]="injector()" />
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule"], exportAs: ["ngComponentOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
111
|
+
}
|
|
112
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: SmzLayoutGalleryStageComponent, decorators: [{
|
|
113
|
+
type: Component,
|
|
114
|
+
args: [{
|
|
115
|
+
selector: 'smz-gallery-layout-stage',
|
|
116
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
117
|
+
imports: [NgComponentOutlet],
|
|
118
|
+
host: { class: 'block w-full min-w-0' },
|
|
119
|
+
template: `
|
|
120
|
+
<div class="relative max-w-full overflow-hidden border border-ui-line" data-smz-gallery-layout-stage [style.width]="boxWidth()" [style.height]="boxHeight()">
|
|
121
|
+
<div [style.width]="scaled() ? width() : '100%'" [style.height]="scaled() ? height() : '100%'" [style.transform]="transform()" [style.transform-origin]="'top left'">
|
|
122
|
+
<ng-container [ngComponentOutlet]="component()" [ngComponentOutletInjector]="injector()" />
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
`,
|
|
126
|
+
}]
|
|
127
|
+
}], ctorParameters: () => [], propDecorators: { piece: [{ type: i0.Input, args: [{ isSignal: true, alias: "piece", required: true }] }], config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], width: [{ type: i0.Input, args: [{ isSignal: true, alias: "width", required: false }] }], height: [{ type: i0.Input, args: [{ isSignal: true, alias: "height", required: false }] }], scale: [{ type: i0.Input, args: [{ isSignal: true, alias: "scale", required: false }] }] } });
|
|
128
|
+
|
|
129
|
+
/** Dados fixos compartilhados pelas entradas da galeria do layout. Imagens embutidas: nada de rede. */
|
|
130
|
+
function svgDataUri(svg) {
|
|
131
|
+
return `data:image/svg+xml,${encodeURIComponent(svg)}`;
|
|
132
|
+
}
|
|
133
|
+
function logo(fill) {
|
|
134
|
+
return svgDataUri(`<svg xmlns="http://www.w3.org/2000/svg" width="120" height="32" viewBox="0 0 120 32"><rect width="32" height="32" rx="8" fill="${fill}"/><rect x="42" y="10" width="78" height="12" rx="6" fill="${fill}"/></svg>`);
|
|
135
|
+
}
|
|
136
|
+
const GALLERY_LOGO = { light: logo('#475569'), dark: logo('#cbd5e1') };
|
|
137
|
+
const GALLERY_AVATAR = svgDataUri('<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64"><rect width="64" height="64" fill="#94a3b8"/>' +
|
|
138
|
+
'<circle cx="32" cy="24" r="12" fill="#f1f5f9"/><rect x="10" y="42" width="44" height="30" rx="15" fill="#f1f5f9"/></svg>');
|
|
139
|
+
const GALLERY_BACKGROUND = svgDataUri('<svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64"><rect width="64" height="64" fill="#94a3b8"/>' +
|
|
140
|
+
'<rect width="32" height="32" fill="#64748b"/><rect x="32" y="32" width="32" height="32" fill="#64748b"/></svg>');
|
|
141
|
+
function noop() { }
|
|
142
|
+
/**
|
|
143
|
+
* Menu lateral completo. `activePath` é a rota atual (a da própria galeria): o item "Categorias" aponta
|
|
144
|
+
* para ela, fica com `active-route` e expande os ancestrais.
|
|
145
|
+
*/
|
|
146
|
+
function galleryMenu(activePath) {
|
|
147
|
+
return [
|
|
148
|
+
{
|
|
149
|
+
label: 'Início',
|
|
150
|
+
items: [
|
|
151
|
+
{ label: 'Painel', icon: 'fa-solid fa-fw fa-house', command: noop },
|
|
152
|
+
{ label: 'Agenda', icon: 'fa-solid fa-fw fa-calendar', command: noop },
|
|
153
|
+
],
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
label: 'Cadastros',
|
|
157
|
+
items: [
|
|
158
|
+
{ label: 'Clientes', icon: 'fa-solid fa-fw fa-users', command: noop },
|
|
159
|
+
{ label: 'Fornecedores', icon: 'fa-solid fa-fw fa-truck', command: noop },
|
|
160
|
+
{
|
|
161
|
+
label: 'Produtos',
|
|
162
|
+
icon: 'fa-solid fa-fw fa-box',
|
|
163
|
+
items: [
|
|
164
|
+
{ label: 'Categorias', icon: 'fa-solid fa-fw fa-tags', routerLink: [activePath] },
|
|
165
|
+
{ label: 'Marcas', icon: 'fa-solid fa-fw fa-bookmark', command: noop },
|
|
166
|
+
],
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
label: 'Tabelas de preço',
|
|
170
|
+
icon: 'fa-solid fa-fw fa-table-list',
|
|
171
|
+
items: [
|
|
172
|
+
{ label: 'Varejo', icon: 'fa-solid fa-fw fa-store', command: noop },
|
|
173
|
+
{ label: 'Atacado', icon: 'fa-solid fa-fw fa-warehouse', command: noop },
|
|
174
|
+
],
|
|
175
|
+
},
|
|
176
|
+
],
|
|
177
|
+
},
|
|
178
|
+
{ separator: true },
|
|
179
|
+
{
|
|
180
|
+
label: 'Relatórios',
|
|
181
|
+
items: [
|
|
182
|
+
{ label: 'Vendas', icon: 'fa-solid fa-fw fa-chart-line', command: noop },
|
|
183
|
+
{ label: 'Estoque (desabilitado)', icon: 'fa-solid fa-fw fa-boxes-stacked', disabled: true },
|
|
184
|
+
{ label: 'Auditoria (oculto)', icon: 'fa-solid fa-fw fa-shield-halved', visible: false },
|
|
185
|
+
{ label: 'Financeiro (claim)', icon: 'fa-solid fa-fw fa-coins', claims: ['financeiro'], command: noop },
|
|
186
|
+
],
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
label: 'Administração (claim)',
|
|
190
|
+
items: [{ label: 'Usuários', icon: 'fa-solid fa-fw fa-user-gear', claims: ['administrador'], command: noop }],
|
|
191
|
+
},
|
|
192
|
+
];
|
|
193
|
+
}
|
|
194
|
+
/** Menu curto, sem rota ativa: tudo recolhido. */
|
|
195
|
+
const GALLERY_MENU_SHORT = [
|
|
196
|
+
{
|
|
197
|
+
label: 'Cadastros',
|
|
198
|
+
items: [
|
|
199
|
+
{ label: 'Clientes', icon: 'fa-solid fa-fw fa-users', command: noop },
|
|
200
|
+
{ label: 'Fornecedores', icon: 'fa-solid fa-fw fa-truck', command: noop },
|
|
201
|
+
{
|
|
202
|
+
label: 'Produtos',
|
|
203
|
+
icon: 'fa-solid fa-fw fa-box',
|
|
204
|
+
items: [{ label: 'Categorias', icon: 'fa-solid fa-fw fa-tags', command: noop }],
|
|
205
|
+
},
|
|
206
|
+
],
|
|
207
|
+
},
|
|
208
|
+
];
|
|
209
|
+
/** Seis níveis de submenu, com a rota ativa no último: cobre os recuos por nível. */
|
|
210
|
+
function galleryDeepMenu(activePath) {
|
|
211
|
+
const labels = ['Brasil', 'Sudeste', 'Rio de Janeiro', 'Capital', 'Zona Sul', 'Botafogo'];
|
|
212
|
+
let node = { label: 'Loja 12', icon: 'fa-solid fa-fw fa-store', routerLink: [activePath] };
|
|
213
|
+
for (const label of [...labels].reverse()) {
|
|
214
|
+
node = { label, icon: 'fa-solid fa-fw fa-location-dot', items: [node, { label: `Outras em ${label}`, icon: 'fa-solid fa-fw fa-ellipsis', command: noop }] };
|
|
215
|
+
}
|
|
216
|
+
return [{ label: 'Unidades', items: [node] }];
|
|
217
|
+
}
|
|
218
|
+
const GALLERY_TOPBAR = {
|
|
219
|
+
showMenuToggle: true,
|
|
220
|
+
showBackButton: false,
|
|
221
|
+
showConfigurator: false,
|
|
222
|
+
showDarkModeToggle: true,
|
|
223
|
+
showProfileMenu: true,
|
|
224
|
+
logoPath: GALLERY_LOGO,
|
|
225
|
+
appName: 'Gestão Comercial',
|
|
226
|
+
menuItems: [
|
|
227
|
+
{ icon: 'fa-solid fa-bell', label: 'Notificações', tooltip: 'Notificações', callback: noop },
|
|
228
|
+
{ icon: 'fa-solid fa-circle-question', label: 'Ajuda', tooltip: 'Ajuda', callback: noop },
|
|
229
|
+
],
|
|
230
|
+
features: [],
|
|
231
|
+
};
|
|
232
|
+
const GALLERY_FOOTER = {
|
|
233
|
+
leftLogoPath: GALLERY_LOGO,
|
|
234
|
+
version: 'v21.10.0',
|
|
235
|
+
copyright: '© 2026 Gestão Comercial',
|
|
236
|
+
};
|
|
237
|
+
const GALLERY_ERRORS = {
|
|
238
|
+
error: {
|
|
239
|
+
icon: 'fa-solid fa-fw fa-circle-exclamation',
|
|
240
|
+
title: 'Ocorreu um erro',
|
|
241
|
+
message: 'Ocorreu um erro ao carregar a página.',
|
|
242
|
+
imagePath: GALLERY_BACKGROUND,
|
|
243
|
+
backgroundPath: GALLERY_BACKGROUND,
|
|
244
|
+
buttons: [{ label: 'Voltar para a home', url: '/', command: noop, severity: 'danger' }],
|
|
245
|
+
},
|
|
246
|
+
access: {
|
|
247
|
+
icon: 'fa-solid fa-fw fa-lock',
|
|
248
|
+
title: 'Acesso restrito',
|
|
249
|
+
message: 'Você não tem permissão para acessar esta página.',
|
|
250
|
+
imagePath: GALLERY_BACKGROUND,
|
|
251
|
+
backgroundPath: GALLERY_BACKGROUND,
|
|
252
|
+
buttons: [{ label: 'Voltar para a home', url: '/', command: noop, severity: 'warn' }],
|
|
253
|
+
},
|
|
254
|
+
notfound: {
|
|
255
|
+
code: 404,
|
|
256
|
+
title: 'Página não encontrada',
|
|
257
|
+
message: 'A página que você está procurando não foi encontrada.',
|
|
258
|
+
backgroundPath: GALLERY_BACKGROUND,
|
|
259
|
+
links: [],
|
|
260
|
+
buttons: [{ label: 'Voltar para a home', url: '/', command: noop, severity: 'warn' }],
|
|
261
|
+
},
|
|
262
|
+
};
|
|
263
|
+
/** Página 404 com atalhos e mais de um botão; erro com todas as severidades de botão. */
|
|
264
|
+
const GALLERY_ERRORS_FULL = {
|
|
265
|
+
...GALLERY_ERRORS,
|
|
266
|
+
error: {
|
|
267
|
+
icon: 'fa-solid fa-fw fa-circle-exclamation',
|
|
268
|
+
title: 'Ocorreu um erro',
|
|
269
|
+
message: 'Não foi possível concluir a operação. Tente novamente em alguns minutos ou fale com o suporte.',
|
|
270
|
+
imagePath: GALLERY_BACKGROUND,
|
|
271
|
+
backgroundPath: GALLERY_BACKGROUND,
|
|
272
|
+
buttons: [
|
|
273
|
+
{ label: 'Primary', url: '/', command: noop, severity: 'primary' },
|
|
274
|
+
{ label: 'Secondary', url: '/', command: noop, severity: 'secondary' },
|
|
275
|
+
{ label: 'Success', url: '/', command: noop, severity: 'success' },
|
|
276
|
+
{ label: 'Info', url: '/', command: noop, severity: 'info' },
|
|
277
|
+
{ label: 'Warn', url: '/', command: noop, severity: 'warn' },
|
|
278
|
+
{ label: 'Danger', url: '/', command: noop, severity: 'danger' },
|
|
279
|
+
{ label: 'Help', url: '/', command: noop, severity: 'help' },
|
|
280
|
+
{ label: 'Contrast', url: '/', command: noop, severity: 'contrast' },
|
|
281
|
+
],
|
|
282
|
+
},
|
|
283
|
+
notfound: {
|
|
284
|
+
code: 404,
|
|
285
|
+
title: 'Página não encontrada',
|
|
286
|
+
message: 'O endereço pode ter mudado. Veja se um destes atalhos ajuda.',
|
|
287
|
+
backgroundPath: GALLERY_BACKGROUND,
|
|
288
|
+
links: [
|
|
289
|
+
{ icon: 'fa-solid fa-users', title: 'Clientes', description: 'Cadastro e histórico de clientes', url: '/clientes' },
|
|
290
|
+
{ icon: 'fa-solid fa-chart-line', title: 'Relatórios', description: 'Vendas, estoque e financeiro', url: '/relatorios' },
|
|
291
|
+
],
|
|
292
|
+
buttons: [
|
|
293
|
+
{ label: 'Voltar para a home', url: '/', command: noop, severity: 'warn' },
|
|
294
|
+
{ label: 'Falar com o suporte', url: '/', command: noop, severity: 'secondary' },
|
|
295
|
+
],
|
|
296
|
+
},
|
|
297
|
+
};
|
|
298
|
+
|
|
299
|
+
export { GALLERY_FOOTER as G, SmzLayoutGalleryStageComponent as S, GALLERY_TOPBAR as a, GALLERY_AVATAR as b, GALLERY_LOGO as c, galleryDeepMenu as d, GALLERY_MENU_SHORT as e, GALLERY_ERRORS_FULL as f, galleryMenu as g, GALLERY_ERRORS as h };
|
|
300
|
+
//# sourceMappingURL=ngx-smz-layout-layout-gallery.fixtures-yel7nOYX.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-smz-layout-layout-gallery.fixtures-yel7nOYX.mjs","sources":["../../../projects/ngx-smz-ui-layout/src/lib/gallery/layout-gallery-stage.component.ts","../../../projects/ngx-smz-ui-layout/src/lib/gallery/layout-gallery.fixtures.ts"],"sourcesContent":["import { NgComponentOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, ChangeDetectorRef, Component, DestroyRef, DestroyableInjector, Injector, Type, afterRenderEffect, computed, inject, input, signal } from '@angular/core';\nimport { SmzThemeService, SmzUiMenuItem } from '@ngx-smz/ui-kit';\nimport { SmzUILayout, SmzUILayoutConfigType } from '../config/config';\nimport { SMZ_UI_LAYOUT_CONFIG } from '../config/provide';\nimport { AccessPageComponent } from '../errors/access';\nimport { ErrorPageComponent } from '../errors/error';\nimport { ErrorPagesConfig, ErrorPagesConfigService } from '../errors/errors-pages-service';\nimport { NotfoundPageComponent } from '../errors/notfound';\nimport { AppFooter, Footer } from '../layout/component/app.footer';\nimport { AppLayout } from '../layout/component/app.layout';\nimport { AppSidebar } from '../layout/component/app.sidebar';\nimport { AppTopbar, Topbar } from '../layout/component/app.topbar';\nimport { LayoutConfig, LayoutService, LayoutState } from '../layout/service/layout.service';\nimport { NavigationService } from '../layout/service/navigation.service';\nimport { PageTitleService } from '../layout/service/page-title.service';\n\nexport type SmzLayoutGalleryPiece = 'layout' | 'topbar' | 'sidebar' | 'footer' | 'error' | 'access' | 'notfound';\n\n/** Configuração de um palco: os mesmos dados que o app entrega em `configureSmzUILayout()`, como valores simples. */\nexport interface SmzLayoutGalleryStageConfig {\n sidebar?: SmzUiMenuItem[];\n footer?: Footer;\n topbar?: Topbar;\n layout?: LayoutConfig;\n state?: LayoutState;\n hasClaim?: (claims: string[]) => boolean;\n /** Título da página na topbar. No app vem de `data.title` da rota (`PageTitleService`). */\n pageTitle?: string;\n /** Habilita o botão voltar da topbar. No app vem do histórico de navegação (`NavigationService`). */\n canGoBack?: boolean;\n errors?: Partial<ErrorPagesConfig>;\n}\n\nconst PIECES: Record<SmzLayoutGalleryPiece, Type<unknown>> = {\n layout: AppLayout,\n topbar: AppTopbar,\n sidebar: AppSidebar,\n footer: AppFooter,\n error: ErrorPageComponent,\n access: AccessPageComponent,\n notfound: NotfoundPageComponent,\n};\n\n/**\n * Palco da galeria para as peças do shell: renderiza uma peça dentro de uma caixa com borda, com a\n * configuração do layout fornecida por um injector próprio (o app da galeria não precisa de\n * `configureSmzUILayout()`), de modo que cada caso tem o seu `LayoutService`.\n *\n * A caixa interna tem `transform`, então os filhos com `position: fixed` (topbar, sidebar, máscara) ficam\n * presos nela. Com `scale` diferente de 1, `width` e `height` devem ser em unidades de viewport: a peça é\n * desenhada nesse tamanho e reduzida (páginas de erro, que são `w-screen h-screen`).\n */\n@Component({\n selector: 'smz-gallery-layout-stage',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgComponentOutlet],\n host: { class: 'block w-full min-w-0' },\n template: `\n <div class=\"relative max-w-full overflow-hidden border border-ui-line\" data-smz-gallery-layout-stage [style.width]=\"boxWidth()\" [style.height]=\"boxHeight()\">\n <div [style.width]=\"scaled() ? width() : '100%'\" [style.height]=\"scaled() ? height() : '100%'\" [style.transform]=\"transform()\" [style.transform-origin]=\"'top left'\">\n <ng-container [ngComponentOutlet]=\"component()\" [ngComponentOutletInjector]=\"injector()\" />\n </div>\n </div>\n `,\n})\nexport class SmzLayoutGalleryStageComponent {\n public readonly piece = input.required<SmzLayoutGalleryPiece>();\n public readonly config = input<SmzLayoutGalleryStageConfig>({});\n public readonly width = input('100%');\n public readonly height = input('auto');\n public readonly scale = input(1);\n\n protected readonly component = computed(() => PIECES[this.piece()]);\n protected readonly scaled = computed(() => this.scale() !== 1);\n protected readonly boxWidth = computed(() => (this.scaled() ? `calc(${this.width()} * ${this.scale()})` : this.width()));\n protected readonly boxHeight = computed(() => (this.scaled() ? `calc(${this.height()} * ${this.scale()})` : this.height()));\n protected readonly transform = computed(() => (this.scaled() ? `scale(${this.scale()})` : 'translateZ(0)'));\n protected readonly injector = computed(() => this.createInjector(this.config(), this.theme.mode() === 'dark' || this.theme.isDark()));\n\n private readonly theme = inject(SmzThemeService);\n private readonly parent = inject(Injector);\n private readonly changeDetector = inject(ChangeDetectorRef);\n private readonly created: DestroyableInjector[] = [];\n\n constructor() {\n inject(DestroyRef).onDestroy(() => this.created.forEach((injector) => injector.destroy()));\n\n // `AppMenuitem` marca o item ativo dentro de um `Promise.then`, sem sinal nem `markForCheck`. Sem zone.js\n // isso não é desenhado; esta volta extra de detecção garante o submenu da rota ativa expandido na captura.\n afterRenderEffect(() => {\n this.injector();\n queueMicrotask(() => this.changeDetector.markForCheck());\n });\n }\n\n private createInjector(config: SmzLayoutGalleryStageConfig, dark: boolean): DestroyableInjector {\n const feature: SmzUILayoutConfigType = {\n sidebar: signal(config.sidebar ?? []),\n footer: signal(config.footer ?? {}),\n topbar: signal(config.topbar ?? {}),\n // Sem `primary`/`surface`: o configurador não reaplica paleta sobre o tema da galeria.\n layout: signal({ menuMode: 'static', darkTheme: dark, ...config.layout }),\n state: signal({\n staticMenuDesktopInactive: false,\n overlayMenuActive: false,\n configSidebarVisible: false,\n staticMenuMobileActive: false,\n menuHoverActive: false,\n ...config.state,\n }),\n hasClaim: config.hasClaim,\n };\n const pageTitle: Pick<PageTitleService, 'title' | 'hasTitle'> = {\n title: signal(config.pageTitle ?? ''),\n hasTitle: signal(config.pageTitle != null),\n };\n const navigation: Pick<NavigationService, 'canGoBackSignal' | 'goBack'> = {\n canGoBackSignal: (): boolean => config.canGoBack === true,\n goBack: (): void => {},\n };\n\n const injector = Injector.create({\n parent: this.parent,\n providers: [\n { provide: SMZ_UI_LAYOUT_CONFIG, useValue: feature },\n LayoutService,\n {\n provide: SmzUILayout,\n useFactory: (): SmzUILayout => {\n const layout = new SmzUILayout();\n layout.setConfig(feature);\n\n return layout;\n },\n },\n { provide: PageTitleService, useValue: pageTitle },\n { provide: NavigationService, useValue: navigation },\n {\n provide: ErrorPagesConfigService,\n useFactory: (): ErrorPagesConfigService => {\n const errors = new ErrorPagesConfigService();\n errors.updateConfig(config.errors ?? {});\n\n return errors;\n },\n },\n ],\n });\n this.created.push(injector);\n\n return injector;\n }\n}\n","import { SmzUiMenuItem } from '@ngx-smz/ui-kit';\nimport { ErrorPagesConfig } from '../errors/errors-pages-service';\nimport { Footer } from '../layout/component/app.footer';\nimport { Topbar } from '../layout/component/app.topbar';\n\n/** Dados fixos compartilhados pelas entradas da galeria do layout. Imagens embutidas: nada de rede. */\n\nfunction svgDataUri(svg: string): string {\n return `data:image/svg+xml,${encodeURIComponent(svg)}`;\n}\n\nfunction logo(fill: string): string {\n return svgDataUri(\n `<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"120\" height=\"32\" viewBox=\"0 0 120 32\"><rect width=\"32\" height=\"32\" rx=\"8\" fill=\"${fill}\"/><rect x=\"42\" y=\"10\" width=\"78\" height=\"12\" rx=\"6\" fill=\"${fill}\"/></svg>`,\n );\n}\n\nexport const GALLERY_LOGO = { light: logo('#475569'), dark: logo('#cbd5e1') };\n\nexport const GALLERY_AVATAR = svgDataUri(\n '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"64\" height=\"64\" viewBox=\"0 0 64 64\"><rect width=\"64\" height=\"64\" fill=\"#94a3b8\"/>' +\n '<circle cx=\"32\" cy=\"24\" r=\"12\" fill=\"#f1f5f9\"/><rect x=\"10\" y=\"42\" width=\"44\" height=\"30\" rx=\"15\" fill=\"#f1f5f9\"/></svg>',\n);\n\nexport const GALLERY_BACKGROUND = svgDataUri(\n '<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"64\" height=\"64\" viewBox=\"0 0 64 64\"><rect width=\"64\" height=\"64\" fill=\"#94a3b8\"/>' +\n '<rect width=\"32\" height=\"32\" fill=\"#64748b\"/><rect x=\"32\" y=\"32\" width=\"32\" height=\"32\" fill=\"#64748b\"/></svg>',\n);\n\nfunction noop(): void {}\n\n/**\n * Menu lateral completo. `activePath` é a rota atual (a da própria galeria): o item \"Categorias\" aponta\n * para ela, fica com `active-route` e expande os ancestrais.\n */\nexport function galleryMenu(activePath: string): SmzUiMenuItem[] {\n return [\n {\n label: 'Início',\n items: [\n { label: 'Painel', icon: 'fa-solid fa-fw fa-house', command: noop },\n { label: 'Agenda', icon: 'fa-solid fa-fw fa-calendar', command: noop },\n ],\n },\n {\n label: 'Cadastros',\n items: [\n { label: 'Clientes', icon: 'fa-solid fa-fw fa-users', command: noop },\n { label: 'Fornecedores', icon: 'fa-solid fa-fw fa-truck', command: noop },\n {\n label: 'Produtos',\n icon: 'fa-solid fa-fw fa-box',\n items: [\n { label: 'Categorias', icon: 'fa-solid fa-fw fa-tags', routerLink: [activePath] },\n { label: 'Marcas', icon: 'fa-solid fa-fw fa-bookmark', command: noop },\n ],\n },\n {\n label: 'Tabelas de preço',\n icon: 'fa-solid fa-fw fa-table-list',\n items: [\n { label: 'Varejo', icon: 'fa-solid fa-fw fa-store', command: noop },\n { label: 'Atacado', icon: 'fa-solid fa-fw fa-warehouse', command: noop },\n ],\n },\n ],\n },\n { separator: true },\n {\n label: 'Relatórios',\n items: [\n { label: 'Vendas', icon: 'fa-solid fa-fw fa-chart-line', command: noop },\n { label: 'Estoque (desabilitado)', icon: 'fa-solid fa-fw fa-boxes-stacked', disabled: true },\n { label: 'Auditoria (oculto)', icon: 'fa-solid fa-fw fa-shield-halved', visible: false },\n { label: 'Financeiro (claim)', icon: 'fa-solid fa-fw fa-coins', claims: ['financeiro'], command: noop },\n ],\n },\n {\n label: 'Administração (claim)',\n items: [{ label: 'Usuários', icon: 'fa-solid fa-fw fa-user-gear', claims: ['administrador'], command: noop }],\n },\n ];\n}\n\n/** Menu curto, sem rota ativa: tudo recolhido. */\nexport const GALLERY_MENU_SHORT: SmzUiMenuItem[] = [\n {\n label: 'Cadastros',\n items: [\n { label: 'Clientes', icon: 'fa-solid fa-fw fa-users', command: noop },\n { label: 'Fornecedores', icon: 'fa-solid fa-fw fa-truck', command: noop },\n {\n label: 'Produtos',\n icon: 'fa-solid fa-fw fa-box',\n items: [{ label: 'Categorias', icon: 'fa-solid fa-fw fa-tags', command: noop }],\n },\n ],\n },\n];\n\n/** Seis níveis de submenu, com a rota ativa no último: cobre os recuos por nível. */\nexport function galleryDeepMenu(activePath: string): SmzUiMenuItem[] {\n const labels = ['Brasil', 'Sudeste', 'Rio de Janeiro', 'Capital', 'Zona Sul', 'Botafogo'];\n let node: SmzUiMenuItem = { label: 'Loja 12', icon: 'fa-solid fa-fw fa-store', routerLink: [activePath] };\n for (const label of [...labels].reverse()) {\n node = { label, icon: 'fa-solid fa-fw fa-location-dot', items: [node, { label: `Outras em ${label}`, icon: 'fa-solid fa-fw fa-ellipsis', command: noop }] };\n }\n\n return [{ label: 'Unidades', items: [node] }];\n}\n\nexport const GALLERY_TOPBAR: Topbar = {\n showMenuToggle: true,\n showBackButton: false,\n showConfigurator: false,\n showDarkModeToggle: true,\n showProfileMenu: true,\n logoPath: GALLERY_LOGO,\n appName: 'Gestão Comercial',\n menuItems: [\n { icon: 'fa-solid fa-bell', label: 'Notificações', tooltip: 'Notificações', callback: noop },\n { icon: 'fa-solid fa-circle-question', label: 'Ajuda', tooltip: 'Ajuda', callback: noop },\n ],\n features: [],\n};\n\nexport const GALLERY_FOOTER: Footer = {\n leftLogoPath: GALLERY_LOGO,\n version: 'v21.10.0',\n copyright: '© 2026 Gestão Comercial',\n};\n\nexport const GALLERY_ERRORS: Partial<ErrorPagesConfig> = {\n error: {\n icon: 'fa-solid fa-fw fa-circle-exclamation',\n title: 'Ocorreu um erro',\n message: 'Ocorreu um erro ao carregar a página.',\n imagePath: GALLERY_BACKGROUND,\n backgroundPath: GALLERY_BACKGROUND,\n buttons: [{ label: 'Voltar para a home', url: '/', command: noop, severity: 'danger' }],\n },\n access: {\n icon: 'fa-solid fa-fw fa-lock',\n title: 'Acesso restrito',\n message: 'Você não tem permissão para acessar esta página.',\n imagePath: GALLERY_BACKGROUND,\n backgroundPath: GALLERY_BACKGROUND,\n buttons: [{ label: 'Voltar para a home', url: '/', command: noop, severity: 'warn' }],\n },\n notfound: {\n code: 404,\n title: 'Página não encontrada',\n message: 'A página que você está procurando não foi encontrada.',\n backgroundPath: GALLERY_BACKGROUND,\n links: [],\n buttons: [{ label: 'Voltar para a home', url: '/', command: noop, severity: 'warn' }],\n },\n};\n\n/** Página 404 com atalhos e mais de um botão; erro com todas as severidades de botão. */\nexport const GALLERY_ERRORS_FULL: Partial<ErrorPagesConfig> = {\n ...GALLERY_ERRORS,\n error: {\n icon: 'fa-solid fa-fw fa-circle-exclamation',\n title: 'Ocorreu um erro',\n message: 'Não foi possível concluir a operação. Tente novamente em alguns minutos ou fale com o suporte.',\n imagePath: GALLERY_BACKGROUND,\n backgroundPath: GALLERY_BACKGROUND,\n buttons: [\n { label: 'Primary', url: '/', command: noop, severity: 'primary' },\n { label: 'Secondary', url: '/', command: noop, severity: 'secondary' },\n { label: 'Success', url: '/', command: noop, severity: 'success' },\n { label: 'Info', url: '/', command: noop, severity: 'info' },\n { label: 'Warn', url: '/', command: noop, severity: 'warn' },\n { label: 'Danger', url: '/', command: noop, severity: 'danger' },\n { label: 'Help', url: '/', command: noop, severity: 'help' },\n { label: 'Contrast', url: '/', command: noop, severity: 'contrast' },\n ],\n },\n notfound: {\n code: 404,\n title: 'Página não encontrada',\n message: 'O endereço pode ter mudado. Veja se um destes atalhos ajuda.',\n backgroundPath: GALLERY_BACKGROUND,\n links: [\n { icon: 'fa-solid fa-users', title: 'Clientes', description: 'Cadastro e histórico de clientes', url: '/clientes' },\n { icon: 'fa-solid fa-chart-line', title: 'Relatórios', description: 'Vendas, estoque e financeiro', url: '/relatorios' },\n ],\n buttons: [\n { label: 'Voltar para a home', url: '/', command: noop, severity: 'warn' },\n { label: 'Falar com o suporte', url: '/', command: noop, severity: 'secondary' },\n ],\n },\n};\n"],"names":[],"mappings":";;;;;;AAkCA,MAAM,MAAM,GAAiD;AAC3D,IAAA,MAAM,EAAE,SAAS;AACjB,IAAA,MAAM,EAAE,SAAS;AACjB,IAAA,OAAO,EAAE,UAAU;AACnB,IAAA,MAAM,EAAE,SAAS;AACjB,IAAA,KAAK,EAAE,kBAAkB;AACzB,IAAA,MAAM,EAAE,mBAAmB;AAC3B,IAAA,QAAQ,EAAE,qBAAqB;CAChC;AAED;;;;;;;;AAQG;MAcU,8BAA8B,CAAA;AACzB,IAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,2EAAyB;AAC/C,IAAA,MAAM,GAAG,KAAK,CAA8B,EAAE,6EAAC;AAC/C,IAAA,KAAK,GAAG,KAAK,CAAC,MAAM,4EAAC;AACrB,IAAA,MAAM,GAAG,KAAK,CAAC,MAAM,6EAAC;AACtB,IAAA,KAAK,GAAG,KAAK,CAAC,CAAC,4EAAC;AAEb,IAAA,SAAS,GAAG,QAAQ,CAAC,MAAM,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,gFAAC;AAChD,IAAA,MAAM,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,6EAAC;AAC3C,IAAA,QAAQ,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,MAAM,EAAE,GAAG,QAAQ,IAAI,CAAC,KAAK,EAAE,CAAA,GAAA,EAAM,IAAI,CAAC,KAAK,EAAE,CAAA,CAAA,CAAG,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,+EAAC;AACrG,IAAA,SAAS,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,MAAM,EAAE,GAAG,QAAQ,IAAI,CAAC,MAAM,EAAE,CAAA,GAAA,EAAM,IAAI,CAAC,KAAK,EAAE,CAAA,CAAA,CAAG,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AM,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE;AAC5D,YAAA,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE;AACrE,SAAA;AACF,KAAA;AACD,IAAA,QAAQ,EAAE;AACR,QAAA,IAAI,EAAE,GAAG;AACT,QAAA,KAAK,EAAE,uBAAuB;AAC9B,QAAA,OAAO,EAAE,8DAA8D;AACvE,QAAA,cAAc,EAAE,kBAAkB;AAClC,QAAA,KAAK,EAAE;AACL,YAAA,EAAE,IAAI,EAAE,mBAAmB,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,kCAAkC,EAAE,GAAG,EAAE,WAAW,EAAE;AACnH,YAAA,EAAE,IAAI,EAAE,wBAAwB,EAAE,KAAK,EAAE,YAAY,EAAE,WAAW,EAAE,8BAA8B,EAAE,GAAG,EAAE,aAAa,EAAE;AACzH,SAAA;AACD,QAAA,OAAO,EAAE;AACP,YAAA,EAAE,KAAK,EAAE,oBAAoB,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE;AAC1E,YAAA,EAAE,KAAK,EAAE,qBAAqB,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE;AACjF,SAAA;AACF,KAAA;;;;;"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { Router } from '@angular/router';
|
|
4
|
+
import { SmzGalleryCaseComponent, SmzGallerySectionComponent } from '@ngx-smz/core';
|
|
5
|
+
import { g as galleryMenu, d as galleryDeepMenu, e as GALLERY_MENU_SHORT, S as SmzLayoutGalleryStageComponent } from './ngx-smz-layout-layout-gallery.fixtures-yel7nOYX.mjs';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Galeria: menu lateral (`app-sidebar` com `app-menu`/`app-menuitem`). O submenu só expande por clique ou
|
|
9
|
+
* pela rota ativa (`expanded` do item é ignorado), então o caso expandido usa um item cujo `routerLink` é a
|
|
10
|
+
* rota da própria galeria. `disabled` não tem estilo próprio e `badge` não é desenhado pelo `app-menuitem`.
|
|
11
|
+
*/
|
|
12
|
+
class LayoutMenuGalleryEntryComponent {
|
|
13
|
+
path = inject(Router).url.split(/[?#]/)[0];
|
|
14
|
+
full = { sidebar: galleryMenu(this.path) };
|
|
15
|
+
denied = { sidebar: galleryMenu(this.path), hasClaim: () => false };
|
|
16
|
+
deep = { sidebar: galleryDeepMenu(this.path) };
|
|
17
|
+
short = { sidebar: GALLERY_MENU_SHORT };
|
|
18
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: LayoutMenuGalleryEntryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
19
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.5", type: LayoutMenuGalleryEntryComponent, isStandalone: true, selector: "smz-gallery-layout-menu-entry", host: { classAttribute: "flex flex-col gap-8" }, ngImport: i0, template: `
|
|
20
|
+
<smz-gallery-section label="Painel da sidebar (altura da viewport)" [columns]="3">
|
|
21
|
+
<smz-gallery-case label="grupos, separador, rota ativa (Categorias) com submenu expandido, submenu recolhido, item desabilitado">
|
|
22
|
+
<smz-gallery-layout-stage piece="sidebar" width="24rem" height="100vh" [config]="full" />
|
|
23
|
+
</smz-gallery-case>
|
|
24
|
+
<smz-gallery-case label="hasClaim negando tudo: itens com claims somem, e o grupo sem filho visível também">
|
|
25
|
+
<smz-gallery-layout-stage piece="sidebar" width="24rem" height="100vh" [config]="denied" />
|
|
26
|
+
</smz-gallery-case>
|
|
27
|
+
<smz-gallery-case label="seis níveis de submenu, rota ativa no último">
|
|
28
|
+
<smz-gallery-layout-stage piece="sidebar" width="24rem" height="100vh" [config]="deep" />
|
|
29
|
+
</smz-gallery-case>
|
|
30
|
+
</smz-gallery-section>
|
|
31
|
+
|
|
32
|
+
<smz-gallery-section label="Estados de um item" [columns]="3">
|
|
33
|
+
<smz-gallery-case label="padrão (sem rota ativa, submenu recolhido)">
|
|
34
|
+
<smz-gallery-layout-stage piece="sidebar" width="24rem" height="22rem" [config]="short" />
|
|
35
|
+
</smz-gallery-case>
|
|
36
|
+
<smz-gallery-case label="hover em item" force="hover" target=".layout-menu ul li:nth-child(1) > a">
|
|
37
|
+
<smz-gallery-layout-stage piece="sidebar" width="24rem" height="22rem" [config]="short" />
|
|
38
|
+
</smz-gallery-case>
|
|
39
|
+
<smz-gallery-case label="foco em item" force="focus" target=".layout-menu ul li:nth-child(2) > a">
|
|
40
|
+
<smz-gallery-layout-stage piece="sidebar" width="24rem" height="22rem" [config]="short" />
|
|
41
|
+
</smz-gallery-case>
|
|
42
|
+
<smz-gallery-case label="hover em item com submenu" force="hover" target=".layout-menu ul li:nth-child(3) > a">
|
|
43
|
+
<smz-gallery-layout-stage piece="sidebar" width="24rem" height="22rem" [config]="short" />
|
|
44
|
+
</smz-gallery-case>
|
|
45
|
+
<smz-gallery-case label="hover no item da rota ativa" force="hover" target=".layout-menu a.active-route">
|
|
46
|
+
<smz-gallery-layout-stage piece="sidebar" width="24rem" height="36rem" [config]="full" />
|
|
47
|
+
</smz-gallery-case>
|
|
48
|
+
<smz-gallery-case label="foco no item da rota ativa" force="focus" target=".layout-menu a.active-route">
|
|
49
|
+
<smz-gallery-layout-stage piece="sidebar" width="24rem" height="36rem" [config]="full" />
|
|
50
|
+
</smz-gallery-case>
|
|
51
|
+
</smz-gallery-section>
|
|
52
|
+
`, isInline: true, dependencies: [{ kind: "component", type: SmzGalleryCaseComponent, selector: "smz-gallery-case", inputs: ["label", "force", "target"] }, { kind: "component", type: SmzGallerySectionComponent, selector: "smz-gallery-section", inputs: ["label", "columns"] }, { kind: "component", type: SmzLayoutGalleryStageComponent, selector: "smz-gallery-layout-stage", inputs: ["piece", "config", "width", "height", "scale"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
53
|
+
}
|
|
54
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.5", ngImport: i0, type: LayoutMenuGalleryEntryComponent, decorators: [{
|
|
55
|
+
type: Component,
|
|
56
|
+
args: [{
|
|
57
|
+
selector: 'smz-gallery-layout-menu-entry',
|
|
58
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
59
|
+
imports: [SmzGalleryCaseComponent, SmzGallerySectionComponent, SmzLayoutGalleryStageComponent],
|
|
60
|
+
host: { class: 'flex flex-col gap-8' },
|
|
61
|
+
template: `
|
|
62
|
+
<smz-gallery-section label="Painel da sidebar (altura da viewport)" [columns]="3">
|
|
63
|
+
<smz-gallery-case label="grupos, separador, rota ativa (Categorias) com submenu expandido, submenu recolhido, item desabilitado">
|
|
64
|
+
<smz-gallery-layout-stage piece="sidebar" width="24rem" height="100vh" [config]="full" />
|
|
65
|
+
</smz-gallery-case>
|
|
66
|
+
<smz-gallery-case label="hasClaim negando tudo: itens com claims somem, e o grupo sem filho visível também">
|
|
67
|
+
<smz-gallery-layout-stage piece="sidebar" width="24rem" height="100vh" [config]="denied" />
|
|
68
|
+
</smz-gallery-case>
|
|
69
|
+
<smz-gallery-case label="seis níveis de submenu, rota ativa no último">
|
|
70
|
+
<smz-gallery-layout-stage piece="sidebar" width="24rem" height="100vh" [config]="deep" />
|
|
71
|
+
</smz-gallery-case>
|
|
72
|
+
</smz-gallery-section>
|
|
73
|
+
|
|
74
|
+
<smz-gallery-section label="Estados de um item" [columns]="3">
|
|
75
|
+
<smz-gallery-case label="padrão (sem rota ativa, submenu recolhido)">
|
|
76
|
+
<smz-gallery-layout-stage piece="sidebar" width="24rem" height="22rem" [config]="short" />
|
|
77
|
+
</smz-gallery-case>
|
|
78
|
+
<smz-gallery-case label="hover em item" force="hover" target=".layout-menu ul li:nth-child(1) > a">
|
|
79
|
+
<smz-gallery-layout-stage piece="sidebar" width="24rem" height="22rem" [config]="short" />
|
|
80
|
+
</smz-gallery-case>
|
|
81
|
+
<smz-gallery-case label="foco em item" force="focus" target=".layout-menu ul li:nth-child(2) > a">
|
|
82
|
+
<smz-gallery-layout-stage piece="sidebar" width="24rem" height="22rem" [config]="short" />
|
|
83
|
+
</smz-gallery-case>
|
|
84
|
+
<smz-gallery-case label="hover em item com submenu" force="hover" target=".layout-menu ul li:nth-child(3) > a">
|
|
85
|
+
<smz-gallery-layout-stage piece="sidebar" width="24rem" height="22rem" [config]="short" />
|
|
86
|
+
</smz-gallery-case>
|
|
87
|
+
<smz-gallery-case label="hover no item da rota ativa" force="hover" target=".layout-menu a.active-route">
|
|
88
|
+
<smz-gallery-layout-stage piece="sidebar" width="24rem" height="36rem" [config]="full" />
|
|
89
|
+
</smz-gallery-case>
|
|
90
|
+
<smz-gallery-case label="foco no item da rota ativa" force="focus" target=".layout-menu a.active-route">
|
|
91
|
+
<smz-gallery-layout-stage piece="sidebar" width="24rem" height="36rem" [config]="full" />
|
|
92
|
+
</smz-gallery-case>
|
|
93
|
+
</smz-gallery-section>
|
|
94
|
+
`,
|
|
95
|
+
}]
|
|
96
|
+
}] });
|
|
97
|
+
|
|
98
|
+
export { LayoutMenuGalleryEntryComponent };
|
|
99
|
+
//# sourceMappingURL=ngx-smz-layout-layout-menu.entry-BAzglN_V.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ngx-smz-layout-layout-menu.entry-BAzglN_V.mjs","sources":["../../../projects/ngx-smz-ui-layout/src/lib/gallery/entries/layout-menu.entry.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { Router } from '@angular/router';\nimport { SmzGalleryCaseComponent, SmzGallerySectionComponent } from '@ngx-smz/core';\nimport { SmzLayoutGalleryStageComponent, SmzLayoutGalleryStageConfig } from '../layout-gallery-stage.component';\nimport { GALLERY_MENU_SHORT, galleryDeepMenu, galleryMenu } from '../layout-gallery.fixtures';\n\n/**\n * Galeria: menu lateral (`app-sidebar` com `app-menu`/`app-menuitem`). O submenu só expande por clique ou\n * pela rota ativa (`expanded` do item é ignorado), então o caso expandido usa um item cujo `routerLink` é a\n * rota da própria galeria. `disabled` não tem estilo próprio e `badge` não é desenhado pelo `app-menuitem`.\n */\n@Component({\n selector: 'smz-gallery-layout-menu-entry',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [SmzGalleryCaseComponent, SmzGallerySectionComponent, SmzLayoutGalleryStageComponent],\n host: { class: 'flex flex-col gap-8' },\n template: `\n <smz-gallery-section label=\"Painel da sidebar (altura da viewport)\" [columns]=\"3\">\n <smz-gallery-case label=\"grupos, separador, rota ativa (Categorias) com submenu expandido, submenu recolhido, item desabilitado\">\n <smz-gallery-layout-stage piece=\"sidebar\" width=\"24rem\" height=\"100vh\" [config]=\"full\" />\n </smz-gallery-case>\n <smz-gallery-case label=\"hasClaim negando tudo: itens com claims somem, e o grupo sem filho visível também\">\n <smz-gallery-layout-stage piece=\"sidebar\" width=\"24rem\" height=\"100vh\" [config]=\"denied\" />\n </smz-gallery-case>\n <smz-gallery-case label=\"seis níveis de submenu, rota ativa no último\">\n <smz-gallery-layout-stage piece=\"sidebar\" width=\"24rem\" height=\"100vh\" [config]=\"deep\" />\n </smz-gallery-case>\n </smz-gallery-section>\n\n <smz-gallery-section label=\"Estados de um item\" [columns]=\"3\">\n <smz-gallery-case label=\"padrão (sem rota ativa, submenu recolhido)\">\n <smz-gallery-layout-stage piece=\"sidebar\" width=\"24rem\" height=\"22rem\" [config]=\"short\" />\n </smz-gallery-case>\n <smz-gallery-case label=\"hover em item\" force=\"hover\" target=\".layout-menu ul li:nth-child(1) > a\">\n <smz-gallery-layout-stage piece=\"sidebar\" width=\"24rem\" height=\"22rem\" [config]=\"short\" />\n </smz-gallery-case>\n <smz-gallery-case label=\"foco em item\" force=\"focus\" target=\".layout-menu ul li:nth-child(2) > a\">\n <smz-gallery-layout-stage piece=\"sidebar\" width=\"24rem\" height=\"22rem\" [config]=\"short\" />\n </smz-gallery-case>\n <smz-gallery-case label=\"hover em item com submenu\" force=\"hover\" target=\".layout-menu ul li:nth-child(3) > a\">\n <smz-gallery-layout-stage piece=\"sidebar\" width=\"24rem\" height=\"22rem\" [config]=\"short\" />\n </smz-gallery-case>\n <smz-gallery-case label=\"hover no item da rota ativa\" force=\"hover\" target=\".layout-menu a.active-route\">\n <smz-gallery-layout-stage piece=\"sidebar\" width=\"24rem\" height=\"36rem\" [config]=\"full\" />\n </smz-gallery-case>\n <smz-gallery-case label=\"foco no item da rota ativa\" force=\"focus\" target=\".layout-menu a.active-route\">\n <smz-gallery-layout-stage piece=\"sidebar\" width=\"24rem\" height=\"36rem\" [config]=\"full\" />\n </smz-gallery-case>\n </smz-gallery-section>\n `,\n})\nexport class LayoutMenuGalleryEntryComponent {\n private readonly path = inject(Router).url.split(/[?#]/)[0];\n\n protected readonly full: SmzLayoutGalleryStageConfig = { sidebar: galleryMenu(this.path) };\n protected readonly denied: SmzLayoutGalleryStageConfig = { sidebar: galleryMenu(this.path), hasClaim: (): boolean => false };\n protected readonly deep: SmzLayoutGalleryStageConfig = { sidebar: galleryDeepMenu(this.path) };\n protected readonly short: SmzLayoutGalleryStageConfig = { sidebar: GALLERY_MENU_SHORT };\n}\n"],"names":[],"mappings":";;;;;;AAMA;;;;AAIG;MAyCU,+BAA+B,CAAA;AACzB,IAAA,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;IAExC,IAAI,GAAgC,EAAE,OAAO,EAAE,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;AACvE,IAAA,MAAM,GAAgC,EAAE,OAAO,EAAE,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,QAAQ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