overview-components 1.0.92 → 1.0.95

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 (117) hide show
  1. package/dist/_virtual/FileSaver.min.js +4 -0
  2. package/dist/_virtual/___vite-browser-external.js +6 -0
  3. package/dist/_virtual/__vite-browser-external.js +4 -0
  4. package/dist/_virtual/_commonjs-dynamic-modules.js +6 -0
  5. package/dist/_virtual/_commonjsHelpers.js +28 -0
  6. package/dist/_virtual/index.js +4 -0
  7. package/dist/_virtual/lodash.js +4 -0
  8. package/dist/_virtual/pdf.js +4 -0
  9. package/dist/_virtual/react.production.js +4 -0
  10. package/dist/assets/generated/locales/de.js +73 -0
  11. package/dist/assets/generated/locales/en.js +73 -0
  12. package/dist/assets/generated/locales/fr.js +73 -0
  13. package/dist/assets/generated/locales/hr.js +73 -0
  14. package/dist/assets/generated/locales/it.js +73 -0
  15. package/dist/assets/generated/locales/pl.js +73 -0
  16. package/dist/assets/generated/locales/ro.js +73 -0
  17. package/dist/assets/generated/locales/sk.js +73 -0
  18. package/dist/assets/generated/locales/sr.js +73 -0
  19. package/dist/components/lit-attachments-tab.js +519 -0
  20. package/dist/components/lit-badge.js +100 -0
  21. package/dist/components/lit-case-variables-tab.js +727 -0
  22. package/dist/components/lit-chart.js +395 -0
  23. package/dist/components/lit-data-grid-tanstack.js +1733 -0
  24. package/dist/components/lit-filter-modal.js +312 -0
  25. package/dist/components/lit-multiselect-item.js +530 -0
  26. package/dist/components/lit-section-tab.js +133 -0
  27. package/dist/components/lit-tabs-overview.js +304 -0
  28. package/dist/components/react-wrappers/attachments-tab.js +14 -0
  29. package/dist/components/react-wrappers/badge.js +14 -0
  30. package/dist/components/react-wrappers/button.js +14 -0
  31. package/dist/components/react-wrappers/case-variables-tab.js +14 -0
  32. package/dist/components/react-wrappers/chart.js +14 -0
  33. package/dist/components/react-wrappers/data-grid-tanstack.js +14 -0
  34. package/dist/components/react-wrappers/filter-modal.js +14 -0
  35. package/dist/components/react-wrappers/progress-bar.js +14 -0
  36. package/dist/components/react-wrappers/section-tab.js +14 -0
  37. package/dist/components/react-wrappers/tabs-overview.js +14 -0
  38. package/dist/index.js +42 -0
  39. package/dist/libs/xlsx.mini.min.js +10 -0
  40. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +432 -0
  41. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +306 -0
  42. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +127 -0
  43. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +127 -0
  44. package/dist/node_modules/@kurkle/color/dist/color.esm.js +448 -0
  45. package/dist/node_modules/@lit/localize/init/install.js +11 -0
  46. package/dist/node_modules/@lit/localize/init/runtime.js +42 -0
  47. package/dist/node_modules/@lit/localize/internal/default-msg.js +10 -0
  48. package/dist/node_modules/@lit/localize/internal/deferred.js +21 -0
  49. package/dist/node_modules/@lit/localize/internal/fnv1a64.js +17 -0
  50. package/dist/node_modules/@lit/localize/internal/id-generation.js +14 -0
  51. package/dist/node_modules/@lit/localize/internal/locale-status-event.js +9 -0
  52. package/dist/node_modules/@lit/localize/internal/runtime-msg.js +42 -0
  53. package/dist/node_modules/@lit/localize/internal/str-tag.js +15 -0
  54. package/dist/node_modules/@lit/react/create-component.js +35 -0
  55. package/dist/node_modules/@lit/reactive-element/css-tag.js +50 -0
  56. package/dist/node_modules/@lit/reactive-element/decorators/base.js +9 -0
  57. package/dist/node_modules/@lit/reactive-element/decorators/custom-element.js +13 -0
  58. package/dist/node_modules/@lit/reactive-element/decorators/property.js +37 -0
  59. package/dist/node_modules/@lit/reactive-element/decorators/query.js +20 -0
  60. package/dist/node_modules/@lit/reactive-element/decorators/state.js +12 -0
  61. package/dist/node_modules/@lit/reactive-element/reactive-element.js +250 -0
  62. package/dist/node_modules/@tanstack/lit-table/build/lib/index.js +104 -0
  63. package/dist/node_modules/@tanstack/lit-virtual/dist/esm/index.js +40 -0
  64. package/dist/node_modules/@tanstack/table-core/build/lib/index.js +1956 -0
  65. package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +490 -0
  66. package/dist/node_modules/@tanstack/virtual-core/dist/esm/utils.js +52 -0
  67. package/dist/node_modules/chart.js/dist/chart.js +7122 -0
  68. package/dist/node_modules/chart.js/dist/chunks/helpers.segment.js +1691 -0
  69. package/dist/node_modules/file-saver/dist/FileSaver.min.js +74 -0
  70. package/dist/node_modules/lit-element/lit-element.js +51 -0
  71. package/dist/node_modules/lit-html/async-directive.js +69 -0
  72. package/dist/node_modules/lit-html/directive-helpers.js +45 -0
  73. package/dist/node_modules/lit-html/directive.js +27 -0
  74. package/dist/node_modules/lit-html/directives/ref.js +42 -0
  75. package/dist/node_modules/lit-html/directives/repeat.js +61 -0
  76. package/dist/node_modules/lit-html/directives/style-map.js +36 -0
  77. package/dist/node_modules/lit-html/directives/unsafe-html.js +27 -0
  78. package/dist/node_modules/lit-html/lit-html.js +243 -0
  79. package/dist/node_modules/lodash/lodash.js +3678 -0
  80. package/dist/node_modules/luxon/src/datetime.js +1793 -0
  81. package/dist/node_modules/luxon/src/duration.js +723 -0
  82. package/dist/node_modules/luxon/src/errors.js +40 -0
  83. package/dist/node_modules/luxon/src/impl/conversions.js +92 -0
  84. package/dist/node_modules/luxon/src/impl/diff.js +36 -0
  85. package/dist/node_modules/luxon/src/impl/digits.js +74 -0
  86. package/dist/node_modules/luxon/src/impl/english.js +138 -0
  87. package/dist/node_modules/luxon/src/impl/formats.js +150 -0
  88. package/dist/node_modules/luxon/src/impl/formatter.js +245 -0
  89. package/dist/node_modules/luxon/src/impl/invalid.js +11 -0
  90. package/dist/node_modules/luxon/src/impl/locale.js +282 -0
  91. package/dist/node_modules/luxon/src/impl/regexParser.js +202 -0
  92. package/dist/node_modules/luxon/src/impl/tokenParser.js +329 -0
  93. package/dist/node_modules/luxon/src/impl/util.js +206 -0
  94. package/dist/node_modules/luxon/src/impl/zoneUtil.js +19 -0
  95. package/dist/node_modules/luxon/src/info.js +180 -0
  96. package/dist/node_modules/luxon/src/interval.js +466 -0
  97. package/dist/node_modules/luxon/src/settings.js +150 -0
  98. package/dist/node_modules/luxon/src/zone.js +88 -0
  99. package/dist/node_modules/luxon/src/zones/IANAZone.js +178 -0
  100. package/dist/node_modules/luxon/src/zones/fixedOffsetZone.js +125 -0
  101. package/dist/node_modules/luxon/src/zones/invalidZone.js +41 -0
  102. package/dist/node_modules/luxon/src/zones/systemZone.js +47 -0
  103. package/dist/node_modules/pdfjs-dist/build/pdf.js +10310 -0
  104. package/dist/node_modules/react/cjs/react.production.js +417 -0
  105. package/dist/node_modules/react/index.js +10 -0
  106. package/dist/node_modules/sortablejs/modular/sortable.esm.js +1261 -0
  107. package/dist/shared/lit-button.js +142 -0
  108. package/dist/shared/lit-progress-bar.js +83 -0
  109. package/dist/shared/simple-tooltip.js +174 -0
  110. package/dist/shared/styles/button-shared-styles.js +205 -0
  111. package/dist/utils/currency.js +13 -0
  112. package/dist/utils/custom-filters.js +50 -0
  113. package/dist/utils/date.js +15 -0
  114. package/dist/utils/getOperatorByType.js +52 -0
  115. package/dist/utils/localization.js +30 -0
  116. package/dist/vite.svg +1 -0
  117. package/package.json +76 -74
