@tectra-ng/utils 0.4.2 → 0.4.4
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/README.md +1 -0
- package/fesm2022/tectra-ng-utils-auto-focus.mjs +3 -3
- package/fesm2022/tectra-ng-utils-breakpoint.mjs +3 -3
- package/fesm2022/tectra-ng-utils-clipboard.mjs +6 -6
- package/fesm2022/tectra-ng-utils-clock.mjs +3 -3
- package/fesm2022/tectra-ng-utils-currency.mjs +3 -3
- package/fesm2022/tectra-ng-utils-date.mjs +6 -6
- package/fesm2022/tectra-ng-utils-debounce-input.mjs +3 -3
- package/fesm2022/tectra-ng-utils-drag-scroll.mjs +3 -3
- package/fesm2022/tectra-ng-utils-file.mjs +3 -3
- package/fesm2022/tectra-ng-utils-filter-state.mjs +6 -6
- package/fesm2022/tectra-ng-utils-filter.mjs +7 -7
- package/fesm2022/tectra-ng-utils-filter.mjs.map +1 -1
- package/fesm2022/tectra-ng-utils-form-changes.mjs +3 -3
- package/fesm2022/tectra-ng-utils-form-validation.mjs +6 -6
- package/fesm2022/tectra-ng-utils-go-back.mjs +3 -3
- package/fesm2022/tectra-ng-utils-http.mjs +9 -9
- package/fesm2022/tectra-ng-utils-in-view.mjs +6 -6
- package/fesm2022/tectra-ng-utils-number.mjs +3 -3
- package/fesm2022/tectra-ng-utils-pagination.mjs +1 -0
- package/fesm2022/tectra-ng-utils-plural.mjs +6 -6
- package/fesm2022/tectra-ng-utils-relative-time.mjs +3 -3
- package/fesm2022/tectra-ng-utils-scroll-end.mjs +3 -3
- package/fesm2022/tectra-ng-utils-stop-propagation.mjs +3 -3
- package/fesm2022/tectra-ng-utils-style-class.mjs +3 -3
- package/fesm2022/tectra-ng-utils-text.mjs +9 -9
- package/fesm2022/tectra-ng-utils-title.mjs +6 -6
- package/fesm2022/tectra-ng-utils.mjs +1 -1
- package/file/README.md +1 -1
- package/http/README.md +1 -1
- package/package.json +9 -5
- package/pagination/README.md +11 -0
- package/types/tectra-ng-utils-filter.d.ts +1 -1
- package/types/tectra-ng-utils-http.d.ts +1 -1
- package/types/tectra-ng-utils-pagination.d.ts +2 -0
- package/types/tectra-ng-utils.d.ts +1 -1
package/README.md
CHANGED
|
@@ -63,6 +63,7 @@ Part of `tectra-ng`. One entry point per utility, so you only bundle what you im
|
|
|
63
63
|
| `@tectra-ng/utils/drag-scroll` | `txDragScroll` — drag a box to scroll it, or pan a canvas |
|
|
64
64
|
| `@tectra-ng/utils/form-changes` | `trackFormChanges` (`changed` signal, commit, revert), `TxFormChangeTracker` |
|
|
65
65
|
| `@tectra-ng/utils/scroll-end` | `txScrollEnd` — infinite scrolling for a box |
|
|
66
|
+
| `@tectra-ng/utils/pagination` | `firstToPage`, `pageToFirst`, `pageCountOf`, `pageLinksOf`, `TxPaginationParams` — page math without the paginator component |
|
|
66
67
|
| `@tectra-ng/utils/random` | `pickRandom`, `pickRandomN`, `shuffle` |
|
|
67
68
|
| `@tectra-ng/utils/auto-focus` | `txAutoFocus` — focus a field or the first field inside after render |
|
|
68
69
|
| `@tectra-ng/utils/style-class` | `txStyleClass` — show, hide or toggle an element by classes with enter / leave animations |
|
|
@@ -31,7 +31,7 @@ var TxAutoFocus = class TxAutoFocus {
|
|
|
31
31
|
}
|
|
32
32
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
33
33
|
minVersion: "12.0.0",
|
|
34
|
-
version: "22.2.
|
|
34
|
+
version: "22.2.6",
|
|
35
35
|
ngImport: i0,
|
|
36
36
|
type: TxAutoFocus,
|
|
37
37
|
deps: [],
|
|
@@ -39,7 +39,7 @@ var TxAutoFocus = class TxAutoFocus {
|
|
|
39
39
|
});
|
|
40
40
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
41
41
|
minVersion: "17.1.0",
|
|
42
|
-
version: "22.2.
|
|
42
|
+
version: "22.2.6",
|
|
43
43
|
type: TxAutoFocus,
|
|
44
44
|
isStandalone: true,
|
|
45
45
|
selector: "[txAutoFocus]",
|
|
@@ -65,7 +65,7 @@ var TxAutoFocus = class TxAutoFocus {
|
|
|
65
65
|
};
|
|
66
66
|
i0.ɵɵngDeclareClassMetadata({
|
|
67
67
|
minVersion: "12.0.0",
|
|
68
|
-
version: "22.2.
|
|
68
|
+
version: "22.2.6",
|
|
69
69
|
ngImport: i0,
|
|
70
70
|
type: TxAutoFocus,
|
|
71
71
|
decorators: [{
|
|
@@ -25,7 +25,7 @@ var TxBreakpoints = class TxBreakpoints {
|
|
|
25
25
|
}
|
|
26
26
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
27
27
|
minVersion: "12.0.0",
|
|
28
|
-
version: "22.2.
|
|
28
|
+
version: "22.2.6",
|
|
29
29
|
ngImport: i0,
|
|
30
30
|
type: TxBreakpoints,
|
|
31
31
|
deps: [],
|
|
@@ -33,7 +33,7 @@ var TxBreakpoints = class TxBreakpoints {
|
|
|
33
33
|
});
|
|
34
34
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
35
35
|
minVersion: "12.0.0",
|
|
36
|
-
version: "22.2.
|
|
36
|
+
version: "22.2.6",
|
|
37
37
|
ngImport: i0,
|
|
38
38
|
type: TxBreakpoints,
|
|
39
39
|
providedIn: "root"
|
|
@@ -41,7 +41,7 @@ var TxBreakpoints = class TxBreakpoints {
|
|
|
41
41
|
};
|
|
42
42
|
i0.ɵɵngDeclareClassMetadata({
|
|
43
43
|
minVersion: "12.0.0",
|
|
44
|
-
version: "22.2.
|
|
44
|
+
version: "22.2.6",
|
|
45
45
|
ngImport: i0,
|
|
46
46
|
type: TxBreakpoints,
|
|
47
47
|
decorators: [{
|
|
@@ -49,7 +49,7 @@ var TxClipboard = class TxClipboard {
|
|
|
49
49
|
}
|
|
50
50
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
51
51
|
minVersion: "12.0.0",
|
|
52
|
-
version: "22.2.
|
|
52
|
+
version: "22.2.6",
|
|
53
53
|
ngImport: i0,
|
|
54
54
|
type: TxClipboard,
|
|
55
55
|
deps: [],
|
|
@@ -57,7 +57,7 @@ var TxClipboard = class TxClipboard {
|
|
|
57
57
|
});
|
|
58
58
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
59
59
|
minVersion: "12.0.0",
|
|
60
|
-
version: "22.2.
|
|
60
|
+
version: "22.2.6",
|
|
61
61
|
ngImport: i0,
|
|
62
62
|
type: TxClipboard,
|
|
63
63
|
providedIn: "root"
|
|
@@ -65,7 +65,7 @@ var TxClipboard = class TxClipboard {
|
|
|
65
65
|
};
|
|
66
66
|
i0.ɵɵngDeclareClassMetadata({
|
|
67
67
|
minVersion: "12.0.0",
|
|
68
|
-
version: "22.2.
|
|
68
|
+
version: "22.2.6",
|
|
69
69
|
ngImport: i0,
|
|
70
70
|
type: TxClipboard,
|
|
71
71
|
decorators: [{
|
|
@@ -114,7 +114,7 @@ var TxCopy = class TxCopy {
|
|
|
114
114
|
}
|
|
115
115
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
116
116
|
minVersion: "12.0.0",
|
|
117
|
-
version: "22.2.
|
|
117
|
+
version: "22.2.6",
|
|
118
118
|
ngImport: i0,
|
|
119
119
|
type: TxCopy,
|
|
120
120
|
deps: [],
|
|
@@ -122,7 +122,7 @@ var TxCopy = class TxCopy {
|
|
|
122
122
|
});
|
|
123
123
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
124
124
|
minVersion: "17.1.0",
|
|
125
|
-
version: "22.2.
|
|
125
|
+
version: "22.2.6",
|
|
126
126
|
type: TxCopy,
|
|
127
127
|
isStandalone: true,
|
|
128
128
|
selector: "[txCopy]",
|
|
@@ -171,7 +171,7 @@ var TxCopy = class TxCopy {
|
|
|
171
171
|
};
|
|
172
172
|
i0.ɵɵngDeclareClassMetadata({
|
|
173
173
|
minVersion: "12.0.0",
|
|
174
|
-
version: "22.2.
|
|
174
|
+
version: "22.2.6",
|
|
175
175
|
ngImport: i0,
|
|
176
176
|
type: TxCopy,
|
|
177
177
|
decorators: [{
|
|
@@ -29,7 +29,7 @@ var TxClock = class TxClock {
|
|
|
29
29
|
}
|
|
30
30
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
31
31
|
minVersion: "12.0.0",
|
|
32
|
-
version: "22.2.
|
|
32
|
+
version: "22.2.6",
|
|
33
33
|
ngImport: i0,
|
|
34
34
|
type: TxClock,
|
|
35
35
|
deps: [],
|
|
@@ -37,7 +37,7 @@ var TxClock = class TxClock {
|
|
|
37
37
|
});
|
|
38
38
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
39
39
|
minVersion: "12.0.0",
|
|
40
|
-
version: "22.2.
|
|
40
|
+
version: "22.2.6",
|
|
41
41
|
ngImport: i0,
|
|
42
42
|
type: TxClock,
|
|
43
43
|
providedIn: "root"
|
|
@@ -45,7 +45,7 @@ var TxClock = class TxClock {
|
|
|
45
45
|
};
|
|
46
46
|
i0.ɵɵngDeclareClassMetadata({
|
|
47
47
|
minVersion: "12.0.0",
|
|
48
|
-
version: "22.2.
|
|
48
|
+
version: "22.2.6",
|
|
49
49
|
ngImport: i0,
|
|
50
50
|
type: TxClock,
|
|
51
51
|
decorators: [{
|
|
@@ -29,7 +29,7 @@ var TxCurrencySymbolPipe = class TxCurrencySymbolPipe {
|
|
|
29
29
|
}
|
|
30
30
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
31
31
|
minVersion: "12.0.0",
|
|
32
|
-
version: "22.2.
|
|
32
|
+
version: "22.2.6",
|
|
33
33
|
ngImport: i0,
|
|
34
34
|
type: TxCurrencySymbolPipe,
|
|
35
35
|
deps: [],
|
|
@@ -37,7 +37,7 @@ var TxCurrencySymbolPipe = class TxCurrencySymbolPipe {
|
|
|
37
37
|
});
|
|
38
38
|
static ɵpipe = i0.ɵɵngDeclarePipe({
|
|
39
39
|
minVersion: "14.0.0",
|
|
40
|
-
version: "22.2.
|
|
40
|
+
version: "22.2.6",
|
|
41
41
|
ngImport: i0,
|
|
42
42
|
type: TxCurrencySymbolPipe,
|
|
43
43
|
isStandalone: true,
|
|
@@ -47,7 +47,7 @@ var TxCurrencySymbolPipe = class TxCurrencySymbolPipe {
|
|
|
47
47
|
};
|
|
48
48
|
i0.ɵɵngDeclareClassMetadata({
|
|
49
49
|
minVersion: "12.0.0",
|
|
50
|
-
version: "22.2.
|
|
50
|
+
version: "22.2.6",
|
|
51
51
|
ngImport: i0,
|
|
52
52
|
type: TxCurrencySymbolPipe,
|
|
53
53
|
decorators: [{
|
|
@@ -196,7 +196,7 @@ var TxDatePipe = class TxDatePipe {
|
|
|
196
196
|
}
|
|
197
197
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
198
198
|
minVersion: "12.0.0",
|
|
199
|
-
version: "22.2.
|
|
199
|
+
version: "22.2.6",
|
|
200
200
|
ngImport: i0,
|
|
201
201
|
type: TxDatePipe,
|
|
202
202
|
deps: [],
|
|
@@ -204,7 +204,7 @@ var TxDatePipe = class TxDatePipe {
|
|
|
204
204
|
});
|
|
205
205
|
static ɵpipe = i0.ɵɵngDeclarePipe({
|
|
206
206
|
minVersion: "14.0.0",
|
|
207
|
-
version: "22.2.
|
|
207
|
+
version: "22.2.6",
|
|
208
208
|
ngImport: i0,
|
|
209
209
|
type: TxDatePipe,
|
|
210
210
|
isStandalone: true,
|
|
@@ -214,7 +214,7 @@ var TxDatePipe = class TxDatePipe {
|
|
|
214
214
|
};
|
|
215
215
|
i0.ɵɵngDeclareClassMetadata({
|
|
216
216
|
minVersion: "12.0.0",
|
|
217
|
-
version: "22.2.
|
|
217
|
+
version: "22.2.6",
|
|
218
218
|
ngImport: i0,
|
|
219
219
|
type: TxDatePipe,
|
|
220
220
|
decorators: [{
|
|
@@ -231,7 +231,7 @@ var TxDateRangePipe = class TxDateRangePipe {
|
|
|
231
231
|
}
|
|
232
232
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
233
233
|
minVersion: "12.0.0",
|
|
234
|
-
version: "22.2.
|
|
234
|
+
version: "22.2.6",
|
|
235
235
|
ngImport: i0,
|
|
236
236
|
type: TxDateRangePipe,
|
|
237
237
|
deps: [],
|
|
@@ -239,7 +239,7 @@ var TxDateRangePipe = class TxDateRangePipe {
|
|
|
239
239
|
});
|
|
240
240
|
static ɵpipe = i0.ɵɵngDeclarePipe({
|
|
241
241
|
minVersion: "14.0.0",
|
|
242
|
-
version: "22.2.
|
|
242
|
+
version: "22.2.6",
|
|
243
243
|
ngImport: i0,
|
|
244
244
|
type: TxDateRangePipe,
|
|
245
245
|
isStandalone: true,
|
|
@@ -248,7 +248,7 @@ var TxDateRangePipe = class TxDateRangePipe {
|
|
|
248
248
|
};
|
|
249
249
|
i0.ɵɵngDeclareClassMetadata({
|
|
250
250
|
minVersion: "12.0.0",
|
|
251
|
-
version: "22.2.
|
|
251
|
+
version: "22.2.6",
|
|
252
252
|
ngImport: i0,
|
|
253
253
|
type: TxDateRangePipe,
|
|
254
254
|
decorators: [{
|
|
@@ -48,7 +48,7 @@ var TxDebounceInput = class TxDebounceInput {
|
|
|
48
48
|
}
|
|
49
49
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
50
50
|
minVersion: "12.0.0",
|
|
51
|
-
version: "22.2.
|
|
51
|
+
version: "22.2.6",
|
|
52
52
|
ngImport: i0,
|
|
53
53
|
type: TxDebounceInput,
|
|
54
54
|
deps: [],
|
|
@@ -56,7 +56,7 @@ var TxDebounceInput = class TxDebounceInput {
|
|
|
56
56
|
});
|
|
57
57
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
58
58
|
minVersion: "17.1.0",
|
|
59
|
-
version: "22.2.
|
|
59
|
+
version: "22.2.6",
|
|
60
60
|
type: TxDebounceInput,
|
|
61
61
|
isStandalone: true,
|
|
62
62
|
selector: "[txDebounceInput]",
|
|
@@ -97,7 +97,7 @@ var TxDebounceInput = class TxDebounceInput {
|
|
|
97
97
|
};
|
|
98
98
|
i0.ɵɵngDeclareClassMetadata({
|
|
99
99
|
minVersion: "12.0.0",
|
|
100
|
-
version: "22.2.
|
|
100
|
+
version: "22.2.6",
|
|
101
101
|
ngImport: i0,
|
|
102
102
|
type: TxDebounceInput,
|
|
103
103
|
decorators: [{
|
|
@@ -89,7 +89,7 @@ var TxDragScroll = class TxDragScroll {
|
|
|
89
89
|
}
|
|
90
90
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
91
91
|
minVersion: "12.0.0",
|
|
92
|
-
version: "22.2.
|
|
92
|
+
version: "22.2.6",
|
|
93
93
|
ngImport: i0,
|
|
94
94
|
type: TxDragScroll,
|
|
95
95
|
deps: [],
|
|
@@ -97,7 +97,7 @@ var TxDragScroll = class TxDragScroll {
|
|
|
97
97
|
});
|
|
98
98
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
99
99
|
minVersion: "17.1.0",
|
|
100
|
-
version: "22.2.
|
|
100
|
+
version: "22.2.6",
|
|
101
101
|
type: TxDragScroll,
|
|
102
102
|
isStandalone: true,
|
|
103
103
|
selector: "[txDragScroll]",
|
|
@@ -142,7 +142,7 @@ var TxDragScroll = class TxDragScroll {
|
|
|
142
142
|
};
|
|
143
143
|
i0.ɵɵngDeclareClassMetadata({
|
|
144
144
|
minVersion: "12.0.0",
|
|
145
|
-
version: "22.2.
|
|
145
|
+
version: "22.2.6",
|
|
146
146
|
ngImport: i0,
|
|
147
147
|
type: TxDragScroll,
|
|
148
148
|
decorators: [{
|
|
@@ -34,7 +34,7 @@ var TxFileSizePipe = class TxFileSizePipe {
|
|
|
34
34
|
}
|
|
35
35
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
36
36
|
minVersion: "12.0.0",
|
|
37
|
-
version: "22.2.
|
|
37
|
+
version: "22.2.6",
|
|
38
38
|
ngImport: i0,
|
|
39
39
|
type: TxFileSizePipe,
|
|
40
40
|
deps: [],
|
|
@@ -42,7 +42,7 @@ var TxFileSizePipe = class TxFileSizePipe {
|
|
|
42
42
|
});
|
|
43
43
|
static ɵpipe = i0.ɵɵngDeclarePipe({
|
|
44
44
|
minVersion: "14.0.0",
|
|
45
|
-
version: "22.2.
|
|
45
|
+
version: "22.2.6",
|
|
46
46
|
ngImport: i0,
|
|
47
47
|
type: TxFileSizePipe,
|
|
48
48
|
isStandalone: true,
|
|
@@ -52,7 +52,7 @@ var TxFileSizePipe = class TxFileSizePipe {
|
|
|
52
52
|
};
|
|
53
53
|
i0.ɵɵngDeclareClassMetadata({
|
|
54
54
|
minVersion: "12.0.0",
|
|
55
|
-
version: "22.2.
|
|
55
|
+
version: "22.2.6",
|
|
56
56
|
ngImport: i0,
|
|
57
57
|
type: TxFileSizePipe,
|
|
58
58
|
decorators: [{
|
|
@@ -186,7 +186,7 @@ var TxSaveFilters = class TxSaveFilters {
|
|
|
186
186
|
}
|
|
187
187
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
188
188
|
minVersion: "12.0.0",
|
|
189
|
-
version: "22.2.
|
|
189
|
+
version: "22.2.6",
|
|
190
190
|
ngImport: i0,
|
|
191
191
|
type: TxSaveFilters,
|
|
192
192
|
deps: [],
|
|
@@ -194,14 +194,14 @@ var TxSaveFilters = class TxSaveFilters {
|
|
|
194
194
|
});
|
|
195
195
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
196
196
|
minVersion: "12.0.0",
|
|
197
|
-
version: "22.2.
|
|
197
|
+
version: "22.2.6",
|
|
198
198
|
ngImport: i0,
|
|
199
199
|
type: TxSaveFilters
|
|
200
200
|
});
|
|
201
201
|
};
|
|
202
202
|
i0.ɵɵngDeclareClassMetadata({
|
|
203
203
|
minVersion: "12.0.0",
|
|
204
|
-
version: "22.2.
|
|
204
|
+
version: "22.2.6",
|
|
205
205
|
ngImport: i0,
|
|
206
206
|
type: TxSaveFilters,
|
|
207
207
|
decorators: [{ type: Injectable }]
|
|
@@ -217,7 +217,7 @@ var TxUrlFilters = class TxUrlFilters extends TxSaveFilters {
|
|
|
217
217
|
}
|
|
218
218
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
219
219
|
minVersion: "12.0.0",
|
|
220
|
-
version: "22.2.
|
|
220
|
+
version: "22.2.6",
|
|
221
221
|
ngImport: i0,
|
|
222
222
|
type: TxUrlFilters,
|
|
223
223
|
deps: null,
|
|
@@ -225,14 +225,14 @@ var TxUrlFilters = class TxUrlFilters extends TxSaveFilters {
|
|
|
225
225
|
});
|
|
226
226
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
227
227
|
minVersion: "12.0.0",
|
|
228
|
-
version: "22.2.
|
|
228
|
+
version: "22.2.6",
|
|
229
229
|
ngImport: i0,
|
|
230
230
|
type: TxUrlFilters
|
|
231
231
|
});
|
|
232
232
|
};
|
|
233
233
|
i0.ɵɵngDeclareClassMetadata({
|
|
234
234
|
minVersion: "12.0.0",
|
|
235
|
-
version: "22.2.
|
|
235
|
+
version: "22.2.6",
|
|
236
236
|
ngImport: i0,
|
|
237
237
|
type: TxUrlFilters,
|
|
238
238
|
decorators: [{ type: Injectable }]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import { Pipe } from "@angular/core";
|
|
3
|
-
import { matchesRule, resolveField } from "@tectra-ng/
|
|
3
|
+
import { matchesRule, resolveField } from "@tectra-ng/core/utils";
|
|
4
4
|
function normalizeSearch(value, locale) {
|
|
5
5
|
return String(value ?? "").normalize("NFD").replace(/\p{Diacritic}/gu, "").trim().toLocaleLowerCase(locale);
|
|
6
6
|
}
|
|
@@ -27,7 +27,7 @@ var TxSearchPipe = class TxSearchPipe {
|
|
|
27
27
|
}
|
|
28
28
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
29
29
|
minVersion: "12.0.0",
|
|
30
|
-
version: "22.2.
|
|
30
|
+
version: "22.2.6",
|
|
31
31
|
ngImport: i0,
|
|
32
32
|
type: TxSearchPipe,
|
|
33
33
|
deps: [],
|
|
@@ -35,7 +35,7 @@ var TxSearchPipe = class TxSearchPipe {
|
|
|
35
35
|
});
|
|
36
36
|
static ɵpipe = i0.ɵɵngDeclarePipe({
|
|
37
37
|
minVersion: "14.0.0",
|
|
38
|
-
version: "22.2.
|
|
38
|
+
version: "22.2.6",
|
|
39
39
|
ngImport: i0,
|
|
40
40
|
type: TxSearchPipe,
|
|
41
41
|
isStandalone: true,
|
|
@@ -44,7 +44,7 @@ var TxSearchPipe = class TxSearchPipe {
|
|
|
44
44
|
};
|
|
45
45
|
i0.ɵɵngDeclareClassMetadata({
|
|
46
46
|
minVersion: "12.0.0",
|
|
47
|
-
version: "22.2.
|
|
47
|
+
version: "22.2.6",
|
|
48
48
|
ngImport: i0,
|
|
49
49
|
type: TxSearchPipe,
|
|
50
50
|
decorators: [{
|
|
@@ -58,7 +58,7 @@ var TxFilterByPipe = class TxFilterByPipe {
|
|
|
58
58
|
}
|
|
59
59
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
60
60
|
minVersion: "12.0.0",
|
|
61
|
-
version: "22.2.
|
|
61
|
+
version: "22.2.6",
|
|
62
62
|
ngImport: i0,
|
|
63
63
|
type: TxFilterByPipe,
|
|
64
64
|
deps: [],
|
|
@@ -66,7 +66,7 @@ var TxFilterByPipe = class TxFilterByPipe {
|
|
|
66
66
|
});
|
|
67
67
|
static ɵpipe = i0.ɵɵngDeclarePipe({
|
|
68
68
|
minVersion: "14.0.0",
|
|
69
|
-
version: "22.2.
|
|
69
|
+
version: "22.2.6",
|
|
70
70
|
ngImport: i0,
|
|
71
71
|
type: TxFilterByPipe,
|
|
72
72
|
isStandalone: true,
|
|
@@ -75,7 +75,7 @@ var TxFilterByPipe = class TxFilterByPipe {
|
|
|
75
75
|
};
|
|
76
76
|
i0.ɵɵngDeclareClassMetadata({
|
|
77
77
|
minVersion: "12.0.0",
|
|
78
|
-
version: "22.2.
|
|
78
|
+
version: "22.2.6",
|
|
79
79
|
ngImport: i0,
|
|
80
80
|
type: TxFilterByPipe,
|
|
81
81
|
decorators: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tectra-ng-utils-filter.mjs","names":[],"sources":["../../../../packages/utils/filter/src/filter.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\nimport { TxFilterMatchMode, matchesRule, resolveField } from '@tectra-ng/
|
|
1
|
+
{"version":3,"file":"tectra-ng-utils-filter.mjs","names":[],"sources":["../../../../packages/utils/filter/src/filter.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\nimport { TxFilterMatchMode, matchesRule, resolveField } from '@tectra-ng/core/utils';\n\n/**\n * Own match rule for a filter: gets the value, the filter and the locale, returns whether the item\n * matches.\n */\nexport type TxMatchFunction = (value: unknown, filter: unknown, locale?: string) => boolean;\n/** Where to look for a value in an item: a list of field paths or a function that returns the values. */\nexport type TxFilterFields<T> = readonly string[] | ((item: T) => readonly unknown[]);\n\nexport { resolveField };\n\nexport function normalizeSearch(value: unknown, locale?: string): string {\n return String(value ?? '')\n .normalize('NFD')\n .replace(/\\p{Diacritic}/gu, '')\n .trim()\n .toLocaleLowerCase(locale);\n}\n\nfunction valuesOf<T>(item: T, fields: TxFilterFields<T>): readonly unknown[] {\n return typeof fields === 'function' ? fields(item) : fields.map((field) => resolveField(item, field));\n}\n\nexport function filterBySearch<T>(items: readonly T[], query: string | null | undefined, fields: TxFilterFields<T>, locale?: string): T[] {\n const needle = normalizeSearch(query, locale);\n if (!needle) {\n return [...items];\n }\n return items.filter((item) =>\n valuesOf(item, fields)\n .filter((value) => value !== null && value !== undefined && value !== '')\n .some((value) => normalizeSearch(value, locale).includes(needle)),\n );\n}\n\nexport function matches(value: unknown, filter: unknown, matchMode: TxFilterMatchMode | TxMatchFunction = 'contains', locale?: string): boolean {\n return typeof matchMode === 'function' ? matchMode(value, filter, locale) : matchesRule(value, { value: filter, matchMode }, locale);\n}\n\nexport function filterBy<T>(items: readonly T[], filter: unknown, fields: TxFilterFields<T>, matchMode: TxFilterMatchMode | TxMatchFunction = 'contains', locale?: string): T[] {\n return items.filter((item) => valuesOf(item, fields).some((value) => matches(value, filter, matchMode, locale)));\n}\n\n@Pipe({ name: 'txSearch' })\nexport class TxSearchPipe implements PipeTransform {\n transform<T>(items: readonly T[] | null | undefined, query: string | null | undefined, fields: TxFilterFields<T>): T[] {\n return filterBySearch(items ?? [], query, fields);\n }\n}\n\n@Pipe({ name: 'txFilterBy' })\nexport class TxFilterByPipe implements PipeTransform {\n transform<T>(items: readonly T[] | null | undefined, filter: unknown, fields: TxFilterFields<T>, matchMode: TxFilterMatchMode | TxMatchFunction = 'contains'): T[] {\n return filterBy(items ?? [], filter, fields, matchMode);\n }\n}\n"],"mappings":";;;AAaA,SAAgB,gBAAgB,OAAgB,QAAe;CAC7D,OAAO,OAAO,SAAS,EAAE,CAAC,CACvB,UAAU,KAAK,CAAC,CAChB,QAAQ,mBAAmB,EAAE,CAAC,CAC9B,KAAI,CAAE,CACN,kBAAkB,MAAM;AAC7B;AAEA,SAAS,SAAY,MAAS,QAAyB;CACrD,OAAO,OAAO,WAAW,aAAa,OAAO,IAAI,IAAI,OAAO,KAAK,UAAU,aAAa,MAAM,KAAK,CAAC;AACtG;AAEA,SAAgB,eAAkB,OAAqB,OAAkC,QAA2B,QAAe;CACjI,MAAM,SAAS,gBAAgB,OAAO,MAAM;CAC5C,IAAI,CAAC,QACH,OAAO,CAAC,GAAG,KAAK;CAElB,OAAO,MAAM,QAAQ,SACnB,SAAS,MAAM,MAAM,CAAC,CACnB,QAAQ,UAAU,UAAU,QAAQ,UAAU,UAAa,UAAU,EAAE,CAAC,CACxE,MAAM,UAAU,gBAAgB,OAAO,MAAM,CAAC,CAAC,SAAS,MAAM,CAAC,CAAC;AAEvE;AAEA,SAAgB,QAAQ,OAAgB,QAAiB,YAAiD,YAAY,QAAe;CACnI,OAAO,OAAO,cAAc,aAAa,UAAU,OAAO,QAAQ,MAAM,IAAI,YAAY,OAAO;EAAE,OAAO;EAAQ;CAAS,GAAI,MAAM;AACrI;AAEA,SAAgB,SAAY,OAAqB,QAAiB,QAA2B,YAAiD,YAAY,QAAe;CACvK,OAAO,MAAM,QAAQ,SAAS,SAAS,MAAM,MAAM,CAAC,CAAC,MAAM,UAAU,QAAQ,OAAO,QAAQ,WAAW,MAAM,CAAC,CAAC;AACjH;AAGA,IAAa,eAAb,MAAa,aAAY;CACvB,UAAa,OAAwC,OAAkC,QAAyB;EAC9G,OAAO,eAAe,SAAS,CAAA,GAAI,OAAO,MAAM;CAClD;CAHW,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAY,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAZ,OAAA,QAAA,GAAA,gBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAY,cAAA;EAAA,MAAA;CAAA,CAAA;;AAAZ,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAY,YAAA,CAAA;EADxB,MAAA;EAAK,MAAA,CAAA,EAAE,MAAM,WAAU,CAAE;;;AAQ1B,IAAa,iBAAb,MAAa,eAAc;CACzB,UAAa,OAAwC,QAAiB,QAA2B,YAAiD,YAAU;EAC1J,OAAO,SAAS,SAAS,CAAA,GAAI,QAAQ,QAAQ,SAAS;CACxD;CAHW,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAc,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAd,OAAA,QAAA,GAAA,gBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAc,cAAA;EAAA,MAAA;CAAA,CAAA;;AAAd,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAc,YAAA,CAAA;EAD1B,MAAA;EAAK,MAAA,CAAA,EAAE,MAAM,aAAY,CAAE"}
|
|
@@ -34,7 +34,7 @@ var TxFormChangeTracker = class TxFormChangeTracker {
|
|
|
34
34
|
}
|
|
35
35
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
36
36
|
minVersion: "12.0.0",
|
|
37
|
-
version: "22.2.
|
|
37
|
+
version: "22.2.6",
|
|
38
38
|
ngImport: i0,
|
|
39
39
|
type: TxFormChangeTracker,
|
|
40
40
|
deps: [],
|
|
@@ -42,14 +42,14 @@ var TxFormChangeTracker = class TxFormChangeTracker {
|
|
|
42
42
|
});
|
|
43
43
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
44
44
|
minVersion: "12.0.0",
|
|
45
|
-
version: "22.2.
|
|
45
|
+
version: "22.2.6",
|
|
46
46
|
ngImport: i0,
|
|
47
47
|
type: TxFormChangeTracker
|
|
48
48
|
});
|
|
49
49
|
};
|
|
50
50
|
i0.ɵɵngDeclareClassMetadata({
|
|
51
51
|
minVersion: "12.0.0",
|
|
52
|
-
version: "22.2.
|
|
52
|
+
version: "22.2.6",
|
|
53
53
|
ngImport: i0,
|
|
54
54
|
type: TxFormChangeTracker,
|
|
55
55
|
decorators: [{ type: Injectable }]
|
|
@@ -33,7 +33,7 @@ var TxFormValidation = class TxFormValidation {
|
|
|
33
33
|
}
|
|
34
34
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
35
35
|
minVersion: "12.0.0",
|
|
36
|
-
version: "22.2.
|
|
36
|
+
version: "22.2.6",
|
|
37
37
|
ngImport: i0,
|
|
38
38
|
type: TxFormValidation,
|
|
39
39
|
deps: [],
|
|
@@ -41,7 +41,7 @@ var TxFormValidation = class TxFormValidation {
|
|
|
41
41
|
});
|
|
42
42
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
43
43
|
minVersion: "12.0.0",
|
|
44
|
-
version: "22.2.
|
|
44
|
+
version: "22.2.6",
|
|
45
45
|
ngImport: i0,
|
|
46
46
|
type: TxFormValidation,
|
|
47
47
|
providedIn: "root"
|
|
@@ -49,7 +49,7 @@ var TxFormValidation = class TxFormValidation {
|
|
|
49
49
|
};
|
|
50
50
|
i0.ɵɵngDeclareClassMetadata({
|
|
51
51
|
minVersion: "12.0.0",
|
|
52
|
-
version: "22.2.
|
|
52
|
+
version: "22.2.6",
|
|
53
53
|
ngImport: i0,
|
|
54
54
|
type: TxFormValidation,
|
|
55
55
|
decorators: [{
|
|
@@ -82,7 +82,7 @@ var TxScrollToInvalid = class TxScrollToInvalid {
|
|
|
82
82
|
}
|
|
83
83
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
84
84
|
minVersion: "12.0.0",
|
|
85
|
-
version: "22.2.
|
|
85
|
+
version: "22.2.6",
|
|
86
86
|
ngImport: i0,
|
|
87
87
|
type: TxScrollToInvalid,
|
|
88
88
|
deps: [],
|
|
@@ -90,7 +90,7 @@ var TxScrollToInvalid = class TxScrollToInvalid {
|
|
|
90
90
|
});
|
|
91
91
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
92
92
|
minVersion: "17.1.0",
|
|
93
|
-
version: "22.2.
|
|
93
|
+
version: "22.2.6",
|
|
94
94
|
type: TxScrollToInvalid,
|
|
95
95
|
isStandalone: true,
|
|
96
96
|
selector: "form[txScrollToInvalid]",
|
|
@@ -120,7 +120,7 @@ var TxScrollToInvalid = class TxScrollToInvalid {
|
|
|
120
120
|
};
|
|
121
121
|
i0.ɵɵngDeclareClassMetadata({
|
|
122
122
|
minVersion: "12.0.0",
|
|
123
|
-
version: "22.2.
|
|
123
|
+
version: "22.2.6",
|
|
124
124
|
ngImport: i0,
|
|
125
125
|
type: TxScrollToInvalid,
|
|
126
126
|
decorators: [{
|
|
@@ -43,7 +43,7 @@ var TxGoBack = class TxGoBack {
|
|
|
43
43
|
}
|
|
44
44
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
45
45
|
minVersion: "12.0.0",
|
|
46
|
-
version: "22.2.
|
|
46
|
+
version: "22.2.6",
|
|
47
47
|
ngImport: i0,
|
|
48
48
|
type: TxGoBack,
|
|
49
49
|
deps: [],
|
|
@@ -51,7 +51,7 @@ var TxGoBack = class TxGoBack {
|
|
|
51
51
|
});
|
|
52
52
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
53
53
|
minVersion: "17.1.0",
|
|
54
|
-
version: "22.2.
|
|
54
|
+
version: "22.2.6",
|
|
55
55
|
type: TxGoBack,
|
|
56
56
|
isStandalone: true,
|
|
57
57
|
selector: "[txGoBack]",
|
|
@@ -80,7 +80,7 @@ var TxGoBack = class TxGoBack {
|
|
|
80
80
|
};
|
|
81
81
|
i0.ɵɵngDeclareClassMetadata({
|
|
82
82
|
minVersion: "12.0.0",
|
|
83
|
-
version: "22.2.
|
|
83
|
+
version: "22.2.6",
|
|
84
84
|
ngImport: i0,
|
|
85
85
|
type: TxGoBack,
|
|
86
86
|
decorators: [{
|
|
@@ -92,7 +92,7 @@ var TxHttpStatusTonePipe = class TxHttpStatusTonePipe {
|
|
|
92
92
|
}
|
|
93
93
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
94
94
|
minVersion: "12.0.0",
|
|
95
|
-
version: "22.2.
|
|
95
|
+
version: "22.2.6",
|
|
96
96
|
ngImport: i0,
|
|
97
97
|
type: TxHttpStatusTonePipe,
|
|
98
98
|
deps: [],
|
|
@@ -100,7 +100,7 @@ var TxHttpStatusTonePipe = class TxHttpStatusTonePipe {
|
|
|
100
100
|
});
|
|
101
101
|
static ɵpipe = i0.ɵɵngDeclarePipe({
|
|
102
102
|
minVersion: "14.0.0",
|
|
103
|
-
version: "22.2.
|
|
103
|
+
version: "22.2.6",
|
|
104
104
|
ngImport: i0,
|
|
105
105
|
type: TxHttpStatusTonePipe,
|
|
106
106
|
isStandalone: true,
|
|
@@ -109,7 +109,7 @@ var TxHttpStatusTonePipe = class TxHttpStatusTonePipe {
|
|
|
109
109
|
};
|
|
110
110
|
i0.ɵɵngDeclareClassMetadata({
|
|
111
111
|
minVersion: "12.0.0",
|
|
112
|
-
version: "22.2.
|
|
112
|
+
version: "22.2.6",
|
|
113
113
|
ngImport: i0,
|
|
114
114
|
type: TxHttpStatusTonePipe,
|
|
115
115
|
decorators: [{
|
|
@@ -123,7 +123,7 @@ var TxHttpStatusGroupPipe = class TxHttpStatusGroupPipe {
|
|
|
123
123
|
}
|
|
124
124
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
125
125
|
minVersion: "12.0.0",
|
|
126
|
-
version: "22.2.
|
|
126
|
+
version: "22.2.6",
|
|
127
127
|
ngImport: i0,
|
|
128
128
|
type: TxHttpStatusGroupPipe,
|
|
129
129
|
deps: [],
|
|
@@ -131,7 +131,7 @@ var TxHttpStatusGroupPipe = class TxHttpStatusGroupPipe {
|
|
|
131
131
|
});
|
|
132
132
|
static ɵpipe = i0.ɵɵngDeclarePipe({
|
|
133
133
|
minVersion: "14.0.0",
|
|
134
|
-
version: "22.2.
|
|
134
|
+
version: "22.2.6",
|
|
135
135
|
ngImport: i0,
|
|
136
136
|
type: TxHttpStatusGroupPipe,
|
|
137
137
|
isStandalone: true,
|
|
@@ -140,7 +140,7 @@ var TxHttpStatusGroupPipe = class TxHttpStatusGroupPipe {
|
|
|
140
140
|
};
|
|
141
141
|
i0.ɵɵngDeclareClassMetadata({
|
|
142
142
|
minVersion: "12.0.0",
|
|
143
|
-
version: "22.2.
|
|
143
|
+
version: "22.2.6",
|
|
144
144
|
ngImport: i0,
|
|
145
145
|
type: TxHttpStatusGroupPipe,
|
|
146
146
|
decorators: [{
|
|
@@ -155,7 +155,7 @@ var TxHttpStatusLabelPipe = class TxHttpStatusLabelPipe {
|
|
|
155
155
|
}
|
|
156
156
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
157
157
|
minVersion: "12.0.0",
|
|
158
|
-
version: "22.2.
|
|
158
|
+
version: "22.2.6",
|
|
159
159
|
ngImport: i0,
|
|
160
160
|
type: TxHttpStatusLabelPipe,
|
|
161
161
|
deps: [],
|
|
@@ -163,7 +163,7 @@ var TxHttpStatusLabelPipe = class TxHttpStatusLabelPipe {
|
|
|
163
163
|
});
|
|
164
164
|
static ɵpipe = i0.ɵɵngDeclarePipe({
|
|
165
165
|
minVersion: "14.0.0",
|
|
166
|
-
version: "22.2.
|
|
166
|
+
version: "22.2.6",
|
|
167
167
|
ngImport: i0,
|
|
168
168
|
type: TxHttpStatusLabelPipe,
|
|
169
169
|
isStandalone: true,
|
|
@@ -173,7 +173,7 @@ var TxHttpStatusLabelPipe = class TxHttpStatusLabelPipe {
|
|
|
173
173
|
};
|
|
174
174
|
i0.ɵɵngDeclareClassMetadata({
|
|
175
175
|
minVersion: "12.0.0",
|
|
176
|
-
version: "22.2.
|
|
176
|
+
version: "22.2.6",
|
|
177
177
|
ngImport: i0,
|
|
178
178
|
type: TxHttpStatusLabelPipe,
|
|
179
179
|
decorators: [{
|
|
@@ -51,7 +51,7 @@ var TxInView = class TxInView {
|
|
|
51
51
|
}
|
|
52
52
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
53
53
|
minVersion: "12.0.0",
|
|
54
|
-
version: "22.2.
|
|
54
|
+
version: "22.2.6",
|
|
55
55
|
ngImport: i0,
|
|
56
56
|
type: TxInView,
|
|
57
57
|
deps: [],
|
|
@@ -59,7 +59,7 @@ var TxInView = class TxInView {
|
|
|
59
59
|
});
|
|
60
60
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
61
61
|
minVersion: "17.1.0",
|
|
62
|
-
version: "22.2.
|
|
62
|
+
version: "22.2.6",
|
|
63
63
|
type: TxInView,
|
|
64
64
|
isStandalone: true,
|
|
65
65
|
selector: "[txInView]",
|
|
@@ -111,7 +111,7 @@ var TxInView = class TxInView {
|
|
|
111
111
|
};
|
|
112
112
|
i0.ɵɵngDeclareClassMetadata({
|
|
113
113
|
minVersion: "12.0.0",
|
|
114
|
-
version: "22.2.
|
|
114
|
+
version: "22.2.6",
|
|
115
115
|
ngImport: i0,
|
|
116
116
|
type: TxInView,
|
|
117
117
|
decorators: [{
|
|
@@ -223,7 +223,7 @@ var TxVisibleOnScroll = class TxVisibleOnScroll {
|
|
|
223
223
|
}
|
|
224
224
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
225
225
|
minVersion: "12.0.0",
|
|
226
|
-
version: "22.2.
|
|
226
|
+
version: "22.2.6",
|
|
227
227
|
ngImport: i0,
|
|
228
228
|
type: TxVisibleOnScroll,
|
|
229
229
|
deps: [],
|
|
@@ -231,7 +231,7 @@ var TxVisibleOnScroll = class TxVisibleOnScroll {
|
|
|
231
231
|
});
|
|
232
232
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
233
233
|
minVersion: "17.1.0",
|
|
234
|
-
version: "22.2.
|
|
234
|
+
version: "22.2.6",
|
|
235
235
|
type: TxVisibleOnScroll,
|
|
236
236
|
isStandalone: true,
|
|
237
237
|
selector: "[txVisibleOnScroll]",
|
|
@@ -258,7 +258,7 @@ var TxVisibleOnScroll = class TxVisibleOnScroll {
|
|
|
258
258
|
};
|
|
259
259
|
i0.ɵɵngDeclareClassMetadata({
|
|
260
260
|
minVersion: "12.0.0",
|
|
261
|
-
version: "22.2.
|
|
261
|
+
version: "22.2.6",
|
|
262
262
|
ngImport: i0,
|
|
263
263
|
type: TxVisibleOnScroll,
|
|
264
264
|
decorators: [{
|
|
@@ -29,7 +29,7 @@ var TxNumberPipe = class TxNumberPipe {
|
|
|
29
29
|
}
|
|
30
30
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
31
31
|
minVersion: "12.0.0",
|
|
32
|
-
version: "22.2.
|
|
32
|
+
version: "22.2.6",
|
|
33
33
|
ngImport: i0,
|
|
34
34
|
type: TxNumberPipe,
|
|
35
35
|
deps: [],
|
|
@@ -37,7 +37,7 @@ var TxNumberPipe = class TxNumberPipe {
|
|
|
37
37
|
});
|
|
38
38
|
static ɵpipe = i0.ɵɵngDeclarePipe({
|
|
39
39
|
minVersion: "14.0.0",
|
|
40
|
-
version: "22.2.
|
|
40
|
+
version: "22.2.6",
|
|
41
41
|
ngImport: i0,
|
|
42
42
|
type: TxNumberPipe,
|
|
43
43
|
isStandalone: true,
|
|
@@ -47,7 +47,7 @@ var TxNumberPipe = class TxNumberPipe {
|
|
|
47
47
|
};
|
|
48
48
|
i0.ɵɵngDeclareClassMetadata({
|
|
49
49
|
minVersion: "12.0.0",
|
|
50
|
-
version: "22.2.
|
|
50
|
+
version: "22.2.6",
|
|
51
51
|
ngImport: i0,
|
|
52
52
|
type: TxNumberPipe,
|
|
53
53
|
decorators: [{
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { firstToPage, pageCountOf, pageLinksOf, pageToFirst } from "@tectra-ng/core/utils";
|
|
@@ -28,7 +28,7 @@ var TxPluralFormPipe = class TxPluralFormPipe {
|
|
|
28
28
|
}
|
|
29
29
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
30
30
|
minVersion: "12.0.0",
|
|
31
|
-
version: "22.2.
|
|
31
|
+
version: "22.2.6",
|
|
32
32
|
ngImport: i0,
|
|
33
33
|
type: TxPluralFormPipe,
|
|
34
34
|
deps: [],
|
|
@@ -36,7 +36,7 @@ var TxPluralFormPipe = class TxPluralFormPipe {
|
|
|
36
36
|
});
|
|
37
37
|
static ɵpipe = i0.ɵɵngDeclarePipe({
|
|
38
38
|
minVersion: "14.0.0",
|
|
39
|
-
version: "22.2.
|
|
39
|
+
version: "22.2.6",
|
|
40
40
|
ngImport: i0,
|
|
41
41
|
type: TxPluralFormPipe,
|
|
42
42
|
isStandalone: true,
|
|
@@ -46,7 +46,7 @@ var TxPluralFormPipe = class TxPluralFormPipe {
|
|
|
46
46
|
};
|
|
47
47
|
i0.ɵɵngDeclareClassMetadata({
|
|
48
48
|
minVersion: "12.0.0",
|
|
49
|
-
version: "22.2.
|
|
49
|
+
version: "22.2.6",
|
|
50
50
|
ngImport: i0,
|
|
51
51
|
type: TxPluralFormPipe,
|
|
52
52
|
decorators: [{
|
|
@@ -64,7 +64,7 @@ var TxPluralPipe = class TxPluralPipe {
|
|
|
64
64
|
}
|
|
65
65
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
66
66
|
minVersion: "12.0.0",
|
|
67
|
-
version: "22.2.
|
|
67
|
+
version: "22.2.6",
|
|
68
68
|
ngImport: i0,
|
|
69
69
|
type: TxPluralPipe,
|
|
70
70
|
deps: [],
|
|
@@ -72,7 +72,7 @@ var TxPluralPipe = class TxPluralPipe {
|
|
|
72
72
|
});
|
|
73
73
|
static ɵpipe = i0.ɵɵngDeclarePipe({
|
|
74
74
|
minVersion: "14.0.0",
|
|
75
|
-
version: "22.2.
|
|
75
|
+
version: "22.2.6",
|
|
76
76
|
ngImport: i0,
|
|
77
77
|
type: TxPluralPipe,
|
|
78
78
|
isStandalone: true,
|
|
@@ -82,7 +82,7 @@ var TxPluralPipe = class TxPluralPipe {
|
|
|
82
82
|
};
|
|
83
83
|
i0.ɵɵngDeclareClassMetadata({
|
|
84
84
|
minVersion: "12.0.0",
|
|
85
|
-
version: "22.2.
|
|
85
|
+
version: "22.2.6",
|
|
86
86
|
ngImport: i0,
|
|
87
87
|
type: TxPluralPipe,
|
|
88
88
|
decorators: [{
|
|
@@ -53,7 +53,7 @@ var TxRelativeTimePipe = class TxRelativeTimePipe {
|
|
|
53
53
|
}
|
|
54
54
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
55
55
|
minVersion: "12.0.0",
|
|
56
|
-
version: "22.2.
|
|
56
|
+
version: "22.2.6",
|
|
57
57
|
ngImport: i0,
|
|
58
58
|
type: TxRelativeTimePipe,
|
|
59
59
|
deps: [],
|
|
@@ -61,7 +61,7 @@ var TxRelativeTimePipe = class TxRelativeTimePipe {
|
|
|
61
61
|
});
|
|
62
62
|
static ɵpipe = i0.ɵɵngDeclarePipe({
|
|
63
63
|
minVersion: "14.0.0",
|
|
64
|
-
version: "22.2.
|
|
64
|
+
version: "22.2.6",
|
|
65
65
|
ngImport: i0,
|
|
66
66
|
type: TxRelativeTimePipe,
|
|
67
67
|
isStandalone: true,
|
|
@@ -71,7 +71,7 @@ var TxRelativeTimePipe = class TxRelativeTimePipe {
|
|
|
71
71
|
};
|
|
72
72
|
i0.ɵɵngDeclareClassMetadata({
|
|
73
73
|
minVersion: "12.0.0",
|
|
74
|
-
version: "22.2.
|
|
74
|
+
version: "22.2.6",
|
|
75
75
|
ngImport: i0,
|
|
76
76
|
type: TxRelativeTimePipe,
|
|
77
77
|
decorators: [{
|
|
@@ -31,7 +31,7 @@ var TxScrollEnd = class TxScrollEnd {
|
|
|
31
31
|
}
|
|
32
32
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
33
33
|
minVersion: "12.0.0",
|
|
34
|
-
version: "22.2.
|
|
34
|
+
version: "22.2.6",
|
|
35
35
|
ngImport: i0,
|
|
36
36
|
type: TxScrollEnd,
|
|
37
37
|
deps: [],
|
|
@@ -39,7 +39,7 @@ var TxScrollEnd = class TxScrollEnd {
|
|
|
39
39
|
});
|
|
40
40
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
41
41
|
minVersion: "17.1.0",
|
|
42
|
-
version: "22.2.
|
|
42
|
+
version: "22.2.6",
|
|
43
43
|
type: TxScrollEnd,
|
|
44
44
|
isStandalone: true,
|
|
45
45
|
selector: "[txScrollEnd]",
|
|
@@ -81,7 +81,7 @@ var TxScrollEnd = class TxScrollEnd {
|
|
|
81
81
|
};
|
|
82
82
|
i0.ɵɵngDeclareClassMetadata({
|
|
83
83
|
minVersion: "12.0.0",
|
|
84
|
-
version: "22.2.
|
|
84
|
+
version: "22.2.6",
|
|
85
85
|
ngImport: i0,
|
|
86
86
|
type: TxScrollEnd,
|
|
87
87
|
decorators: [{
|
|
@@ -27,7 +27,7 @@ var TxStopPropagation = class TxStopPropagation {
|
|
|
27
27
|
}
|
|
28
28
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
29
29
|
minVersion: "12.0.0",
|
|
30
|
-
version: "22.2.
|
|
30
|
+
version: "22.2.6",
|
|
31
31
|
ngImport: i0,
|
|
32
32
|
type: TxStopPropagation,
|
|
33
33
|
deps: [],
|
|
@@ -35,7 +35,7 @@ var TxStopPropagation = class TxStopPropagation {
|
|
|
35
35
|
});
|
|
36
36
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
37
37
|
minVersion: "17.1.0",
|
|
38
|
-
version: "22.2.
|
|
38
|
+
version: "22.2.6",
|
|
39
39
|
type: TxStopPropagation,
|
|
40
40
|
isStandalone: true,
|
|
41
41
|
selector: "[txStopPropagation]",
|
|
@@ -60,7 +60,7 @@ var TxStopPropagation = class TxStopPropagation {
|
|
|
60
60
|
};
|
|
61
61
|
i0.ɵɵngDeclareClassMetadata({
|
|
62
62
|
minVersion: "12.0.0",
|
|
63
|
-
version: "22.2.
|
|
63
|
+
version: "22.2.6",
|
|
64
64
|
ngImport: i0,
|
|
65
65
|
type: TxStopPropagation,
|
|
66
66
|
decorators: [{
|
|
@@ -138,7 +138,7 @@ var TxStyleClass = class TxStyleClass {
|
|
|
138
138
|
}
|
|
139
139
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
140
140
|
minVersion: "12.0.0",
|
|
141
|
-
version: "22.2.
|
|
141
|
+
version: "22.2.6",
|
|
142
142
|
ngImport: i0,
|
|
143
143
|
type: TxStyleClass,
|
|
144
144
|
deps: [],
|
|
@@ -146,7 +146,7 @@ var TxStyleClass = class TxStyleClass {
|
|
|
146
146
|
});
|
|
147
147
|
static ɵdir = i0.ɵɵngDeclareDirective({
|
|
148
148
|
minVersion: "17.1.0",
|
|
149
|
-
version: "22.2.
|
|
149
|
+
version: "22.2.6",
|
|
150
150
|
type: TxStyleClass,
|
|
151
151
|
isStandalone: true,
|
|
152
152
|
selector: "[txStyleClass]",
|
|
@@ -239,7 +239,7 @@ var TxStyleClass = class TxStyleClass {
|
|
|
239
239
|
};
|
|
240
240
|
i0.ɵɵngDeclareClassMetadata({
|
|
241
241
|
minVersion: "12.0.0",
|
|
242
|
-
version: "22.2.
|
|
242
|
+
version: "22.2.6",
|
|
243
243
|
ngImport: i0,
|
|
244
244
|
type: TxStyleClass,
|
|
245
245
|
decorators: [{
|
|
@@ -81,7 +81,7 @@ var TxTruncatePipe = class TxTruncatePipe {
|
|
|
81
81
|
}
|
|
82
82
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
83
83
|
minVersion: "12.0.0",
|
|
84
|
-
version: "22.2.
|
|
84
|
+
version: "22.2.6",
|
|
85
85
|
ngImport: i0,
|
|
86
86
|
type: TxTruncatePipe,
|
|
87
87
|
deps: [],
|
|
@@ -89,7 +89,7 @@ var TxTruncatePipe = class TxTruncatePipe {
|
|
|
89
89
|
});
|
|
90
90
|
static ɵpipe = i0.ɵɵngDeclarePipe({
|
|
91
91
|
minVersion: "14.0.0",
|
|
92
|
-
version: "22.2.
|
|
92
|
+
version: "22.2.6",
|
|
93
93
|
ngImport: i0,
|
|
94
94
|
type: TxTruncatePipe,
|
|
95
95
|
isStandalone: true,
|
|
@@ -98,7 +98,7 @@ var TxTruncatePipe = class TxTruncatePipe {
|
|
|
98
98
|
};
|
|
99
99
|
i0.ɵɵngDeclareClassMetadata({
|
|
100
100
|
minVersion: "12.0.0",
|
|
101
|
-
version: "22.2.
|
|
101
|
+
version: "22.2.6",
|
|
102
102
|
ngImport: i0,
|
|
103
103
|
type: TxTruncatePipe,
|
|
104
104
|
decorators: [{
|
|
@@ -112,7 +112,7 @@ var TxCapitalizePipe = class TxCapitalizePipe {
|
|
|
112
112
|
}
|
|
113
113
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
114
114
|
minVersion: "12.0.0",
|
|
115
|
-
version: "22.2.
|
|
115
|
+
version: "22.2.6",
|
|
116
116
|
ngImport: i0,
|
|
117
117
|
type: TxCapitalizePipe,
|
|
118
118
|
deps: [],
|
|
@@ -120,7 +120,7 @@ var TxCapitalizePipe = class TxCapitalizePipe {
|
|
|
120
120
|
});
|
|
121
121
|
static ɵpipe = i0.ɵɵngDeclarePipe({
|
|
122
122
|
minVersion: "14.0.0",
|
|
123
|
-
version: "22.2.
|
|
123
|
+
version: "22.2.6",
|
|
124
124
|
ngImport: i0,
|
|
125
125
|
type: TxCapitalizePipe,
|
|
126
126
|
isStandalone: true,
|
|
@@ -129,7 +129,7 @@ var TxCapitalizePipe = class TxCapitalizePipe {
|
|
|
129
129
|
};
|
|
130
130
|
i0.ɵɵngDeclareClassMetadata({
|
|
131
131
|
minVersion: "12.0.0",
|
|
132
|
-
version: "22.2.
|
|
132
|
+
version: "22.2.6",
|
|
133
133
|
ngImport: i0,
|
|
134
134
|
type: TxCapitalizePipe,
|
|
135
135
|
decorators: [{
|
|
@@ -143,7 +143,7 @@ var TxHttpPrefixPipe = class TxHttpPrefixPipe {
|
|
|
143
143
|
}
|
|
144
144
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
145
145
|
minVersion: "12.0.0",
|
|
146
|
-
version: "22.2.
|
|
146
|
+
version: "22.2.6",
|
|
147
147
|
ngImport: i0,
|
|
148
148
|
type: TxHttpPrefixPipe,
|
|
149
149
|
deps: [],
|
|
@@ -151,7 +151,7 @@ var TxHttpPrefixPipe = class TxHttpPrefixPipe {
|
|
|
151
151
|
});
|
|
152
152
|
static ɵpipe = i0.ɵɵngDeclarePipe({
|
|
153
153
|
minVersion: "14.0.0",
|
|
154
|
-
version: "22.2.
|
|
154
|
+
version: "22.2.6",
|
|
155
155
|
ngImport: i0,
|
|
156
156
|
type: TxHttpPrefixPipe,
|
|
157
157
|
isStandalone: true,
|
|
@@ -160,7 +160,7 @@ var TxHttpPrefixPipe = class TxHttpPrefixPipe {
|
|
|
160
160
|
};
|
|
161
161
|
i0.ɵɵngDeclareClassMetadata({
|
|
162
162
|
minVersion: "12.0.0",
|
|
163
|
-
version: "22.2.
|
|
163
|
+
version: "22.2.6",
|
|
164
164
|
ngImport: i0,
|
|
165
165
|
type: TxHttpPrefixPipe,
|
|
166
166
|
decorators: [{
|
|
@@ -39,7 +39,7 @@ var TxTitle = class TxTitle {
|
|
|
39
39
|
}
|
|
40
40
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
41
41
|
minVersion: "12.0.0",
|
|
42
|
-
version: "22.2.
|
|
42
|
+
version: "22.2.6",
|
|
43
43
|
ngImport: i0,
|
|
44
44
|
type: TxTitle,
|
|
45
45
|
deps: [],
|
|
@@ -47,14 +47,14 @@ var TxTitle = class TxTitle {
|
|
|
47
47
|
});
|
|
48
48
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
49
49
|
minVersion: "12.0.0",
|
|
50
|
-
version: "22.2.
|
|
50
|
+
version: "22.2.6",
|
|
51
51
|
ngImport: i0,
|
|
52
52
|
type: TxTitle
|
|
53
53
|
});
|
|
54
54
|
};
|
|
55
55
|
i0.ɵɵngDeclareClassMetadata({
|
|
56
56
|
minVersion: "12.0.0",
|
|
57
|
-
version: "22.2.
|
|
57
|
+
version: "22.2.6",
|
|
58
58
|
ngImport: i0,
|
|
59
59
|
type: TxTitle,
|
|
60
60
|
decorators: [{ type: Injectable }],
|
|
@@ -67,7 +67,7 @@ var TxTitleStrategy = class TxTitleStrategy extends TitleStrategy {
|
|
|
67
67
|
}
|
|
68
68
|
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
69
69
|
minVersion: "12.0.0",
|
|
70
|
-
version: "22.2.
|
|
70
|
+
version: "22.2.6",
|
|
71
71
|
ngImport: i0,
|
|
72
72
|
type: TxTitleStrategy,
|
|
73
73
|
deps: null,
|
|
@@ -75,14 +75,14 @@ var TxTitleStrategy = class TxTitleStrategy extends TitleStrategy {
|
|
|
75
75
|
});
|
|
76
76
|
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
77
77
|
minVersion: "12.0.0",
|
|
78
|
-
version: "22.2.
|
|
78
|
+
version: "22.2.6",
|
|
79
79
|
ngImport: i0,
|
|
80
80
|
type: TxTitleStrategy
|
|
81
81
|
});
|
|
82
82
|
};
|
|
83
83
|
i0.ɵɵngDeclareClassMetadata({
|
|
84
84
|
minVersion: "12.0.0",
|
|
85
|
-
version: "22.2.
|
|
85
|
+
version: "22.2.6",
|
|
86
86
|
ngImport: i0,
|
|
87
87
|
type: TxTitleStrategy,
|
|
88
88
|
decorators: [{ type: Injectable }]
|
package/file/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# File
|
|
2
2
|
|
|
3
|
-
File sizes people can read — `512
|
|
3
|
+
File sizes people can read — `512 bytes`, `1.5 kB`, `5 MB`, with the number format and unit names of the locale — and downloads of a URL or a `Blob` from code (CSV built in the browser, a signed link from an API). Downloads do nothing on the server.
|
|
4
4
|
|
|
5
5
|
```html
|
|
6
6
|
{{ file.size | txFileSize }}
|
package/http/README.md
CHANGED
|
@@ -23,7 +23,7 @@ this.http.get<Page<Order>>('/api/orders', { params: buildHttpParams(filters) }).
|
|
|
23
23
|
## Pipes
|
|
24
24
|
| Name | Description |
|
|
25
25
|
|---|---|
|
|
26
|
-
| txHttpStatusTone: warnCodes? | Severity for `tx-tag`, `tx-status-icon`, `tx-badge` |
|
|
26
|
+
| txHttpStatusTone: warnCodes? | Severity for `tx-tag`, `tx-pill` (`tone`), `tx-status-icon`, `tx-badge` |
|
|
27
27
|
| txHttpStatusLabel: warnCodes? | Translated group name: OK, Redirect, Client error, Server error, Warning, No response, Unknown |
|
|
28
28
|
| txHttpStatusGroup: warnCodes? | The group as a key, for your own texts |
|
|
29
29
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tectra-ng/utils",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"description": "Angular utilities on signals next to the tectra components: date, number, relative time, plural, file size and currency pipes; debounced input, copy to clipboard, in view, defer, drag scroll and auto focus directives; form validators and scroll to the first invalid field; filters kept in storage and the URL; HTTP params, retries and polling; clock, page title, router scrolling and breakpoints. Server rendering safe.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://tectra-ng.com/components/date",
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
"@angular/platform-browser": "^22.2.0",
|
|
35
35
|
"@angular/router": "^22.2.0",
|
|
36
36
|
"rxjs": "^7.8.0",
|
|
37
|
-
"@tectra-ng/core": "^0.4.
|
|
38
|
-
"@tectra-ng/icons": "^0.4.
|
|
39
|
-
"@tectra-ng/themes": "^0.4.
|
|
40
|
-
"@tectra-ng/ui": "^0.4.
|
|
37
|
+
"@tectra-ng/core": "^0.4.4",
|
|
38
|
+
"@tectra-ng/icons": "^0.4.4",
|
|
39
|
+
"@tectra-ng/themes": "^0.4.4",
|
|
40
|
+
"@tectra-ng/ui": "^0.4.4"
|
|
41
41
|
},
|
|
42
42
|
"peerDependenciesMeta": {
|
|
43
43
|
"@angular/forms": {
|
|
@@ -131,6 +131,10 @@
|
|
|
131
131
|
"types": "./types/tectra-ng-utils-number.d.ts",
|
|
132
132
|
"default": "./fesm2022/tectra-ng-utils-number.mjs"
|
|
133
133
|
},
|
|
134
|
+
"./pagination": {
|
|
135
|
+
"types": "./types/tectra-ng-utils-pagination.d.ts",
|
|
136
|
+
"default": "./fesm2022/tectra-ng-utils-pagination.mjs"
|
|
137
|
+
},
|
|
134
138
|
"./plural": {
|
|
135
139
|
"types": "./types/tectra-ng-utils-plural.d.ts",
|
|
136
140
|
"default": "./fesm2022/tectra-ng-utils-plural.mjs"
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Pagination
|
|
2
|
+
|
|
3
|
+
Page math for paginated lists and requests without the paginator component: convert between a zero-based page and the index of its first row, count pages, pick the page links around the current page. `TxPaginationParams` is the shape of a paginated request or response (`page` is 1-based, `limit` is the page size, `total` the number of records). `@tectra-ng/ui/paginator` exports the same functions.
|
|
4
|
+
|
|
5
|
+
## Functions
|
|
6
|
+
| Name | Description |
|
|
7
|
+
|---|---|
|
|
8
|
+
| firstToPage(first, rows) | Zero-based page of the row at index `first`; `0` when `rows` is `0` |
|
|
9
|
+
| pageToFirst(page, rows) | Index of the first row of a zero-based page |
|
|
10
|
+
| pageCountOf(totalRecords, rows) | Number of pages; `0` without records, `1` when `rows` is `0` |
|
|
11
|
+
| pageLinksOf(page, pageCount, linkSize) | Zero-based pages to show as links, the current one centred |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
import { PipeTransform } from "@angular/core";
|
|
3
|
-
import { TxFilterMatchMode, resolveField } from "@tectra-ng/
|
|
3
|
+
import { TxFilterMatchMode, resolveField } from "@tectra-ng/core/utils";
|
|
4
4
|
/**
|
|
5
5
|
* Own match rule for a filter: gets the value, the filter and the locale, returns whether the item
|
|
6
6
|
* matches.
|
|
@@ -89,7 +89,7 @@ export declare function httpStatusGroup(status: number | null | undefined, warnC
|
|
|
89
89
|
*/
|
|
90
90
|
export declare function httpStatusTone(status: number | null | undefined, warnCodes?: readonly number[]): TxHttpStatusTone;
|
|
91
91
|
/**
|
|
92
|
-
* Severity for `tx-tag`, `tx-status-icon`, `tx-badge`
|
|
92
|
+
* Severity for `tx-tag`, `tx-pill` (`tone`), `tx-status-icon`, `tx-badge`
|
|
93
93
|
* @see https://tectra-ng.com/components/http
|
|
94
94
|
*/
|
|
95
95
|
export declare class TxHttpStatusTonePipe implements PipeTransform {
|