@abp/ng.components 9.3.1 → 9.3.2
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",
|
|
@@ -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,7 +980,7 @@ 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
986
|
this.setColumnWidths(width ? Number(width) : undefined);
|