overview-components 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (137) hide show
  1. package/dist/assets/generated/locales/de.d.ts +16 -0
  2. package/dist/assets/generated/locales/de.d.ts.map +1 -0
  3. package/dist/assets/generated/locales/de.js +16 -0
  4. package/dist/assets/generated/locales/de.js.map +1 -0
  5. package/dist/assets/generated/locales/en.d.ts +16 -0
  6. package/dist/assets/generated/locales/en.d.ts.map +1 -0
  7. package/dist/assets/generated/locales/en.js +16 -0
  8. package/dist/assets/generated/locales/en.js.map +1 -0
  9. package/dist/assets/generated/locales/pl.d.ts +16 -0
  10. package/dist/assets/generated/locales/pl.d.ts.map +1 -0
  11. package/dist/assets/generated/locales/pl.js +16 -0
  12. package/dist/assets/generated/locales/pl.js.map +1 -0
  13. package/dist/assets/generated/locales/sk.d.ts +16 -0
  14. package/dist/assets/generated/locales/sk.d.ts.map +1 -0
  15. package/dist/assets/generated/locales/sk.js +16 -0
  16. package/dist/assets/generated/locales/sk.js.map +1 -0
  17. package/dist/assets/icons/iconGlyphs.d.ts +875 -0
  18. package/dist/assets/icons/iconGlyphs.d.ts.map +1 -0
  19. package/dist/assets/icons/iconGlyphs.js +663 -0
  20. package/dist/assets/icons/iconGlyphs.js.map +1 -0
  21. package/dist/assets/ilustration/no-preview.d.ts +5 -0
  22. package/dist/assets/ilustration/no-preview.d.ts.map +1 -0
  23. package/dist/assets/ilustration/no-preview.js +131 -0
  24. package/dist/assets/ilustration/no-preview.js.map +1 -0
  25. package/dist/assets/ilustration/not-found.d.ts +5 -0
  26. package/dist/assets/ilustration/not-found.d.ts.map +1 -0
  27. package/dist/assets/ilustration/not-found.js +103 -0
  28. package/dist/assets/ilustration/not-found.js.map +1 -0
  29. package/dist/components/custom-filters.d.ts +2 -0
  30. package/dist/components/custom-filters.d.ts.map +1 -0
  31. package/dist/components/custom-filters.js +19 -0
  32. package/dist/components/custom-filters.js.map +1 -0
  33. package/dist/components/lit-attachments-tab.d.ts +71 -0
  34. package/dist/components/lit-attachments-tab.d.ts.map +1 -0
  35. package/dist/components/lit-attachments-tab.js +522 -0
  36. package/dist/components/lit-attachments-tab.js.map +1 -0
  37. package/dist/components/lit-case-variables-tab.d.ts +82 -0
  38. package/dist/components/lit-case-variables-tab.d.ts.map +1 -0
  39. package/dist/components/lit-case-variables-tab.js +356 -0
  40. package/dist/components/lit-case-variables-tab.js.map +1 -0
  41. package/dist/components/lit-data-grid-tanstack.d.ts +119 -0
  42. package/dist/components/lit-data-grid-tanstack.d.ts.map +1 -0
  43. package/dist/components/lit-data-grid-tanstack.js +1175 -0
  44. package/dist/components/lit-data-grid-tanstack.js.map +1 -0
  45. package/dist/components/react-wrappers/attachments-tab.d.ts +3 -0
  46. package/dist/components/react-wrappers/attachments-tab.d.ts.map +1 -0
  47. package/dist/components/react-wrappers/attachments-tab.js +9 -0
  48. package/dist/components/react-wrappers/attachments-tab.js.map +1 -0
  49. package/dist/components/react-wrappers/case-variables-tab.d.ts +3 -0
  50. package/dist/components/react-wrappers/case-variables-tab.d.ts.map +1 -0
  51. package/dist/components/react-wrappers/case-variables-tab.js +9 -0
  52. package/dist/components/react-wrappers/case-variables-tab.js.map +1 -0
  53. package/dist/components/react-wrappers/data-grid-tanstack.d.ts +3 -0
  54. package/dist/components/react-wrappers/data-grid-tanstack.d.ts.map +1 -0
  55. package/dist/components/react-wrappers/data-grid-tanstack.js +9 -0
  56. package/dist/components/react-wrappers/data-grid-tanstack.js.map +1 -0
  57. package/dist/data/translations.d.ts +2 -0
  58. package/dist/data/translations.d.ts.map +1 -0
  59. package/dist/data/translations.js +2763 -0
  60. package/dist/data/translations.js.map +1 -0
  61. package/dist/index.d.ts +13 -0
  62. package/dist/index.d.ts.map +1 -0
  63. package/dist/index.js +15 -0
  64. package/dist/index.js.map +1 -0
  65. package/dist/scripts/translate-locales.d.ts +2 -0
  66. package/dist/scripts/translate-locales.d.ts.map +1 -0
  67. package/dist/scripts/translate-locales.js +66 -0
  68. package/dist/scripts/translate-locales.js.map +1 -0
  69. package/dist/shared/filter-inputs.d.ts +45 -0
  70. package/dist/shared/filter-inputs.d.ts.map +1 -0
  71. package/dist/shared/filter-inputs.js +518 -0
  72. package/dist/shared/filter-inputs.js.map +1 -0
  73. package/dist/shared/lit-button.d.ts +24 -0
  74. package/dist/shared/lit-button.d.ts.map +1 -0
  75. package/dist/shared/lit-button.js +112 -0
  76. package/dist/shared/lit-button.js.map +1 -0
  77. package/dist/shared/lit-custom-popper.d.ts +19 -0
  78. package/dist/shared/lit-custom-popper.d.ts.map +1 -0
  79. package/dist/shared/lit-custom-popper.js +117 -0
  80. package/dist/shared/lit-custom-popper.js.map +1 -0
  81. package/dist/shared/lit-data-grid-action-buttons-popover.d.ts +33 -0
  82. package/dist/shared/lit-data-grid-action-buttons-popover.d.ts.map +1 -0
  83. package/dist/shared/lit-data-grid-action-buttons-popover.js +295 -0
  84. package/dist/shared/lit-data-grid-action-buttons-popover.js.map +1 -0
  85. package/dist/shared/lit-data-grid-export-popover.d.ts +15 -0
  86. package/dist/shared/lit-data-grid-export-popover.d.ts.map +1 -0
  87. package/dist/shared/lit-data-grid-export-popover.js +96 -0
  88. package/dist/shared/lit-data-grid-export-popover.js.map +1 -0
  89. package/dist/shared/lit-icon-button.d.ts +18 -0
  90. package/dist/shared/lit-icon-button.d.ts.map +1 -0
  91. package/dist/shared/lit-icon-button.js +81 -0
  92. package/dist/shared/lit-icon-button.js.map +1 -0
  93. package/dist/shared/lit-icon.d.ts +17 -0
  94. package/dist/shared/lit-icon.d.ts.map +1 -0
  95. package/dist/shared/lit-icon.js +284 -0
  96. package/dist/shared/lit-icon.js.map +1 -0
  97. package/dist/shared/lit-overflow-tooltip.d.ts +16 -0
  98. package/dist/shared/lit-overflow-tooltip.d.ts.map +1 -0
  99. package/dist/shared/lit-overflow-tooltip.js +86 -0
  100. package/dist/shared/lit-overflow-tooltip.js.map +1 -0
  101. package/dist/shared/lit-pill.d.ts +13 -0
  102. package/dist/shared/lit-pill.d.ts.map +1 -0
  103. package/dist/shared/lit-pill.js +88 -0
  104. package/dist/shared/lit-pill.js.map +1 -0
  105. package/dist/shared/lit-responsive-button.d.ts +27 -0
  106. package/dist/shared/lit-responsive-button.d.ts.map +1 -0
  107. package/dist/shared/lit-responsive-button.js +94 -0
  108. package/dist/shared/lit-responsive-button.js.map +1 -0
  109. package/dist/shared/lit-select.d.ts +25 -0
  110. package/dist/shared/lit-select.d.ts.map +1 -0
  111. package/dist/shared/lit-select.js +181 -0
  112. package/dist/shared/lit-select.js.map +1 -0
  113. package/dist/shared/lit-tooltip.d.ts +20 -0
  114. package/dist/shared/lit-tooltip.d.ts.map +1 -0
  115. package/dist/shared/lit-tooltip.js +123 -0
  116. package/dist/shared/lit-tooltip.js.map +1 -0
  117. package/dist/shared/styles/button-shared-styles.d.ts +3 -0
  118. package/dist/shared/styles/button-shared-styles.d.ts.map +1 -0
  119. package/dist/shared/styles/button-shared-styles.js +68 -0
  120. package/dist/shared/styles/button-shared-styles.js.map +1 -0
  121. package/dist/styles.d.ts +3 -0
  122. package/dist/styles.d.ts.map +1 -0
  123. package/dist/styles.js +169 -0
  124. package/dist/styles.js.map +1 -0
  125. package/dist/utils/date.d.ts +3 -0
  126. package/dist/utils/date.d.ts.map +1 -0
  127. package/dist/utils/date.js +16 -0
  128. package/dist/utils/date.js.map +1 -0
  129. package/dist/utils/getOverviewValue.d.ts +5 -0
  130. package/dist/utils/getOverviewValue.d.ts.map +1 -0
  131. package/dist/utils/getOverviewValue.js +178 -0
  132. package/dist/utils/getOverviewValue.js.map +1 -0
  133. package/dist/utils/localization.d.ts +7 -0
  134. package/dist/utils/localization.d.ts.map +1 -0
  135. package/dist/utils/localization.js +225 -0
  136. package/dist/utils/localization.js.map +1 -0
  137. package/package.json +59 -0
