overview-components 1.0.83 → 1.0.89

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (239) hide show
  1. package/dist/assets/generated/locales/de.js +72 -70
  2. package/dist/assets/generated/locales/en.js +72 -70
  3. package/dist/assets/generated/locales/fr.js +72 -70
  4. package/dist/assets/generated/locales/hr.js +72 -70
  5. package/dist/assets/generated/locales/it.js +72 -70
  6. package/dist/assets/generated/locales/pl.js +72 -70
  7. package/dist/assets/generated/locales/ro.js +72 -70
  8. package/dist/assets/generated/locales/sk.js +72 -70
  9. package/dist/assets/generated/locales/sr.js +72 -70
  10. package/dist/components/lit-attachments-tab.js +267 -432
  11. package/dist/components/lit-badge.js +37 -40
  12. package/dist/components/lit-case-variables-tab.js +378 -497
  13. package/dist/components/lit-chart.js +375 -406
  14. package/dist/components/lit-data-grid-tanstack.js +1145 -1663
  15. package/dist/components/lit-filter-modal.js +194 -230
  16. package/dist/components/lit-multiselect-item.js +297 -477
  17. package/dist/components/lit-section-tab.js +69 -85
  18. package/dist/components/lit-tabs-overview.js +187 -232
  19. package/dist/components/react-wrappers/attachments-tab.js +13 -8
  20. package/dist/components/react-wrappers/badge.js +13 -8
  21. package/dist/components/react-wrappers/button.js +13 -8
  22. package/dist/components/react-wrappers/case-variables-tab.js +13 -8
  23. package/dist/components/react-wrappers/chart.js +13 -8
  24. package/dist/components/react-wrappers/data-grid-tanstack.js +13 -8
  25. package/dist/components/react-wrappers/filter-modal.js +13 -8
  26. package/dist/components/react-wrappers/progress-bar.js +13 -8
  27. package/dist/components/react-wrappers/section-tab.js +13 -8
  28. package/dist/components/react-wrappers/tabs-overview.js +13 -8
  29. package/dist/index.d.ts +1 -64
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/index.js +42 -4819
  32. package/dist/node_modules/@lit/reactive-element/css-tag.js +42 -0
  33. package/dist/node_modules/@lit/reactive-element/decorators/base.js +9 -0
  34. package/dist/node_modules/@lit/reactive-element/decorators/custom-element.js +13 -0
  35. package/dist/node_modules/@lit/reactive-element/decorators/property.js +37 -0
  36. package/dist/node_modules/@lit/reactive-element/decorators/query.js +20 -0
  37. package/dist/node_modules/@lit/reactive-element/decorators/state.js +12 -0
  38. package/dist/node_modules/@lit/reactive-element/reactive-element.js +249 -0
  39. package/dist/node_modules/lit-html/async-directive.js +69 -0
  40. package/dist/node_modules/lit-html/directive-helpers.js +45 -0
  41. package/dist/node_modules/lit-html/directive.js +27 -0
  42. package/dist/node_modules/lit-html/directives/ref.js +42 -0
  43. package/dist/node_modules/lit-html/directives/repeat.js +61 -0
  44. package/dist/node_modules/lit-html/directives/style-map.js +36 -0
  45. package/dist/node_modules/lit-html/directives/unsafe-html.js +27 -0
  46. package/dist/node_modules/lit-html/lit-html.js +242 -0
  47. package/dist/shared/lit-button.js +63 -80
  48. package/dist/shared/lit-icon-button.d.ts +1 -1
  49. package/dist/shared/lit-icon-button.d.ts.map +1 -1
  50. package/dist/shared/lit-loader.d.ts +1 -1
  51. package/dist/shared/lit-loader.d.ts.map +1 -1
  52. package/dist/shared/lit-loading-bar.d.ts +1 -1
  53. package/dist/shared/lit-loading-bar.d.ts.map +1 -1
  54. package/dist/shared/lit-menu-item.d.ts +1 -1
  55. package/dist/shared/lit-menu-item.d.ts.map +1 -1
  56. package/dist/shared/lit-progress-bar.js +32 -33
  57. package/dist/shared/lit-text-field.d.ts +1 -1
  58. package/dist/shared/lit-text-field.d.ts.map +1 -1
  59. package/dist/shared/simple-tooltip.js +122 -198
  60. package/dist/shared/styles/button-shared-styles.js +5 -4
  61. package/dist/utils/currency.js +12 -15
  62. package/dist/utils/custom-filters.js +45 -80
  63. package/dist/utils/date.js +13 -21
  64. package/dist/utils/getOperatorByType.js +50 -65
  65. package/dist/utils/localization.js +29 -431
  66. package/package.json +74 -87
  67. package/dist/assets/generated/locales/de.js.map +0 -1
  68. package/dist/assets/generated/locales/en.js.map +0 -1
  69. package/dist/assets/generated/locales/fr.js.map +0 -1
  70. package/dist/assets/generated/locales/hr.js.map +0 -1
  71. package/dist/assets/generated/locales/it.js.map +0 -1
  72. package/dist/assets/generated/locales/pl.js.map +0 -1
  73. package/dist/assets/generated/locales/ro.js.map +0 -1
  74. package/dist/assets/generated/locales/sk.js.map +0 -1
  75. package/dist/assets/generated/locales/sr.js.map +0 -1
  76. package/dist/assets/icons/iconGlyphs.js +0 -679
  77. package/dist/assets/icons/iconGlyphs.js.map +0 -1
  78. package/dist/assets/illustration/delete-illustration.js +0 -96
  79. package/dist/assets/illustration/delete-illustration.js.map +0 -1
  80. package/dist/assets/illustration/no-content.js +0 -167
  81. package/dist/assets/illustration/no-content.js.map +0 -1
  82. package/dist/assets/illustration/no-preview.js +0 -133
  83. package/dist/assets/illustration/no-preview.js.map +0 -1
  84. package/dist/assets/illustration/not-found.js +0 -106
  85. package/dist/assets/illustration/not-found.js.map +0 -1
  86. package/dist/assets/illustration/settings-illustration.js +0 -176
  87. package/dist/assets/illustration/settings-illustration.js.map +0 -1
  88. package/dist/components/components-settings/attachments-tab-settings.js +0 -226
  89. package/dist/components/components-settings/attachments-tab-settings.js.map +0 -1
  90. package/dist/components/components-settings/data-grid-settings.js +0 -318
  91. package/dist/components/components-settings/data-grid-settings.js.map +0 -1
  92. package/dist/components/components-settings/section-tab-settings.js +0 -269
  93. package/dist/components/components-settings/section-tab-settings.js.map +0 -1
  94. package/dist/components/components-settings/tabs-overview-settings.js +0 -439
  95. package/dist/components/components-settings/tabs-overview-settings.js.map +0 -1
  96. package/dist/components/lit-attachments-tab.js.map +0 -1
  97. package/dist/components/lit-badge.js.map +0 -1
  98. package/dist/components/lit-case-variables-tab.js.map +0 -1
  99. package/dist/components/lit-chart.js.map +0 -1
  100. package/dist/components/lit-data-grid-tanstack.js.map +0 -1
  101. package/dist/components/lit-filter-modal.js.map +0 -1
  102. package/dist/components/lit-multiselect-item.js.map +0 -1
  103. package/dist/components/lit-section-tab.js.map +0 -1
  104. package/dist/components/lit-tabs-overview.js.map +0 -1
  105. package/dist/components/modals/lit-confirm-modal.js +0 -120
  106. package/dist/components/modals/lit-confirm-modal.js.map +0 -1
  107. package/dist/components/modals/lit-delete-modal.js +0 -128
  108. package/dist/components/modals/lit-delete-modal.js.map +0 -1
  109. package/dist/components/react-wrappers/attachments-tab.js.map +0 -1
  110. package/dist/components/react-wrappers/badge.js.map +0 -1
  111. package/dist/components/react-wrappers/button.js.map +0 -1
  112. package/dist/components/react-wrappers/case-variables-tab.js.map +0 -1
  113. package/dist/components/react-wrappers/chart.js.map +0 -1
  114. package/dist/components/react-wrappers/data-grid-tanstack.js.map +0 -1
  115. package/dist/components/react-wrappers/filter-modal.js.map +0 -1
  116. package/dist/components/react-wrappers/progress-bar.js.map +0 -1
  117. package/dist/components/react-wrappers/section-tab.js.map +0 -1
  118. package/dist/components/react-wrappers/tabs-overview.js.map +0 -1
  119. package/dist/data/translations.js +0 -2763
  120. package/dist/data/translations.js.map +0 -1
  121. package/dist/index.js.map +0 -1
  122. package/dist/schemas/index.js +0 -17
  123. package/dist/schemas/index.js.map +0 -1
  124. package/dist/schemas/lit-attachments-tab-document.schema.js +0 -20
  125. package/dist/schemas/lit-attachments-tab-document.schema.js.map +0 -1
  126. package/dist/schemas/lit-attachments-tab-settings-value.schema.js +0 -15
  127. package/dist/schemas/lit-attachments-tab-settings-value.schema.js.map +0 -1
  128. package/dist/schemas/lit-attachments-tab.schema.js +0 -32
  129. package/dist/schemas/lit-attachments-tab.schema.js.map +0 -1
  130. package/dist/schemas/lit-case-variables-tab-cell.schema.js +0 -43
  131. package/dist/schemas/lit-case-variables-tab-cell.schema.js.map +0 -1
  132. package/dist/schemas/lit-case-variables-tab-rows.schema.js +0 -6
  133. package/dist/schemas/lit-case-variables-tab-rows.schema.js.map +0 -1
  134. package/dist/schemas/lit-case-variables-tab.schema.js +0 -24
  135. package/dist/schemas/lit-case-variables-tab.schema.js.map +0 -1
  136. package/dist/schemas/lit-data-grid-tanstack-column-array.schema.js +0 -6
  137. package/dist/schemas/lit-data-grid-tanstack-column-array.schema.js.map +0 -1
  138. package/dist/schemas/lit-data-grid-tanstack-column-custom-filter-array.schema.js +0 -6
  139. package/dist/schemas/lit-data-grid-tanstack-column-custom-filter-array.schema.js.map +0 -1
  140. package/dist/schemas/lit-data-grid-tanstack-column-custom-filter.schema.js +0 -11
  141. package/dist/schemas/lit-data-grid-tanstack-column-custom-filter.schema.js.map +0 -1
  142. package/dist/schemas/lit-data-grid-tanstack-column.schema.js +0 -55
  143. package/dist/schemas/lit-data-grid-tanstack-column.schema.js.map +0 -1
  144. package/dist/schemas/lit-data-grid-tanstack.schema.js +0 -99
  145. package/dist/schemas/lit-data-grid-tanstack.schema.js.map +0 -1
  146. package/dist/schemas/lit-section-tab-schema.js +0 -24
  147. package/dist/schemas/lit-section-tab-schema.js.map +0 -1
  148. package/dist/schemas/lit-tabs-overview-tab-array.schema.js +0 -6
  149. package/dist/schemas/lit-tabs-overview-tab-array.schema.js.map +0 -1
  150. package/dist/schemas/lit-tabs-overview-tab.schema.js +0 -32
  151. package/dist/schemas/lit-tabs-overview-tab.schema.js.map +0 -1
  152. package/dist/schemas/lit-tabs-overview.schema.js +0 -29
  153. package/dist/schemas/lit-tabs-overview.schema.js.map +0 -1
  154. package/dist/scripts/translate-locales.js +0 -69
  155. package/dist/scripts/translate-locales.js.map +0 -1
  156. package/dist/shared/filter-inputs.js +0 -427
  157. package/dist/shared/filter-inputs.js.map +0 -1
  158. package/dist/shared/lit-button.js.map +0 -1
  159. package/dist/shared/lit-case-variables-tab-cell.js +0 -226
  160. package/dist/shared/lit-case-variables-tab-cell.js.map +0 -1
  161. package/dist/shared/lit-checkbox.js +0 -171
  162. package/dist/shared/lit-checkbox.js.map +0 -1
  163. package/dist/shared/lit-custom-popper.js +0 -117
  164. package/dist/shared/lit-custom-popper.js.map +0 -1
  165. package/dist/shared/lit-data-grid-action-buttons-popover.js +0 -295
  166. package/dist/shared/lit-data-grid-action-buttons-popover.js.map +0 -1
  167. package/dist/shared/lit-data-grid-density-popover.js +0 -84
  168. package/dist/shared/lit-data-grid-density-popover.js.map +0 -1
  169. package/dist/shared/lit-data-grid-export-popover.js +0 -68
  170. package/dist/shared/lit-data-grid-export-popover.js.map +0 -1
  171. package/dist/shared/lit-data-grid-operators-popover.js +0 -114
  172. package/dist/shared/lit-data-grid-operators-popover.js.map +0 -1
  173. package/dist/shared/lit-data-grid-row-actions.js +0 -76
  174. package/dist/shared/lit-data-grid-row-actions.js.map +0 -1
  175. package/dist/shared/lit-date-picker.js +0 -606
  176. package/dist/shared/lit-date-picker.js.map +0 -1
  177. package/dist/shared/lit-icon-button.js +0 -105
  178. package/dist/shared/lit-icon-button.js.map +0 -1
  179. package/dist/shared/lit-icon.js +0 -284
  180. package/dist/shared/lit-icon.js.map +0 -1
  181. package/dist/shared/lit-input.js +0 -239
  182. package/dist/shared/lit-input.js.map +0 -1
  183. package/dist/shared/lit-label.js +0 -104
  184. package/dist/shared/lit-label.js.map +0 -1
  185. package/dist/shared/lit-loader.js +0 -69
  186. package/dist/shared/lit-loader.js.map +0 -1
  187. package/dist/shared/lit-loading-bar.js +0 -127
  188. package/dist/shared/lit-loading-bar.js.map +0 -1
  189. package/dist/shared/lit-menu-item.js +0 -99
  190. package/dist/shared/lit-menu-item.js.map +0 -1
  191. package/dist/shared/lit-menu.js +0 -42
  192. package/dist/shared/lit-menu.js.map +0 -1
  193. package/dist/shared/lit-modal-body.js +0 -22
  194. package/dist/shared/lit-modal-body.js.map +0 -1
  195. package/dist/shared/lit-modal-footer.js +0 -29
  196. package/dist/shared/lit-modal-footer.js.map +0 -1
  197. package/dist/shared/lit-modal-header.js +0 -36
  198. package/dist/shared/lit-modal-header.js.map +0 -1
  199. package/dist/shared/lit-modal.js +0 -169
  200. package/dist/shared/lit-modal.js.map +0 -1
  201. package/dist/shared/lit-overflow-tooltip.js +0 -103
  202. package/dist/shared/lit-overflow-tooltip.js.map +0 -1
  203. package/dist/shared/lit-pill.js +0 -88
  204. package/dist/shared/lit-pill.js.map +0 -1
  205. package/dist/shared/lit-progress-bar.js.map +0 -1
  206. package/dist/shared/lit-responsive-button.js +0 -94
  207. package/dist/shared/lit-responsive-button.js.map +0 -1
  208. package/dist/shared/lit-select-field.js +0 -459
  209. package/dist/shared/lit-select-field.js.map +0 -1
  210. package/dist/shared/lit-select.js +0 -413
  211. package/dist/shared/lit-select.js.map +0 -1
  212. package/dist/shared/lit-settings.js +0 -77
  213. package/dist/shared/lit-settings.js.map +0 -1
  214. package/dist/shared/lit-text-field.js +0 -222
  215. package/dist/shared/lit-text-field.js.map +0 -1
  216. package/dist/shared/lit-toggle.js +0 -222
  217. package/dist/shared/lit-toggle.js.map +0 -1
  218. package/dist/shared/lit-tooltip.js +0 -166
  219. package/dist/shared/lit-tooltip.js.map +0 -1
  220. package/dist/shared/simple-popper.js +0 -266
  221. package/dist/shared/simple-popper.js.map +0 -1
  222. package/dist/shared/simple-tooltip.js.map +0 -1
  223. package/dist/shared/styles/button-shared-styles.js.map +0 -1
  224. package/dist/style.css +0 -1
  225. package/dist/styles.js +0 -169
  226. package/dist/styles.js.map +0 -1
  227. package/dist/utils/currency.js.map +0 -1
  228. package/dist/utils/custom-filters.js.map +0 -1
  229. package/dist/utils/date.js.map +0 -1
  230. package/dist/utils/getOperatorByType.js.map +0 -1
  231. package/dist/utils/getOverviewValue.js +0 -177
  232. package/dist/utils/getOverviewValue.js.map +0 -1
  233. package/dist/utils/localization.js.map +0 -1
  234. package/dist/utils/utils.js +0 -13
  235. package/dist/utils/utils.js.map +0 -1
  236. package/dist/utils/validate-json-schema.js +0 -8
  237. package/dist/utils/validate-json-schema.js.map +0 -1
  238. package/dist/validators/validator.js +0 -7
  239. package/dist/validators/validator.js.map +0 -1
