overview-components 1.0.93 → 1.0.95

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (289) hide show
  1. package/dist/_virtual/FileSaver.min.js +4 -0
  2. package/dist/_virtual/___vite-browser-external.js +6 -0
  3. package/dist/_virtual/__vite-browser-external.js +4 -0
  4. package/dist/_virtual/_commonjs-dynamic-modules.js +6 -0
  5. package/dist/_virtual/_commonjsHelpers.js +28 -0
  6. package/dist/_virtual/index.js +4 -0
  7. package/dist/_virtual/lodash.js +4 -0
  8. package/dist/_virtual/pdf.js +4 -0
  9. package/dist/_virtual/react.production.js +4 -0
  10. package/dist/assets/generated/locales/de.js +72 -70
  11. package/dist/assets/generated/locales/en.js +72 -70
  12. package/dist/assets/generated/locales/fr.js +72 -70
  13. package/dist/assets/generated/locales/hr.js +72 -70
  14. package/dist/assets/generated/locales/it.js +72 -70
  15. package/dist/assets/generated/locales/pl.js +72 -70
  16. package/dist/assets/generated/locales/ro.js +72 -70
  17. package/dist/assets/generated/locales/sk.js +72 -70
  18. package/dist/assets/generated/locales/sr.js +72 -70
  19. package/dist/components/lit-attachments-tab.js +271 -432
  20. package/dist/components/lit-badge.js +40 -40
  21. package/dist/components/lit-case-variables-tab.js +382 -497
  22. package/dist/components/lit-chart.js +378 -406
  23. package/dist/components/lit-data-grid-tanstack.js +1150 -1663
  24. package/dist/components/lit-filter-modal.js +198 -230
  25. package/dist/components/lit-multiselect-item.js +301 -477
  26. package/dist/components/lit-section-tab.js +73 -85
  27. package/dist/components/lit-tabs-overview.js +191 -232
  28. package/dist/components/react-wrappers/attachments-tab.js +13 -8
  29. package/dist/components/react-wrappers/badge.js +13 -8
  30. package/dist/components/react-wrappers/button.js +13 -8
  31. package/dist/components/react-wrappers/case-variables-tab.js +13 -8
  32. package/dist/components/react-wrappers/chart.js +13 -8
  33. package/dist/components/react-wrappers/data-grid-tanstack.js +13 -8
  34. package/dist/components/react-wrappers/filter-modal.js +13 -8
  35. package/dist/components/react-wrappers/progress-bar.js +13 -8
  36. package/dist/components/react-wrappers/section-tab.js +13 -8
  37. package/dist/components/react-wrappers/tabs-overview.js +13 -8
  38. package/dist/index.js +42 -43
  39. package/dist/libs/xlsx.mini.min.js +10 -0
  40. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +432 -0
  41. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +306 -0
  42. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +127 -0
  43. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +127 -0
  44. package/dist/node_modules/@kurkle/color/dist/color.esm.js +448 -0
  45. package/dist/node_modules/@lit/localize/init/install.js +11 -0
  46. package/dist/node_modules/@lit/localize/init/runtime.js +42 -0
  47. package/dist/node_modules/@lit/localize/internal/default-msg.js +10 -0
  48. package/dist/node_modules/@lit/localize/internal/deferred.js +21 -0
  49. package/dist/node_modules/@lit/localize/internal/fnv1a64.js +17 -0
  50. package/dist/node_modules/@lit/localize/internal/id-generation.js +14 -0
  51. package/dist/node_modules/@lit/localize/internal/locale-status-event.js +9 -0
  52. package/dist/node_modules/@lit/localize/internal/runtime-msg.js +42 -0
  53. package/dist/node_modules/@lit/localize/internal/str-tag.js +15 -0
  54. package/dist/node_modules/@lit/react/create-component.js +35 -0
  55. package/dist/node_modules/@lit/reactive-element/css-tag.js +50 -0
  56. package/dist/node_modules/@lit/reactive-element/decorators/base.js +9 -0
  57. package/dist/node_modules/@lit/reactive-element/decorators/custom-element.js +13 -0
  58. package/dist/node_modules/@lit/reactive-element/decorators/property.js +37 -0
  59. package/dist/node_modules/@lit/reactive-element/decorators/query.js +20 -0
  60. package/dist/node_modules/@lit/reactive-element/decorators/state.js +12 -0
  61. package/dist/node_modules/@lit/reactive-element/reactive-element.js +250 -0
  62. package/dist/node_modules/@tanstack/lit-table/build/lib/index.js +104 -0
  63. package/dist/node_modules/@tanstack/lit-virtual/dist/esm/index.js +40 -0
  64. package/dist/node_modules/@tanstack/table-core/build/lib/index.js +1956 -0
  65. package/dist/node_modules/@tanstack/virtual-core/dist/esm/index.js +490 -0
  66. package/dist/node_modules/@tanstack/virtual-core/dist/esm/utils.js +52 -0
  67. package/dist/node_modules/chart.js/dist/chart.js +7122 -0
  68. package/dist/node_modules/chart.js/dist/chunks/helpers.segment.js +1691 -0
  69. package/dist/node_modules/file-saver/dist/FileSaver.min.js +74 -0
  70. package/dist/node_modules/lit-element/lit-element.js +51 -0
  71. package/dist/node_modules/lit-html/async-directive.js +69 -0
  72. package/dist/node_modules/lit-html/directive-helpers.js +45 -0
  73. package/dist/node_modules/lit-html/directive.js +27 -0
  74. package/dist/node_modules/lit-html/directives/ref.js +42 -0
  75. package/dist/node_modules/lit-html/directives/repeat.js +61 -0
  76. package/dist/node_modules/lit-html/directives/style-map.js +36 -0
  77. package/dist/node_modules/lit-html/directives/unsafe-html.js +27 -0
  78. package/dist/node_modules/lit-html/lit-html.js +243 -0
  79. package/dist/node_modules/lodash/lodash.js +3678 -0
  80. package/dist/node_modules/luxon/src/datetime.js +1793 -0
  81. package/dist/node_modules/luxon/src/duration.js +723 -0
  82. package/dist/node_modules/luxon/src/errors.js +40 -0
  83. package/dist/node_modules/luxon/src/impl/conversions.js +92 -0
  84. package/dist/node_modules/luxon/src/impl/diff.js +36 -0
  85. package/dist/node_modules/luxon/src/impl/digits.js +74 -0
  86. package/dist/node_modules/luxon/src/impl/english.js +138 -0
  87. package/dist/node_modules/luxon/src/impl/formats.js +150 -0
  88. package/dist/node_modules/luxon/src/impl/formatter.js +245 -0
  89. package/dist/node_modules/luxon/src/impl/invalid.js +11 -0
  90. package/dist/node_modules/luxon/src/impl/locale.js +282 -0
  91. package/dist/node_modules/luxon/src/impl/regexParser.js +202 -0
  92. package/dist/node_modules/luxon/src/impl/tokenParser.js +329 -0
  93. package/dist/node_modules/luxon/src/impl/util.js +206 -0
  94. package/dist/node_modules/luxon/src/impl/zoneUtil.js +19 -0
  95. package/dist/node_modules/luxon/src/info.js +180 -0
  96. package/dist/node_modules/luxon/src/interval.js +466 -0
  97. package/dist/node_modules/luxon/src/settings.js +150 -0
  98. package/dist/node_modules/luxon/src/zone.js +88 -0
  99. package/dist/node_modules/luxon/src/zones/IANAZone.js +178 -0
  100. package/dist/node_modules/luxon/src/zones/fixedOffsetZone.js +125 -0
  101. package/dist/node_modules/luxon/src/zones/invalidZone.js +41 -0
  102. package/dist/node_modules/luxon/src/zones/systemZone.js +47 -0
  103. package/dist/node_modules/pdfjs-dist/build/pdf.js +10310 -0
  104. package/dist/node_modules/react/cjs/react.production.js +417 -0
  105. package/dist/node_modules/react/index.js +10 -0
  106. package/dist/node_modules/sortablejs/modular/sortable.esm.js +1261 -0
  107. package/dist/shared/lit-button.js +66 -80
  108. package/dist/shared/lit-progress-bar.js +35 -33
  109. package/dist/shared/simple-tooltip.js +124 -198
  110. package/dist/shared/styles/button-shared-styles.js +8 -4
  111. package/dist/utils/currency.js +12 -15
  112. package/dist/utils/custom-filters.js +46 -80
  113. package/dist/utils/date.js +14 -21
  114. package/dist/utils/getOperatorByType.js +51 -65
  115. package/dist/utils/localization.js +29 -431
  116. package/dist/vite.svg +1 -0
  117. package/package.json +76 -74
  118. package/dist/assets/generated/locales/de.js.map +0 -1
  119. package/dist/assets/generated/locales/en.js.map +0 -1
  120. package/dist/assets/generated/locales/fr.js.map +0 -1
  121. package/dist/assets/generated/locales/hr.js.map +0 -1
  122. package/dist/assets/generated/locales/it.js.map +0 -1
  123. package/dist/assets/generated/locales/pl.js.map +0 -1
  124. package/dist/assets/generated/locales/ro.js.map +0 -1
  125. package/dist/assets/generated/locales/sk.js.map +0 -1
  126. package/dist/assets/generated/locales/sr.js.map +0 -1
  127. package/dist/assets/icons/iconGlyphs.js +0 -679
  128. package/dist/assets/icons/iconGlyphs.js.map +0 -1
  129. package/dist/assets/illustration/delete-illustration.js +0 -96
  130. package/dist/assets/illustration/delete-illustration.js.map +0 -1
  131. package/dist/assets/illustration/no-content.js +0 -167
  132. package/dist/assets/illustration/no-content.js.map +0 -1
  133. package/dist/assets/illustration/no-preview.js +0 -133
  134. package/dist/assets/illustration/no-preview.js.map +0 -1
  135. package/dist/assets/illustration/not-found.js +0 -106
  136. package/dist/assets/illustration/not-found.js.map +0 -1
  137. package/dist/assets/illustration/settings-illustration.js +0 -176
  138. package/dist/assets/illustration/settings-illustration.js.map +0 -1
  139. package/dist/components/components-settings/attachments-tab-settings.js +0 -226
  140. package/dist/components/components-settings/attachments-tab-settings.js.map +0 -1
  141. package/dist/components/components-settings/data-grid-settings.js +0 -318
  142. package/dist/components/components-settings/data-grid-settings.js.map +0 -1
  143. package/dist/components/components-settings/section-tab-settings.js +0 -269
  144. package/dist/components/components-settings/section-tab-settings.js.map +0 -1
  145. package/dist/components/components-settings/tabs-overview-settings.js +0 -439
  146. package/dist/components/components-settings/tabs-overview-settings.js.map +0 -1
  147. package/dist/components/lit-attachments-tab.js.map +0 -1
  148. package/dist/components/lit-badge.js.map +0 -1
  149. package/dist/components/lit-case-variables-tab.js.map +0 -1
  150. package/dist/components/lit-chart.js.map +0 -1
  151. package/dist/components/lit-data-grid-tanstack.js.map +0 -1
  152. package/dist/components/lit-filter-modal.js.map +0 -1
  153. package/dist/components/lit-multiselect-item.js.map +0 -1
  154. package/dist/components/lit-section-tab.js.map +0 -1
  155. package/dist/components/lit-tabs-overview.js.map +0 -1
  156. package/dist/components/modals/lit-confirm-modal.js +0 -120
  157. package/dist/components/modals/lit-confirm-modal.js.map +0 -1
  158. package/dist/components/modals/lit-delete-modal.js +0 -128
  159. package/dist/components/modals/lit-delete-modal.js.map +0 -1
  160. package/dist/components/react-wrappers/attachments-tab.js.map +0 -1
  161. package/dist/components/react-wrappers/badge.js.map +0 -1
  162. package/dist/components/react-wrappers/button.js.map +0 -1
  163. package/dist/components/react-wrappers/case-variables-tab.js.map +0 -1
  164. package/dist/components/react-wrappers/chart.js.map +0 -1
  165. package/dist/components/react-wrappers/data-grid-tanstack.js.map +0 -1
  166. package/dist/components/react-wrappers/filter-modal.js.map +0 -1
  167. package/dist/components/react-wrappers/progress-bar.js.map +0 -1
  168. package/dist/components/react-wrappers/section-tab.js.map +0 -1
  169. package/dist/components/react-wrappers/tabs-overview.js.map +0 -1
  170. package/dist/data/translations.js +0 -2763
  171. package/dist/data/translations.js.map +0 -1
  172. package/dist/index.js.map +0 -1
  173. package/dist/schemas/index.js +0 -17
  174. package/dist/schemas/index.js.map +0 -1
  175. package/dist/schemas/lit-attachments-tab-document.schema.js +0 -20
  176. package/dist/schemas/lit-attachments-tab-document.schema.js.map +0 -1
  177. package/dist/schemas/lit-attachments-tab-settings-value.schema.js +0 -15
  178. package/dist/schemas/lit-attachments-tab-settings-value.schema.js.map +0 -1
  179. package/dist/schemas/lit-attachments-tab.schema.js +0 -32
  180. package/dist/schemas/lit-attachments-tab.schema.js.map +0 -1
  181. package/dist/schemas/lit-case-variables-tab-cell.schema.js +0 -43
  182. package/dist/schemas/lit-case-variables-tab-cell.schema.js.map +0 -1
  183. package/dist/schemas/lit-case-variables-tab-rows.schema.js +0 -6
  184. package/dist/schemas/lit-case-variables-tab-rows.schema.js.map +0 -1
  185. package/dist/schemas/lit-case-variables-tab.schema.js +0 -24
  186. package/dist/schemas/lit-case-variables-tab.schema.js.map +0 -1
  187. package/dist/schemas/lit-data-grid-tanstack-column-array.schema.js +0 -6
  188. package/dist/schemas/lit-data-grid-tanstack-column-array.schema.js.map +0 -1
  189. package/dist/schemas/lit-data-grid-tanstack-column-custom-filter-array.schema.js +0 -6
  190. package/dist/schemas/lit-data-grid-tanstack-column-custom-filter-array.schema.js.map +0 -1
  191. package/dist/schemas/lit-data-grid-tanstack-column-custom-filter.schema.js +0 -11
  192. package/dist/schemas/lit-data-grid-tanstack-column-custom-filter.schema.js.map +0 -1
  193. package/dist/schemas/lit-data-grid-tanstack-column.schema.js +0 -55
  194. package/dist/schemas/lit-data-grid-tanstack-column.schema.js.map +0 -1
  195. package/dist/schemas/lit-data-grid-tanstack.schema.js +0 -99
  196. package/dist/schemas/lit-data-grid-tanstack.schema.js.map +0 -1
  197. package/dist/schemas/lit-section-tab-schema.js +0 -24
  198. package/dist/schemas/lit-section-tab-schema.js.map +0 -1
  199. package/dist/schemas/lit-tabs-overview-tab-array.schema.js +0 -6
  200. package/dist/schemas/lit-tabs-overview-tab-array.schema.js.map +0 -1
  201. package/dist/schemas/lit-tabs-overview-tab.schema.js +0 -32
  202. package/dist/schemas/lit-tabs-overview-tab.schema.js.map +0 -1
  203. package/dist/schemas/lit-tabs-overview.schema.js +0 -29
  204. package/dist/schemas/lit-tabs-overview.schema.js.map +0 -1
  205. package/dist/scripts/translate-locales.js +0 -69
  206. package/dist/scripts/translate-locales.js.map +0 -1
  207. package/dist/shared/filter-inputs.js +0 -427
  208. package/dist/shared/filter-inputs.js.map +0 -1
  209. package/dist/shared/lit-button.js.map +0 -1
  210. package/dist/shared/lit-case-variables-tab-cell.js +0 -226
  211. package/dist/shared/lit-case-variables-tab-cell.js.map +0 -1
  212. package/dist/shared/lit-checkbox.js +0 -171
  213. package/dist/shared/lit-checkbox.js.map +0 -1
  214. package/dist/shared/lit-custom-popper.js +0 -117
  215. package/dist/shared/lit-custom-popper.js.map +0 -1
  216. package/dist/shared/lit-data-grid-action-buttons-popover.js +0 -295
  217. package/dist/shared/lit-data-grid-action-buttons-popover.js.map +0 -1
  218. package/dist/shared/lit-data-grid-density-popover.js +0 -84
  219. package/dist/shared/lit-data-grid-density-popover.js.map +0 -1
  220. package/dist/shared/lit-data-grid-export-popover.js +0 -68
  221. package/dist/shared/lit-data-grid-export-popover.js.map +0 -1
  222. package/dist/shared/lit-data-grid-operators-popover.js +0 -114
  223. package/dist/shared/lit-data-grid-operators-popover.js.map +0 -1
  224. package/dist/shared/lit-data-grid-row-actions.js +0 -76
  225. package/dist/shared/lit-data-grid-row-actions.js.map +0 -1
  226. package/dist/shared/lit-date-picker.js +0 -606
  227. package/dist/shared/lit-date-picker.js.map +0 -1
  228. package/dist/shared/lit-icon-button.js +0 -105
  229. package/dist/shared/lit-icon-button.js.map +0 -1
  230. package/dist/shared/lit-icon.js +0 -284
  231. package/dist/shared/lit-icon.js.map +0 -1
  232. package/dist/shared/lit-input.js +0 -239
  233. package/dist/shared/lit-input.js.map +0 -1
  234. package/dist/shared/lit-label.js +0 -104
  235. package/dist/shared/lit-label.js.map +0 -1
  236. package/dist/shared/lit-loader.js +0 -69
  237. package/dist/shared/lit-loader.js.map +0 -1
  238. package/dist/shared/lit-loading-bar.js +0 -127
  239. package/dist/shared/lit-loading-bar.js.map +0 -1
  240. package/dist/shared/lit-menu-item.js +0 -99
  241. package/dist/shared/lit-menu-item.js.map +0 -1
  242. package/dist/shared/lit-menu.js +0 -42
  243. package/dist/shared/lit-menu.js.map +0 -1
  244. package/dist/shared/lit-modal-body.js +0 -22
  245. package/dist/shared/lit-modal-body.js.map +0 -1
  246. package/dist/shared/lit-modal-footer.js +0 -29
  247. package/dist/shared/lit-modal-footer.js.map +0 -1
  248. package/dist/shared/lit-modal-header.js +0 -36
  249. package/dist/shared/lit-modal-header.js.map +0 -1
  250. package/dist/shared/lit-modal.js +0 -169
  251. package/dist/shared/lit-modal.js.map +0 -1
  252. package/dist/shared/lit-overflow-tooltip.js +0 -103
  253. package/dist/shared/lit-overflow-tooltip.js.map +0 -1
  254. package/dist/shared/lit-pill.js +0 -88
  255. package/dist/shared/lit-pill.js.map +0 -1
  256. package/dist/shared/lit-progress-bar.js.map +0 -1
  257. package/dist/shared/lit-responsive-button.js +0 -94
  258. package/dist/shared/lit-responsive-button.js.map +0 -1
  259. package/dist/shared/lit-select-field.js +0 -459
  260. package/dist/shared/lit-select-field.js.map +0 -1
  261. package/dist/shared/lit-select.js +0 -413
  262. package/dist/shared/lit-select.js.map +0 -1
  263. package/dist/shared/lit-settings.js +0 -77
  264. package/dist/shared/lit-settings.js.map +0 -1
  265. package/dist/shared/lit-text-field.js +0 -222
  266. package/dist/shared/lit-text-field.js.map +0 -1
  267. package/dist/shared/lit-toggle.js +0 -222
  268. package/dist/shared/lit-toggle.js.map +0 -1
  269. package/dist/shared/lit-tooltip.js +0 -166
  270. package/dist/shared/lit-tooltip.js.map +0 -1
  271. package/dist/shared/simple-popper.js +0 -266
  272. package/dist/shared/simple-popper.js.map +0 -1
  273. package/dist/shared/simple-tooltip.js.map +0 -1
  274. package/dist/shared/styles/button-shared-styles.js.map +0 -1
  275. package/dist/styles.js +0 -169
  276. package/dist/styles.js.map +0 -1
  277. package/dist/utils/currency.js.map +0 -1
  278. package/dist/utils/custom-filters.js.map +0 -1
  279. package/dist/utils/date.js.map +0 -1
  280. package/dist/utils/getOperatorByType.js.map +0 -1
  281. package/dist/utils/getOverviewValue.js +0 -177
  282. package/dist/utils/getOverviewValue.js.map +0 -1
  283. package/dist/utils/localization.js.map +0 -1
  284. package/dist/utils/utils.js +0 -13
  285. package/dist/utils/utils.js.map +0 -1
  286. package/dist/utils/validate-json-schema.js +0 -8
  287. package/dist/utils/validate-json-schema.js.map +0 -1
  288. package/dist/validators/validator.js +0 -7
  289. package/dist/validators/validator.js.map +0 -1
