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