@bitbybit-dev/base 0.19.6 → 0.19.8
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/babel.config.cjs +0 -1
- package/{index.js → index.ts} +2 -1
- package/lib/api/inputs/base-inputs.ts +18 -0
- package/lib/api/inputs/{color-inputs.d.ts → color-inputs.ts} +48 -26
- package/lib/api/inputs/{lists-inputs.d.ts → lists-inputs.ts} +190 -91
- package/lib/api/inputs/{logic-inputs.d.ts → logic-inputs.ts} +46 -24
- package/lib/api/inputs/{math-inputs.d.ts → math-inputs.ts} +97 -53
- package/lib/api/inputs/{point-inputs.d.ts → point-inputs.ts} +168 -77
- package/lib/api/inputs/text-inputs.ts +108 -0
- package/lib/api/inputs/{transforms-inputs.d.ts → transforms-inputs.ts} +64 -35
- package/lib/api/inputs/{vector-inputs.d.ts → vector-inputs.ts} +104 -48
- package/lib/api/services/color.test.ts +86 -0
- package/lib/api/services/{color.js → color.ts} +34 -15
- package/lib/api/services/{geometry-helper.js → geometry-helper.ts} +43 -31
- package/lib/api/services/{index.d.ts → index.ts} +1 -1
- package/lib/api/services/lists.test.ts +612 -0
- package/lib/api/services/{lists.js → lists.ts} +83 -59
- package/lib/api/services/logic.test.ts +187 -0
- package/lib/api/services/{logic.js → logic.ts} +32 -24
- package/lib/api/services/math.test.ts +622 -0
- package/lib/api/services/{math.js → math.ts} +136 -71
- package/lib/api/services/{point.js → point.ts} +67 -32
- package/lib/api/services/text.test.ts +55 -0
- package/lib/api/services/{text.js → text.ts} +17 -7
- package/lib/api/services/{transforms.js → transforms.ts} +83 -37
- package/lib/api/services/vector.test.ts +360 -0
- package/lib/api/services/{vector.js → vector.ts} +80 -42
- package/lib/{index.d.ts → index.ts} +1 -0
- package/package.json +1 -1
- package/tsconfig.bitbybit.json +26 -0
- package/tsconfig.json +24 -0
- package/babel.config.d.cts +0 -5
- package/index.d.ts +0 -1
- package/lib/api/index.js +0 -1
- package/lib/api/inputs/base-inputs.d.ts +0 -35
- package/lib/api/inputs/base-inputs.js +0 -1
- package/lib/api/inputs/color-inputs.js +0 -164
- package/lib/api/inputs/index.js +0 -9
- package/lib/api/inputs/inputs.js +0 -9
- package/lib/api/inputs/lists-inputs.js +0 -576
- package/lib/api/inputs/logic-inputs.js +0 -111
- package/lib/api/inputs/math-inputs.js +0 -391
- package/lib/api/inputs/point-inputs.js +0 -521
- package/lib/api/inputs/text-inputs.d.ts +0 -83
- package/lib/api/inputs/text-inputs.js +0 -120
- package/lib/api/inputs/transforms-inputs.js +0 -200
- package/lib/api/inputs/vector-inputs.js +0 -304
- package/lib/api/services/color.d.ts +0 -114
- package/lib/api/services/geometry-helper.d.ts +0 -15
- package/lib/api/services/index.js +0 -9
- package/lib/api/services/lists.d.ts +0 -287
- package/lib/api/services/logic.d.ts +0 -99
- package/lib/api/services/math.d.ts +0 -349
- package/lib/api/services/point.d.ts +0 -222
- package/lib/api/services/text.d.ts +0 -69
- package/lib/api/services/transforms.d.ts +0 -122
- package/lib/api/services/vector.d.ts +0 -320
- package/lib/index.js +0 -1
- /package/lib/api/{index.d.ts → index.ts} +0 -0
- /package/lib/api/inputs/{index.d.ts → index.ts} +0 -0
- /package/lib/api/inputs/{inputs.d.ts → inputs.ts} +0 -0
|
@@ -1,10 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-namespace */
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
// tslint:disable-next-line: no-namespace
|
|
5
|
+
export namespace Lists {
|
|
6
|
+
|
|
7
|
+
export enum firstLastEnum {
|
|
3
8
|
first = "first",
|
|
4
|
-
last = "last"
|
|
9
|
+
last = "last",
|
|
5
10
|
}
|
|
6
|
-
|
|
7
|
-
|
|
11
|
+
|
|
12
|
+
export class ListItemDto<T> {
|
|
13
|
+
constructor(list?: T[], index?: number, clone?: boolean) {
|
|
14
|
+
if (list !== undefined) { this.list = list; }
|
|
15
|
+
if (index !== undefined) { this.index = index; }
|
|
16
|
+
if (clone !== undefined) { this.clone = clone; }
|
|
17
|
+
}
|
|
8
18
|
/**
|
|
9
19
|
* The list to interrogate
|
|
10
20
|
* @default undefined
|
|
@@ -17,15 +27,20 @@ export declare namespace Lists {
|
|
|
17
27
|
* @maximum Infinity
|
|
18
28
|
* @step 1
|
|
19
29
|
*/
|
|
20
|
-
index
|
|
30
|
+
index = 0;
|
|
21
31
|
/**
|
|
22
32
|
* Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error
|
|
23
33
|
* @default true
|
|
24
34
|
*/
|
|
25
|
-
clone
|
|
35
|
+
clone? = true;
|
|
26
36
|
}
|
|
27
|
-
class SubListDto<T> {
|
|
28
|
-
constructor(list?: T[], indexStart?: number, indexEnd?: number, clone?: boolean)
|
|
37
|
+
export class SubListDto<T> {
|
|
38
|
+
constructor(list?: T[], indexStart?: number, indexEnd?: number, clone?: boolean) {
|
|
39
|
+
if (list !== undefined) { this.list = list; }
|
|
40
|
+
if (indexStart !== undefined) { this.indexStart = indexStart; }
|
|
41
|
+
if (indexEnd !== undefined) { this.indexEnd = indexEnd; }
|
|
42
|
+
if (clone !== undefined) { this.clone = clone; }
|
|
43
|
+
}
|
|
29
44
|
/**
|
|
30
45
|
* The list to split into a sublist
|
|
31
46
|
* @default undefined
|
|
@@ -38,7 +53,7 @@ export declare namespace Lists {
|
|
|
38
53
|
* @maximum Infinity
|
|
39
54
|
* @step 1
|
|
40
55
|
*/
|
|
41
|
-
indexStart
|
|
56
|
+
indexStart = 0;
|
|
42
57
|
/**
|
|
43
58
|
* Index to which to end the sublist - 0 means first.
|
|
44
59
|
* @default 1
|
|
@@ -46,15 +61,18 @@ export declare namespace Lists {
|
|
|
46
61
|
* @maximum Infinity
|
|
47
62
|
* @step 1
|
|
48
63
|
*/
|
|
49
|
-
indexEnd
|
|
64
|
+
indexEnd = 1;
|
|
50
65
|
/**
|
|
51
66
|
* Tries to clone the data in the component, sometimes it may not be possible if structure is circular
|
|
52
67
|
* @default true
|
|
53
68
|
*/
|
|
54
|
-
clone
|
|
69
|
+
clone? = true;
|
|
55
70
|
}
|
|
56
|
-
class ListCloneDto<T> {
|
|
57
|
-
constructor(list?: T[], clone?: boolean)
|
|
71
|
+
export class ListCloneDto<T> {
|
|
72
|
+
constructor(list?: T[], clone?: boolean) {
|
|
73
|
+
if (list !== undefined) { this.list = list; }
|
|
74
|
+
if (clone !== undefined) { this.clone = clone; }
|
|
75
|
+
}
|
|
58
76
|
/**
|
|
59
77
|
* The list to interrogate
|
|
60
78
|
* @default undefined
|
|
@@ -64,10 +82,12 @@ export declare namespace Lists {
|
|
|
64
82
|
* Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error
|
|
65
83
|
* @default true
|
|
66
84
|
*/
|
|
67
|
-
clone
|
|
85
|
+
clone? = true;
|
|
68
86
|
}
|
|
69
|
-
class RepeatInPatternDto<T> {
|
|
70
|
-
constructor(list?: T[])
|
|
87
|
+
export class RepeatInPatternDto<T> {
|
|
88
|
+
constructor(list?: T[]) {
|
|
89
|
+
if (list !== undefined) { this.list = list; }
|
|
90
|
+
}
|
|
71
91
|
/**
|
|
72
92
|
* The list to interrogate
|
|
73
93
|
* @default undefined
|
|
@@ -77,7 +97,7 @@ export declare namespace Lists {
|
|
|
77
97
|
* Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error
|
|
78
98
|
* @default true
|
|
79
99
|
*/
|
|
80
|
-
clone
|
|
100
|
+
clone? = true;
|
|
81
101
|
/**
|
|
82
102
|
* The limit of the length of the list
|
|
83
103
|
* @default 100
|
|
@@ -85,10 +105,14 @@ export declare namespace Lists {
|
|
|
85
105
|
* @maximum Infinity
|
|
86
106
|
* @step 1
|
|
87
107
|
*/
|
|
88
|
-
lengthLimit
|
|
108
|
+
lengthLimit = 100;
|
|
89
109
|
}
|
|
90
|
-
class SortDto<T> {
|
|
91
|
-
constructor(list?: T[], clone?: boolean, orderAsc?: boolean)
|
|
110
|
+
export class SortDto<T> {
|
|
111
|
+
constructor(list?: T[], clone?: boolean, orderAsc?: boolean) {
|
|
112
|
+
if (list !== undefined) { this.list = list; }
|
|
113
|
+
if (clone !== undefined) { this.clone = clone; }
|
|
114
|
+
if (orderAsc !== undefined) { this.orderAsc = orderAsc; }
|
|
115
|
+
}
|
|
92
116
|
/**
|
|
93
117
|
* The list to interrogate
|
|
94
118
|
* @default undefined
|
|
@@ -98,15 +122,19 @@ export declare namespace Lists {
|
|
|
98
122
|
* Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error
|
|
99
123
|
* @default true
|
|
100
124
|
*/
|
|
101
|
-
clone
|
|
125
|
+
clone? = true;
|
|
102
126
|
/**
|
|
103
127
|
* If true, the list will be sorted in ascending order, otherwise in descending order
|
|
104
128
|
* @default true
|
|
105
129
|
*/
|
|
106
|
-
orderAsc
|
|
130
|
+
orderAsc = true;
|
|
107
131
|
}
|
|
108
|
-
class SortJsonDto<T> {
|
|
109
|
-
constructor(list?: T[], clone?: boolean, orderAsc?: boolean)
|
|
132
|
+
export class SortJsonDto<T> {
|
|
133
|
+
constructor(list?: T[], clone?: boolean, orderAsc?: boolean) {
|
|
134
|
+
if (list !== undefined) { this.list = list; }
|
|
135
|
+
if (clone !== undefined) { this.clone = clone; }
|
|
136
|
+
if (orderAsc !== undefined) { this.orderAsc = orderAsc; }
|
|
137
|
+
}
|
|
110
138
|
/**
|
|
111
139
|
* The list to interrogate
|
|
112
140
|
* @default undefined
|
|
@@ -116,28 +144,34 @@ export declare namespace Lists {
|
|
|
116
144
|
* Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error
|
|
117
145
|
* @default true
|
|
118
146
|
*/
|
|
119
|
-
clone
|
|
147
|
+
clone? = true;
|
|
120
148
|
/**
|
|
121
149
|
* If true, the list will be sorted in ascending order, otherwise in descending order
|
|
122
150
|
* @default true
|
|
123
151
|
*/
|
|
124
|
-
orderAsc
|
|
152
|
+
orderAsc = true;
|
|
125
153
|
/**
|
|
126
154
|
* The property to sort by
|
|
127
155
|
* @default propName
|
|
128
156
|
*/
|
|
129
|
-
property
|
|
157
|
+
property = "propName";
|
|
130
158
|
}
|
|
131
|
-
class ListDto<T> {
|
|
132
|
-
constructor(list?: T[])
|
|
159
|
+
export class ListDto<T> {
|
|
160
|
+
constructor(list?: T[]) {
|
|
161
|
+
if (list !== undefined) { this.list = list; }
|
|
162
|
+
}
|
|
133
163
|
/**
|
|
134
164
|
* The list
|
|
135
165
|
* @default undefined
|
|
136
166
|
*/
|
|
137
167
|
list: T[];
|
|
138
168
|
}
|
|
139
|
-
class GroupListDto<T> {
|
|
140
|
-
constructor(list?: T[], nrElements?: number, keepRemainder?: boolean)
|
|
169
|
+
export class GroupListDto<T> {
|
|
170
|
+
constructor(list?: T[], nrElements?: number, keepRemainder?: boolean) {
|
|
171
|
+
if (list !== undefined) { this.list = list; }
|
|
172
|
+
if (nrElements !== undefined) { this.nrElements = nrElements; }
|
|
173
|
+
if (keepRemainder !== undefined) { this.keepRemainder = keepRemainder; }
|
|
174
|
+
}
|
|
141
175
|
/**
|
|
142
176
|
* The list of elements to group together
|
|
143
177
|
* @default undefined
|
|
@@ -150,15 +184,18 @@ export declare namespace Lists {
|
|
|
150
184
|
* @maximum Infinity
|
|
151
185
|
* @step 1
|
|
152
186
|
*/
|
|
153
|
-
nrElements
|
|
187
|
+
nrElements = 2;
|
|
154
188
|
/**
|
|
155
189
|
* If true, the remainder of the list will be added as a separate group
|
|
156
190
|
* @default false
|
|
157
191
|
*/
|
|
158
|
-
keepRemainder
|
|
192
|
+
keepRemainder = false;
|
|
159
193
|
}
|
|
160
|
-
class MultiplyItemDto<T> {
|
|
161
|
-
constructor(item?: T, times?: number)
|
|
194
|
+
export class MultiplyItemDto<T> {
|
|
195
|
+
constructor(item?: T, times?: number) {
|
|
196
|
+
if (item !== undefined) { this.item = item; }
|
|
197
|
+
if (times !== undefined) { this.times = times; }
|
|
198
|
+
}
|
|
162
199
|
/**
|
|
163
200
|
* The item to multiply
|
|
164
201
|
* @default undefined
|
|
@@ -173,8 +210,13 @@ export declare namespace Lists {
|
|
|
173
210
|
*/
|
|
174
211
|
times: number;
|
|
175
212
|
}
|
|
176
|
-
class AddItemAtIndexDto<T> {
|
|
177
|
-
constructor(list?: T[], item?: T, index?: number, clone?: boolean)
|
|
213
|
+
export class AddItemAtIndexDto<T> {
|
|
214
|
+
constructor(list?: T[], item?: T, index?: number, clone?: boolean) {
|
|
215
|
+
if (list !== undefined) { this.list = list; }
|
|
216
|
+
if (item !== undefined) { this.item = item; }
|
|
217
|
+
if (index !== undefined) { this.index = index; }
|
|
218
|
+
if (clone !== undefined) { this.clone = clone; }
|
|
219
|
+
}
|
|
178
220
|
/**
|
|
179
221
|
* The list to which item needs to be added
|
|
180
222
|
* @default undefined
|
|
@@ -192,15 +234,20 @@ export declare namespace Lists {
|
|
|
192
234
|
* @maximum Infinity
|
|
193
235
|
* @step 1
|
|
194
236
|
*/
|
|
195
|
-
index
|
|
237
|
+
index = 0;
|
|
196
238
|
/**
|
|
197
239
|
* Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error
|
|
198
240
|
* @default true
|
|
199
241
|
*/
|
|
200
|
-
clone
|
|
242
|
+
clone? = true;
|
|
201
243
|
}
|
|
202
|
-
class AddItemAtIndexesDto<T> {
|
|
203
|
-
constructor(list?: T[], item?: T, indexes?: number[], clone?: boolean)
|
|
244
|
+
export class AddItemAtIndexesDto<T> {
|
|
245
|
+
constructor(list?: T[], item?: T, indexes?: number[], clone?: boolean) {
|
|
246
|
+
if (list !== undefined) { this.list = list; }
|
|
247
|
+
if (item !== undefined) { this.item = item; }
|
|
248
|
+
if (indexes !== undefined) { this.indexes = indexes; }
|
|
249
|
+
if (clone !== undefined) { this.clone = clone; }
|
|
250
|
+
}
|
|
204
251
|
/**
|
|
205
252
|
* The list to which item needs to be added
|
|
206
253
|
* @default undefined
|
|
@@ -215,15 +262,21 @@ export declare namespace Lists {
|
|
|
215
262
|
* The index to add the item at
|
|
216
263
|
* @default [0]
|
|
217
264
|
*/
|
|
218
|
-
indexes: number[];
|
|
265
|
+
indexes: number[] = [0];
|
|
219
266
|
/**
|
|
220
267
|
* Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error
|
|
221
268
|
* @default true
|
|
222
269
|
*/
|
|
223
|
-
clone
|
|
270
|
+
clone? = true;
|
|
224
271
|
}
|
|
225
|
-
|
|
226
|
-
|
|
272
|
+
|
|
273
|
+
export class AddItemsAtIndexesDto<T> {
|
|
274
|
+
constructor(list?: T[], items?: T[], indexes?: number[], clone?: boolean) {
|
|
275
|
+
if (list !== undefined) { this.list = list; }
|
|
276
|
+
if (items !== undefined) { this.items = items; }
|
|
277
|
+
if (indexes !== undefined) { this.indexes = indexes; }
|
|
278
|
+
if (clone !== undefined) { this.clone = clone; }
|
|
279
|
+
}
|
|
227
280
|
/**
|
|
228
281
|
* The list to which item needs to be added
|
|
229
282
|
* @default undefined
|
|
@@ -238,15 +291,19 @@ export declare namespace Lists {
|
|
|
238
291
|
* The index to add the item at
|
|
239
292
|
* @default [0]
|
|
240
293
|
*/
|
|
241
|
-
indexes: number[];
|
|
294
|
+
indexes: number[] = [0];
|
|
242
295
|
/**
|
|
243
296
|
* Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error
|
|
244
297
|
* @default true
|
|
245
298
|
*/
|
|
246
|
-
clone
|
|
299
|
+
clone? = true;
|
|
247
300
|
}
|
|
248
|
-
class RemoveItemAtIndexDto<T> {
|
|
249
|
-
constructor(list?: T[], index?: number, clone?: boolean)
|
|
301
|
+
export class RemoveItemAtIndexDto<T> {
|
|
302
|
+
constructor(list?: T[], index?: number, clone?: boolean) {
|
|
303
|
+
if (list !== undefined) { this.list = list; }
|
|
304
|
+
if (index !== undefined) { this.index = index; }
|
|
305
|
+
if (clone !== undefined) { this.clone = clone; }
|
|
306
|
+
}
|
|
250
307
|
/**
|
|
251
308
|
* The list from which item needs to be removed
|
|
252
309
|
* @default undefined
|
|
@@ -259,15 +316,19 @@ export declare namespace Lists {
|
|
|
259
316
|
* @maximum Infinity
|
|
260
317
|
* @step 1
|
|
261
318
|
*/
|
|
262
|
-
index
|
|
319
|
+
index = 0;
|
|
263
320
|
/**
|
|
264
321
|
* Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error
|
|
265
322
|
* @default true
|
|
266
323
|
*/
|
|
267
|
-
clone
|
|
324
|
+
clone? = true;
|
|
268
325
|
}
|
|
269
|
-
class RemoveItemsAtIndexesDto<T> {
|
|
270
|
-
constructor(list?: T[], indexes?: number[], clone?: boolean)
|
|
326
|
+
export class RemoveItemsAtIndexesDto<T> {
|
|
327
|
+
constructor(list?: T[], indexes?: number[], clone?: boolean) {
|
|
328
|
+
if (list !== undefined) { this.list = list; }
|
|
329
|
+
if (indexes !== undefined) { this.indexes = indexes; }
|
|
330
|
+
if (clone !== undefined) { this.clone = clone; }
|
|
331
|
+
}
|
|
271
332
|
/**
|
|
272
333
|
* The list from which item needs to be removed
|
|
273
334
|
* @default undefined
|
|
@@ -282,10 +343,15 @@ export declare namespace Lists {
|
|
|
282
343
|
* Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error
|
|
283
344
|
* @default true
|
|
284
345
|
*/
|
|
285
|
-
clone
|
|
346
|
+
clone? = true;
|
|
286
347
|
}
|
|
287
|
-
class RemoveNthItemDto<T> {
|
|
288
|
-
constructor(list?: T[], nth?: number, offset?: number, clone?: boolean)
|
|
348
|
+
export class RemoveNthItemDto<T> {
|
|
349
|
+
constructor(list?: T[], nth?: number, offset?: number, clone?: boolean) {
|
|
350
|
+
if (list !== undefined) { this.list = list; }
|
|
351
|
+
if (nth !== undefined) { this.nth = nth; }
|
|
352
|
+
if (offset !== undefined) { this.offset = offset; }
|
|
353
|
+
if (clone !== undefined) { this.clone = clone; }
|
|
354
|
+
}
|
|
289
355
|
/**
|
|
290
356
|
* The list from which item needs to be removed
|
|
291
357
|
* @default undefined
|
|
@@ -298,7 +364,7 @@ export declare namespace Lists {
|
|
|
298
364
|
* @maximum Infinity
|
|
299
365
|
* @step 1
|
|
300
366
|
*/
|
|
301
|
-
nth
|
|
367
|
+
nth = 2;
|
|
302
368
|
/**
|
|
303
369
|
* The offset from which to start counting
|
|
304
370
|
* @default 0
|
|
@@ -306,15 +372,19 @@ export declare namespace Lists {
|
|
|
306
372
|
* @maximum Infinity
|
|
307
373
|
* @step 1
|
|
308
374
|
*/
|
|
309
|
-
offset
|
|
375
|
+
offset = 0;
|
|
310
376
|
/**
|
|
311
377
|
* Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error
|
|
312
378
|
* @default true
|
|
313
379
|
*/
|
|
314
|
-
clone
|
|
380
|
+
clone? = true;
|
|
315
381
|
}
|
|
316
|
-
class RandomThresholdDto<T> {
|
|
317
|
-
constructor(list?: T[], threshold?: number, clone?: boolean)
|
|
382
|
+
export class RandomThresholdDto<T> {
|
|
383
|
+
constructor(list?: T[], threshold?: number, clone?: boolean) {
|
|
384
|
+
if (list !== undefined) { this.list = list; }
|
|
385
|
+
if (threshold !== undefined) { this.threshold = threshold; }
|
|
386
|
+
if (clone !== undefined) { this.clone = clone; }
|
|
387
|
+
}
|
|
318
388
|
/**
|
|
319
389
|
* The list from which item needs to be updated
|
|
320
390
|
* @default undefined
|
|
@@ -327,15 +397,18 @@ export declare namespace Lists {
|
|
|
327
397
|
* @maximum 1
|
|
328
398
|
* @step 1
|
|
329
399
|
*/
|
|
330
|
-
threshold
|
|
400
|
+
threshold = 1;
|
|
331
401
|
/**
|
|
332
402
|
* Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error
|
|
333
403
|
* @default true
|
|
334
404
|
*/
|
|
335
|
-
clone
|
|
405
|
+
clone? = true;
|
|
336
406
|
}
|
|
337
|
-
class RemoveDuplicatesDto<T> {
|
|
338
|
-
constructor(list?: T[], clone?: boolean)
|
|
407
|
+
export class RemoveDuplicatesDto<T> {
|
|
408
|
+
constructor(list?: T[], clone?: boolean) {
|
|
409
|
+
if (list !== undefined) { this.list = list; }
|
|
410
|
+
if (clone !== undefined) { this.clone = clone; }
|
|
411
|
+
}
|
|
339
412
|
/**
|
|
340
413
|
* The list from which item needs to be removed
|
|
341
414
|
* @default undefined
|
|
@@ -345,10 +418,14 @@ export declare namespace Lists {
|
|
|
345
418
|
* Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error
|
|
346
419
|
* @default true
|
|
347
420
|
*/
|
|
348
|
-
clone
|
|
421
|
+
clone? = true;
|
|
349
422
|
}
|
|
350
|
-
class RemoveDuplicatesToleranceDto<T> {
|
|
351
|
-
constructor(list?: T[], clone?: boolean, tolerance?: number)
|
|
423
|
+
export class RemoveDuplicatesToleranceDto<T> {
|
|
424
|
+
constructor(list?: T[], clone?: boolean, tolerance?: number) {
|
|
425
|
+
if (list !== undefined) { this.list = list; }
|
|
426
|
+
if (tolerance !== undefined) { this.tolerance = tolerance; }
|
|
427
|
+
if (clone !== undefined) { this.clone = clone; }
|
|
428
|
+
}
|
|
352
429
|
/**
|
|
353
430
|
* The list from which item needs to be removed
|
|
354
431
|
* @default undefined
|
|
@@ -361,15 +438,18 @@ export declare namespace Lists {
|
|
|
361
438
|
* @maximum Infinity
|
|
362
439
|
* @step 1e-7
|
|
363
440
|
*/
|
|
364
|
-
tolerance
|
|
441
|
+
tolerance = 1e-7;
|
|
365
442
|
/**
|
|
366
443
|
* Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error
|
|
367
444
|
* @default true
|
|
368
445
|
*/
|
|
369
|
-
clone
|
|
446
|
+
clone? = true;
|
|
370
447
|
}
|
|
371
|
-
class GetByPatternDto<T> {
|
|
372
|
-
constructor(list?: T[], pattern?: boolean[])
|
|
448
|
+
export class GetByPatternDto<T> {
|
|
449
|
+
constructor(list?: T[], pattern?: boolean[]) {
|
|
450
|
+
if (list !== undefined) { this.list = list; }
|
|
451
|
+
if (pattern !== undefined) { this.pattern = pattern; }
|
|
452
|
+
}
|
|
373
453
|
/**
|
|
374
454
|
* The list from which we need to get an item
|
|
375
455
|
* @default undefined
|
|
@@ -379,10 +459,15 @@ export declare namespace Lists {
|
|
|
379
459
|
* The list of booleans to be used as a pattern (true means get, false means skip)
|
|
380
460
|
* @default [true, true, false]
|
|
381
461
|
*/
|
|
382
|
-
pattern: boolean[];
|
|
462
|
+
pattern: boolean[] = [true, true, false];
|
|
383
463
|
}
|
|
384
|
-
class GetNthItemDto<T> {
|
|
385
|
-
constructor(list?: T[], nth?: number, offset?: number, clone?: boolean)
|
|
464
|
+
export class GetNthItemDto<T> {
|
|
465
|
+
constructor(list?: T[], nth?: number, offset?: number, clone?: boolean) {
|
|
466
|
+
if (list !== undefined) { this.list = list; }
|
|
467
|
+
if (nth !== undefined) { this.nth = nth; }
|
|
468
|
+
if (offset !== undefined) { this.offset = offset; }
|
|
469
|
+
if (clone !== undefined) { this.clone = clone; }
|
|
470
|
+
}
|
|
386
471
|
/**
|
|
387
472
|
* The list from which we need to get an item
|
|
388
473
|
* @default undefined
|
|
@@ -395,7 +480,7 @@ export declare namespace Lists {
|
|
|
395
480
|
* @maximum Infinity
|
|
396
481
|
* @step 1
|
|
397
482
|
*/
|
|
398
|
-
nth
|
|
483
|
+
nth = 2;
|
|
399
484
|
/**
|
|
400
485
|
* The offset from which to start counting
|
|
401
486
|
* @default 0
|
|
@@ -403,23 +488,28 @@ export declare namespace Lists {
|
|
|
403
488
|
* @maximum Infinity
|
|
404
489
|
* @step 1
|
|
405
490
|
*/
|
|
406
|
-
offset
|
|
491
|
+
offset = 0;
|
|
407
492
|
/**
|
|
408
493
|
* Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error
|
|
409
494
|
* @default true
|
|
410
495
|
*/
|
|
411
|
-
clone
|
|
496
|
+
clone? = true;
|
|
412
497
|
}
|
|
413
|
-
class GetLongestListLength<T> {
|
|
414
|
-
constructor(lists?: T[])
|
|
498
|
+
export class GetLongestListLength<T> {
|
|
499
|
+
constructor(lists?: T[]) {
|
|
500
|
+
if (lists !== undefined) { this.lists = lists; }
|
|
501
|
+
}
|
|
415
502
|
/**
|
|
416
503
|
* The list from which we need to get an item
|
|
417
504
|
* @default undefined
|
|
418
505
|
*/
|
|
419
506
|
lists: T[];
|
|
420
507
|
}
|
|
421
|
-
class MergeElementsOfLists<T> {
|
|
422
|
-
constructor(lists?: T[], level?: number)
|
|
508
|
+
export class MergeElementsOfLists<T> {
|
|
509
|
+
constructor(lists?: T[], level?: number) {
|
|
510
|
+
if (lists !== undefined) { this.lists = lists; }
|
|
511
|
+
if (level !== undefined) { this.level = level; }
|
|
512
|
+
}
|
|
423
513
|
/**
|
|
424
514
|
* The list from which we need to get an item
|
|
425
515
|
* @default undefined
|
|
@@ -432,10 +522,14 @@ export declare namespace Lists {
|
|
|
432
522
|
* @maximum Infinity
|
|
433
523
|
* @step 1
|
|
434
524
|
*/
|
|
435
|
-
level
|
|
525
|
+
level = 0;
|
|
436
526
|
}
|
|
437
|
-
class AddItemDto<T> {
|
|
438
|
-
constructor(list?: T[], item?: T, clone?: boolean)
|
|
527
|
+
export class AddItemDto<T> {
|
|
528
|
+
constructor(list?: T[], item?: T, clone?: boolean) {
|
|
529
|
+
if (list !== undefined) { this.list = list; }
|
|
530
|
+
if (item !== undefined) { this.item = item; }
|
|
531
|
+
if (clone !== undefined) { this.clone = clone; }
|
|
532
|
+
}
|
|
439
533
|
/**
|
|
440
534
|
* The list to which item needs to be added
|
|
441
535
|
* @default undefined
|
|
@@ -450,10 +544,15 @@ export declare namespace Lists {
|
|
|
450
544
|
* Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error
|
|
451
545
|
* @default true
|
|
452
546
|
*/
|
|
453
|
-
clone
|
|
547
|
+
clone? = true;
|
|
454
548
|
}
|
|
455
|
-
class AddItemFirstLastDto<T> {
|
|
456
|
-
constructor(list?: T[], item?: T, position?: firstLastEnum, clone?: boolean)
|
|
549
|
+
export class AddItemFirstLastDto<T> {
|
|
550
|
+
constructor(list?: T[], item?: T, position?: firstLastEnum, clone?: boolean) {
|
|
551
|
+
if (list !== undefined) { this.list = list; }
|
|
552
|
+
if (item !== undefined) { this.item = item; }
|
|
553
|
+
if (position !== undefined) { this.position = position; }
|
|
554
|
+
if (clone !== undefined) { this.clone = clone; }
|
|
555
|
+
}
|
|
457
556
|
/**
|
|
458
557
|
* The list to which item needs to be added
|
|
459
558
|
* @default undefined
|
|
@@ -468,11 +567,11 @@ export declare namespace Lists {
|
|
|
468
567
|
* The option if the item needs to be added at the beginning or the end of the list
|
|
469
568
|
* @default last
|
|
470
569
|
*/
|
|
471
|
-
position: firstLastEnum;
|
|
570
|
+
position: firstLastEnum = firstLastEnum.last;
|
|
472
571
|
/**
|
|
473
572
|
* Tries to make structured clone of the incoming list data in the component, sometimes it may not be possible due to circular structures or other types of error
|
|
474
573
|
* @default true
|
|
475
574
|
*/
|
|
476
|
-
clone
|
|
575
|
+
clone? = true;
|
|
477
576
|
}
|
|
478
577
|
}
|