@@ -0,0 +1,1175 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import * as XLSX from 'xlsx';
8
+ import { css, html, LitElement } from 'lit';
9
+ import { msg } from '@lit/localize';
10
+ import { customElement, property, state } from 'lit/decorators.js';
11
+ import { TableController, getCoreRowModel, flexRender, getSortedRowModel, getFilteredRowModel, getFacetedRowModel, getFacetedUniqueValues, getGroupedRowModel, getExpandedRowModel, filterFns, } from '@tanstack/lit-table';
12
+ import { repeat } from 'lit/directives/repeat.js';
13
+ import { VirtualizerController } from '@tanstack/lit-virtual';
14
+ import { createRef, ref } from 'lit/directives/ref.js';
15
+ import { styleMap } from 'lit/directives/style-map.js';
16
+ // components
17
+ import '../shared/filter-inputs.js';
18
+ import '../shared/lit-icon.js';
19
+ import '../shared/lit-icon-button.js';
20
+ import '../shared/lit-button.js';
21
+ import '../shared/lit-responsive-button.js';
22
+ import '../shared/lit-tooltip.js';
23
+ import '../shared/lit-data-grid-export-popover.js';
24
+ import '../shared/lit-data-grid-action-buttons-popover.js';
25
+ import '../assets/ilustration/not-found.js';
26
+ import '../shared/lit-overflow-tooltip.js';
27
+ // utils
28
+ import { formatDate } from '../utils/date.js';
29
+ import { dateFilterFn } from './custom-filters.js';
30
+ import { setLocale } from '../utils/localization.js';
31
+ let LitDataGridTanstack = class LitDataGridTanstack extends LitElement {
32
+ constructor() {
33
+ super(...arguments);
34
+ this.row = [];
35
+ this.columns = [];
36
+ this.enableRowVirtualization = true;
37
+ this.enableColumnVirtualization = false;
38
+ this.enableColumnPinning = true;
39
+ this.enableGrouping = true;
40
+ this.exportData = true;
41
+ this.actionButtonsInMenu = false;
42
+ this.id = '';
43
+ this.initialSorting = [];
44
+ this.leftPinnedColumns = [];
45
+ this.rightPinnedColumns = [];
46
+ this.enableFiltering = true;
47
+ this.userLang = 'cs';
48
+ this.dateFormat = null;
49
+ this.isLoading = false;
50
+ this.rowsCount = 0;
51
+ this.isScrollable = false;
52
+ this.disableScrollLeft = true;
53
+ this.disableScrollRight = false;
54
+ this.tableController = new TableController(this);
55
+ this.tableContainerRef = createRef();
56
+ this.scrollInterval = null;
57
+ this.getCellBackgroundColor = (cell) => {
58
+ if (cell.getIsGrouped()) {
59
+ return this.columnGroupedColor ?? `var(--color-primary-light, #f0fadf)`;
60
+ }
61
+ if (cell.getIsAggregated()) {
62
+ return this.rowAggregationColor ?? `var(--color-warning-light, #ffe1a8)`;
63
+ }
64
+ if (cell.getIsPlaceholder()) {
65
+ return `var(--background-default, #eff3f4)`;
66
+ }
67
+ if (cell.column.getIsPinned()) {
68
+ return `var(--background-paper, #fff)`;
69
+ }
70
+ return 'transparent';
71
+ };
72
+ this.updateScrollState = () => {
73
+ const grid = this.tableContainerRef.value;
74
+ if (grid) {
75
+ const canScrollHorizontally = grid.scrollWidth > grid.clientWidth;
76
+ this.isScrollable = canScrollHorizontally;
77
+ this.disableScrollLeft = grid.scrollLeft === 0;
78
+ this.disableScrollRight = grid.scrollLeft + grid.clientWidth >= grid.scrollWidth;
79
+ }
80
+ };
81
+ }
82
+ connectedCallback() {
83
+ this.setLanguage();
84
+ this.initRowVirtualizer();
85
+ this.initColumnVirtualizer();
86
+ super.connectedCallback();
87
+ window.addEventListener('resize', this.updateScrollState);
88
+ }
89
+ disconnectedCallback() {
90
+ super.disconnectedCallback();
91
+ window.removeEventListener('resize', this.updateScrollState);
92
+ }
93
+ initRowVirtualizer() {
94
+ this.rowVirtualizerController = new VirtualizerController(this, {
95
+ count: this.table?.getRowModel()?.rows.length || this.row?.length || 1,
96
+ getScrollElement: () => this.tableContainerRef.value,
97
+ estimateSize: () => 38,
98
+ overscan: 5,
99
+ });
100
+ }
101
+ initColumnVirtualizer() {
102
+ this.columnVirtualizerController = new VirtualizerController(this, {
103
+ horizontal: true,
104
+ count: this.table?.getVisibleLeafColumns().length || this.columns.length || 1,
105
+ getScrollElement: () => this.tableContainerRef.value,
106
+ estimateSize: (index) => this.table.getVisibleLeafColumns()[index].getSize() || 200,
107
+ overscan: 5,
108
+ });
109
+ }
110
+ setLanguage() {
111
+ const lang = this.userLang || localStorage.getItem('userLang');
112
+ if (lang) {
113
+ setLocale(lang);
114
+ }
115
+ }
116
+ updated(changedProperties) {
117
+ if (changedProperties.has('rowsCount') && this.enableRowVirtualization) {
118
+ this.initRowVirtualizer();
119
+ // this.table.setOptions((prev: any) => ({
120
+ // ...this.table.options,
121
+ // data: [],
122
+ // }));
123
+ this.requestUpdate();
124
+ }
125
+ }
126
+ getTanstackColumns(columns) {
127
+ return columns.map((column) => {
128
+ return {
129
+ id: column.field,
130
+ accessorKey: column.field,
131
+ accessorFn: column.accessorFn ?? ((originalRow) => originalRow[column.field]),
132
+ type: column.type,
133
+ header: column.headerName,
134
+ cell: (props) => {
135
+ const value = props.getValue();
136
+ const isGrouped = props.row.getIsGrouped?.();
137
+ const isAggregated = props.row.getIsAggregated?.();
138
+ if (isGrouped && column.type !== 'date') {
139
+ return value;
140
+ }
141
+ if (isGrouped && column.type === 'date') {
142
+ return formatDate(value, this.userLang || 'cs', this.dateFormat);
143
+ }
144
+ if (isAggregated) {
145
+ return value;
146
+ }
147
+ if (column.type === 'date' && value) {
148
+ return formatDate(value, this.userLang || 'cs', this.dateFormat);
149
+ }
150
+ return column.cell ? column.cell(props, html) : value;
151
+ },
152
+ filterFn: (() => {
153
+ switch (column.type) {
154
+ case 'range':
155
+ return filterFns.inNumberRange;
156
+ case 'select':
157
+ return filterFns.weakEquals;
158
+ case 'number':
159
+ return filterFns.weakEquals;
160
+ case 'date':
161
+ return dateFilterFn;
162
+ case 'string':
163
+ return filterFns.includesString;
164
+ default:
165
+ return filterFns.includesString;
166
+ }
167
+ })(),
168
+ enableColumnFilter: this.enableFiltering && (column.enableFilter ?? true),
169
+ size: column.size || this.columnDefaultSize || undefined,
170
+ maxSize: column.maxSize || this.columnDefaultMaxSize || 500,
171
+ minSize: column.minSize || this.columnDefaultMinSize || 100,
172
+ meta: {
173
+ filterVariant: column.type ?? 'string',
174
+ },
175
+ aggregationFn: column.columnAggregation ?? undefined,
176
+ enableGrouping: column.enableGrouping ?? true,
177
+ };
178
+ });
179
+ }
180
+ getCommonPinningStyles(column) {
181
+ const isPinned = column.getIsPinned();
182
+ const isLastLeftPinnedColumn = isPinned === 'left' && column.getIsLastColumn('left');
183
+ return {
184
+ position: isPinned ? 'sticky' : 'relative',
185
+ left: isPinned === 'left' ? `${column.getStart('left')}px` : undefined,
186
+ boxShadow: isLastLeftPinnedColumn ? '-4px 0 4px -4px gray inset' : undefined,
187
+ zIndex: `${isPinned ? 1 : 'auto'}`,
188
+ background: isPinned ? 'var(--background-paper, #fff)' : undefined,
189
+ };
190
+ }
191
+ togglePin(header) {
192
+ if (header.column.getIsPinned()) {
193
+ header.column.pin(false); // Odpinovanie
194
+ }
195
+ else {
196
+ header.column.pin('left'); // Pripnutie doľava
197
+ }
198
+ }
199
+ exportDataToCsv() {
200
+ const rows = this.getAllRowsIncludingGrouped(this.table.getRowModel().rows); // Získanie všetkých riadkov vrátane skupín
201
+ if (!rows || rows.length === 0) {
202
+ console.warn('No data to export');
203
+ return;
204
+ }
205
+ // Generovanie hlavičky CSV zo stĺpcov
206
+ const header = this.columns
207
+ .map((col) => col.headerName || '') // Získanie názvov stĺpcov
208
+ .join(',');
209
+ // Generovanie dát pre CSV
210
+ const csvRows = rows.map((row) => {
211
+ return this.columns
212
+ .map((col) => {
213
+ const accessor = col.field; // Získanie kľúča pre hodnotu
214
+ if (row.getIsGrouped?.()) {
215
+ // Ak je skupinový riadok, pridaj počet záznamov do prvej bunky
216
+ if (col.field === row.groupingColumnId) {
217
+ return `"${row.getValue(col.field)} (${row.subRows.length})"`;
218
+ }
219
+ return ''; // Ostatné stĺpce v skupinovom riadku prázdne
220
+ }
221
+ const value = accessor ? row.original?.[accessor] || '' : ''; // Získanie hodnoty pre normálny riadok
222
+ return typeof value === 'string'
223
+ ? `"${value.replace(/"/g, '""')}"` // Ošetrenie dvojitých úvodzoviek
224
+ : value;
225
+ })
226
+ .join(',');
227
+ });
228
+ // Pridanie hlavičky na začiatok CSV
229
+ csvRows.unshift(header);
230
+ // Vytvorenie CSV súboru
231
+ const csvContent = csvRows.join('\n');
232
+ const blob = new Blob([csvContent], { type: 'text/csv;charset=utf-8;' });
233
+ // Stiahnutie CSV súboru
234
+ const url = URL.createObjectURL(blob);
235
+ const link = document.createElement('a');
236
+ link.href = url;
237
+ link.download = 'data.csv';
238
+ link.click();
239
+ URL.revokeObjectURL(url);
240
+ }
241
+ exportDataToExcel() {
242
+ const rows = this.getAllRowsIncludingGrouped(this.table.getRowModel().rows); // Získanie všetkých riadkov vrátane skupín
243
+ if (!rows || rows.length === 0) {
244
+ console.warn('No data to export');
245
+ return;
246
+ }
247
+ // Príprava dát pre Excel
248
+ const data = rows.map((row) => {
249
+ const formattedRow = {};
250
+ this.columns.forEach((col) => {
251
+ const columnName = col.headerName || ''; // Dynamický názov stĺpca
252
+ const accessor = col.field; // Dynamický kľúč pre hodnoty
253
+ if (row.getIsGrouped?.()) {
254
+ // Skupinový riadok
255
+ if (col.field === row.groupingColumnId) {
256
+ // Pridanie názvu skupiny a počtu záznamov
257
+ formattedRow[columnName] =
258
+ `${row.getValue(accessor)} (${row.subRows.length})`;
259
+ }
260
+ else {
261
+ // Ostatné stĺpce prázdne
262
+ formattedRow[columnName] = '';
263
+ }
264
+ }
265
+ else if (accessor) {
266
+ // Normálny riadok
267
+ formattedRow[columnName] =
268
+ row.original?.[accessor] || row.getValue?.(accessor) || '';
269
+ }
270
+ });
271
+ return formattedRow;
272
+ });
273
+ // Vytvorenie pracovného listu a zošita
274
+ const worksheet = XLSX.utils.json_to_sheet(data); // Konverzia dát do Excel formátu
275
+ // Automatické prispôsobenie šírky stĺpcov
276
+ const colWidths = this.columns.map((col, colIndex) => {
277
+ const maxContentLength = Math.max(col.headerName?.length || 10, // Dĺžka názvu stĺpca
278
+ ...data.map((row) => row[col.headerName || '']?.toString().length || 0));
279
+ return { wch: maxContentLength + 2 }; // Pridanie extra priestoru
280
+ });
281
+ worksheet['!cols'] = colWidths; // Nastavenie šírky stĺpcov
282
+ const workbook = XLSX.utils.book_new(); // Nový Excel zošit
283
+ XLSX.utils.book_append_sheet(workbook, worksheet, 'Data'); // Pridanie dát do zošita
284
+ // Export do súboru
285
+ XLSX.writeFile(workbook, 'data.xlsx');
286
+ }
287
+ getAllRowsIncludingGrouped(rows) {
288
+ const allRows = [];
289
+ rows.forEach((row) => {
290
+ if (row.getIsGrouped?.()) {
291
+ allRows.push(row);
292
+ if (row.subRows && row.subRows.length > 0) {
293
+ allRows.push(...this.getAllRowsIncludingGrouped(row.subRows));
294
+ }
295
+ }
296
+ else {
297
+ allRows.push(row);
298
+ }
299
+ });
300
+ return allRows.filter((row, index, self) => index === self.findIndex((r) => r.id === row.id));
301
+ }
302
+ firstUpdated() {
303
+ const grid = this.tableContainerRef.value;
304
+ if (grid) {
305
+ grid.addEventListener('scroll', this.updateScrollState);
306
+ }
307
+ this.updateScrollState();
308
+ }
309
+ startScroll(direction) {
310
+ const grid = this.tableContainerRef.value;
311
+ if (!grid)
312
+ return;
313
+ const scrollAmount = direction === 'left' ? -15 : 15;
314
+ const scroll = () => {
315
+ grid.scrollLeft += scrollAmount;
316
+ this.updateScrollState();
317
+ this.scrollInterval = requestAnimationFrame(scroll);
318
+ };
319
+ this.scrollInterval = requestAnimationFrame(scroll);
320
+ }
321
+ stopScroll() {
322
+ if (this.scrollInterval) {
323
+ cancelAnimationFrame(this.scrollInterval);
324
+ this.scrollInterval = null;
325
+ }
326
+ }
327
+ render() {
328
+ this.table = this.tableController.table({
329
+ data: this.row || [],
330
+ columns: this.getTanstackColumns(this.columns),
331
+ columnResizeMode: 'onChange',
332
+ columnResizeDirection: 'ltr',
333
+ defaultColumn: {
334
+ size: this.columnDefaultSize || undefined, //starting column size
335
+ minSize: this.columnDefaultMinSize || 100, //enforced during column resizing
336
+ maxSize: this.columnDefaultMaxSize || 500, //enforced during column resizing
337
+ },
338
+ initialState: {
339
+ sorting: [...(this.initialSorting || [])],
340
+ grouping: [...(this.initialGroups || [])],
341
+ columnVisibility: { ...this.initialColumnVisibility },
342
+ columnPinning: {
343
+ left: [...(this.leftPinnedColumns || [])],
344
+ right: [...(this.rightPinnedColumns || [])],
345
+ },
346
+ },
347
+ filterFns: {
348
+ dateFilterFn: dateFilterFn,
349
+ },
350
+ enableColumnPinning: this.enableColumnPinning,
351
+ enableGrouping: this.enableGrouping,
352
+ // groupedColumnMode: 'reorder',
353
+ getCoreRowModel: getCoreRowModel(),
354
+ getSortedRowModel: getSortedRowModel(),
355
+ getFilteredRowModel: getFilteredRowModel(),
356
+ getFacetedRowModel: getFacetedRowModel(),
357
+ getGroupedRowModel: getGroupedRowModel(),
358
+ getExpandedRowModel: getExpandedRowModel(),
359
+ getFacetedUniqueValues: getFacetedUniqueValues(),
360
+ // onColumnFiltersChange: () => rowVirtualizer?.measure(),
361
+ });
362
+ this.rowsCount = this.table.getRowModel().rows.length;
363
+ // Ak virtualizácia nie je povolená, použijeme celý zoznam riadkov alebo stĺpcov
364
+ const rowVirtualizer = this.enableRowVirtualization
365
+ ? this.rowVirtualizerController?.getVirtualizer()
366
+ : null;
367
+ const columnVirtualizer = this.enableColumnVirtualization
368
+ ? this.columnVirtualizerController?.getVirtualizer()
369
+ : null;
370
+ const virtualColumns = columnVirtualizer?.getVirtualItems() ?? [];
371
+ // Get table rows (either virtualized or all)
372
+ const { rows } = this.table.getRowModel();
373
+ // console.log('rows', rows);
374
+ const rowItems = rowVirtualizer
375
+ ? rowVirtualizer.getVirtualItems()
376
+ : rows.map((_, index) => ({
377
+ key: index,
378
+ index,
379
+ start: index * 38,
380
+ end: (index + 1) * 38,
381
+ size: 38,
382
+ lane: 0,
383
+ }));
384
+ // console.log('rowItems', rowItems);
385
+ // Calculate padding for virtualization
386
+ let virtualPaddingLeft;
387
+ let virtualPaddingRight;
388
+ if (columnVirtualizer && virtualColumns?.length && this.enableColumnVirtualization) {
389
+ virtualPaddingLeft = virtualColumns[0]?.start ?? 0;
390
+ virtualPaddingRight =
391
+ columnVirtualizer.getTotalSize() -
392
+ (virtualColumns[virtualColumns.length - 1]?.end ?? 0);
393
+ }
394
+ let isMobile = window.matchMedia('(max-width: 600px)').matches;
395
+ return html `
396
+ <div class="data-grid__wrapper">
397
+ ${this.isScrollable && !isMobile
398
+ ? html `
399
+ <lit-icon-button
400
+ class="scroll-button left"
401
+ .disabled="${this.disableScrollLeft}"
402
+ @pointerdown="${() => this.startScroll('left')}"
403
+ @pointerup="${this.stopScroll}"
404
+ @pointerleave="${this.stopScroll}"
405
+ size="small"
406
+ variant="contained"
407
+ icon="arrowLeft"
408
+ >
409
+ </lit-icon-button>
410
+ <lit-icon-button
411
+ class="scroll-button right"
412
+ .disabled="${this.disableScrollRight}"
413
+ @pointerdown="${() => this.startScroll('right')}"
414
+ @pointerup="${this.stopScroll}"
415
+ @pointerleave="${this.stopScroll}"
416
+ size="small"
417
+ variant="contained"
418
+ icon="arrowRight"
419
+ >
420
+ </lit-icon-button>
421
+ `
422
+ : null}
423
+ <div class="grid" ${ref(this.tableContainerRef)}>
424
+ <table style="width: ${this.table.getCenterTotalSize()}px">
425
+ <thead style="height: ${this.enableFiltering ? '4rem' : '1.625rem'};">
426
+ ${repeat(this.table.getHeaderGroups(), (headerGroup) => headerGroup.id, (headerGroup) => {
427
+ const headerColumns = this.enableColumnVirtualization
428
+ ? virtualColumns.map((vc) => headerGroup.headers[vc.index])
429
+ : headerGroup.headers;
430
+ const newHeaderColumns = this.enableColumnVirtualization
431
+ ? [
432
+ ...headerGroup.headers.filter((hc) => hc.column.getIsPinned()),
433
+ ...headerColumns.filter((hc) => !hc.column.getIsPinned()),
434
+ ]
435
+ : headerColumns;
436
+ return html `
437
+ <tr class="head" data-index="${headerGroup.id}">
438
+ ${virtualPaddingLeft
439
+ ? html `
440
+ <th
441
+ style=" display: flex; width: ${virtualPaddingLeft}px;"
442
+ ></th>
443
+ `
444
+ : ''}
445
+ ${repeat(newHeaderColumns, (header) => header.id, (header, index) => {
446
+ const column = header.column;
447
+ const style = {
448
+ ...this.getCommonPinningStyles(header.column),
449
+ width: `${column.getSize()}px`,
450
+ flexGrow: `${column.columnDef.size === undefined ? 1 : 'unset'}`,
451
+ };
452
+ return html `
453
+ <th
454
+ class="head"
455
+ style="${styleMap(style)}"
456
+ colspan="${header.colSpan}"
457
+ data-index="${header.id}"
458
+ >
459
+ ${header.isPlaceholder
460
+ ? ''
461
+ : html `
462
+ <div
463
+ class="resizer ${this
464
+ .table.options
465
+ .columnResizeDirection} ${header.column.getIsResizing()
466
+ ? 'is-resizing'
467
+ : ''}"
468
+ style="transform: ${this
469
+ .table.options
470
+ .columnResizeMode ===
471
+ 'onEnd' &&
472
+ header.column.getIsResizing()
473
+ ? `translateX(${(this.table
474
+ .options
475
+ .columnResizeDirection ===
476
+ 'rtl'
477
+ ? -1
478
+ : 1) *
479
+ (this.table.getState()
480
+ .columnSizingInfo
481
+ .deltaOffset ??
482
+ 0)}px)`
483
+ : ''}"
484
+ >
485
+ <div
486
+ style="display: flex; align-items: center; height: 100%;"
487
+ >
488
+ <div
489
+ class="column-header"
490
+ @click=${header.column.getToggleSortingHandler()}
491
+ >
492
+ <lit-overflow-tooltip
493
+ label="${header
494
+ .column
495
+ .columnDef
496
+ .header}"
497
+ >
498
+ ${header
499
+ .column
500
+ .columnDef
501
+ .header}
502
+ </lit-overflow-tooltip>
503
+ </div>
504
+
505
+ <div
506
+ class="icons-group-pin"
507
+ >
508
+ ${header.column.getIsSorted()
509
+ ? header.column.getIsSorted() ===
510
+ 'asc'
511
+ ? html `<slot
512
+ name="iconSortUp"
513
+ ><lit-icon
514
+ size="0.75rem"
515
+ icon="chevronUpFilled"
516
+ ></lit-icon
517
+ ></slot>`
518
+ : html `<slothea
519
+ name="iconSortDown"
520
+ >
521
+ <lit-icon
522
+ size="0.75rem"
523
+ icon="chevronDownFilled"
524
+ ></lit-icon>
525
+ </slothea>`
526
+ : html `<div></div>`}
527
+ <div class="flex">
528
+ ${!this
529
+ .actionButtonsInMenu
530
+ ? html `
531
+ ${header.column.getCanPin()
532
+ ? html `
533
+ <lit-tooltip
534
+ label="${header.column.getIsPinned()
535
+ ? msg('Zrušit připnutí sloupce')
536
+ : msg('Připnout sloupec vlevo')}"
537
+ variant="bottom"
538
+ >
539
+ <lit-icon-button
540
+ @click="${() => this.togglePin(header)}"
541
+ size="small"
542
+ variant="text"
543
+ icon="pin"
544
+ .active="${header.column.getIsPinned()}"
545
+ >
546
+ </lit-icon-button>
547
+ </lit-tooltip>
548
+ `
549
+ : ''}
550
+ ${header.column.getCanGroup()
551
+ ? html `
552
+ <lit-tooltip
553
+ label="${header.column.getIsGrouped()
554
+ ? msg('Zrušit seskupení')
555
+ : msg('Seskupit sloupec')}"
556
+ variant="bottom"
557
+ >
558
+ <lit-icon-button
559
+ @click="${header.column.getToggleGroupingHandler()}"
560
+ size="small"
561
+ variant="text"
562
+ .active="${header.column.getIsGrouped()}"
563
+ icon="agregation"
564
+ >
565
+ </lit-icon-button>
566
+ </lit-tooltip>
567
+ `
568
+ : ''}
569
+ `
570
+ : html `
571
+ <lit-data-grid-action-buttons-popover
572
+ .group="${header.column.getToggleGroupingHandler()}"
573
+ .pin="${() => this.togglePin(header)}"
574
+ .header="${header}"
575
+ .table="${this
576
+ .table}"
577
+ ></lit-data-grid-action-buttons-popover>
578
+ `}
579
+ </div>
580
+ </div>
581
+ </div>
582
+ </div>
583
+ ${header.column.getCanFilter()
584
+ ? html `
585
+ <div>
586
+ <filter-inputs
587
+ .column=${header.column}
588
+ .dateFormat=${this
589
+ .dateFormat}
590
+ .userLang=${this
591
+ .userLang}
592
+ ></filter-inputs>
593
+ </div>
594
+ `
595
+ : null}
596
+ `}
597
+ <div
598
+ class="resize-handle"
599
+ @dblclick="${(event) => {
600
+ if (event.target.classList.contains('resize-handle')) {
601
+ header.column.resetSize();
602
+ }
603
+ }}"
604
+ @mousedown="${(event) => {
605
+ if (event.target.classList.contains('resize-handle')) {
606
+ header.getResizeHandler()(event);
607
+ }
608
+ }}"
609
+ @touchstart="${(event) => {
610
+ if (event.target.classList.contains('resize-handle')) {
611
+ header.getResizeHandler()(event);
612
+ }
613
+ }}"
614
+ ></div>
615
+ </th>
616
+ `;
617
+ })}
618
+ ${virtualPaddingRight
619
+ ? html `
620
+ <th
621
+ style=" display: flex; width: ${virtualPaddingRight}px;"
622
+ ></th>
623
+ `
624
+ : ''}
625
+ </tr>
626
+ `;
627
+ })}
628
+ ${this.isLoading
629
+ ? html `
630
+ <div class="progress-root">
631
+ <div class="bar bar1Indeterminate"></div>
632
+ <div class="bar bar2Indeterminate"></div>
633
+ </div>
634
+ `
635
+ : ''}
636
+ </thead>
637
+
638
+ <tbody
639
+ style="height: ${rowVirtualizer &&
640
+ this.table.getRowModel().rows.length > 0
641
+ ? rowVirtualizer.getTotalSize() + 'px'
642
+ : 'auto'};"
643
+ >
644
+ ${rows.length > 0
645
+ ? repeat(rowItems, (item) => item.key, (item) => {
646
+ const row = rows[item.index];
647
+ const visibleCells = row?.getVisibleCells();
648
+ // console.log('visibleCells', visibleCells);
649
+ const bodyColumns = this.enableColumnVirtualization
650
+ ? virtualColumns?.map((vc) => visibleCells && visibleCells[vc.index])
651
+ : visibleCells;
652
+ const pinnedColumns = visibleCells?.filter((bc) => bc.column.getIsPinned()) || [];
653
+ const newBodyColumns = this.enableColumnVirtualization
654
+ ? [...new Set([...pinnedColumns, ...bodyColumns])]
655
+ : bodyColumns;
656
+ const tbodyStyle = {
657
+ transform: rowVirtualizer
658
+ ? `translateY(${item.start}px)`
659
+ : 'none',
660
+ height: '38px',
661
+ lineHeight: '38px',
662
+ position: rowVirtualizer ? 'absolute' : 'relative',
663
+ };
664
+ return row
665
+ ? html `
666
+ <tr
667
+ class="body"
668
+ data-index="${item.index}"
669
+ style="${styleMap(tbodyStyle)}"
670
+ ${ref((node) => {
671
+ if (node &&
672
+ this.enableRowVirtualization &&
673
+ rowVirtualizer) {
674
+ // Only measure element if virtualization is enabled
675
+ rowVirtualizer.measureElement(node);
676
+ }
677
+ })}
678
+ >
679
+ ${virtualPaddingLeft
680
+ ? html `
681
+ <th
682
+ style=" display: flex; width: ${virtualPaddingLeft}px;"
683
+ ></th>
684
+ `
685
+ : ''}
686
+ <!-- Cells for each row -->
687
+ ${repeat(newBodyColumns, (cell) => cell.key, (cell) => {
688
+ const { column } = cell;
689
+ const style = {
690
+ ...this.getCommonPinningStyles(cell.column),
691
+ width: `${cell.column.getSize()}px`,
692
+ flexGrow: `${column.columnDef.size === undefined ? 1 : 'unset'}`,
693
+ background: this.getCellBackgroundColor(cell),
694
+ lineHeight: '2.3125rem', // správny zápis reťazca
695
+ };
696
+ return html `
697
+ <td style="${styleMap(style)}">
698
+ ${cell.getIsGrouped()
699
+ ? html `
700
+ <lit-button
701
+ @click="${row.getToggleExpandedHandler()}"
702
+ variant="inherit"
703
+ count="${row
704
+ .subRows
705
+ .length}"
706
+ label="${flexRender(cell
707
+ .column
708
+ .columnDef
709
+ .cell, cell.getContext())}"
710
+ icon="${row.getIsExpanded()
711
+ ? 'chevronDownFilled'
712
+ : 'chevron'}"
713
+ >
714
+ <!-- ${row.getIsExpanded()
715
+ ? html `<slot
716
+ name="groupedIcon-expanded"
717
+ slot="start-icon"
718
+ ></slot>`
719
+ : html `<slot
720
+ name="groupedIcon"
721
+ slot="start-icon"
722
+ ></slot>`} -->
723
+ }
724
+ ${row.subRows
725
+ .length}
726
+ ${flexRender(cell
727
+ .column
728
+ .columnDef
729
+ .cell, cell.getContext())}
730
+ </lit-button>
731
+ `
732
+ : cell.getIsAggregated()
733
+ ? html `
734
+ <div
735
+ style="display: flex; flex-direction: row; align-items: center;"
736
+ >
737
+ ${flexRender(cell
738
+ .column
739
+ .columnDef
740
+ .aggregatedCell ??
741
+ cell
742
+ .column
743
+ .columnDef
744
+ .cell, cell.getContext())}
745
+ </div>
746
+ `
747
+ : cell.getIsPlaceholder()
748
+ ? null
749
+ : flexRender(cell.column
750
+ .columnDef
751
+ .cell, cell.getContext())}
752
+ </td>
753
+ `;
754
+ })}
755
+ ${virtualPaddingRight
756
+ ? html `
757
+ <th
758
+ style=" display: flex; width: ${virtualPaddingRight}px;"
759
+ ></th>
760
+ `
761
+ : ''}
762
+ </tr>
763
+ `
764
+ : null;
765
+ })
766
+ : null}
767
+ </tbody>
768
+ </table>
769
+ <div class="footer-container">
770
+ <span class="numberCount">
771
+ ${msg('Počet záznamů')}: ${this.table.getRowModel().rows.length}
772
+ </span>
773
+ <div class="right-actions">
774
+ <lit-responsive-button
775
+ size="small"
776
+ variant="text"
777
+ label=${msg('Přizpůsobit sloupce')}
778
+ icon="columns"
779
+ @click=${() => this.table.resetColumnSizing()}
780
+ ></lit-responsive-button>
781
+ ${this.exportData
782
+ ? html `
783
+ <lit-data-grid-export-popover
784
+ .exportToCsv="${() => this.exportDataToCsv()}"
785
+ .exportToExcel="${() => this.exportDataToExcel()}"
786
+ >
787
+ <slot slot="iconExcel" name="iconExcel"
788
+ ><lit-icon icon="csv"></lit-icon
789
+ ></slot>
790
+ <slot slot="iconCsv" name="iconCsv"
791
+ ><lit-icon icon="csv"></lit-icon
792
+ ></slot>
793
+ </lit-data-grid-export-popover>
794
+ `
795
+ : null}
796
+ </div>
797
+ </div>
798
+ </div>
799
+ ${this.table.getRowModel().rows.length < 1
800
+ ? html ` <div class="data-grid__empty">
801
+ <div style="max-height: 7.125rem; max-width: 7.125rem">
802
+ <not-found></not-found>
803
+ </div>
804
+ ${msg('Nic dalšího tu není')}
805
+ </div>`
806
+ : null}
807
+ </div>
808
+ `;
809
+ }
810
+ };
811
+ LitDataGridTanstack.styles = [
812
+ // styles,
813
+ css `
814
+ *,
815
+ *::before,
816
+ *::after {
817
+ margin: 0;
818
+ padding: 0;
819
+ box-sizing: border-box;
820
+ }
821
+
822
+ display: block;
823
+ font-family: 'Inter', sans-serif;
824
+ box-sizing: border-box;
825
+
826
+ td {
827
+ padding: 0px;
828
+ }
829
+
830
+ .data-grid__wrapper {
831
+ position: relative;
832
+ /* padding: var(--section-padding, 0.75rem 1rem);
833
+ border-radius: 0.75rem; */
834
+ background-color: var(--background-paper, #fff);
835
+ }
836
+
837
+ .data-grid__empty {
838
+ position: absolute;
839
+ top: 30%;
840
+ left: 50%;
841
+ transform: translate(-50%, -50%);
842
+ font-size: 0.875rem;
843
+ text-align: center;
844
+ }
845
+
846
+ table {
847
+ border-collapse: collapse;
848
+ border-spacing: 0;
849
+ width: 100% !important;
850
+ height: calc(100% - 38px);
851
+ }
852
+
853
+ .grid {
854
+ overflow: auto;
855
+ position: relative;
856
+ height: 500px;
857
+ }
858
+
859
+ thead {
860
+ display: flex;
861
+ position: sticky;
862
+ top: 0;
863
+ z-index: 10;
864
+ background-color: var(--background-paper, #fff);
865
+ border-bottom: 1px solid var(--color-divider, #d0d3db);
866
+ }
867
+
868
+ tr.head {
869
+ display: flex;
870
+ width: 100%;
871
+ }
872
+
873
+ th.head {
874
+ display: block;
875
+ position: relative;
876
+ padding: 0px 6px;
877
+ gap: 0.25rem;
878
+ //z-index: auto !important;
879
+ }
880
+
881
+ tbody {
882
+ display: grid;
883
+ position: relative;
884
+ }
885
+
886
+ tr.body {
887
+ width: 100%;
888
+ border-bottom: 1px solid var(--color-divider, #d0d3db);
889
+ display: flex;
890
+ }
891
+
892
+ tr.body:hover {
893
+ cursor: pointer;
894
+ background-color: var(--background-default, #eff3f4);
895
+ }
896
+
897
+ td {
898
+ display: table-cell;
899
+ white-space: nowrap;
900
+ overflow: hidden;
901
+ padding: 0px 14px;
902
+ font-weight: 500;
903
+ font-size: 13px;
904
+ color: var(--text-primary, #111827);
905
+ }
906
+
907
+ .column-header {
908
+ font-size: 11px;
909
+ font-weight: 600;
910
+ color: var(--text-secondary, #5d6371);
911
+ cursor: pointer;
912
+ gap: 0.25rem;
913
+ justify-content: center;
914
+ align-items: center;
915
+ margin: 0 0.25rem;
916
+ overflow: hidden;
917
+ white-space: nowrap;
918
+ text-overflow: ellipsis;
919
+ }
920
+
921
+ .ellipsis {
922
+ overflow: hidden;
923
+ white-space: nowrap;
924
+ text-overflow: ellipsis;
925
+ }
926
+
927
+ .icons-group-pin {
928
+ display: flex;
929
+ height: 100%;
930
+ justify-content: space-between;
931
+ flex-grow: 1;
932
+ }
933
+
934
+ .flex {
935
+ display: flex;
936
+ }
937
+
938
+ .resizer {
939
+ height: 23px;
940
+ padding: 0 0 0 6px;
941
+ text-align: start;
942
+ //cursor: col-resize;
943
+ user-select: none;
944
+ touch-action: none;
945
+ }
946
+
947
+ .resize-handle {
948
+ position: absolute;
949
+ top: 0;
950
+ right: 0px;
951
+ width: 6px;
952
+ height: 100%;
953
+ background: transparent;
954
+ cursor: col-resize;
955
+ transition: background-color 0.2s ease-in-out;
956
+ // border-radius: 5px;
957
+ // padding-bottom: 5px;
958
+ }
959
+
960
+ .resize-handle:hover {
961
+ border-right: 2px solid var(--color-primary-main, #75b603);
962
+ }
963
+
964
+ .resizer.ltr {
965
+ right: 0;
966
+ }
967
+
968
+ .resizer.rtl {
969
+ left: 0;
970
+ }
971
+
972
+ .resizer.is-resizing {
973
+ opacity: 1;
974
+ }
975
+
976
+ .footer-container {
977
+ position: sticky;
978
+ left: 0;
979
+ bottom: 0;
980
+ background-color: var(--background-paper, #fff);
981
+ width: auto;
982
+ border-top: 1px solid var(--color-divider, #d0d3db);
983
+ height: 2.375rem;
984
+ display: flex;
985
+ flex-direction: row;
986
+ justify-content: space-between;
987
+ align-items: center;
988
+ padding: 0 16px;
989
+ z-index: 10;
990
+ }
991
+
992
+ .right-actions {
993
+ position: absolute;
994
+ right: 0;
995
+ display: flex;
996
+ }
997
+
998
+ .numberCount {
999
+ margin: 0.375rem 0;
1000
+ font-size: 12px;
1001
+ font-weight: 400;
1002
+ color: var(--text-primary, #111827);
1003
+ }
1004
+
1005
+ .scroll-button {
1006
+ position: absolute;
1007
+ top: 50%;
1008
+ transform: translateY(-50%);
1009
+ z-index: 1000;
1010
+ cursor: pointer;
1011
+ }
1012
+
1013
+ .scroll-button.left {
1014
+ left: 3rem;
1015
+ }
1016
+
1017
+ .scroll-button.right {
1018
+ right: 3rem;
1019
+ }
1020
+
1021
+ .progress-root {
1022
+ position: absolute;
1023
+ bottom: 0;
1024
+ left: 0;
1025
+ overflow: hidden;
1026
+ display: block;
1027
+ width: 100%;
1028
+ height: 0.125rem;
1029
+ background-color: #e0e0e0; /* Podobná farba pozadia ako v MUI */
1030
+ box-sizing: border-box;
1031
+ }
1032
+
1033
+ .bar {
1034
+ position: absolute;
1035
+ height: 100%;
1036
+ display: block;
1037
+ background-color: #75b603; /* Podobná farba ako primary theme v MUI */
1038
+ width: auto;
1039
+ will-change: left, right;
1040
+ box-sizing: border-box;
1041
+ }
1042
+
1043
+ /* Prvá animovaná "vlna" */
1044
+
1045
+ .bar1Indeterminate {
1046
+ animation: mui-indeterminate1 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
1047
+ }
1048
+
1049
+ /* Druhá animovaná "vlna" (oneskorená) */
1050
+
1051
+ .bar2Indeterminate {
1052
+ animation: mui-indeterminate2 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;
1053
+ animation-delay: 1.05s;
1054
+ }
1055
+
1056
+ @keyframes mui-indeterminate1 {
1057
+ 0% {
1058
+ left: -35%;
1059
+ right: 100%;
1060
+ }
1061
+ 60% {
1062
+ left: 100%;
1063
+ right: -90%;
1064
+ }
1065
+ 100% {
1066
+ left: 100%;
1067
+ right: -90%;
1068
+ }
1069
+ }
1070
+
1071
+ @keyframes mui-indeterminate2 {
1072
+ 0% {
1073
+ left: -200%;
1074
+ right: 100%;
1075
+ }
1076
+ 60% {
1077
+ left: 107%;
1078
+ right: -8%;
1079
+ }
1080
+ 100% {
1081
+ left: 107%;
1082
+ right: -8%;
1083
+ }
1084
+ }
1085
+ `,
1086
+ ];
1087
+ __decorate([
1088
+ property({ type: Array, reflect: true })
1089
+ ], LitDataGridTanstack.prototype, "row", void 0);
1090
+ __decorate([
1091
+ property({ type: Array })
1092
+ ], LitDataGridTanstack.prototype, "columns", void 0);
1093
+ __decorate([
1094
+ property({ type: Number })
1095
+ ], LitDataGridTanstack.prototype, "columnDefaultSize", void 0);
1096
+ __decorate([
1097
+ property({ type: Number })
1098
+ ], LitDataGridTanstack.prototype, "columnDefaultMinSize", void 0);
1099
+ __decorate([
1100
+ property({ type: Number })
1101
+ ], LitDataGridTanstack.prototype, "columnDefaultMaxSize", void 0);
1102
+ __decorate([
1103
+ property({ type: String })
1104
+ ], LitDataGridTanstack.prototype, "columnGroupedColor", void 0);
1105
+ __decorate([
1106
+ property({ type: String })
1107
+ ], LitDataGridTanstack.prototype, "rowAggregationColor", void 0);
1108
+ __decorate([
1109
+ property({ type: Boolean })
1110
+ ], LitDataGridTanstack.prototype, "enableRowVirtualization", void 0);
1111
+ __decorate([
1112
+ property({ type: Boolean })
1113
+ ], LitDataGridTanstack.prototype, "enableColumnVirtualization", void 0);
1114
+ __decorate([
1115
+ property({ type: Boolean })
1116
+ ], LitDataGridTanstack.prototype, "enableColumnPinning", void 0);
1117
+ __decorate([
1118
+ property({ type: Boolean })
1119
+ ], LitDataGridTanstack.prototype, "enableGrouping", void 0);
1120
+ __decorate([
1121
+ property({ type: Boolean })
1122
+ ], LitDataGridTanstack.prototype, "exportData", void 0);
1123
+ __decorate([
1124
+ property({ type: Boolean })
1125
+ ], LitDataGridTanstack.prototype, "actionButtonsInMenu", void 0);
1126
+ __decorate([
1127
+ property({ type: String })
1128
+ ], LitDataGridTanstack.prototype, "id", void 0);
1129
+ __decorate([
1130
+ property({ type: Array })
1131
+ ], LitDataGridTanstack.prototype, "initialGroups", void 0);
1132
+ __decorate([
1133
+ property({ type: Array })
1134
+ ], LitDataGridTanstack.prototype, "initialSorting", void 0);
1135
+ __decorate([
1136
+ property({ type: Object })
1137
+ ], LitDataGridTanstack.prototype, "initialColumnVisibility", void 0);
1138
+ __decorate([
1139
+ property({ type: String })
1140
+ ], LitDataGridTanstack.prototype, "requestUrl", void 0);
1141
+ __decorate([
1142
+ property({ type: Array })
1143
+ ], LitDataGridTanstack.prototype, "leftPinnedColumns", void 0);
1144
+ __decorate([
1145
+ property({ type: Array })
1146
+ ], LitDataGridTanstack.prototype, "rightPinnedColumns", void 0);
1147
+ __decorate([
1148
+ property({ type: Boolean })
1149
+ ], LitDataGridTanstack.prototype, "enableFiltering", void 0);
1150
+ __decorate([
1151
+ property({ type: String })
1152
+ ], LitDataGridTanstack.prototype, "userLang", void 0);
1153
+ __decorate([
1154
+ property({ type: String })
1155
+ ], LitDataGridTanstack.prototype, "dateFormat", void 0);
1156
+ __decorate([
1157
+ property({ type: Boolean })
1158
+ ], LitDataGridTanstack.prototype, "isLoading", void 0);
1159
+ __decorate([
1160
+ state()
1161
+ ], LitDataGridTanstack.prototype, "rowsCount", void 0);
1162
+ __decorate([
1163
+ state()
1164
+ ], LitDataGridTanstack.prototype, "isScrollable", void 0);
1165
+ __decorate([
1166
+ state()
1167
+ ], LitDataGridTanstack.prototype, "disableScrollLeft", void 0);
1168
+ __decorate([
1169
+ state()
1170
+ ], LitDataGridTanstack.prototype, "disableScrollRight", void 0);
1171
+ LitDataGridTanstack = __decorate([
1172
+ customElement('lit-data-grid-tanstack')
1173
+ ], LitDataGridTanstack);
1174
+ export { LitDataGridTanstack };
1175
+ //# sourceMappingURL=lit-data-grid-tanstack.js.map