@main-class/componentes 3.11.2 → 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,627 +1,1334 @@
1
- import * as i0 from '@angular/core';
2
- import { Directive, ContentChild, Input, inject, EnvironmentInjector, runInInjectionContext, createEnvironmentInjector, TemplateRef, ElementRef, ContentChildren, ViewChild, Component, EventEmitter, Output, ChangeDetectionStrategy, InjectionToken, Inject, Optional, Self } from '@angular/core';
3
- import { MatColumnDef, MatCellDef, MatHeaderCellDef, MatFooterCellDef, MatTable, MatHeaderRow, MatRow, MatFooterRow, MatHeaderRowDef, MatRowDef, MatFooterRowDef } from '@angular/material/table';
4
- import { BehaviorSubject } from 'rxjs';
5
- import { TranslatePipe, TranslateService } from '@ngx-translate/core';
6
- import { MatIcon } from '@angular/material/icon';
7
- import * as i1 from '@main-class/componentes/core';
8
- import { MatPaginatorIntl } from '@angular/material/paginator';
9
- import { LoaderComponent } from '@main-class/componentes/loader';
10
- import { MatSelect } from '@angular/material/select';
11
- import { MatOption } from '@angular/material/autocomplete';
12
-
13
- class ColumnCellDirective {
14
- template;
15
- constructor(template) {
16
- this.template = template;
17
- }
18
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: ColumnCellDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
19
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.9", type: ColumnCellDirective, isStandalone: true, selector: "[mclColumnCell]", ngImport: i0 });
20
- }
21
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: ColumnCellDirective, decorators: [{
22
- type: Directive,
23
- args: [{
24
- selector: '[mclColumnCell]'
25
- }]
26
- }], ctorParameters: () => [{ type: i0.TemplateRef }] });
27
-
28
- class ColumnFooterDirective {
29
- template;
30
- constructor(template) {
31
- this.template = template;
32
- }
33
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: ColumnFooterDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
34
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.9", type: ColumnFooterDirective, isStandalone: true, selector: "[mclColumnFooter]", ngImport: i0 });
35
- }
36
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: ColumnFooterDirective, decorators: [{
37
- type: Directive,
38
- args: [{
39
- selector: '[mclColumnFooter]'
40
- }]
41
- }], ctorParameters: () => [{ type: i0.TemplateRef }] });
42
-
43
- class ColumnHeaderDirective {
44
- template;
45
- constructor(template) {
46
- this.template = template;
47
- }
48
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: ColumnHeaderDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
49
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.9", type: ColumnHeaderDirective, isStandalone: true, selector: "[mclColumnHeader]", ngImport: i0 });
50
- }
51
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: ColumnHeaderDirective, decorators: [{
52
- type: Directive,
53
- args: [{
54
- selector: '[mclColumnHeader]'
55
- }]
56
- }], ctorParameters: () => [{ type: i0.TemplateRef }] });
57
-
58
- class ColumnDirective {
59
- static lastId = 0;
60
- name = 'column_' + (++ColumnDirective.lastId);
61
- viewType = 'both';
62
- header;
63
- cell;
64
- footer;
65
- constructor() {
66
- }
67
- get columnDefName() {
68
- return this.viewType + '-' + this.name;
69
- }
70
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: ColumnDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
71
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.9", type: ColumnDirective, isStandalone: true, selector: "mcl-column,[mclColumn]", inputs: { name: "name", viewType: "viewType" }, queries: [{ propertyName: "header", first: true, predicate: ColumnHeaderDirective, descendants: true }, { propertyName: "cell", first: true, predicate: ColumnCellDirective, descendants: true }, { propertyName: "footer", first: true, predicate: ColumnFooterDirective, descendants: true }], ngImport: i0 });
72
- }
73
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: ColumnDirective, decorators: [{
74
- type: Directive,
75
- args: [{
76
- selector: 'mcl-column,[mclColumn]'
77
- }]
78
- }], ctorParameters: () => [], propDecorators: { name: [{
79
- type: Input
80
- }], viewType: [{
81
- type: Input
82
- }], header: [{
83
- type: ContentChild,
84
- args: [ColumnHeaderDirective]
85
- }], cell: [{
86
- type: ContentChild,
87
- args: [ColumnCellDirective]
88
- }], footer: [{
89
- type: ContentChild,
90
- args: [ColumnFooterDirective]
91
- }] } });
92
-
93
- class TableComponent {
94
- mobileService;
95
- injector = inject(EnvironmentInjector);
96
- itemsSubject = new BehaviorSubject([]);
97
- emptyStateMessage = 'mcl.table.nenhum_registro_encontrado';
98
- table;
99
- emptyStatePlaceholder;
100
- columnsDef;
101
- items;
102
- $outerItems;
103
- sticky = false;
104
- currentColumns = [];
105
- $activeColumnNames = [];
106
- $loading;
107
- oldLength = 0;
108
- columnsChangeSubscription;
109
- mobileListener = (mobile) => this.mergeColumnsDef(mobile);
110
- constructor(mobileService) {
111
- this.mobileService = mobileService;
112
- this.mobileService.addListener(this.mobileListener);
113
- }
114
- get outerItems() {
115
- return this.$outerItems;
116
- }
117
- set outerItems(items) {
118
- this.$outerItems = items;
119
- }
120
- get activeColumnNames() {
121
- return this.$activeColumnNames;
122
- }
123
- get hasFooter() {
124
- return !!this.currentColumns.find(col => !!col.footerCell);
125
- }
126
- mergeColumnsDef(mobile = this.mobileService.mobile) {
127
- clearTimeout(this.$loading);
128
- this.$loading = setTimeout(() => {
129
- const ngContentModels = this.columnsDef
130
- .toArray().filter(model => (mobile && model.viewType !== 'web') ||
131
- (!mobile && model.viewType !== 'mobile'));
132
- for (const column of this.currentColumns) {
133
- this.removeColumnDef(column);
134
- }
135
- this.currentColumns.splice(0, this.currentColumns.length);
136
- ngContentModels.forEach((model, i) => {
137
- const columnDef = this.mapColumnDef(model);
138
- this.currentColumns.splice(i, 0, columnDef);
139
- this.addColumnDef(columnDef);
140
- });
141
- this.items = this.getItems() || [];
142
- this.itemsSubject.next(this.items || []);
143
- this.$activeColumnNames = this.currentColumns.map(col => col.name);
144
- }, 80);
145
- }
146
- ngAfterViewInit() {
147
- this.columnsChangeSubscription = this.columnsDef.changes.subscribe((_) => {
148
- this.mergeColumnsDef();
149
- });
150
- this.mergeColumnsDef();
151
- }
152
- ngDoCheck() {
153
- const currentLength = this.getCurrentLength();
154
- if (this.oldLength !== currentLength) {
155
- this.oldLength = currentLength;
156
- this.items = this.getItems() || [];
157
- this.itemsSubject.next(this.items);
158
- }
159
- else if (this.items !== this.getItems()) {
160
- this.items = this.getItems() || [];
161
- this.itemsSubject.next(this.items);
162
- }
163
- }
164
- getItems() {
165
- return this.outerItems;
166
- }
167
- getCurrentLength() {
168
- return (this.outerItems ? this.outerItems.length : 0);
169
- }
170
- ngOnDestroy() {
171
- this.mobileService.removeListener(this.mobileListener);
172
- this.columnsChangeSubscription?.unsubscribe();
173
- this.itemsSubject.complete();
174
- }
175
- removeColumnDef(columnDef) {
176
- this.table.removeColumnDef(columnDef);
177
- }
178
- addColumnDef(columnDef) {
179
- this.table.addColumnDef(columnDef);
180
- }
181
- mapColumnDef(column) {
182
- const cdef = runInInjectionContext(this.injector, () => new MatColumnDef());
183
- cdef.name = column.viewType + '-' + column.name;
184
- cdef.cell = runInInjectionContext(createEnvironmentInjector([{ provide: TemplateRef, useValue: column.cell.template }], this.injector), () => new MatCellDef());
185
- cdef.headerCell = runInInjectionContext(createEnvironmentInjector([{ provide: TemplateRef, useValue: column.header.template }], this.injector), () => new MatHeaderCellDef(column.header.template));
186
- if (column.footer) {
187
- cdef.footerCell = runInInjectionContext(createEnvironmentInjector([{ provide: TemplateRef, useValue: column.footer.template }], this.injector), () => new MatFooterCellDef(column.footer.template));
188
- }
189
- return cdef;
190
- }
191
- currentColumnsContains(model) {
192
- return !!this.currentColumns.find(def => def.name === model.columnDefName);
193
- }
194
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TableComponent, deps: [{ token: i1.MobileService }], target: i0.ɵɵFactoryTarget.Component });
195
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.9", type: TableComponent, isStandalone: true, selector: "mcl-table:not([page]):not([paginated])", inputs: { emptyStateMessage: "emptyStateMessage", sticky: "sticky", outerItems: ["items", "outerItems"] }, queries: [{ propertyName: "emptyStatePlaceholder", first: true, predicate: ["[mclEmptyState]"], descendants: true, read: ElementRef }, { propertyName: "columnsDef", predicate: ColumnDirective }], viewQueries: [{ propertyName: "table", first: true, predicate: MatTable, descendants: true }], ngImport: i0, template: "<div class=\"table\" #div>\n <div class=\"table__container\">\n <table mat-table [dataSource]=\"itemsSubject\">\n <tr mat-header-row *matHeaderRowDef=\"activeColumnNames; sticky: sticky\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: activeColumnNames;\"></tr>\n\n @if (hasFooter) {\n <tr mat-footer-row *matFooterRowDef=\"activeColumnNames;\"></tr>\n }\n </table>\n\n @if (!items?.length) {\n <div class=\"table__empty\">\n @if (emptyStatePlaceholder) {\n <ng-content select=\"[mclEmptyState]\"></ng-content>\n } @else {\n <mat-icon class=\"table__empty-icon\">inbox</mat-icon>\n <div>{{ emptyStateMessage | translate }}</div>\n }\n </div>\n }\n </div>\n</div>\n\n", styles: ["@charset \"UTF-8\";:host{--tbl-bg: var(--lib-color-surface, var(--mat-sys-surface));--tbl-fg: var(--lib-color-on-surface, var(--mat-sys-on-surface));--tbl-muted: var(--lib-color-on-surface-variant, var(--mat-sys-on-surface-variant));--tbl-border: var(--lib-color-outline-variant, var(--mat-sys-outline-variant));--tbl-primary: var(--lib-color-primary, var(--mat-sys-primary));--tbl-header-bg: var(--lib-color-surface-container-low, var(--mat-sys-surface-container-low));--tbl-radius: var(--mcl-radius-md, 12px);display:block}.table{background:var(--tbl-bg);color:var(--tbl-fg);border:1px solid var(--tbl-border);border-radius:var(--tbl-radius);box-shadow:var(--mcl-shadow-1, 0 1px 3px rgba(0, 0, 0, .05));overflow:hidden}.table__container{overflow:auto}.mat-mdc-table{width:100%;border-collapse:separate;border-spacing:0;background:transparent;font-size:.9rem}.mat-mdc-table thead tr,.mat-mdc-header-row{background:var(--tbl-header-bg);height:auto}.mat-mdc-row{height:auto;transition:background-color var(--mcl-transition, .18s ease)}.mat-mdc-row:hover{background:color-mix(in oklab,var(--tbl-fg) 4%,var(--tbl-bg))}.mat-mdc-row:focus-within{outline:2px solid var(--tbl-primary);outline-offset:-2px}.table__empty{display:grid;justify-items:center;gap:8px;padding:48px 24px;text-align:center;color:var(--tbl-muted);font-size:.9rem}.table__empty-icon{font-size:36px;width:44px;height:44px;display:grid;place-items:center;border-radius:var(--mcl-radius-full, 999px);background:var(--tbl-header-bg);color:var(--tbl-muted)}:host(.is-sticky-header) .mat-mdc-header-row{position:sticky;top:0;z-index:2;box-shadow:0 1px 0 0 var(--tbl-border)}.c-col--right{text-align:right}.c-col--strong{font-weight:600;color:var(--tbl-fg)}.c-col--muted{color:var(--tbl-muted)}\n"], dependencies: [{ kind: "component", type: MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "component", type: MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "component", type: MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "directive", type: MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
196
- }
197
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TableComponent, decorators: [{
198
- type: Component,
199
- args: [{ selector: 'mcl-table:not([page]):not([paginated])', imports: [
200
- MatTable,
201
- MatHeaderRow,
202
- MatRow,
203
- MatFooterRow,
204
- MatHeaderRowDef,
205
- MatRowDef,
206
- MatFooterRowDef,
207
- TranslatePipe,
208
- MatIcon
209
- ], template: "<div class=\"table\" #div>\n <div class=\"table__container\">\n <table mat-table [dataSource]=\"itemsSubject\">\n <tr mat-header-row *matHeaderRowDef=\"activeColumnNames; sticky: sticky\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: activeColumnNames;\"></tr>\n\n @if (hasFooter) {\n <tr mat-footer-row *matFooterRowDef=\"activeColumnNames;\"></tr>\n }\n </table>\n\n @if (!items?.length) {\n <div class=\"table__empty\">\n @if (emptyStatePlaceholder) {\n <ng-content select=\"[mclEmptyState]\"></ng-content>\n } @else {\n <mat-icon class=\"table__empty-icon\">inbox</mat-icon>\n <div>{{ emptyStateMessage | translate }}</div>\n }\n </div>\n }\n </div>\n</div>\n\n", styles: ["@charset \"UTF-8\";:host{--tbl-bg: var(--lib-color-surface, var(--mat-sys-surface));--tbl-fg: var(--lib-color-on-surface, var(--mat-sys-on-surface));--tbl-muted: var(--lib-color-on-surface-variant, var(--mat-sys-on-surface-variant));--tbl-border: var(--lib-color-outline-variant, var(--mat-sys-outline-variant));--tbl-primary: var(--lib-color-primary, var(--mat-sys-primary));--tbl-header-bg: var(--lib-color-surface-container-low, var(--mat-sys-surface-container-low));--tbl-radius: var(--mcl-radius-md, 12px);display:block}.table{background:var(--tbl-bg);color:var(--tbl-fg);border:1px solid var(--tbl-border);border-radius:var(--tbl-radius);box-shadow:var(--mcl-shadow-1, 0 1px 3px rgba(0, 0, 0, .05));overflow:hidden}.table__container{overflow:auto}.mat-mdc-table{width:100%;border-collapse:separate;border-spacing:0;background:transparent;font-size:.9rem}.mat-mdc-table thead tr,.mat-mdc-header-row{background:var(--tbl-header-bg);height:auto}.mat-mdc-row{height:auto;transition:background-color var(--mcl-transition, .18s ease)}.mat-mdc-row:hover{background:color-mix(in oklab,var(--tbl-fg) 4%,var(--tbl-bg))}.mat-mdc-row:focus-within{outline:2px solid var(--tbl-primary);outline-offset:-2px}.table__empty{display:grid;justify-items:center;gap:8px;padding:48px 24px;text-align:center;color:var(--tbl-muted);font-size:.9rem}.table__empty-icon{font-size:36px;width:44px;height:44px;display:grid;place-items:center;border-radius:var(--mcl-radius-full, 999px);background:var(--tbl-header-bg);color:var(--tbl-muted)}:host(.is-sticky-header) .mat-mdc-header-row{position:sticky;top:0;z-index:2;box-shadow:0 1px 0 0 var(--tbl-border)}.c-col--right{text-align:right}.c-col--strong{font-weight:600;color:var(--tbl-fg)}.c-col--muted{color:var(--tbl-muted)}\n"] }]
210
- }], ctorParameters: () => [{ type: i1.MobileService }], propDecorators: { emptyStateMessage: [{
211
- type: Input
212
- }], table: [{
213
- type: ViewChild,
214
- args: [MatTable]
215
- }], emptyStatePlaceholder: [{
216
- type: ContentChild,
217
- args: ['[mclEmptyState]', { read: ElementRef }]
218
- }], columnsDef: [{
219
- type: ContentChildren,
220
- args: [ColumnDirective]
221
- }], sticky: [{
222
- type: Input
223
- }], outerItems: [{
224
- type: Input,
225
- args: ['items']
226
- }] } });
227
-
228
- class NumericPaginatorComponent {
229
- // === Inputs compatíveis com MatPaginator ===
230
- length = 0; // total de itens
231
- pageIndex = 0; // 0-based
232
- pageSize = 10;
233
- pageSizeOptions = [5, 10, 25, 50]; // mantido p/ compat, não exibido
234
- hidePageSize = true; // forçado no layout (não exibimos select)
235
- showFirstLastButtons = false; // o layout de referência não usa first/last
236
- disabled = false;
237
- // === Output idêntico ao MatPaginator ===
238
- page = new EventEmitter();
239
- // ---- Helpers de exibição ----
240
- totalPages() {
241
- if (this.pageSize <= 0)
242
- return 1;
243
- return Math.max(1, Math.ceil(this.length / this.pageSize));
244
- }
245
- hasPrevious() { return this.pageIndex > 0; }
246
- hasNext() { return this.pageIndex + 1 < this.totalPages(); }
247
- pages() {
248
- const total = this.totalPages();
249
- const current = this.pageIndex + 1; // Converte para 1-based
250
- const maxVisible = 5;
251
- // Se o total de páginas for menor ou igual ao máximo visível, mostra todas
252
- if (total <= maxVisible) {
253
- return Array.from({ length: total }, (_, i) => i + 1);
254
- }
255
- // Calcula o início e fim da janela de páginas
256
- let start = Math.max(1, current - Math.floor(maxVisible / 2));
257
- let end = Math.min(total, start + maxVisible - 1);
258
- // Ajusta o início se estivermos muito próximos do final
259
- if (end - start + 1 < maxVisible) {
260
- start = Math.max(1, end - maxVisible + 1);
261
- }
262
- // Gera o array das páginas visíveis
263
- return Array.from({ length: end - start + 1 }, (_, i) => start + i);
264
- }
265
- rangeLabel() {
266
- if (this.length === 0 || this.pageSize === 0)
267
- return `Exibindo 0–0 de ${this.length}`;
268
- const start = this.pageIndex * this.pageSize + 1;
269
- const end = Math.min((this.pageIndex + 1) * this.pageSize, this.length);
270
- return `Exibindo ${start}–${end} de ${this.length}`;
271
- }
272
- // ---- Emissão compatível com MatPaginator ----
273
- emit(nextIndex) {
274
- const bounded = Math.max(0, Math.min(this.totalPages() - 1, nextIndex));
275
- const event = {
276
- pageIndex: bounded,
277
- pageSize: this.pageSize,
278
- length: this.length,
279
- previousPageIndex: this.pageIndex,
280
- };
281
- this.pageIndex = bounded;
282
- this.page.emit(event);
283
- }
284
- // ---- Ações ----
285
- goTo(page1Based) { if (!this.disabled)
286
- this.emit(page1Based - 1); }
287
- previousPage() { if (!this.disabled && this.hasPrevious())
288
- this.emit(this.pageIndex - 1); }
289
- nextPage() { if (!this.disabled && this.hasNext())
290
- this.emit(this.pageIndex + 1); }
291
- // Mantidos por compatibilidade, mas ocultos no layout por padrão
292
- firstPage() { if (!this.disabled && this.showFirstLastButtons && this.hasPrevious())
293
- this.emit(0); }
294
- lastPage() { if (!this.disabled && this.showFirstLastButtons && this.hasNext())
295
- this.emit(this.totalPages() - 1); }
296
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: NumericPaginatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
297
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.9", type: NumericPaginatorComponent, isStandalone: true, selector: "mcl-numeric-paginator", inputs: { length: "length", pageIndex: "pageIndex", pageSize: "pageSize", pageSizeOptions: "pageSizeOptions", hidePageSize: "hidePageSize", showFirstLastButtons: "showFirstLastButtons", disabled: "disabled" }, outputs: { page: "page" }, ngImport: i0, template: "<nav class=\"pgr\" aria-label=\"Pagina\u00E7\u00E3o\" [attr.aria-disabled]=\"disabled || null\">\n <!-- Esquerda: faixa \"Exibindo X\u2013Y de Z\" -->\n <div class=\"pgr__range\" aria-live=\"polite\">{{ rangeLabel() }}</div>\n\n <!-- Direita: anterior / n\u00FAmeros / pr\u00F3ximo -->\n <ul class=\"pgr__list\" role=\"list\">\n <li class=\"pgr__item\">\n <button class=\"pgr__link pgr__link--nav\"\n type=\"button\"\n [disabled]=\"disabled || !hasPrevious()\"\n (click)=\"previousPage()\"\n aria-label=\"P\u00E1gina anterior\">\n <mat-icon>chevron_left</mat-icon>\n </button>\n </li>\n\n @for (p of pages(); track p) {\n <li class=\"pgr__item\">\n <button class=\"pgr__link\"\n type=\"button\"\n [class.is-active]=\"p === pageIndex + 1\"\n [attr.aria-current]=\"p === pageIndex + 1 ? 'page' : null\"\n (click)=\"goTo(p)\">\n {{ p }}\n </button>\n </li>\n }\n\n <li class=\"pgr__item\">\n <button class=\"pgr__link pgr__link--nav\"\n type=\"button\"\n [disabled]=\"disabled || !hasNext()\"\n (click)=\"nextPage()\"\n aria-label=\"Pr\u00F3xima p\u00E1gina\">\n <mat-icon>chevron_right</mat-icon>\n </button>\n </li>\n\n <!-- opcional: first/last (ocultos por padr\u00E3o) -->\n @if (showFirstLastButtons) {\n <li class=\"pgr__item\">\n <button class=\"pgr__link pgr__link--nav\"\n type=\"button\"\n [disabled]=\"disabled || !hasPrevious()\"\n (click)=\"firstPage()\" aria-label=\"Primeira p\u00E1gina\">\n <mat-icon>first_page</mat-icon>\n </button>\n </li>\n }\n @if (showFirstLastButtons) {\n <li class=\"pgr__item\">\n <button class=\"pgr__link pgr__link--nav\"\n type=\"button\"\n [disabled]=\"disabled || !hasNext()\"\n (click)=\"lastPage()\" aria-label=\"\u00DAltima p\u00E1gina\">\n <mat-icon>last_page</mat-icon>\n </button>\n </li>\n }\n </ul>\n</nav>\n", styles: ["@charset \"UTF-8\";:host{--pgr-bg: var(--lib-color-surface, var(--mat-sys-surface));--pgr-fg: var(--lib-color-on-surface, var(--mat-sys-on-surface));--pgr-muted: var(--lib-color-on-surface-variant, var(--mat-sys-on-surface-variant));--pgr-border: var(--lib-color-outline-variant, var(--mat-sys-outline-variant));--pgr-primary: var(--lib-color-primary, var(--mat-sys-primary));--pgr-on-primary: var(--lib-color-on-primary, var(--mat-sys-on-primary));--pgr-radius: var(--mcl-radius-sm, 8px);display:block}.pgr{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 16px;color:var(--pgr-fg);background:var(--pgr-bg);border-top:1px solid var(--pgr-border)}.pgr__range{font-size:.8125rem;color:var(--pgr-muted)}.pgr__list{display:inline-flex;align-items:center;gap:4px;list-style:none;margin:0;padding:0}.pgr__item{display:inline-flex}.pgr__link{min-width:34px;height:34px;padding:0 8px;border-radius:var(--pgr-radius);border:1px solid transparent;background:transparent;color:var(--pgr-muted);display:inline-flex;align-items:center;justify-content:center;text-decoration:none;font-size:.875rem;transition:background-color var(--mcl-transition, .18s ease),color var(--mcl-transition, .18s ease)}.pgr__link:hover{background:color-mix(in oklab,var(--pgr-fg) 6%,var(--pgr-bg));color:var(--pgr-fg)}.pgr__link:focus-visible{outline:2px solid var(--pgr-primary);outline-offset:2px}.pgr__link.is-active{background:var(--pgr-primary);color:var(--pgr-on-primary);font-weight:600}.pgr__link:disabled{opacity:.4;cursor:not-allowed;background:transparent}.pgr mat-icon,.material-symbols-outlined{font-variation-settings:\"FILL\" 0,\"wght\" 400,\"GRAD\" 0,\"opsz\" 20;font-size:20px;width:20px;height:20px;line-height:1}@media (max-width: 639.98px){.pgr{flex-wrap:wrap;gap:8px}.pgr__range{order:2;width:100%}}\n"], dependencies: [{ kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
298
- }
299
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: NumericPaginatorComponent, decorators: [{
300
- type: Component,
301
- args: [{ selector: 'mcl-numeric-paginator', imports: [
302
- MatIcon
303
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<nav class=\"pgr\" aria-label=\"Pagina\u00E7\u00E3o\" [attr.aria-disabled]=\"disabled || null\">\n <!-- Esquerda: faixa \"Exibindo X\u2013Y de Z\" -->\n <div class=\"pgr__range\" aria-live=\"polite\">{{ rangeLabel() }}</div>\n\n <!-- Direita: anterior / n\u00FAmeros / pr\u00F3ximo -->\n <ul class=\"pgr__list\" role=\"list\">\n <li class=\"pgr__item\">\n <button class=\"pgr__link pgr__link--nav\"\n type=\"button\"\n [disabled]=\"disabled || !hasPrevious()\"\n (click)=\"previousPage()\"\n aria-label=\"P\u00E1gina anterior\">\n <mat-icon>chevron_left</mat-icon>\n </button>\n </li>\n\n @for (p of pages(); track p) {\n <li class=\"pgr__item\">\n <button class=\"pgr__link\"\n type=\"button\"\n [class.is-active]=\"p === pageIndex + 1\"\n [attr.aria-current]=\"p === pageIndex + 1 ? 'page' : null\"\n (click)=\"goTo(p)\">\n {{ p }}\n </button>\n </li>\n }\n\n <li class=\"pgr__item\">\n <button class=\"pgr__link pgr__link--nav\"\n type=\"button\"\n [disabled]=\"disabled || !hasNext()\"\n (click)=\"nextPage()\"\n aria-label=\"Pr\u00F3xima p\u00E1gina\">\n <mat-icon>chevron_right</mat-icon>\n </button>\n </li>\n\n <!-- opcional: first/last (ocultos por padr\u00E3o) -->\n @if (showFirstLastButtons) {\n <li class=\"pgr__item\">\n <button class=\"pgr__link pgr__link--nav\"\n type=\"button\"\n [disabled]=\"disabled || !hasPrevious()\"\n (click)=\"firstPage()\" aria-label=\"Primeira p\u00E1gina\">\n <mat-icon>first_page</mat-icon>\n </button>\n </li>\n }\n @if (showFirstLastButtons) {\n <li class=\"pgr__item\">\n <button class=\"pgr__link pgr__link--nav\"\n type=\"button\"\n [disabled]=\"disabled || !hasNext()\"\n (click)=\"lastPage()\" aria-label=\"\u00DAltima p\u00E1gina\">\n <mat-icon>last_page</mat-icon>\n </button>\n </li>\n }\n </ul>\n</nav>\n", styles: ["@charset \"UTF-8\";:host{--pgr-bg: var(--lib-color-surface, var(--mat-sys-surface));--pgr-fg: var(--lib-color-on-surface, var(--mat-sys-on-surface));--pgr-muted: var(--lib-color-on-surface-variant, var(--mat-sys-on-surface-variant));--pgr-border: var(--lib-color-outline-variant, var(--mat-sys-outline-variant));--pgr-primary: var(--lib-color-primary, var(--mat-sys-primary));--pgr-on-primary: var(--lib-color-on-primary, var(--mat-sys-on-primary));--pgr-radius: var(--mcl-radius-sm, 8px);display:block}.pgr{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 16px;color:var(--pgr-fg);background:var(--pgr-bg);border-top:1px solid var(--pgr-border)}.pgr__range{font-size:.8125rem;color:var(--pgr-muted)}.pgr__list{display:inline-flex;align-items:center;gap:4px;list-style:none;margin:0;padding:0}.pgr__item{display:inline-flex}.pgr__link{min-width:34px;height:34px;padding:0 8px;border-radius:var(--pgr-radius);border:1px solid transparent;background:transparent;color:var(--pgr-muted);display:inline-flex;align-items:center;justify-content:center;text-decoration:none;font-size:.875rem;transition:background-color var(--mcl-transition, .18s ease),color var(--mcl-transition, .18s ease)}.pgr__link:hover{background:color-mix(in oklab,var(--pgr-fg) 6%,var(--pgr-bg));color:var(--pgr-fg)}.pgr__link:focus-visible{outline:2px solid var(--pgr-primary);outline-offset:2px}.pgr__link.is-active{background:var(--pgr-primary);color:var(--pgr-on-primary);font-weight:600}.pgr__link:disabled{opacity:.4;cursor:not-allowed;background:transparent}.pgr mat-icon,.material-symbols-outlined{font-variation-settings:\"FILL\" 0,\"wght\" 400,\"GRAD\" 0,\"opsz\" 20;font-size:20px;width:20px;height:20px;line-height:1}@media (max-width: 639.98px){.pgr{flex-wrap:wrap;gap:8px}.pgr__range{order:2;width:100%}}\n"] }]
304
- }], propDecorators: { length: [{
305
- type: Input
306
- }], pageIndex: [{
307
- type: Input
308
- }], pageSize: [{
309
- type: Input
310
- }], pageSizeOptions: [{
311
- type: Input
312
- }], hidePageSize: [{
313
- type: Input
314
- }], showFirstLastButtons: [{
315
- type: Input
316
- }], disabled: [{
317
- type: Input
318
- }], page: [{
319
- type: Output
320
- }] } });
321
-
322
- class PaginatorI18n {
323
- translate;
324
- constructor(translate) {
325
- this.translate = translate;
326
- }
327
- getPaginatorIntl() {
328
- const paginatorIntl = new MatPaginatorIntl();
329
- paginatorIntl.itemsPerPageLabel = this.translate.instant('mcl.table.items_per_page');
330
- paginatorIntl.nextPageLabel = this.translate.instant('mcl.table.next_page');
331
- paginatorIntl.previousPageLabel = this.translate.instant('mcl.table.previous_page');
332
- paginatorIntl.firstPageLabel = this.translate.instant('mcl.table.first_page');
333
- paginatorIntl.lastPageLabel = this.translate.instant('mcl.table.last_page');
334
- paginatorIntl.getRangeLabel = this.getRangeLabel.bind(this);
335
- return paginatorIntl;
336
- }
337
- getRangeLabel(page, pageSize, length) {
338
- length = Math.max(length, 0);
339
- const startIndex = page * pageSize;
340
- const endIndex = startIndex < length ? Math.min(startIndex + pageSize, length) : startIndex + pageSize;
341
- return this.translate.instant('mcl.table.range', { startIndex: startIndex + 1, endIndex, length });
342
- }
343
- }
344
-
345
- class UndefinedPaginatorComponent {
346
- /** Tamanho do “lote” por navegação */
347
- pageSize = 10;
348
- /** Há páginas (ou lotes) anteriores? Controla ‘first/previous’. */
349
- hasPrevious = false;
350
- /** Há páginas (ou lotes) seguintes? Controla ‘next/last’. */
351
- hasNext = false;
352
- /** Emite ações com o tamanho atual */
353
- page = new EventEmitter();
354
- /** Opções comuns de tamanho de página (ajuste se quiser) */
355
- pageSizeOptions = [5, 10, 25, 50];
356
- // Ações
357
- first() {
358
- if (this.hasPrevious)
359
- this.page.emit({ size: this.pageSize, action: 'first' });
360
- }
361
- previous() {
362
- if (this.hasPrevious)
363
- this.page.emit({ size: this.pageSize, action: 'previous' });
364
- }
365
- next() {
366
- if (this.hasNext)
367
- this.page.emit({ size: this.pageSize, action: 'next' });
368
- }
369
- last() {
370
- if (this.hasNext)
371
- this.page.emit({ size: this.pageSize, action: 'last' });
372
- }
373
- onSizeChange(size) {
374
- this.pageSize = Number(size);
375
- // Não navegamos automaticamente; o host decide (pode chamar next/previous em seguida)
376
- }
377
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: UndefinedPaginatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
378
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.9", type: UndefinedPaginatorComponent, isStandalone: true, selector: "mcl-undefined-paginator", inputs: { pageSize: "pageSize", hasPrevious: "hasPrevious", hasNext: "hasNext" }, outputs: { page: "page" }, ngImport: i0, template: "<!-- Mesma estrutura/classe do paginator anterior, com modificador .pgr--undefined -->\n<nav class=\"pgr pgr--undefined\" aria-label=\"Pagina\u00E7\u00E3o (total desconhecido)\">\n <!-- Esquerda: texto de faixa (opcional). Mantemos para consist\u00EAncia de layout -->\n <div class=\"pgr__range\" aria-live=\"polite\">Navega\u00E7\u00E3o cont\u00EDnua</div>\n\n <!-- Direita: tamanho + bot\u00F5es -->\n <div class=\"pgr__controls\">\n <!-- Itens por p\u00E1gina -->\n <div class=\"pgr__size\">\n <span class=\"pgr__size-label\">Itens por p\u00E1gina</span>\n <mat-select\n class=\"pgr__size-select\"\n [value]=\"pageSize\"\n (valueChange)=\"onSizeChange($event)\"\n aria-label=\"Itens por p\u00E1gina\">\n @for (size of pageSizeOptions; track size) {\n <mat-option [value]=\"size\">\n {{ size }}\n </mat-option>\n }\n </mat-select>\n </div>\n\n <!-- Bot\u00F5es iguais ao template anterior -->\n <div class=\"pgr__buttons\" role=\"group\" aria-label=\"Controles de p\u00E1gina\">\n <button class=\"pgr__btn\"\n type=\"button\"\n [disabled]=\"!hasPrevious\"\n (click)=\"first()\"\n aria-label=\"Primeira p\u00E1gina\"\n title=\"Primeira p\u00E1gina\">\n <mat-icon>first_page</mat-icon>\n </button>\n\n <button class=\"pgr__btn\"\n type=\"button\"\n [disabled]=\"!hasPrevious\"\n (click)=\"previous()\"\n aria-label=\"P\u00E1gina anterior\"\n title=\"P\u00E1gina anterior\">\n <mat-icon>chevron_left</mat-icon>\n </button>\n\n <!-- Centro: marcador visual no lugar de \"1 / N\" -->\n <span class=\"pgr__index pgr__index--undefined\" aria-hidden=\"true\">\u2022 \u2022 \u2022</span>\n\n <button class=\"pgr__btn\"\n type=\"button\"\n [disabled]=\"!hasNext\"\n (click)=\"next()\"\n aria-label=\"Pr\u00F3xima p\u00E1gina\"\n title=\"Pr\u00F3xima p\u00E1gina\">\n <mat-icon>chevron_right</mat-icon>\n </button>\n\n <button class=\"pgr__btn\"\n type=\"button\"\n [disabled]=\"!hasNext\"\n (click)=\"last()\"\n aria-label=\"\u00DAltima p\u00E1gina\"\n title=\"\u00DAltima p\u00E1gina\">\n <mat-icon>last_page</mat-icon>\n </button>\n </div>\n </div>\n</nav>\n", styles: ["@charset \"UTF-8\";:host{--pgr-bg: var(--lib-color-surface, var(--mat-sys-surface));--pgr-fg: var(--lib-color-on-surface, var(--mat-sys-on-surface));--pgr-muted: var(--lib-color-on-surface-variant, var(--mat-sys-on-surface-variant));--pgr-border: var(--lib-color-outline-variant, var(--mat-sys-outline-variant));--pgr-primary: var(--lib-color-primary, var(--mat-sys-primary));--pgr-radius: var(--mcl-radius-sm, 8px);display:block}.pgr{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 16px;color:var(--pgr-fg);background:var(--pgr-bg);border-top:1px solid var(--pgr-border)}.pgr__range{font-size:.8125rem;color:var(--pgr-muted)}.pgr__controls{display:flex;align-items:center;gap:12px}.pgr__size{display:inline-flex;align-items:center;gap:8px}.pgr__size-label{font-size:.8125rem;color:var(--pgr-muted)}.pgr__size-select{min-width:80px;border-radius:var(--pgr-radius)}.pgr__buttons{display:inline-flex;align-items:center;gap:4px}.pgr__btn{inline-size:34px;block-size:34px;display:grid;place-items:center;border-radius:var(--pgr-radius);border:1px solid transparent;background:transparent;color:var(--pgr-muted);transition:background-color var(--mcl-transition, .18s ease),color var(--mcl-transition, .18s ease)}.pgr__btn:hover{background:color-mix(in oklab,var(--pgr-fg) 6%,var(--pgr-bg));color:var(--pgr-fg)}.pgr__btn:focus-visible{outline:2px solid var(--pgr-primary);outline-offset:2px}.pgr__btn:disabled{opacity:.4;cursor:not-allowed;background:transparent}.pgr__index{min-width:64px;text-align:center;font-size:.86rem;color:var(--pgr-fg)}.pgr__index--undefined{letter-spacing:4px;color:var(--pgr-muted)}.pgr mat-icon{font-size:20px;inline-size:20px;block-size:20px;line-height:1;vertical-align:middle}.pgr mat-icon[class*=material-symbols]{font-variation-settings:\"FILL\" 0,\"wght\" 400,\"GRAD\" 0,\"opsz\" 20}@media (max-width: 639.98px){.pgr{flex-wrap:wrap;gap:8px}.pgr__range{order:2;width:100%}.pgr__controls{order:1;width:100%;justify-content:space-between}}\n"], dependencies: [{ kind: "component", type: MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth", "canSelectNullableOptions"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
379
- }
380
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: UndefinedPaginatorComponent, decorators: [{
381
- type: Component,
382
- args: [{ selector: 'mcl-undefined-paginator', imports: [
383
- MatSelect,
384
- MatOption,
385
- MatIcon
386
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- Mesma estrutura/classe do paginator anterior, com modificador .pgr--undefined -->\n<nav class=\"pgr pgr--undefined\" aria-label=\"Pagina\u00E7\u00E3o (total desconhecido)\">\n <!-- Esquerda: texto de faixa (opcional). Mantemos para consist\u00EAncia de layout -->\n <div class=\"pgr__range\" aria-live=\"polite\">Navega\u00E7\u00E3o cont\u00EDnua</div>\n\n <!-- Direita: tamanho + bot\u00F5es -->\n <div class=\"pgr__controls\">\n <!-- Itens por p\u00E1gina -->\n <div class=\"pgr__size\">\n <span class=\"pgr__size-label\">Itens por p\u00E1gina</span>\n <mat-select\n class=\"pgr__size-select\"\n [value]=\"pageSize\"\n (valueChange)=\"onSizeChange($event)\"\n aria-label=\"Itens por p\u00E1gina\">\n @for (size of pageSizeOptions; track size) {\n <mat-option [value]=\"size\">\n {{ size }}\n </mat-option>\n }\n </mat-select>\n </div>\n\n <!-- Bot\u00F5es iguais ao template anterior -->\n <div class=\"pgr__buttons\" role=\"group\" aria-label=\"Controles de p\u00E1gina\">\n <button class=\"pgr__btn\"\n type=\"button\"\n [disabled]=\"!hasPrevious\"\n (click)=\"first()\"\n aria-label=\"Primeira p\u00E1gina\"\n title=\"Primeira p\u00E1gina\">\n <mat-icon>first_page</mat-icon>\n </button>\n\n <button class=\"pgr__btn\"\n type=\"button\"\n [disabled]=\"!hasPrevious\"\n (click)=\"previous()\"\n aria-label=\"P\u00E1gina anterior\"\n title=\"P\u00E1gina anterior\">\n <mat-icon>chevron_left</mat-icon>\n </button>\n\n <!-- Centro: marcador visual no lugar de \"1 / N\" -->\n <span class=\"pgr__index pgr__index--undefined\" aria-hidden=\"true\">\u2022 \u2022 \u2022</span>\n\n <button class=\"pgr__btn\"\n type=\"button\"\n [disabled]=\"!hasNext\"\n (click)=\"next()\"\n aria-label=\"Pr\u00F3xima p\u00E1gina\"\n title=\"Pr\u00F3xima p\u00E1gina\">\n <mat-icon>chevron_right</mat-icon>\n </button>\n\n <button class=\"pgr__btn\"\n type=\"button\"\n [disabled]=\"!hasNext\"\n (click)=\"last()\"\n aria-label=\"\u00DAltima p\u00E1gina\"\n title=\"\u00DAltima p\u00E1gina\">\n <mat-icon>last_page</mat-icon>\n </button>\n </div>\n </div>\n</nav>\n", styles: ["@charset \"UTF-8\";:host{--pgr-bg: var(--lib-color-surface, var(--mat-sys-surface));--pgr-fg: var(--lib-color-on-surface, var(--mat-sys-on-surface));--pgr-muted: var(--lib-color-on-surface-variant, var(--mat-sys-on-surface-variant));--pgr-border: var(--lib-color-outline-variant, var(--mat-sys-outline-variant));--pgr-primary: var(--lib-color-primary, var(--mat-sys-primary));--pgr-radius: var(--mcl-radius-sm, 8px);display:block}.pgr{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 16px;color:var(--pgr-fg);background:var(--pgr-bg);border-top:1px solid var(--pgr-border)}.pgr__range{font-size:.8125rem;color:var(--pgr-muted)}.pgr__controls{display:flex;align-items:center;gap:12px}.pgr__size{display:inline-flex;align-items:center;gap:8px}.pgr__size-label{font-size:.8125rem;color:var(--pgr-muted)}.pgr__size-select{min-width:80px;border-radius:var(--pgr-radius)}.pgr__buttons{display:inline-flex;align-items:center;gap:4px}.pgr__btn{inline-size:34px;block-size:34px;display:grid;place-items:center;border-radius:var(--pgr-radius);border:1px solid transparent;background:transparent;color:var(--pgr-muted);transition:background-color var(--mcl-transition, .18s ease),color var(--mcl-transition, .18s ease)}.pgr__btn:hover{background:color-mix(in oklab,var(--pgr-fg) 6%,var(--pgr-bg));color:var(--pgr-fg)}.pgr__btn:focus-visible{outline:2px solid var(--pgr-primary);outline-offset:2px}.pgr__btn:disabled{opacity:.4;cursor:not-allowed;background:transparent}.pgr__index{min-width:64px;text-align:center;font-size:.86rem;color:var(--pgr-fg)}.pgr__index--undefined{letter-spacing:4px;color:var(--pgr-muted)}.pgr mat-icon{font-size:20px;inline-size:20px;block-size:20px;line-height:1;vertical-align:middle}.pgr mat-icon[class*=material-symbols]{font-variation-settings:\"FILL\" 0,\"wght\" 400,\"GRAD\" 0,\"opsz\" 20}@media (max-width: 639.98px){.pgr{flex-wrap:wrap;gap:8px}.pgr__range{order:2;width:100%}.pgr__controls{order:1;width:100%;justify-content:space-between}}\n"] }]
387
- }], propDecorators: { pageSize: [{
388
- type: Input
389
- }], hasPrevious: [{
390
- type: Input
391
- }], hasNext: [{
392
- type: Input
393
- }], page: [{
394
- type: Output
395
- }] } });
396
-
397
- const PAGINATION_CONFIGURATION = new InjectionToken('mainclass.PAGINATION_CONFIGURATION');
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, ContentChild, ContentChildren, Directive, ElementRef, EnvironmentInjector, EventEmitter, Inject, InjectionToken, Input, Optional, Output, Self, TemplateRef, ViewChild, createEnvironmentInjector, inject, runInInjectionContext } from "@angular/core";
3
+ import { MatCellDef, MatColumnDef, MatFooterCellDef, MatFooterRow, MatFooterRowDef, MatHeaderCellDef, MatHeaderRow, MatHeaderRowDef, MatRow, MatRowDef, MatTable } from "@angular/material/table";
4
+ import { BehaviorSubject } from "rxjs";
5
+ import { MobileService } from "@main-class/componentes/core";
6
+ import { TranslatePipe, TranslateService } from "@ngx-translate/core";
7
+ import { MatIcon } from "@angular/material/icon";
8
+ import { MatPaginatorIntl } from "@angular/material/paginator";
9
+ import { LoaderComponent } from "@main-class/componentes/loader";
10
+ import { MatSelect } from "@angular/material/select";
11
+ import { MatOption } from "@angular/material/autocomplete";
12
+ var ColumnCellDirective = class ColumnCellDirective {
13
+ template;
14
+ constructor(template) {
15
+ this.template = template;
16
+ }
17
+ static ɵfac = i0.ɵɵngDeclareFactory({
18
+ minVersion: "12.0.0",
19
+ version: "22.3.2",
20
+ ngImport: i0,
21
+ type: ColumnCellDirective,
22
+ deps: [{ token: TemplateRef }],
23
+ target: i0.ɵɵFactoryTarget.Directive
24
+ });
25
+ static ɵdir = i0.ɵɵngDeclareDirective({
26
+ minVersion: "14.0.0",
27
+ version: "22.3.2",
28
+ type: ColumnCellDirective,
29
+ isStandalone: true,
30
+ selector: "[mclColumnCell]",
31
+ ngImport: i0
32
+ });
33
+ };
34
+ i0.ɵɵngDeclareClassMetadata({
35
+ minVersion: "12.0.0",
36
+ version: "22.3.2",
37
+ ngImport: i0,
38
+ type: ColumnCellDirective,
39
+ decorators: [{
40
+ type: Directive,
41
+ args: [{ selector: "[mclColumnCell]" }]
42
+ }],
43
+ ctorParameters: () => [{ type: TemplateRef }]
44
+ });
45
+ var ColumnFooterDirective = class ColumnFooterDirective {
46
+ template;
47
+ constructor(template) {
48
+ this.template = template;
49
+ }
50
+ static ɵfac = i0.ɵɵngDeclareFactory({
51
+ minVersion: "12.0.0",
52
+ version: "22.3.2",
53
+ ngImport: i0,
54
+ type: ColumnFooterDirective,
55
+ deps: [{ token: TemplateRef }],
56
+ target: i0.ɵɵFactoryTarget.Directive
57
+ });
58
+ static ɵdir = i0.ɵɵngDeclareDirective({
59
+ minVersion: "14.0.0",
60
+ version: "22.3.2",
61
+ type: ColumnFooterDirective,
62
+ isStandalone: true,
63
+ selector: "[mclColumnFooter]",
64
+ ngImport: i0
65
+ });
66
+ };
67
+ i0.ɵɵngDeclareClassMetadata({
68
+ minVersion: "12.0.0",
69
+ version: "22.3.2",
70
+ ngImport: i0,
71
+ type: ColumnFooterDirective,
72
+ decorators: [{
73
+ type: Directive,
74
+ args: [{ selector: "[mclColumnFooter]" }]
75
+ }],
76
+ ctorParameters: () => [{ type: TemplateRef }]
77
+ });
78
+ var ColumnHeaderDirective = class ColumnHeaderDirective {
79
+ template;
80
+ constructor(template) {
81
+ this.template = template;
82
+ }
83
+ static ɵfac = i0.ɵɵngDeclareFactory({
84
+ minVersion: "12.0.0",
85
+ version: "22.3.2",
86
+ ngImport: i0,
87
+ type: ColumnHeaderDirective,
88
+ deps: [{ token: TemplateRef }],
89
+ target: i0.ɵɵFactoryTarget.Directive
90
+ });
91
+ static ɵdir = i0.ɵɵngDeclareDirective({
92
+ minVersion: "14.0.0",
93
+ version: "22.3.2",
94
+ type: ColumnHeaderDirective,
95
+ isStandalone: true,
96
+ selector: "[mclColumnHeader]",
97
+ ngImport: i0
98
+ });
99
+ };
100
+ i0.ɵɵngDeclareClassMetadata({
101
+ minVersion: "12.0.0",
102
+ version: "22.3.2",
103
+ ngImport: i0,
104
+ type: ColumnHeaderDirective,
105
+ decorators: [{
106
+ type: Directive,
107
+ args: [{ selector: "[mclColumnHeader]" }]
108
+ }],
109
+ ctorParameters: () => [{ type: TemplateRef }]
110
+ });
111
+ var ColumnDirective = class ColumnDirective {
112
+ static lastId = 0;
113
+ name = "column_" + ++ColumnDirective.lastId;
114
+ viewType = "both";
115
+ header;
116
+ cell;
117
+ footer;
118
+ constructor() {}
119
+ get columnDefName() {
120
+ return this.viewType + "-" + this.name;
121
+ }
122
+ static ɵfac = i0.ɵɵngDeclareFactory({
123
+ minVersion: "12.0.0",
124
+ version: "22.3.2",
125
+ ngImport: i0,
126
+ type: ColumnDirective,
127
+ deps: [],
128
+ target: i0.ɵɵFactoryTarget.Directive
129
+ });
130
+ static ɵdir = i0.ɵɵngDeclareDirective({
131
+ minVersion: "14.0.0",
132
+ version: "22.3.2",
133
+ type: ColumnDirective,
134
+ isStandalone: true,
135
+ selector: "mcl-column,[mclColumn]",
136
+ inputs: {
137
+ name: "name",
138
+ viewType: "viewType"
139
+ },
140
+ queries: [
141
+ {
142
+ propertyName: "header",
143
+ first: true,
144
+ predicate: ColumnHeaderDirective,
145
+ descendants: true
146
+ },
147
+ {
148
+ propertyName: "cell",
149
+ first: true,
150
+ predicate: ColumnCellDirective,
151
+ descendants: true
152
+ },
153
+ {
154
+ propertyName: "footer",
155
+ first: true,
156
+ predicate: ColumnFooterDirective,
157
+ descendants: true
158
+ }
159
+ ],
160
+ ngImport: i0
161
+ });
162
+ };
163
+ i0.ɵɵngDeclareClassMetadata({
164
+ minVersion: "12.0.0",
165
+ version: "22.3.2",
166
+ ngImport: i0,
167
+ type: ColumnDirective,
168
+ decorators: [{
169
+ type: Directive,
170
+ args: [{ selector: "mcl-column,[mclColumn]" }]
171
+ }],
172
+ ctorParameters: () => [],
173
+ propDecorators: {
174
+ name: [{ type: Input }],
175
+ viewType: [{ type: Input }],
176
+ header: [{
177
+ type: ContentChild,
178
+ args: [ColumnHeaderDirective]
179
+ }],
180
+ cell: [{
181
+ type: ContentChild,
182
+ args: [ColumnCellDirective]
183
+ }],
184
+ footer: [{
185
+ type: ContentChild,
186
+ args: [ColumnFooterDirective]
187
+ }]
188
+ }
189
+ });
190
+ var TableComponent = class TableComponent {
191
+ mobileService;
192
+ injector = inject(EnvironmentInjector);
193
+ itemsSubject = new BehaviorSubject([]);
194
+ emptyStateMessage = "mcl.table.nenhum_registro_encontrado";
195
+ table;
196
+ emptyStatePlaceholder;
197
+ columnsDef;
198
+ items;
199
+ $outerItems;
200
+ sticky = false;
201
+ currentColumns = [];
202
+ $activeColumnNames = [];
203
+ $loading;
204
+ oldLength = 0;
205
+ columnsChangeSubscription;
206
+ mobileListener = (mobile) => this.mergeColumnsDef(mobile);
207
+ constructor(mobileService) {
208
+ this.mobileService = mobileService;
209
+ this.mobileService.addListener(this.mobileListener);
210
+ }
211
+ get outerItems() {
212
+ return this.$outerItems;
213
+ }
214
+ set outerItems(items) {
215
+ this.$outerItems = items;
216
+ }
217
+ get activeColumnNames() {
218
+ return this.$activeColumnNames;
219
+ }
220
+ get hasFooter() {
221
+ return !!this.currentColumns.find((col) => !!col.footerCell);
222
+ }
223
+ mergeColumnsDef(mobile = this.mobileService.mobile) {
224
+ clearTimeout(this.$loading);
225
+ this.$loading = setTimeout(() => {
226
+ const ngContentModels = this.columnsDef.toArray().filter((model) => mobile && model.viewType !== "web" || !mobile && model.viewType !== "mobile");
227
+ for (const column of this.currentColumns) this.removeColumnDef(column);
228
+ this.currentColumns.splice(0, this.currentColumns.length);
229
+ ngContentModels.forEach((model, i) => {
230
+ const columnDef = this.mapColumnDef(model);
231
+ this.currentColumns.splice(i, 0, columnDef);
232
+ this.addColumnDef(columnDef);
233
+ });
234
+ this.items = this.getItems() || [];
235
+ this.itemsSubject.next(this.items || []);
236
+ this.$activeColumnNames = this.currentColumns.map((col) => col.name);
237
+ }, 80);
238
+ }
239
+ ngAfterViewInit() {
240
+ this.columnsChangeSubscription = this.columnsDef.changes.subscribe((_) => {
241
+ this.mergeColumnsDef();
242
+ });
243
+ this.mergeColumnsDef();
244
+ }
245
+ ngDoCheck() {
246
+ const currentLength = this.getCurrentLength();
247
+ if (this.oldLength !== currentLength) {
248
+ this.oldLength = currentLength;
249
+ this.items = this.getItems() || [];
250
+ this.itemsSubject.next(this.items);
251
+ } else if (this.items !== this.getItems()) {
252
+ this.items = this.getItems() || [];
253
+ this.itemsSubject.next(this.items);
254
+ }
255
+ }
256
+ getItems() {
257
+ return this.outerItems;
258
+ }
259
+ getCurrentLength() {
260
+ return this.outerItems ? this.outerItems.length : 0;
261
+ }
262
+ ngOnDestroy() {
263
+ this.mobileService.removeListener(this.mobileListener);
264
+ this.columnsChangeSubscription?.unsubscribe();
265
+ this.itemsSubject.complete();
266
+ }
267
+ removeColumnDef(columnDef) {
268
+ this.table.removeColumnDef(columnDef);
269
+ }
270
+ addColumnDef(columnDef) {
271
+ this.table.addColumnDef(columnDef);
272
+ }
273
+ mapColumnDef(column) {
274
+ const cdef = runInInjectionContext(this.injector, () => new MatColumnDef());
275
+ cdef.name = column.viewType + "-" + column.name;
276
+ cdef.cell = runInInjectionContext(createEnvironmentInjector([{
277
+ provide: TemplateRef,
278
+ useValue: column.cell.template
279
+ }], this.injector), () => new MatCellDef());
280
+ cdef.headerCell = runInInjectionContext(createEnvironmentInjector([{
281
+ provide: TemplateRef,
282
+ useValue: column.header.template
283
+ }], this.injector), () => new MatHeaderCellDef());
284
+ if (column.footer) cdef.footerCell = runInInjectionContext(createEnvironmentInjector([{
285
+ provide: TemplateRef,
286
+ useValue: column.footer.template
287
+ }], this.injector), () => new MatFooterCellDef());
288
+ return cdef;
289
+ }
290
+ currentColumnsContains(model) {
291
+ return !!this.currentColumns.find((def) => def.name === model.columnDefName);
292
+ }
293
+ static ɵfac = i0.ɵɵngDeclareFactory({
294
+ minVersion: "12.0.0",
295
+ version: "22.3.2",
296
+ ngImport: i0,
297
+ type: TableComponent,
298
+ deps: [{ token: MobileService }],
299
+ target: i0.ɵɵFactoryTarget.Component
300
+ });
301
+ static ɵcmp = i0.ɵɵngDeclareComponent({
302
+ minVersion: "17.0.0",
303
+ version: "22.3.2",
304
+ type: TableComponent,
305
+ isStandalone: true,
306
+ selector: "mcl-table:not([page]):not([paginated])",
307
+ inputs: {
308
+ emptyStateMessage: "emptyStateMessage",
309
+ sticky: "sticky",
310
+ outerItems: ["items", "outerItems"]
311
+ },
312
+ queries: [{
313
+ propertyName: "emptyStatePlaceholder",
314
+ first: true,
315
+ predicate: ["[mclEmptyState]"],
316
+ descendants: true,
317
+ read: ElementRef
318
+ }, {
319
+ propertyName: "columnsDef",
320
+ predicate: ColumnDirective
321
+ }],
322
+ viewQueries: [{
323
+ propertyName: "table",
324
+ first: true,
325
+ predicate: MatTable,
326
+ descendants: true
327
+ }],
328
+ ngImport: i0,
329
+ template: "<div class=\"table\" #div>\n <div class=\"table__container\">\n <table mat-table [dataSource]=\"itemsSubject\">\n <tr mat-header-row *matHeaderRowDef=\"activeColumnNames; sticky: sticky\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: activeColumnNames;\"></tr>\n\n @if (hasFooter) {\n <tr mat-footer-row *matFooterRowDef=\"activeColumnNames;\"></tr>\n }\n </table>\n\n @if (!items?.length) {\n <div class=\"table__empty\">\n @if (emptyStatePlaceholder) {\n <ng-content select=\"[mclEmptyState]\"></ng-content>\n } @else {\n <mat-icon class=\"table__empty-icon\">inbox</mat-icon>\n <div>{{ emptyStateMessage | translate }}</div>\n }\n </div>\n }\n </div>\n</div>\n\n",
330
+ styles: ["@charset \"UTF-8\";:host{--tbl-bg: var(--lib-color-surface, var(--mat-sys-surface));--tbl-fg: var(--lib-color-on-surface, var(--mat-sys-on-surface));--tbl-muted: var(--lib-color-on-surface-variant, var(--mat-sys-on-surface-variant));--tbl-border: var(--lib-color-outline-variant, var(--mat-sys-outline-variant));--tbl-primary: var(--lib-color-primary, var(--mat-sys-primary));--tbl-header-bg: var(--lib-color-surface-container-low, var(--mat-sys-surface-container-low));--tbl-radius: var(--mcl-radius-md, 12px);display:block}.table{background:var(--tbl-bg);color:var(--tbl-fg);border:1px solid var(--tbl-border);border-radius:var(--tbl-radius);box-shadow:var(--mcl-shadow-1, 0 1px 3px rgba(0, 0, 0, .05));overflow:hidden}.table__container{overflow:auto}.mat-mdc-table{width:100%;border-collapse:separate;border-spacing:0;background:transparent;font-size:.9rem}.mat-mdc-table thead tr,.mat-mdc-header-row{background:var(--tbl-header-bg);height:auto}.mat-mdc-row{height:auto;transition:background-color var(--mcl-transition, .18s ease)}.mat-mdc-row:hover{background:color-mix(in oklab,var(--tbl-fg) 4%,var(--tbl-bg))}.mat-mdc-row:focus-within{outline:2px solid var(--tbl-primary);outline-offset:-2px}.table__empty{display:grid;justify-items:center;gap:8px;padding:48px 24px;text-align:center;color:var(--tbl-muted);font-size:.9rem}.table__empty-icon{font-size:36px;width:44px;height:44px;display:grid;place-items:center;border-radius:var(--mcl-radius-full, 999px);background:var(--tbl-header-bg);color:var(--tbl-muted)}:host(.is-sticky-header) .mat-mdc-header-row{position:sticky;top:0;z-index:2;box-shadow:0 1px 0 0 var(--tbl-border)}.c-col--right{text-align:right}.c-col--strong{font-weight:600;color:var(--tbl-fg)}.c-col--muted{color:var(--tbl-muted)}\n"],
331
+ dependencies: [
332
+ {
333
+ kind: "component",
334
+ type: MatTable,
335
+ selector: "mat-table, table[mat-table]",
336
+ exportAs: ["matTable"]
337
+ },
338
+ {
339
+ kind: "component",
340
+ type: MatHeaderRow,
341
+ selector: "mat-header-row, tr[mat-header-row]",
342
+ exportAs: ["matHeaderRow"]
343
+ },
344
+ {
345
+ kind: "component",
346
+ type: MatRow,
347
+ selector: "mat-row, tr[mat-row]",
348
+ exportAs: ["matRow"]
349
+ },
350
+ {
351
+ kind: "component",
352
+ type: MatFooterRow,
353
+ selector: "mat-footer-row, tr[mat-footer-row]",
354
+ exportAs: ["matFooterRow"]
355
+ },
356
+ {
357
+ kind: "directive",
358
+ type: MatHeaderRowDef,
359
+ selector: "[matHeaderRowDef]",
360
+ inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"]
361
+ },
362
+ {
363
+ kind: "directive",
364
+ type: MatRowDef,
365
+ selector: "[matRowDef]",
366
+ inputs: ["matRowDefColumns", "matRowDefWhen"]
367
+ },
368
+ {
369
+ kind: "directive",
370
+ type: MatFooterRowDef,
371
+ selector: "[matFooterRowDef]",
372
+ inputs: ["matFooterRowDef", "matFooterRowDefSticky"]
373
+ },
374
+ {
375
+ kind: "component",
376
+ type: MatIcon,
377
+ selector: "mat-icon",
378
+ inputs: [
379
+ "color",
380
+ "inline",
381
+ "svgIcon",
382
+ "fontSet",
383
+ "fontIcon"
384
+ ],
385
+ exportAs: ["matIcon"]
386
+ },
387
+ {
388
+ kind: "pipe",
389
+ type: TranslatePipe,
390
+ name: "translate"
391
+ }
392
+ ],
393
+ changeDetection: i0.ChangeDetectionStrategy.Eager
394
+ });
395
+ };
396
+ i0.ɵɵngDeclareClassMetadata({
397
+ minVersion: "12.0.0",
398
+ version: "22.3.2",
399
+ ngImport: i0,
400
+ type: TableComponent,
401
+ decorators: [{
402
+ type: Component,
403
+ args: [{
404
+ selector: "mcl-table:not([page]):not([paginated])",
405
+ imports: [
406
+ MatTable,
407
+ MatHeaderRow,
408
+ MatRow,
409
+ MatFooterRow,
410
+ MatHeaderRowDef,
411
+ MatRowDef,
412
+ MatFooterRowDef,
413
+ TranslatePipe,
414
+ MatIcon
415
+ ],
416
+ changeDetection: ChangeDetectionStrategy.Eager,
417
+ template: "<div class=\"table\" #div>\n <div class=\"table__container\">\n <table mat-table [dataSource]=\"itemsSubject\">\n <tr mat-header-row *matHeaderRowDef=\"activeColumnNames; sticky: sticky\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: activeColumnNames;\"></tr>\n\n @if (hasFooter) {\n <tr mat-footer-row *matFooterRowDef=\"activeColumnNames;\"></tr>\n }\n </table>\n\n @if (!items?.length) {\n <div class=\"table__empty\">\n @if (emptyStatePlaceholder) {\n <ng-content select=\"[mclEmptyState]\"></ng-content>\n } @else {\n <mat-icon class=\"table__empty-icon\">inbox</mat-icon>\n <div>{{ emptyStateMessage | translate }}</div>\n }\n </div>\n }\n </div>\n</div>\n\n",
418
+ styles: ["@charset \"UTF-8\";:host{--tbl-bg: var(--lib-color-surface, var(--mat-sys-surface));--tbl-fg: var(--lib-color-on-surface, var(--mat-sys-on-surface));--tbl-muted: var(--lib-color-on-surface-variant, var(--mat-sys-on-surface-variant));--tbl-border: var(--lib-color-outline-variant, var(--mat-sys-outline-variant));--tbl-primary: var(--lib-color-primary, var(--mat-sys-primary));--tbl-header-bg: var(--lib-color-surface-container-low, var(--mat-sys-surface-container-low));--tbl-radius: var(--mcl-radius-md, 12px);display:block}.table{background:var(--tbl-bg);color:var(--tbl-fg);border:1px solid var(--tbl-border);border-radius:var(--tbl-radius);box-shadow:var(--mcl-shadow-1, 0 1px 3px rgba(0, 0, 0, .05));overflow:hidden}.table__container{overflow:auto}.mat-mdc-table{width:100%;border-collapse:separate;border-spacing:0;background:transparent;font-size:.9rem}.mat-mdc-table thead tr,.mat-mdc-header-row{background:var(--tbl-header-bg);height:auto}.mat-mdc-row{height:auto;transition:background-color var(--mcl-transition, .18s ease)}.mat-mdc-row:hover{background:color-mix(in oklab,var(--tbl-fg) 4%,var(--tbl-bg))}.mat-mdc-row:focus-within{outline:2px solid var(--tbl-primary);outline-offset:-2px}.table__empty{display:grid;justify-items:center;gap:8px;padding:48px 24px;text-align:center;color:var(--tbl-muted);font-size:.9rem}.table__empty-icon{font-size:36px;width:44px;height:44px;display:grid;place-items:center;border-radius:var(--mcl-radius-full, 999px);background:var(--tbl-header-bg);color:var(--tbl-muted)}:host(.is-sticky-header) .mat-mdc-header-row{position:sticky;top:0;z-index:2;box-shadow:0 1px 0 0 var(--tbl-border)}.c-col--right{text-align:right}.c-col--strong{font-weight:600;color:var(--tbl-fg)}.c-col--muted{color:var(--tbl-muted)}\n"]
419
+ }]
420
+ }],
421
+ ctorParameters: () => [{ type: MobileService }],
422
+ propDecorators: {
423
+ emptyStateMessage: [{ type: Input }],
424
+ table: [{
425
+ type: ViewChild,
426
+ args: [MatTable]
427
+ }],
428
+ emptyStatePlaceholder: [{
429
+ type: ContentChild,
430
+ args: ["[mclEmptyState]", { read: ElementRef }]
431
+ }],
432
+ columnsDef: [{
433
+ type: ContentChildren,
434
+ args: [ColumnDirective]
435
+ }],
436
+ sticky: [{ type: Input }],
437
+ outerItems: [{
438
+ type: Input,
439
+ args: ["items"]
440
+ }]
441
+ }
442
+ });
443
+ var NumericPaginatorComponent = class NumericPaginatorComponent {
444
+ length = 0;
445
+ pageIndex = 0;
446
+ pageSize = 10;
447
+ pageSizeOptions = [
448
+ 5,
449
+ 10,
450
+ 25,
451
+ 50
452
+ ];
453
+ hidePageSize = true;
454
+ showFirstLastButtons = false;
455
+ disabled = false;
456
+ page = new EventEmitter();
457
+ totalPages() {
458
+ if (this.pageSize <= 0) return 1;
459
+ return Math.max(1, Math.ceil(this.length / this.pageSize));
460
+ }
461
+ hasPrevious() {
462
+ return this.pageIndex > 0;
463
+ }
464
+ hasNext() {
465
+ return this.pageIndex + 1 < this.totalPages();
466
+ }
467
+ pages() {
468
+ const total = this.totalPages();
469
+ const current = this.pageIndex + 1;
470
+ const maxVisible = 5;
471
+ if (total <= maxVisible) return Array.from({ length: total }, (_, i) => i + 1);
472
+ let start = Math.max(1, current - Math.floor(maxVisible / 2));
473
+ let end = Math.min(total, start + maxVisible - 1);
474
+ if (end - start + 1 < maxVisible) start = Math.max(1, end - maxVisible + 1);
475
+ return Array.from({ length: end - start + 1 }, (_, i) => start + i);
476
+ }
477
+ rangeLabel() {
478
+ if (this.length === 0 || this.pageSize === 0) return `Exibindo 0–0 de ${this.length}`;
479
+ return `Exibindo ${this.pageIndex * this.pageSize + 1}–${Math.min((this.pageIndex + 1) * this.pageSize, this.length)} de ${this.length}`;
480
+ }
481
+ emit(nextIndex) {
482
+ const bounded = Math.max(0, Math.min(this.totalPages() - 1, nextIndex));
483
+ const event = {
484
+ pageIndex: bounded,
485
+ pageSize: this.pageSize,
486
+ length: this.length,
487
+ previousPageIndex: this.pageIndex
488
+ };
489
+ this.pageIndex = bounded;
490
+ this.page.emit(event);
491
+ }
492
+ goTo(page1Based) {
493
+ if (!this.disabled) this.emit(page1Based - 1);
494
+ }
495
+ previousPage() {
496
+ if (!this.disabled && this.hasPrevious()) this.emit(this.pageIndex - 1);
497
+ }
498
+ nextPage() {
499
+ if (!this.disabled && this.hasNext()) this.emit(this.pageIndex + 1);
500
+ }
501
+ firstPage() {
502
+ if (!this.disabled && this.showFirstLastButtons && this.hasPrevious()) this.emit(0);
503
+ }
504
+ lastPage() {
505
+ if (!this.disabled && this.showFirstLastButtons && this.hasNext()) this.emit(this.totalPages() - 1);
506
+ }
507
+ static ɵfac = i0.ɵɵngDeclareFactory({
508
+ minVersion: "12.0.0",
509
+ version: "22.3.2",
510
+ ngImport: i0,
511
+ type: NumericPaginatorComponent,
512
+ deps: [],
513
+ target: i0.ɵɵFactoryTarget.Component
514
+ });
515
+ static ɵcmp = i0.ɵɵngDeclareComponent({
516
+ minVersion: "17.0.0",
517
+ version: "22.3.2",
518
+ type: NumericPaginatorComponent,
519
+ isStandalone: true,
520
+ selector: "mcl-numeric-paginator",
521
+ inputs: {
522
+ length: "length",
523
+ pageIndex: "pageIndex",
524
+ pageSize: "pageSize",
525
+ pageSizeOptions: "pageSizeOptions",
526
+ hidePageSize: "hidePageSize",
527
+ showFirstLastButtons: "showFirstLastButtons",
528
+ disabled: "disabled"
529
+ },
530
+ outputs: { page: "page" },
531
+ ngImport: i0,
532
+ template: "<nav class=\"pgr\" aria-label=\"Paginação\" [attr.aria-disabled]=\"disabled || null\">\n <!-- Esquerda: faixa \"Exibindo X–Y de Z\" -->\n <div class=\"pgr__range\" aria-live=\"polite\">{{ rangeLabel() }}</div>\n\n <!-- Direita: anterior / números / próximo -->\n <ul class=\"pgr__list\" role=\"list\">\n <li class=\"pgr__item\">\n <button class=\"pgr__link pgr__link--nav\"\n type=\"button\"\n [disabled]=\"disabled || !hasPrevious()\"\n (click)=\"previousPage()\"\n aria-label=\"Página anterior\">\n <mat-icon>chevron_left</mat-icon>\n </button>\n </li>\n\n @for (p of pages(); track p) {\n <li class=\"pgr__item\">\n <button class=\"pgr__link\"\n type=\"button\"\n [class.is-active]=\"p === pageIndex + 1\"\n [attr.aria-current]=\"p === pageIndex + 1 ? 'page' : null\"\n (click)=\"goTo(p)\">\n {{ p }}\n </button>\n </li>\n }\n\n <li class=\"pgr__item\">\n <button class=\"pgr__link pgr__link--nav\"\n type=\"button\"\n [disabled]=\"disabled || !hasNext()\"\n (click)=\"nextPage()\"\n aria-label=\"Próxima página\">\n <mat-icon>chevron_right</mat-icon>\n </button>\n </li>\n\n <!-- opcional: first/last (ocultos por padrão) -->\n @if (showFirstLastButtons) {\n <li class=\"pgr__item\">\n <button class=\"pgr__link pgr__link--nav\"\n type=\"button\"\n [disabled]=\"disabled || !hasPrevious()\"\n (click)=\"firstPage()\" aria-label=\"Primeira página\">\n <mat-icon>first_page</mat-icon>\n </button>\n </li>\n }\n @if (showFirstLastButtons) {\n <li class=\"pgr__item\">\n <button class=\"pgr__link pgr__link--nav\"\n type=\"button\"\n [disabled]=\"disabled || !hasNext()\"\n (click)=\"lastPage()\" aria-label=\"Última página\">\n <mat-icon>last_page</mat-icon>\n </button>\n </li>\n }\n </ul>\n</nav>\n",
533
+ styles: ["@charset \"UTF-8\";:host{--pgr-bg: var(--lib-color-surface, var(--mat-sys-surface));--pgr-fg: var(--lib-color-on-surface, var(--mat-sys-on-surface));--pgr-muted: var(--lib-color-on-surface-variant, var(--mat-sys-on-surface-variant));--pgr-border: var(--lib-color-outline-variant, var(--mat-sys-outline-variant));--pgr-primary: var(--lib-color-primary, var(--mat-sys-primary));--pgr-on-primary: var(--lib-color-on-primary, var(--mat-sys-on-primary));--pgr-radius: var(--mcl-radius-sm, 8px);display:block}.pgr{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 16px;color:var(--pgr-fg);background:var(--pgr-bg);border-top:1px solid var(--pgr-border)}.pgr__range{font-size:.8125rem;color:var(--pgr-muted)}.pgr__list{display:inline-flex;align-items:center;gap:4px;list-style:none;margin:0;padding:0}.pgr__item{display:inline-flex}.pgr__link{min-width:34px;height:34px;padding:0 8px;border-radius:var(--pgr-radius);border:1px solid transparent;background:transparent;color:var(--pgr-muted);display:inline-flex;align-items:center;justify-content:center;text-decoration:none;font-size:.875rem;transition:background-color var(--mcl-transition, .18s ease),color var(--mcl-transition, .18s ease)}.pgr__link:hover{background:color-mix(in oklab,var(--pgr-fg) 6%,var(--pgr-bg));color:var(--pgr-fg)}.pgr__link:focus-visible{outline:2px solid var(--pgr-primary);outline-offset:2px}.pgr__link.is-active{background:var(--pgr-primary);color:var(--pgr-on-primary);font-weight:600}.pgr__link:disabled{opacity:.4;cursor:not-allowed;background:transparent}.pgr mat-icon,.material-symbols-outlined{font-variation-settings:\"FILL\" 0,\"wght\" 400,\"GRAD\" 0,\"opsz\" 20;font-size:20px;width:20px;height:20px;line-height:1}@media(max-width:639.98px){.pgr{flex-wrap:wrap;gap:8px}.pgr__range{order:2;width:100%}}\n"],
534
+ dependencies: [{
535
+ kind: "component",
536
+ type: MatIcon,
537
+ selector: "mat-icon",
538
+ inputs: [
539
+ "color",
540
+ "inline",
541
+ "svgIcon",
542
+ "fontSet",
543
+ "fontIcon"
544
+ ],
545
+ exportAs: ["matIcon"]
546
+ }],
547
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
548
+ });
549
+ };
550
+ i0.ɵɵngDeclareClassMetadata({
551
+ minVersion: "12.0.0",
552
+ version: "22.3.2",
553
+ ngImport: i0,
554
+ type: NumericPaginatorComponent,
555
+ decorators: [{
556
+ type: Component,
557
+ args: [{
558
+ selector: "mcl-numeric-paginator",
559
+ imports: [MatIcon],
560
+ changeDetection: ChangeDetectionStrategy.OnPush,
561
+ template: "<nav class=\"pgr\" aria-label=\"Paginação\" [attr.aria-disabled]=\"disabled || null\">\n <!-- Esquerda: faixa \"Exibindo X–Y de Z\" -->\n <div class=\"pgr__range\" aria-live=\"polite\">{{ rangeLabel() }}</div>\n\n <!-- Direita: anterior / números / próximo -->\n <ul class=\"pgr__list\" role=\"list\">\n <li class=\"pgr__item\">\n <button class=\"pgr__link pgr__link--nav\"\n type=\"button\"\n [disabled]=\"disabled || !hasPrevious()\"\n (click)=\"previousPage()\"\n aria-label=\"Página anterior\">\n <mat-icon>chevron_left</mat-icon>\n </button>\n </li>\n\n @for (p of pages(); track p) {\n <li class=\"pgr__item\">\n <button class=\"pgr__link\"\n type=\"button\"\n [class.is-active]=\"p === pageIndex + 1\"\n [attr.aria-current]=\"p === pageIndex + 1 ? 'page' : null\"\n (click)=\"goTo(p)\">\n {{ p }}\n </button>\n </li>\n }\n\n <li class=\"pgr__item\">\n <button class=\"pgr__link pgr__link--nav\"\n type=\"button\"\n [disabled]=\"disabled || !hasNext()\"\n (click)=\"nextPage()\"\n aria-label=\"Próxima página\">\n <mat-icon>chevron_right</mat-icon>\n </button>\n </li>\n\n <!-- opcional: first/last (ocultos por padrão) -->\n @if (showFirstLastButtons) {\n <li class=\"pgr__item\">\n <button class=\"pgr__link pgr__link--nav\"\n type=\"button\"\n [disabled]=\"disabled || !hasPrevious()\"\n (click)=\"firstPage()\" aria-label=\"Primeira página\">\n <mat-icon>first_page</mat-icon>\n </button>\n </li>\n }\n @if (showFirstLastButtons) {\n <li class=\"pgr__item\">\n <button class=\"pgr__link pgr__link--nav\"\n type=\"button\"\n [disabled]=\"disabled || !hasNext()\"\n (click)=\"lastPage()\" aria-label=\"Última página\">\n <mat-icon>last_page</mat-icon>\n </button>\n </li>\n }\n </ul>\n</nav>\n",
562
+ styles: ["@charset \"UTF-8\";:host{--pgr-bg: var(--lib-color-surface, var(--mat-sys-surface));--pgr-fg: var(--lib-color-on-surface, var(--mat-sys-on-surface));--pgr-muted: var(--lib-color-on-surface-variant, var(--mat-sys-on-surface-variant));--pgr-border: var(--lib-color-outline-variant, var(--mat-sys-outline-variant));--pgr-primary: var(--lib-color-primary, var(--mat-sys-primary));--pgr-on-primary: var(--lib-color-on-primary, var(--mat-sys-on-primary));--pgr-radius: var(--mcl-radius-sm, 8px);display:block}.pgr{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 16px;color:var(--pgr-fg);background:var(--pgr-bg);border-top:1px solid var(--pgr-border)}.pgr__range{font-size:.8125rem;color:var(--pgr-muted)}.pgr__list{display:inline-flex;align-items:center;gap:4px;list-style:none;margin:0;padding:0}.pgr__item{display:inline-flex}.pgr__link{min-width:34px;height:34px;padding:0 8px;border-radius:var(--pgr-radius);border:1px solid transparent;background:transparent;color:var(--pgr-muted);display:inline-flex;align-items:center;justify-content:center;text-decoration:none;font-size:.875rem;transition:background-color var(--mcl-transition, .18s ease),color var(--mcl-transition, .18s ease)}.pgr__link:hover{background:color-mix(in oklab,var(--pgr-fg) 6%,var(--pgr-bg));color:var(--pgr-fg)}.pgr__link:focus-visible{outline:2px solid var(--pgr-primary);outline-offset:2px}.pgr__link.is-active{background:var(--pgr-primary);color:var(--pgr-on-primary);font-weight:600}.pgr__link:disabled{opacity:.4;cursor:not-allowed;background:transparent}.pgr mat-icon,.material-symbols-outlined{font-variation-settings:\"FILL\" 0,\"wght\" 400,\"GRAD\" 0,\"opsz\" 20;font-size:20px;width:20px;height:20px;line-height:1}@media(max-width:639.98px){.pgr{flex-wrap:wrap;gap:8px}.pgr__range{order:2;width:100%}}\n"]
563
+ }]
564
+ }],
565
+ propDecorators: {
566
+ length: [{ type: Input }],
567
+ pageIndex: [{ type: Input }],
568
+ pageSize: [{ type: Input }],
569
+ pageSizeOptions: [{ type: Input }],
570
+ hidePageSize: [{ type: Input }],
571
+ showFirstLastButtons: [{ type: Input }],
572
+ disabled: [{ type: Input }],
573
+ page: [{ type: Output }]
574
+ }
575
+ });
576
+ var PaginatorI18n = class {
577
+ translate;
578
+ constructor(translate) {
579
+ this.translate = translate;
580
+ }
581
+ getPaginatorIntl() {
582
+ const paginatorIntl = new MatPaginatorIntl();
583
+ paginatorIntl.itemsPerPageLabel = this.translate.instant("mcl.table.items_per_page");
584
+ paginatorIntl.nextPageLabel = this.translate.instant("mcl.table.next_page");
585
+ paginatorIntl.previousPageLabel = this.translate.instant("mcl.table.previous_page");
586
+ paginatorIntl.firstPageLabel = this.translate.instant("mcl.table.first_page");
587
+ paginatorIntl.lastPageLabel = this.translate.instant("mcl.table.last_page");
588
+ paginatorIntl.getRangeLabel = this.getRangeLabel.bind(this);
589
+ return paginatorIntl;
590
+ }
591
+ getRangeLabel(page, pageSize, length) {
592
+ length = Math.max(length, 0);
593
+ const startIndex = page * pageSize;
594
+ const endIndex = startIndex < length ? Math.min(startIndex + pageSize, length) : startIndex + pageSize;
595
+ return this.translate.instant("mcl.table.range", {
596
+ startIndex: startIndex + 1,
597
+ endIndex,
598
+ length
599
+ });
600
+ }
601
+ };
602
+ var UndefinedPaginatorComponent = class UndefinedPaginatorComponent {
603
+ pageSize = 10;
604
+ hasPrevious = false;
605
+ hasNext = false;
606
+ page = new EventEmitter();
607
+ pageSizeOptions = [
608
+ 5,
609
+ 10,
610
+ 25,
611
+ 50
612
+ ];
613
+ first() {
614
+ if (this.hasPrevious) this.page.emit({
615
+ size: this.pageSize,
616
+ action: "first"
617
+ });
618
+ }
619
+ previous() {
620
+ if (this.hasPrevious) this.page.emit({
621
+ size: this.pageSize,
622
+ action: "previous"
623
+ });
624
+ }
625
+ next() {
626
+ if (this.hasNext) this.page.emit({
627
+ size: this.pageSize,
628
+ action: "next"
629
+ });
630
+ }
631
+ last() {
632
+ if (this.hasNext) this.page.emit({
633
+ size: this.pageSize,
634
+ action: "last"
635
+ });
636
+ }
637
+ onSizeChange(size) {
638
+ this.pageSize = Number(size);
639
+ }
640
+ static ɵfac = i0.ɵɵngDeclareFactory({
641
+ minVersion: "12.0.0",
642
+ version: "22.3.2",
643
+ ngImport: i0,
644
+ type: UndefinedPaginatorComponent,
645
+ deps: [],
646
+ target: i0.ɵɵFactoryTarget.Component
647
+ });
648
+ static ɵcmp = i0.ɵɵngDeclareComponent({
649
+ minVersion: "17.0.0",
650
+ version: "22.3.2",
651
+ type: UndefinedPaginatorComponent,
652
+ isStandalone: true,
653
+ selector: "mcl-undefined-paginator",
654
+ inputs: {
655
+ pageSize: "pageSize",
656
+ hasPrevious: "hasPrevious",
657
+ hasNext: "hasNext"
658
+ },
659
+ outputs: { page: "page" },
660
+ ngImport: i0,
661
+ template: "<!-- Mesma estrutura/classe do paginator anterior, com modificador .pgr--undefined -->\n<nav class=\"pgr pgr--undefined\" aria-label=\"Paginação (total desconhecido)\">\n <!-- Esquerda: texto de faixa (opcional). Mantemos para consistência de layout -->\n <div class=\"pgr__range\" aria-live=\"polite\">Navegação contínua</div>\n\n <!-- Direita: tamanho + botões -->\n <div class=\"pgr__controls\">\n <!-- Itens por página -->\n <div class=\"pgr__size\">\n <span class=\"pgr__size-label\">Itens por página</span>\n <mat-select\n class=\"pgr__size-select\"\n [value]=\"pageSize\"\n (valueChange)=\"onSizeChange($event)\"\n aria-label=\"Itens por página\">\n @for (size of pageSizeOptions; track size) {\n <mat-option [value]=\"size\">\n {{ size }}\n </mat-option>\n }\n </mat-select>\n </div>\n\n <!-- Botões iguais ao template anterior -->\n <div class=\"pgr__buttons\" role=\"group\" aria-label=\"Controles de página\">\n <button class=\"pgr__btn\"\n type=\"button\"\n [disabled]=\"!hasPrevious\"\n (click)=\"first()\"\n aria-label=\"Primeira página\"\n title=\"Primeira página\">\n <mat-icon>first_page</mat-icon>\n </button>\n\n <button class=\"pgr__btn\"\n type=\"button\"\n [disabled]=\"!hasPrevious\"\n (click)=\"previous()\"\n aria-label=\"Página anterior\"\n title=\"Página anterior\">\n <mat-icon>chevron_left</mat-icon>\n </button>\n\n <!-- Centro: marcador visual no lugar de \"1 / N\" -->\n <span class=\"pgr__index pgr__index--undefined\" aria-hidden=\"true\">• • •</span>\n\n <button class=\"pgr__btn\"\n type=\"button\"\n [disabled]=\"!hasNext\"\n (click)=\"next()\"\n aria-label=\"Próxima página\"\n title=\"Próxima página\">\n <mat-icon>chevron_right</mat-icon>\n </button>\n\n <button class=\"pgr__btn\"\n type=\"button\"\n [disabled]=\"!hasNext\"\n (click)=\"last()\"\n aria-label=\"Última página\"\n title=\"Última página\">\n <mat-icon>last_page</mat-icon>\n </button>\n </div>\n </div>\n</nav>\n",
662
+ styles: ["@charset \"UTF-8\";:host{--pgr-bg: var(--lib-color-surface, var(--mat-sys-surface));--pgr-fg: var(--lib-color-on-surface, var(--mat-sys-on-surface));--pgr-muted: var(--lib-color-on-surface-variant, var(--mat-sys-on-surface-variant));--pgr-border: var(--lib-color-outline-variant, var(--mat-sys-outline-variant));--pgr-primary: var(--lib-color-primary, var(--mat-sys-primary));--pgr-radius: var(--mcl-radius-sm, 8px);display:block}.pgr{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 16px;color:var(--pgr-fg);background:var(--pgr-bg);border-top:1px solid var(--pgr-border)}.pgr__range{font-size:.8125rem;color:var(--pgr-muted)}.pgr__controls{display:flex;align-items:center;gap:12px}.pgr__size{display:inline-flex;align-items:center;gap:8px}.pgr__size-label{font-size:.8125rem;color:var(--pgr-muted)}.pgr__size-select{min-width:80px;border-radius:var(--pgr-radius)}.pgr__buttons{display:inline-flex;align-items:center;gap:4px}.pgr__btn{inline-size:34px;block-size:34px;display:grid;place-items:center;border-radius:var(--pgr-radius);border:1px solid transparent;background:transparent;color:var(--pgr-muted);transition:background-color var(--mcl-transition, .18s ease),color var(--mcl-transition, .18s ease)}.pgr__btn:hover{background:color-mix(in oklab,var(--pgr-fg) 6%,var(--pgr-bg));color:var(--pgr-fg)}.pgr__btn:focus-visible{outline:2px solid var(--pgr-primary);outline-offset:2px}.pgr__btn:disabled{opacity:.4;cursor:not-allowed;background:transparent}.pgr__index{min-width:64px;text-align:center;font-size:.86rem;color:var(--pgr-fg)}.pgr__index--undefined{letter-spacing:4px;color:var(--pgr-muted)}.pgr mat-icon{font-size:20px;inline-size:20px;block-size:20px;line-height:1;vertical-align:middle}.pgr mat-icon[class*=material-symbols]{font-variation-settings:\"FILL\" 0,\"wght\" 400,\"GRAD\" 0,\"opsz\" 20}@media(max-width:639.98px){.pgr{flex-wrap:wrap;gap:8px}.pgr__range{order:2;width:100%}.pgr__controls{order:1;width:100%;justify-content:space-between}}\n"],
663
+ dependencies: [
664
+ {
665
+ kind: "component",
666
+ type: MatSelect,
667
+ selector: "mat-select",
668
+ inputs: [
669
+ "aria-describedby",
670
+ "panelClass",
671
+ "disabled",
672
+ "disableRipple",
673
+ "tabIndex",
674
+ "hideSingleSelectionIndicator",
675
+ "placeholder",
676
+ "required",
677
+ "multiple",
678
+ "disableOptionCentering",
679
+ "compareWith",
680
+ "value",
681
+ "aria-label",
682
+ "aria-labelledby",
683
+ "errorStateMatcher",
684
+ "typeaheadDebounceInterval",
685
+ "sortComparator",
686
+ "id",
687
+ "panelWidth",
688
+ "canSelectNullableOptions"
689
+ ],
690
+ outputs: [
691
+ "openedChange",
692
+ "opened",
693
+ "closed",
694
+ "selectionChange",
695
+ "valueChange"
696
+ ],
697
+ exportAs: ["matSelect"]
698
+ },
699
+ {
700
+ kind: "component",
701
+ type: MatOption,
702
+ selector: "mat-option",
703
+ inputs: [
704
+ "value",
705
+ "id",
706
+ "disabled"
707
+ ],
708
+ outputs: ["onSelectionChange"],
709
+ exportAs: ["matOption"]
710
+ },
711
+ {
712
+ kind: "component",
713
+ type: MatIcon,
714
+ selector: "mat-icon",
715
+ inputs: [
716
+ "color",
717
+ "inline",
718
+ "svgIcon",
719
+ "fontSet",
720
+ "fontIcon"
721
+ ],
722
+ exportAs: ["matIcon"]
723
+ }
724
+ ],
725
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
726
+ });
727
+ };
728
+ i0.ɵɵngDeclareClassMetadata({
729
+ minVersion: "12.0.0",
730
+ version: "22.3.2",
731
+ ngImport: i0,
732
+ type: UndefinedPaginatorComponent,
733
+ decorators: [{
734
+ type: Component,
735
+ args: [{
736
+ selector: "mcl-undefined-paginator",
737
+ imports: [
738
+ MatSelect,
739
+ MatOption,
740
+ MatIcon
741
+ ],
742
+ changeDetection: ChangeDetectionStrategy.OnPush,
743
+ template: "<!-- Mesma estrutura/classe do paginator anterior, com modificador .pgr--undefined -->\n<nav class=\"pgr pgr--undefined\" aria-label=\"Paginação (total desconhecido)\">\n <!-- Esquerda: texto de faixa (opcional). Mantemos para consistência de layout -->\n <div class=\"pgr__range\" aria-live=\"polite\">Navegação contínua</div>\n\n <!-- Direita: tamanho + botões -->\n <div class=\"pgr__controls\">\n <!-- Itens por página -->\n <div class=\"pgr__size\">\n <span class=\"pgr__size-label\">Itens por página</span>\n <mat-select\n class=\"pgr__size-select\"\n [value]=\"pageSize\"\n (valueChange)=\"onSizeChange($event)\"\n aria-label=\"Itens por página\">\n @for (size of pageSizeOptions; track size) {\n <mat-option [value]=\"size\">\n {{ size }}\n </mat-option>\n }\n </mat-select>\n </div>\n\n <!-- Botões iguais ao template anterior -->\n <div class=\"pgr__buttons\" role=\"group\" aria-label=\"Controles de página\">\n <button class=\"pgr__btn\"\n type=\"button\"\n [disabled]=\"!hasPrevious\"\n (click)=\"first()\"\n aria-label=\"Primeira página\"\n title=\"Primeira página\">\n <mat-icon>first_page</mat-icon>\n </button>\n\n <button class=\"pgr__btn\"\n type=\"button\"\n [disabled]=\"!hasPrevious\"\n (click)=\"previous()\"\n aria-label=\"Página anterior\"\n title=\"Página anterior\">\n <mat-icon>chevron_left</mat-icon>\n </button>\n\n <!-- Centro: marcador visual no lugar de \"1 / N\" -->\n <span class=\"pgr__index pgr__index--undefined\" aria-hidden=\"true\">• • •</span>\n\n <button class=\"pgr__btn\"\n type=\"button\"\n [disabled]=\"!hasNext\"\n (click)=\"next()\"\n aria-label=\"Próxima página\"\n title=\"Próxima página\">\n <mat-icon>chevron_right</mat-icon>\n </button>\n\n <button class=\"pgr__btn\"\n type=\"button\"\n [disabled]=\"!hasNext\"\n (click)=\"last()\"\n aria-label=\"Última página\"\n title=\"Última página\">\n <mat-icon>last_page</mat-icon>\n </button>\n </div>\n </div>\n</nav>\n",
744
+ styles: ["@charset \"UTF-8\";:host{--pgr-bg: var(--lib-color-surface, var(--mat-sys-surface));--pgr-fg: var(--lib-color-on-surface, var(--mat-sys-on-surface));--pgr-muted: var(--lib-color-on-surface-variant, var(--mat-sys-on-surface-variant));--pgr-border: var(--lib-color-outline-variant, var(--mat-sys-outline-variant));--pgr-primary: var(--lib-color-primary, var(--mat-sys-primary));--pgr-radius: var(--mcl-radius-sm, 8px);display:block}.pgr{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 16px;color:var(--pgr-fg);background:var(--pgr-bg);border-top:1px solid var(--pgr-border)}.pgr__range{font-size:.8125rem;color:var(--pgr-muted)}.pgr__controls{display:flex;align-items:center;gap:12px}.pgr__size{display:inline-flex;align-items:center;gap:8px}.pgr__size-label{font-size:.8125rem;color:var(--pgr-muted)}.pgr__size-select{min-width:80px;border-radius:var(--pgr-radius)}.pgr__buttons{display:inline-flex;align-items:center;gap:4px}.pgr__btn{inline-size:34px;block-size:34px;display:grid;place-items:center;border-radius:var(--pgr-radius);border:1px solid transparent;background:transparent;color:var(--pgr-muted);transition:background-color var(--mcl-transition, .18s ease),color var(--mcl-transition, .18s ease)}.pgr__btn:hover{background:color-mix(in oklab,var(--pgr-fg) 6%,var(--pgr-bg));color:var(--pgr-fg)}.pgr__btn:focus-visible{outline:2px solid var(--pgr-primary);outline-offset:2px}.pgr__btn:disabled{opacity:.4;cursor:not-allowed;background:transparent}.pgr__index{min-width:64px;text-align:center;font-size:.86rem;color:var(--pgr-fg)}.pgr__index--undefined{letter-spacing:4px;color:var(--pgr-muted)}.pgr mat-icon{font-size:20px;inline-size:20px;block-size:20px;line-height:1;vertical-align:middle}.pgr mat-icon[class*=material-symbols]{font-variation-settings:\"FILL\" 0,\"wght\" 400,\"GRAD\" 0,\"opsz\" 20}@media(max-width:639.98px){.pgr{flex-wrap:wrap;gap:8px}.pgr__range{order:2;width:100%}.pgr__controls{order:1;width:100%;justify-content:space-between}}\n"]
745
+ }]
746
+ }],
747
+ propDecorators: {
748
+ pageSize: [{ type: Input }],
749
+ hasPrevious: [{ type: Input }],
750
+ hasNext: [{ type: Input }],
751
+ page: [{ type: Output }]
752
+ }
753
+ });
754
+ const PAGINATION_CONFIGURATION = new InjectionToken("mainclass.PAGINATION_CONFIGURATION");
398
755
  function PaginatorIntlFactory(translateService) {
399
- return new PaginatorI18n(translateService).getPaginatorIntl();
400
- }
401
- class PaginatedTableComponent extends TableComponent {
402
- sizes;
403
- paginate = new EventEmitter();
404
- page;
405
- loader;
406
- constructor(mobileService, paginationConfiguration) {
407
- super(mobileService);
408
- this.sizes = paginationConfiguration?.sizes || [10, 25, 50];
409
- }
410
- get numericPagination() {
411
- if (this.page?.pagination?.type === 'numeric') {
412
- return this.page.pagination;
413
- }
414
- return undefined;
415
- }
416
- get undefinedPagination() {
417
- if (this.page?.pagination?.type === 'undefined') {
418
- return this.page.pagination;
419
- }
420
- return undefined;
421
- }
422
- getCurrentLength() {
423
- return this.page?.pagination.size;
424
- }
425
- getItems() {
426
- return this.page?.items;
427
- }
428
- loadingAround(action) {
429
- return this.loader.listen(action);
430
- }
431
- numericPageEvent(page, size) {
432
- this.paginate.emit({
433
- type: 'numeric',
434
- page,
435
- size,
436
- });
437
- }
438
- undefinedPageEvent(action, size) {
439
- this.paginate.emit({
440
- type: 'undefined',
441
- action,
442
- size
443
- });
444
- }
445
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: PaginatedTableComponent, deps: [{ token: i1.MobileService }, { token: PAGINATION_CONFIGURATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
446
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.9", type: PaginatedTableComponent, isStandalone: true, selector: "mcl-table[page]", inputs: { sizes: "sizes", page: "page" }, outputs: { paginate: "paginate" }, providers: [
447
- {
448
- provide: MatPaginatorIntl, deps: [TranslateService],
449
- useFactory: PaginatorIntlFactory
450
- }
451
- ], viewQueries: [{ propertyName: "loader", first: true, predicate: LoaderComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"table\" #div>\n <div class=\"table__container\">\n <table mat-table [dataSource]=\"itemsSubject\">\n <tr mat-header-row *matHeaderRowDef=\"activeColumnNames; sticky: sticky\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: activeColumnNames;\"></tr>\n\n @if (hasFooter) {\n <tr mat-footer-row *matFooterRowDef=\"activeColumnNames;\"></tr>\n }\n </table>\n\n @if (!items?.length) {\n <div class=\"table__empty\">\n @if (emptyStatePlaceholder) {\n <ng-content select=\"[mclEmptyState]\"></ng-content>\n } @else {\n <mat-icon class=\"table__empty-icon\">inbox</mat-icon>\n <div>{{ emptyStateMessage | translate }}</div>\n }\n </div>\n }\n </div>\n\n @if (numericPagination) {\n <mcl-numeric-paginator [pageSize]=\"numericPagination.size\"\n (page)=\"numericPageEvent($event.pageIndex + 1, $event.pageSize)\"\n [pageIndex]=\"(numericPagination.page || 1) - 1\"\n [length]=\"numericPagination.total\"\n [pageSizeOptions]=\"sizes\"\n [showFirstLastButtons]=\"true\">\n </mcl-numeric-paginator>\n } @else if (undefinedPagination) {\n <mcl-undefined-paginator\n [pageSize]=\"undefinedPagination.size\"\n [hasNext]=\"!!undefinedPagination.nextPageRef\"\n [hasPrevious]=\"!!undefinedPagination.previousPageRef\"\n (page)=\"undefinedPageEvent($event.action, $event.size)\"\n ></mcl-undefined-paginator>\n }\n\n <mcl-loader [showOnInit]=\"true\" [component]=\"div\"></mcl-loader>\n</div>\n", styles: ["", "@charset \"UTF-8\";:host{--tbl-bg: var(--lib-color-surface, var(--mat-sys-surface));--tbl-fg: var(--lib-color-on-surface, var(--mat-sys-on-surface));--tbl-muted: var(--lib-color-on-surface-variant, var(--mat-sys-on-surface-variant));--tbl-border: var(--lib-color-outline-variant, var(--mat-sys-outline-variant));--tbl-primary: var(--lib-color-primary, var(--mat-sys-primary));--tbl-header-bg: var(--lib-color-surface-container-low, var(--mat-sys-surface-container-low));--tbl-radius: var(--mcl-radius-md, 12px);display:block}.table{background:var(--tbl-bg);color:var(--tbl-fg);border:1px solid var(--tbl-border);border-radius:var(--tbl-radius);box-shadow:var(--mcl-shadow-1, 0 1px 3px rgba(0, 0, 0, .05));overflow:hidden}.table__container{overflow:auto}.mat-mdc-table{width:100%;border-collapse:separate;border-spacing:0;background:transparent;font-size:.9rem}.mat-mdc-table thead tr,.mat-mdc-header-row{background:var(--tbl-header-bg);height:auto}.mat-mdc-row{height:auto;transition:background-color var(--mcl-transition, .18s ease)}.mat-mdc-row:hover{background:color-mix(in oklab,var(--tbl-fg) 4%,var(--tbl-bg))}.mat-mdc-row:focus-within{outline:2px solid var(--tbl-primary);outline-offset:-2px}.table__empty{display:grid;justify-items:center;gap:8px;padding:48px 24px;text-align:center;color:var(--tbl-muted);font-size:.9rem}.table__empty-icon{font-size:36px;width:44px;height:44px;display:grid;place-items:center;border-radius:var(--mcl-radius-full, 999px);background:var(--tbl-header-bg);color:var(--tbl-muted)}:host(.is-sticky-header) .mat-mdc-header-row{position:sticky;top:0;z-index:2;box-shadow:0 1px 0 0 var(--tbl-border)}.c-col--right{text-align:right}.c-col--strong{font-weight:600;color:var(--tbl-fg)}.c-col--muted{color:var(--tbl-muted)}\n"], dependencies: [{ kind: "component", type: MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "component", type: MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "component", type: MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "directive", type: MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "component", type: NumericPaginatorComponent, selector: "mcl-numeric-paginator", inputs: ["length", "pageIndex", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "disabled"], outputs: ["page"] }, { kind: "component", type: UndefinedPaginatorComponent, selector: "mcl-undefined-paginator", inputs: ["pageSize", "hasPrevious", "hasNext"], outputs: ["page"] }, { kind: "component", type: LoaderComponent, selector: "mcl-loader", inputs: ["progresso", "show", "labelLoading", "showOnInit", "component"], exportAs: ["loader"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
756
+ return new PaginatorI18n(translateService).getPaginatorIntl();
452
757
  }
453
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: PaginatedTableComponent, decorators: [{
454
- type: Component,
455
- args: [{ selector: 'mcl-table[page]', imports: [
456
- MatTable,
457
- MatHeaderRow,
458
- MatRow,
459
- MatHeaderRowDef,
460
- MatRowDef,
461
- MatFooterRow,
462
- MatFooterRowDef,
463
- TranslatePipe,
464
- NumericPaginatorComponent,
465
- UndefinedPaginatorComponent,
466
- LoaderComponent,
467
- MatIcon
468
- ], providers: [
469
- {
470
- provide: MatPaginatorIntl, deps: [TranslateService],
471
- useFactory: PaginatorIntlFactory
472
- }
473
- ], template: "<div class=\"table\" #div>\n <div class=\"table__container\">\n <table mat-table [dataSource]=\"itemsSubject\">\n <tr mat-header-row *matHeaderRowDef=\"activeColumnNames; sticky: sticky\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: activeColumnNames;\"></tr>\n\n @if (hasFooter) {\n <tr mat-footer-row *matFooterRowDef=\"activeColumnNames;\"></tr>\n }\n </table>\n\n @if (!items?.length) {\n <div class=\"table__empty\">\n @if (emptyStatePlaceholder) {\n <ng-content select=\"[mclEmptyState]\"></ng-content>\n } @else {\n <mat-icon class=\"table__empty-icon\">inbox</mat-icon>\n <div>{{ emptyStateMessage | translate }}</div>\n }\n </div>\n }\n </div>\n\n @if (numericPagination) {\n <mcl-numeric-paginator [pageSize]=\"numericPagination.size\"\n (page)=\"numericPageEvent($event.pageIndex + 1, $event.pageSize)\"\n [pageIndex]=\"(numericPagination.page || 1) - 1\"\n [length]=\"numericPagination.total\"\n [pageSizeOptions]=\"sizes\"\n [showFirstLastButtons]=\"true\">\n </mcl-numeric-paginator>\n } @else if (undefinedPagination) {\n <mcl-undefined-paginator\n [pageSize]=\"undefinedPagination.size\"\n [hasNext]=\"!!undefinedPagination.nextPageRef\"\n [hasPrevious]=\"!!undefinedPagination.previousPageRef\"\n (page)=\"undefinedPageEvent($event.action, $event.size)\"\n ></mcl-undefined-paginator>\n }\n\n <mcl-loader [showOnInit]=\"true\" [component]=\"div\"></mcl-loader>\n</div>\n", styles: ["@charset \"UTF-8\";:host{--tbl-bg: var(--lib-color-surface, var(--mat-sys-surface));--tbl-fg: var(--lib-color-on-surface, var(--mat-sys-on-surface));--tbl-muted: var(--lib-color-on-surface-variant, var(--mat-sys-on-surface-variant));--tbl-border: var(--lib-color-outline-variant, var(--mat-sys-outline-variant));--tbl-primary: var(--lib-color-primary, var(--mat-sys-primary));--tbl-header-bg: var(--lib-color-surface-container-low, var(--mat-sys-surface-container-low));--tbl-radius: var(--mcl-radius-md, 12px);display:block}.table{background:var(--tbl-bg);color:var(--tbl-fg);border:1px solid var(--tbl-border);border-radius:var(--tbl-radius);box-shadow:var(--mcl-shadow-1, 0 1px 3px rgba(0, 0, 0, .05));overflow:hidden}.table__container{overflow:auto}.mat-mdc-table{width:100%;border-collapse:separate;border-spacing:0;background:transparent;font-size:.9rem}.mat-mdc-table thead tr,.mat-mdc-header-row{background:var(--tbl-header-bg);height:auto}.mat-mdc-row{height:auto;transition:background-color var(--mcl-transition, .18s ease)}.mat-mdc-row:hover{background:color-mix(in oklab,var(--tbl-fg) 4%,var(--tbl-bg))}.mat-mdc-row:focus-within{outline:2px solid var(--tbl-primary);outline-offset:-2px}.table__empty{display:grid;justify-items:center;gap:8px;padding:48px 24px;text-align:center;color:var(--tbl-muted);font-size:.9rem}.table__empty-icon{font-size:36px;width:44px;height:44px;display:grid;place-items:center;border-radius:var(--mcl-radius-full, 999px);background:var(--tbl-header-bg);color:var(--tbl-muted)}:host(.is-sticky-header) .mat-mdc-header-row{position:sticky;top:0;z-index:2;box-shadow:0 1px 0 0 var(--tbl-border)}.c-col--right{text-align:right}.c-col--strong{font-weight:600;color:var(--tbl-fg)}.c-col--muted{color:var(--tbl-muted)}\n"] }]
474
- }], ctorParameters: () => [{ type: i1.MobileService }, { type: undefined, decorators: [{
475
- type: Inject,
476
- args: [PAGINATION_CONFIGURATION]
477
- }, {
478
- type: Optional
479
- }] }], propDecorators: { sizes: [{
480
- type: Input
481
- }], paginate: [{
482
- type: Output
483
- }], page: [{
484
- type: Input
485
- }], loader: [{
486
- type: ViewChild,
487
- args: [LoaderComponent]
488
- }] } });
489
-
490
- class VirtualPaginatedTableComponent extends TableComponent {
491
- sizes;
492
- paginate = new EventEmitter();
493
- loader;
494
- pageItems = [];
495
- page = 1;
496
- size = 10;
497
- constructor(mobileService, paginationConfiguration) {
498
- super(mobileService);
499
- this.sizes = paginationConfiguration?.sizes || [10, 25, 50];
500
- }
501
- get outerItems() {
502
- return super.outerItems;
503
- }
504
- set outerItems(items) {
505
- if (items !== super.outerItems) {
506
- super.outerItems = items;
507
- this.page = 1;
508
- this.pageItems = super.outerItems?.slice((this.page - 1) * this.size, this.page * this.size) || [];
509
- }
510
- }
511
- get numericPagination() {
512
- return {
513
- type: 'numeric',
514
- size: this.size,
515
- total: this.outerItems?.length || 0,
516
- page: this.page,
517
- hasNext: (this.outerItems?.length || 0) > ((this.page - 1) * this.size),
518
- hasPrevious: this.page > 1
519
- };
520
- }
521
- get undefinedPagination() {
522
- return undefined;
523
- }
524
- ngAfterViewInit() {
525
- super.ngAfterViewInit();
526
- this.loader?.hide();
527
- }
528
- getCurrentLength() {
529
- return this.outerItems?.length;
530
- }
531
- getItems() {
532
- return this.pageItems;
533
- }
534
- loadingAround(action) {
535
- return this.loader.listen(action);
536
- }
537
- numericPageEvent(page, size) {
538
- this.page = page;
539
- this.size = size;
540
- this.pageItems = this.outerItems?.slice((this.page - 1) * this.size, this.page * this.size) || [];
541
- }
542
- undefinedPageEvent(action, size) {
543
- }
544
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: VirtualPaginatedTableComponent, deps: [{ token: i1.MobileService }, { token: PAGINATION_CONFIGURATION, optional: true }], target: i0.ɵɵFactoryTarget.Component });
545
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.9", type: VirtualPaginatedTableComponent, isStandalone: true, selector: "mcl-table[paginated]", inputs: { sizes: "sizes", outerItems: ["items", "outerItems"] }, outputs: { paginate: "paginate" }, providers: [
546
- {
547
- provide: MatPaginatorIntl, deps: [TranslateService],
548
- useFactory: PaginatorIntlFactory
549
- }
550
- ], viewQueries: [{ propertyName: "loader", first: true, predicate: LoaderComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"table\" #div>\n <div class=\"table__container\">\n <table mat-table [dataSource]=\"itemsSubject\">\n <tr mat-header-row *matHeaderRowDef=\"activeColumnNames; sticky: sticky\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: activeColumnNames;\"></tr>\n\n @if (hasFooter) {\n <tr mat-footer-row *matFooterRowDef=\"activeColumnNames;\"></tr>\n }\n </table>\n\n @if (!items?.length) {\n <div class=\"table__empty\">\n @if (emptyStatePlaceholder) {\n <ng-content select=\"[mclEmptyState]\"></ng-content>\n } @else {\n <mat-icon class=\"table__empty-icon\">inbox</mat-icon>\n <div>{{ emptyStateMessage | translate }}</div>\n }\n </div>\n }\n </div>\n\n @if (numericPagination) {\n <mcl-numeric-paginator [pageSize]=\"numericPagination.size\"\n (page)=\"numericPageEvent($event.pageIndex + 1, $event.pageSize)\"\n [pageIndex]=\"(numericPagination.page || 1) - 1\"\n [length]=\"numericPagination.total\"\n [pageSizeOptions]=\"sizes\"\n [showFirstLastButtons]=\"true\">\n </mcl-numeric-paginator>\n } @else if (undefinedPagination) {\n <mcl-undefined-paginator\n [pageSize]=\"undefinedPagination.size\"\n [hasNext]=\"!!undefinedPagination.nextPageRef\"\n [hasPrevious]=\"!!undefinedPagination.previousPageRef\"\n (page)=\"undefinedPageEvent($event.action, $event.size)\"\n ></mcl-undefined-paginator>\n }\n\n <mcl-loader [showOnInit]=\"true\" [component]=\"div\"></mcl-loader>\n</div>\n", styles: ["", "@charset \"UTF-8\";:host{--tbl-bg: var(--lib-color-surface, var(--mat-sys-surface));--tbl-fg: var(--lib-color-on-surface, var(--mat-sys-on-surface));--tbl-muted: var(--lib-color-on-surface-variant, var(--mat-sys-on-surface-variant));--tbl-border: var(--lib-color-outline-variant, var(--mat-sys-outline-variant));--tbl-primary: var(--lib-color-primary, var(--mat-sys-primary));--tbl-header-bg: var(--lib-color-surface-container-low, var(--mat-sys-surface-container-low));--tbl-radius: var(--mcl-radius-md, 12px);display:block}.table{background:var(--tbl-bg);color:var(--tbl-fg);border:1px solid var(--tbl-border);border-radius:var(--tbl-radius);box-shadow:var(--mcl-shadow-1, 0 1px 3px rgba(0, 0, 0, .05));overflow:hidden}.table__container{overflow:auto}.mat-mdc-table{width:100%;border-collapse:separate;border-spacing:0;background:transparent;font-size:.9rem}.mat-mdc-table thead tr,.mat-mdc-header-row{background:var(--tbl-header-bg);height:auto}.mat-mdc-row{height:auto;transition:background-color var(--mcl-transition, .18s ease)}.mat-mdc-row:hover{background:color-mix(in oklab,var(--tbl-fg) 4%,var(--tbl-bg))}.mat-mdc-row:focus-within{outline:2px solid var(--tbl-primary);outline-offset:-2px}.table__empty{display:grid;justify-items:center;gap:8px;padding:48px 24px;text-align:center;color:var(--tbl-muted);font-size:.9rem}.table__empty-icon{font-size:36px;width:44px;height:44px;display:grid;place-items:center;border-radius:var(--mcl-radius-full, 999px);background:var(--tbl-header-bg);color:var(--tbl-muted)}:host(.is-sticky-header) .mat-mdc-header-row{position:sticky;top:0;z-index:2;box-shadow:0 1px 0 0 var(--tbl-border)}.c-col--right{text-align:right}.c-col--strong{font-weight:600;color:var(--tbl-fg)}.c-col--muted{color:var(--tbl-muted)}\n"], dependencies: [{ kind: "component", type: MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "component", type: MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "component", type: MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { kind: "directive", type: MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "component", type: NumericPaginatorComponent, selector: "mcl-numeric-paginator", inputs: ["length", "pageIndex", "pageSize", "pageSizeOptions", "hidePageSize", "showFirstLastButtons", "disabled"], outputs: ["page"] }, { kind: "component", type: UndefinedPaginatorComponent, selector: "mcl-undefined-paginator", inputs: ["pageSize", "hasPrevious", "hasNext"], outputs: ["page"] }, { kind: "component", type: LoaderComponent, selector: "mcl-loader", inputs: ["progresso", "show", "labelLoading", "showOnInit", "component"], exportAs: ["loader"] }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] });
551
- }
552
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: VirtualPaginatedTableComponent, decorators: [{
553
- type: Component,
554
- args: [{ selector: 'mcl-table[paginated]', imports: [
555
- MatTable,
556
- MatHeaderRow,
557
- MatRow,
558
- MatHeaderRowDef,
559
- MatRowDef,
560
- MatFooterRow,
561
- MatFooterRowDef,
562
- TranslatePipe,
563
- NumericPaginatorComponent,
564
- UndefinedPaginatorComponent,
565
- LoaderComponent,
566
- MatIcon
567
- ], providers: [
568
- {
569
- provide: MatPaginatorIntl, deps: [TranslateService],
570
- useFactory: PaginatorIntlFactory
571
- }
572
- ], template: "<div class=\"table\" #div>\n <div class=\"table__container\">\n <table mat-table [dataSource]=\"itemsSubject\">\n <tr mat-header-row *matHeaderRowDef=\"activeColumnNames; sticky: sticky\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: activeColumnNames;\"></tr>\n\n @if (hasFooter) {\n <tr mat-footer-row *matFooterRowDef=\"activeColumnNames;\"></tr>\n }\n </table>\n\n @if (!items?.length) {\n <div class=\"table__empty\">\n @if (emptyStatePlaceholder) {\n <ng-content select=\"[mclEmptyState]\"></ng-content>\n } @else {\n <mat-icon class=\"table__empty-icon\">inbox</mat-icon>\n <div>{{ emptyStateMessage | translate }}</div>\n }\n </div>\n }\n </div>\n\n @if (numericPagination) {\n <mcl-numeric-paginator [pageSize]=\"numericPagination.size\"\n (page)=\"numericPageEvent($event.pageIndex + 1, $event.pageSize)\"\n [pageIndex]=\"(numericPagination.page || 1) - 1\"\n [length]=\"numericPagination.total\"\n [pageSizeOptions]=\"sizes\"\n [showFirstLastButtons]=\"true\">\n </mcl-numeric-paginator>\n } @else if (undefinedPagination) {\n <mcl-undefined-paginator\n [pageSize]=\"undefinedPagination.size\"\n [hasNext]=\"!!undefinedPagination.nextPageRef\"\n [hasPrevious]=\"!!undefinedPagination.previousPageRef\"\n (page)=\"undefinedPageEvent($event.action, $event.size)\"\n ></mcl-undefined-paginator>\n }\n\n <mcl-loader [showOnInit]=\"true\" [component]=\"div\"></mcl-loader>\n</div>\n", styles: ["@charset \"UTF-8\";:host{--tbl-bg: var(--lib-color-surface, var(--mat-sys-surface));--tbl-fg: var(--lib-color-on-surface, var(--mat-sys-on-surface));--tbl-muted: var(--lib-color-on-surface-variant, var(--mat-sys-on-surface-variant));--tbl-border: var(--lib-color-outline-variant, var(--mat-sys-outline-variant));--tbl-primary: var(--lib-color-primary, var(--mat-sys-primary));--tbl-header-bg: var(--lib-color-surface-container-low, var(--mat-sys-surface-container-low));--tbl-radius: var(--mcl-radius-md, 12px);display:block}.table{background:var(--tbl-bg);color:var(--tbl-fg);border:1px solid var(--tbl-border);border-radius:var(--tbl-radius);box-shadow:var(--mcl-shadow-1, 0 1px 3px rgba(0, 0, 0, .05));overflow:hidden}.table__container{overflow:auto}.mat-mdc-table{width:100%;border-collapse:separate;border-spacing:0;background:transparent;font-size:.9rem}.mat-mdc-table thead tr,.mat-mdc-header-row{background:var(--tbl-header-bg);height:auto}.mat-mdc-row{height:auto;transition:background-color var(--mcl-transition, .18s ease)}.mat-mdc-row:hover{background:color-mix(in oklab,var(--tbl-fg) 4%,var(--tbl-bg))}.mat-mdc-row:focus-within{outline:2px solid var(--tbl-primary);outline-offset:-2px}.table__empty{display:grid;justify-items:center;gap:8px;padding:48px 24px;text-align:center;color:var(--tbl-muted);font-size:.9rem}.table__empty-icon{font-size:36px;width:44px;height:44px;display:grid;place-items:center;border-radius:var(--mcl-radius-full, 999px);background:var(--tbl-header-bg);color:var(--tbl-muted)}:host(.is-sticky-header) .mat-mdc-header-row{position:sticky;top:0;z-index:2;box-shadow:0 1px 0 0 var(--tbl-border)}.c-col--right{text-align:right}.c-col--strong{font-weight:600;color:var(--tbl-fg)}.c-col--muted{color:var(--tbl-muted)}\n"] }]
573
- }], ctorParameters: () => [{ type: i1.MobileService }, { type: undefined, decorators: [{
574
- type: Inject,
575
- args: [PAGINATION_CONFIGURATION]
576
- }, {
577
- type: Optional
578
- }] }], propDecorators: { sizes: [{
579
- type: Input
580
- }], paginate: [{
581
- type: Output
582
- }], loader: [{
583
- type: ViewChild,
584
- args: [LoaderComponent]
585
- }], outerItems: [{
586
- type: Input,
587
- args: ['items']
588
- }] } });
589
-
590
- class TdComponent {
591
- constructor(element) {
592
- element.nativeElement.classList.add('mat-cell');
593
- }
594
- ngOnInit() {
595
- }
596
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TdComponent, deps: [{ token: i0.ElementRef, self: true }], target: i0.ɵɵFactoryTarget.Component });
597
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.9", type: TdComponent, isStandalone: true, selector: "td,mcl-td", ngImport: i0, template: "<ng-content></ng-content>\n", styles: [""] });
598
- }
599
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TdComponent, decorators: [{
600
- type: Component,
601
- args: [{ selector: 'td,mcl-td', template: "<ng-content></ng-content>\n" }]
602
- }], ctorParameters: () => [{ type: i0.ElementRef, decorators: [{
603
- type: Self
604
- }] }] });
605
-
606
- class ThComponent {
607
- constructor(element) {
608
- element.nativeElement.classList.add('mat-header-cell');
609
- }
610
- ngOnInit() {
611
- }
612
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: ThComponent, deps: [{ token: i0.ElementRef, self: true }], target: i0.ɵɵFactoryTarget.Component });
613
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.9", type: ThComponent, isStandalone: true, selector: "th,mcl-th", ngImport: i0, template: "<ng-content></ng-content>\n", styles: [""] });
614
- }
615
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: ThComponent, decorators: [{
616
- type: Component,
617
- args: [{ selector: 'th,mcl-th', template: "<ng-content></ng-content>\n" }]
618
- }], ctorParameters: () => [{ type: i0.ElementRef, decorators: [{
619
- type: Self
620
- }] }] });
621
-
622
- /**
623
- * Generated bundle index. Do not edit.
624
- */
625
-
758
+ var PaginatedTableComponent = class PaginatedTableComponent extends TableComponent {
759
+ sizes;
760
+ paginate = new EventEmitter();
761
+ page;
762
+ loader;
763
+ constructor(mobileService, paginationConfiguration) {
764
+ super(mobileService);
765
+ this.sizes = paginationConfiguration?.sizes || [
766
+ 10,
767
+ 25,
768
+ 50
769
+ ];
770
+ }
771
+ get numericPagination() {
772
+ if (this.page?.pagination?.type === "numeric") return this.page.pagination;
773
+ }
774
+ get undefinedPagination() {
775
+ if (this.page?.pagination?.type === "undefined") return this.page.pagination;
776
+ }
777
+ getCurrentLength() {
778
+ return this.page?.pagination.size;
779
+ }
780
+ getItems() {
781
+ return this.page?.items;
782
+ }
783
+ loadingAround(action) {
784
+ return this.loader.listen(action);
785
+ }
786
+ numericPageEvent(page, size) {
787
+ this.paginate.emit({
788
+ type: "numeric",
789
+ page,
790
+ size
791
+ });
792
+ }
793
+ undefinedPageEvent(action, size) {
794
+ this.paginate.emit({
795
+ type: "undefined",
796
+ action,
797
+ size
798
+ });
799
+ }
800
+ static ɵfac = i0.ɵɵngDeclareFactory({
801
+ minVersion: "12.0.0",
802
+ version: "22.3.2",
803
+ ngImport: i0,
804
+ type: PaginatedTableComponent,
805
+ deps: [{ token: MobileService }, {
806
+ token: PAGINATION_CONFIGURATION,
807
+ optional: true
808
+ }],
809
+ target: i0.ɵɵFactoryTarget.Component
810
+ });
811
+ static ɵcmp = i0.ɵɵngDeclareComponent({
812
+ minVersion: "17.0.0",
813
+ version: "22.3.2",
814
+ type: PaginatedTableComponent,
815
+ isStandalone: true,
816
+ selector: "mcl-table[page]",
817
+ inputs: {
818
+ sizes: "sizes",
819
+ page: "page"
820
+ },
821
+ outputs: { paginate: "paginate" },
822
+ providers: [{
823
+ provide: MatPaginatorIntl,
824
+ deps: [TranslateService],
825
+ useFactory: PaginatorIntlFactory
826
+ }],
827
+ viewQueries: [{
828
+ propertyName: "loader",
829
+ first: true,
830
+ predicate: LoaderComponent,
831
+ descendants: true
832
+ }],
833
+ usesInheritance: true,
834
+ ngImport: i0,
835
+ template: "<div class=\"table\" #div>\n <div class=\"table__container\">\n <table mat-table [dataSource]=\"itemsSubject\">\n <tr mat-header-row *matHeaderRowDef=\"activeColumnNames; sticky: sticky\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: activeColumnNames;\"></tr>\n\n @if (hasFooter) {\n <tr mat-footer-row *matFooterRowDef=\"activeColumnNames;\"></tr>\n }\n </table>\n\n @if (!items?.length) {\n <div class=\"table__empty\">\n @if (emptyStatePlaceholder) {\n <ng-content select=\"[mclEmptyState]\"></ng-content>\n } @else {\n <mat-icon class=\"table__empty-icon\">inbox</mat-icon>\n <div>{{ emptyStateMessage | translate }}</div>\n }\n </div>\n }\n </div>\n\n @if (numericPagination) {\n <mcl-numeric-paginator [pageSize]=\"numericPagination.size\"\n (page)=\"numericPageEvent($event.pageIndex + 1, $event.pageSize)\"\n [pageIndex]=\"(numericPagination.page || 1) - 1\"\n [length]=\"numericPagination.total\"\n [pageSizeOptions]=\"sizes\"\n [showFirstLastButtons]=\"true\">\n </mcl-numeric-paginator>\n } @else if (undefinedPagination) {\n <mcl-undefined-paginator\n [pageSize]=\"undefinedPagination.size\"\n [hasNext]=\"!!undefinedPagination.nextPageRef\"\n [hasPrevious]=\"!!undefinedPagination.previousPageRef\"\n (page)=\"undefinedPageEvent($event.action, $event.size)\"\n ></mcl-undefined-paginator>\n }\n\n <mcl-loader [showOnInit]=\"true\" [component]=\"div\"></mcl-loader>\n</div>\n",
836
+ styles: ["", "@charset \"UTF-8\";:host{--tbl-bg: var(--lib-color-surface, var(--mat-sys-surface));--tbl-fg: var(--lib-color-on-surface, var(--mat-sys-on-surface));--tbl-muted: var(--lib-color-on-surface-variant, var(--mat-sys-on-surface-variant));--tbl-border: var(--lib-color-outline-variant, var(--mat-sys-outline-variant));--tbl-primary: var(--lib-color-primary, var(--mat-sys-primary));--tbl-header-bg: var(--lib-color-surface-container-low, var(--mat-sys-surface-container-low));--tbl-radius: var(--mcl-radius-md, 12px);display:block}.table{background:var(--tbl-bg);color:var(--tbl-fg);border:1px solid var(--tbl-border);border-radius:var(--tbl-radius);box-shadow:var(--mcl-shadow-1, 0 1px 3px rgba(0, 0, 0, .05));overflow:hidden}.table__container{overflow:auto}.mat-mdc-table{width:100%;border-collapse:separate;border-spacing:0;background:transparent;font-size:.9rem}.mat-mdc-table thead tr,.mat-mdc-header-row{background:var(--tbl-header-bg);height:auto}.mat-mdc-row{height:auto;transition:background-color var(--mcl-transition, .18s ease)}.mat-mdc-row:hover{background:color-mix(in oklab,var(--tbl-fg) 4%,var(--tbl-bg))}.mat-mdc-row:focus-within{outline:2px solid var(--tbl-primary);outline-offset:-2px}.table__empty{display:grid;justify-items:center;gap:8px;padding:48px 24px;text-align:center;color:var(--tbl-muted);font-size:.9rem}.table__empty-icon{font-size:36px;width:44px;height:44px;display:grid;place-items:center;border-radius:var(--mcl-radius-full, 999px);background:var(--tbl-header-bg);color:var(--tbl-muted)}:host(.is-sticky-header) .mat-mdc-header-row{position:sticky;top:0;z-index:2;box-shadow:0 1px 0 0 var(--tbl-border)}.c-col--right{text-align:right}.c-col--strong{font-weight:600;color:var(--tbl-fg)}.c-col--muted{color:var(--tbl-muted)}\n"],
837
+ dependencies: [
838
+ {
839
+ kind: "component",
840
+ type: MatTable,
841
+ selector: "mat-table, table[mat-table]",
842
+ exportAs: ["matTable"]
843
+ },
844
+ {
845
+ kind: "component",
846
+ type: MatHeaderRow,
847
+ selector: "mat-header-row, tr[mat-header-row]",
848
+ exportAs: ["matHeaderRow"]
849
+ },
850
+ {
851
+ kind: "component",
852
+ type: MatRow,
853
+ selector: "mat-row, tr[mat-row]",
854
+ exportAs: ["matRow"]
855
+ },
856
+ {
857
+ kind: "directive",
858
+ type: MatHeaderRowDef,
859
+ selector: "[matHeaderRowDef]",
860
+ inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"]
861
+ },
862
+ {
863
+ kind: "directive",
864
+ type: MatRowDef,
865
+ selector: "[matRowDef]",
866
+ inputs: ["matRowDefColumns", "matRowDefWhen"]
867
+ },
868
+ {
869
+ kind: "component",
870
+ type: MatFooterRow,
871
+ selector: "mat-footer-row, tr[mat-footer-row]",
872
+ exportAs: ["matFooterRow"]
873
+ },
874
+ {
875
+ kind: "directive",
876
+ type: MatFooterRowDef,
877
+ selector: "[matFooterRowDef]",
878
+ inputs: ["matFooterRowDef", "matFooterRowDefSticky"]
879
+ },
880
+ {
881
+ kind: "component",
882
+ type: NumericPaginatorComponent,
883
+ selector: "mcl-numeric-paginator",
884
+ inputs: [
885
+ "length",
886
+ "pageIndex",
887
+ "pageSize",
888
+ "pageSizeOptions",
889
+ "hidePageSize",
890
+ "showFirstLastButtons",
891
+ "disabled"
892
+ ],
893
+ outputs: ["page"]
894
+ },
895
+ {
896
+ kind: "component",
897
+ type: UndefinedPaginatorComponent,
898
+ selector: "mcl-undefined-paginator",
899
+ inputs: [
900
+ "pageSize",
901
+ "hasPrevious",
902
+ "hasNext"
903
+ ],
904
+ outputs: ["page"]
905
+ },
906
+ {
907
+ kind: "component",
908
+ type: LoaderComponent,
909
+ selector: "mcl-loader",
910
+ inputs: [
911
+ "progresso",
912
+ "show",
913
+ "labelLoading",
914
+ "showOnInit",
915
+ "component"
916
+ ],
917
+ exportAs: ["loader"]
918
+ },
919
+ {
920
+ kind: "component",
921
+ type: MatIcon,
922
+ selector: "mat-icon",
923
+ inputs: [
924
+ "color",
925
+ "inline",
926
+ "svgIcon",
927
+ "fontSet",
928
+ "fontIcon"
929
+ ],
930
+ exportAs: ["matIcon"]
931
+ },
932
+ {
933
+ kind: "pipe",
934
+ type: TranslatePipe,
935
+ name: "translate"
936
+ }
937
+ ],
938
+ changeDetection: i0.ChangeDetectionStrategy.Eager
939
+ });
940
+ };
941
+ i0.ɵɵngDeclareClassMetadata({
942
+ minVersion: "12.0.0",
943
+ version: "22.3.2",
944
+ ngImport: i0,
945
+ type: PaginatedTableComponent,
946
+ decorators: [{
947
+ type: Component,
948
+ args: [{
949
+ selector: "mcl-table[page]",
950
+ imports: [
951
+ MatTable,
952
+ MatHeaderRow,
953
+ MatRow,
954
+ MatHeaderRowDef,
955
+ MatRowDef,
956
+ MatFooterRow,
957
+ MatFooterRowDef,
958
+ TranslatePipe,
959
+ NumericPaginatorComponent,
960
+ UndefinedPaginatorComponent,
961
+ LoaderComponent,
962
+ MatIcon
963
+ ],
964
+ changeDetection: ChangeDetectionStrategy.Eager,
965
+ providers: [{
966
+ provide: MatPaginatorIntl,
967
+ deps: [TranslateService],
968
+ useFactory: PaginatorIntlFactory
969
+ }],
970
+ template: "<div class=\"table\" #div>\n <div class=\"table__container\">\n <table mat-table [dataSource]=\"itemsSubject\">\n <tr mat-header-row *matHeaderRowDef=\"activeColumnNames; sticky: sticky\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: activeColumnNames;\"></tr>\n\n @if (hasFooter) {\n <tr mat-footer-row *matFooterRowDef=\"activeColumnNames;\"></tr>\n }\n </table>\n\n @if (!items?.length) {\n <div class=\"table__empty\">\n @if (emptyStatePlaceholder) {\n <ng-content select=\"[mclEmptyState]\"></ng-content>\n } @else {\n <mat-icon class=\"table__empty-icon\">inbox</mat-icon>\n <div>{{ emptyStateMessage | translate }}</div>\n }\n </div>\n }\n </div>\n\n @if (numericPagination) {\n <mcl-numeric-paginator [pageSize]=\"numericPagination.size\"\n (page)=\"numericPageEvent($event.pageIndex + 1, $event.pageSize)\"\n [pageIndex]=\"(numericPagination.page || 1) - 1\"\n [length]=\"numericPagination.total\"\n [pageSizeOptions]=\"sizes\"\n [showFirstLastButtons]=\"true\">\n </mcl-numeric-paginator>\n } @else if (undefinedPagination) {\n <mcl-undefined-paginator\n [pageSize]=\"undefinedPagination.size\"\n [hasNext]=\"!!undefinedPagination.nextPageRef\"\n [hasPrevious]=\"!!undefinedPagination.previousPageRef\"\n (page)=\"undefinedPageEvent($event.action, $event.size)\"\n ></mcl-undefined-paginator>\n }\n\n <mcl-loader [showOnInit]=\"true\" [component]=\"div\"></mcl-loader>\n</div>\n",
971
+ styles: ["@charset \"UTF-8\";:host{--tbl-bg: var(--lib-color-surface, var(--mat-sys-surface));--tbl-fg: var(--lib-color-on-surface, var(--mat-sys-on-surface));--tbl-muted: var(--lib-color-on-surface-variant, var(--mat-sys-on-surface-variant));--tbl-border: var(--lib-color-outline-variant, var(--mat-sys-outline-variant));--tbl-primary: var(--lib-color-primary, var(--mat-sys-primary));--tbl-header-bg: var(--lib-color-surface-container-low, var(--mat-sys-surface-container-low));--tbl-radius: var(--mcl-radius-md, 12px);display:block}.table{background:var(--tbl-bg);color:var(--tbl-fg);border:1px solid var(--tbl-border);border-radius:var(--tbl-radius);box-shadow:var(--mcl-shadow-1, 0 1px 3px rgba(0, 0, 0, .05));overflow:hidden}.table__container{overflow:auto}.mat-mdc-table{width:100%;border-collapse:separate;border-spacing:0;background:transparent;font-size:.9rem}.mat-mdc-table thead tr,.mat-mdc-header-row{background:var(--tbl-header-bg);height:auto}.mat-mdc-row{height:auto;transition:background-color var(--mcl-transition, .18s ease)}.mat-mdc-row:hover{background:color-mix(in oklab,var(--tbl-fg) 4%,var(--tbl-bg))}.mat-mdc-row:focus-within{outline:2px solid var(--tbl-primary);outline-offset:-2px}.table__empty{display:grid;justify-items:center;gap:8px;padding:48px 24px;text-align:center;color:var(--tbl-muted);font-size:.9rem}.table__empty-icon{font-size:36px;width:44px;height:44px;display:grid;place-items:center;border-radius:var(--mcl-radius-full, 999px);background:var(--tbl-header-bg);color:var(--tbl-muted)}:host(.is-sticky-header) .mat-mdc-header-row{position:sticky;top:0;z-index:2;box-shadow:0 1px 0 0 var(--tbl-border)}.c-col--right{text-align:right}.c-col--strong{font-weight:600;color:var(--tbl-fg)}.c-col--muted{color:var(--tbl-muted)}\n"]
972
+ }]
973
+ }],
974
+ ctorParameters: () => [{ type: MobileService }, {
975
+ type: void 0,
976
+ decorators: [{
977
+ type: Inject,
978
+ args: [PAGINATION_CONFIGURATION]
979
+ }, { type: Optional }]
980
+ }],
981
+ propDecorators: {
982
+ sizes: [{ type: Input }],
983
+ paginate: [{ type: Output }],
984
+ page: [{ type: Input }],
985
+ loader: [{
986
+ type: ViewChild,
987
+ args: [LoaderComponent]
988
+ }]
989
+ }
990
+ });
991
+ var VirtualPaginatedTableComponent = class VirtualPaginatedTableComponent extends TableComponent {
992
+ sizes;
993
+ paginate = new EventEmitter();
994
+ loader;
995
+ pageItems = [];
996
+ page = 1;
997
+ size = 10;
998
+ constructor(mobileService, paginationConfiguration) {
999
+ super(mobileService);
1000
+ this.sizes = paginationConfiguration?.sizes || [
1001
+ 10,
1002
+ 25,
1003
+ 50
1004
+ ];
1005
+ }
1006
+ get outerItems() {
1007
+ return super.outerItems;
1008
+ }
1009
+ set outerItems(items) {
1010
+ if (items !== super.outerItems) {
1011
+ super.outerItems = items;
1012
+ this.page = 1;
1013
+ this.pageItems = super.outerItems?.slice((this.page - 1) * this.size, this.page * this.size) || [];
1014
+ }
1015
+ }
1016
+ get numericPagination() {
1017
+ return {
1018
+ type: "numeric",
1019
+ size: this.size,
1020
+ total: this.outerItems?.length || 0,
1021
+ page: this.page,
1022
+ hasNext: (this.outerItems?.length || 0) > (this.page - 1) * this.size,
1023
+ hasPrevious: this.page > 1
1024
+ };
1025
+ }
1026
+ get undefinedPagination() {}
1027
+ ngAfterViewInit() {
1028
+ super.ngAfterViewInit();
1029
+ this.loader?.hide();
1030
+ }
1031
+ getCurrentLength() {
1032
+ return this.outerItems?.length;
1033
+ }
1034
+ getItems() {
1035
+ return this.pageItems;
1036
+ }
1037
+ loadingAround(action) {
1038
+ return this.loader.listen(action);
1039
+ }
1040
+ numericPageEvent(page, size) {
1041
+ this.page = page;
1042
+ this.size = size;
1043
+ this.pageItems = this.outerItems?.slice((this.page - 1) * this.size, this.page * this.size) || [];
1044
+ }
1045
+ undefinedPageEvent(action, size) {}
1046
+ static ɵfac = i0.ɵɵngDeclareFactory({
1047
+ minVersion: "12.0.0",
1048
+ version: "22.3.2",
1049
+ ngImport: i0,
1050
+ type: VirtualPaginatedTableComponent,
1051
+ deps: [{ token: MobileService }, {
1052
+ token: PAGINATION_CONFIGURATION,
1053
+ optional: true
1054
+ }],
1055
+ target: i0.ɵɵFactoryTarget.Component
1056
+ });
1057
+ static ɵcmp = i0.ɵɵngDeclareComponent({
1058
+ minVersion: "17.0.0",
1059
+ version: "22.3.2",
1060
+ type: VirtualPaginatedTableComponent,
1061
+ isStandalone: true,
1062
+ selector: "mcl-table[paginated]",
1063
+ inputs: {
1064
+ sizes: "sizes",
1065
+ outerItems: ["items", "outerItems"]
1066
+ },
1067
+ outputs: { paginate: "paginate" },
1068
+ providers: [{
1069
+ provide: MatPaginatorIntl,
1070
+ deps: [TranslateService],
1071
+ useFactory: PaginatorIntlFactory
1072
+ }],
1073
+ viewQueries: [{
1074
+ propertyName: "loader",
1075
+ first: true,
1076
+ predicate: LoaderComponent,
1077
+ descendants: true
1078
+ }],
1079
+ usesInheritance: true,
1080
+ ngImport: i0,
1081
+ template: "<div class=\"table\" #div>\n <div class=\"table__container\">\n <table mat-table [dataSource]=\"itemsSubject\">\n <tr mat-header-row *matHeaderRowDef=\"activeColumnNames; sticky: sticky\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: activeColumnNames;\"></tr>\n\n @if (hasFooter) {\n <tr mat-footer-row *matFooterRowDef=\"activeColumnNames;\"></tr>\n }\n </table>\n\n @if (!items?.length) {\n <div class=\"table__empty\">\n @if (emptyStatePlaceholder) {\n <ng-content select=\"[mclEmptyState]\"></ng-content>\n } @else {\n <mat-icon class=\"table__empty-icon\">inbox</mat-icon>\n <div>{{ emptyStateMessage | translate }}</div>\n }\n </div>\n }\n </div>\n\n @if (numericPagination) {\n <mcl-numeric-paginator [pageSize]=\"numericPagination.size\"\n (page)=\"numericPageEvent($event.pageIndex + 1, $event.pageSize)\"\n [pageIndex]=\"(numericPagination.page || 1) - 1\"\n [length]=\"numericPagination.total\"\n [pageSizeOptions]=\"sizes\"\n [showFirstLastButtons]=\"true\">\n </mcl-numeric-paginator>\n } @else if (undefinedPagination) {\n <mcl-undefined-paginator\n [pageSize]=\"undefinedPagination.size\"\n [hasNext]=\"!!undefinedPagination.nextPageRef\"\n [hasPrevious]=\"!!undefinedPagination.previousPageRef\"\n (page)=\"undefinedPageEvent($event.action, $event.size)\"\n ></mcl-undefined-paginator>\n }\n\n <mcl-loader [showOnInit]=\"true\" [component]=\"div\"></mcl-loader>\n</div>\n",
1082
+ styles: ["", "@charset \"UTF-8\";:host{--tbl-bg: var(--lib-color-surface, var(--mat-sys-surface));--tbl-fg: var(--lib-color-on-surface, var(--mat-sys-on-surface));--tbl-muted: var(--lib-color-on-surface-variant, var(--mat-sys-on-surface-variant));--tbl-border: var(--lib-color-outline-variant, var(--mat-sys-outline-variant));--tbl-primary: var(--lib-color-primary, var(--mat-sys-primary));--tbl-header-bg: var(--lib-color-surface-container-low, var(--mat-sys-surface-container-low));--tbl-radius: var(--mcl-radius-md, 12px);display:block}.table{background:var(--tbl-bg);color:var(--tbl-fg);border:1px solid var(--tbl-border);border-radius:var(--tbl-radius);box-shadow:var(--mcl-shadow-1, 0 1px 3px rgba(0, 0, 0, .05));overflow:hidden}.table__container{overflow:auto}.mat-mdc-table{width:100%;border-collapse:separate;border-spacing:0;background:transparent;font-size:.9rem}.mat-mdc-table thead tr,.mat-mdc-header-row{background:var(--tbl-header-bg);height:auto}.mat-mdc-row{height:auto;transition:background-color var(--mcl-transition, .18s ease)}.mat-mdc-row:hover{background:color-mix(in oklab,var(--tbl-fg) 4%,var(--tbl-bg))}.mat-mdc-row:focus-within{outline:2px solid var(--tbl-primary);outline-offset:-2px}.table__empty{display:grid;justify-items:center;gap:8px;padding:48px 24px;text-align:center;color:var(--tbl-muted);font-size:.9rem}.table__empty-icon{font-size:36px;width:44px;height:44px;display:grid;place-items:center;border-radius:var(--mcl-radius-full, 999px);background:var(--tbl-header-bg);color:var(--tbl-muted)}:host(.is-sticky-header) .mat-mdc-header-row{position:sticky;top:0;z-index:2;box-shadow:0 1px 0 0 var(--tbl-border)}.c-col--right{text-align:right}.c-col--strong{font-weight:600;color:var(--tbl-fg)}.c-col--muted{color:var(--tbl-muted)}\n"],
1083
+ dependencies: [
1084
+ {
1085
+ kind: "component",
1086
+ type: MatTable,
1087
+ selector: "mat-table, table[mat-table]",
1088
+ exportAs: ["matTable"]
1089
+ },
1090
+ {
1091
+ kind: "component",
1092
+ type: MatHeaderRow,
1093
+ selector: "mat-header-row, tr[mat-header-row]",
1094
+ exportAs: ["matHeaderRow"]
1095
+ },
1096
+ {
1097
+ kind: "component",
1098
+ type: MatRow,
1099
+ selector: "mat-row, tr[mat-row]",
1100
+ exportAs: ["matRow"]
1101
+ },
1102
+ {
1103
+ kind: "directive",
1104
+ type: MatHeaderRowDef,
1105
+ selector: "[matHeaderRowDef]",
1106
+ inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"]
1107
+ },
1108
+ {
1109
+ kind: "directive",
1110
+ type: MatRowDef,
1111
+ selector: "[matRowDef]",
1112
+ inputs: ["matRowDefColumns", "matRowDefWhen"]
1113
+ },
1114
+ {
1115
+ kind: "component",
1116
+ type: MatFooterRow,
1117
+ selector: "mat-footer-row, tr[mat-footer-row]",
1118
+ exportAs: ["matFooterRow"]
1119
+ },
1120
+ {
1121
+ kind: "directive",
1122
+ type: MatFooterRowDef,
1123
+ selector: "[matFooterRowDef]",
1124
+ inputs: ["matFooterRowDef", "matFooterRowDefSticky"]
1125
+ },
1126
+ {
1127
+ kind: "component",
1128
+ type: NumericPaginatorComponent,
1129
+ selector: "mcl-numeric-paginator",
1130
+ inputs: [
1131
+ "length",
1132
+ "pageIndex",
1133
+ "pageSize",
1134
+ "pageSizeOptions",
1135
+ "hidePageSize",
1136
+ "showFirstLastButtons",
1137
+ "disabled"
1138
+ ],
1139
+ outputs: ["page"]
1140
+ },
1141
+ {
1142
+ kind: "component",
1143
+ type: UndefinedPaginatorComponent,
1144
+ selector: "mcl-undefined-paginator",
1145
+ inputs: [
1146
+ "pageSize",
1147
+ "hasPrevious",
1148
+ "hasNext"
1149
+ ],
1150
+ outputs: ["page"]
1151
+ },
1152
+ {
1153
+ kind: "component",
1154
+ type: LoaderComponent,
1155
+ selector: "mcl-loader",
1156
+ inputs: [
1157
+ "progresso",
1158
+ "show",
1159
+ "labelLoading",
1160
+ "showOnInit",
1161
+ "component"
1162
+ ],
1163
+ exportAs: ["loader"]
1164
+ },
1165
+ {
1166
+ kind: "component",
1167
+ type: MatIcon,
1168
+ selector: "mat-icon",
1169
+ inputs: [
1170
+ "color",
1171
+ "inline",
1172
+ "svgIcon",
1173
+ "fontSet",
1174
+ "fontIcon"
1175
+ ],
1176
+ exportAs: ["matIcon"]
1177
+ },
1178
+ {
1179
+ kind: "pipe",
1180
+ type: TranslatePipe,
1181
+ name: "translate"
1182
+ }
1183
+ ],
1184
+ changeDetection: i0.ChangeDetectionStrategy.Eager
1185
+ });
1186
+ };
1187
+ i0.ɵɵngDeclareClassMetadata({
1188
+ minVersion: "12.0.0",
1189
+ version: "22.3.2",
1190
+ ngImport: i0,
1191
+ type: VirtualPaginatedTableComponent,
1192
+ decorators: [{
1193
+ type: Component,
1194
+ args: [{
1195
+ selector: "mcl-table[paginated]",
1196
+ imports: [
1197
+ MatTable,
1198
+ MatHeaderRow,
1199
+ MatRow,
1200
+ MatHeaderRowDef,
1201
+ MatRowDef,
1202
+ MatFooterRow,
1203
+ MatFooterRowDef,
1204
+ TranslatePipe,
1205
+ NumericPaginatorComponent,
1206
+ UndefinedPaginatorComponent,
1207
+ LoaderComponent,
1208
+ MatIcon
1209
+ ],
1210
+ changeDetection: ChangeDetectionStrategy.Eager,
1211
+ providers: [{
1212
+ provide: MatPaginatorIntl,
1213
+ deps: [TranslateService],
1214
+ useFactory: PaginatorIntlFactory
1215
+ }],
1216
+ template: "<div class=\"table\" #div>\n <div class=\"table__container\">\n <table mat-table [dataSource]=\"itemsSubject\">\n <tr mat-header-row *matHeaderRowDef=\"activeColumnNames; sticky: sticky\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: activeColumnNames;\"></tr>\n\n @if (hasFooter) {\n <tr mat-footer-row *matFooterRowDef=\"activeColumnNames;\"></tr>\n }\n </table>\n\n @if (!items?.length) {\n <div class=\"table__empty\">\n @if (emptyStatePlaceholder) {\n <ng-content select=\"[mclEmptyState]\"></ng-content>\n } @else {\n <mat-icon class=\"table__empty-icon\">inbox</mat-icon>\n <div>{{ emptyStateMessage | translate }}</div>\n }\n </div>\n }\n </div>\n\n @if (numericPagination) {\n <mcl-numeric-paginator [pageSize]=\"numericPagination.size\"\n (page)=\"numericPageEvent($event.pageIndex + 1, $event.pageSize)\"\n [pageIndex]=\"(numericPagination.page || 1) - 1\"\n [length]=\"numericPagination.total\"\n [pageSizeOptions]=\"sizes\"\n [showFirstLastButtons]=\"true\">\n </mcl-numeric-paginator>\n } @else if (undefinedPagination) {\n <mcl-undefined-paginator\n [pageSize]=\"undefinedPagination.size\"\n [hasNext]=\"!!undefinedPagination.nextPageRef\"\n [hasPrevious]=\"!!undefinedPagination.previousPageRef\"\n (page)=\"undefinedPageEvent($event.action, $event.size)\"\n ></mcl-undefined-paginator>\n }\n\n <mcl-loader [showOnInit]=\"true\" [component]=\"div\"></mcl-loader>\n</div>\n",
1217
+ styles: ["@charset \"UTF-8\";:host{--tbl-bg: var(--lib-color-surface, var(--mat-sys-surface));--tbl-fg: var(--lib-color-on-surface, var(--mat-sys-on-surface));--tbl-muted: var(--lib-color-on-surface-variant, var(--mat-sys-on-surface-variant));--tbl-border: var(--lib-color-outline-variant, var(--mat-sys-outline-variant));--tbl-primary: var(--lib-color-primary, var(--mat-sys-primary));--tbl-header-bg: var(--lib-color-surface-container-low, var(--mat-sys-surface-container-low));--tbl-radius: var(--mcl-radius-md, 12px);display:block}.table{background:var(--tbl-bg);color:var(--tbl-fg);border:1px solid var(--tbl-border);border-radius:var(--tbl-radius);box-shadow:var(--mcl-shadow-1, 0 1px 3px rgba(0, 0, 0, .05));overflow:hidden}.table__container{overflow:auto}.mat-mdc-table{width:100%;border-collapse:separate;border-spacing:0;background:transparent;font-size:.9rem}.mat-mdc-table thead tr,.mat-mdc-header-row{background:var(--tbl-header-bg);height:auto}.mat-mdc-row{height:auto;transition:background-color var(--mcl-transition, .18s ease)}.mat-mdc-row:hover{background:color-mix(in oklab,var(--tbl-fg) 4%,var(--tbl-bg))}.mat-mdc-row:focus-within{outline:2px solid var(--tbl-primary);outline-offset:-2px}.table__empty{display:grid;justify-items:center;gap:8px;padding:48px 24px;text-align:center;color:var(--tbl-muted);font-size:.9rem}.table__empty-icon{font-size:36px;width:44px;height:44px;display:grid;place-items:center;border-radius:var(--mcl-radius-full, 999px);background:var(--tbl-header-bg);color:var(--tbl-muted)}:host(.is-sticky-header) .mat-mdc-header-row{position:sticky;top:0;z-index:2;box-shadow:0 1px 0 0 var(--tbl-border)}.c-col--right{text-align:right}.c-col--strong{font-weight:600;color:var(--tbl-fg)}.c-col--muted{color:var(--tbl-muted)}\n"]
1218
+ }]
1219
+ }],
1220
+ ctorParameters: () => [{ type: MobileService }, {
1221
+ type: void 0,
1222
+ decorators: [{
1223
+ type: Inject,
1224
+ args: [PAGINATION_CONFIGURATION]
1225
+ }, { type: Optional }]
1226
+ }],
1227
+ propDecorators: {
1228
+ sizes: [{ type: Input }],
1229
+ paginate: [{ type: Output }],
1230
+ loader: [{
1231
+ type: ViewChild,
1232
+ args: [LoaderComponent]
1233
+ }],
1234
+ outerItems: [{
1235
+ type: Input,
1236
+ args: ["items"]
1237
+ }]
1238
+ }
1239
+ });
1240
+ var TdComponent = class TdComponent {
1241
+ constructor(element) {
1242
+ element.nativeElement.classList.add("mat-cell");
1243
+ }
1244
+ ngOnInit() {}
1245
+ static ɵfac = i0.ɵɵngDeclareFactory({
1246
+ minVersion: "12.0.0",
1247
+ version: "22.3.2",
1248
+ ngImport: i0,
1249
+ type: TdComponent,
1250
+ deps: [{
1251
+ token: ElementRef,
1252
+ self: true
1253
+ }],
1254
+ target: i0.ɵɵFactoryTarget.Component
1255
+ });
1256
+ static ɵcmp = i0.ɵɵngDeclareComponent({
1257
+ minVersion: "14.0.0",
1258
+ version: "22.3.2",
1259
+ type: TdComponent,
1260
+ isStandalone: true,
1261
+ selector: "td,mcl-td",
1262
+ ngImport: i0,
1263
+ template: "<ng-content></ng-content>\n",
1264
+ styles: [""],
1265
+ changeDetection: i0.ChangeDetectionStrategy.Eager
1266
+ });
1267
+ };
1268
+ i0.ɵɵngDeclareClassMetadata({
1269
+ minVersion: "12.0.0",
1270
+ version: "22.3.2",
1271
+ ngImport: i0,
1272
+ type: TdComponent,
1273
+ decorators: [{
1274
+ type: Component,
1275
+ args: [{
1276
+ selector: "td,mcl-td",
1277
+ changeDetection: ChangeDetectionStrategy.Eager,
1278
+ template: "<ng-content></ng-content>\n"
1279
+ }]
1280
+ }],
1281
+ ctorParameters: () => [{
1282
+ type: ElementRef,
1283
+ decorators: [{ type: Self }]
1284
+ }]
1285
+ });
1286
+ var ThComponent = class ThComponent {
1287
+ constructor(element) {
1288
+ element.nativeElement.classList.add("mat-header-cell");
1289
+ }
1290
+ ngOnInit() {}
1291
+ static ɵfac = i0.ɵɵngDeclareFactory({
1292
+ minVersion: "12.0.0",
1293
+ version: "22.3.2",
1294
+ ngImport: i0,
1295
+ type: ThComponent,
1296
+ deps: [{
1297
+ token: ElementRef,
1298
+ self: true
1299
+ }],
1300
+ target: i0.ɵɵFactoryTarget.Component
1301
+ });
1302
+ static ɵcmp = i0.ɵɵngDeclareComponent({
1303
+ minVersion: "14.0.0",
1304
+ version: "22.3.2",
1305
+ type: ThComponent,
1306
+ isStandalone: true,
1307
+ selector: "th,mcl-th",
1308
+ ngImport: i0,
1309
+ template: "<ng-content></ng-content>\n",
1310
+ styles: [""],
1311
+ changeDetection: i0.ChangeDetectionStrategy.Eager
1312
+ });
1313
+ };
1314
+ i0.ɵɵngDeclareClassMetadata({
1315
+ minVersion: "12.0.0",
1316
+ version: "22.3.2",
1317
+ ngImport: i0,
1318
+ type: ThComponent,
1319
+ decorators: [{
1320
+ type: Component,
1321
+ args: [{
1322
+ selector: "th,mcl-th",
1323
+ changeDetection: ChangeDetectionStrategy.Eager,
1324
+ template: "<ng-content></ng-content>\n"
1325
+ }]
1326
+ }],
1327
+ ctorParameters: () => [{
1328
+ type: ElementRef,
1329
+ decorators: [{ type: Self }]
1330
+ }]
1331
+ });
626
1332
  export { ColumnCellDirective, ColumnDirective, ColumnFooterDirective, ColumnHeaderDirective, NumericPaginatorComponent, PAGINATION_CONFIGURATION, PaginatedTableComponent, PaginatorIntlFactory, TableComponent, TdComponent, ThComponent, VirtualPaginatedTableComponent };
627
- //# sourceMappingURL=main-class-componentes-table.mjs.map
1333
+
1334
+ //# sourceMappingURL=main-class-componentes-table.mjs.map