@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
@@ -0,0 +1,99 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ import * as i0 from "@angular/core";
5
+ import { MatSnackBar, MatSnackBarConfig, MatSnackBarHorizontalPosition, MatSnackBarVerticalPosition } from "@angular/material/snack-bar";
6
+ import { TranslateService } from "@ngx-translate/core";
7
+ import { MediaMatcher } from "@angular/cdk/layout";
8
+ import { ActivatedRoute, ActivatedRouteSnapshot, Data, Params } from "@angular/router";
9
+ import { Observable } from "rxjs";
10
+ export declare class CriptografiaService {
11
+ criptografa(chavePublica: string, senha: string): string;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<CriptografiaService, never>;
13
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
14
+ }
15
+ export declare class ValidaModulo11Service {
16
+ /**
17
+ * Método que verifica a validade de um CPF.
18
+ *
19
+ * @param cpf - String com CPF a ser validado.
20
+ * @return True se CPF é válido e false caso contrário.
21
+ */
22
+ isValidCpf(cpf: string): boolean;
23
+ /**
24
+ * <P>
25
+ * Método que verifica a validade de um CGC (CNPJ).
26
+ * Suporta o novo formato alfanumérico.
27
+ * </p>
28
+ * <P>
29
+ * Um CGC é válido se tiver o seguinte formato: RRRRRRRRFFFFDD (tamanho 14), onde:
30
+ * </p>
31
+ * <UL>
32
+ * <li>RRRRRRRR - Raiz do CGC;</li>
33
+ * <li>FFFF - Filial;</li>
34
+ * <li>DD - Dígito verificador.</li>
35
+ * </ul>
36
+ *
37
+ * @param cgc - String com CGC a ser validado.
38
+ * @return True se CGC é válido e false caso contrário.
39
+ */
40
+ isValidCgc(cgc: string): boolean;
41
+ /**
42
+ * Calcula o dígito verificador do CNPJ (numérico ou alfanumérico).
43
+ * @param base A parte do CNPJ sobre a qual o DV será calculado.
44
+ * @param weights Os pesos para o cálculo.
45
+ * @private
46
+ */
47
+ private calculateCnpjDv;
48
+ /**
49
+ * Método que verifica se cadeia é composta apenas por caracteres numéricos repetidos (tudo 0 ou tudo 1, ...). Utilizado nas rotinas que
50
+ * testam cpf e cgc.
51
+ *
52
+ * @param cadeia - Cadeia a ser checada.
53
+ * @return True caso cadeia seja formado somente com dígitos e false caso contrário.
54
+ */
55
+ isRepeatedNumber(cadeia: string): boolean;
56
+ /**
57
+ * Método que calcula o dígito verificador módulo 11 de uma cadeia.
58
+ *
59
+ * @param cadeia - Cadeia ser calculado o dígito verificador.
60
+ * @param tam - Número de dígitos a serem utilizados no cálculo.
61
+ * @param fatorInicial - Valor base no fator de multiplicação.
62
+ * @param fatorFinal - Valor limite do fator de multiplicação.
63
+ * @return Valor (decimal) do d�gito verificador.
64
+ */
65
+ calculateDvMod11(cadeia: string, tam: number, fatorInicial: number, fatorFinal: number): number;
66
+ static ɵfac: i0.ɵɵFactoryDeclaration<ValidaModulo11Service, never>;
67
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
68
+ }
69
+ export declare class MensageriaService {
70
+ private snackBar;
71
+ private translateService;
72
+ defaultHorizontalPosition: MatSnackBarHorizontalPosition;
73
+ defaultVerticalPosition: MatSnackBarVerticalPosition;
74
+ defaultDuration: number;
75
+ private $defaultComponent;
76
+ constructor(snackBar: MatSnackBar, translateService: TranslateService);
77
+ setDefaultComponent(defaultComponent: any): void;
78
+ addMensagemFromComponent(component: any, config?: MatSnackBarConfig): void;
79
+ addMensagem(mensagem: string, args?: {}, action?: string, config?: MatSnackBarConfig): void;
80
+ static ɵfac: i0.ɵɵFactoryDeclaration<MensageriaService, never>;
81
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
82
+ }
83
+ export declare class MobileService {
84
+ mobileQuery: MediaQueryList;
85
+ tabletQuery: MediaQueryList;
86
+ private mobileQueryListener;
87
+ private listeners;
88
+ constructor(media: MediaMatcher);
89
+ addListener(listener: (mobile: boolean, tablet?: boolean) => void): void;
90
+ removeListener(listener: (mobile: boolean, tablet?: boolean) => void): void;
91
+ get mobile(): boolean;
92
+ get tablet(): boolean;
93
+ static ɵfac: i0.ɵɵFactoryDeclaration<MobileService, never>;
94
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
95
+ }
96
+ export declare function dadosDaRota(rota: ActivatedRouteSnapshot): Data;
97
+ export declare function parametrosDaRota(rota: ActivatedRouteSnapshot): Params;
98
+ /** Equivalente a ActivatedRoute.params: só emite quando os parâmetros de parametrosDaRota mudam. */
99
+ export declare function observaParametrosDaRota(rota: ActivatedRoute): Observable<Params>;
@@ -0,0 +1,172 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ import * as i0 from "@angular/core";
5
+ import { AfterViewInit, EventEmitter, OnDestroy, OnInit, QueryList, TemplateRef } from "@angular/core";
6
+ import { AbstractControl, FormBuilder, FormControl, FormGroup, NgForm, Validators } from "@angular/forms";
7
+ import { Observable } from "rxjs";
8
+ import { SelectOption, SelectOptionComponent, SelectOptionProvider } from "@main-class/componentes/input";
9
+ import { DialogService, SidebarModalRef } from "@main-class/componentes/dialog";
10
+ import { ActivatedRoute, Router } from "@angular/router";
11
+ import { LoaderService } from "@main-class/componentes/loader";
12
+ import { NumericPaginationEvent, Page, PaginatedTableComponent, UndefinedPaginationEvent } from "@main-class/componentes/table";
13
+ import { MensageriaService } from "@main-class/componentes/core";
14
+ import { MatDialogRef } from "@angular/material/dialog";
15
+ type FieldType = 'group' | 'input' | 'cpf' | 'cnpj' | 'cpf_cnpj' | 'date' | 'option' | 'currency' | 'mask';
16
+ export declare class QueryFieldComponent implements SelectOptionProvider {
17
+ optionProvider?: SelectOptionProvider | undefined;
18
+ private cpfCnpjPipe;
19
+ private datePipe;
20
+ private currencyPipe;
21
+ private maskPipe;
22
+ private $fieldType?;
23
+ formControl: AbstractControl;
24
+ labelText?: string;
25
+ description?: string;
26
+ mask?: string;
27
+ name?: string;
28
+ private $fixed?;
29
+ options?: QueryList<SelectOptionComponent>;
30
+ fields?: QueryList<QueryFieldComponent>;
31
+ constructor(optionProvider?: SelectOptionProvider | undefined);
32
+ set fixed(fixed: any);
33
+ get fixed(): any;
34
+ get required(): boolean;
35
+ get fieldType(): FieldType | undefined;
36
+ set fieldType(fieldType: FieldType | undefined);
37
+ get empty(): boolean;
38
+ get value(): string | undefined | null;
39
+ type(): "number" | "object" | "string" | "date";
40
+ provide(search: string | null): Observable<SelectOption<any>[]>;
41
+ label(value: any): string;
42
+ trackBy(value: any): any;
43
+ clear(): void;
44
+ serialized(): string | undefined;
45
+ desserialize(value: string | undefined): any;
46
+ static ɵfac: i0.ɵɵFactoryDeclaration<QueryFieldComponent, [{
47
+ optional: true;
48
+ self: true;
49
+ }]>;
50
+ static ɵcmp: i0.ɵɵComponentDeclaration<QueryFieldComponent, "mcl-query-field", never, {
51
+ "labelText": {
52
+ "alias": "label";
53
+ "required": false;
54
+ };
55
+ "description": {
56
+ "alias": "description";
57
+ "required": false;
58
+ };
59
+ "mask": {
60
+ "alias": "mask";
61
+ "required": false;
62
+ };
63
+ "name": {
64
+ "alias": "name";
65
+ "required": false;
66
+ };
67
+ "fixed": {
68
+ "alias": "fixed";
69
+ "required": false;
70
+ };
71
+ "fieldType": {
72
+ "alias": "type";
73
+ "required": false;
74
+ };
75
+ }, {}, ["options", "fields"], never, true, never>;
76
+ }
77
+ export declare class QueryFormFieldComponent {
78
+ field?: QueryFieldComponent;
79
+ control?: AbstractControl;
80
+ get formControl(): FormControl;
81
+ get formGroup(): FormGroup;
82
+ clear(): void;
83
+ static ɵfac: i0.ɵɵFactoryDeclaration<QueryFormFieldComponent, never>;
84
+ static ɵcmp: i0.ɵɵComponentDeclaration<QueryFormFieldComponent, "mcl-query-form-field", never, {
85
+ "field": {
86
+ "alias": "field";
87
+ "required": false;
88
+ };
89
+ "control": {
90
+ "alias": "control";
91
+ "required": false;
92
+ };
93
+ }, {}, never, never, true, never>;
94
+ }
95
+ export declare class QueryModalFormComponent {
96
+ private modalRef;
97
+ fields: Array<QueryFieldComponent>;
98
+ form: FormGroup;
99
+ constructor(fb: FormBuilder, modalRef: SidebarModalRef<any>, fields: Array<QueryFieldComponent>);
100
+ apply(): void;
101
+ static ɵfac: i0.ɵɵFactoryDeclaration<QueryModalFormComponent, never>;
102
+ static ɵcmp: i0.ɵɵComponentDeclaration<QueryModalFormComponent, "mcl-query-form", never, {}, {}, never, never, true, never>;
103
+ }
104
+ export declare class QueryFormComponent implements AfterViewInit, OnDestroy {
105
+ private router;
106
+ private dialogService;
107
+ private activatedRoute;
108
+ fields?: QueryList<QueryFieldComponent>;
109
+ modalTemplate?: TemplateRef<any>;
110
+ query: EventEmitter<any>;
111
+ private _subscriptions;
112
+ constructor(router: Router, dialogService: DialogService, activatedRoute: ActivatedRoute);
113
+ ngAfterViewInit(): void;
114
+ ngOnDestroy(): void;
115
+ get filterCount(): number;
116
+ openFilter($event: MouseEvent): void;
117
+ clearAll(): void;
118
+ clear(item: QueryFieldComponent): void;
119
+ protected readonly Validators: typeof Validators;
120
+ private serialized;
121
+ private desserialize;
122
+ private configFieldsSubscriptions;
123
+ static ɵfac: i0.ɵɵFactoryDeclaration<QueryFormComponent, never>;
124
+ static ɵcmp: i0.ɵɵComponentDeclaration<QueryFormComponent, "mcl-query-form", never, {}, {
125
+ "query": "query";
126
+ }, ["fields"], never, true, never>;
127
+ }
128
+ export declare abstract class AbstractConsultaPaginadaComponent<T> implements AfterViewInit {
129
+ protected readonly router: Router;
130
+ protected readonly dialogService: DialogService;
131
+ protected readonly loaderService: LoaderService;
132
+ private timeoutConsulta;
133
+ filtro: any;
134
+ page?: Page<T>;
135
+ table: PaginatedTableComponent<T>;
136
+ ngAfterViewInit(): void;
137
+ reset(filtro?: any): Promise<void>;
138
+ protected abstract consultaEntidades(pagina: number, tamanhoPagina: number): Promise<Page<T>>;
139
+ protected abstract deleteEntidade(entidade: T): Promise<any>;
140
+ get tamanhoPagina(): any;
141
+ busca(event?: NumericPaginationEvent | UndefinedPaginationEvent): Promise<void>;
142
+ remove(entidade: T): Promise<void>;
143
+ static ɵfac: i0.ɵɵFactoryDeclaration<AbstractConsultaPaginadaComponent<any>, never>;
144
+ static ɵcmp: i0.ɵɵComponentDeclaration<AbstractConsultaPaginadaComponent<any>, "ng-component", never, {}, {}, never, never, true, never>;
145
+ }
146
+ export declare abstract class AbstractEdicaoComponent<T> implements OnInit {
147
+ entidade: T;
148
+ protected readonly router: Router;
149
+ protected readonly activatedRoute: ActivatedRoute;
150
+ protected readonly mensageriaService: MensageriaService;
151
+ protected readonly loaderService: LoaderService;
152
+ protected abstract detalhaEntidade?(id: any): Promise<T>;
153
+ protected abstract salvaEntidade(): Promise<any>;
154
+ ngOnInit(): void;
155
+ salva(form: NgForm): Promise<void>;
156
+ static ɵfac: i0.ɵɵFactoryDeclaration<AbstractEdicaoComponent<any>, never>;
157
+ static ɵcmp: i0.ɵɵComponentDeclaration<AbstractEdicaoComponent<any>, "ng-component", never, {}, {}, never, never, true, never>;
158
+ }
159
+ export declare abstract class AbstractEdicaoModalComponent<T> {
160
+ abstract get entidade(): T;
161
+ protected readonly router: Router;
162
+ protected readonly activatedRoute: ActivatedRoute;
163
+ protected readonly dialogService: DialogService;
164
+ protected readonly loaderService: LoaderService;
165
+ protected readonly mensageriaService: MensageriaService;
166
+ protected readonly dialogRef: MatDialogRef<T>;
167
+ protected abstract salvaEntidade(): Promise<T>;
168
+ protected abstract deleteEntidade?(entidade: T): Promise<any>;
169
+ salva(form: NgForm): Promise<void>;
170
+ remove(entidade: T): Promise<void>;
171
+ }
172
+ export {};
@@ -0,0 +1,125 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ import * as i0 from "@angular/core";
5
+ import { AfterViewInit, ApplicationRef, ElementRef, InjectionToken, Injector, OnInit, TemplateRef } from "@angular/core";
6
+ import { Observable } from "rxjs";
7
+ import { MatDialog, MatDialogRef } from "@angular/material/dialog";
8
+ import { NgForm } from "@angular/forms";
9
+ import { DomSanitizer, SafeResourceUrl } from "@angular/platform-browser";
10
+ export declare const SIDEBAR_MODAL_DATA: InjectionToken<any>;
11
+ export declare const SIDEBAR_MODAL_OPTIONS: InjectionToken<SidebarModalOptions>;
12
+ export interface SidebarModalOptions {
13
+ size?: 'small' | 'medium' | 'large' | 'auto';
14
+ closeable?: boolean;
15
+ data?: any;
16
+ container?: HTMLElement;
17
+ }
18
+ export declare class SidebarModalRef<T> {
19
+ private $closeSubject;
20
+ /** duração da animação de saída (deve casar com o CSS do template) */
21
+ private static readonly EXIT_DURATION;
22
+ /** true enquanto a animação de saída roda; usado pelo template para aplicar a classe de saída */
23
+ closing: boolean;
24
+ readonly size: 'small' | 'medium' | 'large' | 'auto';
25
+ constructor(options?: SidebarModalOptions);
26
+ afterClosed(): Observable<T | undefined>;
27
+ close(result?: T): void;
28
+ }
29
+ export declare class DialogService {
30
+ private appRef;
31
+ private injector;
32
+ private dialog;
33
+ constructor(appRef: ApplicationRef, injector: Injector, dialog: MatDialog);
34
+ openSidebar<T = any>(component: any, options?: SidebarModalOptions): SidebarModalRef<T>;
35
+ confirma(mensagem: string, config?: {
36
+ icon?: string;
37
+ titulo?: string;
38
+ okLabel?: string;
39
+ cancelLabel?: string;
40
+ }): Observable<boolean>;
41
+ informa(mensagem: string, config?: {
42
+ icon?: string;
43
+ titulo?: string;
44
+ okLabel?: string;
45
+ }): Observable<boolean>;
46
+ iframe(url: string, titulo: string): Observable<any>;
47
+ static ɵfac: i0.ɵɵFactoryDeclaration<DialogService, never>;
48
+ static ɵprov: i0.ɵɵInjectableDeclaration<any>;
49
+ }
50
+ export interface DialogConfirmacaoData {
51
+ titulo: string;
52
+ mensagem: string;
53
+ okLabel: string;
54
+ cancelLabel?: string;
55
+ }
56
+ export declare class DialogConfirmacaoComponent implements OnInit {
57
+ private data;
58
+ private dialogRef;
59
+ constructor(data: DialogConfirmacaoData, dialogRef: MatDialogRef<any>);
60
+ get titulo(): string;
61
+ get mensagem(): string;
62
+ get okLabel(): string;
63
+ get cancelLabel(): string | undefined;
64
+ ngOnInit(): void;
65
+ confirma(form: NgForm): void;
66
+ static ɵfac: i0.ɵɵFactoryDeclaration<DialogConfirmacaoComponent, never>;
67
+ static ɵcmp: i0.ɵɵComponentDeclaration<DialogConfirmacaoComponent, "mcl-dialog-confirmacao", never, {}, {}, never, never, true, never>;
68
+ }
69
+ export interface DialogIframData {
70
+ url: string;
71
+ titulo: string;
72
+ }
73
+ export declare class DialogIframeComponent implements AfterViewInit {
74
+ private dialogRef;
75
+ titulo: string;
76
+ url: SafeResourceUrl;
77
+ iframe: ElementRef;
78
+ constructor(dados: DialogIframData, dialogRef: MatDialogRef<any>, sanitizer: DomSanitizer);
79
+ ngAfterViewInit(): void;
80
+ private returnValue;
81
+ close(): void;
82
+ static ɵfac: i0.ɵɵFactoryDeclaration<DialogIframeComponent, never>;
83
+ static ɵcmp: i0.ɵɵComponentDeclaration<DialogIframeComponent, "mcl-dialog-iframe", never, {}, {}, never, never, true, never>;
84
+ }
85
+ export declare function closeDialogIframe(returnValue?: any): void;
86
+ export declare class ModalComponent {
87
+ template: TemplateRef<any>;
88
+ constructor(template: TemplateRef<any>);
89
+ static ɵfac: i0.ɵɵFactoryDeclaration<ModalComponent, never>;
90
+ static ɵcmp: i0.ɵɵComponentDeclaration<ModalComponent, "mcl-modal", never, {}, {}, never, never, true, never>;
91
+ }
92
+ export declare class ModalCloseDirective {
93
+ private modalRef;
94
+ constructor(modalRef: SidebarModalRef<any>);
95
+ onClick(): void;
96
+ static ɵfac: i0.ɵɵFactoryDeclaration<ModalCloseDirective, never>;
97
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ModalCloseDirective, "[mclSidebarModalClose]", never, {}, {}, never, never, true, never>;
98
+ }
99
+ export declare class ModalFooterDirective {
100
+ constructor();
101
+ static ɵfac: i0.ɵɵFactoryDeclaration<ModalFooterDirective, never>;
102
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ModalFooterDirective, "[mclSidebarModalFooter]", never, {}, {}, never, never, true, never>;
103
+ }
104
+ export declare class ModalHeaderDirective {
105
+ constructor();
106
+ static ɵfac: i0.ɵɵFactoryDeclaration<ModalHeaderDirective, never>;
107
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ModalHeaderDirective, "[mclSidebarModalHeader]", never, {}, {}, never, never, true, never>;
108
+ }
109
+ export declare class ModalBodyDirective {
110
+ private config;
111
+ constructor(config: SidebarModalOptions);
112
+ get size(): "small" | "medium" | "large" | "auto" | undefined;
113
+ static ɵfac: i0.ɵɵFactoryDeclaration<ModalBodyDirective, never>;
114
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ModalBodyDirective, "[mclSidebarModalBody]", never, {}, {}, never, never, true, never>;
115
+ }
116
+ export declare class ModalTemplateComponent {
117
+ modalRef: SidebarModalRef<any>;
118
+ private config;
119
+ constructor(modalRef: SidebarModalRef<any>, config: SidebarModalOptions);
120
+ get fixed(): boolean;
121
+ get size(): "small" | "medium" | "large" | "auto" | undefined;
122
+ close(): void;
123
+ static ɵfac: i0.ɵɵFactoryDeclaration<ModalTemplateComponent, never>;
124
+ static ɵcmp: i0.ɵɵComponentDeclaration<ModalTemplateComponent, "mcl-sidebar-modal-template", never, {}, {}, never, ["br-modal-content"], true, never>;
125
+ }
@@ -0,0 +1,70 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ import * as i0 from "@angular/core";
5
+ import { AfterViewInit, ElementRef, EventEmitter, OnDestroy, OnInit, QueryList } from "@angular/core";
6
+ import { ControlContainer, FormControl, NgForm, NgModel } from "@angular/forms";
7
+ import { Observable } from "rxjs";
8
+ import { MatFormField } from "@angular/material/input";
9
+ export declare class FormComponent implements OnInit, OnDestroy, AfterViewInit {
10
+ submitted: EventEmitter<NgForm>;
11
+ throttleMillis: number;
12
+ private eventSubject;
13
+ private subscription?;
14
+ models: QueryList<NgModel>;
15
+ form: NgForm;
16
+ private currentModels;
17
+ constructor();
18
+ ngOnInit(): void;
19
+ ngOnDestroy(): void;
20
+ ngAfterViewInit(): void;
21
+ private atualizaModels;
22
+ touched(): void;
23
+ untouched(): void;
24
+ reset(): Observable<any>;
25
+ submit(form: NgForm): void;
26
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormComponent, never>;
27
+ static ɵcmp: i0.ɵɵComponentDeclaration<FormComponent, "mcl-form", never, {
28
+ "throttleMillis": {
29
+ "alias": "throttleMillis";
30
+ "required": false;
31
+ };
32
+ }, {
33
+ "submitted": "submitted";
34
+ }, ["models"], ["*"], true, never>;
35
+ }
36
+ export declare class SingleClickDirective implements OnInit, OnDestroy {
37
+ private elementRef;
38
+ private subscription?;
39
+ throttleMillis: number;
40
+ singleClick: EventEmitter<any>;
41
+ constructor(elementRef: ElementRef);
42
+ ngOnInit(): void;
43
+ ngOnDestroy(): void;
44
+ static ɵfac: i0.ɵɵFactoryDeclaration<SingleClickDirective, never>;
45
+ static ɵdir: i0.ɵɵDirectiveDeclaration<SingleClickDirective, "[mclSingleClick],[singleClick]", never, {
46
+ "throttleMillis": {
47
+ "alias": "throttleMillis";
48
+ "required": false;
49
+ };
50
+ }, {
51
+ "singleClick": "singleClick";
52
+ }, never, never, true, never>;
53
+ }
54
+ export declare class MensagensErroComponent implements OnInit {
55
+ for?: string | FormControl;
56
+ matFormField: MatFormField | null;
57
+ mcForm: FormComponent | null;
58
+ container: ControlContainer | null;
59
+ get group(): import("@angular/forms").NgForm | import("@angular/forms").AbstractControl<any, any, any> | undefined;
60
+ ngOnInit(): void;
61
+ get control(): import("@angular/forms").AbstractControl<any, any, any> | null | undefined;
62
+ get errors(): string[] | undefined;
63
+ static ɵfac: i0.ɵɵFactoryDeclaration<MensagensErroComponent, never>;
64
+ static ɵcmp: i0.ɵɵComponentDeclaration<MensagensErroComponent, "[mclErrorFor],[mclError]", never, {
65
+ "for": {
66
+ "alias": "mclErrorFor";
67
+ "required": false;
68
+ };
69
+ }, {}, never, never, true, never>;
70
+ }