@bino-bi/bn-template-engine 1.0.0-alpha.0 → 1.0.0-alpha.3

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 (299) hide show
  1. package/dist/bn-template-engine/bn-template-engine.esm.js +1 -1
  2. package/dist/bn-template-engine/p-05a82a77.entry.js +1 -0
  3. package/dist/bn-template-engine/p-0f1504f3.entry.js +1 -0
  4. package/dist/bn-template-engine/p-1970906d.entry.js +1 -0
  5. package/dist/bn-template-engine/p-1dbd339c.entry.js +1 -0
  6. package/dist/bn-template-engine/p-2e68cf09.entry.js +1 -0
  7. package/dist/bn-template-engine/p-31cc6a2d.entry.js +1 -0
  8. package/dist/bn-template-engine/p-37881d05.entry.js +1 -0
  9. package/dist/bn-template-engine/{p-65f8962a.entry.js → p-3b894997.entry.js} +1 -1
  10. package/dist/bn-template-engine/p-50e49732.entry.js +1 -0
  11. package/dist/bn-template-engine/{p-ad94cf63.entry.js → p-6c7c0455.entry.js} +1 -1
  12. package/dist/bn-template-engine/p-6da93eae.entry.js +1 -0
  13. package/dist/bn-template-engine/p-701e1578.entry.js +1 -0
  14. package/dist/bn-template-engine/{p-_LBTIfNN.js → p-8tsCnxIz.js} +1 -1
  15. package/dist/bn-template-engine/p-997b2fe4.entry.js +1 -0
  16. package/dist/bn-template-engine/p-B4ySv9KQ.js +1 -0
  17. package/dist/bn-template-engine/p-BL8gyUwE.js +1 -0
  18. package/dist/bn-template-engine/p-BSfqOkN_.js +1 -0
  19. package/dist/bn-template-engine/{p-Cp4MVxCu.js → p-C0yAPzJz.js} +1 -1
  20. package/dist/bn-template-engine/{p--TeDldm8.js → p-CRLgp9-v.js} +1 -1
  21. package/dist/bn-template-engine/p-CYjZRKdI.js +1 -0
  22. package/dist/bn-template-engine/p-DG-1MR_T.js +1 -0
  23. package/dist/bn-template-engine/{p-CnI71OA9.js → p-DRikHQE-.js} +1 -1
  24. package/dist/bn-template-engine/p-DVMu6dEy.js +1 -0
  25. package/dist/bn-template-engine/p-DtdQCMzj.js +1 -0
  26. package/dist/bn-template-engine/p-JNHhIe7t.js +2 -0
  27. package/dist/bn-template-engine/p-a90f1cbe.entry.js +1 -0
  28. package/dist/bn-template-engine/p-b7bec050.entry.js +1 -0
  29. package/dist/bn-template-engine/p-d7f0cbaf.entry.js +1 -0
  30. package/dist/bn-template-engine/p-dfb61aa5.entry.js +1 -0
  31. package/dist/bn-template-engine/p-ece17f84.entry.js +1 -0
  32. package/dist/bn-template-engine/p-f27995c9.entry.js +1 -0
  33. package/dist/bn-template-engine/p-fd427179.entry.js +1 -0
  34. package/dist/bn-template-engine/p-sqjrku2z.js +1 -0
  35. package/dist/bn-template-engine/{p-CY1RzLjU.js → p-tzFCK9qn.js} +1 -1
  36. package/dist/cjs/{DataFormatDigits-DmTbhF8q.js → DataFormatDigits-DAmZzqbD.js} +1 -1
  37. package/dist/cjs/{DateStringFactory-Dn0aRj2Y.js → DateStringFactory-CcluhpGI.js} +4 -5
  38. package/dist/cjs/{luxon-8hyy5YD7.js → Order-BKoDS21t.js} +310 -0
  39. package/dist/cjs/{SVGVariancesStyleGroup-Czizhngt.js → SVGVariancesStyleGroup-DYYAU-81.js} +1 -1
  40. package/dist/cjs/{StringAdapter-0EbYMkR0.js → StringAdapter-Bneo8T4k.js} +1 -1
  41. package/dist/cjs/bn-asset.cjs.entry.js +5 -6
  42. package/dist/cjs/{bn-body_3.cjs.entry.js → bn-body_4.cjs.entry.js} +360 -27
  43. package/dist/cjs/bn-card.cjs.entry.js +5 -6
  44. package/dist/cjs/bn-chart-structure.cjs.entry.js +17 -22
  45. package/dist/cjs/bn-chart-time.cjs.entry.js +38 -51
  46. package/dist/cjs/bn-component-style.cjs.entry.js +5 -6
  47. package/dist/cjs/bn-context_5.cjs.entry.js +145 -78
  48. package/dist/cjs/bn-dataset.cjs.entry.js +5 -6
  49. package/dist/cjs/bn-grid.cjs.entry.js +8 -11
  50. package/dist/cjs/bn-image.cjs.entry.js +8 -11
  51. package/dist/cjs/bn-internationalization.cjs.entry.js +5 -6
  52. package/dist/cjs/bn-layout-card.cjs.entry.js +3 -3
  53. package/dist/cjs/bn-layout-page.cjs.entry.js +2 -2
  54. package/dist/cjs/bn-message.cjs.entry.js +6 -7
  55. package/dist/cjs/bn-template-engine.cjs.js +2 -2
  56. package/dist/cjs/bn-template.cjs.entry.js +4 -5
  57. package/dist/cjs/bn-text.cjs.entry.js +12 -16
  58. package/dist/cjs/bn-tree.cjs.entry.js +8 -11
  59. package/dist/cjs/{context-protocol-BkYHFkXE.js → context-protocol-CRPmux5D.js} +1 -1
  60. package/dist/cjs/editor-companion.cjs.entry.js +3 -3
  61. package/dist/cjs/ibcs-chart-structure.cjs.entry.js +31 -33
  62. package/dist/cjs/ibcs-chart-time.cjs.entry.js +42 -44
  63. package/dist/cjs/{index-CScBFiS1.js → index-Cjw0q6gP.js} +1 -2
  64. package/dist/cjs/loader.cjs.js +2 -2
  65. package/dist/cjs/{withDataset-ZdN-RRTx.js → scaling-D8sIIKft.js} +68 -3
  66. package/dist/cjs/{withBodyObserver-B0_W1VOf.js → withBodyObserver-C6gLgq_e.js} +2 -2
  67. package/dist/cjs/{componentRegister-C17UFNPh.js → withComponentStatus-_x4LQZ0N.js} +43 -6
  68. package/dist/cjs/{withComponentStyle-C6KHnZHt.js → withComponentStyle-DMtic_9Y.js} +3 -3
  69. package/dist/cjs/{withHasError-Dspb3lIV.js → withHasError-B8gHkfV2.js} +1 -1
  70. package/dist/cjs/{withStyled-Bf-stJTR.js → withStyled-CW30Bh6c.js} +18 -63
  71. package/dist/cjs/{withTranslation-Cz0M5maV.js → withTranslation-CWPAIRjh.js} +3 -3
  72. package/dist/collection/collection-manifest.json +1 -10
  73. package/dist/collection/components/bn-chart-structure/bn-chart-structure.js +2 -3
  74. package/dist/collection/components/bn-chart-time/bn-chart-time.js +21 -30
  75. package/dist/collection/components/bn-message/bn-message.js +1 -1
  76. package/dist/collection/components/bn-page/bn-page.js +1 -1
  77. package/dist/collection/components/bn-table/bn-table.js +63 -12
  78. package/dist/collection/components/bn-table/ibcs-table.css +7 -5
  79. package/dist/collection/components/bn-table/ibcs-table.js +22 -1
  80. package/dist/collection/components/bn-table/utils/elements/CellBarChart.js +56 -25
  81. package/dist/collection/components/bn-table/utils/elements/TableRow.js +3 -1
  82. package/dist/collection/components/bn-table/utils/factories/tableDataSetFactory.js +12 -3
  83. package/dist/collection/components/bn-table/utils/helper/ColumnStatistics.js +9 -1
  84. package/dist/collection/components/bn-template/bn-template.js +1 -1
  85. package/dist/collection/components/bn-text/bn-text.js +1 -1
  86. package/dist/collection/components/bn-title/bn-title.js +1 -9
  87. package/dist/collection/components/bn-title/ibcs-title/ibcs-title.js +1 -1
  88. package/dist/collection/components/editor-companion/editor-companion.js +1 -1
  89. package/dist/collection/utils/DateStringFactory.js +0 -1
  90. package/dist/collection/utils/constants.js +27 -0
  91. package/dist/collection/utils/validate.js +4 -1
  92. package/dist/components/DataFormatDigits.js +1 -1
  93. package/dist/components/DateStringFactory.js +1 -1
  94. package/dist/components/Order.js +1 -1
  95. package/dist/components/SVGVariancesStyleGroup.js +1 -1
  96. package/dist/components/bn-chart-structure.js +1 -1
  97. package/dist/components/bn-chart-time.js +1 -1
  98. package/dist/components/bn-message2.js +1 -1
  99. package/dist/components/bn-page2.js +1 -1
  100. package/dist/components/bn-table.js +1 -1
  101. package/dist/components/bn-template.js +1 -1
  102. package/dist/components/bn-text.js +1 -1
  103. package/dist/components/bn-title2.js +1 -1
  104. package/dist/components/editor-companion.js +1 -1
  105. package/dist/components/ibcs-chart-structure2.js +1 -1
  106. package/dist/components/ibcs-chart-time2.js +1 -1
  107. package/dist/components/ibcs-table2.js +1 -1
  108. package/dist/components/ibcs-title2.js +1 -1
  109. package/dist/components/ibcsRuleSet.js +1 -1
  110. package/dist/components/scaling.js +1 -1
  111. package/dist/components/validate.js +1 -1
  112. package/dist/components/withHasError.js +1 -1
  113. package/dist/esm/{DataFormatDigits-Dt6gpIiZ.js → DataFormatDigits--qIbKvXa.js} +1 -1
  114. package/dist/esm/{DateStringFactory-_Qiv0IvF.js → DateStringFactory-XWdUjsn8.js} +1 -2
  115. package/dist/esm/{luxon-DbyXf6dF.js → Order-sqjrku2z.js} +307 -1
  116. package/dist/esm/{SVGVariancesStyleGroup-DlWgvpzs.js → SVGVariancesStyleGroup-ibg3sLjM.js} +1 -1
  117. package/dist/esm/{StringAdapter-BLvo1Krl.js → StringAdapter-BCLJpQQ8.js} +1 -1
  118. package/dist/esm/bn-asset.entry.js +5 -6
  119. package/dist/esm/{bn-body_3.entry.js → bn-body_4.entry.js} +356 -24
  120. package/dist/esm/bn-card.entry.js +5 -6
  121. package/dist/esm/bn-chart-structure.entry.js +12 -17
  122. package/dist/esm/bn-chart-time.entry.js +31 -44
  123. package/dist/esm/bn-component-style.entry.js +5 -6
  124. package/dist/esm/bn-context_5.entry.js +124 -57
  125. package/dist/esm/bn-dataset.entry.js +5 -6
  126. package/dist/esm/bn-grid.entry.js +8 -11
  127. package/dist/esm/bn-image.entry.js +8 -11
  128. package/dist/esm/bn-internationalization.entry.js +5 -6
  129. package/dist/esm/bn-layout-card.entry.js +3 -3
  130. package/dist/esm/bn-layout-page.entry.js +2 -2
  131. package/dist/esm/bn-message.entry.js +6 -7
  132. package/dist/esm/bn-template-engine.js +3 -3
  133. package/dist/esm/bn-template.entry.js +4 -5
  134. package/dist/esm/bn-text.entry.js +11 -15
  135. package/dist/esm/bn-tree.entry.js +8 -11
  136. package/dist/esm/{context-protocol-DzeqZxg6.js → context-protocol-Bz5klD-F.js} +1 -1
  137. package/dist/esm/editor-companion.entry.js +3 -3
  138. package/dist/esm/ibcs-chart-structure.entry.js +5 -7
  139. package/dist/esm/ibcs-chart-time.entry.js +6 -8
  140. package/dist/esm/{index-B27Ax6P_.js → index-JNHhIe7t.js} +2 -2
  141. package/dist/esm/loader.js +3 -3
  142. package/dist/esm/{withDataset-BT2VQCsG.js → scaling-C6K8FYSF.js} +67 -4
  143. package/dist/esm/{withBodyObserver-gZpZiEIK.js → withBodyObserver-DczL5ia8.js} +2 -2
  144. package/dist/esm/{componentRegister-BtVfu16B.js → withComponentStatus-DodoSXe-.js} +36 -1
  145. package/dist/esm/{withComponentStyle-NaxfakAG.js → withComponentStyle-BerJY64r.js} +3 -3
  146. package/dist/esm/{withHasError-C48fTE2k.js → withHasError-B3QX2emi.js} +1 -1
  147. package/dist/esm/{withStyled-CpUTv74m.js → withStyled-D1fAWJ3g.js} +8 -51
  148. package/dist/esm/{withTranslation-Do4GhleK.js → withTranslation-mimbJdER.js} +3 -3
  149. package/dist/types/components/bn-chart-time/bn-chart-time.d.ts +1 -2
  150. package/dist/types/components/bn-table/bn-table.d.ts +11 -7
  151. package/dist/types/components/bn-table/ibcs-table.d.ts +1 -0
  152. package/dist/types/components/bn-table/utils/elements/Cell.d.ts +1 -0
  153. package/dist/types/components/bn-table/utils/elements/CellBarChart.d.ts +3 -0
  154. package/dist/types/components/bn-title/bn-title.d.ts +0 -1
  155. package/dist/types/components.d.ts +22 -403
  156. package/dist/types/utils/constants.d.ts +15 -0
  157. package/dist/types/utils/validate.d.ts +1 -0
  158. package/package.json +2 -3
  159. package/readme.md +0 -1
  160. package/dist/bn-template-engine/assets/gpx/Chasing_Legends.gpx +0 -195076
  161. package/dist/bn-template-engine/assets/gpx/Fahrt_am_Nachmittag.gpx +0 -142007
  162. package/dist/bn-template-engine/assets/icons/gpx-finish.png +0 -0
  163. package/dist/bn-template-engine/assets/icons/gpx-shadow.png +0 -0
  164. package/dist/bn-template-engine/assets/icons/gpx-start.png +0 -0
  165. package/dist/bn-template-engine/assets/icons/marker-example.png +0 -0
  166. package/dist/bn-template-engine/assets/icons/pin-icon-end.png +0 -0
  167. package/dist/bn-template-engine/assets/icons/pin-icon-start.png +0 -0
  168. package/dist/bn-template-engine/assets/icons/pin-icon-wpt.png +0 -0
  169. package/dist/bn-template-engine/assets/icons/pin-shadow.png +0 -0
  170. package/dist/bn-template-engine/assets/icons/pin.png +0 -0
  171. package/dist/bn-template-engine/p-0e7dc113.entry.js +0 -1
  172. package/dist/bn-template-engine/p-264c6bad.entry.js +0 -1
  173. package/dist/bn-template-engine/p-326a0902.entry.js +0 -1
  174. package/dist/bn-template-engine/p-38a8bde3.entry.js +0 -1
  175. package/dist/bn-template-engine/p-577eafcd.entry.js +0 -1
  176. package/dist/bn-template-engine/p-5905cc43.entry.js +0 -1
  177. package/dist/bn-template-engine/p-5d155a72.entry.js +0 -1
  178. package/dist/bn-template-engine/p-6b8d1ebf.entry.js +0 -1
  179. package/dist/bn-template-engine/p-7995acb2.entry.js +0 -1
  180. package/dist/bn-template-engine/p-7afe431e.entry.js +0 -1
  181. package/dist/bn-template-engine/p-8014b1ac.entry.js +0 -1
  182. package/dist/bn-template-engine/p-80423fc8.entry.js +0 -1
  183. package/dist/bn-template-engine/p-91e74d42.entry.js +0 -1
  184. package/dist/bn-template-engine/p-930a9e29.entry.js +0 -1
  185. package/dist/bn-template-engine/p-93C9jL8R.js +0 -1
  186. package/dist/bn-template-engine/p-93ff8584.entry.js +0 -1
  187. package/dist/bn-template-engine/p-B0m0U4wJ.js +0 -1
  188. package/dist/bn-template-engine/p-B27Ax6P_.js +0 -2
  189. package/dist/bn-template-engine/p-B79VcHiT.js +0 -1
  190. package/dist/bn-template-engine/p-BBd0ZVLL.js +0 -1
  191. package/dist/bn-template-engine/p-BFatTBqh.js +0 -1
  192. package/dist/bn-template-engine/p-BQp6ZPYW.js +0 -1
  193. package/dist/bn-template-engine/p-BhEQy-2D.js +0 -1
  194. package/dist/bn-template-engine/p-BtVfu16B.js +0 -1
  195. package/dist/bn-template-engine/p-CfWnag33.js +0 -1
  196. package/dist/bn-template-engine/p-DbyXf6dF.js +0 -1
  197. package/dist/bn-template-engine/p-TdL-LRR9.js +0 -1
  198. package/dist/bn-template-engine/p-a342cd3c.entry.js +0 -1
  199. package/dist/bn-template-engine/p-bc37d750.entry.js +0 -1
  200. package/dist/bn-template-engine/p-c9f050bf.entry.js +0 -1
  201. package/dist/bn-template-engine/p-d07a0ca3.entry.js +0 -1
  202. package/dist/bn-template-engine/p-e5f372af.entry.js +0 -1
  203. package/dist/bn-template-engine/p-e620028c.entry.js +0 -1
  204. package/dist/bn-template-engine/p-e81e116a.entry.js +0 -1
  205. package/dist/bn-template-engine/p-eca98070.entry.js +0 -1
  206. package/dist/bn-template-engine/p-ee6de950.entry.js +0 -1
  207. package/dist/bn-template-engine/p-efe0ef1e.entry.js +0 -1
  208. package/dist/bn-template-engine/p-f034f1b8.entry.js +0 -1
  209. package/dist/bn-template-engine/p-f1c1a8a3.entry.js +0 -1
  210. package/dist/bn-template-engine/p-fe573a1a.entry.js +0 -1
  211. package/dist/bn-template-engine/p-kMyLevYy.js +0 -1
  212. package/dist/cjs/Order-B4NIqQWe.js +0 -129
  213. package/dist/cjs/bn-map.cjs.entry.js +0 -425
  214. package/dist/cjs/constants-DHqQXSSd.js +0 -158
  215. package/dist/cjs/ibcs-map.cjs.entry.js +0 -1075
  216. package/dist/cjs/ibcs-title.cjs.entry.js +0 -352
  217. package/dist/cjs/scaling-B23eOtsC.js +0 -67
  218. package/dist/cjs/test-runner-card.cjs.entry.js +0 -27
  219. package/dist/cjs/test-runner-chart-time.cjs.entry.js +0 -230
  220. package/dist/cjs/test-runner-chart.cjs.entry.js +0 -326
  221. package/dist/cjs/test-runner-map.cjs.entry.js +0 -1862
  222. package/dist/cjs/test-runner-table.cjs.entry.js +0 -477
  223. package/dist/cjs/test-runner-time.cjs.entry.js +0 -381
  224. package/dist/cjs/test-runner-title.cjs.entry.js +0 -115
  225. package/dist/cjs/withComponentStatus-BrxL7usr.js +0 -39
  226. package/dist/collection/components/bn-map/bn-map.css +0 -4
  227. package/dist/collection/components/bn-map/bn-map.js +0 -725
  228. package/dist/collection/components/bn-map/ibcs-map/assets/gpx/Chasing_Legends.gpx +0 -195076
  229. package/dist/collection/components/bn-map/ibcs-map/assets/gpx/Fahrt_am_Nachmittag.gpx +0 -142007
  230. package/dist/collection/components/bn-map/ibcs-map/assets/icons/gpx-finish.png +0 -0
  231. package/dist/collection/components/bn-map/ibcs-map/assets/icons/gpx-shadow.png +0 -0
  232. package/dist/collection/components/bn-map/ibcs-map/assets/icons/gpx-start.png +0 -0
  233. package/dist/collection/components/bn-map/ibcs-map/assets/icons/marker-example.png +0 -0
  234. package/dist/collection/components/bn-map/ibcs-map/assets/icons/pin-icon-end.png +0 -0
  235. package/dist/collection/components/bn-map/ibcs-map/assets/icons/pin-icon-start.png +0 -0
  236. package/dist/collection/components/bn-map/ibcs-map/assets/icons/pin-icon-wpt.png +0 -0
  237. package/dist/collection/components/bn-map/ibcs-map/assets/icons/pin-shadow.png +0 -0
  238. package/dist/collection/components/bn-map/ibcs-map/assets/icons/pin.png +0 -0
  239. package/dist/collection/components/bn-map/ibcs-map/ibcs-map.css +0 -674
  240. package/dist/collection/components/bn-map/ibcs-map/ibcs-map.js +0 -744
  241. package/dist/collection/components/bn-map/ibcs-map/utils/model/GeoJsonLayer.js +0 -9
  242. package/dist/collection/components/bn-map/ibcs-map/utils/model/GpxLayer.js +0 -13
  243. package/dist/collection/components/bn-map/ibcs-map/utils/model/Marker.js +0 -11
  244. package/dist/collection/components/bn-map/ibcs-map/utils/model/index.js +0 -2
  245. package/dist/collection/test-runner/test-runner-card.js +0 -36
  246. package/dist/collection/test-runner/test-runner-chart-time.js +0 -234
  247. package/dist/collection/test-runner/test-runner-chart.js +0 -364
  248. package/dist/collection/test-runner/test-runner-map.js +0 -1901
  249. package/dist/collection/test-runner/test-runner-table.js +0 -469
  250. package/dist/collection/test-runner/test-runner-time.js +0 -399
  251. package/dist/collection/test-runner/test-runner-title.js +0 -108
  252. package/dist/components/bn-map.d.ts +0 -11
  253. package/dist/components/bn-map.js +0 -1
  254. package/dist/components/componentRegister.js +0 -1
  255. package/dist/components/ibcs-map.d.ts +0 -11
  256. package/dist/components/ibcs-map.js +0 -1
  257. package/dist/components/ibcs-map2.js +0 -1
  258. package/dist/components/test-runner-card.d.ts +0 -11
  259. package/dist/components/test-runner-card.js +0 -1
  260. package/dist/components/test-runner-chart-time.d.ts +0 -11
  261. package/dist/components/test-runner-chart-time.js +0 -1
  262. package/dist/components/test-runner-chart.d.ts +0 -11
  263. package/dist/components/test-runner-chart.js +0 -1
  264. package/dist/components/test-runner-map.d.ts +0 -11
  265. package/dist/components/test-runner-map.js +0 -1
  266. package/dist/components/test-runner-table.d.ts +0 -11
  267. package/dist/components/test-runner-table.js +0 -1
  268. package/dist/components/test-runner-time.d.ts +0 -11
  269. package/dist/components/test-runner-time.js +0 -1
  270. package/dist/components/test-runner-title.d.ts +0 -11
  271. package/dist/components/test-runner-title.js +0 -1
  272. package/dist/components/withDataset.js +0 -1
  273. package/dist/esm/Order-B4fpLe_f.js +0 -125
  274. package/dist/esm/bn-map.entry.js +0 -423
  275. package/dist/esm/constants-kMyLevYy.js +0 -158
  276. package/dist/esm/ibcs-map.entry.js +0 -1073
  277. package/dist/esm/ibcs-title.entry.js +0 -350
  278. package/dist/esm/scaling-BBd0ZVLL.js +0 -64
  279. package/dist/esm/test-runner-card.entry.js +0 -25
  280. package/dist/esm/test-runner-chart-time.entry.js +0 -228
  281. package/dist/esm/test-runner-chart.entry.js +0 -324
  282. package/dist/esm/test-runner-map.entry.js +0 -1860
  283. package/dist/esm/test-runner-table.entry.js +0 -475
  284. package/dist/esm/test-runner-time.entry.js +0 -379
  285. package/dist/esm/test-runner-title.entry.js +0 -113
  286. package/dist/esm/withComponentStatus-elELReKt.js +0 -37
  287. package/dist/types/components/bn-map/bn-map.d.ts +0 -122
  288. package/dist/types/components/bn-map/ibcs-map/ibcs-map.d.ts +0 -73
  289. package/dist/types/components/bn-map/ibcs-map/utils/model/GeoJsonLayer.d.ts +0 -8
  290. package/dist/types/components/bn-map/ibcs-map/utils/model/GpxLayer.d.ts +0 -11
  291. package/dist/types/components/bn-map/ibcs-map/utils/model/Marker.d.ts +0 -9
  292. package/dist/types/components/bn-map/ibcs-map/utils/model/index.d.ts +0 -2
  293. package/dist/types/test-runner/test-runner-card.d.ts +0 -3
  294. package/dist/types/test-runner/test-runner-chart-time.d.ts +0 -3
  295. package/dist/types/test-runner/test-runner-chart.d.ts +0 -3
  296. package/dist/types/test-runner/test-runner-map.d.ts +0 -3
  297. package/dist/types/test-runner/test-runner-table.d.ts +0 -3
  298. package/dist/types/test-runner/test-runner-time.d.ts +0 -3
  299. package/dist/types/test-runner/test-runner-title.d.ts +0 -3
