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

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 (361) hide show
  1. package/LICENSE +203 -21
  2. package/dist/bn-template-engine/bn-template-engine.esm.js +1 -1
  3. package/dist/bn-template-engine/p-095f74d7.entry.js +1 -0
  4. package/dist/bn-template-engine/p-14318b0d.entry.js +1 -0
  5. package/dist/bn-template-engine/{p-c9f050bf.entry.js → p-2133e02b.entry.js} +1 -1
  6. package/dist/bn-template-engine/p-6b469808.entry.js +1 -0
  7. package/dist/bn-template-engine/p-7HSTE79g.js +1 -0
  8. package/dist/bn-template-engine/p-B4JfKvVT.js +1 -0
  9. package/dist/bn-template-engine/p-B_d-jp99.js +2 -0
  10. package/dist/bn-template-engine/p-Bi2wx-el.js +1 -0
  11. package/dist/bn-template-engine/p-CWiZks2h.js +1 -0
  12. package/dist/bn-template-engine/{p-BQp6ZPYW.js → p-DSXNgKLa.js} +1 -1
  13. package/dist/bn-template-engine/p-c2cbb8ea.entry.js +1 -0
  14. package/dist/bn-template-engine/p-e783733e.entry.js +1 -0
  15. package/dist/bn-template-engine/p-e94b4e31.entry.js +1 -0
  16. package/dist/bn-template-engine/p-fdb3e99a.entry.js +1 -0
  17. package/dist/cjs/bn-asset_21.cjs.entry.js +23995 -0
  18. package/dist/cjs/bn-grid.cjs.entry.js +6 -13
  19. package/dist/cjs/bn-image.cjs.entry.js +6 -13
  20. package/dist/cjs/bn-internationalization.cjs.entry.js +5 -7
  21. package/dist/cjs/bn-template-engine.cjs.js +2 -2
  22. package/dist/cjs/bn-template.cjs.entry.js +4 -6
  23. package/dist/cjs/bn-text.cjs.entry.js +10 -19
  24. package/dist/cjs/bn-tree.cjs.entry.js +11 -14
  25. package/dist/cjs/{context-protocol-BkYHFkXE.js → context-protocol-B_jipZpJ.js} +6 -2
  26. package/dist/cjs/editor-companion.cjs.entry.js +3 -3
  27. package/dist/cjs/{index-CScBFiS1.js → index-CDKG4xmO.js} +2 -2
  28. package/dist/cjs/loader.cjs.js +2 -2
  29. package/dist/cjs/scaling-eyzCrFB8.js +329 -0
  30. package/dist/cjs/{withBodyObserver-B0_W1VOf.js → withBodyObserver-D7BKWN2N.js} +2 -2
  31. package/dist/cjs/{withHasError-Dspb3lIV.js → withHasError-Cl2gTQzA.js} +106 -2
  32. package/dist/{esm/luxon-DbyXf6dF.js → cjs/withStyled-V7xz_x1c.js} +1406 -1
  33. package/dist/collection/collection-manifest.json +2 -10
  34. package/dist/collection/components/bn-body/bn-body.css +1 -0
  35. package/dist/collection/components/bn-card/bn-card.css +2 -0
  36. package/dist/collection/components/bn-chart-structure/bn-chart-structure.js +368 -130
  37. package/dist/collection/components/bn-chart-structure/ibcs-chart-structure.js +34 -10
  38. package/dist/collection/components/bn-chart-structure/utils/StructureChart.js +94 -11
  39. package/dist/collection/components/bn-chart-structure/utils/elements/Label.js +11 -0
  40. package/dist/collection/components/bn-chart-structure/utils/elements/StackedBar.js +8 -6
  41. package/dist/collection/components/bn-chart-structure/utils/model/styles/StructureChartStyle.js +4 -0
  42. package/dist/collection/components/bn-chart-time/bn-chart-time.css +1 -1
  43. package/dist/collection/components/bn-chart-time/bn-chart-time.js +172 -51
  44. package/dist/collection/components/bn-chart-time/ibcs-chart-time.js +22 -9
  45. package/dist/collection/components/bn-chart-time/utils/TimeChart.js +3 -3
  46. package/dist/collection/components/bn-chart-time/utils/elements/StackedColumn.js +3 -4
  47. package/dist/collection/components/bn-chart-time/utils/model/styles/TimeChartStyle.js +4 -0
  48. package/dist/collection/components/bn-dataset/bn-dataset.js +49 -2
  49. package/dist/collection/components/bn-datasource/bn-datasource.js +173 -8
  50. package/dist/collection/components/bn-layout-card/bn-layout-card.css +3 -2
  51. package/dist/collection/components/bn-layout-card/bn-layout-card.js +207 -32
  52. package/dist/collection/components/bn-layout-page/bn-layout-page.css +1 -3
  53. package/dist/collection/components/bn-layout-page/bn-layout-page.js +172 -43
  54. package/dist/collection/components/bn-message/bn-message.js +1 -1
  55. package/dist/collection/components/bn-page/bn-page.js +1 -1
  56. package/dist/collection/components/bn-scaling-group/bn-scaling-group.css +3 -0
  57. package/dist/collection/components/bn-scaling-group/bn-scaling-group.js +136 -0
  58. package/dist/collection/components/bn-table/bn-table.js +201 -58
  59. package/dist/collection/components/bn-table/ibcs-table.css +7 -5
  60. package/dist/collection/components/bn-table/ibcs-table.js +91 -5
  61. package/dist/collection/components/bn-table/utils/elements/CellBarChart.js +79 -31
  62. package/dist/collection/components/bn-table/utils/elements/TableRow.js +3 -1
  63. package/dist/collection/components/bn-table/utils/factories/tableDataSetFactory.js +12 -3
  64. package/dist/collection/components/bn-table/utils/helper/ColumnStatistics.js +9 -1
  65. package/dist/collection/components/bn-template/bn-template.js +1 -1
  66. package/dist/collection/components/bn-text/bn-text.js +1 -1
  67. package/dist/collection/components/bn-title/bn-title.js +1 -9
  68. package/dist/collection/components/bn-title/ibcs-title/ibcs-title.js +1 -4
  69. package/dist/collection/components/bn-tree/bn-tree.js +5 -1
  70. package/dist/collection/components/editor-companion/editor-companion.js +1 -1
  71. package/dist/collection/stores/componentStyles.js +2 -0
  72. package/dist/collection/stores/createScopedStores.js +3 -1
  73. package/dist/collection/utils/DateStringFactory.js +0 -1
  74. package/dist/collection/utils/constants.js +35 -5
  75. package/dist/collection/utils/contentDecoder.js +28 -0
  76. package/dist/collection/utils/layoutObserver.js +88 -0
  77. package/dist/collection/utils/parentDimensions.js +57 -10
  78. package/dist/collection/utils/stackColors.js +2 -2
  79. package/dist/collection/utils/validate.js +5 -2
  80. package/dist/collection/utils/withInheritedProps.js +152 -0
  81. package/dist/collection/utils/withScalingGroup.js +66 -0
  82. package/dist/components/DataFormatDigits.js +1 -1
  83. package/dist/components/DateStringFactory.js +1 -1
  84. package/dist/components/Order.js +1 -1
  85. package/dist/components/SVGVariancesStyleGroup.js +1 -1
  86. package/dist/components/bn-body2.js +1 -1
  87. package/dist/components/bn-card2.js +1 -1
  88. package/dist/components/bn-chart-structure.js +1 -1
  89. package/dist/components/bn-chart-time.js +1 -1
  90. package/dist/components/bn-dataset.js +1 -1
  91. package/dist/components/bn-datasource.js +1 -1
  92. package/dist/components/bn-layout-card.js +1 -1
  93. package/dist/components/bn-layout-page.js +1 -1
  94. package/dist/components/bn-message2.js +1 -1
  95. package/dist/components/bn-page2.js +1 -1
  96. package/dist/components/{test-runner-time.d.ts → bn-scaling-group.d.ts} +4 -4
  97. package/dist/components/bn-scaling-group.js +1 -0
  98. package/dist/components/bn-table.js +1 -1
  99. package/dist/components/bn-template.js +1 -1
  100. package/dist/components/bn-text.js +1 -1
  101. package/dist/components/bn-title2.js +1 -1
  102. package/dist/components/bn-tree.js +1 -1
  103. package/dist/components/contentDecoder.js +1 -0
  104. package/dist/components/context-protocol.js +1 -1
  105. package/dist/components/editor-companion.js +1 -1
  106. package/dist/components/emotion-hash.esm.js +1 -0
  107. package/dist/components/ibcs-chart-structure2.js +1 -1
  108. package/dist/components/ibcs-chart-time2.js +1 -1
  109. package/dist/components/ibcs-table2.js +1 -1
  110. package/dist/components/ibcs-title2.js +1 -1
  111. package/dist/components/ibcsRuleSet.js +1 -1
  112. package/dist/components/layoutObserver.js +1 -0
  113. package/dist/components/scaling.js +1 -1
  114. package/dist/components/validate.js +1 -1
  115. package/dist/components/withHasError.js +1 -1
  116. package/dist/components/withInheritedProps.js +1 -0
  117. package/dist/components/withStyled.js +1 -1
  118. package/dist/esm/bn-asset_21.entry.js +23973 -0
  119. package/dist/esm/bn-grid.entry.js +4 -11
  120. package/dist/esm/bn-image.entry.js +4 -11
  121. package/dist/esm/bn-internationalization.entry.js +4 -6
  122. package/dist/esm/bn-template-engine.js +3 -3
  123. package/dist/esm/bn-template.entry.js +3 -5
  124. package/dist/esm/bn-text.entry.js +6 -15
  125. package/dist/esm/bn-tree.entry.js +9 -12
  126. package/dist/esm/{context-protocol-DzeqZxg6.js → context-protocol-D-o_UZ33.js} +6 -2
  127. package/dist/esm/editor-companion.entry.js +3 -3
  128. package/dist/esm/{index-B27Ax6P_.js → index-B_d-jp99.js} +2 -2
  129. package/dist/esm/loader.js +3 -3
  130. package/dist/esm/scaling-BzbiBnuN.js +324 -0
  131. package/dist/esm/{withBodyObserver-gZpZiEIK.js → withBodyObserver-AFk2wwHT.js} +2 -2
  132. package/dist/esm/{withHasError-C48fTE2k.js → withHasError-DW_vMDUp.js} +106 -2
  133. package/dist/{cjs/luxon-8hyy5YD7.js → esm/withStyled-5RqF8WBL.js} +1371 -2
  134. package/dist/types/components/bn-chart-structure/bn-chart-structure.d.ts +163 -110
  135. package/dist/types/components/bn-chart-structure/ibcs-chart-structure.d.ts +4 -3
  136. package/dist/types/components/bn-chart-structure/utils/StructureChart.d.ts +7 -0
  137. package/dist/types/components/bn-chart-structure/utils/elements/Label.d.ts +2 -0
  138. package/dist/types/components/bn-chart-structure/utils/model/styles/StructureChartStyle.d.ts +1 -0
  139. package/dist/types/components/bn-chart-time/bn-chart-time.d.ts +29 -12
  140. package/dist/types/components/bn-chart-time/ibcs-chart-time.d.ts +4 -3
  141. package/dist/types/components/bn-chart-time/utils/model/styles/TimeChartStyle.d.ts +1 -0
  142. package/dist/types/components/bn-dataset/bn-dataset.d.ts +6 -0
  143. package/dist/types/components/bn-datasource/bn-datasource.d.ts +48 -5
  144. package/dist/types/components/bn-layout-card/bn-layout-card.d.ts +153 -0
  145. package/dist/types/components/bn-layout-page/bn-layout-page.d.ts +160 -1
  146. package/dist/types/components/bn-scaling-group/bn-scaling-group.d.ts +37 -0
  147. package/dist/types/components/bn-table/bn-table.d.ts +32 -17
  148. package/dist/types/components/bn-table/ibcs-table.d.ts +20 -0
  149. package/dist/types/components/bn-table/utils/elements/Cell.d.ts +1 -0
  150. package/dist/types/components/bn-table/utils/elements/CellBarChart.d.ts +1 -0
  151. package/dist/types/components/bn-title/bn-title.d.ts +0 -1
  152. package/dist/types/components.d.ts +438 -461
  153. package/dist/types/context/context-protocol.d.ts +2 -1
  154. package/dist/types/stores/componentStyles.d.ts +2 -0
  155. package/dist/types/stores/createScopedStores.d.ts +1 -0
  156. package/dist/types/utils/constants.d.ts +23 -5
  157. package/dist/types/utils/contentDecoder.d.ts +12 -0
  158. package/dist/types/utils/layoutObserver.d.ts +27 -0
  159. package/dist/types/utils/parentDimensions.d.ts +7 -2
  160. package/dist/types/utils/validate.d.ts +1 -0
  161. package/dist/types/utils/withInheritedProps.d.ts +38 -0
  162. package/dist/types/utils/withScalingGroup.d.ts +14 -0
  163. package/package.json +4 -4
  164. package/readme.md +2 -3
  165. package/dist/bn-template-engine/assets/gpx/Chasing_Legends.gpx +0 -195076
  166. package/dist/bn-template-engine/assets/gpx/Fahrt_am_Nachmittag.gpx +0 -142007
  167. package/dist/bn-template-engine/assets/icons/gpx-finish.png +0 -0
  168. package/dist/bn-template-engine/assets/icons/gpx-shadow.png +0 -0
  169. package/dist/bn-template-engine/assets/icons/gpx-start.png +0 -0
  170. package/dist/bn-template-engine/assets/icons/marker-example.png +0 -0
  171. package/dist/bn-template-engine/assets/icons/pin-icon-end.png +0 -0
  172. package/dist/bn-template-engine/assets/icons/pin-icon-start.png +0 -0
  173. package/dist/bn-template-engine/assets/icons/pin-icon-wpt.png +0 -0
  174. package/dist/bn-template-engine/assets/icons/pin-shadow.png +0 -0
  175. package/dist/bn-template-engine/assets/icons/pin.png +0 -0
  176. package/dist/bn-template-engine/p--TeDldm8.js +0 -1
  177. package/dist/bn-template-engine/p-0e7dc113.entry.js +0 -1
  178. package/dist/bn-template-engine/p-1jFf17Vj.js +0 -1
  179. package/dist/bn-template-engine/p-264c6bad.entry.js +0 -1
  180. package/dist/bn-template-engine/p-326a0902.entry.js +0 -1
  181. package/dist/bn-template-engine/p-38a8bde3.entry.js +0 -1
  182. package/dist/bn-template-engine/p-577eafcd.entry.js +0 -1
  183. package/dist/bn-template-engine/p-5905cc43.entry.js +0 -1
  184. package/dist/bn-template-engine/p-5d155a72.entry.js +0 -1
  185. package/dist/bn-template-engine/p-65f8962a.entry.js +0 -1
  186. package/dist/bn-template-engine/p-6b8d1ebf.entry.js +0 -1
  187. package/dist/bn-template-engine/p-7995acb2.entry.js +0 -1
  188. package/dist/bn-template-engine/p-7afe431e.entry.js +0 -1
  189. package/dist/bn-template-engine/p-8014b1ac.entry.js +0 -1
  190. package/dist/bn-template-engine/p-80423fc8.entry.js +0 -1
  191. package/dist/bn-template-engine/p-91e74d42.entry.js +0 -1
  192. package/dist/bn-template-engine/p-930a9e29.entry.js +0 -1
  193. package/dist/bn-template-engine/p-93C9jL8R.js +0 -1
  194. package/dist/bn-template-engine/p-93ff8584.entry.js +0 -1
  195. package/dist/bn-template-engine/p-B0m0U4wJ.js +0 -1
  196. package/dist/bn-template-engine/p-B27Ax6P_.js +0 -2
  197. package/dist/bn-template-engine/p-B79VcHiT.js +0 -1
  198. package/dist/bn-template-engine/p-BBd0ZVLL.js +0 -1
  199. package/dist/bn-template-engine/p-BFTU3MAI.js +0 -1
  200. package/dist/bn-template-engine/p-BFatTBqh.js +0 -1
  201. package/dist/bn-template-engine/p-BYmPQYxx.js +0 -1
  202. package/dist/bn-template-engine/p-BhEQy-2D.js +0 -1
  203. package/dist/bn-template-engine/p-BtVfu16B.js +0 -1
  204. package/dist/bn-template-engine/p-CY1RzLjU.js +0 -1
  205. package/dist/bn-template-engine/p-CfWnag33.js +0 -1
  206. package/dist/bn-template-engine/p-CnI71OA9.js +0 -1
  207. package/dist/bn-template-engine/p-Cp4MVxCu.js +0 -1
  208. package/dist/bn-template-engine/p-DbyXf6dF.js +0 -1
  209. package/dist/bn-template-engine/p-TdL-LRR9.js +0 -1
  210. package/dist/bn-template-engine/p-_LBTIfNN.js +0 -1
  211. package/dist/bn-template-engine/p-a342cd3c.entry.js +0 -1
  212. package/dist/bn-template-engine/p-ad94cf63.entry.js +0 -1
  213. package/dist/bn-template-engine/p-bc37d750.entry.js +0 -1
  214. package/dist/bn-template-engine/p-d07a0ca3.entry.js +0 -1
  215. package/dist/bn-template-engine/p-e5f372af.entry.js +0 -1
  216. package/dist/bn-template-engine/p-e620028c.entry.js +0 -1
  217. package/dist/bn-template-engine/p-e81e116a.entry.js +0 -1
  218. package/dist/bn-template-engine/p-eca98070.entry.js +0 -1
  219. package/dist/bn-template-engine/p-ee6de950.entry.js +0 -1
  220. package/dist/bn-template-engine/p-efe0ef1e.entry.js +0 -1
  221. package/dist/bn-template-engine/p-f034f1b8.entry.js +0 -1
  222. package/dist/bn-template-engine/p-f1c1a8a3.entry.js +0 -1
  223. package/dist/bn-template-engine/p-fe573a1a.entry.js +0 -1
  224. package/dist/bn-template-engine/p-kMyLevYy.js +0 -1
  225. package/dist/cjs/DataFormatDigits-DmTbhF8q.js +0 -142
  226. package/dist/cjs/DateStringFactory-Dn0aRj2Y.js +0 -453
  227. package/dist/cjs/Order-B4NIqQWe.js +0 -129
  228. package/dist/cjs/SVGVariancesStyleGroup-Czizhngt.js +0 -7973
  229. package/dist/cjs/StringAdapter-0EbYMkR0.js +0 -136
  230. package/dist/cjs/_commonjsHelpers-BJu3ubxk.js +0 -10
  231. package/dist/cjs/alasql.min-C_nHTuEQ.js +0 -306
  232. package/dist/cjs/bn-asset.cjs.entry.js +0 -42
  233. package/dist/cjs/bn-body_3.cjs.entry.js +0 -413
  234. package/dist/cjs/bn-card.cjs.entry.js +0 -37
  235. package/dist/cjs/bn-chart-structure.cjs.entry.js +0 -705
  236. package/dist/cjs/bn-chart-time.cjs.entry.js +0 -987
  237. package/dist/cjs/bn-component-style.cjs.entry.js +0 -44
  238. package/dist/cjs/bn-context_5.cjs.entry.js +0 -3380
  239. package/dist/cjs/bn-dataset.cjs.entry.js +0 -278
  240. package/dist/cjs/bn-layout-card.cjs.entry.js +0 -128
  241. package/dist/cjs/bn-layout-page.cjs.entry.js +0 -142
  242. package/dist/cjs/bn-map.cjs.entry.js +0 -425
  243. package/dist/cjs/bn-message.cjs.entry.js +0 -52
  244. package/dist/cjs/componentRegister-C17UFNPh.js +0 -72
  245. package/dist/cjs/constants-DHqQXSSd.js +0 -158
  246. package/dist/cjs/formatter-DIJL_crx.js +0 -215
  247. package/dist/cjs/ibcs-chart-structure.cjs.entry.js +0 -2906
  248. package/dist/cjs/ibcs-chart-time.cjs.entry.js +0 -4140
  249. package/dist/cjs/ibcs-map.cjs.entry.js +0 -1075
  250. package/dist/cjs/ibcs-title.cjs.entry.js +0 -352
  251. package/dist/cjs/scaling-B23eOtsC.js +0 -67
  252. package/dist/cjs/test-runner-card.cjs.entry.js +0 -27
  253. package/dist/cjs/test-runner-chart-time.cjs.entry.js +0 -230
  254. package/dist/cjs/test-runner-chart.cjs.entry.js +0 -326
  255. package/dist/cjs/test-runner-map.cjs.entry.js +0 -1862
  256. package/dist/cjs/test-runner-table.cjs.entry.js +0 -477
  257. package/dist/cjs/test-runner-time.cjs.entry.js +0 -381
  258. package/dist/cjs/test-runner-title.cjs.entry.js +0 -115
  259. package/dist/cjs/withComponentStatus-BrxL7usr.js +0 -39
  260. package/dist/cjs/withComponentStyle-C6KHnZHt.js +0 -128
  261. package/dist/cjs/withDataset-ZdN-RRTx.js +0 -146
  262. package/dist/cjs/withStyled-Bf-stJTR.js +0 -567
  263. package/dist/cjs/withTranslation-Cz0M5maV.js +0 -77
  264. package/dist/collection/components/bn-map/bn-map.css +0 -4
  265. package/dist/collection/components/bn-map/bn-map.js +0 -725
  266. package/dist/collection/components/bn-map/ibcs-map/assets/gpx/Chasing_Legends.gpx +0 -195076
  267. package/dist/collection/components/bn-map/ibcs-map/assets/gpx/Fahrt_am_Nachmittag.gpx +0 -142007
  268. package/dist/collection/components/bn-map/ibcs-map/assets/icons/gpx-finish.png +0 -0
  269. package/dist/collection/components/bn-map/ibcs-map/assets/icons/gpx-shadow.png +0 -0
  270. package/dist/collection/components/bn-map/ibcs-map/assets/icons/gpx-start.png +0 -0
  271. package/dist/collection/components/bn-map/ibcs-map/assets/icons/marker-example.png +0 -0
  272. package/dist/collection/components/bn-map/ibcs-map/assets/icons/pin-icon-end.png +0 -0
  273. package/dist/collection/components/bn-map/ibcs-map/assets/icons/pin-icon-start.png +0 -0
  274. package/dist/collection/components/bn-map/ibcs-map/assets/icons/pin-icon-wpt.png +0 -0
  275. package/dist/collection/components/bn-map/ibcs-map/assets/icons/pin-shadow.png +0 -0
  276. package/dist/collection/components/bn-map/ibcs-map/assets/icons/pin.png +0 -0
  277. package/dist/collection/components/bn-map/ibcs-map/ibcs-map.css +0 -674
  278. package/dist/collection/components/bn-map/ibcs-map/ibcs-map.js +0 -744
  279. package/dist/collection/components/bn-map/ibcs-map/utils/model/GeoJsonLayer.js +0 -9
  280. package/dist/collection/components/bn-map/ibcs-map/utils/model/GpxLayer.js +0 -13
  281. package/dist/collection/components/bn-map/ibcs-map/utils/model/Marker.js +0 -11
  282. package/dist/collection/components/bn-map/ibcs-map/utils/model/index.js +0 -2
  283. package/dist/collection/test-runner/test-runner-card.js +0 -36
  284. package/dist/collection/test-runner/test-runner-chart-time.js +0 -234
  285. package/dist/collection/test-runner/test-runner-chart.js +0 -364
  286. package/dist/collection/test-runner/test-runner-map.js +0 -1901
  287. package/dist/collection/test-runner/test-runner-table.js +0 -469
  288. package/dist/collection/test-runner/test-runner-time.js +0 -399
  289. package/dist/collection/test-runner/test-runner-title.js +0 -108
  290. package/dist/components/bn-map.d.ts +0 -11
  291. package/dist/components/bn-map.js +0 -1
  292. package/dist/components/componentRegister.js +0 -1
  293. package/dist/components/ibcs-map.d.ts +0 -11
  294. package/dist/components/ibcs-map.js +0 -1
  295. package/dist/components/ibcs-map2.js +0 -1
  296. package/dist/components/test-runner-card.d.ts +0 -11
  297. package/dist/components/test-runner-card.js +0 -1
  298. package/dist/components/test-runner-chart-time.d.ts +0 -11
  299. package/dist/components/test-runner-chart-time.js +0 -1
  300. package/dist/components/test-runner-chart.d.ts +0 -11
  301. package/dist/components/test-runner-chart.js +0 -1
  302. package/dist/components/test-runner-map.d.ts +0 -11
  303. package/dist/components/test-runner-map.js +0 -1
  304. package/dist/components/test-runner-table.d.ts +0 -11
  305. package/dist/components/test-runner-table.js +0 -1
  306. package/dist/components/test-runner-time.js +0 -1
  307. package/dist/components/test-runner-title.d.ts +0 -11
  308. package/dist/components/test-runner-title.js +0 -1
  309. package/dist/components/withDataset.js +0 -1
  310. package/dist/esm/DataFormatDigits-Dt6gpIiZ.js +0 -137
  311. package/dist/esm/DateStringFactory-_Qiv0IvF.js +0 -451
  312. package/dist/esm/Order-B4fpLe_f.js +0 -125
  313. package/dist/esm/SVGVariancesStyleGroup-DlWgvpzs.js +0 -7961
  314. package/dist/esm/StringAdapter-BLvo1Krl.js +0 -133
  315. package/dist/esm/_commonjsHelpers-BFTU3MAI.js +0 -7
  316. package/dist/esm/alasql.min-CWu4NkIt.js +0 -304
  317. package/dist/esm/bn-asset.entry.js +0 -40
  318. package/dist/esm/bn-body_3.entry.js +0 -409
  319. package/dist/esm/bn-card.entry.js +0 -35
  320. package/dist/esm/bn-chart-structure.entry.js +0 -703
  321. package/dist/esm/bn-chart-time.entry.js +0 -985
  322. package/dist/esm/bn-component-style.entry.js +0 -42
  323. package/dist/esm/bn-context_5.entry.js +0 -3374
  324. package/dist/esm/bn-dataset.entry.js +0 -276
  325. package/dist/esm/bn-layout-card.entry.js +0 -126
  326. package/dist/esm/bn-layout-page.entry.js +0 -140
  327. package/dist/esm/bn-map.entry.js +0 -423
  328. package/dist/esm/bn-message.entry.js +0 -50
  329. package/dist/esm/componentRegister-BtVfu16B.js +0 -72
  330. package/dist/esm/constants-kMyLevYy.js +0 -158
  331. package/dist/esm/formatter-DTMEZ6d8.js +0 -211
  332. package/dist/esm/ibcs-chart-structure.entry.js +0 -2904
  333. package/dist/esm/ibcs-chart-time.entry.js +0 -4138
  334. package/dist/esm/ibcs-map.entry.js +0 -1073
  335. package/dist/esm/ibcs-title.entry.js +0 -350
  336. package/dist/esm/scaling-BBd0ZVLL.js +0 -64
  337. package/dist/esm/test-runner-card.entry.js +0 -25
  338. package/dist/esm/test-runner-chart-time.entry.js +0 -228
  339. package/dist/esm/test-runner-chart.entry.js +0 -324
  340. package/dist/esm/test-runner-map.entry.js +0 -1860
  341. package/dist/esm/test-runner-table.entry.js +0 -475
  342. package/dist/esm/test-runner-time.entry.js +0 -379
  343. package/dist/esm/test-runner-title.entry.js +0 -113
  344. package/dist/esm/withComponentStatus-elELReKt.js +0 -37
  345. package/dist/esm/withComponentStyle-NaxfakAG.js +0 -126
  346. package/dist/esm/withDataset-BT2VQCsG.js +0 -144
  347. package/dist/esm/withStyled-CpUTv74m.js +0 -539
  348. package/dist/esm/withTranslation-Do4GhleK.js +0 -75
  349. package/dist/types/components/bn-map/bn-map.d.ts +0 -122
  350. package/dist/types/components/bn-map/ibcs-map/ibcs-map.d.ts +0 -73
  351. package/dist/types/components/bn-map/ibcs-map/utils/model/GeoJsonLayer.d.ts +0 -8
  352. package/dist/types/components/bn-map/ibcs-map/utils/model/GpxLayer.d.ts +0 -11
  353. package/dist/types/components/bn-map/ibcs-map/utils/model/Marker.d.ts +0 -9
  354. package/dist/types/components/bn-map/ibcs-map/utils/model/index.d.ts +0 -2
  355. package/dist/types/test-runner/test-runner-card.d.ts +0 -3
  356. package/dist/types/test-runner/test-runner-chart-time.d.ts +0 -3
  357. package/dist/types/test-runner/test-runner-chart.d.ts +0 -3
  358. package/dist/types/test-runner/test-runner-map.d.ts +0 -3
  359. package/dist/types/test-runner/test-runner-table.d.ts +0 -3
  360. package/dist/types/test-runner/test-runner-time.d.ts +0 -3
  361. package/dist/types/test-runner/test-runner-title.d.ts +0 -3