@@ -1,106 +1,81 @@
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 "../node_modules/@lit/reactive-element/reactive-element.js";
2
+ import { html as o } from "../node_modules/lit-html/lit-html.js";
3
+ import { LitElement as x } from "../node_modules/lit-element/lit-element.js";
4
+ import { unsafeHTML as f } from "../node_modules/lit-html/directives/unsafe-html.js";
5
+ import { styleMap as u } from "../node_modules/lit-html/directives/style-map.js";
6
+ import { customElement as $ } from "../node_modules/@lit/reactive-element/decorators/custom-element.js";
7
+ import { property as g } from "../node_modules/@lit/reactive-element/decorators/property.js";
8
+ import { state as b } from "../node_modules/@lit/reactive-element/decorators/state.js";
9
+ import w from "../node_modules/sortablejs/modular/sortable.esm.js";
10
+ import { repeat as C } from "../node_modules/lit-html/directives/repeat.js";
11
+ import { tooltip as S } from "../shared/simple-tooltip.js";
12
+ import { formatDate as k } from "../utils/date.js";
13
+ import { formatCurrency as L } from "../utils/currency.js";
14
+ import { setLocale as z } from "../utils/localization.js";
15
+ import { msg as v } from "../node_modules/@lit/localize/init/install.js";
16
+ import "../node_modules/@lit/localize/init/runtime.js";
17
+ import { l as _ } from "../node_modules/lodash/lodash.js";
18
+ import { css as I } from "../node_modules/@lit/reactive-element/css-tag.js";
19
+ var B = Object.defineProperty, O = Object.getOwnPropertyDescriptor, d = (t, r, e, i) => {
20
+ for (var s = i > 1 ? void 0 : i ? O(r, e) : r, a = t.length - 1, p; a >= 0; a--)
21
+ (p = t[a]) && (s = (i ? p(r, e, s) : p(s)) || s);
22
+ return i && s && B(r, e, s), s;
6
23
  };
