@abp/ng.components 9.3.1 → 9.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/extensible/index.d.ts
CHANGED
|
@@ -7,92 +7,11 @@ import { ABP, TrackByService, ConfigStateService, TimezoneService, PermissionSer
|
|
|
7
7
|
import { ValidatorFn, AsyncValidatorFn, UntypedFormGroup, ControlValueAccessor, ControlContainer, FormGroupDirective } from '@angular/forms';
|
|
8
8
|
import * as rxjs from 'rxjs';
|
|
9
9
|
import { Observable } from 'rxjs';
|
|
10
|
+
import { LinkedList } from '@abp/utils';
|
|
10
11
|
import { SelectionType } from '@swimlane/ngx-datatable';
|
|
11
12
|
import * as i2 from '@abp/ng.theme.shared';
|
|
12
13
|
import * as i3 from '@ngx-validate/core';
|
|
13
14
|
|
|
14
|
-
/** @description This file is referenced from here npm/packs/utils/projects/utils/src/lib/linked-list.ts */
|
|
15
|
-
declare class ListNode<T = any> {
|
|
16
|
-
readonly value: T;
|
|
17
|
-
next: ListNode | undefined;
|
|
18
|
-
previous: ListNode | undefined;
|
|
19
|
-
constructor(value: T);
|
|
20
|
-
}
|
|
21
|
-
declare class LinkedList<T = any> {
|
|
22
|
-
private first;
|
|
23
|
-
private last;
|
|
24
|
-
private size;
|
|
25
|
-
get head(): ListNode<T> | undefined;
|
|
26
|
-
get tail(): ListNode<T> | undefined;
|
|
27
|
-
get length(): number;
|
|
28
|
-
private attach;
|
|
29
|
-
private attachMany;
|
|
30
|
-
private detach;
|
|
31
|
-
add(value: T): {
|
|
32
|
-
after: (...params: [T] | [any, ListComparisonFn<T>]) => any;
|
|
33
|
-
before: (...params: [T] | [any, ListComparisonFn<T>]) => any;
|
|
34
|
-
byIndex: (position: number) => ListNode<T>;
|
|
35
|
-
head: () => ListNode<T>;
|
|
36
|
-
tail: () => ListNode<T>;
|
|
37
|
-
};
|
|
38
|
-
addMany(values: T[]): {
|
|
39
|
-
after: (...params: [T] | [any, ListComparisonFn<T>]) => any;
|
|
40
|
-
before: (...params: [T] | [any, ListComparisonFn<T>]) => any;
|
|
41
|
-
byIndex: (position: number) => ListNode<T>[];
|
|
42
|
-
head: () => ListNode<T>[];
|
|
43
|
-
tail: () => ListNode<T>[];
|
|
44
|
-
};
|
|
45
|
-
addAfter(value: T, previousValue: T): ListNode<T>;
|
|
46
|
-
addAfter(value: T, previousValue: any, compareFn: ListComparisonFn<T>): ListNode<T>;
|
|
47
|
-
addBefore(value: T, nextValue: T): ListNode<T>;
|
|
48
|
-
addBefore(value: T, nextValue: any, compareFn: ListComparisonFn<T>): ListNode<T>;
|
|
49
|
-
addByIndex(value: T, position: number): ListNode<T>;
|
|
50
|
-
addHead(value: T): ListNode<T>;
|
|
51
|
-
addTail(value: T): ListNode<T>;
|
|
52
|
-
addManyAfter(values: T[], previousValue: T): ListNode<T>[];
|
|
53
|
-
addManyAfter(values: T[], previousValue: any, compareFn: ListComparisonFn<T>): ListNode<T>[];
|
|
54
|
-
addManyBefore(values: T[], nextValue: T): ListNode<T>[];
|
|
55
|
-
addManyBefore(values: T[], nextValue: any, compareFn: ListComparisonFn<T>): ListNode<T>[];
|
|
56
|
-
addManyByIndex(values: T[], position: number): ListNode<T>[];
|
|
57
|
-
addManyHead(values: T[]): ListNode<T>[];
|
|
58
|
-
addManyTail(values: T[]): ListNode<T>[];
|
|
59
|
-
drop(): {
|
|
60
|
-
byIndex: (position: number) => ListNode<T>;
|
|
61
|
-
byValue: (...params: [T] | [any, ListComparisonFn<T>]) => any;
|
|
62
|
-
byValueAll: (...params: [T] | [any, ListComparisonFn<T>]) => any;
|
|
63
|
-
head: () => ListNode<T>;
|
|
64
|
-
tail: () => ListNode<T>;
|
|
65
|
-
};
|
|
66
|
-
dropMany(count: number): {
|
|
67
|
-
byIndex: (position: number) => ListNode<T>[];
|
|
68
|
-
head: () => ListNode<T>[];
|
|
69
|
-
tail: () => ListNode<T>[];
|
|
70
|
-
};
|
|
71
|
-
dropByIndex(position: number): ListNode<T> | undefined;
|
|
72
|
-
dropByValue(value: T): ListNode<T> | undefined;
|
|
73
|
-
dropByValue(value: any, compareFn: ListComparisonFn<T>): ListNode<T> | undefined;
|
|
74
|
-
dropByValueAll(value: T): ListNode<T>[];
|
|
75
|
-
dropByValueAll(value: any, compareFn: ListComparisonFn<T>): ListNode<T>[];
|
|
76
|
-
dropHead(): ListNode<T> | undefined;
|
|
77
|
-
dropTail(): ListNode<T> | undefined;
|
|
78
|
-
dropManyByIndex(count: number, position: number): ListNode<T>[];
|
|
79
|
-
dropManyHead(count: Exclude<number, 0>): ListNode<T>[];
|
|
80
|
-
dropManyTail(count: Exclude<number, 0>): ListNode<T>[];
|
|
81
|
-
find(predicate: ListIteratorFn<T>): ListNode<T> | undefined;
|
|
82
|
-
findIndex(predicate: ListIteratorFn<T>): number;
|
|
83
|
-
forEach<R = boolean>(iteratorFn: ListIteratorFn<T, R>): void;
|
|
84
|
-
get(position: number): ListNode<T> | undefined;
|
|
85
|
-
indexOf(value: T): number;
|
|
86
|
-
indexOf(value: any, compareFn: ListComparisonFn<T>): number;
|
|
87
|
-
toArray(): T[];
|
|
88
|
-
toNodeArray(): ListNode<T>[];
|
|
89
|
-
toString(mapperFn?: ListMapperFn<T>): string;
|
|
90
|
-
[Symbol.iterator](): any;
|
|
91
|
-
}
|
|
92
|
-
type ListMapperFn<T = any> = (value: T) => any;
|
|
93
|
-
type ListComparisonFn<T = any> = (value1: T, value2: any) => boolean;
|
|
94
|
-
type ListIteratorFn<T = any, R = boolean> = (node: ListNode<T>, index?: number, list?: LinkedList) => R;
|
|
95
|
-
|
|
96
15
|
declare const enum ePropType {
|
|
97
16
|
Boolean = "boolean",
|
|
98
17
|
Date = "date",
|
|
@@ -432,12 +351,12 @@ declare class ExtensibleTableComponent<R = any> implements OnChanges, AfterViewI
|
|
|
432
351
|
selected: any[];
|
|
433
352
|
selectionChange: EventEmitter<any[]>;
|
|
434
353
|
hasAtLeastOnePermittedAction: boolean;
|
|
435
|
-
readonly columnWidths: number[];
|
|
436
354
|
readonly propList: EntityPropList<R>;
|
|
437
355
|
readonly actionList: EntityActionList<R>;
|
|
438
356
|
readonly trackByFn: TrackByFunction<EntityProp<R>>;
|
|
357
|
+
private readonly _actionsColumnWidth;
|
|
358
|
+
readonly columnWidths: i0.Signal<number[]>;
|
|
439
359
|
constructor();
|
|
440
|
-
private setColumnWidths;
|
|
441
360
|
private getIcon;
|
|
442
361
|
private getEnum;
|
|
443
362
|
getContent(prop: EntityProp<R>, data: PropData): Observable<string>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, ChangeDetectorRef, input, Optional, SkipSelf, ViewChild, ChangeDetectionStrategy, Component, InjectionToken, Injectable, forwardRef, Injector, Input, Directive, ViewChildren, LOCALE_ID, EventEmitter, Output, Pipe, NgModule } from '@angular/core';
|
|
2
|
+
import { inject, ChangeDetectorRef, input, Optional, SkipSelf, ViewChild, ChangeDetectionStrategy, Component, InjectionToken, Injectable, forwardRef, Injector, Input, Directive, ViewChildren, LOCALE_ID, EventEmitter, signal, computed, Output, Pipe, NgModule } from '@angular/core';
|
|
3
3
|
import * as i5 from '@angular/common';
|
|
4
4
|
import { CommonModule, NgClass, NgTemplateOutlet, AsyncPipe, NgComponentOutlet } from '@angular/common';
|
|
5
5
|
import * as i2 from '@angular/forms';
|
|
@@ -13,7 +13,7 @@ import * as i2$1 from '@abp/ng.core';
|
|
|
13
13
|
import { RestService, ConfigStateService, AbpValidators, LocalizationPipe, TrackByService, ShowPasswordDirective, PermissionDirective, LocalizationModule, escapeHtmlChars, TimezoneService, PermissionService, UtcToLocalPipe, LocalizationService, createLocalizationPipeKeyGenerator, CoreModule } from '@abp/ng.core';
|
|
14
14
|
import { of, map as map$1, filter, merge, pipe, zip } from 'rxjs';
|
|
15
15
|
import { map, debounceTime, distinctUntilChanged, switchMap, filter as filter$1, take } from 'rxjs/operators';
|
|
16
|
-
import
|
|
16
|
+
import { LinkedList } from '@abp/utils';
|
|
17
17
|
import * as i1$1 from '@swimlane/ngx-datatable';
|
|
18
18
|
import { SelectionType, NgxDatatableModule } from '@swimlane/ngx-datatable';
|
|
19
19
|
|
|
@@ -141,296 +141,6 @@ const EXTENSIONS_FORM_PROP_DATA = new InjectionToken('EXTENSIONS_FORM_PROP_DATA'
|
|
|
141
141
|
|
|
142
142
|
const EXTRA_PROPERTIES_KEY = 'extraProperties';
|
|
143
143
|
|
|
144
|
-
/** @description This file is referenced from here npm/packs/utils/projects/utils/src/lib/linked-list.ts */
|
|
145
|
-
/* eslint-disable prefer-spread */
|
|
146
|
-
/* tslint:disable:no-non-null-assertion */
|
|
147
|
-
class ListNode {
|
|
148
|
-
constructor(value) {
|
|
149
|
-
this.value = value;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
class LinkedList {
|
|
153
|
-
constructor() {
|
|
154
|
-
this.size = 0;
|
|
155
|
-
}
|
|
156
|
-
get head() {
|
|
157
|
-
return this.first;
|
|
158
|
-
}
|
|
159
|
-
get tail() {
|
|
160
|
-
return this.last;
|
|
161
|
-
}
|
|
162
|
-
get length() {
|
|
163
|
-
return this.size;
|
|
164
|
-
}
|
|
165
|
-
attach(value, previousNode, nextNode) {
|
|
166
|
-
if (!previousNode)
|
|
167
|
-
return this.addHead(value);
|
|
168
|
-
if (!nextNode)
|
|
169
|
-
return this.addTail(value);
|
|
170
|
-
const node = new ListNode(value);
|
|
171
|
-
node.previous = previousNode;
|
|
172
|
-
previousNode.next = node;
|
|
173
|
-
node.next = nextNode;
|
|
174
|
-
nextNode.previous = node;
|
|
175
|
-
this.size++;
|
|
176
|
-
return node;
|
|
177
|
-
}
|
|
178
|
-
attachMany(values, previousNode, nextNode) {
|
|
179
|
-
if (!values.length)
|
|
180
|
-
return [];
|
|
181
|
-
if (!previousNode)
|
|
182
|
-
return this.addManyHead(values);
|
|
183
|
-
if (!nextNode)
|
|
184
|
-
return this.addManyTail(values);
|
|
185
|
-
const list = new LinkedList();
|
|
186
|
-
list.addManyTail(values);
|
|
187
|
-
list.first.previous = previousNode;
|
|
188
|
-
previousNode.next = list.first;
|
|
189
|
-
list.last.next = nextNode;
|
|
190
|
-
nextNode.previous = list.last;
|
|
191
|
-
this.size += values.length;
|
|
192
|
-
return list.toNodeArray();
|
|
193
|
-
}
|
|
194
|
-
detach(node) {
|
|
195
|
-
if (!node.previous)
|
|
196
|
-
return this.dropHead();
|
|
197
|
-
if (!node.next)
|
|
198
|
-
return this.dropTail();
|
|
199
|
-
node.previous.next = node.next;
|
|
200
|
-
node.next.previous = node.previous;
|
|
201
|
-
this.size--;
|
|
202
|
-
return node;
|
|
203
|
-
}
|
|
204
|
-
add(value) {
|
|
205
|
-
return {
|
|
206
|
-
after: (...params) => this.addAfter.call(this, value, ...params),
|
|
207
|
-
before: (...params) => this.addBefore.call(this, value, ...params),
|
|
208
|
-
byIndex: (position) => this.addByIndex(value, position),
|
|
209
|
-
head: () => this.addHead(value),
|
|
210
|
-
tail: () => this.addTail(value),
|
|
211
|
-
};
|
|
212
|
-
}
|
|
213
|
-
addMany(values) {
|
|
214
|
-
return {
|
|
215
|
-
after: (...params) => this.addManyAfter.call(this, values, ...params),
|
|
216
|
-
before: (...params) => this.addManyBefore.call(this, values, ...params),
|
|
217
|
-
byIndex: (position) => this.addManyByIndex(values, position),
|
|
218
|
-
head: () => this.addManyHead(values),
|
|
219
|
-
tail: () => this.addManyTail(values),
|
|
220
|
-
};
|
|
221
|
-
}
|
|
222
|
-
addAfter(value, previousValue, compareFn = compare) {
|
|
223
|
-
const previous = this.find(node => compareFn(node.value, previousValue));
|
|
224
|
-
return previous ? this.attach(value, previous, previous.next) : this.addTail(value);
|
|
225
|
-
}
|
|
226
|
-
addBefore(value, nextValue, compareFn = compare) {
|
|
227
|
-
const next = this.find(node => compareFn(node.value, nextValue));
|
|
228
|
-
return next ? this.attach(value, next.previous, next) : this.addHead(value);
|
|
229
|
-
}
|
|
230
|
-
addByIndex(value, position) {
|
|
231
|
-
if (position < 0)
|
|
232
|
-
position += this.size;
|
|
233
|
-
else if (position >= this.size)
|
|
234
|
-
return this.addTail(value);
|
|
235
|
-
if (position <= 0)
|
|
236
|
-
return this.addHead(value);
|
|
237
|
-
const next = this.get(position);
|
|
238
|
-
return this.attach(value, next.previous, next);
|
|
239
|
-
}
|
|
240
|
-
addHead(value) {
|
|
241
|
-
const node = new ListNode(value);
|
|
242
|
-
node.next = this.first;
|
|
243
|
-
if (this.first)
|
|
244
|
-
this.first.previous = node;
|
|
245
|
-
else
|
|
246
|
-
this.last = node;
|
|
247
|
-
this.first = node;
|
|
248
|
-
this.size++;
|
|
249
|
-
return node;
|
|
250
|
-
}
|
|
251
|
-
addTail(value) {
|
|
252
|
-
const node = new ListNode(value);
|
|
253
|
-
if (this.first) {
|
|
254
|
-
node.previous = this.last;
|
|
255
|
-
this.last.next = node;
|
|
256
|
-
this.last = node;
|
|
257
|
-
}
|
|
258
|
-
else {
|
|
259
|
-
this.first = node;
|
|
260
|
-
this.last = node;
|
|
261
|
-
}
|
|
262
|
-
this.size++;
|
|
263
|
-
return node;
|
|
264
|
-
}
|
|
265
|
-
addManyAfter(values, previousValue, compareFn = compare) {
|
|
266
|
-
const previous = this.find(node => compareFn(node.value, previousValue));
|
|
267
|
-
return previous ? this.attachMany(values, previous, previous.next) : this.addManyTail(values);
|
|
268
|
-
}
|
|
269
|
-
addManyBefore(values, nextValue, compareFn = compare) {
|
|
270
|
-
const next = this.find(node => compareFn(node.value, nextValue));
|
|
271
|
-
return next ? this.attachMany(values, next.previous, next) : this.addManyHead(values);
|
|
272
|
-
}
|
|
273
|
-
addManyByIndex(values, position) {
|
|
274
|
-
if (position < 0)
|
|
275
|
-
position += this.size;
|
|
276
|
-
if (position <= 0)
|
|
277
|
-
return this.addManyHead(values);
|
|
278
|
-
if (position >= this.size)
|
|
279
|
-
return this.addManyTail(values);
|
|
280
|
-
const next = this.get(position);
|
|
281
|
-
return this.attachMany(values, next.previous, next);
|
|
282
|
-
}
|
|
283
|
-
addManyHead(values) {
|
|
284
|
-
return values.reduceRight((nodes, value) => {
|
|
285
|
-
nodes.unshift(this.addHead(value));
|
|
286
|
-
return nodes;
|
|
287
|
-
}, []);
|
|
288
|
-
}
|
|
289
|
-
addManyTail(values) {
|
|
290
|
-
return values.map(value => this.addTail(value));
|
|
291
|
-
}
|
|
292
|
-
drop() {
|
|
293
|
-
return {
|
|
294
|
-
byIndex: (position) => this.dropByIndex(position),
|
|
295
|
-
byValue: (...params) => this.dropByValue.apply(this, params),
|
|
296
|
-
byValueAll: (...params) => this.dropByValueAll.apply(this, params),
|
|
297
|
-
head: () => this.dropHead(),
|
|
298
|
-
tail: () => this.dropTail(),
|
|
299
|
-
};
|
|
300
|
-
}
|
|
301
|
-
dropMany(count) {
|
|
302
|
-
return {
|
|
303
|
-
byIndex: (position) => this.dropManyByIndex(count, position),
|
|
304
|
-
head: () => this.dropManyHead(count),
|
|
305
|
-
tail: () => this.dropManyTail(count),
|
|
306
|
-
};
|
|
307
|
-
}
|
|
308
|
-
dropByIndex(position) {
|
|
309
|
-
if (position < 0)
|
|
310
|
-
position += this.size;
|
|
311
|
-
const current = this.get(position);
|
|
312
|
-
return current ? this.detach(current) : undefined;
|
|
313
|
-
}
|
|
314
|
-
dropByValue(value, compareFn = compare) {
|
|
315
|
-
const position = this.findIndex(node => compareFn(node.value, value));
|
|
316
|
-
return position < 0 ? undefined : this.dropByIndex(position);
|
|
317
|
-
}
|
|
318
|
-
dropByValueAll(value, compareFn = compare) {
|
|
319
|
-
const dropped = [];
|
|
320
|
-
for (let current = this.first, position = 0; current; position++, current = current.next) {
|
|
321
|
-
if (compareFn(current.value, value)) {
|
|
322
|
-
dropped.push(this.dropByIndex(position - dropped.length));
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
return dropped;
|
|
326
|
-
}
|
|
327
|
-
dropHead() {
|
|
328
|
-
const head = this.first;
|
|
329
|
-
if (head) {
|
|
330
|
-
this.first = head.next;
|
|
331
|
-
if (this.first)
|
|
332
|
-
this.first.previous = undefined;
|
|
333
|
-
else
|
|
334
|
-
this.last = undefined;
|
|
335
|
-
this.size--;
|
|
336
|
-
return head;
|
|
337
|
-
}
|
|
338
|
-
return undefined;
|
|
339
|
-
}
|
|
340
|
-
dropTail() {
|
|
341
|
-
const tail = this.last;
|
|
342
|
-
if (tail) {
|
|
343
|
-
this.last = tail.previous;
|
|
344
|
-
if (this.last)
|
|
345
|
-
this.last.next = undefined;
|
|
346
|
-
else
|
|
347
|
-
this.first = undefined;
|
|
348
|
-
this.size--;
|
|
349
|
-
return tail;
|
|
350
|
-
}
|
|
351
|
-
return undefined;
|
|
352
|
-
}
|
|
353
|
-
dropManyByIndex(count, position) {
|
|
354
|
-
if (count <= 0)
|
|
355
|
-
return [];
|
|
356
|
-
if (position < 0)
|
|
357
|
-
position = Math.max(position + this.size, 0);
|
|
358
|
-
else if (position >= this.size)
|
|
359
|
-
return [];
|
|
360
|
-
count = Math.min(count, this.size - position);
|
|
361
|
-
const dropped = [];
|
|
362
|
-
while (count--) {
|
|
363
|
-
const current = this.get(position);
|
|
364
|
-
dropped.push(this.detach(current));
|
|
365
|
-
}
|
|
366
|
-
return dropped;
|
|
367
|
-
}
|
|
368
|
-
dropManyHead(count) {
|
|
369
|
-
if (count <= 0)
|
|
370
|
-
return [];
|
|
371
|
-
count = Math.min(count, this.size);
|
|
372
|
-
const dropped = [];
|
|
373
|
-
while (count--)
|
|
374
|
-
dropped.unshift(this.dropHead());
|
|
375
|
-
return dropped;
|
|
376
|
-
}
|
|
377
|
-
dropManyTail(count) {
|
|
378
|
-
if (count <= 0)
|
|
379
|
-
return [];
|
|
380
|
-
count = Math.min(count, this.size);
|
|
381
|
-
const dropped = [];
|
|
382
|
-
while (count--)
|
|
383
|
-
dropped.push(this.dropTail());
|
|
384
|
-
return dropped;
|
|
385
|
-
}
|
|
386
|
-
find(predicate) {
|
|
387
|
-
for (let current = this.first, position = 0; current; position++, current = current.next) {
|
|
388
|
-
if (predicate(current, position, this))
|
|
389
|
-
return current;
|
|
390
|
-
}
|
|
391
|
-
return undefined;
|
|
392
|
-
}
|
|
393
|
-
findIndex(predicate) {
|
|
394
|
-
for (let current = this.first, position = 0; current; position++, current = current.next) {
|
|
395
|
-
if (predicate(current, position, this))
|
|
396
|
-
return position;
|
|
397
|
-
}
|
|
398
|
-
return -1;
|
|
399
|
-
}
|
|
400
|
-
forEach(iteratorFn) {
|
|
401
|
-
for (let node = this.first, position = 0; node; position++, node = node.next) {
|
|
402
|
-
iteratorFn(node, position, this);
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
get(position) {
|
|
406
|
-
return this.find((_, index) => position === index);
|
|
407
|
-
}
|
|
408
|
-
indexOf(value, compareFn = compare) {
|
|
409
|
-
return this.findIndex(node => compareFn(node.value, value));
|
|
410
|
-
}
|
|
411
|
-
toArray() {
|
|
412
|
-
const array = new Array(this.size);
|
|
413
|
-
this.forEach((node, index) => (array[index] = node.value));
|
|
414
|
-
return array;
|
|
415
|
-
}
|
|
416
|
-
toNodeArray() {
|
|
417
|
-
const array = new Array(this.size);
|
|
418
|
-
this.forEach((node, index) => (array[index] = node));
|
|
419
|
-
return array;
|
|
420
|
-
}
|
|
421
|
-
toString(mapperFn = JSON.stringify) {
|
|
422
|
-
return this.toArray()
|
|
423
|
-
.map(value => mapperFn(value))
|
|
424
|
-
.join(' <-> ');
|
|
425
|
-
}
|
|
426
|
-
// Cannot use Generator type because of ng-packagr
|
|
427
|
-
*[Symbol.iterator]() {
|
|
428
|
-
for (let node = this.first, position = 0; node; position++, node = node.next) {
|
|
429
|
-
yield node.value;
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
}
|
|
433
|
-
|
|
434
144
|
class PropList extends LinkedList {
|
|
435
145
|
}
|
|
436
146
|
class PropData {
|
|
@@ -1270,10 +980,10 @@ class ExtensibleTableComponent {
|
|
|
1270
980
|
this._actionsText = value;
|
|
1271
981
|
}
|
|
1272
982
|
get actionsText() {
|
|
1273
|
-
return this._actionsText ?? (this.actionList.length
|
|
983
|
+
return this._actionsText ?? (this.actionList.length >= 1 ? 'AbpUi::Actions' : '');
|
|
1274
984
|
}
|
|
1275
985
|
set actionsColumnWidth(width) {
|
|
1276
|
-
this.
|
|
986
|
+
this._actionsColumnWidth.set(width ? Number(width) : undefined);
|
|
1277
987
|
}
|
|
1278
988
|
set selectionType(value) {
|
|
1279
989
|
this._selectionType = typeof value === 'string' ? SelectionType[value] : value;
|
|
@@ -1293,6 +1003,16 @@ class ExtensibleTableComponent {
|
|
|
1293
1003
|
this.selected = [];
|
|
1294
1004
|
this.selectionChange = new EventEmitter();
|
|
1295
1005
|
this.trackByFn = (_, item) => item.name;
|
|
1006
|
+
// Signal for actions column width
|
|
1007
|
+
this._actionsColumnWidth = signal(DEFAULT_ACTIONS_COLUMN_WIDTH);
|
|
1008
|
+
this.columnWidths = computed(() => {
|
|
1009
|
+
const actionsColumn = this._actionsColumnWidth();
|
|
1010
|
+
const widths = [actionsColumn];
|
|
1011
|
+
this.propList.forEach(({ value: prop }) => {
|
|
1012
|
+
widths.push(prop.columnWidth);
|
|
1013
|
+
});
|
|
1014
|
+
return widths;
|
|
1015
|
+
});
|
|
1296
1016
|
const extensions = this.#injector.get(ExtensionsService);
|
|
1297
1017
|
const name = this.#injector.get(EXTENSIONS_IDENTIFIER);
|
|
1298
1018
|
this.propList = extensions.entityProps.get(name).props;
|
|
@@ -1300,14 +1020,6 @@ class ExtensibleTableComponent {
|
|
|
1300
1020
|
.actions;
|
|
1301
1021
|
this.hasAtLeastOnePermittedAction =
|
|
1302
1022
|
this.permissionService.filterItemsByPolicy(this.actionList.toArray().map(action => ({ requiredPolicy: action.permission }))).length > 0;
|
|
1303
|
-
this.setColumnWidths(DEFAULT_ACTIONS_COLUMN_WIDTH);
|
|
1304
|
-
}
|
|
1305
|
-
setColumnWidths(actionsColumn) {
|
|
1306
|
-
const widths = [actionsColumn];
|
|
1307
|
-
this.propList.forEach(({ value: prop }) => {
|
|
1308
|
-
widths.push(prop.columnWidth);
|
|
1309
|
-
});
|
|
1310
|
-
this.columnWidths = widths;
|
|
1311
1023
|
}
|
|
1312
1024
|
getIcon(value) {
|
|
1313
1025
|
return value
|
|
@@ -1396,7 +1108,7 @@ class ExtensibleTableComponent {
|
|
|
1396
1108
|
});
|
|
1397
1109
|
}
|
|
1398
1110
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ExtensibleTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1399
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.7", type: ExtensibleTableComponent, isStandalone: true, selector: "abp-extensible-table", inputs: { actionsText: "actionsText", data: "data", list: "list", recordsTotal: "recordsTotal", actionsColumnWidth: "actionsColumnWidth", actionsTemplate: "actionsTemplate", selectable: "selectable", selectionType: "selectionType", selected: "selected" }, outputs: { tableActivate: "tableActivate", selectionChange: "selectionChange" }, exportAs: ["abpExtensibleTable"], usesOnChanges: true, ngImport: i0, template: "<ngx-datatable\r\n default\r\n [rows]=\"data\"\r\n [count]=\"recordsTotal\"\r\n [list]=\"list\"\r\n [selectionType]=\"selectable ? _selectionType : undefined\"\r\n (activate)=\"tableActivate.emit($event)\"\r\n (select)=\"onSelect($event)\"\r\n [selected]=\"selected\"\r\n>\r\n@if(selectable) {\r\n <ngx-datatable-column [width]=\"50\" [sortable]=\"false\" [canAutoResize]=\"false\" [draggable]=\"false\" [resizeable]=\"false\">\r\n \r\n <ng-template ngx-datatable-header-template let-value=\"value\" let-allRowsSelected=\"allRowsSelected\"\r\n let-selectFn=\"selectFn\">\r\n @if (_selectionType !== 'single') {\r\n <div class=\"form-check\">\r\n <input class=\"form-check-input table-check\" type=\"checkbox\" [checked]=\"allRowsSelected\"\r\n (change)=\"selectFn(!allRowsSelected)\" />\r\n </div>\r\n }\r\n </ng-template>\r\n \r\n <ng-template ngx-datatable-cell-template let-value=\"value\" let-row=\"row\" let-isSelected=\"isSelected\"\r\n let-onCheckboxChangeFn=\"onCheckboxChangeFn\">\r\n @if(_selectionType === 'single') {\r\n <div class=\"h-100 form-check form-check-sm form-check-custom form-check-solid\">\r\n <input class=\"form-check-input\" type=\"radio\" [checked]=\"isSelected\" (change)=\"onCheckboxChangeFn($event)\" />\r\n </div>\r\n }\r\n @if (_selectionType !== 'single') {\r\n <div class=\"h-100 form-check form-check-sm form-check-custom form-check-solid\">\r\n <input class=\"form-check-input\" type=\"checkbox\" [checked]=\"isSelected\" (change)=\"onCheckboxChangeFn($event)\" />\r\n </div>\r\n }\r\n </ng-template>\r\n \r\n </ngx-datatable-column>\r\n }\r\n @if (actionsTemplate || (actionList.length && hasAtLeastOnePermittedAction)) {\r\n <ngx-datatable-column\r\n [name]=\"actionsText | abpLocalization\"\r\n [maxWidth]=\"columnWidths[0]\"\r\n [width]=\"columnWidths[0]\"\r\n [sortable]=\"false\"\r\n >\r\n <ng-template let-row=\"row\" let-i=\"rowIndex\" ngx-datatable-cell-template>\r\n <ng-container\r\n *ngTemplateOutlet=\"actionsTemplate || gridActions; context: { $implicit: row, index: i }\"\r\n ></ng-container>\r\n <ng-template #gridActions>\r\n @if (isVisibleActions(row)) {\r\n <abp-grid-actions [index]=\"i\" [record]=\"row\" text=\"AbpUi::Actions\"></abp-grid-actions>\r\n }\r\n </ng-template>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n }\r\n @for (prop of propList; track prop.name; let i = $index) {\r\n <ngx-datatable-column\r\n *abpVisible=\"prop.columnVisible(getInjected)\"\r\n [width]=\"columnWidths[i + 1]
|
|
1111
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.0.7", type: ExtensibleTableComponent, isStandalone: true, selector: "abp-extensible-table", inputs: { actionsText: "actionsText", data: "data", list: "list", recordsTotal: "recordsTotal", actionsColumnWidth: "actionsColumnWidth", actionsTemplate: "actionsTemplate", selectable: "selectable", selectionType: "selectionType", selected: "selected" }, outputs: { tableActivate: "tableActivate", selectionChange: "selectionChange" }, exportAs: ["abpExtensibleTable"], usesOnChanges: true, ngImport: i0, template: "<ngx-datatable\r\n default\r\n [rows]=\"data\"\r\n [count]=\"recordsTotal\"\r\n [list]=\"list\"\r\n [selectionType]=\"selectable ? _selectionType : undefined\"\r\n (activate)=\"tableActivate.emit($event)\"\r\n (select)=\"onSelect($event)\"\r\n [selected]=\"selected\"\r\n>\r\n@if(selectable) {\r\n <ngx-datatable-column [width]=\"50\" [sortable]=\"false\" [canAutoResize]=\"false\" [draggable]=\"false\" [resizeable]=\"false\">\r\n \r\n <ng-template ngx-datatable-header-template let-value=\"value\" let-allRowsSelected=\"allRowsSelected\"\r\n let-selectFn=\"selectFn\">\r\n @if (_selectionType !== 'single') {\r\n <div class=\"form-check\">\r\n <input class=\"form-check-input table-check\" type=\"checkbox\" [checked]=\"allRowsSelected\"\r\n (change)=\"selectFn(!allRowsSelected)\" />\r\n </div>\r\n }\r\n </ng-template>\r\n \r\n <ng-template ngx-datatable-cell-template let-value=\"value\" let-row=\"row\" let-isSelected=\"isSelected\"\r\n let-onCheckboxChangeFn=\"onCheckboxChangeFn\">\r\n @if(_selectionType === 'single') {\r\n <div class=\"h-100 form-check form-check-sm form-check-custom form-check-solid\">\r\n <input class=\"form-check-input\" type=\"radio\" [checked]=\"isSelected\" (change)=\"onCheckboxChangeFn($event)\" />\r\n </div>\r\n }\r\n @if (_selectionType !== 'single') {\r\n <div class=\"h-100 form-check form-check-sm form-check-custom form-check-solid\">\r\n <input class=\"form-check-input\" type=\"checkbox\" [checked]=\"isSelected\" (change)=\"onCheckboxChangeFn($event)\" />\r\n </div>\r\n }\r\n </ng-template>\r\n \r\n </ngx-datatable-column>\r\n }\r\n @if (actionsTemplate || (actionList.length && hasAtLeastOnePermittedAction)) {\r\n <ngx-datatable-column\r\n [name]=\"actionsText | abpLocalization\"\r\n [maxWidth]=\"columnWidths[0] ?? undefined\"\r\n [width]=\"columnWidths[0] ?? 200\"\r\n [canAutoResize]=\"!columnWidths[0]\"\r\n [sortable]=\"false\"\r\n >\r\n <ng-template let-row=\"row\" let-i=\"rowIndex\" ngx-datatable-cell-template>\r\n <ng-container\r\n *ngTemplateOutlet=\"actionsTemplate || gridActions; context: { $implicit: row, index: i }\"\r\n ></ng-container>\r\n <ng-template #gridActions>\r\n @if (isVisibleActions(row)) {\r\n <abp-grid-actions [index]=\"i\" [record]=\"row\" text=\"AbpUi::Actions\"></abp-grid-actions>\r\n }\r\n </ng-template>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n }\r\n @for (prop of propList; track prop.name; let i = $index) {\r\n <ngx-datatable-column\r\n *abpVisible=\"prop.columnVisible(getInjected)\"\r\n [width]=\"columnWidths[i + 1] ?? 200\"\r\n [canAutoResize]=\"!columnWidths[i + 1]\"\r\n [name]=\"(prop.isExtra ? '::' + prop.displayName : prop.displayName) | abpLocalization\"\r\n [prop]=\"prop.name\"\r\n [sortable]=\"prop.sortable\"\r\n >\r\n <ng-template ngx-datatable-header-template let-column=\"column\">\r\n @if (prop.tooltip) {\r\n <span\r\n [ngbTooltip]=\"prop.tooltip.text | abpLocalization\"\r\n [placement]=\"prop.tooltip.placement || 'auto'\"\r\n container=\"body\"\r\n >\r\n {{ column.name }} <i class=\"fa fa-info-circle\" aria-hidden=\"true\"></i>\r\n </span>\r\n } @else {\r\n {{ column.name }}\r\n }\r\n </ng-template>\r\n <ng-template let-row=\"row\" let-i=\"index\" ngx-datatable-cell-template>\r\n <ng-container *abpPermission=\"prop.permission; runChangeDetection: false\">\r\n <ng-container *abpVisible=\"row['_' + prop.name]?.visible\">\r\n @if (!row['_' + prop.name].component) {\r\n @if (prop.type === 'datetime' || prop.type === 'date' || prop.type === 'time') {\r\n <div\r\n [innerHTML]=\"\r\n !prop.isExtra\r\n ? (row['_' + prop.name]?.value | async | abpUtcToLocal:prop.type)\r\n : ('::' + (row['_' + prop.name]?.value | async | abpUtcToLocal:prop.type) | abpLocalization)\r\n \"\r\n (click)=\"\r\n prop.action && prop.action({ getInjected: getInjected, record: row, index: i })\r\n \"\r\n [ngClass]=\"entityPropTypeClasses[prop.type]\"\r\n [class.pointer]=\"prop.action\"\r\n ></div>\r\n } @else {\r\n <div\r\n [innerHTML]=\"\r\n !prop.isExtra\r\n ? (row['_' + prop.name]?.value | async)\r\n : ('::' + (row['_' + prop.name]?.value | async) | abpLocalization)\r\n \"\r\n (click)=\"\r\n prop.action && prop.action({ getInjected: getInjected, record: row, index: i })\r\n \"\r\n [ngClass]=\"entityPropTypeClasses[prop.type]\"\r\n [class.pointer]=\"prop.action\"\r\n ></div>\r\n }\r\n } @else {\r\n <ng-container\r\n *ngComponentOutlet=\"\r\n row['_' + prop.name].component;\r\n injector: row['_' + prop.name].injector\r\n \"\r\n ></ng-container>\r\n }\r\n </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n }\r\n</ngx-datatable>\r\n", dependencies: [{ kind: "directive", type: AbpVisibleDirective, selector: "[abpVisible]", inputs: ["abpVisible"] }, { kind: "ngmodule", type: NgxDatatableModule }, { kind: "component", type: i1$1.DatatableComponent, selector: "ngx-datatable", inputs: ["targetMarkerTemplate", "rows", "groupRowsBy", "groupedRows", "columns", "selected", "scrollbarV", "scrollbarVDynamic", "scrollbarH", "rowHeight", "columnMode", "headerHeight", "footerHeight", "externalPaging", "externalSorting", "limit", "count", "offset", "loadingIndicator", "ghostLoadingIndicator", "selectionType", "reorderable", "swapColumns", "sortType", "sorts", "cssClasses", "messages", "rowClass", "selectCheck", "displayCheck", "groupExpansionDefault", "trackByProp", "selectAllRowsOnPage", "virtualization", "treeFromRelation", "treeToRelation", "summaryRow", "summaryHeight", "summaryPosition", "disableRowCheck", "rowDraggable", "enableClearingSortState", "rowIdentity"], outputs: ["scroll", "activate", "select", "sort", "page", "reorder", "resize", "tableContextmenu", "treeAction", "rowDragEvents"] }, { kind: "directive", type: i1$1.DataTableColumnDirective, selector: "ngx-datatable-column", inputs: ["name", "prop", "bindAsUnsafeHtml", "frozenLeft", "frozenRight", "flexGrow", "resizeable", "comparator", "pipe", "sortable", "draggable", "canAutoResize", "minWidth", "width", "maxWidth", "checkboxable", "headerCheckboxable", "headerClass", "cellClass", "isTreeColumn", "treeLevelIndent", "summaryFunc", "summaryTemplate", "cellTemplate", "headerTemplate", "treeToggleTemplate", "ghostCellTemplate"] }, { kind: "directive", type: i1$1.DataTableColumnHeaderDirective, selector: "[ngx-datatable-header-template]" }, { kind: "directive", type: i1$1.DataTableColumnCellDirective, selector: "[ngx-datatable-cell-template]" }, { kind: "component", type: GridActionsComponent, selector: "abp-grid-actions", inputs: ["icon", "index", "text"], exportAs: ["abpGridActions"] }, { kind: "directive", type: NgbTooltip, selector: "[ngbTooltip]", inputs: ["animation", "autoClose", "placement", "popperOptions", "triggers", "positionTarget", "container", "disableTooltip", "tooltipClass", "tooltipContext", "openDelay", "closeDelay", "ngbTooltip"], outputs: ["shown", "hidden"], exportAs: ["ngbTooltip"] }, { kind: "directive", type: NgxDatatableDefaultDirective, selector: "ngx-datatable[default]", inputs: ["class"], exportAs: ["ngxDatatableDefault"] }, { kind: "directive", type: NgxDatatableListDirective, selector: "ngx-datatable[list]", inputs: ["list"], exportAs: ["ngxDatatableList"] }, { kind: "directive", type: PermissionDirective, selector: "[abpPermission]", inputs: ["abpPermission", "abpPermissionRunChangeDetection"] }, { kind: "ngmodule", type: LocalizationModule }, { kind: "pipe", type: i2$1.LocalizationPipe, name: "abpLocalization" }, { kind: "pipe", type: UtcToLocalPipe, name: "abpUtcToLocal" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1400
1112
|
}
|
|
1401
1113
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImport: i0, type: ExtensibleTableComponent, decorators: [{
|
|
1402
1114
|
type: Component,
|
|
@@ -1413,7 +1125,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.7", ngImpor
|
|
|
1413
1125
|
AsyncPipe,
|
|
1414
1126
|
NgTemplateOutlet,
|
|
1415
1127
|
NgComponentOutlet,
|
|
1416
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ngx-datatable\r\n default\r\n [rows]=\"data\"\r\n [count]=\"recordsTotal\"\r\n [list]=\"list\"\r\n [selectionType]=\"selectable ? _selectionType : undefined\"\r\n (activate)=\"tableActivate.emit($event)\"\r\n (select)=\"onSelect($event)\"\r\n [selected]=\"selected\"\r\n>\r\n@if(selectable) {\r\n <ngx-datatable-column [width]=\"50\" [sortable]=\"false\" [canAutoResize]=\"false\" [draggable]=\"false\" [resizeable]=\"false\">\r\n \r\n <ng-template ngx-datatable-header-template let-value=\"value\" let-allRowsSelected=\"allRowsSelected\"\r\n let-selectFn=\"selectFn\">\r\n @if (_selectionType !== 'single') {\r\n <div class=\"form-check\">\r\n <input class=\"form-check-input table-check\" type=\"checkbox\" [checked]=\"allRowsSelected\"\r\n (change)=\"selectFn(!allRowsSelected)\" />\r\n </div>\r\n }\r\n </ng-template>\r\n \r\n <ng-template ngx-datatable-cell-template let-value=\"value\" let-row=\"row\" let-isSelected=\"isSelected\"\r\n let-onCheckboxChangeFn=\"onCheckboxChangeFn\">\r\n @if(_selectionType === 'single') {\r\n <div class=\"h-100 form-check form-check-sm form-check-custom form-check-solid\">\r\n <input class=\"form-check-input\" type=\"radio\" [checked]=\"isSelected\" (change)=\"onCheckboxChangeFn($event)\" />\r\n </div>\r\n }\r\n @if (_selectionType !== 'single') {\r\n <div class=\"h-100 form-check form-check-sm form-check-custom form-check-solid\">\r\n <input class=\"form-check-input\" type=\"checkbox\" [checked]=\"isSelected\" (change)=\"onCheckboxChangeFn($event)\" />\r\n </div>\r\n }\r\n </ng-template>\r\n \r\n </ngx-datatable-column>\r\n }\r\n @if (actionsTemplate || (actionList.length && hasAtLeastOnePermittedAction)) {\r\n <ngx-datatable-column\r\n [name]=\"actionsText | abpLocalization\"\r\n [maxWidth]=\"columnWidths[0]\"\r\n [width]=\"columnWidths[0]\"\r\n [sortable]=\"false\"\r\n >\r\n <ng-template let-row=\"row\" let-i=\"rowIndex\" ngx-datatable-cell-template>\r\n <ng-container\r\n *ngTemplateOutlet=\"actionsTemplate || gridActions; context: { $implicit: row, index: i }\"\r\n ></ng-container>\r\n <ng-template #gridActions>\r\n @if (isVisibleActions(row)) {\r\n <abp-grid-actions [index]=\"i\" [record]=\"row\" text=\"AbpUi::Actions\"></abp-grid-actions>\r\n }\r\n </ng-template>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n }\r\n @for (prop of propList; track prop.name; let i = $index) {\r\n <ngx-datatable-column\r\n *abpVisible=\"prop.columnVisible(getInjected)\"\r\n [width]=\"columnWidths[i + 1]
|
|
1128
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ngx-datatable\r\n default\r\n [rows]=\"data\"\r\n [count]=\"recordsTotal\"\r\n [list]=\"list\"\r\n [selectionType]=\"selectable ? _selectionType : undefined\"\r\n (activate)=\"tableActivate.emit($event)\"\r\n (select)=\"onSelect($event)\"\r\n [selected]=\"selected\"\r\n>\r\n@if(selectable) {\r\n <ngx-datatable-column [width]=\"50\" [sortable]=\"false\" [canAutoResize]=\"false\" [draggable]=\"false\" [resizeable]=\"false\">\r\n \r\n <ng-template ngx-datatable-header-template let-value=\"value\" let-allRowsSelected=\"allRowsSelected\"\r\n let-selectFn=\"selectFn\">\r\n @if (_selectionType !== 'single') {\r\n <div class=\"form-check\">\r\n <input class=\"form-check-input table-check\" type=\"checkbox\" [checked]=\"allRowsSelected\"\r\n (change)=\"selectFn(!allRowsSelected)\" />\r\n </div>\r\n }\r\n </ng-template>\r\n \r\n <ng-template ngx-datatable-cell-template let-value=\"value\" let-row=\"row\" let-isSelected=\"isSelected\"\r\n let-onCheckboxChangeFn=\"onCheckboxChangeFn\">\r\n @if(_selectionType === 'single') {\r\n <div class=\"h-100 form-check form-check-sm form-check-custom form-check-solid\">\r\n <input class=\"form-check-input\" type=\"radio\" [checked]=\"isSelected\" (change)=\"onCheckboxChangeFn($event)\" />\r\n </div>\r\n }\r\n @if (_selectionType !== 'single') {\r\n <div class=\"h-100 form-check form-check-sm form-check-custom form-check-solid\">\r\n <input class=\"form-check-input\" type=\"checkbox\" [checked]=\"isSelected\" (change)=\"onCheckboxChangeFn($event)\" />\r\n </div>\r\n }\r\n </ng-template>\r\n \r\n </ngx-datatable-column>\r\n }\r\n @if (actionsTemplate || (actionList.length && hasAtLeastOnePermittedAction)) {\r\n <ngx-datatable-column\r\n [name]=\"actionsText | abpLocalization\"\r\n [maxWidth]=\"columnWidths[0] ?? undefined\"\r\n [width]=\"columnWidths[0] ?? 200\"\r\n [canAutoResize]=\"!columnWidths[0]\"\r\n [sortable]=\"false\"\r\n >\r\n <ng-template let-row=\"row\" let-i=\"rowIndex\" ngx-datatable-cell-template>\r\n <ng-container\r\n *ngTemplateOutlet=\"actionsTemplate || gridActions; context: { $implicit: row, index: i }\"\r\n ></ng-container>\r\n <ng-template #gridActions>\r\n @if (isVisibleActions(row)) {\r\n <abp-grid-actions [index]=\"i\" [record]=\"row\" text=\"AbpUi::Actions\"></abp-grid-actions>\r\n }\r\n </ng-template>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n }\r\n @for (prop of propList; track prop.name; let i = $index) {\r\n <ngx-datatable-column\r\n *abpVisible=\"prop.columnVisible(getInjected)\"\r\n [width]=\"columnWidths[i + 1] ?? 200\"\r\n [canAutoResize]=\"!columnWidths[i + 1]\"\r\n [name]=\"(prop.isExtra ? '::' + prop.displayName : prop.displayName) | abpLocalization\"\r\n [prop]=\"prop.name\"\r\n [sortable]=\"prop.sortable\"\r\n >\r\n <ng-template ngx-datatable-header-template let-column=\"column\">\r\n @if (prop.tooltip) {\r\n <span\r\n [ngbTooltip]=\"prop.tooltip.text | abpLocalization\"\r\n [placement]=\"prop.tooltip.placement || 'auto'\"\r\n container=\"body\"\r\n >\r\n {{ column.name }} <i class=\"fa fa-info-circle\" aria-hidden=\"true\"></i>\r\n </span>\r\n } @else {\r\n {{ column.name }}\r\n }\r\n </ng-template>\r\n <ng-template let-row=\"row\" let-i=\"index\" ngx-datatable-cell-template>\r\n <ng-container *abpPermission=\"prop.permission; runChangeDetection: false\">\r\n <ng-container *abpVisible=\"row['_' + prop.name]?.visible\">\r\n @if (!row['_' + prop.name].component) {\r\n @if (prop.type === 'datetime' || prop.type === 'date' || prop.type === 'time') {\r\n <div\r\n [innerHTML]=\"\r\n !prop.isExtra\r\n ? (row['_' + prop.name]?.value | async | abpUtcToLocal:prop.type)\r\n : ('::' + (row['_' + prop.name]?.value | async | abpUtcToLocal:prop.type) | abpLocalization)\r\n \"\r\n (click)=\"\r\n prop.action && prop.action({ getInjected: getInjected, record: row, index: i })\r\n \"\r\n [ngClass]=\"entityPropTypeClasses[prop.type]\"\r\n [class.pointer]=\"prop.action\"\r\n ></div>\r\n } @else {\r\n <div\r\n [innerHTML]=\"\r\n !prop.isExtra\r\n ? (row['_' + prop.name]?.value | async)\r\n : ('::' + (row['_' + prop.name]?.value | async) | abpLocalization)\r\n \"\r\n (click)=\"\r\n prop.action && prop.action({ getInjected: getInjected, record: row, index: i })\r\n \"\r\n [ngClass]=\"entityPropTypeClasses[prop.type]\"\r\n [class.pointer]=\"prop.action\"\r\n ></div>\r\n }\r\n } @else {\r\n <ng-container\r\n *ngComponentOutlet=\"\r\n row['_' + prop.name].component;\r\n injector: row['_' + prop.name].injector\r\n \"\r\n ></ng-container>\r\n }\r\n </ng-container>\r\n </ng-container>\r\n </ng-template>\r\n </ngx-datatable-column>\r\n }\r\n</ngx-datatable>\r\n" }]
|
|
1417
1129
|
}], ctorParameters: () => [], propDecorators: { actionsText: [{
|
|
1418
1130
|
type: Input
|
|
1419
1131
|
}], data: [{
|