@@ -1,4 +1,314 @@
1
- 'use strict';
1
+ import { g as getElement, f as forceUpdate } from './index-B_d-jp99.js';
2
+ import { g as getStores, c as clearStoresCache } from './context-protocol-D-o_UZ33.js';
3
+ import { r as runIfExisits } from './withHasError-DW_vMDUp.js';
4
+
5
+ const isObject = (obj) => {
6
+ if (typeof obj === 'object' && obj !== null) {
7
+ if (typeof Object.getPrototypeOf === 'function') {
8
+ const prototype = Object.getPrototypeOf(obj);
9
+ return prototype === Object.prototype || prototype === null;
10
+ }
11
+ return Object.prototype.toString.call(obj) === '[object Object]';
12
+ }
13
+ return false;
14
+ };
15
+ const overwriteMerge = (_, currArr) => currArr;
16
+ const combineMerge = (prevArr, currArr) => {
17
+ return [...new Set([...prevArr, ...currArr])];
18
+ };
19
+ const getMergeFn = (type) => {
20
+ switch (type) {
21
+ case 'overwrite':
22
+ return overwriteMerge;
23
+ case 'combine':
24
+ default:
25
+ return combineMerge;
26
+ }
27
+ };
28
+
29
+ const withDefaultOptions = (options) => {
30
+ return {
31
+ arrayMergeType: 'combine',
32
+ arrayMerge: getMergeFn(options ? options.arrayMergeType : 'combine'),
33
+ ...options,
34
+ };
35
+ };
36
+ const merge = (objects, options) => {
37
+ const opts = withDefaultOptions(options);
38
+ return objects.reduce((prev, curr) => {
39
+ Object.keys(curr).forEach((key) => {
40
+ if (Array.isArray(prev[key]) && Array.isArray(curr[key])) {
41
+ if (opts && opts.arrayMerge) {
42
+ prev[key] = opts.arrayMerge(prev[key], curr[key]);
43
+ }
44
+ }
45
+ else if (isObject(prev[key]) && isObject(curr[key])) {
46
+ prev[key] = merge([prev[key], curr[key]], opts);
47
+ }
48
+ else {
49
+ prev[key] = curr[key];
50
+ }
51
+ });
52
+ return prev;
53
+ }, {});
54
+ };
55
+
56
+ /**
57
+ * Mixin that provides themed styling to a Stencil component using a
58
+ * three-layer merge strategy.
59
+ *
60
+ * The effective style is computed by deep-merging three layers in order:
61
+ * 1. `_system` -- built-in defaults (lowest priority)
62
+ * 2. `_default` -- user-defined global overrides
63
+ * 3. The value of the host element's `selected-style` attribute (highest priority)
64
+ *
65
+ * A MutationObserver watches `selected-style` and the store subscription
66
+ * reacts to updates in the componentStyles store, triggering a re-merge
67
+ * and forced re-render on changes.
68
+ *
69
+ * @param component - The Stencil component instance
70
+ * @returns A query function `componentStyle(<selector>)` that provides type-safe
71
+ * access to the merged style object, e.g. `componentStyle(s => s.table.headerBg)`
72
+ */
73
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
74
+ const withComponentStyle = (component) => {
75
+ let subscription;
76
+ let stores;
77
+ let selectedStyle;
78
+ let style;
79
+ const updateStyle = () => {
80
+ const state = stores.componentStyles.state;
81
+ style = merge([
82
+ state["_system"] || {},
83
+ state["_default"] || {},
84
+ state[selectedStyle] || {},
85
+ ]);
86
+ };
87
+ const observer = new MutationObserver((mutations) => {
88
+ mutations.forEach((mutation) => {
89
+ if (mutation.attributeName === "selected-style") {
90
+ selectedStyle = getElement(component).getAttribute("selected-style");
91
+ updateStyle();
92
+ forceUpdate(component);
93
+ }
94
+ });
95
+ });
96
+ const connectedCallback = component["connectedCallback"];
97
+ component["connectedCallback"] = () => {
98
+ const element = getElement(component);
99
+ stores = getStores(element);
100
+ style = stores.componentStyles.state["_system"];
101
+ observer.observe(element, { attributes: true, attributeFilter: ["selected-style"] });
102
+ selectedStyle = getElement(component).getAttribute("selected-style");
103
+ updateStyle();
104
+ subscription = stores.componentStyles.on("set", (key) => {
105
+ if (key === selectedStyle) {
106
+ selectedStyle = getElement(component).getAttribute("selected-style");
107
+ updateStyle();
108
+ forceUpdate(getElement(component));
109
+ }
110
+ });
111
+ runIfExisits(connectedCallback, component);
112
+ };
113
+ const disconnectedCallback = component["disconnectedCallback"];
114
+ component["disconnectedCallback"] = () => {
115
+ observer.disconnect();
116
+ runIfExisits(subscription);
117
+ clearStoresCache(getElement(component));
118
+ runIfExisits(disconnectedCallback, component);
119
+ };
120
+ const componentStyle = (q) => {
121
+ return q(style);
122
+ };
123
+ return componentStyle;
124
+ };
125
+
126
+ /** Controls which parts of a component are translated: ALL=labels+data, META=labels only. */
127
+ var I18nMode;
128
+ (function (I18nMode) {
129
+ I18nMode["ALL"] = "all";
130
+ I18nMode["META"] = "meta";
131
+ })(I18nMode || (I18nMode = {}));
132
+ /** Unit type of the measured values — affects default formatting and SI prefix behavior. */
133
+ var MeasureType;
134
+ (function (MeasureType) {
135
+ MeasureType["CURRENCY"] = "currency";
136
+ MeasureType["VOLUME"] = "volume";
137
+ })(MeasureType || (MeasureType = {}));
138
+ /**
139
+ * IBCS four-scenario model with up to 4 variants per type.
140
+ * - AC (actual): reported/measured values
141
+ * - PP (previous period): prior year or period for comparison
142
+ * - FC (forecast): projected future values
143
+ * - PL (plan): budgeted/target values
144
+ */
145
+ var Scenarios;
146
+ (function (Scenarios) {
147
+ Scenarios["AC1"] = "ac1";
148
+ Scenarios["AC2"] = "ac2";
149
+ Scenarios["AC3"] = "ac3";
150
+ Scenarios["AC4"] = "ac4";
151
+ Scenarios["PP1"] = "pp1";
152
+ Scenarios["PP2"] = "pp2";
153
+ Scenarios["PP3"] = "pp3";
154
+ Scenarios["PP4"] = "pp4";
155
+ Scenarios["FC1"] = "fc1";
156
+ Scenarios["FC2"] = "fc2";
157
+ Scenarios["FC3"] = "fc3";
158
+ Scenarios["FC4"] = "fc4";
159
+ Scenarios["PL1"] = "pl1";
160
+ Scenarios["PL2"] = "pl2";
161
+ Scenarios["PL3"] = "pl3";
162
+ Scenarios["PL4"] = "pl4";
163
+ })(Scenarios || (Scenarios = {}));
164
+ /**
165
+ * Variance direction for IBCS traffic-light coloring.
166
+ * - POS: favorable variance (green in IBCS)
167
+ * - NEG: unfavorable variance (red in IBCS)
168
+ * - NEU: neutral / no directional meaning
169
+ */
170
+ var Sentiments;
171
+ (function (Sentiments) {
172
+ Sentiments["POS"] = "pos";
173
+ Sentiments["NEG"] = "neg";
174
+ Sentiments["NEU"] = "neu";
175
+ })(Sentiments || (Sentiments = {}));
176
+ /** Number display format: DECIMAL for absolute values, PERCENT for ratio columns. */
177
+ var DataFormat;
178
+ (function (DataFormat) {
179
+ DataFormat["DECIMAL"] = "decimal";
180
+ DataFormat["PERCENT"] = "percent";
181
+ })(DataFormat || (DataFormat = {}));
182
+ /**
183
+ * Table aggregation mode.
184
+ * - LIST: no aggregation, rows displayed as-is
185
+ * - SUM: simple sum per group with a grand total row
186
+ * - SUMNOTOTAL: sum per group without a grand total
187
+ * - OPT: operation-aware aggregation — rows with operation="-" subtract from the group sum
188
+ * - OPTNOTOTAL: operation-aware aggregation without a grand total
189
+ */
190
+ var TableType;
191
+ (function (TableType) {
192
+ TableType["LIST"] = "list";
193
+ TableType["SUM"] = "sum";
194
+ TableType["SUMNOTOTAL"] = "sumnototal";
195
+ TableType["OPT"] = "opt";
196
+ TableType["OPTNOTOTAL"] = "optnototal";
197
+ })(TableType || (TableType = {}));
198
+ /** Width of the category label column as a percentage of the table width. INF = auto/infinite. */
199
+ var TableCategoryWidth;
200
+ (function (TableCategoryWidth) {
201
+ TableCategoryWidth["INF"] = "inf";
202
+ TableCategoryWidth["W100"] = "w100";
203
+ TableCategoryWidth["W50"] = "w50";
204
+ TableCategoryWidth["W25"] = "w25";
205
+ TableCategoryWidth["W20"] = "w20";
206
+ TableCategoryWidth["W15"] = "w15";
207
+ TableCategoryWidth["W10"] = "w10";
208
+ TableCategoryWidth["W5"] = "w5";
209
+ })(TableCategoryWidth || (TableCategoryWidth = {}));
210
+ /** Width preset for inline bar/pin chart columns. Value = max bar width in em. */
211
+ var TableBarColumnWidth;
212
+ (function (TableBarColumnWidth) {
213
+ TableBarColumnWidth["W5"] = "w5";
214
+ TableBarColumnWidth["W10"] = "w10";
215
+ TableBarColumnWidth["W15"] = "w15";
216
+ TableBarColumnWidth["W20"] = "w20";
217
+ TableBarColumnWidth["W25"] = "w25";
218
+ TableBarColumnWidth["W30"] = "w30";
219
+ TableBarColumnWidth["W40"] = "w40";
220
+ TableBarColumnWidth["W60"] = "w60";
221
+ TableBarColumnWidth["W80"] = "w80";
222
+ TableBarColumnWidth["W100"] = "w100";
223
+ })(TableBarColumnWidth || (TableBarColumnWidth = {}));
224
+ /** Maps TableBarColumnWidth presets to max bar width in em. */
225
+ const BAR_COLUMN_WIDTH_EM = {
226
+ [TableBarColumnWidth.W5]: 5,
227
+ [TableBarColumnWidth.W10]: 10,
228
+ [TableBarColumnWidth.W15]: 15,
229
+ [TableBarColumnWidth.W20]: 20,
230
+ [TableBarColumnWidth.W25]: 25,
231
+ [TableBarColumnWidth.W30]: 30,
232
+ [TableBarColumnWidth.W40]: 40,
233
+ [TableBarColumnWidth.W60]: 60,
234
+ [TableBarColumnWidth.W80]: 80,
235
+ [TableBarColumnWidth.W100]: 100,
236
+ };
237
+ /**
238
+ * Three-level row hierarchy for grouping and drill-down: rowGroup > category > subCategory.
239
+ * Index variants (e.g. ROWGROUPINDEX) provide stable numeric sort keys that preserve
240
+ * the original dataset order when alphabetical sorting is undesirable.
241
+ */
242
+ var AggregationLevel;
243
+ (function (AggregationLevel) {
244
+ AggregationLevel["ROWGROUP"] = "rowGroup";
245
+ AggregationLevel["ROWGROUPINDEX"] = "rowGroupIndex";
246
+ AggregationLevel["CATEGORY"] = "category";
247
+ AggregationLevel["CATEGORYINDEX"] = "categoryIndex";
248
+ AggregationLevel["SUBCATEGORY"] = "subCategory";
249
+ AggregationLevel["SUBCATEGORYINDEX"] = "subCategoryIndex";
250
+ })(AggregationLevel || (AggregationLevel = {}));
251
+ /**
252
+ * Date axis label display strategy.
253
+ * - SMART: abbreviated labels with parent period shown at boundary crossings (e.g. "Jan" normally, "Jan 2024" at year boundary)
254
+ * - LONG: full date format for every label
255
+ * - SHORT: abbreviated format for every label
256
+ */
257
+ var AxisLabelsMode;
258
+ (function (AxisLabelsMode) {
259
+ AxisLabelsMode["SMART"] = "smart";
260
+ AxisLabelsMode["LONG"] = "long";
261
+ AxisLabelsMode["SHORT"] = "short";
262
+ })(AxisLabelsMode || (AxisLabelsMode = {}));
263
+ /**
264
+ * Visual representation type for chart series.
265
+ * - COLUMN: vertical bars (time chart) or horizontal bars (structure chart)
266
+ * - LINE: connected data points
267
+ * - WATERFALL: cumulative flow where each bar starts where the previous one ended
268
+ */
269
+ var ChartType;
270
+ (function (ChartType) {
271
+ ChartType["COLUMN"] = "column";
272
+ ChartType["LINE"] = "line";
273
+ ChartType["WATERFALL"] = "waterfall";
274
+ })(ChartType || (ChartType = {}));
275
+ /** Chart rendering mode. AUTO selects BAR or LINE based on scenario type. */
276
+ var ChartMode;
277
+ (function (ChartMode) {
278
+ ChartMode["BAR"] = "bar";
279
+ ChartMode["LINE"] = "line";
280
+ ChartMode["AUTO"] = "auto";
281
+ })(ChartMode || (ChartMode = {}));
282
+ /**
283
+ * Stacking dimension for multi-segment bar charts.
284
+ * - SCENARIOS: stack the scenarios from the `scenarios` prop end-to-end
285
+ * - DIMENSIONS: stack by the next-lower hierarchy level derived from the `level` prop
286
+ * (rowGroup → category, category → subCategory)
287
+ */
288
+ var StackBy;
289
+ (function (StackBy) {
290
+ StackBy["SCENARIOS"] = "scenarios";
291
+ StackBy["DIMENSIONS"] = "dimensions";
292
+ })(StackBy || (StackBy = {}));
293
+ /**
294
+ * How stacked values are presented.
295
+ * - ABSOLUTE: raw values stacked
296
+ * - RELATIVE: normalized to 100% per data point
297
+ * - ABSOLUTE_RELATIVE: absolute bars with a relative (%) total label
298
+ */
299
+ var StackMode;
300
+ (function (StackMode) {
301
+ StackMode["ABSOLUTE"] = "absolute";
302
+ StackMode["RELATIVE"] = "relative";
303
+ StackMode["ABSOLUTE_RELATIVE"] = "absolute-relative";
304
+ })(StackMode || (StackMode = {}));
305
+ /** Sort order of segments within a stacked bar. DATASET preserves the original data order. */
306
+ var StackOrder;
307
+ (function (StackOrder) {
308
+ StackOrder["ASC"] = "asc";
309
+ StackOrder["DESC"] = "desc";
310
+ StackOrder["DATASET"] = "dataset";
311
+ })(StackOrder || (StackOrder = {}));
2
312
 
