@tectra-ng/ui 0.1.2 → 0.1.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.
Files changed (135) hide show
  1. package/README.md +36 -19
  2. package/accordion/README.md +61 -0
  3. package/analog-clock/README.md +31 -0
  4. package/breadcrumb/README.md +57 -0
  5. package/countdown/README.md +45 -0
  6. package/datepicker/README.md +109 -0
  7. package/export/README.md +79 -0
  8. package/export-font/OFL.txt +93 -0
  9. package/export-font/README.md +7 -0
  10. package/fesm2022/tectra-ng-ui-accordion.mjs +980 -0
  11. package/fesm2022/tectra-ng-ui-accordion.mjs.map +1 -0
  12. package/fesm2022/tectra-ng-ui-analog-clock.mjs +386 -0
  13. package/fesm2022/tectra-ng-ui-analog-clock.mjs.map +1 -0
  14. package/fesm2022/tectra-ng-ui-autocomplete.mjs +2 -2
  15. package/fesm2022/tectra-ng-ui-autocomplete.mjs.map +1 -1
  16. package/fesm2022/tectra-ng-ui-breadcrumb.mjs +382 -0
  17. package/fesm2022/tectra-ng-ui-breadcrumb.mjs.map +1 -0
  18. package/fesm2022/tectra-ng-ui-cascade-select.mjs +2 -2
  19. package/fesm2022/tectra-ng-ui-cascade-select.mjs.map +1 -1
  20. package/fesm2022/tectra-ng-ui-chips-input.mjs +2 -2
  21. package/fesm2022/tectra-ng-ui-chips-input.mjs.map +1 -1
  22. package/fesm2022/tectra-ng-ui-color-picker.mjs +2 -2
  23. package/fesm2022/tectra-ng-ui-color-picker.mjs.map +1 -1
  24. package/fesm2022/tectra-ng-ui-countdown.mjs +513 -0
  25. package/fesm2022/tectra-ng-ui-countdown.mjs.map +1 -0
  26. package/fesm2022/tectra-ng-ui-datepicker.mjs +2640 -0
  27. package/fesm2022/tectra-ng-ui-datepicker.mjs.map +1 -0
  28. package/fesm2022/tectra-ng-ui-export-font.mjs +7 -0
  29. package/fesm2022/tectra-ng-ui-export-font.mjs.map +1 -0
  30. package/fesm2022/tectra-ng-ui-export.mjs +2574 -0
  31. package/fesm2022/tectra-ng-ui-export.mjs.map +1 -0
  32. package/fesm2022/tectra-ng-ui-field.mjs +1 -1
  33. package/fesm2022/tectra-ng-ui-field.mjs.map +1 -1
  34. package/fesm2022/tectra-ng-ui-file-upload.mjs +1452 -0
  35. package/fesm2022/tectra-ng-ui-file-upload.mjs.map +1 -0
  36. package/fesm2022/tectra-ng-ui-input-group.mjs +2 -2
  37. package/fesm2022/tectra-ng-ui-input-group.mjs.map +1 -1
  38. package/fesm2022/tectra-ng-ui-input.mjs +2 -2
  39. package/fesm2022/tectra-ng-ui-input.mjs.map +1 -1
  40. package/fesm2022/tectra-ng-ui-label.mjs +4 -4
  41. package/fesm2022/tectra-ng-ui-label.mjs.map +1 -1
  42. package/fesm2022/tectra-ng-ui-listbox.mjs +2 -2
  43. package/fesm2022/tectra-ng-ui-listbox.mjs.map +1 -1
  44. package/fesm2022/tectra-ng-ui-menubar.mjs +742 -0
  45. package/fesm2022/tectra-ng-ui-menubar.mjs.map +1 -0
  46. package/fesm2022/tectra-ng-ui-month-calendar.mjs +601 -0
  47. package/fesm2022/tectra-ng-ui-month-calendar.mjs.map +1 -0
  48. package/fesm2022/tectra-ng-ui-multiselect.mjs +2 -2
  49. package/fesm2022/tectra-ng-ui-multiselect.mjs.map +1 -1
  50. package/fesm2022/tectra-ng-ui-panel-menu.mjs +610 -0
  51. package/fesm2022/tectra-ng-ui-panel-menu.mjs.map +1 -0
  52. package/fesm2022/tectra-ng-ui-scroll-panel.mjs +319 -0
  53. package/fesm2022/tectra-ng-ui-scroll-panel.mjs.map +1 -0
  54. package/fesm2022/tectra-ng-ui-select.mjs +2 -2
  55. package/fesm2022/tectra-ng-ui-select.mjs.map +1 -1
  56. package/fesm2022/tectra-ng-ui-sparkline.mjs +240 -0
  57. package/fesm2022/tectra-ng-ui-sparkline.mjs.map +1 -0
  58. package/fesm2022/tectra-ng-ui-splitter.mjs +750 -0
  59. package/fesm2022/tectra-ng-ui-splitter.mjs.map +1 -0
  60. package/fesm2022/tectra-ng-ui-stat-tiles.mjs +661 -0
  61. package/fesm2022/tectra-ng-ui-stat-tiles.mjs.map +1 -0
  62. package/fesm2022/tectra-ng-ui-stepper.mjs +1166 -0
  63. package/fesm2022/tectra-ng-ui-stepper.mjs.map +1 -0
  64. package/fesm2022/tectra-ng-ui-table.mjs +195 -71
  65. package/fesm2022/tectra-ng-ui-table.mjs.map +1 -1
  66. package/fesm2022/tectra-ng-ui-tabs.mjs +1218 -0
  67. package/fesm2022/tectra-ng-ui-tabs.mjs.map +1 -0
  68. package/fesm2022/tectra-ng-ui-textarea.mjs +4 -1
  69. package/fesm2022/tectra-ng-ui-textarea.mjs.map +1 -1
  70. package/fesm2022/tectra-ng-ui-timeline.mjs +407 -0
  71. package/fesm2022/tectra-ng-ui-timeline.mjs.map +1 -0
  72. package/fesm2022/tectra-ng-ui-toolbar.mjs +348 -0
  73. package/fesm2022/tectra-ng-ui-toolbar.mjs.map +1 -0
  74. package/fesm2022/tectra-ng-ui-tree-select.mjs +2 -2
  75. package/fesm2022/tectra-ng-ui-tree-select.mjs.map +1 -1
  76. package/fesm2022/tectra-ng-ui-tree-table.mjs +80 -2
  77. package/fesm2022/tectra-ng-ui-tree-table.mjs.map +1 -1
  78. package/field/README.md +1 -1
  79. package/file-upload/README.md +85 -0
  80. package/menubar/README.md +51 -0
  81. package/month-calendar/README.md +46 -0
  82. package/package.json +80 -4
  83. package/panel-menu/README.md +45 -0
  84. package/scroll-panel/README.md +35 -0
  85. package/sparkline/README.md +27 -0
  86. package/splitter/README.md +62 -0
  87. package/stat-tiles/README.md +53 -0
  88. package/stepper/README.md +66 -0
  89. package/table/README.md +1 -1
  90. package/tabs/README.md +69 -0
  91. package/timeline/README.md +42 -0
  92. package/toolbar/README.md +35 -0
  93. package/types/tectra-ng-ui-accordion.d.ts +304 -0
  94. package/types/tectra-ng-ui-accordion.d.ts.map +1 -0
  95. package/types/tectra-ng-ui-analog-clock.d.ts +127 -0
  96. package/types/tectra-ng-ui-analog-clock.d.ts.map +1 -0
  97. package/types/tectra-ng-ui-breadcrumb.d.ts +157 -0
  98. package/types/tectra-ng-ui-breadcrumb.d.ts.map +1 -0
  99. package/types/tectra-ng-ui-countdown.d.ts +150 -0
  100. package/types/tectra-ng-ui-countdown.d.ts.map +1 -0
  101. package/types/tectra-ng-ui-datepicker.d.ts +801 -0
  102. package/types/tectra-ng-ui-datepicker.d.ts.map +1 -0
  103. package/types/tectra-ng-ui-export-font.d.ts +5 -0
  104. package/types/tectra-ng-ui-export-font.d.ts.map +1 -0
  105. package/types/tectra-ng-ui-export.d.ts +427 -0
  106. package/types/tectra-ng-ui-export.d.ts.map +1 -0
  107. package/types/tectra-ng-ui-file-upload.d.ts +527 -0
  108. package/types/tectra-ng-ui-file-upload.d.ts.map +1 -0
  109. package/types/tectra-ng-ui-menubar.d.ts +201 -0
  110. package/types/tectra-ng-ui-menubar.d.ts.map +1 -0
  111. package/types/tectra-ng-ui-month-calendar.d.ts +287 -0
  112. package/types/tectra-ng-ui-month-calendar.d.ts.map +1 -0
  113. package/types/tectra-ng-ui-panel-menu.d.ts +244 -0
  114. package/types/tectra-ng-ui-panel-menu.d.ts.map +1 -0
  115. package/types/tectra-ng-ui-scroll-panel.d.ts +94 -0
  116. package/types/tectra-ng-ui-scroll-panel.d.ts.map +1 -0
  117. package/types/tectra-ng-ui-sparkline.d.ts +80 -0
  118. package/types/tectra-ng-ui-sparkline.d.ts.map +1 -0
  119. package/types/tectra-ng-ui-splitter.d.ts +226 -0
  120. package/types/tectra-ng-ui-splitter.d.ts.map +1 -0
  121. package/types/tectra-ng-ui-stat-tiles.d.ts +287 -0
  122. package/types/tectra-ng-ui-stat-tiles.d.ts.map +1 -0
  123. package/types/tectra-ng-ui-stepper.d.ts +446 -0
  124. package/types/tectra-ng-ui-stepper.d.ts.map +1 -0
  125. package/types/tectra-ng-ui-table.d.ts +2 -4
  126. package/types/tectra-ng-ui-table.d.ts.map +1 -1
  127. package/types/tectra-ng-ui-tabs.d.ts +420 -0
  128. package/types/tectra-ng-ui-tabs.d.ts.map +1 -0
  129. package/types/tectra-ng-ui-textarea.d.ts +1 -0
  130. package/types/tectra-ng-ui-textarea.d.ts.map +1 -1
  131. package/types/tectra-ng-ui-timeline.d.ts +129 -0
  132. package/types/tectra-ng-ui-timeline.d.ts.map +1 -0
  133. package/types/tectra-ng-ui-toolbar.d.ts +85 -0
  134. package/types/tectra-ng-ui-toolbar.d.ts.map +1 -0
  135. package/types/tectra-ng-ui-tree-table.d.ts.map +1 -1
