@tectra-ng/ui 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (96) hide show
  1. package/country/README.md +14 -4
  2. package/data-view/README.md +71 -0
  3. package/fesm2022/tectra-ng-ui-autocomplete.mjs +2 -2
  4. package/fesm2022/tectra-ng-ui-autocomplete.mjs.map +1 -1
  5. package/fesm2022/tectra-ng-ui-cascade-select.mjs +2 -2
  6. package/fesm2022/tectra-ng-ui-cascade-select.mjs.map +1 -1
  7. package/fesm2022/tectra-ng-ui-chip.mjs +2 -2
  8. package/fesm2022/tectra-ng-ui-chip.mjs.map +1 -1
  9. package/fesm2022/tectra-ng-ui-chips-input.mjs +2 -2
  10. package/fesm2022/tectra-ng-ui-chips-input.mjs.map +1 -1
  11. package/fesm2022/tectra-ng-ui-color-picker.mjs +2 -2
  12. package/fesm2022/tectra-ng-ui-color-picker.mjs.map +1 -1
  13. package/fesm2022/tectra-ng-ui-country.mjs +47 -6
  14. package/fesm2022/tectra-ng-ui-country.mjs.map +1 -1
  15. package/fesm2022/tectra-ng-ui-data-view.mjs +1370 -0
  16. package/fesm2022/tectra-ng-ui-data-view.mjs.map +1 -0
  17. package/fesm2022/tectra-ng-ui-fieldset.mjs +2 -2
  18. package/fesm2022/tectra-ng-ui-fieldset.mjs.map +1 -1
  19. package/fesm2022/tectra-ng-ui-input-number.mjs +2 -2
  20. package/fesm2022/tectra-ng-ui-input-number.mjs.map +1 -1
  21. package/fesm2022/tectra-ng-ui-input.mjs +2 -2
  22. package/fesm2022/tectra-ng-ui-input.mjs.map +1 -1
  23. package/fesm2022/tectra-ng-ui-listbox.mjs +2 -2
  24. package/fesm2022/tectra-ng-ui-listbox.mjs.map +1 -1
  25. package/fesm2022/tectra-ng-ui-menu.mjs +2 -2
  26. package/fesm2022/tectra-ng-ui-menu.mjs.map +1 -1
  27. package/fesm2022/tectra-ng-ui-message.mjs +2 -2
  28. package/fesm2022/tectra-ng-ui-message.mjs.map +1 -1
  29. package/fesm2022/tectra-ng-ui-multiselect.mjs +2 -2
  30. package/fesm2022/tectra-ng-ui-multiselect.mjs.map +1 -1
  31. package/fesm2022/tectra-ng-ui-paginator.mjs +2 -2
  32. package/fesm2022/tectra-ng-ui-paginator.mjs.map +1 -1
  33. package/fesm2022/tectra-ng-ui-select.mjs +4 -4
  34. package/fesm2022/tectra-ng-ui-select.mjs.map +1 -1
  35. package/fesm2022/tectra-ng-ui-slider.mjs +2 -2
  36. package/fesm2022/tectra-ng-ui-slider.mjs.map +1 -1
  37. package/fesm2022/tectra-ng-ui-table.mjs +1373 -1333
  38. package/fesm2022/tectra-ng-ui-table.mjs.map +1 -1
  39. package/fesm2022/tectra-ng-ui-tag.mjs +2 -2
  40. package/fesm2022/tectra-ng-ui-tag.mjs.map +1 -1
  41. package/fesm2022/tectra-ng-ui-toggle-switch.mjs +2 -2
  42. package/fesm2022/tectra-ng-ui-toggle-switch.mjs.map +1 -1
  43. package/fesm2022/tectra-ng-ui-tree-select.mjs +7 -46
  44. package/fesm2022/tectra-ng-ui-tree-select.mjs.map +1 -1
  45. package/fesm2022/tectra-ng-ui-tree-table.mjs +901 -0
  46. package/fesm2022/tectra-ng-ui-tree-table.mjs.map +1 -0
  47. package/fesm2022/tectra-ng-ui-tree.mjs +1940 -0
  48. package/fesm2022/tectra-ng-ui-tree.mjs.map +1 -0
  49. package/fesm2022/tectra-ng-ui-virtual-scroller.mjs +928 -0
  50. package/fesm2022/tectra-ng-ui-virtual-scroller.mjs.map +1 -0
  51. package/package.json +17 -1
  52. package/tree/README.md +93 -0
  53. package/tree-table/README.md +84 -0
  54. package/types/tectra-ng-ui-autocomplete.d.ts +11 -0
  55. package/types/tectra-ng-ui-autocomplete.d.ts.map +1 -1
  56. package/types/tectra-ng-ui-chip.d.ts +3 -0
  57. package/types/tectra-ng-ui-chip.d.ts.map +1 -1
  58. package/types/tectra-ng-ui-country-select.d.ts +11 -0
  59. package/types/tectra-ng-ui-country-select.d.ts.map +1 -1
  60. package/types/tectra-ng-ui-country.d.ts +9 -3
  61. package/types/tectra-ng-ui-country.d.ts.map +1 -1
  62. package/types/tectra-ng-ui-data-view.d.ts +363 -0
  63. package/types/tectra-ng-ui-data-view.d.ts.map +1 -0
  64. package/types/tectra-ng-ui-fieldset.d.ts +8 -0
  65. package/types/tectra-ng-ui-fieldset.d.ts.map +1 -1
  66. package/types/tectra-ng-ui-input-number.d.ts +1 -0
  67. package/types/tectra-ng-ui-input-number.d.ts.map +1 -1
  68. package/types/tectra-ng-ui-input.d.ts +4 -0
  69. package/types/tectra-ng-ui-input.d.ts.map +1 -1
  70. package/types/tectra-ng-ui-menu.d.ts +2 -0
  71. package/types/tectra-ng-ui-menu.d.ts.map +1 -1
  72. package/types/tectra-ng-ui-message.d.ts +5 -0
  73. package/types/tectra-ng-ui-message.d.ts.map +1 -1
  74. package/types/tectra-ng-ui-multiselect.d.ts +11 -0
  75. package/types/tectra-ng-ui-multiselect.d.ts.map +1 -1
  76. package/types/tectra-ng-ui-paginator.d.ts +1 -0
  77. package/types/tectra-ng-ui-paginator.d.ts.map +1 -1
  78. package/types/tectra-ng-ui-select.d.ts +11 -0
  79. package/types/tectra-ng-ui-select.d.ts.map +1 -1
  80. package/types/tectra-ng-ui-slider.d.ts +1 -0
  81. package/types/tectra-ng-ui-slider.d.ts.map +1 -1
  82. package/types/tectra-ng-ui-table.d.ts +181 -15
  83. package/types/tectra-ng-ui-table.d.ts.map +1 -1
  84. package/types/tectra-ng-ui-tag.d.ts +8 -0
  85. package/types/tectra-ng-ui-tag.d.ts.map +1 -1
  86. package/types/tectra-ng-ui-toggle-switch.d.ts +5 -0
  87. package/types/tectra-ng-ui-toggle-switch.d.ts.map +1 -1
  88. package/types/tectra-ng-ui-tree-select.d.ts +19 -22
  89. package/types/tectra-ng-ui-tree-select.d.ts.map +1 -1
  90. package/types/tectra-ng-ui-tree-table.d.ts +94 -0
  91. package/types/tectra-ng-ui-tree-table.d.ts.map +1 -0
  92. package/types/tectra-ng-ui-tree.d.ts +571 -0
  93. package/types/tectra-ng-ui-tree.d.ts.map +1 -0
  94. package/types/tectra-ng-ui-virtual-scroller.d.ts +297 -0
  95. package/types/tectra-ng-ui-virtual-scroller.d.ts.map +1 -0
  96. package/virtual-scroller/README.md +60 -0
