@main-class/componentes 3.11.1 → 4.0.0-next.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/README.md +17 -0
  2. package/fesm2022/main-class-componentes-arquivo.mjs +851 -369
  3. package/fesm2022/main-class-componentes-arquivo.mjs.map +1 -1
  4. package/fesm2022/main-class-componentes-core.mjs +288 -240
  5. package/fesm2022/main-class-componentes-core.mjs.map +1 -1
  6. package/fesm2022/main-class-componentes-crud.mjs +1004 -546
  7. package/fesm2022/main-class-componentes-crud.mjs.map +1 -1
  8. package/fesm2022/main-class-componentes-dialog.mjs +758 -385
  9. package/fesm2022/main-class-componentes-dialog.mjs.map +1 -1
  10. package/fesm2022/main-class-componentes-form.mjs +299 -196
  11. package/fesm2022/main-class-componentes-form.mjs.map +1 -1
  12. package/fesm2022/main-class-componentes-input.mjs +4143 -2141
  13. package/fesm2022/main-class-componentes-input.mjs.map +1 -1
  14. package/fesm2022/main-class-componentes-loader.mjs +262 -212
  15. package/fesm2022/main-class-componentes-loader.mjs.map +1 -1
  16. package/fesm2022/main-class-componentes-misc.mjs +508 -354
  17. package/fesm2022/main-class-componentes-misc.mjs.map +1 -1
  18. package/fesm2022/main-class-componentes-pipe.mjs +39 -26
  19. package/fesm2022/main-class-componentes-pipe.mjs.map +1 -1
  20. package/fesm2022/main-class-componentes-table.mjs +1331 -624
  21. package/fesm2022/main-class-componentes-table.mjs.map +1 -1
  22. package/fesm2022/main-class-componentes.mjs +3 -11
  23. package/fesm2022/main-class-componentes.mjs.map +1 -1
  24. package/package.json +32 -16
  25. package/types/main-class-componentes-arquivo.d.ts +190 -0
  26. package/types/main-class-componentes-core.d.ts +99 -0
  27. package/types/main-class-componentes-crud.d.ts +172 -0
  28. package/types/main-class-componentes-dialog.d.ts +125 -0
  29. package/types/main-class-componentes-form.d.ts +70 -0
  30. package/types/main-class-componentes-input.d.ts +687 -0
  31. package/types/main-class-componentes-loader.d.ts +69 -0
  32. package/types/main-class-componentes-misc.d.ts +87 -0
  33. package/types/main-class-componentes-pipe.d.ts +10 -0
  34. package/types/main-class-componentes-table.d.ts +265 -0
  35. package/types/main-class-componentes.d.ts +4 -0
  36. package/arquivo/index.d.ts +0 -5
  37. package/arquivo/src/arquivo-manager.service.d.ts +0 -13
  38. package/arquivo/src/download-arquivo.directive.d.ts +0 -12
  39. package/arquivo/src/imagem.directive.d.ts +0 -21
  40. package/arquivo/src/preview-arquivo/dialog-preview-arquivo/dialog-preview-arquivo.component.d.ts +0 -23
  41. package/arquivo/src/preview-arquivo/preview-arquivo.component.d.ts +0 -27
  42. package/core/index.d.ts +0 -4
  43. package/core/src/criptografia/criptografia.service.d.ts +0 -6
  44. package/core/src/mensageria/mensageria.service.d.ts +0 -17
  45. package/core/src/mobile/mobile.service.d.ts +0 -15
  46. package/core/src/validator/valida-modulo11.service.d.ts +0 -55
  47. package/crud/index.d.ts +0 -7
  48. package/crud/src/abstract-consulta-paginada-component.d.ts +0 -24
  49. package/crud/src/abstract-edicao-component.d.ts +0 -19
  50. package/crud/src/abstract-edicao-modal-component.d.ts +0 -19
  51. package/crud/src/query/query-field/query-field.component.d.ts +0 -40
  52. package/crud/src/query/query-form-field/query-form-field.component.d.ts +0 -12
  53. package/crud/src/query/query-form.component.d.ts +0 -28
  54. package/crud/src/query/query-modal-form/query-modal-form.component.d.ts +0 -13
  55. package/dialog/index.d.ts +0 -10
  56. package/dialog/src/dialog-confirmacao/dialog-confirmacao.component.d.ts +0 -23
  57. package/dialog/src/dialog-iframe/dialog-iframe.component.d.ts +0 -21
  58. package/dialog/src/dialog-sidebar/modal-template/modal-body.directive.d.ts +0 -9
  59. package/dialog/src/dialog-sidebar/modal-template/modal-close.directive.d.ts +0 -9
  60. package/dialog/src/dialog-sidebar/modal-template/modal-footer.directive.d.ts +0 -6
  61. package/dialog/src/dialog-sidebar/modal-template/modal-header.directive.d.ts +0 -6
  62. package/dialog/src/dialog-sidebar/modal-template/modal-template.component.d.ts +0 -12
  63. package/dialog/src/dialog-sidebar/modal.component.d.ts +0 -8
  64. package/dialog/src/dialog-sidebar/sidebar-modal-ref.d.ts +0 -21
  65. package/dialog/src/dialog.service.d.ts +0 -26
  66. package/form/index.d.ts +0 -3
  67. package/form/src/form.component.d.ts +0 -24
  68. package/form/src/mensagens-erro/mensagens-erro.component.d.ts +0 -17
  69. package/form/src/single-click.directive.d.ts +0 -13
  70. package/index.d.ts +0 -5
  71. package/input/index.d.ts +0 -26
  72. package/input/src/abstract-control-value-accessor.d.ts +0 -18
  73. package/input/src/abstract-mat-form-field-control.d.ts +0 -42
  74. package/input/src/abstract-mat-form-field-select-control.d.ts +0 -31
  75. package/input/src/input-currency/input-currency.component.d.ts +0 -9
  76. package/input/src/input-datetime/input-datetime.component.d.ts +0 -32
  77. package/input/src/input-fileupload/input-fileupload-validator.directive.d.ts +0 -8
  78. package/input/src/input-fileupload/input-fileupload.component.d.ts +0 -70
  79. package/input/src/input-mask/documento-validators.d.ts +0 -7
  80. package/input/src/input-mask/input-cep.component.d.ts +0 -7
  81. package/input/src/input-mask/input-cnpj.component.d.ts +0 -7
  82. package/input/src/input-mask/input-cpf-cnpj.component.d.ts +0 -7
  83. package/input/src/input-mask/input-cpf.component.d.ts +0 -7
  84. package/input/src/input-mask/input-mask-validator.directive.d.ts +0 -16
  85. package/input/src/input-mask/input-mask.component.d.ts +0 -24
  86. package/input/src/input-mask/input-phone.component.d.ts +0 -7
  87. package/input/src/input-mask/mask-functions.d.ts +0 -2
  88. package/input/src/input-telefone-internacional/input-telefone-internacional-validator.directive.d.ts +0 -8
  89. package/input/src/input-telefone-internacional/input-telefone-internacional.component.d.ts +0 -19
  90. package/input/src/option-checkbox/all-option-checkbox.component.d.ts +0 -18
  91. package/input/src/option-checkbox/node-pool.d.ts +0 -23
  92. package/input/src/option-checkbox/option-checkbox-group.component.d.ts +0 -25
  93. package/input/src/option-checkbox/option-checkbox.component.d.ts +0 -23
  94. package/input/src/option-checkbox/option-checkbox.service.d.ts +0 -16
  95. package/input/src/option-checkbox/option-node.d.ts +0 -13
  96. package/input/src/select-autocomplete/select-autocomplete.component.d.ts +0 -15
  97. package/input/src/select-chips/select-chips.component.d.ts +0 -12
  98. package/input/src/select-many-checkbox/select-many-checkbox.component.d.ts +0 -12
  99. package/input/src/select-option/delegate-option-provider.directive.d.ts +0 -13
  100. package/input/src/select-option/select-option-provider.d.ts +0 -10
  101. package/input/src/select-option/select-option.component.d.ts +0 -10
  102. package/input/src/select-option/select-option.d.ts +0 -4
  103. package/input/src/select-radio/select-radio.component.d.ts +0 -9
  104. package/loader/index.d.ts +0 -2
  105. package/loader/src/loader.component.d.ts +0 -25
  106. package/loader/src/loader.service.d.ts +0 -20
  107. package/misc/index.d.ts +0 -12
  108. package/misc/src/cnpj/cnpj.directive.d.ts +0 -12
  109. package/misc/src/cnpj/cnpjs.pipe.d.ts +0 -7
  110. package/misc/src/cpf/cpf.directive.d.ts +0 -12
  111. package/misc/src/cpf/cpf.pipe.d.ts +0 -7
  112. package/misc/src/cpf-cnpj/cpf-cnpj.directive.d.ts +0 -12
  113. package/misc/src/cpf-cnpj/cpf-cnpj.pipe.d.ts +0 -7
  114. package/misc/src/mask/mask.pipe.d.ts +0 -8
  115. package/misc/src/monetario/monetario-mask.d.ts +0 -1
  116. package/misc/src/monetario/monetario.pipe.d.ts +0 -7
  117. package/misc/src/porcentagem/porcentagem-mask.d.ts +0 -1
  118. package/misc/src/porcentagem/porcentagem.pipe.d.ts +0 -7
  119. package/misc/src/telefone/telefone.pipe.d.ts +0 -7
  120. package/misc/src/unsafe-inner-html/unsafe-inner-html.directive.d.ts +0 -10
  121. package/pipe/index.d.ts +0 -1
  122. package/pipe/src/nome-resumido.pipe.d.ts +0 -7
  123. package/public-api.d.ts +0 -2
  124. package/table/index.d.ts +0 -10
  125. package/table/src/column/column-cell.directive.d.ts +0 -8
  126. package/table/src/column/column-footer.directive.d.ts +0 -8
  127. package/table/src/column/column-header.directive.d.ts +0 -8
  128. package/table/src/column/column.directive.d.ts +0 -16
  129. package/table/src/numeric-paginator/numeric-paginator.component.d.ts +0 -26
  130. package/table/src/paginated-table/paginated-table.component.d.ts +0 -58
  131. package/table/src/paginator-i18n.d.ts +0 -8
  132. package/table/src/table/table.component.d.ts +0 -41
  133. package/table/src/td/td.component.d.ts +0 -8
  134. package/table/src/th/th.component.d.ts +0 -8
  135. package/table/src/undefined-paginator/undefined-paginator.component.d.ts +0 -25
  136. package/table/src/virtual-paginated-table/virtual-paginated-table.component.d.ts +0 -28