@@ -0,0 +1,513 @@
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, DestroyRef, Directive, Pipe, TemplateRef, booleanAttribute, computed, contentChild, effect, inject, input, numberAttribute, output, signal, untracked } from "@angular/core";
3
+ import { NgTemplateOutlet } from "@angular/common";
4
+ import { injectPassThrough, injectUnstyled } from "@tectra-ng/core/config";
5
+ import { optionalBoolean, optionalNumber } from "@tectra-ng/core/utils";
6
+ import { toStyleObject } from "@tectra-ng/themes";
7
+ const TX_COUNTDOWN_UNIT_MS = {
8
+ seconds: 1e3,
9
+ minutes: 6e4,
10
+ hours: 36e5,
11
+ days: 864e5
12
+ };
13
+ function formatRemaining(ms) {
14
+ const total = Math.max(0, Math.floor((ms ?? 0) / 1e3));
15
+ const hours = Math.floor(total / 3600);
16
+ const minutes = Math.floor(total % 3600 / 60);
17
+ const seconds = total % 60;
18
+ const pad = (value) => String(value).padStart(2, "0");
19
+ return hours ? `${hours}:${pad(minutes)}:${pad(seconds)}` : `${pad(minutes)}:${pad(seconds)}`;
20
+ }
21
+ function splitRemaining(ms) {
22
+ const total = Math.max(0, Math.ceil(ms / 1e3));
23
+ return {
24
+ days: Math.floor(total / 86400),
25
+ hours: Math.floor(total % 86400 / 3600),
26
+ minutes: Math.floor(total % 3600 / 60),
27
+ seconds: total % 60
28
+ };
29
+ }
30
+ function targetTime(value) {
31
+ if (value === null || value === void 0 || value === "") return null;
32
+ const time = new Date(value).getTime();
33
+ return Number.isNaN(time) ? null : time;
34
+ }
35
+ var TxCountdownValue = class TxCountdownValue {
36
+ templateRef = inject(TemplateRef);
37
+ static ngTemplateContextGuard(_directive, context) {
38
+ return !!context;
39
+ }
40
+ static ɵfac = i0.ɵɵngDeclareFactory({
41
+ minVersion: "12.0.0",
42
+ version: "22.2.3",
43
+ ngImport: i0,
44
+ type: TxCountdownValue,
45
+ deps: [],
46
+ target: i0.ɵɵFactoryTarget.Directive
47
+ });
48
+ static ɵdir = i0.ɵɵngDeclareDirective({
49
+ minVersion: "14.0.0",
50
+ version: "22.2.3",
51
+ type: TxCountdownValue,
52
+ isStandalone: true,
53
+ selector: "ng-template[txCountdownValue]",
54
+ ngImport: i0
55
+ });
56
+ };
57
+ i0.ɵɵngDeclareClassMetadata({
58
+ minVersion: "12.0.0",
59
+ version: "22.2.3",
60
+ ngImport: i0,
61
+ type: TxCountdownValue,
62
+ decorators: [{
63
+ type: Directive,
64
+ args: [{ selector: "ng-template[txCountdownValue]" }]
65
+ }]
66
+ });
67
+ var TxRemainingTimePipe = class TxRemainingTimePipe {
68
+ transform(ms) {
69
+ return formatRemaining(ms);
70
+ }
71
+ static ɵfac = i0.ɵɵngDeclareFactory({
72
+ minVersion: "12.0.0",
73
+ version: "22.2.3",
74
+ ngImport: i0,
75
+ type: TxRemainingTimePipe,
76
+ deps: [],
77
+ target: i0.ɵɵFactoryTarget.Pipe
78
+ });
79
+ static ɵpipe = i0.ɵɵngDeclarePipe({
80
+ minVersion: "14.0.0",
81
+ version: "22.2.3",
82
+ ngImport: i0,
83
+ type: TxRemainingTimePipe,
84
+ isStandalone: true,
85
+ name: "txRemainingTime"
86
+ });
87
+ };
88
+ i0.ɵɵngDeclareClassMetadata({
89
+ minVersion: "12.0.0",
90
+ version: "22.2.3",
91
+ ngImport: i0,
92
+ type: TxRemainingTimePipe,
93
+ decorators: [{
94
+ type: Pipe,
95
+ args: [{ name: "txRemainingTime" }]
96
+ }]
97
+ });
98
+ var TxCountdown = class TxCountdown {
99
+ value = input(void 0, {
100
+ ...ngDevMode ? { debugName: "value" } : /* istanbul ignore next */ {},
101
+ transform: optionalNumber
102
+ });
103
+ unit = input("seconds", ...ngDevMode ? [{ debugName: "unit" }] : /* istanbul ignore next */ []);
104
+ target = input(void 0, ...ngDevMode ? [{ debugName: "target" }] : /* istanbul ignore next */ []);
105
+ suffix = input("", ...ngDevMode ? [{ debugName: "suffix" }] : /* istanbul ignore next */ []);
106
+ format = input(void 0, ...ngDevMode ? [{ debugName: "format" }] : /* istanbul ignore next */ []);
107
+ endingSoon = input(0, {
108
+ ...ngDevMode ? { debugName: "endingSoon" } : /* istanbul ignore next */ {},
109
+ transform: numberAttribute
110
+ });
111
+ paused = input(false, {
112
+ ...ngDevMode ? { debugName: "paused" } : /* istanbul ignore next */ {},
113
+ transform: booleanAttribute
114
+ });
115
+ ariaLive = input("off", ...ngDevMode ? [{ debugName: "ariaLive" }] : /* istanbul ignore next */ []);
116
+ dt = input(void 0, ...ngDevMode ? [{ debugName: "dt" }] : /* istanbul ignore next */ []);
117
+ pt = input(void 0, ...ngDevMode ? [{ debugName: "pt" }] : /* istanbul ignore next */ []);
118
+ ptOptions = input(void 0, ...ngDevMode ? [{ debugName: "ptOptions" }] : /* istanbul ignore next */ []);
119
+ unstyled = input(void 0, {
120
+ ...ngDevMode ? { debugName: "unstyled" } : /* istanbul ignore next */ {},
121
+ transform: optionalBoolean
122
+ });
123
+ completed = output();
124
+ tick = output();
125
+ valueTemplate = contentChild(TxCountdownValue, ...ngDevMode ? [{ debugName: "valueTemplate" }] : /* istanbul ignore next */ []);
126
+ isUnstyled = injectUnstyled(this.unstyled);
127
+ passThrough = injectPassThrough("countdown", this, this.pt, this.ptOptions);
128
+ hostStyle = computed(() => ({
129
+ ...toStyleObject(this.dt(), "--tx-countdown"),
130
+ ...this.passThrough().root?.style
131
+ }), ...ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []);
132
+ now = signal(Date.now(), ...ngDevMode ? [{ debugName: "now" }] : /* istanbul ignore next */ []);
133
+ deadline = signal(null, ...ngDevMode ? [{ debugName: "deadline" }] : /* istanbul ignore next */ []);
134
+ frozen = signal(null, ...ngDevMode ? [{ debugName: "frozen" }] : /* istanbul ignore next */ []);
135
+ timer = null;
136
+ done = false;
137
+ resolvedFormat = computed(() => this.format() ?? (this.target() !== void 0 && this.value() === void 0 ? "clock" : "number"), ...ngDevMode ? [{ debugName: "resolvedFormat" }] : /* istanbul ignore next */ []);
138
+ remainingMs = computed(() => {
139
+ const frozen = this.frozen();
140
+ if (frozen !== null) return frozen;
141
+ const deadline = this.deadline();
142
+ return deadline === null ? 0 : Math.max(0, deadline - this.now());
143
+ }, ...ngDevMode ? [{ debugName: "remainingMs" }] : /* istanbul ignore next */ []);
144
+ isExpired = computed(() => this.deadline() !== null && this.remainingMs() === 0, ...ngDevMode ? [{ debugName: "isExpired" }] : /* istanbul ignore next */ []);
145
+ isEnding = computed(() => this.remainingMs() > 0 && this.remainingMs() <= this.endingSoon(), ...ngDevMode ? [{ debugName: "isEnding" }] : /* istanbul ignore next */ []);
146
+ text = computed(() => {
147
+ const remaining = this.remainingMs();
148
+ const display = this.resolvedFormat() === "clock" ? formatRemaining(Math.ceil(remaining / 1e3) * 1e3) : String(Math.ceil(remaining / TX_COUNTDOWN_UNIT_MS[this.unit()]));
149
+ return this.suffix() ? `${display} ${this.suffix()}` : display;
150
+ }, ...ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []);
151
+ context = computed(() => ({
152
+ $implicit: this.remainingMs(),
153
+ ...splitRemaining(this.remainingMs()),
154
+ expired: this.isExpired()
155
+ }), ...ngDevMode ? [{ debugName: "context" }] : /* istanbul ignore next */ []);
156
+ start = effect(() => {
157
+ const value = this.value();
158
+ const unit = this.unit();
159
+ const target = targetTime(this.target());
160
+ untracked(() => {
161
+ this.done = false;
162
+ this.now.set(Date.now());
163
+ const deadline = value !== void 0 ? Date.now() + value * TX_COUNTDOWN_UNIT_MS[unit] : target;
164
+ if (this.paused()) {
165
+ this.deadline.set(deadline);
166
+ this.frozen.set(deadline === null ? null : Math.max(0, deadline - Date.now()));
167
+ } else {
168
+ this.frozen.set(null);
169
+ this.deadline.set(deadline);
170
+ }
171
+ });
172
+ }, ...ngDevMode ? [{ debugName: "start" }] : /* istanbul ignore next */ []);
173
+ pause = effect(() => {
174
+ const paused = this.paused();
175
+ untracked(() => {
176
+ if (paused && this.frozen() === null && this.deadline() !== null) this.frozen.set(this.remainingMs());
177
+ if (!paused && this.frozen() !== null) {
178
+ this.deadline.set(Date.now() + this.frozen());
179
+ this.now.set(Date.now());
180
+ this.frozen.set(null);
181
+ }
182
+ });
183
+ }, ...ngDevMode ? [{ debugName: "pause" }] : /* istanbul ignore next */ []);
184
+ refresh = effect(() => {
185
+ this.resolvedFormat();
186
+ this.endingSoon();
187
+ untracked(() => this.now.set(Date.now()));
188
+ }, ...ngDevMode ? [{ debugName: "refresh" }] : /* istanbul ignore next */ []);
189
+ schedule = effect((onCleanup) => {
190
+ const deadline = this.deadline();
191
+ const frozen = this.frozen();
192
+ this.now();
193
+ if (deadline === null || frozen !== null) return;
194
+ const remaining = deadline - Date.now();
195
+ if (remaining <= 0) return;
196
+ const step = this.resolvedFormat() === "clock" || this.endingSoon() ? 1e3 : TX_COUNTDOWN_UNIT_MS[this.unit()];
197
+ const delay = remaining % step || step;
198
+ this.timer = setTimeout(() => this.now.set(Date.now()), delay + 5);
199
+ onCleanup(() => {
200
+ if (this.timer) clearTimeout(this.timer);
201
+ });
202
+ }, ...ngDevMode ? [{ debugName: "schedule" }] : /* istanbul ignore next */ []);
203
+ finish = effect(() => {
204
+ const remaining = this.remainingMs();
205
+ const expired = this.isExpired();
206
+ untracked(() => {
207
+ this.tick.emit(remaining);
208
+ if (expired && !this.done) {
209
+ this.done = true;
210
+ this.completed.emit();
211
+ }
212
+ });
213
+ }, ...ngDevMode ? [{ debugName: "finish" }] : /* istanbul ignore next */ []);
214
+ cleanup = inject(DestroyRef).onDestroy(() => {
215
+ if (this.timer) clearTimeout(this.timer);
216
+ });
217
+ static ɵfac = i0.ɵɵngDeclareFactory({
218
+ minVersion: "12.0.0",
219
+ version: "22.2.3",
220
+ ngImport: i0,
221
+ type: TxCountdown,
222
+ deps: [],
223
+ target: i0.ɵɵFactoryTarget.Component
224
+ });
225
+ static ɵcmp = i0.ɵɵngDeclareComponent({
226
+ minVersion: "17.0.0",
227
+ version: "22.2.3",
228
+ type: TxCountdown,
229
+ isStandalone: true,
230
+ selector: "tx-countdown",
231
+ inputs: {
232
+ value: {
233
+ classPropertyName: "value",
234
+ publicName: "value",
235
+ isSignal: true,
236
+ isRequired: false,
237
+ transformFunction: null
238
+ },
239
+ unit: {
240
+ classPropertyName: "unit",
241
+ publicName: "unit",
242
+ isSignal: true,
243
+ isRequired: false,
244
+ transformFunction: null
245
+ },
246
+ target: {
247
+ classPropertyName: "target",
248
+ publicName: "target",
249
+ isSignal: true,
250
+ isRequired: false,
251
+ transformFunction: null
252
+ },
253
+ suffix: {
254
+ classPropertyName: "suffix",
255
+ publicName: "suffix",
256
+ isSignal: true,
257
+ isRequired: false,
258
+ transformFunction: null
259
+ },
260
+ format: {
261
+ classPropertyName: "format",
262
+ publicName: "format",
263
+ isSignal: true,
264
+ isRequired: false,
265
+ transformFunction: null
266
+ },
267
+ endingSoon: {
268
+ classPropertyName: "endingSoon",
269
+ publicName: "endingSoon",
270
+ isSignal: true,
271
+ isRequired: false,
272
+ transformFunction: null
273
+ },
274
+ paused: {
275
+ classPropertyName: "paused",
276
+ publicName: "paused",
277
+ isSignal: true,
278
+ isRequired: false,
279
+ transformFunction: null
280
+ },
281
+ ariaLive: {
282
+ classPropertyName: "ariaLive",
283
+ publicName: "ariaLive",
284
+ isSignal: true,
285
+ isRequired: false,
286
+ transformFunction: null
287
+ },
288
+ dt: {
289
+ classPropertyName: "dt",
290
+ publicName: "dt",
291
+ isSignal: true,
292
+ isRequired: false,
293
+ transformFunction: null
294
+ },
295
+ pt: {
296
+ classPropertyName: "pt",
297
+ publicName: "pt",
298
+ isSignal: true,
299
+ isRequired: false,
300
+ transformFunction: null
301
+ },
302
+ ptOptions: {
303
+ classPropertyName: "ptOptions",
304
+ publicName: "ptOptions",
305
+ isSignal: true,
306
+ isRequired: false,
307
+ transformFunction: null
308
+ },
309
+ unstyled: {
310
+ classPropertyName: "unstyled",
311
+ publicName: "unstyled",
312
+ isSignal: true,
313
+ isRequired: false,
314
+ transformFunction: null
315
+ }
316
+ },
317
+ outputs: {
318
+ completed: "completed",
319
+ tick: "tick"
320
+ },
321
+ host: {
322
+ attributes: {
323
+ "role": "timer",
324
+ "aria-atomic": "true"
325
+ },
326
+ properties: {
327
+ "class": "passThrough().root?.class",
328
+ "style": "hostStyle()",
329
+ "attr.data-styled": "!isUnstyled() || null",
330
+ "attr.aria-live": "ariaLive()",
331
+ "class.tx-countdown--ending": "isEnding()",
332
+ "class.tx-countdown--expired": "isExpired()",
333
+ "class.tx-countdown--paused": "paused()"
334
+ },
335
+ classAttribute: "tx-countdown"
336
+ },
337
+ queries: [{
338
+ propertyName: "valueTemplate",
339
+ first: true,
340
+ predicate: TxCountdownValue,
341
+ descendants: true,
342
+ isSignal: true
343
+ }],
344
+ ngImport: i0,
345
+ template: `
346
+ @if (valueTemplate(); as template) {
347
+ <ng-container [ngTemplateOutlet]="template.templateRef" [ngTemplateOutletContext]="context()" />
348
+ } @else {
349
+ {{ text() }}
350
+ }
351
+ `,
352
+ isInline: true,
353
+ styles: [":host{display:inline;font-variant-numeric:tabular-nums}:host([data-styled]){color:var(--tx-countdown-color);font-weight:var(--tx-countdown-font-weight);transition:color var(--tx-countdown-transition-duration)}:host([data-styled].tx-countdown--ending){color:var(--tx-countdown-ending-color)}:host([data-styled].tx-countdown--expired){color:var(--tx-countdown-expired-color)}@media(prefers-reduced-motion:reduce){:host([data-styled]){transition:none}}\n"],
354
+ dependencies: [{
355
+ kind: "directive",
356
+ type: NgTemplateOutlet,
357
+ selector: "[ngTemplateOutlet]",
358
+ inputs: [
359
+ "ngTemplateOutletContext",
360
+ "ngTemplateOutlet",
361
+ "ngTemplateOutletInjector"
362
+ ]
363
+ }],
364
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
365
+ });
366
+ };
367
+ i0.ɵɵngDeclareClassMetadata({
368
+ minVersion: "12.0.0",
369
+ version: "22.2.3",
370
+ ngImport: i0,
371
+ type: TxCountdown,
372
+ decorators: [{
373
+ type: Component,
374
+ args: [{
375
+ selector: "tx-countdown",
376
+ imports: [NgTemplateOutlet],
377
+ template: `
378
+ @if (valueTemplate(); as template) {
379
+ <ng-container [ngTemplateOutlet]="template.templateRef" [ngTemplateOutletContext]="context()" />
380
+ } @else {
381
+ {{ text() }}
382
+ }
383
+ `,
384
+ changeDetection: ChangeDetectionStrategy.OnPush,
385
+ host: {
386
+ class: "tx-countdown",
387
+ role: "timer",
388
+ "aria-atomic": "true",
389
+ "[class]": "passThrough().root?.class",
390
+ "[style]": "hostStyle()",
391
+ "[attr.data-styled]": "!isUnstyled() || null",
392
+ "[attr.aria-live]": "ariaLive()",
393
+ "[class.tx-countdown--ending]": "isEnding()",
394
+ "[class.tx-countdown--expired]": "isExpired()",
395
+ "[class.tx-countdown--paused]": "paused()"
396
+ },
397
+ styles: [":host{display:inline;font-variant-numeric:tabular-nums}:host([data-styled]){color:var(--tx-countdown-color);font-weight:var(--tx-countdown-font-weight);transition:color var(--tx-countdown-transition-duration)}:host([data-styled].tx-countdown--ending){color:var(--tx-countdown-ending-color)}:host([data-styled].tx-countdown--expired){color:var(--tx-countdown-expired-color)}@media(prefers-reduced-motion:reduce){:host([data-styled]){transition:none}}\n"]
398
+ }]
399
+ }],
400
+ propDecorators: {
401
+ value: [{
402
+ type: i0.Input,
403
+ args: [{
404
+ isSignal: true,
405
+ alias: "value",
406
+ required: false
407
+ }]
408
+ }],
409
+ unit: [{
410
+ type: i0.Input,
411
+ args: [{
412
+ isSignal: true,
413
+ alias: "unit",
414
+ required: false
415
+ }]
416
+ }],
417
+ target: [{
418
+ type: i0.Input,
419
+ args: [{
420
+ isSignal: true,
421
+ alias: "target",
422
+ required: false
423
+ }]
424
+ }],
425
+ suffix: [{
426
+ type: i0.Input,
427
+ args: [{
428
+ isSignal: true,
429
+ alias: "suffix",
430
+ required: false
431
+ }]
432
+ }],
433
+ format: [{
434
+ type: i0.Input,
435
+ args: [{
436
+ isSignal: true,
437
+ alias: "format",
438
+ required: false
439
+ }]
440
+ }],
441
+ endingSoon: [{
442
+ type: i0.Input,
443
+ args: [{
444
+ isSignal: true,
445
+ alias: "endingSoon",
446
+ required: false
447
+ }]
448
+ }],
449
+ paused: [{
450
+ type: i0.Input,
451
+ args: [{
452
+ isSignal: true,
453
+ alias: "paused",
454
+ required: false
455
+ }]
456
+ }],
457
+ ariaLive: [{
458
+ type: i0.Input,
459
+ args: [{
460
+ isSignal: true,
461
+ alias: "ariaLive",
462
+ required: false
463
+ }]
464
+ }],
465
+ dt: [{
466
+ type: i0.Input,
467
+ args: [{
468
+ isSignal: true,
469
+ alias: "dt",
470
+ required: false
471
+ }]
472
+ }],
473
+ pt: [{
474
+ type: i0.Input,
475
+ args: [{
476
+ isSignal: true,
477
+ alias: "pt",
478
+ required: false
479
+ }]
480
+ }],
481
+ ptOptions: [{
482
+ type: i0.Input,
483
+ args: [{
484
+ isSignal: true,
485
+ alias: "ptOptions",
486
+ required: false
487
+ }]
488
+ }],
489
+ unstyled: [{
490
+ type: i0.Input,
491
+ args: [{
492
+ isSignal: true,
493
+ alias: "unstyled",
494
+ required: false
495
+ }]
496
+ }],
497
+ completed: [{
498
+ type: i0.Output,
499
+ args: ["completed"]
500
+ }],
501
+ tick: [{
502
+ type: i0.Output,
503
+ args: ["tick"]
504
+ }],
505
+ valueTemplate: [{
506
+ type: i0.ContentChild,
507
+ args: [i0.forwardRef(() => TxCountdownValue), { isSignal: true }]
508
+ }]
509
+ }
510
+ });
511
+ export { TX_COUNTDOWN_UNIT_MS, TxCountdown, TxCountdownValue, TxRemainingTimePipe, formatRemaining, splitRemaining, targetTime };
512
+
513
+ //# sourceMappingURL=tectra-ng-ui-countdown.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tectra-ng-ui-countdown.mjs","names":[],"sources":["../../../../packages/ui/countdown/src/countdown.utils.ts","../../../../packages/ui/countdown/src/countdown.templates.ts","../../../../packages/ui/countdown/src/remaining-time.pipe.ts","../../../../packages/ui/countdown/src/countdown.component.ts"],"sourcesContent":["import { TxCountdownTarget, TxCountdownUnit } from './countdown.types';\n\nexport const TX_COUNTDOWN_UNIT_MS: Record<TxCountdownUnit, number> = {\n seconds: 1000,\n minutes: 60000,\n hours: 3600000,\n days: 86400000,\n};\n\nexport function formatRemaining(ms: number | null | undefined): string {\n const total = Math.max(0, Math.floor((ms ?? 0) / 1000));\n const hours = Math.floor(total / 3600);\n const minutes = Math.floor((total % 3600) / 60);\n const seconds = total % 60;\n const pad = (value: number) => String(value).padStart(2, '0');\n return hours ? `${hours}:${pad(minutes)}:${pad(seconds)}` : `${pad(minutes)}:${pad(seconds)}`;\n}\n\nexport function splitRemaining(ms: number): { days: number; hours: number; minutes: number; seconds: number } {\n const total = Math.max(0, Math.ceil(ms / 1000));\n return {\n days: Math.floor(total / 86400),\n hours: Math.floor((total % 86400) / 3600),\n minutes: Math.floor((total % 3600) / 60),\n seconds: total % 60,\n };\n}\n\nexport function targetTime(value: TxCountdownTarget): number | null {\n if (value === null || value === undefined || value === '') return null;\n const time = new Date(value).getTime();\n return Number.isNaN(time) ? null : time;\n}\n","import { Directive, TemplateRef, inject } from '@angular/core';\nimport { TxCountdownContext } from './countdown.types';\n\n@Directive({ selector: 'ng-template[txCountdownValue]' })\nexport class TxCountdownValue {\n readonly templateRef = inject<TemplateRef<TxCountdownContext>>(TemplateRef);\n\n static ngTemplateContextGuard(_directive: TxCountdownValue, context: unknown): context is TxCountdownContext {\n return !!context;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { formatRemaining } from './countdown.utils';\n\n@Pipe({ name: 'txRemainingTime' })\nexport class TxRemainingTimePipe implements PipeTransform {\n transform(ms: number | null | undefined): string {\n return formatRemaining(ms);\n }\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, DestroyRef, booleanAttribute, computed, contentChild, effect, inject, input, numberAttribute, output, signal, untracked } from '@angular/core';\nimport { TxPassThrough, TxPassThroughOptions, injectPassThrough, injectUnstyled } from '@tectra-ng/core/config';\nimport { optionalBoolean, optionalNumber } from '@tectra-ng/core/utils';\nimport { TectraCountdownTokens, TectraDeepPartial, toStyleObject } from '@tectra-ng/themes';\nimport { TxCountdownValue } from './countdown.templates';\nimport { TxCountdownContext, TxCountdownFormat, TxCountdownPart, TxCountdownTarget, TxCountdownUnit } from './countdown.types';\nimport { TX_COUNTDOWN_UNIT_MS, formatRemaining, splitRemaining, targetTime } from './countdown.utils';\n\n@Component({\n selector: 'tx-countdown',\n imports: [NgTemplateOutlet],\n template: `\n @if (valueTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"context()\" />\n } @else {\n {{ text() }}\n }\n `,\n styleUrl: './countdown.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-countdown',\n role: 'timer',\n 'aria-atomic': 'true',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.aria-live]': 'ariaLive()',\n '[class.tx-countdown--ending]': 'isEnding()',\n '[class.tx-countdown--expired]': 'isExpired()',\n '[class.tx-countdown--paused]': 'paused()',\n },\n})\nexport class TxCountdown {\n readonly value = input<number | undefined, unknown>(undefined, { transform: optionalNumber });\n readonly unit = input<TxCountdownUnit>('seconds');\n readonly target = input<TxCountdownTarget>(undefined);\n readonly suffix = input<string>('');\n readonly format = input<TxCountdownFormat | undefined>(undefined);\n readonly endingSoon = input<number, unknown>(0, { transform: numberAttribute });\n readonly paused = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly ariaLive = input<'off' | 'polite' | 'assertive'>('off');\n readonly dt = input<TectraDeepPartial<TectraCountdownTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxCountdownPart, TxCountdown> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly completed = output<void>();\n readonly tick = output<number>();\n\n protected readonly valueTemplate = contentChild(TxCountdownValue);\n\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('countdown', this, this.pt, this.ptOptions);\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-countdown'), ...this.passThrough().root?.style }));\n\n private readonly now = signal(Date.now());\n private readonly deadline = signal<number | null>(null);\n private readonly frozen = signal<number | null>(null);\n private timer: ReturnType<typeof setTimeout> | null = null;\n private done = false;\n\n readonly resolvedFormat = computed<TxCountdownFormat>(() => this.format() ?? (this.target() !== undefined && this.value() === undefined ? 'clock' : 'number'));\n readonly remainingMs = computed(() => {\n const frozen = this.frozen();\n if (frozen !== null) return frozen;\n const deadline = this.deadline();\n return deadline === null ? 0 : Math.max(0, deadline - this.now());\n });\n readonly isExpired = computed(() => this.deadline() !== null && this.remainingMs() === 0);\n readonly isEnding = computed(() => this.remainingMs() > 0 && this.remainingMs() <= this.endingSoon());\n readonly text = computed(() => {\n const remaining = this.remainingMs();\n const display = this.resolvedFormat() === 'clock' ? formatRemaining(Math.ceil(remaining / 1000) * 1000) : String(Math.ceil(remaining / TX_COUNTDOWN_UNIT_MS[this.unit()]));\n return this.suffix() ? `${display} ${this.suffix()}` : display;\n });\n readonly context = computed<TxCountdownContext>(() => ({ $implicit: this.remainingMs(), ...splitRemaining(this.remainingMs()), expired: this.isExpired() }));\n\n private readonly start = effect(() => {\n const value = this.value();\n const unit = this.unit();\n const target = targetTime(this.target());\n untracked(() => {\n this.done = false;\n this.now.set(Date.now());\n const deadline = value !== undefined ? Date.now() + value * TX_COUNTDOWN_UNIT_MS[unit] : target;\n if (this.paused()) {\n this.deadline.set(deadline);\n this.frozen.set(deadline === null ? null : Math.max(0, deadline - Date.now()));\n } else {\n this.frozen.set(null);\n this.deadline.set(deadline);\n }\n });\n });\n\n private readonly pause = effect(() => {\n const paused = this.paused();\n untracked(() => {\n if (paused && this.frozen() === null && this.deadline() !== null) this.frozen.set(this.remainingMs());\n if (!paused && this.frozen() !== null) {\n this.deadline.set(Date.now() + (this.frozen() as number));\n this.now.set(Date.now());\n this.frozen.set(null);\n }\n });\n });\n\n private readonly refresh = effect(() => {\n this.resolvedFormat();\n this.endingSoon();\n untracked(() => this.now.set(Date.now()));\n });\n\n private readonly schedule = effect((onCleanup) => {\n const deadline = this.deadline();\n const frozen = this.frozen();\n this.now();\n if (deadline === null || frozen !== null) return;\n const remaining = deadline - Date.now();\n if (remaining <= 0) return;\n const step = this.resolvedFormat() === 'clock' || this.endingSoon() ? 1000 : TX_COUNTDOWN_UNIT_MS[this.unit()];\n const delay = remaining % step || step;\n this.timer = setTimeout(() => this.now.set(Date.now()), delay + 5);\n onCleanup(() => {\n if (this.timer) clearTimeout(this.timer);\n });\n });\n\n private readonly finish = effect(() => {\n const remaining = this.remainingMs();\n const expired = this.isExpired();\n untracked(() => {\n this.tick.emit(remaining);\n if (expired && !this.done) {\n this.done = true;\n this.completed.emit();\n }\n });\n });\n\n private readonly cleanup = inject(DestroyRef).onDestroy(() => {\n if (this.timer) clearTimeout(this.timer);\n });\n}\n"],"mappings":";;;;;;AAEA,MAAa,uBAAwD;CACnE,SAAS;CACT,SAAS;CACT,OAAO;CACP,MAAM;AACP;AAED,SAAgB,gBAAgB,IAA6B;CAC3D,MAAM,QAAQ,KAAK,IAAI,GAAG,KAAK,OAAO,MAAM,KAAK,GAAI,CAAC;CACtD,MAAM,QAAQ,KAAK,MAAM,QAAQ,IAAI;CACrC,MAAM,UAAU,KAAK,MAAO,QAAQ,OAAQ,EA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