@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,1370 @@
1
+ import { NgTemplateOutlet } from "@angular/common";
2
+ import * as i0 from "@angular/core";
3
+ import { ChangeDetectionStrategy, Component, Directive, TemplateRef, booleanAttribute, computed, contentChild, effect, inject, input, model, numberAttribute, output, untracked } from "@angular/core";
4
+ import { injectPassThrough, injectUnstyled } from "@tectra-ng/core/config";
5
+ import { TxLocaleService, injectTranslations } from "@tectra-ng/core/i18n";
6
+ import { optionalBoolean, optionalNumber } from "@tectra-ng/core/utils";
7
+ import { toStyleObject } from "@tectra-ng/themes";
8
+ import { TxPaginator, TxPaginatorEnd, TxPaginatorStart } from "@tectra-ng/ui/paginator";
9
+ import { TxProgressSpinner } from "@tectra-ng/ui/progress-spinner";
10
+ import { foldText, readOptionField } from "@tectra-ng/ui/select";
11
+ import { compareValues } from "@tectra-ng/ui/table";
12
+ import { TxButton } from "@tectra-ng/ui/button";
13
+ import { TxButtonGroup } from "@tectra-ng/ui/button-group";
14
+ var TxDataViewList = class TxDataViewList {
15
+ templateRef = inject(TemplateRef);
16
+ static ɵfac = i0.ɵɵngDeclareFactory({
17
+ minVersion: "12.0.0",
18
+ version: "22.2.3",
19
+ ngImport: i0,
20
+ type: TxDataViewList,
21
+ deps: [],
22
+ target: i0.ɵɵFactoryTarget.Directive
23
+ });
24
+ static ɵdir = i0.ɵɵngDeclareDirective({
25
+ minVersion: "14.0.0",
26
+ version: "22.2.3",
27
+ type: TxDataViewList,
28
+ isStandalone: true,
29
+ selector: "ng-template[txDataViewList]",
30
+ ngImport: i0
31
+ });
32
+ };
33
+ i0.ɵɵngDeclareClassMetadata({
34
+ minVersion: "12.0.0",
35
+ version: "22.2.3",
36
+ ngImport: i0,
37
+ type: TxDataViewList,
38
+ decorators: [{
39
+ type: Directive,
40
+ args: [{ selector: "ng-template[txDataViewList]" }]
41
+ }]
42
+ });
43
+ var TxDataViewGrid = class TxDataViewGrid {
44
+ templateRef = inject(TemplateRef);
45
+ static ɵfac = i0.ɵɵngDeclareFactory({
46
+ minVersion: "12.0.0",
47
+ version: "22.2.3",
48
+ ngImport: i0,
49
+ type: TxDataViewGrid,
50
+ deps: [],
51
+ target: i0.ɵɵFactoryTarget.Directive
52
+ });
53
+ static ɵdir = i0.ɵɵngDeclareDirective({
54
+ minVersion: "14.0.0",
55
+ version: "22.2.3",
56
+ type: TxDataViewGrid,
57
+ isStandalone: true,
58
+ selector: "ng-template[txDataViewGrid]",
59
+ ngImport: i0
60
+ });
61
+ };
62
+ i0.ɵɵngDeclareClassMetadata({
63
+ minVersion: "12.0.0",
64
+ version: "22.2.3",
65
+ ngImport: i0,
66
+ type: TxDataViewGrid,
67
+ decorators: [{
68
+ type: Directive,
69
+ args: [{ selector: "ng-template[txDataViewGrid]" }]
70
+ }]
71
+ });
72
+ var TxDataViewHeader = class TxDataViewHeader {
73
+ templateRef = inject(TemplateRef);
74
+ static ɵfac = i0.ɵɵngDeclareFactory({
75
+ minVersion: "12.0.0",
76
+ version: "22.2.3",
77
+ ngImport: i0,
78
+ type: TxDataViewHeader,
79
+ deps: [],
80
+ target: i0.ɵɵFactoryTarget.Directive
81
+ });
82
+ static ɵdir = i0.ɵɵngDeclareDirective({
83
+ minVersion: "14.0.0",
84
+ version: "22.2.3",
85
+ type: TxDataViewHeader,
86
+ isStandalone: true,
87
+ selector: "ng-template[txDataViewHeader]",
88
+ ngImport: i0
89
+ });
90
+ };
91
+ i0.ɵɵngDeclareClassMetadata({
92
+ minVersion: "12.0.0",
93
+ version: "22.2.3",
94
+ ngImport: i0,
95
+ type: TxDataViewHeader,
96
+ decorators: [{
97
+ type: Directive,
98
+ args: [{ selector: "ng-template[txDataViewHeader]" }]
99
+ }]
100
+ });
101
+ var TxDataViewFooter = class TxDataViewFooter {
102
+ templateRef = inject(TemplateRef);
103
+ static ɵfac = i0.ɵɵngDeclareFactory({
104
+ minVersion: "12.0.0",
105
+ version: "22.2.3",
106
+ ngImport: i0,
107
+ type: TxDataViewFooter,
108
+ deps: [],
109
+ target: i0.ɵɵFactoryTarget.Directive
110
+ });
111
+ static ɵdir = i0.ɵɵngDeclareDirective({
112
+ minVersion: "14.0.0",
113
+ version: "22.2.3",
114
+ type: TxDataViewFooter,
115
+ isStandalone: true,
116
+ selector: "ng-template[txDataViewFooter]",
117
+ ngImport: i0
118
+ });
119
+ };
120
+ i0.ɵɵngDeclareClassMetadata({
121
+ minVersion: "12.0.0",
122
+ version: "22.2.3",
123
+ ngImport: i0,
124
+ type: TxDataViewFooter,
125
+ decorators: [{
126
+ type: Directive,
127
+ args: [{ selector: "ng-template[txDataViewFooter]" }]
128
+ }]
129
+ });
130
+ var TxDataViewEmpty = class TxDataViewEmpty {
131
+ templateRef = inject(TemplateRef);
132
+ static ɵfac = i0.ɵɵngDeclareFactory({
133
+ minVersion: "12.0.0",
134
+ version: "22.2.3",
135
+ ngImport: i0,
136
+ type: TxDataViewEmpty,
137
+ deps: [],
138
+ target: i0.ɵɵFactoryTarget.Directive
139
+ });
140
+ static ɵdir = i0.ɵɵngDeclareDirective({
141
+ minVersion: "14.0.0",
142
+ version: "22.2.3",
143
+ type: TxDataViewEmpty,
144
+ isStandalone: true,
145
+ selector: "ng-template[txDataViewEmpty]",
146
+ ngImport: i0
147
+ });
148
+ };
149
+ i0.ɵɵngDeclareClassMetadata({
150
+ minVersion: "12.0.0",
151
+ version: "22.2.3",
152
+ ngImport: i0,
153
+ type: TxDataViewEmpty,
154
+ decorators: [{
155
+ type: Directive,
156
+ args: [{ selector: "ng-template[txDataViewEmpty]" }]
157
+ }]
158
+ });
159
+ var TxDataViewLoading = class TxDataViewLoading {
160
+ templateRef = inject(TemplateRef);
161
+ static ɵfac = i0.ɵɵngDeclareFactory({
162
+ minVersion: "12.0.0",
163
+ version: "22.2.3",
164
+ ngImport: i0,
165
+ type: TxDataViewLoading,
166
+ deps: [],
167
+ target: i0.ɵɵFactoryTarget.Directive
168
+ });
169
+ static ɵdir = i0.ɵɵngDeclareDirective({
170
+ minVersion: "14.0.0",
171
+ version: "22.2.3",
172
+ type: TxDataViewLoading,
173
+ isStandalone: true,
174
+ selector: "ng-template[txDataViewLoading]",
175
+ ngImport: i0
176
+ });
177
+ };
178
+ i0.ɵɵngDeclareClassMetadata({
179
+ minVersion: "12.0.0",
180
+ version: "22.2.3",
181
+ ngImport: i0,
182
+ type: TxDataViewLoading,
183
+ decorators: [{
184
+ type: Directive,
185
+ args: [{ selector: "ng-template[txDataViewLoading]" }]
186
+ }]
187
+ });
188
+ var TxDataViewPaginatorStart = class TxDataViewPaginatorStart {
189
+ templateRef = inject(TemplateRef);
190
+ static ɵfac = i0.ɵɵngDeclareFactory({
191
+ minVersion: "12.0.0",
192
+ version: "22.2.3",
193
+ ngImport: i0,
194
+ type: TxDataViewPaginatorStart,
195
+ deps: [],
196
+ target: i0.ɵɵFactoryTarget.Directive
197
+ });
198
+ static ɵdir = i0.ɵɵngDeclareDirective({
199
+ minVersion: "14.0.0",
200
+ version: "22.2.3",
201
+ type: TxDataViewPaginatorStart,
202
+ isStandalone: true,
203
+ selector: "ng-template[txDataViewPaginatorStart]",
204
+ ngImport: i0
205
+ });
206
+ };
207
+ i0.ɵɵngDeclareClassMetadata({
208
+ minVersion: "12.0.0",
209
+ version: "22.2.3",
210
+ ngImport: i0,
211
+ type: TxDataViewPaginatorStart,
212
+ decorators: [{
213
+ type: Directive,
214
+ args: [{ selector: "ng-template[txDataViewPaginatorStart]" }]
215
+ }]
216
+ });
217
+ var TxDataViewPaginatorEnd = class TxDataViewPaginatorEnd {
218
+ templateRef = inject(TemplateRef);
219
+ static ɵfac = i0.ɵɵngDeclareFactory({
220
+ minVersion: "12.0.0",
221
+ version: "22.2.3",
222
+ ngImport: i0,
223
+ type: TxDataViewPaginatorEnd,
224
+ deps: [],
225
+ target: i0.ɵɵFactoryTarget.Directive
226
+ });
227
+ static ɵdir = i0.ɵɵngDeclareDirective({
228
+ minVersion: "14.0.0",
229
+ version: "22.2.3",
230
+ type: TxDataViewPaginatorEnd,
231
+ isStandalone: true,
232
+ selector: "ng-template[txDataViewPaginatorEnd]",
233
+ ngImport: i0
234
+ });
235
+ };
236
+ i0.ɵɵngDeclareClassMetadata({
237
+ minVersion: "12.0.0",
238
+ version: "22.2.3",
239
+ ngImport: i0,
240
+ type: TxDataViewPaginatorEnd,
241
+ decorators: [{
242
+ type: Directive,
243
+ args: [{ selector: "ng-template[txDataViewPaginatorEnd]" }]
244
+ }]
245
+ });
246
+ var TxDataView = class TxDataView {
247
+ value = input(void 0, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
248
+ layout = model("list", ...ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []);
249
+ paginator = input(false, {
250
+ ...ngDevMode ? { debugName: "paginator" } : /* istanbul ignore next */ {},
251
+ transform: booleanAttribute
252
+ });
253
+ paginatorPosition = input("bottom", ...ngDevMode ? [{ debugName: "paginatorPosition" }] : /* istanbul ignore next */ []);
254
+ first = model(0, ...ngDevMode ? [{ debugName: "first" }] : /* istanbul ignore next */ []);
255
+ rows = model(10, ...ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []);
256
+ totalRecords = input(void 0, {
257
+ ...ngDevMode ? { debugName: "totalRecords" } : /* istanbul ignore next */ {},
258
+ transform: optionalNumber
259
+ });
260
+ pageLinks = input(5, {
261
+ ...ngDevMode ? { debugName: "pageLinks" } : /* istanbul ignore next */ {},
262
+ transform: numberAttribute
263
+ });
264
+ rowsPerPageOptions = input(void 0, ...ngDevMode ? [{ debugName: "rowsPerPageOptions" }] : /* istanbul ignore next */ []);
265
+ alwaysShowPaginator = input(true, {
266
+ ...ngDevMode ? { debugName: "alwaysShowPaginator" } : /* istanbul ignore next */ {},
267
+ transform: booleanAttribute
268
+ });
269
+ showCurrentPageReport = input(false, {
270
+ ...ngDevMode ? { debugName: "showCurrentPageReport" } : /* istanbul ignore next */ {},
271
+ transform: booleanAttribute
272
+ });
273
+ currentPageReportTemplate = input(void 0, ...ngDevMode ? [{ debugName: "currentPageReportTemplate" }] : /* istanbul ignore next */ []);
274
+ showJumpToPageDropdown = input(false, {
275
+ ...ngDevMode ? { debugName: "showJumpToPageDropdown" } : /* istanbul ignore next */ {},
276
+ transform: booleanAttribute
277
+ });
278
+ showJumpToPageInput = input(false, {
279
+ ...ngDevMode ? { debugName: "showJumpToPageInput" } : /* istanbul ignore next */ {},
280
+ transform: booleanAttribute
281
+ });
282
+ showFirstLastIcon = input(true, {
283
+ ...ngDevMode ? { debugName: "showFirstLastIcon" } : /* istanbul ignore next */ {},
284
+ transform: booleanAttribute
285
+ });
286
+ showPageLinks = input(true, {
287
+ ...ngDevMode ? { debugName: "showPageLinks" } : /* istanbul ignore next */ {},
288
+ transform: booleanAttribute
289
+ });
290
+ showTotal = input(false, {
291
+ ...ngDevMode ? { debugName: "showTotal" } : /* istanbul ignore next */ {},
292
+ transform: booleanAttribute
293
+ });
294
+ lazy = input(false, {
295
+ ...ngDevMode ? { debugName: "lazy" } : /* istanbul ignore next */ {},
296
+ transform: booleanAttribute
297
+ });
298
+ lazyLoadOnInit = input(true, {
299
+ ...ngDevMode ? { debugName: "lazyLoadOnInit" } : /* istanbul ignore next */ {},
300
+ transform: booleanAttribute
301
+ });
302
+ loading = input(false, {
303
+ ...ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {},
304
+ transform: booleanAttribute
305
+ });
306
+ emptyMessage = input(void 0, ...ngDevMode ? [{ debugName: "emptyMessage" }] : /* istanbul ignore next */ []);
307
+ sortField = model(null, ...ngDevMode ? [{ debugName: "sortField" }] : /* istanbul ignore next */ []);
308
+ sortOrder = model(null, ...ngDevMode ? [{ debugName: "sortOrder" }] : /* istanbul ignore next */ []);
309
+ filterBy = input(void 0, ...ngDevMode ? [{ debugName: "filterBy" }] : /* istanbul ignore next */ []);
310
+ filterValue = model("", ...ngDevMode ? [{ debugName: "filterValue" }] : /* istanbul ignore next */ []);
311
+ ariaLabel = input(void 0, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
312
+ dt = input(void 0, ...ngDevMode ? [{ debugName: "dt" }] : /* istanbul ignore next */ []);
313
+ pt = input(void 0, ...ngDevMode ? [{ debugName: "pt" }] : /* istanbul ignore next */ []);
314
+ ptOptions = input(void 0, ...ngDevMode ? [{ debugName: "ptOptions" }] : /* istanbul ignore next */ []);
315
+ unstyled = input(void 0, {
316
+ ...ngDevMode ? { debugName: "unstyled" } : /* istanbul ignore next */ {},
317
+ transform: optionalBoolean
318
+ });
319
+ lazyLoad = output();
320
+ pageChange = output();
321
+ sortChange = output();
322
+ listTemplate = contentChild(TxDataViewList, ...ngDevMode ? [{ debugName: "listTemplate" }] : /* istanbul ignore next */ []);
323
+ gridTemplate = contentChild(TxDataViewGrid, ...ngDevMode ? [{ debugName: "gridTemplate" }] : /* istanbul ignore next */ []);
324
+ headerTemplate = contentChild(TxDataViewHeader, ...ngDevMode ? [{ debugName: "headerTemplate" }] : /* istanbul ignore next */ []);
325
+ footerTemplate = contentChild(TxDataViewFooter, ...ngDevMode ? [{ debugName: "footerTemplate" }] : /* istanbul ignore next */ []);
326
+ emptyTemplate = contentChild(TxDataViewEmpty, ...ngDevMode ? [{ debugName: "emptyTemplate" }] : /* istanbul ignore next */ []);
327
+ loadingTemplate = contentChild(TxDataViewLoading, ...ngDevMode ? [{ debugName: "loadingTemplate" }] : /* istanbul ignore next */ []);
328
+ paginatorStartTemplate = contentChild(TxDataViewPaginatorStart, ...ngDevMode ? [{ debugName: "paginatorStartTemplate" }] : /* istanbul ignore next */ []);
329
+ paginatorEndTemplate = contentChild(TxDataViewPaginatorEnd, ...ngDevMode ? [{ debugName: "paginatorEndTemplate" }] : /* istanbul ignore next */ []);
330
+ localeService = inject(TxLocaleService);
331
+ lastSort = "";
332
+ lastFilter = null;
333
+ loadedOnce = false;
334
+ translations = injectTranslations();
335
+ isUnstyled = injectUnstyled(this.unstyled);
336
+ passThrough = injectPassThrough("dataView", this, this.pt, this.ptOptions);
337
+ hostStyle = computed(() => ({
338
+ ...toStyleObject(this.dt(), "--tx-data-view"),
339
+ ...this.passThrough().root?.style
340
+ }), ...ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []);
341
+ filterFields = computed(() => (this.filterBy() ?? "").split(",").map((field) => field.trim()).filter(Boolean), ...ngDevMode ? [{ debugName: "filterFields" }] : /* istanbul ignore next */ []);
342
+ filtered = computed(() => {
343
+ const items = [...this.value() ?? []];
344
+ const query = foldText(this.filterValue().trim());
345
+ const fields = this.filterFields();
346
+ if (this.lazy() || !query || !fields.length) return items;
347
+ return items.filter((item) => fields.some((field) => foldText(String(readOptionField(item, field) ?? "")).includes(query)));
348
+ }, ...ngDevMode ? [{ debugName: "filtered" }] : /* istanbul ignore next */ []);
349
+ sorted = computed(() => {
350
+ const items = this.filtered();
351
+ const field = this.sortField();
352
+ const order = this.sortOrder();
353
+ if (this.lazy() || !field || !order) return items;
354
+ const intl = this.localeService.locale().intl;
355
+ const direction = order === "desc" ? -1 : 1;
356
+ return [...items].sort((a, b) => compareValues(readOptionField(a, field), readOptionField(b, field), intl) * direction);
357
+ }, ...ngDevMode ? [{ debugName: "sorted" }] : /* istanbul ignore next */ []);
358
+ total = computed(() => this.totalRecords() ?? this.sorted().length, ...ngDevMode ? [{ debugName: "total" }] : /* istanbul ignore next */ []);
359
+ pageItems = computed(() => {
360
+ const items = this.sorted();
361
+ if (!this.paginator() || this.lazy() || this.totalRecords() !== void 0) return items;
362
+ return items.slice(this.first(), this.first() + this.rows());
363
+ }, ...ngDevMode ? [{ debugName: "pageItems" }] : /* istanbul ignore next */ []);
364
+ empty = computed(() => this.pageItems().length === 0, ...ngDevMode ? [{ debugName: "empty" }] : /* istanbul ignore next */ []);
365
+ itemsContext = computed(() => ({
366
+ $implicit: this.pageItems(),
367
+ items: this.pageItems(),
368
+ first: this.first()
369
+ }), ...ngDevMode ? [{ debugName: "itemsContext" }] : /* istanbul ignore next */ []);
370
+ activeTemplate = computed(() => this.layout() === "grid" ? this.gridTemplate() ?? this.listTemplate() : this.listTemplate() ?? this.gridTemplate(), ...ngDevMode ? [{ debugName: "activeTemplate" }] : /* istanbul ignore next */ []);
371
+ layoutKey = computed(() => [this.layout()], ...ngDevMode ? [{ debugName: "layoutKey" }] : /* istanbul ignore next */ []);
372
+ showPaginatorTop = computed(() => this.paginator() && this.paginatorPosition() !== "bottom", ...ngDevMode ? [{ debugName: "showPaginatorTop" }] : /* istanbul ignore next */ []);
373
+ showPaginatorBottom = computed(() => this.paginator() && this.paginatorPosition() !== "top", ...ngDevMode ? [{ debugName: "showPaginatorBottom" }] : /* istanbul ignore next */ []);
374
+ constructor() {
375
+ effect(() => {
376
+ const total = this.total();
377
+ const first = untracked(this.first);
378
+ const rows = untracked(this.rows);
379
+ if (this.paginator() && total > 0 && first >= total && rows > 0) untracked(() => this.first.set(Math.max(0, Math.floor((total - 1) / rows) * rows)));
380
+ });
381
+ effect(() => {
382
+ const sortField = this.sortField();
383
+ const sortOrder = this.sortOrder();
384
+ const key = `${sortField}:${sortOrder}`;
385
+ if (!this.lastSort) {
386
+ this.lastSort = key;
387
+ return;
388
+ }
389
+ if (key === this.lastSort) return;
390
+ this.lastSort = key;
391
+ untracked(() => {
392
+ if (this.paginator() && !this.lazy()) this.first.set(0);
393
+ this.sortChange.emit({
394
+ sortField,
395
+ sortOrder
396
+ });
397
+ this.emitLazyLoad();
398
+ });
399
+ });
400
+ effect(() => {
401
+ const query = this.filterValue();
402
+ if (this.lastFilter === null) {
403
+ this.lastFilter = query;
404
+ return;
405
+ }
406
+ if (query === this.lastFilter) return;
407
+ this.lastFilter = query;
408
+ untracked(() => {
409
+ if (this.paginator()) this.first.set(0);
410
+ this.emitLazyLoad();
411
+ });
412
+ });
413
+ effect(() => {
414
+ if (this.loadedOnce || !this.lazy() || !this.lazyLoadOnInit()) return;
415
+ this.loadedOnce = true;
416
+ untracked(() => this.emitLazyLoad());
417
+ });
418
+ }
419
+ filter(value) {
420
+ this.filterValue.set(value);
421
+ }
422
+ onPage(state) {
423
+ this.first.set(state.first);
424
+ this.rows.set(state.rows);
425
+ this.pageChange.emit(state);
426
+ this.emitLazyLoad();
427
+ }
428
+ emitLazyLoad() {
429
+ if (!this.lazy()) return;
430
+ this.lazyLoad.emit({
431
+ first: this.first(),
432
+ rows: this.rows(),
433
+ sortField: this.sortField(),
434
+ sortOrder: this.sortOrder(),
435
+ filter: this.filterValue()
436
+ });
437
+ }
438
+ static ɵfac = i0.ɵɵngDeclareFactory({
439
+ minVersion: "12.0.0",
440
+ version: "22.2.3",
441
+ ngImport: i0,
442
+ type: TxDataView,
443
+ deps: [],
444
+ target: i0.ɵɵFactoryTarget.Component
445
+ });
446
+ static ɵcmp = i0.ɵɵngDeclareComponent({
447
+ minVersion: "17.0.0",
448
+ version: "22.2.3",
449
+ type: TxDataView,
450
+ isStandalone: true,
451
+ selector: "tx-data-view",
452
+ inputs: {
453
+ value: {
454
+ classPropertyName: "value",
455
+ publicName: "value",
456
+ isSignal: true,
457
+ isRequired: false,
458
+ transformFunction: null
459
+ },
460
+ layout: {
461
+ classPropertyName: "layout",
462
+ publicName: "layout",
463
+ isSignal: true,
464
+ isRequired: false,
465
+ transformFunction: null
466
+ },
467
+ paginator: {
468
+ classPropertyName: "paginator",
469
+ publicName: "paginator",
470
+ isSignal: true,
471
+ isRequired: false,
472
+ transformFunction: null
473
+ },
474
+ paginatorPosition: {
475
+ classPropertyName: "paginatorPosition",
476
+ publicName: "paginatorPosition",
477
+ isSignal: true,
478
+ isRequired: false,
479
+ transformFunction: null
480
+ },
481
+ first: {
482
+ classPropertyName: "first",
483
+ publicName: "first",
484
+ isSignal: true,
485
+ isRequired: false,
486
+ transformFunction: null
487
+ },
488
+ rows: {
489
+ classPropertyName: "rows",
490
+ publicName: "rows",
491
+ isSignal: true,
492
+ isRequired: false,
493
+ transformFunction: null
494
+ },
495
+ totalRecords: {
496
+ classPropertyName: "totalRecords",
497
+ publicName: "totalRecords",
498
+ isSignal: true,
499
+ isRequired: false,
500
+ transformFunction: null
501
+ },
502
+ pageLinks: {
503
+ classPropertyName: "pageLinks",
504
+ publicName: "pageLinks",
505
+ isSignal: true,
506
+ isRequired: false,
507
+ transformFunction: null
508
+ },
509
+ rowsPerPageOptions: {
510
+ classPropertyName: "rowsPerPageOptions",
511
+ publicName: "rowsPerPageOptions",
512
+ isSignal: true,
513
+ isRequired: false,
514
+ transformFunction: null
515
+ },
516
+ alwaysShowPaginator: {
517
+ classPropertyName: "alwaysShowPaginator",
518
+ publicName: "alwaysShowPaginator",
519
+ isSignal: true,
520
+ isRequired: false,
521
+ transformFunction: null
522
+ },
523
+ showCurrentPageReport: {
524
+ classPropertyName: "showCurrentPageReport",
525
+ publicName: "showCurrentPageReport",
526
+ isSignal: true,
527
+ isRequired: false,
528
+ transformFunction: null
529
+ },
530
+ currentPageReportTemplate: {
531
+ classPropertyName: "currentPageReportTemplate",
532
+ publicName: "currentPageReportTemplate",
533
+ isSignal: true,
534
+ isRequired: false,
535
+ transformFunction: null
536
+ },
537
+ showJumpToPageDropdown: {
538
+ classPropertyName: "showJumpToPageDropdown",
539
+ publicName: "showJumpToPageDropdown",
540
+ isSignal: true,
541
+ isRequired: false,
542
+ transformFunction: null
543
+ },
544
+ showJumpToPageInput: {
545
+ classPropertyName: "showJumpToPageInput",
546
+ publicName: "showJumpToPageInput",
547
+ isSignal: true,
548
+ isRequired: false,
549
+ transformFunction: null
550
+ },
551
+ showFirstLastIcon: {
552
+ classPropertyName: "showFirstLastIcon",
553
+ publicName: "showFirstLastIcon",
554
+ isSignal: true,
555
+ isRequired: false,
556
+ transformFunction: null
557
+ },
558
+ showPageLinks: {
559
+ classPropertyName: "showPageLinks",
560
+ publicName: "showPageLinks",
561
+ isSignal: true,
562
+ isRequired: false,
563
+ transformFunction: null
564
+ },
565
+ showTotal: {
566
+ classPropertyName: "showTotal",
567
+ publicName: "showTotal",
568
+ isSignal: true,
569
+ isRequired: false,
570
+ transformFunction: null
571
+ },
572
+ lazy: {
573
+ classPropertyName: "lazy",
574
+ publicName: "lazy",
575
+ isSignal: true,
576
+ isRequired: false,
577
+ transformFunction: null
578
+ },
579
+ lazyLoadOnInit: {
580
+ classPropertyName: "lazyLoadOnInit",
581
+ publicName: "lazyLoadOnInit",
582
+ isSignal: true,
583
+ isRequired: false,
584
+ transformFunction: null
585
+ },
586
+ loading: {
587
+ classPropertyName: "loading",
588
+ publicName: "loading",
589
+ isSignal: true,
590
+ isRequired: false,
591
+ transformFunction: null
592
+ },
593
+ emptyMessage: {
594
+ classPropertyName: "emptyMessage",
595
+ publicName: "emptyMessage",
596
+ isSignal: true,
597
+ isRequired: false,
598
+ transformFunction: null
599
+ },
600
+ sortField: {
601
+ classPropertyName: "sortField",
602
+ publicName: "sortField",
603
+ isSignal: true,
604
+ isRequired: false,
605
+ transformFunction: null
606
+ },
607
+ sortOrder: {
608
+ classPropertyName: "sortOrder",
609
+ publicName: "sortOrder",
610
+ isSignal: true,
611
+ isRequired: false,
612
+ transformFunction: null
613
+ },
614
+ filterBy: {
615
+ classPropertyName: "filterBy",
616
+ publicName: "filterBy",
617
+ isSignal: true,
618
+ isRequired: false,
619
+ transformFunction: null
620
+ },
621
+ filterValue: {
622
+ classPropertyName: "filterValue",
623
+ publicName: "filterValue",
624
+ isSignal: true,
625
+ isRequired: false,
626
+ transformFunction: null
627
+ },
628
+ ariaLabel: {
629
+ classPropertyName: "ariaLabel",
630
+ publicName: "ariaLabel",
631
+ isSignal: true,
632
+ isRequired: false,
633
+ transformFunction: null
634
+ },
635
+ dt: {
636
+ classPropertyName: "dt",
637
+ publicName: "dt",
638
+ isSignal: true,
639
+ isRequired: false,
640
+ transformFunction: null
641
+ },
642
+ pt: {
643
+ classPropertyName: "pt",
644
+ publicName: "pt",
645
+ isSignal: true,
646
+ isRequired: false,
647
+ transformFunction: null
648
+ },
649
+ ptOptions: {
650
+ classPropertyName: "ptOptions",
651
+ publicName: "ptOptions",
652
+ isSignal: true,
653
+ isRequired: false,
654
+ transformFunction: null
655
+ },
656
+ unstyled: {
657
+ classPropertyName: "unstyled",
658
+ publicName: "unstyled",
659
+ isSignal: true,
660
+ isRequired: false,
661
+ transformFunction: null
662
+ }
663
+ },
664
+ outputs: {
665
+ layout: "layoutChange",
666
+ first: "firstChange",
667
+ rows: "rowsChange",
668
+ sortField: "sortFieldChange",
669
+ sortOrder: "sortOrderChange",
670
+ filterValue: "filterValueChange",
671
+ lazyLoad: "lazyLoad",
672
+ pageChange: "pageChange",
673
+ sortChange: "sortChange"
674
+ },
675
+ host: {
676
+ properties: {
677
+ "class": "passThrough().root?.class",
678
+ "style": "hostStyle()",
679
+ "attr.data-styled": "!isUnstyled() || null",
680
+ "attr.data-layout": "layout()",
681
+ "class.tx-data-view--loading": "loading()",
682
+ "attr.aria-busy": "loading() || null"
683
+ },
684
+ classAttribute: "tx-data-view"
685
+ },
686
+ queries: [
687
+ {
688
+ propertyName: "listTemplate",
689
+ first: true,
690
+ predicate: TxDataViewList,
691
+ descendants: true,
692
+ isSignal: true
693
+ },
694
+ {
695
+ propertyName: "gridTemplate",
696
+ first: true,
697
+ predicate: TxDataViewGrid,
698
+ descendants: true,
699
+ isSignal: true
700
+ },
701
+ {
702
+ propertyName: "headerTemplate",
703
+ first: true,
704
+ predicate: TxDataViewHeader,
705
+ descendants: true,
706
+ isSignal: true
707
+ },
708
+ {
709
+ propertyName: "footerTemplate",
710
+ first: true,
711
+ predicate: TxDataViewFooter,
712
+ descendants: true,
713
+ isSignal: true
714
+ },
715
+ {
716
+ propertyName: "emptyTemplate",
717
+ first: true,
718
+ predicate: TxDataViewEmpty,
719
+ descendants: true,
720
+ isSignal: true
721
+ },
722
+ {
723
+ propertyName: "loadingTemplate",
724
+ first: true,
725
+ predicate: TxDataViewLoading,
726
+ descendants: true,
727
+ isSignal: true
728
+ },
729
+ {
730
+ propertyName: "paginatorStartTemplate",
731
+ first: true,
732
+ predicate: TxDataViewPaginatorStart,
733
+ descendants: true,
734
+ isSignal: true
735
+ },
736
+ {
737
+ propertyName: "paginatorEndTemplate",
738
+ first: true,
739
+ predicate: TxDataViewPaginatorEnd,
740
+ descendants: true,
741
+ isSignal: true
742
+ }
743
+ ],
744
+ ngImport: i0,
745
+ template: "@if (headerTemplate(); as header) {\n <div class=\"tx-data-view__header\" [class]=\"passThrough().header?.class\" [style]=\"passThrough().header?.style\">\n <ng-container [ngTemplateOutlet]=\"header.templateRef\" />\n </div>\n}\n\n@if (showPaginatorTop()) {\n <ng-container [ngTemplateOutlet]=\"pager\" [ngTemplateOutletContext]=\"{ $implicit: 'top' }\" />\n}\n\n<div class=\"tx-data-view__body\">\n @if (loading()) {\n <div class=\"tx-data-view__loading\" [class]=\"passThrough().loading?.class\" [style]=\"passThrough().loading?.style\">\n @if (loadingTemplate(); as loadingTemplate) {\n <ng-container [ngTemplateOutlet]=\"loadingTemplate.templateRef\" />\n } @else {\n <tx-progress-spinner [ariaLabel]=\"translations().loading\" [unstyled]=\"isUnstyled()\" />\n }\n </div>\n }\n\n @if (empty()) {\n <div class=\"tx-data-view__empty\" role=\"status\" [class]=\"passThrough().empty?.class\" [style]=\"passThrough().empty?.style\">\n @if (emptyTemplate(); as emptyTemplate) {\n <ng-container [ngTemplateOutlet]=\"emptyTemplate.templateRef\" />\n } @else {\n {{ emptyMessage() ?? translations().emptyMessage }}\n }\n </div>\n } @else {\n @for (mode of layoutKey(); track mode) {\n <div\n class=\"tx-data-view__content\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.role]=\"ariaLabel() ? 'region' : null\"\n [class]=\"passThrough().content?.class\"\n [style]=\"passThrough().content?.style\"\n >\n @if (activeTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"itemsContext()\" />\n }\n </div>\n }\n }\n</div>\n\n@if (showPaginatorBottom()) {\n <ng-container [ngTemplateOutlet]=\"pager\" [ngTemplateOutletContext]=\"{ $implicit: 'bottom' }\" />\n}\n\n@if (footerTemplate(); as footer) {\n <div class=\"tx-data-view__footer\" [class]=\"passThrough().footer?.class\" [style]=\"passThrough().footer?.style\">\n <ng-container [ngTemplateOutlet]=\"footer.templateRef\" />\n </div>\n}\n\n<ng-template #pager let-position>\n <tx-paginator\n class=\"tx-data-view__paginator\"\n [class.tx-data-view__paginator--top]=\"position === 'top'\"\n [class]=\"passThrough().paginator?.class\"\n [style]=\"passThrough().paginator?.style\"\n [first]=\"first()\"\n [rows]=\"rows()\"\n [totalRecords]=\"total()\"\n [rowsPerPageOptions]=\"rowsPerPageOptions()\"\n [showTotal]=\"showTotal()\"\n [showCurrentPageReport]=\"showCurrentPageReport()\"\n [currentPageReportTemplate]=\"currentPageReportTemplate()\"\n [showFirstLastIcon]=\"showFirstLastIcon()\"\n [showPageLinks]=\"showPageLinks()\"\n [showJumpToPageDropdown]=\"showJumpToPageDropdown()\"\n [showJumpToPageInput]=\"showJumpToPageInput()\"\n [alwaysShow]=\"alwaysShowPaginator()\"\n [pageLinkSize]=\"pageLinks()\"\n [unstyled]=\"isUnstyled()\"\n (pageChange)=\"onPage($event)\"\n >\n @if (paginatorStartTemplate(); as start) {\n <ng-template txPaginatorStart let-state>\n <ng-container [ngTemplateOutlet]=\"start.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: state }\" />\n </ng-template>\n }\n @if (paginatorEndTemplate(); as end) {\n <ng-template txPaginatorEnd let-state>\n <ng-container [ngTemplateOutlet]=\"end.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: state }\" />\n </ng-template>\n }\n </tx-paginator>\n</ng-template>\n",
746
+ styles: [":host{position:relative;display:block;min-width:0}.tx-data-view__body{position:relative}.tx-data-view__loading{position:absolute;inset:0;z-index:2;display:flex;align-items:center;justify-content:center}:host([data-styled]){border:var(--tx-data-view-border-width) solid var(--tx-data-view-border-color);border-radius:var(--tx-data-view-border-radius);background:var(--tx-data-view-background);color:var(--tx-data-view-color);font-family:var(--tx-font-family)}:host([data-styled]) .tx-data-view__header{padding:var(--tx-data-view-header-padding);border-radius:var(--tx-data-view-header-border-radius);border-bottom:1px solid var(--tx-data-view-border-color);background:var(--tx-data-view-header-background);color:var(--tx-data-view-header-color)}:host([data-styled]) .tx-data-view__footer{padding:var(--tx-data-view-footer-padding);border-radius:var(--tx-data-view-footer-border-radius);border-top:1px solid var(--tx-data-view-border-color);background:var(--tx-data-view-footer-background);color:var(--tx-data-view-footer-color)}:host([data-styled]) .tx-data-view__paginator{border-top:1px solid var(--tx-data-view-border-color)}:host([data-styled]) .tx-data-view__paginator--top{border-top:0;border-bottom:1px solid var(--tx-data-view-border-color)}:host([data-styled]) .tx-data-view__empty{padding:var(--tx-data-view-empty-padding);color:var(--tx-data-view-empty-color)}:host([data-styled]) .tx-data-view__loading{background:var(--tx-data-view-loading-background);-webkit-backdrop-filter:blur(var(--tx-data-view-loading-blur));backdrop-filter:blur(var(--tx-data-view-loading-blur))}:host([data-styled]) .tx-data-view__content{animation:tx-data-view-in calc(var(--tx-data-view-transition-duration) * 1.6) cubic-bezier(.2,0,0,1)}@keyframes tx-data-view-in{0%{opacity:0}}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-data-view__content{animation:none}}\n"],
747
+ dependencies: [
748
+ {
749
+ kind: "directive",
750
+ type: NgTemplateOutlet,
751
+ selector: "[ngTemplateOutlet]",
752
+ inputs: [
753
+ "ngTemplateOutletContext",
754
+ "ngTemplateOutlet",
755
+ "ngTemplateOutletInjector"
756
+ ]
757
+ },
758
+ {
759
+ kind: "component",
760
+ type: TxPaginator,
761
+ selector: "tx-paginator",
762
+ inputs: [
763
+ "first",
764
+ "rows",
765
+ "totalRecords",
766
+ "pageLinkSize",
767
+ "compactPageLinkSize",
768
+ "compactBreakpoint",
769
+ "rowsPerPageOptions",
770
+ "alwaysShow",
771
+ "showFirstLastIcon",
772
+ "showPageLinks",
773
+ "showCurrentPageReport",
774
+ "currentPageReportTemplate",
775
+ "showJumpToPageDropdown",
776
+ "showJumpToPageInput",
777
+ "showTotal",
778
+ "disabled",
779
+ "locale",
780
+ "dropdownScrollHeight",
781
+ "firstPageIcon",
782
+ "previousPageIcon",
783
+ "nextPageIcon",
784
+ "lastPageIcon",
785
+ "ariaLabel",
786
+ "dt",
787
+ "pt",
788
+ "ptOptions",
789
+ "unstyled"
790
+ ],
791
+ outputs: [
792
+ "firstChange",
793
+ "rowsChange",
794
+ "pageChange"
795
+ ]
796
+ },
797
+ {
798
+ kind: "directive",
799
+ type: TxPaginatorStart,
800
+ selector: "ng-template[txPaginatorStart]"
801
+ },
802
+ {
803
+ kind: "directive",
804
+ type: TxPaginatorEnd,
805
+ selector: "ng-template[txPaginatorEnd]"
806
+ },
807
+ {
808
+ kind: "component",
809
+ type: TxProgressSpinner,
810
+ selector: "tx-progress-spinner",
811
+ inputs: [
812
+ "size",
813
+ "strokeWidth",
814
+ "fill",
815
+ "animationDuration",
816
+ "color",
817
+ "ariaLabel",
818
+ "dt",
819
+ "pt",
820
+ "ptOptions",
821
+ "unstyled"
822
+ ]
823
+ }
824
+ ],
825
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
826
+ });
827
+ };
828
+ i0.ɵɵngDeclareClassMetadata({
829
+ minVersion: "12.0.0",
830
+ version: "22.2.3",
831
+ ngImport: i0,
832
+ type: TxDataView,
833
+ decorators: [{
834
+ type: Component,
835
+ args: [{
836
+ selector: "tx-data-view",
837
+ imports: [
838
+ NgTemplateOutlet,
839
+ TxPaginator,
840
+ TxPaginatorStart,
841
+ TxPaginatorEnd,
842
+ TxProgressSpinner
843
+ ],
844
+ changeDetection: ChangeDetectionStrategy.OnPush,
845
+ host: {
846
+ class: "tx-data-view",
847
+ "[class]": "passThrough().root?.class",
848
+ "[style]": "hostStyle()",
849
+ "[attr.data-styled]": "!isUnstyled() || null",
850
+ "[attr.data-layout]": "layout()",
851
+ "[class.tx-data-view--loading]": "loading()",
852
+ "[attr.aria-busy]": "loading() || null"
853
+ },
854
+ template: "@if (headerTemplate(); as header) {\n <div class=\"tx-data-view__header\" [class]=\"passThrough().header?.class\" [style]=\"passThrough().header?.style\">\n <ng-container [ngTemplateOutlet]=\"header.templateRef\" />\n </div>\n}\n\n@if (showPaginatorTop()) {\n <ng-container [ngTemplateOutlet]=\"pager\" [ngTemplateOutletContext]=\"{ $implicit: 'top' }\" />\n}\n\n<div class=\"tx-data-view__body\">\n @if (loading()) {\n <div class=\"tx-data-view__loading\" [class]=\"passThrough().loading?.class\" [style]=\"passThrough().loading?.style\">\n @if (loadingTemplate(); as loadingTemplate) {\n <ng-container [ngTemplateOutlet]=\"loadingTemplate.templateRef\" />\n } @else {\n <tx-progress-spinner [ariaLabel]=\"translations().loading\" [unstyled]=\"isUnstyled()\" />\n }\n </div>\n }\n\n @if (empty()) {\n <div class=\"tx-data-view__empty\" role=\"status\" [class]=\"passThrough().empty?.class\" [style]=\"passThrough().empty?.style\">\n @if (emptyTemplate(); as emptyTemplate) {\n <ng-container [ngTemplateOutlet]=\"emptyTemplate.templateRef\" />\n } @else {\n {{ emptyMessage() ?? translations().emptyMessage }}\n }\n </div>\n } @else {\n @for (mode of layoutKey(); track mode) {\n <div\n class=\"tx-data-view__content\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.role]=\"ariaLabel() ? 'region' : null\"\n [class]=\"passThrough().content?.class\"\n [style]=\"passThrough().content?.style\"\n >\n @if (activeTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"itemsContext()\" />\n }\n </div>\n }\n }\n</div>\n\n@if (showPaginatorBottom()) {\n <ng-container [ngTemplateOutlet]=\"pager\" [ngTemplateOutletContext]=\"{ $implicit: 'bottom' }\" />\n}\n\n@if (footerTemplate(); as footer) {\n <div class=\"tx-data-view__footer\" [class]=\"passThrough().footer?.class\" [style]=\"passThrough().footer?.style\">\n <ng-container [ngTemplateOutlet]=\"footer.templateRef\" />\n </div>\n}\n\n<ng-template #pager let-position>\n <tx-paginator\n class=\"tx-data-view__paginator\"\n [class.tx-data-view__paginator--top]=\"position === 'top'\"\n [class]=\"passThrough().paginator?.class\"\n [style]=\"passThrough().paginator?.style\"\n [first]=\"first()\"\n [rows]=\"rows()\"\n [totalRecords]=\"total()\"\n [rowsPerPageOptions]=\"rowsPerPageOptions()\"\n [showTotal]=\"showTotal()\"\n [showCurrentPageReport]=\"showCurrentPageReport()\"\n [currentPageReportTemplate]=\"currentPageReportTemplate()\"\n [showFirstLastIcon]=\"showFirstLastIcon()\"\n [showPageLinks]=\"showPageLinks()\"\n [showJumpToPageDropdown]=\"showJumpToPageDropdown()\"\n [showJumpToPageInput]=\"showJumpToPageInput()\"\n [alwaysShow]=\"alwaysShowPaginator()\"\n [pageLinkSize]=\"pageLinks()\"\n [unstyled]=\"isUnstyled()\"\n (pageChange)=\"onPage($event)\"\n >\n @if (paginatorStartTemplate(); as start) {\n <ng-template txPaginatorStart let-state>\n <ng-container [ngTemplateOutlet]=\"start.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: state }\" />\n </ng-template>\n }\n @if (paginatorEndTemplate(); as end) {\n <ng-template txPaginatorEnd let-state>\n <ng-container [ngTemplateOutlet]=\"end.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: state }\" />\n </ng-template>\n }\n </tx-paginator>\n</ng-template>\n",
855
+ styles: [":host{position:relative;display:block;min-width:0}.tx-data-view__body{position:relative}.tx-data-view__loading{position:absolute;inset:0;z-index:2;display:flex;align-items:center;justify-content:center}:host([data-styled]){border:var(--tx-data-view-border-width) solid var(--tx-data-view-border-color);border-radius:var(--tx-data-view-border-radius);background:var(--tx-data-view-background);color:var(--tx-data-view-color);font-family:var(--tx-font-family)}:host([data-styled]) .tx-data-view__header{padding:var(--tx-data-view-header-padding);border-radius:var(--tx-data-view-header-border-radius);border-bottom:1px solid var(--tx-data-view-border-color);background:var(--tx-data-view-header-background);color:var(--tx-data-view-header-color)}:host([data-styled]) .tx-data-view__footer{padding:var(--tx-data-view-footer-padding);border-radius:var(--tx-data-view-footer-border-radius);border-top:1px solid var(--tx-data-view-border-color);background:var(--tx-data-view-footer-background);color:var(--tx-data-view-footer-color)}:host([data-styled]) .tx-data-view__paginator{border-top:1px solid var(--tx-data-view-border-color)}:host([data-styled]) .tx-data-view__paginator--top{border-top:0;border-bottom:1px solid var(--tx-data-view-border-color)}:host([data-styled]) .tx-data-view__empty{padding:var(--tx-data-view-empty-padding);color:var(--tx-data-view-empty-color)}:host([data-styled]) .tx-data-view__loading{background:var(--tx-data-view-loading-background);-webkit-backdrop-filter:blur(var(--tx-data-view-loading-blur));backdrop-filter:blur(var(--tx-data-view-loading-blur))}:host([data-styled]) .tx-data-view__content{animation:tx-data-view-in calc(var(--tx-data-view-transition-duration) * 1.6) cubic-bezier(.2,0,0,1)}@keyframes tx-data-view-in{0%{opacity:0}}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-data-view__content{animation:none}}\n"]
856
+ }]
857
+ }],
858
+ ctorParameters: () => [],
859
+ propDecorators: {
860
+ value: [{
861
+ type: i0.Input,
862
+ args: [{
863
+ isSignal: true,
864
+ alias: "value",
865
+ required: false
866
+ }]
867
+ }],
868
+ layout: [{
869
+ type: i0.Input,
870
+ args: [{
871
+ isSignal: true,
872
+ alias: "layout",
873
+ required: false
874
+ }]
875
+ }, {
876
+ type: i0.Output,
877
+ args: ["layoutChange"]
878
+ }],
879
+ paginator: [{
880
+ type: i0.Input,
881
+ args: [{
882
+ isSignal: true,
883
+ alias: "paginator",
884
+ required: false
885
+ }]
886
+ }],
887
+ paginatorPosition: [{
888
+ type: i0.Input,
889
+ args: [{
890
+ isSignal: true,
891
+ alias: "paginatorPosition",
892
+ required: false
893
+ }]
894
+ }],
895
+ first: [{
896
+ type: i0.Input,
897
+ args: [{
898
+ isSignal: true,
899
+ alias: "first",
900
+ required: false
901
+ }]
902
+ }, {
903
+ type: i0.Output,
904
+ args: ["firstChange"]
905
+ }],
906
+ rows: [{
907
+ type: i0.Input,
908
+ args: [{
909
+ isSignal: true,
910
+ alias: "rows",
911
+ required: false
912
+ }]
913
+ }, {
914
+ type: i0.Output,
915
+ args: ["rowsChange"]
916
+ }],
917
+ totalRecords: [{
918
+ type: i0.Input,
919
+ args: [{
920
+ isSignal: true,
921
+ alias: "totalRecords",
922
+ required: false
923
+ }]
924
+ }],
925
+ pageLinks: [{
926
+ type: i0.Input,
927
+ args: [{
928
+ isSignal: true,
929
+ alias: "pageLinks",
930
+ required: false
931
+ }]
932
+ }],
933
+ rowsPerPageOptions: [{
934
+ type: i0.Input,
935
+ args: [{
936
+ isSignal: true,
937
+ alias: "rowsPerPageOptions",
938
+ required: false
939
+ }]
940
+ }],
941
+ alwaysShowPaginator: [{
942
+ type: i0.Input,
943
+ args: [{
944
+ isSignal: true,
945
+ alias: "alwaysShowPaginator",
946
+ required: false
947
+ }]
948
+ }],
949
+ showCurrentPageReport: [{
950
+ type: i0.Input,
951
+ args: [{
952
+ isSignal: true,
953
+ alias: "showCurrentPageReport",
954
+ required: false
955
+ }]
956
+ }],
957
+ currentPageReportTemplate: [{
958
+ type: i0.Input,
959
+ args: [{
960
+ isSignal: true,
961
+ alias: "currentPageReportTemplate",
962
+ required: false
963
+ }]
964
+ }],
965
+ showJumpToPageDropdown: [{
966
+ type: i0.Input,
967
+ args: [{
968
+ isSignal: true,
969
+ alias: "showJumpToPageDropdown",
970
+ required: false
971
+ }]
972
+ }],
973
+ showJumpToPageInput: [{
974
+ type: i0.Input,
975
+ args: [{
976
+ isSignal: true,
977
+ alias: "showJumpToPageInput",
978
+ required: false
979
+ }]
980
+ }],
981
+ showFirstLastIcon: [{
982
+ type: i0.Input,
983
+ args: [{
984
+ isSignal: true,
985
+ alias: "showFirstLastIcon",
986
+ required: false
987
+ }]
988
+ }],
989
+ showPageLinks: [{
990
+ type: i0.Input,
991
+ args: [{
992
+ isSignal: true,
993
+ alias: "showPageLinks",
994
+ required: false
995
+ }]
996
+ }],
997
+ showTotal: [{
998
+ type: i0.Input,
999
+ args: [{
1000
+ isSignal: true,
1001
+ alias: "showTotal",
1002
+ required: false
1003
+ }]
1004
+ }],
1005
+ lazy: [{
1006
+ type: i0.Input,
1007
+ args: [{
1008
+ isSignal: true,
1009
+ alias: "lazy",
1010
+ required: false
1011
+ }]
1012
+ }],
1013
+ lazyLoadOnInit: [{
1014
+ type: i0.Input,
1015
+ args: [{
1016
+ isSignal: true,
1017
+ alias: "lazyLoadOnInit",
1018
+ required: false
1019
+ }]
1020
+ }],
1021
+ loading: [{
1022
+ type: i0.Input,
1023
+ args: [{
1024
+ isSignal: true,
1025
+ alias: "loading",
1026
+ required: false
1027
+ }]
1028
+ }],
1029
+ emptyMessage: [{
1030
+ type: i0.Input,
1031
+ args: [{
1032
+ isSignal: true,
1033
+ alias: "emptyMessage",
1034
+ required: false
1035
+ }]
1036
+ }],
1037
+ sortField: [{
1038
+ type: i0.Input,
1039
+ args: [{
1040
+ isSignal: true,
1041
+ alias: "sortField",
1042
+ required: false
1043
+ }]
1044
+ }, {
1045
+ type: i0.Output,
1046
+ args: ["sortFieldChange"]
1047
+ }],
1048
+ sortOrder: [{
1049
+ type: i0.Input,
1050
+ args: [{
1051
+ isSignal: true,
1052
+ alias: "sortOrder",
1053
+ required: false
1054
+ }]
1055
+ }, {
1056
+ type: i0.Output,
1057
+ args: ["sortOrderChange"]
1058
+ }],
1059
+ filterBy: [{
1060
+ type: i0.Input,
1061
+ args: [{
1062
+ isSignal: true,
1063
+ alias: "filterBy",
1064
+ required: false
1065
+ }]
1066
+ }],
1067
+ filterValue: [{
1068
+ type: i0.Input,
1069
+ args: [{
1070
+ isSignal: true,
1071
+ alias: "filterValue",
1072
+ required: false
1073
+ }]
1074
+ }, {
1075
+ type: i0.Output,
1076
+ args: ["filterValueChange"]
1077
+ }],
1078
+ ariaLabel: [{
1079
+ type: i0.Input,
1080
+ args: [{
1081
+ isSignal: true,
1082
+ alias: "ariaLabel",
1083
+ required: false
1084
+ }]
1085
+ }],
1086
+ dt: [{
1087
+ type: i0.Input,
1088
+ args: [{
1089
+ isSignal: true,
1090
+ alias: "dt",
1091
+ required: false
1092
+ }]
1093
+ }],
1094
+ pt: [{
1095
+ type: i0.Input,
1096
+ args: [{
1097
+ isSignal: true,
1098
+ alias: "pt",
1099
+ required: false
1100
+ }]
1101
+ }],
1102
+ ptOptions: [{
1103
+ type: i0.Input,
1104
+ args: [{
1105
+ isSignal: true,
1106
+ alias: "ptOptions",
1107
+ required: false
1108
+ }]
1109
+ }],
1110
+ unstyled: [{
1111
+ type: i0.Input,
1112
+ args: [{
1113
+ isSignal: true,
1114
+ alias: "unstyled",
1115
+ required: false
1116
+ }]
1117
+ }],
1118
+ lazyLoad: [{
1119
+ type: i0.Output,
1120
+ args: ["lazyLoad"]
1121
+ }],
1122
+ pageChange: [{
1123
+ type: i0.Output,
1124
+ args: ["pageChange"]
1125
+ }],
1126
+ sortChange: [{
1127
+ type: i0.Output,
1128
+ args: ["sortChange"]
1129
+ }],
1130
+ listTemplate: [{
1131
+ type: i0.ContentChild,
1132
+ args: [i0.forwardRef(() => TxDataViewList), { isSignal: true }]
1133
+ }],
1134
+ gridTemplate: [{
1135
+ type: i0.ContentChild,
1136
+ args: [i0.forwardRef(() => TxDataViewGrid), { isSignal: true }]
1137
+ }],
1138
+ headerTemplate: [{
1139
+ type: i0.ContentChild,
1140
+ args: [i0.forwardRef(() => TxDataViewHeader), { isSignal: true }]
1141
+ }],
1142
+ footerTemplate: [{
1143
+ type: i0.ContentChild,
1144
+ args: [i0.forwardRef(() => TxDataViewFooter), { isSignal: true }]
1145
+ }],
1146
+ emptyTemplate: [{
1147
+ type: i0.ContentChild,
1148
+ args: [i0.forwardRef(() => TxDataViewEmpty), { isSignal: true }]
1149
+ }],
1150
+ loadingTemplate: [{
1151
+ type: i0.ContentChild,
1152
+ args: [i0.forwardRef(() => TxDataViewLoading), { isSignal: true }]
1153
+ }],
1154
+ paginatorStartTemplate: [{
1155
+ type: i0.ContentChild,
1156
+ args: [i0.forwardRef(() => TxDataViewPaginatorStart), { isSignal: true }]
1157
+ }],
1158
+ paginatorEndTemplate: [{
1159
+ type: i0.ContentChild,
1160
+ args: [i0.forwardRef(() => TxDataViewPaginatorEnd), { isSignal: true }]
1161
+ }]
1162
+ }
1163
+ });
1164
+ var TxDataViewLayoutSwitch = class TxDataViewLayoutSwitch {
1165
+ layout = model("list", ...ngDevMode ? [{ debugName: "layout" }] : /* istanbul ignore next */ []);
1166
+ size = input("medium", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
1167
+ ariaLabel = input(void 0, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
1168
+ unstyled = input(void 0, {
1169
+ ...ngDevMode ? { debugName: "unstyled" } : /* istanbul ignore next */ {},
1170
+ transform: optionalBoolean
1171
+ });
1172
+ translations = injectTranslations();
1173
+ isUnstyled = injectUnstyled(this.unstyled);
1174
+ static ɵfac = i0.ɵɵngDeclareFactory({
1175
+ minVersion: "12.0.0",
1176
+ version: "22.2.3",
1177
+ ngImport: i0,
1178
+ type: TxDataViewLayoutSwitch,
1179
+ deps: [],
1180
+ target: i0.ɵɵFactoryTarget.Component
1181
+ });
1182
+ static ɵcmp = i0.ɵɵngDeclareComponent({
1183
+ minVersion: "17.1.0",
1184
+ version: "22.2.3",
1185
+ type: TxDataViewLayoutSwitch,
1186
+ isStandalone: true,
1187
+ selector: "tx-data-view-layout",
1188
+ inputs: {
1189
+ layout: {
1190
+ classPropertyName: "layout",
1191
+ publicName: "layout",
1192
+ isSignal: true,
1193
+ isRequired: false,
1194
+ transformFunction: null
1195
+ },
1196
+ size: {
1197
+ classPropertyName: "size",
1198
+ publicName: "size",
1199
+ isSignal: true,
1200
+ isRequired: false,
1201
+ transformFunction: null
1202
+ },
1203
+ ariaLabel: {
1204
+ classPropertyName: "ariaLabel",
1205
+ publicName: "ariaLabel",
1206
+ isSignal: true,
1207
+ isRequired: false,
1208
+ transformFunction: null
1209
+ },
1210
+ unstyled: {
1211
+ classPropertyName: "unstyled",
1212
+ publicName: "unstyled",
1213
+ isSignal: true,
1214
+ isRequired: false,
1215
+ transformFunction: null
1216
+ }
1217
+ },
1218
+ outputs: { layout: "layoutChange" },
1219
+ host: { classAttribute: "tx-data-view-layout" },
1220
+ ngImport: i0,
1221
+ template: `
1222
+ <tx-button-group role="group" [attr.aria-label]="ariaLabel() ?? translations().layout">
1223
+ <button
1224
+ txButton
1225
+ type="button"
1226
+ icon="bars"
1227
+ severity="secondary"
1228
+ [size]="size()"
1229
+ [outlined]="layout() !== 'list'"
1230
+ [unstyled]="isUnstyled()"
1231
+ [attr.aria-label]="translations().listView"
1232
+ [attr.aria-pressed]="layout() === 'list'"
1233
+ (click)="layout.set('list')"
1234
+ ></button>
1235
+ <button
1236
+ txButton
1237
+ type="button"
1238
+ icon="th-large"
1239
+ severity="secondary"
1240
+ [size]="size()"
1241
+ [outlined]="layout() !== 'grid'"
1242
+ [unstyled]="isUnstyled()"
1243
+ [attr.aria-label]="translations().gridView"
1244
+ [attr.aria-pressed]="layout() === 'grid'"
1245
+ (click)="layout.set('grid')"
1246
+ ></button>
1247
+ </tx-button-group>
1248
+ `,
1249
+ isInline: true,
1250
+ dependencies: [{
1251
+ kind: "component",
1252
+ type: TxButton,
1253
+ selector: "button[txButton], a[txButton]",
1254
+ inputs: [
1255
+ "label",
1256
+ "severity",
1257
+ "size",
1258
+ "variant",
1259
+ "outlined",
1260
+ "text",
1261
+ "link",
1262
+ "rounded",
1263
+ "raised",
1264
+ "plain",
1265
+ "fluid",
1266
+ "disabled",
1267
+ "tabindex",
1268
+ "icon",
1269
+ "iconPos",
1270
+ "iconOnly",
1271
+ "loading",
1272
+ "loadingIcon",
1273
+ "badge",
1274
+ "badgeSeverity",
1275
+ "dt",
1276
+ "pt",
1277
+ "ptOptions",
1278
+ "unstyled"
1279
+ ]
1280
+ }, {
1281
+ kind: "component",
1282
+ type: TxButtonGroup,
1283
+ selector: "tx-button-group"
1284
+ }],
1285
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
1286
+ });
1287
+ };
1288
+ i0.ɵɵngDeclareClassMetadata({
1289
+ minVersion: "12.0.0",
1290
+ version: "22.2.3",
1291
+ ngImport: i0,
1292
+ type: TxDataViewLayoutSwitch,
1293
+ decorators: [{
1294
+ type: Component,
1295
+ args: [{
1296
+ selector: "tx-data-view-layout",
1297
+ imports: [TxButton, TxButtonGroup],
1298
+ template: `
1299
+ <tx-button-group role="group" [attr.aria-label]="ariaLabel() ?? translations().layout">
1300
+ <button
1301
+ txButton
1302
+ type="button"
1303
+ icon="bars"
1304
+ severity="secondary"
1305
+ [size]="size()"
1306
+ [outlined]="layout() !== 'list'"
1307
+ [unstyled]="isUnstyled()"
1308
+ [attr.aria-label]="translations().listView"
1309
+ [attr.aria-pressed]="layout() === 'list'"
1310
+ (click)="layout.set('list')"
1311
+ ></button>
1312
+ <button
1313
+ txButton
1314
+ type="button"
1315
+ icon="th-large"
1316
+ severity="secondary"
1317
+ [size]="size()"
1318
+ [outlined]="layout() !== 'grid'"
1319
+ [unstyled]="isUnstyled()"
1320
+ [attr.aria-label]="translations().gridView"
1321
+ [attr.aria-pressed]="layout() === 'grid'"
1322
+ (click)="layout.set('grid')"
1323
+ ></button>
1324
+ </tx-button-group>
1325
+ `,
1326
+ changeDetection: ChangeDetectionStrategy.OnPush,
1327
+ host: { class: "tx-data-view-layout" }
1328
+ }]
1329
+ }],
1330
+ propDecorators: {
1331
+ layout: [{
1332
+ type: i0.Input,
1333
+ args: [{
1334
+ isSignal: true,
1335
+ alias: "layout",
1336
+ required: false
1337
+ }]
1338
+ }, {
1339
+ type: i0.Output,
1340
+ args: ["layoutChange"]
1341
+ }],
1342
+ size: [{
1343
+ type: i0.Input,
1344
+ args: [{
1345
+ isSignal: true,
1346
+ alias: "size",
1347
+ required: false
1348
+ }]
1349
+ }],
1350
+ ariaLabel: [{
1351
+ type: i0.Input,
1352
+ args: [{
1353
+ isSignal: true,
1354
+ alias: "ariaLabel",
1355
+ required: false
1356
+ }]
1357
+ }],
1358
+ unstyled: [{
1359
+ type: i0.Input,
1360
+ args: [{
1361
+ isSignal: true,
1362
+ alias: "unstyled",
1363
+ required: false
1364
+ }]
1365
+ }]
1366
+ }
1367
+ });
1368
+ export { TxDataView, TxDataViewEmpty, TxDataViewFooter, TxDataViewGrid, TxDataViewHeader, TxDataViewLayoutSwitch, TxDataViewList, TxDataViewLoading, TxDataViewPaginatorEnd, TxDataViewPaginatorStart };
1369
+
1370
+ //# sourceMappingURL=tectra-ng-ui-data-view.mjs.map