@tectra-ng/utils 0.0.1 → 0.2.1
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/LICENSE +21 -0
- package/README.md +40 -1
- package/auto-focus/README.md +19 -0
- package/breakpoint/README.md +23 -0
- package/clipboard/README.md +37 -0
- package/clock/README.md +21 -0
- package/currency/README.md +17 -0
- package/date/README.md +46 -0
- package/debounce-input/README.md +31 -0
- package/drag-scroll/README.md +25 -0
- package/fesm2022/tectra-ng-utils-auto-focus.mjs +100 -0
- package/fesm2022/tectra-ng-utils-auto-focus.mjs.map +1 -0
- package/fesm2022/tectra-ng-utils-breakpoint.mjs +54 -0
- package/fesm2022/tectra-ng-utils-breakpoint.mjs.map +1 -0
- package/fesm2022/tectra-ng-utils-clipboard.mjs +225 -0
- package/fesm2022/tectra-ng-utils-clipboard.mjs.map +1 -0
- package/fesm2022/tectra-ng-utils-clock.mjs +59 -0
- package/fesm2022/tectra-ng-utils-clock.mjs.map +1 -0
- package/fesm2022/tectra-ng-utils-currency.mjs +63 -0
- package/fesm2022/tectra-ng-utils-currency.mjs.map +1 -0
- package/fesm2022/tectra-ng-utils-date.mjs +200 -0
- package/fesm2022/tectra-ng-utils-date.mjs.map +1 -0
- package/fesm2022/tectra-ng-utils-debounce-input.mjs +156 -0
- package/fesm2022/tectra-ng-utils-debounce-input.mjs.map +1 -0
- package/fesm2022/tectra-ng-utils-drag-scroll.mjs +199 -0
- package/fesm2022/tectra-ng-utils-drag-scroll.mjs.map +1 -0
- package/fesm2022/tectra-ng-utils-file.mjs +78 -0
- package/fesm2022/tectra-ng-utils-file.mjs.map +1 -0
- package/fesm2022/tectra-ng-utils-filter-state.mjs +238 -0
- package/fesm2022/tectra-ng-utils-filter-state.mjs.map +1 -0
- package/fesm2022/tectra-ng-utils-filter.mjs +88 -0
- package/fesm2022/tectra-ng-utils-filter.mjs.map +1 -0
- package/fesm2022/tectra-ng-utils-form-changes.mjs +70 -0
- package/fesm2022/tectra-ng-utils-form-changes.mjs.map +1 -0
- package/fesm2022/tectra-ng-utils-form-validation.mjs +162 -0
- package/fesm2022/tectra-ng-utils-form-validation.mjs.map +1 -0
- package/fesm2022/tectra-ng-utils-go-back.mjs +117 -0
- package/fesm2022/tectra-ng-utils-go-back.mjs.map +1 -0
- package/fesm2022/tectra-ng-utils-http.mjs +189 -0
- package/fesm2022/tectra-ng-utils-http.mjs.map +1 -0
- package/fesm2022/tectra-ng-utils-in-view.mjs +297 -0
- package/fesm2022/tectra-ng-utils-in-view.mjs.map +1 -0
- package/fesm2022/tectra-ng-utils-plural.mjs +98 -0
- package/fesm2022/tectra-ng-utils-plural.mjs.map +1 -0
- package/fesm2022/tectra-ng-utils-polling.mjs +109 -0
- package/fesm2022/tectra-ng-utils-polling.mjs.map +1 -0
- package/fesm2022/tectra-ng-utils-random.mjs +20 -0
- package/fesm2022/tectra-ng-utils-random.mjs.map +1 -0
- package/fesm2022/tectra-ng-utils-relative-time.mjs +87 -0
- package/fesm2022/tectra-ng-utils-relative-time.mjs.map +1 -0
- package/fesm2022/tectra-ng-utils-scroll-end.mjs +136 -0
- package/fesm2022/tectra-ng-utils-scroll-end.mjs.map +1 -0
- package/fesm2022/tectra-ng-utils-selection.mjs +52 -0
- package/fesm2022/tectra-ng-utils-selection.mjs.map +1 -0
- package/fesm2022/tectra-ng-utils-stop-propagation.mjs +92 -0
- package/fesm2022/tectra-ng-utils-stop-propagation.mjs.map +1 -0
- package/fesm2022/tectra-ng-utils-stream.mjs +30 -0
- package/fesm2022/tectra-ng-utils-stream.mjs.map +1 -0
- package/fesm2022/tectra-ng-utils-style-class.mjs +350 -0
- package/fesm2022/tectra-ng-utils-style-class.mjs.map +1 -0
- package/fesm2022/tectra-ng-utils-text.mjs +173 -0
- package/fesm2022/tectra-ng-utils-text.mjs.map +1 -0
- package/fesm2022/tectra-ng-utils-title.mjs +99 -0
- package/fesm2022/tectra-ng-utils-title.mjs.map +1 -0
- package/fesm2022/tectra-ng-utils-validators.mjs +232 -0
- package/fesm2022/tectra-ng-utils-validators.mjs.map +1 -0
- package/fesm2022/tectra-ng-utils.mjs +4 -0
- package/fesm2022/tectra-ng-utils.mjs.map +1 -0
- package/file/README.md +19 -0
- package/filter/README.md +22 -0
- package/filter-state/README.md +36 -0
- package/form-changes/README.md +26 -0
- package/form-validation/README.md +40 -0
- package/go-back/README.md +28 -0
- package/http/README.md +34 -0
- package/in-view/README.md +34 -0
- package/package.json +173 -3
- package/plural/README.md +21 -0
- package/polling/README.md +34 -0
- package/random/README.md +10 -0
- package/relative-time/README.md +29 -0
- package/scroll-end/README.md +25 -0
- package/selection/README.md +24 -0
- package/stop-propagation/README.md +15 -0
- package/stream/README.md +14 -0
- package/style-class/README.md +34 -0
- package/text/README.md +25 -0
- package/title/README.md +26 -0
- package/types/tectra-ng-utils-auto-focus.d.ts +22 -0
- package/types/tectra-ng-utils-auto-focus.d.ts.map +1 -0
- package/types/tectra-ng-utils-breakpoint.d.ts +15 -0
- package/types/tectra-ng-utils-breakpoint.d.ts.map +1 -0
- package/types/tectra-ng-utils-clipboard.d.ts +48 -0
- package/types/tectra-ng-utils-clipboard.d.ts.map +1 -0
- package/types/tectra-ng-utils-clock.d.ts +18 -0
- package/types/tectra-ng-utils-clock.d.ts.map +1 -0
- package/types/tectra-ng-utils-currency.d.ts +11 -0
- package/types/tectra-ng-utils-currency.d.ts.map +1 -0
- package/types/tectra-ng-utils-date.d.ts +65 -0
- package/types/tectra-ng-utils-date.d.ts.map +1 -0
- package/types/tectra-ng-utils-debounce-input.d.ts +38 -0
- package/types/tectra-ng-utils-debounce-input.d.ts.map +1 -0
- package/types/tectra-ng-utils-drag-scroll.d.ts +41 -0
- package/types/tectra-ng-utils-drag-scroll.d.ts.map +1 -0
- package/types/tectra-ng-utils-file.d.ts +18 -0
- package/types/tectra-ng-utils-file.d.ts.map +1 -0
- package/types/tectra-ng-utils-filter-state.d.ts +55 -0
- package/types/tectra-ng-utils-filter-state.d.ts.map +1 -0
- package/types/tectra-ng-utils-filter.d.ts +21 -0
- package/types/tectra-ng-utils-filter.d.ts.map +1 -0
- package/types/tectra-ng-utils-form-changes.d.ts +22 -0
- package/types/tectra-ng-utils-form-changes.d.ts.map +1 -0
- package/types/tectra-ng-utils-form-validation.d.ts +45 -0
- package/types/tectra-ng-utils-form-validation.d.ts.map +1 -0
- package/types/tectra-ng-utils-go-back.d.ts +25 -0
- package/types/tectra-ng-utils-go-back.d.ts.map +1 -0
- package/types/tectra-ng-utils-http.d.ts +47 -0
- package/types/tectra-ng-utils-http.d.ts.map +1 -0
- package/types/tectra-ng-utils-in-view.d.ts +80 -0
- package/types/tectra-ng-utils-in-view.d.ts.map +1 -0
- package/types/tectra-ng-utils-plural.d.ts +21 -0
- package/types/tectra-ng-utils-plural.d.ts.map +1 -0
- package/types/tectra-ng-utils-polling.d.ts +61 -0
- package/types/tectra-ng-utils-polling.d.ts.map +1 -0
- package/types/tectra-ng-utils-random.d.ts +4 -0
- package/types/tectra-ng-utils-random.d.ts.map +1 -0
- package/types/tectra-ng-utils-relative-time.d.ts +22 -0
- package/types/tectra-ng-utils-relative-time.d.ts.map +1 -0
- package/types/tectra-ng-utils-scroll-end.d.ts +38 -0
- package/types/tectra-ng-utils-scroll-end.d.ts.map +1 -0
- package/types/tectra-ng-utils-selection.d.ts +21 -0
- package/types/tectra-ng-utils-selection.d.ts.map +1 -0
- package/types/tectra-ng-utils-stop-propagation.d.ts +22 -0
- package/types/tectra-ng-utils-stop-propagation.d.ts.map +1 -0
- package/types/tectra-ng-utils-stream.d.ts +3 -0
- package/types/tectra-ng-utils-stream.d.ts.map +1 -0
- package/types/tectra-ng-utils-style-class.d.ts +91 -0
- package/types/tectra-ng-utils-style-class.d.ts.map +1 -0
- package/types/tectra-ng-utils-text.d.ts +26 -0
- package/types/tectra-ng-utils-text.d.ts.map +1 -0
- package/types/tectra-ng-utils-title.d.ts +31 -0
- package/types/tectra-ng-utils-title.d.ts.map +1 -0
- package/types/tectra-ng-utils-validators.d.ts +67 -0
- package/types/tectra-ng-utils-validators.d.ts.map +1 -0
- package/types/tectra-ng-utils.d.ts +2 -0
- package/types/tectra-ng-utils.d.ts.map +1 -0
- package/validators/README.md +42 -0
package/package.json
CHANGED
|
@@ -1,14 +1,184 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tectra-ng/utils",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"description": "Angular utilities on signals next to the tectra components: date, 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 and breakpoints. Server rendering safe.",
|
|
5
5
|
"license": "MIT",
|
|
6
|
+
"homepage": "https://tectra-ng.com/components/date",
|
|
6
7
|
"repository": {
|
|
7
8
|
"type": "git",
|
|
8
9
|
"url": "git+https://github.com/kulakovskyi/tectra-ng.git",
|
|
9
10
|
"directory": "packages/utils"
|
|
10
11
|
},
|
|
12
|
+
"bugs": "https://github.com/kulakovskyi/tectra-ng/issues",
|
|
13
|
+
"keywords": [
|
|
14
|
+
"tectra",
|
|
15
|
+
"angular",
|
|
16
|
+
"angular-utils",
|
|
17
|
+
"utilities",
|
|
18
|
+
"pipes",
|
|
19
|
+
"directives",
|
|
20
|
+
"validators",
|
|
21
|
+
"date-pipe",
|
|
22
|
+
"relative-time",
|
|
23
|
+
"clipboard",
|
|
24
|
+
"debounce",
|
|
25
|
+
"polling",
|
|
26
|
+
"intersection-observer",
|
|
27
|
+
"ssr",
|
|
28
|
+
"signals"
|
|
29
|
+
],
|
|
30
|
+
"peerDependencies": {
|
|
31
|
+
"@angular/common": "^22.0.0",
|
|
32
|
+
"@angular/core": "^22.0.0",
|
|
33
|
+
"@angular/forms": "^22.0.0",
|
|
34
|
+
"@angular/platform-browser": "^22.0.0",
|
|
35
|
+
"@angular/router": "^22.0.0",
|
|
36
|
+
"rxjs": "^7.8.0",
|
|
37
|
+
"@tectra-ng/core": "^0.2.1",
|
|
38
|
+
"@tectra-ng/icons": "^0.2.1",
|
|
39
|
+
"@tectra-ng/themes": "^0.2.1",
|
|
40
|
+
"@tectra-ng/ui": "^0.2.1"
|
|
41
|
+
},
|
|
42
|
+
"peerDependenciesMeta": {
|
|
43
|
+
"@angular/forms": {
|
|
44
|
+
"optional": true
|
|
45
|
+
},
|
|
46
|
+
"@angular/platform-browser": {
|
|
47
|
+
"optional": true
|
|
48
|
+
},
|
|
49
|
+
"@angular/router": {
|
|
50
|
+
"optional": true
|
|
51
|
+
}
|
|
52
|
+
},
|
|
11
53
|
"publishConfig": {
|
|
12
54
|
"access": "public"
|
|
55
|
+
},
|
|
56
|
+
"module": "fesm2022/tectra-ng-utils.mjs",
|
|
57
|
+
"typings": "types/tectra-ng-utils.d.ts",
|
|
58
|
+
"exports": {
|
|
59
|
+
"./package.json": {
|
|
60
|
+
"default": "./package.json"
|
|
61
|
+
},
|
|
62
|
+
".": {
|
|
63
|
+
"types": "./types/tectra-ng-utils.d.ts",
|
|
64
|
+
"default": "./fesm2022/tectra-ng-utils.mjs"
|
|
65
|
+
},
|
|
66
|
+
"./auto-focus": {
|
|
67
|
+
"types": "./types/tectra-ng-utils-auto-focus.d.ts",
|
|
68
|
+
"default": "./fesm2022/tectra-ng-utils-auto-focus.mjs"
|
|
69
|
+
},
|
|
70
|
+
"./breakpoint": {
|
|
71
|
+
"types": "./types/tectra-ng-utils-breakpoint.d.ts",
|
|
72
|
+
"default": "./fesm2022/tectra-ng-utils-breakpoint.mjs"
|
|
73
|
+
},
|
|
74
|
+
"./clipboard": {
|
|
75
|
+
"types": "./types/tectra-ng-utils-clipboard.d.ts",
|
|
76
|
+
"default": "./fesm2022/tectra-ng-utils-clipboard.mjs"
|
|
77
|
+
},
|
|
78
|
+
"./clock": {
|
|
79
|
+
"types": "./types/tectra-ng-utils-clock.d.ts",
|
|
80
|
+
"default": "./fesm2022/tectra-ng-utils-clock.mjs"
|
|
81
|
+
},
|
|
82
|
+
"./currency": {
|
|
83
|
+
"types": "./types/tectra-ng-utils-currency.d.ts",
|
|
84
|
+
"default": "./fesm2022/tectra-ng-utils-currency.mjs"
|
|
85
|
+
},
|
|
86
|
+
"./date": {
|
|
87
|
+
"types": "./types/tectra-ng-utils-date.d.ts",
|
|
88
|
+
"default": "./fesm2022/tectra-ng-utils-date.mjs"
|
|
89
|
+
},
|
|
90
|
+
"./debounce-input": {
|
|
91
|
+
"types": "./types/tectra-ng-utils-debounce-input.d.ts",
|
|
92
|
+
"default": "./fesm2022/tectra-ng-utils-debounce-input.mjs"
|
|
93
|
+
},
|
|
94
|
+
"./drag-scroll": {
|
|
95
|
+
"types": "./types/tectra-ng-utils-drag-scroll.d.ts",
|
|
96
|
+
"default": "./fesm2022/tectra-ng-utils-drag-scroll.mjs"
|
|
97
|
+
},
|
|
98
|
+
"./file": {
|
|
99
|
+
"types": "./types/tectra-ng-utils-file.d.ts",
|
|
100
|
+
"default": "./fesm2022/tectra-ng-utils-file.mjs"
|
|
101
|
+
},
|
|
102
|
+
"./filter": {
|
|
103
|
+
"types": "./types/tectra-ng-utils-filter.d.ts",
|
|
104
|
+
"default": "./fesm2022/tectra-ng-utils-filter.mjs"
|
|
105
|
+
},
|
|
106
|
+
"./filter-state": {
|
|
107
|
+
"types": "./types/tectra-ng-utils-filter-state.d.ts",
|
|
108
|
+
"default": "./fesm2022/tectra-ng-utils-filter-state.mjs"
|
|
109
|
+
},
|
|
110
|
+
"./form-changes": {
|
|
111
|
+
"types": "./types/tectra-ng-utils-form-changes.d.ts",
|
|
112
|
+
"default": "./fesm2022/tectra-ng-utils-form-changes.mjs"
|
|
113
|
+
},
|
|
114
|
+
"./form-validation": {
|
|
115
|
+
"types": "./types/tectra-ng-utils-form-validation.d.ts",
|
|
116
|
+
"default": "./fesm2022/tectra-ng-utils-form-validation.mjs"
|
|
117
|
+
},
|
|
118
|
+
"./go-back": {
|
|
119
|
+
"types": "./types/tectra-ng-utils-go-back.d.ts",
|
|
120
|
+
"default": "./fesm2022/tectra-ng-utils-go-back.mjs"
|
|
121
|
+
},
|
|
122
|
+
"./http": {
|
|
123
|
+
"types": "./types/tectra-ng-utils-http.d.ts",
|
|
124
|
+
"default": "./fesm2022/tectra-ng-utils-http.mjs"
|
|
125
|
+
},
|
|
126
|
+
"./in-view": {
|
|
127
|
+
"types": "./types/tectra-ng-utils-in-view.d.ts",
|
|
128
|
+
"default": "./fesm2022/tectra-ng-utils-in-view.mjs"
|
|
129
|
+
},
|
|
130
|
+
"./plural": {
|
|
131
|
+
"types": "./types/tectra-ng-utils-plural.d.ts",
|
|
132
|
+
"default": "./fesm2022/tectra-ng-utils-plural.mjs"
|
|
133
|
+
},
|
|
134
|
+
"./polling": {
|
|
135
|
+
"types": "./types/tectra-ng-utils-polling.d.ts",
|
|
136
|
+
"default": "./fesm2022/tectra-ng-utils-polling.mjs"
|
|
137
|
+
},
|
|
138
|
+
"./random": {
|
|
139
|
+
"types": "./types/tectra-ng-utils-random.d.ts",
|
|
140
|
+
"default": "./fesm2022/tectra-ng-utils-random.mjs"
|
|
141
|
+
},
|
|
142
|
+
"./relative-time": {
|
|
143
|
+
"types": "./types/tectra-ng-utils-relative-time.d.ts",
|
|
144
|
+
"default": "./fesm2022/tectra-ng-utils-relative-time.mjs"
|
|
145
|
+
},
|
|
146
|
+
"./scroll-end": {
|
|
147
|
+
"types": "./types/tectra-ng-utils-scroll-end.d.ts",
|
|
148
|
+
"default": "./fesm2022/tectra-ng-utils-scroll-end.mjs"
|
|
149
|
+
},
|
|
150
|
+
"./selection": {
|
|
151
|
+
"types": "./types/tectra-ng-utils-selection.d.ts",
|
|
152
|
+
"default": "./fesm2022/tectra-ng-utils-selection.mjs"
|
|
153
|
+
},
|
|
154
|
+
"./stop-propagation": {
|
|
155
|
+
"types": "./types/tectra-ng-utils-stop-propagation.d.ts",
|
|
156
|
+
"default": "./fesm2022/tectra-ng-utils-stop-propagation.mjs"
|
|
157
|
+
},
|
|
158
|
+
"./stream": {
|
|
159
|
+
"types": "./types/tectra-ng-utils-stream.d.ts",
|
|
160
|
+
"default": "./fesm2022/tectra-ng-utils-stream.mjs"
|
|
161
|
+
},
|
|
162
|
+
"./style-class": {
|
|
163
|
+
"types": "./types/tectra-ng-utils-style-class.d.ts",
|
|
164
|
+
"default": "./fesm2022/tectra-ng-utils-style-class.mjs"
|
|
165
|
+
},
|
|
166
|
+
"./text": {
|
|
167
|
+
"types": "./types/tectra-ng-utils-text.d.ts",
|
|
168
|
+
"default": "./fesm2022/tectra-ng-utils-text.mjs"
|
|
169
|
+
},
|
|
170
|
+
"./title": {
|
|
171
|
+
"types": "./types/tectra-ng-utils-title.d.ts",
|
|
172
|
+
"default": "./fesm2022/tectra-ng-utils-title.mjs"
|
|
173
|
+
},
|
|
174
|
+
"./validators": {
|
|
175
|
+
"types": "./types/tectra-ng-utils-validators.d.ts",
|
|
176
|
+
"default": "./fesm2022/tectra-ng-utils-validators.mjs"
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
"sideEffects": false,
|
|
180
|
+
"type": "module",
|
|
181
|
+
"dependencies": {
|
|
182
|
+
"tslib": "^2.3.0"
|
|
13
183
|
}
|
|
14
|
-
}
|
|
184
|
+
}
|
package/plural/README.md
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# Plural
|
|
2
|
+
|
|
3
|
+
Plural forms by the language rules. `txPluralForm` turns a count into `one`, `few` or `many` — the suffix of a translation key (`files.one`, `files.few`, `files.many`); `txPlural` picks the text itself from a message or a map of forms. Both follow the tectra locale, also when it changes at runtime.
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
{{ ('files.' + (count | txPluralForm)) | translate: { count } }}
|
|
7
|
+
{{ count | txPlural: '{count, plural, one {# file} other {# files}}' }}
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Pipes
|
|
11
|
+
| Name | Description |
|
|
12
|
+
|---|---|
|
|
13
|
+
| txPluralForm: locale? | `one`, `few` or `many` for a count (`Intl.PluralRules`: `one` and `few` as they are, every other category is `many`); the tectra locale unless a locale is given |
|
|
14
|
+
| txPlural: forms, locale? | The text for a count: an ICU message (`{count, plural, =0 {none} one {# file} other {# files}}`) or a map `{ '=0', one, few, many, other }`; `#` is the count |
|
|
15
|
+
|
|
16
|
+
## Functions
|
|
17
|
+
| Name | Description |
|
|
18
|
+
|---|---|
|
|
19
|
+
| pluralForm(count, locale?) | The function behind `txPluralForm`; `en-US` by default |
|
|
20
|
+
| pluralCategory(count, locale?) | The full category: `zero`, `one`, `two`, `few`, `many` or `other` |
|
|
21
|
+
| plural(count, forms, locale?) | The function behind `txPlural` |
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Polling
|
|
2
|
+
|
|
3
|
+
Asks the server again until a long job is done — an export, an import, a deployment — or refreshes a view on a timer. Waits longer between tries (2 s growing to 15 s by default), pauses while the tab is hidden, retries network hiccups and 429 / 5xx answers, and never runs two requests at once. On the server it makes the first request only and starts no timer.
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
poll({
|
|
7
|
+
request: () => this.http.get<Export>(`/api/exports/${id}`),
|
|
8
|
+
isActive: (job) => job.status === 'running',
|
|
9
|
+
}).subscribe((job) => this.job.set(job));
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## Functions
|
|
13
|
+
| Name | Description |
|
|
14
|
+
|---|---|
|
|
15
|
+
| poll({ request, isActive, delay?, maxAttempts?, retry?, skipErrors?, pauseWhenHidden?, initial? }) | Emits every answer while `isActive(answer)` is true, then completes. `delay` — ms or `{ startMs, factor, maxMs }` (`TX_POLL_DEFAULT_DELAY`); `retry` — options of `retryHttpReads` or `false`; `skipErrors` keeps polling after a failed try; `initial` — a value you already have, so the first request waits for the delay |
|
|
16
|
+
| refreshEvery({ request, delay, when?, immediate?, pauseWhenHidden?, skipErrors? }) | Runs `request` every `delay` ms while `when()` is true, skipping a tick while the previous request still runs; errors are skipped by default |
|
|
17
|
+
| pollDelay(delay, attempt) | The wait before an attempt |
|
|
18
|
+
| isPageHidden() / waitUntilVisible() | Tab visibility helpers |
|
|
19
|
+
| toPollingError(error) | `{ status, message }` from an `HttpErrorResponse` (`message` from `error.error` or `error.message` of the body) |
|
|
20
|
+
|
|
21
|
+
## Methods
|
|
22
|
+
| Name | Description |
|
|
23
|
+
|---|---|
|
|
24
|
+
| new TxPoller(config) | A poller with state for a page: `config` is the `poll` options with `request({ params, attempt })` |
|
|
25
|
+
| isLoading / isPolling / error | Signals: waiting for the first answer, polling, the last error (`TxPollingError`) |
|
|
26
|
+
| watch(params) | Starts polling for these params (stops the previous run); subscribe to get the answers |
|
|
27
|
+
| restart() | Polls again from the first request with the same params |
|
|
28
|
+
| stop() | Stops and clears the error |
|
|
29
|
+
|
|
30
|
+
## Constants
|
|
31
|
+
| Name | Description |
|
|
32
|
+
|---|---|
|
|
33
|
+
| TX_POLL_DEFAULT_DELAY | `{ startMs: 2000, factor: 1.5, maxMs: 15000 }` |
|
|
34
|
+
| TX_POLL_SLOW_DELAY | `{ startMs: 5000, factor: 1.5, maxMs: 30000 }` |
|
package/random/README.md
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Random
|
|
2
|
+
|
|
3
|
+
Pick one or several different items from a list — tips, sample data, avatars for a placeholder — or shuffle it. Pass your own random function for repeatable results in tests.
|
|
4
|
+
|
|
5
|
+
## Functions
|
|
6
|
+
| Name | Description |
|
|
7
|
+
|---|---|
|
|
8
|
+
| pickRandom(items, random?) | One item, or `null` for an empty list |
|
|
9
|
+
| pickRandomN(items, count, random?) | Up to `count` different items |
|
|
10
|
+
| shuffle(items, random?) | A shuffled copy; the input stays as it is |
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Relative Time
|
|
2
|
+
|
|
3
|
+
"5 minutes ago", "yesterday", "in 3 days" — a date said relative to now through `Intl.RelativeTimeFormat` in the tectra locale. Within a day it counts seconds, minutes and hours; past midnight it counts calendar days, then months and years.
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
{{ comment.createdAt | txRelativeTime }}
|
|
7
|
+
{{ task.due | txRelativeTime: { granularity: 'day' } }}
|
|
8
|
+
{{ event.at | txRelativeTime: { now: clock.now() } }} <!-- updates every second with TxClock -->
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Pipes
|
|
12
|
+
| Name | Description |
|
|
13
|
+
|---|---|
|
|
14
|
+
| txRelativeTime: options? | The text for a `Date`, ISO string or timestamp; `''` when empty or invalid. Follows the tectra locale |
|
|
15
|
+
|
|
16
|
+
## Options
|
|
17
|
+
| Name | Description |
|
|
18
|
+
|---|---|
|
|
19
|
+
| locale | An Intl locale instead of the tectra one |
|
|
20
|
+
| now | The moment to compare with; `Date.now()` by default. Pass a ticking signal value to keep the text fresh |
|
|
21
|
+
| granularity | `time` (default) — seconds, minutes, hours within the same day; `day` — only today, yesterday, in 3 days … |
|
|
22
|
+
| largestUnit | `year` (default), `month` or `day` — "45 days ago" instead of "last month" |
|
|
23
|
+
| numeric | `auto` (default) — "yesterday", "now"; `always` — "1 day ago", "20 seconds ago" |
|
|
24
|
+
| style | `long` (default), `short` or `narrow` — "5 min. ago" |
|
|
25
|
+
|
|
26
|
+
## Functions
|
|
27
|
+
| Name | Description |
|
|
28
|
+
|---|---|
|
|
29
|
+
| relativeTime(value, options?) | The function behind the pipe; `en-US` unless `locale` is given |
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Scroll End
|
|
2
|
+
|
|
3
|
+
Infinite scrolling for a box: asks for the next page when the user scrolls near the end, once per page — it waits until new content makes the box taller — and stops when everything is loaded.
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<div class="list" txScrollEnd [currentCount]="items().length" [maxLimit]="total()" (scrolledToBottom)="loadMore()">…</div>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Inputs
|
|
10
|
+
| Name | Description |
|
|
11
|
+
|---|---|
|
|
12
|
+
| offset | Distance from the end in px that counts as the end |
|
|
13
|
+
| currentCount | How many items are loaded |
|
|
14
|
+
| maxLimit | How many there are; no more requests once `currentCount` reaches it |
|
|
15
|
+
| disabled | Stops asking, e.g. while a page loads |
|
|
16
|
+
|
|
17
|
+
## Outputs
|
|
18
|
+
| Name | Description |
|
|
19
|
+
|---|---|
|
|
20
|
+
| scrolledToBottom | Time to load the next page |
|
|
21
|
+
|
|
22
|
+
## Methods
|
|
23
|
+
| Name | Description |
|
|
24
|
+
|---|---|
|
|
25
|
+
| reset() | Forget the last height — after replacing the list with a shorter one (`exportAs: 'txScrollEnd'`) |
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Selection
|
|
2
|
+
|
|
3
|
+
Checked rows of a list or a table by key, in a signal: one, a filtered part or all, with the state of a header checkbox (all, some, none). Keys survive paging and filtering, so a selection made on one page stays when the user goes to the next.
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
readonly selection = new TxSelection<Order>((order) => order.id);
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
```html
|
|
10
|
+
<tx-checkbox [binary]="true" [ngModel]="selection.areAllSelected(page())" [indeterminate]="selection.isPartial(page())" (ngModelChange)="selection.toggleAll(page(), $event)" />
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Methods
|
|
14
|
+
| Name | Description |
|
|
15
|
+
|---|---|
|
|
16
|
+
| selectedIds / count | Signals of the selected keys and their number |
|
|
17
|
+
| toggleOne(idOrItem, checked?) | Checks or unchecks one; flips it without `checked` |
|
|
18
|
+
| toggleAll(items, checked?) | All of these items; flips them as a group without `checked` |
|
|
19
|
+
| select(predicate, items, checked) | Every item that passes the predicate |
|
|
20
|
+
| isSelected(idOrItem) | One item is checked |
|
|
21
|
+
| areAllSelected(items) / areAllSelectedWithPredicate(items, predicate) | Every item (that passes the predicate) is checked; `false` for an empty list |
|
|
22
|
+
| isPartial(items) | Some but not all — the indeterminate header checkbox |
|
|
23
|
+
| selectedItems(items) | The checked items among these |
|
|
24
|
+
| setSelected(ids) / clear() | Replaces or empties the selection |
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Stop Propagation
|
|
2
|
+
|
|
3
|
+
Keeps a click (or other events) inside an element — a menu button in a clickable card or table row, a link inside an expandable header. Optionally prevents the default action too.
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<tx-card (click)="open(project)">
|
|
7
|
+
<button txButton icon="ellipsis-v" aria-label="Actions" txStopPropagation (click)="menu.toggle($event)"></button>
|
|
8
|
+
</tx-card>
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Inputs
|
|
12
|
+
| Name | Description |
|
|
13
|
+
|---|---|
|
|
14
|
+
| txStopPropagation | Events to stop: `click` by default, or a list (`"click keydown"`) |
|
|
15
|
+
| preventDefault | Also prevent the default action |
|
package/stream/README.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Stream
|
|
2
|
+
|
|
3
|
+
Reads a streamed text answer — an AI reply, a long log, server-sent text — piece by piece as it arrives, so the page can show it while it is still coming. Letters split between two network chunks are joined correctly.
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
const response = await fetch('/api/assistant', { method: 'POST', body });
|
|
7
|
+
await readTextStream(response, (_, text) => this.answer.set(text));
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Functions
|
|
11
|
+
| Name | Description |
|
|
12
|
+
|---|---|
|
|
13
|
+
| readTextStream(response, onChunk) | Calls `onChunk(chunk, textSoFar)` for every piece and resolves to the whole text |
|
|
14
|
+
| textChunks(response) | The same as an async iterator: `for await (const chunk of textChunks(response))` |
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Style Class
|
|
2
|
+
|
|
3
|
+
Shows, hides or toggles another element by classes from a button, with enter and leave animations — small menus, collapsible sections, a mobile nav — without writing a component. The target is the next or previous sibling, the parent, the grandparent or any CSS selector. The leave animation finishes before the hiding class lands; animations are skipped with reduced motion. The host gets `aria-expanded`.
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<button txButton icon="bars" aria-label="Menu" txStyleClass enterFromClass="hidden" enterActiveClass="fade-in" leaveActiveClass="fade-out" leaveToClass="hidden" hideOnOutsideClick hideOnEscape></button>
|
|
7
|
+
<nav class="hidden">…</nav>
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Inputs
|
|
11
|
+
| Name | Description |
|
|
12
|
+
|---|---|
|
|
13
|
+
| txStyleClass | Target: `@next` (default), `@prev`, `@parent`, `@grandparent` or a selector |
|
|
14
|
+
| enterFromClass | Removed when the target opens (e.g. `hidden`) |
|
|
15
|
+
| enterActiveClass | Added while the target opens, until its animation or transition ends |
|
|
16
|
+
| enterToClass | Added when the target is open |
|
|
17
|
+
| leaveFromClass | Added when the target starts to close |
|
|
18
|
+
| leaveActiveClass | Added while the target closes |
|
|
19
|
+
| leaveToClass | Added when the target is closed (e.g. `hidden`); also tells that it is closed |
|
|
20
|
+
| toggleClass | Just toggles these classes on the target, no open / close |
|
|
21
|
+
| hideOnOutsideClick | Closes on a click outside the target and the host |
|
|
22
|
+
| hideOnEscape | Closes on Escape and returns the focus to the host |
|
|
23
|
+
| hideOnResize | Closes when the window is resized |
|
|
24
|
+
|
|
25
|
+
## Methods
|
|
26
|
+
| Name | Description |
|
|
27
|
+
|---|---|
|
|
28
|
+
| toggle() / enter() / leave() | Open or close from code (`exportAs: 'txStyleClass'`) |
|
|
29
|
+
| expanded | Signal: the target is open |
|
|
30
|
+
|
|
31
|
+
## Keyboard
|
|
32
|
+
| Key | Action |
|
|
33
|
+
|---|---|
|
|
34
|
+
| Escape | Closes the target, with `hideOnEscape` |
|
package/text/README.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Text
|
|
2
|
+
|
|
3
|
+
Small text helpers as pipes and functions: cut a long value (at the end, or in the middle for links and ids), capitalize, add `https://` to a bare domain, turn Cyrillic into Latin, make URL slugs and escape HTML.
|
|
4
|
+
|
|
5
|
+
```html
|
|
6
|
+
<a [href]="site.domain | txHttpPrefix">{{ site.url | txTruncate: 32 : '…' : 'middle' }}</a>
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Pipes
|
|
10
|
+
| Name | Description |
|
|
11
|
+
|---|---|
|
|
12
|
+
| txTruncate: limit?, trail?, position? | Cuts after `limit` characters (15) and adds the trail (`...`); `middle` keeps the start and the end; `-` for an empty value. Emoji count as one character |
|
|
13
|
+
| txCapitalize | First letter upper case, the rest as it is |
|
|
14
|
+
| txHttpPrefix: protocol? | Adds `https://` (or `http://`) when the link has no scheme; `mailto:` and others stay |
|
|
15
|
+
|
|
16
|
+
## Functions
|
|
17
|
+
| Name | Description |
|
|
18
|
+
|---|---|
|
|
19
|
+
| truncate(value, limit?, trail?, position?, empty?) | The function behind `txTruncate` |
|
|
20
|
+
| capitalize(value) | The function behind `txCapitalize` |
|
|
21
|
+
| withHttpPrefix(link, protocol?) | The function behind `txHttpPrefix` |
|
|
22
|
+
| normalizeKeyword(value) | Trimmed lower case — compare keywords and tags |
|
|
23
|
+
| transliterate(value) | Ukrainian and Russian letters to Latin, the case kept (`Щука` → `Shchuka`) |
|
|
24
|
+
| slugify(value, separator?) | Latin lower-case slug for URLs and file names (`Привіт, світе!` → `privit-svite`) |
|
|
25
|
+
| escapeHtml(value) | `&`, `<`, `>`, `"` and `'` as entities, for attributes and text you build by hand |
|
package/title/README.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Title
|
|
2
|
+
|
|
3
|
+
Browser tab titles from the routes: "Orders · Console". A prefix shows counters or states in front of every title — "(3) Orders · Console" — and a translate function turns title keys into the user's language.
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
bootstrapApplication(App, {
|
|
7
|
+
providers: [provideRouter(routes), provideTxTitle({ appName: 'Console', translate: (key) => translations.select(`titles.${key}`) })],
|
|
8
|
+
});
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
export const routes: Routes = [{ path: 'orders', title: 'orders', component: OrdersPage }];
|
|
13
|
+
|
|
14
|
+
inject(TxTitle).setPrefix(unread ? `(${unread})` : '');
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Providers
|
|
18
|
+
| Name | Description |
|
|
19
|
+
|---|---|
|
|
20
|
+
| provideTxTitle({ appName, separator?, translate? }) | Sets the router title strategy: `title` of the route, then the separator (` · `), then the app name; `translate(key)` returns text or an `Observable` of it |
|
|
21
|
+
|
|
22
|
+
## Methods
|
|
23
|
+
| Name | Description |
|
|
24
|
+
|---|---|
|
|
25
|
+
| TxTitle.setPrefix(prefix) | Text before every title, `''` to remove it |
|
|
26
|
+
| TxTitle.setPage(page) | Sets the page part by hand, for a title that is not on a route (a record name) |
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class TxAutoFocus {
|
|
3
|
+
private readonly host;
|
|
4
|
+
readonly enabled: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
5
|
+
readonly select: import("@angular/core").InputSignalWithTransform<boolean, unknown>;
|
|
6
|
+
constructor();
|
|
7
|
+
focus(): void;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TxAutoFocus, never>;
|
|
9
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TxAutoFocus, "[txAutoFocus]", ["txAutoFocus"], {
|
|
10
|
+
"enabled": {
|
|
11
|
+
"alias": "txAutoFocus";
|
|
12
|
+
"required": false;
|
|
13
|
+
"isSignal": true;
|
|
14
|
+
};
|
|
15
|
+
"select": {
|
|
16
|
+
"alias": "select";
|
|
17
|
+
"required": false;
|
|
18
|
+
"isSignal": true;
|
|
19
|
+
};
|
|
20
|
+
}, {}, never, never, true, never>;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=tectra-ng-utils-auto-focus.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tectra-ng-utils-auto-focus.d.ts","names":[],"sources":["../../../../packages/utils/auto-focus/src/auto-focus.directive.ts"],"mappings":";qBASa;mBACM;WAER,iCAAO;WACP,gCAAM;;EAaf;SAjBW,MAAA,GAAA,qBAAA;SAAA,MAAA,GAAA,uBAAA;IAAW;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Signal } from "@angular/core";
|
|
3
|
+
export declare const TX_BREAKPOINT_MOBILE = "(max-width: 640px)";
|
|
4
|
+
export declare const TX_BREAKPOINT_TABLET = "(max-width: 768px)";
|
|
5
|
+
export declare class TxBreakpoints {
|
|
6
|
+
private readonly view;
|
|
7
|
+
private readonly destroyRef;
|
|
8
|
+
private readonly queries;
|
|
9
|
+
readonly isMobile: Signal<boolean>;
|
|
10
|
+
readonly isTablet: Signal<boolean>;
|
|
11
|
+
matches(query: string): Signal<boolean>;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TxBreakpoints, never>;
|
|
13
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=tectra-ng-utils-breakpoint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tectra-ng-utils-breakpoint.d.ts","names":[],"sources":["../../../../packages/utils/breakpoint/src/breakpoints.ts"],"mappings":";;qBAGa;qBACA;qBAGA;mBACM;mBACA;mBACA;WAER,UAAQ;WACR,UAAQ;EAEjB,QAAQ,gBAAgB;SARb,MAAA,GAAA,qBAAA"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export interface TxCopyOptions {
|
|
3
|
+
message?: string | false;
|
|
4
|
+
errorMessage?: string | false;
|
|
5
|
+
}
|
|
6
|
+
export declare function copyToClipboard(text: string, document?: Document | undefined): Promise<boolean>;
|
|
7
|
+
export declare class TxClipboard {
|
|
8
|
+
private readonly document;
|
|
9
|
+
private readonly toast;
|
|
10
|
+
private readonly locale;
|
|
11
|
+
copy(value: string | number | null | undefined, options?: TxCopyOptions): Promise<boolean>;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TxClipboard, never>;
|
|
13
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
14
|
+
}
|
|
15
|
+
export declare class TxCopy {
|
|
16
|
+
private readonly clipboard;
|
|
17
|
+
private readonly element;
|
|
18
|
+
readonly value: import("@angular/core").InputSignal<string | number | null | undefined>;
|
|
19
|
+
readonly copyMessage: import("@angular/core").InputSignal<string | false | undefined>;
|
|
20
|
+
readonly copyErrorMessage: import("@angular/core").InputSignal<string | false | undefined>;
|
|
21
|
+
readonly copied: import("@angular/core").OutputEmitterRef<string>;
|
|
22
|
+
readonly copyFailed: import("@angular/core").OutputEmitterRef<string>;
|
|
23
|
+
protected readonly needsRole: boolean;
|
|
24
|
+
copy(): Promise<boolean>;
|
|
25
|
+
protected onKey(event: Event): void;
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TxCopy, never>;
|
|
27
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TxCopy, "[txCopy]", ["txCopy"], {
|
|
28
|
+
"value": {
|
|
29
|
+
"alias": "txCopy";
|
|
30
|
+
"required": false;
|
|
31
|
+
"isSignal": true;
|
|
32
|
+
};
|
|
33
|
+
"copyMessage": {
|
|
34
|
+
"alias": "copyMessage";
|
|
35
|
+
"required": false;
|
|
36
|
+
"isSignal": true;
|
|
37
|
+
};
|
|
38
|
+
"copyErrorMessage": {
|
|
39
|
+
"alias": "copyErrorMessage";
|
|
40
|
+
"required": false;
|
|
41
|
+
"isSignal": true;
|
|
42
|
+
};
|
|
43
|
+
}, {
|
|
44
|
+
"copied": "copied";
|
|
45
|
+
"copyFailed": "copyFailed";
|
|
46
|
+
}, never, never, true, never>;
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=tectra-ng-utils-clipboard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tectra-ng-utils-clipboard.d.ts","names":[],"sources":["../../../../packages/utils/clipboard/src/clipboard.ts","../../../../packages/utils/clipboard/src/copy.directive.ts"],"mappings":";iBAKiB;EACf;EACA;;wBAGoB,gBAAgB,cAAc,WAAU,uBAA6C;qBAsC9F;mBACM;mBACA;mBACA;EAEX,KAAK,2CAA2C,UAAS,gBAAqB;SALzE,MAAA,GAAA,qBAAA;;;qBChCA;mBACM;mBACA;WAER,+BAAK;WACL,qCAAW;WACX,0CAAgB;WAEhB,gCAAM;WACN,oCAAU;qBAEA;EAEb,QAAQ;YAeJ,MAAM,OAAO;SA5BZ,MAAA,GAAA,qBAAA;SAAA,MAAA,GAAA,uBAAA;IAAM;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;IAAA;MAAA;MAAA;MAAA;;;IAAA;IAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Signal } from "@angular/core";
|
|
3
|
+
import { TxDateInput } from "@tectra-ng/utils/date";
|
|
4
|
+
export interface TxCountdownState {
|
|
5
|
+
remainingMs: Signal<number>;
|
|
6
|
+
isExpired: Signal<boolean>;
|
|
7
|
+
isEndingSoon: Signal<boolean>;
|
|
8
|
+
}
|
|
9
|
+
export declare class TxClock {
|
|
10
|
+
private readonly current;
|
|
11
|
+
readonly now: Signal<number>;
|
|
12
|
+
constructor();
|
|
13
|
+
countdown(target: Signal<TxDateInput> | TxDateInput, endingSoonMs?: number): TxCountdownState;
|
|
14
|
+
isInFuture(value: TxDateInput): boolean;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TxClock, never>;
|
|
16
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=tectra-ng-utils-clock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tectra-ng-utils-clock.d.ts","names":[],"sources":["../../../../packages/utils/clock/src/clock.ts"],"mappings":";;;iBAIiB;EACf,aAAa;EACb,WAAW;EACX,cAAc;;qBAIH;mBACM;WAER,KAAG;;EASZ,UAAU,QAAQ,OAAO,eAAe,aAAa,wBAAmB;EAaxE,WAAW,OAAO;SAzBP,MAAA,GAAA,qBAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { PipeTransform } from "@angular/core";
|
|
3
|
+
export type TxCurrencyDisplay = 'narrowSymbol' | 'symbol' | 'code' | 'name';
|
|
4
|
+
export declare function currencySymbol(currency: string | null | undefined, locale?: string, display?: TxCurrencyDisplay): string;
|
|
5
|
+
export declare class TxCurrencySymbolPipe implements PipeTransform {
|
|
6
|
+
private readonly localeService;
|
|
7
|
+
transform(currency: string | null | undefined, display?: TxCurrencyDisplay, locale?: string): string;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TxCurrencySymbolPipe, never>;
|
|
9
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<TxCurrencySymbolPipe, "txCurrencySymbol", true>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=tectra-ng-utils-currency.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tectra-ng-utils-currency.d.ts","names":[],"sources":["../../../../packages/utils/currency/src/currency.ts"],"mappings":";;YAGY;wBAII,eAAe,qCAAqC,iBAAkB,UAAS;qBA0BlF,gCAAgC;mBAC1B;EAEjB,UAAU,qCAAqC,UAAS,mBAAoC;SAHjF,MAAA,GAAA,qBAAA;SAAA,OAAA,GAAA,kBAAA"}
|