@@ -1,390 +1,763 @@
1
- import * as i0 from '@angular/core';
2
- import { Inject, Component, ViewChild, InjectionToken, createComponent, createEnvironmentInjector, Injectable, HostListener, Directive } from '@angular/core';
3
- import { Subject, EMPTY } from 'rxjs';
4
- import * as i1 from '@angular/material/dialog';
5
- import { MAT_DIALOG_DATA, MatDialogTitle, MatDialogActions, MatDialogContent, MatDialogClose } from '@angular/material/dialog';
6
- import * as i2 from '@angular/forms';
7
- import { FormsModule } from '@angular/forms';
8
- import { TranslatePipe } from '@ngx-translate/core';
9
- import { MatButton, MatIconButton } from '@angular/material/button';
10
- import { map } from 'rxjs/operators';
11
- import { MatIcon } from '@angular/material/icon';
12
- import * as i2$1 from '@angular/platform-browser';
13
- import { NgClass, NgTemplateOutlet } from '@angular/common';
14
-
15
- class DialogConfirmacaoComponent {
16
- data;
17
- dialogRef;
18
- constructor(data, dialogRef) {
19
- this.data = data;
20
- this.dialogRef = dialogRef;
21
- }
22
- get titulo() {
23
- return this.data.titulo;
24
- }
25
- get mensagem() {
26
- return this.data.mensagem;
27
- }
28
- get okLabel() {
29
- return this.data.okLabel;
30
- }
31
- get cancelLabel() {
32
- return this.data.cancelLabel;
33
- }
34
- ngOnInit() {
35
- }
36
- confirma(form) {
37
- if (!form.valid) {
38
- return;
39
- }
40
- this.dialogRef.close(true);
41
- }
42
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: DialogConfirmacaoComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component });
43
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.9", type: DialogConfirmacaoComponent, isStandalone: true, selector: "mcl-dialog-confirmacao", ngImport: i0, template: "<div mat-dialog-title>\n {{ titulo | translate }}\n</div>\n\n<form (ngSubmit)=\"confirma(form)\" #form=\"ngForm\">\n <div mat-dialog-content>\n\n <p [innerHTML]=\"mensagem | translate\"></p>\n\n </div>\n\n <div mat-dialog-actions>\n @if (!!cancelLabel) {\n <button mat-button type=\"button\" mat-dialog-close>\n {{ cancelLabel | translate }}\n </button>\n }\n <button mat-flat-button color=\"primary\">\n {{ okLabel | translate }}\n </button>\n </div>\n</form>\n", styles: [":host{--dlg-fg: var(--lib-color-on-surface, var(--mat-sys-on-surface));--dlg-muted: var(--lib-color-on-surface-variant, var(--mat-sys-on-surface-variant));display:block;min-width:min(360px,85vw);max-width:440px}[mat-dialog-title]{margin:0;padding:24px 24px 8px;font-size:1.125rem;font-weight:600;letter-spacing:-.01em;color:var(--dlg-fg)}.mat-mdc-dialog-content{padding:0 24px;color:var(--dlg-muted);line-height:1.5}.mat-mdc-dialog-content p{margin:8px 0}[mat-dialog-actions]{justify-content:flex-end;gap:8px;padding:16px 24px 20px;flex-direction:row}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "directive", type: MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }] });
44
- }
45
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: DialogConfirmacaoComponent, decorators: [{
46
- type: Component,
47
- args: [{ selector: 'mcl-dialog-confirmacao', imports: [
48
- FormsModule,
49
- TranslatePipe,
50
- MatDialogTitle,
51
- MatDialogActions,
52
- MatButton,
53
- MatDialogContent,
54
- MatDialogClose
55
- ], template: "<div mat-dialog-title>\n {{ titulo | translate }}\n</div>\n\n<form (ngSubmit)=\"confirma(form)\" #form=\"ngForm\">\n <div mat-dialog-content>\n\n <p [innerHTML]=\"mensagem | translate\"></p>\n\n </div>\n\n <div mat-dialog-actions>\n @if (!!cancelLabel) {\n <button mat-button type=\"button\" mat-dialog-close>\n {{ cancelLabel | translate }}\n </button>\n }\n <button mat-flat-button color=\"primary\">\n {{ okLabel | translate }}\n </button>\n </div>\n</form>\n", styles: [":host{--dlg-fg: var(--lib-color-on-surface, var(--mat-sys-on-surface));--dlg-muted: var(--lib-color-on-surface-variant, var(--mat-sys-on-surface-variant));display:block;min-width:min(360px,85vw);max-width:440px}[mat-dialog-title]{margin:0;padding:24px 24px 8px;font-size:1.125rem;font-weight:600;letter-spacing:-.01em;color:var(--dlg-fg)}.mat-mdc-dialog-content{padding:0 24px;color:var(--dlg-muted);line-height:1.5}.mat-mdc-dialog-content p{margin:8px 0}[mat-dialog-actions]{justify-content:flex-end;gap:8px;padding:16px 24px 20px;flex-direction:row}\n"] }]
56
- }], ctorParameters: () => [{ type: undefined, decorators: [{
57
- type: Inject,
58
- args: [MAT_DIALOG_DATA]
59
- }] }, { type: i1.MatDialogRef }] });
60
-
61
- class DialogIframeComponent {
62
- dialogRef;
63
- titulo;
64
- url;
65
- iframe;
66
- constructor(dados, dialogRef, sanitizer) {
67
- this.dialogRef = dialogRef;
68
- this.titulo = dados.titulo;
69
- this.url = sanitizer.bypassSecurityTrustResourceUrl(dados.url);
70
- }
71
- ngAfterViewInit() {
72
- registerDialogOnIframe(this.iframe.nativeElement, () => this.close());
73
- }
74
- returnValue() {
75
- const fraContent = this.iframe.nativeElement.contentDocument ||
76
- this.iframe.nativeElement.contentWindow?.document;
77
- if (fraContent) {
78
- const divRetornoValue = fraContent.getElementById('returnValue');
79
- if (divRetornoValue) {
80
- const returnValue = divRetornoValue.innerText;
81
- if (returnValue) {
82
- return JSON.parse(returnValue);
83
- }
84
- }
85
- }
86
- return undefined;
87
- }
88
- close() {
89
- this.dialogRef.close(this.returnValue());
90
- }
91
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: DialogIframeComponent, deps: [{ token: MAT_DIALOG_DATA }, { token: i1.MatDialogRef }, { token: i2$1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Component });
92
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.9", type: DialogIframeComponent, isStandalone: true, selector: "mcl-dialog-iframe", viewQueries: [{ propertyName: "iframe", first: true, predicate: ["iframe"], descendants: true }], ngImport: i0, template: "<div mat-dialog-title >\n <h2>{{titulo}}</h2>\n <button mat-icon-button mat-dialog-close class=\"pull-right\" tabindex=\"-1\">\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div mat-dialog-content>\n <iframe #iframe width=\"560\" height=\"315\" [src]=\"url\" (close)=\"close()\" frameborder=\"0\"\n ></iframe>\n</div>\n", styles: ["[mat-dialog-title]{display:flex}[mat-dialog-title] h2{font-size:25px;flex:1 1 auto;margin:0 0 20px}[mat-dialog-title] mat-icon{vertical-align:middle}mat-dialog-content{margin:-24px;width:calc(100% + 48px);padding:0}mat-dialog-content iframe{width:100%;height:60vh;border:0}\n"], dependencies: [{ kind: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "directive", type: MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }] });
93
- }
94
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: DialogIframeComponent, decorators: [{
95
- type: Component,
96
- args: [{ selector: 'mcl-dialog-iframe', imports: [
97
- MatDialogContent,
98
- MatIconButton,
99
- MatDialogTitle,
100
- MatIcon,
101
- MatDialogClose
102
- ], template: "<div mat-dialog-title >\n <h2>{{titulo}}</h2>\n <button mat-icon-button mat-dialog-close class=\"pull-right\" tabindex=\"-1\">\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div mat-dialog-content>\n <iframe #iframe width=\"560\" height=\"315\" [src]=\"url\" (close)=\"close()\" frameborder=\"0\"\n ></iframe>\n</div>\n", styles: ["[mat-dialog-title]{display:flex}[mat-dialog-title] h2{font-size:25px;flex:1 1 auto;margin:0 0 20px}[mat-dialog-title] mat-icon{vertical-align:middle}mat-dialog-content{margin:-24px;width:calc(100% + 48px);padding:0}mat-dialog-content iframe{width:100%;height:60vh;border:0}\n"] }]
103
- }], ctorParameters: () => [{ type: undefined, decorators: [{
104
- type: Inject,
105
- args: [MAT_DIALOG_DATA]
106
- }] }, { type: i1.MatDialogRef }, { type: i2$1.DomSanitizer }], propDecorators: { iframe: [{
107
- type: ViewChild,
108
- args: ['iframe']
109
- }] } });
1
+ import * as i0 from "@angular/core";
2
+ import { ApplicationRef, ChangeDetectionStrategy, Component, Directive, HostListener, Inject, Injectable, InjectionToken, Injector, TemplateRef, ViewChild, createComponent, createEnvironmentInjector } from "@angular/core";
3
+ import { EMPTY, Subject } from "rxjs";
4
+ import { MAT_DIALOG_DATA, MatDialog, MatDialogActions, MatDialogClose, MatDialogContent, MatDialogRef, MatDialogTitle } from "@angular/material/dialog";
5
+ import * as i1 from "@angular/forms";
6
+ import { FormsModule } from "@angular/forms";
7
+ import { TranslatePipe } from "@ngx-translate/core";
8
+ import { MatButton, MatIconButton } from "@angular/material/button";
9
+ import { map } from "rxjs/operators";
10
+ import { DomSanitizer } from "@angular/platform-browser";
11
+ import { MatIcon } from "@angular/material/icon";
12
+ import { NgClass, NgTemplateOutlet } from "@angular/common";
13
+ var DialogConfirmacaoComponent = class DialogConfirmacaoComponent {
14
+ data;
15
+ dialogRef;
16
+ constructor(data, dialogRef) {
17
+ this.data = data;
18
+ this.dialogRef = dialogRef;
19
+ }
20
+ get titulo() {
21
+ return this.data.titulo;
22
+ }
23
+ get mensagem() {
24
+ return this.data.mensagem;
25
+ }
26
+ get okLabel() {
27
+ return this.data.okLabel;
28
+ }
29
+ get cancelLabel() {
30
+ return this.data.cancelLabel;
31
+ }
32
+ ngOnInit() {}
33
+ confirma(form) {
34
+ if (!form.valid) return;
35
+ this.dialogRef.close(true);
36
+ }
37
+ static ɵfac = i0.ɵɵngDeclareFactory({
38
+ minVersion: "12.0.0",
39
+ version: "22.3.2",
40
+ ngImport: i0,
41
+ type: DialogConfirmacaoComponent,
42
+ deps: [{ token: MAT_DIALOG_DATA }, { token: MatDialogRef }],
43
+ target: i0.ɵɵFactoryTarget.Component
44
+ });
45
+ static ɵcmp = i0.ɵɵngDeclareComponent({
46
+ minVersion: "17.0.0",
47
+ version: "22.3.2",
48
+ type: DialogConfirmacaoComponent,
49
+ isStandalone: true,
50
+ selector: "mcl-dialog-confirmacao",
51
+ ngImport: i0,
52
+ template: "<div mat-dialog-title>\n {{ titulo | translate }}\n</div>\n\n<form (ngSubmit)=\"confirma(form)\" #form=\"ngForm\">\n <div mat-dialog-content>\n\n <p [innerHTML]=\"mensagem | translate\"></p>\n\n </div>\n\n <div mat-dialog-actions>\n @if (!!cancelLabel) {\n <button mat-button type=\"button\" mat-dialog-close>\n {{ cancelLabel | translate }}\n </button>\n }\n <button mat-flat-button color=\"primary\">\n {{ okLabel | translate }}\n </button>\n </div>\n</form>\n",
53
+ styles: [":host{--dlg-fg: var(--lib-color-on-surface, var(--mat-sys-on-surface));--dlg-muted: var(--lib-color-on-surface-variant, var(--mat-sys-on-surface-variant));display:block;min-width:min(360px,85vw);max-width:440px}[mat-dialog-title]{margin:0;padding:24px 24px 8px;font-size:1.125rem;font-weight:600;letter-spacing:-.01em;color:var(--dlg-fg)}.mat-mdc-dialog-content{padding:0 24px;color:var(--dlg-muted);line-height:1.5}.mat-mdc-dialog-content p{margin:8px 0}[mat-dialog-actions]{justify-content:flex-end;gap:8px;padding:16px 24px 20px;flex-direction:row}\n"],
54
+ dependencies: [
55
+ {
56
+ kind: "ngmodule",
57
+ type: FormsModule
58
+ },
59
+ {
60
+ kind: "directive",
61
+ type: i1.ɵNgNoValidate,
62
+ selector: "form:not([ngNoForm]):not([ngNativeValidate])"
63
+ },
64
+ {
65
+ kind: "directive",
66
+ type: i1.NgControlStatusGroup,
67
+ selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],[formArray],form:not([ngNoForm]),[ngForm]"
68
+ },
69
+ {
70
+ kind: "directive",
71
+ type: i1.NgForm,
72
+ selector: "form:not([ngNoForm]):not([formGroup]):not([formArray]),ng-form,[ngForm]",
73
+ inputs: ["ngFormOptions"],
74
+ outputs: ["ngSubmit"],
75
+ exportAs: ["ngForm"]
76
+ },
77
+ {
78
+ kind: "directive",
79
+ type: MatDialogTitle,
80
+ selector: "[mat-dialog-title], [matDialogTitle]",
81
+ inputs: ["id"],
82
+ exportAs: ["matDialogTitle"]
83
+ },
84
+ {
85
+ kind: "directive",
86
+ type: MatDialogActions,
87
+ selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]",
88
+ inputs: ["align"]
89
+ },
90
+ {
91
+ kind: "component",
92
+ type: MatButton,
93
+ selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ",
94
+ inputs: ["matButton"],
95
+ exportAs: ["matButton", "matAnchor"]
96
+ },
97
+ {
98
+ kind: "directive",
99
+ type: MatDialogContent,
100
+ selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]"
101
+ },
102
+ {
103
+ kind: "directive",
104
+ type: MatDialogClose,
105
+ selector: "[mat-dialog-close], [matDialogClose]",
106
+ inputs: [
107
+ "aria-label",
108
+ "type",
109
+ "mat-dialog-close",
110
+ "matDialogClose"
111
+ ],
112
+ exportAs: ["matDialogClose"]
113
+ },
114
+ {
115
+ kind: "pipe",
116
+ type: TranslatePipe,
117
+ name: "translate"
118
+ }
119
+ ],
120
+ changeDetection: i0.ChangeDetectionStrategy.Eager
121
+ });
122
+ };
123
+ i0.ɵɵngDeclareClassMetadata({
124
+ minVersion: "12.0.0",
125
+ version: "22.3.2",
126
+ ngImport: i0,
127
+ type: DialogConfirmacaoComponent,
128
+ decorators: [{
129
+ type: Component,
130
+ args: [{
131
+ selector: "mcl-dialog-confirmacao",
132
+ imports: [
133
+ FormsModule,
134
+ TranslatePipe,
135
+ MatDialogTitle,
136
+ MatDialogActions,
137
+ MatButton,
138
+ MatDialogContent,
139
+ MatDialogClose
140
+ ],
141
+ changeDetection: ChangeDetectionStrategy.Eager,
142
+ template: "<div mat-dialog-title>\n {{ titulo | translate }}\n</div>\n\n<form (ngSubmit)=\"confirma(form)\" #form=\"ngForm\">\n <div mat-dialog-content>\n\n <p [innerHTML]=\"mensagem | translate\"></p>\n\n </div>\n\n <div mat-dialog-actions>\n @if (!!cancelLabel) {\n <button mat-button type=\"button\" mat-dialog-close>\n {{ cancelLabel | translate }}\n </button>\n }\n <button mat-flat-button color=\"primary\">\n {{ okLabel | translate }}\n </button>\n </div>\n</form>\n",
143
+ styles: [":host{--dlg-fg: var(--lib-color-on-surface, var(--mat-sys-on-surface));--dlg-muted: var(--lib-color-on-surface-variant, var(--mat-sys-on-surface-variant));display:block;min-width:min(360px,85vw);max-width:440px}[mat-dialog-title]{margin:0;padding:24px 24px 8px;font-size:1.125rem;font-weight:600;letter-spacing:-.01em;color:var(--dlg-fg)}.mat-mdc-dialog-content{padding:0 24px;color:var(--dlg-muted);line-height:1.5}.mat-mdc-dialog-content p{margin:8px 0}[mat-dialog-actions]{justify-content:flex-end;gap:8px;padding:16px 24px 20px;flex-direction:row}\n"]
144
+ }]
145
+ }],
146
+ ctorParameters: () => [{
147
+ type: void 0,
148
+ decorators: [{
149
+ type: Inject,
150
+ args: [MAT_DIALOG_DATA]
151
+ }]
152
+ }, { type: MatDialogRef }]
153
+ });
154
+ var DialogIframeComponent = class DialogIframeComponent {
155
+ dialogRef;
156
+ titulo;
157
+ url;
158
+ iframe;
159
+ constructor(dados, dialogRef, sanitizer) {
160
+ this.dialogRef = dialogRef;
161
+ this.titulo = dados.titulo;
162
+ this.url = sanitizer.bypassSecurityTrustResourceUrl(dados.url);
163
+ }
164
+ ngAfterViewInit() {
165
+ registerDialogOnIframe(this.iframe.nativeElement, () => this.close());
166
+ }
167
+ returnValue() {
168
+ const fraContent = this.iframe.nativeElement.contentDocument || this.iframe.nativeElement.contentWindow?.document;
169
+ if (fraContent) {
170
+ const divRetornoValue = fraContent.getElementById("returnValue");
171
+ if (divRetornoValue) {
172
+ const returnValue = divRetornoValue.innerText;
173
+ if (returnValue) return JSON.parse(returnValue);
174
+ }
175
+ }
176
+ }
177
+ close() {
178
+ this.dialogRef.close(this.returnValue());
179
+ }
180
+ static ɵfac = i0.ɵɵngDeclareFactory({
181
+ minVersion: "12.0.0",
182
+ version: "22.3.2",
183
+ ngImport: i0,
184
+ type: DialogIframeComponent,
185
+ deps: [
186
+ { token: MAT_DIALOG_DATA },
187
+ { token: MatDialogRef },
188
+ { token: DomSanitizer }
189
+ ],
190
+ target: i0.ɵɵFactoryTarget.Component
191
+ });
192
+ static ɵcmp = i0.ɵɵngDeclareComponent({
193
+ minVersion: "14.0.0",
194
+ version: "22.3.2",
195
+ type: DialogIframeComponent,
196
+ isStandalone: true,
197
+ selector: "mcl-dialog-iframe",
198
+ viewQueries: [{
199
+ propertyName: "iframe",
200
+ first: true,
201
+ predicate: ["iframe"],
202
+ descendants: true
203
+ }],
204
+ ngImport: i0,
205
+ template: "<div mat-dialog-title >\n <h2>{{titulo}}</h2>\n <button mat-icon-button mat-dialog-close class=\"pull-right\" tabindex=\"-1\">\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div mat-dialog-content>\n <iframe #iframe width=\"560\" height=\"315\" [src]=\"url\" (close)=\"close()\" frameborder=\"0\"\n ></iframe>\n</div>\n",
206
+ styles: ["[mat-dialog-title]{display:flex}[mat-dialog-title] h2{font-size:25px;flex:1 1 auto;margin:0 0 20px}[mat-dialog-title] mat-icon{vertical-align:middle}mat-dialog-content{margin:-24px;width:calc(100% + 48px);padding:0}mat-dialog-content iframe{width:100%;height:60vh;border:0}\n"],
207
+ dependencies: [
208
+ {
209
+ kind: "directive",
210
+ type: MatDialogContent,
211
+ selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]"
212
+ },
213
+ {
214
+ kind: "component",
215
+ type: MatIconButton,
216
+ selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]",
217
+ exportAs: ["matButton", "matAnchor"]
218
+ },
219
+ {
220
+ kind: "directive",
221
+ type: MatDialogTitle,
222
+ selector: "[mat-dialog-title], [matDialogTitle]",
223
+ inputs: ["id"],
224
+ exportAs: ["matDialogTitle"]
225
+ },
226
+ {
227
+ kind: "component",
228
+ type: MatIcon,
229
+ selector: "mat-icon",
230
+ inputs: [
231
+ "color",
232
+ "inline",
233
+ "svgIcon",
234
+ "fontSet",
235
+ "fontIcon"
236
+ ],
237
+ exportAs: ["matIcon"]
238
+ },
239
+ {
240
+ kind: "directive",
241
+ type: MatDialogClose,
242
+ selector: "[mat-dialog-close], [matDialogClose]",
243
+ inputs: [
244
+ "aria-label",
245
+ "type",
246
+ "mat-dialog-close",
247
+ "matDialogClose"
248
+ ],
249
+ exportAs: ["matDialogClose"]
250
+ }
251
+ ],
252
+ changeDetection: i0.ChangeDetectionStrategy.Eager
253
+ });
254
+ };
255
+ i0.ɵɵngDeclareClassMetadata({
256
+ minVersion: "12.0.0",
257
+ version: "22.3.2",
258
+ ngImport: i0,
259
+ type: DialogIframeComponent,
260
+ decorators: [{
261
+ type: Component,
262
+ args: [{
263
+ selector: "mcl-dialog-iframe",
264
+ imports: [
265
+ MatDialogContent,
266
+ MatIconButton,
267
+ MatDialogTitle,
268
+ MatIcon,
269
+ MatDialogClose
270
+ ],
271
+ changeDetection: ChangeDetectionStrategy.Eager,
272
+ template: "<div mat-dialog-title >\n <h2>{{titulo}}</h2>\n <button mat-icon-button mat-dialog-close class=\"pull-right\" tabindex=\"-1\">\n <mat-icon>close</mat-icon>\n </button>\n</div>\n<div mat-dialog-content>\n <iframe #iframe width=\"560\" height=\"315\" [src]=\"url\" (close)=\"close()\" frameborder=\"0\"\n ></iframe>\n</div>\n",
273
+ styles: ["[mat-dialog-title]{display:flex}[mat-dialog-title] h2{font-size:25px;flex:1 1 auto;margin:0 0 20px}[mat-dialog-title] mat-icon{vertical-align:middle}mat-dialog-content{margin:-24px;width:calc(100% + 48px);padding:0}mat-dialog-content iframe{width:100%;height:60vh;border:0}\n"]
274
+ }]
275
+ }],
276
+ ctorParameters: () => [
277
+ {
278
+ type: void 0,
279
+ decorators: [{
280
+ type: Inject,
281
+ args: [MAT_DIALOG_DATA]
282
+ }]
283
+ },
284
+ { type: MatDialogRef },
285
+ { type: DomSanitizer }
286
+ ],
287
+ propDecorators: { iframe: [{
288
+ type: ViewChild,
289
+ args: ["iframe"]
290
+ }] }
291
+ });
110
292
  function registerDialogOnIframe(iframe, callback) {
111
- window.addEventListener('dialogIframeClosed', () => callback());
293
+ window.addEventListener("dialogIframeClosed", () => callback());
112
294
  }
