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