@seniorsistemas/angular-components 19.7.4 → 19.7.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/alert/lib/alert/alert.component.d.ts +8 -1
  2. package/chips/README.md +3 -2
  3. package/chips/lib/chips/chip-item/chip-item.component.d.ts +2 -0
  4. package/chips/lib/chips/chips/chips.component.d.ts +2 -1
  5. package/datepicker/README.md +15 -2
  6. package/datepicker/lib/datepicker/date-segment-input.d.ts +82 -0
  7. package/datepicker/lib/datepicker/date.utils.d.ts +3 -7
  8. package/datepicker/lib/datepicker/datepicker.component.d.ts +101 -8
  9. package/dynamic-form/dynamic-form/components/lookup/models/lookup-api.model.d.ts +7 -1
  10. package/dynamic-form/dynamic-form/form-field/configurations/fields/lookup-field.d.ts +1 -1
  11. package/dynamic-form/public-api.d.ts +1 -1
  12. package/esm2022/alert/lib/alert/alert.component.mjs +12 -6
  13. package/esm2022/chips/lib/chips/chip-item/chip-item.component.mjs +15 -4
  14. package/esm2022/chips/lib/chips/chips/chips.component.mjs +26 -14
  15. package/esm2022/datepicker/lib/datepicker/date-segment-input.mjs +418 -0
  16. package/esm2022/datepicker/lib/datepicker/date.utils.mjs +7 -79
  17. package/esm2022/datepicker/lib/datepicker/datepicker.component.mjs +451 -41
  18. package/esm2022/dynamic-form/dynamic-form/components/lookup/lookup.component.mjs +2 -2
  19. package/esm2022/dynamic-form/dynamic-form/components/lookup/models/lookup-api.model.mjs +1 -1
  20. package/esm2022/dynamic-form/dynamic-form/form-field/configurations/fields/lookup-field.mjs +1 -1
  21. package/esm2022/dynamic-form/public-api.mjs +1 -1
  22. package/esm2022/panel/lib/panel/panel.component.mjs +3 -3
  23. package/esm2022/sidebar/lib/sidebar/sidebar.component.mjs +8 -6
  24. package/esm2022/thumbnail/lib/thumbnail/thumbnail.component.mjs +3 -3
  25. package/fesm2022/seniorsistemas-angular-components-alert.mjs +12 -6
  26. package/fesm2022/seniorsistemas-angular-components-alert.mjs.map +1 -1
  27. package/fesm2022/seniorsistemas-angular-components-chips.mjs +39 -16
  28. package/fesm2022/seniorsistemas-angular-components-chips.mjs.map +1 -1
  29. package/fesm2022/seniorsistemas-angular-components-datepicker.mjs +873 -118
  30. package/fesm2022/seniorsistemas-angular-components-datepicker.mjs.map +1 -1
  31. package/fesm2022/seniorsistemas-angular-components-dynamic-form.mjs +1 -1
  32. package/fesm2022/seniorsistemas-angular-components-dynamic-form.mjs.map +1 -1
  33. package/fesm2022/seniorsistemas-angular-components-panel.mjs +2 -2
  34. package/fesm2022/seniorsistemas-angular-components-panel.mjs.map +1 -1
  35. package/fesm2022/seniorsistemas-angular-components-sidebar.mjs +7 -5
  36. package/fesm2022/seniorsistemas-angular-components-sidebar.mjs.map +1 -1
  37. package/fesm2022/seniorsistemas-angular-components-thumbnail.mjs +2 -2
  38. package/fesm2022/seniorsistemas-angular-components-thumbnail.mjs.map +1 -1
  39. package/package.json +13 -13
  40. package/schematics/migrations/migrate-steps-to-stepper/index.d.ts +2 -0
  41. package/schematics/migrations/migrate-steps-to-stepper/index.js +104 -0
  42. package/schematics/migrations/migrate-steps-to-stepper/index.js.map +1 -0
  43. package/schematics/migrations.json +5 -0
  44. package/schematics/utils/ast-utils.d.ts +13 -0
  45. package/schematics/utils/ast-utils.js +76 -0
  46. package/schematics/utils/ast-utils.js.map +1 -1
  47. package/sidebar/lib/sidebar/sidebar.component.d.ts +3 -1
  48. package/schematics/migrations/migrate-dynamic-form-v19/index.test.d.ts +0 -1
  49. package/schematics/migrations/migrate-dynamic-form-v19/index.test.js +0 -888
  50. package/schematics/migrations/migrate-dynamic-form-v19/index.test.js.map +0 -1
  51. package/schematics/migrations/migrate-p-datepicker/index.test.d.ts +0 -1
  52. package/schematics/migrations/migrate-p-datepicker/index.test.js +0 -392
  53. package/schematics/migrations/migrate-p-datepicker/index.test.js.map +0 -1
  54. package/schematics/migrations/migrate-p-editor/index.test.d.ts +0 -1
  55. package/schematics/migrations/migrate-p-editor/index.test.js +0 -393
  56. package/schematics/migrations/migrate-p-editor/index.test.js.map +0 -1
  57. package/schematics/migrations/migrate-s-chips-outputs/index.test.d.ts +0 -1
  58. package/schematics/migrations/migrate-s-chips-outputs/index.test.js +0 -125
  59. package/schematics/migrations/migrate-s-chips-outputs/index.test.js.map +0 -1
  60. package/schematics/utils/ast-utils.test.d.ts +0 -1
  61. package/schematics/utils/ast-utils.test.js +0 -138
  62. package/schematics/utils/ast-utils.test.js.map +0 -1
  63. package/schematics/utils/workspace-utils.test.d.ts +0 -1
  64. package/schematics/utils/workspace-utils.test.js +0 -152
  65. package/schematics/utils/workspace-utils.test.js.map +0 -1
@@ -73,7 +73,7 @@ class PanelComponent {
73
73
  this.footerTemplate = this._getFooterTemplate();
74
74
  }
75
75
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: PanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
76
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: PanelComponent, isStandalone: true, selector: "s-panel", inputs: { ariaHeaderLevel: "ariaHeaderLevel", header: "header", description: "description", toggleable: "toggleable", collapsed: "collapsed", severity: "severity", borderButtonOptions: "borderButtonOptions", class: "class" }, outputs: { collapsedChange: "collapsedChange" }, queries: [{ propertyName: "templates", predicate: TemplateDirective }], ngImport: i0, template: "<div\n class=\"relative border border-[#dedce5] bg-grayscale-0 p-5 transition-colors duration-500 ease-in-out\"\n [class]=\"class\"\n [ngClass]=\"{\n 'border-criticality-green': severity === EnumSeverity.Success,\n 'border-criticality-blue': severity === EnumSeverity.Info,\n 'border-criticality-orange': severity === EnumSeverity.Warn,\n 'border-criticality-red': severity === EnumSeverity.Error,\n }\"\n>\n @if (borderButtonOptions && borderButtonOptions.visible?.(severity)) {\n <s-border-button\n [severity]=\"severity\"\n [options]=\"borderButtonOptions\"\n class=\"absolute -top-3 right-[15px] z-10\"\n [@BorderButtonAnimation]\n >\n </s-border-button>\n }\n\n @if (header || headerTemplate) {\n <div\n class=\"flex justify-between\"\n [ngClass]=\"{ 'mb-3 border-b border-b-[#dedce5] pb-3': !collapsed }\"\n >\n <div class=\"grow\">\n @if (headerTemplate) {\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n } @else {\n <div class=\"flex flex-col gap-3\">\n <span\n class=\"uppercase\"\n role=\"heading\"\n [attr.aria-level]=\"ariaHeaderLevel\"\n >{{ header }}</span\n >\n @if (description) {\n <span class=\"text-sm text-grayscale-60\">{{ description }}</span>\n }\n </div>\n }\n </div>\n\n @if (toggleable) {\n <button\n type=\"button\"\n class=\"fas h-6 w-6 cursor-pointer border-none bg-transparent text-[#212533]\"\n [ngClass]=\"{\n 'fa-plus': collapsed,\n 'fa-minus': !collapsed,\n }\"\n [attr.aria-expanded]=\"!collapsed\"\n [attr.aria-controls]=\"collapsed ? null : panelBodyId\"\n [attr.aria-label]=\"'platform.angular_components.panel_toggle' | translate: { header: header || '' }\"\n (click)=\"toggleCollapsed()\"\n ></button>\n }\n </div>\n }\n\n @if (!toggleable || !collapsed) {\n <div [id]=\"panelBodyId\">\n <div>\n <ng-content></ng-content>\n <ng-container *ngTemplateOutlet=\"bodyTemplate\"></ng-container>\n </div>\n\n @if (footerTemplate) {\n <div class=\"border-t border-t-[#dedce5] pt-3\">\n <ng-container *ngTemplateOutlet=\"footerTemplate\"></ng-container>\n </div>\n }\n </div>\n }\n</div>\n\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: BorderButtonComponent, selector: "s-border-button", inputs: ["severity", "options"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }], animations: [
76
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: PanelComponent, isStandalone: true, selector: "s-panel", inputs: { ariaHeaderLevel: "ariaHeaderLevel", header: "header", description: "description", toggleable: "toggleable", collapsed: "collapsed", severity: "severity", borderButtonOptions: "borderButtonOptions", class: "class" }, outputs: { collapsedChange: "collapsedChange" }, queries: [{ propertyName: "templates", predicate: TemplateDirective }], ngImport: i0, template: "<div\n class=\"relative border border-[#dedce5] bg-grayscale-0 p-5 transition-colors duration-500 ease-in-out\"\n [class]=\"class\"\n [ngClass]=\"{\n 'border-criticality-green': severity === EnumSeverity.Success,\n 'border-criticality-blue': severity === EnumSeverity.Info,\n 'border-criticality-orange': severity === EnumSeverity.Warn,\n 'border-criticality-red': severity === EnumSeverity.Error,\n }\"\n>\n @if (borderButtonOptions && borderButtonOptions.visible?.(severity)) {\n <s-border-button\n [severity]=\"severity\"\n [options]=\"borderButtonOptions\"\n class=\"absolute -top-3 right-[15px] z-10\"\n [@BorderButtonAnimation]\n >\n </s-border-button>\n }\n\n @if (header || headerTemplate) {\n <div\n class=\"flex justify-between\"\n [ngClass]=\"{ 'mb-3 border-b border-b-[#dedce5] pb-3': !collapsed }\"\n >\n <div class=\"grow\">\n @if (headerTemplate) {\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n } @else {\n <div class=\"flex flex-col gap-3\">\n <span\n class=\"uppercase\"\n role=\"heading\"\n [attr.aria-level]=\"ariaHeaderLevel\"\n >{{ header }}</span\n >\n @if (description) {\n <span class=\"text-sm text-grayscale-60\">{{ description }}</span>\n }\n </div>\n }\n </div>\n\n @if (toggleable) {\n <button\n type=\"button\"\n class=\"fas h-6 w-6 cursor-pointer border-none bg-transparent text-[#212533]\"\n [ngClass]=\"{\n 'fa-plus': collapsed,\n 'fa-minus': !collapsed,\n }\"\n [attr.aria-expanded]=\"!collapsed\"\n [attr.aria-controls]=\"collapsed ? null : panelBodyId\"\n [attr.aria-label]=\"'platform.angular_components.panel_toggle' | translate: { header: header || '' }\"\n (click)=\"toggleCollapsed()\"\n ></button>\n }\n </div>\n }\n\n @if (!toggleable || !collapsed) {\n <div [id]=\"panelBodyId\">\n <div [class.pb-3]=\"footerTemplate\">\n <ng-content></ng-content>\n <ng-container *ngTemplateOutlet=\"bodyTemplate\"></ng-container>\n </div>\n\n @if (footerTemplate) {\n <div class=\"border-t border-t-[#dedce5] pt-3\">\n <ng-container *ngTemplateOutlet=\"footerTemplate\"></ng-container>\n </div>\n }\n </div>\n }\n</div>\n\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: BorderButtonComponent, selector: "s-border-button", inputs: ["severity", "options"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i1.TranslatePipe, name: "translate" }], animations: [
77
77
  trigger('BorderButtonAnimation', [
78
78
  transition(':enter', [
79
79
  style({ transform: 'scaleY(0)', opacity: 0 }),
@@ -99,7 +99,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
99
99
  animate('300ms ease', style({ transform: 'scaleY(0)', opacity: 0 })),
100
100
  ]),
101
101
  ]),
