overview-components 1.0.93 → 1.0.96
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.
- package/dist/_virtual/FileSaver.min.js +4 -0
- package/dist/_virtual/___vite-browser-external.js +6 -0
- package/dist/_virtual/__vite-browser-external.js +4 -0
- package/dist/_virtual/_commonjs-dynamic-modules.js +6 -0
- package/dist/_virtual/_commonjsHelpers.js +28 -0
- package/dist/_virtual/lodash.js +4 -0
- package/dist/_virtual/pdf.js +4 -0
- package/dist/assets/generated/locales/de.js +72 -70
- package/dist/assets/generated/locales/en.js +72 -70
- package/dist/assets/generated/locales/fr.js +72 -70
- package/dist/assets/generated/locales/hr.js +72 -70
- package/dist/assets/generated/locales/it.js +72 -70
- package/dist/assets/generated/locales/pl.js +72 -70
- package/dist/assets/generated/locales/ro.js +72 -70
- package/dist/assets/generated/locales/sk.js +72 -70
- package/dist/assets/generated/locales/sr.js +72 -70
- package/dist/components/lit-attachments-tab.js +271 -432
- package/dist/components/lit-badge.js +40 -40
- package/dist/components/lit-case-variables-tab.js +382 -497
- package/dist/components/lit-chart.js +378 -406
- package/dist/components/lit-data-grid-tanstack.js +1150 -1663
- package/dist/components/lit-filter-modal.js +198 -230
- package/dist/components/lit-multiselect-item.js +301 -477
- package/dist/components/lit-section-tab.js +73 -85
- package/dist/components/lit-tabs-overview.js +191 -232
- package/dist/components/react-wrappers/attachments-tab.js +13 -8
- package/dist/components/react-wrappers/badge.js +13 -8
- package/dist/components/react-wrappers/button.js +13 -8
- package/dist/components/react-wrappers/case-variables-tab.js +13 -8
- package/dist/components/react-wrappers/chart.js +13 -8
- package/dist/components/react-wrappers/data-grid-tanstack.js +13 -8
- package/dist/components/react-wrappers/filter-modal.js +13 -8
- package/dist/components/react-wrappers/progress-bar.js +13 -8
- package/dist/components/react-wrappers/section-tab.js +13 -8
- package/dist/components/react-wrappers/tabs-overview.js +13 -8
- package/dist/index.js +42 -43
- package/dist/libs/xlsx.mini.min.js +10 -0
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +432 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +306 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +127 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +127 -0
- package/dist/node_modules/@kurkle/color/dist/color.esm.js +448 -0
- package/dist/node_modules/@lit/localize/init/install.js +11 -0
- package/dist/node_modules/@lit/localize/init/runtime.js +42 -0
- package/dist/node_modules/@lit/localize/internal/default-msg.js +10 -0
- package/dist/node_modules/@lit/localize/internal/deferred.js +21 -0
- package/dist/node_modules/@lit/localize/internal/fnv1a64.js +17 -0
- package/dist/node_modules/@lit/localize/internal/id-generation.js +14 -0
- package/dist/node_modules/@lit/localize/internal/locale-status-event.js +9 -0
- package/dist/node_modules/@lit/localize/internal/runtime-msg.js +42 -0
- package/dist/node_modules/@lit/localize/internal/str-tag.js +15 -0
- package/dist/node_modules/@lit/react/create-component.js +35 -0
- package/dist/node_modules/@lit/reactive-element/css-tag.js +50 -0
- package/dist/node_modules/@lit/reactive-element/decorators/base.js +9 -0
- package/dist/node_modules/@lit/reactive-element/decorators/custom-element.js +13 -0
- package/dist/node_modules/@lit/reactive-element/decorators/property.js +37 -0
- package/dist/node_modules/@lit/reactive-element/decorators/query.js +20 -0
- package/dist/node_modules/@lit/reactive-element/decorators/state.js +12 -0
- package/dist/node_modules/@lit/reactive-element/reactive-element.js +250 -0
- package/dist/node_modules/@tanstack/lit-table/build/lib/index.js +104 -0
- package/dist/node_modules/@tanstack/lit-virtual/dist/esm/index.js +40 -0
- package/dist/node_modules/@tanstack/table-core/build/lib/index.js +1956 -0
- package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +490 -0
- package/dist/node_modules/@tanstack/virtual-core/dist/esm/utils.js +52 -0
- package/dist/node_modules/chart.js/dist/chart.js +7122 -0
- package/dist/node_modules/chart.js/dist/chunks/helpers.segment.js +1691 -0
- package/dist/node_modules/file-saver/dist/FileSaver.min.js +74 -0
- package/dist/node_modules/lit-element/lit-element.js +51 -0
- package/dist/node_modules/lit-html/async-directive.js +69 -0
- package/dist/node_modules/lit-html/directive-helpers.js +45 -0
- package/dist/node_modules/lit-html/directive.js +27 -0
- package/dist/node_modules/lit-html/directives/ref.js +42 -0
- package/dist/node_modules/lit-html/directives/repeat.js +61 -0
- package/dist/node_modules/lit-html/directives/style-map.js +36 -0
- package/dist/node_modules/lit-html/directives/unsafe-html.js +27 -0
- package/dist/node_modules/lit-html/lit-html.js +243 -0
- package/dist/node_modules/lodash/lodash.js +3678 -0
- package/dist/node_modules/luxon/src/datetime.js +1793 -0
- package/dist/node_modules/luxon/src/duration.js +723 -0
- package/dist/node_modules/luxon/src/errors.js +40 -0
- package/dist/node_modules/luxon/src/impl/conversions.js +92 -0
- package/dist/node_modules/luxon/src/impl/diff.js +36 -0
- package/dist/node_modules/luxon/src/impl/digits.js +74 -0
- package/dist/node_modules/luxon/src/impl/english.js +138 -0
- package/dist/node_modules/luxon/src/impl/formats.js +150 -0
- package/dist/node_modules/luxon/src/impl/formatter.js +245 -0
- package/dist/node_modules/luxon/src/impl/invalid.js +11 -0
- package/dist/node_modules/luxon/src/impl/locale.js +282 -0
- package/dist/node_modules/luxon/src/impl/regexParser.js +202 -0
- package/dist/node_modules/luxon/src/impl/tokenParser.js +329 -0
- package/dist/node_modules/luxon/src/impl/util.js +206 -0
- package/dist/node_modules/luxon/src/impl/zoneUtil.js +19 -0
- package/dist/node_modules/luxon/src/info.js +180 -0
- package/dist/node_modules/luxon/src/interval.js +466 -0
- package/dist/node_modules/luxon/src/settings.js +150 -0
- package/dist/node_modules/luxon/src/zone.js +88 -0
- package/dist/node_modules/luxon/src/zones/IANAZone.js +178 -0
- package/dist/node_modules/luxon/src/zones/fixedOffsetZone.js +125 -0
- package/dist/node_modules/luxon/src/zones/invalidZone.js +41 -0
- package/dist/node_modules/luxon/src/zones/systemZone.js +47 -0
- package/dist/node_modules/pdfjs-dist/build/pdf.js +10310 -0
- package/dist/node_modules/sortablejs/modular/sortable.esm.js +1261 -0
- package/dist/shared/lit-button.js +66 -80
- package/dist/shared/lit-progress-bar.js +35 -33
- package/dist/shared/simple-tooltip.js +124 -198
- package/dist/shared/styles/button-shared-styles.js +8 -4
- package/dist/utils/currency.js +12 -15
- package/dist/utils/custom-filters.js +46 -80
- package/dist/utils/date.js +14 -21
- package/dist/utils/getOperatorByType.js +51 -65
- package/dist/utils/localization.js +29 -431
- package/dist/vite.svg +1 -0
- package/package.json +76 -74
- package/dist/assets/generated/locales/de.js.map +0 -1
- package/dist/assets/generated/locales/en.js.map +0 -1
- package/dist/assets/generated/locales/fr.js.map +0 -1
- package/dist/assets/generated/locales/hr.js.map +0 -1
- package/dist/assets/generated/locales/it.js.map +0 -1
- package/dist/assets/generated/locales/pl.js.map +0 -1
- package/dist/assets/generated/locales/ro.js.map +0 -1
- package/dist/assets/generated/locales/sk.js.map +0 -1
- package/dist/assets/generated/locales/sr.js.map +0 -1
- package/dist/assets/icons/iconGlyphs.js +0 -679
- package/dist/assets/icons/iconGlyphs.js.map +0 -1
- package/dist/assets/illustration/delete-illustration.js +0 -96
- package/dist/assets/illustration/delete-illustration.js.map +0 -1
- package/dist/assets/illustration/no-content.js +0 -167
- package/dist/assets/illustration/no-content.js.map +0 -1
- package/dist/assets/illustration/no-preview.js +0 -133
- package/dist/assets/illustration/no-preview.js.map +0 -1
- package/dist/assets/illustration/not-found.js +0 -106
- package/dist/assets/illustration/not-found.js.map +0 -1
- package/dist/assets/illustration/settings-illustration.js +0 -176
- package/dist/assets/illustration/settings-illustration.js.map +0 -1
- package/dist/components/components-settings/attachments-tab-settings.js +0 -226
- package/dist/components/components-settings/attachments-tab-settings.js.map +0 -1
- package/dist/components/components-settings/data-grid-settings.js +0 -318
- package/dist/components/components-settings/data-grid-settings.js.map +0 -1
- package/dist/components/components-settings/section-tab-settings.js +0 -269
- package/dist/components/components-settings/section-tab-settings.js.map +0 -1
- package/dist/components/components-settings/tabs-overview-settings.js +0 -439
- package/dist/components/components-settings/tabs-overview-settings.js.map +0 -1
- package/dist/components/lit-attachments-tab.js.map +0 -1
- package/dist/components/lit-badge.js.map +0 -1
- package/dist/components/lit-case-variables-tab.js.map +0 -1
- package/dist/components/lit-chart.js.map +0 -1
- package/dist/components/lit-data-grid-tanstack.js.map +0 -1
- package/dist/components/lit-filter-modal.js.map +0 -1
- package/dist/components/lit-multiselect-item.js.map +0 -1
- package/dist/components/lit-section-tab.js.map +0 -1
- package/dist/components/lit-tabs-overview.js.map +0 -1
- package/dist/components/modals/lit-confirm-modal.js +0 -120
- package/dist/components/modals/lit-confirm-modal.js.map +0 -1
- package/dist/components/modals/lit-delete-modal.js +0 -128
- package/dist/components/modals/lit-delete-modal.js.map +0 -1
- package/dist/components/react-wrappers/attachments-tab.js.map +0 -1
- package/dist/components/react-wrappers/badge.js.map +0 -1
- package/dist/components/react-wrappers/button.js.map +0 -1
- package/dist/components/react-wrappers/case-variables-tab.js.map +0 -1
- package/dist/components/react-wrappers/chart.js.map +0 -1
- package/dist/components/react-wrappers/data-grid-tanstack.js.map +0 -1
- package/dist/components/react-wrappers/filter-modal.js.map +0 -1
- package/dist/components/react-wrappers/progress-bar.js.map +0 -1
- package/dist/components/react-wrappers/section-tab.js.map +0 -1
- package/dist/components/react-wrappers/tabs-overview.js.map +0 -1
- package/dist/data/translations.js +0 -2763
- package/dist/data/translations.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/schemas/index.js +0 -17
- package/dist/schemas/index.js.map +0 -1
- package/dist/schemas/lit-attachments-tab-document.schema.js +0 -20
- package/dist/schemas/lit-attachments-tab-document.schema.js.map +0 -1
- package/dist/schemas/lit-attachments-tab-settings-value.schema.js +0 -15
- package/dist/schemas/lit-attachments-tab-settings-value.schema.js.map +0 -1
- package/dist/schemas/lit-attachments-tab.schema.js +0 -32
- package/dist/schemas/lit-attachments-tab.schema.js.map +0 -1
- package/dist/schemas/lit-case-variables-tab-cell.schema.js +0 -43
- package/dist/schemas/lit-case-variables-tab-cell.schema.js.map +0 -1
- package/dist/schemas/lit-case-variables-tab-rows.schema.js +0 -6
- package/dist/schemas/lit-case-variables-tab-rows.schema.js.map +0 -1
- package/dist/schemas/lit-case-variables-tab.schema.js +0 -24
- package/dist/schemas/lit-case-variables-tab.schema.js.map +0 -1
- package/dist/schemas/lit-data-grid-tanstack-column-array.schema.js +0 -6
- package/dist/schemas/lit-data-grid-tanstack-column-array.schema.js.map +0 -1
- package/dist/schemas/lit-data-grid-tanstack-column-custom-filter-array.schema.js +0 -6
- package/dist/schemas/lit-data-grid-tanstack-column-custom-filter-array.schema.js.map +0 -1
- package/dist/schemas/lit-data-grid-tanstack-column-custom-filter.schema.js +0 -11
- package/dist/schemas/lit-data-grid-tanstack-column-custom-filter.schema.js.map +0 -1
- package/dist/schemas/lit-data-grid-tanstack-column.schema.js +0 -55
- package/dist/schemas/lit-data-grid-tanstack-column.schema.js.map +0 -1
- package/dist/schemas/lit-data-grid-tanstack.schema.js +0 -99
- package/dist/schemas/lit-data-grid-tanstack.schema.js.map +0 -1
- package/dist/schemas/lit-section-tab-schema.js +0 -24
- package/dist/schemas/lit-section-tab-schema.js.map +0 -1
- package/dist/schemas/lit-tabs-overview-tab-array.schema.js +0 -6
- package/dist/schemas/lit-tabs-overview-tab-array.schema.js.map +0 -1
- package/dist/schemas/lit-tabs-overview-tab.schema.js +0 -32
- package/dist/schemas/lit-tabs-overview-tab.schema.js.map +0 -1
- package/dist/schemas/lit-tabs-overview.schema.js +0 -29
- package/dist/schemas/lit-tabs-overview.schema.js.map +0 -1
- package/dist/scripts/translate-locales.js +0 -69
- package/dist/scripts/translate-locales.js.map +0 -1
- package/dist/shared/filter-inputs.js +0 -427
- package/dist/shared/filter-inputs.js.map +0 -1
- package/dist/shared/lit-button.js.map +0 -1
- package/dist/shared/lit-case-variables-tab-cell.js +0 -226
- package/dist/shared/lit-case-variables-tab-cell.js.map +0 -1
- package/dist/shared/lit-checkbox.js +0 -171
- package/dist/shared/lit-checkbox.js.map +0 -1
- package/dist/shared/lit-custom-popper.js +0 -117
- package/dist/shared/lit-custom-popper.js.map +0 -1
- package/dist/shared/lit-data-grid-action-buttons-popover.js +0 -295
- package/dist/shared/lit-data-grid-action-buttons-popover.js.map +0 -1
- package/dist/shared/lit-data-grid-density-popover.js +0 -84
- package/dist/shared/lit-data-grid-density-popover.js.map +0 -1
- package/dist/shared/lit-data-grid-export-popover.js +0 -68
- package/dist/shared/lit-data-grid-export-popover.js.map +0 -1
- package/dist/shared/lit-data-grid-operators-popover.js +0 -114
- package/dist/shared/lit-data-grid-operators-popover.js.map +0 -1
- package/dist/shared/lit-data-grid-row-actions.js +0 -76
- package/dist/shared/lit-data-grid-row-actions.js.map +0 -1
- package/dist/shared/lit-date-picker.js +0 -606
- package/dist/shared/lit-date-picker.js.map +0 -1
- package/dist/shared/lit-icon-button.js +0 -105
- package/dist/shared/lit-icon-button.js.map +0 -1
- package/dist/shared/lit-icon.js +0 -284
- package/dist/shared/lit-icon.js.map +0 -1
- package/dist/shared/lit-input.js +0 -239
- package/dist/shared/lit-input.js.map +0 -1
- package/dist/shared/lit-label.js +0 -104
- package/dist/shared/lit-label.js.map +0 -1
- package/dist/shared/lit-loader.js +0 -69
- package/dist/shared/lit-loader.js.map +0 -1
- package/dist/shared/lit-loading-bar.js +0 -127
- package/dist/shared/lit-loading-bar.js.map +0 -1
- package/dist/shared/lit-menu-item.js +0 -99
- package/dist/shared/lit-menu-item.js.map +0 -1
- package/dist/shared/lit-menu.js +0 -42
- package/dist/shared/lit-menu.js.map +0 -1
- package/dist/shared/lit-modal-body.js +0 -22
- package/dist/shared/lit-modal-body.js.map +0 -1
- package/dist/shared/lit-modal-footer.js +0 -29
- package/dist/shared/lit-modal-footer.js.map +0 -1
- package/dist/shared/lit-modal-header.js +0 -36
- package/dist/shared/lit-modal-header.js.map +0 -1
- package/dist/shared/lit-modal.js +0 -169
- package/dist/shared/lit-modal.js.map +0 -1
- package/dist/shared/lit-overflow-tooltip.js +0 -103
- package/dist/shared/lit-overflow-tooltip.js.map +0 -1
- package/dist/shared/lit-pill.js +0 -88
- package/dist/shared/lit-pill.js.map +0 -1
- package/dist/shared/lit-progress-bar.js.map +0 -1
- package/dist/shared/lit-responsive-button.js +0 -94
- package/dist/shared/lit-responsive-button.js.map +0 -1
- package/dist/shared/lit-select-field.js +0 -459
- package/dist/shared/lit-select-field.js.map +0 -1
- package/dist/shared/lit-select.js +0 -413
- package/dist/shared/lit-select.js.map +0 -1
- package/dist/shared/lit-settings.js +0 -77
- package/dist/shared/lit-settings.js.map +0 -1
- package/dist/shared/lit-text-field.js +0 -222
- package/dist/shared/lit-text-field.js.map +0 -1
- package/dist/shared/lit-toggle.js +0 -222
- package/dist/shared/lit-toggle.js.map +0 -1
- package/dist/shared/lit-tooltip.js +0 -166
- package/dist/shared/lit-tooltip.js.map +0 -1
- package/dist/shared/simple-popper.js +0 -266
- package/dist/shared/simple-popper.js.map +0 -1
- package/dist/shared/simple-tooltip.js.map +0 -1
- package/dist/shared/styles/button-shared-styles.js.map +0 -1
- package/dist/styles.js +0 -169
- package/dist/styles.js.map +0 -1
- package/dist/utils/currency.js.map +0 -1
- package/dist/utils/custom-filters.js.map +0 -1
- package/dist/utils/date.js.map +0 -1
- package/dist/utils/getOperatorByType.js.map +0 -1
- package/dist/utils/getOverviewValue.js +0 -177
- package/dist/utils/getOverviewValue.js.map +0 -1
- package/dist/utils/localization.js.map +0 -1
- package/dist/utils/utils.js +0 -13
- package/dist/utils/utils.js.map +0 -1
- package/dist/utils/validate-json-schema.js +0 -8
- package/dist/utils/validate-json-schema.js.map +0 -1
- package/dist/validators/validator.js +0 -7
- package/dist/validators/validator.js.map +0 -1
|
@@ -1,1061 +1,676 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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;
|
|
6
29
|
};
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
this.
|
|
48
|
-
|
|
49
|
-
this.enableGrouping = true;
|
|
50
|
-
this.enablePinning = true;
|
|
51
|
-
this.exportData = true;
|
|
52
|
-
this.actionButtonsInMenu = false;
|
|
53
|
-
this.id = '';
|
|
54
|
-
this.initialSorting = [];
|
|
55
|
-
this.initialRowExpanded = {};
|
|
56
|
-
this.columnSizing = {};
|
|
57
|
-
this.leftPinnedColumns = [];
|
|
58
|
-
this.rightPinnedColumns = [];
|
|
59
|
-
this.enableFiltering = true;
|
|
60
|
-
this.enableSorting = true;
|
|
61
|
-
this.userLang = 'cs';
|
|
62
|
-
this.dateFormat = null;
|
|
63
|
-
this.isLoading = false;
|
|
64
|
-
this.enableRowSelection = false;
|
|
65
|
-
this.initialFiltering = [];
|
|
66
|
-
this.server = false;
|
|
67
|
-
this.scrollEndThreshold = 100;
|
|
68
|
-
this.rowDensity = 'standard';
|
|
69
|
-
this.enableMultiRowSelection = false;
|
|
70
|
-
this.minFilterCharacters = 3;
|
|
71
|
-
this.localizeDate = true;
|
|
72
|
-
this.rowsSelected = {};
|
|
73
|
-
this.enableSettings = false;
|
|
74
|
-
this.onSettingsChanged = () => { };
|
|
75
|
-
this.onCellKeyDown = (event, row) => { };
|
|
76
|
-
this.onColumnResize = () => { };
|
|
77
|
-
this.onColumnFiltersChanged = (table, filterModel) => { };
|
|
78
|
-
this.onColumnSortChanged = (table, sortModel) => { };
|
|
79
|
-
this.onRowSelectionChanged = (table, selectedRows) => { };
|
|
80
|
-
this.onColumnOrderChanged = (table, columnOrder) => { };
|
|
81
|
-
this.hideFooter = false;
|
|
82
|
-
this.columnVisibility = {};
|
|
83
|
-
this.onColumnVisibilityChanged = (table, columnVisibility) => { };
|
|
84
|
-
this.onMouseDown = (e, row) => { };
|
|
85
|
-
this.onRowFocusChanged = (table, rowIndex) => { };
|
|
86
|
-
this.focusedRowIndex = null;
|
|
87
|
-
this.autoFocus = false;
|
|
88
|
-
this.rowsCount = 0;
|
|
89
|
-
this.isScrollable = false;
|
|
90
|
-
this.disableScrollLeft = true;
|
|
91
|
-
this.disableScrollRight = false;
|
|
92
|
-
this.columnOrder = [];
|
|
93
|
-
this.isOpen = false;
|
|
94
|
-
this.filterText = '';
|
|
95
|
-
this.isOpenModal = false;
|
|
96
|
-
this.scrollToEnd = false;
|
|
97
|
-
this.tableContainerRef = createRef();
|
|
98
|
-
this.scrollInterval = null;
|
|
99
|
-
this.currentScrollTop = 0;
|
|
100
|
-
this.lastSelectedIndex = null;
|
|
101
|
-
this.getCellBackgroundColor = (cell) => {
|
|
102
|
-
if (cell.getIsGrouped()) {
|
|
103
|
-
return this.columnGroupedColor ?? `var(--color-primary-light, #f0fadf)`;
|
|
104
|
-
}
|
|
105
|
-
if (cell.getIsAggregated()) {
|
|
106
|
-
return this.rowAggregationColor ?? `var(--color-warning-light, #ffe1a8)`;
|
|
107
|
-
}
|
|
108
|
-
if (cell.getIsPlaceholder()) {
|
|
109
|
-
return `var(--background-default, #eff3f4)`;
|
|
110
|
-
}
|
|
111
|
-
if (cell.column.getIsPinned()) {
|
|
112
|
-
return `var(--background-paper, #fff)`;
|
|
113
|
-
}
|
|
114
|
-
return 'transparent';
|
|
115
|
-
};
|
|
116
|
-
this.updateScrollState = () => {
|
|
117
|
-
const grid = this.tableContainerRef.value;
|
|
118
|
-
if (grid) {
|
|
119
|
-
const canScrollHorizontally = grid.scrollWidth > grid.clientWidth;
|
|
120
|
-
this.isScrollable = canScrollHorizontally;
|
|
121
|
-
this.disableScrollLeft = grid.scrollLeft === 0;
|
|
122
|
-
this.disableScrollRight = grid.scrollLeft + grid.clientWidth >= grid.scrollWidth;
|
|
123
|
-
this.currentScrollTop = grid.scrollTop;
|
|
124
|
-
}
|
|
125
|
-
};
|
|
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();
|
|
126
72
|
}
|
|
127
|
-
|
|
128
|
-
|
|
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
|
+
});
|
|
129
79
|
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
this.
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
const grid = this.tableContainerRef.value;
|
|
174
|
-
if (grid) {
|
|
175
|
-
grid.addEventListener('scroll', this.updateScrollState);
|
|
176
|
-
}
|
|
177
|
-
this.updateScrollState();
|
|
178
|
-
this.initSortable();
|
|
179
|
-
this._container.addEventListener('scroll', this.handleScroll.bind(this));
|
|
180
|
-
// focus row by index
|
|
181
|
-
if (this.autoFocus) {
|
|
182
|
-
setTimeout(() => {
|
|
183
|
-
if (this.focusedRowIndex !== null && this.focusedRowIndex !== undefined) {
|
|
184
|
-
this.focusRow?.(this.focusedRowIndex);
|
|
185
|
-
}
|
|
186
|
-
else {
|
|
187
|
-
// first selected row if exists
|
|
188
|
-
const selectedRows = this.table.getSelectedRowModel().rows;
|
|
189
|
-
if (selectedRows.length > 0) {
|
|
190
|
-
this.focusRow?.(selectedRows[0].index);
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
}, 0);
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
toggleModal() {
|
|
197
|
-
this.isOpenModal = !this.isOpenModal;
|
|
198
|
-
}
|
|
199
|
-
async initSortable() {
|
|
200
|
-
if (!this.enableColumnOrdering)
|
|
201
|
-
return;
|
|
202
|
-
const headerRow = this.shadowRoot?.querySelector('thead tr.head');
|
|
203
|
-
if (!headerRow)
|
|
204
|
-
return;
|
|
205
|
-
Sortable.create(headerRow, {
|
|
206
|
-
animation: 150,
|
|
207
|
-
direction: 'horizontal',
|
|
208
|
-
handle: '.drag-handle',
|
|
209
|
-
filter: 'th[data-index="checkbox"], th[data-index="actions"]',
|
|
210
|
-
preventOnFilter: false,
|
|
211
|
-
onMove: (evt) => {
|
|
212
|
-
const dragged = evt.dragged.getAttribute('data-index');
|
|
213
|
-
const target = evt.related.getAttribute('data-index');
|
|
214
|
-
const disallowed = ['checkbox', 'actions'];
|
|
215
|
-
if (disallowed.includes(dragged) || disallowed.includes(target)) {
|
|
216
|
-
return false;
|
|
217
|
-
}
|
|
218
|
-
const headers = this.table.getHeaderGroups()[0].headers;
|
|
219
|
-
const draggedHeader = headers.find((header) => header.id === dragged);
|
|
220
|
-
const targetHeader = headers.find((header) => header.id === target);
|
|
221
|
-
if (!draggedHeader || !targetHeader)
|
|
222
|
-
return false;
|
|
223
|
-
const isDraggedPinned = draggedHeader.column.getIsPinned?.();
|
|
224
|
-
const isTargetPinned = targetHeader.column.getIsPinned?.();
|
|
225
|
-
const isDraggedGrouped = draggedHeader.column.getIsGrouped?.();
|
|
226
|
-
const isTargetGrouped = targetHeader.column.getIsGrouped?.();
|
|
227
|
-
return !(isDraggedPinned || isTargetPinned || isDraggedGrouped || isTargetGrouped);
|
|
228
|
-
},
|
|
229
|
-
onEnd: () => {
|
|
230
|
-
const newOrder = Array.from(headerRow.querySelectorAll('th'))
|
|
231
|
-
.map((th) => th.getAttribute('data-index'))
|
|
232
|
-
.filter((id) => {
|
|
233
|
-
if (!id || id === 'checkbox' || id === 'actions')
|
|
234
|
-
return false;
|
|
235
|
-
const header = this.table
|
|
236
|
-
.getHeaderGroups()[0]
|
|
237
|
-
.headers.find((h) => h.id === id);
|
|
238
|
-
if (!header)
|
|
239
|
-
return false;
|
|
240
|
-
return !header.column.getIsPinned?.() && !header.column.getIsGrouped?.();
|
|
241
|
-
});
|
|
242
|
-
this.table.setColumnOrder(newOrder);
|
|
243
|
-
},
|
|
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;
|
|
244
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;
|
|
245
145
|
}
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
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";
|
|
255
157
|
}
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
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
|
+
}
|
|
268
244
|
}
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
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);
|
|
279
265
|
}
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
if (
|
|
284
|
-
|
|
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);
|
|
285
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
|
+
}
|
|
286
285
|
}
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
if (currentIndex === 0) {
|
|
324
|
-
const grid = this.shadowRoot?.querySelector('.grid');
|
|
325
|
-
if (grid) {
|
|
326
|
-
// Scroll na koniec (pravá strana)
|
|
327
|
-
grid.scrollLeft = grid.scrollWidth;
|
|
328
|
-
}
|
|
329
|
-
setTimeout(() => {
|
|
330
|
-
const filters = Array.from(this.shadowRoot?.querySelectorAll('filter-inputs') || []);
|
|
331
|
-
if (filters.length > 0) {
|
|
332
|
-
filters[filters.length - 1].focus();
|
|
333
|
-
}
|
|
334
|
-
}, 0);
|
|
335
|
-
return;
|
|
336
|
-
}
|
|
337
|
-
else {
|
|
338
|
-
nextIndex = currentIndex - 1;
|
|
339
|
-
}
|
|
340
|
-
}
|
|
341
|
-
// Nastav focus na ďalší filter podľa smeru
|
|
342
|
-
filterInputs[nextIndex].focus();
|
|
343
|
-
}
|
|
344
|
-
// virtualization
|
|
345
|
-
initRowVirtualizer() {
|
|
346
|
-
this.rowVirtualizerController = new VirtualizerController(this, {
|
|
347
|
-
count: this.table?.getRowModel()?.rows.length || this.row?.length || 1,
|
|
348
|
-
getScrollElement: () => this.tableContainerRef.value,
|
|
349
|
-
estimateSize: () => this.getRowHeight(),
|
|
350
|
-
overscan: 5,
|
|
351
|
-
initialOffset: this.currentScrollTop,
|
|
352
|
-
enabled: this.enableRowVirtualization,
|
|
353
|
-
});
|
|
354
|
-
}
|
|
355
|
-
initTable() {
|
|
356
|
-
this.tableController = new TableController(this);
|
|
357
|
-
}
|
|
358
|
-
initColumnVirtualizer() {
|
|
359
|
-
this.columnVirtualizerController = new VirtualizerController(this, {
|
|
360
|
-
horizontal: true,
|
|
361
|
-
count: this.table?.getVisibleLeafColumns().length || this.columns.length || 1,
|
|
362
|
-
getScrollElement: () => this.tableContainerRef.value,
|
|
363
|
-
estimateSize: (index) => this.table.getVisibleLeafColumns()[index]?.getSize() || 200,
|
|
364
|
-
overscan: 5,
|
|
365
|
-
enabled: this.enableColumnVirtualization,
|
|
366
|
-
});
|
|
367
|
-
}
|
|
368
|
-
handleRowClick(event, row) {
|
|
369
|
-
this.onRowClick?.(event, this.table, row);
|
|
370
|
-
this.onRowFocusChanged?.(this.table, row.index);
|
|
371
|
-
const isShift = event.shiftKey;
|
|
372
|
-
const isCtrlOrMeta = event.ctrlKey || event.metaKey;
|
|
373
|
-
if (this.enableRowSelection && row.getCanSelect() && (isCtrlOrMeta || isShift)) {
|
|
374
|
-
const { rows } = this.table.getRowModel();
|
|
375
|
-
if (this.enableMultiRowSelection &&
|
|
376
|
-
isShift &&
|
|
377
|
-
this.focusedRowIndex !== null &&
|
|
378
|
-
this.focusedRowIndex !== undefined) {
|
|
379
|
-
const [start, end] = [
|
|
380
|
-
Math.min(this.focusedRowIndex, row.index),
|
|
381
|
-
Math.max(this.focusedRowIndex, row.index),
|
|
382
|
-
];
|
|
383
|
-
const ids = rows.slice(start, end + 1).map((r) => r.id);
|
|
384
|
-
const selected = { ...this.rowsSelected };
|
|
385
|
-
ids.forEach((id) => (selected[id] = true));
|
|
386
|
-
this.table.setRowSelection(selected);
|
|
387
|
-
}
|
|
388
|
-
else if (isCtrlOrMeta && this.enableMultiRowSelection) {
|
|
389
|
-
// Ctrl/Cmd+Click: toggle row selection
|
|
390
|
-
const selected = { ...this.rowsSelected };
|
|
391
|
-
if (selected[row.id]) {
|
|
392
|
-
delete selected[row.id];
|
|
393
|
-
}
|
|
394
|
-
else {
|
|
395
|
-
selected[row.id] = true;
|
|
396
|
-
}
|
|
397
|
-
this.table.setRowSelection(selected);
|
|
398
|
-
}
|
|
399
|
-
else {
|
|
400
|
-
// Single click: select only this row
|
|
401
|
-
const selected = { [row.id]: true };
|
|
402
|
-
this.table.setRowSelection(selected);
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
this.focusedRowIndex = row.index;
|
|
406
|
-
}
|
|
407
|
-
handleRowDoubleClick(row) {
|
|
408
|
-
if (this.onRowDoubleClick) {
|
|
409
|
-
this.onRowDoubleClick(this.table, row);
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
handleKeyDown(e) {
|
|
413
|
-
const rows = this.table.getRowModel().rows;
|
|
414
|
-
if (!rows.length)
|
|
415
|
-
return;
|
|
416
|
-
let index = this.focusedRowIndex ?? rows.findIndex((row) => this.rowsSelected[row.id]);
|
|
417
|
-
if (this.enableRowSelection) {
|
|
418
|
-
if (index === -1)
|
|
419
|
-
index = 0;
|
|
420
|
-
if (e.key === 'ArrowDown' && e.shiftKey && this.enableMultiRowSelection) {
|
|
421
|
-
e.preventDefault();
|
|
422
|
-
const nextIndex = index + 1;
|
|
423
|
-
if (nextIndex < rows.length) {
|
|
424
|
-
const nextRowId = rows[nextIndex].id;
|
|
425
|
-
this.table.setRowSelection((prev) => ({
|
|
426
|
-
...prev,
|
|
427
|
-
[nextRowId]: !prev[nextRowId],
|
|
428
|
-
}));
|
|
429
|
-
this.focusRow(nextIndex);
|
|
430
|
-
}
|
|
431
|
-
}
|
|
432
|
-
else if (e.key === 'ArrowUp' && e.shiftKey && this.enableMultiRowSelection) {
|
|
433
|
-
e.preventDefault();
|
|
434
|
-
const prevIndex = index - 1;
|
|
435
|
-
if (prevIndex >= 0) {
|
|
436
|
-
const prevRowId = rows[prevIndex].id;
|
|
437
|
-
this.table.setRowSelection((prev) => ({
|
|
438
|
-
...prev,
|
|
439
|
-
[prevRowId]: !prev[prevRowId],
|
|
440
|
-
}));
|
|
441
|
-
this.focusRow(prevIndex);
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
|
-
else if (e.key === 'ArrowDown' && index < rows.length - 1) {
|
|
445
|
-
e.preventDefault();
|
|
446
|
-
const nextIndex = index + 1;
|
|
447
|
-
this.focusRow(nextIndex);
|
|
448
|
-
}
|
|
449
|
-
else if (e.key === 'ArrowUp' && index > 0) {
|
|
450
|
-
e.preventDefault();
|
|
451
|
-
const prevIndex = index - 1;
|
|
452
|
-
this.focusRow(prevIndex);
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
this.onCellKeyDown?.(e, rows[index]);
|
|
456
|
-
}
|
|
457
|
-
focusRow(index) {
|
|
458
|
-
const rowIndex = index ?? this.focusedRowIndex;
|
|
459
|
-
// Scroll to the row using virtualizer if available
|
|
460
|
-
this.rowVirtualizerController
|
|
461
|
-
?.getVirtualizer()
|
|
462
|
-
.scrollToIndex(rowIndex ?? 0, { align: 'auto' });
|
|
463
|
-
setTimeout(() => {
|
|
464
|
-
const row = this.shadowRoot?.querySelector(`[data-row-index="${rowIndex}"]`);
|
|
465
|
-
// Find the row element in the shadow DOM
|
|
466
|
-
if (this.enableRowVirtualization) {
|
|
467
|
-
if (row) {
|
|
468
|
-
setTimeout(() => {
|
|
469
|
-
row.focus();
|
|
470
|
-
}, 0);
|
|
471
|
-
}
|
|
472
|
-
}
|
|
473
|
-
else {
|
|
474
|
-
if (row) {
|
|
475
|
-
row.focus();
|
|
476
|
-
row.scrollIntoView({ block: 'nearest' });
|
|
477
|
-
}
|
|
478
|
-
}
|
|
479
|
-
}, 100);
|
|
480
|
-
this.onRowFocusChanged?.(this.table, rowIndex);
|
|
481
|
-
this.focusedRowIndex = rowIndex;
|
|
482
|
-
}
|
|
483
|
-
getTanstackColumns(columns) {
|
|
484
|
-
return columns.map((column) => {
|
|
485
|
-
return {
|
|
486
|
-
id: column.field,
|
|
487
|
-
accessorKey: column.field,
|
|
488
|
-
accessorFn: (originalRow) => (column.type === 'date' ||
|
|
489
|
-
column.type === 'dateTime' ||
|
|
490
|
-
column.type === 'dateTimeRange' ||
|
|
491
|
-
column.type === 'dateRange') &&
|
|
492
|
-
!this.server &&
|
|
493
|
-
this.localizeDate
|
|
494
|
-
? column.accessorFn
|
|
495
|
-
? formatDate(column.accessorFn(originalRow), this.userLang || 'cs', column.type === 'date' || column.type === 'dateRange'
|
|
496
|
-
? undefined
|
|
497
|
-
: true, this.dateFormat)
|
|
498
|
-
: formatDate(originalRow[column.field], this.userLang || 'cs', column.type === 'date' || column.type === 'dateRange'
|
|
499
|
-
? undefined
|
|
500
|
-
: true, this.dateFormat)
|
|
501
|
-
: column.accessorFn
|
|
502
|
-
? column.accessorFn(originalRow)
|
|
503
|
-
: originalRow[column.field],
|
|
504
|
-
type: column.type,
|
|
505
|
-
header: column.headerName,
|
|
506
|
-
cell: (props) => {
|
|
507
|
-
const value = props.getValue();
|
|
508
|
-
if (column.type === 'actions') {
|
|
509
|
-
return html `
|
|
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`
|
|
510
322
|
<lit-data-grid-row-actions
|
|
511
|
-
.buttons=${
|
|
323
|
+
.buttons=${((s = e.getActions) == null ? void 0 : s.call(e, o)) || []}
|
|
512
324
|
></lit-data-grid-row-actions>
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
case 'dateTime':
|
|
536
|
-
return dateFilterFn;
|
|
537
|
-
case 'string':
|
|
538
|
-
default:
|
|
539
|
-
return filterFns.includesString;
|
|
540
|
-
}
|
|
541
|
-
})(),
|
|
542
|
-
enableSorting: column.enableSorting ?? true,
|
|
543
|
-
enableColumnFilter: this.enableFiltering && (column.enableFilter ?? true),
|
|
544
|
-
size: column.size || this.columnDefaultSize || undefined,
|
|
545
|
-
maxSize: column.maxSize || this.columnDefaultMaxSize || 500,
|
|
546
|
-
minSize: column.minSize || this.columnDefaultMinSize || 100,
|
|
547
|
-
meta: {
|
|
548
|
-
filterVariant: column.type ?? 'string',
|
|
549
|
-
valueOptions: column.valueOptions,
|
|
550
|
-
filterOperators: column.filterOperators,
|
|
551
|
-
},
|
|
552
|
-
aggregationFn: column.columnAggregation ?? undefined,
|
|
553
|
-
enableGrouping: column.enableGrouping ?? true,
|
|
554
|
-
sortDescFirst: column.sortDescFirst || true,
|
|
555
|
-
enableResizing: column.enableResizing ?? true,
|
|
556
|
-
enablePinning: this.enablePinning && (column.enablePinning ?? true),
|
|
557
|
-
aggregatedCell: (props) => {
|
|
558
|
-
const value = props.getValue();
|
|
559
|
-
return column.aggregatedCell
|
|
560
|
-
? column.aggregatedCell(props, html, unsafeHTML)
|
|
561
|
-
: value;
|
|
562
|
-
},
|
|
563
|
-
};
|
|
564
|
-
});
|
|
565
|
-
}
|
|
566
|
-
getCommonPinningStyles(column) {
|
|
567
|
-
const isPinned = column.getIsPinned();
|
|
568
|
-
if (!isPinned) {
|
|
569
|
-
return {};
|
|
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;
|
|
570
347
|
}
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
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;
|
|
582
393
|
}
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
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;
|
|
590
416
|
}
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
XLSX.writeFile(workbook, `${fileName}.xlsx`);
|
|
691
|
-
}
|
|
692
|
-
getAllRowsIncludingGrouped(rows) {
|
|
693
|
-
const allRows = [];
|
|
694
|
-
rows.forEach((row) => {
|
|
695
|
-
if (row.getIsGrouped?.()) {
|
|
696
|
-
allRows.push(row);
|
|
697
|
-
if (row.subRows && row.subRows.length > 0) {
|
|
698
|
-
allRows.push(...this.getAllRowsIncludingGrouped(row.subRows));
|
|
699
|
-
}
|
|
700
|
-
}
|
|
701
|
-
else {
|
|
702
|
-
allRows.push(row);
|
|
703
|
-
}
|
|
704
|
-
});
|
|
705
|
-
return allRows.filter((row, index, self) => index === self.findIndex((r) => r.id === row.id));
|
|
706
|
-
}
|
|
707
|
-
startScroll(direction) {
|
|
708
|
-
const grid = this.tableContainerRef.value;
|
|
709
|
-
if (!grid)
|
|
710
|
-
return;
|
|
711
|
-
const scrollAmount = direction === 'left' ? -15 : 15;
|
|
712
|
-
const scroll = () => {
|
|
713
|
-
grid.scrollLeft += scrollAmount;
|
|
714
|
-
this.updateScrollState();
|
|
715
|
-
this.scrollInterval = requestAnimationFrame(scroll);
|
|
716
|
-
};
|
|
717
|
-
this.scrollInterval = requestAnimationFrame(scroll);
|
|
718
|
-
}
|
|
719
|
-
stopScroll() {
|
|
720
|
-
if (this.scrollInterval) {
|
|
721
|
-
cancelAnimationFrame(this.scrollInterval);
|
|
722
|
-
this.scrollInterval = null;
|
|
723
|
-
}
|
|
724
|
-
}
|
|
725
|
-
// centralize your “at end” logic
|
|
726
|
-
_atScrollEnd(container) {
|
|
727
|
-
const thresh = this.scrollEndThreshold ?? 100;
|
|
728
|
-
// if not scrollable OR within threshold of bottom
|
|
729
|
-
return (container.scrollHeight <= container.clientHeight ||
|
|
730
|
-
container.scrollTop + container.clientHeight >= container.scrollHeight - thresh);
|
|
731
|
-
}
|
|
732
|
-
_maybeTriggerScrollEnd() {
|
|
733
|
-
if (this._atScrollEnd(this._container) &&
|
|
734
|
-
this.onRowsScrollEnd &&
|
|
735
|
-
!this.isLoading &&
|
|
736
|
-
!this.scrollToEnd) {
|
|
737
|
-
this.scrollToEnd = true;
|
|
738
|
-
this.onRowsScrollEnd();
|
|
739
|
-
}
|
|
740
|
-
}
|
|
741
|
-
handleScroll(_event) {
|
|
742
|
-
// every scroll, re‑test
|
|
743
|
-
this._maybeTriggerScrollEnd();
|
|
744
|
-
}
|
|
745
|
-
// handleScroll(event: Event) {
|
|
746
|
-
// const container = event.target as HTMLElement;
|
|
747
|
-
// if (
|
|
748
|
-
// container.scrollTop + container.clientHeight >=
|
|
749
|
-
// container.scrollHeight - (this.scrollEndThreshold || 100) &&
|
|
750
|
-
// this.onRowsScrollEnd &&
|
|
751
|
-
// !this.isLoading &&
|
|
752
|
-
// !this.scrollToEnd
|
|
753
|
-
// ) {
|
|
754
|
-
// this.scrollToEnd = true;
|
|
755
|
-
// this.onRowsScrollEnd();
|
|
756
|
-
// }
|
|
757
|
-
// }
|
|
758
|
-
handleGetTotalNumber() {
|
|
759
|
-
if (this.getTotalNumberFn) {
|
|
760
|
-
this.getTotalNumberFn();
|
|
761
|
-
}
|
|
762
|
-
}
|
|
763
|
-
toggleCustomPopover() {
|
|
764
|
-
this.isOpen = !this.isOpen;
|
|
765
|
-
}
|
|
766
|
-
closePopover() {
|
|
767
|
-
this.isOpen = false;
|
|
768
|
-
}
|
|
769
|
-
toggleColumn(field) {
|
|
770
|
-
this.columnVisibility = {
|
|
771
|
-
...this.columnVisibility,
|
|
772
|
-
[field]: !(this.columnVisibility?.[field] ?? true),
|
|
773
|
-
};
|
|
774
|
-
this.table.setColumnVisibility(this.columnVisibility);
|
|
775
|
-
}
|
|
776
|
-
onSettingsChangedCallback(value) {
|
|
777
|
-
if (value?.enableSorting !== undefined) {
|
|
778
|
-
this.enableSorting = value.enableSorting;
|
|
779
|
-
}
|
|
780
|
-
if (value?.enableFiltering !== undefined) {
|
|
781
|
-
this.enableFiltering = value.enableFiltering;
|
|
782
|
-
}
|
|
783
|
-
if (value?.columnDefaultSize !== undefined) {
|
|
784
|
-
this.columnDefaultSize = value.columnDefaultSize;
|
|
785
|
-
}
|
|
786
|
-
if (value?.columnGroupedColor !== undefined) {
|
|
787
|
-
this.columnGroupedColor = value.columnGroupedColor;
|
|
788
|
-
}
|
|
789
|
-
if (value?.rowAggregationColor !== undefined) {
|
|
790
|
-
this.rowAggregationColor = value.rowAggregationColor;
|
|
791
|
-
}
|
|
792
|
-
if (value?.enableGrouping !== undefined) {
|
|
793
|
-
this.enableGrouping = value.enableGrouping;
|
|
794
|
-
}
|
|
795
|
-
if (value?.exportData !== undefined) {
|
|
796
|
-
this.exportData = value.exportData;
|
|
797
|
-
}
|
|
798
|
-
if (value?.actionButtonsInMenu !== undefined) {
|
|
799
|
-
this.actionButtonsInMenu = value.actionButtonsInMenu;
|
|
800
|
-
}
|
|
801
|
-
if (value?.hideFooter !== undefined) {
|
|
802
|
-
this.hideFooter = value.hideFooter;
|
|
803
|
-
}
|
|
804
|
-
if (value?.enableColumnPinning !== undefined) {
|
|
805
|
-
this.enableColumnPinning = value.enableColumnPinning;
|
|
806
|
-
}
|
|
807
|
-
this.initTable();
|
|
808
|
-
this.requestUpdate();
|
|
809
|
-
if (this.onSettingsChanged) {
|
|
810
|
-
this.dispatchEvent(new CustomEvent('onSettingsChanged', {
|
|
811
|
-
bubbles: true,
|
|
812
|
-
composed: true,
|
|
813
|
-
detail: value,
|
|
814
|
-
}));
|
|
815
|
-
this.onSettingsChanged?.(value);
|
|
816
|
-
}
|
|
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();
|
|
817
516
|
}
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
render() {
|
|
840
|
-
const filteredColumns = this.columns?.filter((col) => {
|
|
841
|
-
const name = col.headerName?.toLowerCase() || col.field.toLowerCase();
|
|
842
|
-
return name.includes(this.filterText);
|
|
843
|
-
}) || [];
|
|
844
|
-
// checbox column for multiple selection
|
|
845
|
-
const checkboxColumn = this.enableMultiRowSelection
|
|
846
|
-
? [
|
|
847
|
-
{
|
|
848
|
-
id: 'checkboxForMultiselect',
|
|
849
|
-
type: 'checkbox',
|
|
850
|
-
minSize: 30,
|
|
851
|
-
size: 30,
|
|
852
|
-
enablePinning: false,
|
|
853
|
-
enableResizing: false,
|
|
854
|
-
header: ({ table }) => html `
|
|
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`
|
|
855
538
|
<div style="position: absolute; left: 0; bottom: 0; margin: 0.65rem 0;">
|
|
856
539
|
<lit-checkbox
|
|
857
540
|
type="checkbox"
|
|
858
|
-
.onChange="${() =>
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
.checked="${table.getIsAllRowsSelected()}"
|
|
862
|
-
.indeterminate="${table.getIsSomeRowsSelected()}"
|
|
541
|
+
.onChange="${() => i.getIsSomeRowsSelected() ? this._rowUnselectAll(i) : i.toggleAllRowsSelected()}"
|
|
542
|
+
.checked="${i.getIsAllRowsSelected()}"
|
|
543
|
+
.indeterminate="${i.getIsSomeRowsSelected()}"
|
|
863
544
|
></lit-checkbox>
|
|
864
545
|
</div>
|
|
865
546
|
`,
|
|
866
|
-
|
|
547
|
+
cell: ({ table: i, row: r }) => u`
|
|
867
548
|
<div
|
|
868
549
|
style="padding: 0.1875rem 0px 0px 0px"
|
|
869
|
-
@click=${(
|
|
550
|
+
@click=${(b) => b.stopPropagation()}
|
|
870
551
|
>
|
|
871
552
|
<lit-checkbox
|
|
872
553
|
type="checkbox"
|
|
873
|
-
.onChange="${(
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
.indeterminate="${row.getIsSomeSelected()}"
|
|
554
|
+
.onChange="${(b) => {
|
|
555
|
+
b.stopPropagation(), r.toggleSelected(b.target.checked);
|
|
556
|
+
}}"
|
|
557
|
+
.checked="${r.getIsSelected()}"
|
|
558
|
+
?disabled="${!r.getCanSelect()}"
|
|
559
|
+
.indeterminate="${r.getIsSomeSelected()}"
|
|
880
560
|
></lit-checkbox>
|
|
881
561
|
</div>
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
right: ['actions'],
|
|
908
|
-
},
|
|
909
|
-
},
|
|
910
|
-
state: {
|
|
911
|
-
columnVisibility: this.columnVisibility,
|
|
912
|
-
// columnFilters: this.server ? this.filtersServer : this.filters,
|
|
913
|
-
columnFilters: this.initialFiltering,
|
|
914
|
-
sorting: this.initialSorting,
|
|
915
|
-
rowSelection: this.rowsSelected,
|
|
916
|
-
columnSizing: this.columnSizing,
|
|
917
|
-
expanded: this.initialRowExpanded,
|
|
918
|
-
columnOrder: this.columnOrder,
|
|
919
|
-
},
|
|
920
|
-
filterFns: {
|
|
921
|
-
dateRangeFilterFn: dateRangeFilterFn,
|
|
922
|
-
dateFilterFn: dateFilterFn,
|
|
923
|
-
multiselectFilterFn: multiselectFilterFn,
|
|
924
|
-
},
|
|
925
|
-
// debugTable: true,
|
|
926
|
-
enableRowSelection: this.enableRowSelection,
|
|
927
|
-
enableMultiRowSelection: this.enableMultiRowSelection,
|
|
928
|
-
enableColumnPinning: this.enableColumnPinning,
|
|
929
|
-
enableGrouping: this.enableGrouping,
|
|
930
|
-
manualFiltering: this.server,
|
|
931
|
-
manualSorting: this.server,
|
|
932
|
-
enableSorting: this.enableSorting,
|
|
933
|
-
getRowId: (row, index) => this.getRowId ? this.getRowId(row, index) : index.toString(),
|
|
934
|
-
// groupedColumnMode: 'reorder',
|
|
935
|
-
getCoreRowModel: getCoreRowModel(),
|
|
936
|
-
getSortedRowModel: getSortedRowModel(),
|
|
937
|
-
getFilteredRowModel: getFilteredRowModel(),
|
|
938
|
-
getFacetedRowModel: getFacetedRowModel(),
|
|
939
|
-
getGroupedRowModel: getGroupedRowModel(),
|
|
940
|
-
getExpandedRowModel: getExpandedRowModel(),
|
|
941
|
-
getFacetedUniqueValues: getFacetedUniqueValues(),
|
|
942
|
-
onColumnFiltersChange: (updaterOrValue) => {
|
|
943
|
-
this.currentScrollTop = 0;
|
|
944
|
-
const scrollElement = this.tableContainerRef.value;
|
|
945
|
-
if (scrollElement) {
|
|
946
|
-
scrollElement.scrollTop = 0;
|
|
947
|
-
}
|
|
948
|
-
const filtersState = typeof updaterOrValue === 'function'
|
|
949
|
-
? updaterOrValue(this.table.getState().columnFilters)
|
|
950
|
-
: updaterOrValue;
|
|
951
|
-
this.initialFiltering = filtersState;
|
|
952
|
-
if (this.onColumnFiltersChanged) {
|
|
953
|
-
this.onColumnFiltersChanged(this.table, filtersState);
|
|
954
|
-
}
|
|
955
|
-
},
|
|
956
|
-
onSortingChange: (updaterOrValue) => {
|
|
957
|
-
this.currentScrollTop = 0;
|
|
958
|
-
const scrollElement = this.tableContainerRef.value;
|
|
959
|
-
if (scrollElement) {
|
|
960
|
-
scrollElement.scrollTop = 0;
|
|
961
|
-
}
|
|
962
|
-
const sortingState = typeof updaterOrValue === 'function'
|
|
963
|
-
? updaterOrValue(this.table.getState().sorting)
|
|
964
|
-
: updaterOrValue;
|
|
965
|
-
this.initialSorting = sortingState;
|
|
966
|
-
if (this.onColumnSortChanged) {
|
|
967
|
-
this.onColumnSortChanged(this.table, sortingState);
|
|
968
|
-
}
|
|
969
|
-
},
|
|
970
|
-
onRowSelectionChange: (updaterOrValue) => {
|
|
971
|
-
const rowSelection = typeof updaterOrValue === 'function'
|
|
972
|
-
? updaterOrValue(this.rowsSelected)
|
|
973
|
-
: updaterOrValue;
|
|
974
|
-
this.rowsSelected = rowSelection;
|
|
975
|
-
if (this.onRowSelectionChanged) {
|
|
976
|
-
this.onRowSelectionChanged(this.table, rowSelection);
|
|
977
|
-
}
|
|
978
|
-
},
|
|
979
|
-
onColumnSizingChange: (updaterOrValue) => {
|
|
980
|
-
const columnSizingState = typeof updaterOrValue === 'function'
|
|
981
|
-
? updaterOrValue(this.table.getState().columnSizing)
|
|
982
|
-
: updaterOrValue;
|
|
983
|
-
this.columnSizing = columnSizingState;
|
|
984
|
-
if (this.onColumnResize) {
|
|
985
|
-
this.onColumnResize(this.table, columnSizingState);
|
|
986
|
-
}
|
|
987
|
-
},
|
|
988
|
-
onExpandedChange: (updaterOrValue) => {
|
|
989
|
-
const rowExpanded = typeof updaterOrValue === 'function'
|
|
990
|
-
? updaterOrValue(this.initialRowExpanded)
|
|
991
|
-
: updaterOrValue;
|
|
992
|
-
this.initialRowExpanded = _.isEmpty(rowExpanded)
|
|
993
|
-
? this.initialRowExpanded
|
|
994
|
-
: rowExpanded;
|
|
995
|
-
this.requestUpdate();
|
|
996
|
-
// if (this.onColumnResize) {
|
|
997
|
-
// this.onColumnResize(this.table, columnSizingState);
|
|
998
|
-
// }
|
|
999
|
-
},
|
|
1000
|
-
onColumnOrderChange: (updaterOrValue) => {
|
|
1001
|
-
const newOrder = typeof updaterOrValue === 'function'
|
|
1002
|
-
? updaterOrValue(this.columnOrder)
|
|
1003
|
-
: updaterOrValue;
|
|
1004
|
-
this.columnOrder = newOrder;
|
|
1005
|
-
this.render();
|
|
1006
|
-
if (this.onColumnOrderChanged) {
|
|
1007
|
-
this.onColumnOrderChanged(this.table, newOrder);
|
|
1008
|
-
}
|
|
1009
|
-
},
|
|
1010
|
-
onColumnVisibilityChange: (updaterOrValue) => {
|
|
1011
|
-
const columnVisibility = typeof updaterOrValue === 'function'
|
|
1012
|
-
? updaterOrValue(this.table.getState().columnVisibility)
|
|
1013
|
-
: updaterOrValue;
|
|
1014
|
-
this.columnVisibility = columnVisibility;
|
|
1015
|
-
if (this.onColumnVisibilityChanged) {
|
|
1016
|
-
this.onColumnVisibilityChanged(this.table, columnVisibility);
|
|
1017
|
-
}
|
|
1018
|
-
},
|
|
1019
|
-
});
|
|
1020
|
-
this.rowsCount = this.table.getRowModel().rows.length;
|
|
1021
|
-
// Ak virtualizácia nie je povolená, použijeme celý zoznam riadkov alebo stĺpcov
|
|
1022
|
-
const rowVirtualizer = this.enableRowVirtualization
|
|
1023
|
-
? this.rowVirtualizerController?.getVirtualizer()
|
|
1024
|
-
: null;
|
|
1025
|
-
const columnVirtualizer = this.enableColumnVirtualization
|
|
1026
|
-
? this.columnVirtualizerController?.getVirtualizer()
|
|
1027
|
-
: null;
|
|
1028
|
-
const virtualColumns = columnVirtualizer?.getVirtualItems() ?? [];
|
|
1029
|
-
// Get table rows (either virtualized or all)
|
|
1030
|
-
const { rows } = this.table.getRowModel();
|
|
1031
|
-
const rowItems = rowVirtualizer
|
|
1032
|
-
? rowVirtualizer.getVirtualItems()
|
|
1033
|
-
: rows.map((_, index) => ({
|
|
1034
|
-
key: index,
|
|
1035
|
-
index,
|
|
1036
|
-
start: index * this.getRowHeight(),
|
|
1037
|
-
end: (index + 1) * this.getRowHeight(),
|
|
1038
|
-
size: this.getRowHeight(),
|
|
1039
|
-
lane: 0,
|
|
1040
|
-
}));
|
|
1041
|
-
// Calculate padding for virtualization
|
|
1042
|
-
let virtualPaddingLeft;
|
|
1043
|
-
let virtualPaddingRight;
|
|
1044
|
-
if (columnVirtualizer && virtualColumns?.length && this.enableColumnVirtualization) {
|
|
1045
|
-
virtualPaddingLeft = virtualColumns[0]?.start ?? 0;
|
|
1046
|
-
virtualPaddingRight =
|
|
1047
|
-
columnVirtualizer.getTotalSize() -
|
|
1048
|
-
(virtualColumns[virtualColumns.length - 1]?.end ?? 0);
|
|
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"]
|
|
1049
587
|
}
|
|
1050
|
-
|
|
1051
|
-
|
|
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`
|
|
1052
668
|
<div class="data-grid__wrapper">
|
|
1053
|
-
${this.isScrollable && !
|
|
1054
|
-
? html `
|
|
669
|
+
${this.isScrollable && !x ? u`
|
|
1055
670
|
<lit-icon-button
|
|
1056
671
|
class="scroll-button left"
|
|
1057
672
|
.disabled="${this.disableScrollLeft}"
|
|
1058
|
-
@pointerdown="${() => this.startScroll(
|
|
673
|
+
@pointerdown="${() => this.startScroll("left")}"
|
|
1059
674
|
@pointerup="${this.stopScroll}"
|
|
1060
675
|
@pointerleave="${this.stopScroll}"
|
|
1061
676
|
size="small"
|
|
@@ -1066,7 +681,7 @@ let LitDataGridTanstack = class LitDataGridTanstack extends LitElement {
|
|
|
1066
681
|
<lit-icon-button
|
|
1067
682
|
class="scroll-button right"
|
|
1068
683
|
.disabled="${this.disableScrollRight}"
|
|
1069
|
-
@pointerdown="${() => this.startScroll(
|
|
684
|
+
@pointerdown="${() => this.startScroll("right")}"
|
|
1070
685
|
@pointerup="${this.stopScroll}"
|
|
1071
686
|
@pointerleave="${this.stopScroll}"
|
|
1072
687
|
size="small"
|
|
@@ -1074,233 +689,175 @@ let LitDataGridTanstack = class LitDataGridTanstack extends LitElement {
|
|
|
1074
689
|
icon="arrowRight"
|
|
1075
690
|
>
|
|
1076
691
|
</lit-icon-button>
|
|
1077
|
-
`
|
|
1078
|
-
: null}
|
|
692
|
+
` : null}
|
|
1079
693
|
|
|
1080
|
-
<div class="grid" ${
|
|
694
|
+
<div class="grid" ${X(this.tableContainerRef)}>
|
|
1081
695
|
<table
|
|
1082
696
|
part="dataGrid-table"
|
|
1083
697
|
style="width: ${this.table.getCenterTotalSize()}px"
|
|
1084
698
|
>
|
|
1085
699
|
<thead
|
|
1086
700
|
part="dataGrid-header"
|
|
1087
|
-
style="height: ${this.enableFiltering ?
|
|
701
|
+
style="height: ${this.enableFiltering ? "4rem" : "1.625rem"};"
|
|
1088
702
|
>
|
|
1089
|
-
${
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
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`
|
|
1103
718
|
<th
|
|
1104
|
-
style=" display: flex; width: ${
|
|
719
|
+
style=" display: flex; width: ${h}px;"
|
|
1105
720
|
></th>
|
|
1106
|
-
`
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
filterVariant === 'multiselect') {
|
|
1129
|
-
if (column?.columnDef?.meta.valueOptions ||
|
|
1130
|
-
this.server) {
|
|
1131
|
-
valueOptions =
|
|
1132
|
-
column?.columnDef?.meta
|
|
1133
|
-
.valueOptions || [];
|
|
1134
|
-
}
|
|
1135
|
-
else {
|
|
1136
|
-
const sortedUniqueValues = Array.from(column
|
|
1137
|
-
?.getFacetedUniqueValues()
|
|
1138
|
-
.keys())
|
|
1139
|
-
.sort()
|
|
1140
|
-
.slice(0, 5000);
|
|
1141
|
-
valueOptions = sortedUniqueValues.map((value) => ({
|
|
1142
|
-
value,
|
|
1143
|
-
label: value,
|
|
1144
|
-
}));
|
|
1145
|
-
}
|
|
1146
|
-
}
|
|
1147
|
-
return html `
|
|
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`
|
|
1148
743
|
<th
|
|
1149
744
|
class="head"
|
|
1150
|
-
style="${
|
|
1151
|
-
colspan="${
|
|
1152
|
-
data-index="${
|
|
745
|
+
style="${E(F)}"
|
|
746
|
+
colspan="${c.colSpan}"
|
|
747
|
+
data-index="${c.id}"
|
|
1153
748
|
>
|
|
1154
|
-
${
|
|
1155
|
-
? ''
|
|
1156
|
-
: html `
|
|
749
|
+
${c.isPlaceholder ? "" : u`
|
|
1157
750
|
<div
|
|
1158
|
-
class="resizer ${this
|
|
1159
|
-
|
|
1160
|
-
.columnResizeDirection} ${header.column.getIsResizing()
|
|
1161
|
-
? 'is-resizing'
|
|
1162
|
-
: ''}"
|
|
1163
|
-
style="transform: ${this
|
|
1164
|
-
.table.options
|
|
1165
|
-
.columnResizeMode ===
|
|
1166
|
-
'onEnd' &&
|
|
1167
|
-
header.column.getIsResizing()
|
|
1168
|
-
? `translateX(${(this.table
|
|
1169
|
-
.options
|
|
1170
|
-
.columnResizeDirection ===
|
|
1171
|
-
'rtl'
|
|
1172
|
-
? -1
|
|
1173
|
-
: 1) *
|
|
1174
|
-
(this.table.getState()
|
|
1175
|
-
.columnSizingInfo
|
|
1176
|
-
.deltaOffset ??
|
|
1177
|
-
0)}px)`
|
|
1178
|
-
: ''}"
|
|
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)` : ""}"
|
|
1179
753
|
>
|
|
1180
754
|
<div class="header">
|
|
1181
|
-
${
|
|
1182
|
-
? html `
|
|
755
|
+
${c.column.getIsFiltered() ? u`
|
|
1183
756
|
<div
|
|
1184
757
|
class="filterCirclePoint"
|
|
1185
758
|
></div>
|
|
1186
|
-
`
|
|
1187
|
-
: ''}
|
|
759
|
+
` : ""}
|
|
1188
760
|
<div
|
|
1189
761
|
class="column-header"
|
|
1190
|
-
@click=${
|
|
762
|
+
@click=${c.column.getToggleSortingHandler()}
|
|
1191
763
|
>
|
|
1192
764
|
<lit-overflow-tooltip
|
|
1193
|
-
label="${header
|
|
1194
|
-
.column
|
|
1195
|
-
.columnDef
|
|
1196
|
-
.header}"
|
|
765
|
+
label="${c.column.columnDef.header}"
|
|
1197
766
|
>
|
|
1198
|
-
${
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
767
|
+
${L(
|
|
768
|
+
c.column.columnDef.header,
|
|
769
|
+
c.getContext()
|
|
770
|
+
)}
|
|
1202
771
|
</lit-overflow-tooltip>
|
|
1203
772
|
</div>
|
|
1204
773
|
|
|
1205
774
|
<div
|
|
1206
775
|
class="icons-group-pin"
|
|
1207
776
|
>
|
|
1208
|
-
${
|
|
1209
|
-
? header.column.getIsSorted()
|
|
1210
|
-
? header.column.getIsSorted() ===
|
|
1211
|
-
'asc'
|
|
1212
|
-
? html `<slot
|
|
777
|
+
${c.column.getCanSort() ? c.column.getIsSorted() ? c.column.getIsSorted() === "asc" ? u`<slot
|
|
1213
778
|
name="iconSortUp"
|
|
1214
779
|
><lit-icon
|
|
1215
780
|
class="cursor"
|
|
1216
|
-
@click=${
|
|
781
|
+
@click=${c.column.getToggleSortingHandler()}
|
|
1217
782
|
size="0.75rem"
|
|
1218
783
|
icon="chevronUpFilled"
|
|
1219
784
|
></lit-icon
|
|
1220
|
-
></slot>`
|
|
1221
|
-
: html `<slot
|
|
785
|
+
></slot>` : u`<slot
|
|
1222
786
|
name="iconSortDown"
|
|
1223
787
|
>
|
|
1224
788
|
<lit-icon
|
|
1225
789
|
class="cursor"
|
|
1226
|
-
@click=${
|
|
790
|
+
@click=${c.column.getToggleSortingHandler()}
|
|
1227
791
|
size="0.75rem"
|
|
1228
792
|
icon="chevronDownFilled"
|
|
1229
793
|
></lit-icon>
|
|
1230
|
-
</slot>`
|
|
1231
|
-
: html `<div
|
|
794
|
+
</slot>` : u`<div
|
|
1232
795
|
class="sortFilled"
|
|
1233
796
|
>
|
|
1234
797
|
<lit-icon
|
|
1235
798
|
class="cursor"
|
|
1236
|
-
@click=${
|
|
799
|
+
@click=${c.column.getToggleSortingHandler()}
|
|
1237
800
|
size="0.75rem"
|
|
1238
801
|
icon="sortFilled"
|
|
1239
802
|
></lit-icon>
|
|
1240
|
-
</div>`
|
|
1241
|
-
: html `<div></div>`}
|
|
803
|
+
</div>` : u`<div></div>`}
|
|
1242
804
|
<div class="flex">
|
|
1243
|
-
${
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
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`
|
|
1248
816
|
<lit-icon-button
|
|
1249
|
-
@click="${() => this.togglePin(
|
|
817
|
+
@click="${() => this.togglePin(
|
|
818
|
+
c
|
|
819
|
+
)}"
|
|
1250
820
|
size="small"
|
|
1251
821
|
variant="text"
|
|
1252
822
|
icon="pin"
|
|
1253
|
-
.active="${
|
|
823
|
+
.active="${c.column.getIsPinned()}"
|
|
1254
824
|
>
|
|
1255
825
|
</lit-icon-button>
|
|
1256
826
|
<simple-tooltip
|
|
1257
827
|
placement="bottom"
|
|
1258
|
-
>${
|
|
1259
|
-
|
|
1260
|
-
|
|
828
|
+
>${c.column.getIsPinned() ? R(
|
|
829
|
+
"Zrušit připnutí sloupce"
|
|
830
|
+
) : R(
|
|
831
|
+
"Připnout sloupec vlevo"
|
|
832
|
+
)}
|
|
1261
833
|
</simple-tooltip>
|
|
1262
|
-
`
|
|
1263
|
-
|
|
1264
|
-
${header.column.getCanGroup()
|
|
1265
|
-
? html `
|
|
834
|
+
` : ""}
|
|
835
|
+
${c.column.getCanGroup() ? u`
|
|
1266
836
|
<lit-icon-button
|
|
1267
|
-
@click="${
|
|
837
|
+
@click="${c.column.getToggleGroupingHandler()}"
|
|
1268
838
|
size="small"
|
|
1269
839
|
variant="text"
|
|
1270
|
-
.active="${
|
|
840
|
+
.active="${c.column.getIsGrouped()}"
|
|
1271
841
|
icon="agregation"
|
|
1272
842
|
>
|
|
1273
843
|
</lit-icon-button>
|
|
1274
844
|
<simple-tooltip
|
|
1275
845
|
placement="bottom"
|
|
1276
846
|
>
|
|
1277
|
-
${
|
|
1278
|
-
|
|
1279
|
-
|
|
847
|
+
${c.column.getIsGrouped() ? R(
|
|
848
|
+
"Zrušit seskupení"
|
|
849
|
+
) : R(
|
|
850
|
+
"Seskupit sloupec"
|
|
851
|
+
)}</simple-tooltip
|
|
1280
852
|
>
|
|
1281
|
-
`
|
|
1282
|
-
: ''}
|
|
1283
|
-
`
|
|
1284
|
-
: html `
|
|
1285
|
-
<lit-data-grid-action-buttons-popover
|
|
1286
|
-
.group="${header.column.getToggleGroupingHandler()}"
|
|
1287
|
-
.pin="${() => this.togglePin(header)}"
|
|
1288
|
-
.header="${header}"
|
|
1289
|
-
.table="${this
|
|
1290
|
-
.table}"
|
|
1291
|
-
></lit-data-grid-action-buttons-popover>
|
|
853
|
+
` : ""}
|
|
1292
854
|
`}
|
|
1293
|
-
${this
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
'actions',
|
|
1300
|
-
].includes(header
|
|
1301
|
-
.column
|
|
1302
|
-
.id)
|
|
1303
|
-
? html `<div
|
|
855
|
+
${this.enableColumnOrdering && !c.column.getIsPinned() && !c.column.getIsGrouped() && ![
|
|
856
|
+
"checkbox",
|
|
857
|
+
"actions"
|
|
858
|
+
].includes(
|
|
859
|
+
c.column.id
|
|
860
|
+
) ? u`<div
|
|
1304
861
|
class="drag-handle"
|
|
1305
862
|
>
|
|
1306
863
|
<lit-icon
|
|
@@ -1310,296 +867,235 @@ let LitDataGridTanstack = class LitDataGridTanstack extends LitElement {
|
|
|
1310
867
|
</div>
|
|
1311
868
|
<simple-tooltip
|
|
1312
869
|
placement="bottom"
|
|
1313
|
-
>${
|
|
1314
|
-
|
|
1315
|
-
|
|
870
|
+
>${R(
|
|
871
|
+
"Přesunout sloupec"
|
|
872
|
+
)}</simple-tooltip
|
|
873
|
+
> ` : null}
|
|
1316
874
|
</div>
|
|
1317
875
|
</div>
|
|
1318
876
|
</div>
|
|
1319
877
|
</div>
|
|
1320
|
-
${
|
|
1321
|
-
? html `
|
|
878
|
+
${c.column.getCanFilter() ? u`
|
|
1322
879
|
<div>
|
|
1323
880
|
<filter-inputs
|
|
1324
|
-
.minFilterCharacters=${this
|
|
1325
|
-
|
|
1326
|
-
.
|
|
1327
|
-
.
|
|
1328
|
-
|
|
1329
|
-
.
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
.
|
|
1334
|
-
.server}
|
|
1335
|
-
.value="${value}"
|
|
1336
|
-
.operator="${operator}"
|
|
1337
|
-
.filterVariant="${filterVariant}"
|
|
1338
|
-
.filterOperators="${filterOperators}"
|
|
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}"
|
|
1339
891
|
></filter-inputs>
|
|
1340
892
|
</div>
|
|
1341
|
-
`
|
|
1342
|
-
: null}
|
|
893
|
+
` : null}
|
|
1343
894
|
`}
|
|
1344
895
|
<div
|
|
1345
896
|
class="resize-handle"
|
|
1346
|
-
@dblclick="${(
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
@mousedown="${(
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
@touchstart="${(
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
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
|
+
}}"
|
|
1365
916
|
></div>
|
|
1366
917
|
</th>
|
|
1367
918
|
`;
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
919
|
+
}
|
|
920
|
+
)}
|
|
921
|
+
${m ? u`
|
|
1371
922
|
<th
|
|
1372
|
-
style=" display: flex; width: ${
|
|
923
|
+
style=" display: flex; width: ${m}px;"
|
|
1373
924
|
></th>
|
|
1374
|
-
`
|
|
1375
|
-
: ''}
|
|
925
|
+
` : ""}
|
|
1376
926
|
</tr>
|
|
1377
927
|
`;
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
928
|
+
}
|
|
929
|
+
)}
|
|
930
|
+
${this.isLoading ? u`
|
|
1381
931
|
<div style="position: absolute; bottom: 0px; width: 100%;">
|
|
1382
932
|
<lit-loading-bar></lit-loading-bar>
|
|
1383
933
|
</div>
|
|
1384
|
-
`
|
|
1385
|
-
: ''}
|
|
934
|
+
` : ""}
|
|
1386
935
|
</thead>
|
|
1387
936
|
|
|
1388
937
|
<tbody
|
|
1389
938
|
@keydown=${this.handleKeyDown}
|
|
1390
939
|
tabindex="0"
|
|
1391
940
|
part="dataGrid-body"
|
|
1392
|
-
style="height: ${
|
|
1393
|
-
this.table.getRowModel().rows.length > 0
|
|
1394
|
-
? rowVirtualizer.getTotalSize() + 'px'
|
|
1395
|
-
: 'auto'};"
|
|
941
|
+
style="height: ${o && this.table.getRowModel().rows.length > 0 ? o.getTotalSize() + "px" : "auto"};"
|
|
1396
942
|
>
|
|
1397
|
-
${
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
height: `${this.getRowHeight()}px`,
|
|
1413
|
-
lineHeight: `${this.getRowHeight()}px`,
|
|
1414
|
-
position: rowVirtualizer ? 'absolute' : 'relative',
|
|
1415
|
-
};
|
|
1416
|
-
return row
|
|
1417
|
-
? html `
|
|
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`
|
|
1418
958
|
<tr
|
|
1419
|
-
tabindex=${this.enableRowSelection
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
data-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
: 'body'}"
|
|
1426
|
-
data-index="${item.index}"
|
|
1427
|
-
@click="${row.getIsGrouped()
|
|
1428
|
-
? row.getToggleExpandedHandler()
|
|
1429
|
-
: (e) => this.handleRowClick(e, row)}"
|
|
1430
|
-
@mousedown=${(e) => this._onRowMouseDown(e, row)}
|
|
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)}
|
|
1431
965
|
@mouseup=${this._onRowMouseUp}
|
|
1432
966
|
@mouseleave=${this._onRowMouseUp}
|
|
1433
|
-
@contextmenu=${(
|
|
1434
|
-
@dblclick="${() => this.handleRowDoubleClick(
|
|
1435
|
-
style="${
|
|
1436
|
-
${
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
rowVirtualizer) {
|
|
1440
|
-
// Only measure element if virtualization is enabled
|
|
1441
|
-
rowVirtualizer.measureElement(node);
|
|
1442
|
-
}
|
|
1443
|
-
})}
|
|
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
|
+
})}
|
|
1444
973
|
>
|
|
1445
|
-
${
|
|
1446
|
-
? html `
|
|
974
|
+
${h ? u`
|
|
1447
975
|
<th
|
|
1448
|
-
style=" display: flex; width: ${
|
|
976
|
+
style=" display: flex; width: ${h}px;"
|
|
1449
977
|
></th>
|
|
1450
|
-
`
|
|
1451
|
-
: ''}
|
|
978
|
+
` : ""}
|
|
1452
979
|
<!-- Cells for each row -->
|
|
1453
|
-
${
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
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
|
|
1473
1001
|
class="grouped-column"
|
|
1474
1002
|
>
|
|
1475
1003
|
<lit-icon
|
|
1476
1004
|
class="grouped-column--icon-button"
|
|
1477
1005
|
size="1.25rem"
|
|
1478
|
-
icon="${
|
|
1479
|
-
? 'chevronDownFilled'
|
|
1480
|
-
: 'chevron'}"
|
|
1006
|
+
icon="${r.getIsExpanded() ? "chevronDownFilled" : "chevron"}"
|
|
1481
1007
|
></lit-icon>
|
|
1482
1008
|
<div
|
|
1483
1009
|
class="grouped-column--label"
|
|
1484
1010
|
>
|
|
1485
1011
|
<lit-overflow-tooltip
|
|
1486
|
-
label=${
|
|
1012
|
+
label=${f.getValue()}
|
|
1487
1013
|
>
|
|
1488
|
-
${
|
|
1014
|
+
${f.getValue()}
|
|
1489
1015
|
</lit-overflow-tooltip>
|
|
1490
1016
|
</div>
|
|
1491
1017
|
<lit-pill
|
|
1492
1018
|
class="grouped-column--pill"
|
|
1493
1019
|
style="margin-left: 0.5rem"
|
|
1494
|
-
count="${
|
|
1495
|
-
.subRows
|
|
1496
|
-
.length}"
|
|
1020
|
+
count="${r.subRows.length}"
|
|
1497
1021
|
></lit-pill>
|
|
1498
|
-
</div> `
|
|
1499
|
-
: cell.getIsAggregated()
|
|
1500
|
-
? html `
|
|
1022
|
+
</div> ` : f.getIsAggregated() ? u`
|
|
1501
1023
|
<div
|
|
1502
1024
|
style="flex-grow:1"
|
|
1503
1025
|
>
|
|
1504
|
-
${
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
cell
|
|
1509
|
-
.column
|
|
1510
|
-
.columnDef
|
|
1511
|
-
.cell, cell.getContext())}
|
|
1026
|
+
${L(
|
|
1027
|
+
f.column.columnDef.aggregatedCell ?? f.column.columnDef.cell,
|
|
1028
|
+
f.getContext()
|
|
1029
|
+
)}
|
|
1512
1030
|
</div>
|
|
1513
|
-
`
|
|
1514
|
-
: cell.getIsPlaceholder()
|
|
1515
|
-
? null
|
|
1516
|
-
: html `<lit-overflow-tooltip
|
|
1031
|
+
` : f.getIsPlaceholder() ? null : u`<lit-overflow-tooltip
|
|
1517
1032
|
placement="right"
|
|
1518
|
-
label=${
|
|
1519
|
-
>${
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1033
|
+
label=${f.getValue()}
|
|
1034
|
+
>${L(
|
|
1035
|
+
f.column.columnDef.cell,
|
|
1036
|
+
f.getContext()
|
|
1037
|
+
)}</lit-overflow-tooltip
|
|
1523
1038
|
>`}
|
|
1524
1039
|
</td>
|
|
1525
1040
|
`;
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1041
|
+
}
|
|
1042
|
+
)}
|
|
1043
|
+
${m ? u`
|
|
1529
1044
|
<th
|
|
1530
|
-
style=" display: flex; width: ${
|
|
1045
|
+
style=" display: flex; width: ${m}px;"
|
|
1531
1046
|
></th>
|
|
1532
|
-
`
|
|
1533
|
-
: ''}
|
|
1047
|
+
` : ""}
|
|
1534
1048
|
</tr>
|
|
1535
|
-
`
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
: null}
|
|
1049
|
+
` : null;
|
|
1050
|
+
}
|
|
1051
|
+
) : null}
|
|
1539
1052
|
</tbody>
|
|
1540
1053
|
</table>
|
|
1541
|
-
${
|
|
1542
|
-
? html `
|
|
1054
|
+
${this.hideFooter ? "" : u`
|
|
1543
1055
|
<slot
|
|
1544
1056
|
part="dataGrid-footer"
|
|
1545
1057
|
name="dataGridFooter"
|
|
1546
1058
|
class="footer-container"
|
|
1547
1059
|
>
|
|
1548
1060
|
<div class="numberCount">
|
|
1549
|
-
${
|
|
1061
|
+
${R("Počet záznamů")}:
|
|
1550
1062
|
${this.table.getRowModel().rows.length}
|
|
1551
1063
|
<pre>/</pre>
|
|
1552
|
-
${this.server
|
|
1553
|
-
|
|
1554
|
-
? this.totalNumberRows
|
|
1555
|
-
: '?'
|
|
1556
|
-
: this.table.getRowModel().rows.length}
|
|
1557
|
-
${this.server
|
|
1558
|
-
? html `<lit-icon-button
|
|
1064
|
+
${this.server ? this.totalNumberRows ? this.totalNumberRows : "?" : this.table.getRowModel().rows.length}
|
|
1065
|
+
${this.server ? u`<lit-icon-button
|
|
1559
1066
|
icon="reload"
|
|
1560
1067
|
size="mini"
|
|
1561
1068
|
variant="text"
|
|
1562
1069
|
@click="${() => this.handleGetTotalNumber()}"
|
|
1563
1070
|
style="margin-left: 0.2rem; margin-top: -0.1rem"
|
|
1564
|
-
></lit-icon-button>`
|
|
1565
|
-
: ''}
|
|
1071
|
+
></lit-icon-button>` : ""}
|
|
1566
1072
|
</div>
|
|
1567
1073
|
<div class="right-actions">
|
|
1568
1074
|
<lit-data-grid-density-popover
|
|
1569
1075
|
.density="${this.rowDensity}"
|
|
1570
|
-
.setDensity="${(
|
|
1076
|
+
.setDensity="${(i) => this.handleSetDensity(i)}"
|
|
1571
1077
|
>
|
|
1572
1078
|
</lit-data-grid-density-popover>
|
|
1573
1079
|
<lit-responsive-button
|
|
1574
1080
|
size="medium"
|
|
1575
1081
|
variant="text"
|
|
1576
|
-
label=${
|
|
1082
|
+
label=${R("Přizpůsobit sloupce")}
|
|
1577
1083
|
icon="columns"
|
|
1578
1084
|
@click=${() => this.table.resetColumnSizing()}
|
|
1579
1085
|
></lit-responsive-button>
|
|
1580
|
-
${this.exportData
|
|
1581
|
-
? html `
|
|
1086
|
+
${this.exportData ? u`
|
|
1582
1087
|
<lit-data-grid-export-popover
|
|
1583
|
-
.exportToCsv="${typeof this.exportExcelFn
|
|
1584
|
-
|
|
1585
|
-
? () => this.exportCsvFn && this.exportCsvFn()
|
|
1586
|
-
: () => this.exportDataToCsv()}"
|
|
1587
|
-
.exportToExcel="${typeof this.exportExcelFn ===
|
|
1588
|
-
'function'
|
|
1589
|
-
? () => this.exportExcelFn &&
|
|
1590
|
-
this.exportExcelFn()
|
|
1591
|
-
: () => this.exportDataToExcel()}"
|
|
1088
|
+
.exportToCsv="${typeof this.exportExcelFn == "function" ? () => this.exportCsvFn && this.exportCsvFn() : () => this.exportDataToCsv()}"
|
|
1089
|
+
.exportToExcel="${typeof this.exportExcelFn == "function" ? () => this.exportExcelFn && this.exportExcelFn() : () => this.exportDataToExcel()}"
|
|
1592
1090
|
.disabledButtons="${this.isLoading}"
|
|
1593
1091
|
>
|
|
1594
1092
|
</lit-data-grid-export-popover>
|
|
1595
|
-
`
|
|
1596
|
-
|
|
1597
|
-
${this.enableSettings
|
|
1598
|
-
? html `
|
|
1093
|
+
` : null}
|
|
1094
|
+
${this.enableSettings ? u`
|
|
1599
1095
|
<div>
|
|
1600
1096
|
<lit-responsive-button
|
|
1601
1097
|
variant="dashed"
|
|
1602
|
-
label="${
|
|
1098
|
+
label="${R("Přiřadit sloupec")}"
|
|
1603
1099
|
icon="add"
|
|
1604
1100
|
style="display: inline-block"
|
|
1605
1101
|
@click="${this.toggleCustomPopover}"
|
|
@@ -1607,9 +1103,9 @@ let LitDataGridTanstack = class LitDataGridTanstack extends LitElement {
|
|
|
1607
1103
|
|
|
1608
1104
|
<simple-popper
|
|
1609
1105
|
.showing=${this.isOpen}
|
|
1610
|
-
.placement=${
|
|
1611
|
-
.manualOpening=${
|
|
1612
|
-
.maxWidthAsTarget=${
|
|
1106
|
+
.placement=${"top-end"}
|
|
1107
|
+
.manualOpening=${!0}
|
|
1108
|
+
.maxWidthAsTarget=${!1}
|
|
1613
1109
|
.onClose=${() => this.closePopover()}
|
|
1614
1110
|
>
|
|
1615
1111
|
<div
|
|
@@ -1618,57 +1114,55 @@ let LitDataGridTanstack = class LitDataGridTanstack extends LitElement {
|
|
|
1618
1114
|
>
|
|
1619
1115
|
<lit-input
|
|
1620
1116
|
.value=${this.filterText}
|
|
1621
|
-
.onInput=${(
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
}}
|
|
1117
|
+
.onInput=${(i) => {
|
|
1118
|
+
var r;
|
|
1119
|
+
this.filterText = ((r = i == null ? void 0 : i.toLowerCase) == null ? void 0 : r.call(i)) || "";
|
|
1120
|
+
}}
|
|
1626
1121
|
.onClear=${() => {
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
placeholder="${
|
|
1122
|
+
this.filterText = "";
|
|
1123
|
+
}}
|
|
1124
|
+
placeholder="${R(
|
|
1125
|
+
"Zadejte název sloupce"
|
|
1126
|
+
)}"
|
|
1630
1127
|
></lit-input>
|
|
1631
1128
|
</div>
|
|
1632
1129
|
<lit-menu tabindex="0">
|
|
1633
|
-
${this.columns
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
})
|
|
1648
|
-
.map((col) => html `
|
|
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`
|
|
1649
1144
|
<lit-menu-item
|
|
1650
|
-
.onClick=${() => this.toggleColumn(
|
|
1651
|
-
|
|
1652
|
-
|
|
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}
|
|
1653
1149
|
>
|
|
1654
1150
|
<span
|
|
1655
1151
|
class="menu-item--multiple"
|
|
1656
1152
|
>
|
|
1657
1153
|
<lit-checkbox
|
|
1658
1154
|
class="cursor"
|
|
1659
|
-
.checked=${
|
|
1660
|
-
.columnVisibility?.[col
|
|
1661
|
-
?.field] === false)}
|
|
1155
|
+
.checked=${((b = this.columnVisibility) == null ? void 0 : b[i == null ? void 0 : i.field]) !== !1}
|
|
1662
1156
|
></lit-checkbox>
|
|
1663
|
-
${
|
|
1664
|
-
col?.field}
|
|
1157
|
+
${(i == null ? void 0 : i.headerName) || (i == null ? void 0 : i.field)}
|
|
1665
1158
|
</span>
|
|
1666
1159
|
</lit-menu-item>
|
|
1667
|
-
|
|
1160
|
+
`;
|
|
1161
|
+
}
|
|
1162
|
+
)}
|
|
1668
1163
|
</lit-menu>
|
|
1669
1164
|
|
|
1670
|
-
${isEqual(
|
|
1671
|
-
? html `
|
|
1165
|
+
${it.isEqual(t.length, 0) ? u`
|
|
1672
1166
|
<div
|
|
1673
1167
|
style="display: flex; flex-direction: column; align-items: center; padding: 1rem;"
|
|
1674
1168
|
>
|
|
@@ -1678,11 +1172,10 @@ let LitDataGridTanstack = class LitDataGridTanstack extends LitElement {
|
|
|
1678
1172
|
<not-found></not-found>
|
|
1679
1173
|
</div>
|
|
1680
1174
|
<div>
|
|
1681
|
-
${
|
|
1175
|
+
${R("Nenalezeno")}
|
|
1682
1176
|
</div>
|
|
1683
1177
|
</div>
|
|
1684
|
-
`
|
|
1685
|
-
: null}
|
|
1178
|
+
` : null}
|
|
1686
1179
|
</simple-popper>
|
|
1687
1180
|
|
|
1688
1181
|
<lit-icon-button
|
|
@@ -1693,49 +1186,42 @@ let LitDataGridTanstack = class LitDataGridTanstack extends LitElement {
|
|
|
1693
1186
|
></lit-icon-button>
|
|
1694
1187
|
<data-grid-settings
|
|
1695
1188
|
.onClose="${() => {
|
|
1696
|
-
|
|
1697
|
-
|
|
1189
|
+
this.isOpenModal = !1;
|
|
1190
|
+
}}"
|
|
1698
1191
|
.isOpenModal="${this.isOpenModal}"
|
|
1699
1192
|
.enableFiltering="${this.enableFiltering}"
|
|
1700
1193
|
.enableSorting="${this.enableSorting}"
|
|
1701
|
-
.columnDefaultSize="${this
|
|
1702
|
-
|
|
1703
|
-
.
|
|
1704
|
-
.columnGroupedColor}"
|
|
1705
|
-
.rowAggregationColor="${this
|
|
1706
|
-
.rowAggregationColor}"
|
|
1194
|
+
.columnDefaultSize="${this.columnDefaultSize}"
|
|
1195
|
+
.columnGroupedColor="${this.columnGroupedColor}"
|
|
1196
|
+
.rowAggregationColor="${this.rowAggregationColor}"
|
|
1707
1197
|
.enableGrouping="${this.enableGrouping}"
|
|
1708
|
-
.enableColumnPinning="${this
|
|
1709
|
-
.enableColumnPinning}"
|
|
1198
|
+
.enableColumnPinning="${this.enableColumnPinning}"
|
|
1710
1199
|
.exportData="${this.exportData}"
|
|
1711
|
-
.actionButtonsInMenu="${this
|
|
1712
|
-
.actionButtonsInMenu}"
|
|
1200
|
+
.actionButtonsInMenu="${this.actionButtonsInMenu}"
|
|
1713
1201
|
.hideFooter="${this.hideFooter}"
|
|
1714
|
-
.onSettingsChangedModal="${this.onSettingsChangedCallback.bind(
|
|
1202
|
+
.onSettingsChangedModal="${this.onSettingsChangedCallback.bind(
|
|
1203
|
+
this
|
|
1204
|
+
)}"
|
|
1715
1205
|
></data-grid-settings>
|
|
1716
1206
|
</div>
|
|
1717
|
-
`
|
|
1718
|
-
: null}
|
|
1207
|
+
` : null}
|
|
1719
1208
|
</div>
|
|
1720
1209
|
</slot>
|
|
1721
|
-
`
|
|
1722
|
-
: ''}
|
|
1210
|
+
`}
|
|
1723
1211
|
</div>
|
|
1724
|
-
${this.table.getRowModel().rows.length < 1 && !this.isLoading
|
|
1725
|
-
? html ` <div class="data-grid__empty">
|
|
1212
|
+
${this.table.getRowModel().rows.length < 1 && !this.isLoading ? u` <div class="data-grid__empty">
|
|
1726
1213
|
<div style="max-height: 7.125rem; max-width: 7.125rem">
|
|
1727
1214
|
<not-found></not-found>
|
|
1728
1215
|
</div>
|
|
1729
|
-
<div class="data-grid__empty-text">${
|
|
1730
|
-
</div>`
|
|
1731
|
-
: null}
|
|
1216
|
+
<div class="data-grid__empty-text">${R("Nic dalšího tu není")}</div>
|
|
1217
|
+
</div>` : null}
|
|
1732
1218
|
</div>
|
|
1733
1219
|
`;
|
|
1734
|
-
|
|
1220
|
+
}
|
|
1735
1221
|
};
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1222
|
+
n.styles = [
|
|
1223
|
+
// styles,
|
|
1224
|
+
yt`
|
|
1739
1225
|
*,
|
|
1740
1226
|
*::before,
|
|
1741
1227
|
*::after {
|
|
@@ -2021,226 +1507,227 @@ LitDataGridTanstack.styles = [
|
|
|
2021
1507
|
.data-grid__empty-text {
|
|
2022
1508
|
color: var(--text-primary, #5d6371);
|
|
2023
1509
|
}
|
|
2024
|
-
|
|
1510
|
+
`
|
|
2025
1511
|
];
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
],
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
],
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
],
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
],
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
],
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
],
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
],
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
],
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
],
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
],
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
],
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
],
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
],
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
],
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
],
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
],
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
],
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
],
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
],
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
],
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
],
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
],
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
],
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
],
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
],
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
],
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
],
|
|
2107
|
-
|
|
2108
|
-
|
|
2109
|
-
],
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
],
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
],
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
],
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
],
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
],
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
],
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
],
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
],
|
|
2134
|
-
|
|
2135
|
-
|
|
2136
|
-
],
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
],
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
],
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
],
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
],
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
],
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
],
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
],
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
],
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
],
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
],
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
],
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
],
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
],
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
],
|
|
2179
|
-
|
|
2180
|
-
|
|
2181
|
-
],
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
],
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
],
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
],
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
],
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
],
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
],
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
],
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
],
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
],
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
],
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
],
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
],
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
],
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
],
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
],
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
],
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
],
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
],
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
],
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
],
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
],
|
|
2245
|
-
export {
|
|
2246
|
-
|
|
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
|
+
};
|