ngx-aur-mat-table 12.2.18 → 12.2.19
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/bundles/ngx-aur-mat-table.umd.js +1752 -1729
- package/bundles/ngx-aur-mat-table.umd.js.map +1 -1
- package/esm2015/lib/providers/IndexProvider.js +6 -3
- package/esm2015/lib/providers/RowActionProvider.js +7 -4
- package/esm2015/lib/providers/SelectionProvider.js +7 -4
- package/esm2015/lib/utils/ngx-aur-table-config.util.js +9 -5
- package/fesm2015/ngx-aur-mat-table.js +92 -82
- package/fesm2015/ngx-aur-mat-table.js.map +1 -1
- package/lib/providers/IndexProvider.d.ts +2 -1
- package/lib/providers/RowActionProvider.d.ts +2 -1
- package/lib/providers/SelectionProvider.d.ts +2 -1
- package/lib/utils/ngx-aur-table-config.util.d.ts +2 -4
- package/package.json +1 -1
|
@@ -1,1762 +1,1785 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
})(this, (function (exports,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/cdk/collections'), require('@angular/material/table'), require('@angular/core'), require('@angular/material/sort'), require('@angular/material/paginator'), require('@angular/material/form-field'), require('@angular/material/icon'), require('@angular/common'), require('@angular/material/tooltip'), require('@angular/material/checkbox'), require('@angular/material/button'), require('@angular/material/input')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('ngx-aur-mat-table', ['exports', '@angular/cdk/collections', '@angular/material/table', '@angular/core', '@angular/material/sort', '@angular/material/paginator', '@angular/material/form-field', '@angular/material/icon', '@angular/common', '@angular/material/tooltip', '@angular/material/checkbox', '@angular/material/button', '@angular/material/input'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["ngx-aur-mat-table"] = {}, global.ng.cdk.collections, global.ng.material.table, global.ng.core, global.ng.material.sort, global.ng.material.paginator, global.ng.material.formField, global.ng.material.icon, global.ng.common, global.ng.material.tooltip, global.ng.material.checkbox, global.ng.material.button, global.ng.material.input));
|
|
5
|
+
})(this, (function (exports, collections, i3, i0, i7, i8, i1$1, i1, i9, i3$1, i5, i6, i10) { 'use strict';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
});
|
|
7
|
+
function _interopNamespace(e) {
|
|
8
|
+
if (e && e.__esModule) return e;
|
|
9
|
+
var n = Object.create(null);
|
|
10
|
+
if (e) {
|
|
11
|
+
Object.keys(e).forEach(function (k) {
|
|
12
|
+
if (k !== 'default') {
|
|
13
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () { return e[k]; }
|
|
17
|
+
});
|
|
20
18
|
}
|
|
21
|
-
|
|
22
|
-
return Object.freeze(n);
|
|
19
|
+
});
|
|
23
20
|
}
|
|
21
|
+
n["default"] = e;
|
|
22
|
+
return Object.freeze(n);
|
|
23
|
+
}
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
25
|
+
var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3);
|
|
26
|
+
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
27
|
+
var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
|
|
28
|
+
var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
|
|
29
|
+
var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
|
|
30
|
+
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
31
|
+
var i9__namespace = /*#__PURE__*/_interopNamespace(i9);
|
|
32
|
+
var i3__namespace = /*#__PURE__*/_interopNamespace(i3$1);
|
|
33
|
+
var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
|
|
34
|
+
var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
|
|
35
|
+
var i10__namespace = /*#__PURE__*/_interopNamespace(i10);
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
40
|
-
NgxAurTableConfigUtil.keys = function (config) {
|
|
41
|
-
return config.columnsCfg.map(function (config) { return config.key; });
|
|
42
|
-
};
|
|
43
|
-
NgxAurTableConfigUtil.namedKeys = function (config) {
|
|
44
|
-
return config.columnsCfg.map(function (cfg) { return ({ name: cfg.name, key: cfg.key }); });
|
|
45
|
-
};
|
|
46
|
-
/**
|
|
47
|
-
* @return Map where the key is 'key' and the value is 'name'
|
|
48
|
-
*/
|
|
49
|
-
NgxAurTableConfigUtil.keyNameMap = function (config) {
|
|
50
|
-
return new Map(config.columnsCfg.map(function (cfg) { return [cfg.key, cfg.name]; }));
|
|
51
|
-
};
|
|
52
|
-
return NgxAurTableConfigUtil;
|
|
53
|
-
}());
|
|
54
|
-
|
|
55
|
-
/******************************************************************************
|
|
56
|
-
Copyright (c) Microsoft Corporation.
|
|
37
|
+
/******************************************************************************
|
|
38
|
+
Copyright (c) Microsoft Corporation.
|
|
57
39
|
|
|
58
|
-
|
|
59
|
-
|
|
40
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
41
|
+
purpose with or without fee is hereby granted.
|
|
60
42
|
|
|
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
|
-
|
|
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
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
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
|
-
|
|
43
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
44
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
45
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
46
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
47
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
48
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
49
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
50
|
+
***************************************************************************** */
|
|
51
|
+
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
52
|
+
var extendStatics = function (d, b) {
|
|
53
|
+
extendStatics = Object.setPrototypeOf ||
|
|
54
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
55
|
+
function (d, b) { for (var p in b)
|
|
56
|
+
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
57
|
+
d[p] = b[p]; };
|
|
58
|
+
return extendStatics(d, b);
|
|
59
|
+
};
|
|
60
|
+
function __extends(d, b) {
|
|
61
|
+
if (typeof b !== "function" && b !== null)
|
|
62
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
63
|
+
extendStatics(d, b);
|
|
64
|
+
function __() { this.constructor = d; }
|
|
65
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
66
|
+
}
|
|
67
|
+
var __assign = function () {
|
|
68
|
+
__assign = Object.assign || function __assign(t) {
|
|
69
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
70
|
+
s = arguments[i];
|
|
71
|
+
for (var p in s)
|
|
72
|
+
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
73
|
+
t[p] = s[p];
|
|
74
|
+
}
|
|
75
|
+
return t;
|
|
76
|
+
};
|
|
77
|
+
return __assign.apply(this, arguments);
|
|
78
|
+
};
|
|
79
|
+
function __rest(s, e) {
|
|
80
|
+
var t = {};
|
|
81
|
+
for (var p in s)
|
|
82
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
83
|
+
t[p] = s[p];
|
|
84
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
85
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
86
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
87
|
+
t[p[i]] = s[p[i]];
|
|
88
|
+
}
|
|
89
|
+
return t;
|
|
90
|
+
}
|
|
91
|
+
function __decorate(decorators, target, key, desc) {
|
|
92
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
93
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
94
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
95
|
+
else
|
|
96
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
97
|
+
if (d = decorators[i])
|
|
98
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
99
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
100
|
+
}
|
|
101
|
+
function __param(paramIndex, decorator) {
|
|
102
|
+
return function (target, key) { decorator(target, key, paramIndex); };
|
|
103
|
+
}
|
|
104
|
+
function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
105
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function")
|
|
106
|
+
throw new TypeError("Function expected"); return f; }
|
|
107
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
108
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
109
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
110
|
+
var _, done = false;
|
|
111
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
112
|
+
var context = {};
|
|
113
|
+
for (var p in contextIn)
|
|
114
|
+
context[p] = p === "access" ? {} : contextIn[p];
|
|
115
|
+
for (var p in contextIn.access)
|
|
116
|
+
context.access[p] = contextIn.access[p];
|
|
117
|
+
context.addInitializer = function (f) { if (done)
|
|
118
|
+
throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
119
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
120
|
+
if (kind === "accessor") {
|
|
121
|
+
if (result === void 0)
|
|
122
|
+
continue;
|
|
123
|
+
if (result === null || typeof result !== "object")
|
|
124
|
+
throw new TypeError("Object expected");
|
|
125
|
+
if (_ = accept(result.get))
|
|
126
|
+
descriptor.get = _;
|
|
127
|
+
if (_ = accept(result.set))
|
|
128
|
+
descriptor.set = _;
|
|
129
|
+
if (_ = accept(result.init))
|
|
130
|
+
initializers.unshift(_);
|
|
131
|
+
}
|
|
132
|
+
else if (_ = accept(result)) {
|
|
133
|
+
if (kind === "field")
|
|
134
|
+
initializers.unshift(_);
|
|
135
|
+
else
|
|
136
|
+
descriptor[key] = _;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
if (target)
|
|
140
|
+
Object.defineProperty(target, contextIn.name, descriptor);
|
|
141
|
+
done = true;
|
|
142
|
+
}
|
|
143
|
+
;
|
|
144
|
+
function __runInitializers(thisArg, initializers, value) {
|
|
145
|
+
var useValue = arguments.length > 2;
|
|
146
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
147
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
148
|
+
}
|
|
149
|
+
return useValue ? value : void 0;
|
|
150
|
+
}
|
|
151
|
+
;
|
|
152
|
+
function __propKey(x) {
|
|
153
|
+
return typeof x === "symbol" ? x : "".concat(x);
|
|
154
|
+
}
|
|
155
|
+
;
|
|
156
|
+
function __setFunctionName(f, name, prefix) {
|
|
157
|
+
if (typeof name === "symbol")
|
|
158
|
+
name = name.description ? "[".concat(name.description, "]") : "";
|
|
159
|
+
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
|
160
|
+
}
|
|
161
|
+
;
|
|
162
|
+
function __metadata(metadataKey, metadataValue) {
|
|
163
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
164
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
165
|
+
}
|
|
166
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
167
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
168
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
169
|
+
function fulfilled(value) { try {
|
|
170
|
+
step(generator.next(value));
|
|
171
|
+
}
|
|
172
|
+
catch (e) {
|
|
173
|
+
reject(e);
|
|
174
|
+
} }
|
|
175
|
+
function rejected(value) { try {
|
|
176
|
+
step(generator["throw"](value));
|
|
177
|
+
}
|
|
178
|
+
catch (e) {
|
|
179
|
+
reject(e);
|
|
180
|
+
} }
|
|
181
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
182
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
function __generator(thisArg, body) {
|
|
186
|
+
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
187
|
+
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
188
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
189
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
190
|
+
function step(op) {
|
|
191
|
+
if (f)
|
|
192
|
+
throw new TypeError("Generator is already executing.");
|
|
193
|
+
while (g && (g = 0, op[0] && (_ = 0)), _)
|
|
194
|
+
try {
|
|
195
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
196
|
+
return t;
|
|
197
|
+
if (y = 0, t)
|
|
198
|
+
op = [op[0] & 2, t.value];
|
|
199
|
+
switch (op[0]) {
|
|
200
|
+
case 0:
|
|
201
|
+
case 1:
|
|
202
|
+
t = op;
|
|
203
|
+
break;
|
|
204
|
+
case 4:
|
|
205
|
+
_.label++;
|
|
206
|
+
return { value: op[1], done: false };
|
|
207
|
+
case 5:
|
|
208
|
+
_.label++;
|
|
209
|
+
y = op[1];
|
|
210
|
+
op = [0];
|
|
211
|
+
continue;
|
|
212
|
+
case 7:
|
|
213
|
+
op = _.ops.pop();
|
|
214
|
+
_.trys.pop();
|
|
215
|
+
continue;
|
|
216
|
+
default:
|
|
217
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
218
|
+
_ = 0;
|
|
219
|
+
continue;
|
|
220
|
+
}
|
|
221
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
222
|
+
_.label = op[1];
|
|
223
|
+
break;
|
|
224
|
+
}
|
|
225
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
226
|
+
_.label = t[1];
|
|
227
|
+
t = op;
|
|
228
|
+
break;
|
|
229
|
+
}
|
|
230
|
+
if (t && _.label < t[2]) {
|
|
231
|
+
_.label = t[2];
|
|
232
|
+
_.ops.push(op);
|
|
233
|
+
break;
|
|
234
|
+
}
|
|
235
|
+
if (t[2])
|
|
236
|
+
_.ops.pop();
|
|
237
|
+
_.trys.pop();
|
|
238
|
+
continue;
|
|
239
|
+
}
|
|
240
|
+
op = body.call(thisArg, _);
|
|
241
|
+
}
|
|
242
|
+
catch (e) {
|
|
243
|
+
op = [6, e];
|
|
244
|
+
y = 0;
|
|
245
|
+
}
|
|
246
|
+
finally {
|
|
247
|
+
f = t = 0;
|
|
248
|
+
}
|
|
249
|
+
if (op[0] & 5)
|
|
250
|
+
throw op[1];
|
|
251
|
+
return { value: op[0] ? op[1] : void 0, done: true };
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
255
|
+
if (k2 === undefined)
|
|
256
|
+
k2 = k;
|
|
257
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
258
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
259
|
+
desc = { enumerable: true, get: function () { return m[k]; } };
|
|
260
|
+
}
|
|
261
|
+
Object.defineProperty(o, k2, desc);
|
|
262
|
+
}) : (function (o, m, k, k2) {
|
|
263
|
+
if (k2 === undefined)
|
|
264
|
+
k2 = k;
|
|
265
|
+
o[k2] = m[k];
|
|
266
|
+
});
|
|
267
|
+
function __exportStar(m, o) {
|
|
268
|
+
for (var p in m)
|
|
269
|
+
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
270
|
+
__createBinding(o, m, p);
|
|
271
|
+
}
|
|
272
|
+
function __values(o) {
|
|
273
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
274
|
+
if (m)
|
|
275
|
+
return m.call(o);
|
|
276
|
+
if (o && typeof o.length === "number")
|
|
277
|
+
return {
|
|
278
|
+
next: function () {
|
|
279
|
+
if (o && i >= o.length)
|
|
280
|
+
o = void 0;
|
|
281
|
+
return { value: o && o[i++], done: !o };
|
|
282
|
+
}
|
|
283
|
+
};
|
|
284
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
285
|
+
}
|
|
286
|
+
function __read(o, n) {
|
|
287
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
288
|
+
if (!m)
|
|
289
|
+
return o;
|
|
290
|
+
var i = m.call(o), r, ar = [], e;
|
|
291
|
+
try {
|
|
292
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
293
|
+
ar.push(r.value);
|
|
294
|
+
}
|
|
295
|
+
catch (error) {
|
|
296
|
+
e = { error: error };
|
|
297
|
+
}
|
|
298
|
+
finally {
|
|
299
|
+
try {
|
|
300
|
+
if (r && !r.done && (m = i["return"]))
|
|
301
|
+
m.call(i);
|
|
302
|
+
}
|
|
303
|
+
finally {
|
|
304
|
+
if (e)
|
|
305
|
+
throw e.error;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
return ar;
|
|
309
|
+
}
|
|
310
|
+
/** @deprecated */
|
|
311
|
+
function __spread() {
|
|
312
|
+
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
313
|
+
ar = ar.concat(__read(arguments[i]));
|
|
314
|
+
return ar;
|
|
315
|
+
}
|
|
316
|
+
/** @deprecated */
|
|
317
|
+
function __spreadArrays() {
|
|
318
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
319
|
+
s += arguments[i].length;
|
|
320
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
321
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
322
|
+
r[k] = a[j];
|
|
323
|
+
return r;
|
|
324
|
+
}
|
|
325
|
+
function __spreadArray(to, from, pack) {
|
|
326
|
+
if (pack || arguments.length === 2)
|
|
327
|
+
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
328
|
+
if (ar || !(i in from)) {
|
|
329
|
+
if (!ar)
|
|
330
|
+
ar = Array.prototype.slice.call(from, 0, i);
|
|
331
|
+
ar[i] = from[i];
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
335
|
+
}
|
|
336
|
+
function __await(v) {
|
|
337
|
+
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
338
|
+
}
|
|
339
|
+
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
340
|
+
if (!Symbol.asyncIterator)
|
|
341
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
342
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
343
|
+
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
344
|
+
function verb(n) { if (g[n])
|
|
345
|
+
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
346
|
+
function resume(n, v) { try {
|
|
347
|
+
step(g[n](v));
|
|
348
|
+
}
|
|
349
|
+
catch (e) {
|
|
350
|
+
settle(q[0][3], e);
|
|
351
|
+
} }
|
|
352
|
+
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
353
|
+
function fulfill(value) { resume("next", value); }
|
|
354
|
+
function reject(value) { resume("throw", value); }
|
|
355
|
+
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
356
|
+
resume(q[0][0], q[0][1]); }
|
|
357
|
+
}
|
|
358
|
+
function __asyncDelegator(o) {
|
|
359
|
+
var i, p;
|
|
360
|
+
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
361
|
+
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
|
|
362
|
+
}
|
|
363
|
+
function __asyncValues(o) {
|
|
364
|
+
if (!Symbol.asyncIterator)
|
|
365
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
366
|
+
var m = o[Symbol.asyncIterator], i;
|
|
367
|
+
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
368
|
+
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
369
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
370
|
+
}
|
|
371
|
+
function __makeTemplateObject(cooked, raw) {
|
|
372
|
+
if (Object.defineProperty) {
|
|
373
|
+
Object.defineProperty(cooked, "raw", { value: raw });
|
|
374
|
+
}
|
|
375
|
+
else {
|
|
376
|
+
cooked.raw = raw;
|
|
377
|
+
}
|
|
378
|
+
return cooked;
|
|
379
|
+
}
|
|
380
|
+
;
|
|
381
|
+
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
382
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
383
|
+
}) : function (o, v) {
|
|
384
|
+
o["default"] = v;
|
|
385
|
+
};
|
|
386
|
+
function __importStar(mod) {
|
|
387
|
+
if (mod && mod.__esModule)
|
|
388
|
+
return mod;
|
|
389
|
+
var result = {};
|
|
390
|
+
if (mod != null)
|
|
391
|
+
for (var k in mod)
|
|
392
|
+
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
393
|
+
__createBinding(result, mod, k);
|
|
394
|
+
__setModuleDefault(result, mod);
|
|
395
|
+
return result;
|
|
396
|
+
}
|
|
397
|
+
function __importDefault(mod) {
|
|
398
|
+
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
399
|
+
}
|
|
400
|
+
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
401
|
+
if (kind === "a" && !f)
|
|
402
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
403
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
404
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
405
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
406
|
+
}
|
|
407
|
+
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
408
|
+
if (kind === "m")
|
|
409
|
+
throw new TypeError("Private method is not writable");
|
|
410
|
+
if (kind === "a" && !f)
|
|
411
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
412
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
413
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
414
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
415
|
+
}
|
|
416
|
+
function __classPrivateFieldIn(state, receiver) {
|
|
417
|
+
if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function"))
|
|
418
|
+
throw new TypeError("Cannot use 'in' operator on non-object");
|
|
419
|
+
return typeof state === "function" ? receiver === state : state.has(receiver);
|
|
420
|
+
}
|
|
421
|
+
function __addDisposableResource(env, value, async) {
|
|
422
|
+
if (value !== null && value !== void 0) {
|
|
423
|
+
if (typeof value !== "object")
|
|
424
|
+
throw new TypeError("Object expected.");
|
|
425
|
+
var dispose;
|
|
426
|
+
if (async) {
|
|
427
|
+
if (!Symbol.asyncDispose)
|
|
428
|
+
throw new TypeError("Symbol.asyncDispose is not defined.");
|
|
429
|
+
dispose = value[Symbol.asyncDispose];
|
|
430
|
+
}
|
|
431
|
+
if (dispose === void 0) {
|
|
432
|
+
if (!Symbol.dispose)
|
|
433
|
+
throw new TypeError("Symbol.dispose is not defined.");
|
|
434
|
+
dispose = value[Symbol.dispose];
|
|
435
|
+
}
|
|
436
|
+
if (typeof dispose !== "function")
|
|
437
|
+
throw new TypeError("Object not disposable.");
|
|
438
|
+
env.stack.push({ value: value, dispose: dispose, async: async });
|
|
439
|
+
}
|
|
440
|
+
else if (async) {
|
|
441
|
+
env.stack.push({ async: true });
|
|
442
|
+
}
|
|
443
|
+
return value;
|
|
444
|
+
}
|
|
445
|
+
var _SuppressedError = typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
446
|
+
var e = new Error(message);
|
|
447
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
448
|
+
};
|
|
449
|
+
function __disposeResources(env) {
|
|
450
|
+
function fail(e) {
|
|
451
|
+
env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
|
|
452
|
+
env.hasError = true;
|
|
453
|
+
}
|
|
454
|
+
function next() {
|
|
455
|
+
while (env.stack.length) {
|
|
456
|
+
var rec = env.stack.pop();
|
|
457
|
+
try {
|
|
458
|
+
var result = rec.dispose && rec.dispose.call(rec.value);
|
|
459
|
+
if (rec.async)
|
|
460
|
+
return Promise.resolve(result).then(next, function (e) { fail(e); return next(); });
|
|
461
|
+
}
|
|
462
|
+
catch (e) {
|
|
463
|
+
fail(e);
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
if (env.hasError)
|
|
467
|
+
throw env.error;
|
|
468
|
+
}
|
|
469
|
+
return next();
|
|
470
|
+
}
|
|
471
|
+
var tslib_es6 = {
|
|
472
|
+
__extends: __extends,
|
|
473
|
+
__assign: __assign,
|
|
474
|
+
__rest: __rest,
|
|
475
|
+
__decorate: __decorate,
|
|
476
|
+
__param: __param,
|
|
477
|
+
__metadata: __metadata,
|
|
478
|
+
__awaiter: __awaiter,
|
|
479
|
+
__generator: __generator,
|
|
480
|
+
__createBinding: __createBinding,
|
|
481
|
+
__exportStar: __exportStar,
|
|
482
|
+
__values: __values,
|
|
483
|
+
__read: __read,
|
|
484
|
+
__spread: __spread,
|
|
485
|
+
__spreadArrays: __spreadArrays,
|
|
486
|
+
__spreadArray: __spreadArray,
|
|
487
|
+
__await: __await,
|
|
488
|
+
__asyncGenerator: __asyncGenerator,
|
|
489
|
+
__asyncDelegator: __asyncDelegator,
|
|
490
|
+
__asyncValues: __asyncValues,
|
|
491
|
+
__makeTemplateObject: __makeTemplateObject,
|
|
492
|
+
__importStar: __importStar,
|
|
493
|
+
__importDefault: __importDefault,
|
|
494
|
+
__classPrivateFieldGet: __classPrivateFieldGet,
|
|
495
|
+
__classPrivateFieldSet: __classPrivateFieldSet,
|
|
496
|
+
__classPrivateFieldIn: __classPrivateFieldIn,
|
|
497
|
+
__addDisposableResource: __addDisposableResource,
|
|
498
|
+
__disposeResources: __disposeResources,
|
|
499
|
+
};
|
|
500
|
+
|
|
501
|
+
var EmptyValue = /** @class */ (function () {
|
|
502
|
+
function EmptyValue() {
|
|
503
|
+
}
|
|
504
|
+
return EmptyValue;
|
|
505
|
+
}());
|
|
506
|
+
EmptyValue.SELECTION_CONFIG = {
|
|
507
|
+
enable: false,
|
|
508
|
+
};
|
|
509
|
+
EmptyValue.ACTION_CONFIG = {
|
|
510
|
+
enable: false,
|
|
511
|
+
actions: []
|
|
512
|
+
};
|
|
513
|
+
EmptyValue.INDEX_CONFIG = {
|
|
514
|
+
enable: false,
|
|
515
|
+
};
|
|
516
|
+
EmptyValue.PAGINATION_CONFIG = {
|
|
517
|
+
enable: false,
|
|
518
|
+
size: 0,
|
|
519
|
+
sizes: []
|
|
520
|
+
};
|
|
521
|
+
EmptyValue.TABLE_CONFIG = {
|
|
522
|
+
columnsCfg: [],
|
|
523
|
+
selectionCfg: EmptyValue.SELECTION_CONFIG,
|
|
524
|
+
actionCfg: EmptyValue.ACTION_CONFIG,
|
|
525
|
+
indexCfg: EmptyValue.INDEX_CONFIG,
|
|
526
|
+
pageableCfg: EmptyValue.PAGINATION_CONFIG
|
|
527
|
+
};
|
|
528
|
+
EmptyValue.MAT_TABLE_DATA_SOURCE = new i3.MatTableDataSource();
|
|
529
|
+
EmptyValue.RESIZE_OBSERVER = new ResizeObserver(function () {
|
|
530
|
+
});
|
|
518
531
|
|
|
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
|
-
|
|
532
|
+
var SelectionProvider = /** @class */ (function () {
|
|
533
|
+
function SelectionProvider(tableConfig, tableDataSource) {
|
|
534
|
+
this.isEnabled = true;
|
|
535
|
+
this.config = (tableConfig === null || tableConfig === void 0 ? void 0 : tableConfig.selectionCfg) || EmptyValue.SELECTION_CONFIG;
|
|
536
|
+
this.selection = new collections.SelectionModel(this.config.multiple, []);
|
|
537
|
+
this.tableDataSource = tableDataSource;
|
|
538
|
+
}
|
|
539
|
+
Object.defineProperty(SelectionProvider.prototype, "COLUMN_NAME", {
|
|
540
|
+
get: function () {
|
|
541
|
+
return SelectionProvider.COLUMN_NAME;
|
|
542
|
+
},
|
|
543
|
+
enumerable: false,
|
|
544
|
+
configurable: true
|
|
545
|
+
});
|
|
546
|
+
SelectionProvider.prototype.addCheckboxColumn = function (columns) {
|
|
547
|
+
if (this.config.position === 'start') {
|
|
548
|
+
columns.unshift(SelectionProvider.COLUMN_NAME);
|
|
549
|
+
}
|
|
550
|
+
else {
|
|
551
|
+
columns.push(SelectionProvider.COLUMN_NAME);
|
|
552
|
+
}
|
|
553
|
+
return this;
|
|
554
|
+
};
|
|
555
|
+
SelectionProvider.prototype.bindEventEmitters = function (selected, onSelect, onDeselect) {
|
|
556
|
+
var _this = this;
|
|
557
|
+
this.selection.changed.subscribe(function (event) {
|
|
558
|
+
if (event.added) {
|
|
559
|
+
onSelect.emit(event.added);
|
|
560
|
+
}
|
|
561
|
+
if (event.removed) {
|
|
562
|
+
onDeselect.emit(event.removed);
|
|
563
|
+
}
|
|
564
|
+
selected.emit(_this.selection.selected);
|
|
565
|
+
});
|
|
566
|
+
return this;
|
|
567
|
+
};
|
|
568
|
+
SelectionProvider.prototype.masterToggle = function () {
|
|
569
|
+
var _this = this;
|
|
570
|
+
if (this.isAllSelected()) {
|
|
571
|
+
this.selection.clear();
|
|
572
|
+
}
|
|
573
|
+
else {
|
|
574
|
+
this.tableDataSource.filteredData.forEach(function (row) { return _this.selection.select(row.rowSrc); });
|
|
575
|
+
}
|
|
576
|
+
};
|
|
577
|
+
SelectionProvider.prototype.isAllSelected = function () {
|
|
578
|
+
var filteredData = this.tableDataSource.filteredData;
|
|
579
|
+
var numSelected = this.selection.selected.length;
|
|
580
|
+
var numRows = filteredData.length;
|
|
581
|
+
return numSelected === numRows;
|
|
582
|
+
};
|
|
583
|
+
SelectionProvider.canEnable = function (tableConfig) {
|
|
584
|
+
return (tableConfig.selectionCfg && tableConfig.selectionCfg.enable) || false;
|
|
585
|
+
};
|
|
586
|
+
SelectionProvider.create = function (tableConfig, tableDataSource) {
|
|
587
|
+
if (SelectionProvider.canEnable(tableConfig)) {
|
|
588
|
+
return new SelectionProvider(tableConfig, tableDataSource);
|
|
589
|
+
}
|
|
590
|
+
return new SelectionProviderDummy();
|
|
591
|
+
};
|
|
592
|
+
return SelectionProvider;
|
|
593
|
+
}());
|
|
594
|
+
SelectionProvider.COLUMN_NAME = 'tbl_selects';
|
|
595
|
+
var SelectionProviderDummy = /** @class */ (function (_super) {
|
|
596
|
+
__extends(SelectionProviderDummy, _super);
|
|
597
|
+
function SelectionProviderDummy() {
|
|
598
|
+
var _this = _super.call(this, EmptyValue.TABLE_CONFIG, EmptyValue.MAT_TABLE_DATA_SOURCE) || this;
|
|
599
|
+
_this.isEnabled = true;
|
|
600
|
+
return _this;
|
|
601
|
+
}
|
|
602
|
+
SelectionProviderDummy.prototype.addCheckboxColumn = function (columns) {
|
|
603
|
+
return this;
|
|
604
|
+
};
|
|
605
|
+
SelectionProviderDummy.prototype.bindEventEmitters = function (selected, onSelect, onDeselect) {
|
|
606
|
+
return this;
|
|
607
|
+
};
|
|
608
|
+
return SelectionProviderDummy;
|
|
609
|
+
}(SelectionProvider));
|
|
549
610
|
|
|
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
|
-
return SelectionProviderDummy;
|
|
620
|
-
}(SelectionProvider));
|
|
611
|
+
/**
|
|
612
|
+
* Provides functionality to manage the index column in a table.
|
|
613
|
+
* The class can handle index configurations and modify the column array to include an index column.
|
|
614
|
+
*/
|
|
615
|
+
var IndexProvider = /** @class */ (function () {
|
|
616
|
+
function IndexProvider(indexConfig) {
|
|
617
|
+
this.indexConfig = indexConfig;
|
|
618
|
+
this.isEnabled = true;
|
|
619
|
+
this.headerView = indexConfig === null || indexConfig === void 0 ? void 0 : indexConfig.headerColumn;
|
|
620
|
+
this.name = (indexConfig === null || indexConfig === void 0 ? void 0 : indexConfig.name) || '';
|
|
621
|
+
this.offset = (indexConfig === null || indexConfig === void 0 ? void 0 : indexConfig.offset) || 0;
|
|
622
|
+
}
|
|
623
|
+
Object.defineProperty(IndexProvider.prototype, "COLUMN_NAME", {
|
|
624
|
+
get: function () {
|
|
625
|
+
return IndexProvider.COLUMN_NAME;
|
|
626
|
+
},
|
|
627
|
+
enumerable: false,
|
|
628
|
+
configurable: true
|
|
629
|
+
});
|
|
630
|
+
/**
|
|
631
|
+
* Adds the index column to the beginning of the columns array.
|
|
632
|
+
* @param columns The array of column names to which the index column should be added.
|
|
633
|
+
* @returns The instance of IndexProvider for method chaining.
|
|
634
|
+
*/
|
|
635
|
+
IndexProvider.prototype.addIndexColumn = function (columns) {
|
|
636
|
+
columns.unshift(IndexProvider.COLUMN_NAME);
|
|
637
|
+
return this;
|
|
638
|
+
};
|
|
639
|
+
/**
|
|
640
|
+
* Factory method to create an instance of IndexProvider based on table configuration.
|
|
641
|
+
* Returns a dummy provider if the index is not enabled in the configuration.
|
|
642
|
+
* @param tableConfig The configuration of the table.
|
|
643
|
+
* @returns An instance of IndexProvider or IndexProviderDummy.
|
|
644
|
+
*/
|
|
645
|
+
IndexProvider.create = function (tableConfig) {
|
|
646
|
+
if (IndexProvider.canCreate(tableConfig)) {
|
|
647
|
+
return new IndexProvider(tableConfig.indexCfg);
|
|
648
|
+
}
|
|
649
|
+
return new IndexProviderDummy();
|
|
650
|
+
};
|
|
651
|
+
IndexProvider.canCreate = function (tableConfig) {
|
|
652
|
+
return (tableConfig.indexCfg && tableConfig.indexCfg.enable) || false;
|
|
653
|
+
};
|
|
654
|
+
return IndexProvider;
|
|
655
|
+
}());
|
|
656
|
+
IndexProvider.COLUMN_NAME = 'tbl_index';
|
|
657
|
+
/**
|
|
658
|
+
* A dummy implementation of IndexProvider that is used when index functionality is not enabled.
|
|
659
|
+
* This class overrides certain methods to provide no-operation implementations.
|
|
660
|
+
*/
|
|
661
|
+
var IndexProviderDummy = /** @class */ (function (_super) {
|
|
662
|
+
__extends(IndexProviderDummy, _super);
|
|
663
|
+
function IndexProviderDummy() {
|
|
664
|
+
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
665
|
+
_this.isEnabled = false;
|
|
666
|
+
return _this;
|
|
667
|
+
}
|
|
668
|
+
/**
|
|
669
|
+
* Overrides the addIndexColumn method to return itself without modifying the columns array.
|
|
670
|
+
* @param columns The array of column names.
|
|
671
|
+
* @returns The instance of IndexProviderDummy for method chaining.
|
|
672
|
+
*/
|
|
673
|
+
IndexProviderDummy.prototype.addIndexColumn = function (columns) {
|
|
674
|
+
// No operation performed as the index is not enabled.
|
|
675
|
+
return this;
|
|
676
|
+
};
|
|
677
|
+
return IndexProviderDummy;
|
|
678
|
+
}(IndexProvider));
|
|
621
679
|
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
680
|
+
var ActionViewFactory = /** @class */ (function () {
|
|
681
|
+
function ActionViewFactory() {
|
|
682
|
+
}
|
|
683
|
+
/**
|
|
684
|
+
* Convert rows and actions to a view format.
|
|
685
|
+
* @param rows - The data rows to be converted.
|
|
686
|
+
* @param actionConfig - Configuration for actions on rows.
|
|
687
|
+
* @return Map of row IDs to their associated action views.
|
|
688
|
+
*/
|
|
689
|
+
ActionViewFactory.create = function (rows, actionConfig) {
|
|
690
|
+
var e_1, _a;
|
|
691
|
+
var result = new Map();
|
|
692
|
+
try {
|
|
693
|
+
for (var rows_1 = __values(rows), rows_1_1 = rows_1.next(); !rows_1_1.done; rows_1_1 = rows_1.next()) {
|
|
694
|
+
var row = rows_1_1.value;
|
|
695
|
+
result.set(row.id, this.prepareActionsForRow(row, actionConfig));
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
699
|
+
finally {
|
|
700
|
+
try {
|
|
701
|
+
if (rows_1_1 && !rows_1_1.done && (_a = rows_1.return)) _a.call(rows_1);
|
|
702
|
+
}
|
|
703
|
+
finally { if (e_1) throw e_1.error; }
|
|
704
|
+
}
|
|
705
|
+
return result;
|
|
706
|
+
};
|
|
707
|
+
/**
|
|
708
|
+
* Prepare the actions for a specific row based on the action configuration.
|
|
709
|
+
* @param row - The data row for which actions need to be prepared.
|
|
710
|
+
* @param actionConfig - Configuration for actions on rows.
|
|
711
|
+
* @return Array of actions for the row.
|
|
712
|
+
*/
|
|
713
|
+
ActionViewFactory.prepareActionsForRow = function (row, actionConfig) {
|
|
714
|
+
var _this = this;
|
|
715
|
+
return actionConfig.actions.map(function (action) { return ({
|
|
716
|
+
action: action.action(row.rowSrc),
|
|
717
|
+
icon: _this.prepareIconConfig(action.icon, row.rowSrc)
|
|
718
|
+
}); });
|
|
719
|
+
};
|
|
720
|
+
ActionViewFactory.prepareIconConfig = function (iconSource, value) {
|
|
721
|
+
return {
|
|
722
|
+
name: iconSource.name(value),
|
|
723
|
+
color: iconSource.color ? iconSource.color(value) : undefined,
|
|
724
|
+
tooltip: iconSource.tooltip ? iconSource.tooltip(value) : undefined,
|
|
725
|
+
position: iconSource.position,
|
|
726
|
+
wrapper: iconSource.wrapper ? { color: iconSource.wrapper.color(value) } : undefined
|
|
727
|
+
};
|
|
728
|
+
};
|
|
729
|
+
return ActionViewFactory;
|
|
730
|
+
}());
|
|
673
731
|
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
732
|
+
var RowActionProvider = /** @class */ (function () {
|
|
733
|
+
function RowActionProvider(tableConfig) {
|
|
734
|
+
this.isEnabled = true;
|
|
735
|
+
// key is rowId
|
|
736
|
+
this.actionView = new Map();
|
|
737
|
+
if (!tableConfig.actionCfg) {
|
|
738
|
+
throw new Error("Actions is undefined");
|
|
739
|
+
}
|
|
740
|
+
this.config = tableConfig.actionCfg;
|
|
741
|
+
}
|
|
742
|
+
Object.defineProperty(RowActionProvider.prototype, "COLUMN_NAME", {
|
|
743
|
+
get: function () {
|
|
744
|
+
return RowActionProvider.COLUMN_NAME;
|
|
745
|
+
},
|
|
746
|
+
enumerable: false,
|
|
747
|
+
configurable: true
|
|
748
|
+
});
|
|
749
|
+
RowActionProvider.prototype.addActionColumn = function (columns) {
|
|
750
|
+
if (!this.config) {
|
|
751
|
+
return this;
|
|
752
|
+
}
|
|
753
|
+
if (this.config.position === 'start') {
|
|
754
|
+
columns.unshift(RowActionProvider.COLUMN_NAME);
|
|
755
|
+
}
|
|
756
|
+
else {
|
|
757
|
+
columns.push(RowActionProvider.COLUMN_NAME);
|
|
758
|
+
}
|
|
759
|
+
return this;
|
|
760
|
+
};
|
|
761
|
+
/**
|
|
762
|
+
* Convert rows and actions to a view format.
|
|
763
|
+
* @param rows - The data rows to be converted.
|
|
764
|
+
* @param actionConfig - Configuration for actions on rows.
|
|
765
|
+
* @return Map of row IDs to their associated action views.
|
|
766
|
+
*/
|
|
767
|
+
RowActionProvider.prototype.setView = function (rows) {
|
|
768
|
+
if (!this.config) {
|
|
769
|
+
throw new Error("ActionConfig is undefined");
|
|
770
|
+
}
|
|
771
|
+
this.actionView = ActionViewFactory.create(rows, this.config);
|
|
772
|
+
return this;
|
|
773
|
+
};
|
|
774
|
+
RowActionProvider.canEnabled = function (tableConfig) {
|
|
775
|
+
return (tableConfig.actionCfg && (tableConfig.actionCfg.enable === undefined || tableConfig.actionCfg.enable === null || tableConfig.actionCfg.enable)) || false;
|
|
776
|
+
};
|
|
777
|
+
RowActionProvider.create = function (tableConfig) {
|
|
778
|
+
if (RowActionProvider.canEnabled(tableConfig)) {
|
|
779
|
+
return new RowActionProvider(tableConfig);
|
|
780
|
+
}
|
|
781
|
+
return new RowActionProviderDummy();
|
|
782
|
+
};
|
|
783
|
+
return RowActionProvider;
|
|
784
|
+
}());
|
|
785
|
+
RowActionProvider.COLUMN_NAME = 'tbl_actions';
|
|
786
|
+
var RowActionProviderDummy = /** @class */ (function (_super) {
|
|
787
|
+
__extends(RowActionProviderDummy, _super);
|
|
788
|
+
function RowActionProviderDummy() {
|
|
789
|
+
var _this = _super.call(this, EmptyValue.TABLE_CONFIG) || this;
|
|
790
|
+
_this.isEnabled = false;
|
|
791
|
+
return _this;
|
|
792
|
+
}
|
|
793
|
+
RowActionProviderDummy.prototype.addActionColumn = function (columns) {
|
|
794
|
+
return this;
|
|
795
|
+
};
|
|
796
|
+
RowActionProviderDummy.prototype.setView = function (rows) {
|
|
797
|
+
return this;
|
|
798
|
+
};
|
|
799
|
+
return RowActionProviderDummy;
|
|
800
|
+
}(RowActionProvider));
|
|
736
801
|
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
return rows.map(function (row) { return TableViewFactory.createColumnConfig(row, source); });
|
|
757
|
-
};
|
|
758
|
-
TableViewFactory.createColumnConfig = function (row, columnViewMap) {
|
|
759
|
-
var result = new Map();
|
|
760
|
-
columnViewMap.forEach(function (view, key) {
|
|
761
|
-
result.set(key, {
|
|
762
|
-
icon: TableViewFactory.configureIcon(view.icon, row),
|
|
763
|
-
text: TableViewFactory.configureText(view.text, row),
|
|
764
|
-
image: TableViewFactory.configureImage(view.image, row),
|
|
765
|
-
});
|
|
766
|
-
});
|
|
767
|
-
return result;
|
|
768
|
-
};
|
|
769
|
-
TableViewFactory.configureIcon = function (iconSource, row) {
|
|
770
|
-
if (!iconSource)
|
|
771
|
-
return undefined;
|
|
772
|
-
return {
|
|
773
|
-
name: iconSource.name(row),
|
|
774
|
-
color: iconSource.color ? iconSource.color(row) : undefined,
|
|
775
|
-
tooltip: iconSource.tooltip ? iconSource.tooltip(row) : undefined,
|
|
776
|
-
position: iconSource.position,
|
|
777
|
-
wrapper: iconSource.wrapper ? { color: iconSource.wrapper.color(row) } : undefined
|
|
778
|
-
};
|
|
779
|
-
};
|
|
780
|
-
TableViewFactory.configureText = function (textSource, row) {
|
|
781
|
-
var _a, _b;
|
|
782
|
-
if (!textSource)
|
|
783
|
-
return undefined;
|
|
784
|
-
return {
|
|
785
|
-
show: textSource.show,
|
|
786
|
-
tooltip: (_a = textSource.tooltip) === null || _a === void 0 ? void 0 : _a.call(textSource, row),
|
|
787
|
-
color: (_b = textSource.color) === null || _b === void 0 ? void 0 : _b.call(textSource, row)
|
|
788
|
-
};
|
|
789
|
-
};
|
|
790
|
-
TableViewFactory.configureImage = function (imageSource, row) {
|
|
791
|
-
if (!imageSource)
|
|
792
|
-
return undefined;
|
|
793
|
-
return {
|
|
794
|
-
src: imageSource.src(row),
|
|
795
|
-
width: imageSource.width || undefined,
|
|
796
|
-
height: imageSource.height || undefined
|
|
797
|
-
};
|
|
798
|
-
};
|
|
799
|
-
return TableViewFactory;
|
|
800
|
-
}());
|
|
802
|
+
var NgxAurTableConfigUtil = /** @class */ (function () {
|
|
803
|
+
function NgxAurTableConfigUtil() {
|
|
804
|
+
}
|
|
805
|
+
NgxAurTableConfigUtil.keys = function (config) {
|
|
806
|
+
return this.managingColumns(config).map(function (c) { return c.key; });
|
|
807
|
+
};
|
|
808
|
+
NgxAurTableConfigUtil.managingColumns = function (config) {
|
|
809
|
+
var _this = this;
|
|
810
|
+
return config.columnsCfg.filter(function (cfg) { return !_this.GENERATED_KEYS.has(cfg.key); });
|
|
811
|
+
};
|
|
812
|
+
/**
|
|
813
|
+
* @return Map where the key is 'key' and the value is 'name'
|
|
814
|
+
*/
|
|
815
|
+
NgxAurTableConfigUtil.keyNameMap = function (config) {
|
|
816
|
+
return new Map(this.managingColumns(config).map(function (cfg) { return [cfg.key, cfg.name]; }));
|
|
817
|
+
};
|
|
818
|
+
return NgxAurTableConfigUtil;
|
|
819
|
+
}());
|
|
820
|
+
NgxAurTableConfigUtil.GENERATED_KEYS = new Set([SelectionProvider.COLUMN_NAME, IndexProvider.COLUMN_NAME, RowActionProvider.COLUMN_NAME]);
|
|
801
821
|
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
822
|
+
var TableViewFactory = /** @class */ (function () {
|
|
823
|
+
function TableViewFactory() {
|
|
824
|
+
}
|
|
825
|
+
/**
|
|
826
|
+
* Converts rows into a view format based on table configuration.
|
|
827
|
+
* @param rows The rows of the table.
|
|
828
|
+
* @param tableConfig The configuration of the table.
|
|
829
|
+
* @returns An array of maps representing the view for each row.
|
|
830
|
+
*/
|
|
831
|
+
TableViewFactory.toView = function (rows, tableConfig) {
|
|
832
|
+
var columnViewMap = new Map();
|
|
833
|
+
tableConfig.columnsCfg.forEach(function (c) {
|
|
834
|
+
if (c.valueView) {
|
|
835
|
+
columnViewMap.set(c.key, c.valueView);
|
|
836
|
+
}
|
|
837
|
+
});
|
|
838
|
+
return TableViewFactory.toViewInternal(rows, columnViewMap);
|
|
839
|
+
};
|
|
840
|
+
TableViewFactory.toViewInternal = function (rows, source) {
|
|
841
|
+
return rows.map(function (row) { return TableViewFactory.createColumnConfig(row, source); });
|
|
842
|
+
};
|
|
843
|
+
TableViewFactory.createColumnConfig = function (row, columnViewMap) {
|
|
844
|
+
var result = new Map();
|
|
845
|
+
columnViewMap.forEach(function (view, key) {
|
|
846
|
+
result.set(key, {
|
|
847
|
+
icon: TableViewFactory.configureIcon(view.icon, row),
|
|
848
|
+
text: TableViewFactory.configureText(view.text, row),
|
|
849
|
+
image: TableViewFactory.configureImage(view.image, row),
|
|
850
|
+
});
|
|
851
|
+
});
|
|
852
|
+
return result;
|
|
853
|
+
};
|
|
854
|
+
TableViewFactory.configureIcon = function (iconSource, row) {
|
|
855
|
+
if (!iconSource)
|
|
856
|
+
return undefined;
|
|
857
|
+
return {
|
|
858
|
+
name: iconSource.name(row),
|
|
859
|
+
color: iconSource.color ? iconSource.color(row) : undefined,
|
|
860
|
+
tooltip: iconSource.tooltip ? iconSource.tooltip(row) : undefined,
|
|
861
|
+
position: iconSource.position,
|
|
862
|
+
wrapper: iconSource.wrapper ? { color: iconSource.wrapper.color(row) } : undefined
|
|
863
|
+
};
|
|
864
|
+
};
|
|
865
|
+
TableViewFactory.configureText = function (textSource, row) {
|
|
866
|
+
var _a, _b;
|
|
867
|
+
if (!textSource)
|
|
868
|
+
return undefined;
|
|
869
|
+
return {
|
|
870
|
+
show: textSource.show,
|
|
871
|
+
tooltip: (_a = textSource.tooltip) === null || _a === void 0 ? void 0 : _a.call(textSource, row),
|
|
872
|
+
color: (_b = textSource.color) === null || _b === void 0 ? void 0 : _b.call(textSource, row)
|
|
873
|
+
};
|
|
874
|
+
};
|
|
875
|
+
TableViewFactory.configureImage = function (imageSource, row) {
|
|
876
|
+
if (!imageSource)
|
|
877
|
+
return undefined;
|
|
878
|
+
return {
|
|
879
|
+
src: imageSource.src(row),
|
|
880
|
+
width: imageSource.width || undefined,
|
|
881
|
+
height: imageSource.height || undefined
|
|
882
|
+
};
|
|
883
|
+
};
|
|
884
|
+
return TableViewFactory;
|
|
885
|
+
}());
|
|
863
886
|
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
887
|
+
var PaginationProvider = /** @class */ (function () {
|
|
888
|
+
function PaginationProvider(config) {
|
|
889
|
+
this.isEnabled = true;
|
|
890
|
+
this.sizes = config.sizes || [5, 10, 15, 25, 50];
|
|
891
|
+
this.size = config.size || this.sizes[1];
|
|
892
|
+
}
|
|
893
|
+
PaginationProvider.canEnable = function (tableConfig) {
|
|
894
|
+
return (tableConfig.pageableCfg && tableConfig.pageableCfg.enable) || false;
|
|
895
|
+
};
|
|
896
|
+
PaginationProvider.create = function (tableConfig) {
|
|
897
|
+
if (this.canEnable(tableConfig) && tableConfig.pageableCfg) {
|
|
898
|
+
return new PaginationProvider(tableConfig.pageableCfg);
|
|
899
|
+
}
|
|
900
|
+
return new PaginationProviderDummy();
|
|
901
|
+
};
|
|
902
|
+
return PaginationProvider;
|
|
903
|
+
}());
|
|
904
|
+
var PaginationProviderDummy = /** @class */ (function (_super) {
|
|
905
|
+
__extends(PaginationProviderDummy, _super);
|
|
906
|
+
function PaginationProviderDummy() {
|
|
907
|
+
var _this = _super.call(this, EmptyValue.PAGINATION_CONFIG) || this;
|
|
908
|
+
_this.isEnabled = false;
|
|
909
|
+
return _this;
|
|
910
|
+
}
|
|
911
|
+
return PaginationProviderDummy;
|
|
912
|
+
}(PaginationProvider));
|
|
890
913
|
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
914
|
+
var TableRow = /** @class */ (function () {
|
|
915
|
+
function TableRow(id, rowSrc) {
|
|
916
|
+
this.rowSrc = rowSrc;
|
|
917
|
+
this.id = id;
|
|
918
|
+
}
|
|
919
|
+
return TableRow;
|
|
920
|
+
}());
|
|
898
921
|
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
922
|
+
var TableRowsFactory = /** @class */ (function () {
|
|
923
|
+
function TableRowsFactory() {
|
|
924
|
+
}
|
|
925
|
+
/**
|
|
926
|
+
* Converts an array of data objects into an array of TableRow objects.
|
|
927
|
+
* @param data Array of data objects to be converted.
|
|
928
|
+
* @param config Configuration settings for each column.
|
|
929
|
+
* @returns An array of TableRow objects.
|
|
930
|
+
*/
|
|
931
|
+
TableRowsFactory.convert = function (data, config) {
|
|
932
|
+
var _this = this;
|
|
933
|
+
return data.map(function (obj, index) { return _this.createTableRow(index, obj, config); });
|
|
934
|
+
};
|
|
935
|
+
TableRowsFactory.createTableRow = function (id, obj, config) {
|
|
936
|
+
var row = new TableRow(id, obj);
|
|
937
|
+
config.forEach(function (c) { return row[c.key] = c.valueConverter(obj); });
|
|
938
|
+
return row;
|
|
939
|
+
};
|
|
940
|
+
return TableRowsFactory;
|
|
941
|
+
}());
|
|
919
942
|
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
943
|
+
var MatTableDataSourceFactory = /** @class */ (function () {
|
|
944
|
+
function MatTableDataSourceFactory() {
|
|
945
|
+
}
|
|
946
|
+
/**
|
|
947
|
+
* Converts an array of data objects into MatTableDataSource.
|
|
948
|
+
* @param data Array of data objects to be converted.
|
|
949
|
+
* @param config Configuration settings for each column.
|
|
950
|
+
* @returns MatTableDataSource.
|
|
951
|
+
*/
|
|
952
|
+
MatTableDataSourceFactory.convert = function (data, config) {
|
|
953
|
+
var tableRows = TableRowsFactory.convert(data, config);
|
|
954
|
+
return new i3.MatTableDataSource(tableRows);
|
|
955
|
+
};
|
|
956
|
+
return MatTableDataSourceFactory;
|
|
957
|
+
}());
|
|
935
958
|
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
959
|
+
var DisplayColumnsFactory = /** @class */ (function () {
|
|
960
|
+
function DisplayColumnsFactory() {
|
|
961
|
+
}
|
|
962
|
+
DisplayColumnsFactory.create = function (tableConfig) {
|
|
963
|
+
return tableConfig.columnsCfg.map(function (tableColumn) { return tableColumn.key; });
|
|
964
|
+
};
|
|
965
|
+
return DisplayColumnsFactory;
|
|
966
|
+
}());
|
|
944
967
|
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
968
|
+
var TotalRowProvider = /** @class */ (function () {
|
|
969
|
+
function TotalRowProvider(tableConfig, tableDataSource) {
|
|
970
|
+
this.tableConfig = tableConfig;
|
|
971
|
+
this.tableDataSource = tableDataSource;
|
|
972
|
+
this.isEnabled = true;
|
|
973
|
+
this.totals = new Map();
|
|
974
|
+
}
|
|
975
|
+
TotalRowProvider.prototype.setStyle = function () {
|
|
976
|
+
var _a, _b;
|
|
977
|
+
this.style = (_b = (_a = this.tableConfig.tableView) === null || _a === void 0 ? void 0 : _a.totalRowView) === null || _b === void 0 ? void 0 : _b.style;
|
|
978
|
+
return this;
|
|
979
|
+
};
|
|
980
|
+
TotalRowProvider.prototype.setTotalRow = function () {
|
|
981
|
+
var _this = this;
|
|
982
|
+
this.tableConfig.columnsCfg.forEach(function (col) {
|
|
983
|
+
if (col.totalConverter) {
|
|
984
|
+
_this.totals.set(col.key, col.totalConverter(_this.tableDataSource.data));
|
|
985
|
+
}
|
|
986
|
+
});
|
|
987
|
+
return this;
|
|
988
|
+
};
|
|
989
|
+
TotalRowProvider.canEnable = function (tableConfig) {
|
|
990
|
+
return tableConfig.columnsCfg.some(function (col) { return col.totalConverter; });
|
|
991
|
+
};
|
|
992
|
+
TotalRowProvider.create = function (tableConfig, tableDataSource) {
|
|
993
|
+
if (TotalRowProvider.canEnable(tableConfig)) {
|
|
994
|
+
return new TotalRowProvider(tableConfig, tableDataSource);
|
|
995
|
+
}
|
|
996
|
+
return new TotalRowProviderDummy();
|
|
997
|
+
};
|
|
998
|
+
return TotalRowProvider;
|
|
999
|
+
}());
|
|
1000
|
+
var TotalRowProviderDummy = /** @class */ (function (_super) {
|
|
1001
|
+
__extends(TotalRowProviderDummy, _super);
|
|
1002
|
+
function TotalRowProviderDummy() {
|
|
1003
|
+
var _this = _super.call(this, EmptyValue.TABLE_CONFIG, EmptyValue.MAT_TABLE_DATA_SOURCE) || this;
|
|
1004
|
+
_this.isEnabled = false;
|
|
1005
|
+
return _this;
|
|
1006
|
+
}
|
|
1007
|
+
TotalRowProviderDummy.prototype.setTotalRow = function () {
|
|
1008
|
+
return this;
|
|
1009
|
+
};
|
|
1010
|
+
return TotalRowProviderDummy;
|
|
1011
|
+
}(TotalRowProvider));
|
|
989
1012
|
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1013
|
+
var ColumnViewComponent = /** @class */ (function () {
|
|
1014
|
+
function ColumnViewComponent() {
|
|
1015
|
+
}
|
|
1016
|
+
return ColumnViewComponent;
|
|
1017
|
+
}());
|
|
1018
|
+
ColumnViewComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ColumnViewComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1019
|
+
ColumnViewComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ColumnViewComponent, selector: "lib-column-view", inputs: { config: "config", value: "value" }, ngImport: i0__namespace, template: "<div class=\"align-container\">\n <div [ngClass]=\"{'circle': config?.icon?.wrapper}\"\n [style.background-color]=\"config?.icon?.wrapper?.color\"\n >\n <mat-icon *ngIf=\"config?.icon\"\n [matTooltip]=\"config?.icon?.tooltip?.toString() || ''\"\n [style.color]=\"config?.icon?.color\"\n >\n {{config?.icon?.name}}\n </mat-icon>\n </div>\n\n <img\n *ngIf=\"config?.image?.src\"\n [src]=\"config?.image?.src\"\n [style.height]=\"config?.image?.height\"\n [style.width]=\"config?.image?.width\"\n alt=\"img\"\n >\n\n <span *ngIf=\"config?.text?.show != false\"\n [matTooltip]=\"config?.text?.tooltip?.toString() || ''\"\n >\n {{value}}\n </span>\n</div>\n", styles: [".align-container{display:flex;align-items:center}span{margin-left:4px}.circle{display:flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%}\n"], components: [{ type: i1__namespace.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i9__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i9__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }] });
|
|
1020
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ColumnViewComponent, decorators: [{
|
|
1021
|
+
type: i0.Component,
|
|
1022
|
+
args: [{
|
|
1023
|
+
selector: 'lib-column-view',
|
|
1024
|
+
templateUrl: './column-view.component.html',
|
|
1025
|
+
styleUrls: ['./column-view.component.css']
|
|
1026
|
+
}]
|
|
1027
|
+
}], propDecorators: { config: [{
|
|
1028
|
+
type: i0.Input
|
|
1029
|
+
}], value: [{
|
|
1030
|
+
type: i0.Input
|
|
1031
|
+
}] } });
|
|
1009
1032
|
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1033
|
+
var DataPropertyGetterPipe = /** @class */ (function () {
|
|
1034
|
+
function DataPropertyGetterPipe() {
|
|
1035
|
+
}
|
|
1036
|
+
DataPropertyGetterPipe.prototype.transform = function (object, keyName) {
|
|
1037
|
+
var args = [];
|
|
1038
|
+
for (var _i = 2; _i < arguments.length; _i++) {
|
|
1039
|
+
args[_i - 2] = arguments[_i];
|
|
1040
|
+
}
|
|
1041
|
+
return object[keyName];
|
|
1042
|
+
};
|
|
1043
|
+
return DataPropertyGetterPipe;
|
|
1044
|
+
}());
|
|
1045
|
+
DataPropertyGetterPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DataPropertyGetterPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
|
|
1046
|
+
DataPropertyGetterPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DataPropertyGetterPipe, name: "dataPropertyGetter" });
|
|
1047
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: DataPropertyGetterPipe, decorators: [{
|
|
1048
|
+
type: i0.Pipe,
|
|
1049
|
+
args: [{
|
|
1050
|
+
name: 'dataPropertyGetter'
|
|
1051
|
+
}]
|
|
1052
|
+
}] });
|
|
1030
1053
|
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
NgxAurMatTableComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NgxAurMatTableComponent, selector: "aur-mat-table", inputs: { displayColumns: "displayColumns", tableConfig: "tableConfig", tableData: "tableData", highlight: "highlight" }, outputs: { sort: "sort", onRowAction: "onRowAction", selected: "selected", onSelect: "onSelect", onDeselect: "onDeselect", onSelectedRowsAction: "onSelectedRowsAction", onRowClick: "onRowClick", onFilter: "onFilter", columnOffsets: "columnOffsets" }, viewQueries: [{ propertyName: "table", first: true, predicate: ["table"], descendants: true, read: i0.ElementRef }, { propertyName: "matPaginator", first: true, predicate: i8.MatPaginator, descendants: true }, { propertyName: "matSort", first: true, predicate: i7.MatSort, descendants: true, static: true }, { propertyName: "rows", predicate: ["rowLink"], descendants: true, read: i0.ElementRef }], usesOnChanges: true, ngImport: i0__namespace, template: "<div class=\"aur-mat-table\">\r\n <ng-container>\r\n\r\n <!-- Filter -->\r\n <ng-container *ngIf=\"tableConfig.filterCfg\">\r\n <mat-form-field>\r\n <mat-label>{{tableConfig.filterCfg?.label}}</mat-label>\r\n <input matInput (keyup)=\"applySearchFilter($event)\"\r\n placeholder=\"{{tableConfig.filterCfg?.placeholder}}\"\r\n style=\"font-size: 18px;\">\r\n <mat-icon matPrefix>search</mat-icon>\r\n </mat-form-field>\r\n </ng-container>\r\n\r\n <!-- Table -->\r\n <table #table mat-table matSort\r\n [dataSource]=\"tableDataSource\"\r\n (matSortChange)=\"sortTable($event)\"\r\n [style.height]=\"tableConfig.tableView?.height\"\r\n [style.max-height]=\"tableConfig.tableView?.maxHeight\"\r\n [style.min-height]=\"tableConfig.tableView?.minHeight\">\r\n\r\n <!-- index-column-->\r\n <ng-container *ngIf=\"indexProvider.isEnabled\" [matColumnDef]=\"indexProvider.COLUMN_NAME\">\r\n\r\n <th mat-header-cell *matHeaderCellDef>\r\n <lib-column-view [config]=\"indexProvider.headerView\">\r\n {{indexProvider.name}}\r\n </lib-column-view>\r\n </th>\r\n\r\n <td mat-cell *matCellDef=\"let element; let rowIndex = index\">\r\n {{rowIndex + indexProvider.offset}}\r\n </td>\r\n\r\n <td mat-footer-cell *matFooterCellDef>\r\n {{totalRowProvider.totals.get(indexProvider.COLUMN_NAME) || ''}}\r\n </td>\r\n </ng-container>\r\n\r\n <!-- selection-column-->\r\n <ng-container [matColumnDef]=\"selectionProvider.COLUMN_NAME\" *ngIf=\"selectionProvider.isEnabled\">\r\n <th mat-header-cell *matHeaderCellDef>\r\n <div class=\"flex-container\">\r\n <mat-checkbox (change)=\"$event ? masterToggle() : null\"\r\n [checked]=\"selectionProvider.selection.hasValue() && isAllSelected()\"\r\n [indeterminate]=\"selectionProvider.selection.hasValue() && !isAllSelected()\">\r\n </mat-checkbox>\r\n <div\r\n *ngIf=\"tableConfig.selectionCfg?.showSelectedCount && selectionProvider.selection.hasValue()\">\r\n ({{selectionProvider.selection.selected.length}}/{{tableDataSource.filteredData.length}})\r\n </div>\r\n\r\n <div *ngIf=\"selectionProvider.selection.hasValue() && tableConfig?.selectionCfg?.actions\">\r\n <button mat-icon-button\r\n (click)=\"emitSelectedRowsAction(action.action, selectionProvider.selection.selected)\"\r\n [matTooltip]=\"action.icon.tooltip || ''\"\r\n *ngFor=\"let action of tableConfig.selectionCfg!.actions\">\r\n <mat-icon [style.color]=\"action.icon.color\">\r\n {{action.icon.name}}\r\n </mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n\r\n </th>\r\n <td mat-cell *matCellDef=\"let row\">\r\n <mat-checkbox (click)=\"$event.stopPropagation()\"\r\n (change)=\"$event ? selectionProvider.selection.toggle(castSrc(row).rowSrc) : null\"\r\n [checked]=\"selectionProvider.selection.isSelected(castSrc(row).rowSrc)\">\r\n </mat-checkbox>\r\n </td>\r\n\r\n <ng-container *ngTemplateOutlet=\"footerCellTemplate; context: {$implicit: selectionProvider.COLUMN_NAME}\">\r\n </ng-container>\r\n </ng-container>\r\n\r\n <!-- action column -->\r\n <ng-container *ngIf=\"rowActionsProvider.isEnabled\" [matColumnDef]=\"rowActionsProvider.COLUMN_NAME\">\r\n <th mat-header-cell *matHeaderCellDef></th>\r\n <td mat-cell *matCellDef=\"let element\">\r\n <button mat-icon-button\r\n (click)=\"emitRowAction(action.action, element.rowSrc, $event)\"\r\n [matTooltip]=\"action.icon.tooltip || ''\"\r\n *ngFor=\"let action of rowActionsProvider.actionView.get(element.id)\">\r\n <mat-icon [style.color]=\"action.icon.color\">\r\n {{action.icon.name}}\r\n </mat-icon>\r\n </button>\r\n </td>\r\n\r\n <ng-container *ngTemplateOutlet=\"footerCellTemplate; context: {$implicit: rowActionsProvider.COLUMN_NAME}\">\r\n </ng-container>\r\n </ng-container>\r\n\r\n <!-- value-icon-->\r\n <ng-container *ngFor=\"let columnConfig of tableConfig.columnsCfg\" [matColumnDef]=\"columnConfig.key\">\r\n\r\n <!-- if sortable column header -->\r\n <ng-container *ngIf=\"columnConfig.sort && columnConfig.sort.enable; else notSortable\">\r\n <th mat-header-cell *matHeaderCellDef [mat-sort-header]=\"columnConfig.key\"\r\n [arrowPosition]=\"columnConfig.sort.position === 'right' ? 'before' : 'after'\">\r\n <ng-container *ngTemplateOutlet=\"headerValue\"></ng-container>\r\n </th>\r\n </ng-container>\r\n\r\n <!-- else not sortable -->\r\n <ng-template #notSortable>\r\n <th mat-header-cell *matHeaderCellDef>\r\n <ng-container *ngTemplateOutlet=\"headerValue\"></ng-container>\r\n </th>\r\n </ng-template>\r\n\r\n <!-- header value-->\r\n <ng-template #headerValue>\r\n <lib-column-view [config]=\"columnConfig.headerView\"\r\n [value]=\"columnConfig.name\">\r\n </lib-column-view>\r\n </ng-template>\r\n\r\n <!-- column value \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u044C \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u043A\u043E\u043B\u043E\u043D\u043E\u043A \u043D\u0443\u0436\u043D\u043E \u0447\u0435\u0440\u0435\u0437 getView(rowIndex, columnConfig.key) \u0442\u0430\u043C \u043D\u0430\u0445\u043E\u0434\u044F\u0442\u0441\u044F \u0443\u0436\u0435\r\n \u043F\u043E\u0434\u0433\u043E\u0442\u043E\u0432\u043B\u0435\u043D\u043D\u044B\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F \u0434\u043B\u044F \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u044F-->\r\n <td mat-cell *matCellDef=\"let element;\">\r\n <lib-column-view\r\n [config]=\"tableView[element.id]?.get(columnConfig.key)\"\r\n [value]=\"element | dataPropertyGetter: columnConfig.key\">\r\n </lib-column-view>\r\n </td>\r\n\r\n <td mat-footer-cell *matFooterCellDef>\r\n {{ totalRowProvider.totals.get(columnConfig.key) || '' }}\r\n </td>\r\n\r\n </ng-container>\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"_displayColumns; sticky: this.tableConfig.stickyCfg?.header\"></tr>\r\n <tr mat-row #rowLink\r\n *matRowDef=\"let row; columns: _displayColumns;\"\r\n (click)=\"rowClick(row)\"\r\n [ngClass]=\"{'pointer': tableConfig.clickCfg?.pointer || false, 'new-color': highlighted===row.rowSrc && tableConfig?.clickCfg?.highlightClicked?.color}\"\r\n [ngStyle]=\"{\r\n 'color': highlighted===row.rowSrc? tableConfig?.clickCfg?.highlightClicked?.color : undefined,\r\n 'background-color': highlighted === row.rowSrc? tableConfig?.clickCfg?.highlightClicked?.background : undefined,\r\n 'border': highlighted === row.rowSrc? tableConfig?.clickCfg?.highlightClicked?.border : undefined\r\n }\">\r\n </tr>\r\n <ng-container *ngIf=\"totalRowProvider.isEnabled\">\r\n <tr mat-footer-row *matFooterRowDef=\"_displayColumns\" [style]=\"totalRowProvider.style\"></tr>\r\n </ng-container>\r\n </table>\r\n\r\n <!-- Pagination -->\r\n <mat-paginator *ngIf=\"paginationProvider.isEnabled\"\r\n [pageSizeOptions]=\"paginationProvider.sizes\"\r\n [pageSize]=\"paginationProvider.size\"\r\n showFirstLastButtons>\r\n </mat-paginator>\r\n </ng-container>\r\n</div>\r\n\r\n<ng-template #footerCellTemplate let-columnName>\r\n <td mat-footer-cell *matFooterCellDef>\r\n {{ totalRowProvider.totals.get(columnName) || '' }}\r\n </td>\r\n</ng-template>\r\n", styles: [".aur-mat-table table{width:100%;border-collapse:collapse}.aur-mat-table th,td{padding:10px!important}.aur-mat-table .new-color td.mat-cell,.aur-mat-table .new-color td.mat-footer-cell{color:inherit}.aur-mat-table mat-form-field{width:100%}.aur-mat-table .text-right{text-align:right!important}.aur-mat-table .pointer:hover{background-color:#f2f2f2;cursor:pointer}.aur-mat-table .flex-container{display:flex;align-items:center}\n"], components: [{ type: i1__namespace$1.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i1__namespace.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i3__namespace$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { type: ColumnViewComponent, selector: "lib-column-view", inputs: ["config", "value"] }, { type: i5__namespace.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: i6__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i7__namespace.MatSortHeader, selector: "[mat-sort-header]", inputs: ["disabled", "arrowPosition", "sortActionDescription", "disableClear", "mat-sort-header", "start"], exportAs: ["matSortHeader"] }, { type: i3__namespace$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { type: i3__namespace$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { type: i3__namespace$1.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { type: i8__namespace.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }], directives: [{ type: i9__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace$1.MatLabel, selector: "mat-label" }, { type: i10__namespace.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i1__namespace$1.MatPrefix, selector: "[matPrefix]" }, { type: i7__namespace.MatSort, selector: "[matSort]", inputs: ["matSortDisabled", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortActive"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { type: i3__namespace$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { type: i3__namespace$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { type: i3__namespace$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { type: i3__namespace$1.MatCellDef, selector: "[matCellDef]" }, { type: i3__namespace$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { type: i3__namespace$1.MatFooterCellDef, selector: "[matFooterCellDef]" }, { type: i3__namespace$1.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { type: i9__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3__namespace.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i9__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3__namespace$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { type: i3__namespace$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { type: i9__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i9__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i3__namespace$1.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }], pipes: { "dataPropertyGetter": DataPropertyGetterPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1054
|
+
var NgxAurMatTableComponent = /** @class */ (function () {
|
|
1055
|
+
function NgxAurMatTableComponent() {
|
|
1056
|
+
this.tableDataSource = new i3.MatTableDataSource([]);
|
|
1057
|
+
this._displayColumns = [];
|
|
1058
|
+
this._customDisplayColumnsEnabled = false;
|
|
1059
|
+
this.tableView = [];
|
|
1060
|
+
this.tableData = [];
|
|
1061
|
+
this.sort = new i0.EventEmitter();
|
|
1062
|
+
// events if enabled actions
|
|
1063
|
+
this.onRowAction = new i0.EventEmitter();
|
|
1064
|
+
// -----------------------
|
|
1065
|
+
// events if enabled select event
|
|
1066
|
+
this.selected = new i0.EventEmitter();
|
|
1067
|
+
this.onSelect = new i0.EventEmitter();
|
|
1068
|
+
this.onDeselect = new i0.EventEmitter();
|
|
1069
|
+
this.onSelectedRowsAction = new i0.EventEmitter();
|
|
1070
|
+
//------------------------
|
|
1071
|
+
this.onRowClick = new i0.EventEmitter();
|
|
1072
|
+
/**
|
|
1073
|
+
* return filtered rows
|
|
1074
|
+
*/
|
|
1075
|
+
this.onFilter = new i0.EventEmitter();
|
|
1076
|
+
this.columnOffsets = new i0.EventEmitter();
|
|
1077
|
+
// @ts-ignore
|
|
1078
|
+
this.resizeColumnOffsetsObserver = EmptyValue.RESIZE_OBSERVER;
|
|
1079
|
+
this.selectionProvider = new SelectionProviderDummy();
|
|
1080
|
+
this.rowActionsProvider = new RowActionProviderDummy();
|
|
1081
|
+
this.indexProvider = new IndexProviderDummy();
|
|
1082
|
+
this.paginationProvider = new PaginationProviderDummy();
|
|
1083
|
+
this.totalRowProvider = new TotalRowProviderDummy();
|
|
1084
|
+
this.customSortFunctions = new Map();
|
|
1085
|
+
this.filterStorage = new Map();
|
|
1086
|
+
}
|
|
1087
|
+
Object.defineProperty(NgxAurMatTableComponent.prototype, "displayColumns", {
|
|
1088
|
+
set: function (columns) {
|
|
1089
|
+
this._displayColumns = columns;
|
|
1090
|
+
this._customDisplayColumnsEnabled = columns && columns.length > 0;
|
|
1091
|
+
},
|
|
1092
|
+
enumerable: false,
|
|
1093
|
+
configurable: true
|
|
1094
|
+
});
|
|
1095
|
+
NgxAurMatTableComponent.prototype.ngOnChanges = function (changes) {
|
|
1096
|
+
if ((changes['tableData'] && this.tableData) || (changes['displayColumns'] && this._displayColumns)) {
|
|
1097
|
+
this.prepareTableData();
|
|
1098
|
+
}
|
|
1099
|
+
if (changes['highlight'] && this.highlight) {
|
|
1100
|
+
this.handleHighlightChange(this.highlight);
|
|
1101
|
+
}
|
|
1102
|
+
};
|
|
1103
|
+
NgxAurMatTableComponent.prototype.handleHighlightChange = function (h) {
|
|
1104
|
+
var _a, _b;
|
|
1105
|
+
if (this.highlighted === h.value) {
|
|
1106
|
+
this.highlight = undefined;
|
|
1107
|
+
this.highlighted = undefined;
|
|
1108
|
+
}
|
|
1109
|
+
else {
|
|
1110
|
+
this.highlighted = h.value;
|
|
1111
|
+
var index = this.tableDataSource.data.findIndex(function (row) { return row.rowSrc === h.value; });
|
|
1112
|
+
if (index >= 0) {
|
|
1113
|
+
(_b = (_a = this.rows) === null || _a === void 0 ? void 0 : _a.toArray()[index]) === null || _b === void 0 ? void 0 : _b.nativeElement.scrollIntoView({
|
|
1114
|
+
behavior: "smooth",
|
|
1115
|
+
block: "center",
|
|
1116
|
+
inline: "center"
|
|
1117
|
+
});
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
};
|
|
1121
|
+
NgxAurMatTableComponent.prototype.ngOnInit = function () {
|
|
1122
|
+
if (!this.tableConfig) {
|
|
1123
|
+
throw new Error("init inputs [tableConfig] is mandatory!");
|
|
1124
|
+
}
|
|
1125
|
+
};
|
|
1126
|
+
// we need this, in order to make pagination work with *ngIf
|
|
1127
|
+
NgxAurMatTableComponent.prototype.ngAfterViewInit = function () {
|
|
1128
|
+
var _this = this;
|
|
1129
|
+
this.initPaginator();
|
|
1130
|
+
this.initSortingDataAccessor();
|
|
1131
|
+
this.updateColumnOffsets();
|
|
1132
|
+
this.resizeColumnOffsetsObserver = new ResizeObserver(function () { return _this.updateColumnOffsets(); });
|
|
1133
|
+
this.resizeColumnOffsetsObserver.observe(this.table.nativeElement);
|
|
1134
|
+
};
|
|
1135
|
+
NgxAurMatTableComponent.prototype.initPaginator = function () {
|
|
1136
|
+
if (this.tableDataSource) {
|
|
1137
|
+
this.tableDataSource.paginator = this.matPaginator;
|
|
1138
|
+
}
|
|
1139
|
+
};
|
|
1140
|
+
NgxAurMatTableComponent.prototype.initSortingDataAccessor = function () {
|
|
1141
|
+
var _this = this;
|
|
1142
|
+
if (this.tableDataSource) {
|
|
1143
|
+
this.tableDataSource.sort = this.matSort;
|
|
1144
|
+
this.tableDataSource.sortingDataAccessor = function (data, key) {
|
|
1145
|
+
var customSortFunction = _this.customSortFunctions.get(key);
|
|
1146
|
+
return customSortFunction ? customSortFunction(data, key) : data[key];
|
|
1147
|
+
};
|
|
1148
|
+
}
|
|
1149
|
+
};
|
|
1150
|
+
NgxAurMatTableComponent.prototype.updateColumnOffsets = function () {
|
|
1151
|
+
var offsets = Array.from(this.table.nativeElement.querySelectorAll('th'))
|
|
1152
|
+
.map(function (c) { return c; })
|
|
1153
|
+
.map(function (c) { return ({ left: c.offsetLeft, width: c.offsetWidth }); });
|
|
1154
|
+
this.columnOffsets.emit(offsets);
|
|
1155
|
+
};
|
|
1156
|
+
NgxAurMatTableComponent.prototype.prepareTableData = function () {
|
|
1157
|
+
this.initTable();
|
|
1158
|
+
this.initCustomSortFunctionsMap();
|
|
1159
|
+
this.initPaginator();
|
|
1160
|
+
this.initSortingDataAccessor();
|
|
1161
|
+
this.indexProvider = IndexProvider.create(this.tableConfig)
|
|
1162
|
+
.addIndexColumn(this._displayColumns);
|
|
1163
|
+
this.rowActionsProvider = RowActionProvider.create(this.tableConfig)
|
|
1164
|
+
.addActionColumn(this._displayColumns)
|
|
1165
|
+
.setView(this.tableDataSource.data);
|
|
1166
|
+
this.selectionProvider = SelectionProvider.create(this.tableConfig, this.tableDataSource)
|
|
1167
|
+
.addCheckboxColumn(this._displayColumns)
|
|
1168
|
+
.bindEventEmitters(this.selected, this.onSelect, this.onDeselect);
|
|
1169
|
+
this.paginationProvider = PaginationProvider.create(this.tableConfig);
|
|
1170
|
+
this.totalRowProvider = TotalRowProvider.create(this.tableConfig, this.tableDataSource)
|
|
1171
|
+
.setStyle()
|
|
1172
|
+
.setTotalRow();
|
|
1173
|
+
};
|
|
1174
|
+
NgxAurMatTableComponent.prototype.initCustomSortFunctionsMap = function () {
|
|
1175
|
+
var _this = this;
|
|
1176
|
+
this.tableConfig.columnsCfg
|
|
1177
|
+
.filter(function (c) { return c.sort && c.sort.enable && c.sort.customSort; })
|
|
1178
|
+
.forEach(function (c) { return _this.customSortFunctions.set(c.key, c.sort.customSort); });
|
|
1179
|
+
};
|
|
1180
|
+
NgxAurMatTableComponent.prototype.initTable = function () {
|
|
1181
|
+
this.tableDataSource = MatTableDataSourceFactory.convert(this.tableData, this.tableConfig.columnsCfg);
|
|
1182
|
+
this.tableView = TableViewFactory.toView(this.tableDataSource.data, this.tableConfig);
|
|
1183
|
+
if (!this._customDisplayColumnsEnabled) {
|
|
1184
|
+
this._displayColumns = DisplayColumnsFactory.create(this.tableConfig);
|
|
1185
|
+
}
|
|
1186
|
+
};
|
|
1187
|
+
NgxAurMatTableComponent.prototype.applySearchFilter = function (event) {
|
|
1188
|
+
var filterValue = event.target.value;
|
|
1189
|
+
this.tableDataSource.filter = filterValue.trim().toLowerCase();
|
|
1190
|
+
this.emitFilteredValues();
|
|
1191
|
+
};
|
|
1192
|
+
NgxAurMatTableComponent.prototype.removeFilter = function (filterName) {
|
|
1193
|
+
this.filterStorage.delete(filterName);
|
|
1194
|
+
this.applyFiltersInternal();
|
|
1195
|
+
};
|
|
1196
|
+
NgxAurMatTableComponent.prototype.applyFilter = function (filterName, filter) {
|
|
1197
|
+
this.filterStorage.set(filterName, filter);
|
|
1198
|
+
this.applyFiltersInternal();
|
|
1199
|
+
};
|
|
1200
|
+
NgxAurMatTableComponent.prototype.clearFilters = function () {
|
|
1201
|
+
this.filterStorage.clear();
|
|
1202
|
+
this.applyFiltersInternal();
|
|
1203
|
+
};
|
|
1204
|
+
NgxAurMatTableComponent.prototype.applyFiltersInternal = function () {
|
|
1205
|
+
var filterActions = __spreadArray([], __read(this.filterStorage.values()));
|
|
1206
|
+
this.tableDataSource.filterPredicate = function (data) {
|
|
1207
|
+
return filterActions.every(function (filterAction) { return filterAction.filterFn()(data); });
|
|
1208
|
+
};
|
|
1209
|
+
// Применение фильтрации. нужно передать уникальное значение чтобы фильтрация запустилась
|
|
1210
|
+
this.tableDataSource.filter = 'trigger-' + Math.random();
|
|
1211
|
+
this.emitFilteredValues();
|
|
1212
|
+
};
|
|
1213
|
+
NgxAurMatTableComponent.prototype.emitFilteredValues = function () {
|
|
1214
|
+
this.onFilter.emit(this.tableDataSource.filteredData.map(function (f) { return f.rowSrc; }));
|
|
1215
|
+
};
|
|
1216
|
+
NgxAurMatTableComponent.prototype.sortTable = function (sortParameters) {
|
|
1217
|
+
this.sort.emit(sortParameters);
|
|
1218
|
+
};
|
|
1219
|
+
NgxAurMatTableComponent.prototype.emitSelectedRowsAction = function (action, rows) {
|
|
1220
|
+
this.onSelectedRowsAction.emit({ action: action, value: rows });
|
|
1221
|
+
};
|
|
1222
|
+
NgxAurMatTableComponent.prototype.emitRowAction = function (action, row, $event) {
|
|
1223
|
+
$event.stopPropagation();
|
|
1224
|
+
this.onRowAction.emit({ action: action, value: row });
|
|
1225
|
+
};
|
|
1226
|
+
NgxAurMatTableComponent.prototype.masterToggle = function () {
|
|
1227
|
+
this.selectionProvider.masterToggle();
|
|
1228
|
+
};
|
|
1229
|
+
NgxAurMatTableComponent.prototype.isAllSelected = function () {
|
|
1230
|
+
return this.selectionProvider.isAllSelected();
|
|
1231
|
+
};
|
|
1232
|
+
NgxAurMatTableComponent.prototype.castSrc = function (row) {
|
|
1233
|
+
return row;
|
|
1234
|
+
};
|
|
1235
|
+
NgxAurMatTableComponent.prototype.rowClick = function (row) {
|
|
1236
|
+
var _a;
|
|
1237
|
+
if (row.rowSrc !== this.highlighted || (row.rowSrc === this.highlighted && !((_a = this.tableConfig.clickCfg) === null || _a === void 0 ? void 0 : _a.cancelable))) {
|
|
1238
|
+
this.onRowClick.emit(row.rowSrc);
|
|
1239
|
+
this.highlighted = row.rowSrc;
|
|
1240
|
+
}
|
|
1241
|
+
else {
|
|
1242
|
+
this.onRowClick.emit(undefined);
|
|
1243
|
+
this.highlighted = undefined;
|
|
1244
|
+
}
|
|
1245
|
+
};
|
|
1246
|
+
NgxAurMatTableComponent.prototype.ngOnDestroy = function () {
|
|
1247
|
+
// Останавливаем наблюдение при уничтожении компонента
|
|
1248
|
+
this.resizeColumnOffsetsObserver.disconnect();
|
|
1249
|
+
};
|
|
1250
|
+
return NgxAurMatTableComponent;
|
|
1251
|
+
}());
|
|
1252
|
+
NgxAurMatTableComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NgxAurMatTableComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1253
|
+
NgxAurMatTableComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: NgxAurMatTableComponent, selector: "aur-mat-table", inputs: { displayColumns: "displayColumns", tableConfig: "tableConfig", tableData: "tableData", highlight: "highlight" }, outputs: { sort: "sort", onRowAction: "onRowAction", selected: "selected", onSelect: "onSelect", onDeselect: "onDeselect", onSelectedRowsAction: "onSelectedRowsAction", onRowClick: "onRowClick", onFilter: "onFilter", columnOffsets: "columnOffsets" }, viewQueries: [{ propertyName: "table", first: true, predicate: ["table"], descendants: true, read: i0.ElementRef }, { propertyName: "matPaginator", first: true, predicate: i8.MatPaginator, descendants: true }, { propertyName: "matSort", first: true, predicate: i7.MatSort, descendants: true, static: true }, { propertyName: "rows", predicate: ["rowLink"], descendants: true, read: i0.ElementRef }], usesOnChanges: true, ngImport: i0__namespace, template: "<div class=\"aur-mat-table\">\r\n <ng-container>\r\n\r\n <!-- Filter -->\r\n <ng-container *ngIf=\"tableConfig.filterCfg\">\r\n <mat-form-field>\r\n <mat-label>{{tableConfig.filterCfg?.label}}</mat-label>\r\n <input matInput (keyup)=\"applySearchFilter($event)\"\r\n placeholder=\"{{tableConfig.filterCfg?.placeholder}}\"\r\n style=\"font-size: 18px;\">\r\n <mat-icon matPrefix>search</mat-icon>\r\n </mat-form-field>\r\n </ng-container>\r\n\r\n <!-- Table -->\r\n <table #table mat-table matSort\r\n [dataSource]=\"tableDataSource\"\r\n (matSortChange)=\"sortTable($event)\"\r\n [style.height]=\"tableConfig.tableView?.height\"\r\n [style.max-height]=\"tableConfig.tableView?.maxHeight\"\r\n [style.min-height]=\"tableConfig.tableView?.minHeight\">\r\n\r\n <!-- index-column-->\r\n <ng-container *ngIf=\"indexProvider.isEnabled\" [matColumnDef]=\"indexProvider.COLUMN_NAME\">\r\n\r\n <th mat-header-cell *matHeaderCellDef>\r\n <lib-column-view [config]=\"indexProvider.headerView\">\r\n {{indexProvider.name}}\r\n </lib-column-view>\r\n </th>\r\n\r\n <td mat-cell *matCellDef=\"let element; let rowIndex = index\">\r\n {{rowIndex + indexProvider.offset}}\r\n </td>\r\n\r\n <td mat-footer-cell *matFooterCellDef>\r\n {{totalRowProvider.totals.get(indexProvider.COLUMN_NAME) || ''}}\r\n </td>\r\n </ng-container>\r\n\r\n <!-- selection-column-->\r\n <ng-container [matColumnDef]=\"selectionProvider.COLUMN_NAME\" *ngIf=\"selectionProvider.isEnabled\">\r\n <th mat-header-cell *matHeaderCellDef>\r\n <div class=\"flex-container\">\r\n <mat-checkbox (change)=\"$event ? masterToggle() : null\"\r\n [checked]=\"selectionProvider.selection.hasValue() && isAllSelected()\"\r\n [indeterminate]=\"selectionProvider.selection.hasValue() && !isAllSelected()\">\r\n </mat-checkbox>\r\n <div\r\n *ngIf=\"tableConfig.selectionCfg?.showSelectedCount && selectionProvider.selection.hasValue()\">\r\n ({{selectionProvider.selection.selected.length}}/{{tableDataSource.filteredData.length}})\r\n </div>\r\n\r\n <div *ngIf=\"selectionProvider.selection.hasValue() && tableConfig?.selectionCfg?.actions\">\r\n <button mat-icon-button\r\n (click)=\"emitSelectedRowsAction(action.action, selectionProvider.selection.selected)\"\r\n [matTooltip]=\"action.icon.tooltip || ''\"\r\n *ngFor=\"let action of tableConfig.selectionCfg!.actions\">\r\n <mat-icon [style.color]=\"action.icon.color\">\r\n {{action.icon.name}}\r\n </mat-icon>\r\n </button>\r\n </div>\r\n </div>\r\n\r\n </th>\r\n <td mat-cell *matCellDef=\"let row\">\r\n <mat-checkbox (click)=\"$event.stopPropagation()\"\r\n (change)=\"$event ? selectionProvider.selection.toggle(castSrc(row).rowSrc) : null\"\r\n [checked]=\"selectionProvider.selection.isSelected(castSrc(row).rowSrc)\">\r\n </mat-checkbox>\r\n </td>\r\n\r\n <ng-container *ngTemplateOutlet=\"footerCellTemplate; context: {$implicit: selectionProvider.COLUMN_NAME}\">\r\n </ng-container>\r\n </ng-container>\r\n\r\n <!-- action column -->\r\n <ng-container *ngIf=\"rowActionsProvider.isEnabled\" [matColumnDef]=\"rowActionsProvider.COLUMN_NAME\">\r\n <th mat-header-cell *matHeaderCellDef></th>\r\n <td mat-cell *matCellDef=\"let element\">\r\n <button mat-icon-button\r\n (click)=\"emitRowAction(action.action, element.rowSrc, $event)\"\r\n [matTooltip]=\"action.icon.tooltip || ''\"\r\n *ngFor=\"let action of rowActionsProvider.actionView.get(element.id)\">\r\n <mat-icon [style.color]=\"action.icon.color\">\r\n {{action.icon.name}}\r\n </mat-icon>\r\n </button>\r\n </td>\r\n\r\n <ng-container *ngTemplateOutlet=\"footerCellTemplate; context: {$implicit: rowActionsProvider.COLUMN_NAME}\">\r\n </ng-container>\r\n </ng-container>\r\n\r\n <!-- value-icon-->\r\n <ng-container *ngFor=\"let columnConfig of tableConfig.columnsCfg\" [matColumnDef]=\"columnConfig.key\">\r\n\r\n <!-- if sortable column header -->\r\n <ng-container *ngIf=\"columnConfig.sort && columnConfig.sort.enable; else notSortable\">\r\n <th mat-header-cell *matHeaderCellDef [mat-sort-header]=\"columnConfig.key\"\r\n [arrowPosition]=\"columnConfig.sort.position === 'right' ? 'before' : 'after'\">\r\n <ng-container *ngTemplateOutlet=\"headerValue\"></ng-container>\r\n </th>\r\n </ng-container>\r\n\r\n <!-- else not sortable -->\r\n <ng-template #notSortable>\r\n <th mat-header-cell *matHeaderCellDef>\r\n <ng-container *ngTemplateOutlet=\"headerValue\"></ng-container>\r\n </th>\r\n </ng-template>\r\n\r\n <!-- header value-->\r\n <ng-template #headerValue>\r\n <lib-column-view [config]=\"columnConfig.headerView\"\r\n [value]=\"columnConfig.name\">\r\n </lib-column-view>\r\n </ng-template>\r\n\r\n <!-- column value \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u044C \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u043A\u043E\u043B\u043E\u043D\u043E\u043A \u043D\u0443\u0436\u043D\u043E \u0447\u0435\u0440\u0435\u0437 getView(rowIndex, columnConfig.key) \u0442\u0430\u043C \u043D\u0430\u0445\u043E\u0434\u044F\u0442\u0441\u044F \u0443\u0436\u0435\r\n \u043F\u043E\u0434\u0433\u043E\u0442\u043E\u0432\u043B\u0435\u043D\u043D\u044B\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F \u0434\u043B\u044F \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u0438\u044F-->\r\n <td mat-cell *matCellDef=\"let element;\">\r\n <lib-column-view\r\n [config]=\"tableView[element.id]?.get(columnConfig.key)\"\r\n [value]=\"element | dataPropertyGetter: columnConfig.key\">\r\n </lib-column-view>\r\n </td>\r\n\r\n <td mat-footer-cell *matFooterCellDef>\r\n {{ totalRowProvider.totals.get(columnConfig.key) || '' }}\r\n </td>\r\n\r\n </ng-container>\r\n\r\n <tr mat-header-row *matHeaderRowDef=\"_displayColumns; sticky: this.tableConfig.stickyCfg?.header\"></tr>\r\n <tr mat-row #rowLink\r\n *matRowDef=\"let row; columns: _displayColumns;\"\r\n (click)=\"rowClick(row)\"\r\n [ngClass]=\"{'pointer': tableConfig.clickCfg?.pointer || false, 'new-color': highlighted===row.rowSrc && tableConfig?.clickCfg?.highlightClicked?.color}\"\r\n [ngStyle]=\"{\r\n 'color': highlighted===row.rowSrc? tableConfig?.clickCfg?.highlightClicked?.color : undefined,\r\n 'background-color': highlighted === row.rowSrc? tableConfig?.clickCfg?.highlightClicked?.background : undefined,\r\n 'border': highlighted === row.rowSrc? tableConfig?.clickCfg?.highlightClicked?.border : undefined\r\n }\">\r\n </tr>\r\n <ng-container *ngIf=\"totalRowProvider.isEnabled\">\r\n <tr mat-footer-row *matFooterRowDef=\"_displayColumns\" [style]=\"totalRowProvider.style\"></tr>\r\n </ng-container>\r\n </table>\r\n\r\n <!-- Pagination -->\r\n <mat-paginator *ngIf=\"paginationProvider.isEnabled\"\r\n [pageSizeOptions]=\"paginationProvider.sizes\"\r\n [pageSize]=\"paginationProvider.size\"\r\n showFirstLastButtons>\r\n </mat-paginator>\r\n </ng-container>\r\n</div>\r\n\r\n<ng-template #footerCellTemplate let-columnName>\r\n <td mat-footer-cell *matFooterCellDef>\r\n {{ totalRowProvider.totals.get(columnName) || '' }}\r\n </td>\r\n</ng-template>\r\n", styles: [".aur-mat-table table{width:100%;border-collapse:collapse}.aur-mat-table th,td{padding:10px!important}.aur-mat-table .new-color td.mat-cell,.aur-mat-table .new-color td.mat-footer-cell{color:inherit}.aur-mat-table mat-form-field{width:100%}.aur-mat-table .text-right{text-align:right!important}.aur-mat-table .pointer:hover{background-color:#f2f2f2;cursor:pointer}.aur-mat-table .flex-container{display:flex;align-items:center}\n"], components: [{ type: i1__namespace$1.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i1__namespace.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i3__namespace$1.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { type: ColumnViewComponent, selector: "lib-column-view", inputs: ["config", "value"] }, { type: i5__namespace.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex", "aria-label", "aria-labelledby", "id", "labelPosition", "name", "required", "checked", "disabled", "indeterminate", "aria-describedby", "value"], outputs: ["change", "indeterminateChange"], exportAs: ["matCheckbox"] }, { type: i6__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i7__namespace.MatSortHeader, selector: "[mat-sort-header]", inputs: ["disabled", "arrowPosition", "sortActionDescription", "disableClear", "mat-sort-header", "start"], exportAs: ["matSortHeader"] }, { type: i3__namespace$1.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { type: i3__namespace$1.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { type: i3__namespace$1.MatFooterRow, selector: "mat-footer-row, tr[mat-footer-row]", exportAs: ["matFooterRow"] }, { type: i8__namespace.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }], directives: [{ type: i9__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace$1.MatLabel, selector: "mat-label" }, { type: i10__namespace.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["id", "disabled", "required", "type", "value", "readonly", "placeholder", "errorStateMatcher", "aria-describedby"], exportAs: ["matInput"] }, { type: i1__namespace$1.MatPrefix, selector: "[matPrefix]" }, { type: i7__namespace.MatSort, selector: "[matSort]", inputs: ["matSortDisabled", "matSortStart", "matSortDirection", "matSortDisableClear", "matSortActive"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { type: i3__namespace$1.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { type: i3__namespace$1.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { type: i3__namespace$1.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { type: i3__namespace$1.MatCellDef, selector: "[matCellDef]" }, { type: i3__namespace$1.MatCell, selector: "mat-cell, td[mat-cell]" }, { type: i3__namespace$1.MatFooterCellDef, selector: "[matFooterCellDef]" }, { type: i3__namespace$1.MatFooterCell, selector: "mat-footer-cell, td[mat-footer-cell]" }, { type: i9__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i3__namespace.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { type: i9__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i3__namespace$1.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { type: i3__namespace$1.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { type: i9__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i9__namespace.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { type: i3__namespace$1.MatFooterRowDef, selector: "[matFooterRowDef]", inputs: ["matFooterRowDef", "matFooterRowDefSticky"] }], pipes: { "dataPropertyGetter": DataPropertyGetterPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
1254
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NgxAurMatTableComponent, decorators: [{
|
|
1255
|
+
type: i0.Component,
|
|
1256
|
+
args: [{
|
|
1257
|
+
selector: 'aur-mat-table',
|
|
1258
|
+
templateUrl: './ngx-aur-mat-table.component.html',
|
|
1259
|
+
styleUrls: ['./ngx-aur-mat-table.component.scss'],
|
|
1260
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
1261
|
+
}]
|
|
1262
|
+
}], ctorParameters: function () { return []; }, propDecorators: { displayColumns: [{
|
|
1263
|
+
type: i0.Input
|
|
1264
|
+
}], rows: [{
|
|
1265
|
+
type: i0.ViewChildren,
|
|
1266
|
+
args: ['rowLink', { read: i0.ElementRef }]
|
|
1267
|
+
}], table: [{
|
|
1268
|
+
type: i0.ViewChild,
|
|
1269
|
+
args: ['table', { read: i0.ElementRef }]
|
|
1270
|
+
}], tableConfig: [{
|
|
1271
|
+
type: i0.Input
|
|
1272
|
+
}], tableData: [{
|
|
1273
|
+
type: i0.Input
|
|
1274
|
+
}], matPaginator: [{
|
|
1275
|
+
type: i0.ViewChild,
|
|
1276
|
+
args: [i8.MatPaginator, { static: false }]
|
|
1277
|
+
}], matSort: [{
|
|
1278
|
+
type: i0.ViewChild,
|
|
1279
|
+
args: [i7.MatSort, { static: true }]
|
|
1280
|
+
}], sort: [{
|
|
1281
|
+
type: i0.Output
|
|
1282
|
+
}], onRowAction: [{
|
|
1283
|
+
type: i0.Output
|
|
1284
|
+
}], selected: [{
|
|
1285
|
+
type: i0.Output
|
|
1286
|
+
}], onSelect: [{
|
|
1287
|
+
type: i0.Output
|
|
1288
|
+
}], onDeselect: [{
|
|
1289
|
+
type: i0.Output
|
|
1290
|
+
}], onSelectedRowsAction: [{
|
|
1291
|
+
type: i0.Output
|
|
1292
|
+
}], onRowClick: [{
|
|
1293
|
+
type: i0.Output
|
|
1294
|
+
}], onFilter: [{
|
|
1295
|
+
type: i0.Output
|
|
1296
|
+
}], columnOffsets: [{
|
|
1297
|
+
type: i0.Output
|
|
1298
|
+
}], highlight: [{
|
|
1299
|
+
type: i0.Input
|
|
1300
|
+
}] } });
|
|
1278
1301
|
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1302
|
+
var NgxAurMatTableModule = /** @class */ (function () {
|
|
1303
|
+
function NgxAurMatTableModule() {
|
|
1304
|
+
}
|
|
1305
|
+
return NgxAurMatTableModule;
|
|
1306
|
+
}());
|
|
1307
|
+
NgxAurMatTableModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NgxAurMatTableModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1308
|
+
NgxAurMatTableModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NgxAurMatTableModule, declarations: [NgxAurMatTableComponent,
|
|
1309
|
+
DataPropertyGetterPipe,
|
|
1310
|
+
ColumnViewComponent], imports: [i9.CommonModule,
|
|
1311
|
+
i1.MatIconModule,
|
|
1312
|
+
i3.MatTableModule,
|
|
1313
|
+
i8.MatPaginatorModule,
|
|
1314
|
+
i6.MatButtonModule,
|
|
1315
|
+
i10.MatInputModule,
|
|
1316
|
+
i7.MatSortModule,
|
|
1317
|
+
i3$1.MatTooltipModule,
|
|
1318
|
+
i5.MatCheckboxModule,
|
|
1319
|
+
i1$1.MatFormFieldModule], exports: [NgxAurMatTableComponent,
|
|
1320
|
+
DataPropertyGetterPipe] });
|
|
1321
|
+
NgxAurMatTableModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NgxAurMatTableModule, imports: [[
|
|
1322
|
+
i9.CommonModule,
|
|
1323
|
+
i1.MatIconModule,
|
|
1324
|
+
i3.MatTableModule,
|
|
1325
|
+
i8.MatPaginatorModule,
|
|
1326
|
+
i6.MatButtonModule,
|
|
1327
|
+
i10.MatInputModule,
|
|
1328
|
+
i7.MatSortModule,
|
|
1329
|
+
i3$1.MatTooltipModule,
|
|
1330
|
+
i5.MatCheckboxModule,
|
|
1331
|
+
i1$1.MatFormFieldModule
|
|
1332
|
+
]] });
|
|
1333
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: NgxAurMatTableModule, decorators: [{
|
|
1334
|
+
type: i0.NgModule,
|
|
1335
|
+
args: [{
|
|
1336
|
+
declarations: [
|
|
1337
|
+
NgxAurMatTableComponent,
|
|
1338
|
+
DataPropertyGetterPipe,
|
|
1339
|
+
ColumnViewComponent
|
|
1340
|
+
],
|
|
1341
|
+
imports: [
|
|
1342
|
+
i9.CommonModule,
|
|
1343
|
+
i1.MatIconModule,
|
|
1344
|
+
i3.MatTableModule,
|
|
1345
|
+
i8.MatPaginatorModule,
|
|
1346
|
+
i6.MatButtonModule,
|
|
1347
|
+
i10.MatInputModule,
|
|
1348
|
+
i7.MatSortModule,
|
|
1349
|
+
i3$1.MatTooltipModule,
|
|
1350
|
+
i5.MatCheckboxModule,
|
|
1351
|
+
i1$1.MatFormFieldModule
|
|
1352
|
+
],
|
|
1353
|
+
exports: [
|
|
1354
|
+
NgxAurMatTableComponent,
|
|
1355
|
+
DataPropertyGetterPipe
|
|
1356
|
+
]
|
|
1357
|
+
}]
|
|
1358
|
+
}] });
|
|
1336
1359
|
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1360
|
+
exports.StyleBuilder = void 0;
|
|
1361
|
+
(function (StyleBuilder) {
|
|
1362
|
+
var Row = /** @class */ (function () {
|
|
1363
|
+
function Row() {
|
|
1364
|
+
this._background = '';
|
|
1365
|
+
this._color = '';
|
|
1366
|
+
this._border = '';
|
|
1367
|
+
this._fontWeight = '';
|
|
1368
|
+
}
|
|
1369
|
+
Row.builder = function () {
|
|
1370
|
+
return new Row();
|
|
1371
|
+
};
|
|
1372
|
+
Row.prototype.background = function (color) {
|
|
1373
|
+
this._background = color;
|
|
1374
|
+
return this;
|
|
1375
|
+
};
|
|
1376
|
+
Row.prototype.color = function (color) {
|
|
1377
|
+
this._color = color;
|
|
1378
|
+
return this;
|
|
1379
|
+
};
|
|
1380
|
+
Row.prototype.border = function (borderBuilderFn) {
|
|
1381
|
+
var borderBuilder = new BorderStyleBuilder();
|
|
1382
|
+
this._border = borderBuilderFn(borderBuilder).build();
|
|
1383
|
+
return this;
|
|
1384
|
+
};
|
|
1385
|
+
Row.prototype.fontWeight = function (weight) {
|
|
1386
|
+
this._fontWeight = weight;
|
|
1387
|
+
return this;
|
|
1388
|
+
};
|
|
1389
|
+
Row.prototype.build = function () {
|
|
1390
|
+
var styles = '';
|
|
1391
|
+
if (this._background)
|
|
1392
|
+
styles += "background: " + this._background + "; ";
|
|
1393
|
+
if (this._color)
|
|
1394
|
+
styles += "color: " + this._color + "; ";
|
|
1395
|
+
if (this._fontWeight)
|
|
1396
|
+
styles += "font-weight: " + this._fontWeight + "; ";
|
|
1397
|
+
if (this._border)
|
|
1398
|
+
styles += "" + this._border;
|
|
1399
|
+
return styles;
|
|
1400
|
+
};
|
|
1401
|
+
return Row;
|
|
1402
|
+
}());
|
|
1403
|
+
StyleBuilder.Row = Row;
|
|
1404
|
+
var BorderStyleBuilder = /** @class */ (function () {
|
|
1405
|
+
function BorderStyleBuilder() {
|
|
1406
|
+
this._top = '';
|
|
1407
|
+
this._bottom = '';
|
|
1408
|
+
this._right = '';
|
|
1409
|
+
this._left = '';
|
|
1410
|
+
}
|
|
1411
|
+
BorderStyleBuilder.prototype.top = function (width, style, color) {
|
|
1412
|
+
this._top = width + " " + style + " " + color;
|
|
1413
|
+
return this;
|
|
1414
|
+
};
|
|
1415
|
+
BorderStyleBuilder.prototype.bottom = function (width, style, color) {
|
|
1416
|
+
this._bottom = width + " " + style + " " + color;
|
|
1417
|
+
return this;
|
|
1418
|
+
};
|
|
1419
|
+
BorderStyleBuilder.prototype.right = function (width, style, color) {
|
|
1420
|
+
this._right = width + " " + style + " " + color;
|
|
1421
|
+
return this;
|
|
1422
|
+
};
|
|
1423
|
+
BorderStyleBuilder.prototype.left = function (width, style, color) {
|
|
1424
|
+
this._left = width + " " + style + " " + color;
|
|
1425
|
+
return this;
|
|
1426
|
+
};
|
|
1427
|
+
BorderStyleBuilder.prototype.allBorders = function (width, style, color) {
|
|
1428
|
+
this._top = this._bottom = this._right = this._left = width + " " + style + " " + color;
|
|
1429
|
+
return this;
|
|
1430
|
+
};
|
|
1431
|
+
BorderStyleBuilder.prototype.build = function () {
|
|
1432
|
+
var styles = '';
|
|
1433
|
+
if (this._top)
|
|
1434
|
+
styles += "border-top: " + this._top + "; ";
|
|
1435
|
+
if (this._bottom)
|
|
1436
|
+
styles += "border-bottom: " + this._bottom + "; ";
|
|
1437
|
+
if (this._right)
|
|
1438
|
+
styles += "border-right: " + this._right + "; ";
|
|
1439
|
+
if (this._left)
|
|
1440
|
+
styles += "border-left: " + this._left + "; ";
|
|
1441
|
+
return styles;
|
|
1442
|
+
};
|
|
1443
|
+
return BorderStyleBuilder;
|
|
1444
|
+
}());
|
|
1445
|
+
StyleBuilder.BorderStyleBuilder = BorderStyleBuilder;
|
|
1446
|
+
var BorderStyle;
|
|
1447
|
+
(function (BorderStyle) {
|
|
1448
|
+
BorderStyle["SOLID"] = "solid";
|
|
1449
|
+
BorderStyle["DOTTED"] = "dotted";
|
|
1450
|
+
BorderStyle["DASHED"] = "dashed";
|
|
1451
|
+
BorderStyle["DOUBLE"] = "double";
|
|
1452
|
+
BorderStyle["GROOVE"] = "groove";
|
|
1453
|
+
BorderStyle["RIDGE"] = "ridge";
|
|
1454
|
+
BorderStyle["INSET"] = "inset";
|
|
1455
|
+
BorderStyle["OUTSET"] = "outset";
|
|
1456
|
+
BorderStyle["NONE"] = "none";
|
|
1457
|
+
BorderStyle["HIDDEN"] = "hidden";
|
|
1458
|
+
})(BorderStyle = StyleBuilder.BorderStyle || (StyleBuilder.BorderStyle = {}));
|
|
1459
|
+
var FontWeight;
|
|
1460
|
+
(function (FontWeight) {
|
|
1461
|
+
FontWeight["NORMAL"] = "normal";
|
|
1462
|
+
FontWeight["BOLD"] = "bold";
|
|
1463
|
+
FontWeight["BOLDER"] = "bolder";
|
|
1464
|
+
FontWeight["LIGHTER"] = "lighter";
|
|
1465
|
+
FontWeight["W_100"] = "100";
|
|
1466
|
+
FontWeight["W_200"] = "200";
|
|
1467
|
+
FontWeight["W_300"] = "300";
|
|
1468
|
+
FontWeight["W_400"] = "400";
|
|
1469
|
+
FontWeight["W_500"] = "500";
|
|
1470
|
+
FontWeight["W_600"] = "600";
|
|
1471
|
+
FontWeight["W_700"] = "700";
|
|
1472
|
+
FontWeight["W_800"] = "800";
|
|
1473
|
+
FontWeight["W_900"] = "900";
|
|
1474
|
+
})(FontWeight = StyleBuilder.FontWeight || (StyleBuilder.FontWeight = {}));
|
|
1475
|
+
})(exports.StyleBuilder || (exports.StyleBuilder = {}));
|
|
1453
1476
|
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1557
|
-
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1477
|
+
exports.NgxAurFilters = void 0;
|
|
1478
|
+
(function (NgxAurFilters) {
|
|
1479
|
+
/**
|
|
1480
|
+
* Base abstract class for filter.
|
|
1481
|
+
* Defines a common interface for all filters.
|
|
1482
|
+
* @template T The type of data to be filtered.
|
|
1483
|
+
*/
|
|
1484
|
+
var Base = /** @class */ (function () {
|
|
1485
|
+
function Base() {
|
|
1486
|
+
}
|
|
1487
|
+
return Base;
|
|
1488
|
+
}());
|
|
1489
|
+
NgxAurFilters.Base = Base;
|
|
1490
|
+
var ExtractableProperty = /** @class */ (function (_super) {
|
|
1491
|
+
__extends(ExtractableProperty, _super);
|
|
1492
|
+
function ExtractableProperty() {
|
|
1493
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
1494
|
+
}
|
|
1495
|
+
return ExtractableProperty;
|
|
1496
|
+
}(Base));
|
|
1497
|
+
NgxAurFilters.ExtractableProperty = ExtractableProperty;
|
|
1498
|
+
/**
|
|
1499
|
+
* Class for filtering data based on a single value.
|
|
1500
|
+
* @template T The type of data to be filtered.
|
|
1501
|
+
* @template V The type of the value used for filtering.
|
|
1502
|
+
*/
|
|
1503
|
+
var ValueSingle = /** @class */ (function (_super) {
|
|
1504
|
+
__extends(ValueSingle, _super);
|
|
1505
|
+
function ValueSingle(value) {
|
|
1506
|
+
var _this = _super.call(this) || this;
|
|
1507
|
+
_this.value = value;
|
|
1508
|
+
return _this;
|
|
1509
|
+
}
|
|
1510
|
+
return ValueSingle;
|
|
1511
|
+
}(ExtractableProperty));
|
|
1512
|
+
NgxAurFilters.ValueSingle = ValueSingle;
|
|
1513
|
+
/**
|
|
1514
|
+
* Class for filtering data based on an array of values.
|
|
1515
|
+
* @template T The type of data to be filtered.
|
|
1516
|
+
* @template V The type of the values used for filtering.
|
|
1517
|
+
*/
|
|
1518
|
+
var ValueArray = /** @class */ (function (_super) {
|
|
1519
|
+
__extends(ValueArray, _super);
|
|
1520
|
+
function ValueArray(values) {
|
|
1521
|
+
var _this = _super.call(this) || this;
|
|
1522
|
+
_this.values = values;
|
|
1523
|
+
return _this;
|
|
1524
|
+
}
|
|
1525
|
+
return ValueArray;
|
|
1526
|
+
}(ExtractableProperty));
|
|
1527
|
+
NgxAurFilters.ValueArray = ValueArray;
|
|
1528
|
+
/**
|
|
1529
|
+
* Class for filtering data based on a set of values.
|
|
1530
|
+
* @template T The type of data to be filtered.
|
|
1531
|
+
* @template V The type of the values used for filtering.
|
|
1532
|
+
*/
|
|
1533
|
+
var ValueSet = /** @class */ (function (_super) {
|
|
1534
|
+
__extends(ValueSet, _super);
|
|
1535
|
+
function ValueSet(values) {
|
|
1536
|
+
var _this = _super.call(this) || this;
|
|
1537
|
+
_this.values = values;
|
|
1538
|
+
return _this;
|
|
1539
|
+
}
|
|
1540
|
+
return ValueSet;
|
|
1541
|
+
}(ExtractableProperty));
|
|
1542
|
+
NgxAurFilters.ValueSet = ValueSet;
|
|
1543
|
+
/**
|
|
1544
|
+
* Class for filtering data within a min-max range.
|
|
1545
|
+
* @template T The type of data to be filtered.
|
|
1546
|
+
* @template V The type of the values defining the range.
|
|
1547
|
+
*/
|
|
1548
|
+
var ValueMinMax = /** @class */ (function (_super) {
|
|
1549
|
+
__extends(ValueMinMax, _super);
|
|
1550
|
+
function ValueMinMax(min, max) {
|
|
1551
|
+
var _this = _super.call(this) || this;
|
|
1552
|
+
_this.min = min;
|
|
1553
|
+
_this.max = max;
|
|
1554
|
+
return _this;
|
|
1555
|
+
}
|
|
1556
|
+
return ValueMinMax;
|
|
1557
|
+
}(ExtractableProperty));
|
|
1558
|
+
NgxAurFilters.ValueMinMax = ValueMinMax;
|
|
1559
|
+
/**
|
|
1560
|
+
* Abstract class for filtering data based on whether a specific property
|
|
1561
|
+
* of the data, when trimmed and converted to lower case, contains a specified
|
|
1562
|
+
* substring, also trimmed and converted to lower case.
|
|
1563
|
+
* @template T The type of data to be filtered.
|
|
1564
|
+
*/
|
|
1565
|
+
var ContainsStringIgnoreCase = /** @class */ (function (_super) {
|
|
1566
|
+
__extends(ContainsStringIgnoreCase, _super);
|
|
1567
|
+
function ContainsStringIgnoreCase() {
|
|
1568
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
1569
|
+
}
|
|
1570
|
+
ContainsStringIgnoreCase.prototype.filterFn = function () {
|
|
1571
|
+
var _this = this;
|
|
1572
|
+
return function (data) {
|
|
1573
|
+
var given = _this.extractProperty(data);
|
|
1574
|
+
return given.toLowerCase().includes(_this.value.toLowerCase());
|
|
1575
|
+
};
|
|
1576
|
+
};
|
|
1577
|
+
return ContainsStringIgnoreCase;
|
|
1578
|
+
}(ValueSingle));
|
|
1579
|
+
NgxAurFilters.ContainsStringIgnoreCase = ContainsStringIgnoreCase;
|
|
1580
|
+
var EqualString = /** @class */ (function (_super) {
|
|
1581
|
+
__extends(EqualString, _super);
|
|
1582
|
+
function EqualString() {
|
|
1583
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
1584
|
+
}
|
|
1585
|
+
EqualString.prototype.filterFn = function () {
|
|
1586
|
+
var _this = this;
|
|
1587
|
+
return function (data) {
|
|
1588
|
+
var given = _this.extractProperty(data);
|
|
1589
|
+
return given === _this.value;
|
|
1590
|
+
};
|
|
1591
|
+
};
|
|
1592
|
+
return EqualString;
|
|
1593
|
+
}(ValueSingle));
|
|
1594
|
+
NgxAurFilters.EqualString = EqualString;
|
|
1595
|
+
var EqualNumber = /** @class */ (function (_super) {
|
|
1596
|
+
__extends(EqualNumber, _super);
|
|
1597
|
+
function EqualNumber() {
|
|
1598
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
1599
|
+
}
|
|
1600
|
+
EqualNumber.prototype.filterFn = function () {
|
|
1601
|
+
var _this = this;
|
|
1602
|
+
return function (data) {
|
|
1603
|
+
var given = _this.extractProperty(data);
|
|
1604
|
+
return given === _this.value;
|
|
1605
|
+
};
|
|
1606
|
+
};
|
|
1607
|
+
return EqualNumber;
|
|
1608
|
+
}(ValueSingle));
|
|
1609
|
+
NgxAurFilters.EqualNumber = EqualNumber;
|
|
1610
|
+
var LessNumber = /** @class */ (function (_super) {
|
|
1611
|
+
__extends(LessNumber, _super);
|
|
1612
|
+
function LessNumber() {
|
|
1613
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
1614
|
+
}
|
|
1615
|
+
LessNumber.prototype.filterFn = function () {
|
|
1616
|
+
var _this = this;
|
|
1617
|
+
return function (data) {
|
|
1618
|
+
var given = _this.extractProperty(data);
|
|
1619
|
+
return given < _this.value;
|
|
1620
|
+
};
|
|
1621
|
+
};
|
|
1622
|
+
return LessNumber;
|
|
1623
|
+
}(ValueSingle));
|
|
1624
|
+
NgxAurFilters.LessNumber = LessNumber;
|
|
1625
|
+
var LessOrEqualNumber = /** @class */ (function (_super) {
|
|
1626
|
+
__extends(LessOrEqualNumber, _super);
|
|
1627
|
+
function LessOrEqualNumber() {
|
|
1628
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
1629
|
+
}
|
|
1630
|
+
LessOrEqualNumber.prototype.filterFn = function () {
|
|
1631
|
+
var _this = this;
|
|
1632
|
+
return function (data) {
|
|
1633
|
+
var given = _this.extractProperty(data);
|
|
1634
|
+
return given <= _this.value;
|
|
1635
|
+
};
|
|
1636
|
+
};
|
|
1637
|
+
return LessOrEqualNumber;
|
|
1638
|
+
}(ValueSingle));
|
|
1639
|
+
NgxAurFilters.LessOrEqualNumber = LessOrEqualNumber;
|
|
1640
|
+
var MoreNumber = /** @class */ (function (_super) {
|
|
1641
|
+
__extends(MoreNumber, _super);
|
|
1642
|
+
function MoreNumber() {
|
|
1643
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
1644
|
+
}
|
|
1645
|
+
MoreNumber.prototype.filterFn = function () {
|
|
1646
|
+
var _this = this;
|
|
1647
|
+
return function (data) {
|
|
1648
|
+
var given = _this.extractProperty(data);
|
|
1649
|
+
return given > _this.value;
|
|
1650
|
+
};
|
|
1651
|
+
};
|
|
1652
|
+
return MoreNumber;
|
|
1653
|
+
}(ValueSingle));
|
|
1654
|
+
NgxAurFilters.MoreNumber = MoreNumber;
|
|
1655
|
+
var MoreOrEqualNumber = /** @class */ (function (_super) {
|
|
1656
|
+
__extends(MoreOrEqualNumber, _super);
|
|
1657
|
+
function MoreOrEqualNumber() {
|
|
1658
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
1659
|
+
}
|
|
1660
|
+
MoreOrEqualNumber.prototype.filterFn = function () {
|
|
1661
|
+
var _this = this;
|
|
1662
|
+
return function (data) {
|
|
1663
|
+
var given = _this.extractProperty(data);
|
|
1664
|
+
return given >= _this.value;
|
|
1665
|
+
};
|
|
1666
|
+
};
|
|
1667
|
+
return MoreOrEqualNumber;
|
|
1668
|
+
}(ValueSingle));
|
|
1669
|
+
NgxAurFilters.MoreOrEqualNumber = MoreOrEqualNumber;
|
|
1670
|
+
var NumberRangeInclMinExclMax = /** @class */ (function (_super) {
|
|
1671
|
+
__extends(NumberRangeInclMinExclMax, _super);
|
|
1672
|
+
function NumberRangeInclMinExclMax() {
|
|
1673
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
1674
|
+
}
|
|
1675
|
+
NumberRangeInclMinExclMax.prototype.filterFn = function () {
|
|
1676
|
+
var _this = this;
|
|
1677
|
+
return function (data) {
|
|
1678
|
+
var given = _this.extractProperty(data);
|
|
1679
|
+
return given >= _this.min && given < _this.max;
|
|
1680
|
+
};
|
|
1681
|
+
};
|
|
1682
|
+
return NumberRangeInclMinExclMax;
|
|
1683
|
+
}(ValueMinMax));
|
|
1684
|
+
NgxAurFilters.NumberRangeInclMinExclMax = NumberRangeInclMinExclMax;
|
|
1685
|
+
var NumberRangeExclMinInclMax = /** @class */ (function (_super) {
|
|
1686
|
+
__extends(NumberRangeExclMinInclMax, _super);
|
|
1687
|
+
function NumberRangeExclMinInclMax() {
|
|
1688
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
1689
|
+
}
|
|
1690
|
+
NumberRangeExclMinInclMax.prototype.filterFn = function () {
|
|
1691
|
+
var _this = this;
|
|
1692
|
+
return function (data) {
|
|
1693
|
+
var given = _this.extractProperty(data);
|
|
1694
|
+
return given > _this.min && given <= _this.max;
|
|
1695
|
+
};
|
|
1696
|
+
};
|
|
1697
|
+
return NumberRangeExclMinInclMax;
|
|
1698
|
+
}(ValueMinMax));
|
|
1699
|
+
NgxAurFilters.NumberRangeExclMinInclMax = NumberRangeExclMinInclMax;
|
|
1700
|
+
var NumberRangeInclMinInclMax = /** @class */ (function (_super) {
|
|
1701
|
+
__extends(NumberRangeInclMinInclMax, _super);
|
|
1702
|
+
function NumberRangeInclMinInclMax() {
|
|
1703
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
1704
|
+
}
|
|
1705
|
+
NumberRangeInclMinInclMax.prototype.filterFn = function () {
|
|
1706
|
+
var _this = this;
|
|
1707
|
+
return function (data) {
|
|
1708
|
+
var given = _this.extractProperty(data);
|
|
1709
|
+
return given >= _this.min && given <= _this.max;
|
|
1710
|
+
};
|
|
1711
|
+
};
|
|
1712
|
+
return NumberRangeInclMinInclMax;
|
|
1713
|
+
}(ValueMinMax));
|
|
1714
|
+
NgxAurFilters.NumberRangeInclMinInclMax = NumberRangeInclMinInclMax;
|
|
1715
|
+
var NumberRangeExclMinExclMax = /** @class */ (function (_super) {
|
|
1716
|
+
__extends(NumberRangeExclMinExclMax, _super);
|
|
1717
|
+
function NumberRangeExclMinExclMax() {
|
|
1718
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
1719
|
+
}
|
|
1720
|
+
NumberRangeExclMinExclMax.prototype.filterFn = function () {
|
|
1721
|
+
var _this = this;
|
|
1722
|
+
return function (data) {
|
|
1723
|
+
var given = _this.extractProperty(data);
|
|
1724
|
+
return given > _this.min && given < _this.max;
|
|
1725
|
+
};
|
|
1726
|
+
};
|
|
1727
|
+
return NumberRangeExclMinExclMax;
|
|
1728
|
+
}(ValueMinMax));
|
|
1729
|
+
NgxAurFilters.NumberRangeExclMinExclMax = NumberRangeExclMinExclMax;
|
|
1730
|
+
var hasInSet = /** @class */ (function (_super) {
|
|
1731
|
+
__extends(hasInSet, _super);
|
|
1732
|
+
function hasInSet() {
|
|
1733
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
1734
|
+
}
|
|
1735
|
+
hasInSet.prototype.filterFn = function () {
|
|
1736
|
+
var _this = this;
|
|
1737
|
+
return function (data) {
|
|
1738
|
+
var given = _this.extractProperty(data);
|
|
1739
|
+
return _this.values.has(given);
|
|
1740
|
+
};
|
|
1741
|
+
};
|
|
1742
|
+
return hasInSet;
|
|
1743
|
+
}(ValueSet));
|
|
1744
|
+
NgxAurFilters.hasInSet = hasInSet;
|
|
1745
|
+
var notHasInSet = /** @class */ (function (_super) {
|
|
1746
|
+
__extends(notHasInSet, _super);
|
|
1747
|
+
function notHasInSet() {
|
|
1748
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
1749
|
+
}
|
|
1750
|
+
notHasInSet.prototype.filterFn = function () {
|
|
1751
|
+
var _this = this;
|
|
1752
|
+
return function (data) {
|
|
1753
|
+
var given = _this.extractProperty(data);
|
|
1754
|
+
return !_this.values.has(given);
|
|
1755
|
+
};
|
|
1756
|
+
};
|
|
1757
|
+
return notHasInSet;
|
|
1758
|
+
}(ValueSet));
|
|
1759
|
+
NgxAurFilters.notHasInSet = notHasInSet;
|
|
1760
|
+
})(exports.NgxAurFilters || (exports.NgxAurFilters = {}));
|
|
1738
1761
|
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1762
|
+
/*
|
|
1763
|
+
* Public API Surface of ngx-aur-mat-table
|
|
1764
|
+
*/
|
|
1742
1765
|
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1766
|
+
/**
|
|
1767
|
+
* Generated bundle index. Do not edit.
|
|
1768
|
+
*/
|
|
1746
1769
|
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1770
|
+
exports.DataPropertyGetterPipe = DataPropertyGetterPipe;
|
|
1771
|
+
exports.IndexProvider = IndexProvider;
|
|
1772
|
+
exports.IndexProviderDummy = IndexProviderDummy;
|
|
1773
|
+
exports.NgxAurMatTableComponent = NgxAurMatTableComponent;
|
|
1774
|
+
exports.NgxAurMatTableModule = NgxAurMatTableModule;
|
|
1775
|
+
exports.NgxAurTableConfigUtil = NgxAurTableConfigUtil;
|
|
1776
|
+
exports.RowActionProvider = RowActionProvider;
|
|
1777
|
+
exports.RowActionProviderDummy = RowActionProviderDummy;
|
|
1778
|
+
exports.SelectionProvider = SelectionProvider;
|
|
1779
|
+
exports.SelectionProviderDummy = SelectionProviderDummy;
|
|
1780
|
+
exports.TableRow = TableRow;
|
|
1758
1781
|
|
|
1759
|
-
|
|
1782
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
1760
1783
|
|
|
1761
1784
|
}));
|
|
1762
1785
|
//# sourceMappingURL=ngx-aur-mat-table.umd.js.map
|