@@ -1,205 +1,157 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
1
+ import { customElement as f } from "../node_modules/@lit/reactive-element/decorators/custom-element.js";
2
+ import { property as c } from "../node_modules/@lit/reactive-element/decorators/property.js";
3
+ import { state as l } from "../node_modules/@lit/reactive-element/decorators/state.js";
4
+ import { LitElement as v, html as h, css as y } from "lit";
5
+ import { msg as g } from "@lit/localize";
6
+ import C from "sortablejs";
7
+ var S = Object.defineProperty, T = Object.getOwnPropertyDescriptor, n = (t, e, a, o) => {
8
+ for (var s = o > 1 ? void 0 : o ? T(e, a) : e, d = t.length - 1, r; d >= 0; d--)
9
+ (r = t[d]) && (s = (o ? r(e, a, s) : r(s)) || s);
10
+ return o && s && S(e, a, s), s;
6
11
  };
7
- import { customElement, property, state } from 'lit/decorators.js';
8
- import { LitElement, html, css } from 'lit';
9
- import { msg } from '@lit/localize';
10
- import Sortable from 'sortablejs';
11
- // components
12
- import '../shared/lit-icon.js';
13
- import '../shared/lit-button.js';
14
- import '../assets/illustration/no-content.js';
15
- import './lit-section-tab.js';
16
- import './components-settings/tabs-overview-settings.js';
17
- import './modals/lit-delete-modal.js';
18
- let LitTabsOverview = class LitTabsOverview extends LitElement {
19
- constructor() {
20
- super(...arguments);
21
- this.tabs = [];
22
- this.enableSettings = false;
23
- this.userLang = 'cs';
24
- this.allowedLang = ['cs'];
25
- this.onSettingsChanged = () => { };
26
- this.selectedTabId = '';
27
- this.editTabId = '';
28
- this.deleteTabId = '';
29
- this.hasContentForTab = {};
30
- this.isOpenModal = false;
31
- this.isOpenDeleteModal = false;
32
- this.sortableInstances = [];
33
- this.isAddMode = false;
34
- this.sortableGroupId = `group-${Math.random().toString(36).substring(2, 9)}`;
35
- }
36
- connectedCallback() {
37
- super.connectedCallback();
38
- }
39
- disconnectedCallback() {
40
- this.destroySortables();
41
- super.disconnectedCallback();
42
- }
43
- destroySortables() {
44
- this.sortableInstances.forEach((instance) => instance.destroy());
45
- this.sortableInstances = [];
46
- }
47
- initSortable() {
48
- this.updateComplete.then(() => {
49
- const container = this.shadowRoot?.querySelector('.tabs-container');
50
- if (!container)
51
- return;
52
- let originalNodes = [];
53
- const sortable = Sortable.create(container, {
54
- group: this.sortableGroupId,
55
- animation: 150,
56
- handle: '.drag-handle',
57
- ghostClass: 'sortable-ghost',
58
- chosenClass: 'sortable-chosen',
59
- dragClass: 'sortable-drag',
60
- sort: true,
61
- onStart: (evt) => {
62
- originalNodes = Array.from(evt.from.childNodes);
63
- },
64
- onEnd: (evt) => {
65
- evt.from.innerHTML = '';
66
- originalNodes.forEach((node) => evt.from.appendChild(node));
67
- const { oldIndex, newIndex } = evt;
68
- if (oldIndex == null || newIndex == null || oldIndex === newIndex)
69
- return;
70
- const updated = [...this.tabs];
71
- const [moved] = updated.splice(oldIndex, 1);
72
- updated.splice(newIndex, 0, moved);
73
- this.tabs = updated;
74
- this.onSettingsChanged?.(updated);
75
- this.onSettingsChangedEvent(updated);
76
- },
77
- });
78
- this.sortableInstances.push(sortable);
79
- });
80
- }
81
- onSettingsChangedEvent(value) {
82
- this.dispatchEvent(new CustomEvent('onSettingsChanged', {
83
- bubbles: true,
84
- composed: true,
85
- detail: value,
86
- }));
87
- }
88
- selectTab(tabId) {
89
- this.selectedTabId = tabId;
90
- }
91
- firstUpdated() {
92
- if (this.initialSelectedTabId) {
93
- this.selectedTabId = this.initialSelectedTabId;
12
+ let i = class extends v {
13
+ constructor() {
14
+ super(...arguments), this.tabs = [], this.enableSettings = !1, this.userLang = "cs", this.allowedLang = ["cs"], this.onSettingsChanged = () => {
15
+ }, this.selectedTabId = "", this.editTabId = "", this.deleteTabId = "", this.hasContentForTab = {}, this.isOpenModal = !1, this.isOpenDeleteModal = !1, this.sortableInstances = [], this.isAddMode = !1, this.sortableGroupId = `group-${Math.random().toString(36).substring(2, 9)}`;
16
+ }
17
+ connectedCallback() {
18
+ super.connectedCallback();
19
+ }
20
+ disconnectedCallback() {
21
+ this.destroySortables(), super.disconnectedCallback();
22
+ }
23
+ destroySortables() {
24
+ this.sortableInstances.forEach((t) => t.destroy()), this.sortableInstances = [];
25
+ }
26
+ initSortable() {
27
+ this.updateComplete.then(() => {
28
+ var o;
29
+ const t = (o = this.shadowRoot) == null ? void 0 : o.querySelector(".tabs-container");
30
+ if (!t) return;
31
+ let e = [];
32
+ const a = C.create(t, {
33
+ group: this.sortableGroupId,
34
+ animation: 150,
35
+ handle: ".drag-handle",
36
+ ghostClass: "sortable-ghost",
37
+ chosenClass: "sortable-chosen",
38
+ dragClass: "sortable-drag",
39
+ sort: !0,
40
+ onStart: (s) => {
41
+ e = Array.from(s.from.childNodes);
42
+ },
43
+ onEnd: (s) => {
44
+ var b;
45
+ s.from.innerHTML = "", e.forEach((u) => s.from.appendChild(u));
46
+ const { oldIndex: d, newIndex: r } = s;
47
+ if (d == null || r == null || d === r) return;
48
+ const p = [...this.tabs], [m] = p.splice(d, 1);
49
+ p.splice(r, 0, m), this.tabs = p, (b = this.onSettingsChanged) == null || b.call(this, p), this.onSettingsChangedEvent(p);
94
50
  }
95
- else if (this.tabs.length > 0) {
96
- this.selectedTabId = this.tabs[0].id;
97
- }
98
- if (this.enableSettings) {
99
- this.initSortable();
100
- }
101
- }
102
- handleSlotChange(e, tabId) {
103
- const slot = e.target;
104
- const assigned = slot.assignedNodes({ flatten: true });
105
- const hasContent = assigned.length > 0;
106
- this.hasContentForTab = {
107
- ...this.hasContentForTab,
108
- [tabId]: hasContent,
109
- };
110
- }
111
- toggleModal(id) {
112
- if (id) {
113
- this.editTabId = id;
114
- }
115
- this.isOpenModal = !this.isOpenModal;
116
- }
117
- onSettingsChangedCallback(value) {
118
- this.isAddMode = false;
119
- this.tabs = value ? [...value] : [];
120
- this.onSettingsChanged?.(this.tabs);
121
- this.onSettingsChangedEvent(this.tabs);
122
- }
123
- deleteTab(id) {
124
- this.tabs = this.tabs.filter((tab) => tab.id !== id);
125
- this.onSettingsChanged?.(this.tabs);
126
- this.onSettingsChangedEvent(this.tabs);
127
- this.isOpenDeleteModal = false;
128
- }
129
- render() {
130
- return html `
51
+ });
52
+ this.sortableInstances.push(a);
53
+ });
54
+ }
55
+ onSettingsChangedEvent(t) {
56
+ this.dispatchEvent(
57
+ new CustomEvent("onSettingsChanged", {
58
+ bubbles: !0,
59
+ composed: !0,
60
+ detail: t
61
+ })
62
+ );
63
+ }
64
+ selectTab(t) {
65
+ this.selectedTabId = t;
66
+ }
67
+ firstUpdated() {
68
+ this.initialSelectedTabId ? this.selectedTabId = this.initialSelectedTabId : this.tabs.length > 0 && (this.selectedTabId = this.tabs[0].id), this.enableSettings && this.initSortable();
69
+ }
70
+ handleSlotChange(t, e) {
71
+ const s = t.target.assignedNodes({ flatten: !0 }).length > 0;
72
+ this.hasContentForTab = {
73
+ ...this.hasContentForTab,
74
+ [e]: s
75
+ };
76
+ }
77
+ toggleModal(t) {
78
+ t && (this.editTabId = t), this.isOpenModal = !this.isOpenModal;
79
+ }
80
+ onSettingsChangedCallback(t) {
81
+ var e;
82
+ this.isAddMode = !1, this.tabs = t ? [...t] : [], (e = this.onSettingsChanged) == null || e.call(this, this.tabs), this.onSettingsChangedEvent(this.tabs);
83
+ }
84
+ deleteTab(t) {
85
+ var e;
86
+ this.tabs = this.tabs.filter((a) => a.id !== t), (e = this.onSettingsChanged) == null || e.call(this, this.tabs), this.onSettingsChangedEvent(this.tabs), this.isOpenDeleteModal = !1;
87
+ }
88
+ render() {
89
+ return h`
131
90
  <div class="tabs-wrapper">
132
91
  <div class="tabs-header">
133
92
  <div class="tabs-container">
134
- ${this.tabs.map((tab) => html `
93
+ ${this.tabs.map(
94
+ (t) => {
95
+ var e, a, o;
96
+ return h`
135
97
  <div class="tab">
136
- ${this.enableSettings
137
- ? html `<div class="drag-handle">
98
+ ${this.enableSettings ? h`<div class="drag-handle">
138
99
  <lit-icon
139
100
  style="cursor: pointer"
140
- icon="${'hamburger'}"
101
+ icon="${"hamburger"}"
141
102
  size="1rem"
142
103
  ></lit-icon>
143
- </div>`
144
- : null}
104
+ </div>` : null}
145
105
 
146
106
  <lit-button
147
107
  variant="text"
148
- label="${tab.label?.[this.userLang]
149
- ? tab.label?.[this.userLang]
150
- : tab.label?.default}"
151
- .icon="${tab.icon}"
152
- .active="${tab.id === this.selectedTabId ? 'active' : ''}"
153
- @click=${() => this.selectTab(tab.id)}
108
+ label="${(e = t.label) != null && e[this.userLang] ? (a = t.label) == null ? void 0 : a[this.userLang] : (o = t.label) == null ? void 0 : o.default}"
109
+ .icon="${t.icon}"
110
+ .active="${t.id === this.selectedTabId ? "active" : ""}"
111
+ @click=${() => this.selectTab(t.id)}
154
112
  >
155
113
  </lit-button>
156
- ${this.enableSettings
157
- ? html `<div
114
+ ${this.enableSettings ? h`<div
158
115
  style="display: flex;flex-direction: column;align-items: center"
159
116
  >
160
117
  <lit-icon
161
118
  style="cursor: pointer"
162
119
  @click="${() => {
163
- this.isAddMode = false;
164
- this.toggleModal(tab.id);
165
- }}"
166
- icon="${'pen'}"
120
+ this.isAddMode = !1, this.toggleModal(t.id);
121
+ }}"
122
+ icon="${"pen"}"
167
123
  size="1rem"
168
124
  ></lit-icon>
169
125
  <lit-icon
170
126
  style="cursor: pointer"
171
127
  @click="${() => {
172
- this.deleteTabId = tab.id;
173
- this.isOpenDeleteModal = true;
174
- }}"
175
- icon="${'trash'}"
128
+ this.deleteTabId = t.id, this.isOpenDeleteModal = !0;
129
+ }}"
130
+ icon="${"trash"}"
176
131
  size="1rem"
177
132
  ></lit-icon>
178
- </div> `
179
- : null}
133
+ </div> ` : null}
180
134
  </div>
181
- `)}
135
+ `;
136
+ }
137
+ )}
182
138
  </div>
