@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.
- package/README.md +17 -0
- package/fesm2022/main-class-componentes-arquivo.mjs +851 -369
- package/fesm2022/main-class-componentes-arquivo.mjs.map +1 -1
- package/fesm2022/main-class-componentes-core.mjs +288 -240
- package/fesm2022/main-class-componentes-core.mjs.map +1 -1
- package/fesm2022/main-class-componentes-crud.mjs +1004 -546
- package/fesm2022/main-class-componentes-crud.mjs.map +1 -1
- package/fesm2022/main-class-componentes-dialog.mjs +758 -385
- package/fesm2022/main-class-componentes-dialog.mjs.map +1 -1
- package/fesm2022/main-class-componentes-form.mjs +299 -196
- package/fesm2022/main-class-componentes-form.mjs.map +1 -1
- package/fesm2022/main-class-componentes-input.mjs +4143 -2141
- package/fesm2022/main-class-componentes-input.mjs.map +1 -1
- package/fesm2022/main-class-componentes-loader.mjs +262 -212
- package/fesm2022/main-class-componentes-loader.mjs.map +1 -1
- package/fesm2022/main-class-componentes-misc.mjs +508 -354
- package/fesm2022/main-class-componentes-misc.mjs.map +1 -1
- package/fesm2022/main-class-componentes-pipe.mjs +39 -26
- package/fesm2022/main-class-componentes-pipe.mjs.map +1 -1
- package/fesm2022/main-class-componentes-table.mjs +1331 -624
- package/fesm2022/main-class-componentes-table.mjs.map +1 -1
- package/fesm2022/main-class-componentes.mjs +3 -11
- package/fesm2022/main-class-componentes.mjs.map +1 -1
- package/package.json +32 -16
- package/types/main-class-componentes-arquivo.d.ts +190 -0
- package/types/main-class-componentes-core.d.ts +99 -0
- package/types/main-class-componentes-crud.d.ts +172 -0
- package/types/main-class-componentes-dialog.d.ts +125 -0
- package/types/main-class-componentes-form.d.ts +70 -0
- package/types/main-class-componentes-input.d.ts +687 -0
- package/types/main-class-componentes-loader.d.ts +69 -0
- package/types/main-class-componentes-misc.d.ts +87 -0
- package/types/main-class-componentes-pipe.d.ts +10 -0
- package/types/main-class-componentes-table.d.ts +265 -0
- package/types/main-class-componentes.d.ts +4 -0
- package/arquivo/index.d.ts +0 -5
- package/arquivo/src/arquivo-manager.service.d.ts +0 -13
- package/arquivo/src/download-arquivo.directive.d.ts +0 -12
- package/arquivo/src/imagem.directive.d.ts +0 -21
- package/arquivo/src/preview-arquivo/dialog-preview-arquivo/dialog-preview-arquivo.component.d.ts +0 -23
- package/arquivo/src/preview-arquivo/preview-arquivo.component.d.ts +0 -27
- package/core/index.d.ts +0 -4
- package/core/src/criptografia/criptografia.service.d.ts +0 -6
- package/core/src/mensageria/mensageria.service.d.ts +0 -17
- package/core/src/mobile/mobile.service.d.ts +0 -15
- package/core/src/validator/valida-modulo11.service.d.ts +0 -55
- package/crud/index.d.ts +0 -7
- package/crud/src/abstract-consulta-paginada-component.d.ts +0 -24
- package/crud/src/abstract-edicao-component.d.ts +0 -19
- package/crud/src/abstract-edicao-modal-component.d.ts +0 -19
- package/crud/src/query/query-field/query-field.component.d.ts +0 -40
- package/crud/src/query/query-form-field/query-form-field.component.d.ts +0 -12
- package/crud/src/query/query-form.component.d.ts +0 -28
- package/crud/src/query/query-modal-form/query-modal-form.component.d.ts +0 -13
- package/dialog/index.d.ts +0 -10
- package/dialog/src/dialog-confirmacao/dialog-confirmacao.component.d.ts +0 -23
- package/dialog/src/dialog-iframe/dialog-iframe.component.d.ts +0 -21
- package/dialog/src/dialog-sidebar/modal-template/modal-body.directive.d.ts +0 -9
- package/dialog/src/dialog-sidebar/modal-template/modal-close.directive.d.ts +0 -9
- package/dialog/src/dialog-sidebar/modal-template/modal-footer.directive.d.ts +0 -6
- package/dialog/src/dialog-sidebar/modal-template/modal-header.directive.d.ts +0 -6
- package/dialog/src/dialog-sidebar/modal-template/modal-template.component.d.ts +0 -12
- package/dialog/src/dialog-sidebar/modal.component.d.ts +0 -8
- package/dialog/src/dialog-sidebar/sidebar-modal-ref.d.ts +0 -21
- package/dialog/src/dialog.service.d.ts +0 -26
- package/form/index.d.ts +0 -3
- package/form/src/form.component.d.ts +0 -24
- package/form/src/mensagens-erro/mensagens-erro.component.d.ts +0 -17
- package/form/src/single-click.directive.d.ts +0 -13
- package/index.d.ts +0 -5
- package/input/index.d.ts +0 -26
- package/input/src/abstract-control-value-accessor.d.ts +0 -18
- package/input/src/abstract-mat-form-field-control.d.ts +0 -42
- package/input/src/abstract-mat-form-field-select-control.d.ts +0 -31
- package/input/src/input-currency/input-currency.component.d.ts +0 -9
- package/input/src/input-datetime/input-datetime.component.d.ts +0 -32
- package/input/src/input-fileupload/input-fileupload-validator.directive.d.ts +0 -8
- package/input/src/input-fileupload/input-fileupload.component.d.ts +0 -70
- package/input/src/input-mask/documento-validators.d.ts +0 -7
- package/input/src/input-mask/input-cep.component.d.ts +0 -7
- package/input/src/input-mask/input-cnpj.component.d.ts +0 -7
- package/input/src/input-mask/input-cpf-cnpj.component.d.ts +0 -7
- package/input/src/input-mask/input-cpf.component.d.ts +0 -7
- package/input/src/input-mask/input-mask-validator.directive.d.ts +0 -16
- package/input/src/input-mask/input-mask.component.d.ts +0 -24
- package/input/src/input-mask/input-phone.component.d.ts +0 -7
- package/input/src/input-mask/mask-functions.d.ts +0 -2
- package/input/src/input-telefone-internacional/input-telefone-internacional-validator.directive.d.ts +0 -8
- package/input/src/input-telefone-internacional/input-telefone-internacional.component.d.ts +0 -19
- package/input/src/option-checkbox/all-option-checkbox.component.d.ts +0 -18
- package/input/src/option-checkbox/node-pool.d.ts +0 -23
- package/input/src/option-checkbox/option-checkbox-group.component.d.ts +0 -25
- package/input/src/option-checkbox/option-checkbox.component.d.ts +0 -23
- package/input/src/option-checkbox/option-checkbox.service.d.ts +0 -16
- package/input/src/option-checkbox/option-node.d.ts +0 -13
- package/input/src/select-autocomplete/select-autocomplete.component.d.ts +0 -15
- package/input/src/select-chips/select-chips.component.d.ts +0 -12
- package/input/src/select-many-checkbox/select-many-checkbox.component.d.ts +0 -12
- package/input/src/select-option/delegate-option-provider.directive.d.ts +0 -13
- package/input/src/select-option/select-option-provider.d.ts +0 -10
- package/input/src/select-option/select-option.component.d.ts +0 -10
- package/input/src/select-option/select-option.d.ts +0 -4
- package/input/src/select-radio/select-radio.component.d.ts +0 -9
- package/loader/index.d.ts +0 -2
- package/loader/src/loader.component.d.ts +0 -25
- package/loader/src/loader.service.d.ts +0 -20
- package/misc/index.d.ts +0 -12
- package/misc/src/cnpj/cnpj.directive.d.ts +0 -12
- package/misc/src/cnpj/cnpjs.pipe.d.ts +0 -7
- package/misc/src/cpf/cpf.directive.d.ts +0 -12
- package/misc/src/cpf/cpf.pipe.d.ts +0 -7
- package/misc/src/cpf-cnpj/cpf-cnpj.directive.d.ts +0 -12
- package/misc/src/cpf-cnpj/cpf-cnpj.pipe.d.ts +0 -7
- package/misc/src/mask/mask.pipe.d.ts +0 -8
- package/misc/src/monetario/monetario-mask.d.ts +0 -1
- package/misc/src/monetario/monetario.pipe.d.ts +0 -7
- package/misc/src/porcentagem/porcentagem-mask.d.ts +0 -1
- package/misc/src/porcentagem/porcentagem.pipe.d.ts +0 -7
- package/misc/src/telefone/telefone.pipe.d.ts +0 -7
- package/misc/src/unsafe-inner-html/unsafe-inner-html.directive.d.ts +0 -10
- package/pipe/index.d.ts +0 -1
- package/pipe/src/nome-resumido.pipe.d.ts +0 -7
- package/public-api.d.ts +0 -2
- package/table/index.d.ts +0 -10
- package/table/src/column/column-cell.directive.d.ts +0 -8
- package/table/src/column/column-footer.directive.d.ts +0 -8
- package/table/src/column/column-header.directive.d.ts +0 -8
- package/table/src/column/column.directive.d.ts +0 -16
- package/table/src/numeric-paginator/numeric-paginator.component.d.ts +0 -26
- package/table/src/paginated-table/paginated-table.component.d.ts +0 -58
- package/table/src/paginator-i18n.d.ts +0 -8
- package/table/src/table/table.component.d.ts +0 -41
- package/table/src/td/td.component.d.ts +0 -8
- package/table/src/th/th.component.d.ts +0 -8
- package/table/src/undefined-paginator/undefined-paginator.component.d.ts +0 -25
- package/table/src/virtual-paginated-table/virtual-paginated-table.component.d.ts +0 -28
|
@@ -1,627 +1,1334 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { BehaviorSubject } from
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import { MatPaginatorIntl } from
|
|
9
|
-
import { LoaderComponent } from
|
|
10
|
-
import { MatSelect } from
|
|
11
|
-
import { MatOption } from
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
}
|
|
299
|
-
i0.ɵɵ
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
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
|
-
|
|
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
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
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
|
-
|
|
1333
|
+
|
|
1334
|
+
//# sourceMappingURL=main-class-componentes-table.mjs.map
|