3
313
  // these aren't really private, but nor are they really useful to document
4
314
 
@@ -8129,4 +8439,1063 @@ function friendlyDateTime(dateTimeish) {
8129
8439
  }
8130
8440
  }
8131
8441
 
8132
- exports.DateTime = DateTime;
8442
+ /** Granularity levels for date intervals, from YEAR down to MILLISECOND. AUTO triggers auto-detection. */
8443
+ var DateDistance;
8444
+ (function (DateDistance) {
8445
+ DateDistance["YEAR"] = "year";
8446
+ DateDistance["QUARTER"] = "quarter";
8447
+ DateDistance["MONTH"] = "month";
8448
+ DateDistance["WEEK"] = "week";
8449
+ DateDistance["DAY"] = "day";
8450
+ DateDistance["HOUR"] = "hour";
8451
+ DateDistance["MINUTE"] = "minute";
8452
+ DateDistance["SECOND"] = "second";
8453
+ DateDistance["MILLISECOND"] = "millisecond";
8454
+ DateDistance["NONE"] = "fallback";
8455
+ DateDistance["AUTO"] = "auto";
8456
+ })(DateDistance || (DateDistance = {}));
8457
+ /** IBCS date-link modes controlling how start/end dates are rendered in titles and axis labels. */
8458
+ var DateLink;
8459
+ (function (DateLink) {
8460
+ DateLink["AVG"] = "avg";
8461
+ DateLink["INTERVAL"] = "interval";
8462
+ DateLink["START"] = "start";
8463
+ DateLink["END"] = "end";
8464
+ DateLink["YTD"] = "ytd";
8465
+ DateLink["YTG"] = "ytg";
8466
+ DateLink["CUM"] = "cum";
8467
+ DateLink["MAT"] = "mat";
8468
+ DateLink["NONE"] = "none";
8469
+ DateLink["AUTO"] = "auto";
8470
+ })(DateLink || (DateLink = {}));
8471
+ /**
8472
+ * Produces formatted date strings and IBCS date-link notations for time-series charts.
8473
+ *
8474
+ * Supports configurable date formats (full and abbreviated), locale-aware formatting
8475
+ * via Luxon, smart boundary labels that append the parent period at crossings
8476
+ * (e.g. month name shown at the first day of a new month), and IBCS date-link
8477
+ * notation (AVG, YTD, YTG, CUM, MAT, INTERVAL, START, END).
8478
+ */
8479
+ class DateStringFactory {
8480
+ constructor() {
8481
+ this._dateFormat = {
8482
+ year: "yyyy",
8483
+ quarter: "q'Q' yyyy",
8484
+ month: "LLL yyyy",
8485
+ week: "'KW'WW yyyy",
8486
+ day: "dd.MM.yyyy",
8487
+ hour: "TT",
8488
+ minute: "TT",
8489
+ second: "TT",
8490
+ millisecond: "TT:SSS",
8491
+ fallback: "dd.MM.yyyy",
8492
+ };
8493
+ this._dateFormatShort = {
8494
+ year: "yy",
8495
+ quarter: "q'Q'",
8496
+ month: "LLL",
8497
+ week: "'KW'WW",
8498
+ day: "dd",
8499
+ hour: "hh'h'",
8500
+ minute: "mm'm'",
8501
+ second: "ss's'",
8502
+ millisecond: "SSS'ms'",
8503
+ fallback: "dd.MM.yyyy",
8504
+ };
8505
+ this._dateLinkFormat = {
8506
+ avg: "Ø[LINK]",
8507
+ interval: "[DATE]..[DATE2]",
8508
+ start: ".[DATE]",
8509
+ end: "[DATE].",
8510
+ ytd: "_[DATE]",
8511
+ ytg: "[DATE]_",
8512
+ cum: "[DATE]_[DATE2]",
8513
+ mat: "~[DATE]",
8514
+ none: "[DATE]",
8515
+ };
8516
+ this.locale = "de";
8517
+ this.dateFormat = this._dateFormat;
8518
+ this.dateLinkFormat = this._dateLinkFormat;
8519
+ this.dateFormatShort = this._dateFormatShort;
8520
+ }
8521
+ setDateLinkFormat(datelink) {
8522
+ this.dateLinkFormat = datelink;
8523
+ }
8524
+ setDateFormat(dateFormat) {
8525
+ this.dateFormat = dateFormat;
8526
+ }
8527
+ setDateFormatShort(dateFormatShort) {
8528
+ this.dateFormatShort = dateFormatShort;
8529
+ }
8530
+ setLocale(locale) {
8531
+ this.locale = locale;
8532
+ }
8533
+ /**
8534
+ * Converts date string based on dateFormatMap and the selected Type
8535
+ *
8536
+ * @param date
8537
+ * @param type?
8538
+ */
8539
+ getDateString(date, type) {
8540
+ return date.setLocale(this.locale).toFormat(this.dateFormat[type] || this.dateFormat["fallback"]);
8541
+ }
8542
+ /**
8543
+ * Produces abbreviated date labels that include the parent period at boundary crossings.
8544
+ *
8545
+ * For example, with MONTH granularity, most ticks show just "Jan", "Feb", etc.,
8546
+ * but the first month of a new year also appends the year ("Jan 24").
8547
+ * This avoids redundant repetition while keeping boundary context visible.
8548
+ */
8549
+ getSmartDateString(date, type) {
8550
+ switch (type) {
8551
+ case DateDistance.DAY: {
8552
+ return this.getFormatedDayDate(date);
8553
+ }
8554
+ case DateDistance.MONTH: {
8555
+ return this.getFormatedMonthDate(date);
8556
+ }
8557
+ case DateDistance.QUARTER: {
8558
+ return this.getFormatedQuarterDate(date);
8559
+ }
8560
+ case DateDistance.WEEK: {
8561
+ return this.getFormatedWeekDate(date);
8562
+ }
8563
+ case DateDistance.HOUR: {
8564
+ return this.getFormatedHourDate(date);
8565
+ }
8566
+ case DateDistance.MINUTE: {
8567
+ return this.getFormatedMinuteDate(date);
8568
+ }
8569
+ case DateDistance.SECOND: {
8570
+ return this.getFormatedSecondDate(date);
8571
+ }
8572
+ case DateDistance.MILLISECOND: {
8573
+ return this.getFormatedMilliSecondDate(date);
8574
+ }
8575
+ default: {
8576
+ return this.getDateString(date, type);
8577
+ }
8578
+ }
8579
+ }
8580
+ /**
8581
+ * Determines the best-fitting {@link DateDistance} granularity for the span between two dates.
8582
+ *
8583
+ * Cascades through granularities from finest (millisecond) to coarsest (year),
8584
+ * comparing the span against the `limit` threshold at each level. Returns the
8585
+ * first granularity where the span is below the limit, ensuring the number of
8586
+ * axis ticks stays manageable. Defaults to DAY for zero-span or null end dates.
8587
+ *
8588
+ * @param limit Maximum number of intervals before stepping up to a coarser granularity (default 32).
8589
+ */
8590
+ calculateDistanceType(start, end, limit = 32) {
8591
+ if (end == null) {
8592
+ return DateDistance.DAY;
8593
+ }
8594
+ const mStart = typeof start == "number" ? DateTime.fromMillis(start) : start;
8595
+ const mEnd = typeof end == "number" ? DateTime.fromMillis(end) : end;
8596
+ if (mEnd.diff(mStart).as("milliseconds") === 0) {
8597
+ return DateDistance.DAY;
8598
+ }
8599
+ else if (mEnd.diff(mStart).as("milliseconds") < limit) {
8600
+ return DateDistance.MILLISECOND;
8601
+ }
8602
+ else if (mEnd.diff(mStart).as("seconds") < limit) {
8603
+ return DateDistance.SECOND;
8604
+ }
8605
+ else if (mEnd.diff(mStart).as("minutes") < limit) {
8606
+ return DateDistance.MINUTE;
8607
+ }
8608
+ else if (mEnd.diff(mStart).as("hours") < limit) {
8609
+ return DateDistance.HOUR;
8610
+ }
8611
+ else if (mEnd.diff(mStart).as("days") < limit) {
8612
+ return DateDistance.DAY;
8613
+ }
8614
+ else if (mEnd.diff(mStart).as("weeks") < limit) {
8615
+ return DateDistance.WEEK;
8616
+ }
8617
+ else if (mEnd.diff(mStart).as("months") < limit) {
8618
+ return DateDistance.MONTH;
8619
+ }
8620
+ else if (mEnd.diff(mStart).as("quarters") < limit) {
8621
+ return DateDistance.QUARTER;
8622
+ }
8623
+ else {
8624
+ return DateDistance.YEAR;
8625
+ }
8626
+ }
8627
+ /**
8628
+ * Get an array of moment instances, each representing a day beween given timestamps.
8629
+ * @param {string|Date} from start date
8630
+ * @param {string|Date} to end date
8631
+ * @param dateInterval
8632
+ * @param spanLimit
8633
+ */
8634
+ datesBetween(from, to, dateInterval, spanLimit) {
8635
+ const unit = this.convertDateDistanceToMomentunitOfTime(dateInterval);
8636
+ const fromDate = from.startOf(unit);
8637
+ const toDate = to.endOf(unit);
8638
+ let span = toDate.diff(fromDate).as(unit);
8639
+ const days = [];
8640
+ if (span >= spanLimit) {
8641
+ span = spanLimit;
8642
+ }
8643
+ let currentDate = fromDate;
8644
+ do {
8645
+ days.push(currentDate);
8646
+ currentDate = currentDate.plus(this.createDiratonLike(unit, 1));
8647
+ } while (currentDate <= toDate && days.length < span);
8648
+ return days;
8649
+ }
8650
+ /**
8651
+ * Produces an IBCS date-link string combining date formatting with link notation.
8652
+ *
8653
+ * Supported modes map to IBCS conventions:
8654
+ * - `AVG`: average symbol `Ø` wrapping the interval
8655
+ * - `YTD` / `YTG`: year-to-date / year-to-go underline notation
8656
+ * - `CUM`: cumulative range `start_end`
8657
+ * - `MAT`: moving annual total `~date`
8658
+ * - `INTERVAL`: `start..end` range
8659
+ * - `START` / `END`: dot-prefixed/suffixed single date
8660
+ *
8661
+ * When start and end resolve to the same formatted string, INTERVAL is collapsed
8662
+ * to NONE to avoid redundant display. Year parts are deduplicated when both dates
8663
+ * share the same year (e.g. "Q1 .. Q3 2024" instead of "Q1 2024 .. Q3 2024").
8664
+ *
8665
+ * @param type DateDistance granularity; when AUTO, it is auto-detected via `calculateDistanceType`.
8666
+ */
8667
+ getDateLinkString(startDateTime, endDateTime, mode, type, spanLimit) {
8668
+ // No Start/ End Date exists
8669
+ if (startDateTime == null && endDateTime == null) {
8670
+ // BinoSystem.warn('NO START AND END DATE SELECTED');
8671
+ return "";
8672
+ }
8673
+ if (startDateTime == null && !(mode === DateLink.END || mode === DateLink.YTD)) {
8674
+ // BinoSystem.warn('NO START N SELECTED');
8675
+ return "";
8676
+ }
8677
+ if (endDateTime == null &&
8678
+ (DateLink.INTERVAL === mode || DateLink.CUM === mode || DateLink.END === mode || DateLink.YTD === mode)) {
8679
+ // BinoSystem.warn('NO END N SELECTED');
8680
+ return "";
8681
+ }
8682
+ const date1 = startDateTime || DateTime.now();
8683
+ const date2 = endDateTime;
8684
+ // calculate type value aka. auto-mode
8685
+ if (type === DateDistance.AUTO) {
8686
+ type = this.calculateDistanceType(date1, date2, spanLimit);
8687
+ }
8688
+ let dateString1 = this.getDateString(date1, type);
8689
+ let dateString2 = "";
8690
+ let link = DateLink.NONE;
8691
+ if (date2 != null) {
8692
+ dateString2 = this.getDateString(date2, type);
8693
+ link = DateLink.INTERVAL;
8694
+ // clean up visualisation if start and end (formated) ist identical
8695
+ if (dateString1 === dateString2 && mode === DateLink.INTERVAL) {
8696
+ // BinoSystem.warn('CHANGED INTERVAL TO NONE; START AND END ARE IDENTICAL');
8697
+ mode = DateLink.NONE;
8698
+ }
8699
+ if (dateString1 === dateString2 && mode === DateLink.AVG) {
8700
+ // BinoSystem.warn('CHANGED INTERVAL TO NONE; START AND END ARE IDENTICAL');
8701
+ link = DateLink.NONE;
8702
+ }
8703
+ if (DateLink.END === mode || DateLink.YTD === mode) {
8704
+ dateString1 = dateString2;
8705
+ }
8706
+ // clean up dateString1 if same year
8707
+ if (mode === DateLink.INTERVAL || mode === DateLink.CUM || DateLink.AVG) {
8708
+ if (type === DateDistance.QUARTER) {
8709
+ if (date1.quarter === date2.quarter && date1.year === date2.year) {
8710
+ dateString2 = dateString2.replace(" " + date2.year, "");
8711
+ }
8712
+ else if (date1.year === date2.year) {
8713
+ dateString1 = dateString1.replace(" " + date1.year, "");
8714
+ }
8715
+ }
8716
+ else if (type === DateDistance.MONTH) {
8717
+ if (date1.month === date2.month && date1.year === date2.year) {
8718
+ dateString2 = dateString2.replace(" " + date2.year, "");
8719
+ }
8720
+ else if (date1.year === date2.year) {
8721
+ dateString1 = dateString1.replace(" " + date1.year, "");
8722
+ }
8723
+ }
8724
+ else if (type === DateDistance.WEEK) {
8725
+ if (date1.weekNumber === date2.weekNumber && date1.year === date2.year) {
8726
+ dateString2 = dateString2.replace(" " + date2.year, "");
8727
+ }
8728
+ else if (date1.year === date2.year) {
8729
+ dateString1 = dateString1.replace(" " + date1.year, "");
8730
+ }
8731
+ }
8732
+ }
8733
+ }
8734
+ return this.dateLinkFormat[mode]
8735
+ .replace("[LINK]", this.dateLinkFormat[link])
8736
+ .replace("[DATE]", dateString1)
8737
+ .replace("[DATE2]", dateString2);
8738
+ }
8739
+ /** Returns an abbreviated date string using the short format map (e.g. "yy" for year, "LLL" for month). */
8740
+ getShortDateString(date, type) {
8741
+ return date
8742
+ .setLocale(this.locale)
8743
+ .toFormat(this.dateFormatShort[type] || this.dateFormatShort["fallback"]);
8744
+ }
8745
+ getFormatedDayDate(date) {
8746
+ let format = this.dateFormatShort["day"];
8747
+ if (this.isFirstInMonth(date)) {
8748
+ format += " " + this.dateFormatShort["month"];
8749
+ }
8750
+ if (this.isJanuary(date)) {
8751
+ format += " " + this.dateFormatShort["year"];
8752
+ }
8753
+ return date.setLocale(this.locale).toFormat(format);
8754
+ }
8755
+ getFormatedMonthDate(date) {
8756
+ let format = this.dateFormatShort["month"];
8757
+ if (this.isJanuary(date)) {
8758
+ format += " " + this.dateFormatShort["year"];
8759
+ }
8760
+ return date.setLocale(this.locale).toFormat(format);
8761
+ }
8762
+ getFormatedQuarterDate(date) {
8763
+ let format = this.dateFormatShort["quarter"];
8764
+ if (this.isFirstQuarter(date)) {
8765
+ format += " " + this.dateFormatShort["year"];
8766
+ }
8767
+ return date.setLocale(this.locale).toFormat(format);
8768
+ }
8769
+ getFormatedWeekDate(date) {
8770
+ let format = this.dateFormatShort["week"];
8771
+ if (this.isFirstWeek(date)) {
8772
+ format += " " + this.dateFormatShort["year"];
8773
+ }
8774
+ return date.setLocale(this.locale).toFormat(format);
8775
+ }
8776
+ getFormatedHourDate(date) {
8777
+ let format = this.dateFormatShort["hour"];
8778
+ if (this.isFirstHour(date)) {
8779
+ format += " " + this.dateFormatShort["day"];
8780
+ }
8781
+ return date.setLocale(this.locale).toFormat(format);
8782
+ }
8783
+ getFormatedMinuteDate(date) {
8784
+ let format = this.dateFormatShort["minute"];
8785
+ if (this.isFirstMinute(date)) {
8786
+ format = this.dateFormatShort["hour"] + ":" + format;
8787
+ }
8788
+ return date.setLocale(this.locale).toFormat(format);
8789
+ }
8790
+ getFormatedSecondDate(date) {
8791
+ let format = this.dateFormatShort["second"];
8792
+ if (this.isFirstSecond(date)) {
8793
+ format = this.dateFormatShort["minute"] + ":" + format;
8794
+ }
8795
+ return date.setLocale(this.locale).toFormat(format);
8796
+ }
8797
+ getFormatedMilliSecondDate(date) {
8798
+ let format = this.dateFormatShort["millisecond"];
8799
+ if (this.isFirstMilliSecond(date)) {
8800
+ format = this.dateFormatShort["second"] + ":" + format;
8801
+ }
8802
+ return date.setLocale(this.locale).toFormat(format);
8803
+ }
8804
+ isFirstInMonth(date) {
8805
+ return date.day === 1;
8806
+ }
8807
+ isJanuary(date) {
8808
+ return date.month === 1;
8809
+ }
8810
+ isFirstQuarter(date) {
8811
+ return date.quarter === 1;
8812
+ }
8813
+ isFirstWeek(date) {
8814
+ return date.weekNumber === 1;
8815
+ }
8816
+ isFirstHour(date) {
8817
+ return date.hour === 0;
8818
+ }
8819
+ isFirstMinute(date) {
8820
+ return date.minute === 0;
8821
+ }
8822
+ isFirstSecond(date) {
8823
+ return date.second === 0;
8824
+ }
8825
+ isFirstMilliSecond(date) {
8826
+ return date.millisecond === 0;
8827
+ }
8828
+ convertDateDistanceToMomentunitOfTime(dateInterval) {
8829
+ let unitOfTime;
8830
+ switch (dateInterval) {
8831
+ case DateDistance.YEAR:
8832
+ unitOfTime = "year";
8833
+ break;
8834
+ case DateDistance.MONTH:
8835
+ unitOfTime = "month";
8836
+ break;
8837
+ case DateDistance.QUARTER:
8838
+ unitOfTime = "quarter";
8839
+ break;
8840
+ case DateDistance.WEEK:
8841
+ unitOfTime = "week";
8842
+ break;
8843
+ case DateDistance.DAY:
8844
+ unitOfTime = "day";
8845
+ break;
8846
+ case DateDistance.HOUR:
8847
+ unitOfTime = "hour";
8848
+ break;
8849
+ case DateDistance.MINUTE:
8850
+ unitOfTime = "minute";
8851
+ break;
8852
+ case DateDistance.SECOND:
8853
+ unitOfTime = "second";
8854
+ break;
8855
+ case DateDistance.MILLISECOND:
8856
+ unitOfTime = "millisecond";
8857
+ break;
8858
+ default:
8859
+ unitOfTime = "day";
8860
+ }
8861
+ return unitOfTime;
8862
+ }
8863
+ createDiratonLike(unit, number) {
8864
+ switch (unit) {
8865
+ case "year":
8866
+ return { years: number };
8867
+ case "month":
8868
+ return { months: number };
8869
+ case "quarter":
8870
+ return { quarters: number };
8871
+ case "week":
8872
+ return { weeks: number };
8873
+ case "day":
8874
+ return { days: number };
8875
+ case "hour":
8876
+ return { hours: number };
8877
+ case "minute":
8878
+ return { minutes: number };
8879
+ case "second":
8880
+ return { seconds: number };
8881
+ case "millisecond":
8882
+ return { milliseconds: number };
8883
+ default:
8884
+ return { days: number };
8885
+ }
8886
+ }
8887
+ }
8888
+
8889
+ /**
8890
+ * Type-checking utility used throughout the adapter layer for safe JSON-to-domain conversion.
8891
+ *
8892
+ * All methods are static guards that validate a single `unknown` value before it is
8893
+ * assigned to a typed domain property. Methods that serve as TypeScript type guards
8894
+ * use `data is T` return types to enable downstream type narrowing.
8895
+ */
8896
+ class CompareUtil {
8897
+ static isExisting(data) {
8898
+ return data !== null && data !== undefined;
8899
+ }
8900
+ static isString(data) {
8901
+ return typeof data === "string";
8902
+ }
8903
+ static isNumber(data) {
8904
+ return typeof data === "number" && !Number.isNaN(data);
8905
+ }
8906
+ static isBoolean(data) {
8907
+ return typeof data === "boolean";
8908
+ }
8909
+ static isArray(data) {
8910
+ return Array.isArray(data);
8911
+ }
8912
+ static isObject(data) {
8913
+ return typeof data === "object" && data !== null;
8914
+ }
8915
+ /**
8916
+ * Checks if the value is a valid IBCS aggregation operator.
8917
+ * Only `"+"` and `"-"` are valid; any other value is rejected.
8918
+ */
8919
+ static isOperator(data) {
8920
+ return data === "+" || data === "-";
8921
+ }
8922
+ /**
8923
+ * Checks if the value is a valid Luxon DateTime instance.
8924
+ * Returns false for invalid DateTime objects (e.g. parsed from malformed strings).
8925
+ */
8926
+ static isDate(data) {
8927
+ return data instanceof DateTime && data.isValid;
8928
+ }
8929
+ }
8930
+
8931
+ /** Shared utilities for the adapter layer, used by all component config adapters. */
8932
+ class AdapterUtils {
8933
+ /** Returns the trimmed string value, or an empty string if the input is not a string. */
8934
+ static adaptDefaultString(data) {
8935
+ if (CompareUtil.isString(data)) {
8936
+ return data.trim();
8937
+ }
8938
+ return "";
8939
+ }
8940
+ /**
8941
+ * Safely adapts an array of untyped records through a typed adapter.
8942
+ * If `data` is not an array, returns an empty array instead of throwing.
8943
+ */
8944
+ static adaptArray(data, adapter) {
8945
+ const targetArray = [];
8946
+ if (CompareUtil.isArray(data)) {
8947
+ data.forEach((b) => {
8948
+ targetArray.push(adapter.adapt(b));
8949
+ });
8950
+ }
8951
+ return targetArray;
8952
+ }
8953
+ }
8954
+
8955
+ var OrderDirection;
8956
+ (function (OrderDirection) {
8957
+ OrderDirection["ASC"] = "asc";
8958
+ OrderDirection["DESC"] = "desc";
8959
+ })(OrderDirection || (OrderDirection = {}));
8960
+ /** Valid columns for ORDER BY in AlaSQL queries — includes hierarchy dimensions and all 16 scenario slots. */
8961
+ var OrderColumn;
8962
+ (function (OrderColumn) {
8963
+ OrderColumn["ROWGROUP"] = "rowGroup";
8964
+ OrderColumn["ROWGROUPINDEX"] = "rowGroupIndex";
8965
+ OrderColumn["CATEGORY"] = "category";
8966
+ OrderColumn["CATEGORYINDEX"] = "categoryIndex";
8967
+ OrderColumn["SUBCATEGORY"] = "subCategory";
8968
+ OrderColumn["SUBCATEGORYINDEX"] = "subCategoryIndex";
8969
+ OrderColumn["AC1"] = "ac1";
8970
+ OrderColumn["AC2"] = "ac2";
8971
+ OrderColumn["AC3"] = "ac3";
8972
+ OrderColumn["AC4"] = "ac4";
8973
+ OrderColumn["PP1"] = "pp1";
8974
+ OrderColumn["PP2"] = "pp2";
8975
+ OrderColumn["PP3"] = "pp3";
8976
+ OrderColumn["PP4"] = "pp4";
8977
+ OrderColumn["FC1"] = "fc1";
8978
+ OrderColumn["FC2"] = "fc2";
8979
+ OrderColumn["FC3"] = "fc3";
8980
+ OrderColumn["FC4"] = "fc4";
8981
+ OrderColumn["PL1"] = "pl1";
8982
+ OrderColumn["PL2"] = "pl2";
8983
+ OrderColumn["PL3"] = "pl3";
8984
+ OrderColumn["PL4"] = "pl4";
8985
+ })(OrderColumn || (OrderColumn = {}));
8986
+ class Order {
8987
+ /**
8988
+ * @param hierarchy Columns for multi-level sorting, applied left-to-right (e.g. `["rowGroup", "category"]`).
8989
+ * @param direction Sort direction applied to all hierarchy levels.
8990
+ */
8991
+ constructor(hierarchy = ["category"], direction = OrderDirection.ASC) {
8992
+ this.hierarchy = hierarchy;
8993
+ this.direction = direction;
8994
+ }
8995
+ }
8996
+ class OrderAdapter {
8997
+ constructor(stringAdapter) {
8998
+ this.stringAdapter = stringAdapter;
8999
+ }
9000
+ adapt(data) {
9001
+ var _a;
9002
+ const hierarchy = AdapterUtils.adaptArray(data.hierarchy, this.stringAdapter);
9003
+ const order = OrderDirection[(_a = data.direction) === null || _a === void 0 ? void 0 : _a.toUpperCase()] || OrderDirection.ASC;
9004
+ return new Order(hierarchy.map((str) => OrderColumn[str.toUpperCase()] || OrderColumn.CATEGORY), order);
9005
+ }
9006
+ default() {
9007
+ return new Order(["category"], OrderDirection.ASC);
9008
+ }
9009
+ }
9010
+
9011
+ /**
9012
+ * Prop validators for Stencil @Watch handlers.
9013
+ *
9014
+ * Each validator returns an array of invalid items; an empty array means the input is valid.
9015
+ * These are used in component @Watch methods to warn about malformed attribute values
9016
+ * without crashing the component.
9017
+ */
9018
+ /**
9019
+ * Checks whether a value is blank, null, undefined, or the string `"null"`.
9020
+ * The string `"null"` check handles serialized null values from HTML attributes,
9021
+ * which arrive as the literal string "null" rather than a JS null.
9022
+ */
9023
+ function isBlankInput(value) {
9024
+ return value === null || value === undefined || value === "" || value === "null";
9025
+ }
9026
+ /**
9027
+ * Validates a comma-separated list of scenario identifiers.
9028
+ * The special value `"auto"` is always valid. Base scenarios are validated against
9029
+ * the Scenarios enum; remaining invalid entries are passed to `validateVariancesList`
9030
+ * for variance format checking (e.g. `d_ac1_pl1_pos`).
9031
+ */
9032
+ function validateScenarioList(value) {
9033
+ if (isBlankInput(value)) {
9034
+ return [];
9035
+ }
9036
+ if (value.trim().toLowerCase() === "auto") {
9037
+ return [];
9038
+ }
9039
+ const invalidScenarios = value === null || value === void 0 ? void 0 : value.split(",").filter((element) => !(element.toUpperCase().trim() in Scenarios));
9040
+ return validateVariancesList(invalidScenarios.toString());
9041
+ }
9042
+ /**
9043
+ * Validates variance identifiers in the format `d_<base>_<delta>_<sentiment>` or
9044
+ * `dr_<base>_<delta>_<sentiment>`. Each component is checked against the Scenarios
9045
+ * and Sentiments enums. Returns items that fail validation.
9046
+ */
9047
+ function validateVariancesList(value) {
9048
+ if (isBlankInput(value)) {
9049
+ return [];
9050
+ }
9051
+ const invalidScenarios = value
9052
+ .replace(";", ",")
9053
+ .split(",")
9054
+ .filter((element) => {
9055
+ var _a, _b, _c;
9056
+ const splittedElement = element.split("_");
9057
+ const scenarioSubtrahend = (_a = splittedElement[0]) === null || _a === void 0 ? void 0 : _a.replace(/^dr|^d/, "").toUpperCase().trim();
9058
+ const scenarioMinuend = (_b = splittedElement[1]) === null || _b === void 0 ? void 0 : _b.toUpperCase().trim();
9059
+ const scenarioSentiment = (_c = splittedElement[2]) === null || _c === void 0 ? void 0 : _c.toUpperCase().trim();
9060
+ return (splittedElement.length !== 3 ||
9061
+ !(scenarioSubtrahend in Scenarios) ||
9062
+ !(scenarioMinuend in Scenarios) ||
9063
+ !(scenarioSentiment in Sentiments));
9064
+ });
9065
+ return invalidScenarios;
9066
+ }
9067
+ function validateOrderList(value) {
9068
+ if (isBlankInput(value)) {
9069
+ return [];
9070
+ }
9071
+ if (value.trim().toLowerCase() === "auto") {
9072
+ return [];
9073
+ }
9074
+ const invalidScenarios = value.split(",").filter((element) => !(element.toUpperCase() in OrderColumn));
9075
+ return validateVariancesList(invalidScenarios.toString());
9076
+ }
9077
+ function isValidInteger(value) {
9078
+ if (isBlankInput(value)) {
9079
+ return false;
9080
+ }
9081
+ return Number.isInteger(Number(value));
9082
+ }
9083
+ function isValidNumber(value) {
9084
+ if (isBlankInput(value)) {
9085
+ return false;
9086
+ }
9087
+ return !Number.isNaN(Number(value));
9088
+ }
9089
+ function isValidDirection(value) {
9090
+ if (isBlankInput(value)) {
9091
+ return false;
9092
+ }
9093
+ return (value === null || value === void 0 ? void 0 : value.toUpperCase()) in OrderDirection;
9094
+ }
9095
+ function isValidLevel(value) {
9096
+ if ((value === null || value === void 0 ? void 0 : value.toLowerCase()) === "auto") {
9097
+ return true;
9098
+ }
9099
+ return (value === null || value === void 0 ? void 0 : value.toUpperCase()) in AggregationLevel;
9100
+ }
9101
+ function validateMeasureList(value) {
9102
+ if (isBlankInput(value)) {
9103
+ return [];
9104
+ }
9105
+ try {
9106
+ const newObj = JSON.parse(value);
9107
+ if (newObj instanceof Array) {
9108
+ return newObj.filter((elem) => !(elem.hasOwnProperty("name") && elem.hasOwnProperty("unit")));
9109
+ }
9110
+ }
9111
+ catch (e) {
9112
+ console.error("validateMeasureList: failed to parse JSON", e);
9113
+ }
9114
+ return ["Invalid JSON structure"];
9115
+ }
9116
+ function isValidDate(value) {
9117
+ const newDate = Date.parse(value);
9118
+ return Number.isInteger(newDate);
9119
+ }
9120
+ function isValidDateLink(value) {
9121
+ return (value === null || value === void 0 ? void 0 : value.toUpperCase()) in DateLink;
9122
+ }
9123
+ function isValidDateFormat(value) {
9124
+ return (value === null || value === void 0 ? void 0 : value.toUpperCase()) in DateDistance;
9125
+ }
9126
+ function isValidAxisLabelsMode(value) {
9127
+ return (value === null || value === void 0 ? void 0 : value.toUpperCase()) in AxisLabelsMode;
9128
+ }
9129
+ function isValidDataFormat(value) {
9130
+ if (isBlankInput(value)) {
9131
+ return false;
9132
+ }
9133
+ return (value === null || value === void 0 ? void 0 : value.toUpperCase()) in DataFormat;
9134
+ }
9135
+ function isValidBoolean(value) {
9136
+ if (isBlankInput(value)) {
9137
+ return false;
9138
+ }
9139
+ const validValues = ["true", "false", true, false];
9140
+ return validValues.some((elem) => elem === value);
9141
+ }
9142
+ function isValidTableType(value) {
9143
+ if (isBlankInput(value)) {
9144
+ return false;
9145
+ }
9146
+ return (value === null || value === void 0 ? void 0 : value.toUpperCase()) in TableType;
9147
+ }
9148
+ function validateThereOfJsonStr(value) {
9149
+ if (isBlankInput(value)) {
9150
+ return [];
9151
+ }
9152
+ try {
9153
+ const jsonObject = JSON.parse(value);
9154
+ if (jsonObject instanceof Array) {
9155
+ // return newObj.filter(elem => elem.hasOwnProperty('rowgroup') && elem.hasOwnProperty('category') && elem.hasOwnProperty('subcategory'))
9156
+ return jsonObject.filter((elem) => !(elem.hasOwnProperty("rowGroup") && elem.hasOwnProperty("category") && elem.hasOwnProperty("subCategory")));
9157
+ }
9158
+ }
9159
+ catch (err) {
9160
+ console.error("validateThereOfJsonStr: failed to parse JSON", err);
9161
+ }
9162
+ return ["Invalid JSON structure"];
9163
+ }
9164
+ function validatePartOfJsonStr(value) {
9165
+ if (isBlankInput(value)) {
9166
+ return [];
9167
+ }
9168
+ try {
9169
+ const jsonObject = JSON.parse(value);
9170
+ if (jsonObject instanceof Array) {
9171
+ // return newObj.filter(elem => elem.hasOwnProperty('rowgroup') && elem.hasOwnProperty('category') && elem.hasOwnProperty('subcategory'))
9172
+ return jsonObject.filter((elem) => !(elem.hasOwnProperty("rowGroup") && elem.hasOwnProperty("category")));
9173
+ }
9174
+ }
9175
+ catch (e) {
9176
+ console.error("validatePartOfJsonStr: failed to parse JSON", e);
9177
+ }
9178
+ return ["Invalid JSON structure"];
9179
+ }
9180
+ function isValidMeasureType(value) {
9181
+ return (value === null || value === void 0 ? void 0 : value.trim().toUpperCase()) in MeasureType;
9182
+ }
9183
+ /**
9184
+ * Validates a measure-scale attribute value.
9185
+ * Accepted values: `"_"` (no scaling), SI prefix letters (k, M, G, T, P, E, Z, Y, m, etc.),
9186
+ * or auto-detection modes `"GREATEST"` / `"LEAST"`.
9187
+ */
9188
+ function isValidMeasureScale(value) {
9189
+ return (["_", "k", "M", "G", "T", "P", "E", "Z", "Y", "m", "μ", "n", "p", "P", "f", "a", "z", "y"].includes(value === null || value === void 0 ? void 0 : value.trim()) || ["GREATEST", "LEAST"].includes(value === null || value === void 0 ? void 0 : value.trim().toUpperCase()));
9190
+ }
9191
+ function isTableCategoryWidth(value) {
9192
+ return (value === null || value === void 0 ? void 0 : value.toUpperCase().trim()) in TableCategoryWidth;
9193
+ }
9194
+ function isTableBarColumnWidth(value) {
9195
+ return (value === null || value === void 0 ? void 0 : value.toUpperCase().trim()) in TableBarColumnWidth;
9196
+ }
9197
+ function validateColumnThereOfJsonStr(value) {
9198
+ if (isBlankInput(value)) {
9199
+ return [];
9200
+ }
9201
+ try {
9202
+ const jsonObject = JSON.parse(value);
9203
+ return jsonObject.filter((elem) => !(elem.hasOwnProperty("scenario") && elem.hasOwnProperty("name") && elem.hasOwnProperty("subGroups")));
9204
+ }
9205
+ catch (e) {
9206
+ console.error("validateColumnThereOfJsonStr: failed to parse JSON", e);
9207
+ }
9208
+ return ["Invalid JSON structure"];
9209
+ }
9210
+ function validateStackConfig(value) {
9211
+ if (isBlankInput(value)) {
9212
+ return [];
9213
+ }
9214
+ try {
9215
+ const config = JSON.parse(value);
9216
+ if (typeof config !== "object" || config === null || Array.isArray(config)) {
9217
+ return ["stack: must be a JSON object"];
9218
+ }
9219
+ const errors = [];
9220
+ if (!config.hasOwnProperty("by")) {
9221
+ errors.push("stack: 'by' is required");
9222
+ }
9223
+ else {
9224
+ const validBy = ["scenarios", "dimensions"];
9225
+ if (!validBy.includes(config.by)) {
9226
+ errors.push(`stack: 'by' must be one of: ${validBy.join(", ")}`);
9227
+ }
9228
+ }
9229
+ if (config.hasOwnProperty("mode")) {
9230
+ const validModes = ["absolute", "relative", "absolute-relative"];
9231
+ if (!validModes.includes(config.mode)) {
9232
+ errors.push(`stack: 'mode' must be one of: ${validModes.join(", ")}`);
9233
+ }
9234
+ }
9235
+ if (config.hasOwnProperty("order")) {
9236
+ const validOrders = ["asc", "desc", "dataset"];
9237
+ if (!validOrders.includes(config.order)) {
9238
+ errors.push(`stack: 'order' must be one of: ${validOrders.join(", ")}`);
9239
+ }
9240
+ }
9241
+ return errors;
9242
+ }
9243
+ catch (_e) {
9244
+ return ["stack: invalid JSON"];
9245
+ }
9246
+ }
9247
+
9248
+ class StyleSheet {
9249
+ constructor() {
9250
+ this.cache = new Map();
9251
+ this.tag = StyleSheet.makeStyleTag();
9252
+ }
9253
+ static makeStyleTag() {
9254
+ const tag = document.createElement("style");
9255
+ tag.type = "text/css";
9256
+ tag.setAttribute("data-bn-computed-style", "");
9257
+ tag.append(document.createTextNode(""));
9258
+ (document.head || document.querySelector("head")).append(tag);
9259
+ return tag;
9260
+ }
9261
+ apply(data) {
9262
+ data.forEach((value) => this.cache.set(value.className, value.style));
9263
+ this.tag.innerHTML = Array.from(this.cache.values())
9264
+ .map((value) => value)
9265
+ .join("\n");
9266
+ }
9267
+ }
9268
+ const styleSheet = new StyleSheet();
9269
+
9270
+ /* eslint-disable */
9271
+ // Inspired by https://github.com/garycourt/murmurhash-js
9272
+ // Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86
9273
+ function murmur2(str) {
9274
+ // 'm' and 'r' are mixing constants generated offline.
9275
+ // They're not really 'magic', they just happen to work well.
9276
+ // const m = 0x5bd1e995;
9277
+ // const r = 24;
9278
+ // Initialize the hash
9279
+ var h = 0; // Mix 4 bytes at a time into the hash
9280
+
9281
+ var k,
9282
+ i = 0,
9283
+ len = str.length;
9284
+
9285
+ for (; len >= 4; ++i, len -= 4) {
9286
+ k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;
9287
+ k =
9288
+ /* Math.imul(k, m): */
9289
+ (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16);
9290
+ k ^=
9291
+ /* k >>> r: */
9292
+ k >>> 24;
9293
+ h =
9294
+ /* Math.imul(k, m): */
9295
+ (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^
9296
+ /* Math.imul(h, m): */
9297
+ (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
9298
+ } // Handle the last few bytes of the input array
9299
+
9300
+
9301
+ switch (len) {
9302
+ case 3:
9303
+ h ^= (str.charCodeAt(i + 2) & 0xff) << 16;
9304
+
9305
+ case 2:
9306
+ h ^= (str.charCodeAt(i + 1) & 0xff) << 8;
9307
+
9308
+ case 1:
9309
+ h ^= str.charCodeAt(i) & 0xff;
9310
+ h =
9311
+ /* Math.imul(h, m): */
9312
+ (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
9313
+ } // Do a few final mixes of the hash to ensure the last few
9314
+ // bytes are well-incorporated.
9315
+
9316
+
9317
+ h ^= h >>> 13;
9318
+ h =
9319
+ /* Math.imul(h, m): */
9320
+ (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
9321
+ return ((h ^ h >>> 15) >>> 0).toString(36);
9322
+ }
9323
+
9324
+ const transofrmToUnitString = (value) => {
9325
+ if (isValidNumber(value)) {
9326
+ return `${value}px`;
9327
+ }
9328
+ else {
9329
+ return value;
9330
+ }
9331
+ };
9332
+ const width = {
9333
+ className: "w",
9334
+ cssName: "width",
9335
+ attrName: "width",
9336
+ transform: transofrmToUnitString,
9337
+ };
9338
+ const height = {
9339
+ className: "h",
9340
+ cssName: "height",
9341
+ attrName: "height",
9342
+ transform: transofrmToUnitString,
9343
+ };
9344
+ const position = {
9345
+ className: "pst",
9346
+ cssName: "position",
9347
+ attrName: "position",
9348
+ };
9349
+ const top = {
9350
+ className: "top",
9351
+ cssName: "top",
9352
+ attrName: "top",
9353
+ transform: transofrmToUnitString,
9354
+ };
9355
+ const right = {
9356
+ className: "rgt",
9357
+ cssName: "right",
9358
+ attrName: "right",
9359
+ transform: transofrmToUnitString,
9360
+ };
9361
+ const bottom = {
9362
+ className: "btm",
9363
+ cssName: "bottom",
9364
+ attrName: "bottom",
9365
+ transform: transofrmToUnitString,
9366
+ };
9367
+ const left = {
9368
+ className: "lft",
9369
+ cssName: "left",
9370
+ attrName: "left",
9371
+ transform: transofrmToUnitString,
9372
+ };
9373
+ const fontSize = {
9374
+ className: "fts",
9375
+ cssName: "font-size",
9376
+ attrName: "font-size",
9377
+ transform: transofrmToUnitString,
9378
+ };
9379
+ const gridColumn = {
9380
+ className: "gdc",
9381
+ cssName: "grid-column",
9382
+ attrName: "grid-column",
9383
+ };
9384
+ const gridRow = {
9385
+ className: "gdr",
9386
+ cssName: "grid-row",
9387
+ attrName: "grid-row",
9388
+ };
9389
+ const attributes = {
9390
+ width: width,
9391
+ height: height,
9392
+ position: position,
9393
+ top: top,
9394
+ right: right,
9395
+ bottom: bottom,
9396
+ left: left,
9397
+ "font-size": fontSize,
9398
+ "grid-column": gridColumn,
9399
+ "grid-row": gridRow,
9400
+ };
9401
+ const attributesNames = Object.keys(attributes);
9402
+ function getClassName(attr, value) {
9403
+ const valueKey = murmur2(value);
9404
+ return `bn-c-${attr.className}_${valueKey}`;
9405
+ }
9406
+ function getStyle(attr, className, value) {
9407
+ return `.${className} {${attr.cssName}: ${value};}`;
9408
+ }
9409
+ function getCSS(attr, value) {
9410
+ const className = getClassName(attr, value);
9411
+ const style = getStyle(attr, className, value);
9412
+ return { className, style };
9413
+ }
9414
+ const apply = (el) => {
9415
+ const map = new Map();
9416
+ //map.set("position", getCSS(attributes["position"], "absolute"))
9417
+ attributesNames.forEach((name) => {
9418
+ const value = el.getAttribute(name);
9419
+ if (value) {
9420
+ if (["top", "left", "right", "bottom"].includes(name)) {
9421
+ map.set("position", getCSS(attributes["position"], "absolute"));
9422
+ }
9423
+ const transform = attributes[name].transform ||
9424
+ function (v) {
9425
+ return v;
9426
+ };
9427
+ map.set(name, getCSS(attributes[name], transform(value)));
9428
+ }
9429
+ });
9430
+ return map;
9431
+ };
9432
+
9433
+ /**
9434
+ * Shared MutationObserver that watches for style-attribute changes on all
9435
+ * subscribed elements. When a monitored attribute changes, it re-applies the
9436
+ * Styletron CSS-in-JS stylesheet and updates the element's className,
9437
+ * preserving any non-`bn-c-` classes.
9438
+ */
9439
+ const observer = new MutationObserver((mutations) => {
9440
+ for (const mutation of mutations) {
9441
+ const el = mutation.target;
9442
+ const map = apply(el);
9443
+ styleSheet.apply(map);
9444
+ const classes = Array.from(map.values()).map((value) => value.className);
9445
+ el.className = el.className
9446
+ .split(" ")
9447
+ .filter((value) => !value.startsWith("bn-c-"))
9448
+ .concat(...classes)
9449
+ .join(" ");
9450
+ forceUpdate(el);
9451
+ }
9452
+ });
9453
+ /**
9454
+ * Registers an element with the Styletron observer: applies the initial
9455
+ * stylesheet, assigns generated `bn-c-*` class names, and begins watching
9456
+ * for attribute mutations that affect styling.
9457
+ */
9458
+ const subscribe = (el) => {
9459
+ const map = apply(el);
9460
+ styleSheet.apply(map);
9461
+ const classes = Array.from(map.values()).map((value) => value.className);
9462
+ el.className = el.className
9463
+ .split(" ")
9464
+ .filter((value) => !value.startsWith("bn-c-"))
9465
+ .concat(...classes)
9466
+ .join(" ");
9467
+ observer.observe(el, { attributes: true, attributeFilter: attributesNames, childList: false, subtree: false });
9468
+ };
9469
+ /**
9470
+ * Mixin that integrates Styletron CSS-in-JS styling into a Stencil component.
9471
+ *
9472
+ * On `connectedCallback`, it subscribes the host element to a shared
9473
+ * MutationObserver that watches for style-related attribute changes. When
9474
+ * attributes change, the Styletron stylesheet is re-applied and the element's
9475
+ * class list is updated with generated `bn-c-*` class names, followed by a
9476
+ * forced re-render.
9477
+ *
9478
+ * @param component - The Stencil component instance
9479
+ */
9480
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
9481
+ const withStyled = (component) => {
9482
+ const cstrConnectedCallback = component["connectedCallback"];
9483
+ const cstrDisconnectedCallback = component["disconnectedCallback"];
9484
+ component["connectedCallback"] = () => {
9485
+ const elm = getElement(component);
9486
+ if (elm) {
9487
+ subscribe(elm);
9488
+ }
9489
+ else {
9490
+ throw new Error(`Can't find element field in component ${undefined}`);
9491
+ }
9492
+ runIfExisits(cstrConnectedCallback, component);
9493
+ };
9494
+ component["disconnectedCallback"] = () => {
9495
+ // MutationObserver has no per-element unobserve — the shared observer
9496
+ // automatically stops firing for elements removed from the DOM.
9497
+ runIfExisits(cstrDisconnectedCallback, component);
9498
+ };
9499
+ };
9500
+
9501
+ export { AggregationLevel as A, isTableCategoryWidth as B, ChartMode as C, DateDistance as D, validateColumnThereOfJsonStr as E, DataFormat as F, BAR_COLUMN_WIDTH_EM as G, TableBarColumnWidth as H, I18nMode as I, validateMeasureList as J, isValidDate as K, isValidDateLink as L, MeasureType as M, DateLink as N, OrderDirection as O, DateTime as P, AdapterUtils as Q, CompareUtil as R, StackBy as S, TableCategoryWidth as T, OrderAdapter as U, DateStringFactory as V, withComponentStyle as a, isValidNumber as b, validateVariancesList as c, isValidLevel as d, validateOrderList as e, isValidDirection as f, isValidInteger as g, isValidMeasureScale as h, isValidBoolean as i, validateStackConfig as j, isBlankInput as k, OrderColumn as l, StackOrder as m, StackMode as n, isValidDateFormat as o, isValidAxisLabelsMode as p, AxisLabelsMode as q, murmur2 as r, isTableBarColumnWidth as s, isValidDataFormat as t, isValidTableType as u, validateScenarioList as v, withStyled as w, validateThereOfJsonStr as x, validatePartOfJsonStr as y, isValidMeasureType as z };