7
- import { LitElement, html, css } from 'lit';
8
- import { unsafeHTML } from 'lit/directives/unsafe-html.js';
9
- import { styleMap } from 'lit/directives/style-map.js';
10
- import { customElement, property, state } from 'lit/decorators.js';
11
- import Sortable from 'sortablejs';
12
- import { repeat } from 'lit/directives/repeat.js';
13
- // components
14
- import '../shared/lit-icon.js';
15
- import '../shared/lit-button.js';
16
- import '../shared/lit-menu.js';
17
- import '../shared/lit-menu-item.js';
18
- import '../shared/lit-checkbox.js';
19
- import '../shared/lit-input.js';
20
- import '../shared/simple-popper.js';
21
- import '../assets/illustration/not-found.js';
22
- import { tooltip } from '../shared/simple-tooltip.js';
23
- import '../shared/lit-tooltip.js';
24
- import '../shared/lit-progress-bar.js';
25
- // utils
26
- import { formatDate } from '../utils/date.js';
27
- import { formatCurrency } from '../utils/currency.js';
28
- import { setLocale } from '../utils/localization.js';
29
- import { msg } from '@lit/localize';
30
- import { isEqual } from 'lodash';
31
- let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
32
- constructor() {
33
- super(...arguments);
34
- this.rows = [];
35
- this.data = {};
36
- this.hideTabWhen = false;
37
- this.userLang = 'cs';
38
- this.dateFormat = null;
39
- this.isLoading = false;
40
- this.enableSettings = false;
41
- this.gridVariables = false;
42
- this.onSettingsChanged = (rows) => { };
43
- this.currentBreakpoint = this.getBreakpoint();
44
- this.isOpen = false;
45
- this.filterText = '';
46
- this.isMobile = window.innerWidth <= 600;
47
- this._resizeListener = this.handleResize.bind(this);
48
- this.sortableInstances = [];
49
- this.sortableGroupId = `group-${Math.random().toString(36).substring(2, 9)}`;
50
- this.backgroundColorOptions = [
51
- {
52
- backgroundColor: 'transparent',
53
- border: '1px solid white',
54
- },
55
- {
56
- backgroundColor: 'var(--color-success-light)',
57
- border: '1px solid var(--color-success-dark)',
58
- },
59
- {
60
- backgroundColor: 'var(--color-error-light)',
61
- border: '1px solid var(--color-error-dark)',
62
- },
63
- {
64
- backgroundColor: 'var(--color-warning-light)',
65
- border: '1px solid var(--color-warning-dark)',
66
- },
67
- {
68
- backgroundColor: 'var(--color-info-light)',
69
- border: '1px solid var(--color-info-dark)',
70
- },
71
- {
72
- backgroundColor: 'var(--color-primary-light)',
73
- border: '1px solid var(--color-primary-dark)',
74
- },
75
- ];
76
- this.language = 'cs';
77
- this.BREAKPOINTS = ['xs', 'sm', 'md', 'lg', 'xl'];
78
- this.handleSettingsChanged = (newRows) => {
79
- this.onSettingsChanged?.(newRows);
80
- };
81
- this.getHeaderActions = (cell) => {
82
- const activeSize = cell.size?.lg ?? 1;
83
- return html `<div class="header-buttons">
84
- ${this.enableSettings
85
- ? html `
24
+ let n = class extends x {
25
+ constructor() {
26
+ super(...arguments), this.rows = [], this.data = {}, this.hideTabWhen = !1, this.userLang = "cs", this.dateFormat = null, this.isLoading = !1, this.enableSettings = !1, this.gridVariables = !1, this.onSettingsChanged = (t) => {
27
+ }, this.currentBreakpoint = this.getBreakpoint(), this.isOpen = !1, this.filterText = "", this.isMobile = window.innerWidth <= 600, this._resizeListener = this.handleResize.bind(this), this.sortableInstances = [], this.sortableGroupId = `group-${Math.random().toString(36).substring(2, 9)}`, this.backgroundColorOptions = [
28
+ {
29
+ backgroundColor: "transparent",
30
+ border: "1px solid white"
31
+ },
32
+ {
33
+ backgroundColor: "var(--color-success-light)",
34
+ border: "1px solid var(--color-success-dark)"
35
+ },
36
+ {
37
+ backgroundColor: "var(--color-error-light)",
38
+ border: "1px solid var(--color-error-dark)"
39
+ },
40
+ {
41
+ backgroundColor: "var(--color-warning-light)",
42
+ border: "1px solid var(--color-warning-dark)"
43
+ },
44
+ {
45
+ backgroundColor: "var(--color-info-light)",
46
+ border: "1px solid var(--color-info-dark)"
47
+ },
48
+ {
49
+ backgroundColor: "var(--color-primary-light)",
50
+ border: "1px solid var(--color-primary-dark)"
51
+ }
52
+ ], this.language = "cs", this.BREAKPOINTS = ["xs", "sm", "md", "lg", "xl"], this.handleSettingsChanged = (t) => {
53
+ var r;
54
+ (r = this.onSettingsChanged) == null || r.call(this, t);
55
+ }, this.getHeaderActions = (t) => {
56
+ var e, i;
57
+ const r = ((e = t.size) == null ? void 0 : e.lg) ?? 1;
58
+ return o`<div class="header-buttons">
59
+ ${this.enableSettings ? o`
86
60
  <perf-tooltip placement="top">
87
61
  <lit-icon slot="trigger" icon="cog" size="1rem"></lit-icon>
88
62
  <div slot="tooltip">
89
63
  <div class="settings-buttons" style="justify-content: space-between">
90
- ${this.gridVariables
91
- ? html `<div></div>`
92
- : html `
64
+ ${this.gridVariables ? o`<div></div>` : o`
93
65
  <div>
94
- ${[1, 2, 3, 4].map((size) => html `
66
+ ${[1, 2, 3, 4].map(
67
+ (s) => o`
95
68
  <span
96
- @click=${() => this.setCellSize(size, cell)}
97
- class="size-button ${activeSize === size
98
- ? 'size-button--active'
99
- : ''}"
69
+ @click=${() => this.setCellSize(
70
+ s,
71
+ t
72
+ )}
73
+ class="size-button ${r === s ? "size-button--active" : ""}"
100
74
  >
101
- ${size}
75
+ ${s}
102
76
  </span>
103
- `)}
77
+ `
78
+ )}
104
79
  </div>
105
80
  `}
106
81
 
@@ -108,37 +83,41 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
108
83
  icon="trash"
109
84
  size="1rem"
110
85
  style="cursor: pointer"
111
- @click=${() => this.removeCellFromRows(cell.field)}
86
+ @click=${() => this.removeCellFromRows(t.field)}
112
87
  ></lit-icon>
113
88
  </div>
114
- <div class="color-label">${msg('Barva pozadí')}:</div>
89
+ <div class="color-label">${v("Barva pozadí")}:</div>
115
90
  <div class="settings-buttons">
116
- ${this.backgroundColorOptions.map((option) => html `
91
+ ${this.backgroundColorOptions.map(
92
+ (s) => o`
117
93
  <div>
118
94
  <div
119
- @click=${() => this.setCellStyle({
120
- backgroundColor: option.backgroundColor,
121
- borderRadius: '8px',
122
- border: option.border,
123
- }, cell)}
95
+ @click=${() => this.setCellStyle(
96
+ {
97
+ backgroundColor: s.backgroundColor,
98
+ borderRadius: "8px",
99
+ border: s.border
100
+ },
101
+ t
102
+ )}
124
103
  class="cell-background"
125
- style="background-color: ${option.backgroundColor}; border: ${option.border}"
104
+ style="background-color: ${s.backgroundColor}; border: ${s.border}"
126
105
  ></div>
127
106
  <div
128
- class="${this.isActiveBackground(cell, option.backgroundColor)
129
- ? 'cell-background--active'
130
- : ''}"
107
+ class="${this.isActiveBackground(
108
+ t,
109
+ s.backgroundColor
110
+ ) ? "cell-background--active" : ""}"
131
111
  ></div>
132
112
  </div>
133
- `)}
113
+ `
114
+ )}
134
115
  </div>
135
- <div class="color-label">${msg('Tučné písmo')}:</div>
116
+ <div class="color-label">${v("Tučné písmo")}:</div>
136
117
  <div class="settings-buttons">
137
118
  <span
138
- class="bold-toggle ${cell?.valueStyle?.fontWeight === 'bold'
139
- ? 'bold-toggle--active'
140
- : ''}"
141
- @click=${() => this.setFontWeight(cell)}
119
+ class="bold-toggle ${((i = t == null ? void 0 : t.valueStyle) == null ? void 0 : i.fontWeight) === "bold" ? "bold-toggle--active" : ""}"
120
+ @click=${() => this.setFontWeight(t)}
142
121
  >
143
122
  B
144
123
  </span>
@@ -149,339 +128,250 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
149
128
  <div class="drag-handle">
150
129
  <lit-icon icon="hamburger" size="1rem"></lit-icon>
151
130
  </div>
152
- `
153
- : null}
131
+ ` : null}
154
132
  </div>`;
155
- };
156
- this.getHeaderLabel = (cell) => {
157
- return html ` <div
158
- style="${cell?.headerStyle ? styleMap(cell?.headerStyle) : ''}"
133
+ }, this.getHeaderLabel = (t) => o` <div
134
+ style="${t != null && t.headerStyle ? u(t == null ? void 0 : t.headerStyle) : ""}"
159
135
  class="process-data-heading"
160
136
  >
161
- ${cell?.[`headerName_${this.userLang}`] ||
162
- cell?.headerName ||
163
- ''}
164
- ${cell.tooltip
165
- ? html `
137
+ ${(t == null ? void 0 : t[`headerName_${this.userLang}`]) || (t == null ? void 0 : t.headerName) || ""}
138
+ ${t.tooltip ? o`
166
139
  <lit-icon
167
- ${tooltip(cell?.[`tooltip_${this.userLang}`] ??
168
- cell?.tooltip, 'right', 100)}
140
+ ${S(
141
+ (t == null ? void 0 : t[`tooltip_${this.userLang}`]) ?? (t == null ? void 0 : t.tooltip),
142
+ "right",
143
+ 100
144
+ )}
169
145
  size="12px"
170
146
  icon="informative"
171
147
  ></lit-icon>
172
- `
173
- : ''}
174
- </div>`;
175
- };
176
- this.getHeader = (cell) => {
177
- return html ` <div class="header-cell">
178
- ${this.getHeaderLabel(cell)} ${this.getHeaderActions(cell)}
179
- </div>`;
180
- };
181
- this.getCellButton = (cell) => {
182
- return html `
148
+ ` : ""}
149
+ </div>`, this.getHeader = (t) => o` <div class="header-cell">
150
+ ${this.getHeaderLabel(t)} ${this.getHeaderActions(t)}
151
+ </div>`, this.getCellButton = (t) => o`
183
152
  <div style="display: flex; justify-content: space-between">
184
153
  <lit-button
185
154
  style="flex-grow: 1; margin-right: 0.5rem"
186
- .fullWidth="${cell.buttonFullWidth}"
187
- variant="${cell.buttonVariant || 'contained'}"
188
- label="${cell?.headerName}"
189
- @click=${cell?.buttonFn}
155
+ .fullWidth="${t.buttonFullWidth}"
156
+ variant="${t.buttonVariant || "contained"}"
157
+ label="${t == null ? void 0 : t.headerName}"
158
+ @click=${t == null ? void 0 : t.buttonFn}
190
159
  ></lit-button>
191
- ${this.getHeaderActions(cell)}
160
+ ${this.getHeaderActions(t)}
192
161
  </div>
193
- `;
194
- };
195
- this.getCellLink = (cell) => {
196
- return html `<div>${this.getHeader(cell)}</div>
197
- <a class="link" href=${cell?.value ? cell.value : ''} target="_blank"
198
- >${cell?.value ? cell.value : ''}
199
- </a> `;
200
- };
201
- this.getCellValue = (cell) => {
202
- const rawValue = cell?.[`value_${this.userLang}`] || cell?.value || '';
203
- const value = typeof rawValue === 'string' ? rawValue : String(rawValue ?? '');
204
- return html `<div>${this.getHeader(cell)}</div>
162
+ `, this.getCellLink = (t) => o`<div>${this.getHeader(t)}</div>
163
+ <a class="link" href=${t != null && t.value ? t.value : ""} target="_blank"
164
+ >${t != null && t.value ? t.value : ""}
165
+ </a> `, this.getCellValue = (t) => {
166
+ const r = (t == null ? void 0 : t[`value_${this.userLang}`]) || (t == null ? void 0 : t.value) || "", e = typeof r == "string" ? r : String(r ?? "");
167
+ return o`<div>${this.getHeader(t)}</div>
205
168
  <div
206
- style="${cell?.valueStyle ? styleMap(cell?.valueStyle) : ''}"
169
+ style="${t != null && t.valueStyle ? u(t == null ? void 0 : t.valueStyle) : ""}"
207
170
  class="process-data-value"
208
171
  >
209
- ${unsafeHTML(value)}
172
+ ${f(e)}
210
173
  </div> `;
211
- };
212
- this.getCellDate = (cell) => {
213
- return html `<div>${this.getHeader(cell)}</div>
174
+ }, this.getCellDate = (t) => o`<div>${this.getHeader(t)}</div>
214
175
  <div
215
- style="${cell?.valueStyle ? styleMap(cell?.valueStyle) : ''}"
176
+ style="${t != null && t.valueStyle ? u(t == null ? void 0 : t.valueStyle) : ""}"
216
177
  class="process-data-value"
217
178
  >
218
- ${cell?.value
219
- ? formatDate(cell.value, this.userLang || 'cs', !!this.dateFormat, this.dateFormat)
220
- : ''}
221
- </div> `;
222
- };
223
- this.getCellCurrency = (cell) => {
224
- return html `<div>${this.getHeader(cell)}</div>
179
+ ${t != null && t.value ? k(
180
+ t.value,
181
+ this.userLang || "cs",
182
+ !!this.dateFormat,
183
+ this.dateFormat
184
+ ) : ""}
185
+ </div> `, this.getCellCurrency = (t) => o`<div>${this.getHeader(t)}</div>
225
186
  <div
226
- style="${cell?.valueStyle ? styleMap(cell?.valueStyle) : ''}"
187
+ style="${t != null && t.valueStyle ? u(t == null ? void 0 : t.valueStyle) : ""}"
227
188
  class="process-data-value"
228
189
  >
229
- ${cell?.value ? formatCurrency(cell.value, this.userLang || 'cs') : ''}
230
- </div> `;
231
- };
232
- this.getCellProgress = (cell) => {
233
- return html `<div>${this.getHeader(cell)}</div>
190
+ ${t != null && t.value ? L(t.value, this.userLang || "cs") : ""}
191
+ </div> `, this.getCellProgress = (t) => o`<div>${this.getHeader(t)}</div>
234
192
  <div
235
- style="${cell?.valueStyle ? styleMap(cell?.valueStyle) : ''}"
193
+ style="${t != null && t.valueStyle ? u(t == null ? void 0 : t.valueStyle) : ""}"
236
194
  class="process-data-value"
237
195
  >
238
- <lit-progress-bar .progress="${cell?.value}"></lit-progress-bar>
239
- </div> `;
240
- };
241
- this.getInlineCellValue = (cell) => {
242
- const rawValue = cell?.[`value_${this.userLang}`] || cell?.value || '';
243
- const value = typeof rawValue === 'string' ? rawValue : String(rawValue ?? '');
244
- return html `
196
+ <lit-progress-bar .progress="${t == null ? void 0 : t.value}"></lit-progress-bar>
197
+ </div> `, this.getInlineCellValue = (t) => {
198
+ const r = (t == null ? void 0 : t[`value_${this.userLang}`]) || (t == null ? void 0 : t.value) || "", e = typeof r == "string" ? r : String(r ?? "");
199
+ return o`
245
200
  <div style="display: flex;align-items: center; justify-content: end; gap: 0.5rem">
246
- <div>${this.getHeaderLabel(cell)}</div>
201
+ <div>${this.getHeaderLabel(t)}</div>
247
202
  <div
248
- style="${cell?.valueStyle
249
- ? styleMap(cell?.valueStyle)
250
- : ''}"
203
+ style="${t != null && t.valueStyle ? u(t == null ? void 0 : t.valueStyle) : ""}"
251
204
  class="process-data-value"
252
205
  >
253
- ${unsafeHTML(value)}
206
+ ${f(e)}
254
207
  </div>
255
- <div>${this.getHeaderActions(cell)}</div>
208
+ <div>${this.getHeaderActions(t)}</div>
256
209
  </div>
257
210
  `;
258
- };
259
- }
260
- getBreakpoint() {
261
- const width = window.innerWidth;
262
- if (width >= 1920)
263
- return 'xl';
264
- if (width >= 1280)
265
- return 'lg';
266
- if (width >= 960)
267
- return 'md';
268
- if (width >= 600)
269
- return 'sm';
270
- return 'xs';
211
+ };
212
+ }
213
+ getBreakpoint() {
214
+ const t = window.innerWidth;
215
+ return t >= 1920 ? "xl" : t >= 1280 ? "lg" : t >= 960 ? "md" : t >= 600 ? "sm" : "xs";
216
+ }
217
+ // Function to handle resize events
218
+ handleResize() {
219
+ const t = this.getBreakpoint();
220
+ t !== this.currentBreakpoint && (this.currentBreakpoint = t), this.isMobile = window.innerWidth <= 600;
221
+ }
222
+ connectedCallback() {
223
+ var t, r;
224
+ if (super.connectedCallback(), this.setLanguage(), window.addEventListener("resize", this._resizeListener), this.isMobile = window.innerWidth <= 600, !this.dateFormat) {
225
+ const e = localStorage.getItem("userSettings"), i = e ? (r = (t = JSON.parse(e)) == null ? void 0 : t.state) == null ? void 0 : r.dateFormat : void 0;
226
+ this.dateFormat = i;
271
227
  }
272
- // Function to handle resize events
273
- handleResize() {
274
- const newBreakpoint = this.getBreakpoint();
275
- if (newBreakpoint !== this.currentBreakpoint) {
276
- this.currentBreakpoint = newBreakpoint; // Update property
277
- }
278
- this.isMobile = window.innerWidth <= 600;
279
- }
280
- connectedCallback() {
281
- super.connectedCallback();
282
- this.setLanguage();
283
- window.addEventListener('resize', this._resizeListener); // Add listener
284
- this.isMobile = window.innerWidth <= 600;
285
- if (!this.dateFormat) {
286
- const userSettings = localStorage.getItem('userSettings');
287
- const storedFormat = userSettings
288
- ? JSON.parse(userSettings)?.state?.dateFormat
289
- : undefined;
290
- this.dateFormat = storedFormat;
291
- }
292
- }
293
- disconnectedCallback() {
294
- this.destroySortables();
295
- window.removeEventListener('resize', this._resizeListener); // Remove listener
296
- super.disconnectedCallback();
297
- }
298
- firstUpdated() {
299
- if (this.enableSettings) {
300
- this.initSortable();
301
- }
302
- }
303
- setFontWeight(cell) {
304
- const isBold = cell.valueStyle?.fontWeight === 'bold';
305
- cell.valueStyle = {
306
- ...(cell.valueStyle || {}),
307
- fontWeight: isBold ? '500' : 'bold',
308
- };
309
- this.rows = [...this.rows];
310
- this.handleSettingsChanged(this.rows);
311
- }
312
- setCellStyle(style, cell) {
313
- cell.cellStyle = style;
314
- this.rows = [...this.rows];
315
- this.handleSettingsChanged(this.rows);
316
- }
317
- destroySortables() {
318
- this.sortableInstances.forEach((instance) => {
319
- instance.destroy();
228
+ }
229
+ disconnectedCallback() {
230
+ this.destroySortables(), window.removeEventListener("resize", this._resizeListener), super.disconnectedCallback();
231
+ }
232
+ firstUpdated() {
233
+ this.enableSettings && this.initSortable();
234
+ }
235
+ setFontWeight(t) {
236
+ var e;
237
+ const r = ((e = t.valueStyle) == null ? void 0 : e.fontWeight) === "bold";
238
+ t.valueStyle = {
239
+ ...t.valueStyle || {},
240
+ fontWeight: r ? "500" : "bold"
241
+ }, this.rows = [...this.rows], this.handleSettingsChanged(this.rows);
242
+ }
243
+ setCellStyle(t, r) {
244
+ r.cellStyle = t, this.rows = [...this.rows], this.handleSettingsChanged(this.rows);
245
+ }
246
+ destroySortables() {
247
+ this.sortableInstances.forEach((t) => {
248
+ t.destroy();
249
+ }), this.sortableInstances = [];
250
+ }
251
+ initSortable() {
252
+ this.updateComplete.then(() => {
253
+ var r;
254
+ const t = (r = this.shadowRoot) == null ? void 0 : r.querySelectorAll(".grid-container");
255
+ t != null && t.length && t.forEach((e) => {
256
+ let i = [];
257
+ const s = w.create(e, {
258
+ group: this.tabId || this.sortableGroupId,
259
+ animation: 150,
260
+ handle: ".drag-handle",
261
+ ghostClass: "sortable-ghost",
262
+ chosenClass: "sortable-chosen",
263
+ dragClass: "sortable-drag",
264
+ sort: !0,
265
+ onStart: (a) => {
266
+ i = Array.from(a.from.childNodes);
267
+ },
268
+ onEnd: (a) => {
269
+ var c;
270
+ a.from.innerHTML = "", i.forEach((y) => a.from.appendChild(y));
271
+ const { oldIndex: p, newIndex: h } = a;
272
+ if (p == null || h == null || p === h) return;
273
+ const m = [...this.rows], [l] = m.splice(p, 1);
274
+ m.splice(h, 0, l), this.rows = m, (c = this.handleSettingsChanged) == null || c.call(this, m);
275
+ }
320
276
  });
321
- this.sortableInstances = [];
277
+ this.sortableInstances.push(s);
278
+ });
279
+ });
280
+ }
281
+ setLanguage() {
282
+ const t = this.userLang || localStorage.getItem("userLang");
283
+ t && z(t);
284
+ }
285
+ isActiveBackground(t, r) {
286
+ var i;
287
+ const e = (i = t == null ? void 0 : t.cellStyle) == null ? void 0 : i.backgroundColor;
288
+ return !e && r === "transparent" ? !0 : e === r;
289
+ }
290
+ setCellSize(t, r) {
291
+ r.size || (r.size = {}), r.size.lg = t, this.rows = [...this.rows], this.handleSettingsChanged(this.rows);
292
+ }
293
+ removeCellFromRows(t) {
294
+ this.destroySortables();
295
+ const r = this.rows.filter((e) => e.field !== t);
296
+ this.rows = [], this.updateComplete.then(() => {
297
+ this.rows = [...r], this.initSortable(), this.handleSettingsChanged(this.rows);
298
+ });
299
+ }
300
+ closePopover() {
301
+ this.isOpen = !1;
302
+ }
303
+ toggleCustomPopover() {
304
+ this.isOpen = !this.isOpen;
305
+ }
306
+ get existingFields() {
307
+ return this.rows.flat().map((t) => t.field);
308
+ }
309
+ toggleRowCell(t) {
310
+ var e;
311
+ if (this.rows.some((i) => i.field === t))
312
+ this.removeCellFromRows(t);
313
+ else {
314
+ const i = (e = this.data) == null ? void 0 : e[t];
315
+ if (!i) return;
316
+ const s = this.userLang || "cs", a = i[`tvar_name_${s}`] || i.tvar_name_cs || i.tvar_name, p = i[`tvar_tooltip_${s}`] || i.tvar_tooltip_cs || i.tvar_tooltip;
317
+ let h;
318
+ switch (i.ivar_type) {
319
+ case "D":
320
+ h = "date";
321
+ break;
322
+ case "progress":
323
+ h = "progress";
324
+ break;
325
+ default:
326
+ h = "string";
327
+ }
328
+ const m = {
329
+ field: t,
330
+ type: h,
331
+ headerName: a,
332
+ value: i.ivar_value,
333
+ size: { xs: 4, sm: 2, md: 1, lg: 1, xl: 1 },
334
+ tooltip: p
335
+ }, l = [...this.rows];
336
+ l.push(m), this.rows = l, this.handleSettingsChanged(l);
322
337
  }
323
- initSortable() {
324
- this.updateComplete.then(() => {
325
- const containers = this.shadowRoot?.querySelectorAll('.grid-container');
326
- if (!containers?.length)
327
- return;
328
- containers.forEach((container) => {
329
- let originalNodes = [];
330
- const sortableInstance = Sortable.create(container, {
331
- group: this.tabId || this.sortableGroupId,
332
- animation: 150,
333
- handle: '.drag-handle',
334
- ghostClass: 'sortable-ghost',
335
- chosenClass: 'sortable-chosen',
336
- dragClass: 'sortable-drag',
337
- sort: true,
338
- onStart: (evt) => {
339
- originalNodes = Array.from(evt.from.childNodes);
340
- },
341
- onEnd: (evt) => {
342
- evt.from.innerHTML = '';
343
- originalNodes.forEach((node) => evt.from.appendChild(node));
344
- const { oldIndex, newIndex } = evt;
345
- if (oldIndex == null || newIndex == null || oldIndex === newIndex)
346
- return;
347
- const updated = [...this.rows];
348
- const [movedItem] = updated.splice(oldIndex, 1);
349
- updated.splice(newIndex, 0, movedItem);
350
- this.rows = updated;
351
- this.handleSettingsChanged?.(updated);
352
- },
353
- });
354
- this.sortableInstances.push(sortableInstance);
355
- });
356
- });
357
- }
358
- setLanguage() {
359
- const lang = this.userLang || localStorage.getItem('userLang');
360
- if (lang) {
361
- setLocale(lang);
362
- }
363
- }
364
- isActiveBackground(cell, color) {
365
- const bg = cell?.cellStyle?.backgroundColor;
366
- if (!bg && color === 'transparent')
367
- return true; // If nothing is set → consider transparent as active
368
- return bg === color;
369
- }
370
- setCellSize(size, cell) {
371
- if (!cell.size) {
372
- cell.size = {};
373
- }
374
- cell.size.lg = size;
375
- this.rows = [...this.rows];
376
- this.handleSettingsChanged(this.rows);
377
- }
378
- removeCellFromRows(field) {
379
- this.destroySortables();
380
- const updatedRows = this.rows.filter((c) => c.field !== field);
381
- this.rows = [];
382
- this.updateComplete.then(() => {
383
- this.rows = [...updatedRows];
384
- this.initSortable();
385
- this.handleSettingsChanged(this.rows);
386
- });
387
- }
388
- closePopover() {
389
- this.isOpen = false;
390
- }
391
- toggleCustomPopover() {
392
- this.isOpen = !this.isOpen;
393
- }
394
- get existingFields() {
395
- return this.rows.flat().map((cell) => cell.field);
396
- }
397
- toggleRowCell(key) {
398
- const exists = this.rows.some((cell) => cell.field === key);
399
- if (exists) {
400
- this.removeCellFromRows(key);
401
- }
402
- else {
403
- const raw = this.data?.[key];
404
- if (!raw)
405
- return;
406
- const lang = this.userLang || 'cs';
407
- const headerName = raw[`tvar_name_${lang}`] || raw.tvar_name_cs || raw.tvar_name;
408
- const tooltip = raw[`tvar_tooltip_${lang}`] || raw.tvar_tooltip_cs || raw.tvar_tooltip;
409
- let type;
410
- switch (raw.ivar_type) {
411
- case 'D':
412
- type = 'date';
413
- break;
414
- case 'progress':
415
- type = 'progress';
416
- break;
417
- default:
418
- type = 'string';
419
- }
420
- const newCell = {
421
- field: key,
422
- type,
423
- headerName,
424
- value: raw.ivar_value,
425
- size: { xs: 4, sm: 2, md: 1, lg: 1, xl: 1 },
426
- tooltip,
427
- };
428
- const newRows = [...this.rows];
429
- newRows.push(newCell);
430
- this.rows = newRows;
431
- this.handleSettingsChanged(newRows);
432
- }
433
- }
434
- render() {
435
- if (this.hideTabWhen)
436
- return null;
437
- const lang = this.userLang || 'cs';
438
- const filteredKeys = Object.keys(this.data || {}).filter((key) => {
439
- const item = this.data[key];
440
- const name = item?.[`tvar_name_${lang}`] || key;
441
- return (key.toLowerCase().includes(this.filterText) ||
442
- name.toLowerCase().includes(this.filterText));
443
- });
444
- return html `
445
- ${this.isLoading
446
- ? html `<lit-loader></lit-loader>`
447
- : html `
448
- <div class="grid-container ${this.gridVariables ? 'one-column' : ''}">
449
- ${repeat(this.rows, (cell, index) => cell.field, (cell) => {
450
- const bpIndex = this.BREAKPOINTS.indexOf(this.currentBreakpoint);
451
- const spanSize = this.BREAKPOINTS.slice(0, bpIndex + 1)
452
- .reverse()
453
- .map((bp) => cell.size?.[bp])
454
- .find((s) => s !== undefined) ?? 2;
455
- const classes = `cell--span${spanSize} cell ${this.gridVariables ? 'one-column' : ''}`;
456
- return html `
338
+ }
339
+ render() {
340
+ if (this.hideTabWhen) return null;
341
+ const t = this.userLang || "cs", r = Object.keys(this.data || {}).filter((e) => {
342
+ const i = this.data[e], s = (i == null ? void 0 : i[`tvar_name_${t}`]) || e;
343
+ return e.toLowerCase().includes(this.filterText) || s.toLowerCase().includes(this.filterText);
344
+ });
345
+ return o`
346
+ ${this.isLoading ? o`<lit-loader></lit-loader>` : o`
347
+ <div class="grid-container ${this.gridVariables ? "one-column" : ""}">
348
+ ${C(
349
+ this.rows,
350
+ (e, i) => e.field,
351
+ (e) => {
352
+ const i = this.BREAKPOINTS.indexOf(this.currentBreakpoint), a = `cell--span${this.BREAKPOINTS.slice(0, i + 1).reverse().map((p) => {
353
+ var h;
354
+ return (h = e.size) == null ? void 0 : h[p];
355
+ }).find((p) => p !== void 0) ?? 2} cell ${this.gridVariables ? "one-column" : ""}`;
356
+ return o`
457
357
  <div
458
- class="${classes}"
459
- style="${styleMap(cell.cellStyle || {})}"
460
- data-field="${cell.field}"
358
+ class="${a}"
359
+ style="${u(
360
+ e.cellStyle || {}
361
+ )}"
362
+ data-field="${e.field}"
461
363
  >
462
- ${this.gridVariables
463
- ? this.getInlineCellValue(cell)
464
- : cell?.type === 'button'
465
- ? this.getCellButton(cell)
466
- : cell.type === 'link'
467
- ? this.getCellLink(cell)
468
- : cell.type === 'progress'
469
- ? this.getCellProgress(cell)
470
- : cell.type === 'currency'
471
- ? this.getCellCurrency(cell)
472
- : cell.type === 'date'
473
- ? this.getCellDate(cell)
474
- : this.getCellValue(cell)}
364
+ ${this.gridVariables ? this.getInlineCellValue(e) : (e == null ? void 0 : e.type) === "button" ? this.getCellButton(e) : e.type === "link" ? this.getCellLink(e) : e.type === "progress" ? this.getCellProgress(e) : e.type === "currency" ? this.getCellCurrency(e) : e.type === "date" ? this.getCellDate(e) : this.getCellValue(e)}
475
365
  </div>
476
366
  `;
477
- })}
367
+ }
368
+ )}
478
369
  </div>
479
- ${this.enableSettings
480
- ? html `
370
+ ${this.enableSettings ? o`
481
371
  <div style="text-align: right; margin-top: 1rem;">
482
372
  <lit-button
483
- variant="${'dashed'}"
484
- label="${msg('Přiřadit proměnnou')}"
373
+ variant="${"dashed"}"
374
+ label="${v("Přiřadit proměnnou")}"
485
375
  icon="add"
486
376
  .fullWidth=${this.isMobile}
487
377
  @click="${this.toggleCustomPopover}"
@@ -490,9 +380,9 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
490
380
 
491
381
  <simple-popper
492
382
  .showing=${this.isOpen}
493
- .placement=${'top-end'}
494
- .manualOpening=${true}
495
- .maxWidthAsTarget=${false}
383
+ .placement=${"top-end"}
384
+ .manualOpening=${!0}
385
+ .maxWidthAsTarget=${!1}
496
386
  .onClose=${() => this.closePopover()}
497
387
  >
498
388
  <div
@@ -501,54 +391,50 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
501
391
  >
502
392
  <lit-input
503
393
  .value=${this.filterText}
504
- .onInput=${(value) => {
505
- this.filterText = value?.toLowerCase?.() || '';
506
- }}
394
+ .onInput=${(e) => {
395
+ var i;
396
+ this.filterText = ((i = e == null ? void 0 : e.toLowerCase) == null ? void 0 : i.call(e)) || "";
397
+ }}
507
398
  .onClear=${() => {
508
- this.filterText = '';
509
- }}
510
- placeholder="${msg('Zadejte název proměnné')}"
511
- .size=${'small'}
399
+ this.filterText = "";
400
+ }}
401
+ placeholder="${v("Zadejte název proměnné")}"
402
+ .size=${"small"}
512
403
  ></lit-input>
513
404
  </div>
514
405
  <lit-menu tabindex="0">
515
- ${Object.keys(this.data || {})
516
- .filter((key) => {
517
- const item = this.data[key];
518
- const lang = this.userLang || 'cs';
519
- const name = item?.[`tvar_name_${lang}`] || key;
520
- return (key
521
- .toLowerCase()
522
- .includes(this.filterText) ||
523
- name.toLowerCase().includes(this.filterText));
524
- })
525
- .sort((a, b) => {
526
- const aIsUnderscore = a.startsWith('_');
527
- const bIsUnderscore = b.startsWith('_');
528
- if (aIsUnderscore && !bIsUnderscore)
529
- return 1;
530
- if (!aIsUnderscore && bIsUnderscore)
531
- return -1;
532
- return a.localeCompare(b);
533
- })
534
- .map((key) => html `
406
+ ${Object.keys(this.data || {}).filter((e) => {
407
+ const i = this.data[e], s = this.userLang || "cs", a = (i == null ? void 0 : i[`tvar_name_${s}`]) || e;
408
+ return e.toLowerCase().includes(this.filterText) || a.toLowerCase().includes(this.filterText);
409
+ }).sort((e, i) => {
410
+ const s = e.startsWith("_"), a = i.startsWith("_");
411
+ return s && !a ? 1 : !s && a ? -1 : e.localeCompare(i);
412
+ }).map(
413
+ (e) => {
414
+ var i, s;
415
+ return o`
535
416
  <lit-menu-item
536
- .onClick=${() => this.toggleRowCell(key)}
537
- .isActive=${this.existingFields.includes(key)}
417
+ .onClick=${() => this.toggleRowCell(e)}
418
+ .isActive=${this.existingFields.includes(
419
+ e
420
+ )}
538
421
  >
539
422
  <span class="menu-item--multiple">
540
423
  <lit-checkbox
541
424
  class="cursor"
542
- .checked=${this.existingFields.includes(key)}
425
+ .checked=${this.existingFields.includes(
426
+ e
427
+ )}
543
428
  ></lit-checkbox>
544
- ${this.data?.[key]?.[`tvar_name_${this.userLang}`] || key}
429
+ ${((s = (i = this.data) == null ? void 0 : i[e]) == null ? void 0 : s[`tvar_name_${this.userLang}`]) || e}
545
430
  </span>
546
431
  </lit-menu-item>
547
- `)}
432
+ `;
433
+ }
434
+ )}
548
435
  </lit-menu>
549
436
 
550
- ${isEqual(filteredKeys.length, 0)
551
- ? html `
437
+ ${_.isEqual(r.length, 0) ? o`
552
438
  <div
553
439
  style="display: flex;flex-direction: column; align-items: center"
554
440
  >
@@ -557,21 +443,19 @@ let LitCaseVariablesTab = class LitCaseVariablesTab extends LitElement {
557
443
  >
558
444
  <not-found></not-found>
559
445
  </div>
560
- ${msg('Nenalezeno')}
446
+ ${v("Nenalezeno")}
561
447
  </div>
562
- `
563
- : null}
448
+ ` : null}
564
449
  </simple-popper>
565
450
  </div>
566
- `
567
- : ''}
451
+ ` : ""}
568
452
  `}
569
453
  `;
570
- }
454
+ }
571
455
  };
572
- LitCaseVariablesTab.styles = [
573
- // styles,
574
- css `
456
+ n.styles = [
457
+ // styles,
458
+ I`
575
459
  :host {
576
460
  font-family: 'Inter', sans-serif;
577
461
  }
@@ -791,52 +675,53 @@ LitCaseVariablesTab.styles = [
791
675
  grid-template-columns: repeat(auto-fill, minmax(0, 1fr));
792
676
  }
793
677
  }
794
- `,
678
+ `
795
679
  ];
796
- __decorate([
797
- property({ type: Array })
798
- ], LitCaseVariablesTab.prototype, "rows", void 0);
799
- __decorate([
800
- property({ type: Object })
801
- ], LitCaseVariablesTab.prototype, "data", void 0);
802
- __decorate([
803
- property({ type: Boolean })
804
- ], LitCaseVariablesTab.prototype, "hideTabWhen", void 0);
805
- __decorate([
806
- property({ type: String })
807
- ], LitCaseVariablesTab.prototype, "userLang", void 0);
808
- __decorate([
809
- property({ type: String })
810
- ], LitCaseVariablesTab.prototype, "dateFormat", void 0);
811
- __decorate([
812
- property({ type: Boolean })
813
- ], LitCaseVariablesTab.prototype, "isLoading", void 0);
814
- __decorate([
815
- property({ type: Boolean })
816
- ], LitCaseVariablesTab.prototype, "enableSettings", void 0);
817
- __decorate([
818
- property({ type: String })
819
- ], LitCaseVariablesTab.prototype, "tabId", void 0);
820
- __decorate([
821
- property({ type: Boolean })
822
- ], LitCaseVariablesTab.prototype, "gridVariables", void 0);
823
- __decorate([
824
- property({ type: Function })
825
- ], LitCaseVariablesTab.prototype, "onSettingsChanged", void 0);
826
- __decorate([
827
- state()
828
- ], LitCaseVariablesTab.prototype, "currentBreakpoint", void 0);
829
- __decorate([
830
- state()
831
- ], LitCaseVariablesTab.prototype, "isOpen", void 0);
832
- __decorate([
833
- state()
834
- ], LitCaseVariablesTab.prototype, "filterText", void 0);
835
- __decorate([
836
- state()
837
- ], LitCaseVariablesTab.prototype, "isMobile", void 0);
838
- LitCaseVariablesTab = __decorate([
839
- customElement('lit-case-variables-tab')
840
- ], LitCaseVariablesTab);
841
- export { LitCaseVariablesTab };
842
- //# sourceMappingURL=lit-case-variables-tab.js.map
680
+ d([
681
+ g({ type: Array })
682
+ ], n.prototype, "rows", 2);
683
+ d([
684
+ g({ type: Object })
685
+ ], n.prototype, "data", 2);
686
+ d([
687
+ g({ type: Boolean })
688
+ ], n.prototype, "hideTabWhen", 2);
689
+ d([
690
+ g({ type: String })
691
+ ], n.prototype, "userLang", 2);
692
+ d([
693
+ g({ type: String })
694
+ ], n.prototype, "dateFormat", 2);
695
+ d([
696
+ g({ type: Boolean })
697
+ ], n.prototype, "isLoading", 2);
698
+ d([
699
+ g({ type: Boolean })
700
+ ], n.prototype, "enableSettings", 2);
701
+ d([
702
+ g({ type: String })
703
+ ], n.prototype, "tabId", 2);
704
+ d([
705
+ g({ type: Boolean })
706
+ ], n.prototype, "gridVariables", 2);
707
+ d([
708
+ g({ type: Function })
709
+ ], n.prototype, "onSettingsChanged", 2);
710
+ d([
711
+ b()
712
+ ], n.prototype, "currentBreakpoint", 2);
713
+ d([
714
+ b()
715
+ ], n.prototype, "isOpen", 2);
716
+ d([
717
+ b()
718
+ ], n.prototype, "filterText", 2);
719
+ d([
720
+ b()
721
+ ], n.prototype, "isMobile", 2);
722
+ n = d([
723
+ $("lit-case-variables-tab")
724
+ ], n);
725
+ export {
726
+ n as LitCaseVariablesTab
727
+ };