@@ -0,0 +1,928 @@
1
+ import { NgTemplateOutlet } from "@angular/common";
2
+ import * as i0 from "@angular/core";
3
+ import { ChangeDetectionStrategy, Component, DestroyRef, Directive, ElementRef, TemplateRef, afterNextRender, booleanAttribute, computed, contentChild, effect, inject, input, numberAttribute, output, signal, untracked } from "@angular/core";
4
+ import { injectPassThrough, injectUnstyled } from "@tectra-ng/core/config";
5
+ import { injectTranslations } from "@tectra-ng/core/i18n";
6
+ import { optionalBoolean, optionalNumber } from "@tectra-ng/core/utils";
7
+ import { TxIcon } from "@tectra-ng/icons";
8
+ import { toStyleObject } from "@tectra-ng/themes";
9
+ var TxVirtualScrollerItem = class TxVirtualScrollerItem {
10
+ templateRef = inject(TemplateRef);
11
+ static ɵfac = i0.ɵɵngDeclareFactory({
12
+ minVersion: "12.0.0",
13
+ version: "22.2.3",
14
+ ngImport: i0,
15
+ type: TxVirtualScrollerItem,
16
+ deps: [],
17
+ target: i0.ɵɵFactoryTarget.Directive
18
+ });
19
+ static ɵdir = i0.ɵɵngDeclareDirective({
20
+ minVersion: "14.0.0",
21
+ version: "22.2.3",
22
+ type: TxVirtualScrollerItem,
23
+ isStandalone: true,
24
+ selector: "ng-template[txVirtualScrollerItem]",
25
+ ngImport: i0
26
+ });
27
+ };
28
+ i0.ɵɵngDeclareClassMetadata({
29
+ minVersion: "12.0.0",
30
+ version: "22.2.3",
31
+ ngImport: i0,
32
+ type: TxVirtualScrollerItem,
33
+ decorators: [{
34
+ type: Directive,
35
+ args: [{ selector: "ng-template[txVirtualScrollerItem]" }]
36
+ }]
37
+ });
38
+ var TxVirtualScrollerLoader = class TxVirtualScrollerLoader {
39
+ templateRef = inject(TemplateRef);
40
+ static ɵfac = i0.ɵɵngDeclareFactory({
41
+ minVersion: "12.0.0",
42
+ version: "22.2.3",
43
+ ngImport: i0,
44
+ type: TxVirtualScrollerLoader,
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: TxVirtualScrollerLoader,
52
+ isStandalone: true,
53
+ selector: "ng-template[txVirtualScrollerLoader]",
54
+ ngImport: i0
55
+ });
56
+ };
57
+ i0.ɵɵngDeclareClassMetadata({
58
+ minVersion: "12.0.0",
59
+ version: "22.2.3",
60
+ ngImport: i0,
61
+ type: TxVirtualScrollerLoader,
62
+ decorators: [{
63
+ type: Directive,
64
+ args: [{ selector: "ng-template[txVirtualScrollerLoader]" }]
65
+ }]
66
+ });
67
+ var TxVirtualScrollerLoadingIcon = class TxVirtualScrollerLoadingIcon {
68
+ templateRef = inject(TemplateRef);
69
+ static ɵfac = i0.ɵɵngDeclareFactory({
70
+ minVersion: "12.0.0",
71
+ version: "22.2.3",
72
+ ngImport: i0,
73
+ type: TxVirtualScrollerLoadingIcon,
74
+ deps: [],
75
+ target: i0.ɵɵFactoryTarget.Directive
76
+ });
77
+ static ɵdir = i0.ɵɵngDeclareDirective({
78
+ minVersion: "14.0.0",
79
+ version: "22.2.3",
80
+ type: TxVirtualScrollerLoadingIcon,
81
+ isStandalone: true,
82
+ selector: "ng-template[txVirtualScrollerLoadingIcon]",
83
+ ngImport: i0
84
+ });
85
+ };
86
+ i0.ɵɵngDeclareClassMetadata({
87
+ minVersion: "12.0.0",
88
+ version: "22.2.3",
89
+ ngImport: i0,
90
+ type: TxVirtualScrollerLoadingIcon,
91
+ decorators: [{
92
+ type: Directive,
93
+ args: [{ selector: "ng-template[txVirtualScrollerLoadingIcon]" }]
94
+ }]
95
+ });
96
+ var TxVirtualScrollerContent = class TxVirtualScrollerContent {
97
+ templateRef = inject(TemplateRef);
98
+ static ɵfac = i0.ɵɵngDeclareFactory({
99
+ minVersion: "12.0.0",
100
+ version: "22.2.3",
101
+ ngImport: i0,
102
+ type: TxVirtualScrollerContent,
103
+ deps: [],
104
+ target: i0.ɵɵFactoryTarget.Directive
105
+ });
106
+ static ɵdir = i0.ɵɵngDeclareDirective({
107
+ minVersion: "14.0.0",
108
+ version: "22.2.3",
109
+ type: TxVirtualScrollerContent,
110
+ isStandalone: true,
111
+ selector: "ng-template[txVirtualScrollerContent]",
112
+ ngImport: i0
113
+ });
114
+ };
115
+ i0.ɵɵngDeclareClassMetadata({
116
+ minVersion: "12.0.0",
117
+ version: "22.2.3",
118
+ ngImport: i0,
119
+ type: TxVirtualScrollerContent,
120
+ decorators: [{
121
+ type: Directive,
122
+ args: [{ selector: "ng-template[txVirtualScrollerContent]" }]
123
+ }]
124
+ });
125
+ var TxVirtualScroller = class TxVirtualScroller {
126
+ items = input(void 0, ...ngDevMode ? [{ debugName: "items" }] : /* istanbul ignore next */ []);
127
+ itemSize = input(40, ...ngDevMode ? [{ debugName: "itemSize" }] : /* istanbul ignore next */ []);
128
+ scrollHeight = input(void 0, ...ngDevMode ? [{ debugName: "scrollHeight" }] : /* istanbul ignore next */ []);
129
+ scrollWidth = input(void 0, ...ngDevMode ? [{ debugName: "scrollWidth" }] : /* istanbul ignore next */ []);
130
+ orientation = input("vertical", ...ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []);
131
+ numToleratedItems = input(void 0, {
132
+ ...ngDevMode ? { debugName: "numToleratedItems" } : /* istanbul ignore next */ {},
133
+ transform: optionalNumber
134
+ });
135
+ delay = input(0, {
136
+ ...ngDevMode ? { debugName: "delay" } : /* istanbul ignore next */ {},
137
+ transform: numberAttribute
138
+ });
139
+ step = input(0, {
140
+ ...ngDevMode ? { debugName: "step" } : /* istanbul ignore next */ {},
141
+ transform: numberAttribute
142
+ });
143
+ lazy = input(false, {
144
+ ...ngDevMode ? { debugName: "lazy" } : /* istanbul ignore next */ {},
145
+ transform: booleanAttribute
146
+ });
147
+ appendOnly = input(false, {
148
+ ...ngDevMode ? { debugName: "appendOnly" } : /* istanbul ignore next */ {},
149
+ transform: booleanAttribute
150
+ });
151
+ disabled = input(false, {
152
+ ...ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {},
153
+ transform: booleanAttribute
154
+ });
155
+ showSpacer = input(true, {
156
+ ...ngDevMode ? { debugName: "showSpacer" } : /* istanbul ignore next */ {},
157
+ transform: booleanAttribute
158
+ });
159
+ showLoader = input(false, {
160
+ ...ngDevMode ? { debugName: "showLoader" } : /* istanbul ignore next */ {},
161
+ transform: booleanAttribute
162
+ });
163
+ loading = input(false, {
164
+ ...ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {},
165
+ transform: booleanAttribute
166
+ });
167
+ loadingIcon = input("spinner", ...ngDevMode ? [{ debugName: "loadingIcon" }] : /* istanbul ignore next */ []);
168
+ trackBy = input(void 0, ...ngDevMode ? [{ debugName: "trackBy" }] : /* istanbul ignore next */ []);
169
+ tabindex = input(0, {
170
+ ...ngDevMode ? { debugName: "tabindex" } : /* istanbul ignore next */ {},
171
+ transform: numberAttribute
172
+ });
173
+ ariaLabel = input(void 0, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
174
+ ariaLabelledBy = input(void 0, ...ngDevMode ? [{ debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []);
175
+ dt = input(void 0, ...ngDevMode ? [{ debugName: "dt" }] : /* istanbul ignore next */ []);
176
+ pt = input(void 0, ...ngDevMode ? [{ debugName: "pt" }] : /* istanbul ignore next */ []);
177
+ ptOptions = input(void 0, ...ngDevMode ? [{ debugName: "ptOptions" }] : /* istanbul ignore next */ []);
178
+ unstyled = input(void 0, {
179
+ ...ngDevMode ? { debugName: "unstyled" } : /* istanbul ignore next */ {},
180
+ transform: optionalBoolean
181
+ });
182
+ lazyLoad = output();
183
+ scrolled = output();
184
+ scrollIndexChange = output();
185
+ itemTemplate = contentChild(TxVirtualScrollerItem, ...ngDevMode ? [{ debugName: "itemTemplate" }] : /* istanbul ignore next */ []);
186
+ loaderTemplate = contentChild(TxVirtualScrollerLoader, ...ngDevMode ? [{ debugName: "loaderTemplate" }] : /* istanbul ignore next */ []);
187
+ loadingIconTemplate = contentChild(TxVirtualScrollerLoadingIcon, ...ngDevMode ? [{ debugName: "loadingIconTemplate" }] : /* istanbul ignore next */ []);
188
+ contentTemplate = contentChild(TxVirtualScrollerContent, ...ngDevMode ? [{ debugName: "contentTemplate" }] : /* istanbul ignore next */ []);
189
+ host = inject(ElementRef);
190
+ destroy = inject(DestroyRef);
191
+ cleanup = this.destroy.onDestroy(() => clearTimeout(this.timer));
192
+ timer;
193
+ lastLazy = "";
194
+ lastViewport = "";
195
+ translations = injectTranslations();
196
+ isUnstyled = injectUnstyled(this.unstyled);
197
+ passThrough = injectPassThrough("virtualScroller", this, this.pt, this.ptOptions);
198
+ hostStyle = computed(() => ({
199
+ ...toStyleObject(this.dt(), "--tx-virtual-scroller"),
200
+ ...this.scrollHeight() ? { height: this.scrollHeight() } : {},
201
+ ...this.scrollWidth() ? { width: this.scrollWidth() } : {},
202
+ ...this.passThrough().root?.style
203
+ }), ...ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []);
204
+ scrollTop = signal(0, ...ngDevMode ? [{ debugName: "scrollTop" }] : /* istanbul ignore next */ []);
205
+ scrollLeft = signal(0, ...ngDevMode ? [{ debugName: "scrollLeft" }] : /* istanbul ignore next */ []);
206
+ viewportHeight = signal(0, ...ngDevMode ? [{ debugName: "viewportHeight" }] : /* istanbul ignore next */ []);
207
+ viewportWidth = signal(0, ...ngDevMode ? [{ debugName: "viewportWidth" }] : /* istanbul ignore next */ []);
208
+ scrolling = signal(false, ...ngDevMode ? [{ debugName: "scrolling" }] : /* istanbul ignore next */ []);
209
+ both = computed(() => this.orientation() === "both", ...ngDevMode ? [{ debugName: "both" }] : /* istanbul ignore next */ []);
210
+ horizontal = computed(() => this.orientation() === "horizontal", ...ngDevMode ? [{ debugName: "horizontal" }] : /* istanbul ignore next */ []);
211
+ rowSize = computed(() => {
212
+ const size = this.itemSize();
213
+ return typeof size === "number" ? size : size[0];
214
+ }, ...ngDevMode ? [{ debugName: "rowSize" }] : /* istanbul ignore next */ []);
215
+ columnSize = computed(() => {
216
+ const size = this.itemSize();
217
+ return typeof size === "number" ? size : size[1];
218
+ }, ...ngDevMode ? [{ debugName: "columnSize" }] : /* istanbul ignore next */ []);
219
+ list = computed(() => this.items() ?? [], ...ngDevMode ? [{ debugName: "list" }] : /* istanbul ignore next */ []);
220
+ grid = computed(() => this.both() ? this.items() ?? [] : [], ...ngDevMode ? [{ debugName: "grid" }] : /* istanbul ignore next */ []);
221
+ rowCount = computed(() => this.horizontal() ? 1 : this.both() ? this.grid().length : this.list().length, ...ngDevMode ? [{ debugName: "rowCount" }] : /* istanbul ignore next */ []);
222
+ columnCount = computed(() => {
223
+ if (this.horizontal()) return this.list().length;
224
+ if (!this.both()) return 1;
225
+ return this.grid().reduce((max, row) => Math.max(max, row?.length ?? 0), 0);
226
+ }, ...ngDevMode ? [{ debugName: "columnCount" }] : /* istanbul ignore next */ []);
227
+ rows = computed(() => this.horizontal() ? this.fullRange(1) : this.axisRange(this.scrollTop(), this.viewportHeight(), this.rowSize(), this.rowCount()), ...ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []);
228
+ columns = computed(() => {
229
+ if (!this.horizontal() && !this.both()) return this.fullRange(1);
230
+ return this.axisRange(this.scrollLeft(), this.viewportWidth(), this.columnSize(), this.columnCount());
231
+ }, ...ngDevMode ? [{ debugName: "columns" }] : /* istanbul ignore next */ []);
232
+ totalHeight = computed(() => this.horizontal() ? null : this.rowCount() * this.rowSize(), ...ngDevMode ? [{ debugName: "totalHeight" }] : /* istanbul ignore next */ []);
233
+ totalWidth = computed(() => this.horizontal() || this.both() ? this.columnCount() * this.columnSize() : null, ...ngDevMode ? [{ debugName: "totalWidth" }] : /* istanbul ignore next */ []);
234
+ offsetTop = computed(() => this.horizontal() ? 0 : this.rows().first * this.rowSize(), ...ngDevMode ? [{ debugName: "offsetTop" }] : /* istanbul ignore next */ []);
235
+ offsetLeft = computed(() => this.horizontal() || this.both() ? this.columns().first * this.columnSize() : 0, ...ngDevMode ? [{ debugName: "offsetLeft" }] : /* istanbul ignore next */ []);
236
+ contentTransform = computed(() => `translate3d(${this.offsetLeft()}px, ${this.offsetTop()}px, 0)`, ...ngDevMode ? [{ debugName: "contentTransform" }] : /* istanbul ignore next */ []);
237
+ renderedItems = computed(() => {
238
+ if (this.both()) return [];
239
+ const { first, last } = this.horizontal() ? this.columns() : this.rows();
240
+ const list = this.list();
241
+ const cells = [];
242
+ for (let index = first; index < last; index += 1) cells.push({
243
+ index,
244
+ item: list[index]
245
+ });
246
+ return cells;
247
+ }, ...ngDevMode ? [{ debugName: "renderedItems" }] : /* istanbul ignore next */ []);
248
+ renderedRows = computed(() => {
249
+ if (!this.both()) return [];
250
+ const rows = this.rows();
251
+ const columns = this.columns();
252
+ const grid = this.grid();
253
+ const result = [];
254
+ for (let row = rows.first; row < rows.last; row += 1) {
255
+ const cells = [];
256
+ for (let column = columns.first; column < columns.last; column += 1) cells.push({
257
+ index: column,
258
+ item: grid[row]?.[column]
259
+ });
260
+ result.push({
261
+ index: row,
262
+ cells
263
+ });
264
+ }
265
+ return result;
266
+ }, ...ngDevMode ? [{ debugName: "renderedRows" }] : /* istanbul ignore next */ []);
267
+ showLoaderMask = computed(() => this.showLoader() && (this.loading() || this.scrolling()) && !this.loaderTemplate(), ...ngDevMode ? [{ debugName: "showLoaderMask" }] : /* istanbul ignore next */ []);
268
+ showLoaderItems = computed(() => this.showLoader() && (this.loading() || this.scrolling()) && !!this.loaderTemplate(), ...ngDevMode ? [{ debugName: "showLoaderItems" }] : /* istanbul ignore next */ []);
269
+ contentContext = computed(() => {
270
+ const items = this.renderedItems().map((cell) => cell.item);
271
+ const range = this.horizontal() ? this.columns() : this.rows();
272
+ return {
273
+ $implicit: items,
274
+ items,
275
+ first: range.first,
276
+ last: range.last,
277
+ count: this.horizontal() ? this.columnCount() : this.rowCount(),
278
+ spacerBefore: this.horizontal() ? this.offsetLeft() : this.offsetTop(),
279
+ itemSize: this.horizontal() ? this.columnSize() : this.rowSize()
280
+ };
281
+ }, ...ngDevMode ? [{ debugName: "contentContext" }] : /* istanbul ignore next */ []);
282
+ constructor() {
283
+ afterNextRender(() => {
284
+ this.measure();
285
+ if (typeof ResizeObserver === "undefined") return;
286
+ const observer = new ResizeObserver(() => this.measure());
287
+ observer.observe(this.host.nativeElement);
288
+ this.destroy.onDestroy(() => observer.disconnect());
289
+ });
290
+ effect(() => {
291
+ if (!this.lazy()) return;
292
+ const range = this.horizontal() ? this.columns() : this.rows();
293
+ const step = this.step();
294
+ const count = this.horizontal() ? this.columnCount() : this.rowCount();
295
+ const first = step > 0 ? Math.floor(range.first / step) * step : range.first;
296
+ const last = step > 0 ? Math.min(Math.max(count, range.last), Math.ceil(range.last / step) * step) : range.last;
297
+ const key = `${first}:${last}`;
298
+ if (key === this.lastLazy) return;
299
+ this.lastLazy = key;
300
+ untracked(() => this.lazyLoad.emit({
301
+ first,
302
+ last
303
+ }));
304
+ });
305
+ effect(() => {
306
+ const viewport = this.renderedRange().viewport;
307
+ const key = JSON.stringify(viewport);
308
+ if (key === this.lastViewport) return;
309
+ this.lastViewport = key;
310
+ untracked(() => this.scrollIndexChange.emit(viewport));
311
+ });
312
+ }
313
+ renderedRange = computed(() => {
314
+ const rows = this.rows();
315
+ const columns = this.columns();
316
+ if (this.both()) return {
317
+ first: [rows.first, columns.first],
318
+ last: [rows.last, columns.last],
319
+ viewport: {
320
+ first: [rows.viewFirst, columns.viewFirst],
321
+ last: [rows.viewLast, columns.viewLast]
322
+ }
323
+ };
324
+ const range = this.horizontal() ? columns : rows;
325
+ return {
326
+ first: range.first,
327
+ last: range.last,
328
+ viewport: {
329
+ first: range.viewFirst,
330
+ last: range.viewLast
331
+ }
332
+ };
333
+ }, ...ngDevMode ? [{ debugName: "renderedRange" }] : /* istanbul ignore next */ []);
334
+ getRenderedRange() {
335
+ return this.renderedRange();
336
+ }
337
+ trackOf(index, item) {
338
+ const own = this.trackBy();
339
+ return own ? own(index, item) : index;
340
+ }
341
+ itemContext(cell, count) {
342
+ return {
343
+ $implicit: cell.item,
344
+ index: cell.index,
345
+ count,
346
+ first: cell.index === 0,
347
+ last: cell.index === count - 1,
348
+ even: cell.index % 2 === 0,
349
+ odd: cell.index % 2 === 1
350
+ };
351
+ }
352
+ onScroll(event) {
353
+ const element = event.target;
354
+ const top = element.scrollTop;
355
+ const left = element.scrollLeft;
356
+ this.scrolled.emit({ originalEvent: event });
357
+ const apply = () => {
358
+ this.scrollTop.set(top);
359
+ this.scrollLeft.set(left);
360
+ this.viewportHeight.set(element.clientHeight);
361
+ this.viewportWidth.set(element.clientWidth);
362
+ this.scrolling.set(false);
363
+ };
364
+ if (this.delay() > 0) {
365
+ clearTimeout(this.timer);
366
+ this.scrolling.set(true);
367
+ this.timer = setTimeout(apply, this.delay());
368
+ } else apply();
369
+ }
370
+ scrollTo(options) {
371
+ this.host.nativeElement.scrollTo?.(options);
372
+ if (options.behavior === "smooth") return;
373
+ if (options.top !== void 0) this.scrollTop.set(Math.max(0, options.top));
374
+ if (options.left !== void 0) this.scrollLeft.set(Math.max(0, options.left));
375
+ }
376
+ scrollToIndex(index, behavior = "auto") {
377
+ const [row, column] = this.positionOf(index);
378
+ this.scrollTo({
379
+ top: row * this.rowSize(),
380
+ left: column * this.columnSize(),
381
+ behavior
382
+ });
383
+ }
384
+ scrollInView(index, to, behavior = "auto") {
385
+ const [row, column] = this.positionOf(index);
386
+ if (to === "to-start") {
387
+ this.scrollToIndex(index, behavior);
388
+ return;
389
+ }
390
+ this.scrollTo({
391
+ top: Math.max(0, (row + 1) * this.rowSize() - this.viewportHeight()),
392
+ left: Math.max(0, (column + 1) * this.columnSize() - this.viewportWidth()),
393
+ behavior
394
+ });
395
+ }
396
+ refresh() {
397
+ this.measure();
398
+ }
399
+ positionOf(index) {
400
+ if (typeof index !== "number") return [index[0], index[1]];
401
+ return this.horizontal() ? [0, index] : [index, 0];
402
+ }
403
+ measure() {
404
+ const element = this.host.nativeElement;
405
+ this.viewportHeight.set(element.clientHeight);
406
+ this.viewportWidth.set(element.clientWidth);
407
+ }
408
+ fullRange(count) {
409
+ return {
410
+ first: 0,
411
+ last: count,
412
+ viewFirst: 0,
413
+ viewLast: count
414
+ };
415
+ }
416
+ axisRange(scroll, viewport, size, count) {
417
+ if (this.disabled() || size <= 0) return this.fullRange(count);
418
+ const space = viewport || size * 10;
419
+ const visible = Math.ceil(space / size);
420
+ const tolerance = this.numToleratedItems() ?? Math.ceil(visible / 2);
421
+ const viewFirst = Math.min(count, Math.floor(scroll / size));
422
+ const viewLast = Math.min(count, Math.ceil((scroll + space) / size));
423
+ return {
424
+ first: this.appendOnly() ? 0 : Math.max(0, viewFirst - tolerance),
425
+ last: Math.min(count, viewLast + tolerance),
426
+ viewFirst,
427
+ viewLast
428
+ };
429
+ }
430
+ static ɵfac = i0.ɵɵngDeclareFactory({
431
+ minVersion: "12.0.0",
432
+ version: "22.2.3",
433
+ ngImport: i0,
434
+ type: TxVirtualScroller,
435
+ deps: [],
436
+ target: i0.ɵɵFactoryTarget.Component
437
+ });
438
+ static ɵcmp = i0.ɵɵngDeclareComponent({
439
+ minVersion: "17.0.0",
440
+ version: "22.2.3",
441
+ type: TxVirtualScroller,
442
+ isStandalone: true,
443
+ selector: "tx-virtual-scroller",
444
+ inputs: {
445
+ items: {
446
+ classPropertyName: "items",
447
+ publicName: "items",
448
+ isSignal: true,
449
+ isRequired: false,
450
+ transformFunction: null
451
+ },
452
+ itemSize: {
453
+ classPropertyName: "itemSize",
454
+ publicName: "itemSize",
455
+ isSignal: true,
456
+ isRequired: false,
457
+ transformFunction: null
458
+ },
459
+ scrollHeight: {
460
+ classPropertyName: "scrollHeight",
461
+ publicName: "scrollHeight",
462
+ isSignal: true,
463
+ isRequired: false,
464
+ transformFunction: null
465
+ },
466
+ scrollWidth: {
467
+ classPropertyName: "scrollWidth",
468
+ publicName: "scrollWidth",
469
+ isSignal: true,
470
+ isRequired: false,
471
+ transformFunction: null
472
+ },
473
+ orientation: {
474
+ classPropertyName: "orientation",
475
+ publicName: "orientation",
476
+ isSignal: true,
477
+ isRequired: false,
478
+ transformFunction: null
479
+ },
480
+ numToleratedItems: {
481
+ classPropertyName: "numToleratedItems",
482
+ publicName: "numToleratedItems",
483
+ isSignal: true,
484
+ isRequired: false,
485
+ transformFunction: null
486
+ },
487
+ delay: {
488
+ classPropertyName: "delay",
489
+ publicName: "delay",
490
+ isSignal: true,
491
+ isRequired: false,
492
+ transformFunction: null
493
+ },
494
+ step: {
495
+ classPropertyName: "step",
496
+ publicName: "step",
497
+ isSignal: true,
498
+ isRequired: false,
499
+ transformFunction: null
500
+ },
501
+ lazy: {
502
+ classPropertyName: "lazy",
503
+ publicName: "lazy",
504
+ isSignal: true,
505
+ isRequired: false,
506
+ transformFunction: null
507
+ },
508
+ appendOnly: {
509
+ classPropertyName: "appendOnly",
510
+ publicName: "appendOnly",
511
+ isSignal: true,
512
+ isRequired: false,
513
+ transformFunction: null
514
+ },
515
+ disabled: {
516
+ classPropertyName: "disabled",
517
+ publicName: "disabled",
518
+ isSignal: true,
519
+ isRequired: false,
520
+ transformFunction: null
521
+ },
522
+ showSpacer: {
523
+ classPropertyName: "showSpacer",
524
+ publicName: "showSpacer",
525
+ isSignal: true,
526
+ isRequired: false,
527
+ transformFunction: null
528
+ },
529
+ showLoader: {
530
+ classPropertyName: "showLoader",
531
+ publicName: "showLoader",
532
+ isSignal: true,
533
+ isRequired: false,
534
+ transformFunction: null
535
+ },
536
+ loading: {
537
+ classPropertyName: "loading",
538
+ publicName: "loading",
539
+ isSignal: true,
540
+ isRequired: false,
541
+ transformFunction: null
542
+ },
543
+ loadingIcon: {
544
+ classPropertyName: "loadingIcon",
545
+ publicName: "loadingIcon",
546
+ isSignal: true,
547
+ isRequired: false,
548
+ transformFunction: null
549
+ },
550
+ trackBy: {
551
+ classPropertyName: "trackBy",
552
+ publicName: "trackBy",
553
+ isSignal: true,
554
+ isRequired: false,
555
+ transformFunction: null
556
+ },
557
+ tabindex: {
558
+ classPropertyName: "tabindex",
559
+ publicName: "tabindex",
560
+ isSignal: true,
561
+ isRequired: false,
562
+ transformFunction: null
563
+ },
564
+ ariaLabel: {
565
+ classPropertyName: "ariaLabel",
566
+ publicName: "ariaLabel",
567
+ isSignal: true,
568
+ isRequired: false,
569
+ transformFunction: null
570
+ },
571
+ ariaLabelledBy: {
572
+ classPropertyName: "ariaLabelledBy",
573
+ publicName: "ariaLabelledBy",
574
+ isSignal: true,
575
+ isRequired: false,
576
+ transformFunction: null
577
+ },
578
+ dt: {
579
+ classPropertyName: "dt",
580
+ publicName: "dt",
581
+ isSignal: true,
582
+ isRequired: false,
583
+ transformFunction: null
584
+ },
585
+ pt: {
586
+ classPropertyName: "pt",
587
+ publicName: "pt",
588
+ isSignal: true,
589
+ isRequired: false,
590
+ transformFunction: null
591
+ },
592
+ ptOptions: {
593
+ classPropertyName: "ptOptions",
594
+ publicName: "ptOptions",
595
+ isSignal: true,
596
+ isRequired: false,
597
+ transformFunction: null
598
+ },
599
+ unstyled: {
600
+ classPropertyName: "unstyled",
601
+ publicName: "unstyled",
602
+ isSignal: true,
603
+ isRequired: false,
604
+ transformFunction: null
605
+ }
606
+ },
607
+ outputs: {
608
+ lazyLoad: "lazyLoad",
609
+ scrolled: "scrolled",
610
+ scrollIndexChange: "scrollIndexChange"
611
+ },
612
+ host: {
613
+ listeners: { "scroll": "onScroll($event)" },
614
+ properties: {
615
+ "class": "passThrough().root?.class",
616
+ "style": "hostStyle()",
617
+ "attr.data-styled": "!isUnstyled() || null",
618
+ "attr.data-orientation": "orientation()",
619
+ "class.tx-virtual-scroller--disabled": "disabled()",
620
+ "class.tx-virtual-scroller--loading": "showLoaderMask()",
621
+ "attr.tabindex": "tabindex()",
622
+ "attr.role": "ariaLabel() || ariaLabelledBy() ? \"region\" : null",
623
+ "attr.aria-label": "ariaLabel() ?? null",
624
+ "attr.aria-labelledby": "ariaLabelledBy() ?? null",
625
+ "attr.aria-busy": "loading() || null"
626
+ },
627
+ classAttribute: "tx-virtual-scroller"
628
+ },
629
+ queries: [
630
+ {
631
+ propertyName: "itemTemplate",
632
+ first: true,
633
+ predicate: TxVirtualScrollerItem,
634
+ descendants: true,
635
+ isSignal: true
636
+ },
637
+ {
638
+ propertyName: "loaderTemplate",
639
+ first: true,
640
+ predicate: TxVirtualScrollerLoader,
641
+ descendants: true,
642
+ isSignal: true
643
+ },
644
+ {
645
+ propertyName: "loadingIconTemplate",
646
+ first: true,
647
+ predicate: TxVirtualScrollerLoadingIcon,
648
+ descendants: true,
649
+ isSignal: true
650
+ },
651
+ {
652
+ propertyName: "contentTemplate",
653
+ first: true,
654
+ predicate: TxVirtualScrollerContent,
655
+ descendants: true,
656
+ isSignal: true
657
+ }
658
+ ],
659
+ ngImport: i0,
660
+ template: "@if (showSpacer()) {\n <div\n class=\"tx-virtual-scroller__spacer\"\n aria-hidden=\"true\"\n [style.height.px]=\"totalHeight()\"\n [style.width.px]=\"totalWidth()\"\n [class]=\"passThrough().spacer?.class\"\n [style]=\"passThrough().spacer?.style\"\n ></div>\n}\n\n<div\n class=\"tx-virtual-scroller__content\"\n [class.tx-virtual-scroller__content--horizontal]=\"horizontal()\"\n [style.transform]=\"contentTransform()\"\n [class]=\"passThrough().content?.class\"\n [style]=\"passThrough().content?.style\"\n>\n @if (contentTemplate(); as content) {\n <ng-container [ngTemplateOutlet]=\"content.templateRef\" [ngTemplateOutletContext]=\"contentContext()\" />\n } @else if (both()) {\n @for (row of renderedRows(); track row.index) {\n <div class=\"tx-virtual-scroller__row\" [style.height.px]=\"rowSize()\" [class]=\"passThrough().row?.class\" [style]=\"passThrough().row?.style\">\n @for (cell of row.cells; track trackOf(cell.index, cell.item)) {\n <div class=\"tx-virtual-scroller__item\" [style.width.px]=\"columnSize()\" [class]=\"passThrough().item?.class\" [style]=\"passThrough().item?.style\">\n <ng-container [ngTemplateOutlet]=\"cellContent\" [ngTemplateOutletContext]=\"{ $implicit: cell, count: columnCount() }\" />\n </div>\n }\n </div>\n }\n } @else {\n @for (cell of renderedItems(); track trackOf(cell.index, cell.item)) {\n <div\n class=\"tx-virtual-scroller__item\"\n [style.height.px]=\"horizontal() ? null : rowSize()\"\n [style.width.px]=\"horizontal() ? columnSize() : null\"\n [class]=\"passThrough().item?.class\"\n [style]=\"passThrough().item?.style\"\n >\n <ng-container [ngTemplateOutlet]=\"cellContent\" [ngTemplateOutletContext]=\"{ $implicit: cell, count: horizontal() ? columnCount() : rowCount() }\" />\n </div>\n }\n }\n</div>\n\n@if (showLoaderMask()) {\n <div class=\"tx-virtual-scroller__loader\" [class]=\"passThrough().loader?.class\" [style]=\"passThrough().loader?.style\">\n @if (loadingIconTemplate(); as icon) {\n <ng-container [ngTemplateOutlet]=\"icon.templateRef\" />\n } @else {\n <tx-icon\n class=\"tx-virtual-scroller__loading-icon\"\n role=\"img\"\n [name]=\"loadingIcon()\"\n [attr.aria-label]=\"translations().loading\"\n [class]=\"passThrough().loadingIcon?.class\"\n [style]=\"passThrough().loadingIcon?.style\"\n />\n }\n </div>\n}\n\n<ng-template #cellContent let-cell let-count=\"count\">\n @if (showLoaderItems() || (cell.item === undefined && loaderTemplate())) {\n <ng-container [ngTemplateOutlet]=\"loaderTemplate()?.templateRef ?? null\" [ngTemplateOutletContext]=\"{ $implicit: cell.index, index: cell.index, count }\" />\n } @else if (itemTemplate(); as item) {\n <ng-container [ngTemplateOutlet]=\"item.templateRef\" [ngTemplateOutletContext]=\"itemContext(cell, count)\" />\n }\n</ng-template>\n",
661
+ styles: [":host{position:relative;display:block;overflow:auto;contain:strict;overscroll-behavior:contain}:host(.tx-virtual-scroller--disabled){contain:none}.tx-virtual-scroller__spacer{position:absolute;inset-block-start:0;inset-inline-start:0;width:1px;height:1px;pointer-events:none}.tx-virtual-scroller__content{position:absolute;inset-block-start:0;inset-inline-start:0;min-width:100%;will-change:transform}.tx-virtual-scroller__content--horizontal,.tx-virtual-scroller__row{display:flex}.tx-virtual-scroller__content--horizontal{height:100%}.tx-virtual-scroller__item{box-sizing:border-box;flex:none;overflow:hidden}.tx-virtual-scroller__loader{position:sticky;inset:0;z-index:1;display:flex;align-items:center;justify-content:center;width:100%;height:100%}:host([data-styled]){outline:var(--tx-virtual-scroller-focus-ring-width) solid transparent;outline-offset:var(--tx-virtual-scroller-focus-ring-offset);transition:outline-color var(--tx-motion-duration) var(--tx-motion-easing)}:host([data-styled]):focus-visible{outline-color:var(--tx-virtual-scroller-focus-ring-color)}:host([data-styled]) .tx-virtual-scroller__loader{background:var(--tx-virtual-scroller-loader-background);color:var(--tx-virtual-scroller-loader-color)}:host([data-styled]) .tx-virtual-scroller__loading-icon{width:var(--tx-virtual-scroller-loader-icon-size);height:var(--tx-virtual-scroller-loader-icon-size);font-size:var(--tx-virtual-scroller-loader-icon-size);animation:tx-virtual-scroller-spin .8s linear infinite}@keyframes tx-virtual-scroller-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){:host([data-styled]){transition:none}:host([data-styled]) .tx-virtual-scroller__loading-icon{animation-duration:2.4s}}\n"],
662
+ dependencies: [{
663
+ kind: "directive",
664
+ type: NgTemplateOutlet,
665
+ selector: "[ngTemplateOutlet]",
666
+ inputs: [
667
+ "ngTemplateOutletContext",
668
+ "ngTemplateOutlet",
669
+ "ngTemplateOutletInjector"
670
+ ]
671
+ }, {
672
+ kind: "component",
673
+ type: TxIcon,
674
+ selector: "tx-icon",
675
+ inputs: ["name"]
676
+ }],
677
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
678
+ });
679
+ };
680
+ i0.ɵɵngDeclareClassMetadata({
681
+ minVersion: "12.0.0",
682
+ version: "22.2.3",
683
+ ngImport: i0,
684
+ type: TxVirtualScroller,
685
+ decorators: [{
686
+ type: Component,
687
+ args: [{
688
+ selector: "tx-virtual-scroller",
689
+ imports: [NgTemplateOutlet, TxIcon],
690
+ changeDetection: ChangeDetectionStrategy.OnPush,
691
+ host: {
692
+ class: "tx-virtual-scroller",
693
+ "[class]": "passThrough().root?.class",
694
+ "[style]": "hostStyle()",
695
+ "[attr.data-styled]": "!isUnstyled() || null",
696
+ "[attr.data-orientation]": "orientation()",
697
+ "[class.tx-virtual-scroller--disabled]": "disabled()",
698
+ "[class.tx-virtual-scroller--loading]": "showLoaderMask()",
699
+ "[attr.tabindex]": "tabindex()",
700
+ "[attr.role]": "ariaLabel() || ariaLabelledBy() ? \"region\" : null",
701
+ "[attr.aria-label]": "ariaLabel() ?? null",
702
+ "[attr.aria-labelledby]": "ariaLabelledBy() ?? null",
703
+ "[attr.aria-busy]": "loading() || null",
704
+ "(scroll)": "onScroll($event)"
705
+ },
706
+ template: "@if (showSpacer()) {\n <div\n class=\"tx-virtual-scroller__spacer\"\n aria-hidden=\"true\"\n [style.height.px]=\"totalHeight()\"\n [style.width.px]=\"totalWidth()\"\n [class]=\"passThrough().spacer?.class\"\n [style]=\"passThrough().spacer?.style\"\n ></div>\n}\n\n<div\n class=\"tx-virtual-scroller__content\"\n [class.tx-virtual-scroller__content--horizontal]=\"horizontal()\"\n [style.transform]=\"contentTransform()\"\n [class]=\"passThrough().content?.class\"\n [style]=\"passThrough().content?.style\"\n>\n @if (contentTemplate(); as content) {\n <ng-container [ngTemplateOutlet]=\"content.templateRef\" [ngTemplateOutletContext]=\"contentContext()\" />\n } @else if (both()) {\n @for (row of renderedRows(); track row.index) {\n <div class=\"tx-virtual-scroller__row\" [style.height.px]=\"rowSize()\" [class]=\"passThrough().row?.class\" [style]=\"passThrough().row?.style\">\n @for (cell of row.cells; track trackOf(cell.index, cell.item)) {\n <div class=\"tx-virtual-scroller__item\" [style.width.px]=\"columnSize()\" [class]=\"passThrough().item?.class\" [style]=\"passThrough().item?.style\">\n <ng-container [ngTemplateOutlet]=\"cellContent\" [ngTemplateOutletContext]=\"{ $implicit: cell, count: columnCount() }\" />\n </div>\n }\n </div>\n }\n } @else {\n @for (cell of renderedItems(); track trackOf(cell.index, cell.item)) {\n <div\n class=\"tx-virtual-scroller__item\"\n [style.height.px]=\"horizontal() ? null : rowSize()\"\n [style.width.px]=\"horizontal() ? columnSize() : null\"\n [class]=\"passThrough().item?.class\"\n [style]=\"passThrough().item?.style\"\n >\n <ng-container [ngTemplateOutlet]=\"cellContent\" [ngTemplateOutletContext]=\"{ $implicit: cell, count: horizontal() ? columnCount() : rowCount() }\" />\n </div>\n }\n }\n</div>\n\n@if (showLoaderMask()) {\n <div class=\"tx-virtual-scroller__loader\" [class]=\"passThrough().loader?.class\" [style]=\"passThrough().loader?.style\">\n @if (loadingIconTemplate(); as icon) {\n <ng-container [ngTemplateOutlet]=\"icon.templateRef\" />\n } @else {\n <tx-icon\n class=\"tx-virtual-scroller__loading-icon\"\n role=\"img\"\n [name]=\"loadingIcon()\"\n [attr.aria-label]=\"translations().loading\"\n [class]=\"passThrough().loadingIcon?.class\"\n [style]=\"passThrough().loadingIcon?.style\"\n />\n }\n </div>\n}\n\n<ng-template #cellContent let-cell let-count=\"count\">\n @if (showLoaderItems() || (cell.item === undefined && loaderTemplate())) {\n <ng-container [ngTemplateOutlet]=\"loaderTemplate()?.templateRef ?? null\" [ngTemplateOutletContext]=\"{ $implicit: cell.index, index: cell.index, count }\" />\n } @else if (itemTemplate(); as item) {\n <ng-container [ngTemplateOutlet]=\"item.templateRef\" [ngTemplateOutletContext]=\"itemContext(cell, count)\" />\n }\n</ng-template>\n",
707
+ styles: [":host{position:relative;display:block;overflow:auto;contain:strict;overscroll-behavior:contain}:host(.tx-virtual-scroller--disabled){contain:none}.tx-virtual-scroller__spacer{position:absolute;inset-block-start:0;inset-inline-start:0;width:1px;height:1px;pointer-events:none}.tx-virtual-scroller__content{position:absolute;inset-block-start:0;inset-inline-start:0;min-width:100%;will-change:transform}.tx-virtual-scroller__content--horizontal,.tx-virtual-scroller__row{display:flex}.tx-virtual-scroller__content--horizontal{height:100%}.tx-virtual-scroller__item{box-sizing:border-box;flex:none;overflow:hidden}.tx-virtual-scroller__loader{position:sticky;inset:0;z-index:1;display:flex;align-items:center;justify-content:center;width:100%;height:100%}:host([data-styled]){outline:var(--tx-virtual-scroller-focus-ring-width) solid transparent;outline-offset:var(--tx-virtual-scroller-focus-ring-offset);transition:outline-color var(--tx-motion-duration) var(--tx-motion-easing)}:host([data-styled]):focus-visible{outline-color:var(--tx-virtual-scroller-focus-ring-color)}:host([data-styled]) .tx-virtual-scroller__loader{background:var(--tx-virtual-scroller-loader-background);color:var(--tx-virtual-scroller-loader-color)}:host([data-styled]) .tx-virtual-scroller__loading-icon{width:var(--tx-virtual-scroller-loader-icon-size);height:var(--tx-virtual-scroller-loader-icon-size);font-size:var(--tx-virtual-scroller-loader-icon-size);animation:tx-virtual-scroller-spin .8s linear infinite}@keyframes tx-virtual-scroller-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){:host([data-styled]){transition:none}:host([data-styled]) .tx-virtual-scroller__loading-icon{animation-duration:2.4s}}\n"]
708
+ }]
709
+ }],
710
+ ctorParameters: () => [],
711
+ propDecorators: {
712
+ items: [{
713
+ type: i0.Input,
714
+ args: [{
715
+ isSignal: true,
716
+ alias: "items",
717
+ required: false
718
+ }]
719
+ }],
720
+ itemSize: [{
721
+ type: i0.Input,
722
+ args: [{
723
+ isSignal: true,
724
+ alias: "itemSize",
725
+ required: false
726
+ }]
727
+ }],
728
+ scrollHeight: [{
729
+ type: i0.Input,
730
+ args: [{
731
+ isSignal: true,
732
+ alias: "scrollHeight",
733
+ required: false
734
+ }]
735
+ }],
736
+ scrollWidth: [{
737
+ type: i0.Input,
738
+ args: [{
739
+ isSignal: true,
740
+ alias: "scrollWidth",
741
+ required: false
742
+ }]
743
+ }],
744
+ orientation: [{
745
+ type: i0.Input,
746
+ args: [{
747
+ isSignal: true,
748
+ alias: "orientation",
749
+ required: false
750
+ }]
751
+ }],
752
+ numToleratedItems: [{
753
+ type: i0.Input,
754
+ args: [{
755
+ isSignal: true,
756
+ alias: "numToleratedItems",
757
+ required: false
758
+ }]
759
+ }],
760
+ delay: [{
761
+ type: i0.Input,
762
+ args: [{
763
+ isSignal: true,
764
+ alias: "delay",
765
+ required: false
766
+ }]
767
+ }],
768
+ step: [{
769
+ type: i0.Input,
770
+ args: [{
771
+ isSignal: true,
772
+ alias: "step",
773
+ required: false
774
+ }]
775
+ }],
776
+ lazy: [{
777
+ type: i0.Input,
778
+ args: [{
779
+ isSignal: true,
780
+ alias: "lazy",
781
+ required: false
782
+ }]
783
+ }],
784
+ appendOnly: [{
785
+ type: i0.Input,
786
+ args: [{
787
+ isSignal: true,
788
+ alias: "appendOnly",
789
+ required: false
790
+ }]
791
+ }],
792
+ disabled: [{
793
+ type: i0.Input,
794
+ args: [{
795
+ isSignal: true,
796
+ alias: "disabled",
797
+ required: false
798
+ }]
799
+ }],
800
+ showSpacer: [{
801
+ type: i0.Input,
802
+ args: [{
803
+ isSignal: true,
804
+ alias: "showSpacer",
805
+ required: false
806
+ }]
807
+ }],
808
+ showLoader: [{
809
+ type: i0.Input,
810
+ args: [{
811
+ isSignal: true,
812
+ alias: "showLoader",
813
+ required: false
814
+ }]
815
+ }],
816
+ loading: [{
817
+ type: i0.Input,
818
+ args: [{
819
+ isSignal: true,
820
+ alias: "loading",
821
+ required: false
822
+ }]
823
+ }],
824
+ loadingIcon: [{
825
+ type: i0.Input,
826
+ args: [{
827
+ isSignal: true,
828
+ alias: "loadingIcon",
829
+ required: false
830
+ }]
831
+ }],
832
+ trackBy: [{
833
+ type: i0.Input,
834
+ args: [{
835
+ isSignal: true,
836
+ alias: "trackBy",
837
+ required: false
838
+ }]
839
+ }],
840
+ tabindex: [{
841
+ type: i0.Input,
842
+ args: [{
843
+ isSignal: true,
844
+ alias: "tabindex",
845
+ required: false
846
+ }]
847
+ }],
848
+ ariaLabel: [{
849
+ type: i0.Input,
850
+ args: [{
851
+ isSignal: true,
852
+ alias: "ariaLabel",
853
+ required: false
854
+ }]
855
+ }],
856
+ ariaLabelledBy: [{
857
+ type: i0.Input,
858
+ args: [{
859
+ isSignal: true,
860
+ alias: "ariaLabelledBy",
861
+ required: false
862
+ }]
863
+ }],
864
+ dt: [{
865
+ type: i0.Input,
866
+ args: [{
867
+ isSignal: true,
868
+ alias: "dt",
869
+ required: false
870
+ }]
871
+ }],
872
+ pt: [{
873
+ type: i0.Input,
874
+ args: [{
875
+ isSignal: true,
876
+ alias: "pt",
877
+ required: false
878
+ }]
879
+ }],
880
+ ptOptions: [{
881
+ type: i0.Input,
882
+ args: [{
883
+ isSignal: true,
884
+ alias: "ptOptions",
885
+ required: false
886
+ }]
887
+ }],
888
+ unstyled: [{
889
+ type: i0.Input,
890
+ args: [{
891
+ isSignal: true,
892
+ alias: "unstyled",
893
+ required: false
894
+ }]
895
+ }],
896
+ lazyLoad: [{
897
+ type: i0.Output,
898
+ args: ["lazyLoad"]
899
+ }],
900
+ scrolled: [{
901
+ type: i0.Output,
902
+ args: ["scrolled"]
903
+ }],
904
+ scrollIndexChange: [{
905
+ type: i0.Output,
906
+ args: ["scrollIndexChange"]
907
+ }],
908
+ itemTemplate: [{
909
+ type: i0.ContentChild,
910
+ args: [i0.forwardRef(() => TxVirtualScrollerItem), { isSignal: true }]
911
+ }],
912
+ loaderTemplate: [{
913
+ type: i0.ContentChild,
914
+ args: [i0.forwardRef(() => TxVirtualScrollerLoader), { isSignal: true }]
915
+ }],
916
+ loadingIconTemplate: [{
917
+ type: i0.ContentChild,
918
+ args: [i0.forwardRef(() => TxVirtualScrollerLoadingIcon), { isSignal: true }]
919
+ }],
920
+ contentTemplate: [{
921
+ type: i0.ContentChild,
922
+ args: [i0.forwardRef(() => TxVirtualScrollerContent), { isSignal: true }]
923
+ }]
924
+ }
925
+ });
926
+ export { TxVirtualScroller, TxVirtualScrollerContent, TxVirtualScrollerItem, TxVirtualScrollerLoader, TxVirtualScrollerLoadingIcon };
927
+
928
+ //# sourceMappingURL=tectra-ng-ui-virtual-scroller.mjs.map