183
- ${this.enableSettings
184
- ? html `
139
+ ${this.enableSettings ? h`
185
140
  <lit-icon-button
186
141
  variant="dashed"
187
142
  size="medium"
188
- .icon="${'add'}"
143
+ .icon="${"add"}"
189
144
  @click="${() => {
190
- this.isAddMode = true;
191
- this.toggleModal();
192
- }}"
145
+ this.isAddMode = !0, this.toggleModal();
146
+ }}"
193
147
  ></lit-icon-button>
194
- `
195
- : null}
148
+ ` : null}
196
149
  </div>
197
150
  <tabs-overview-settings
198
151
  .allowedLang="${this.allowedLang}"
199
152
  .onClose="${() => {
200
- this.isOpenModal = false;
201
- this.editTabId = '';
202
- }}"
153
+ this.isOpenModal = !1, this.editTabId = "";
154
+ }}"
203
155
  .isOpenModal="${this.isOpenModal}"
204
156
  .tabs="${this.tabs}"
205
157
  .selectedTabId="${this.editTabId}"
@@ -208,47 +160,49 @@ let LitTabsOverview = class LitTabsOverview extends LitElement {
208
160
  ></tabs-overview-settings>
209
161
  <lit-delete-modal
210
162
  .isOpen="${this.isOpenDeleteModal}"
211
- .text="${msg('Opravdu chcete tab odstranit?')}"
163
+ .text="${g("Opravdu chcete tab odstranit?")}"
212
164
  .onClose="${() => {
213
- this.isOpenDeleteModal = false;
214
- }}"
165
+ this.isOpenDeleteModal = !1;
166
+ }}"
215
167
  .onDelete="${() => {