113
295
  function closeDialogIframe(returnValue) {
114
- if (returnValue) {
115
- const returnDiv = document.createElement('div');
116
- returnDiv.id = 'returnValue';
117
- returnDiv.innerText = JSON.stringify(returnValue);
118
- returnDiv.style.display = 'none';
119
- document.body.appendChild(returnDiv);
120
- }
121
- window.parent.dispatchEvent(new Event('dialogIframeClosed'));
122
- }
123
-
124
- const SIDEBAR_MODAL_DATA = new InjectionToken('mainclass.SIDEBAR_MODAL_DATA');
125
- const SIDEBAR_MODAL_OPTIONS = new InjectionToken('mainclass.SIDEBAR_MODAL_OPTIONS');
126
- class SidebarModalRef {
127
- $closeSubject = new Subject();
128
- /** duração da animação de saída (deve casar com o CSS do template) */
129
- static EXIT_DURATION = 240;
130
- /** true enquanto a animação de saída roda; usado pelo template para aplicar a classe de saída */
131
- closing = false;
132
- size;
133
- constructor(options) {
134
- this.size = options?.size || 'auto';
135
- }
136
- afterClosed() {
137
- return this.$closeSubject.asObservable();
138
- }
139
- close(result) {
140
- if (this.closing) {
141
- return;
142
- }
143
- this.closing = true;
144
- setTimeout(() => {
145
- this.$closeSubject.next(result);
146
- this.$closeSubject.complete();
147
- }, SidebarModalRef.EXIT_DURATION);
148
- }
149
- }
150
-
151
- class ModalTemplateComponent {
152
- modalRef;
153
- config;
154
- constructor(modalRef, config) {
155
- this.modalRef = modalRef;
156
- this.config = config;
157
- }
158
- get fixed() {
159
- return !this.config.container;
160
- }
161
- get size() {
162
- return this.config.size;
163
- }
164
- close() {
165
- if (this.config.closeable || this.config.closeable === undefined) {
166
- this.modalRef.close();
167
- }
168
- }
169
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: ModalTemplateComponent, deps: [{ token: SidebarModalRef }, { token: SIDEBAR_MODAL_OPTIONS }], target: i0.ɵɵFactoryTarget.Component });
170
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.9", type: ModalTemplateComponent, isStandalone: true, selector: "mcl-sidebar-modal-template", ngImport: i0, template: " <!-- Backdrop (fora do painel). Opcional: controle de exibi\u00E7\u00E3o via *ngIf -->\n <div class=\"backdrop\" [class.is-closing]=\"modalRef.closing\" (click)=\"close()\"></div>\n\n<!-- Container lateral -->\n<div class=\"sidebar\" [class.is-closing]=\"modalRef.closing\" [ngClass]=\"{ 'absolute': !fixed }\">\n\n <!-- Painel interno (largura e anima\u00E7\u00E3o) -->\n <div class=\"inner {{size}}\">\n\n <!-- Conte\u00FAdo projetado (outro componente injeta header/body/footer) -->\n <ng-content select=\"br-modal-content\"></ng-content>\n </div>\n</div>\n", styles: ["@charset \"UTF-8\";:host{--mt-bg: var(--lib-color-surface, var(--mat-sys-surface, #ffffff));--mt-fg: var(--lib-color-on-surface, var(--mat-sys-on-surface, #1f2937));--mt-muted: var(--lib-color-on-surface-variant, var(--mat-sys-on-surface-variant, #757575));--mt-border: var(--lib-color-outline-variant, var(--mat-sys-outline-variant, #e5e7eb));--mt-primary: var(--lib-color-primary, var(--mat-sys-primary, #357ea6));--mt-w-sm: 360px;--mt-w-md: 440px;--mt-w-lg: 560px;--mt-shadow: var(--mcl-shadow-3, -24px 0 48px rgba(0, 0, 0, .16));--mt-backdrop: rgba(0, 0, 0, .4);--mt-radius: var(--mcl-radius-lg, 16px);--z-backdrop: 998;--z-sheet: 999;display:block}.backdrop{position:fixed;inset:0;background:var(--mt-backdrop);z-index:var(--z-backdrop);animation:mt-fade-in .2s ease-out both}.backdrop.is-closing{animation:mt-fade-out .22s ease-in both;pointer-events:none}@keyframes mt-fade-in{0%{opacity:0}to{opacity:1}}@keyframes mt-fade-out{0%{opacity:1}to{opacity:0}}.sidebar{position:fixed;inset-block:0;inset-inline-end:0;z-index:var(--z-sheet);pointer-events:none}.inner{pointer-events:auto;inline-size:var(--mt-w-md);max-inline-size:100vw;block-size:100%;background:var(--mt-bg);color:var(--mt-fg);border-start-start-radius:var(--mt-radius);border-end-start-radius:var(--mt-radius);box-shadow:var(--mt-shadow);overflow:auto;animation:mt-slide-in .32s cubic-bezier(.32,.72,0,1) both}.sidebar.is-closing .inner{animation:mt-slide-out .24s cubic-bezier(.4,0,1,1) both}.sidebar.is-closing{pointer-events:none}@keyframes mt-slide-in{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes mt-slide-out{0%{transform:translate(0)}to{transform:translate(105%)}}.inner.sm{inline-size:var(--mt-w-sm)}.inner.lg{inline-size:var(--mt-w-lg)}@media (max-width: 520px){.inner{inline-size:100vw;border-radius:0}}@media (prefers-reduced-motion: reduce){.backdrop,.inner,.backdrop.is-closing,.sidebar.is-closing .inner{animation:none}}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
171
- }
172
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: ModalTemplateComponent, decorators: [{
173
- type: Component,
174
- args: [{ selector: 'mcl-sidebar-modal-template', imports: [
175
- NgClass
176
- ], template: " <!-- Backdrop (fora do painel). Opcional: controle de exibi\u00E7\u00E3o via *ngIf -->\n <div class=\"backdrop\" [class.is-closing]=\"modalRef.closing\" (click)=\"close()\"></div>\n\n<!-- Container lateral -->\n<div class=\"sidebar\" [class.is-closing]=\"modalRef.closing\" [ngClass]=\"{ 'absolute': !fixed }\">\n\n <!-- Painel interno (largura e anima\u00E7\u00E3o) -->\n <div class=\"inner {{size}}\">\n\n <!-- Conte\u00FAdo projetado (outro componente injeta header/body/footer) -->\n <ng-content select=\"br-modal-content\"></ng-content>\n </div>\n</div>\n", styles: ["@charset \"UTF-8\";:host{--mt-bg: var(--lib-color-surface, var(--mat-sys-surface, #ffffff));--mt-fg: var(--lib-color-on-surface, var(--mat-sys-on-surface, #1f2937));--mt-muted: var(--lib-color-on-surface-variant, var(--mat-sys-on-surface-variant, #757575));--mt-border: var(--lib-color-outline-variant, var(--mat-sys-outline-variant, #e5e7eb));--mt-primary: var(--lib-color-primary, var(--mat-sys-primary, #357ea6));--mt-w-sm: 360px;--mt-w-md: 440px;--mt-w-lg: 560px;--mt-shadow: var(--mcl-shadow-3, -24px 0 48px rgba(0, 0, 0, .16));--mt-backdrop: rgba(0, 0, 0, .4);--mt-radius: var(--mcl-radius-lg, 16px);--z-backdrop: 998;--z-sheet: 999;display:block}.backdrop{position:fixed;inset:0;background:var(--mt-backdrop);z-index:var(--z-backdrop);animation:mt-fade-in .2s ease-out both}.backdrop.is-closing{animation:mt-fade-out .22s ease-in both;pointer-events:none}@keyframes mt-fade-in{0%{opacity:0}to{opacity:1}}@keyframes mt-fade-out{0%{opacity:1}to{opacity:0}}.sidebar{position:fixed;inset-block:0;inset-inline-end:0;z-index:var(--z-sheet);pointer-events:none}.inner{pointer-events:auto;inline-size:var(--mt-w-md);max-inline-size:100vw;block-size:100%;background:var(--mt-bg);color:var(--mt-fg);border-start-start-radius:var(--mt-radius);border-end-start-radius:var(--mt-radius);box-shadow:var(--mt-shadow);overflow:auto;animation:mt-slide-in .32s cubic-bezier(.32,.72,0,1) both}.sidebar.is-closing .inner{animation:mt-slide-out .24s cubic-bezier(.4,0,1,1) both}.sidebar.is-closing{pointer-events:none}@keyframes mt-slide-in{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes mt-slide-out{0%{transform:translate(0)}to{transform:translate(105%)}}.inner.sm{inline-size:var(--mt-w-sm)}.inner.lg{inline-size:var(--mt-w-lg)}@media (max-width: 520px){.inner{inline-size:100vw;border-radius:0}}@media (prefers-reduced-motion: reduce){.backdrop,.inner,.backdrop.is-closing,.sidebar.is-closing .inner{animation:none}}\n"] }]
177
- }], ctorParameters: () => [{ type: SidebarModalRef }, { type: undefined, decorators: [{
178
- type: Inject,
179
- args: [SIDEBAR_MODAL_OPTIONS]
180
- }] }] });
181
-
182
- class DialogService {
183
- appRef;
184
- injector;
185
- dialog;
186
- constructor(appRef, injector, dialog) {
187
- this.appRef = appRef;
188
- this.injector = injector;
189
- this.dialog = dialog;
190
- }
191
- openSidebar(component, options) {
192
- const dialogRef = new SidebarModalRef(options);
193
- const container = options?.container ?? document.body;
194
- const providers = [
195
- {
196
- provide: SIDEBAR_MODAL_OPTIONS,
197
- useValue: {
198
- type: 'normal',
199
- size: 'medium',
200
- ...(options || {})
201
- }
202
- },
203
- { provide: SIDEBAR_MODAL_DATA, useValue: options?.data },
204
- { provide: SidebarModalRef, useValue: dialogRef }
205
- ];
206
- const newComponent = createComponent(component, {
207
- environmentInjector: createEnvironmentInjector(providers, this.injector)
208
- });
209
- const modal = createComponent(ModalTemplateComponent, {
210
- environmentInjector: createEnvironmentInjector(providers, this.injector),
211
- projectableNodes: [
212
- [newComponent.location.nativeElement],
213
- ],
214
- });
215
- container.appendChild(modal.location.nativeElement);
216
- // Attach views to the changeDetection cycle
217
- this.appRef.attachView(newComponent.hostView);
218
- this.appRef.attachView(modal.hostView);
219
- dialogRef.afterClosed().subscribe(async () => {
220
- this.appRef.detachView(newComponent.hostView);
221
- this.appRef.detachView(modal.hostView);
222
- modal.destroy();
223
- newComponent.destroy();
224
- setTimeout(() => {
225
- if (container.contains(modal.location.nativeElement)) {
226
- container.removeChild(modal.location.nativeElement);
227
- }
228
- }, 300);
229
- });
230
- return dialogRef;
231
- }
232
- confirma(mensagem, config = {}) {
233
- return this.dialog.open(DialogConfirmacaoComponent, {
234
- data: {
235
- titulo: config.titulo || 'mcl.dialog.confirmacao',
236
- mensagem,
237
- okLabel: config.okLabel || 'mcl.dialog.sim',
238
- cancelLabel: config.cancelLabel || 'mcl.dialog.nao'
239
- }
240
- }).afterClosed().pipe(map(result => !!result));
241
- }
242
- informa(mensagem, config = {}) {
243
- return this.dialog.open(DialogConfirmacaoComponent, {
244
- data: {
245
- titulo: config.titulo || 'mcl.dialog.informacao',
246
- mensagem,
247
- okLabel: config.okLabel || 'mcl.dialog.ok',
248
- }
249
- }).afterClosed().pipe(map(result => !!result));
250
- }
251
- iframe(url, titulo) {
252
- if (!!window.parent && window.parent !== window) {
253
- window.location.href = url;
254
- return EMPTY;
255
- }
256
- else {
257
- return this.dialog.open(DialogIframeComponent, {
258
- data: {
259
- titulo,
260
- url,
261
- },
262
- panelClass: 'dialog-frame',
263
- }).afterClosed();
264
- }
265
- }
266
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: DialogService, deps: [{ token: i0.ApplicationRef }, { token: i0.Injector }, { token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Injectable });
267
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: DialogService, providedIn: 'root' });
268
- }
269
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: DialogService, decorators: [{
270
- type: Injectable,
271
- args: [{
272
- providedIn: 'root'
273
- }]
274
- }], ctorParameters: () => [{ type: i0.ApplicationRef }, { type: i0.Injector }, { type: i1.MatDialog }] });
275
-
276
- class ModalComponent {
277
- template;
278
- constructor(template) {
279
- this.template = template;
280
- }
281
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: ModalComponent, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Component });
282
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.9", type: ModalComponent, isStandalone: true, selector: "mcl-modal", ngImport: i0, template: "<mcl-sidebar-modal-template>\n <ng-container [ngTemplateOutlet]=\"template\"></ng-container>\n</mcl-sidebar-modal-template>\n", styles: [""], dependencies: [{ kind: "component", type: ModalTemplateComponent, selector: "mcl-sidebar-modal-template" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
296
+ if (returnValue) {
297
+ const returnDiv = document.createElement("div");
298
+ returnDiv.id = "returnValue";
299
+ returnDiv.innerText = JSON.stringify(returnValue);
300
+ returnDiv.style.display = "none";
301
+ document.body.appendChild(returnDiv);
302
+ }
303
+ window.parent.dispatchEvent(new Event("dialogIframeClosed"));
283
304
  }
284
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: ModalComponent, decorators: [{
285
- type: Component,
286
- args: [{ selector: 'mcl-modal', imports: [
287
- ModalTemplateComponent,
288
- NgTemplateOutlet
289
- ], template: "<mcl-sidebar-modal-template>\n <ng-container [ngTemplateOutlet]=\"template\"></ng-container>\n</mcl-sidebar-modal-template>\n" }]
290
- }], ctorParameters: () => [{ type: i0.TemplateRef }] });
291
-
292
- class ModalCloseDirective {
293
- modalRef;
294
- constructor(modalRef) {
295
- this.modalRef = modalRef;
296
- }
297
- onClick() {
298
- this.modalRef.close();
299
- }
300
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: ModalCloseDirective, deps: [{ token: SidebarModalRef }], target: i0.ɵɵFactoryTarget.Directive });
301
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.9", type: ModalCloseDirective, isStandalone: true, selector: "[mclSidebarModalClose]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
302
- }
303
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: ModalCloseDirective, decorators: [{
304
- type: Directive,
305
- args: [{
306
- selector: '[mclSidebarModalClose]',
307
- }]
308
- }], ctorParameters: () => [{ type: SidebarModalRef }], propDecorators: { onClick: [{
309
- type: HostListener,
310
- args: ['click']
311
- }] } });
312
-
313
- class ModalFooterDirective {
314
- constructor() { }
315
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: ModalFooterDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
316
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.9", type: ModalFooterDirective, isStandalone: true, selector: "[mclSidebarModalFooter]", host: { properties: { "style.display": "\"flex\"", "style.gap": "\"8px\"", "style.justifyContent": "\"flex-end\"", "style.padding": "\"12px 16px\"", "style.borderTop": "\"1px solid var(--mt-border)\"", "style.background": "\"var(--mt-bg)\"", "style.color": "\"var(--mt-fg)\"" } }, ngImport: i0 });
317
- }
318
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: ModalFooterDirective, decorators: [{
319
- type: Directive,
320
- args: [{
321
- selector: '[mclSidebarModalFooter]',
322
- host: {
323
- '[style.display]': '"flex"',
324
- '[style.gap]': '"8px"',
325
- '[style.justifyContent]': '"flex-end"',
326
- '[style.padding]': '"12px 16px"',
327
- '[style.borderTop]': '"1px solid var(--mt-border)"',
328
- '[style.background]': '"var(--mt-bg)"',
329
- '[style.color]': '"var(--mt-fg)"'
330
- }
331
- }]
332
- }], ctorParameters: () => [] });
333
-
334
- class ModalHeaderDirective {
335
- constructor() { }
336
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: ModalHeaderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
337
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.9", type: ModalHeaderDirective, isStandalone: true, selector: "[mclSidebarModalHeader]", host: { properties: { "style.display": "\"flex\"", "style.alignItems": "\"center\"", "style.gap": "\"8px\"", "style.padding": "\"16px\"", "style.borderBottom": "\"1px solid var(--mt-border)\"", "style.background": " \"var(--mt-bg)\"", "style.color": "\"var(--mt-fg)\"" } }, ngImport: i0 });
338
- }
339
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: ModalHeaderDirective, decorators: [{
340
- type: Directive,
341
- args: [{
342
- selector: '[mclSidebarModalHeader]',
343
- host: {
344
- '[style.display]': '"flex"',
345
- '[style.alignItems]': '"center"',
346
- '[style.gap]': '"8px"',
347
- '[style.padding]': '"16px"',
348
- '[style.borderBottom]': '"1px solid var(--mt-border)"',
349
- '[style.background]': ' "var(--mt-bg)"',
350
- '[style.color]': '"var(--mt-fg)"'
351
- }
352
- }]
353
- }], ctorParameters: () => [] });
354
-
355
- class ModalBodyDirective {
356
- config;
357
- constructor(config) {
358
- this.config = config;
359
- }
360
- get size() {
361
- return this.config.size;
362
- }
363
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: ModalBodyDirective, deps: [{ token: SIDEBAR_MODAL_OPTIONS }], target: i0.ɵɵFactoryTarget.Directive });
364
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.9", type: ModalBodyDirective, isStandalone: true, selector: "[mclSidebarModalBody]", host: { properties: { "style.display": "\"grid\"", "style.gap": "\"12px\"", "style.minHeight": "\"0\"", "style.overflow": "\"auto\"", "style.padding": "\"16px\"", "style.background": "\"var(--mt-bg)\"", "style.color": "\"var(--mt-fg)\"" } }, ngImport: i0 });
365
- }
366
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: ModalBodyDirective, decorators: [{
367
- type: Directive,
368
- args: [{
369
- selector: '[mclSidebarModalBody]',
370
- host: {
371
- '[style.display]': '"grid"',
372
- '[style.gap]': '"12px"',
373
- '[style.minHeight]': '"0"',
374
- '[style.overflow]': '"auto"',
375
- '[style.padding]': '"16px"',
376
- '[style.background]': '"var(--mt-bg)"',
377
- '[style.color]': '"var(--mt-fg)"'
378
- }
379
- }]
380
- }], ctorParameters: () => [{ type: undefined, decorators: [{
381
- type: Inject,
382
- args: [SIDEBAR_MODAL_OPTIONS]
383
- }] }] });
384
-
385
- /**
386
- * Generated bundle index. Do not edit.
387
- */
388
-
305
+ const SIDEBAR_MODAL_DATA = new InjectionToken("mainclass.SIDEBAR_MODAL_DATA");
306
+ const SIDEBAR_MODAL_OPTIONS = new InjectionToken("mainclass.SIDEBAR_MODAL_OPTIONS");
307
+ var SidebarModalRef = class SidebarModalRef {
308
+ $closeSubject = new Subject();
309
+ static EXIT_DURATION = 240;
310
+ closing = false;
311
+ size;
312
+ constructor(options) {
313
+ this.size = options?.size || "auto";
314
+ }
315
+ afterClosed() {
316
+ return this.$closeSubject.asObservable();
317
+ }
318
+ close(result) {
319
+ if (this.closing) return;
320
+ this.closing = true;
321
+ setTimeout(() => {
322
+ this.$closeSubject.next(result);
323
+ this.$closeSubject.complete();
324
+ }, SidebarModalRef.EXIT_DURATION);
325
+ }
326
+ };
327
+ var ModalTemplateComponent = class ModalTemplateComponent {
328
+ modalRef;
329
+ config;
330
+ constructor(modalRef, config) {
331
+ this.modalRef = modalRef;
332
+ this.config = config;
333
+ }
334
+ get fixed() {
335
+ return !this.config.container;
336
+ }
337
+ get size() {
338
+ return this.config.size;
339
+ }
340
+ close() {
341
+ if (this.config.closeable || this.config.closeable === void 0) this.modalRef.close();
342
+ }
343
+ static ɵfac = i0.ɵɵngDeclareFactory({
344
+ minVersion: "12.0.0",
345
+ version: "22.3.2",
346
+ ngImport: i0,
347
+ type: ModalTemplateComponent,
348
+ deps: [{ token: SidebarModalRef }, { token: SIDEBAR_MODAL_OPTIONS }],
349
+ target: i0.ɵɵFactoryTarget.Component
350
+ });
351
+ static ɵcmp = i0.ɵɵngDeclareComponent({
352
+ minVersion: "14.0.0",
353
+ version: "22.3.2",
354
+ type: ModalTemplateComponent,
355
+ isStandalone: true,
356
+ selector: "mcl-sidebar-modal-template",
357
+ ngImport: i0,
358
+ template: " <!-- Backdrop (fora do painel). Opcional: controle de exibição via *ngIf -->\n <div class=\"backdrop\" [class.is-closing]=\"modalRef.closing\" (click)=\"close()\"></div>\n\n<!-- Container lateral -->\n<div class=\"sidebar\" [class.is-closing]=\"modalRef.closing\" [ngClass]=\"{ 'absolute': !fixed }\">\n\n <!-- Painel interno (largura e animação) -->\n <div class=\"inner {{size}}\">\n\n <!-- Conteúdo projetado (outro componente injeta header/body/footer) -->\n <ng-content select=\"br-modal-content\"></ng-content>\n </div>\n</div>\n",
359
+ styles: ["@charset \"UTF-8\";:host{--mt-bg: var(--lib-color-surface, var(--mat-sys-surface, #ffffff));--mt-fg: var(--lib-color-on-surface, var(--mat-sys-on-surface, #1f2937));--mt-muted: var(--lib-color-on-surface-variant, var(--mat-sys-on-surface-variant, #757575));--mt-border: var(--lib-color-outline-variant, var(--mat-sys-outline-variant, #e5e7eb));--mt-primary: var(--lib-color-primary, var(--mat-sys-primary, #357ea6));--mt-w-sm: 360px;--mt-w-md: 440px;--mt-w-lg: 560px;--mt-shadow: var(--mcl-shadow-3, -24px 0 48px rgba(0, 0, 0, .16));--mt-backdrop: rgba(0, 0, 0, .4);--mt-radius: var(--mcl-radius-lg, 16px);--z-backdrop: 998;--z-sheet: 999;display:block}.backdrop{position:fixed;inset:0;background:var(--mt-backdrop);z-index:var(--z-backdrop);animation:mt-fade-in .2s ease-out both}.backdrop.is-closing{animation:mt-fade-out .22s ease-in both;pointer-events:none}@keyframes mt-fade-in{0%{opacity:0}to{opacity:1}}@keyframes mt-fade-out{0%{opacity:1}to{opacity:0}}.sidebar{position:fixed;inset-block:0;inset-inline-end:0;z-index:var(--z-sheet);pointer-events:none}.inner{pointer-events:auto;inline-size:var(--mt-w-md);max-inline-size:100vw;block-size:100%;background:var(--mt-bg);color:var(--mt-fg);border-start-start-radius:var(--mt-radius);border-end-start-radius:var(--mt-radius);box-shadow:var(--mt-shadow);overflow:auto;animation:mt-slide-in .32s cubic-bezier(.32,.72,0,1) both}.sidebar.is-closing .inner{animation:mt-slide-out .24s cubic-bezier(.4,0,1,1) both}.sidebar.is-closing{pointer-events:none}@keyframes mt-slide-in{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes mt-slide-out{0%{transform:translate(0)}to{transform:translate(105%)}}.inner.sm{inline-size:var(--mt-w-sm)}.inner.lg{inline-size:var(--mt-w-lg)}@media(max-width:520px){.inner{inline-size:100vw;border-radius:0}}@media(prefers-reduced-motion:reduce){.backdrop,.inner,.backdrop.is-closing,.sidebar.is-closing .inner{animation:none}}\n"],
360
+ dependencies: [{
361
+ kind: "directive",
362
+ type: NgClass,
363
+ selector: "[ngClass]",
364
+ inputs: ["class", "ngClass"]
365
+ }],
366
+ changeDetection: i0.ChangeDetectionStrategy.Eager
367
+ });
368
+ };
369
+ i0.ɵɵngDeclareClassMetadata({
370
+ minVersion: "12.0.0",
371
+ version: "22.3.2",
372
+ ngImport: i0,
373
+ type: ModalTemplateComponent,
374
+ decorators: [{
375
+ type: Component,
376
+ args: [{
377
+ selector: "mcl-sidebar-modal-template",
378
+ imports: [NgClass],
379
+ changeDetection: ChangeDetectionStrategy.Eager,
380
+ template: " <!-- Backdrop (fora do painel). Opcional: controle de exibição via *ngIf -->\n <div class=\"backdrop\" [class.is-closing]=\"modalRef.closing\" (click)=\"close()\"></div>\n\n<!-- Container lateral -->\n<div class=\"sidebar\" [class.is-closing]=\"modalRef.closing\" [ngClass]=\"{ 'absolute': !fixed }\">\n\n <!-- Painel interno (largura e animação) -->\n <div class=\"inner {{size}}\">\n\n <!-- Conteúdo projetado (outro componente injeta header/body/footer) -->\n <ng-content select=\"br-modal-content\"></ng-content>\n </div>\n</div>\n",
381
+ styles: ["@charset \"UTF-8\";:host{--mt-bg: var(--lib-color-surface, var(--mat-sys-surface, #ffffff));--mt-fg: var(--lib-color-on-surface, var(--mat-sys-on-surface, #1f2937));--mt-muted: var(--lib-color-on-surface-variant, var(--mat-sys-on-surface-variant, #757575));--mt-border: var(--lib-color-outline-variant, var(--mat-sys-outline-variant, #e5e7eb));--mt-primary: var(--lib-color-primary, var(--mat-sys-primary, #357ea6));--mt-w-sm: 360px;--mt-w-md: 440px;--mt-w-lg: 560px;--mt-shadow: var(--mcl-shadow-3, -24px 0 48px rgba(0, 0, 0, .16));--mt-backdrop: rgba(0, 0, 0, .4);--mt-radius: var(--mcl-radius-lg, 16px);--z-backdrop: 998;--z-sheet: 999;display:block}.backdrop{position:fixed;inset:0;background:var(--mt-backdrop);z-index:var(--z-backdrop);animation:mt-fade-in .2s ease-out both}.backdrop.is-closing{animation:mt-fade-out .22s ease-in both;pointer-events:none}@keyframes mt-fade-in{0%{opacity:0}to{opacity:1}}@keyframes mt-fade-out{0%{opacity:1}to{opacity:0}}.sidebar{position:fixed;inset-block:0;inset-inline-end:0;z-index:var(--z-sheet);pointer-events:none}.inner{pointer-events:auto;inline-size:var(--mt-w-md);max-inline-size:100vw;block-size:100%;background:var(--mt-bg);color:var(--mt-fg);border-start-start-radius:var(--mt-radius);border-end-start-radius:var(--mt-radius);box-shadow:var(--mt-shadow);overflow:auto;animation:mt-slide-in .32s cubic-bezier(.32,.72,0,1) both}.sidebar.is-closing .inner{animation:mt-slide-out .24s cubic-bezier(.4,0,1,1) both}.sidebar.is-closing{pointer-events:none}@keyframes mt-slide-in{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes mt-slide-out{0%{transform:translate(0)}to{transform:translate(105%)}}.inner.sm{inline-size:var(--mt-w-sm)}.inner.lg{inline-size:var(--mt-w-lg)}@media(max-width:520px){.inner{inline-size:100vw;border-radius:0}}@media(prefers-reduced-motion:reduce){.backdrop,.inner,.backdrop.is-closing,.sidebar.is-closing .inner{animation:none}}\n"]
382
+ }]
383
+ }],
384
+ ctorParameters: () => [{ type: SidebarModalRef }, {
385
+ type: void 0,
386
+ decorators: [{
387
+ type: Inject,
388
+ args: [SIDEBAR_MODAL_OPTIONS]
389
+ }]
390
+ }]
391
+ });
392
+ var DialogService = class DialogService {
393
+ appRef;
394
+ injector;
395
+ dialog;
396
+ constructor(appRef, injector, dialog) {
397
+ this.appRef = appRef;
398
+ this.injector = injector;
399
+ this.dialog = dialog;
400
+ }
401
+ openSidebar(component, options) {
402
+ const dialogRef = new SidebarModalRef(options);
403
+ const container = options?.container ?? document.body;
404
+ const providers = [
405
+ {
406
+ provide: SIDEBAR_MODAL_OPTIONS,
407
+ useValue: {
408
+ type: "normal",
409
+ size: "medium",
410
+ ...options || {}
411
+ }
412
+ },
413
+ {
414
+ provide: SIDEBAR_MODAL_DATA,
415
+ useValue: options?.data
416
+ },
417
+ {
418
+ provide: SidebarModalRef,
419
+ useValue: dialogRef
420
+ }
421
+ ];
422
+ const newComponent = createComponent(component, { environmentInjector: createEnvironmentInjector(providers, this.injector) });
423
+ const modal = createComponent(ModalTemplateComponent, {
424
+ environmentInjector: createEnvironmentInjector(providers, this.injector),
425
+ projectableNodes: [[newComponent.location.nativeElement]]
426
+ });
427
+ container.appendChild(modal.location.nativeElement);
428
+ this.appRef.attachView(newComponent.hostView);
429
+ this.appRef.attachView(modal.hostView);
430
+ dialogRef.afterClosed().subscribe(async () => {
431
+ this.appRef.detachView(newComponent.hostView);
432
+ this.appRef.detachView(modal.hostView);
433
+ modal.destroy();
434
+ newComponent.destroy();
435
+ setTimeout(() => {
436
+ if (container.contains(modal.location.nativeElement)) container.removeChild(modal.location.nativeElement);
437
+ }, 300);
438
+ });
439
+ return dialogRef;
440
+ }
441
+ confirma(mensagem, config = {}) {
442
+ return this.dialog.open(DialogConfirmacaoComponent, { data: {
443
+ titulo: config.titulo || "mcl.dialog.confirmacao",
444
+ mensagem,
445
+ okLabel: config.okLabel || "mcl.dialog.sim",
446
+ cancelLabel: config.cancelLabel || "mcl.dialog.nao"
447
+ } }).afterClosed().pipe(map((result) => !!result));
448
+ }
449
+ informa(mensagem, config = {}) {
450
+ return this.dialog.open(DialogConfirmacaoComponent, { data: {
451
+ titulo: config.titulo || "mcl.dialog.informacao",
452
+ mensagem,
453
+ okLabel: config.okLabel || "mcl.dialog.ok"
454
+ } }).afterClosed().pipe(map((result) => !!result));
455
+ }
456
+ iframe(url, titulo) {
457
+ if (!!window.parent && window.parent !== window) {
458
+ window.location.href = url;
459
+ return EMPTY;
460
+ } else return this.dialog.open(DialogIframeComponent, {
461
+ data: {
462
+ titulo,
463
+ url
464
+ },
465
+ panelClass: "dialog-frame"
466
+ }).afterClosed();
467
+ }
468
+ static ɵfac = i0.ɵɵngDeclareFactory({
469
+ minVersion: "12.0.0",
470
+ version: "22.3.2",
471
+ ngImport: i0,
472
+ type: DialogService,
473
+ deps: [
474
+ { token: ApplicationRef },
475
+ { token: Injector },
476
+ { token: MatDialog }
477
+ ],
478
+ target: i0.ɵɵFactoryTarget.Injectable
479
+ });
480
+ static ɵprov = i0.ɵɵngDeclareInjectable({
481
+ minVersion: "12.0.0",
482
+ version: "22.3.2",
483
+ ngImport: i0,
484
+ type: DialogService,
485
+ providedIn: "root"
486
+ });
487
+ };
488
+ i0.ɵɵngDeclareClassMetadata({
489
+ minVersion: "12.0.0",
490
+ version: "22.3.2",
491
+ ngImport: i0,
492
+ type: DialogService,
493
+ decorators: [{
494
+ type: Injectable,
495
+ args: [{ providedIn: "root" }]
496
+ }],
497
+ ctorParameters: () => [
498
+ { type: ApplicationRef },
499
+ { type: Injector },
500
+ { type: MatDialog }
501
+ ]
502
+ });
503
+ var ModalComponent = class ModalComponent {
504
+ template;
505
+ constructor(template) {
506
+ this.template = template;
507
+ }
508
+ static ɵfac = i0.ɵɵngDeclareFactory({
509
+ minVersion: "12.0.0",
510
+ version: "22.3.2",
511
+ ngImport: i0,
512
+ type: ModalComponent,
513
+ deps: [{ token: TemplateRef }],
514
+ target: i0.ɵɵFactoryTarget.Component
515
+ });
516
+ static ɵcmp = i0.ɵɵngDeclareComponent({
517
+ minVersion: "14.0.0",
518
+ version: "22.3.2",
519
+ type: ModalComponent,
520
+ isStandalone: true,
521
+ selector: "mcl-modal",
522
+ ngImport: i0,
523
+ template: "<mcl-sidebar-modal-template>\n <ng-container [ngTemplateOutlet]=\"template\"></ng-container>\n</mcl-sidebar-modal-template>\n",
524
+ styles: [""],
525
+ dependencies: [{
526
+ kind: "component",
527
+ type: ModalTemplateComponent,
528
+ selector: "mcl-sidebar-modal-template"
529
+ }, {
530
+ kind: "directive",
531
+ type: NgTemplateOutlet,
532
+ selector: "[ngTemplateOutlet]",
533
+ inputs: [
534
+ "ngTemplateOutletContext",
535
+ "ngTemplateOutlet",
536
+ "ngTemplateOutletInjector"
537
+ ]
538
+ }],
539
+ changeDetection: i0.ChangeDetectionStrategy.Eager
540
+ });
541
+ };
542
+ i0.ɵɵngDeclareClassMetadata({
543
+ minVersion: "12.0.0",
544
+ version: "22.3.2",
545
+ ngImport: i0,
546
+ type: ModalComponent,
547
+ decorators: [{
548
+ type: Component,
549
+ args: [{
550
+ selector: "mcl-modal",
551
+ imports: [ModalTemplateComponent, NgTemplateOutlet],
552
+ changeDetection: ChangeDetectionStrategy.Eager,
553
+ template: "<mcl-sidebar-modal-template>\n <ng-container [ngTemplateOutlet]=\"template\"></ng-container>\n</mcl-sidebar-modal-template>\n"
554
+ }]
555
+ }],
556
+ ctorParameters: () => [{ type: TemplateRef }]
557
+ });
558
+ var ModalCloseDirective = class ModalCloseDirective {
559
+ modalRef;
560
+ constructor(modalRef) {
561
+ this.modalRef = modalRef;
562
+ }
563
+ onClick() {
564
+ this.modalRef.close();
565
+ }
566
+ static ɵfac = i0.ɵɵngDeclareFactory({
567
+ minVersion: "12.0.0",
568
+ version: "22.3.2",
569
+ ngImport: i0,
570
+ type: ModalCloseDirective,
571
+ deps: [{ token: SidebarModalRef }],
572
+ target: i0.ɵɵFactoryTarget.Directive
573
+ });
574
+ static ɵdir = i0.ɵɵngDeclareDirective({
575
+ minVersion: "14.0.0",
576
+ version: "22.3.2",
577
+ type: ModalCloseDirective,
578
+ isStandalone: true,
579
+ selector: "[mclSidebarModalClose]",
580
+ host: { listeners: { "click": "onClick()" } },
581
+ ngImport: i0
582
+ });
583
+ };
584
+ i0.ɵɵngDeclareClassMetadata({
585
+ minVersion: "12.0.0",
586
+ version: "22.3.2",
587
+ ngImport: i0,
588
+ type: ModalCloseDirective,
589
+ decorators: [{
590
+ type: Directive,
591
+ args: [{ selector: "[mclSidebarModalClose]" }]
592
+ }],
593
+ ctorParameters: () => [{ type: SidebarModalRef }],
594
+ propDecorators: { onClick: [{
595
+ type: HostListener,
596
+ args: ["click"]
597
+ }] }
598
+ });
599
+ var ModalFooterDirective = class ModalFooterDirective {
600
+ constructor() {}
601
+ static ɵfac = i0.ɵɵngDeclareFactory({
602
+ minVersion: "12.0.0",
603
+ version: "22.3.2",
604
+ ngImport: i0,
605
+ type: ModalFooterDirective,
606
+ deps: [],
607
+ target: i0.ɵɵFactoryTarget.Directive
608
+ });
609
+ static ɵdir = i0.ɵɵngDeclareDirective({
610
+ minVersion: "14.0.0",
611
+ version: "22.3.2",
612
+ type: ModalFooterDirective,
613
+ isStandalone: true,
614
+ selector: "[mclSidebarModalFooter]",
615
+ host: { properties: {
616
+ "style.display": "\"flex\"",
617
+ "style.gap": "\"8px\"",
618
+ "style.justifyContent": "\"flex-end\"",
619
+ "style.padding": "\"12px 16px\"",
620
+ "style.borderTop": "\"1px solid var(--mt-border)\"",
621
+ "style.background": "\"var(--mt-bg)\"",
622
+ "style.color": "\"var(--mt-fg)\""
623
+ } },
624
+ ngImport: i0
625
+ });
626
+ };
627
+ i0.ɵɵngDeclareClassMetadata({
628
+ minVersion: "12.0.0",
629
+ version: "22.3.2",
630
+ ngImport: i0,
631
+ type: ModalFooterDirective,
632
+ decorators: [{
633
+ type: Directive,
634
+ args: [{
635
+ selector: "[mclSidebarModalFooter]",
636
+ host: {
637
+ "[style.display]": "\"flex\"",
638
+ "[style.gap]": "\"8px\"",
639
+ "[style.justifyContent]": "\"flex-end\"",
640
+ "[style.padding]": "\"12px 16px\"",
641
+ "[style.borderTop]": "\"1px solid var(--mt-border)\"",
642
+ "[style.background]": "\"var(--mt-bg)\"",
643
+ "[style.color]": "\"var(--mt-fg)\""
644
+ }
645
+ }]
646
+ }],
647
+ ctorParameters: () => []
648
+ });
649
+ var ModalHeaderDirective = class ModalHeaderDirective {
650
+ constructor() {}
651
+ static ɵfac = i0.ɵɵngDeclareFactory({
652
+ minVersion: "12.0.0",
653
+ version: "22.3.2",
654
+ ngImport: i0,
655
+ type: ModalHeaderDirective,
656
+ deps: [],
657
+ target: i0.ɵɵFactoryTarget.Directive
658
+ });
659
+ static ɵdir = i0.ɵɵngDeclareDirective({
660
+ minVersion: "14.0.0",
661
+ version: "22.3.2",
662
+ type: ModalHeaderDirective,
663
+ isStandalone: true,
664
+ selector: "[mclSidebarModalHeader]",
665
+ host: { properties: {
666
+ "style.display": "\"flex\"",
667
+ "style.alignItems": "\"center\"",
668
+ "style.gap": "\"8px\"",
669
+ "style.padding": "\"16px\"",
670
+ "style.borderBottom": "\"1px solid var(--mt-border)\"",
671
+ "style.background": " \"var(--mt-bg)\"",
672
+ "style.color": "\"var(--mt-fg)\""
673
+ } },
674
+ ngImport: i0
675
+ });
676
+ };
677
+ i0.ɵɵngDeclareClassMetadata({
678
+ minVersion: "12.0.0",
679
+ version: "22.3.2",
680
+ ngImport: i0,
681
+ type: ModalHeaderDirective,
682
+ decorators: [{
683
+ type: Directive,
684
+ args: [{
685
+ selector: "[mclSidebarModalHeader]",
686
+ host: {
687
+ "[style.display]": "\"flex\"",
688
+ "[style.alignItems]": "\"center\"",
689
+ "[style.gap]": "\"8px\"",
690
+ "[style.padding]": "\"16px\"",
691
+ "[style.borderBottom]": "\"1px solid var(--mt-border)\"",
692
+ "[style.background]": " \"var(--mt-bg)\"",
693
+ "[style.color]": "\"var(--mt-fg)\""
694
+ }
695
+ }]
696
+ }],
697
+ ctorParameters: () => []
698
+ });
699
+ var ModalBodyDirective = class ModalBodyDirective {
700
+ config;
701
+ constructor(config) {
702
+ this.config = config;
703
+ }
704
+ get size() {
705
+ return this.config.size;
706
+ }
707
+ static ɵfac = i0.ɵɵngDeclareFactory({
708
+ minVersion: "12.0.0",
709
+ version: "22.3.2",
710
+ ngImport: i0,
711
+ type: ModalBodyDirective,
712
+ deps: [{ token: SIDEBAR_MODAL_OPTIONS }],
713
+ target: i0.ɵɵFactoryTarget.Directive
714
+ });
715
+ static ɵdir = i0.ɵɵngDeclareDirective({
716
+ minVersion: "14.0.0",
717
+ version: "22.3.2",
718
+ type: ModalBodyDirective,
719
+ isStandalone: true,
720
+ selector: "[mclSidebarModalBody]",
721
+ host: { properties: {
722
+ "style.display": "\"grid\"",
723
+ "style.gap": "\"12px\"",
724
+ "style.minHeight": "\"0\"",
725
+ "style.overflow": "\"auto\"",
726
+ "style.padding": "\"16px\"",
727
+ "style.background": "\"var(--mt-bg)\"",
728
+ "style.color": "\"var(--mt-fg)\""
729
+ } },
730
+ ngImport: i0
731
+ });
732
+ };
733
+ i0.ɵɵngDeclareClassMetadata({
734
+ minVersion: "12.0.0",
735
+ version: "22.3.2",
736
+ ngImport: i0,
737
+ type: ModalBodyDirective,
738
+ decorators: [{
739
+ type: Directive,
740
+ args: [{
741
+ selector: "[mclSidebarModalBody]",
742
+ host: {
743
+ "[style.display]": "\"grid\"",
744
+ "[style.gap]": "\"12px\"",
745
+ "[style.minHeight]": "\"0\"",
746
+ "[style.overflow]": "\"auto\"",
747
+ "[style.padding]": "\"16px\"",
748
+ "[style.background]": "\"var(--mt-bg)\"",
749
+ "[style.color]": "\"var(--mt-fg)\""
750
+ }
751
+ }]
752
+ }],
753
+ ctorParameters: () => [{
754
+ type: void 0,
755
+ decorators: [{
756
+ type: Inject,
757
+ args: [SIDEBAR_MODAL_OPTIONS]
758
+ }]
759
+ }]
760
+ });
389
761
  export { DialogConfirmacaoComponent, DialogIframeComponent, DialogService, ModalBodyDirective, ModalCloseDirective, ModalComponent, ModalFooterDirective, ModalHeaderDirective, ModalTemplateComponent, SIDEBAR_MODAL_DATA, SIDEBAR_MODAL_OPTIONS, SidebarModalRef, closeDialogIframe };
390
- //# sourceMappingURL=main-class-componentes-dialog.mjs.map
762
+
763
+ //# sourceMappingURL=main-class-componentes-dialog.mjs.map