@@ -0,0 +1,1733 @@
1
+ import "../node_modules/@lit/reactive-element/reactive-element.js";
2
+ import { html as u } from "../node_modules/lit-html/lit-html.js";
3
+ import { LitElement as tt } from "../node_modules/lit-element/lit-element.js";
4
+ import et, { l as it } from "../node_modules/lodash/lodash.js";
5
+ import { msg as R } from "../node_modules/@lit/localize/init/install.js";
6
+ import "../node_modules/@lit/localize/init/runtime.js";
7
+ import { customElement as ot } from "../node_modules/@lit/reactive-element/decorators/custom-element.js";
8
+ import { property as a } from "../node_modules/@lit/reactive-element/decorators/property.js";
9
+ import { state as z } from "../node_modules/@lit/reactive-element/decorators/state.js";
10
+ import { query as Q } from "../node_modules/@lit/reactive-element/decorators/query.js";
11
+ import { unsafeHTML as j } from "../node_modules/lit-html/directives/unsafe-html.js";
12
+ import { TableController as nt, flexRender as L } from "../node_modules/@tanstack/lit-table/build/lib/index.js";
13
+ import { repeat as T } from "../node_modules/lit-html/directives/repeat.js";
14
+ import { VirtualizerController as K } from "../node_modules/@tanstack/lit-virtual/dist/esm/index.js";
15
+ import { createRef as lt, ref as X } from "../node_modules/lit-html/directives/ref.js";
16
+ import { styleMap as E } from "../node_modules/lit-html/directives/style-map.js";
17
+ import st from "../node_modules/sortablejs/modular/sortable.esm.js";
18
+ import { formatDate as W } from "../utils/date.js";
19
+ import { formatCurrency as rt } from "../utils/currency.js";
20
+ import { dateFilterFn as Z, dateRangeFilterFn as Y, multiselectFilterFn as J } from "../utils/custom-filters.js";
21
+ import { getLocale as at, setLocale as dt } from "../utils/localization.js";
22
+ import { getOperatorsByColumnType as ct } from "../utils/getOperatorByType.js";
23
+ import { filterFns as V, getFacetedUniqueValues as ht, getExpandedRowModel as pt, getGroupedRowModel as ut, getFacetedRowModel as gt, getFilteredRowModel as mt, getSortedRowModel as ft, getCoreRowModel as bt } from "../node_modules/@tanstack/table-core/build/lib/index.js";
24
+ import { css as yt } from "../node_modules/@lit/reactive-element/css-tag.js";
25
+ var wt = Object.defineProperty, xt = Object.getOwnPropertyDescriptor, l = (t, e, o, d) => {
26
+ for (var s = d > 1 ? void 0 : d ? xt(e, o) : e, p = t.length - 1, g; p >= 0; p--)
27
+ (g = t[p]) && (s = (d ? g(e, o, s) : g(s)) || s);
28
+ return d && s && wt(e, o, s), s;
29
+ };
30
+ let n = class extends tt {
31
+ constructor() {
32
+ super(...arguments), this.row = [], this.columns = [], this.enableRowVirtualization = !0, this.enableColumnVirtualization = !1, this.enableColumnPinning = !0, this.enableColumnOrdering = !1, this.enableGrouping = !0, this.enablePinning = !0, this.exportData = !0, this.actionButtonsInMenu = !1, this.id = "", this.initialSorting = [], this.initialRowExpanded = {}, this.columnSizing = {}, this.leftPinnedColumns = [], this.rightPinnedColumns = [], this.enableFiltering = !0, this.enableSorting = !0, this.userLang = "cs", this.dateFormat = null, this.isLoading = !1, this.enableRowSelection = !1, this.initialFiltering = [], this.server = !1, this.scrollEndThreshold = 100, this.rowDensity = "standard", this.enableMultiRowSelection = !1, this.minFilterCharacters = 3, this.localizeDate = !0, this.rowsSelected = {}, this.enableSettings = !1, this.onSettingsChanged = () => {
33
+ }, this.onCellKeyDown = (t, e) => {
34
+ }, this.onColumnResize = () => {
35
+ }, this.onColumnFiltersChanged = (t, e) => {
36
+ }, this.onColumnSortChanged = (t, e) => {
37
+ }, this.onRowSelectionChanged = (t, e) => {
38
+ }, this.onColumnOrderChanged = (t, e) => {
39
+ }, this.hideFooter = !1, this.columnVisibility = {}, this.onColumnVisibilityChanged = (t, e) => {
40
+ }, this.onMouseDown = (t, e) => {
41
+ }, this.onRowFocusChanged = (t, e) => {
42
+ }, this.focusedRowIndex = null, this.autoFocus = !1, this.rowsCount = 0, this.isScrollable = !1, this.disableScrollLeft = !0, this.disableScrollRight = !1, this.columnOrder = [], this.isOpen = !1, this.filterText = "", this.isOpenModal = !1, this.scrollToEnd = !1, this.tableContainerRef = lt(), this.scrollInterval = null, this.currentScrollTop = 0, this.lastSelectedIndex = null, this.getCellBackgroundColor = (t) => t.getIsGrouped() ? this.columnGroupedColor ?? "var(--color-primary-light, #f0fadf)" : t.getIsAggregated() ? this.rowAggregationColor ?? "var(--color-warning-light, #ffe1a8)" : t.getIsPlaceholder() ? "var(--background-default, #eff3f4)" : t.column.getIsPinned() ? "var(--background-paper, #fff)" : "transparent", this.updateScrollState = () => {
43
+ const t = this.tableContainerRef.value;
44
+ if (t) {
45
+ const e = t.scrollWidth > t.clientWidth;
46
+ this.isScrollable = e, this.disableScrollLeft = t.scrollLeft === 0, this.disableScrollRight = t.scrollLeft + t.clientWidth >= t.scrollWidth, this.currentScrollTop = t.scrollTop;
47
+ }
48
+ };
49
+ }
50
+ get rows() {
51
+ return [...this.row || []];
52
+ }
53
+ get getColumns() {
54
+ return [...this.columns || []];
55
+ }
56
+ // lifecycle
57
+ connectedCallback() {
58
+ this.initRowVirtualizer(), this.initColumnVirtualizer(), this.initTable(), window.addEventListener("resize", this.updateScrollState), super.connectedCallback();
59
+ }
60
+ disconnectedCallback() {
61
+ super.disconnectedCallback(), window.removeEventListener("resize", this.updateScrollState);
62
+ }
63
+ updated(t) {
64
+ var e, o, d, s, p;
65
+ if (t.has("rowsCount") && this.enableRowVirtualization) {
66
+ this.scrollToEnd = !1;
67
+ const g = (e = this.rowVirtualizerController) == null ? void 0 : e.getVirtualizer();
68
+ g && g.setOptions({
69
+ ...g.options,
70
+ count: (d = (o = this.table) == null ? void 0 : o.getRowModel()) == null ? void 0 : d.rows.length
71
+ }), this.requestUpdate();
72
+ }
73
+ if ((t.has("columns") || t.has("columnVisibility")) && this.enableColumnVirtualization) {
74
+ const g = (s = this.columnVirtualizerController) == null ? void 0 : s.getVirtualizer();
75
+ g && g.setOptions({
76
+ ...g.options,
77
+ count: (p = this.table) == null ? void 0 : p.getVisibleLeafColumns().length
78
+ });
79
+ }
80
+ (t.has("row") || t.has("columns")) && (this.initTable(), this.requestUpdate());
81
+ }
82
+ firstUpdated() {
83
+ const t = this.tableContainerRef.value;
84
+ t && t.addEventListener("scroll", this.updateScrollState), this.updateScrollState(), this.initSortable(), this._container.addEventListener("scroll", this.handleScroll.bind(this)), this.autoFocus && setTimeout(() => {
85
+ var e, o;
86
+ if (this.focusedRowIndex !== null && this.focusedRowIndex !== void 0)
87
+ (e = this.focusRow) == null || e.call(this, this.focusedRowIndex);
88
+ else {
89
+ const d = this.table.getSelectedRowModel().rows;
90
+ d.length > 0 && ((o = this.focusRow) == null || o.call(this, d[0].index));
91
+ }
92
+ }, 0);
93
+ }
94
+ toggleModal() {
95
+ this.isOpenModal = !this.isOpenModal;
96
+ }
97
+ async initSortable() {
98
+ var e;
99
+ if (!this.enableColumnOrdering) return;
100
+ const t = (e = this.shadowRoot) == null ? void 0 : e.querySelector("thead tr.head");
101
+ t && st.create(t, {
102
+ animation: 150,
103
+ direction: "horizontal",
104
+ handle: ".drag-handle",
105
+ filter: 'th[data-index="checkbox"], th[data-index="actions"]',
106
+ preventOnFilter: !1,
107
+ onMove: (o) => {
108
+ var v, I, i, r, b, c, D, y;
109
+ const d = o.dragged.getAttribute("data-index"), s = o.related.getAttribute("data-index"), p = ["checkbox", "actions"];
110
+ if (p.includes(d) || p.includes(s))
111
+ return !1;
112
+ const g = this.table.getHeaderGroups()[0].headers, h = g.find((F) => F.id === d), m = g.find((F) => F.id === s);
113
+ if (!h || !m) return !1;
114
+ const x = (I = (v = h.column).getIsPinned) == null ? void 0 : I.call(v), C = (r = (i = m.column).getIsPinned) == null ? void 0 : r.call(i), w = (c = (b = h.column).getIsGrouped) == null ? void 0 : c.call(b), S = (y = (D = m.column).getIsGrouped) == null ? void 0 : y.call(D);
115
+ return !(x || C || w || S);
116
+ },
117
+ onEnd: () => {
118
+ const o = Array.from(t.querySelectorAll("th")).map((d) => d.getAttribute("data-index")).filter((d) => {
119
+ var p, g, h, m;
120
+ if (!d || d === "checkbox" || d === "actions") return !1;
121
+ const s = this.table.getHeaderGroups()[0].headers.find((x) => x.id === d);
122
+ return s ? !((g = (p = s.column).getIsPinned) != null && g.call(p)) && !((m = (h = s.column).getIsGrouped) != null && m.call(h)) : !1;
123
+ });
124
+ this.table.setColumnOrder(o);
125
+ }
126
+ });
127
+ }
128
+ async loadXLSX() {
129
+ !window.XLSX && !this.server && await new Promise((t) => {
130
+ const e = document.createElement("script");
131
+ e.src = "../../public/libs/xlsx.mini.min.js", e.onload = t, document.head.appendChild(e);
132
+ });
133
+ }
134
+ // row density
135
+ getRowHeight() {
136
+ switch (this.rowDensity) {
137
+ case "compact":
138
+ return 31;
139
+ case "standard":
140
+ return 38;
141
+ case "comfort":
142
+ return 50;
143
+ default:
144
+ return 38;
145
+ }
146
+ }
147
+ getButtonSize() {
148
+ switch (this.rowDensity) {
149
+ case "compact":
150
+ return "small";
151
+ case "standard":
152
+ return "medium";
153
+ case "comfort":
154
+ return "large";
155
+ default:
156
+ return "medium";
157
+ }
158
+ }
159
+ handleSetDensity(t) {
160
+ this.rowDensity = t, this.rowDensityChange && this.rowDensityChange(this.table, t);
161
+ }
162
+ handleMouseDown(t, e) {
163
+ this.onMouseDown && this.onMouseDown(t, e);
164
+ }
165
+ handleFilterTabNavigation(t) {
166
+ var g, h, m;
167
+ const { direction: e, currentFilter: o } = t.detail, d = Array.from(((g = this.shadowRoot) == null ? void 0 : g.querySelectorAll("filter-inputs")) || []);
168
+ if (d.length === 0) return;
169
+ const s = d.indexOf(o);
170
+ let p;
171
+ if (e === "forward")
172
+ if (s === d.length - 1) {
173
+ const x = (h = this.shadowRoot) == null ? void 0 : h.querySelector(".grid");
174
+ x && (x.scrollLeft = 0), setTimeout(() => {
175
+ var w;
176
+ const C = (w = this.shadowRoot) == null ? void 0 : w.querySelector("filter-inputs");
177
+ C && C.focus();
178
+ }, 0);
179
+ return;
180
+ } else
181
+ p = s + 1;
182
+ else if (s === 0) {
183
+ const x = (m = this.shadowRoot) == null ? void 0 : m.querySelector(".grid");
184
+ x && (x.scrollLeft = x.scrollWidth), setTimeout(() => {
185
+ var w;
186
+ const C = Array.from(
187
+ ((w = this.shadowRoot) == null ? void 0 : w.querySelectorAll("filter-inputs")) || []
188
+ );
189
+ C.length > 0 && C[C.length - 1].focus();
190
+ }, 0);
191
+ return;
192
+ } else
193
+ p = s - 1;
194
+ d[p].focus();
195
+ }
196
+ // virtualization
197
+ initRowVirtualizer() {
198
+ var t, e, o;
199
+ this.rowVirtualizerController = new K(this, {
200
+ count: ((e = (t = this.table) == null ? void 0 : t.getRowModel()) == null ? void 0 : e.rows.length) || ((o = this.row) == null ? void 0 : o.length) || 1,
201
+ getScrollElement: () => this.tableContainerRef.value,
202
+ estimateSize: () => this.getRowHeight(),
203
+ overscan: 5,
204
+ initialOffset: this.currentScrollTop,
205
+ enabled: this.enableRowVirtualization
206
+ });
207
+ }
208
+ initTable() {
209
+ this.tableController = new nt(this);
210
+ }
211
+ initColumnVirtualizer() {
212
+ var t;
213
+ this.columnVirtualizerController = new K(this, {
214
+ horizontal: !0,
215
+ count: ((t = this.table) == null ? void 0 : t.getVisibleLeafColumns().length) || this.columns.length || 1,
216
+ getScrollElement: () => this.tableContainerRef.value,
217
+ estimateSize: (e) => {
218
+ var o;
219
+ return ((o = this.table.getVisibleLeafColumns()[e]) == null ? void 0 : o.getSize()) || 200;
220
+ },
221
+ overscan: 5,
222
+ enabled: this.enableColumnVirtualization
223
+ });
224
+ }
225
+ handleRowClick(t, e) {
226
+ var s, p;
227
+ (s = this.onRowClick) == null || s.call(this, t, this.table, e), (p = this.onRowFocusChanged) == null || p.call(this, this.table, e.index);
228
+ const o = t.shiftKey, d = t.ctrlKey || t.metaKey;
229
+ if (this.enableRowSelection && e.getCanSelect() && (d || o)) {
230
+ const { rows: g } = this.table.getRowModel();
231
+ if (this.enableMultiRowSelection && o && this.focusedRowIndex !== null && this.focusedRowIndex !== void 0) {
232
+ const [h, m] = [
233
+ Math.min(this.focusedRowIndex, e.index),
234
+ Math.max(this.focusedRowIndex, e.index)
235
+ ], x = g.slice(h, m + 1).map((w) => w.id), C = { ...this.rowsSelected };
236
+ x.forEach((w) => C[w] = !0), this.table.setRowSelection(C);
237
+ } else if (d && this.enableMultiRowSelection) {
238
+ const h = { ...this.rowsSelected };
239
+ h[e.id] ? delete h[e.id] : h[e.id] = !0, this.table.setRowSelection(h);
240
+ } else {
241
+ const h = { [e.id]: !0 };
242
+ this.table.setRowSelection(h);
243
+ }
244
+ }
245
+ this.focusedRowIndex = e.index;
246
+ }
247
+ handleRowDoubleClick(t) {
248
+ this.onRowDoubleClick && this.onRowDoubleClick(this.table, t);
249
+ }
250
+ handleKeyDown(t) {
251
+ var d;
252
+ const e = this.table.getRowModel().rows;
253
+ if (!e.length) return;
254
+ let o = this.focusedRowIndex ?? e.findIndex((s) => this.rowsSelected[s.id]);
255
+ if (this.enableRowSelection) {
256
+ if (o === -1 && (o = 0), t.key === "ArrowDown" && t.shiftKey && this.enableMultiRowSelection) {
257
+ t.preventDefault();
258
+ const s = o + 1;
259
+ if (s < e.length) {
260
+ const p = e[s].id;
261
+ this.table.setRowSelection((g) => ({
262
+ ...g,
263
+ [p]: !g[p]
264
+ })), this.focusRow(s);
265
+ }
266
+ } else if (t.key === "ArrowUp" && t.shiftKey && this.enableMultiRowSelection) {
267
+ t.preventDefault();
268
+ const s = o - 1;
269
+ if (s >= 0) {
270
+ const p = e[s].id;
271
+ this.table.setRowSelection((g) => ({
272
+ ...g,
273
+ [p]: !g[p]
274
+ })), this.focusRow(s);
275
+ }
276
+ } else if (t.key === "ArrowDown" && o < e.length - 1) {
277
+ t.preventDefault();
278
+ const s = o + 1;
279
+ this.focusRow(s);
280
+ } else if (t.key === "ArrowUp" && o > 0) {
281
+ t.preventDefault();
282
+ const s = o - 1;
283
+ this.focusRow(s);
284
+ }
285
+ }
286
+ (d = this.onCellKeyDown) == null || d.call(this, t, e[o]);
287
+ }
288
+ focusRow(t) {
289
+ var o, d;
290
+ const e = t ?? this.focusedRowIndex;
291
+ (o = this.rowVirtualizerController) == null || o.getVirtualizer().scrollToIndex(e ?? 0, { align: "auto" }), setTimeout(() => {
292
+ var p;
293
+ const s = (p = this.shadowRoot) == null ? void 0 : p.querySelector(
294
+ `[data-row-index="${e}"]`
295
+ );
296
+ this.enableRowVirtualization ? s && setTimeout(() => {
297
+ s.focus();
298
+ }, 0) : s && (s.focus(), s.scrollIntoView({ block: "nearest" }));
299
+ }, 100), (d = this.onRowFocusChanged) == null || d.call(this, this.table, e), this.focusedRowIndex = e;
300
+ }
301
+ getTanstackColumns(t) {
302
+ return t.map((e) => ({
303
+ id: e.field,
304
+ accessorKey: e.field,
305
+ accessorFn: (o) => (e.type === "date" || e.type === "dateTime" || e.type === "dateTimeRange" || e.type === "dateRange") && !this.server && this.localizeDate ? e.accessorFn ? W(
306
+ e.accessorFn(o),
307
+ this.userLang || "cs",
308
+ e.type === "date" || e.type === "dateRange" ? void 0 : !0,
309
+ this.dateFormat
310
+ ) : W(
311
+ o[e.field],
312
+ this.userLang || "cs",
313
+ e.type === "date" || e.type === "dateRange" ? void 0 : !0,
314
+ this.dateFormat
315
+ ) : e.accessorFn ? e.accessorFn(o) : o[e.field],
316
+ type: e.type,
317
+ header: e.headerName,
318
+ cell: (o) => {
319
+ var s;
320
+ const d = o.getValue();
321
+ return e.type === "actions" ? u`
322
+ <lit-data-grid-row-actions
323
+ .buttons=${((s = e.getActions) == null ? void 0 : s.call(e, o)) || []}
324
+ ></lit-data-grid-row-actions>
325
+ ` : e.type === "currency" ? rt(d, this.userLang || "cs") : e.cell ? e.cell(o, u, j) : d;
326
+ },
327
+ filterFn: (() => {
328
+ switch (e.type) {
329
+ case "numberRange":
330
+ return V.inNumberRange;
331
+ case "select":
332
+ return V.weakEquals;
333
+ case "multiselect":
334
+ return J;
335
+ case "number":
336
+ case "currency":
337
+ return V.weakEquals;
338
+ case "dateRange":
339
+ case "dateTimeRange":
340
+ return Y;
341
+ case "date":
342
+ case "dateTime":
343
+ return Z;
344
+ case "string":
345
+ default:
346
+ return V.includesString;
347
+ }
348
+ })(),
349
+ enableSorting: e.enableSorting ?? !0,
350
+ enableColumnFilter: this.enableFiltering && (e.enableFilter ?? !0),
351
+ size: e.size || this.columnDefaultSize || void 0,
352
+ maxSize: e.maxSize || this.columnDefaultMaxSize || 500,
353
+ minSize: e.minSize || this.columnDefaultMinSize || 100,
354
+ meta: {
355
+ filterVariant: e.type ?? "string",
356
+ valueOptions: e.valueOptions,
357
+ filterOperators: e.filterOperators
358
+ },
359
+ aggregationFn: e.columnAggregation ?? void 0,
360
+ enableGrouping: e.enableGrouping ?? !0,
361
+ sortDescFirst: e.sortDescFirst || !0,
362
+ enableResizing: e.enableResizing ?? !0,
363
+ enablePinning: this.enablePinning && (e.enablePinning ?? !0),
364
+ aggregatedCell: (o) => {
365
+ const d = o.getValue();
366
+ return e.aggregatedCell ? e.aggregatedCell(o, u, j) : d;
367
+ }
368
+ }));
369
+ }
370
+ getCommonPinningStyles(t) {
371
+ const e = t.getIsPinned();
372
+ if (!e)
373
+ return {};
374
+ const o = e === "left" && t.getIsLastColumn("left");
375
+ return {
376
+ position: e ? "sticky" : "relative",
377
+ left: e === "left" ? `${t.getStart("left")}px` : void 0,
378
+ right: e === "right" ? "0px" : void 0,
379
+ boxShadow: o && t.columnDef.type !== "checkbox" ? "-4px 0 4px -4px gray inset" : void 0,
380
+ zIndex: `${e ? 1 : "auto"}`,
381
+ background: e ? "var(--background-paper, #fff)" : void 0
382
+ };
383
+ }
384
+ togglePin(t) {
385
+ t.column.getIsPinned() ? t.column.pin(!1) : t.column.pin("left");
386
+ }
387
+ // export to excel and csv
388
+ exportDataToCsv() {
389
+ const t = this.getAllRowsIncludingGrouped(this.table.getRowModel().rows);
390
+ if (!t || t.length === 0) {
391
+ console.warn("No data to export");
392
+ return;
393
+ }
394
+ const e = this.columns.map((m) => m.headerName || "").join(","), o = t.map((m) => this.columns.map((x) => {
395
+ var S, v;
396
+ const C = x.field;
397
+ if ((S = m.getIsGrouped) != null && S.call(m))
398
+ return x.field === m.groupingColumnId ? `"${m.getValue(x.field)} (${m.subRows.length})"` : "";
399
+ const w = ((v = m.getValue) == null ? void 0 : v.call(m, C)) || "";
400
+ return typeof w == "string" ? `"${w.replace(/"/g, '""')}"` : w;
401
+ }).join(","));
402
+ o.unshift(e);
403
+ const d = o.join(`
404
+ `), s = new Blob([d], { type: "text/csv;charset=utf-8;" }), p = prompt(R("Zadejte název souboru:"), "data");
405
+ if (!p)
406
+ return;
407
+ const g = URL.createObjectURL(s), h = document.createElement("a");
408
+ h.href = g, h.download = `${p}.csv`, h.click(), URL.revokeObjectURL(g);
409
+ }
410
+ async exportDataToExcel() {
411
+ await this.loadXLSX();
412
+ const t = window.XLSX, e = this.getAllRowsIncludingGrouped(this.table.getRowModel().rows);
413
+ if (!e || e.length === 0) {
414
+ console.warn("No data to export");
415
+ return;
416
+ }
417
+ const o = e.map((h) => {
418
+ const m = {};
419
+ return this.columns.forEach((x) => {
420
+ var S, v;
421
+ const C = x.headerName || "", w = x.field;
422
+ (S = h.getIsGrouped) != null && S.call(h) ? x.field === h.groupingColumnId ? m[C] = `${h.getValue(w)} (${h.subRows.length})` : m[C] = "" : w && (m[C] = ((v = h.getValue) == null ? void 0 : v.call(h, w)) || "");
423
+ }), m;
424
+ }), d = t.utils.json_to_sheet(o), s = this.columns.map((h, m) => {
425
+ var C;
426
+ return { wch: Math.max(
427
+ ((C = h.headerName) == null ? void 0 : C.length) || 10,
428
+ ...o.map((w) => {
429
+ var S;
430
+ return ((S = w[h.headerName || ""]) == null ? void 0 : S.toString().length) || 0;
431
+ })
432
+ // Najdlhší obsah v stĺpci
433
+ ) + 2 };
434
+ });
435
+ d["!cols"] = s;
436
+ const p = t.utils.book_new();
437
+ t.utils.book_append_sheet(p, d, "Data");
438
+ const g = prompt(R("Zadejte název souboru:"), "data");
439
+ g && t.writeFile(p, `${g}.xlsx`);
440
+ }
441
+ getAllRowsIncludingGrouped(t) {
442
+ const e = [];
443
+ return t.forEach((o) => {
444
+ var d;
445
+ (d = o.getIsGrouped) != null && d.call(o) ? (e.push(o), o.subRows && o.subRows.length > 0 && e.push(...this.getAllRowsIncludingGrouped(o.subRows))) : e.push(o);
446
+ }), e.filter(
447
+ (o, d, s) => d === s.findIndex((p) => p.id === o.id)
448
+ );
449
+ }
450
+ startScroll(t) {
451
+ const e = this.tableContainerRef.value;
452
+ if (!e) return;
453
+ const o = t === "left" ? -15 : 15, d = () => {
454
+ e.scrollLeft += o, this.updateScrollState(), this.scrollInterval = requestAnimationFrame(d);
455
+ };
456
+ this.scrollInterval = requestAnimationFrame(d);
457
+ }
458
+ stopScroll() {
459
+ this.scrollInterval && (cancelAnimationFrame(this.scrollInterval), this.scrollInterval = null);
460
+ }
461
+ // centralize your “at end” logic
462
+ _atScrollEnd(t) {
463
+ const e = this.scrollEndThreshold ?? 100;
464
+ return t.scrollHeight <= t.clientHeight || t.scrollTop + t.clientHeight >= t.scrollHeight - e;
465
+ }
466
+ _maybeTriggerScrollEnd() {
467
+ this._atScrollEnd(this._container) && this.onRowsScrollEnd && !this.isLoading && !this.scrollToEnd && (this.scrollToEnd = !0, this.onRowsScrollEnd());
468
+ }
469
+ handleScroll(t) {
470
+ this._maybeTriggerScrollEnd();
471
+ }
472
+ // handleScroll(event: Event) {
473
+ // const container = event.target as HTMLElement;
474
+ // if (
475
+ // container.scrollTop + container.clientHeight >=
476
+ // container.scrollHeight - (this.scrollEndThreshold || 100) &&
477
+ // this.onRowsScrollEnd &&
478
+ // !this.isLoading &&
479
+ // !this.scrollToEnd
480
+ // ) {
481
+ // this.scrollToEnd = true;
482
+ // this.onRowsScrollEnd();
483
+ // }
484
+ // }
485
+ handleGetTotalNumber() {
486
+ this.getTotalNumberFn && this.getTotalNumberFn();
487
+ }
488
+ toggleCustomPopover() {
489
+ this.isOpen = !this.isOpen;
490
+ }
491
+ closePopover() {
492
+ this.isOpen = !1;
493
+ }
494
+ toggleColumn(t) {
495
+ var e;
496
+ this.columnVisibility = {
497
+ ...this.columnVisibility,
498
+ [t]: !(((e = this.columnVisibility) == null ? void 0 : e[t]) ?? !0)
499
+ }, this.table.setColumnVisibility(this.columnVisibility);
500
+ }
501
+ onSettingsChangedCallback(t) {
502
+ var e;
503
+ (t == null ? void 0 : t.enableSorting) !== void 0 && (this.enableSorting = t.enableSorting), (t == null ? void 0 : t.enableFiltering) !== void 0 && (this.enableFiltering = t.enableFiltering), (t == null ? void 0 : t.columnDefaultSize) !== void 0 && (this.columnDefaultSize = t.columnDefaultSize), (t == null ? void 0 : t.columnGroupedColor) !== void 0 && (this.columnGroupedColor = t.columnGroupedColor), (t == null ? void 0 : t.rowAggregationColor) !== void 0 && (this.rowAggregationColor = t.rowAggregationColor), (t == null ? void 0 : t.enableGrouping) !== void 0 && (this.enableGrouping = t.enableGrouping), (t == null ? void 0 : t.exportData) !== void 0 && (this.exportData = t.exportData), (t == null ? void 0 : t.actionButtonsInMenu) !== void 0 && (this.actionButtonsInMenu = t.actionButtonsInMenu), (t == null ? void 0 : t.hideFooter) !== void 0 && (this.hideFooter = t.hideFooter), (t == null ? void 0 : t.enableColumnPinning) !== void 0 && (this.enableColumnPinning = t.enableColumnPinning), this.initTable(), this.requestUpdate(), this.onSettingsChanged && (this.dispatchEvent(
504
+ new CustomEvent("onSettingsChanged", {
505
+ bubbles: !0,
506
+ composed: !0,
507
+ detail: t
508
+ })
509
+ ), (e = this.onSettingsChanged) == null || e.call(this, t));
510
+ }
511
+ _onRowMouseDown(t, e) {
512
+ if (this.handleMouseDown(t, e), t.shiftKey) {
513
+ t.currentTarget && t.currentTarget.classList.add("no-select");
514
+ const o = window.getSelection();
515
+ o && o.removeAllRanges();
516
+ }
517
+ }
518
+ _onRowMouseUp(t) {
519
+ t.currentTarget.classList.remove("no-select");
520
+ }
521
+ _rowUnselectAll(t) {
522
+ t.resetRowSelection(), this.focusedRowIndex = 0;
523
+ }
524
+ render() {
525
+ var C, w, S, v, I;
526
+ const t = ((C = this.columns) == null ? void 0 : C.filter((i) => {
527
+ var b;
528
+ return (((b = i.headerName) == null ? void 0 : b.toLowerCase()) || i.field.toLowerCase()).includes(this.filterText);
529
+ })) || [], e = this.enableMultiRowSelection ? [
530
+ {
531
+ id: "checkboxForMultiselect",
532
+ type: "checkbox",
533
+ minSize: 30,
534
+ size: 30,
535
+ enablePinning: !1,
536
+ enableResizing: !1,
537
+ header: ({ table: i }) => u`
538
+ <div style="position: absolute; left: 0; bottom: 0; margin: 0.65rem 0;">
539
+ <lit-checkbox
540
+ type="checkbox"
541
+ .onChange="${() => i.getIsSomeRowsSelected() ? this._rowUnselectAll(i) : i.toggleAllRowsSelected()}"
542
+ .checked="${i.getIsAllRowsSelected()}"
543
+ .indeterminate="${i.getIsSomeRowsSelected()}"
544
+ ></lit-checkbox>
545
+ </div>
546
+ `,
547
+ cell: ({ table: i, row: r }) => u`
548
+ <div
549
+ style="padding: 0.1875rem 0px 0px 0px"
550
+ @click=${(b) => b.stopPropagation()}
551
+ >
552
+ <lit-checkbox
553
+ type="checkbox"
554
+ .onChange="${(b) => {
555
+ b.stopPropagation(), r.toggleSelected(b.target.checked);
556
+ }}"
557
+ .checked="${r.getIsSelected()}"
558
+ ?disabled="${!r.getCanSelect()}"
559
+ .indeterminate="${r.getIsSomeSelected()}"
560
+ ></lit-checkbox>
561
+ </div>
562
+ `
563
+ }
564
+ ] : [];
565
+ at() !== this.userLang && dt(this.userLang || "cs"), this.table = this.tableController.table({
566
+ data: this.rows || [],
567
+ columns: [...e, ...this.getTanstackColumns(this.getColumns)],
568
+ columnResizeMode: "onChange",
569
+ columnResizeDirection: "ltr",
570
+ defaultColumn: {
571
+ size: this.columnDefaultSize || void 0,
572
+ //starting column size
573
+ minSize: this.columnDefaultMinSize || 100,
574
+ //enforced during column resizing
575
+ maxSize: this.columnDefaultMaxSize || 500
576
+ //enforced during column resizing
577
+ },
578
+ initialState: {
579
+ // columnFilters: [...(this.initialFiltering || [])],
580
+ // sorting: [...(this.initialSorting || [])],
581
+ // expanded: { ...this.initialRowExpanded },
582
+ grouping: [...this.initialGroups || []],
583
+ columnVisibility: { ...this.initialColumnVisibility },
584
+ columnPinning: {
585
+ left: [...this.leftPinnedColumns || [], "checkboxForMultiselect"],
586
+ right: ["actions"]
587
+ }
588
+ },
589
+ state: {
590
+ columnVisibility: this.columnVisibility,
591
+ // columnFilters: this.server ? this.filtersServer : this.filters,
592
+ columnFilters: this.initialFiltering,
593
+ sorting: this.initialSorting,
594
+ rowSelection: this.rowsSelected,
595
+ columnSizing: this.columnSizing,
596
+ expanded: this.initialRowExpanded,
597
+ columnOrder: this.columnOrder
598
+ },
599
+ filterFns: {
600
+ dateRangeFilterFn: Y,
601
+ dateFilterFn: Z,
602
+ multiselectFilterFn: J
603
+ },
604
+ // debugTable: true,
605
+ enableRowSelection: this.enableRowSelection,
606
+ enableMultiRowSelection: this.enableMultiRowSelection,
607
+ enableColumnPinning: this.enableColumnPinning,
608
+ enableGrouping: this.enableGrouping,
609
+ manualFiltering: this.server,
610
+ manualSorting: this.server,
611
+ enableSorting: this.enableSorting,
612
+ getRowId: (i, r) => this.getRowId ? this.getRowId(i, r) : r.toString(),
613
+ // groupedColumnMode: 'reorder',
614
+ getCoreRowModel: bt(),
615
+ getSortedRowModel: ft(),
616
+ getFilteredRowModel: mt(),
617
+ getFacetedRowModel: gt(),
618
+ getGroupedRowModel: ut(),
619
+ getExpandedRowModel: pt(),
620
+ getFacetedUniqueValues: ht(),
621
+ onColumnFiltersChange: (i) => {
622
+ this.currentScrollTop = 0;
623
+ const r = this.tableContainerRef.value;
624
+ r && (r.scrollTop = 0);
625
+ const b = typeof i == "function" ? i(this.table.getState().columnFilters) : i;
626
+ this.initialFiltering = b, this.onColumnFiltersChanged && this.onColumnFiltersChanged(this.table, b);
627
+ },
628
+ onSortingChange: (i) => {
629
+ this.currentScrollTop = 0;
630
+ const r = this.tableContainerRef.value;
631
+ r && (r.scrollTop = 0);
632
+ const b = typeof i == "function" ? i(this.table.getState().sorting) : i;
633
+ this.initialSorting = b, this.onColumnSortChanged && this.onColumnSortChanged(this.table, b);
634
+ },
635
+ onRowSelectionChange: (i) => {
636
+ const r = typeof i == "function" ? i(this.rowsSelected) : i;
637
+ this.rowsSelected = r, this.onRowSelectionChanged && this.onRowSelectionChanged(this.table, r);
638
+ },
639
+ onColumnSizingChange: (i) => {
640
+ const r = typeof i == "function" ? i(this.table.getState().columnSizing) : i;
641
+ this.columnSizing = r, this.onColumnResize && this.onColumnResize(this.table, r);
642
+ },
643
+ onExpandedChange: (i) => {
644
+ const r = typeof i == "function" ? i(this.initialRowExpanded) : i;
645
+ this.initialRowExpanded = et.isEmpty(r) ? this.initialRowExpanded : r, this.requestUpdate();
646
+ },
647
+ onColumnOrderChange: (i) => {
648
+ const r = typeof i == "function" ? i(this.columnOrder) : i;
649
+ this.columnOrder = r, this.render(), this.onColumnOrderChanged && this.onColumnOrderChanged(this.table, r);
650
+ },
651
+ onColumnVisibilityChange: (i) => {
652
+ const r = typeof i == "function" ? i(this.table.getState().columnVisibility) : i;
653
+ this.columnVisibility = r, this.onColumnVisibilityChanged && this.onColumnVisibilityChanged(this.table, r);
654
+ }
655
+ }), this.rowsCount = this.table.getRowModel().rows.length;
656
+ const o = this.enableRowVirtualization ? (w = this.rowVirtualizerController) == null ? void 0 : w.getVirtualizer() : null, d = this.enableColumnVirtualization ? (S = this.columnVirtualizerController) == null ? void 0 : S.getVirtualizer() : null, s = (d == null ? void 0 : d.getVirtualItems()) ?? [], { rows: p } = this.table.getRowModel(), g = o ? o.getVirtualItems() : p.map((i, r) => ({
657
+ key: r,
658
+ index: r,
659
+ start: r * this.getRowHeight(),
660
+ end: (r + 1) * this.getRowHeight(),
661
+ size: this.getRowHeight(),
662
+ lane: 0
663
+ }));
664
+ let h, m;
665
+ d && (s != null && s.length) && this.enableColumnVirtualization && (h = ((v = s[0]) == null ? void 0 : v.start) ?? 0, m = d.getTotalSize() - (((I = s[s.length - 1]) == null ? void 0 : I.end) ?? 0));
666
+ let x = window.matchMedia("(max-width: 600px)").matches;
667
+ return u`
668
+ <div class="data-grid__wrapper">
669
+ ${this.isScrollable && !x ? u`
670
+ <lit-icon-button
671
+ class="scroll-button left"
672
+ .disabled="${this.disableScrollLeft}"
673
+ @pointerdown="${() => this.startScroll("left")}"
674
+ @pointerup="${this.stopScroll}"
675
+ @pointerleave="${this.stopScroll}"
676
+ size="small"
677
+ variant="contained"
678
+ icon="arrowLeft"
679
+ >
680
+ </lit-icon-button>
681
+ <lit-icon-button
682
+ class="scroll-button right"
683
+ .disabled="${this.disableScrollRight}"
684
+ @pointerdown="${() => this.startScroll("right")}"
685
+ @pointerup="${this.stopScroll}"
686
+ @pointerleave="${this.stopScroll}"
687
+ size="small"
688
+ variant="contained"
689
+ icon="arrowRight"
690
+ >
691
+ </lit-icon-button>
692
+ ` : null}
693
+
694
+ <div class="grid" ${X(this.tableContainerRef)}>
695
+ <table
696
+ part="dataGrid-table"
697
+ style="width: ${this.table.getCenterTotalSize()}px"
698
+ >
699
+ <thead
700
+ part="dataGrid-header"
701
+ style="height: ${this.enableFiltering ? "4rem" : "1.625rem"};"
702
+ >
703
+ ${T(
704
+ this.table.getHeaderGroups(),
705
+ (i) => i.id,
706
+ (i) => {
707
+ const r = this.enableColumnVirtualization ? s.map((c) => i.headers[c.index]) : i.headers, b = this.enableColumnVirtualization ? [
708
+ ...i.headers.filter(
709
+ (c) => c.column.getIsPinned()
710
+ ),
711
+ ...r.filter(
712
+ (c) => !c.column.getIsPinned()
713
+ )
714
+ ] : r;
715
+ return u`
716
+ <tr class="head" data-index="${i.id}">
717
+ ${h ? u`
718
+ <th
719
+ style=" display: flex; width: ${h}px;"
720
+ ></th>
721
+ ` : ""}
722
+ ${T(
723
+ b,
724
+ (c) => c.id,
725
+ (c, D) => {
726
+ var G, A, O, _, B, N, H, U;
727
+ const y = c.column, F = {
728
+ visibility: y.columnDef.type === "actions" ? "hidden" : "visible",
729
+ ...this.getCommonPinningStyles(
730
+ c.column
731
+ ),
732
+ width: `${y == null ? void 0 : y.getSize()}px`,
733
+ flexGrow: `${y.columnDef.size === void 0 ? 1 : "unset"}`
734
+ }, f = (G = y.columnDef.meta) == null ? void 0 : G.filterVariant, k = ((O = (A = y == null ? void 0 : y.columnDef) == null ? void 0 : A.meta) == null ? void 0 : O.filterOperators) || ct(f), P = ((_ = y == null ? void 0 : y.getFilterValue()) == null ? void 0 : _.value) || (y == null ? void 0 : y.getFilterValue()) || "", M = ((B = y == null ? void 0 : y.getFilterValue()) == null ? void 0 : B.operator) || ((N = k[0]) == null ? void 0 : N.value);
735
+ return (f === "select" || f === "multiselect") && ((H = y == null ? void 0 : y.columnDef) != null && H.meta.valueOptions || this.server ? (U = y == null ? void 0 : y.columnDef) != null && U.meta.valueOptions : Array.from(
736
+ y == null ? void 0 : y.getFacetedUniqueValues().keys()
737
+ ).sort().slice(0, 5e3).map(
738
+ (q) => ({
739
+ value: q,
740
+ label: q
741
+ })
742
+ )), u`
743
+ <th
744
+ class="head"
745
+ style="${E(F)}"
746
+ colspan="${c.colSpan}"
747
+ data-index="${c.id}"
748
+ >
749
+ ${c.isPlaceholder ? "" : u`
750
+ <div
751
+ class="resizer ${this.table.options.columnResizeDirection} ${c.column.getIsResizing() ? "is-resizing" : ""}"
752
+ style="transform: ${this.table.options.columnResizeMode === "onEnd" && c.column.getIsResizing() ? `translateX(${(this.table.options.columnResizeDirection === "rtl" ? -1 : 1) * (this.table.getState().columnSizingInfo.deltaOffset ?? 0)}px)` : ""}"
753
+ >
754
+ <div class="header">
755
+ ${c.column.getIsFiltered() ? u`
756
+ <div
757
+ class="filterCirclePoint"
758
+ ></div>
759
+ ` : ""}
760
+ <div
761
+ class="column-header"
762
+ @click=${c.column.getToggleSortingHandler()}
763
+ >
764
+ <lit-overflow-tooltip
765
+ label="${c.column.columnDef.header}"
766
+ >
767
+ ${L(
768
+ c.column.columnDef.header,
769
+ c.getContext()
770
+ )}
771
+ </lit-overflow-tooltip>
772
+ </div>
773
+
774
+ <div
775
+ class="icons-group-pin"
776
+ >
777
+ ${c.column.getCanSort() ? c.column.getIsSorted() ? c.column.getIsSorted() === "asc" ? u`<slot
778
+ name="iconSortUp"
779
+ ><lit-icon
780
+ class="cursor"
781
+ @click=${c.column.getToggleSortingHandler()}
782
+ size="0.75rem"
783
+ icon="chevronUpFilled"
784
+ ></lit-icon
785
+ ></slot>` : u`<slot
786
+ name="iconSortDown"
787
+ >
788
+ <lit-icon
789
+ class="cursor"
790
+ @click=${c.column.getToggleSortingHandler()}
791
+ size="0.75rem"
792
+ icon="chevronDownFilled"
793
+ ></lit-icon>
794
+ </slot>` : u`<div
795
+ class="sortFilled"
796
+ >
797
+ <lit-icon
798
+ class="cursor"
799
+ @click=${c.column.getToggleSortingHandler()}
800
+ size="0.75rem"
801
+ icon="sortFilled"
802
+ ></lit-icon>
803
+ </div>` : u`<div></div>`}
804
+ <div class="flex">
805
+ ${this.actionButtonsInMenu ? u`
806
+ <lit-data-grid-action-buttons-popover
807
+ .group="${c.column.getToggleGroupingHandler()}"
808
+ .pin="${() => this.togglePin(
809
+ c
810
+ )}"
811
+ .header="${c}"
812
+ .table="${this.table}"
813
+ ></lit-data-grid-action-buttons-popover>
814
+ ` : u`
815
+ ${c.column.getCanPin() ? u`
816
+ <lit-icon-button
817
+ @click="${() => this.togglePin(
818
+ c
819
+ )}"
820
+ size="small"
821
+ variant="text"
822
+ icon="pin"
823
+ .active="${c.column.getIsPinned()}"
824
+ >
825
+ </lit-icon-button>
826
+ <simple-tooltip
827
+ placement="bottom"
828
+ >${c.column.getIsPinned() ? R(
829
+ "Zrušit připnutí sloupce"
830
+ ) : R(
831
+ "Připnout sloupec vlevo"
832
+ )}
833
+ </simple-tooltip>
834
+ ` : ""}
835
+ ${c.column.getCanGroup() ? u`
836
+ <lit-icon-button
837
+ @click="${c.column.getToggleGroupingHandler()}"
838
+ size="small"
839
+ variant="text"
840
+ .active="${c.column.getIsGrouped()}"
841
+ icon="agregation"
842
+ >
843
+ </lit-icon-button>
844
+ <simple-tooltip
845
+ placement="bottom"
846
+ >
847
+ ${c.column.getIsGrouped() ? R(
848
+ "Zrušit seskupení"
849
+ ) : R(
850
+ "Seskupit sloupec"
851
+ )}</simple-tooltip
852
+ >
853
+ ` : ""}
854
+ `}
855
+ ${this.enableColumnOrdering && !c.column.getIsPinned() && !c.column.getIsGrouped() && ![
856
+ "checkbox",
857
+ "actions"
858
+ ].includes(
859
+ c.column.id
860
+ ) ? u`<div
861
+ class="drag-handle"
862
+ >
863
+ <lit-icon
864
+ icon="hamburger"
865
+ size="1rem"
866
+ ></lit-icon>
867
+ </div>
868
+ <simple-tooltip
869
+ placement="bottom"
870
+ >${R(
871
+ "Přesunout sloupec"
872
+ )}</simple-tooltip
873
+ > ` : null}
874
+ </div>
875
+ </div>
876
+ </div>
877
+ </div>
878
+ ${c.column.getCanFilter() ? u`
879
+ <div>
880
+ <filter-inputs
881
+ .minFilterCharacters=${this.minFilterCharacters}
882
+ .column=${c.column}
883
+ .dateFormat=${this.dateFormat}
884
+ .userLang=${this.userLang}
885
+ @filter-tab=${this.handleFilterTabNavigation}
886
+ .server=${this.server}
887
+ .value="${P}"
888
+ .operator="${M}"
889
+ .filterVariant="${f}"
890
+ .filterOperators="${k}"
891
+ ></filter-inputs>
892
+ </div>
893
+ ` : null}
894
+ `}
895
+ <div
896
+ class="resize-handle"
897
+ @dblclick="${($) => {
898
+ $.target.classList.contains(
899
+ "resize-handle"
900
+ ) && c.column.resetSize();
901
+ }}"
902
+ @mousedown="${($) => {
903
+ $.preventDefault(), $.stopPropagation(), $.target.classList.contains(
904
+ "resize-handle"
905
+ ) && c.getResizeHandler()(
906
+ $
907
+ );
908
+ }}"
909
+ @touchstart="${($) => {
910
+ $.preventDefault(), $.stopPropagation(), $.target.classList.contains(
911
+ "resize-handle"
912
+ ) && c.getResizeHandler()(
913
+ $
914
+ );
915
+ }}"
916
+ ></div>
917
+ </th>
918
+ `;
919
+ }
920
+ )}
921
+ ${m ? u`
922
+ <th
923
+ style=" display: flex; width: ${m}px;"
924
+ ></th>
925
+ ` : ""}
926
+ </tr>
927
+ `;
928
+ }
929
+ )}
930
+ ${this.isLoading ? u`
931
+ <div style="position: absolute; bottom: 0px; width: 100%;">
932
+ <lit-loading-bar></lit-loading-bar>
933
+ </div>
934
+ ` : ""}
935
+ </thead>
936
+
937
+ <tbody
938
+ @keydown=${this.handleKeyDown}
939
+ tabindex="0"
940
+ part="dataGrid-body"
941
+ style="height: ${o && this.table.getRowModel().rows.length > 0 ? o.getTotalSize() + "px" : "auto"};"
942
+ >
943
+ ${p.length > 0 ? T(
944
+ g,
945
+ (i) => i.key,
946
+ (i) => {
947
+ const r = p[i.index], b = r == null ? void 0 : r.getVisibleCells(), c = this.enableColumnVirtualization ? s == null ? void 0 : s.map(
948
+ (f) => b && b[f.index]
949
+ ) : b, D = (b == null ? void 0 : b.filter(
950
+ (f) => f.column.getIsPinned()
951
+ )) || [], y = this.enableColumnVirtualization ? [.../* @__PURE__ */ new Set([...D, ...c])] : c, F = {
952
+ transform: o ? `translateY(${i.start}px)` : "none",
953
+ height: `${this.getRowHeight()}px`,
954
+ lineHeight: `${this.getRowHeight()}px`,
955
+ position: o ? "absolute" : "relative"
956
+ };
957
+ return r ? u`
958
+ <tr
959
+ tabindex=${this.enableRowSelection ? "0" : void 0}
960
+ data-row-index="${r.index}"
961
+ class="${this.rowsSelected[r.id] ? "selected body" : "body"}"
962
+ data-index="${i.index}"
963
+ @click="${r.getIsGrouped() ? r.getToggleExpandedHandler() : (f) => this.handleRowClick(f, r)}"
964
+ @mousedown=${(f) => this._onRowMouseDown(f, r)}
965
+ @mouseup=${this._onRowMouseUp}
966
+ @mouseleave=${this._onRowMouseUp}
967
+ @contextmenu=${(f) => f.preventDefault()}
968
+ @dblclick="${() => this.handleRowDoubleClick(r)}"
969
+ style="${E(F)}"
970
+ ${X((f) => {
971
+ f && this.enableRowVirtualization && o && o.measureElement(f);
972
+ })}
973
+ >
974
+ ${h ? u`
975
+ <th
976
+ style=" display: flex; width: ${h}px;"
977
+ ></th>
978
+ ` : ""}
979
+ <!-- Cells for each row -->
980
+ ${T(
981
+ y,
982
+ (f) => f.key,
983
+ (f) => {
984
+ var M;
985
+ this.getButtonSize();
986
+ const { column: k } = f, P = {
987
+ ...this.getCommonPinningStyles(
988
+ f.column
989
+ ),
990
+ width: `${(M = f.column) == null ? void 0 : M.getSize()}px`,
991
+ flexGrow: `${k.columnDef.size === void 0 ? 1 : "unset"}`,
992
+ background: this.getCellBackgroundColor(
993
+ f
994
+ ),
995
+ lineHeight: `${this.getRowHeight()}px`,
996
+ padding: k.columnDef.type === "actions" || k.columnDef.type === "checkbox" ? "0" : "0px 14px"
997
+ };
998
+ return u`
999
+ <td style="${E(P)}">
1000
+ ${f.getIsGrouped() ? u`<div
1001
+ class="grouped-column"
1002
+ >
1003
+ <lit-icon
1004
+ class="grouped-column--icon-button"
1005
+ size="1.25rem"
1006
+ icon="${r.getIsExpanded() ? "chevronDownFilled" : "chevron"}"
1007
+ ></lit-icon>
1008
+ <div
1009
+ class="grouped-column--label"
1010
+ >
1011
+ <lit-overflow-tooltip
1012
+ label=${f.getValue()}
1013
+ >
1014
+ ${f.getValue()}
1015
+ </lit-overflow-tooltip>
1016
+ </div>
1017
+ <lit-pill
1018
+ class="grouped-column--pill"
1019
+ style="margin-left: 0.5rem"
1020
+ count="${r.subRows.length}"
1021
+ ></lit-pill>
1022
+ </div> ` : f.getIsAggregated() ? u`
1023
+ <div
1024
+ style="flex-grow:1"
1025
+ >
1026
+ ${L(
1027
+ f.column.columnDef.aggregatedCell ?? f.column.columnDef.cell,
1028
+ f.getContext()
1029
+ )}
1030
+ </div>
1031
+ ` : f.getIsPlaceholder() ? null : u`<lit-overflow-tooltip
1032
+ placement="right"
1033
+ label=${f.getValue()}
1034
+ >${L(
1035
+ f.column.columnDef.cell,
1036
+ f.getContext()
1037
+ )}</lit-overflow-tooltip
1038
+ >`}
1039
+ </td>
1040
+ `;
1041
+ }
1042
+ )}
1043
+ ${m ? u`
1044
+ <th
1045
+ style=" display: flex; width: ${m}px;"
1046
+ ></th>
1047
+ ` : ""}
1048
+ </tr>
1049
+ ` : null;
1050
+ }
1051
+ ) : null}
1052
+ </tbody>
1053
+ </table>
1054
+ ${this.hideFooter ? "" : u`
1055
+ <slot
1056
+ part="dataGrid-footer"
1057
+ name="dataGridFooter"
1058
+ class="footer-container"
1059
+ >
1060
+ <div class="numberCount">
1061
+ ${R("Počet záznamů")}:
1062
+ ${this.table.getRowModel().rows.length}
1063
+ <pre>/</pre>
1064
+ ${this.server ? this.totalNumberRows ? this.totalNumberRows : "?" : this.table.getRowModel().rows.length}
1065
+ ${this.server ? u`<lit-icon-button
1066
+ icon="reload"
1067
+ size="mini"
1068
+ variant="text"
1069
+ @click="${() => this.handleGetTotalNumber()}"
1070
+ style="margin-left: 0.2rem; margin-top: -0.1rem"
1071
+ ></lit-icon-button>` : ""}
1072
+ </div>
1073
+ <div class="right-actions">
1074
+ <lit-data-grid-density-popover
1075
+ .density="${this.rowDensity}"
1076
+ .setDensity="${(i) => this.handleSetDensity(i)}"
1077
+ >
1078
+ </lit-data-grid-density-popover>
1079
+ <lit-responsive-button
1080
+ size="medium"
1081
+ variant="text"
1082
+ label=${R("Přizpůsobit sloupce")}
1083
+ icon="columns"
1084
+ @click=${() => this.table.resetColumnSizing()}
1085
+ ></lit-responsive-button>
1086
+ ${this.exportData ? u`
1087
+ <lit-data-grid-export-popover
1088
+ .exportToCsv="${typeof this.exportExcelFn == "function" ? () => this.exportCsvFn && this.exportCsvFn() : () => this.exportDataToCsv()}"
1089
+ .exportToExcel="${typeof this.exportExcelFn == "function" ? () => this.exportExcelFn && this.exportExcelFn() : () => this.exportDataToExcel()}"
1090
+ .disabledButtons="${this.isLoading}"
1091
+ >
1092
+ </lit-data-grid-export-popover>
1093
+ ` : null}
1094
+ ${this.enableSettings ? u`
1095
+ <div>
1096
+ <lit-responsive-button
1097
+ variant="dashed"
1098
+ label="${R("Přiřadit sloupec")}"
1099
+ icon="add"
1100
+ style="display: inline-block"
1101
+ @click="${this.toggleCustomPopover}"
1102
+ ></lit-responsive-button>
1103
+
1104
+ <simple-popper
1105
+ .showing=${this.isOpen}
1106
+ .placement=${"top-end"}
1107
+ .manualOpening=${!0}
1108
+ .maxWidthAsTarget=${!1}
1109
+ .onClose=${() => this.closePopover()}
1110
+ >
1111
+ <div
1112
+ class="popper-input"
1113
+ style="position: sticky; top: 0; z-index: 1;"
1114
+ >
1115
+ <lit-input
1116
+ .value=${this.filterText}
1117
+ .onInput=${(i) => {
1118
+ var r;
1119
+ this.filterText = ((r = i == null ? void 0 : i.toLowerCase) == null ? void 0 : r.call(i)) || "";
1120
+ }}
1121
+ .onClear=${() => {
1122
+ this.filterText = "";
1123
+ }}
1124
+ placeholder="${R(
1125
+ "Zadejte název sloupce"
1126
+ )}"
1127
+ ></lit-input>
1128
+ </div>
1129
+ <lit-menu tabindex="0">
1130
+ ${this.columns.filter((i) => {
1131
+ var b;
1132
+ return (((b = i == null ? void 0 : i.headerName) == null ? void 0 : b.toLowerCase()) || (i == null ? void 0 : i.field.toLowerCase())).includes(
1133
+ this.filterText
1134
+ );
1135
+ }).sort((i, r) => {
1136
+ const b = i.field.startsWith("_"), c = r.field.startsWith("_");
1137
+ return b && !c ? 1 : !b && c ? -1 : (i.headerName || i.field).localeCompare(
1138
+ r.headerName || r.field
1139
+ );
1140
+ }).map(
1141
+ (i) => {
1142
+ var r, b;
1143
+ return u`
1144
+ <lit-menu-item
1145
+ .onClick=${() => this.toggleColumn(
1146
+ i == null ? void 0 : i.field
1147
+ )}
1148
+ .isActive=${((r = this.columnVisibility) == null ? void 0 : r[i == null ? void 0 : i.field]) !== !1}
1149
+ >
1150
+ <span
1151
+ class="menu-item--multiple"
1152
+ >
1153
+ <lit-checkbox
1154
+ class="cursor"
1155
+ .checked=${((b = this.columnVisibility) == null ? void 0 : b[i == null ? void 0 : i.field]) !== !1}
1156
+ ></lit-checkbox>
1157
+ ${(i == null ? void 0 : i.headerName) || (i == null ? void 0 : i.field)}
1158
+ </span>
1159
+ </lit-menu-item>
1160
+ `;
1161
+ }
1162
+ )}
1163
+ </lit-menu>
1164
+
1165
+ ${it.isEqual(t.length, 0) ? u`
1166
+ <div
1167
+ style="display: flex; flex-direction: column; align-items: center; padding: 1rem;"
1168
+ >
1169
+ <div
1170
+ style="max-height: 6rem; max-width: 6rem;"
1171
+ >
1172
+ <not-found></not-found>
1173
+ </div>
1174
+ <div>
1175
+ ${R("Nenalezeno")}
1176
+ </div>
1177
+ </div>
1178
+ ` : null}
1179
+ </simple-popper>
1180
+
1181
+ <lit-icon-button
1182
+ icon="administration"
1183
+ @click="${this.toggleModal}"
1184
+ variant="dashed"
1185
+ style="display: inline-block"
1186
+ ></lit-icon-button>
1187
+ <data-grid-settings
1188
+ .onClose="${() => {
1189
+ this.isOpenModal = !1;
1190
+ }}"
1191
+ .isOpenModal="${this.isOpenModal}"
1192
+ .enableFiltering="${this.enableFiltering}"
1193
+ .enableSorting="${this.enableSorting}"
1194
+ .columnDefaultSize="${this.columnDefaultSize}"
1195
+ .columnGroupedColor="${this.columnGroupedColor}"
1196
+ .rowAggregationColor="${this.rowAggregationColor}"
1197
+ .enableGrouping="${this.enableGrouping}"
1198
+ .enableColumnPinning="${this.enableColumnPinning}"
1199
+ .exportData="${this.exportData}"
1200
+ .actionButtonsInMenu="${this.actionButtonsInMenu}"
1201
+ .hideFooter="${this.hideFooter}"
1202
+ .onSettingsChangedModal="${this.onSettingsChangedCallback.bind(
1203
+ this
1204
+ )}"
1205
+ ></data-grid-settings>
1206
+ </div>
1207
+ ` : null}
1208
+ </div>
1209
+ </slot>
1210
+ `}
1211
+ </div>
1212
+ ${this.table.getRowModel().rows.length < 1 && !this.isLoading ? u` <div class="data-grid__empty">
1213
+ <div style="max-height: 7.125rem; max-width: 7.125rem">
1214
+ <not-found></not-found>
1215
+ </div>
1216
+ <div class="data-grid__empty-text">${R("Nic dalšího tu není")}</div>
1217
+ </div>` : null}
1218
+ </div>
1219
+ `;
1220
+ }
1221
+ };
1222
+ n.styles = [
1223
+ // styles,
1224
+ yt`
1225
+ *,
1226
+ *::before,
1227
+ *::after {
1228
+ margin: 0;
1229
+ padding: 0;
1230
+ box-sizing: border-box;
1231
+ }
1232
+
1233
+ display: block;
1234
+ font-family: 'Inter', sans-serif;
1235
+ box-sizing: border-box;
1236
+
1237
+ td {
1238
+ padding: 0px;
1239
+ }
1240
+ .data-grid__wrapper {
1241
+ position: relative;
1242
+ background-color: var(--background-paper, #fff);
1243
+ height: 100%;
1244
+ z-index: 1;
1245
+ }
1246
+
1247
+ .grid {
1248
+ overflow: auto;
1249
+ position: relative;
1250
+ height: 100%;
1251
+ }
1252
+
1253
+ .data-grid__empty {
1254
+ position: absolute;
1255
+ top: 50%;
1256
+ left: 50%;
1257
+ transform: translate(-50%, -50%);
1258
+ font-size: 0.875rem;
1259
+ text-align: center;
1260
+ }
1261
+
1262
+ table {
1263
+ border-collapse: collapse;
1264
+ border-spacing: 0;
1265
+ width: 99% !important;
1266
+ height: calc(100% - 38px);
1267
+ }
1268
+
1269
+ thead {
1270
+ display: flex;
1271
+ position: sticky;
1272
+ top: 0;
1273
+ z-index: 10;
1274
+ background-color: var(--background-paper, #fff);
1275
+ border-bottom: 1px solid var(--color-divider, #d0d3db);
1276
+ }
1277
+
1278
+ tr.head {
1279
+ display: flex;
1280
+ width: 100%;
1281
+ }
1282
+
1283
+ th.head {
1284
+ display: block;
1285
+ position: relative;
1286
+ padding: 0 6px;
1287
+ gap: 0.25rem;
1288
+ //z-index: auto !important;
1289
+ }
1290
+
1291
+ tbody {
1292
+ display: grid;
1293
+ position: relative;
1294
+ outline: none;
1295
+ }
1296
+
1297
+ tr.body {
1298
+ width: 100%;
1299
+ border-bottom: 1px solid var(--color-divider, #d0d3db);
1300
+ display: flex;
1301
+ overflow: visible;
1302
+ }
1303
+ tr:focus {
1304
+ background-color: var(--color-primary-light, #f0fadf);
1305
+ outline: none;
1306
+ }
1307
+ // tr.selected:focus {
1308
+ // background-color: var(--color-primary-main, #f0fadf);
1309
+ // outline: none;
1310
+ // }
1311
+
1312
+ tr.body:hover:not(.selected):not(:focus) {
1313
+ cursor: pointer;
1314
+ background-color: var(--background-default, #eff3f4);
1315
+ }
1316
+
1317
+ td {
1318
+ display: table-cell;
1319
+ white-space: nowrap;
1320
+ overflow: hidden;
1321
+ padding: 0px 14px;
1322
+ font-weight: 500;
1323
+ font-size: 12px;
1324
+ color: var(--text-primary, #111827);
1325
+ display: flex;
1326
+ align-items: center;
1327
+ }
1328
+
1329
+ .column-header {
1330
+ font-size: 11px;
1331
+ font-weight: 600;
1332
+ color: var(--text-secondary, #5d6371);
1333
+ cursor: pointer;
1334
+ gap: 0.25rem;
1335
+ justify-content: center;
1336
+ align-items: center;
1337
+ margin: 0 0.25rem;
1338
+ overflow: hidden;
1339
+ white-space: nowrap;
1340
+ text-overflow: ellipsis;
1341
+ height: inherit;
1342
+ display: flex;
1343
+ }
1344
+ .no-select,
1345
+ .no-select * {
1346
+ user-select: none !important;
1347
+ }
1348
+ .ellipsis {
1349
+ overflow: hidden;
1350
+ white-space: nowrap;
1351
+ text-overflow: ellipsis;
1352
+ }
1353
+
1354
+ .icons-group-pin {
1355
+ display: flex;
1356
+ height: 100%;
1357
+ justify-content: space-between;
1358
+ flex-grow: 1;
1359
+ }
1360
+
1361
+ .flex {
1362
+ display: flex;
1363
+ }
1364
+
1365
+ .drag-handle {
1366
+ display: flex;
1367
+ align-items: center;
1368
+ justify-content: center;
1369
+ padding: 1px 6px;
1370
+ cursor: grab;
1371
+ }
1372
+
1373
+ .resizer {
1374
+ height: 23px;
1375
+ padding: 0 0 0 6px;
1376
+ text-align: start;
1377
+ //cursor: col-resize;
1378
+ user-select: none;
1379
+ touch-action: none;
1380
+ }
1381
+
1382
+ .resize-handle {
1383
+ position: absolute;
1384
+ top: 0;
1385
+ right: 0px;
1386
+ width: 6px;
1387
+ height: 100%;
1388
+ background: transparent;
1389
+ cursor: col-resize;
1390
+ transition: background-color 0.2s ease-in-out;
1391
+ // border-radius: 5px;
1392
+ // padding-bottom: 5px;
1393
+ }
1394
+
1395
+ .resize-handle:hover {
1396
+ border-right: 2px solid var(--color-primary-main, #75b603);
1397
+ }
1398
+
1399
+ .resizer.ltr {
1400
+ right: 0;
1401
+ }
1402
+
1403
+ .resizer.rtl {
1404
+ left: 0;
1405
+ }
1406
+
1407
+ .resizer.is-resizing {
1408
+ opacity: 1;
1409
+ }
1410
+
1411
+ .footer-container {
1412
+ position: sticky;
1413
+ left: 0;
1414
+ bottom: 0;
1415
+ background-color: var(--background-paper, #fff);
1416
+ width: auto;
1417
+ border-top: 1px solid var(--color-divider, #d0d3db);
1418
+ height: 2.375rem;
1419
+ display: flex;
1420
+ flex-direction: row;
1421
+ justify-content: space-between;
1422
+ align-items: center;
1423
+ // padding: 0 16px;
1424
+ z-index: 10;
1425
+ }
1426
+
1427
+ .right-actions {
1428
+ position: absolute;
1429
+ right: 0;
1430
+ display: flex;
1431
+ }
1432
+
1433
+ .numberCount {
1434
+ margin: 0.375rem 0;
1435
+ font-size: 12px;
1436
+ font-weight: 400;
1437
+ color: var(--text-primary, #111827);
1438
+ display: flex;
1439
+ align-items: center;
1440
+ }
1441
+
1442
+ .scroll-button {
1443
+ position: absolute;
1444
+ top: 50%;
1445
+ transform: translateY(-50%);
1446
+ z-index: 1000;
1447
+ cursor: pointer;
1448
+ }
1449
+
1450
+ .scroll-button.left {
1451
+ left: 3rem;
1452
+ }
1453
+
1454
+ .scroll-button.right {
1455
+ right: 3rem;
1456
+ }
1457
+
1458
+ .selected {
1459
+ background-color: var(--color-primary-light, #f0fadf);
1460
+ }
1461
+
1462
+ .sortFilled {
1463
+ visibility: hidden;
1464
+ }
1465
+ .header {
1466
+ display: flex;
1467
+ align-items: center;
1468
+ height: 100%;
1469
+ }
1470
+ .header:hover .sortFilled {
1471
+ visibility: visible;
1472
+ }
1473
+ .grouped-column {
1474
+ display: flex;
1475
+ align-items: center;
1476
+ justify-content: space-between;
1477
+ width: 100%;
1478
+ gap: 0.25rem;
1479
+ }
1480
+ .grouped-column--icon-button {
1481
+ display: flex;
1482
+ align-items: center;
1483
+ position: relative;
1484
+ top: -1.5px;
1485
+ }
1486
+ .grouped-column--label {
1487
+ display: flex;
1488
+ align-items: center;
1489
+ overflow: hidden;
1490
+ flex-grow: 1;
1491
+ }
1492
+ .grouped-column--pill {
1493
+ margin-left: 0.5rem;
1494
+ }
1495
+ .filterCirclePoint {
1496
+ width: 8px;
1497
+ height: 8px;
1498
+ border-radius: 50%;
1499
+ background-color: var(--color-primary-main, #75b603);
1500
+ display: inline-block;
1501
+ vertical-align: middle;
1502
+ }
1503
+ .cursor {
1504
+ cursor: pointer;
1505
+ color: var(--text-secondary, #5d6371);
1506
+ }
1507
+ .data-grid__empty-text {
1508
+ color: var(--text-primary, #5d6371);
1509
+ }
1510
+ `
1511
+ ];
1512
+ l([
1513
+ a({ type: Array, reflect: !0 })
1514
+ ], n.prototype, "row", 2);
1515
+ l([
1516
+ a({ type: Array })
1517
+ ], n.prototype, "columns", 2);
1518
+ l([
1519
+ a({ type: Number })
1520
+ ], n.prototype, "columnDefaultSize", 2);
1521
+ l([
1522
+ a({ type: Number })
1523
+ ], n.prototype, "columnDefaultMinSize", 2);
1524
+ l([
1525
+ a({ type: Number })
1526
+ ], n.prototype, "columnDefaultMaxSize", 2);
1527
+ l([
1528
+ a({ type: String })
1529
+ ], n.prototype, "columnGroupedColor", 2);
1530
+ l([
1531
+ a({ type: String })
1532
+ ], n.prototype, "rowAggregationColor", 2);
1533
+ l([
1534
+ a({ type: Boolean })
1535
+ ], n.prototype, "enableRowVirtualization", 2);
1536
+ l([
1537
+ a({ type: Boolean })
1538
+ ], n.prototype, "enableColumnVirtualization", 2);
1539
+ l([
1540
+ a({ type: Boolean })
1541
+ ], n.prototype, "enableColumnPinning", 2);
1542
+ l([
1543
+ a({ type: Boolean })
1544
+ ], n.prototype, "enableColumnOrdering", 2);
1545
+ l([
1546
+ a({ type: Boolean })
1547
+ ], n.prototype, "enableGrouping", 2);
1548
+ l([
1549
+ a({ type: Boolean })
1550
+ ], n.prototype, "enablePinning", 2);
1551
+ l([
1552
+ a({ type: Boolean })
1553
+ ], n.prototype, "exportData", 2);
1554
+ l([
1555
+ a({ type: Boolean })
1556
+ ], n.prototype, "actionButtonsInMenu", 2);
1557
+ l([
1558
+ a({ type: String })
1559
+ ], n.prototype, "id", 2);
1560
+ l([
1561
+ a({ type: Array })
1562
+ ], n.prototype, "initialGroups", 2);
1563
+ l([
1564
+ a({ type: Array })
1565
+ ], n.prototype, "initialSorting", 2);
1566
+ l([
1567
+ a({ type: Object })
1568
+ ], n.prototype, "initialColumnVisibility", 2);
1569
+ l([
1570
+ a({ type: Object })
1571
+ ], n.prototype, "initialRowExpanded", 2);
1572
+ l([
1573
+ a({ type: Object })
1574
+ ], n.prototype, "columnSizing", 2);
1575
+ l([
1576
+ a({ type: Array })
1577
+ ], n.prototype, "leftPinnedColumns", 2);
1578
+ l([
1579
+ a({ type: Array })
1580
+ ], n.prototype, "rightPinnedColumns", 2);
1581
+ l([
1582
+ a({ type: Boolean })
1583
+ ], n.prototype, "enableFiltering", 2);
1584
+ l([
1585
+ a({ type: Boolean })
1586
+ ], n.prototype, "enableSorting", 2);
1587
+ l([
1588
+ a({ type: String })
1589
+ ], n.prototype, "userLang", 2);
1590
+ l([
1591
+ a({ type: String })
1592
+ ], n.prototype, "dateFormat", 2);
1593
+ l([
1594
+ a({ type: Boolean })
1595
+ ], n.prototype, "isLoading", 2);
1596
+ l([
1597
+ a({ type: Boolean })
1598
+ ], n.prototype, "enableRowSelection", 2);
1599
+ l([
1600
+ a({ type: Array })
1601
+ ], n.prototype, "initialFiltering", 2);
1602
+ l([
1603
+ a({ type: Boolean })
1604
+ ], n.prototype, "server", 2);
1605
+ l([
1606
+ a({ type: Number })
1607
+ ], n.prototype, "scrollEndThreshold", 2);
1608
+ l([
1609
+ a({ type: String })
1610
+ ], n.prototype, "rowDensity", 2);
1611
+ l([
1612
+ a({ type: Boolean })
1613
+ ], n.prototype, "enableMultiRowSelection", 2);
1614
+ l([
1615
+ a({ type: Number })
1616
+ ], n.prototype, "totalNumberRows", 2);
1617
+ l([
1618
+ a({ type: Number })
1619
+ ], n.prototype, "minFilterCharacters", 2);
1620
+ l([
1621
+ a({ type: Boolean })
1622
+ ], n.prototype, "localizeDate", 2);
1623
+ l([
1624
+ a({ type: Boolean })
1625
+ ], n.prototype, "rowsSelected", 2);
1626
+ l([
1627
+ a({ type: Boolean })
1628
+ ], n.prototype, "enableSettings", 2);
1629
+ l([
1630
+ a({ attribute: !1 })
1631
+ ], n.prototype, "onSettingsChanged", 2);
1632
+ l([
1633
+ a({ type: Function })
1634
+ ], n.prototype, "onRowClick", 2);
1635
+ l([
1636
+ a({ type: Function })
1637
+ ], n.prototype, "onRowsScrollEnd", 2);
1638
+ l([
1639
+ a({ type: Function })
1640
+ ], n.prototype, "onRowDoubleClick", 2);
1641
+ l([
1642
+ a({ type: Function })
1643
+ ], n.prototype, "rowDensityChange", 2);
1644
+ l([
1645
+ a({ type: Function })
1646
+ ], n.prototype, "exportExcelFn", 2);
1647
+ l([
1648
+ a({ type: Function })
1649
+ ], n.prototype, "exportCsvFn", 2);
1650
+ l([
1651
+ a({ type: Function })
1652
+ ], n.prototype, "getTotalNumberFn", 2);
1653
+ l([
1654
+ a({ type: Function })
1655
+ ], n.prototype, "onCellKeyDown", 2);
1656
+ l([
1657
+ a({ type: Function })
1658
+ ], n.prototype, "getRowId", 2);
1659
+ l([
1660
+ a({ type: Function })
1661
+ ], n.prototype, "onColumnResize", 2);
1662
+ l([
1663
+ a({ type: Boolean })
1664
+ ], n.prototype, "onColumnFiltersChanged", 2);
1665
+ l([
1666
+ a({ type: Boolean })
1667
+ ], n.prototype, "onColumnSortChanged", 2);
1668
+ l([
1669
+ a({ type: Function })
1670
+ ], n.prototype, "onRowSelectionChanged", 2);
1671
+ l([
1672
+ a({ type: Function })
1673
+ ], n.prototype, "onColumnOrderChanged", 2);
1674
+ l([
1675
+ a({ type: Boolean })
1676
+ ], n.prototype, "hideFooter", 2);
1677
+ l([
1678
+ a({ type: Object })
1679
+ ], n.prototype, "columnVisibility", 2);
1680
+ l([
1681
+ a({ type: Function })
1682
+ ], n.prototype, "onColumnVisibilityChanged", 2);
1683
+ l([
1684
+ a({ type: Function })
1685
+ ], n.prototype, "onMouseDown", 2);
1686
+ l([
1687
+ a({ type: Function })
1688
+ ], n.prototype, "onRowFocusChanged", 2);
1689
+ l([
1690
+ a({ type: Number })
1691
+ ], n.prototype, "focusedRowIndex", 2);
1692
+ l([
1693
+ a({ type: Boolean })
1694
+ ], n.prototype, "autoFocus", 2);
1695
+ l([
1696
+ z()
1697
+ ], n.prototype, "rowsCount", 2);
1698
+ l([
1699
+ z()
1700
+ ], n.prototype, "isScrollable", 2);
1701
+ l([
1702
+ z()
1703
+ ], n.prototype, "disableScrollLeft", 2);
1704
+ l([
1705
+ z()
1706
+ ], n.prototype, "disableScrollRight", 2);
1707
+ l([
1708
+ z()
1709
+ ], n.prototype, "columnOrder", 2);
1710
+ l([
1711
+ z()
1712
+ ], n.prototype, "table", 2);
1713
+ l([
1714
+ z()
1715
+ ], n.prototype, "isOpen", 2);
1716
+ l([
1717
+ z()
1718
+ ], n.prototype, "filterText", 2);
1719
+ l([
1720
+ z()
1721
+ ], n.prototype, "isOpenModal", 2);
1722
+ l([
1723
+ Q("tbody")
1724
+ ], n.prototype, "tableBody", 2);
1725
+ l([
1726
+ Q(".grid")
1727
+ ], n.prototype, "_container", 2);
1728
+ n = l([
1729
+ ot("lit-data-grid-tanstack")
1730
+ ], n);
1731
+ export {
1732
+ n as LitDataGridTanstack
1733
+ };