@@ -1 +1 @@
1
- import{h as t,proxyCustomElement as e,HTMLElement as o,Host as s,transformTag as n}from"@stencil/core/internal/client";import{F as r,Q as i,V as l,I as a,S as c}from"./ibcsRuleSet.js";import{I as u,D as h,h as d,i as p,j as f,d as m,M as $}from"./Order.js";import{a as v}from"./alasql.min.js";import{D as g,S as R,a as w,b}from"./DataFormatDigits.js";import{w as S}from"./withComponentStyle.js";var E,O,y,U,M;!function(t){t[t.ALL=-1]="ALL"}(E||(E={})),function(t){t[t.UP_TO_DATE=0]="UP_TO_DATE",t[t.DIRTY=1]="DIRTY"}(O||(O={})),function(t){t.LIST="list",t.SUM="sum",t.SUMNOTOTAL="sumnototal",t.OPT="opt",t.OPTNOTOTAL="optnototal"}(y||(y={})),function(t){t.ASC="asc",t.DESC="desc"}(U||(U={})),function(t){t.HEADER="HEADER",t.GROUPHEAD="GROUPHEAD",t.SEPERATORLINE="SEPERATORLINE",t.SUM="SUM",t.GROUPSUM="GROUP_SUM",t.DRILLELEMENT="DRILLELEMENT",t.STANDARD="STANDARD",t.PARTELEMENT="PARTELEMENT",t.ENTRY="ENTRY"}(M||(M={}));class G{constructor(t,e,o,s,n,r,i,l,a){this.prefixStyle="prefix",this.isBarChart=!1,this.key=t,this.index=e,this.value=o,this.prefix=r||"",this.cssStyle=s||"",this.prefixStyle=i||"prefix",this.type=n,this.mark=void 0,this.colSpan=l||1,this.measureScale=a||1}getAsHeaderList(){if(null==this.value)return[""];const t=[];for(const e of this.value.toString().split("<br/>"))t.push(e);return t}draw(t){let e=this.value;if("undefined"===e||void 0===e||null==e)return"";if(Number.isNaN(Number(e)))return e;if(""===this.type||void 0===this.type||null==this.type)return e;let o=t.percent,s=t.percent;return"decimal"===this.type&&(e=+e/this.measureScale,o=t.decimal,s=t.decimal),r.number(Number(e),this.type,o,s)}drawPrefix(){return null==this.prefix?"":this.prefix}}class T{constructor(t,e,o){this.index=t,this.groupindex=e,this.type=o,this.cssStyle=this.initCssStyle(),this.elements=[]}initCssStyle(){switch(this.type){case M.HEADER:return"groupheader";case M.SEPERATORLINE:return"";case M.DRILLELEMENT:return"ofit";case M.PARTELEMENT:return"partof";case M.STANDARD:return"";case M.SUM:return"sum";default:return""}}getCells(){return this.elements}createElement(t,e,o,s,n,r,i,l,a,c=!1,u){let h=r;"category"===e&&null!=l&&(h=`category-${l.toString()}`),this.type===M.HEADER?h="headerlabel":this.type===M.SEPERATORLINE&&(h=e),this.type===M.PARTELEMENT&&("percent"===s&&(t="-"),"category"!==e&&"operation"!==e&&(s="percent",h="")),"-"===t&&(h="");let d="prefix-first";i&&(d="prefix-second"),h=`${h} ${o}`;const p=new G(e,this.elements.length,t,h,s,n,d,1,a);p.isBarChart=c,p.columnStats=u,this.elements.push(p)}}const _={positive:{stroke:"#008f96",fill:"#008f96",fillpattern:"solid"},negative:{stroke:"#ff0000",fill:"#ff0000",fillpattern:"solid"},neutral:{stroke:"#808080",fill:"#808080",fillpattern:"outlined"},scenarios:{ac:{stroke:"#404040",fill:"#404040",fillpattern:"solid"},pp:{stroke:"#A6A6A6",fill:"#A6A6A6",fillpattern:"solid"},fc:{stroke:"#404040",fill:"#ffffff",fillpattern:"hatched"},pl:{stroke:"#404040",fill:"#ffffff",fillpattern:"outlined"}},fontColor:"#000000",fontSize:11,fontFamily:"'Noto Sans', sans-serif",unitScaling:.01,percentageScaling:.5,scaleFactor:1},C="#666666";function N(t,e){return`pattern-${t}-${e.replace("#","")}`}const L=({styles:e})=>{const o=e.scaleFactor,s=6*o,n=[{id:N("pos",e.positive.stroke),stroke:e.positive.stroke,fill:e.positive.fill},{id:N("neg",e.negative.stroke),stroke:e.negative.stroke,fill:e.negative.fill},{id:N("neu",e.neutral.stroke),stroke:e.neutral.stroke,fill:e.neutral.fill}];return t("defs",null,n.map((e=>t("pattern",{id:e.id,patternUnits:"userSpaceOnUse",width:s,height:s},t("rect",{width:s,height:s,fill:"#ffffff"}),t("line",{x1:"0",y1:s,x2:s,y2:"0",stroke:e.stroke,"stroke-width":1.5*o})))))};function P(t,e,o=1){let s,n;const r=t>=0?"+":"";if(e)return s=100*t,r+Math.round(s).toString()+"%";{let e;return s=t/o,n=Math.abs(s),e=n>=1e9?(s/1e9).toFixed(n>=1e10?0:1)+"B":n>=1e6?(s/1e6).toFixed(n>=1e7?0:1)+"M":n>=1e3?(s/1e3).toFixed(n>=1e4?0:1)+"K":s.toFixed(n>=10?0:1),e=e.replace(/\.0([KMB]?)$/,"$1"),r+e}}function x(t){const e=t.slice(0,2).toLowerCase();return["ac","pp","fc","pl"].includes(e)}function A(t){const e=t.slice(0,2).toLowerCase();return"pp"===e?"pp":"fc"===e?"fc":"pl"===e?"pl":"ac"}function D(t,e,o,s){return x(t)?function(t,e){const o=A(t);return e.scenarios[o]}(t,s):function(t,e,o){const s=t>=0;return e?s?o.positive:o.negative:s?o.negative:o.positive}(e,o,s)}const k=e=>{const{value:o,scenario:s,height:n,isPositiveGood:r,formattedValue:i,measureScale:l,styles:a=_}=e,c=a.scaleFactor,u=50*c,h=40*c,d=u+2*h+u,p=2*c,f=n-2*p,m=u+h,$=Math.abs(o)*a.unitScaling*c,v=Math.min($,h),g=o>=0,R=g?m:m-v,w=p,b=D(s,o,r,a),S=function(t,e){const o=t.fillpattern;return"hatched"===o?`url(#${N(e,t.stroke)})`:"outlined"===o?"transparent":t.fill}(b,x(s)?A(s):r?g?"pos":"neg":g?"neg":"pos"),{stroke:E,strokeWidth:O}="outlined"===(y=b).fillpattern?{stroke:y.stroke,strokeWidth:1.5}:{stroke:"none",strokeWidth:0};var y;const U=i||P(o,!1,l),M=g?m+v+4*c:m-v-4*c,G=g?"start":"end";return t("svg",{width:d,height:n,class:"cell-bar-chart absolute-variance",style:{overflow:"visible"}},t(L,{styles:a}),t("line",{x1:m,y1:0,x2:m,y2:n,stroke:C,"stroke-width":1*c}),v>0&&t("rect",{x:R,y:w,width:v,height:f,fill:S,stroke:E,"stroke-width":O*c}),t("text",{x:M,y:n/2,dy:"0.35em","text-anchor":G,fill:a.fontColor,"font-size":a.fontSize,"font-family":a.fontFamily},U))},B=e=>{const{value:o,scenario:s,height:n,isPositiveGood:r,formattedValue:i,measureScale:l,styles:a=_}=e,c=a.scaleFactor,u=25*c,h=2*u+10*c,d=h+70*c,p=h/2,f=n/2,m=100*Math.abs(o)*a.percentageScaling*c,$=Math.min(m,u),v=o>=0,g=v?p+$:p-$,R=D(s,o,r,a),w=3*c,b=m>u,S=i||P(o,!0,l),E=h+4*c;return t("svg",{width:d,height:n,class:"cell-bar-chart relative-variance",style:{overflow:"visible"}},t("line",{x1:p,y1:0,x2:p,y2:n,stroke:C,"stroke-width":1*c}),!b&&t("circle",{cx:g,cy:f,r:w,fill:a.fontColor}),t("line",{x1:p,y1:f,x2:g,y2:f,stroke:R.fill,"stroke-width":2*c}),b&&v&&t("polygon",{points:`${h-2*c},${f} ${h-8*c},${f-3*c} ${h-8*c},${f+3*c}`,fill:R.fill}),b&&!v&&t("polygon",{points:`${2*c},${f} ${8*c},${f-3*c} ${8*c},${f+3*c}`,fill:R.fill}),t("text",{x:E,y:n/2,dy:"0.35em","text-anchor":"start",fill:a.fontColor,"font-size":a.fontSize,"font-style":"italic","font-family":a.fontFamily},S))},F=e=>{const{value:o,columnStats:s,isRelative:n,styles:r=_}=e;return null==o||isNaN(o)||!s||0===s.absMax?t("span",{class:"bar-chart-empty",style:{color:r.fontColor,fontStyle:"italic"}},"-"):t(n?B:k,Object.assign({},e))};class Y{constructor(t){v.fn.transformOperator=function(t){return"-"===t?-1:1},this.groups=[i.CATEGORY,i.CATEGORYINDEX],y.OPT!==t.type&&y.OPTNOTOTAL!==t.type||this.groups.unshift(i.OPERATION),t.grouped&&(this.groups.push(i.ROWGROUP),this.groups.push(i.ROWGROUPINDEX))}toString(){return this.groups.map((t=>`${t}`)).toString()}noCategory(){return this.groups.filter((t=>t!==i.CATEGORY))}toArray(){return this.groups}}class H{constructor(t,e){this.hasPartOf=!1,this.config=t,this.i18n=e}execute(t){if(0===t.length)return[];const e=[],o=[],s=[],n=this.config.scenarios.map((t=>this.translateScenarioSQL(t,!1,this.config.type))).toString(),r=this.config.scenarios.map((t=>this.translateScenarioSQL(t,!0,this.config.type))).toString(),l=this.getRelativeScenarios(),a=new Y(this.config),c=this.config.grouped?[i.ROWGROUP,i.ROWGROUPINDEX]:[];let u=["",""];return this.config.sortOrder.hierarchy.length>0&&(u=this.createOrderString(this.config.sortOrder)),this.hasPartOf=this.checkConfigForPartOf(),v(`SELECT COUNT(DISTINCT ${i.CATEGORY}) as ${i.TOTALROWCOUNT} ${c.length>0?","+c:""}\n FROM ? ${c.length>0?"GROUP BY "+c:""} \n ORDER BY ${u[0]}`,[t]).forEach((t=>{const s=t.rowGroup&&t.rowGroup.length>0?`WHERE ${i.ROWGROUP} = '${t.rowGroup}'`:"";let l="";this.config.limit&&(l=`LIMIT ${this.config.limit}`),this.createGroupHeaderRow(t,e),this.createDataRow(e,t,a,n,s,u,l),this.createRestRow(t,e,a,n,s,u),this.createGroupSumRow(e,o,t,r,u)})),this.createTotalSumRow(e,o,r),e.forEach((e=>{try{s.push(v(e,[t]))}catch(t){console.error("DataQuery: SQL query execution failed",e,t)}})),this.detectNaNCells(this.config.scenarios,s),this.createThereOfDrillRows(n,u,t,s),this.createPartOfDrillRows(n,u,o,t,s),this.createThereOfDrillColumns(this.config.categoryThereOf,t,s),this.calculateColumnGroupRest(s,this.config.categoryThereOf),this.calculateRelativeVariances(s,l),s}detectNaNCells(t,e){e.forEach((e=>{e.map((e=>(t.forEach((t=>{const o=new l(t);!0===o.isValid?0!==e[o.base+"_cnt"]&&0!==e[o.delta+"_cnt"]||(e[t]=Number.NaN):0===e[t+"_cnt"]&&(e[t]=Number.NaN)})),e)))}))}createPartOfDrillRows(t,e,o,s,n){if(null==this.config.partOf||0===this.config.partOf.length||this.config.type===y.LIST||null==s||0===s.length)return;const r=this.createPartOfQuery(t,e);let l=[];r.forEach((function(t){l.push(...v(t,[s]))}));const a=this.exctractScenarioNames(t),c=[];o.forEach((function(t){c.push(...v(t,[s]))}));const u=new Map;c.forEach((t=>u.set(t[i.ROWGROUP],t))),l=this.reduceResDrillByCategoryGroups(l,a),l.forEach((function(t){a.forEach((e=>{try{t[e]=t[e]/u.get(t[i.ROWGROUP])[e]}catch(o){console.error("DataQuery: partOf drill row calculation failed",e,o),t[e]=Number.NaN}}))})),this.injectDrillRowsToResultRows(l,n)}createRestRow(t,e,o,s,n,r){t.totalRowCnt-this.config.limit>0&&0!==this.config.limit&&e.push(`SELECT ${i.ROWNR}, 1 as ${i.ROWGROUPINDEX} , 'ENTRY' as ${i.TYPE}, 'NO_GROUP' as ${i.ROWGROUP}, 'REST' as ${i.CATEGORY} , SUM(ac1) as ac1, SUM(pp1) as pp1, SUM(dpp1_ac1_pos) as dpp1_ac1_pos, SUM(drpp1_ac1_pos) as drpp1_ac1_pos, SUM(dr_pp1) as dr_pp1 FROM (SELECT ROWNUM() AS ${i.ROWNR}, ${e.length} as ${i.ROWGROUPINDEX} , 'ENTRY' as ${i.TYPE}, '${t.rowGroup||"NO_GROUP"}' as ${i.ROWGROUP}, ${o} ${s.length>0?",".concat(s):""} FROM ? ${n} GROUP BY ${o} ORDER BY ${r[0]}) t WHERE t.rowNr > ${this.config.limit}`)}createDataRow(t,e,o,s,n,r,l){t.push(`SELECT ROWNUM() AS ${i.ROWNR},\n ${t.length} as ${i.ROWGROUPINDEX},\n 'ENTRY' as ${i.TYPE},\n '${e.rowGroup||"NO_GROUP"}' as ${i.ROWGROUP},\n '${i.CATEGORYINDEX}',\n ${o} ${s.length>0?",".concat(s):""}\n FROM ? ${n}\n GROUP BY ${o}\n ORDER BY ${r[0]} ${l}`)}createGroupHeaderRow(t,e){!0===this.config.grouped&&e.push(`SELECT ROWNUM() AS ${i.ROWNR},\n ${e.length} as ${i.ROWGROUPINDEX},\n 'GROUPHEAD' as ${i.TYPE},\n '${t.rowGroup}' as ${i.ROWGROUP} ${this.config.showGroupTitle?`,'${t.rowGroup}' as ${i.CATEGORY}`:""}\n FROM ?\n GROUP BY '1'`)}createGroupSumRow(t,e,o,s,n){!0!==this.config.grouped||y.SUM!==this.config.type&&y.SUMNOTOTAL!==this.config.type&&y.OPT!==this.config.type&&y.OPTNOTOTAL!==this.config.type||(t.push(`SELECT ${t.length} as ${i.ROWGROUPINDEX},\n '=' as ${i.OPERATION},\n '${o.rowGroup}' as ${i.ROWGROUP},\n ROWNUM() AS ${i.ROWNR},\n 'GROUP_SUM' as ${i.TYPE} ${s.length>0?",".concat(s):""}\n FROM ?\n WHERE ${i.ROWGROUP} = '${o.rowGroup}'\n ORDER BY ${n[0]} `),e.push(`SELECT ${t.length} as ${i.ROWGROUPINDEX},\n '=' as ${i.OPERATION},\n '${o.rowGroup}' as ${i.ROWGROUP},\n ROWNUM() AS ${i.ROWNR},\n 'GROUP_SUM' as ${i.TYPE} ${s.length>0?",".concat(s):""}\n FROM ?\n WHERE ${i.ROWGROUP} = '${o.rowGroup}'\n ORDER BY ${n[0]} `))}createTotalSumRow(t,e,o){if(y.SUM===this.config.type||y.OPT===this.config.type){const e=`${this.hasPartOf&&!1===this.config.grouped?`${this.i18n.get("SUM_TOTAL")||"SUM_TOTAL"} `:""}${this.config.title}`;t.push(`SELECT ${t.length} as ${i.ROWGROUPINDEX},\n '${e}' as ${i.ROWGROUP},\n '=' as ${i.OPERATION},\n 'SUM' as ${i.TYPE} ${o.length>0?",".concat(o):""}\n FROM ? `)}e.push(`SELECT ${t.length} as ${i.ROWGROUPINDEX},\n 'SUM_TOTAL' as ${i.ROWGROUP},\n '=' as ${i.OPERATION},\n 'SUM' as ${i.TYPE} ${o.length>0?",".concat(o):""}\n FROM ? `)}reduceResDrillByCategoryGroups(t,e){const o=new Map;return t.forEach((function(t){const s=t.rowNr+t.rowGroup+t.type+t.category;if(o.has(s)){const n=o.get(s);e.forEach((e=>{try{n[e]+=t[e]}catch(t){console.error("DataQuery: drill row aggregation failed",e,t)}}))}else o.set(s,t)})),[...o.values()]}injectDrillRowsToResultRows(t,e){const o=new Map;if(!0===this.config.grouped)t.forEach((function(t){e.forEach((function(e){const s=e.findIndex((e=>e.category===t.category&&e.rowGroup===t.rowGroup));if(s>=0){if(o.has(`${t.category}_${t.rowGroup}`)){const e=o.get(`${t.category}_${t.rowGroup}`)||0;o.set(`${t.category}_${t.rowGroup}`,e+1)}else o.set(`${t.category}_${t.rowGroup}`,1);t[i.ROWNR]=o.get(`${t.category}_${t.rowGroup}`),e.splice(s+t[i.ROWNR],0,t)}}))}));else{const s=this.findDuplicateSubCategories(t);t.forEach((function(t){e.forEach((function(e){const n=e.findIndex((e=>null!=e.category&&e.category===t.category));if(n>=0){if(o.has(`${t.category}`)){const e=o.get(`${t.category}`)||0;o.set(`${t.category}`,e+1)}else o.set(`${t.category}`,1);(1===t[i.ROWNR]||s.includes(t.subCategory))&&(t.subCategory=`${t.subCategory} (${t.rowGroup})`),e.splice(n+t[i.ROWNR],0,t)}}))}))}}createThereOfDrillRows(t,e,o,s){if(void 0===this.config.thereOf||0===this.config.thereOf.length)return;const n=[],r=[];this.config.thereOf.forEach((o=>{let s=!0,r="1 <> 1 OR ( ";null!=o.category&&0!==o.category.length&&o.category.trim()&&(r+=` ${i.CATEGORY} = '${o.category}'`,s=!1),null!=o.rowGroup&&0!==o.rowGroup.length&&o.rowGroup.trim()&&(r+=` ${s?"":"AND"} ${i.ROWGROUP} = '${o.rowGroup}'`,s=!1),null!=o.subCategory&&0!==o.subCategory.length&&o.subCategory.trim()&&(r+=` ${s?"":"AND"} ${i.SUBCATEGORY} = '${o.subCategory}'`),r+=")",n.push(`SELECT ROWNUM() AS ${i.ROWNR},\n null as operation,\n 'DRILLELEMENT' as ${i.TYPE},\n ${i.CATEGORY},\n ${i.SUBCATEGORY},\n ${i.ROWGROUP} as ${i.ROWGROUP},\n ${t}\n FROM ?\n WHERE ${r}\n GROUP BY ${i.ROWGROUP}, ${i.CATEGORY}, ${i.SUBCATEGORY}\n ORDER BY ${e[1]}`)})),n.forEach((function(t){r.push(...v(t,[o]))})),this.injectDrillRowsToResultRows(r,s)}calculateRelativeVariances(t,e){t.forEach((t=>{t.forEach((t=>{"GROUPHEAD"!==t[i.TYPE]&&e.forEach(((e,o)=>{t[o]=t[o]/t[e]}))}))}))}calculateColumnGroupRest(t,e){if(null==e||0===e.size)return;const o=new Map,s=new Map;e.forEach(((t,e)=>{const n=t,r=[];for(const t of n)r.push(`${e}##${t.name}`);o.set(e,r),s.set(`${e}##REST`,!1)})),t.forEach((t=>{t.forEach((t=>{"GROUPHEAD"!==t[i.TYPE]&&o.forEach(((e,o)=>{let n=0;e.forEach((e=>{void 0!==t[e]&&(n+=t[e])})),t[`${o}##REST`]=t[o]-n,0!==t[`${o}##REST`]&&s.set(`${o}##REST`,!0)}))}))}));const n=Array.from(s.entries()).filter((([t,e])=>!e)).map((([t])=>t));t.forEach((t=>{t.forEach((t=>{for(const e of n)delete t[e]}))}))}getRelativeScenarios(){const t=new Map;return this.config.scenarios.forEach((e=>{const o=this.createRelativeScenario(e);null!=o&&t.set(o.key,o.value)})),t}translateScenarioSQL(t,e,o){const s=new l(t);return y.OPT===o||y.OPTNOTOTAL===o?s.isValid?"dr"===s.type?`SUM(${s.base} - ${s.delta}) as ${t}, SUM(${s.delta}) as dr_${s.delta}`:`SUM(${s.base} - ${s.delta}) as ${t}`:e?`SUM(${t} * transformOperator(operation)) as ${t}, COUNT(ISNULL(${t})) as ${t}_cnt`:`SUM(${t}) as ${t}, COUNT(ISNULL(${t})) as ${t}_cnt`:s.isValid?"dr"===s.type?`SUM((${s.base} * transformOperator(operation)) - (${s.delta} * transformOperator(operation))) as ${t}, SUM(${s.delta} * transformOperator(operation)) as dr_${s.delta}`:`SUM((${s.base} * transformOperator(operation))- (${s.delta} * transformOperator(operation))) as ${t}`:`SUM(${t} * transformOperator(operation)) as ${t}, COUNT(ISNULL(${t})) as ${t}_cnt`}createOrderString(t){return[`${t.hierarchy.toString()} ${t.direction}`,`${t.hierarchy.toString()} ${U.ASC===t.direction?U.DESC:U.ASC}`]}createRelativeScenario(t){const e=new l(t);return e.isValid&&"dr"===e.type?{key:`${t}`,value:`dr_${e.delta}`}:null}exctractScenarioNames(t){const e=[];return t.split(",").forEach((t=>t.length>=2?e.push(t.split("as")[1].trim()):null)),e}findDuplicateSubCategories(t){const e=t.map((t=>({count:1,subCategory:t.subCategory}))).reduce(((t,e)=>(t[e.subCategory]=(t[e.subCategory]||0)+e.count,t)),{});return Object.keys(e).filter((t=>e[t]>1))}createPartOfQuery(t,e){var o;const s=[];let n="1 <> 1 ",r=` ${i.ROWGROUP}`,l="ROWNUM()";return null===(o=this.config.partOf)||void 0===o||o.forEach((t=>{n+=`OR (${i.CATEGORY} = '${t.category}'`,null!=t.rowGroup&&0!==t.rowGroup.length&&t.rowGroup.trim()&&(n+=`and ${i.ROWGROUP} = '${t.rowGroup}'`),!1===this.config.grouped&&(r=` 'SUM_TOTAL' as ${i.ROWGROUP} `,l="1"),n+=")"})),s.push(`SELECT ${l} AS ${i.ROWNR},\n 'PARTELEMENT' as ${i.TYPE},\n ${i.CATEGORY},\n ${r},\n ${t}\n FROM ?\n WHERE ${n}\n GROUP BY ${i.ROWGROUP}, ${i.CATEGORY}, ${i.TYPE}\n ORDER BY ${e[1]}`),s}checkConfigForPartOf(){return null!=this.config.partOf&&0!==this.config.partOf.length}createThereOfDrillColumns(t,e,o){if(null==t||0===t.size)return;const s=[],n=[];t.forEach(((t,e)=>{let o="1 <> 1 ";t.forEach((t=>{o+=` or columnGroup = '${t.name}' `})),s.push(`SELECT 'ENTRY' as rowlevel,\n 'COLUMNGROUP' as columnlevel,\n rowGroup,\n category,\n columnGroup,\n '${e}' as scenario,\n sum(${e} * transformOperator(operation)) as val\n FROM ?\n WHERE ${o}\n GROUP BY rowlevel, rowGroup, category, columnGroup, scenario`),s.push(`SELECT 'ENTRY' as rowlevel,\n 'SUBGROUP' as columnlevel,\n rowGroup,\n category,\n columnGroup,\n columnSubGroup,\n '${e}' as scenario,\n sum(${e} * transformOperator(operation)) as val\n FROM ?\n WHERE ${o}\n GROUP BY rowlevel, rowGroup, category, columnGroup, columnSubGroup, scenario`),s.push(`SELECT 'DRILLELEMENT' as rowlevel,\n 'COLUMNGROUP' as columnlevel,\n rowGroup,\n category,\n subCategory,\n columnGroup,\n '${e}' as scenario,\n sum(${e} * transformOperator(operation)) as val\n FROM ?\n WHERE ${o}\n GROUP BY rowlevel, rowGroup, category, subCategory, columnGroup, scenario`),s.push(`SELECT 'DRILLELEMENT' as rowlevel,\n 'SUBGROUP' as columnlevel,\n rowGroup,\n category,\n subCategory,\n columnGroup,\n columnSubGroup,\n '${e}' as scenario,\n sum(${e} * transformOperator(operation)) as val\n FROM ?\n WHERE ${o}\n GROUP BY rowlevel, rowGroup, category, subCategory, columnGroup, columnSubGroup, scenario`),s.push(`SELECT 'GROUP_SUM' as rowlevel,\n 'COLUMNGROUP' as columnlevel,\n rowGroup,\n columnGroup,\n '${e}' as scenario,\n sum(${e} * transformOperator(operation)) as val\n FROM ?\n WHERE ${o}\n GROUP BY rowlevel, rowGroup, columnGroup, scenario`),s.push(`SELECT 'GROUP_SUM' as rowlevel,\n 'SUBGROUP' as columnlevel,\n rowGroup,\n columnGroup,\n columnSubGroup,\n '${e}' as scenario,\n sum(${e} * transformOperator(operation)) as val\n FROM ?\n WHERE ${o}\n GROUP BY rowlevel, rowGroup, columnGroup, columnSubGroup, scenario`),s.push(`SELECT 'SUM' as rowlevel,\n 'COLUMNGROUP' as columnlevel,\n columnGroup,\n '${e}' as scenario,\n sum(${e} * transformOperator(operation)) as val\n FROM ?\n WHERE ${o}\n GROUP BY rowlevel, columnGroup, scenario`),s.push(`SELECT 'SUM' as rowlevel,\n 'SUBGROUP' as columnlevel,\n columnGroup,\n columnSubGroup,\n '${e}' as scenario,\n sum(${e} * transformOperator(operation)) as val\n FROM ?\n WHERE ${o}\n GROUP BY rowlevel, columnGroup, columnSubGroup, scenario`)}));for(const t of s)n.push(...v(t,[e]));this.injectDrillColumnsToResultRows(n,o)}injectDrillColumnsToResultRows(t,e){const o="##";for(const s of t)for(const t of e)for(const e of t)e.type===s.rowlevel&&("ENTRY"===s.rowlevel?"COLUMNGROUP"===s.columnlevel&&e.category===s.category?e[s.scenario+o+s.columnGroup]=s.val:"SUBGROUP"===s.columnlevel&&e.category===s.category&&(e[s.scenario+o+s.columnGroup+o+s.columnSubGroup]=s.val):"DRILLELEMENT"===s.rowlevel?"COLUMNGROUP"===s.columnlevel&&e.category===s.category&&e.subCategory===s.subCategory?e[s.scenario+o+s.columnGroup]=s.val:"SUBGROUP"===s.columnlevel&&e.category===s.category&&e.subCategory===s.subCategory?e[s.scenario+o+s.columnGroup+o+s.columnSubGroup]=s.val:"COLUMNGROUP"===s.columnlevel&&e.category===s.category&&e.subCategory===`${s.subCategory} (${s.rowGroup})`?e[s.scenario+o+s.columnGroup]=s.val:"SUBGROUP"===s.columnlevel&&e.category===s.category&&e.subCategory===`${s.subCategory} (${s.rowGroup})`&&(e[s.scenario+o+s.columnGroup+o+s.columnSubGroup]=s.val):("SUM"===s.rowlevel||"GROUP_SUM"===s.rowlevel)&&("COLUMNGROUP"===s.columnlevel&&e.category===s.category&&e.subCategory===s.subCategory&&(e[s.scenario+o+s.columnGroup]=s.val),"SUBGROUP"===s.columnlevel&&e.category===s.category&&e.subCategory===s.subCategory&&(e[s.scenario+o+s.columnGroup+o+s.columnSubGroup]=s.val)))}}class W{constructor(){this.normalizedHeader=[]}createHeader(t,e,o,s,n,i){const l=[];this.normalizedHeader=this.normalizeHeader(t,e);const a=new T(0,0,M.HEADER),c=new T(1,0,M.SEPERATORLINE);for(const t of this.normalizedHeader)a.createElement(r.translateScenarioLabel(t.name,o),t.type,this.createColumnType(t),null,this.setHeaderPrefix(t,o,s,n,i),null,null,null,null),c.createElement(null,t.type,this.createColumnType(t),null,null,null,null,null,null);return l.push(a),l.push(c),l}setHeaderPrefix(t,e,o,s,n){let i="";return"category"===t.name&&n&&(0===o.prefix.length&&0===s.length||(i=r.translateScenarioLabel("in",e)+" "+o.prefix+s)),t.order&&(i+=r.translateScenarioLabel("ORDER_"+t.order,e)),i}normalizeHeader(t,e){let o=[{name:i.CATEGORY,group:i.CATEGORY,type:i.CATEGORY,order:void 0}];return y.OPT!==t&&y.OPTNOTOTAL!==t||(o=[{name:i.OPERATION,group:i.OPERATION,type:i.OPERATION,order:void 0},{name:i.CATEGORY,group:i.CATEGORY,type:i.CATEGORY,order:void 0}]),[...o,...e]}createBodyRows(t,e,o){const s=[];let n=-1;const r=new H(t,e).execute(o),i=this.calculateColumnStatistics(r,t.barColumns);for(const o of r)n+=1,s.push(...this.createRow(t.i18n,e,t.scenariosUnitType,o,n,-1,t.categoryWidth,t.measureScale,t.barColumns,i));return s}calculateColumnStatistics(t,e){const o=new Map;if(!e||0===e.length)return o;for(const t of e)o.set(t,{min:1/0,max:-1/0,absMax:0});for(const s of t)for(const t of s)for(const s of e){const e=this.extractColumnValue(t,s);if(null!==e&&!isNaN(e)){const t=o.get(s);t.min=Math.min(t.min,e),t.max=Math.max(t.max,e)}}for(const[t,e]of o)e.min!==1/0&&e.max!==-1/0||(e.min=0,e.max=0),e.absMax=Math.max(Math.abs(e.min),Math.abs(e.max)),o.set(t,e);return o}extractColumnValue(t,e){if(void 0!==t[e]){const o=Number(t[e]);return isNaN(o)?null:o}for(const o of Object.keys(t))if(o===e||o.endsWith("##"+e)||o===e+"##"+e){const e=Number(t[o]);if(!isNaN(e))return e}return null}createRow(t,e,o,s,n,r,l,a,c,u){var h;const d=[];for(const p of s){const f=p[i.ROWGROUP],m=p[i.SUBCATEGORY],$=p[i.TYPE],v=p[i.ROWNR]>=2,g=this.createDetailRow($,r+=1,n,s.length);for(const s of this.normalizedHeader){const n=this.getRawDataRowElement(p,s),r=null!==(h=null==c?void 0:c.includes(s.type))&&void 0!==h&&h,i=r?null==u?void 0:u.get(s.type):void 0;g.createElement(this.translateSumCellLabel(t,e,n,f,m,$,s.type),s.type,this.createColumnType(s),this.setCellType(s.type,o),this.translateCellPrefix(e,$,s.type),this.translateScenarioCSS(s.type,n),v,l,null==a?void 0:a.value,r,i)}d.push(g)}return d}getRawDataRowElement(t,e){return e.name===e.group&&e.name===e.type?t[e.name]:e.name===e.group&&e.name!==e.type?t[e.type+"##"+e.name]:t[e.type+"##"+e.group+"##"+e.name]}createDetailRow(t,e,o,s){switch(t){case M.GROUPHEAD:return new T(e,o,M.HEADER);case M.SUM:case M.GROUPSUM:return new T(s+2,o,M.SUM);case M.DRILLELEMENT:return new T(s+2,o,M.DRILLELEMENT);case M.PARTELEMENT:return new T(s+2,o,M.PARTELEMENT);default:return new T(e,o,M.STANDARD)}}translateSumCellLabel(t,e,o,s,n,r,i){return!1===Number.isNaN(Number(o))||this.isOperationColumn(i)?o:this.isGroupHeadCategory(r,i)||this.isEntryCategory(r,i)?t===u.ALL?`${e.get(o)||o}`:o:this.isDrillElementCategory(r,i)?t===u.ALL?`${e.get(n)||n}`:`${n}`:this.isPartElementCategory(r,i)?t===u.ALL||"SUM_TOTAL"===s?`${e.get(s)||s}`:`${s}`:this.isSumElementCategory(r,i)?t===u.ALL||"SUM_TOTAL"===s?`${e.get(s)||s}`:s:"GROUPHEAD"===r&&null==o?o:Number.isNaN(Number(o))?"-":Number(o)}isOperationColumn(t){return"operation"===t}translateScenarioCSS(t,e){const o=new l(t);let s="pos";return e<0&&(s="neg"),o.isValid?s+"_"+o.direction+("dr"===o.type?" relative_variance":""):t}setCellType(t,e){if("category"===t)return"";let o;const s=new l(t);return e===h.PERCENT?(o="percent",s.isValid&&"d"===s.type&&(o="decimal")):(o="decimal",s.isValid&&"dr"===s.type&&(o="percent")),o}isDrillElementCategory(t,e){return"DRILLELEMENT"===t&&"category"===e}isPartElementCategory(t,e){return"PARTELEMENT"===t&&"category"===e}isSumElementCategory(t,e){return("GROUP_SUM"===t||"SUM"===t)&&"category"===e}isEntryCategory(t,e){return"ENTRY"===t&&"category"===e}isGroupHeadCategory(t,e){return"GROUPHEAD"===t&&"category"===e}translateCellPrefix(t,e,o){return this.isOperationColumn(o)||this.isGroupHeadCategory(e,o)||this.isEntryCategory(e,o)?null:this.isDrillElementCategory(e,o)?`${t.get("there_of")} `:this.isPartElementCategory(e,o)?`${t.get("part_of")} `:null}createColumnType(t){return t.name===t.group&&t.name===t.type?"base":t.name===t.group?"columnGroup":"columnSubGroup"}}class I{constructor(t,e,o){this.data=[],this.headerRows=[],this.bodyRows=[],this.ruleSet=t||new a,this.dataSetFactory=new W,this.config=this.initConfig(o),this.i18n=this.initI18n(new Map),this.setData(e,o.filter),this.state=O.DIRTY}setI18n(t){this.i18n=this.initI18n(t)}initI18n(t){const e=new Map([["",""],["SEPERATOR_WS",", "],["in","in"],["ORDER_asc","↑"],["ORDER_desc","↓"],["ac1","AC"],["pp1","PY"],["fc1","FC"],["pl1","PL"],["ac2","AC2"],["pp2","PY2"],["fc2","FC2"],["pl2","PL2"],["ac3","AC3"],["pp3","PY3"],["fc3","FC3"],["pl3","PL3"],["ac4","AC4"],["pp4","PY4"],["fc4","FC4"],["pl4","PL4"],["in","in"],["category"," "],["operation"," "],["there_of","davon"],["part_of","in % von"],["ibcssymbol_delta_ac","Δ{%}"],["ibcssymbol_delta_generic","Δ({%})"],["ibcssymbol_delta_ac_relative","Δ{%}%"],["ibcssymbol_delta_generic_relative","Δ({%})%"],["SUM_TOTAL","❖"]]);return this.state=O.DIRTY,new Map([...e,...t||new Map])}initConfig(t){this.state=O.DIRTY;const e=t,o=this;return t.scenarios.sort(((t,e)=>o.ruleSet.getScenarioSorIndex(t)-o.ruleSet.getScenarioSorIndex(e))),e}setConfig(t){this.config=this.initConfig(t)}setData(t,e){if(null==t)return;if(null!=e&&e.length>0)try{this.data=v(`SELECT * FROM ? WHERE ${e}`,[t])}catch(o){console.error("Table: filter query failed, using unfiltered data",e,o),this.data=t}else this.data=t;const o=this.normalizeScenarios(this.config.scenarios,this.config.categoryThereOf,this.config.sortOrder);this.headerRows=this.dataSetFactory.createHeader(this.config.type,o,this.i18n,this.config.measureScale,this.config.measureUnit,this.config.showMeasureScale),this.bodyRows=this.dataSetFactory.createBodyRows(this.config,this.i18n,this.data),this.state=O.UP_TO_DATE}update(){const t=this.normalizeScenarios(this.config.scenarios,this.config.categoryThereOf,this.config.sortOrder);this.headerRows=this.dataSetFactory.createHeader(this.config.type,t,this.i18n,this.config.measureScale,this.config.measureUnit,this.config.showMeasureScale),this.bodyRows=this.dataSetFactory.createBodyRows(this.config,this.i18n,this.data),this.state=O.UP_TO_DATE}getHeader(){return this.state===O.DIRTY&&this.update(),this.headerRows}getBody(){return this.state===O.DIRTY&&this.update(),this.bodyRows}normalizeScenarios(t,e,o){var s;const n=[];for(const r of t){if(null==e?void 0:e.has(r)){const t=e.get(r);for(const e of t){n.push({name:e.name,group:e.name,type:r,order:void 0});for(const t of e.subGroups)n.push({name:t,group:e.name,type:r,order:void 0})}n.push({name:"REST",group:"REST",type:r,order:void 0})}let t;(null===(s=null==o?void 0:o.hierarchy)||void 0===s?void 0:s.at(0))===r&&(t=o.direction),n.push({name:r,group:r,type:r,order:t})}return n}hasNoData(){return 0===this.data.length}}class z{constructor(){this.title="",this.scenarios=[],this.scenariosUnitType=h.DECIMAL,this.grouped=!1,this.showGroupTitle=!0,this.thereOf=[],this.categoryThereOf=new Map,this.partOf=[],this.sortOrder=new f(new c).default(),this.type=y.LIST,this.limit=0,this.i18n=u.ALL,this.categoryWidth=m.W25,this.measureScale=new R,this.measureUnit="",this.measureType=$.VOLUME,this.showMeasureScale=!0,this.filter="",this.barColumns=[]}}class j{constructor(t,e,o,s){this.tableDrillGroupAdapter=t,this.stringAdapter=e,this.orderAdapter=o,this.dataSet=s}adapt(t){const e=new z;return d.isString(t.title)&&(e.title=t.title),d.isArray(t.scenarios)&&(e.scenarios=p.adaptArray(t.scenarios,this.stringAdapter)),d.isExisting(t.scenariosUnitType)&&(e.scenariosUnitType=t.scenariosUnitType),d.isBoolean(t.grouped)&&(e.grouped=t.grouped),d.isBoolean(t.showGroupTitle)&&(e.showGroupTitle=t.showGroupTitle),d.isBoolean(t.showMeasureScale)&&(e.showMeasureScale=t.showMeasureScale),d.isArray(t.thereOf)&&(e.thereOf=p.adaptArray(t.thereOf,this.tableDrillGroupAdapter)),d.isExisting(t.categoryThereOf)&&(e.categoryThereOf=t.categoryThereOf),d.isArray(t.partOf)&&(e.partOf=p.adaptArray(t.partOf,this.tableDrillGroupAdapter)),d.isExisting(t.order)&&(e.sortOrder=this.orderAdapter.adapt(t.order)),d.isExisting(t.type)&&(e.type=t.type),d.isNumber(t.limit)&&(e.limit=t.limit),d.isExisting(t.i18n)&&(e.i18n=t.i18n),d.isExisting(t.categoryWidth)&&(e.categoryWidth=t.categoryWidth),d.isExisting(t.measureScale)&&(e.measureScale=g.calculateMeasureScale(this.dataSet,e.scenarios,t.measureScale)),d.isExisting(t.measureType)&&(e.measureType=t.measureType),d.isString(t.measureUnit)&&(e.measureUnit=t.measureUnit),d.isString(t.filter)&&(e.filter=t.filter.trim()),d.isArray(t.barColumns)&&(e.barColumns=t.barColumns),e}default(){return new z}}class V{constructor(){this.rowGroup="",this.category="",this.subCategory="",this.partOf=""}}class Q{constructor(){}adapt(t){const e=new V;return d.isString(t.rowGroup)&&(e.rowGroup=t.rowGroup),d.isString(t.category)&&(e.category=t.category),d.isString(t.subCategory)&&(e.subCategory=t.subCategory),d.isString(t.partOf)&&(e.partOf=t.partOf),e}default(){return new V}}class q{constructor(){this.operation="+"}addRowGroup(t,e){this.rowGroup=t,this.rowGroupIndex=e}addCategory(t,e){this.category=t,this.categoryIndex=e}addSubCategory(t,e){this.subCategory=t,this.subCategoryIndex=e}addColumnGroup(t,e){this.columnGroup=t,this.columnGroupIndex=e}addSubColumnGroup(t,e){this.columnSubGroup=t,this.columnSubGroupIndex=e}}class K{constructor(){}adapt(t){const e=new q;return d.isOperator(t.operation)&&(e.operation=t.operation),d.isNumber(t.rowGroupIndex)&&d.isString(t.rowGroup)&&e.addRowGroup(t.rowGroup,t.rowGroupIndex),d.isNumber(t.categoryIndex)&&d.isString(t.category)&&e.addCategory(t.category,t.categoryIndex),d.isNumber(t.subCategoryIndex)&&d.isString(t.subCategory)&&e.addSubCategory(t.subCategory,t.subCategoryIndex),d.isNumber(t.columnGroupIndex)&&d.isString(t.columnGroup)&&e.addColumnGroup(t.columnGroup,t.columnGroupIndex),d.isNumber(t.columnSubGroupIndex)&&d.isString(t.columnSubGroup)&&e.addSubColumnGroup(t.columnSubGroup,t.columnSubGroupIndex),this.setActualValues(t,e),this.setPlanValues(t,e),this.setPreviousPeriodValues(t,e),this.setForecastValues(t,e),e}default(){return new q}setActualValues(t,e){d.isNumber(t.ac1)&&(e.ac1=t.ac1),d.isNumber(t.ac2)&&(e.ac2=t.ac2),d.isNumber(t.ac3)&&(e.ac3=t.ac3),d.isNumber(t.ac4)&&(e.ac4=t.ac4)}setPlanValues(t,e){d.isNumber(t.pp1)&&(e.pp1=t.pp1),d.isNumber(t.pp2)&&(e.pp2=t.pp2),d.isNumber(t.pp3)&&(e.pp3=t.pp3),d.isNumber(t.pp4)&&(e.pp4=t.pp4)}setPreviousPeriodValues(t,e){d.isNumber(t.pl1)&&(e.pl1=t.pl1),d.isNumber(t.pl2)&&(e.pl2=t.pl2),d.isNumber(t.pl3)&&(e.pl3=t.pl3),d.isNumber(t.pl4)&&(e.pl4=t.pl4)}setForecastValues(t,e){d.isNumber(t.fc1)&&(e.fc1=t.fc1),d.isNumber(t.fc2)&&(e.fc2=t.fc2),d.isNumber(t.fc3)&&(e.fc3=t.fc3),d.isNumber(t.fc4)&&(e.fc4=t.fc4)}}const J=e(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.data=[],this.tableTitle="SUM_TOTAL",this.scenarios=[],this.scenariosDataFormat=h.DECIMAL,this.grouped=!1,this.limit=0,this.showGroupTitle=!0,this.thereof=[],this.partof=[],this.order={hierarchy:[],direction:U.ASC},this.categorythereof=new Map,this.type=y.LIST,this.categoryWidth=m.INF,this.dataFormatDigits={percent:2,decimal:1},this.i18n=new Map,this.i18nMode=u.ALL,this.measureScale="_",this.measureUnit="",this.showMeasureScale=!0,this.measureType=$.VOLUME,this.filter="",this.barColumns=[],this.unitScaling=.01,this.percentageScaling=.5,this.scaleFactor=1,this.componentDataFormatDigits=new w,this.componentStyle=S(this)}render(){return t(s,null,(()=>{if(void 0!==this.table){if(this.table.hasNoData()){const e=this.i18n.get("NO_DATA")||"==No Data==";return t("p",{class:"warning"},e)}return t("table",null,t("thead",null,this.table.getHeader().map((e=>t("tr",{class:e.cssStyle},e.getCells().map((e=>t("th",{colSpan:e.colSpan,class:e.cssStyle},e.getAsHeaderList().map(((o,s,n)=>t("span",null,s===n.length-1?t("span",{class:" "===o?"table-footer":""},o,e.drawPrefix()," "):t("span",null,o,e.drawPrefix(),t("br",null)))))))))))),t("tbody",null,this.table.getBody().map((e=>t("tr",{class:e.cssStyle},null==e?void 0:e.getCells().map((e=>t("td",{colSpan:e.colSpan,class:e.cssStyle+" "+e.type},null!=e.prefix?t("span",{class:e.cssStyle+" "+e.prefixStyle},e.drawPrefix()):"",e.isBarChart&&e.columnStats?t(F,{value:e.value,scenario:e.key,columnStats:e.columnStats,height:18*this.scaleFactor,isRelative:e.key.startsWith("dr"),isPositiveGood:e.key.endsWith("_pos"),measureScale:e.measureScale,styles:this.barChartStyles}):e.draw(this.componentDataFormatDigits)))))))))}})())}componentWillRender(){const t=this.prepareConfig(),e=this.prepareData();this.componentDataFormatDigits=(new b).adapt(this.dataFormatDigits),this.barChartStyles=this.prepareBarChartStyles(),this.table=new I(new a,e,t),this.table.setI18n(this.i18n)}prepareConfig(){return new j(new Q,new c,new f(new c),this.data).adapt({title:this.tableTitle,scenarios:this.scenarios,scenariosUnitType:this.scenariosDataFormat,grouped:this.grouped,showGroupTitle:this.showGroupTitle,thereOf:this.thereof,partOf:this.partof,categoryThereOf:this.categorythereof,order:this.order,type:this.type,limit:this.limit,i18n:this.i18nMode,categoryWidth:this.categoryWidth,measureScale:this.measureScale,measureUnit:this.measureUnit,measureType:this.measureType,showMeasureScale:this.showMeasureScale,filter:this.filter,barColumns:this.barColumns})}prepareData(){return p.adaptArray(this.data,new K)}prepareBarChartStyles(){return this.componentStyle((t=>{var e,o,s,n,r,i,l,a,c,u,h,d,p,f,m,$,v,g,R,w,b,S,E,O,y,U;const M=null===(e=t["bn-chart-time"])||void 0===e?void 0:e.varianceStyles,G=null===(o=t["bn-chart-time"])||void 0===o?void 0:o.barStyles;return{positive:{stroke:(null===(s=null==M?void 0:M.pos)||void 0===s?void 0:s.stroke)||"#008f96",fill:(null===(n=null==M?void 0:M.pos)||void 0===n?void 0:n.fill)||"#008f96",fillpattern:(null===(r=null==M?void 0:M.pos)||void 0===r?void 0:r.fillpattern)||"solid"},negative:{stroke:(null===(i=null==M?void 0:M.neg)||void 0===i?void 0:i.stroke)||"#ff0000",fill:(null===(l=null==M?void 0:M.neg)||void 0===l?void 0:l.fill)||"#ff0000",fillpattern:(null===(a=null==M?void 0:M.neg)||void 0===a?void 0:a.fillpattern)||"solid"},neutral:{stroke:(null===(c=null==M?void 0:M.neu)||void 0===c?void 0:c.stroke)||"#808080",fill:(null===(u=null==M?void 0:M.neu)||void 0===u?void 0:u.fill)||"#808080",fillpattern:(null===(h=null==M?void 0:M.neu)||void 0===h?void 0:h.fillpattern)||"outlined"},scenarios:{ac:{stroke:(null===(d=null==G?void 0:G.ac)||void 0===d?void 0:d.stroke)||"#404040",fill:(null===(p=null==G?void 0:G.ac)||void 0===p?void 0:p.fill)||"#404040",fillpattern:(null===(f=null==G?void 0:G.ac)||void 0===f?void 0:f.fillpattern)||"solid"},pp:{stroke:(null===(m=null==G?void 0:G.pp)||void 0===m?void 0:m.stroke)||"#A6A6A6",fill:(null===($=null==G?void 0:G.pp)||void 0===$?void 0:$.fill)||"#A6A6A6",fillpattern:(null===(v=null==G?void 0:G.pp)||void 0===v?void 0:v.fillpattern)||"solid"},fc:{stroke:(null===(g=null==G?void 0:G.fc)||void 0===g?void 0:g.stroke)||"#404040",fill:(null===(R=null==G?void 0:G.fc)||void 0===R?void 0:R.fill)||"#ffffff",fillpattern:(null===(w=null==G?void 0:G.fc)||void 0===w?void 0:w.fillpattern)||"hatched"},pl:{stroke:(null===(b=null==G?void 0:G.pl)||void 0===b?void 0:b.stroke)||"#404040",fill:(null===(S=null==G?void 0:G.pl)||void 0===S?void 0:S.fill)||"#ffffff",fillpattern:(null===(E=null==G?void 0:G.pl)||void 0===E?void 0:E.fillpattern)||"outlined"}},fontColor:(null===(O=t.global)||void 0===O?void 0:O.fontColor)||"#000000",fontSize:.85*((null===(y=t.global)||void 0===y?void 0:y.fontSizePx)||13.3333)*this.scaleFactor,fontFamily:(null===(U=t.global)||void 0===U?void 0:U.fontFamily)||"'Noto Sans', sans-serif",unitScaling:this.unitScaling,percentageScaling:this.percentageScaling,scaleFactor:this.scaleFactor}}))}get element(){return this}static get style(){return':host{position:relative;display:inline-block}table{background-color:var(--bn-font-background, white);font-size:var(--bn-font-size, 1em);color:var(--bn-font-color, black);font-family:var(--bn-font-family, "Noto Sans", "Helvetica Neue", Helvetica, sans-serif);border-spacing:0.3em 0}thead{border-style:none}tr:first-child td{border-top:none;padding-top:0.5em}td.ac1,td.ac2,td.ac3,td.ac4,td.pp1,td.pp2,td.pp3,td.pp4,td.pl1,td.pl2,td.pl3,td.pl4,td.fc1,td.fc2,td.fc3,td.fc4,td.share,td.variance,td.pos_pos,td.pos_neg,td.neg_pos,td.neg_neg,td.pos_neutral,td.neg_neutral{text-align:right}.category-inf{max-width:1000em}.category-w100{max-width:100em}.category-w50{max-width:50em}.category-w25{max-width:25em}.category-w20{max-width:20em}.category-w15{max-width:15em}.category-w10{max-width:10em}.category-w5{max-width:5em}.prefix-second{color:transparent;font-style:normal}.prefix-first{font-style:normal}th{border-bottom:0.1em solid black;text-align:right;font-weight:normal;vertical-align:text-top}td.columnGroup,th.columnGroup{font-size:0.6em}td.columnSubGroup,th.columnSubGroup{font-size:0.6em;border-spacing:0em 0;font-style:italic}td.base,th.base{font-style:normal}th.ofit,td.ofit,tr.ofit,th.partof,td.partof,tr.partof{font-size:0.6em;font-style:italic}td.ofit,td.partof{font-size:0.6em;font-style:italic}th.ofit td,tr.ofit td,th.partof td,tr.partof td{border-top:0em solid black;padding-left:1em}th.ofit share,th.partof share,tr.share td{border-top:0em solid black}th.share,tr.share,td.share{font-size:0.6em;font-style:italic}th.filler{border-bottom:0em solid black;text-align:right}td.filler{border-top:0em none !important;border-bottom:0em none;text-align:right}th.group{text-align:center;border-spacing:1em 0}th.headerlabel{border-bottom:0em none black;padding-bottom:0em}td.variance:after{content:"%"}td.relative_variance{font-style:italic}td.percent{font-style:italic;text-align:right}td.decimal{text-align:right}td.pos_pos{color:#008f96}td.neg_pos{color:#ff0000}td.pos_neg{color:#ff0000}td.neg_neg{color:#008f96}td.pos_pos:before{content:"+"}td.pos_neg:before{content:"+"}td.pos_neu:before{content:"+"}th.ac1,th.ac2,th.ac3,th.ac4{padding-top:0em;border-bottom:0.3em solid black}th.pp1,th.pp2,th.pp3,th.pp4{padding-top:0em;border-bottom:0.3em solid grey}th.pl1,th.pl2,th.pl3,th.pl4{padding-top:0em;border-bottom:0.3em double black}th.fc1,th.fc2,th.fc3,th.fc4{border-bottom:0.3em solid;border-image:repeating-linear-gradient(-45deg, white, white, black, white, white 0.3em) 2}td.colsum{font-weight:bold}th.colsum{padding-top:0em;font-weight:bold}tr.sum td{border-top:0.1em solid black;font-weight:bold;padding-bottom:0.5em}tr.groupheader td{border-top:0em dotted #ddd;padding-top:0.5em;font-weight:bold;font-style:italic}tr.begingroup td{border-top:0em dotted #ddd;padding-top:0.5em}th.begin-group{padding-left:0.75em}th.end-group{padding-left:0.75em}td{box-sizing:border-box;-webkit-box-sizing:border-box;border-top:0.1em dashed #ddd;padding-left:0.5em;max-width:15em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.table-footer{font-size:0.6em}.cell-bar-chart{display:inline-block;vertical-align:middle}.bar-chart-empty{color:#999}td:has(.cell-bar-chart){padding:0 0.25em;vertical-align:middle}td:has(.cell-bar-chart).pos_pos:before,td:has(.cell-bar-chart).pos_neg:before,td:has(.cell-bar-chart).pos_neu:before{content:none}td:has(.cell-bar-chart).variance:after{content:none}'}},[1,"ibcs-table",{data:[16],tableTitle:[1,"table-title"],scenarios:[16],scenariosDataFormat:[1,"scenarios-data-format"],grouped:[4],limit:[2],showGroupTitle:[4,"show-group-title"],thereof:[16],partof:[16],order:[16],categorythereof:[16],type:[1],categoryWidth:[1,"category-width"],dataFormatDigits:[16],i18n:[1040],i18nMode:[1,"i18n-mode"],measureScale:[1,"measure-scale"],measureUnit:[1,"measure-unit"],showMeasureScale:[4,"show-measure-scale"],measureType:[1,"measure-type"],filter:[1],barColumns:[16],unitScaling:[2,"unit-scaling"],percentageScaling:[2,"percentage-scaling"],scaleFactor:[2,"scale-factor"]}]);function X(){"undefined"!=typeof customElements&&["ibcs-table"].forEach((t=>{"ibcs-table"===t&&(customElements.get(n(t))||customElements.define(n(t),J))}))}export{J as I,y as T,X as d}
1
+ import{h as t,proxyCustomElement as e,HTMLElement as o,Host as n,transformTag as s}from"@stencil/core/internal/client";import{F as r,Q as i,V as a,I as l,S as c}from"./ibcsRuleSet.js";import{I as h,D as u,i as d,j as p,k as f,e as m,M as $}from"./Order.js";import{a as v}from"./alasql.min.js";import{D as g,S as R,a as w,b}from"./DataFormatDigits.js";import{w as S}from"./withComponentStyle.js";var E,O,y,M,U;!function(t){t[t.ALL=-1]="ALL"}(E||(E={})),function(t){t[t.UP_TO_DATE=0]="UP_TO_DATE",t[t.DIRTY=1]="DIRTY"}(O||(O={})),function(t){t.LIST="list",t.SUM="sum",t.SUMNOTOTAL="sumnototal",t.OPT="opt",t.OPTNOTOTAL="optnototal"}(y||(y={})),function(t){t.ASC="asc",t.DESC="desc"}(M||(M={})),function(t){t.HEADER="HEADER",t.GROUPHEAD="GROUPHEAD",t.SEPERATORLINE="SEPERATORLINE",t.SUM="SUM",t.GROUPSUM="GROUP_SUM",t.DRILLELEMENT="DRILLELEMENT",t.STANDARD="STANDARD",t.PARTELEMENT="PARTELEMENT",t.ENTRY="ENTRY"}(U||(U={}));class G{constructor(t,e,o,n,s,r,i,a,l){this.prefixStyle="prefix",this.isBarChart=!1,this.key=t,this.index=e,this.value=o,this.prefix=r||"",this.cssStyle=n||"",this.prefixStyle=i||"prefix",this.type=s,this.mark=void 0,this.colSpan=a||1,this.measureScale=l||1}getAsHeaderList(){if(null==this.value)return[""];const t=[];for(const e of this.value.toString().split("<br/>"))t.push(e);return t}draw(t){let e=this.value;if("undefined"===e||void 0===e||null==e)return"";if(Number.isNaN(Number(e)))return e;if(""===this.type||void 0===this.type||null==this.type)return e;let o=t.percent,n=t.percent;return"decimal"===this.type&&(e=+e/this.measureScale,o=t.decimal,n=t.decimal),r.number(Number(e),this.type,o,n)}drawPrefix(){return null==this.prefix?"":this.prefix}}class T{constructor(t,e,o){this.index=t,this.groupindex=e,this.type=o,this.cssStyle=this.initCssStyle(),this.elements=[]}initCssStyle(){switch(this.type){case U.HEADER:return"groupheader";case U.SEPERATORLINE:return"";case U.DRILLELEMENT:return"ofit";case U.PARTELEMENT:return"partof";case U.STANDARD:return"";case U.SUM:return"sum";default:return""}}getCells(){return this.elements}createElement(t,e,o,n,s,r,i,a,l,c=!1,h){let u=r;"category"===e&&null!=a&&(u=`category-${a.toString()}`),this.type===U.HEADER?u="headerlabel":this.type===U.SEPERATORLINE&&(u=e),this.type===U.PARTELEMENT&&("percent"===n&&(t="-"),"category"!==e&&"operation"!==e&&(n="percent",u="")),"-"===t&&(u="");let d="prefix-first";i&&(d="prefix-second"),o&&(u=`${u} ${o}`);const p=new G(e,this.elements.length,t,u,n,s,d,1,l);p.isBarChart=c,p.columnStats=h,this.elements.push(p)}}const _={positive:{stroke:"#008f96",fill:"#008f96",fillpattern:"solid"},negative:{stroke:"#ff0000",fill:"#ff0000",fillpattern:"solid"},neutral:{stroke:"#808080",fill:"#808080",fillpattern:"outlined"},scenarios:{ac:{stroke:"#404040",fill:"#404040",fillpattern:"solid"},pp:{stroke:"#A6A6A6",fill:"#A6A6A6",fillpattern:"solid"},fc:{stroke:"#404040",fill:"#ffffff",fillpattern:"hatched"},pl:{stroke:"#404040",fill:"#ffffff",fillpattern:"outlined"}},fontColor:"#000000",fontSize:11,fontFamily:"'Noto Sans', sans-serif",unitScaling:.01,percentageScaling:.5,scaleFactor:1},C="#666666";function N(t,e){return`pattern-${t}-${e.replace("#","")}`}const L=({styles:e})=>{const o=e.scaleFactor,n=6*o,s=[{id:N("pos",e.positive.stroke),stroke:e.positive.stroke,fill:e.positive.fill},{id:N("neg",e.negative.stroke),stroke:e.negative.stroke,fill:e.negative.fill},{id:N("neu",e.neutral.stroke),stroke:e.neutral.stroke,fill:e.neutral.fill}];return t("defs",null,s.map((e=>t("pattern",{id:e.id,patternUnits:"userSpaceOnUse",width:n,height:n},t("rect",{width:n,height:n,fill:"#ffffff"}),t("line",{x1:"0",y1:n,x2:n,y2:"0",stroke:e.stroke,"stroke-width":1.5*o})))))};function P(t,e,o=1){let n,s;const r=t>=0?"+":"";if(e)return n=100*t,r+Math.round(n).toString()+"%";{let e;return n=t/o,s=Math.abs(n),e=s>=1e9?(n/1e9).toFixed(s>=1e10?0:1)+"B":s>=1e6?(n/1e6).toFixed(s>=1e7?0:1)+"M":s>=1e3?(n/1e3).toFixed(s>=1e4?0:1)+"K":n.toFixed(s>=10?0:1),e=e.replace(/\.0([KMB]?)$/,"$1"),r+e}}function x(t){const e=t.slice(0,2).toLowerCase();return["ac","pp","fc","pl"].includes(e)}function A(t){const e=t.slice(0,2).toLowerCase();return"pp"===e?"pp":"fc"===e?"fc":"pl"===e?"pl":"ac"}function D(t,e,o,n){return x(t)?function(t,e){const o=A(t);return e.scenarios[o]}(t,n):function(t,e,o){const n=t>=0;return e?n?o.positive:o.negative:n?o.negative:o.positive}(e,o,n)}function k(t){return t.median<=0?t.absMax:Math.min(3*t.median,t.absMax)}const B=e=>{const{value:o,scenario:n,columnStats:s,height:r,isPositiveGood:i,formattedValue:a,measureScale:l,maxBarWidth:c=3,styles:h=_}=e,u=h.scaleFactor,d=38*u,p=c*h.fontSize*u,f=s.min<0,m=s.max>0,$=f?p:0,v=(f?d:0)+($+(m?p:0))+(m?d:0),g=2*u,R=r-2*g,w=(f?d:0)+$,b=k(s),S=Math.abs(o),E=S>b,O=Math.min(b>0?S/b:0,1)*p,y=o>=0,M=y?w:w-O,U=g,G=D(n,o,i,h),T=function(t,e){const o=t.fillpattern;return"hatched"===o?`url(#${N(e,t.stroke)})`:"outlined"===o?"transparent":t.fill}(G,x(n)?A(n):i?y?"pos":"neg":y?"neg":"pos"),{stroke:B,strokeWidth:F}="outlined"===(Y=G).fillpattern?{stroke:Y.stroke,strokeWidth:1.5}:{stroke:"none",strokeWidth:0};var Y;const W=a||P(o,!1,l),H=y?w+O+4*u:w-O-4*u,I=y?"start":"end",z=r/2;return t("svg",{width:v,height:r,class:"cell-bar-chart absolute-variance",style:{overflow:"visible"}},t(L,{styles:h}),t("line",{x1:w,y1:0,x2:w,y2:r,stroke:C,"stroke-width":1*u}),O>0&&t("rect",{x:M,y:U,width:O,height:R,fill:T,stroke:B,"stroke-width":F*u}),E&&y&&t("polygon",{points:`${w+p},${z} ${w+p-6*u},${z-3*u} ${w+p-6*u},${z+3*u}`,fill:"transparent"===G.fill?G.stroke:G.fill}),E&&!y&&t("polygon",{points:`${w-p},${z} ${w-p+6*u},${z-3*u} ${w-p+6*u},${z+3*u}`,fill:"transparent"===G.fill?G.stroke:G.fill}),t("text",{x:H,y:r/2,dy:"0.35em","text-anchor":I,fill:h.fontColor,"font-size":h.fontSize,"font-family":h.fontFamily},W))},F=e=>{const{value:o,scenario:n,columnStats:s,height:r,isPositiveGood:i,formattedValue:a,measureScale:l,maxBarWidth:c=3,styles:h=_}=e,u=h.scaleFactor,d=Math.round(.67*c*h.fontSize)*u,p=5*u,f=s.min<0?d+p:0,m=f+(s.max>0?d+p:0),$=m+45*u,v=f,g=r/2,R=k(s),w=Math.abs(o),b=w>R,S=Math.min(R>0?w/R:0,1)*d,E=o>=0,O=E?v+S:v-S,y=D(n,o,i,h),M=3*u,U=a||P(o,!0,l),G=m+4*u;return t("svg",{width:$,height:r,class:"cell-bar-chart relative-variance",style:{overflow:"visible"}},t("line",{x1:v,y1:0,x2:v,y2:r,stroke:C,"stroke-width":1*u}),!b&&t("circle",{cx:O,cy:g,r:M,fill:h.fontColor}),t("line",{x1:v,y1:g,x2:O,y2:g,stroke:y.fill,"stroke-width":2*u}),b&&E&&t("polygon",{points:`${v+d},${g} ${v+d-6*u},${g-3*u} ${v+d-6*u},${g+3*u}`,fill:y.fill}),b&&!E&&t("polygon",{points:`${v-d},${g} ${v-d+6*u},${g-3*u} ${v-d+6*u},${g+3*u}`,fill:y.fill}),t("text",{x:G,y:r/2,dy:"0.35em","text-anchor":"start",fill:h.fontColor,"font-size":h.fontSize,"font-style":"italic","font-family":h.fontFamily},U))},Y=e=>{const{value:o,columnStats:n,isRelative:s,styles:r=_}=e;return null==o||isNaN(o)||!n||0===n.absMax?t("span",{class:"bar-chart-empty",style:{color:r.fontColor,fontStyle:"italic"}},"-"):t(s?F:B,Object.assign({},e))};class W{constructor(t){v.fn.transformOperator=function(t){return"-"===t?-1:1},this.groups=[i.CATEGORY,i.CATEGORYINDEX],y.OPT!==t.type&&y.OPTNOTOTAL!==t.type||this.groups.unshift(i.OPERATION),t.grouped&&(this.groups.push(i.ROWGROUP),this.groups.push(i.ROWGROUPINDEX))}toString(){return this.groups.map((t=>`${t}`)).toString()}noCategory(){return this.groups.filter((t=>t!==i.CATEGORY))}toArray(){return this.groups}}class H{constructor(t,e){this.hasPartOf=!1,this.config=t,this.i18n=e}execute(t){if(0===t.length)return[];const e=[],o=[],n=[],s=this.config.scenarios.map((t=>this.translateScenarioSQL(t,!1,this.config.type))).toString(),r=this.config.scenarios.map((t=>this.translateScenarioSQL(t,!0,this.config.type))).toString(),a=this.getRelativeScenarios(),l=new W(this.config),c=this.config.grouped?[i.ROWGROUP,i.ROWGROUPINDEX]:[];let h=["",""];return this.config.sortOrder.hierarchy.length>0&&(h=this.createOrderString(this.config.sortOrder)),this.hasPartOf=this.checkConfigForPartOf(),v(`SELECT COUNT(DISTINCT ${i.CATEGORY}) as ${i.TOTALROWCOUNT} ${c.length>0?","+c:""}\n FROM ? ${c.length>0?"GROUP BY "+c:""} \n ORDER BY ${h[0]}`,[t]).forEach((t=>{const n=t.rowGroup&&t.rowGroup.length>0?`WHERE ${i.ROWGROUP} = '${t.rowGroup}'`:"";let a="";this.config.limit&&(a=`LIMIT ${this.config.limit}`),this.createGroupHeaderRow(t,e),this.createDataRow(e,t,l,s,n,h,a),this.createRestRow(t,e,l,s,n,h),this.createGroupSumRow(e,o,t,r,h)})),this.createTotalSumRow(e,o,r),e.forEach((e=>{try{n.push(v(e,[t]))}catch(t){console.error("DataQuery: SQL query execution failed",e,t)}})),this.detectNaNCells(this.config.scenarios,n),this.createThereOfDrillRows(s,h,t,n),this.createPartOfDrillRows(s,h,o,t,n),this.createThereOfDrillColumns(this.config.categoryThereOf,t,n),this.calculateColumnGroupRest(n,this.config.categoryThereOf),this.calculateRelativeVariances(n,a),n}detectNaNCells(t,e){e.forEach((e=>{e.map((e=>(t.forEach((t=>{const o=new a(t);!0===o.isValid?0!==e[o.base+"_cnt"]&&0!==e[o.delta+"_cnt"]||(e[t]=Number.NaN):0===e[t+"_cnt"]&&(e[t]=Number.NaN)})),e)))}))}createPartOfDrillRows(t,e,o,n,s){if(null==this.config.partOf||0===this.config.partOf.length||this.config.type===y.LIST||null==n||0===n.length)return;const r=this.createPartOfQuery(t,e);let a=[];r.forEach((function(t){a.push(...v(t,[n]))}));const l=this.exctractScenarioNames(t),c=[];o.forEach((function(t){c.push(...v(t,[n]))}));const h=new Map;c.forEach((t=>h.set(t[i.ROWGROUP],t))),a=this.reduceResDrillByCategoryGroups(a,l),a.forEach((function(t){l.forEach((e=>{try{t[e]=t[e]/h.get(t[i.ROWGROUP])[e]}catch(o){console.error("DataQuery: partOf drill row calculation failed",e,o),t[e]=Number.NaN}}))})),this.injectDrillRowsToResultRows(a,s)}createRestRow(t,e,o,n,s,r){t.totalRowCnt-this.config.limit>0&&0!==this.config.limit&&e.push(`SELECT ${i.ROWNR}, 1 as ${i.ROWGROUPINDEX} , 'ENTRY' as ${i.TYPE}, 'NO_GROUP' as ${i.ROWGROUP}, 'REST' as ${i.CATEGORY} , SUM(ac1) as ac1, SUM(pp1) as pp1, SUM(dpp1_ac1_pos) as dpp1_ac1_pos, SUM(drpp1_ac1_pos) as drpp1_ac1_pos, SUM(dr_pp1) as dr_pp1 FROM (SELECT ROWNUM() AS ${i.ROWNR}, ${e.length} as ${i.ROWGROUPINDEX} , 'ENTRY' as ${i.TYPE}, '${t.rowGroup||"NO_GROUP"}' as ${i.ROWGROUP}, ${o} ${n.length>0?",".concat(n):""} FROM ? ${s} GROUP BY ${o} ORDER BY ${r[0]}) t WHERE t.rowNr > ${this.config.limit}`)}createDataRow(t,e,o,n,s,r,a){t.push(`SELECT ROWNUM() AS ${i.ROWNR},\n ${t.length} as ${i.ROWGROUPINDEX},\n 'ENTRY' as ${i.TYPE},\n '${e.rowGroup||"NO_GROUP"}' as ${i.ROWGROUP},\n '${i.CATEGORYINDEX}',\n ${o} ${n.length>0?",".concat(n):""}\n FROM ? ${s}\n GROUP BY ${o}\n ORDER BY ${r[0]} ${a}`)}createGroupHeaderRow(t,e){!0===this.config.grouped&&e.push(`SELECT ROWNUM() AS ${i.ROWNR},\n ${e.length} as ${i.ROWGROUPINDEX},\n 'GROUPHEAD' as ${i.TYPE},\n '${t.rowGroup}' as ${i.ROWGROUP} ${this.config.showGroupTitle?`,'${t.rowGroup}' as ${i.CATEGORY}`:""}\n FROM ?\n GROUP BY '1'`)}createGroupSumRow(t,e,o,n,s){!0!==this.config.grouped||y.SUM!==this.config.type&&y.SUMNOTOTAL!==this.config.type&&y.OPT!==this.config.type&&y.OPTNOTOTAL!==this.config.type||(t.push(`SELECT ${t.length} as ${i.ROWGROUPINDEX},\n '=' as ${i.OPERATION},\n '${o.rowGroup}' as ${i.ROWGROUP},\n ROWNUM() AS ${i.ROWNR},\n 'GROUP_SUM' as ${i.TYPE} ${n.length>0?",".concat(n):""}\n FROM ?\n WHERE ${i.ROWGROUP} = '${o.rowGroup}'\n ORDER BY ${s[0]} `),e.push(`SELECT ${t.length} as ${i.ROWGROUPINDEX},\n '=' as ${i.OPERATION},\n '${o.rowGroup}' as ${i.ROWGROUP},\n ROWNUM() AS ${i.ROWNR},\n 'GROUP_SUM' as ${i.TYPE} ${n.length>0?",".concat(n):""}\n FROM ?\n WHERE ${i.ROWGROUP} = '${o.rowGroup}'\n ORDER BY ${s[0]} `))}createTotalSumRow(t,e,o){if(y.SUM===this.config.type||y.OPT===this.config.type){const e=`${this.hasPartOf&&!1===this.config.grouped?`${this.i18n.get("SUM_TOTAL")||"SUM_TOTAL"} `:""}${this.config.title}`;t.push(`SELECT ${t.length} as ${i.ROWGROUPINDEX},\n '${e}' as ${i.ROWGROUP},\n '=' as ${i.OPERATION},\n 'SUM' as ${i.TYPE} ${o.length>0?",".concat(o):""}\n FROM ? `)}e.push(`SELECT ${t.length} as ${i.ROWGROUPINDEX},\n 'SUM_TOTAL' as ${i.ROWGROUP},\n '=' as ${i.OPERATION},\n 'SUM' as ${i.TYPE} ${o.length>0?",".concat(o):""}\n FROM ? `)}reduceResDrillByCategoryGroups(t,e){const o=new Map;return t.forEach((function(t){const n=t.rowNr+t.rowGroup+t.type+t.category;if(o.has(n)){const s=o.get(n);e.forEach((e=>{try{s[e]+=t[e]}catch(t){console.error("DataQuery: drill row aggregation failed",e,t)}}))}else o.set(n,t)})),[...o.values()]}injectDrillRowsToResultRows(t,e){const o=new Map;if(!0===this.config.grouped)t.forEach((function(t){e.forEach((function(e){const n=e.findIndex((e=>e.category===t.category&&e.rowGroup===t.rowGroup));if(n>=0){if(o.has(`${t.category}_${t.rowGroup}`)){const e=o.get(`${t.category}_${t.rowGroup}`)||0;o.set(`${t.category}_${t.rowGroup}`,e+1)}else o.set(`${t.category}_${t.rowGroup}`,1);t[i.ROWNR]=o.get(`${t.category}_${t.rowGroup}`),e.splice(n+t[i.ROWNR],0,t)}}))}));else{const n=this.findDuplicateSubCategories(t);t.forEach((function(t){e.forEach((function(e){const s=e.findIndex((e=>null!=e.category&&e.category===t.category));if(s>=0){if(o.has(`${t.category}`)){const e=o.get(`${t.category}`)||0;o.set(`${t.category}`,e+1)}else o.set(`${t.category}`,1);(1===t[i.ROWNR]||n.includes(t.subCategory))&&(t.subCategory=`${t.subCategory} (${t.rowGroup})`),e.splice(s+t[i.ROWNR],0,t)}}))}))}}createThereOfDrillRows(t,e,o,n){if(void 0===this.config.thereOf||0===this.config.thereOf.length)return;const s=[],r=[];this.config.thereOf.forEach((o=>{let n=!0,r="1 <> 1 OR ( ";null!=o.category&&0!==o.category.length&&o.category.trim()&&(r+=` ${i.CATEGORY} = '${o.category}'`,n=!1),null!=o.rowGroup&&0!==o.rowGroup.length&&o.rowGroup.trim()&&(r+=` ${n?"":"AND"} ${i.ROWGROUP} = '${o.rowGroup}'`,n=!1),null!=o.subCategory&&0!==o.subCategory.length&&o.subCategory.trim()&&(r+=` ${n?"":"AND"} ${i.SUBCATEGORY} = '${o.subCategory}'`),r+=")",s.push(`SELECT ROWNUM() AS ${i.ROWNR},\n null as operation,\n 'DRILLELEMENT' as ${i.TYPE},\n ${i.CATEGORY},\n ${i.SUBCATEGORY},\n ${i.ROWGROUP} as ${i.ROWGROUP},\n ${t}\n FROM ?\n WHERE ${r}\n GROUP BY ${i.ROWGROUP}, ${i.CATEGORY}, ${i.SUBCATEGORY}\n ORDER BY ${e[1]}`)})),s.forEach((function(t){r.push(...v(t,[o]))})),this.injectDrillRowsToResultRows(r,n)}calculateRelativeVariances(t,e){t.forEach((t=>{t.forEach((t=>{"GROUPHEAD"!==t[i.TYPE]&&e.forEach(((e,o)=>{t[o]=t[o]/t[e]}))}))}))}calculateColumnGroupRest(t,e){if(null==e||0===e.size)return;const o=new Map,n=new Map;e.forEach(((t,e)=>{const s=t,r=[];for(const t of s)r.push(`${e}##${t.name}`);o.set(e,r),n.set(`${e}##REST`,!1)})),t.forEach((t=>{t.forEach((t=>{"GROUPHEAD"!==t[i.TYPE]&&o.forEach(((e,o)=>{let s=0;e.forEach((e=>{void 0!==t[e]&&(s+=t[e])})),t[`${o}##REST`]=t[o]-s,0!==t[`${o}##REST`]&&n.set(`${o}##REST`,!0)}))}))}));const s=Array.from(n.entries()).filter((([t,e])=>!e)).map((([t])=>t));t.forEach((t=>{t.forEach((t=>{for(const e of s)delete t[e]}))}))}getRelativeScenarios(){const t=new Map;return this.config.scenarios.forEach((e=>{const o=this.createRelativeScenario(e);null!=o&&t.set(o.key,o.value)})),t}translateScenarioSQL(t,e,o){const n=new a(t);return y.OPT===o||y.OPTNOTOTAL===o?n.isValid?"dr"===n.type?`SUM(${n.base} - ${n.delta}) as ${t}, SUM(${n.delta}) as dr_${n.delta}`:`SUM(${n.base} - ${n.delta}) as ${t}`:e?`SUM(${t} * transformOperator(operation)) as ${t}, COUNT(ISNULL(${t})) as ${t}_cnt`:`SUM(${t}) as ${t}, COUNT(ISNULL(${t})) as ${t}_cnt`:n.isValid?"dr"===n.type?`SUM((${n.base} * transformOperator(operation)) - (${n.delta} * transformOperator(operation))) as ${t}, SUM(${n.delta} * transformOperator(operation)) as dr_${n.delta}`:`SUM((${n.base} * transformOperator(operation))- (${n.delta} * transformOperator(operation))) as ${t}`:`SUM(${t} * transformOperator(operation)) as ${t}, COUNT(ISNULL(${t})) as ${t}_cnt`}createOrderString(t){return[`${t.hierarchy.toString()} ${t.direction}`,`${t.hierarchy.toString()} ${M.ASC===t.direction?M.DESC:M.ASC}`]}createRelativeScenario(t){const e=new a(t);return e.isValid&&"dr"===e.type?{key:`${t}`,value:`dr_${e.delta}`}:null}exctractScenarioNames(t){const e=[];return t.split(",").forEach((t=>t.length>=2?e.push(t.split("as")[1].trim()):null)),e}findDuplicateSubCategories(t){const e=t.map((t=>({count:1,subCategory:t.subCategory}))).reduce(((t,e)=>(t[e.subCategory]=(t[e.subCategory]||0)+e.count,t)),{});return Object.keys(e).filter((t=>e[t]>1))}createPartOfQuery(t,e){var o;const n=[];let s="1 <> 1 ",r=` ${i.ROWGROUP}`,a="ROWNUM()";return null===(o=this.config.partOf)||void 0===o||o.forEach((t=>{s+=`OR (${i.CATEGORY} = '${t.category}'`,null!=t.rowGroup&&0!==t.rowGroup.length&&t.rowGroup.trim()&&(s+=`and ${i.ROWGROUP} = '${t.rowGroup}'`),!1===this.config.grouped&&(r=` 'SUM_TOTAL' as ${i.ROWGROUP} `,a="1"),s+=")"})),n.push(`SELECT ${a} AS ${i.ROWNR},\n 'PARTELEMENT' as ${i.TYPE},\n ${i.CATEGORY},\n ${r},\n ${t}\n FROM ?\n WHERE ${s}\n GROUP BY ${i.ROWGROUP}, ${i.CATEGORY}, ${i.TYPE}\n ORDER BY ${e[1]}`),n}checkConfigForPartOf(){return null!=this.config.partOf&&0!==this.config.partOf.length}createThereOfDrillColumns(t,e,o){if(null==t||0===t.size)return;const n=[],s=[];t.forEach(((t,e)=>{let o="1 <> 1 ";t.forEach((t=>{o+=` or columnGroup = '${t.name}' `})),n.push(`SELECT 'ENTRY' as rowlevel,\n 'COLUMNGROUP' as columnlevel,\n rowGroup,\n category,\n columnGroup,\n '${e}' as scenario,\n sum(${e} * transformOperator(operation)) as val\n FROM ?\n WHERE ${o}\n GROUP BY rowlevel, rowGroup, category, columnGroup, scenario`),n.push(`SELECT 'ENTRY' as rowlevel,\n 'SUBGROUP' as columnlevel,\n rowGroup,\n category,\n columnGroup,\n columnSubGroup,\n '${e}' as scenario,\n sum(${e} * transformOperator(operation)) as val\n FROM ?\n WHERE ${o}\n GROUP BY rowlevel, rowGroup, category, columnGroup, columnSubGroup, scenario`),n.push(`SELECT 'DRILLELEMENT' as rowlevel,\n 'COLUMNGROUP' as columnlevel,\n rowGroup,\n category,\n subCategory,\n columnGroup,\n '${e}' as scenario,\n sum(${e} * transformOperator(operation)) as val\n FROM ?\n WHERE ${o}\n GROUP BY rowlevel, rowGroup, category, subCategory, columnGroup, scenario`),n.push(`SELECT 'DRILLELEMENT' as rowlevel,\n 'SUBGROUP' as columnlevel,\n rowGroup,\n category,\n subCategory,\n columnGroup,\n columnSubGroup,\n '${e}' as scenario,\n sum(${e} * transformOperator(operation)) as val\n FROM ?\n WHERE ${o}\n GROUP BY rowlevel, rowGroup, category, subCategory, columnGroup, columnSubGroup, scenario`),n.push(`SELECT 'GROUP_SUM' as rowlevel,\n 'COLUMNGROUP' as columnlevel,\n rowGroup,\n columnGroup,\n '${e}' as scenario,\n sum(${e} * transformOperator(operation)) as val\n FROM ?\n WHERE ${o}\n GROUP BY rowlevel, rowGroup, columnGroup, scenario`),n.push(`SELECT 'GROUP_SUM' as rowlevel,\n 'SUBGROUP' as columnlevel,\n rowGroup,\n columnGroup,\n columnSubGroup,\n '${e}' as scenario,\n sum(${e} * transformOperator(operation)) as val\n FROM ?\n WHERE ${o}\n GROUP BY rowlevel, rowGroup, columnGroup, columnSubGroup, scenario`),n.push(`SELECT 'SUM' as rowlevel,\n 'COLUMNGROUP' as columnlevel,\n columnGroup,\n '${e}' as scenario,\n sum(${e} * transformOperator(operation)) as val\n FROM ?\n WHERE ${o}\n GROUP BY rowlevel, columnGroup, scenario`),n.push(`SELECT 'SUM' as rowlevel,\n 'SUBGROUP' as columnlevel,\n columnGroup,\n columnSubGroup,\n '${e}' as scenario,\n sum(${e} * transformOperator(operation)) as val\n FROM ?\n WHERE ${o}\n GROUP BY rowlevel, columnGroup, columnSubGroup, scenario`)}));for(const t of n)s.push(...v(t,[e]));this.injectDrillColumnsToResultRows(s,o)}injectDrillColumnsToResultRows(t,e){const o="##";for(const n of t)for(const t of e)for(const e of t)e.type===n.rowlevel&&("ENTRY"===n.rowlevel?"COLUMNGROUP"===n.columnlevel&&e.category===n.category?e[n.scenario+o+n.columnGroup]=n.val:"SUBGROUP"===n.columnlevel&&e.category===n.category&&(e[n.scenario+o+n.columnGroup+o+n.columnSubGroup]=n.val):"DRILLELEMENT"===n.rowlevel?"COLUMNGROUP"===n.columnlevel&&e.category===n.category&&e.subCategory===n.subCategory?e[n.scenario+o+n.columnGroup]=n.val:"SUBGROUP"===n.columnlevel&&e.category===n.category&&e.subCategory===n.subCategory?e[n.scenario+o+n.columnGroup+o+n.columnSubGroup]=n.val:"COLUMNGROUP"===n.columnlevel&&e.category===n.category&&e.subCategory===`${n.subCategory} (${n.rowGroup})`?e[n.scenario+o+n.columnGroup]=n.val:"SUBGROUP"===n.columnlevel&&e.category===n.category&&e.subCategory===`${n.subCategory} (${n.rowGroup})`&&(e[n.scenario+o+n.columnGroup+o+n.columnSubGroup]=n.val):("SUM"===n.rowlevel||"GROUP_SUM"===n.rowlevel)&&("COLUMNGROUP"===n.columnlevel&&e.category===n.category&&e.subCategory===n.subCategory&&(e[n.scenario+o+n.columnGroup]=n.val),"SUBGROUP"===n.columnlevel&&e.category===n.category&&e.subCategory===n.subCategory&&(e[n.scenario+o+n.columnGroup+o+n.columnSubGroup]=n.val)))}}class I{constructor(){this.normalizedHeader=[]}createHeader(t,e,o,n,s,i){const a=[];this.normalizedHeader=this.normalizeHeader(t,e);const l=new T(0,0,U.HEADER),c=new T(1,0,U.SEPERATORLINE);for(const t of this.normalizedHeader)l.createElement(r.translateScenarioLabel(t.name,o),t.type,this.createColumnType(t),null,this.setHeaderPrefix(t,o,n,s,i),null,null,null,null),c.createElement(null,t.type,this.createColumnType(t),null,null,null,null,null,null);return a.push(l),a.push(c),a}setHeaderPrefix(t,e,o,n,s){let i="";return"category"===t.name&&s&&(0===o.prefix.length&&0===n.length||(i=r.translateScenarioLabel("in",e)+" "+o.prefix+n)),t.order&&(i+=r.translateScenarioLabel("ORDER_"+t.order,e)),i}normalizeHeader(t,e){let o=[{name:i.CATEGORY,group:i.CATEGORY,type:i.CATEGORY,order:void 0}];return y.OPT!==t&&y.OPTNOTOTAL!==t||(o=[{name:i.OPERATION,group:i.OPERATION,type:i.OPERATION,order:void 0},{name:i.CATEGORY,group:i.CATEGORY,type:i.CATEGORY,order:void 0}]),[...o,...e]}createBodyRows(t,e,o){const n=[];let s=-1;const r=new H(t,e).execute(o),i=this.calculateColumnStatistics(r,t.barColumns);for(const o of r)s+=1,n.push(...this.createRow(t.i18n,e,t.scenariosUnitType,o,s,-1,t.categoryWidth,t.measureScale,t.barColumns,i));return n}calculateColumnStatistics(t,e){const o=new Map;if(!e||0===e.length)return o;const n=new Map;for(const t of e)o.set(t,{min:1/0,max:-1/0,absMax:0,median:0}),n.set(t,[]);for(const s of t)for(const t of s)for(const s of e){const e=this.extractColumnValue(t,s);if(null!==e&&!isNaN(e)){const t=o.get(s);t.min=Math.min(t.min,e),t.max=Math.max(t.max,e),n.get(s).push(Math.abs(e))}}for(const[t,e]of o){e.min!==1/0&&e.max!==-1/0||(e.min=0,e.max=0),e.absMax=Math.max(Math.abs(e.min),Math.abs(e.max));const s=n.get(t);if(s.length>0){s.sort(((t,e)=>t-e));const t=Math.floor(s.length/2);e.median=s.length%2==0?(s[t-1]+s[t])/2:s[t]}o.set(t,e)}return o}extractColumnValue(t,e){if(void 0!==t[e]){const o=Number(t[e]);return isNaN(o)?null:o}for(const o of Object.keys(t))if(o===e||o.endsWith("##"+e)||o===e+"##"+e){const e=Number(t[o]);if(!isNaN(e))return e}return null}createRow(t,e,o,n,s,r,a,l,c,h){var u;const d=[];for(const p of n){const f=p[i.ROWGROUP],m=p[i.SUBCATEGORY],$=p[i.TYPE],v=p[i.ROWNR]>=2,g=this.createDetailRow($,r+=1,s,n.length);for(const n of this.normalizedHeader){const s=this.getRawDataRowElement(p,n),r=null!==(u=null==c?void 0:c.includes(n.type))&&void 0!==u&&u,i=r?null==h?void 0:h.get(n.type):void 0;g.createElement(this.translateSumCellLabel(t,e,s,f,m,$,n.type),n.type,this.createColumnType(n),this.setCellType(n.type,o),this.translateCellPrefix(e,$,n.type),this.translateScenarioCSS(n.type,s),v,a,null==l?void 0:l.value,r,i)}d.push(g)}return d}getRawDataRowElement(t,e){return e.name===e.group&&e.name===e.type?t[e.name]:e.name===e.group&&e.name!==e.type?t[e.type+"##"+e.name]:t[e.type+"##"+e.group+"##"+e.name]}createDetailRow(t,e,o,n){switch(t){case U.GROUPHEAD:return new T(e,o,U.HEADER);case U.SUM:case U.GROUPSUM:return new T(n+2,o,U.SUM);case U.DRILLELEMENT:return new T(n+2,o,U.DRILLELEMENT);case U.PARTELEMENT:return new T(n+2,o,U.PARTELEMENT);default:return new T(e,o,U.STANDARD)}}translateSumCellLabel(t,e,o,n,s,r,i){return!1===Number.isNaN(Number(o))||this.isOperationColumn(i)?o:this.isGroupHeadCategory(r,i)||this.isEntryCategory(r,i)?t===h.ALL?`${e.get(o)||o}`:o:this.isDrillElementCategory(r,i)?t===h.ALL?`${e.get(s)||s}`:`${s}`:this.isPartElementCategory(r,i)?t===h.ALL||"SUM_TOTAL"===n?`${e.get(n)||n}`:`${n}`:this.isSumElementCategory(r,i)?t===h.ALL||"SUM_TOTAL"===n?`${e.get(n)||n}`:n:"GROUPHEAD"===r&&null==o?o:Number.isNaN(Number(o))?"-":Number(o)}isOperationColumn(t){return"operation"===t}translateScenarioCSS(t,e){const o=new a(t);let n="pos";return e<0&&(n="neg"),o.isValid?n+"_"+o.direction+("dr"===o.type?" relative_variance":""):t}setCellType(t,e){if("category"===t)return"";let o;const n=new a(t);return e===u.PERCENT?(o="percent",n.isValid&&"d"===n.type&&(o="decimal")):(o="decimal",n.isValid&&"dr"===n.type&&(o="percent")),o}isDrillElementCategory(t,e){return"DRILLELEMENT"===t&&"category"===e}isPartElementCategory(t,e){return"PARTELEMENT"===t&&"category"===e}isSumElementCategory(t,e){return("GROUP_SUM"===t||"SUM"===t)&&"category"===e}isEntryCategory(t,e){return"ENTRY"===t&&"category"===e}isGroupHeadCategory(t,e){return"GROUPHEAD"===t&&"category"===e}translateCellPrefix(t,e,o){return this.isOperationColumn(o)||this.isGroupHeadCategory(e,o)||this.isEntryCategory(e,o)?null:this.isDrillElementCategory(e,o)?`${t.get("there_of")} `:this.isPartElementCategory(e,o)?`${t.get("part_of")} `:null}createColumnType(t){return t.name===t.group&&t.name===t.type?"base":t.name===t.group?"columnGroup":"columnSubGroup"}}class z{constructor(t,e,o){this.data=[],this.headerRows=[],this.bodyRows=[],this.ruleSet=t||new l,this.dataSetFactory=new I,this.config=this.initConfig(o),this.i18n=this.initI18n(new Map),this.setData(e,o.filter),this.state=O.DIRTY}setI18n(t){this.i18n=this.initI18n(t)}initI18n(t){const e=new Map([["",""],["SEPERATOR_WS",", "],["in","in"],["ORDER_asc","↑"],["ORDER_desc","↓"],["ac1","AC"],["pp1","PY"],["fc1","FC"],["pl1","PL"],["ac2","AC2"],["pp2","PY2"],["fc2","FC2"],["pl2","PL2"],["ac3","AC3"],["pp3","PY3"],["fc3","FC3"],["pl3","PL3"],["ac4","AC4"],["pp4","PY4"],["fc4","FC4"],["pl4","PL4"],["in","in"],["category"," "],["operation"," "],["there_of","davon"],["part_of","in % von"],["ibcssymbol_delta_ac","Δ{%}"],["ibcssymbol_delta_generic","Δ({%})"],["ibcssymbol_delta_ac_relative","Δ{%}%"],["ibcssymbol_delta_generic_relative","Δ({%})%"],["SUM_TOTAL","❖"]]);return this.state=O.DIRTY,new Map([...e,...t||new Map])}initConfig(t){this.state=O.DIRTY;const e=t,o=this;return t.scenarios.sort(((t,e)=>o.ruleSet.getScenarioSorIndex(t)-o.ruleSet.getScenarioSorIndex(e))),e}setConfig(t){this.config=this.initConfig(t)}setData(t,e){if(null==t)return;if(null!=e&&e.length>0)try{this.data=v(`SELECT * FROM ? WHERE ${e}`,[t])}catch(o){console.error("Table: filter query failed, using unfiltered data",e,o),this.data=t}else this.data=t;const o=this.normalizeScenarios(this.config.scenarios,this.config.categoryThereOf,this.config.sortOrder);this.headerRows=this.dataSetFactory.createHeader(this.config.type,o,this.i18n,this.config.measureScale,this.config.measureUnit,this.config.showMeasureScale),this.bodyRows=this.dataSetFactory.createBodyRows(this.config,this.i18n,this.data),this.state=O.UP_TO_DATE}update(){const t=this.normalizeScenarios(this.config.scenarios,this.config.categoryThereOf,this.config.sortOrder);this.headerRows=this.dataSetFactory.createHeader(this.config.type,t,this.i18n,this.config.measureScale,this.config.measureUnit,this.config.showMeasureScale),this.bodyRows=this.dataSetFactory.createBodyRows(this.config,this.i18n,this.data),this.state=O.UP_TO_DATE}getHeader(){return this.state===O.DIRTY&&this.update(),this.headerRows}getBody(){return this.state===O.DIRTY&&this.update(),this.bodyRows}normalizeScenarios(t,e,o){var n;const s=[];for(const r of t){if(null==e?void 0:e.has(r)){const t=e.get(r);for(const e of t){s.push({name:e.name,group:e.name,type:r,order:void 0});for(const t of e.subGroups)s.push({name:t,group:e.name,type:r,order:void 0})}s.push({name:"REST",group:"REST",type:r,order:void 0})}let t;(null===(n=null==o?void 0:o.hierarchy)||void 0===n?void 0:n.at(0))===r&&(t=o.direction),s.push({name:r,group:r,type:r,order:t})}return s}hasNoData(){return 0===this.data.length}}class j{constructor(){this.title="",this.scenarios=[],this.scenariosUnitType=u.DECIMAL,this.grouped=!1,this.showGroupTitle=!0,this.thereOf=[],this.categoryThereOf=new Map,this.partOf=[],this.sortOrder=new f(new c).default(),this.type=y.LIST,this.limit=0,this.i18n=h.ALL,this.categoryWidth=m.W25,this.measureScale=new R,this.measureUnit="",this.measureType=$.VOLUME,this.showMeasureScale=!0,this.filter="",this.barColumns=[]}}class V{constructor(t,e,o,n){this.tableDrillGroupAdapter=t,this.stringAdapter=e,this.orderAdapter=o,this.dataSet=n}adapt(t){const e=new j;return d.isString(t.title)&&(e.title=t.title),d.isArray(t.scenarios)&&(e.scenarios=p.adaptArray(t.scenarios,this.stringAdapter)),d.isExisting(t.scenariosUnitType)&&(e.scenariosUnitType=t.scenariosUnitType),d.isBoolean(t.grouped)&&(e.grouped=t.grouped),d.isBoolean(t.showGroupTitle)&&(e.showGroupTitle=t.showGroupTitle),d.isBoolean(t.showMeasureScale)&&(e.showMeasureScale=t.showMeasureScale),d.isArray(t.thereOf)&&(e.thereOf=p.adaptArray(t.thereOf,this.tableDrillGroupAdapter)),d.isExisting(t.categoryThereOf)&&(e.categoryThereOf=t.categoryThereOf),d.isArray(t.partOf)&&(e.partOf=p.adaptArray(t.partOf,this.tableDrillGroupAdapter)),d.isExisting(t.order)&&(e.sortOrder=this.orderAdapter.adapt(t.order)),d.isExisting(t.type)&&(e.type=t.type),d.isNumber(t.limit)&&(e.limit=t.limit),d.isExisting(t.i18n)&&(e.i18n=t.i18n),d.isExisting(t.categoryWidth)&&(e.categoryWidth=t.categoryWidth),d.isExisting(t.measureScale)&&(e.measureScale=g.calculateMeasureScale(this.dataSet,e.scenarios,t.measureScale)),d.isExisting(t.measureType)&&(e.measureType=t.measureType),d.isString(t.measureUnit)&&(e.measureUnit=t.measureUnit),d.isString(t.filter)&&(e.filter=t.filter.trim()),d.isArray(t.barColumns)&&(e.barColumns=t.barColumns),e}default(){return new j}}class Q{constructor(){this.rowGroup="",this.category="",this.subCategory="",this.partOf=""}}class q{constructor(){}adapt(t){const e=new Q;return d.isString(t.rowGroup)&&(e.rowGroup=t.rowGroup),d.isString(t.category)&&(e.category=t.category),d.isString(t.subCategory)&&(e.subCategory=t.subCategory),d.isString(t.partOf)&&(e.partOf=t.partOf),e}default(){return new Q}}class K{constructor(){this.operation="+"}addRowGroup(t,e){this.rowGroup=t,this.rowGroupIndex=e}addCategory(t,e){this.category=t,this.categoryIndex=e}addSubCategory(t,e){this.subCategory=t,this.subCategoryIndex=e}addColumnGroup(t,e){this.columnGroup=t,this.columnGroupIndex=e}addSubColumnGroup(t,e){this.columnSubGroup=t,this.columnSubGroupIndex=e}}class J{constructor(){}adapt(t){const e=new K;return d.isOperator(t.operation)&&(e.operation=t.operation),d.isNumber(t.rowGroupIndex)&&d.isString(t.rowGroup)&&e.addRowGroup(t.rowGroup,t.rowGroupIndex),d.isNumber(t.categoryIndex)&&d.isString(t.category)&&e.addCategory(t.category,t.categoryIndex),d.isNumber(t.subCategoryIndex)&&d.isString(t.subCategory)&&e.addSubCategory(t.subCategory,t.subCategoryIndex),d.isNumber(t.columnGroupIndex)&&d.isString(t.columnGroup)&&e.addColumnGroup(t.columnGroup,t.columnGroupIndex),d.isNumber(t.columnSubGroupIndex)&&d.isString(t.columnSubGroup)&&e.addSubColumnGroup(t.columnSubGroup,t.columnSubGroupIndex),this.setActualValues(t,e),this.setPlanValues(t,e),this.setPreviousPeriodValues(t,e),this.setForecastValues(t,e),e}default(){return new K}setActualValues(t,e){d.isNumber(t.ac1)&&(e.ac1=t.ac1),d.isNumber(t.ac2)&&(e.ac2=t.ac2),d.isNumber(t.ac3)&&(e.ac3=t.ac3),d.isNumber(t.ac4)&&(e.ac4=t.ac4)}setPlanValues(t,e){d.isNumber(t.pp1)&&(e.pp1=t.pp1),d.isNumber(t.pp2)&&(e.pp2=t.pp2),d.isNumber(t.pp3)&&(e.pp3=t.pp3),d.isNumber(t.pp4)&&(e.pp4=t.pp4)}setPreviousPeriodValues(t,e){d.isNumber(t.pl1)&&(e.pl1=t.pl1),d.isNumber(t.pl2)&&(e.pl2=t.pl2),d.isNumber(t.pl3)&&(e.pl3=t.pl3),d.isNumber(t.pl4)&&(e.pl4=t.pl4)}setForecastValues(t,e){d.isNumber(t.fc1)&&(e.fc1=t.fc1),d.isNumber(t.fc2)&&(e.fc2=t.fc2),d.isNumber(t.fc3)&&(e.fc3=t.fc3),d.isNumber(t.fc4)&&(e.fc4=t.fc4)}}const X=e(class extends o{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.data=[],this.tableTitle="SUM_TOTAL",this.scenarios=[],this.scenariosDataFormat=u.DECIMAL,this.grouped=!1,this.limit=0,this.showGroupTitle=!0,this.thereof=[],this.partof=[],this.order={hierarchy:[],direction:M.ASC},this.categorythereof=new Map,this.type=y.LIST,this.categoryWidth=m.INF,this.dataFormatDigits={percent:2,decimal:1},this.i18n=new Map,this.i18nMode=h.ALL,this.measureScale="_",this.measureUnit="",this.showMeasureScale=!0,this.measureType=$.VOLUME,this.filter="",this.barColumns=[],this.barColumnMaxWidth=30,this.unitScaling=.01,this.percentageScaling=.5,this.scaleFactor=1,this.componentDataFormatDigits=new w,this.componentStyle=S(this)}render(){return t(n,null,(()=>{if(void 0!==this.table){if(this.table.hasNoData()){const e=this.i18n.get("NO_DATA")||"==No Data==";return t("p",{class:"warning"},e)}return t("table",null,t("thead",null,this.table.getHeader().map((e=>t("tr",{class:e.cssStyle},e.getCells().map((e=>t("th",{colSpan:e.colSpan,class:e.cssStyle},e.getAsHeaderList().map(((o,n,s)=>t("span",null,n===s.length-1?t("span",{class:" "===o?"table-footer":""},o,e.drawPrefix()," "):t("span",null,o,e.drawPrefix(),t("br",null)))))))))))),t("tbody",null,this.table.getBody().map((e=>t("tr",{class:e.cssStyle},null==e?void 0:e.getCells().map((e=>t("td",{colSpan:e.colSpan,class:e.type?`${e.cssStyle} ${e.type}`:e.cssStyle},null!=e.prefix?t("span",{class:e.cssStyle+" "+e.prefixStyle},e.drawPrefix()):"",e.isBarChart&&e.columnStats?t(Y,{value:e.value,scenario:e.key,columnStats:e.columnStats,height:18*this.scaleFactor,isRelative:e.key.startsWith("dr"),isPositiveGood:e.key.endsWith("_pos"),measureScale:e.measureScale,maxBarWidth:this.barColumnMaxWidth,styles:this.barChartStyles}):e.draw(this.componentDataFormatDigits)))))))))}})())}componentWillRender(){const t=this.prepareConfig(),e=this.prepareData();this.componentDataFormatDigits=(new b).adapt(this.dataFormatDigits),this.barChartStyles=this.prepareBarChartStyles(),this.table=new z(new l,e,t),this.table.setI18n(this.i18n)}prepareConfig(){return new V(new q,new c,new f(new c),this.data).adapt({title:this.tableTitle,scenarios:this.scenarios,scenariosUnitType:this.scenariosDataFormat,grouped:this.grouped,showGroupTitle:this.showGroupTitle,thereOf:this.thereof,partOf:this.partof,categoryThereOf:this.categorythereof,order:this.order,type:this.type,limit:this.limit,i18n:this.i18nMode,categoryWidth:this.categoryWidth,measureScale:this.measureScale,measureUnit:this.measureUnit,measureType:this.measureType,showMeasureScale:this.showMeasureScale,filter:this.filter,barColumns:this.barColumns})}prepareData(){return p.adaptArray(this.data,new J)}prepareBarChartStyles(){return this.componentStyle((t=>{var e,o,n,s,r,i,a,l,c,h,u,d,p,f,m,$,v,g,R,w,b,S,E,O,y,M;const U=null===(e=t["bn-chart-time"])||void 0===e?void 0:e.varianceStyles,G=null===(o=t["bn-chart-time"])||void 0===o?void 0:o.barStyles;return{positive:{stroke:(null===(n=null==U?void 0:U.pos)||void 0===n?void 0:n.stroke)||"#008f96",fill:(null===(s=null==U?void 0:U.pos)||void 0===s?void 0:s.fill)||"#008f96",fillpattern:(null===(r=null==U?void 0:U.pos)||void 0===r?void 0:r.fillpattern)||"solid"},negative:{stroke:(null===(i=null==U?void 0:U.neg)||void 0===i?void 0:i.stroke)||"#ff0000",fill:(null===(a=null==U?void 0:U.neg)||void 0===a?void 0:a.fill)||"#ff0000",fillpattern:(null===(l=null==U?void 0:U.neg)||void 0===l?void 0:l.fillpattern)||"solid"},neutral:{stroke:(null===(c=null==U?void 0:U.neu)||void 0===c?void 0:c.stroke)||"#808080",fill:(null===(h=null==U?void 0:U.neu)||void 0===h?void 0:h.fill)||"#808080",fillpattern:(null===(u=null==U?void 0:U.neu)||void 0===u?void 0:u.fillpattern)||"outlined"},scenarios:{ac:{stroke:(null===(d=null==G?void 0:G.ac)||void 0===d?void 0:d.stroke)||"#404040",fill:(null===(p=null==G?void 0:G.ac)||void 0===p?void 0:p.fill)||"#404040",fillpattern:(null===(f=null==G?void 0:G.ac)||void 0===f?void 0:f.fillpattern)||"solid"},pp:{stroke:(null===(m=null==G?void 0:G.pp)||void 0===m?void 0:m.stroke)||"#A6A6A6",fill:(null===($=null==G?void 0:G.pp)||void 0===$?void 0:$.fill)||"#A6A6A6",fillpattern:(null===(v=null==G?void 0:G.pp)||void 0===v?void 0:v.fillpattern)||"solid"},fc:{stroke:(null===(g=null==G?void 0:G.fc)||void 0===g?void 0:g.stroke)||"#404040",fill:(null===(R=null==G?void 0:G.fc)||void 0===R?void 0:R.fill)||"#ffffff",fillpattern:(null===(w=null==G?void 0:G.fc)||void 0===w?void 0:w.fillpattern)||"hatched"},pl:{stroke:(null===(b=null==G?void 0:G.pl)||void 0===b?void 0:b.stroke)||"#404040",fill:(null===(S=null==G?void 0:G.pl)||void 0===S?void 0:S.fill)||"#ffffff",fillpattern:(null===(E=null==G?void 0:G.pl)||void 0===E?void 0:E.fillpattern)||"outlined"}},fontColor:(null===(O=t.global)||void 0===O?void 0:O.fontColor)||"#000000",fontSize:.85*((null===(y=t.global)||void 0===y?void 0:y.fontSizePx)||13.3333)*this.scaleFactor,fontFamily:(null===(M=t.global)||void 0===M?void 0:M.fontFamily)||"'Noto Sans', sans-serif",unitScaling:this.unitScaling,percentageScaling:this.percentageScaling,scaleFactor:this.scaleFactor}}))}get element(){return this}static get style(){return':host{position:relative;display:inline-block}table{background-color:var(--bn-font-background, white);font-size:var(--bn-font-size, 1em);color:var(--bn-font-color, black);font-family:var(--bn-font-family, "Noto Sans", "Helvetica Neue", Helvetica, sans-serif);border-spacing:0.3em 0}thead{border-style:none}tr:first-child td{border-top:none;padding-top:0.5em}td.ac1,td.ac2,td.ac3,td.ac4,td.pp1,td.pp2,td.pp3,td.pp4,td.pl1,td.pl2,td.pl3,td.pl4,td.fc1,td.fc2,td.fc3,td.fc4,td.share,td.variance,td.pos_pos,td.pos_neg,td.neg_pos,td.neg_neg,td.pos_neutral,td.neg_neutral{text-align:right}.category-w100{min-width:100em;max-width:100em}.category-w50{min-width:50em;max-width:50em}.category-w25{min-width:25em;max-width:25em}.category-w20{min-width:20em;max-width:20em}.category-w15{min-width:15em;max-width:15em}.category-w10{min-width:10em;max-width:10em}.category-w5{min-width:5em;max-width:5em}.prefix-second{color:transparent;font-style:normal}.prefix-first{font-style:normal}th{border-bottom:0.1em solid black;text-align:right;font-weight:normal;vertical-align:text-top}td.columnGroup,th.columnGroup{font-size:0.6em}td.columnSubGroup,th.columnSubGroup{font-size:0.6em;border-spacing:0em 0;font-style:italic}td.base,th.base{font-style:normal}th.ofit,td.ofit,tr.ofit,th.partof,td.partof,tr.partof{font-size:0.6em;font-style:italic}td.ofit,td.partof{font-size:0.6em;font-style:italic}th.ofit td,tr.ofit td,th.partof td,tr.partof td{border-top:0em solid black;padding-left:1em}th.ofit share,th.partof share,tr.share td{border-top:0em solid black}th.share,tr.share,td.share{font-size:0.6em;font-style:italic}th.filler{border-bottom:0em solid black;text-align:right}td.filler{border-top:0em none !important;border-bottom:0em none;text-align:right}th.group{text-align:center;border-spacing:1em 0}th.headerlabel{border-bottom:0em none black;padding-bottom:0em}td.variance:after{content:"%"}td.relative_variance{font-style:italic}td.percent{font-style:italic;text-align:right}td.decimal{text-align:right}td.pos_pos{color:#008f96}td.neg_pos{color:#ff0000}td.pos_neg{color:#ff0000}td.neg_neg{color:#008f96}td.pos_pos:before{content:"+"}td.pos_neg:before{content:"+"}td.pos_neu:before{content:"+"}th.ac1,th.ac2,th.ac3,th.ac4{padding-top:0em;border-bottom:0.3em solid black}th.pp1,th.pp2,th.pp3,th.pp4{padding-top:0em;border-bottom:0.3em solid grey}th.pl1,th.pl2,th.pl3,th.pl4{padding-top:0em;border-bottom:0.3em double black}th.fc1,th.fc2,th.fc3,th.fc4{border-bottom:0.3em solid;border-image:repeating-linear-gradient(-45deg, white, white, black, white, white 0.3em) 2}td.colsum{font-weight:bold}th.colsum{padding-top:0em;font-weight:bold}tr.sum td{border-top:0.1em solid black;font-weight:bold;padding-bottom:0.5em}tr.groupheader td{border-top:0em dotted #ddd;padding-top:0.5em;font-weight:bold;font-style:italic}tr.begingroup td{border-top:0em dotted #ddd;padding-top:0.5em}th.begin-group{padding-left:0.75em}th.end-group{padding-left:0.75em}td{box-sizing:border-box;-webkit-box-sizing:border-box;border-top:0.1em dashed #ddd;padding-left:0.5em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.table-footer{font-size:0.6em}.cell-bar-chart{display:inline-block;vertical-align:middle}.bar-chart-empty{color:#999}td:has(.cell-bar-chart){padding:0 0.25em;vertical-align:middle}td:has(.cell-bar-chart).pos_pos:before,td:has(.cell-bar-chart).pos_neg:before,td:has(.cell-bar-chart).pos_neu:before{content:none}td:has(.cell-bar-chart).variance:after{content:none}'}},[1,"ibcs-table",{data:[16],tableTitle:[1,"table-title"],scenarios:[16],scenariosDataFormat:[1,"scenarios-data-format"],grouped:[4],limit:[2],showGroupTitle:[4,"show-group-title"],thereof:[16],partof:[16],order:[16],categorythereof:[16],type:[1],categoryWidth:[1,"category-width"],dataFormatDigits:[16],i18n:[1040],i18nMode:[1,"i18n-mode"],measureScale:[1,"measure-scale"],measureUnit:[1,"measure-unit"],showMeasureScale:[4,"show-measure-scale"],measureType:[1,"measure-type"],filter:[1],barColumns:[16],barColumnMaxWidth:[2,"bar-column-max-width"],unitScaling:[2,"unit-scaling"],percentageScaling:[2,"percentage-scaling"],scaleFactor:[2,"scale-factor"]}]);function Z(){"undefined"!=typeof customElements&&["ibcs-table"].forEach((t=>{"ibcs-table"===t&&(customElements.get(s(t))||customElements.define(s(t),X))}))}export{X as I,y as T,Z as d}
@@ -1 +1 @@
1
- import{proxyCustomElement as t,HTMLElement as s,h as i,transformTag as e}from"@stencil/core/internal/client";import{I as n,h as r,i as a,e as c,b as o,j as h}from"./Order.js";import{b as l,D as u,a as d}from"./DateStringFactory.js";import{F as p,I as f,S as b}from"./ibcsRuleSet.js";class m{constructor(){}createMeasures(t,s,i){if(this.allMeasuresUseSameUnit(t)){const e=t.length;let r="",a="";for(let c=0;c<e;c++){let o="";c>0&&(o=s.get("SEPERATOR_WS")),e>1&&c===e-1&&(o=s.get("CONNECTOR_WS")),i===n.ALL?(r=(s.get(r)||r)+o+(s.get(t[c].name)||t[c].name),a=s.get(t[c].unit)||t[c].unit):(r=r+o+t[c].name,a=t[c].unit)}return[{name:r,unit:a}]}return t}createDimension(t,s,i,e,n){let r="";return void 0!==s&&(r=(new l).getDateLinkString(s.start,s.end,s.link,s.format,n)),r+t.map((t=>{let s="";return null!=i&&null!=i.hierarchy&&i.hierarchy.find((s=>s===t))&&(s=e.get("asc"===i.direction?"ORDER_asc":"ORDER_desc")),"".concat(" ",p.translateScenarioLabel(t,e),s)})).toString()}allMeasuresUseSameUnit(t){const s=new Map;return t.forEach((function(t){s.set(t.unit,!0)})),1===s.size}}class w{constructor(){this.businessunit="",this.measures=[],this.scenarios=[],this.i18nMode=n.ALL,this.intervalSpanLimit=32}}class _{constructor(t,s,i,e){this.measureEntryAdapter=t,this.timePeriodAdapter=s,this.orderAdapter=i,this.stringAdapter=e}adapt(t){const s=new w;return r.isString(t.businessunit)&&(s.businessunit=t.businessunit),r.isArray(t.measures)&&(s.measures=a.adaptArray(t.measures,this.measureEntryAdapter)),r.isArray(t.scenarios)&&(s.scenarios=a.adaptArray(t.scenarios,this.stringAdapter)),r.isExisting(t.timeperiod)&&(s.timeperiod=this.timePeriodAdapter.adapt(t.timeperiod)),r.isNumber(t.intervalSpanLimit)&&(s.intervalSpanLimit=t.intervalSpanLimit),r.isExisting(t.i18nMode)&&(s.i18nMode=t.i18nMode),r.isExisting(t.order)&&(s.order=this.orderAdapter.adapt(t.order)),s}default(){return new w}}var v;!function(t){t[t.UP_TO_DATE=0]="UP_TO_DATE",t[t.DIRTY=1]="DIRTY"}(v||(v={}));class y{constructor(t){this.i18n=new Map,this.unit="",this.measures=[],this.dimension="",this.config=new w,this.state=v.DIRTY,this.ruleSet=t||new f,this.dataSetFactory=new m,this.state=v.DIRTY,this.setI18n(new Map)}setI18n(t){this.state=v.DIRTY;const s=new Map([["SEPERATOR_WS",", "],["in","in"],["ORDER_asc","↑"],["ORDER_desc","↓"],["ac1","AC"],["pp1","PY"],["fc1","FC"],["pl1","PL"],["ac2","AC2"],["pp2","PY2"],["fc2","FC2"],["pl2","PL2"],["ac3","AC3"],["pp3","PY3"],["fc3","FC3"],["pp3","PL3"],["ac4","AC4"],["py4","PY4"],["fc4","FC4"],["pp4","PL4"],["category"," "],["operation"," "],["there_of","davon"],["part_of","in % von"],["ibcssymbol_delta_ac","Δ{%}"],["ibcssymbol_delta_generic","Δ({%})"],["ibcssymbol_delta_ac_relative","Δ{%}%"],["ibcssymbol_delta_generic_relative","Δ({%})%"],["SUM_TOTAL","❖"],["CONNECTOR_WS"," und "]]);this.i18n=new Map([...s,...t||new Map])}update(){return v.DIRTY===this.state&&(this.unit=this.config.businessunit,this.measures=this.dataSetFactory.createMeasures(this.config.measures,this.i18n,this.config.i18nMode),this.dimension=this.dataSetFactory.createDimension(this.config.scenarios,this.config.timeperiod,this.config.order,this.i18n,this.config.intervalSpanLimit),this.state=v.UP_TO_DATE),this}setConfig(t){this.config=this.initConfig(t)}initConfig(t){this.state=v.DIRTY;const s=t,i=this;return t.scenarios.sort(((t,s)=>i.ruleSet.getScenarioSorIndex(t)-i.ruleSet.getScenarioSorIndex(s))),s}}class R{constructor(t="",s=""){this.name=t,this.unit=s}}class E{construnctor(){}adapt(t){const s=new R;return r.isString(t.name)&&(s.name=t.name),r.isString(t.unit)&&(s.unit=t.unit),s}default(){return new R("","")}}class S{constructor(t=c.now(),s=c.now(),i=u.AUTO,e=d.AUTO){this.start=t,this.end=s,this.format=i,this.link=e}}class C{construnctor(){}adapt(t){const s=new S;return r.isDate(t.start)&&(s.start=t.start),r.isDate(t.end)&&(s.end=t.end),r.isExisting(t.format)&&(s.format=t.format),r.isExisting(t.link)&&(s.link=t.link),s}default(){return new S}}const O=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.businessUnit="",this.scenarios=[],this.measures=[],this.intervalSpanLimit=28,this.order={hierarchy:[],direction:o.ASC},this.i18n=new Map,this.i18nMode=n.ALL,this.title=new y(new f)}async setBusinessUnit(t){this.businessUnit=t}async setProps(t){Object.keys(t).forEach((s=>{this[s]=t[s]}))}render(){return i("div",{key:"5c9f0c8cdfba5e01f46ee0e5ab820bb88811f365"},i("div",{key:"2dce919eb35df3d35c696c95ad04d5e41a40c374"},this.title.unit),i("div",{key:"f5979715f3203637c7b2256b31230b3794902849"},this.title.measures.map(((t,s)=>i("span",null,this.isFirstElement(s)?this.title.i18n.get("SEPERATOR_WS"):"",i("span",{class:"measure"},t.name)," ",t.unit?this.title.i18n.get("in"):""," ",t.unit)))),i("div",{key:"6dbe3c259c571ec902afa2815e82997b37dd8f8c"},this.title.dimension))}componentWillLoad(){const t=this.prepareConfig();this.title=new y(new f),this.title.setI18n(this.i18n),this.title.setConfig(t)}componentWillUpdate(){const t=this.prepareConfig();this.title.setI18n(this.i18n),this.title.setConfig(t)}componentWillRender(){this.title.update()}isFirstElement(t){return 0!==t}prepareConfig(){return new _(new E,new C,new h(new b),new b).adapt({businessunit:this.businessUnit,measures:this.measures,scenarios:this.scenarios,timeperiod:this.timeperiod,intervalSpanLimit:this.intervalSpanLimit,i18nMode:this.i18nMode,order:this.order})}static get style(){return':host{display:block;font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);color:var(--bn-font-color, #000000)}.measure{font-weight:bold}div{background-color:var(--bn-font-background, white);color:var(--bn-font-color, black)}'}},[1,"ibcs-title",{businessUnit:[1537,"business-unit"],scenarios:[16],measures:[16],timeperiod:[16],intervalSpanLimit:[2,"interval-span-limit"],order:[16],i18n:[1040],i18nMode:[1,"i18n-mode"],setBusinessUnit:[64],setProps:[64]}]);function P(){"undefined"!=typeof customElements&&["ibcs-title"].forEach((t=>{"ibcs-title"===t&&(customElements.get(e(t))||customElements.define(e(t),O))}))}export{O as I,P as d}
1
+ import{proxyCustomElement as t,HTMLElement as s,h as i,transformTag as e}from"@stencil/core/internal/client";import{I as n,i as r,j as a,f as o,b as c,k as h}from"./Order.js";import{b as l,D as u,a as d}from"./DateStringFactory.js";import{F as p,I as f,S as b}from"./ibcsRuleSet.js";class m{constructor(){}createMeasures(t,s,i){if(this.allMeasuresUseSameUnit(t)){const e=t.length;let r="",a="";for(let o=0;o<e;o++){let c="";o>0&&(c=s.get("SEPERATOR_WS")),e>1&&o===e-1&&(c=s.get("CONNECTOR_WS")),i===n.ALL?(r=(s.get(r)||r)+c+(s.get(t[o].name)||t[o].name),a=s.get(t[o].unit)||t[o].unit):(r=r+c+t[o].name,a=t[o].unit)}return[{name:r,unit:a}]}return t}createDimension(t,s,i,e,n){let r="";return void 0!==s&&(r=(new l).getDateLinkString(s.start,s.end,s.link,s.format,n)),r+t.map((t=>{let s="";return null!=i&&null!=i.hierarchy&&i.hierarchy.find((s=>s===t))&&(s=e.get("asc"===i.direction?"ORDER_asc":"ORDER_desc")),"".concat(" ",p.translateScenarioLabel(t,e),s)})).toString()}allMeasuresUseSameUnit(t){const s=new Map;return t.forEach((function(t){s.set(t.unit,!0)})),1===s.size}}class w{constructor(){this.businessunit="",this.measures=[],this.scenarios=[],this.i18nMode=n.ALL,this.intervalSpanLimit=32}}class _{constructor(t,s,i,e){this.measureEntryAdapter=t,this.timePeriodAdapter=s,this.orderAdapter=i,this.stringAdapter=e}adapt(t){const s=new w;return r.isString(t.businessunit)&&(s.businessunit=t.businessunit),r.isArray(t.measures)&&(s.measures=a.adaptArray(t.measures,this.measureEntryAdapter)),r.isArray(t.scenarios)&&(s.scenarios=a.adaptArray(t.scenarios,this.stringAdapter)),r.isExisting(t.timeperiod)&&(s.timeperiod=this.timePeriodAdapter.adapt(t.timeperiod)),r.isNumber(t.intervalSpanLimit)&&(s.intervalSpanLimit=t.intervalSpanLimit),r.isExisting(t.i18nMode)&&(s.i18nMode=t.i18nMode),r.isExisting(t.order)&&(s.order=this.orderAdapter.adapt(t.order)),s}default(){return new w}}var v;!function(t){t[t.UP_TO_DATE=0]="UP_TO_DATE",t[t.DIRTY=1]="DIRTY"}(v||(v={}));class y{constructor(t){this.i18n=new Map,this.unit="",this.measures=[],this.dimension="",this.config=new w,this.state=v.DIRTY,this.ruleSet=t||new f,this.dataSetFactory=new m,this.state=v.DIRTY,this.setI18n(new Map)}setI18n(t){this.state=v.DIRTY;const s=new Map([["SEPERATOR_WS",", "],["in","in"],["ORDER_asc","↑"],["ORDER_desc","↓"],["ac1","AC"],["pp1","PY"],["fc1","FC"],["pl1","PL"],["ac2","AC2"],["pp2","PY2"],["fc2","FC2"],["pl2","PL2"],["ac3","AC3"],["pp3","PY3"],["fc3","FC3"],["pp3","PL3"],["ac4","AC4"],["py4","PY4"],["fc4","FC4"],["pp4","PL4"],["category"," "],["operation"," "],["there_of","davon"],["part_of","in % von"],["ibcssymbol_delta_ac","Δ{%}"],["ibcssymbol_delta_generic","Δ({%})"],["ibcssymbol_delta_ac_relative","Δ{%}%"],["ibcssymbol_delta_generic_relative","Δ({%})%"],["SUM_TOTAL","❖"],["CONNECTOR_WS"," und "]]);this.i18n=new Map([...s,...t||new Map])}update(){return v.DIRTY===this.state&&(this.unit=this.config.businessunit,this.measures=this.dataSetFactory.createMeasures(this.config.measures,this.i18n,this.config.i18nMode),this.dimension=this.dataSetFactory.createDimension(this.config.scenarios,this.config.timeperiod,this.config.order,this.i18n,this.config.intervalSpanLimit),this.state=v.UP_TO_DATE),this}setConfig(t){this.config=this.initConfig(t)}initConfig(t){this.state=v.DIRTY;const s=t,i=this;return t.scenarios.sort(((t,s)=>i.ruleSet.getScenarioSorIndex(t)-i.ruleSet.getScenarioSorIndex(s))),s}}class R{constructor(t="",s=""){this.name=t,this.unit=s}}class E{construnctor(){}adapt(t){const s=new R;return r.isString(t.name)&&(s.name=t.name),r.isString(t.unit)&&(s.unit=t.unit),s}default(){return new R("","")}}class S{constructor(t=o.now(),s=o.now(),i=u.AUTO,e=d.AUTO){this.start=t,this.end=s,this.format=i,this.link=e}}class C{construnctor(){}adapt(t){const s=new S;return r.isDate(t.start)&&(s.start=t.start),r.isDate(t.end)&&(s.end=t.end),r.isExisting(t.format)&&(s.format=t.format),r.isExisting(t.link)&&(s.link=t.link),s}default(){return new S}}const O=t(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.businessUnit="",this.scenarios=[],this.measures=[],this.intervalSpanLimit=28,this.order={hierarchy:[],direction:c.ASC},this.i18n=new Map,this.i18nMode=n.ALL,this.title=new y(new f)}async setBusinessUnit(t){this.businessUnit=t}async setProps(t){Object.keys(t).forEach((s=>{this[s]=t[s]}))}render(){return i("div",{key:"08439c867ae47a9ee17ef8280801896a823c8826"},i("div",{key:"bb5b7325de2ae2f2e0bdba8d7f7f36511835efa9"},this.title.unit),i("div",{key:"3edb730c95280ca0c47db70e32dd8e471747d989"},this.title.measures.map(((t,s)=>i("span",null,this.isFirstElement(s)?this.title.i18n.get("SEPERATOR_WS"):"",i("span",{class:"measure"},t.name)," ",t.unit?this.title.i18n.get("in"):""," ",t.unit)))),i("div",{key:"3bae51f2fddef6b2195d1c24915512b6255c9a75"},this.title.dimension))}componentWillLoad(){const t=this.prepareConfig();this.title=new y(new f),this.title.setI18n(this.i18n),this.title.setConfig(t)}componentWillUpdate(){const t=this.prepareConfig();this.title.setI18n(this.i18n),this.title.setConfig(t)}componentWillRender(){this.title.update()}isFirstElement(t){return 0!==t}prepareConfig(){return new _(new E,new C,new h(new b),new b).adapt({businessunit:this.businessUnit,measures:this.measures,scenarios:this.scenarios,timeperiod:this.timeperiod,intervalSpanLimit:this.intervalSpanLimit,i18nMode:this.i18nMode,order:this.order})}static get style(){return':host{display:block;font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);color:var(--bn-font-color, #000000)}.measure{font-weight:bold}div{background-color:var(--bn-font-background, white);color:var(--bn-font-color, black)}'}},[1,"ibcs-title",{businessUnit:[1537,"business-unit"],scenarios:[16],measures:[16],timeperiod:[16],intervalSpanLimit:[2,"interval-span-limit"],order:[16],i18n:[1040],i18nMode:[1,"i18n-mode"],setBusinessUnit:[64],setProps:[64]}]);function P(){"undefined"!=typeof customElements&&["ibcs-title"].forEach((t=>{"ibcs-title"===t&&(customElements.get(e(t))||customElements.define(e(t),O))}))}export{O as I,P as d}
@@ -1 +1 @@
1
- import{i as t}from"./Order.js";import{g as r}from"./_commonjsHelpers.js";class i{adapt(r){return t.adaptDefaultString(r)}default(){return""}}class e{constructor(t){this.type="",this.base="",this.delta="",this.direction="",this.isValid=!1;const r=/(d|dr)(pl\d|ac\d|fc\d|pp\d)_(pl\d|ac\d|fc\d|pp\d)_(pos|neg|neu)/;if(r.test(t)){const i=r.exec(t);null!=i&&(this.type=String(i[1]),this.base=String(i[2]),this.delta=String(i[3]),this.direction=String(i[4]),this.isValid=!0)}}}var s;!function(t){t.OPERATION="operation",t.ROWGROUP="rowGroup",t.ROWGROUPINDEX="rowGroupIndex",t.CURRENTROW="currentRow",t.CATEGORY="category",t.CATEGORYINDEX="categoryIndex",t.SUBCATEGORY="subCategory",t.SUBCATEGORYINDEX="subCategoryIndex",t.COLUMNGROUP="columnGroup",t.COLUMNGROUPINDEX="columnIndex",t.COLUMNSUBGROUP="columnSubGroup",t.COLUMNSUBGROUPINDEX="columnSubGroupIndex",t.AC1="ac1",t.AC2="ac2",t.AC3="ac3",t.AC4="ac4",t.PP1="pp1",t.PP2="pp2",t.PP3="pp3",t.PP4="pp4",t.FC1="fc1",t.FC2="fc2",t.FC3="fc3",t.FC4="fc4",t.PL1="pl1",t.PL2="pl2",t.PL3="pl3",t.PL4="pl4",t.TOTALROWCOUNT="totalRowCnt",t.ROWNR="rowNr",t.TYPE="type"}(s||(s={}));var n,o={},a=r(function(){if(n)return o;n=1;var t={};return Object.defineProperty(o,"__esModule",{value:!0}),o.default=function(r,i){void 0===i&&(i={});var e=JSON.stringify({text:r,options:i});if(t[e])return t[e];i.font=i.font||"Times",i.fontSize=i.fontSize||"16px",i.fontWeight=i.fontWeight||"normal",i.width=i.width||"auto";var s=function(t,r){var i=document.createElement("div"),e=document.createTextNode(t);return i.appendChild(e),i.style.fontFamily=r.font,i.style.fontSize=r.fontSize,i.style.fontWeight=r.fontWeight,i.style.position="absolute",i.style.visibility="hidden",i.style.left="-999px",i.style.top="-999px",i.style.width=r.width,i.style.height="auto",document.body.appendChild(i),i}(r,i),n={width:s.offsetWidth,height:s.offsetHeight};return function(t){t.parentNode.removeChild(t)}(s),t[e]=n,n},o}());class c{static number(t,r="decimal",i=1,e=0,s=1){return(t/s).toLocaleString("de-DE",{style:r,useGrouping:!0,maximumFractionDigits:i,minimumFractionDigits:e}).replace(/\s+(%)/g,"$1").replace(/\s/g,this.postfixSeperator).replace(/\./g,this.tsdDelimiter)}static translateScenarioLabel(t,r){if(null==t)return"";const i=new e(t);if(!i.isValid)return`${r.get(t)||t}`;let n,o;return s.AC1===i.base?(n=r.get("dr"===i.type?"ibcssymbol_delta_ac_relative":"ibcssymbol_delta_ac"),o=r.get(i.delta)||i.delta):(n=r.get("dr"===i.type?"ibcssymbol_delta_generic_relative":"ibcssymbol_delta_generic"),o=`${r.get(i.base)||i.base} - ${r.get(i.delta)||i.delta}`),void 0===n&&(n="{%}"),`${n.replace("{%}",o)}`}static getMaxWidthOfArrayItems(t,r,i){return a(t.map((t=>c.translateScenarioLabel(t,r))).reduce(((t,r)=>t.length<r.length?r:t),""),{font:i.fontStyles.font,fontSize:i.fontStyles.size+"px"}).width}}c.tsdDelimiter=".",c.postfixSeperator=",";class d{constructor(){this._dateFormat={year:"YYYY",quarter:"Q[Q] YYYY",month:"MMM YYYY",locale:"[KW]WW YYYY",day:"DD.MM.YYYY"},this._dateLinkFormat={avg:"Ø[DATE]",interval:"[DATE]..[DATE]",start:".[DATE]",end:"[DATE].",ytd:"_[DATE]",ytg:"[DATE]_",cum:"[DATE]_[DATE]",mat:"~[DATE]",none:"[DATE]"},this._scenarioMap=new Map,this._fallBackScenario={name:"Series",group:"Series",colorIndex:10,sortIndex:120},this.createScenarioMapEntry("ac","AC",10,400),this.createScenarioMapEntry("fc","FC",30,300),this.createScenarioMapEntry("pl","PL",50,200),this.createScenarioMapEntry("bu","BU",50,200),this.createScenarioMapEntry("pp","PP",20,100),this.createScenarioMapEntry("py","PY",20,100),this.createScenarioMapEntry("dac","dAC",10,1400),this.createScenarioMapEntry("dfc","dFC",30,1300),this.createScenarioMapEntry("dpl","dPL",50,1200),this.createScenarioMapEntry("dbu","dBU",50,1200),this.createScenarioMapEntry("dpp","dPP",20,1100),this.createScenarioMapEntry("dpy","dPY",20,1100),this.createScenarioMapEntry("drac","drAC",10,2400),this.createScenarioMapEntry("drfc","drFC",30,2300),this.createScenarioMapEntry("drpl","drPL",50,2200),this.createScenarioMapEntry("drbu","drBU",50,2200),this.createScenarioMapEntry("drpp","drPP",20,2100),this.createScenarioMapEntry("drpy","drPY",20,2100)}createScenarioMapEntry(t,r,i,e){const s=r,n=i;[1,2,3,4].forEach((i=>{this._scenarioMap.set(t+i,{name:r+i,group:s,colorIndex:n,sortIndex:e+10*i})}))}getScenario(t){return this._scenarioMap.has(t)?this._scenarioMap.get(t):this._fallBackScenario}getScenarioGroup(t){return this._scenarioMap.has(t)?this._scenarioMap.get(t).name:this._fallBackScenario.name}getScenarioColorIndex(t){return this._scenarioMap.has(t)?this._scenarioMap.get(t).colorIndex:this._fallBackScenario.colorIndex}getScenarioSorIndex(t){const r=this.normalizeVarianceScenario(t);return this._scenarioMap.has(r)?this._scenarioMap.get(r).sortIndex:this._fallBackScenario.sortIndex}normalizeVarianceScenario(t){if(null==t)return"";const r=new e(t);return r.isValid?r.type+r.delta:t}}export{a as C,c as F,d as I,s as Q,i as S,e as V}
1
+ import{j as t}from"./Order.js";import{g as r}from"./_commonjsHelpers.js";class i{adapt(r){return t.adaptDefaultString(r)}default(){return""}}class e{constructor(t){this.type="",this.base="",this.delta="",this.direction="",this.isValid=!1;const r=/(d|dr)(pl\d|ac\d|fc\d|pp\d)_(pl\d|ac\d|fc\d|pp\d)_(pos|neg|neu)/;if(r.test(t)){const i=r.exec(t);null!=i&&(this.type=String(i[1]),this.base=String(i[2]),this.delta=String(i[3]),this.direction=String(i[4]),this.isValid=!0)}}}var s;!function(t){t.OPERATION="operation",t.ROWGROUP="rowGroup",t.ROWGROUPINDEX="rowGroupIndex",t.CURRENTROW="currentRow",t.CATEGORY="category",t.CATEGORYINDEX="categoryIndex",t.SUBCATEGORY="subCategory",t.SUBCATEGORYINDEX="subCategoryIndex",t.COLUMNGROUP="columnGroup",t.COLUMNGROUPINDEX="columnIndex",t.COLUMNSUBGROUP="columnSubGroup",t.COLUMNSUBGROUPINDEX="columnSubGroupIndex",t.AC1="ac1",t.AC2="ac2",t.AC3="ac3",t.AC4="ac4",t.PP1="pp1",t.PP2="pp2",t.PP3="pp3",t.PP4="pp4",t.FC1="fc1",t.FC2="fc2",t.FC3="fc3",t.FC4="fc4",t.PL1="pl1",t.PL2="pl2",t.PL3="pl3",t.PL4="pl4",t.TOTALROWCOUNT="totalRowCnt",t.ROWNR="rowNr",t.TYPE="type"}(s||(s={}));var n,o={},a=r(function(){if(n)return o;n=1;var t={};return Object.defineProperty(o,"__esModule",{value:!0}),o.default=function(r,i){void 0===i&&(i={});var e=JSON.stringify({text:r,options:i});if(t[e])return t[e];i.font=i.font||"Times",i.fontSize=i.fontSize||"16px",i.fontWeight=i.fontWeight||"normal",i.width=i.width||"auto";var s=function(t,r){var i=document.createElement("div"),e=document.createTextNode(t);return i.appendChild(e),i.style.fontFamily=r.font,i.style.fontSize=r.fontSize,i.style.fontWeight=r.fontWeight,i.style.position="absolute",i.style.visibility="hidden",i.style.left="-999px",i.style.top="-999px",i.style.width=r.width,i.style.height="auto",document.body.appendChild(i),i}(r,i),n={width:s.offsetWidth,height:s.offsetHeight};return function(t){t.parentNode.removeChild(t)}(s),t[e]=n,n},o}());class c{static number(t,r="decimal",i=1,e=0,s=1){return(t/s).toLocaleString("de-DE",{style:r,useGrouping:!0,maximumFractionDigits:i,minimumFractionDigits:e}).replace(/\s+(%)/g,"$1").replace(/\s/g,this.postfixSeperator).replace(/\./g,this.tsdDelimiter)}static translateScenarioLabel(t,r){if(null==t)return"";const i=new e(t);if(!i.isValid)return`${r.get(t)||t}`;let n,o;return s.AC1===i.base?(n=r.get("dr"===i.type?"ibcssymbol_delta_ac_relative":"ibcssymbol_delta_ac"),o=r.get(i.delta)||i.delta):(n=r.get("dr"===i.type?"ibcssymbol_delta_generic_relative":"ibcssymbol_delta_generic"),o=`${r.get(i.base)||i.base} - ${r.get(i.delta)||i.delta}`),void 0===n&&(n="{%}"),`${n.replace("{%}",o)}`}static getMaxWidthOfArrayItems(t,r,i){return a(t.map((t=>c.translateScenarioLabel(t,r))).reduce(((t,r)=>t.length<r.length?r:t),""),{font:i.fontStyles.font,fontSize:i.fontStyles.size+"px"}).width}}c.tsdDelimiter=".",c.postfixSeperator=",";class d{constructor(){this._dateFormat={year:"YYYY",quarter:"Q[Q] YYYY",month:"MMM YYYY",locale:"[KW]WW YYYY",day:"DD.MM.YYYY"},this._dateLinkFormat={avg:"Ø[DATE]",interval:"[DATE]..[DATE]",start:".[DATE]",end:"[DATE].",ytd:"_[DATE]",ytg:"[DATE]_",cum:"[DATE]_[DATE]",mat:"~[DATE]",none:"[DATE]"},this._scenarioMap=new Map,this._fallBackScenario={name:"Series",group:"Series",colorIndex:10,sortIndex:120},this.createScenarioMapEntry("ac","AC",10,400),this.createScenarioMapEntry("fc","FC",30,300),this.createScenarioMapEntry("pl","PL",50,200),this.createScenarioMapEntry("bu","BU",50,200),this.createScenarioMapEntry("pp","PP",20,100),this.createScenarioMapEntry("py","PY",20,100),this.createScenarioMapEntry("dac","dAC",10,1400),this.createScenarioMapEntry("dfc","dFC",30,1300),this.createScenarioMapEntry("dpl","dPL",50,1200),this.createScenarioMapEntry("dbu","dBU",50,1200),this.createScenarioMapEntry("dpp","dPP",20,1100),this.createScenarioMapEntry("dpy","dPY",20,1100),this.createScenarioMapEntry("drac","drAC",10,2400),this.createScenarioMapEntry("drfc","drFC",30,2300),this.createScenarioMapEntry("drpl","drPL",50,2200),this.createScenarioMapEntry("drbu","drBU",50,2200),this.createScenarioMapEntry("drpp","drPP",20,2100),this.createScenarioMapEntry("drpy","drPY",20,2100)}createScenarioMapEntry(t,r,i,e){const s=r,n=i;[1,2,3,4].forEach((i=>{this._scenarioMap.set(t+i,{name:r+i,group:s,colorIndex:n,sortIndex:e+10*i})}))}getScenario(t){return this._scenarioMap.has(t)?this._scenarioMap.get(t):this._fallBackScenario}getScenarioGroup(t){return this._scenarioMap.has(t)?this._scenarioMap.get(t).name:this._fallBackScenario.name}getScenarioColorIndex(t){return this._scenarioMap.has(t)?this._scenarioMap.get(t).colorIndex:this._fallBackScenario.colorIndex}getScenarioSorIndex(t){const r=this.normalizeVarianceScenario(t);return this._scenarioMap.has(r)?this._scenarioMap.get(r).sortIndex:this._fallBackScenario.sortIndex}normalizeVarianceScenario(t){if(null==t)return"";const r=new e(t);return r.isValid?r.type+r.delta:t}}export{a as C,c as F,d as I,s as Q,i as S,e as V}
@@ -1 +1 @@
1
- function t(t){const e=t.parentElement;if(!e)return{width:0,height:0};const o=getComputedStyle(e),n=e.clientWidth-parseFloat(o.paddingLeft)-parseFloat(o.paddingRight),r=function(t){let e=t.parentElement;for(;e;){const t=getComputedStyle(e),o=t.overflowY;if("hidden"===o||"scroll"===o||"auto"===o)return e.clientHeight-parseFloat(t.paddingTop)-parseFloat(t.paddingBottom);if("none"!==t.maxHeight){const o=parseFloat(t.maxHeight);if(!isNaN(o)&&o>0)return Math.min(o,e.clientHeight-parseFloat(t.paddingTop)-parseFloat(t.paddingBottom))}e=e.parentElement}return"undefined"!=typeof window?window.innerHeight:0}(t);return{width:Math.max(0,n),height:Math.max(0,r)}}function e(t){if(null==t||""===t)return{mode:"empty"};if("none"===t)return{mode:"none"};if("auto"===t)return{mode:"auto"};const e=Number(t);return!isNaN(e)&&e>0?{mode:"factor",factor:e}:{mode:"empty"}}export{t as g,e as p}
1
+ import{g as t,c as e}from"./context-protocol.js";import{r as o}from"./utils.js";import{getElement as r}from"@stencil/core/internal/client";const s=(t,e)=>{const o=[],r=[];for(const s of e)(t(s)?o:r).push(s);return[o,r]},a="WARN_use_dataset",n=(t,e)=>{const o=t.errors;if(o)if(e.length>0){const t=e.map((t=>t.substring(1))).join(", ");o.addOrReplace({id:a,type:"warning",message:`Using datasource(s) "${t}" directly. Prefer using a dataset (bn-dataset) for query support and metadata.`})}else o.remove(a)},i=(a,i,u)=>{let c,d,f,l,p=[],m=[];const g=t=>{if(u){const e=l.datasetsMeta.get(t);e&&u(t,e)}},h=new MutationObserver((t=>{t.forEach((t=>{"datasets"===t.attributeName&&([m,p]=s((t=>t.startsWith("$")),r(a).getAttribute("datasets").split(",")),n(a,m),p.forEach((t=>{i(t,l.datasets.get(t)),g(t)})),m.forEach((t=>{i(t,l.datasources.get(t.substring(1)))})))}))})),w=a.connectedCallback;a.connectedCallback=()=>{const e=r(a);l=t(e),[m,p]=s((t=>t.startsWith("$")),(e.getAttribute("datasets")||"").split(",")),n(a,m),p.forEach((t=>{i(t,l.datasets.get(t)),g(t)})),m.forEach((t=>{i(t,l.datasources.get(t.substring(1)))})),h.observe(e,{attributes:!0,attributeFilter:["datasets"]}),c=l.datasets.on("set",((t,e)=>{p.includes(t)&&i(t,e)})),d=l.datasources.on("set",((t,e)=>{m.includes("$"+t)&&i("$"+t,e)})),u&&(f=l.datasetsMeta.on("set",((t,e)=>{p.includes(t)&&u(t,e)}))),o(w,a)};const y=a.disconnectedCallback;return a.disconnectedCallback=()=>{h.disconnect(),o(c),o(d),o(f),e(r(a)),o(y,a)},t=>{p=t,t.forEach((t=>{i(t,l.datasets.get(t)),g(t)}))}};function u(t){const e=t.parentElement;if(!e)return{width:0,height:0};const o=getComputedStyle(e),r=e.clientWidth-parseFloat(o.paddingLeft)-parseFloat(o.paddingRight),s=function(t){let e=t.parentElement;for(;e;){const t=getComputedStyle(e),o=t.overflowY;if("hidden"===o||"scroll"===o||"auto"===o)return e.clientHeight-parseFloat(t.paddingTop)-parseFloat(t.paddingBottom);if("none"!==t.maxHeight){const o=parseFloat(t.maxHeight);if(!isNaN(o)&&o>0)return Math.min(o,e.clientHeight-parseFloat(t.paddingTop)-parseFloat(t.paddingBottom))}e=e.parentElement}return"undefined"!=typeof window?window.innerHeight:0}(t);return{width:Math.max(0,r),height:Math.max(0,s)}}function c(t){if(null==t||""===t)return{mode:"empty"};if("none"===t)return{mode:"none"};if("auto"===t)return{mode:"auto"};const e=Number(t);return!isNaN(e)&&e>0?{mode:"factor",factor:e}:{mode:"empty"}}export{u as g,c as p,i as w}
@@ -1 +1 @@
1
- import{S as n,a as r,A as t,O as u,b as e,c as o,D as a,T as i,M as s,d as c}from"./Order.js";import{D as l,a as f}from"./DateStringFactory.js";function d(n){return null==n||""===n||"null"===n}function v(r){return d(r)||"auto"===r.trim().toLowerCase()?[]:S((null==r?void 0:r.split(",").filter((r=>!(r.toUpperCase().trim()in n)))).toString())}function S(t){return d(t)?[]:t.replace(";",",").split(",").filter((t=>{var u,e,o;const a=t.split("_"),i=null===(u=a[0])||void 0===u?void 0:u.replace(/^dr|^d/,"").toUpperCase().trim(),s=null===(e=a[1])||void 0===e?void 0:e.toUpperCase().trim(),c=null===(o=a[2])||void 0===o?void 0:o.toUpperCase().trim();return 3!==a.length||!(i in n)||!(s in n)||!(c in r)}))}function y(n){return d(n)||"auto"===n.trim().toLowerCase()?[]:S(n.split(",").filter((n=>!(n.toUpperCase()in u))).toString())}function N(n){return!d(n)&&Number.isInteger(Number(n))}function O(n){return!d(n)&&!Number.isNaN(Number(n))}function J(n){return!d(n)&&(null==n?void 0:n.toUpperCase())in e}function b(n){return"auto"===(null==n?void 0:n.toLowerCase())||(null==n?void 0:n.toUpperCase())in t}function m(n){if(d(n))return[];try{const r=JSON.parse(n);if(r instanceof Array)return r.filter((n=>!(n.hasOwnProperty("name")&&n.hasOwnProperty("unit"))))}catch(n){console.error("validateMeasureList: failed to parse JSON",n)}return["Invalid JSON structure"]}function h(n){if(d(n))return[];try{const r=JSON.parse(n);if(r instanceof Array)return r.filter((n=>!n.hasOwnProperty("latitude")&&!n.hasOwnProperty("longitude")&&!n.hasOwnProperty("iconUrl")))}catch(n){throw n}return["Invalid JSON structure"]}function p(n){if(d(n))return[];try{const r=JSON.parse(n);if(r instanceof Array)return r.filter((n=>!n.hasOwnProperty("file")))}catch(n){throw n}return["Invalid JSON structure"]}function A(n){if(d(n))return[];try{const r=JSON.parse(n);if(r instanceof Array)return r.filter((n=>!n.hasOwnProperty("file")))}catch(n){throw n}return["Invalid JSON structure"]}function g(n){const r=Date.parse(n);return Number.isInteger(r)}function k(n){return(null==n?void 0:n.toUpperCase())in f}function w(n){return(null==n?void 0:n.toUpperCase())in l}function I(n){return(null==n?void 0:n.toUpperCase())in o}function T(n){return!d(n)&&(null==n?void 0:n.toUpperCase())in a}function j(n){return!d(n)&&["true","false",!0,!1].some((r=>r===n))}function G(n){return!d(n)&&(null==n?void 0:n.toUpperCase())in i}function D(n){if(d(n))return[];try{const r=JSON.parse(n);if(r instanceof Array)return r.filter((n=>!(n.hasOwnProperty("rowGroup")&&n.hasOwnProperty("category")&&n.hasOwnProperty("subCategory"))))}catch(n){console.error("validateThereOfJsonStr: failed to parse JSON",n)}return["Invalid JSON structure"]}function E(n){if(d(n))return[];try{const r=JSON.parse(n);if(r instanceof Array)return r.filter((n=>!(n.hasOwnProperty("rowGroup")&&n.hasOwnProperty("category"))))}catch(n){console.error("validatePartOfJsonStr: failed to parse JSON",n)}return["Invalid JSON structure"]}function M(n){return(null==n?void 0:n.trim().toUpperCase())in s}function P(n){return["_","k","M","G","T","P","E","Z","Y","m","μ","n","p","P","f","a","z","y"].includes(null==n?void 0:n.trim())||["GREATEST","LEAST"].includes(null==n?void 0:n.trim().toUpperCase())}function $(n){return(null==n?void 0:n.toUpperCase().trim())in c}function q(n){if(d(n))return[];try{return JSON.parse(n).filter((n=>!(n.hasOwnProperty("scenario")&&n.hasOwnProperty("name")&&n.hasOwnProperty("subGroups"))))}catch(n){console.error("validateColumnThereOfJsonStr: failed to parse JSON",n)}return["Invalid JSON structure"]}function x(n){if(d(n))return[];try{const r=JSON.parse(n);if("object"!=typeof r||null===r||Array.isArray(r))return["stack: must be a JSON object"];const t=[];if(r.hasOwnProperty("by")){const n=["scenario","category","subcategory","rowgroup"];n.includes(r.by)||t.push(`stack: 'by' must be one of: ${n.join(", ")}`)}else t.push("stack: 'by' is required");if(r.hasOwnProperty("mode")){const n=["absolute","relative","absolute-relative"];n.includes(r.mode)||t.push(`stack: 'mode' must be one of: ${n.join(", ")}`)}if(r.hasOwnProperty("order")){const n=["asc","desc","dataset"];n.includes(r.order)||t.push(`stack: 'order' must be one of: ${n.join(", ")}`)}return t}catch(n){return["stack: invalid JSON"]}}export{S as a,y as b,J as c,m as d,g as e,w as f,k as g,O as h,d as i,b as j,N as k,j as l,P as m,x as n,I as o,h as p,p as q,A as r,T as s,G as t,D as u,v,E as w,M as x,$ as y,q as z}
1
+ import{S as n,a as r,A as t,O as u,b as e,c as o,T as a,D as i,d as s,M as c,e as l}from"./Order.js";import{D as f,a as d}from"./DateStringFactory.js";function v(n){return null==n||""===n||"null"===n}function S(r){return v(r)||"auto"===r.trim().toLowerCase()?[]:b((null==r?void 0:r.split(",").filter((r=>!(r.toUpperCase().trim()in n)))).toString())}function b(t){return v(t)?[]:t.replace(";",",").split(",").filter((t=>{var u,e,o;const a=t.split("_"),i=null===(u=a[0])||void 0===u?void 0:u.replace(/^dr|^d/,"").toUpperCase().trim(),s=null===(e=a[1])||void 0===e?void 0:e.toUpperCase().trim(),c=null===(o=a[2])||void 0===o?void 0:o.toUpperCase().trim();return 3!==a.length||!(i in n)||!(s in n)||!(c in r)}))}function m(n){return v(n)||"auto"===n.trim().toLowerCase()?[]:b(n.split(",").filter((n=>!(n.toUpperCase()in u))).toString())}function y(n){return!v(n)&&Number.isInteger(Number(n))}function N(n){return!v(n)&&!Number.isNaN(Number(n))}function O(n){return!v(n)&&(null==n?void 0:n.toUpperCase())in e}function J(n){return"auto"===(null==n?void 0:n.toLowerCase())||(null==n?void 0:n.toUpperCase())in t}function p(n){if(v(n))return[];try{const r=JSON.parse(n);if(r instanceof Array)return r.filter((n=>!(n.hasOwnProperty("name")&&n.hasOwnProperty("unit"))))}catch(n){console.error("validateMeasureList: failed to parse JSON",n)}return["Invalid JSON structure"]}function g(n){const r=Date.parse(n);return Number.isInteger(r)}function h(n){return(null==n?void 0:n.toUpperCase())in d}function k(n){return(null==n?void 0:n.toUpperCase())in f}function A(n){return(null==n?void 0:n.toUpperCase())in o}function T(n){return!v(n)&&(null==n?void 0:n.toUpperCase())in i}function j(n){return!v(n)&&["true","false",!0,!1].some((r=>r===n))}function G(n){return!v(n)&&(null==n?void 0:n.toUpperCase())in s}function w(n){if(v(n))return[];try{const r=JSON.parse(n);if(r instanceof Array)return r.filter((n=>!(n.hasOwnProperty("rowGroup")&&n.hasOwnProperty("category")&&n.hasOwnProperty("subCategory"))))}catch(n){console.error("validateThereOfJsonStr: failed to parse JSON",n)}return["Invalid JSON structure"]}function D(n){if(v(n))return[];try{const r=JSON.parse(n);if(r instanceof Array)return r.filter((n=>!(n.hasOwnProperty("rowGroup")&&n.hasOwnProperty("category"))))}catch(n){console.error("validatePartOfJsonStr: failed to parse JSON",n)}return["Invalid JSON structure"]}function E(n){return(null==n?void 0:n.trim().toUpperCase())in c}function I(n){return["_","k","M","G","T","P","E","Z","Y","m","μ","n","p","P","f","a","z","y"].includes(null==n?void 0:n.trim())||["GREATEST","LEAST"].includes(null==n?void 0:n.trim().toUpperCase())}function M(n){return(null==n?void 0:n.toUpperCase().trim())in l}function P(n){return(null==n?void 0:n.toUpperCase().trim())in a}function $(n){if(v(n))return[];try{return JSON.parse(n).filter((n=>!(n.hasOwnProperty("scenario")&&n.hasOwnProperty("name")&&n.hasOwnProperty("subGroups"))))}catch(n){console.error("validateColumnThereOfJsonStr: failed to parse JSON",n)}return["Invalid JSON structure"]}function q(n){if(v(n))return[];try{const r=JSON.parse(n);if("object"!=typeof r||null===r||Array.isArray(r))return["stack: must be a JSON object"];const t=[];if(r.hasOwnProperty("by")){const n=["scenario","category","subcategory","rowgroup"];n.includes(r.by)||t.push(`stack: 'by' must be one of: ${n.join(", ")}`)}else t.push("stack: 'by' is required");if(r.hasOwnProperty("mode")){const n=["absolute","relative","absolute-relative"];n.includes(r.mode)||t.push(`stack: 'mode' must be one of: ${n.join(", ")}`)}if(r.hasOwnProperty("order")){const n=["asc","desc","dataset"];n.includes(r.order)||t.push(`stack: 'order' must be one of: ${n.join(", ")}`)}return t}catch(n){return["stack: invalid JSON"]}}export{b as a,m as b,O as c,p as d,g as e,k as f,h as g,N as h,v as i,J as j,y as k,j as l,I as m,q as n,A as o,P as p,T as q,G as r,w as s,D as t,E as u,S as v,M as w,$ as x}
@@ -1 +1 @@
1
- import{g as r,r as t,a as o}from"./utils.js";import{C as e,a as s}from"./componentRegister.js";import{getElement as a}from"@stencil/core/internal/client";const n=o=>{const a=r(),n=o.connectedCallback;o.connectedCallback=()=>{e.updateStatus(a,s.RUNNING),t(n,o)};const c=o.componentWillRender;o.componentWillRender=()=>{e.updateStatus(a,s.RUNNING),t(c,o)};const i=o.componentDidRender;o.componentDidRender=()=>{e.updateStatus(a,s.SUCCESSFUL),t(i,o)}};let c=(r=21)=>{let t="",o=crypto.getRandomValues(new Uint8Array(r|=0));for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&o[r]];return t};const i=r=>{const{set:t,modify:e}=o([],(t=>{const o=a(r);0===t.length?o.removeAttribute("has-error"):o.setAttribute("has-error",JSON.stringify(t))}));return{clear:()=>{t([])},replace:r=>{t(r.map((r=>(r.id||(r.id=c()),r))))},add:r=>(r.id||(r.id=c()),e((t=>[...t,r])),r.id),addOrReplace:r=>{if(void 0===r.id)throw"missing";return e((t=>[...t.filter((t=>t.id!==r.id)),r])),r.id},remove:r=>{e((t=>t.filter((t=>t.id!==r))))}}};export{i as a,n as w}
1
+ import{g as r,r as e,a as n}from"./utils.js";import{getElement as t}from"@stencil/core/internal/client";var o,s;!function(r){r[r.RUNNING=0]="RUNNING",r[r.SUCCESSFUL=1]="SUCCESSFUL",r[r.ERROR=2]="ERROR"}(o||(o={})),function(r){let e;const n=new Map,t={running:0,successful:0,error:0},s=r=>{switch(r){case o.RUNNING:return"running";case o.SUCCESSFUL:return"successful";default:return"error"}};r.updateStatus=(o,c)=>{e&&clearTimeout(e);const i=n.get(o);void 0!==i&&t[s(i)]--,t[s(c)]++,n.set(o,c),e=setTimeout((()=>{window.componentRegisterIsRenderedResult=r.componentRegisterIsRendered(),console.log("componentRegisterIsRendered:",window.componentRegisterIsRenderedResult)}),500)},r.componentRegisterIsRendered=()=>0===t.running,r.componentRegisterStatus=()=>Object.assign({},t)}(s||(s={}));const c=n=>{const t=r(),c=n.connectedCallback;n.connectedCallback=()=>{s.updateStatus(t,o.RUNNING),e(c,n)};const i=n.componentWillRender;n.componentWillRender=()=>{s.updateStatus(t,o.RUNNING),e(i,n)};const a=n.componentDidRender;n.componentDidRender=()=>{s.updateStatus(t,o.SUCCESSFUL),e(a,n)}};let i=(r=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(r|=0));for(;r--;)e+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[63&n[r]];return e};const a=r=>{const{set:e,modify:o}=n([],(e=>{const n=t(r);0===e.length?n.removeAttribute("has-error"):n.setAttribute("has-error",JSON.stringify(e))}));return{clear:()=>{e([])},replace:r=>{e(r.map((r=>(r.id||(r.id=i()),r))))},add:r=>(r.id||(r.id=i()),o((e=>[...e,r])),r.id),addOrReplace:r=>{if(void 0===r.id)throw"missing";return o((e=>[...e.filter((e=>e.id!==r.id)),r])),r.id},remove:r=>{o((e=>e.filter((e=>e.id!==r))))}}};export{a,c as w}
@@ -1,5 +1,5 @@
1
1
  import { a as alasql } from './alasql.min-CWu4NkIt.js';
2
- import { C as CompareUtil } from './Order-B4fpLe_f.js';
2
+ import { e as CompareUtil } from './Order-sqjrku2z.js';
3
3
 
4
4
  /** SI metric prefix for number scaling (e.g. prefix="M", value=1000000 divides displayed values by one million). */
5
5
  class SiPrefix {
@@ -1,4 +1,4 @@
1
- import { D as DateTime } from './luxon-DbyXf6dF.js';
1
+ import { D as DateTime } from './Order-sqjrku2z.js';
2
2
 
3
3
  /** Granularity levels for date intervals, from YEAR down to MILLISECOND. AUTO triggers auto-detection. */
4
4
  var DateDistance;
@@ -199,7 +199,6 @@ class DateStringFactory {
199
199
  let span = toDate.diff(fromDate).as(unit);
200
200
  const days = [];
201
201
  if (span >= spanLimit) {
202
- console.warn("Clip Span from", span, "to spanLimit", spanLimit);
203
202
  span = spanLimit;
204
203
  }
205
204
  let currentDate = fromDate;