216
- this.isOpenDeleteModal = false;
217
- this.deleteTab(this.deleteTabId);
218
- }}"
168
+ this.isOpenDeleteModal = !1, this.deleteTab(this.deleteTabId);
169
+ }}"
219
170
  ></lit-delete-modal>
220
171
  <div class="tabs-content">
221
- ${this.tabs.map((tab) => tab.id === this.selectedTabId
222
- ? html `
172
+ ${this.tabs.map(
173
+ (t) => {
174
+ var e, a, o;
175
+ return t.id === this.selectedTabId ? h`
223
176
  <div class="tab-panel">
224
177
  <slot
225
178
  class="tab-slot"
226
- name="${tab.id}"
227
- @slotchange=${(e) => this.handleSlotChange(e, tab.id)}
179
+ name="${t.id}"
180
+ @slotchange=${(s) => this.handleSlotChange(s, t.id)}
228
181
  ></slot>
229
182
 
230
- ${!this.hasContentForTab[tab.id]
231
- ? html `
183
+ ${this.hasContentForTab[t.id] ? null : h`
232
184
  <div class="no-content">
233
185
  <div
234
186
  style="max-height: 7.125rem; max-width: 7.125rem"
235
187
  >
236
188
  <no-content></no-content>
237
189
  </div>
238
- ${msg(`${tab.noContentText?.[this.userLang] ? tab.noContentText?.[this.userLang] : tab.noContentText?.default || 'Pro tento tab není momentálně k dispozici žádný obsah.'}`)}
190
+ ${g(
191
+ `${(e = t.noContentText) != null && e[this.userLang] ? (a = t.noContentText) == null ? void 0 : a[this.userLang] : ((o = t.noContentText) == null ? void 0 : o.default) || "Pro tento tab není momentálně k dispozici žádný obsah."}`
192
+ )}
239
193
  </div>
240
- `
241
- : null}
194
+ `}
242
195
  </div>
243
- `
244
- : null)}
196
+ ` : null;
197
+ }
198
+ )}
245
199
  </div>