102
- ], standalone: true, imports: [NgClass, BorderButtonComponent, NgTemplateOutlet, TranslateModule], template: "<div\n class=\"relative border border-[#dedce5] bg-grayscale-0 p-5 transition-colors duration-500 ease-in-out\"\n [class]=\"class\"\n [ngClass]=\"{\n 'border-criticality-green': severity === EnumSeverity.Success,\n 'border-criticality-blue': severity === EnumSeverity.Info,\n 'border-criticality-orange': severity === EnumSeverity.Warn,\n 'border-criticality-red': severity === EnumSeverity.Error,\n }\"\n>\n @if (borderButtonOptions && borderButtonOptions.visible?.(severity)) {\n <s-border-button\n [severity]=\"severity\"\n [options]=\"borderButtonOptions\"\n class=\"absolute -top-3 right-[15px] z-10\"\n [@BorderButtonAnimation]\n >\n </s-border-button>\n }\n\n @if (header || headerTemplate) {\n <div\n class=\"flex justify-between\"\n [ngClass]=\"{ 'mb-3 border-b border-b-[#dedce5] pb-3': !collapsed }\"\n >\n <div class=\"grow\">\n @if (headerTemplate) {\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n } @else {\n <div class=\"flex flex-col gap-3\">\n <span\n class=\"uppercase\"\n role=\"heading\"\n [attr.aria-level]=\"ariaHeaderLevel\"\n >{{ header }}</span\n >\n @if (description) {\n <span class=\"text-sm text-grayscale-60\">{{ description }}</span>\n }\n </div>\n }\n </div>\n\n @if (toggleable) {\n <button\n type=\"button\"\n class=\"fas h-6 w-6 cursor-pointer border-none bg-transparent text-[#212533]\"\n [ngClass]=\"{\n 'fa-plus': collapsed,\n 'fa-minus': !collapsed,\n }\"\n [attr.aria-expanded]=\"!collapsed\"\n [attr.aria-controls]=\"collapsed ? null : panelBodyId\"\n [attr.aria-label]=\"'platform.angular_components.panel_toggle' | translate: { header: header || '' }\"\n (click)=\"toggleCollapsed()\"\n ></button>\n }\n </div>\n }\n\n @if (!toggleable || !collapsed) {\n <div [id]=\"panelBodyId\">\n <div>\n <ng-content></ng-content>\n <ng-container *ngTemplateOutlet=\"bodyTemplate\"></ng-container>\n </div>\n\n @if (footerTemplate) {\n <div class=\"border-t border-t-[#dedce5] pt-3\">\n <ng-container *ngTemplateOutlet=\"footerTemplate\"></ng-container>\n </div>\n }\n </div>\n }\n</div>\n\n" }]
102
+ ], standalone: true, imports: [NgClass, BorderButtonComponent, NgTemplateOutlet, TranslateModule], template: "<div\n class=\"relative border border-[#dedce5] bg-grayscale-0 p-5 transition-colors duration-500 ease-in-out\"\n [class]=\"class\"\n [ngClass]=\"{\n 'border-criticality-green': severity === EnumSeverity.Success,\n 'border-criticality-blue': severity === EnumSeverity.Info,\n 'border-criticality-orange': severity === EnumSeverity.Warn,\n 'border-criticality-red': severity === EnumSeverity.Error,\n }\"\n>\n @if (borderButtonOptions && borderButtonOptions.visible?.(severity)) {\n <s-border-button\n [severity]=\"severity\"\n [options]=\"borderButtonOptions\"\n class=\"absolute -top-3 right-[15px] z-10\"\n [@BorderButtonAnimation]\n >\n </s-border-button>\n }\n\n @if (header || headerTemplate) {\n <div\n class=\"flex justify-between\"\n [ngClass]=\"{ 'mb-3 border-b border-b-[#dedce5] pb-3': !collapsed }\"\n >\n <div class=\"grow\">\n @if (headerTemplate) {\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n } @else {\n <div class=\"flex flex-col gap-3\">\n <span\n class=\"uppercase\"\n role=\"heading\"\n [attr.aria-level]=\"ariaHeaderLevel\"\n >{{ header }}</span\n >\n @if (description) {\n <span class=\"text-sm text-grayscale-60\">{{ description }}</span>\n }\n </div>\n }\n </div>\n\n @if (toggleable) {\n <button\n type=\"button\"\n class=\"fas h-6 w-6 cursor-pointer border-none bg-transparent text-[#212533]\"\n [ngClass]=\"{\n 'fa-plus': collapsed,\n 'fa-minus': !collapsed,\n }\"\n [attr.aria-expanded]=\"!collapsed\"\n [attr.aria-controls]=\"collapsed ? null : panelBodyId\"\n [attr.aria-label]=\"'platform.angular_components.panel_toggle' | translate: { header: header || '' }\"\n (click)=\"toggleCollapsed()\"\n ></button>\n }\n </div>\n }\n\n @if (!toggleable || !collapsed) {\n <div [id]=\"panelBodyId\">\n <div [class.pb-3]=\"footerTemplate\">\n <ng-content></ng-content>\n <ng-container *ngTemplateOutlet=\"bodyTemplate\"></ng-container>\n </div>\n\n @if (footerTemplate) {\n <div class=\"border-t border-t-[#dedce5] pt-3\">\n <ng-container *ngTemplateOutlet=\"footerTemplate\"></ng-container>\n </div>\n }\n </div>\n }\n</div>\n\n" }]
103
103
  }], propDecorators: { ariaHeaderLevel: [{
104
104
  type: Input
105
105
  }], header: [{
@@ -1 +1 @@
1
- {"version":3,"file":"seniorsistemas-angular-components-panel.mjs","sources":["../../projects/angular-components/panel/src/lib/panel/panel.component.ts","../../projects/angular-components/panel/src/lib/panel/panel.component.html","../../projects/angular-components/panel/src/lib/panel/panel.module.ts","../../projects/angular-components/panel/src/seniorsistemas-angular-components-panel.ts"],"sourcesContent":["import { animate, style, transition, trigger } from '@angular/animations';\r\nimport {\r\n AfterContentInit,\r\n Component,\r\n ContentChildren,\r\n EventEmitter,\r\n Input,\r\n Output,\r\n QueryList,\r\n TemplateRef,\r\n} from '@angular/core';\r\nimport {\r\n BorderButtonOptions,\r\n EnumSeverity,\r\n Severities,\r\n BorderButtonComponent,\r\n} from '@seniorsistemas/angular-components/shared';\r\nimport { TemplateDirective } from '@seniorsistemas/angular-components/template';\r\nimport { NgClass, NgTemplateOutlet } from '@angular/common';\r\nimport { TranslateModule } from '@ngx-translate/core';\r\n\r\n/**\r\n * @description Componente de painel com cabeçalho, corpo e rodapé customizáveis\r\n * via `TemplateDirective`. Suporta colapsar/expandir com animação, nível de\r\n * severidade para estilo visual e botão de borda configurável.\r\n *\r\n * @example\r\n * ```html\r\n * <s-panel header=\"Título\" [toggleable]=\"true\" severity=\"info\">\r\n * <p>Conteúdo</p>\r\n * </s-panel>\r\n * ```\r\n *\r\n * @category Data\r\n */\r\n@Component({\r\n selector: 's-panel',\r\n templateUrl: './panel.component.html',\r\n animations: [\r\n trigger('BorderButtonAnimation', [\r\n transition(':enter', [\r\n style({ transform: 'scaleY(0)', opacity: 0 }),\r\n animate('300ms ease', style({ transform: 'scaleY(1)', opacity: 1 })),\r\n ]),\r\n transition(':leave', [\r\n style({ transform: 'scaleY(1)', opacity: 1 }),\r\n animate('300ms ease', style({ transform: 'scaleY(0)', opacity: 0 })),\r\n ]),\r\n ]),\r\n ],\r\n standalone: true,\r\n imports: [NgClass, BorderButtonComponent, NgTemplateOutlet, TranslateModule],\r\n})\r\nexport class PanelComponent implements AfterContentInit {\r\n private static _idCounter = 0;\r\n\r\n /** @description ID único gerado automaticamente para associar o botão toggle ao corpo do painel via aria-controls. */\r\n public readonly panelBodyId = `panel-body-${++PanelComponent._idCounter}`;\r\n\r\n /** @description Nível do heading do cabeçalho para acessibilidade (aria-level). @default 3 */\r\n @Input()\r\n public ariaHeaderLevel: number = 3;\r\n\r\n /** @description Título exibido no cabeçalho do painel. */\r\n @Input()\r\n public header?: string;\r\n\r\n /** @description Descrição exibida no cabeçalho do painel. */\r\n @Input()\r\n public description?: string;\r\n\r\n /** @description Habilita o botão de toggle para colapsar/expandir o painel. @default false */\r\n @Input()\r\n public toggleable = false;\r\n\r\n /** @description Define o estado inicial do painel como colapsado. @default false */\r\n @Input()\r\n public collapsed = false;\r\n\r\n /** @description Nível de severidade que altera o estilo visual do painel. @default 'default' */\r\n @Input()\r\n public severity: Severities = 'default';\r\n\r\n /** @description Opções de configuração do botão de borda lateral do painel. */\r\n @Input()\r\n public borderButtonOptions?: BorderButtonOptions;\r\n\r\n /** @description Classes CSS adicionais aplicadas ao elemento raíz do painel. @default '' */\r\n @Input()\r\n public class: string = '';\r\n\r\n /** @description Emitido quando o estado de colapso muda, com o novo valor booleano. */\r\n @Output()\r\n public collapsedChange = new EventEmitter<boolean>();\r\n\r\n @ContentChildren(TemplateDirective)\r\n public templates: QueryList<TemplateDirective> | null = null;\r\n\r\n public headerTemplate: TemplateRef<unknown> | null = null;\r\n\r\n public bodyTemplate: TemplateRef<unknown> | null = null;\r\n\r\n public footerTemplate: TemplateRef<unknown> | null = null;\r\n\r\n readonly EnumSeverity = EnumSeverity;\r\n\r\n public ngAfterContentInit(): void {\r\n this._getTemplates();\r\n }\r\n\r\n public toggleCollapsed(): void {\r\n this.collapsed = !this.collapsed;\r\n this.collapsedChange.emit(this.collapsed);\r\n }\r\n\r\n private _getCustomTemplate(type: string) {\r\n return this.templates?.find((template: TemplateDirective) => template.type === type)?.template;\r\n }\r\n\r\n private _getHeaderTemplate(): TemplateRef<unknown> | null {\r\n return this._getCustomTemplate('header') ?? null;\r\n }\r\n\r\n private _getBodyTemplate(): TemplateRef<unknown> | null {\r\n return this._getCustomTemplate('body') ?? null;\r\n }\r\n\r\n private _getFooterTemplate(): TemplateRef<unknown> | null {\r\n return this._getCustomTemplate('footer') ?? null;\r\n }\r\n\r\n private _getTemplates(): void {\r\n this.headerTemplate = this._getHeaderTemplate();\r\n this.bodyTemplate = this._getBodyTemplate();\r\n this.footerTemplate = this._getFooterTemplate();\r\n }\r\n}\r\n","<div\n class=\"relative border border-[#dedce5] bg-grayscale-0 p-5 transition-colors duration-500 ease-in-out\"\n [class]=\"class\"\n [ngClass]=\"{\n 'border-criticality-green': severity === EnumSeverity.Success,\n 'border-criticality-blue': severity === EnumSeverity.Info,\n 'border-criticality-orange': severity === EnumSeverity.Warn,\n 'border-criticality-red': severity === EnumSeverity.Error,\n }\"\n>\n @if (borderButtonOptions && borderButtonOptions.visible?.(severity)) {\n <s-border-button\n [severity]=\"severity\"\n [options]=\"borderButtonOptions\"\n class=\"absolute -top-3 right-[15px] z-10\"\n [@BorderButtonAnimation]\n >\n </s-border-button>\n }\n\n @if (header || headerTemplate) {\n <div\n class=\"flex justify-between\"\n [ngClass]=\"{ 'mb-3 border-b border-b-[#dedce5] pb-3': !collapsed }\"\n >\n <div class=\"grow\">\n @if (headerTemplate) {\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n } @else {\n <div class=\"flex flex-col gap-3\">\n <span\n class=\"uppercase\"\n role=\"heading\"\n [attr.aria-level]=\"ariaHeaderLevel\"\n >{{ header }}</span\n >\n @if (description) {\n <span class=\"text-sm text-grayscale-60\">{{ description }}</span>\n }\n </div>\n }\n </div>\n\n @if (toggleable) {\n <button\n type=\"button\"\n class=\"fas h-6 w-6 cursor-pointer border-none bg-transparent text-[#212533]\"\n [ngClass]=\"{\n 'fa-plus': collapsed,\n 'fa-minus': !collapsed,\n }\"\n [attr.aria-expanded]=\"!collapsed\"\n [attr.aria-controls]=\"collapsed ? null : panelBodyId\"\n [attr.aria-label]=\"'platform.angular_components.panel_toggle' | translate: { header: header || '' }\"\n (click)=\"toggleCollapsed()\"\n ></button>\n }\n </div>\n }\n\n @if (!toggleable || !collapsed) {\n <div [id]=\"panelBodyId\">\n <div>\n <ng-content></ng-content>\n <ng-container *ngTemplateOutlet=\"bodyTemplate\"></ng-container>\n </div>\n\n @if (footerTemplate) {\n <div class=\"border-t border-t-[#dedce5] pt-3\">\n <ng-container *ngTemplateOutlet=\"footerTemplate\"></ng-container>\n </div>\n }\n </div>\n }\n</div>\n\n","import { NgModule } from '@angular/core';\r\n\r\nimport { PanelComponent } from './panel.component';\r\nimport { TemplateModule } from '@seniorsistemas/angular-components/template';\r\n\r\n@NgModule({\r\n imports: [PanelComponent],\r\n exports: [PanelComponent, TemplateModule],\r\n})\r\nexport class PanelModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AAqBA;;;;;;;;;;;;;AAaG;MAmBU,cAAc,CAAA;AACf,IAAA,OAAO,UAAU,GAAG,CAAC,CAAC;;AAGd,IAAA,WAAW,GAAG,CAAc,WAAA,EAAA,EAAE,cAAc,CAAC,UAAU,EAAE,CAAC;;IAInE,eAAe,GAAW,CAAC,CAAC;;AAI5B,IAAA,MAAM,CAAU;;AAIhB,IAAA,WAAW,CAAU;;IAIrB,UAAU,GAAG,KAAK,CAAC;;IAInB,SAAS,GAAG,KAAK,CAAC;;IAIlB,QAAQ,GAAe,SAAS,CAAC;;AAIjC,IAAA,mBAAmB,CAAuB;;IAI1C,KAAK,GAAW,EAAE,CAAC;;AAInB,IAAA,eAAe,GAAG,IAAI,YAAY,EAAW,CAAC;IAG9C,SAAS,GAAwC,IAAI,CAAC;IAEtD,cAAc,GAAgC,IAAI,CAAC;IAEnD,YAAY,GAAgC,IAAI,CAAC;IAEjD,cAAc,GAAgC,IAAI,CAAC;IAEjD,YAAY,GAAG,YAAY,CAAC;IAE9B,kBAAkB,GAAA;QACrB,IAAI,CAAC,aAAa,EAAE,CAAC;KACxB;IAEM,eAAe,GAAA;AAClB,QAAA,IAAI,CAAC,SAAS,GAAG,CAAC,IAAI,C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AAmB,EAAA,CAAA;sBADzB,KAAK;gBAKC,KAAK,EAAA,CAAA;sBADX,KAAK;gBAKC,eAAe,EAAA,CAAA;sBADrB,MAAM;gBAIA,SAAS,EAAA,CAAA;sBADf,eAAe;uBAAC,iBAAiB,CAAA;;;MEtFzB,WAAW,CAAA;wGAAX,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAX,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,EAHV,OAAA,EAAA,CAAA,cAAc,CACd,EAAA,OAAA,EAAA,CAAA,cAAc,EAAE,cAAc,CAAA,EAAA,CAAA,CAAA;yGAE/B,WAAW,EAAA,OAAA,EAAA,CAHV,cAAc,EACE,cAAc,CAAA,EAAA,CAAA,CAAA;;4FAE/B,WAAW,EAAA,UAAA,EAAA,CAAA;kBAJvB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,cAAc,CAAC;AACzB,oBAAA,OAAO,EAAE,CAAC,cAAc,EAAE,cAAc,CAAC;AAC5C,iBAAA,CAAA;;;ACRD;;AAEG;;;;"}
1
+ {"version":3,"file":"seniorsistemas-angular-components-panel.mjs","sources":["../../projects/angular-components/panel/src/lib/panel/panel.component.ts","../../projects/angular-components/panel/src/lib/panel/panel.component.html","../../projects/angular-components/panel/src/lib/panel/panel.module.ts","../../projects/angular-components/panel/src/seniorsistemas-angular-components-panel.ts"],"sourcesContent":["import { animate, style, transition, trigger } from '@angular/animations';\r\nimport {\r\n AfterContentInit,\r\n Component,\r\n ContentChildren,\r\n EventEmitter,\r\n Input,\r\n Output,\r\n QueryList,\r\n TemplateRef,\r\n} from '@angular/core';\r\nimport {\r\n BorderButtonOptions,\r\n EnumSeverity,\r\n Severities,\r\n BorderButtonComponent,\r\n} from '@seniorsistemas/angular-components/shared';\r\nimport { TemplateDirective } from '@seniorsistemas/angular-components/template';\r\nimport { NgClass, NgTemplateOutlet } from '@angular/common';\r\nimport { TranslateModule } from '@ngx-translate/core';\r\n\r\n/**\r\n * @description Componente de painel com cabeçalho, corpo e rodapé customizáveis\r\n * via `TemplateDirective`. Suporta colapsar/expandir com animação, nível de\r\n * severidade para estilo visual e botão de borda configurável.\r\n *\r\n * @example\r\n * ```html\r\n * <s-panel header=\"Título\" [toggleable]=\"true\" severity=\"info\">\r\n * <p>Conteúdo</p>\r\n * </s-panel>\r\n * ```\r\n *\r\n * @category Data\r\n */\r\n@Component({\r\n selector: 's-panel',\r\n templateUrl: './panel.component.html',\r\n animations: [\r\n trigger('BorderButtonAnimation', [\r\n transition(':enter', [\r\n style({ transform: 'scaleY(0)', opacity: 0 }),\r\n animate('300ms ease', style({ transform: 'scaleY(1)', opacity: 1 })),\r\n ]),\r\n transition(':leave', [\r\n style({ transform: 'scaleY(1)', opacity: 1 }),\r\n animate('300ms ease', style({ transform: 'scaleY(0)', opacity: 0 })),\r\n ]),\r\n ]),\r\n ],\r\n standalone: true,\r\n imports: [NgClass, BorderButtonComponent, NgTemplateOutlet, TranslateModule],\r\n})\r\nexport class PanelComponent implements AfterContentInit {\r\n private static _idCounter = 0;\r\n\r\n /** @description ID único gerado automaticamente para associar o botão toggle ao corpo do painel via aria-controls. */\r\n public readonly panelBodyId = `panel-body-${++PanelComponent._idCounter}`;\r\n\r\n /** @description Nível do heading do cabeçalho para acessibilidade (aria-level). @default 3 */\r\n @Input()\r\n public ariaHeaderLevel: number = 3;\r\n\r\n /** @description Título exibido no cabeçalho do painel. */\r\n @Input()\r\n public header?: string;\r\n\r\n /** @description Descrição exibida no cabeçalho do painel. */\r\n @Input()\r\n public description?: string;\r\n\r\n /** @description Habilita o botão de toggle para colapsar/expandir o painel. @default false */\r\n @Input()\r\n public toggleable = false;\r\n\r\n /** @description Define o estado inicial do painel como colapsado. @default false */\r\n @Input()\r\n public collapsed = false;\r\n\r\n /** @description Nível de severidade que altera o estilo visual do painel. @default 'default' */\r\n @Input()\r\n public severity: Severities = 'default';\r\n\r\n /** @description Opções de configuração do botão de borda lateral do painel. */\r\n @Input()\r\n public borderButtonOptions?: BorderButtonOptions;\r\n\r\n /** @description Classes CSS adicionais aplicadas ao elemento raíz do painel. @default '' */\r\n @Input()\r\n public class: string = '';\r\n\r\n /** @description Emitido quando o estado de colapso muda, com o novo valor booleano. */\r\n @Output()\r\n public collapsedChange = new EventEmitter<boolean>();\r\n\r\n @ContentChildren(TemplateDirective)\r\n public templates: QueryList<TemplateDirective> | null = null;\r\n\r\n public headerTemplate: TemplateRef<unknown> | null = null;\r\n\r\n public bodyTemplate: TemplateRef<unknown> | null = null;\r\n\r\n public footerTemplate: TemplateRef<unknown> | null = null;\r\n\r\n readonly EnumSeverity = EnumSeverity;\r\n\r\n public ngAfterContentInit(): void {\r\n this._getTemplates();\r\n }\r\n\r\n public toggleCollapsed(): void {\r\n this.collapsed = !this.collapsed;\r\n this.collapsedChange.emit(this.collapsed);\r\n }\r\n\r\n private _getCustomTemplate(type: string) {\r\n return this.templates?.find((template: TemplateDirective) => template.type === type)?.template;\r\n }\r\n\r\n private _getHeaderTemplate(): TemplateRef<unknown> | null {\r\n return this._getCustomTemplate('header') ?? null;\r\n }\r\n\r\n private _getBodyTemplate(): TemplateRef<unknown> | null {\r\n return this._getCustomTemplate('body') ?? null;\r\n }\r\n\r\n private _getFooterTemplate(): TemplateRef<unknown> | null {\r\n return this._getCustomTemplate('footer') ?? null;\r\n }\r\n\r\n private _getTemplates(): void {\r\n this.headerTemplate = this._getHeaderTemplate();\r\n this.bodyTemplate = this._getBodyTemplate();\r\n this.footerTemplate = this._getFooterTemplate();\r\n }\r\n}\r\n","<div\n class=\"relative border border-[#dedce5] bg-grayscale-0 p-5 transition-colors duration-500 ease-in-out\"\n [class]=\"class\"\n [ngClass]=\"{\n 'border-criticality-green': severity === EnumSeverity.Success,\n 'border-criticality-blue': severity === EnumSeverity.Info,\n 'border-criticality-orange': severity === EnumSeverity.Warn,\n 'border-criticality-red': severity === EnumSeverity.Error,\n }\"\n>\n @if (borderButtonOptions && borderButtonOptions.visible?.(severity)) {\n <s-border-button\n [severity]=\"severity\"\n [options]=\"borderButtonOptions\"\n class=\"absolute -top-3 right-[15px] z-10\"\n [@BorderButtonAnimation]\n >\n </s-border-button>\n }\n\n @if (header || headerTemplate) {\n <div\n class=\"flex justify-between\"\n [ngClass]=\"{ 'mb-3 border-b border-b-[#dedce5] pb-3': !collapsed }\"\n >\n <div class=\"grow\">\n @if (headerTemplate) {\n <ng-container *ngTemplateOutlet=\"headerTemplate\"></ng-container>\n } @else {\n <div class=\"flex flex-col gap-3\">\n <span\n class=\"uppercase\"\n role=\"heading\"\n [attr.aria-level]=\"ariaHeaderLevel\"\n >{{ header }}</span\n >\n @if (description) {\n <span class=\"text-sm text-grayscale-60\">{{ description }}</span>\n }\n </div>\n }\n </div>\n\n @if (toggleable) {\n <button\n type=\"button\"\n class=\"fas h-6 w-6 cursor-pointer border-none bg-transparent text-[#212533]\"\n [ngClass]=\"{\n 'fa-plus': collapsed,\n 'fa-minus': !collapsed,\n }\"\n [attr.aria-expanded]=\"!collapsed\"\n [attr.aria-controls]=\"collapsed ? null : panelBodyId\"\n [attr.aria-label]=\"'platform.angular_components.panel_toggle' | translate: { header: header || '' }\"\n (click)=\"toggleCollapsed()\"\n ></button>\n }\n </div>\n }\n\n @if (!toggleable || !collapsed) {\n <div [id]=\"panelBodyId\">\n <div [class.pb-3]=\"footerTemplate\">\n <ng-content></ng-content>\n <ng-container *ngTemplateOutlet=\"bodyTemplate\"></ng-container>\n </div>\n\n @if (footerTemplate) {\n <div class=\"border-t border-t-[#dedce5] pt-3\">\n <ng-container *ngTemplateOutlet=\"footerTemplate\"></ng-container>\n </div>\n }\n </div>\n }\n</div>\n\n","import { NgModule } from '@angular/core';\r\n\r\nimport { PanelComponent } from './panel.component';\r\nimport { TemplateModule } from '@seniorsistemas/angular-components/template';\r\n\r\n@NgModule({\r\n imports: [PanelComponent],\r\n exports: [PanelComponent, TemplateModule],\r\n})\r\nexport class PanelModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AAqBA;;;;;;;;;;;;;AAaG;MAmBU,cAAc,CAAA;AACf,IAAA,OAAO,UAAU,GAAG,CAAC,CAAC;;AAGd,IAAA,WAAW,GAAG,CAAc,WAAA,EAAA,EAAE,cAAc,CAAC,UAAU,EAAE,CAAC;;IAInE,eAAe,GAAW,CAAC,CAAC;;AAI5B,IAAA,MAAM,CAAU;;AAIhB,IAAA,WAAW,CAAU;;IAIrB,UAAU,GAAG,KAAK,CAAC;;IAInB,SAAS,GAAG,KAAK,CAAC;;IAIlB,QAAQ,GAAe,SAAS,CAAC;;AAIjC,IAAA,mBAAmB,CAAuB;;IAI1C,KAAK,GAAW,EAAE,CAAC;;AAInB,IAAA,eAAe,GAAG,IAAI,YAAY,EAAW,CAAC;IAG9C,SAAS,GAAwC,IAAI,CAAC;IAEtD,cAAc,GAAgC,IAAI,CAAC;IAEnD,YAAY,GAAgC,IAAI,CAAC;IAEjD,cAAc,GAAgC,IAAI,CAAC;IAEjD,YAAY,GAAG,YAAY,CAAC;IAE9B,kBAAkB,GAAA;QACrB,IAAI,CAAC,aAAa,EAAE,CAAC;KACxB;IAEM,eAAe,GAAA;AAClB,QAAA,IAAI,CAAC,SAAS,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC;QACjC,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;KAC7C;AAEO,IAAA,kBAAkB,CAAC,IAAY,EAAA;AACnC,QAAA,OAAO,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,QAA2B,KAAK,QAAQ,CAAC,IAAI,KAAK,IAAI,CAAC,EAAE,QAAQ,CAAC;KACl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QAAA,EAAA,CAAA,CAAA;AAAX,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,EAHV,OAAA,EAAA,CAAA,cAAc,CACd,EAAA,OAAA,EAAA,CAAA,cAAc,EAAE,cAAc,CAAA,EAAA,CAAA,CAAA;yGAE/B,WAAW,EAAA,OAAA,EAAA,CAHV,cAAc,EACE,cAAc,CAAA,EAAA,CAAA,CAAA;;4FAE/B,WAAW,EAAA,UAAA,EAAA,CAAA;kBAJvB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,cAAc,CAAC;AACzB,oBAAA,OAAO,EAAE,CAAC,cAAc,EAAE,cAAc,CAAC;AAC5C,iBAAA,CAAA;;;ACRD;;AAEG;;;;"}
@@ -1,10 +1,11 @@
1
1
  import { trigger, transition, style, animate } from '@angular/animations';
2
+ import { CdkTrapFocus } from '@angular/cdk/a11y';
3
+ import { NgTemplateOutlet } from '@angular/common';
2
4
  import * as i0 from '@angular/core';
3
- import { model, effect, Component, ContentChildren, Input, NgModule } from '@angular/core';
5
+ import { model, contentChild, effect, Component, ContentChildren, Input, NgModule } from '@angular/core';
6
+ import { FooterComponent } from '@seniorsistemas/angular-components/structure';
4
7
  import { TemplateDirective, TemplateModule } from '@seniorsistemas/angular-components/template';
5
8
  import { disableScroll, enableScroll } from '@seniorsistemas/angular-components/utils';
6
- import { CdkTrapFocus } from '@angular/cdk/a11y';
7
- import { NgTemplateOutlet } from '@angular/common';
8
9
 
9
10
  /**
10
11
  * @description Componente de painel lateral deslizante (sidebar) que aparece sobre o conteúdo
@@ -74,6 +75,7 @@ class SidebarComponent {
74
75
  headerTemplate = null;
75
76
  bodyTemplate = null;
76
77
  footerTemplate = null;
78
+ footerComponent = contentChild(FooterComponent);
77
79
  _confirmClose = () => true;
78
80
  visibleEffect = effect(() => {
79
81
  const visible = this.visible();
@@ -118,7 +120,7 @@ class SidebarComponent {
118
120
  this.footerTemplate = this.getFooterTemplate();
119
121
  }
120
122
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SidebarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
121
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: SidebarComponent, isStandalone: true, selector: "s-sidebar", inputs: { visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: false, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: false, isRequired: false, transformFunction: null }, closeOnEscape: { classPropertyName: "closeOnEscape", publicName: "closeOnEscape", isSignal: false, isRequired: false, transformFunction: null }, header: { classPropertyName: "header", publicName: "header", isSignal: false, isRequired: false, transformFunction: null }, largeSized: { classPropertyName: "largeSized", publicName: "largeSized", isSignal: false, isRequired: false, transformFunction: null }, cache: { classPropertyName: "cache", publicName: "cache", isSignal: false, isRequired: false, transformFunction: null }, registerConfirmClose: { classPropertyName: "registerConfirmClose", publicName: "registerConfirmClose", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { visible: "visibleChange" }, host: { listeners: { "document:keydown.escape": "handleEscape()" } }, queries: [{ propertyName: "templates", predicate: TemplateDirective }], ngImport: i0, template: "@if (visible()) {\n <div\n class=\"backdrop\"\n (click)=\"dismissible && closeSidebar()\"\n ></div>\n}\n\n@if (cache || visible()) {\n <div\n cdkTrapFocus\n [cdkTrapFocusAutoCapture]=\"visible()\"\n [@visibilityChanged]\n class=\"sidebar\"\n [class.sidebar--open]=\"visible()\"\n [class.sidebar--large-size]=\"largeSized\"\n >\n <div class=\"sidebar__header\">\n @if (headerTemplate) {\n <ng-template *ngTemplateOutlet=\"headerTemplate\"></ng-template>\n } @else {\n <span class=\"sidebar__header__title\">{{ header }}</span>\n }\n @if (closable) {\n <button\n class=\"sidebar__header__close fa-solid fa-xmark\"\n (click)=\"closeSidebar()\"\n ></button>\n }\n </div>\n <div class=\"sidebar__body\">\n @if (bodyTemplate) {\n <ng-template [ngTemplateOutlet]=\"bodyTemplate\"></ng-template>\n } @else {\n <ng-content></ng-content>\n }\n </div>\n @if (footerTemplate) {\n <div class=\"sidebar__footer\">\n <ng-template [ngTemplateOutlet]=\"footerTemplate\"></ng-template>\n </div>\n }\n </div>\n}\n", styles: [".backdrop{background-color:#00000080;height:100%;left:0;position:fixed;top:0;transition:opacity .3s;width:100%;z-index:998}.sidebar{background-color:#fff;box-shadow:0 1px 5px #00000040;display:flex;flex-direction:column;height:100%;right:-100%;padding:1rem;position:fixed;top:0;transition:right .3s;width:100%;z-index:999}.sidebar__header{border-bottom:1px solid #dedce5;display:flex;justify-content:space-between;padding-bottom:.75rem}.sidebar__header__title{color:#212533;font-family:Inter,sans-serif;font-size:1rem;text-transform:uppercase;-webkit-user-select:none;user-select:none}.sidebar__header__close{background-color:transparent;border:none;color:#212533;cursor:pointer;font-size:1rem;padding:.5rem}.sidebar__body{flex-grow:1;overflow:auto;padding:1rem .5rem}.sidebar__footer{border-top:1px solid #dedce5;padding-top:.75rem}.sidebar--open{right:0}@media (min-width: 768px){.sidebar{width:75%}}@media (min-width: 992px){.sidebar{width:50%}}\n"], dependencies: [{ kind: "directive", type: CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], animations: [
123
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: SidebarComponent, isStandalone: true, selector: "s-sidebar", inputs: { visible: { classPropertyName: "visible", publicName: "visible", isSignal: true, isRequired: false, transformFunction: null }, closable: { classPropertyName: "closable", publicName: "closable", isSignal: false, isRequired: false, transformFunction: null }, dismissible: { classPropertyName: "dismissible", publicName: "dismissible", isSignal: false, isRequired: false, transformFunction: null }, closeOnEscape: { classPropertyName: "closeOnEscape", publicName: "closeOnEscape", isSignal: false, isRequired: false, transformFunction: null }, header: { classPropertyName: "header", publicName: "header", isSignal: false, isRequired: false, transformFunction: null }, largeSized: { classPropertyName: "largeSized", publicName: "largeSized", isSignal: false, isRequired: false, transformFunction: null }, cache: { classPropertyName: "cache", publicName: "cache", isSignal: false, isRequired: false, transformFunction: null }, registerConfirmClose: { classPropertyName: "registerConfirmClose", publicName: "registerConfirmClose", isSignal: false, isRequired: false, transformFunction: null } }, outputs: { visible: "visibleChange" }, host: { listeners: { "document:keydown.escape": "handleEscape()" } }, queries: [{ propertyName: "footerComponent", first: true, predicate: FooterComponent, descendants: true, isSignal: true }, { propertyName: "templates", predicate: TemplateDirective }], ngImport: i0, template: "@if (visible()) {\n <div\n class=\"backdrop\"\n (click)=\"dismissible && closeSidebar()\"\n ></div>\n}\n\n@if (cache || visible()) {\n <div\n cdkTrapFocus\n [cdkTrapFocusAutoCapture]=\"visible()\"\n [@visibilityChanged]\n class=\"sidebar\"\n [class.sidebar--open]=\"visible()\"\n [class.sidebar--large-size]=\"largeSized\"\n >\n <div class=\"sidebar__header\">\n @if (headerTemplate) {\n <ng-template *ngTemplateOutlet=\"headerTemplate\"></ng-template>\n } @else {\n <span class=\"sidebar__header__title\">{{ header }}</span>\n }\n @if (closable) {\n <button\n class=\"sidebar__header__close fa-solid fa-xmark\"\n (click)=\"closeSidebar()\"\n ></button>\n }\n </div>\n <div class=\"sidebar__body\">\n @if (bodyTemplate) {\n <ng-template [ngTemplateOutlet]=\"bodyTemplate\"></ng-template>\n } @else {\n <ng-content select=\":not(s-footer)\"></ng-content>\n }\n </div>\n @if (footerTemplate || footerComponent()) {\n <div class=\"sidebar__footer\">\n @if (footerTemplate) {\n <ng-template [ngTemplateOutlet]=\"footerTemplate\"></ng-template>\n } @else {\n <ng-content select=\"s-footer\"></ng-content>\n }\n </div>\n }\n </div>\n}\n\n", styles: [".backdrop{background-color:#00000080;height:100%;left:0;position:fixed;top:0;transition:opacity .3s;width:100%;z-index:998}.sidebar{background-color:#fff;box-shadow:0 1px 5px #00000040;display:flex;flex-direction:column;height:100%;right:-100%;padding:1rem;position:fixed;top:0;transition:right .3s;width:100%;z-index:999}.sidebar__header{border-bottom:1px solid #dedce5;display:flex;justify-content:space-between;padding-bottom:.75rem}.sidebar__header__title{color:#212533;font-family:Inter,sans-serif;font-size:1rem;text-transform:uppercase;-webkit-user-select:none;user-select:none}.sidebar__header__close{background-color:transparent;border:none;color:#212533;cursor:pointer;font-size:1rem;padding:.5rem}.sidebar__body{flex-grow:1;overflow:auto;padding:1rem .5rem}.sidebar__footer{border-top:1px solid #dedce5;padding-top:.75rem}.sidebar--open{right:0}@media (min-width: 768px){.sidebar{width:75%}}@media (min-width: 992px){.sidebar{width:50%}}\n"], dependencies: [{ kind: "directive", type: CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], animations: [
122
124
  trigger('visibilityChanged', [
123
125
  transition(':enter', [
124
126
  style({ transform: 'translateX(100%)' }),
@@ -146,7 +148,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
146
148
  animate('300ms', style({ transform: 'translateX(100%)' })),
147
149
  ]),
148
150
  ]),
149
- ], standalone: true, imports: [CdkTrapFocus, NgTemplateOutlet], template: "@if (visible()) {\n <div\n class=\"backdrop\"\n (click)=\"dismissible && closeSidebar()\"\n ></div>\n}\n\n@if (cache || visible()) {\n <div\n cdkTrapFocus\n [cdkTrapFocusAutoCapture]=\"visible()\"\n [@visibilityChanged]\n class=\"sidebar\"\n [class.sidebar--open]=\"visible()\"\n [class.sidebar--large-size]=\"largeSized\"\n >\n <div class=\"sidebar__header\">\n @if (headerTemplate) {\n <ng-template *ngTemplateOutlet=\"headerTemplate\"></ng-template>\n } @else {\n <span class=\"sidebar__header__title\">{{ header }}</span>\n }\n @if (closable) {\n <button\n class=\"sidebar__header__close fa-solid fa-xmark\"\n (click)=\"closeSidebar()\"\n ></button>\n }\n </div>\n <div class=\"sidebar__body\">\n @if (bodyTemplate) {\n <ng-template [ngTemplateOutlet]=\"bodyTemplate\"></ng-template>\n } @else {\n <ng-content></ng-content>\n }\n </div>\n @if (footerTemplate) {\n <div class=\"sidebar__footer\">\n <ng-template [ngTemplateOutlet]=\"footerTemplate\"></ng-template>\n </div>\n }\n </div>\n}\n", styles: [".backdrop{background-color:#00000080;height:100%;left:0;position:fixed;top:0;transition:opacity .3s;width:100%;z-index:998}.sidebar{background-color:#fff;box-shadow:0 1px 5px #00000040;display:flex;flex-direction:column;height:100%;right:-100%;padding:1rem;position:fixed;top:0;transition:right .3s;width:100%;z-index:999}.sidebar__header{border-bottom:1px solid #dedce5;display:flex;justify-content:space-between;padding-bottom:.75rem}.sidebar__header__title{color:#212533;font-family:Inter,sans-serif;font-size:1rem;text-transform:uppercase;-webkit-user-select:none;user-select:none}.sidebar__header__close{background-color:transparent;border:none;color:#212533;cursor:pointer;font-size:1rem;padding:.5rem}.sidebar__body{flex-grow:1;overflow:auto;padding:1rem .5rem}.sidebar__footer{border-top:1px solid #dedce5;padding-top:.75rem}.sidebar--open{right:0}@media (min-width: 768px){.sidebar{width:75%}}@media (min-width: 992px){.sidebar{width:50%}}\n"] }]
151
+ ], standalone: true, imports: [CdkTrapFocus, NgTemplateOutlet], template: "@if (visible()) {\n <div\n class=\"backdrop\"\n (click)=\"dismissible && closeSidebar()\"\n ></div>\n}\n\n@if (cache || visible()) {\n <div\n cdkTrapFocus\n [cdkTrapFocusAutoCapture]=\"visible()\"\n [@visibilityChanged]\n class=\"sidebar\"\n [class.sidebar--open]=\"visible()\"\n [class.sidebar--large-size]=\"largeSized\"\n >\n <div class=\"sidebar__header\">\n @if (headerTemplate) {\n <ng-template *ngTemplateOutlet=\"headerTemplate\"></ng-template>\n } @else {\n <span class=\"sidebar__header__title\">{{ header }}</span>\n }\n @if (closable) {\n <button\n class=\"sidebar__header__close fa-solid fa-xmark\"\n (click)=\"closeSidebar()\"\n ></button>\n }\n </div>\n <div class=\"sidebar__body\">\n @if (bodyTemplate) {\n <ng-template [ngTemplateOutlet]=\"bodyTemplate\"></ng-template>\n } @else {\n <ng-content select=\":not(s-footer)\"></ng-content>\n }\n </div>\n @if (footerTemplate || footerComponent()) {\n <div class=\"sidebar__footer\">\n @if (footerTemplate) {\n <ng-template [ngTemplateOutlet]=\"footerTemplate\"></ng-template>\n } @else {\n <ng-content select=\"s-footer\"></ng-content>\n }\n </div>\n }\n </div>\n}\n\n", styles: [".backdrop{background-color:#00000080;height:100%;left:0;position:fixed;top:0;transition:opacity .3s;width:100%;z-index:998}.sidebar{background-color:#fff;box-shadow:0 1px 5px #00000040;display:flex;flex-direction:column;height:100%;right:-100%;padding:1rem;position:fixed;top:0;transition:right .3s;width:100%;z-index:999}.sidebar__header{border-bottom:1px solid #dedce5;display:flex;justify-content:space-between;padding-bottom:.75rem}.sidebar__header__title{color:#212533;font-family:Inter,sans-serif;font-size:1rem;text-transform:uppercase;-webkit-user-select:none;user-select:none}.sidebar__header__close{background-color:transparent;border:none;color:#212533;cursor:pointer;font-size:1rem;padding:.5rem}.sidebar__body{flex-grow:1;overflow:auto;padding:1rem .5rem}.sidebar__footer{border-top:1px solid #dedce5;padding-top:.75rem}.sidebar--open{right:0}@media (min-width: 768px){.sidebar{width:75%}}@media (min-width: 992px){.sidebar{width:50%}}\n"] }]
150
152
  }], propDecorators: { templates: [{
151
153
  type: ContentChildren,
152
154
  args: [TemplateDirective]
@@ -1 +1 @@
1
- {"version":3,"file":"seniorsistemas-angular-components-sidebar.mjs","sources":["../../projects/angular-components/sidebar/src/lib/sidebar/sidebar.component.ts","../../projects/angular-components/sidebar/src/lib/sidebar/sidebar.component.html","../../projects/angular-components/sidebar/src/lib/sidebar/sidebar.module.ts","../../projects/angular-components/sidebar/src/seniorsistemas-angular-components-sidebar.ts"],"sourcesContent":["import { animate, style, transition, trigger } from '@angular/animations';\r\nimport {\r\n AfterContentInit,\r\n Component,\r\n ContentChildren,\r\n effect,\r\n Input,\r\n model,\r\n OnDestroy,\r\n QueryList,\r\n TemplateRef,\r\n} from '@angular/core';\r\nimport { TemplateDirective } from '@seniorsistemas/angular-components/template';\r\nimport { disableScroll, enableScroll } from '@seniorsistemas/angular-components/utils';\r\nimport { CdkTrapFocus } from '@angular/cdk/a11y';\r\nimport { NgTemplateOutlet } from '@angular/common';\r\n\r\n/**\r\n * @description Componente de painel lateral deslizante (sidebar) que aparece sobre o conteúdo\r\n * vindo do lado direito da tela. Suporta templates customizados para cabeçalho, corpo e rodapé\r\n * via `sTemplate`, bloqueio de scroll automático e confirmação de fechamento.\r\n *\r\n * @example\r\n * ```html\r\n * <s-sidebar [(visible)]=\"sidebarOpen\" header=\"Filtros\" [closable]=\"true\">\r\n * <ng-template sTemplate=\"body\">Conteúdo</ng-template>\r\n * </s-sidebar>\r\n * ```\r\n *\r\n * @category Overlay\r\n */\r\n@Component({\r\n selector: 's-sidebar',\r\n templateUrl: './sidebar.component.html',\r\n styleUrls: ['./sidebar.component.scss'],\r\n host: {\r\n '(document:keydown.escape)': 'handleEscape()',\r\n },\r\n animations: [\r\n trigger('visibilityChanged', [\r\n transition(':enter', [\r\n style({ transform: 'translateX(100%)' }),\r\n animate('300ms', style({ transform: 'translateX(0)' })),\r\n ]),\r\n transition(':leave', [\r\n style({ transform: 'translateX(0)' }),\r\n animate('300ms', style({ transform: 'translateX(100%)' })),\r\n ]),\r\n ]),\r\n ],\r\n standalone: true,\r\n imports: [CdkTrapFocus, NgTemplateOutlet],\r\n})\r\nexport class SidebarComponent implements AfterContentInit, OnDestroy {\r\n @ContentChildren(TemplateDirective)\r\n public templates: QueryList<TemplateDirective> | null = null;\r\n\r\n /**\r\n * @description Controla a visibilidade da sidebar. Suporta two-way binding via `[(visible)]`.\r\n *\r\n * @default false\r\n */\r\n public visible = model<boolean>(false);\r\n\r\n /**\r\n * @description Quando `true`, exibe o botão de fechar (X) no cabeçalho da sidebar.\r\n *\r\n * @default true\r\n */\r\n @Input()\r\n public closable = true;\r\n\r\n /**\r\n * @description Quando `true`, clicar no backdrop (área escurecida fora da sidebar) fecha o painel.\r\n *\r\n * @default true\r\n */\r\n @Input()\r\n public dismissible = true;\r\n\r\n /**\r\n * @description Quando `true`, pressionar a tecla Escape fecha a sidebar.\r\n *\r\n * @default true\r\n */\r\n @Input()\r\n public closeOnEscape = true;\r\n\r\n /**\r\n * @description Texto exibido no cabeçalho padrão da sidebar.\r\n * Pode ser substituído por um template customizado via `sTemplate=\"header\"`.\r\n */\r\n @Input()\r\n public header?: string;\r\n\r\n /**\r\n * @description Quando `true`, aumenta a largura da sidebar para acomodar mais conteúdo.\r\n *\r\n * @default false\r\n */\r\n @Input()\r\n public largeSized = false;\r\n\r\n /**\r\n * @description Quando `true`, mantém o conteúdo da sidebar no DOM mesmo quando oculta,\r\n * preservando o estado interno dos componentes filhos.\r\n *\r\n * @default false\r\n */\r\n @Input()\r\n public cache = false;\r\n\r\n /**\r\n * @description Função de confirmação chamada antes de fechar a sidebar.\r\n * Quando retornar `false`, o fechamento é bloqueado. Útil para validar formulários não salvos.\r\n */\r\n @Input()\r\n public set registerConfirmClose(fn: () => boolean) {\r\n this._confirmClose = fn;\r\n }\r\n\r\n public headerTemplate: TemplateRef<unknown> | null = null;\r\n public bodyTemplate: TemplateRef<unknown> | null = null;\r\n public footerTemplate: TemplateRef<unknown> | null = null;\r\n\r\n private _confirmClose = () => true;\r\n\r\n private readonly visibleEffect = effect(() => {\r\n const visible = this.visible();\r\n if (visible) {\r\n disableScroll();\r\n } else {\r\n enableScroll();\r\n }\r\n });\r\n\r\n public ngAfterContentInit(): void {\r\n this._getTemplates();\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.visibleEffect.destroy();\r\n }\r\n\r\n public closeSidebar(): void {\r\n if (this._confirmClose()) {\r\n this.visible.set(false);\r\n }\r\n }\r\n\r\n public handleEscape(): void {\r\n if (this.closeOnEscape) {\r\n this.closeSidebar();\r\n }\r\n }\r\n\r\n private _getCustomTemplate(type: string): TemplateRef<any> | null {\r\n return this.templates?.find((template: TemplateDirective) => template.type === type)?.template ?? null;\r\n }\r\n\r\n private getHeaderTemplate(): TemplateRef<unknown> | null {\r\n return this._getCustomTemplate('header') ?? null;\r\n }\r\n\r\n private getBodyTemplate(): TemplateRef<unknown> | null {\r\n return this._getCustomTemplate('body') ?? null;\r\n }\r\n\r\n private getFooterTemplate(): TemplateRef<unknown> | null {\r\n return this._getCustomTemplate('footer') ?? null;\r\n }\r\n\r\n private _getTemplates(): void {\r\n this.headerTemplate = this.getHeaderTemplate();\r\n this.bodyTemplate = this.getBodyTemplate();\r\n this.footerTemplate = this.getFooterTemplate();\r\n }\r\n}\r\n","@if (visible()) {\n <div\n class=\"backdrop\"\n (click)=\"dismissible && closeSidebar()\"\n ></div>\n}\n\n@if (cache || visible()) {\n <div\n cdkTrapFocus\n [cdkTrapFocusAutoCapture]=\"visible()\"\n [@visibilityChanged]\n class=\"sidebar\"\n [class.sidebar--open]=\"visible()\"\n [class.sidebar--large-size]=\"largeSized\"\n >\n <div class=\"sidebar__header\">\n @if (headerTemplate) {\n <ng-template *ngTemplateOutlet=\"headerTemplate\"></ng-template>\n } @else {\n <span class=\"sidebar__header__title\">{{ header }}</span>\n }\n @if (closable) {\n <button\n class=\"sidebar__header__close fa-solid fa-xmark\"\n (click)=\"closeSidebar()\"\n ></button>\n }\n </div>\n <div class=\"sidebar__body\">\n @if (bodyTemplate) {\n <ng-template [ngTemplateOutlet]=\"bodyTemplate\"></ng-template>\n } @else {\n <ng-content></ng-content>\n }\n </div>\n @if (footerTemplate) {\n <div class=\"sidebar__footer\">\n <ng-template [ngTemplateOutlet]=\"footerTemplate\"></ng-template>\n </div>\n }\n </div>\n}\n","import { NgModule } from '@angular/core';\r\n\r\nimport { SidebarComponent } from './sidebar.component';\r\nimport { TemplateModule } from '@seniorsistemas/angular-components/template';\r\n\r\n@NgModule({\r\n imports: [SidebarComponent],\r\n exports: [SidebarComponent, TemplateModule],\r\n})\r\nexport class SidebarModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;AAiBA;;;;;;;;;;;;;AAaG;MAuBU,gBAAgB,CAAA;IAElB,SAAS,GAAwC,IAAI,CAAC;AAE7D;;;;AAIG;AACI,IAAA,OAAO,GAAG,KAAK,CAAU,KAAK,CAAC,CAAC;AAEvC;;;;AAIG;IAEI,QAAQ,GAAG,IAAI,CAAC;AAEvB;;;;AAIG;IAEI,WAAW,GAAG,IAAI,CAAC;AAE1B;;;;AAIG;IAEI,aAAa,GAAG,IAAI,CAAC;AAE5B;;;AAGG;AAEI,IAAA,MAAM,CAAU;AAEvB;;;;AAIG;IAEI,UAAU,GAAG,KAAK,CAAC;AAE1B;;;;;AAKG;IAEI,KAAK,GAAG,KAAK,CAAC;AAErB;;;AAGG;IACH,IACW,oBAAoB,CAAC,EAAiB,EAAA;AAC7C,QAAA,IAAI,CAAC,aAAa,GAAG,EAAE,CAAC;KAC3B;IAEM,cAAc,GAAgC,IAAI,CAAC;IACnD,YAAY,GAAgC,IAAI,CAAC;IACjD,cAAc,GAAgC,IAAI,CAAC;AAElD,IAAA,aAAa,GAAG,MAAM,IAAI,CAAC;AAElB,IAAA,aAAa,GAAG,MAAM,CAAC,MAAK;AACzC,QAAA,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;QAC/B,IAAI,OAAO,EAAE;AACT,YAAA,aAAa,EAAE,CAAC;SACnB;aAAM;AACH,YAAA,YAAY,EA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HZ,OAAA,EAAA,CAAA,gBAAgB,CAChB,EAAA,OAAA,EAAA,CAAA,gBAAgB,EAAE,cAAc,CAAA,EAAA,CAAA,CAAA;AAEjC,IAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,YAFM,cAAc,CAAA,EAAA,CAAA,CAAA;;4FAEjC,aAAa,EAAA,UAAA,EAAA,CAAA;kBAJzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,gBAAgB,CAAC;AAC3B,oBAAA,OAAO,EAAE,CAAC,gBAAgB,EAAE,cAAc,CAAC;AAC9C,iBAAA,CAAA;;;ACRD;;AAEG;;;;"}
1
+ {"version":3,"file":"seniorsistemas-angular-components-sidebar.mjs","sources":["../../projects/angular-components/sidebar/src/lib/sidebar/sidebar.component.ts","../../projects/angular-components/sidebar/src/lib/sidebar/sidebar.component.html","../../projects/angular-components/sidebar/src/lib/sidebar/sidebar.module.ts","../../projects/angular-components/sidebar/src/seniorsistemas-angular-components-sidebar.ts"],"sourcesContent":["import { animate, style, transition, trigger } from '@angular/animations';\r\nimport { CdkTrapFocus } from '@angular/cdk/a11y';\r\nimport { NgTemplateOutlet } from '@angular/common';\r\nimport {\r\n AfterContentInit,\r\n Component,\r\n contentChild,\r\n ContentChildren,\r\n effect,\r\n Input,\r\n model,\r\n OnDestroy,\r\n QueryList,\r\n TemplateRef,\r\n} from '@angular/core';\r\nimport { FooterComponent } from '@seniorsistemas/angular-components/structure';\r\nimport { TemplateDirective } from '@seniorsistemas/angular-components/template';\r\nimport { disableScroll, enableScroll } from '@seniorsistemas/angular-components/utils';\r\n\r\n/**\r\n * @description Componente de painel lateral deslizante (sidebar) que aparece sobre o conteúdo\r\n * vindo do lado direito da tela. Suporta templates customizados para cabeçalho, corpo e rodapé\r\n * via `sTemplate`, bloqueio de scroll automático e confirmação de fechamento.\r\n *\r\n * @example\r\n * ```html\r\n * <s-sidebar [(visible)]=\"sidebarOpen\" header=\"Filtros\" [closable]=\"true\">\r\n * <ng-template sTemplate=\"body\">Conteúdo</ng-template>\r\n * </s-sidebar>\r\n * ```\r\n *\r\n * @category Overlay\r\n */\r\n@Component({\r\n selector: 's-sidebar',\r\n templateUrl: './sidebar.component.html',\r\n styleUrls: ['./sidebar.component.scss'],\r\n host: {\r\n '(document:keydown.escape)': 'handleEscape()',\r\n },\r\n animations: [\r\n trigger('visibilityChanged', [\r\n transition(':enter', [\r\n style({ transform: 'translateX(100%)' }),\r\n animate('300ms', style({ transform: 'translateX(0)' })),\r\n ]),\r\n transition(':leave', [\r\n style({ transform: 'translateX(0)' }),\r\n animate('300ms', style({ transform: 'translateX(100%)' })),\r\n ]),\r\n ]),\r\n ],\r\n standalone: true,\r\n imports: [CdkTrapFocus, NgTemplateOutlet],\r\n})\r\nexport class SidebarComponent implements AfterContentInit, OnDestroy {\r\n @ContentChildren(TemplateDirective)\r\n public templates: QueryList<TemplateDirective> | null = null;\r\n\r\n /**\r\n * @description Controla a visibilidade da sidebar. Suporta two-way binding via `[(visible)]`.\r\n *\r\n * @default false\r\n */\r\n public visible = model<boolean>(false);\r\n\r\n /**\r\n * @description Quando `true`, exibe o botão de fechar (X) no cabeçalho da sidebar.\r\n *\r\n * @default true\r\n */\r\n @Input()\r\n public closable = true;\r\n\r\n /**\r\n * @description Quando `true`, clicar no backdrop (área escurecida fora da sidebar) fecha o painel.\r\n *\r\n * @default true\r\n */\r\n @Input()\r\n public dismissible = true;\r\n\r\n /**\r\n * @description Quando `true`, pressionar a tecla Escape fecha a sidebar.\r\n *\r\n * @default true\r\n */\r\n @Input()\r\n public closeOnEscape = true;\r\n\r\n /**\r\n * @description Texto exibido no cabeçalho padrão da sidebar.\r\n * Pode ser substituído por um template customizado via `sTemplate=\"header\"`.\r\n */\r\n @Input()\r\n public header?: string;\r\n\r\n /**\r\n * @description Quando `true`, aumenta a largura da sidebar para acomodar mais conteúdo.\r\n *\r\n * @default false\r\n */\r\n @Input()\r\n public largeSized = false;\r\n\r\n /**\r\n * @description Quando `true`, mantém o conteúdo da sidebar no DOM mesmo quando oculta,\r\n * preservando o estado interno dos componentes filhos.\r\n *\r\n * @default false\r\n */\r\n @Input()\r\n public cache = false;\r\n\r\n /**\r\n * @description Função de confirmação chamada antes de fechar a sidebar.\r\n * Quando retornar `false`, o fechamento é bloqueado. Útil para validar formulários não salvos.\r\n */\r\n @Input()\r\n public set registerConfirmClose(fn: () => boolean) {\r\n this._confirmClose = fn;\r\n }\r\n\r\n public headerTemplate: TemplateRef<unknown> | null = null;\r\n public bodyTemplate: TemplateRef<unknown> | null = null;\r\n public footerTemplate: TemplateRef<unknown> | null = null;\r\n\r\n protected readonly footerComponent = contentChild(FooterComponent);\r\n\r\n private _confirmClose = () => true;\r\n\r\n private readonly visibleEffect = effect(() => {\r\n const visible = this.visible();\r\n if (visible) {\r\n disableScroll();\r\n } else {\r\n enableScroll();\r\n }\r\n });\r\n\r\n public ngAfterContentInit(): void {\r\n this._getTemplates();\r\n }\r\n\r\n public ngOnDestroy(): void {\r\n this.visibleEffect.destroy();\r\n }\r\n\r\n public closeSidebar(): void {\r\n if (this._confirmClose()) {\r\n this.visible.set(false);\r\n }\r\n }\r\n\r\n public handleEscape(): void {\r\n if (this.closeOnEscape) {\r\n this.closeSidebar();\r\n }\r\n }\r\n\r\n private _getCustomTemplate(type: string): TemplateRef<any> | null {\r\n return this.templates?.find((template: TemplateDirective) => template.type === type)?.template ?? null;\r\n }\r\n\r\n private getHeaderTemplate(): TemplateRef<unknown> | null {\r\n return this._getCustomTemplate('header') ?? null;\r\n }\r\n\r\n private getBodyTemplate(): TemplateRef<unknown> | null {\r\n return this._getCustomTemplate('body') ?? null;\r\n }\r\n\r\n private getFooterTemplate(): TemplateRef<unknown> | null {\r\n return this._getCustomTemplate('footer') ?? null;\r\n }\r\n\r\n private _getTemplates(): void {\r\n this.headerTemplate = this.getHeaderTemplate();\r\n this.bodyTemplate = this.getBodyTemplate();\r\n this.footerTemplate = this.getFooterTemplate();\r\n }\r\n}\r\n","@if (visible()) {\n <div\n class=\"backdrop\"\n (click)=\"dismissible && closeSidebar()\"\n ></div>\n}\n\n@if (cache || visible()) {\n <div\n cdkTrapFocus\n [cdkTrapFocusAutoCapture]=\"visible()\"\n [@visibilityChanged]\n class=\"sidebar\"\n [class.sidebar--open]=\"visible()\"\n [class.sidebar--large-size]=\"largeSized\"\n >\n <div class=\"sidebar__header\">\n @if (headerTemplate) {\n <ng-template *ngTemplateOutlet=\"headerTemplate\"></ng-template>\n } @else {\n <span class=\"sidebar__header__title\">{{ header }}</span>\n }\n @if (closable) {\n <button\n class=\"sidebar__header__close fa-solid fa-xmark\"\n (click)=\"closeSidebar()\"\n ></button>\n }\n </div>\n <div class=\"sidebar__body\">\n @if (bodyTemplate) {\n <ng-template [ngTemplateOutlet]=\"bodyTemplate\"></ng-template>\n } @else {\n <ng-content select=\":not(s-footer)\"></ng-content>\n }\n </div>\n @if (footerTemplate || footerComponent()) {\n <div class=\"sidebar__footer\">\n @if (footerTemplate) {\n <ng-template [ngTemplateOutlet]=\"footerTemplate\"></ng-template>\n } @else {\n <ng-content select=\"s-footer\"></ng-content>\n }\n </div>\n }\n </div>\n}\n\n","import { NgModule } from '@angular/core';\r\n\r\nimport { SidebarComponent } from './sidebar.component';\r\nimport { TemplateModule } from '@seniorsistemas/angular-components/template';\r\n\r\n@NgModule({\r\n imports: [SidebarComponent],\r\n exports: [SidebarComponent, TemplateModule],\r\n})\r\nexport class SidebarModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AAmBA;;;;;;;;;;;;;AAaG;MAuBU,gBAAgB,CAAA;IAElB,SAAS,GAAwC,IAAI,CAAC;AAE7D;;;;AAIG;AACI,IAAA,OAAO,GAAG,KAAK,CAAU,KAAK,CAAC,CA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AAA,EAAA,IAAA,EAAA,aAAa,YAFM,cAAc,CAAA,EAAA,CAAA,CAAA;;4FAEjC,aAAa,EAAA,UAAA,EAAA,CAAA;kBAJzB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,gBAAgB,CAAC;AAC3B,oBAAA,OAAO,EAAE,CAAC,gBAAgB,EAAE,cAAc,CAAC;AAC9C,iBAAA,CAAA;;;ACRD;;AAEG;;;;"}
@@ -126,11 +126,11 @@ class ThumbnailComponent {
126
126
  }
127
127
  }
128
128
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ThumbnailComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
129
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ThumbnailComponent, isStandalone: true, selector: "s-thumbnail", inputs: { id: "id", size: "size", imageSource: "imageSource", imageFallback: "imageFallback", imageAlt: "imageAlt", iconClass: "iconClass", hasAction: "hasAction", actionIconClass: "actionIconClass", isTile: "isTile", isBrand: "isBrand" }, viewQueries: [{ propertyName: "imgEl", first: true, predicate: ["img"], descendants: true }], ngImport: i0, template: "<div\n [id]=\"id\"\n class=\"thumbnail-container thumbnail-container--{{ size }}\"\n [ngClass]=\"{\n 'thumbnail-container--with-action': hasAction,\n 'thumbnail-container--brand': isBrand,\n }\"\n>\n @if (imageSource || imageFallback) {\n <div\n [id]=\"id + '-image-container'\"\n class=\"image-container\"\n [ngClass]=\"{\n 'image-container--rounded': !isBrand,\n }\"\n >\n @if (!fallback) {\n <img\n #img\n [id]=\"id + '-image'\"\n (error)=\"fallback = true\"\n [src]=\"imageSource\"\n [alt]=\"imageAlt\"\n [ngClass]=\"{\n smallThumbnail: isTile,\n 'exif-orientation-2': orientation === 2,\n 'exif-orientation-3': orientation === 3,\n 'exif-orientation-4': orientation === 4,\n 'exif-orientation-5': orientation === 5,\n 'exif-orientation-6': orientation === 6,\n 'exif-orientation-7': orientation === 7,\n 'exif-orientation-8': orientation === 8,\n }\"\n />\n }\n\n @if (fallback && imageFallback) {\n <img\n #img\n [id]=\"id + '-image-fallback'\"\n (error)=\"imageFallback = undefined\"\n [src]=\"imageFallback\"\n [alt]=\"imageAlt\"\n [ngClass]=\"{\n smallThumbnail: isTile,\n 'exif-orientation-2': orientation === 2,\n 'exif-orientation-3': orientation === 3,\n 'exif-orientation-4': orientation === 4,\n 'exif-orientation-5': orientation === 5,\n 'exif-orientation-6': orientation === 6,\n 'exif-orientation-7': orientation === 7,\n 'exif-orientation-8': orientation === 8,\n }\"\n />\n }\n\n @if (fallback && !imageFallback) {\n <i class=\"fallback-img-color far fa-image\"> </i>\n }\n </div>\n }\n\n @if (hasAction) {\n <div\n [id]=\"id + '-action-icon-container'\"\n class=\"action-icon-container action-icon-container--{{ size }}\"\n >\n <span\n [id]=\"id + '-action-icon'\"\n [class]=\"actionIconClass\"\n aria-hidden=\"true\"\n >\n </span>\n </div>\n }\n\n @if (!imageSource && !imageFallback) {\n <div\n [id]=\"id + '-icon-container'\"\n class=\"icon-container icon-container--{{ size }}\"\n [ngClass]=\"{ 'image-container--rounded': !isBrand }\"\n >\n <span\n [id]=\"id + '-icon'\"\n [class]=\"iconClass\"\n aria-hidden=\"true\"\n >\n </span>\n </div>\n }\n\n <ng-content></ng-content>\n</div>\n", styles: [":host{display:inline-block}.thumbnail-container{color:#fff;position:relative;text-align:center}.thumbnail-container--large{font-size:50px;height:100px;width:100px}.thumbnail-container--large.thumbnail-container--brand{width:200px}.thumbnail-container--medium{font-size:40px;height:70px;width:70px}.thumbnail-container--medium.thumbnail-container--brand{width:140px}.thumbnail-container--small{font-size:22px;height:40px;width:40px}.thumbnail-container--small.thumbnail-container--brand{width:80px}.thumbnail-container--with-action{cursor:pointer}.action-icon-container{background-color:#428bca;border-radius:50%;bottom:0;position:absolute;right:0}.action-icon-container--large,.action-icon-container--medium{font-size:10pt;height:25px;padding:3px;width:25px}.action-icon-container--small{font-size:6pt;height:16px;padding:2px;width:16px}.icon-container,.image-container{align-items:center;height:100%;overflow:hidden;width:100%}.icon-container--rounded,.image-container--rounded{border-radius:50%}.smallThumbnail{height:40px!important}.icon-container{background-color:#ccc;color:#fff}.icon-container--large{line-height:98px}.icon-container--medium{line-height:68px}.icon-container--small{line-height:38px}.image-container{align-items:center;background-color:#ccc;display:flex;justify-content:center}.image-container img{width:100%}.image-container img.exif-orientation-2{transform:rotateY(180deg)}.image-container img.exif-orientation-3{transform:rotate(180deg)}.image-container img.exif-orientation-4{transform:rotate(180deg) rotateY(180deg)}.image-container img.exif-orientation-5{transform:rotate(270deg) rotateY(180deg)}.image-container img.exif-orientation-6{transform:rotate(90deg)}.image-container img.exif-orientation-7{transform:rotate(90deg) rotateY(180deg)}.image-container img.exif-orientation-8{transform:rotate(270deg)}.fallback-img-color{color:#fff}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
129
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ThumbnailComponent, isStandalone: true, selector: "s-thumbnail", inputs: { id: "id", size: "size", imageSource: "imageSource", imageFallback: "imageFallback", imageAlt: "imageAlt", iconClass: "iconClass", hasAction: "hasAction", actionIconClass: "actionIconClass", isTile: "isTile", isBrand: "isBrand" }, providers: [ThumbnailService], viewQueries: [{ propertyName: "imgEl", first: true, predicate: ["img"], descendants: true }], ngImport: i0, template: "<div\n [id]=\"id\"\n class=\"thumbnail-container thumbnail-container--{{ size }}\"\n [ngClass]=\"{\n 'thumbnail-container--with-action': hasAction,\n 'thumbnail-container--brand': isBrand,\n }\"\n>\n @if (imageSource || imageFallback) {\n <div\n [id]=\"id + '-image-container'\"\n class=\"image-container\"\n [ngClass]=\"{\n 'image-container--rounded': !isBrand,\n }\"\n >\n @if (!fallback) {\n <img\n #img\n [id]=\"id + '-image'\"\n (error)=\"fallback = true\"\n [src]=\"imageSource\"\n [alt]=\"imageAlt\"\n [ngClass]=\"{\n smallThumbnail: isTile,\n 'exif-orientation-2': orientation === 2,\n 'exif-orientation-3': orientation === 3,\n 'exif-orientation-4': orientation === 4,\n 'exif-orientation-5': orientation === 5,\n 'exif-orientation-6': orientation === 6,\n 'exif-orientation-7': orientation === 7,\n 'exif-orientation-8': orientation === 8,\n }\"\n />\n }\n\n @if (fallback && imageFallback) {\n <img\n #img\n [id]=\"id + '-image-fallback'\"\n (error)=\"imageFallback = undefined\"\n [src]=\"imageFallback\"\n [alt]=\"imageAlt\"\n [ngClass]=\"{\n smallThumbnail: isTile,\n 'exif-orientation-2': orientation === 2,\n 'exif-orientation-3': orientation === 3,\n 'exif-orientation-4': orientation === 4,\n 'exif-orientation-5': orientation === 5,\n 'exif-orientation-6': orientation === 6,\n 'exif-orientation-7': orientation === 7,\n 'exif-orientation-8': orientation === 8,\n }\"\n />\n }\n\n @if (fallback && !imageFallback) {\n <i class=\"fallback-img-color far fa-image\"> </i>\n }\n </div>\n }\n\n @if (hasAction) {\n <div\n [id]=\"id + '-action-icon-container'\"\n class=\"action-icon-container action-icon-container--{{ size }}\"\n >\n <span\n [id]=\"id + '-action-icon'\"\n [class]=\"actionIconClass\"\n aria-hidden=\"true\"\n >\n </span>\n </div>\n }\n\n @if (!imageSource && !imageFallback) {\n <div\n [id]=\"id + '-icon-container'\"\n class=\"icon-container icon-container--{{ size }}\"\n [ngClass]=\"{ 'image-container--rounded': !isBrand }\"\n >\n <span\n [id]=\"id + '-icon'\"\n [class]=\"iconClass\"\n aria-hidden=\"true\"\n >\n </span>\n </div>\n }\n\n <ng-content></ng-content>\n</div>\n", styles: [":host{display:inline-block}.thumbnail-container{color:#fff;position:relative;text-align:center}.thumbnail-container--large{font-size:50px;height:100px;width:100px}.thumbnail-container--large.thumbnail-container--brand{width:200px}.thumbnail-container--medium{font-size:40px;height:70px;width:70px}.thumbnail-container--medium.thumbnail-container--brand{width:140px}.thumbnail-container--small{font-size:22px;height:40px;width:40px}.thumbnail-container--small.thumbnail-container--brand{width:80px}.thumbnail-container--with-action{cursor:pointer}.action-icon-container{background-color:#428bca;border-radius:50%;bottom:0;position:absolute;right:0}.action-icon-container--large,.action-icon-container--medium{font-size:10pt;height:25px;padding:3px;width:25px}.action-icon-container--small{font-size:6pt;height:16px;padding:2px;width:16px}.icon-container,.image-container{align-items:center;height:100%;overflow:hidden;width:100%}.icon-container--rounded,.image-container--rounded{border-radius:50%}.smallThumbnail{height:40px!important}.icon-container{background-color:#ccc;color:#fff}.icon-container--large{line-height:98px}.icon-container--medium{line-height:68px}.icon-container--small{line-height:38px}.image-container{align-items:center;background-color:#ccc;display:flex;justify-content:center}.image-container img{width:100%}.image-container img.exif-orientation-2{transform:rotateY(180deg)}.image-container img.exif-orientation-3{transform:rotate(180deg)}.image-container img.exif-orientation-4{transform:rotate(180deg) rotateY(180deg)}.image-container img.exif-orientation-5{transform:rotate(270deg) rotateY(180deg)}.image-container img.exif-orientation-6{transform:rotate(90deg)}.image-container img.exif-orientation-7{transform:rotate(90deg) rotateY(180deg)}.image-container img.exif-orientation-8{transform:rotate(270deg)}.fallback-img-color{color:#fff}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
130
130
  }
131
131
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ThumbnailComponent, decorators: [{
132
132
  type: Component,
133
- args: [{ selector: 's-thumbnail', standalone: true, imports: [NgClass], template: "<div\n [id]=\"id\"\n class=\"thumbnail-container thumbnail-container--{{ size }}\"\n [ngClass]=\"{\n 'thumbnail-container--with-action': hasAction,\n 'thumbnail-container--brand': isBrand,\n }\"\n>\n @if (imageSource || imageFallback) {\n <div\n [id]=\"id + '-image-container'\"\n class=\"image-container\"\n [ngClass]=\"{\n 'image-container--rounded': !isBrand,\n }\"\n >\n @if (!fallback) {\n <img\n #img\n [id]=\"id + '-image'\"\n (error)=\"fallback = true\"\n [src]=\"imageSource\"\n [alt]=\"imageAlt\"\n [ngClass]=\"{\n smallThumbnail: isTile,\n 'exif-orientation-2': orientation === 2,\n 'exif-orientation-3': orientation === 3,\n 'exif-orientation-4': orientation === 4,\n 'exif-orientation-5': orientation === 5,\n 'exif-orientation-6': orientation === 6,\n 'exif-orientation-7': orientation === 7,\n 'exif-orientation-8': orientation === 8,\n }\"\n />\n }\n\n @if (fallback && imageFallback) {\n <img\n #img\n [id]=\"id + '-image-fallback'\"\n (error)=\"imageFallback = undefined\"\n [src]=\"imageFallback\"\n [alt]=\"imageAlt\"\n [ngClass]=\"{\n smallThumbnail: isTile,\n 'exif-orientation-2': orientation === 2,\n 'exif-orientation-3': orientation === 3,\n 'exif-orientation-4': orientation === 4,\n 'exif-orientation-5': orientation === 5,\n 'exif-orientation-6': orientation === 6,\n 'exif-orientation-7': orientation === 7,\n 'exif-orientation-8': orientation === 8,\n }\"\n />\n }\n\n @if (fallback && !imageFallback) {\n <i class=\"fallback-img-color far fa-image\"> </i>\n }\n </div>\n }\n\n @if (hasAction) {\n <div\n [id]=\"id + '-action-icon-container'\"\n class=\"action-icon-container action-icon-container--{{ size }}\"\n >\n <span\n [id]=\"id + '-action-icon'\"\n [class]=\"actionIconClass\"\n aria-hidden=\"true\"\n >\n </span>\n </div>\n }\n\n @if (!imageSource && !imageFallback) {\n <div\n [id]=\"id + '-icon-container'\"\n class=\"icon-container icon-container--{{ size }}\"\n [ngClass]=\"{ 'image-container--rounded': !isBrand }\"\n >\n <span\n [id]=\"id + '-icon'\"\n [class]=\"iconClass\"\n aria-hidden=\"true\"\n >\n </span>\n </div>\n }\n\n <ng-content></ng-content>\n</div>\n", styles: [":host{display:inline-block}.thumbnail-container{color:#fff;position:relative;text-align:center}.thumbnail-container--large{font-size:50px;height:100px;width:100px}.thumbnail-container--large.thumbnail-container--brand{width:200px}.thumbnail-container--medium{font-size:40px;height:70px;width:70px}.thumbnail-container--medium.thumbnail-container--brand{width:140px}.thumbnail-container--small{font-size:22px;height:40px;width:40px}.thumbnail-container--small.thumbnail-container--brand{width:80px}.thumbnail-container--with-action{cursor:pointer}.action-icon-container{background-color:#428bca;border-radius:50%;bottom:0;position:absolute;right:0}.action-icon-container--large,.action-icon-container--medium{font-size:10pt;height:25px;padding:3px;width:25px}.action-icon-container--small{font-size:6pt;height:16px;padding:2px;width:16px}.icon-container,.image-container{align-items:center;height:100%;overflow:hidden;width:100%}.icon-container--rounded,.image-container--rounded{border-radius:50%}.smallThumbnail{height:40px!important}.icon-container{background-color:#ccc;color:#fff}.icon-container--large{line-height:98px}.icon-container--medium{line-height:68px}.icon-container--small{line-height:38px}.image-container{align-items:center;background-color:#ccc;display:flex;justify-content:center}.image-container img{width:100%}.image-container img.exif-orientation-2{transform:rotateY(180deg)}.image-container img.exif-orientation-3{transform:rotate(180deg)}.image-container img.exif-orientation-4{transform:rotate(180deg) rotateY(180deg)}.image-container img.exif-orientation-5{transform:rotate(270deg) rotateY(180deg)}.image-container img.exif-orientation-6{transform:rotate(90deg)}.image-container img.exif-orientation-7{transform:rotate(90deg) rotateY(180deg)}.image-container img.exif-orientation-8{transform:rotate(270deg)}.fallback-img-color{color:#fff}\n"] }]
133
+ args: [{ selector: 's-thumbnail', standalone: true, imports: [NgClass], providers: [ThumbnailService], template: "<div\n [id]=\"id\"\n class=\"thumbnail-container thumbnail-container--{{ size }}\"\n [ngClass]=\"{\n 'thumbnail-container--with-action': hasAction,\n 'thumbnail-container--brand': isBrand,\n }\"\n>\n @if (imageSource || imageFallback) {\n <div\n [id]=\"id + '-image-container'\"\n class=\"image-container\"\n [ngClass]=\"{\n 'image-container--rounded': !isBrand,\n }\"\n >\n @if (!fallback) {\n <img\n #img\n [id]=\"id + '-image'\"\n (error)=\"fallback = true\"\n [src]=\"imageSource\"\n [alt]=\"imageAlt\"\n [ngClass]=\"{\n smallThumbnail: isTile,\n 'exif-orientation-2': orientation === 2,\n 'exif-orientation-3': orientation === 3,\n 'exif-orientation-4': orientation === 4,\n 'exif-orientation-5': orientation === 5,\n 'exif-orientation-6': orientation === 6,\n 'exif-orientation-7': orientation === 7,\n 'exif-orientation-8': orientation === 8,\n }\"\n />\n }\n\n @if (fallback && imageFallback) {\n <img\n #img\n [id]=\"id + '-image-fallback'\"\n (error)=\"imageFallback = undefined\"\n [src]=\"imageFallback\"\n [alt]=\"imageAlt\"\n [ngClass]=\"{\n smallThumbnail: isTile,\n 'exif-orientation-2': orientation === 2,\n 'exif-orientation-3': orientation === 3,\n 'exif-orientation-4': orientation === 4,\n 'exif-orientation-5': orientation === 5,\n 'exif-orientation-6': orientation === 6,\n 'exif-orientation-7': orientation === 7,\n 'exif-orientation-8': orientation === 8,\n }\"\n />\n }\n\n @if (fallback && !imageFallback) {\n <i class=\"fallback-img-color far fa-image\"> </i>\n }\n </div>\n }\n\n @if (hasAction) {\n <div\n [id]=\"id + '-action-icon-container'\"\n class=\"action-icon-container action-icon-container--{{ size }}\"\n >\n <span\n [id]=\"id + '-action-icon'\"\n [class]=\"actionIconClass\"\n aria-hidden=\"true\"\n >\n </span>\n </div>\n }\n\n @if (!imageSource && !imageFallback) {\n <div\n [id]=\"id + '-icon-container'\"\n class=\"icon-container icon-container--{{ size }}\"\n [ngClass]=\"{ 'image-container--rounded': !isBrand }\"\n >\n <span\n [id]=\"id + '-icon'\"\n [class]=\"iconClass\"\n aria-hidden=\"true\"\n >\n </span>\n </div>\n }\n\n <ng-content></ng-content>\n</div>\n", styles: [":host{display:inline-block}.thumbnail-container{color:#fff;position:relative;text-align:center}.thumbnail-container--large{font-size:50px;height:100px;width:100px}.thumbnail-container--large.thumbnail-container--brand{width:200px}.thumbnail-container--medium{font-size:40px;height:70px;width:70px}.thumbnail-container--medium.thumbnail-container--brand{width:140px}.thumbnail-container--small{font-size:22px;height:40px;width:40px}.thumbnail-container--small.thumbnail-container--brand{width:80px}.thumbnail-container--with-action{cursor:pointer}.action-icon-container{background-color:#428bca;border-radius:50%;bottom:0;position:absolute;right:0}.action-icon-container--large,.action-icon-container--medium{font-size:10pt;height:25px;padding:3px;width:25px}.action-icon-container--small{font-size:6pt;height:16px;padding:2px;width:16px}.icon-container,.image-container{align-items:center;height:100%;overflow:hidden;width:100%}.icon-container--rounded,.image-container--rounded{border-radius:50%}.smallThumbnail{height:40px!important}.icon-container{background-color:#ccc;color:#fff}.icon-container--large{line-height:98px}.icon-container--medium{line-height:68px}.icon-container--small{line-height:38px}.image-container{align-items:center;background-color:#ccc;display:flex;justify-content:center}.image-container img{width:100%}.image-container img.exif-orientation-2{transform:rotateY(180deg)}.image-container img.exif-orientation-3{transform:rotate(180deg)}.image-container img.exif-orientation-4{transform:rotate(180deg) rotateY(180deg)}.image-container img.exif-orientation-5{transform:rotate(270deg) rotateY(180deg)}.image-container img.exif-orientation-6{transform:rotate(90deg)}.image-container img.exif-orientation-7{transform:rotate(90deg) rotateY(180deg)}.image-container img.exif-orientation-8{transform:rotate(270deg)}.fallback-img-color{color:#fff}\n"] }]
134
134
  }], propDecorators: { imgEl: [{
135
135
  type: ViewChild,
136
136
  args: ['img', { static: false }]
@@ -1 +1 @@
1
- {"version":3,"file":"seniorsistemas-angular-components-thumbnail.mjs","sources":["../../projects/angular-components/thumbnail/src/lib/thumbnail/thumbnail.service.ts","../../projects/angular-components/thumbnail/src/lib/thumbnail/thumbnail.component.ts","../../projects/angular-components/thumbnail/src/lib/thumbnail/thumbnail.component.html","../../projects/angular-components/thumbnail/src/lib/thumbnail/thumbnail.module.ts","../../projects/angular-components/thumbnail/src/seniorsistemas-angular-components-thumbnail.ts"],"sourcesContent":["import { Injectable } from \"@angular/core\";\n\n@Injectable()\nexport class ThumbnailService {\n public getBinaryFile(img: HTMLImageElement) {\n return new Promise(resolve => {\n const getOrientation = this.getOrientation.bind(this);\n\n let http: XMLHttpRequest | null = new XMLHttpRequest();\n http.addEventListener(\"load\", () => {\n if (http?.readyState === 4 && (http.status == 200 || http.status === 0)) {\n const orientation = getOrientation(http.response);\n http = null;\n resolve(orientation);\n }\n });\n\n http.addEventListener(\"error\", () => {\n http = null;\n throw new Error(\"Não foi possível carregar a imagem\");\n });\n\n http.open(\"GET\", img.src, true);\n http.responseType = \"arraybuffer\";\n http.send(null);\n });\n }\n\n /**\n * Retorna a tag da orientação EXIF {-1} Não definido, {-2} Não é formato JPEG, {1, 2, 3, 4, 5, 6, 7, 8} valores da orientação.\n */\n private getOrientation(file: ArrayBuffer): number {\n const view = new DataView(file);\n\n if (view.getUint16(0, false) != 0xffd8) return -2; // not jpeg\n\n const length = view.byteLength;\n let offset = 2;\n\n while (offset < length) {\n const marker = view.getUint16(offset, false);\n offset += 2;\n\n if (marker == 0xffe1) {\n if (view.getUint32((offset += 2), false) != 0x45786966) {\n return -1; // not defined\n }\n const little = view.getUint16((offset += 6), false) == 0x4949;\n offset += view.getUint32(offset + 4, little);\n const tags = view.getUint16(offset, little);\n offset += 2;\n\n for (let i = 0; i < tags; i++)\n if (view.getUint16(offset + i * 12, little) == 0x0112) return view.getUint16(offset + i * 12 + 8, little);\n // tslint:disable-next-line: no-bitwise\n } else if ((marker & 0xff00) != 0xff00) break;\n else offset += view.getUint16(offset, false);\n }\n return -1; // not defined\n }\n}\n","import { NgClass } from '@angular/common';\r\nimport { AfterViewInit, Component, ElementRef, inject, Input, OnDestroy, ViewChild } from '@angular/core';\r\n\r\nimport { from, Subject } from 'rxjs';\r\nimport { takeUntil } from 'rxjs/operators';\r\n\r\nimport { ThumbnailSize } from './thumbnail-size';\r\nimport { ThumbnailService } from './thumbnail.service';\r\n\r\n/**\r\n * @description Componente de miniatura de imagem com suporte a imagem de fallback,\r\n * ícone de ação sobrepôsto, orientação automática e diferentes tamanhos predefinidos.\r\n *\r\n * @example\r\n * ```html\r\n * <s-thumbnail\r\n * [imageSource]=\"urlDaImagem\"\r\n * size=\"large\"\r\n * iconClass=\"fas fa-user\" />\r\n * ```\r\n *\r\n * @category Data\r\n */\r\n@Component({\r\n selector: 's-thumbnail',\r\n templateUrl: './thumbnail.component.html',\r\n styleUrls: ['./thumbnail.component.scss'],\r\n standalone: true,\r\n imports: [NgClass],\r\n})\r\nexport class ThumbnailComponent implements AfterViewInit, OnDestroy {\r\n private readonly thumbnailService = inject(ThumbnailService);\r\n\r\n public static nextId = 0;\r\n public fallback = false;\r\n public orientation = 0;\r\n\r\n @ViewChild('img', { static: false })\r\n public imgEl: ElementRef | null = null;\r\n\r\n /** @description Identificador único do componente no DOM. Gerado automaticamente se não informado. */\r\n @Input()\r\n public id = `s-thumbnail-${ThumbnailComponent.nextId++}`;\r\n\r\n /** @description Tamanho da miniatura: `'small'`, `'medium'`, `'large'`, etc. @default 'medium' */\r\n @Input()\r\n public size: ThumbnailSize = 'medium';\r\n\r\n /** @description URL da imagem principal. */\r\n @Input()\r\n public imageSource?: string;\r\n\r\n /** @description URL da imagem de fallback exibida quando a principal falha ao carregar. */\r\n @Input()\r\n public imageFallback?: string;\r\n\r\n /** @description Texto alternativo (atributo `alt`) da imagem. */\r\n @Input()\r\n public imageAlt?: string;\r\n\r\n /** @description Classe do ícone exibido quando não há imagem disponível. @default 'far fa-image' */\r\n @Input()\r\n public iconClass = 'far fa-image';\r\n\r\n /** @description Habilita a exibição de um botão de ação sobrepôsto. @default false */\r\n @Input()\r\n public hasAction = false;\r\n\r\n /** @description Classe do ícone do botão de ação. @default 'fas fa-camera' */\r\n @Input()\r\n public actionIconClass = 'fas fa-camera';\r\n\r\n /** @description Aplica estilo de tile ao thumbnail. @default false */\r\n @Input()\r\n public isTile = false;\r\n\r\n /** @description Aplica estilo de marca ao thumbnail. @default false */\r\n @Input()\r\n public isBrand = false;\r\n\r\n private ngUnsubscribe = new Subject<void>();\r\n\r\n public ngOnDestroy(): void {\r\n this.ngUnsubscribe.next();\r\n this.ngUnsubscribe.complete();\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n if (this.imgEl) {\r\n this.imgEl.nativeElement.addEventListener('load', () => {\r\n from(this.thumbnailService.getBinaryFile(this.imgEl?.nativeElement))\r\n .pipe(takeUntil(this.ngUnsubscribe))\r\n .subscribe((value: unknown) => {\r\n if (typeof value === 'number') {\r\n this.orientation = value;\r\n } else {\r\n console.error('Valor retornado não é um número:', value);\r\n }\r\n });\r\n });\r\n }\r\n }\r\n}\r\n","<div\n [id]=\"id\"\n class=\"thumbnail-container thumbnail-container--{{ size }}\"\n [ngClass]=\"{\n 'thumbnail-container--with-action': hasAction,\n 'thumbnail-container--brand': isBrand,\n }\"\n>\n @if (imageSource || imageFallback) {\n <div\n [id]=\"id + '-image-container'\"\n class=\"image-container\"\n [ngClass]=\"{\n 'image-container--rounded': !isBrand,\n }\"\n >\n @if (!fallback) {\n <img\n #img\n [id]=\"id + '-image'\"\n (error)=\"fallback = true\"\n [src]=\"imageSource\"\n [alt]=\"imageAlt\"\n [ngClass]=\"{\n smallThumbnail: isTile,\n 'exif-orientation-2': orientation === 2,\n 'exif-orientation-3': orientation === 3,\n 'exif-orientation-4': orientation === 4,\n 'exif-orientation-5': orientation === 5,\n 'exif-orientation-6': orientation === 6,\n 'exif-orientation-7': orientation === 7,\n 'exif-orientation-8': orientation === 8,\n }\"\n />\n }\n\n @if (fallback && imageFallback) {\n <img\n #img\n [id]=\"id + '-image-fallback'\"\n (error)=\"imageFallback = undefined\"\n [src]=\"imageFallback\"\n [alt]=\"imageAlt\"\n [ngClass]=\"{\n smallThumbnail: isTile,\n 'exif-orientation-2': orientation === 2,\n 'exif-orientation-3': orientation === 3,\n 'exif-orientation-4': orientation === 4,\n 'exif-orientation-5': orientation === 5,\n 'exif-orientation-6': orientation === 6,\n 'exif-orientation-7': orientation === 7,\n 'exif-orientation-8': orientation === 8,\n }\"\n />\n }\n\n @if (fallback && !imageFallback) {\n <i class=\"fallback-img-color far fa-image\"> </i>\n }\n </div>\n }\n\n @if (hasAction) {\n <div\n [id]=\"id + '-action-icon-container'\"\n class=\"action-icon-container action-icon-container--{{ size }}\"\n >\n <span\n [id]=\"id + '-action-icon'\"\n [class]=\"actionIconClass\"\n aria-hidden=\"true\"\n >\n </span>\n </div>\n }\n\n @if (!imageSource && !imageFallback) {\n <div\n [id]=\"id + '-icon-container'\"\n class=\"icon-container icon-container--{{ size }}\"\n [ngClass]=\"{ 'image-container--rounded': !isBrand }\"\n >\n <span\n [id]=\"id + '-icon'\"\n [class]=\"iconClass\"\n aria-hidden=\"true\"\n >\n </span>\n </div>\n }\n\n <ng-content></ng-content>\n</div>\n","import { NgModule } from '@angular/core';\r\n\r\nimport { ThumbnailComponent } from './thumbnail.component';\r\nimport { ThumbnailService } from './thumbnail.service';\r\n\r\n@NgModule({\r\n imports: [ThumbnailComponent],\r\n exports: [ThumbnailComponent],\r\n providers: [ThumbnailService],\r\n})\r\nexport class ThumbnailModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAGa,gBAAgB,CAAA;AAClB,IAAA,aAAa,CAAC,GAAqB,EAAA;AACtC,QAAA,OAAO,IAAI,OAAO,CAAC,OAAO,IAAG;YACzB,MAAM,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEtD,YAAA,IAAI,IAAI,GAA0B,IAAI,cAAc,EAAE,CAAC;AACvD,YAAA,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE,MAAK;gBAC/B,IAAI,IAAI,EAAE,UAAU,KAAK,CAAC,KAAK,IAAI,CAAC,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,EAAE;oBACrE,MAAM,WAAW,GAAG,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;oBAClD,IAAI,GAAG,IAAI,CAAC;oBACZ,OAAO,CAAC,WAAW,CAAC,CAAC;iBACxB;AACL,aAAC,CAAC,CAAC;AAEH,YAAA,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAK;gBAChC,IAAI,GAAG,IAAI,CAAC;AACZ,gBAAA,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;AAC1D,aAAC,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EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;yGAAf,eAAe,EAAA,OAAA,EAAA,CAJd,kBAAkB,CAAA,EAAA,OAAA,EAAA,CAClB,kBAAkB,CAAA,EAAA,CAAA,CAAA;yGAGnB,eAAe,EAAA,SAAA,EAFb,CAAC,gBAAgB,CAAC,EAAA,CAAA,CAAA;;4FAEpB,eAAe,EAAA,UAAA,EAAA,CAAA;kBAL3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,kBAAkB,CAAC;oBAC7B,OAAO,EAAE,CAAC,kBAAkB,CAAC;oBAC7B,SAAS,EAAE,CAAC,gBAAgB,CAAC;AAChC,iBAAA,CAAA;;;ACTD;;AAEG;;;;"}
1
+ {"version":3,"file":"seniorsistemas-angular-components-thumbnail.mjs","sources":["../../projects/angular-components/thumbnail/src/lib/thumbnail/thumbnail.service.ts","../../projects/angular-components/thumbnail/src/lib/thumbnail/thumbnail.component.ts","../../projects/angular-components/thumbnail/src/lib/thumbnail/thumbnail.component.html","../../projects/angular-components/thumbnail/src/lib/thumbnail/thumbnail.module.ts","../../projects/angular-components/thumbnail/src/seniorsistemas-angular-components-thumbnail.ts"],"sourcesContent":["import { Injectable } from \"@angular/core\";\n\n@Injectable()\nexport class ThumbnailService {\n public getBinaryFile(img: HTMLImageElement) {\n return new Promise(resolve => {\n const getOrientation = this.getOrientation.bind(this);\n\n let http: XMLHttpRequest | null = new XMLHttpRequest();\n http.addEventListener(\"load\", () => {\n if (http?.readyState === 4 && (http.status == 200 || http.status === 0)) {\n const orientation = getOrientation(http.response);\n http = null;\n resolve(orientation);\n }\n });\n\n http.addEventListener(\"error\", () => {\n http = null;\n throw new Error(\"Não foi possível carregar a imagem\");\n });\n\n http.open(\"GET\", img.src, true);\n http.responseType = \"arraybuffer\";\n http.send(null);\n });\n }\n\n /**\n * Retorna a tag da orientação EXIF {-1} Não definido, {-2} Não é formato JPEG, {1, 2, 3, 4, 5, 6, 7, 8} valores da orientação.\n */\n private getOrientation(file: ArrayBuffer): number {\n const view = new DataView(file);\n\n if (view.getUint16(0, false) != 0xffd8) return -2; // not jpeg\n\n const length = view.byteLength;\n let offset = 2;\n\n while (offset < length) {\n const marker = view.getUint16(offset, false);\n offset += 2;\n\n if (marker == 0xffe1) {\n if (view.getUint32((offset += 2), false) != 0x45786966) {\n return -1; // not defined\n }\n const little = view.getUint16((offset += 6), false) == 0x4949;\n offset += view.getUint32(offset + 4, little);\n const tags = view.getUint16(offset, little);\n offset += 2;\n\n for (let i = 0; i < tags; i++)\n if (view.getUint16(offset + i * 12, little) == 0x0112) return view.getUint16(offset + i * 12 + 8, little);\n // tslint:disable-next-line: no-bitwise\n } else if ((marker & 0xff00) != 0xff00) break;\n else offset += view.getUint16(offset, false);\n }\n return -1; // not defined\n }\n}\n","import { NgClass } from '@angular/common';\r\nimport { AfterViewInit, Component, ElementRef, inject, Input, OnDestroy, ViewChild } from '@angular/core';\r\n\r\nimport { from, Subject } from 'rxjs';\r\nimport { takeUntil } from 'rxjs/operators';\r\n\r\nimport { ThumbnailSize } from './thumbnail-size';\r\nimport { ThumbnailService } from './thumbnail.service';\r\n\r\n/**\r\n * @description Componente de miniatura de imagem com suporte a imagem de fallback,\r\n * ícone de ação sobrepôsto, orientação automática e diferentes tamanhos predefinidos.\r\n *\r\n * @example\r\n * ```html\r\n * <s-thumbnail\r\n * [imageSource]=\"urlDaImagem\"\r\n * size=\"large\"\r\n * iconClass=\"fas fa-user\" />\r\n * ```\r\n *\r\n * @category Data\r\n */\r\n@Component({\r\n selector: 's-thumbnail',\r\n templateUrl: './thumbnail.component.html',\r\n styleUrls: ['./thumbnail.component.scss'],\r\n standalone: true,\r\n imports: [NgClass],\r\n providers: [ThumbnailService],\r\n})\r\nexport class ThumbnailComponent implements AfterViewInit, OnDestroy {\r\n private readonly thumbnailService = inject(ThumbnailService);\r\n\r\n public static nextId = 0;\r\n public fallback = false;\r\n public orientation = 0;\r\n\r\n @ViewChild('img', { static: false })\r\n public imgEl: ElementRef | null = null;\r\n\r\n /** @description Identificador único do componente no DOM. Gerado automaticamente se não informado. */\r\n @Input()\r\n public id = `s-thumbnail-${ThumbnailComponent.nextId++}`;\r\n\r\n /** @description Tamanho da miniatura: `'small'`, `'medium'`, `'large'`, etc. @default 'medium' */\r\n @Input()\r\n public size: ThumbnailSize = 'medium';\r\n\r\n /** @description URL da imagem principal. */\r\n @Input()\r\n public imageSource?: string;\r\n\r\n /** @description URL da imagem de fallback exibida quando a principal falha ao carregar. */\r\n @Input()\r\n public imageFallback?: string;\r\n\r\n /** @description Texto alternativo (atributo `alt`) da imagem. */\r\n @Input()\r\n public imageAlt?: string;\r\n\r\n /** @description Classe do ícone exibido quando não há imagem disponível. @default 'far fa-image' */\r\n @Input()\r\n public iconClass = 'far fa-image';\r\n\r\n /** @description Habilita a exibição de um botão de ação sobrepôsto. @default false */\r\n @Input()\r\n public hasAction = false;\r\n\r\n /** @description Classe do ícone do botão de ação. @default 'fas fa-camera' */\r\n @Input()\r\n public actionIconClass = 'fas fa-camera';\r\n\r\n /** @description Aplica estilo de tile ao thumbnail. @default false */\r\n @Input()\r\n public isTile = false;\r\n\r\n /** @description Aplica estilo de marca ao thumbnail. @default false */\r\n @Input()\r\n public isBrand = false;\r\n\r\n private ngUnsubscribe = new Subject<void>();\r\n\r\n public ngOnDestroy(): void {\r\n this.ngUnsubscribe.next();\r\n this.ngUnsubscribe.complete();\r\n }\r\n\r\n public ngAfterViewInit(): void {\r\n if (this.imgEl) {\r\n this.imgEl.nativeElement.addEventListener('load', () => {\r\n from(this.thumbnailService.getBinaryFile(this.imgEl?.nativeElement))\r\n .pipe(takeUntil(this.ngUnsubscribe))\r\n .subscribe((value: unknown) => {\r\n if (typeof value === 'number') {\r\n this.orientation = value;\r\n } else {\r\n console.error('Valor retornado não é um número:', value);\r\n }\r\n });\r\n });\r\n }\r\n }\r\n}\r\n","<div\n [id]=\"id\"\n class=\"thumbnail-container thumbnail-container--{{ size }}\"\n [ngClass]=\"{\n 'thumbnail-container--with-action': hasAction,\n 'thumbnail-container--brand': isBrand,\n }\"\n>\n @if (imageSource || imageFallback) {\n <div\n [id]=\"id + '-image-container'\"\n class=\"image-container\"\n [ngClass]=\"{\n 'image-container--rounded': !isBrand,\n }\"\n >\n @if (!fallback) {\n <img\n #img\n [id]=\"id + '-image'\"\n (error)=\"fallback = true\"\n [src]=\"imageSource\"\n [alt]=\"imageAlt\"\n [ngClass]=\"{\n smallThumbnail: isTile,\n 'exif-orientation-2': orientation === 2,\n 'exif-orientation-3': orientation === 3,\n 'exif-orientation-4': orientation === 4,\n 'exif-orientation-5': orientation === 5,\n 'exif-orientation-6': orientation === 6,\n 'exif-orientation-7': orientation === 7,\n 'exif-orientation-8': orientation === 8,\n }\"\n />\n }\n\n @if (fallback && imageFallback) {\n <img\n #img\n [id]=\"id + '-image-fallback'\"\n (error)=\"imageFallback = undefined\"\n [src]=\"imageFallback\"\n [alt]=\"imageAlt\"\n [ngClass]=\"{\n smallThumbnail: isTile,\n 'exif-orientation-2': orientation === 2,\n 'exif-orientation-3': orientation === 3,\n 'exif-orientation-4': orientation === 4,\n 'exif-orientation-5': orientation === 5,\n 'exif-orientation-6': orientation === 6,\n 'exif-orientation-7': orientation === 7,\n 'exif-orientation-8': orientation === 8,\n }\"\n />\n }\n\n @if (fallback && !imageFallback) {\n <i class=\"fallback-img-color far fa-image\"> </i>\n }\n </div>\n }\n\n @if (hasAction) {\n <div\n [id]=\"id + '-action-icon-container'\"\n class=\"action-icon-container action-icon-container--{{ size }}\"\n >\n <span\n [id]=\"id + '-action-icon'\"\n [class]=\"actionIconClass\"\n aria-hidden=\"true\"\n >\n </span>\n </div>\n }\n\n @if (!imageSource && !imageFallback) {\n <div\n [id]=\"id + '-icon-container'\"\n class=\"icon-container icon-container--{{ size }}\"\n [ngClass]=\"{ 'image-container--rounded': !isBrand }\"\n >\n <span\n [id]=\"id + '-icon'\"\n [class]=\"iconClass\"\n aria-hidden=\"true\"\n >\n </span>\n </div>\n }\n\n <ng-content></ng-content>\n</div>\n","import { NgModule } from '@angular/core';\r\n\r\nimport { ThumbnailComponent } from './thumbnail.component';\r\nimport { ThumbnailService } from './thumbnail.service';\r\n\r\n@NgModule({\r\n imports: [ThumbnailComponent],\r\n exports: [ThumbnailComponent],\r\n providers: [ThumbnailService],\r\n})\r\nexport class ThumbnailModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAGa,gBAAgB,CAAA;AAClB,IAAA,aAAa,CAAC,GAAqB,EAAA;AACtC,QAAA,OAAO,IAAI,OAAO,CAAC,OAAO,IAAG;YACzB,MAAM,cAAc,GAAG,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAEtD,YAAA,IAAI,IAAI,GAA0B,IAAI,cAAc,EAAE,CAAC;AACvD,YAAA,IAAI,CAAC,gBAAgB,CAAC,MAAM,EAAE,MAAK;gBAC/B,IAAI,IAAI,EAAE,UAAU,KAAK,CAAC,KAAK,IAAI,CAAC,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,EAAE;oBACrE,MAAM,WAAW,GAAG,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;oBAClD,IAAI,GAAG,IAAI,CAAC;oBACZ,OAAO,CAAC,WAAW,CAAC,CAAC;iBACxB;AACL,aAAC,CAAC,CAAC;AAEH,YAAA,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,MAAK;gBAChC,IAAI,GAAG,IAAI,CAAC;AACZ,gBAAA,MAAM,IAAI,KAAK,CAAC,oCAAoC,CAAC,CAAC;AAC1D,aAAC,CAAC,CAAC;YAEH,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;AAChC,YAAA,IAAI,CAAC,YAAY,GAAG,aAAa,CAAC;AAClC,YAAA,I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BAAgB,CAAC;AAChC,iBAAA,CAAA;;;ACTD;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seniorsistemas/angular-components",
3
- "version": "19.7.4",
3
+ "version": "19.7.6",
4
4
  "peerDependencies": {
5
5
  "@angular/cdk": "^18.2.14",
6
6
  "@angular/common": "^18.2.0",
@@ -115,18 +115,18 @@
115
115
  "esm": "./esm2022/badge/seniorsistemas-angular-components-badge.mjs",
116
116
  "default": "./fesm2022/seniorsistemas-angular-components-badge.mjs"
117
117
  },
118
- "./breadcrumb": {
119
- "types": "./breadcrumb/index.d.ts",
120
- "esm2022": "./esm2022/breadcrumb/seniorsistemas-angular-components-breadcrumb.mjs",
121
- "esm": "./esm2022/breadcrumb/seniorsistemas-angular-components-breadcrumb.mjs",
122
- "default": "./fesm2022/seniorsistemas-angular-components-breadcrumb.mjs"
123
- },
124
118
  "./bignumber-input": {
125
119
  "types": "./bignumber-input/index.d.ts",
126
120
  "esm2022": "./esm2022/bignumber-input/seniorsistemas-angular-components-bignumber-input.mjs",
127
121
  "esm": "./esm2022/bignumber-input/seniorsistemas-angular-components-bignumber-input.mjs",
128
122
  "default": "./fesm2022/seniorsistemas-angular-components-bignumber-input.mjs"
129
123
  },
124
+ "./breadcrumb": {
125
+ "types": "./breadcrumb/index.d.ts",
126
+ "esm2022": "./esm2022/breadcrumb/seniorsistemas-angular-components-breadcrumb.mjs",
127
+ "esm": "./esm2022/breadcrumb/seniorsistemas-angular-components-breadcrumb.mjs",
128
+ "default": "./fesm2022/seniorsistemas-angular-components-breadcrumb.mjs"
129
+ },
130
130
  "./button": {
131
131
  "types": "./button/index.d.ts",
132
132
  "esm2022": "./esm2022/button/seniorsistemas-angular-components-button.mjs",
@@ -511,6 +511,12 @@
511
511
  "esm": "./esm2022/slide-in-bar/seniorsistemas-angular-components-slide-in-bar.mjs",
512
512
  "default": "./fesm2022/seniorsistemas-angular-components-slide-in-bar.mjs"
513
513
  },
514
+ "./slider": {
515
+ "types": "./slider/index.d.ts",
516
+ "esm2022": "./esm2022/slider/seniorsistemas-angular-components-slider.mjs",
517
+ "esm": "./esm2022/slider/seniorsistemas-angular-components-slider.mjs",
518
+ "default": "./fesm2022/seniorsistemas-angular-components-slider.mjs"
519
+ },
514
520
  "./speech-recognition": {
515
521
  "types": "./speech-recognition/index.d.ts",
516
522
  "esm2022": "./esm2022/speech-recognition/seniorsistemas-angular-components-speech-recognition.mjs",
@@ -529,12 +535,6 @@
529
535
  "esm": "./esm2022/spotlight/seniorsistemas-angular-components-spotlight.mjs",
530
536
  "default": "./fesm2022/seniorsistemas-angular-components-spotlight.mjs"
531
537
  },
532
- "./slider": {
533
- "types": "./slider/index.d.ts",
534
- "esm2022": "./esm2022/slider/seniorsistemas-angular-components-slider.mjs",
535
- "esm": "./esm2022/slider/seniorsistemas-angular-components-slider.mjs",
536
- "default": "./fesm2022/seniorsistemas-angular-components-slider.mjs"
537
- },
538
538
  "./star-rating": {
539
539
  "types": "./star-rating/index.d.ts",
540
540
  "esm2022": "./esm2022/star-rating/seniorsistemas-angular-components-star-rating.mjs",
@@ -0,0 +1,2 @@
1
+ import { Rule } from '@angular-devkit/schematics';
2
+ export declare function migrate(): Rule;
@@ -0,0 +1,104 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.migrate = migrate;
4
+ const ts = require("typescript");
5
+ const ast_utils_1 = require("../../utils/ast-utils");
6
+ const html_utils_1 = require("../../utils/html-utils");
7
+ const STEPS_MODULE = '@seniorsistemas/angular-components/steps';
8
+ const STEPPER_MODULE = '@seniorsistemas/angular-components/stepper';
9
+ // v18 name -> v19 name. Names absent from this map keep their original name (Step, StepState, StepSelectionEvent).
10
+ const RENAMED_SYMBOLS = {
11
+ StepsComponent: 'StepperComponent',
12
+ };
13
+ // StepperComponent is standalone now — the wrapper module is dropped; its usages become StepperComponent directly.
14
+ const DROPPED_MODULE_SYMBOL = 'StepsModule';
15
+ const ALL_IMPORT_NAMES = [
16
+ ...Object.keys(RENAMED_SYMBOLS),
17
+ DROPPED_MODULE_SYMBOL,
18
+ 'Step',
19
+ 'StepState',
20
+ 'StepSelectionEvent',
21
+ ];
22
+ // Canonical order used when rebuilding the stepper import statement
23
+ const IMPORT_ORDER = ['StepperComponent', 'Step', 'StepState', 'StepSelectionEvent'];
24
+ function migrate() {
25
+ return (tree, context) => {
26
+ tree.visit((path) => {
27
+ if (path.includes('/node_modules/'))
28
+ return;
29
+ if (path.endsWith('.html')) {
30
+ migrateTemplate(tree, path);
31
+ }
32
+ else if (path.endsWith('.ts')) {
33
+ migrateTypeScript(tree, path, context);
34
+ }
35
+ });
36
+ };
37
+ }
38
+ function migrateTemplate(tree, path) {
39
+ const content = tree.readText(path);
40
+ if (!content.includes('s-steps'))
41
+ return;
42
+ let updated = content;
43
+ updated = updated.replace(/<s-steps\b/g, '<s-stepper');
44
+ updated = updated.replace(/<\/s-steps>/g, '</s-stepper>');
45
+ if (updated !== content) {
46
+ tree.overwrite(path, updated);
47
+ }
48
+ }
49
+ function migrateTypeScript(tree, path, context) {
50
+ const content = tree.readText(path);
51
+ if (!content.includes(STEPS_MODULE))
52
+ return;
53
+ const sourceFile = ts.createSourceFile(path, content, ts.ScriptTarget.Latest, true);
54
+ const { changes: importChanges, removedNames } = (0, ast_utils_1.buildRemoveNamedImportsChanges)(sourceFile, ALL_IMPORT_NAMES, STEPS_MODULE);
55
+ if (removedNames.length === 0)
56
+ return;
57
+ // StepsModule/StepsComponent used in NgModule imports/exports, standalone Component imports,
58
+ // TestBed.configureTestingModule, etc. all collapse to the standalone StepperComponent.
59
+ const arrayChanges = (0, ast_utils_1.replaceIdentifierInArrayLiterals)(sourceFile, [DROPPED_MODULE_SYMBOL, 'StepsComponent'], 'StepperComponent');
60
+ let updated = (0, ast_utils_1.applyChanges)(content, [...importChanges, ...arrayChanges]);
61
+ updated = updated.replace(/\n{3,}/g, '\n\n');
62
+ // Rename remaining bare usages (type annotations, @ViewChild, etc.) of renamed symbols
63
+ for (const [oldName, newName] of Object.entries(RENAMED_SYMBOLS)) {
64
+ if (removedNames.includes(oldName)) {
65
+ updated = updated.replace(new RegExp(`\\b${oldName}\\b`, 'g'), newName);
66
+ }
67
+ }
68
+ if (removedNames.includes(DROPPED_MODULE_SYMBOL) && new RegExp(`\\b${DROPPED_MODULE_SYMBOL}\\b`).test(updated)) {
69
+ context.logger.warn(`${path}: referência a "StepsModule" fora de um array de imports/exports/declarations não pôde ser migrada automaticamente. Substitua manualmente por "StepperComponent".`);
70
+ }
71
+ const neededImports = new Set();
72
+ for (const name of removedNames) {
73
+ neededImports.add(name === DROPPED_MODULE_SYMBOL ? 'StepperComponent' : (RENAMED_SYMBOLS[name] ?? name));
74
+ }
75
+ for (const name of IMPORT_ORDER) {
76
+ if (neededImports.has(name)) {
77
+ updated = ensureNamedImport(updated, name, STEPPER_MODULE);
78
+ }
79
+ }
80
+ if (neededImports.has('StepperComponent')) {
81
+ updated = (0, ast_utils_1.ensureExportedSymbolIsImported)(updated, 'StepperComponent');
82
+ }
83
+ if (updated !== content) {
84
+ tree.overwrite(path, updated);
85
+ }
86
+ }
87
+ // ─── Import merging helpers (mirrors migrate-dynamic-form-v19 / migrate-p-editor) ─────────────
88
+ function isSymbolImportedFrom(content, symbolName, fromModule) {
89
+ const regex = new RegExp(`import\\s*\\{[^}]*\\b${symbolName}\\b[^}]*\\}\\s*from\\s*['"]${(0, html_utils_1.escapeRegex)(fromModule)}['"]`);
90
+ return regex.test(content);
91
+ }
92
+ function ensureNamedImport(content, symbolName, fromModule) {
93
+ if (isSymbolImportedFrom(content, symbolName, fromModule))
94
+ return content;
95
+ const existingImportRegex = new RegExp(`(import\\s*\\{)([^}]*)(\\}\\s*from\\s*['"]${(0, html_utils_1.escapeRegex)(fromModule)}['"])`);
96
+ const match = existingImportRegex.exec(content);
97
+ if (match) {
98
+ const newNames = match[2].trimEnd();
99
+ const separator = newNames.endsWith(',') ? ' ' : ', ';
100
+ return content.replace(match[0], `${match[1]}${newNames}${separator}${symbolName}${match[3]}`);
101
+ }
102
+ return (0, ast_utils_1.insertImportStatement)(content, symbolName, fromModule);
103
+ }
104
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../projects/angular-components/schematics/migrations/migrate-steps-to-stepper/index.ts"],"names":[],"mappings":";;AAiCA,0BAWC;AA3CD,iCAAiC;AACjC,qDAM+B;AAC/B,uDAAqD;AAErD,MAAM,YAAY,GAAG,0CAA0C,CAAC;AAChE,MAAM,cAAc,GAAG,4CAA4C,CAAC;AAEpE,mHAAmH;AACnH,MAAM,eAAe,GAA2B;IAC5C,cAAc,EAAE,kBAAkB;CACrC,CAAC;AAEF,mHAAmH;AACnH,MAAM,qBAAqB,GAAG,aAAa,CAAC;AAE5C,MAAM,gBAAgB,GAAG;IACrB,GAAG,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC;IAC/B,qBAAqB;IACrB,MAAM;IACN,WAAW;IACX,oBAAoB;CACvB,CAAC;AAEF,oEAAoE;AACpE,MAAM,YAAY,GAAG,CAAC,kBAAkB,EAAE,MAAM,EAAE,WAAW,EAAE,oBAAoB,CAAC,CAAC;AAErF,SAAgB,OAAO;IACnB,OAAO,CAAC,IAAU,EAAE,OAAyB,EAAE,EAAE;QAC7C,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE,EAAE;YAChB,IAAI,IAAI,CAAC,QAAQ,CAAC,gBAAgB,CAAC;gBAAE,OAAO;YAC5C,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,EAAE,CAAC;gBACzB,eAAe,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;YAChC,CAAC;iBAAM,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;gBAC9B,iBAAiB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC;YAC3C,CAAC;QACL,CAAC,CAAC,CAA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