246
200
  </div>
247
201
  `;
248
- }
202
+ }
249
203
  };
250
- LitTabsOverview.styles = [
251
- css `
204
+ i.styles = [
205
+ y`
252
206
  :host {
253
207
  font-family: 'Inter', sans-serif;
254
208
  }
@@ -294,52 +248,53 @@ LitTabsOverview.styles = [
294
248
  display: flex;
295
249
  align-items: center;
296
250
  }
297
- `,
251
+ `
298
252
  ];
299
- __decorate([
300
- property({ type: Array })
301
- ], LitTabsOverview.prototype, "tabs", void 0);
302
- __decorate([
303
- property({ type: String })
304
- ], LitTabsOverview.prototype, "initialSelectedTabId", void 0);
305
- __decorate([
306
- property({ type: Boolean })
307
- ], LitTabsOverview.prototype, "enableSettings", void 0);
308
- __decorate([
309
- property({ type: String })
310
- ], LitTabsOverview.prototype, "userLang", void 0);
311
- __decorate([
312
- property({ type: Array })
313
- ], LitTabsOverview.prototype, "allowedLang", void 0);
314
- __decorate([
315
- property({ attribute: false })
316
- ], LitTabsOverview.prototype, "onSettingsChanged", void 0);
317
- __decorate([
318
- state()
319
- ], LitTabsOverview.prototype, "selectedTabId", void 0);
320
- __decorate([
321
- state()
322
- ], LitTabsOverview.prototype, "editTabId", void 0);
323
- __decorate([
324
- state()
325
- ], LitTabsOverview.prototype, "deleteTabId", void 0);
326
- __decorate([
327
- state()
328
- ], LitTabsOverview.prototype, "hasContentForTab", void 0);
329
- __decorate([
330
- state()
331
- ], LitTabsOverview.prototype, "isOpenModal", void 0);
332
- __decorate([
333
- state()
334
- ], LitTabsOverview.prototype, "isOpenDeleteModal", void 0);
335
- __decorate([
336
- state()
337
- ], LitTabsOverview.prototype, "sortableInstances", void 0);
338
- __decorate([
339
- state()
340
- ], LitTabsOverview.prototype, "isAddMode", void 0);
341
- LitTabsOverview = __decorate([
342
- customElement('lit-tabs-overview')
343
- ], LitTabsOverview);
344
- export { LitTabsOverview };
345
- //# sourceMappingURL=lit-tabs-overview.js.map
253
+ n([
254
+ c({ type: Array })
255
+ ], i.prototype, "tabs", 2);
256
+ n([
257
+ c({ type: String })
258
+ ], i.prototype, "initialSelectedTabId", 2);
259
+ n([
260
+ c({ type: Boolean })
261
+ ], i.prototype, "enableSettings", 2);
262
+ n([
263
+ c({ type: String })
264
+ ], i.prototype, "userLang", 2);
265
+ n([
266
+ c({ type: Array })
267
+ ], i.prototype, "allowedLang", 2);
268
+ n([
269
+ c({ attribute: !1 })
270
+ ], i.prototype, "onSettingsChanged", 2);
271
+ n([
272
+ l()
273
+ ], i.prototype, "selectedTabId", 2);
274
+ n([
275
+ l()
276
+ ], i.prototype, "editTabId", 2);
277
+ n([
278
+ l()
279
+ ], i.prototype, "deleteTabId", 2);
280
+ n([
281
+ l()
282
+ ], i.prototype, "hasContentForTab", 2);
283
+ n([
284
+ l()
285
+ ], i.prototype, "isOpenModal", 2);
286
+ n([
287
+ l()
288
+ ], i.prototype, "isOpenDeleteModal", 2);
289
+ n([
290
+ l()
291
+ ], i.prototype, "sortableInstances", 2);
292
+ n([
293
+ l()
294
+ ], i.prototype, "isAddMode", 2);
295
+ i = n([
296
+ f("lit-tabs-overview")
297
+ ], i);
298
+ export {
299
+ i as LitTabsOverview
300
+ };
@@ -1,9 +1,14 @@
1
- import React from 'react';
2
- import { createComponent } from '@lit-labs/react';
3
- import { LitAttachmentsTab } from '../lit-attachments-tab.js'; // Import Lit komponentu
4
- export const AttachmentsTab = createComponent({
5
- tagName: 'lit-attachments-tab', // Názov custom elementu
6
- elementClass: LitAttachmentsTab, // Trieda Lit komponentu
7
- react: React, // React objekt
1
+ import t from "react";
2
+ import { createComponent as a } from "@lit-labs/react";
3
+ import { LitAttachmentsTab as e } from "../lit-attachments-tab.js";
4
+ const c = a({
5
+ tagName: "lit-attachments-tab",
6
+ // Názov custom elementu
7
+ elementClass: e,
8
+ // Trieda Lit komponentu
9
+ react: t
10
+ // React objekt
8
11
  });
9
- //# sourceMappingURL=attachments-tab.js.map
12
+ export {
13
+ c as AttachmentsTab
14
+ };
@@ -1,9 +1,14 @@
1
- import React from 'react';
2
- import { createComponent } from '@lit-labs/react';
3
- import { LitBadge } from '../lit-badge.js'; // Import Lit komponentu
4
- export const Badge = createComponent({
5
- tagName: 'lit-badge', // Názov custom elementu
6
- elementClass: LitBadge, // Trieda Lit komponentu
7
- react: React, // React objekt
1
+ import e from "react";
2
+ import { createComponent as t } from "@lit-labs/react";
3
+ import { LitBadge as o } from "../lit-badge.js";
4
+ const i = t({
5
+ tagName: "lit-badge",
6
+ // Názov custom elementu
7
+ elementClass: o,
8
+ // Trieda Lit komponentu
9
+ react: e
10
+ // React objekt
8
11
  });
9
- //# sourceMappingURL=badge.js.map
12
+ export {
13
+ i as Badge
14
+ };
@@ -1,9 +1,14 @@
1
- import React from 'react';
2
- import { createComponent } from '@lit-labs/react';
3
- import { LitButton } from '../../shared/lit-button.js'; // Import Lit komponentu
4
- export const Button = createComponent({
5
- tagName: 'lit-button', // Názov custom elementu
6
- elementClass: LitButton, // Trieda Lit komponentu
7
- react: React, // React objekt
1
+ import t from "react";
2
+ import { createComponent as o } from "@lit-labs/react";
3
+ import { LitButton as e } from "../../shared/lit-button.js";
4
+ const a = o({
5
+ tagName: "lit-button",
6
+ // Názov custom elementu
7
+ elementClass: e,
8
+ // Trieda Lit komponentu
9
+ react: t
10
+ // React objekt
8
11
  });
9
- //# sourceMappingURL=button.js.map
12
+ export {
13
+ a as Button
14
+ };
@@ -1,9 +1,14 @@
1
- import React from 'react';
2
- import { createComponent } from '@lit-labs/react';
3
- import { LitCaseVariablesTab } from '../lit-case-variables-tab.js'; // Import Lit komponentu
4
- export const CaseVariablesTab = createComponent({
5
- tagName: 'lit-case-variables-tab', // Názov custom elementu
6
- elementClass: LitCaseVariablesTab, // Trieda Lit komponentu
7
- react: React, // React objekt
1
+ import a from "react";
2
+ import { createComponent as e } from "@lit-labs/react";
3
+ import { LitCaseVariablesTab as t } from "../lit-case-variables-tab.js";
4
+ const s = e({
5
+ tagName: "lit-case-variables-tab",
6
+ // Názov custom elementu
7
+ elementClass: t,
8
+ // Trieda Lit komponentu
9
+ react: a
10
+ // React objekt
8
11
  });
9
- //# sourceMappingURL=case-variables-tab.js.map
12
+ export {
13
+ s as CaseVariablesTab
14
+ };
@@ -1,9 +1,14 @@
1
- import React from 'react';
2
- import { createComponent } from '@lit-labs/react';
3
- import { LitChart } from '../lit-chart.js'; // Import Lit komponentu
4
- export const Chart = createComponent({
5
- tagName: 'lit-chart', // Názov custom elementu
6
- elementClass: LitChart, // Trieda Lit komponentu
7
- react: React, // React objekt
1
+ import t from "react";
2
+ import { createComponent as r } from "@lit-labs/react";
3
+ import { LitChart as e } from "../lit-chart.js";
4
+ const c = r({
5
+ tagName: "lit-chart",
6
+ // Názov custom elementu
7
+ elementClass: e,
8
+ // Trieda Lit komponentu
9
+ react: t
10
+ // React objekt
8
11
  });
9
- //# sourceMappingURL=chart.js.map
12
+ export {
13
+ c as Chart
14
+ };
@@ -1,9 +1,14 @@
1
- import React from 'react';
2
- import { createComponent } from '@lit-labs/react';
3
- import { LitDataGridTanstack } from '../lit-data-grid-tanstack.js'; // Import Lit komponentu
4
- export const DataGridTanstack = createComponent({
5
- tagName: 'lit-data-grid-tanstack', // Názov custom elementu
6
- elementClass: LitDataGridTanstack, // Trieda Lit komponentu
7
- react: React, // React objekt
1
+ import t from "react";
2
+ import { createComponent as a } from "@lit-labs/react";
3
+ import { LitDataGridTanstack as r } from "../lit-data-grid-tanstack.js";
4
+ const i = a({
5
+ tagName: "lit-data-grid-tanstack",
6
+ // Názov custom elementu
7
+ elementClass: r,
8
+ // Trieda Lit komponentu
9
+ react: t
10
+ // React objekt
8
11
  });
9
- //# sourceMappingURL=data-grid-tanstack.js.map
12
+ export {
13
+ i as DataGridTanstack
14
+ };