@bino-bi/bn-template-engine 1.0.0-alpha.9 → 1.0.0-next.20

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 (400) 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-28d5c266.entry.js +1 -0
  4. package/dist/bn-template-engine/p-2d3ea756.entry.js +1 -0
  5. package/dist/bn-template-engine/p-2fba7c99.entry.js +1 -0
  6. package/dist/bn-template-engine/p-6077155f.entry.js +1 -0
  7. package/dist/bn-template-engine/p-687032d5.entry.js +1 -0
  8. package/dist/bn-template-engine/p-6c7f0076.entry.js +1 -0
  9. package/dist/bn-template-engine/p-6lOdN-fB.js +1 -0
  10. package/dist/bn-template-engine/p-7e9dbc93.entry.js +1 -0
  11. package/dist/bn-template-engine/p-99477a27.entry.js +1 -0
  12. package/dist/bn-template-engine/p-A8xyE4b1.js +1 -0
  13. package/dist/bn-template-engine/p-BA48JiHe.js +1 -0
  14. package/dist/bn-template-engine/p-BgIpdpfH.js +1 -0
  15. package/dist/bn-template-engine/p-BjBz5cSL.js +1 -0
  16. package/dist/bn-template-engine/p-BpWWgN6k.js +1 -0
  17. package/dist/bn-template-engine/p-C5uvAEKI.js +1 -0
  18. package/dist/bn-template-engine/p-C8Q0lsaU.js +1 -0
  19. package/dist/bn-template-engine/p-C9i1Xsib.js +1 -0
  20. package/dist/bn-template-engine/p-CJThzFZm.js +1 -0
  21. package/dist/bn-template-engine/p-CYE0I1Mx.js +1 -0
  22. package/dist/bn-template-engine/p-DsTzlzxQ.js +1 -0
  23. package/dist/bn-template-engine/p-DwYUTvvI.js +1 -0
  24. package/dist/bn-template-engine/p-a1380d7c.entry.js +1 -0
  25. package/dist/bn-template-engine/p-a4ea9a79.entry.js +1 -0
  26. package/dist/bn-template-engine/p-a8291de2.entry.js +1 -0
  27. package/dist/bn-template-engine/p-b5274369.entry.js +1 -0
  28. package/dist/bn-template-engine/p-b9e94127.entry.js +1 -0
  29. package/dist/bn-template-engine/p-ba912130.entry.js +1 -0
  30. package/dist/bn-template-engine/p-de29986f.entry.js +1 -0
  31. package/dist/bn-template-engine/p-eEfqksk-.js +1 -0
  32. package/dist/bn-template-engine/p-fFtEvsY-.js +1 -0
  33. package/dist/cjs/AxisConfig-D7CAyPLO.js +233 -0
  34. package/dist/cjs/LabelCollisionManager-DkdQ9Xdg.js +412 -0
  35. package/dist/cjs/NumericScale-BAyYXpKL.js +107 -0
  36. package/dist/cjs/Order-IPfAP0q8.js +87 -0
  37. package/dist/cjs/SVGStyle-BD8jApd4.js +8209 -0
  38. package/dist/cjs/SVGVariancesStyleGroup-BaWzR951.js +50 -0
  39. package/dist/cjs/VarianceMeasure-BBWTgv2e.js +372 -0
  40. package/dist/cjs/XYChartDataRow-BoR0CTfl.js +829 -0
  41. package/dist/cjs/bn-asset_21.cjs.entry.js +16105 -0
  42. package/dist/cjs/bn-chart-bubble.cjs.entry.js +762 -0
  43. package/dist/cjs/bn-chart-bullet.cjs.entry.js +785 -0
  44. package/dist/cjs/bn-chart-scatter.cjs.entry.js +658 -0
  45. package/dist/cjs/bn-grid.cjs.entry.js +5 -3
  46. package/dist/cjs/bn-image.cjs.entry.js +5 -3
  47. package/dist/cjs/bn-internationalization.cjs.entry.js +10 -8
  48. package/dist/cjs/bn-ruleset.cjs.entry.js +41 -0
  49. package/dist/cjs/bn-template-engine.cjs.js +1 -1
  50. package/dist/cjs/bn-template.cjs.entry.js +1 -1
  51. package/dist/cjs/bn-text.cjs.entry.js +8 -79
  52. package/dist/cjs/bn-tree.cjs.entry.js +4 -2
  53. package/dist/cjs/context-protocol-BBhT9B52.js +9505 -0
  54. package/dist/cjs/editor-companion.cjs.entry.js +13 -6
  55. package/dist/cjs/ibcs-chart-bubble.cjs.entry.js +624 -0
  56. package/dist/cjs/ibcs-chart-bullet.cjs.entry.js +673 -0
  57. package/dist/cjs/ibcs-chart-scatter.cjs.entry.js +667 -0
  58. package/dist/cjs/layoutObserver-DUYYkDMQ.js +199 -0
  59. package/dist/cjs/loader.cjs.js +1 -1
  60. package/dist/cjs/sanitizeHtml-LuZr1IMd.js +85 -0
  61. package/dist/cjs/scaling-BIJQ2NV1.js +589 -0
  62. package/dist/cjs/{withBodyObserver-D7BKWN2N.js → withBodyObserver-BKUE_ypL.js} +12 -7
  63. package/dist/cjs/withScalingGroup-D5clRvRe.js +73 -0
  64. package/dist/cjs/withStyled-Cm9dWQhu.js +1168 -0
  65. package/dist/collection/collection-manifest.json +9 -1
  66. package/dist/collection/components/bn-body/bn-body.css +1 -0
  67. package/dist/collection/components/bn-card/bn-card.css +2 -0
  68. package/dist/collection/components/bn-chart-bubble/bn-chart-bubble.css +10 -0
  69. package/dist/collection/components/bn-chart-bubble/bn-chart-bubble.js +1110 -0
  70. package/dist/collection/components/bn-chart-bubble/ibcs-chart-bubble.css +9 -0
  71. package/dist/collection/components/bn-chart-bubble/ibcs-chart-bubble.js +653 -0
  72. package/dist/collection/components/bn-chart-bubble/utils/BubbleChart.js +472 -0
  73. package/dist/collection/components/bn-chart-bullet/bn-chart-bullet.css +10 -0
  74. package/dist/collection/components/bn-chart-bullet/bn-chart-bullet.js +1014 -0
  75. package/dist/collection/components/bn-chart-bullet/ibcs-chart-bullet.css +9 -0
  76. package/dist/collection/components/bn-chart-bullet/ibcs-chart-bullet.js +538 -0
  77. package/dist/collection/components/bn-chart-bullet/utils/BulletChart.js +440 -0
  78. package/dist/collection/components/bn-chart-bullet/utils/model/BulletChartStyle.js +132 -0
  79. package/dist/collection/components/bn-chart-bullet/utils/model/BulletConfig.js +89 -0
  80. package/dist/collection/components/bn-chart-bullet/utils/model/index.js +2 -0
  81. package/dist/collection/components/bn-chart-scatter/bn-chart-scatter.css +10 -0
  82. package/dist/collection/components/bn-chart-scatter/bn-chart-scatter.js +965 -0
  83. package/dist/collection/components/bn-chart-scatter/ibcs-chart-scatter.css +9 -0
  84. package/dist/collection/components/bn-chart-scatter/ibcs-chart-scatter.js +580 -0
  85. package/dist/collection/components/bn-chart-scatter/utils/ScatterChart.js +409 -0
  86. package/dist/collection/components/bn-chart-structure/bn-chart-structure.js +126 -43
  87. package/dist/collection/components/bn-chart-structure/ibcs-chart-structure.js +104 -37
  88. package/dist/collection/components/bn-chart-structure/utils/StructureChart.js +101 -60
  89. package/dist/collection/components/bn-chart-structure/utils/helper/ElementPositions.js +46 -4
  90. package/dist/collection/components/bn-chart-structure/utils/model/StructureChartComponentConfig.js +5 -4
  91. package/dist/collection/components/bn-chart-time/bn-chart-time.css +1 -1
  92. package/dist/collection/components/bn-chart-time/bn-chart-time.js +161 -44
  93. package/dist/collection/components/bn-chart-time/ibcs-chart-time.js +97 -32
  94. package/dist/collection/components/bn-chart-time/utils/TimeChart.js +151 -75
  95. package/dist/collection/components/bn-chart-time/utils/elements/StackedColumn.js +3 -3
  96. package/dist/collection/components/bn-chart-time/utils/model/TimeChartComponentConfig.js +10 -4
  97. package/dist/collection/components/bn-chart-time/utils/model/TimeChartDataRow.js +2 -0
  98. package/dist/collection/components/bn-component-style/bn-component-style.js +1 -1
  99. package/dist/collection/components/bn-context/bn-context.js +20 -1
  100. package/dist/collection/components/bn-dataset/bn-dataset.js +226 -23
  101. package/dist/collection/components/bn-datasource/bn-datasource.js +163 -12
  102. package/dist/collection/components/bn-footer/bn-footer.js +1 -1
  103. package/dist/collection/components/bn-grid/bn-grid.js +20 -1
  104. package/dist/collection/components/bn-image/bn-image.js +1 -1
  105. package/dist/collection/components/bn-internationalization/bn-internationalization.js +10 -7
  106. package/dist/collection/components/bn-layout-card/bn-layout-card.css +8 -3
  107. package/dist/collection/components/bn-layout-card/bn-layout-card.js +98 -35
  108. package/dist/collection/components/bn-layout-page/bn-layout-page.css +5 -3
  109. package/dist/collection/components/bn-layout-page/bn-layout-page.js +98 -25
  110. package/dist/collection/components/bn-message/bn-message.css +6 -2
  111. package/dist/collection/components/bn-message/bn-message.js +3 -2
  112. package/dist/collection/components/bn-page/bn-page.js +1 -1
  113. package/dist/collection/components/bn-ruleset/bn-ruleset.css +3 -0
  114. package/dist/collection/components/bn-ruleset/bn-ruleset.js +68 -0
  115. package/dist/collection/components/bn-scaling-group/bn-scaling-group.css +3 -0
  116. package/dist/collection/components/bn-scaling-group/bn-scaling-group.js +136 -0
  117. package/dist/collection/components/bn-table/bn-table.js +318 -62
  118. package/dist/collection/components/bn-table/ibcs-table.css +8 -0
  119. package/dist/collection/components/bn-table/ibcs-table.js +162 -33
  120. package/dist/collection/components/bn-table/utils/Table.js +72 -29
  121. package/dist/collection/components/bn-table/utils/elements/CellBarChart.js +13 -8
  122. package/dist/collection/components/bn-table/utils/elements/TableRow.js +3 -2
  123. package/dist/collection/components/bn-table/utils/elements/WaterfallBar.js +47 -0
  124. package/dist/collection/components/bn-table/utils/elements/index.js +1 -0
  125. package/dist/collection/components/bn-table/utils/factories/tableDataSetFactory.js +120 -23
  126. package/dist/collection/components/bn-table/utils/helper/DataQuery.js +380 -50
  127. package/dist/collection/components/bn-table/utils/helper/IntervalColumns.js +140 -0
  128. package/dist/collection/components/bn-table/utils/helper/QueryGroup.js +4 -9
  129. package/dist/collection/components/bn-table/utils/helper/WaterfallCalculator.js +166 -0
  130. package/dist/collection/components/bn-table/utils/helper/index.js +2 -0
  131. package/dist/collection/components/bn-table/utils/model/TableAttribute.js +46 -0
  132. package/dist/collection/components/bn-table/utils/model/TableComponentConfig.js +20 -4
  133. package/dist/collection/components/bn-template/bn-template.js +1 -1
  134. package/dist/collection/components/bn-text/bn-text.js +2 -75
  135. package/dist/collection/components/bn-title/bn-title.js +31 -3
  136. package/dist/collection/components/bn-title/ibcs-title/ibcs-title.css +4 -0
  137. package/dist/collection/components/bn-title/ibcs-title/ibcs-title.js +52 -6
  138. package/dist/collection/components/bn-title/ibcs-title/utils/Title.js +7 -4
  139. package/dist/collection/components/bn-title/ibcs-title/utils/factories/TitleDataSetFactory.js +6 -2
  140. package/dist/collection/components/bn-title/ibcs-title/utils/model/TitleConfig.js +5 -0
  141. package/dist/collection/components/bn-tree/bn-tree.js +19 -0
  142. package/dist/collection/components/editor-companion/editor-companion.js +12 -5
  143. package/dist/collection/context/scopedDb.js +127 -0
  144. package/dist/collection/stores/componentStyles.js +67 -0
  145. package/dist/collection/stores/createScopedStores.js +11 -5
  146. package/dist/collection/stores/internationalization.js +77 -3
  147. package/dist/collection/stores/ruleSets.js +46 -0
  148. package/dist/collection/utils/DateStringFactory.js +31 -0
  149. package/dist/collection/utils/constants.js +5 -0
  150. package/dist/collection/utils/dataAnalyzer.js +14 -8
  151. package/dist/collection/utils/ibcsRuleSet.js +14 -26
  152. package/dist/collection/utils/layoutObserver.js +88 -0
  153. package/dist/collection/utils/parentDimensions.js +71 -15
  154. package/dist/collection/utils/sanitizeHtml.js +81 -0
  155. package/dist/collection/utils/validate.js +47 -0
  156. package/dist/collection/utils/withBodyObserver.js +12 -7
  157. package/dist/collection/utils/withComponentStyle.js +3 -5
  158. package/dist/collection/utils/withDataset.js +43 -39
  159. package/dist/collection/utils/withDatasource.js +28 -18
  160. package/dist/collection/utils/withInheritedProps.js +26 -1
  161. package/dist/collection/utils/withRuleSet.js +105 -0
  162. package/dist/collection/utils/withScalingGroup.js +69 -0
  163. package/dist/collection/utils/withTranslation.js +53 -15
  164. package/dist/collection/utils/xy/FacetGrid.js +36 -0
  165. package/dist/collection/utils/xy/IsoCurves.js +156 -0
  166. package/dist/collection/utils/xy/NumericScale.js +103 -0
  167. package/dist/collection/utils/xy/PointLabeler.js +96 -0
  168. package/dist/collection/utils/xy/RadiusScale.js +42 -0
  169. package/dist/collection/utils/xy/SeriesPalette.js +80 -0
  170. package/dist/collection/utils/xy/VarianceMeasure.js +76 -0
  171. package/dist/collection/utils/xy/XYFrame.js +120 -0
  172. package/dist/collection/utils/xy/XYLegend.js +107 -0
  173. package/dist/collection/utils/xy/model/AxisConfig.js +221 -0
  174. package/dist/collection/utils/xy/model/ScaleFactorsXYChart.js +69 -0
  175. package/dist/collection/utils/xy/model/XYChartDataRow.js +0 -0
  176. package/dist/collection/utils/xy/model/XYChartStyle.js +52 -0
  177. package/dist/components/AxisConfig.js +1 -0
  178. package/dist/components/CompareUtil.js +1 -0
  179. package/dist/components/DataFormatDigits.js +1 -1
  180. package/dist/components/DateStringFactory.js +1 -1
  181. package/dist/components/LabelCollisionManager.js +1 -0
  182. package/dist/components/NumericScale.js +1 -0
  183. package/dist/components/Order.js +1 -1
  184. package/dist/components/SVGVariancesStyleGroup.js +1 -1
  185. package/dist/components/SiPrefix.js +1 -0
  186. package/dist/components/StringAdapter.js +1 -0
  187. package/dist/components/VarianceMeasure.js +1 -0
  188. package/dist/components/XYChartDataRow.js +1 -0
  189. package/dist/components/bn-body2.js +1 -1
  190. package/dist/components/bn-card2.js +1 -1
  191. package/dist/components/bn-chart-bubble.d.ts +11 -0
  192. package/dist/components/bn-chart-bubble.js +1 -0
  193. package/dist/components/bn-chart-bullet.d.ts +11 -0
  194. package/dist/components/bn-chart-bullet.js +1 -0
  195. package/dist/components/bn-chart-scatter.d.ts +11 -0
  196. package/dist/components/bn-chart-scatter.js +1 -0
  197. package/dist/components/bn-chart-structure.js +1 -1
  198. package/dist/components/bn-chart-time.js +1 -1
  199. package/dist/components/bn-component-style.js +1 -1
  200. package/dist/components/bn-context.js +1 -1
  201. package/dist/components/bn-dataset.js +1 -1
  202. package/dist/components/bn-datasource.js +1 -1
  203. package/dist/components/bn-footer2.js +1 -1
  204. package/dist/components/bn-grid.js +1 -1
  205. package/dist/components/bn-image.js +1 -1
  206. package/dist/components/bn-internationalization.js +1 -1
  207. package/dist/components/bn-layout-card.js +1 -1
  208. package/dist/components/bn-layout-page.js +1 -1
  209. package/dist/components/bn-message2.js +1 -1
  210. package/dist/components/bn-page2.js +1 -1
  211. package/dist/components/bn-ruleset.d.ts +11 -0
  212. package/dist/components/bn-ruleset.js +1 -0
  213. package/dist/components/bn-scaling-group.d.ts +11 -0
  214. package/dist/components/bn-scaling-group.js +1 -0
  215. package/dist/components/bn-table.js +1 -1
  216. package/dist/components/bn-template.js +1 -1
  217. package/dist/components/bn-text.js +1 -1
  218. package/dist/components/bn-title2.js +1 -1
  219. package/dist/components/bn-tree.js +1 -1
  220. package/dist/components/context-protocol.js +1 -1
  221. package/dist/components/editor-companion.js +1 -1
  222. package/dist/components/formatter.js +1 -0
  223. package/dist/components/ibcs-chart-bubble.d.ts +11 -0
  224. package/dist/components/ibcs-chart-bubble.js +1 -0
  225. package/dist/components/ibcs-chart-bubble2.js +1 -0
  226. package/dist/components/ibcs-chart-bullet.d.ts +11 -0
  227. package/dist/components/ibcs-chart-bullet.js +1 -0
  228. package/dist/components/ibcs-chart-bullet2.js +1 -0
  229. package/dist/components/ibcs-chart-scatter.d.ts +11 -0
  230. package/dist/components/ibcs-chart-scatter.js +1 -0
  231. package/dist/components/ibcs-chart-scatter2.js +1 -0
  232. package/dist/components/ibcs-chart-structure2.js +1 -1
  233. package/dist/components/ibcs-chart-time2.js +1 -1
  234. package/dist/components/ibcs-table2.js +1 -1
  235. package/dist/components/ibcs-title2.js +1 -1
  236. package/dist/components/layoutObserver.js +1 -0
  237. package/dist/components/luxon.js +1 -0
  238. package/dist/components/main.js +1 -0
  239. package/dist/components/merge.js +1 -0
  240. package/dist/components/sanitizeHtml.js +1 -0
  241. package/dist/components/stackColors.js +1 -0
  242. package/dist/components/validate.js +1 -1
  243. package/dist/components/withBodyObserver.js +1 -1
  244. package/dist/components/withComponentStyle.js +1 -1
  245. package/dist/components/withDataset.js +1 -0
  246. package/dist/components/withRuleSet.js +1 -0
  247. package/dist/components/withScalingGroup.js +1 -0
  248. package/dist/components/withStyled.js +1 -1
  249. package/dist/components/withTranslation.js +1 -1
  250. package/dist/esm/AxisConfig-ByIP5J-9.js +224 -0
  251. package/dist/esm/LabelCollisionManager-DaNiDiM9.js +404 -0
  252. package/dist/esm/NumericScale-DsTzlzxQ.js +105 -0
  253. package/dist/esm/Order-BQeJE_yi.js +83 -0
  254. package/dist/esm/SVGStyle-BwBlY3Km.js +8199 -0
  255. package/dist/esm/SVGVariancesStyleGroup-BpGW4CvN.js +48 -0
  256. package/dist/esm/VarianceMeasure-CE3N8Bea.js +364 -0
  257. package/dist/esm/XYChartDataRow-DeMI1JKU.js +820 -0
  258. package/dist/esm/bn-asset_21.entry.js +16083 -0
  259. package/dist/esm/bn-chart-bubble.entry.js +760 -0
  260. package/dist/esm/bn-chart-bullet.entry.js +783 -0
  261. package/dist/esm/bn-chart-scatter.entry.js +656 -0
  262. package/dist/esm/bn-grid.entry.js +5 -3
  263. package/dist/esm/bn-image.entry.js +5 -3
  264. package/dist/esm/bn-internationalization.entry.js +10 -8
  265. package/dist/esm/bn-ruleset.entry.js +39 -0
  266. package/dist/esm/bn-template-engine.js +1 -1
  267. package/dist/esm/bn-template.entry.js +1 -1
  268. package/dist/esm/bn-text.entry.js +7 -78
  269. package/dist/esm/bn-tree.entry.js +4 -2
  270. package/dist/esm/context-protocol-d8MHrEo8.js +9490 -0
  271. package/dist/esm/editor-companion.entry.js +13 -6
  272. package/dist/esm/ibcs-chart-bubble.entry.js +622 -0
  273. package/dist/esm/ibcs-chart-bullet.entry.js +671 -0
  274. package/dist/esm/ibcs-chart-scatter.entry.js +665 -0
  275. package/dist/esm/layoutObserver-BJBEyhNf.js +196 -0
  276. package/dist/esm/loader.js +1 -1
  277. package/dist/esm/sanitizeHtml-BA48JiHe.js +83 -0
  278. package/dist/esm/scaling-BGnpSN1j.js +581 -0
  279. package/dist/esm/{withBodyObserver-AFk2wwHT.js → withBodyObserver-IokS6fHD.js} +12 -7
  280. package/dist/esm/withScalingGroup-CC3UcvC5.js +71 -0
  281. package/dist/esm/withStyled-2l5Tx3cf.js +1135 -0
  282. package/dist/types/components/bn-chart-bubble/bn-chart-bubble.d.ts +193 -0
  283. package/dist/types/components/bn-chart-bubble/ibcs-chart-bubble.d.ts +58 -0
  284. package/dist/types/components/bn-chart-bubble/utils/BubbleChart.d.ts +91 -0
  285. package/dist/types/components/bn-chart-bullet/bn-chart-bullet.d.ts +172 -0
  286. package/dist/types/components/bn-chart-bullet/ibcs-chart-bullet.d.ts +52 -0
  287. package/dist/types/components/bn-chart-bullet/utils/BulletChart.d.ts +91 -0
  288. package/dist/types/components/bn-chart-bullet/utils/model/BulletChartStyle.d.ts +70 -0
  289. package/dist/types/components/bn-chart-bullet/utils/model/BulletConfig.d.ts +43 -0
  290. package/dist/types/components/bn-chart-bullet/utils/model/index.d.ts +2 -0
  291. package/dist/types/components/bn-chart-scatter/bn-chart-scatter.d.ts +172 -0
  292. package/dist/types/components/bn-chart-scatter/ibcs-chart-scatter.d.ts +53 -0
  293. package/dist/types/components/bn-chart-scatter/utils/ScatterChart.d.ts +66 -0
  294. package/dist/types/components/bn-chart-structure/bn-chart-structure.d.ts +19 -5
  295. package/dist/types/components/bn-chart-structure/ibcs-chart-structure.d.ts +13 -6
  296. package/dist/types/components/bn-chart-structure/utils/StructureChart.d.ts +21 -12
  297. package/dist/types/components/bn-chart-structure/utils/helper/ElementPositions.d.ts +16 -1
  298. package/dist/types/components/bn-chart-structure/utils/model/StructureChartComponentConfig.d.ts +5 -3
  299. package/dist/types/components/bn-chart-time/bn-chart-time.d.ts +53 -13
  300. package/dist/types/components/bn-chart-time/ibcs-chart-time.d.ts +13 -6
  301. package/dist/types/components/bn-chart-time/utils/TimeChart.d.ts +21 -12
  302. package/dist/types/components/bn-chart-time/utils/model/TimeChartComponentConfig.d.ts +7 -3
  303. package/dist/types/components/bn-context/bn-context.d.ts +8 -0
  304. package/dist/types/components/bn-dataset/bn-dataset.d.ts +47 -5
  305. package/dist/types/components/bn-datasource/bn-datasource.d.ts +53 -6
  306. package/dist/types/components/bn-grid/bn-grid.d.ts +8 -0
  307. package/dist/types/components/bn-layout-card/bn-layout-card.d.ts +39 -8
  308. package/dist/types/components/bn-layout-page/bn-layout-page.d.ts +36 -1
  309. package/dist/types/components/bn-message/bn-message.d.ts +5 -2
  310. package/dist/types/components/bn-ruleset/bn-ruleset.d.ts +8 -0
  311. package/dist/types/components/bn-scaling-group/bn-scaling-group.d.ts +37 -0
  312. package/dist/types/components/bn-table/bn-table.d.ts +74 -12
  313. package/dist/types/components/bn-table/ibcs-table.d.ts +27 -4
  314. package/dist/types/components/bn-table/utils/Table.d.ts +16 -6
  315. package/dist/types/components/bn-table/utils/elements/Cell.d.ts +2 -0
  316. package/dist/types/components/bn-table/utils/elements/CellBarChart.d.ts +33 -0
  317. package/dist/types/components/bn-table/utils/elements/TableRow.d.ts +2 -1
  318. package/dist/types/components/bn-table/utils/elements/WaterfallBar.d.ts +21 -0
  319. package/dist/types/components/bn-table/utils/elements/index.d.ts +1 -0
  320. package/dist/types/components/bn-table/utils/factories/tableDataSetFactory.d.ts +17 -9
  321. package/dist/types/components/bn-table/utils/helper/DataQuery.d.ts +35 -3
  322. package/dist/types/components/bn-table/utils/helper/IntervalColumns.d.ts +37 -0
  323. package/dist/types/components/bn-table/utils/helper/QueryGroup.d.ts +4 -5
  324. package/dist/types/components/bn-table/utils/helper/WaterfallCalculator.d.ts +55 -0
  325. package/dist/types/components/bn-table/utils/helper/index.d.ts +2 -0
  326. package/dist/types/components/bn-table/utils/model/TableAttribute.d.ts +22 -0
  327. package/dist/types/components/bn-table/utils/model/TableComponentConfig.d.ts +12 -3
  328. package/dist/types/components/bn-table/utils/model/index.d.ts +21 -0
  329. package/dist/types/components/bn-title/bn-title.d.ts +12 -1
  330. package/dist/types/components/bn-title/ibcs-title/ibcs-title.d.ts +4 -0
  331. package/dist/types/components/bn-title/ibcs-title/utils/Title.d.ts +1 -0
  332. package/dist/types/components/bn-title/ibcs-title/utils/factories/TitleDataSetFactory.d.ts +3 -1
  333. package/dist/types/components/bn-title/ibcs-title/utils/model/TitleConfig.d.ts +2 -0
  334. package/dist/types/components/bn-tree/bn-tree.d.ts +8 -0
  335. package/dist/types/components/editor-companion/editor-companion.d.ts +2 -0
  336. package/dist/types/components.d.ts +1725 -116
  337. package/dist/types/context/context-protocol.d.ts +7 -3
  338. package/dist/types/context/scopedDb.d.ts +37 -0
  339. package/dist/types/stores/componentStyles.d.ts +41 -0
  340. package/dist/types/stores/createScopedStores.d.ts +4 -2
  341. package/dist/types/stores/ruleSets.d.ts +40 -0
  342. package/dist/types/utils/DateStringFactory.d.ts +20 -1
  343. package/dist/types/utils/constants.d.ts +5 -0
  344. package/dist/types/utils/dataAnalyzer.d.ts +2 -1
  345. package/dist/types/utils/ibcsRuleSet.d.ts +6 -1
  346. package/dist/types/utils/layoutObserver.d.ts +27 -0
  347. package/dist/types/utils/model/ChartStyles.d.ts +2 -1
  348. package/dist/types/utils/parentDimensions.d.ts +1 -1
  349. package/dist/types/utils/sanitizeHtml.d.ts +6 -0
  350. package/dist/types/utils/validate.d.ts +18 -0
  351. package/dist/types/utils/withDataset.d.ts +6 -2
  352. package/dist/types/utils/withDatasource.d.ts +3 -3
  353. package/dist/types/utils/withInheritedProps.d.ts +19 -0
  354. package/dist/types/utils/withRuleSet.d.ts +24 -0
  355. package/dist/types/utils/withScalingGroup.d.ts +14 -0
  356. package/dist/types/utils/withTranslation.d.ts +15 -5
  357. package/dist/types/utils/xy/FacetGrid.d.ts +27 -0
  358. package/dist/types/utils/xy/IsoCurves.d.ts +46 -0
  359. package/dist/types/utils/xy/NumericScale.d.ts +41 -0
  360. package/dist/types/utils/xy/PointLabeler.d.ts +58 -0
  361. package/dist/types/utils/xy/RadiusScale.d.ts +26 -0
  362. package/dist/types/utils/xy/SeriesPalette.d.ts +59 -0
  363. package/dist/types/utils/xy/VarianceMeasure.d.ts +37 -0
  364. package/dist/types/utils/xy/XYFrame.d.ts +44 -0
  365. package/dist/types/utils/xy/XYLegend.d.ts +43 -0
  366. package/dist/types/utils/xy/model/AxisConfig.d.ts +96 -0
  367. package/dist/types/utils/xy/model/ScaleFactorsXYChart.d.ts +36 -0
  368. package/dist/types/utils/xy/model/XYChartDataRow.d.ts +157 -0
  369. package/dist/types/utils/xy/model/XYChartStyle.d.ts +31 -0
  370. package/package.json +5 -4
  371. package/readme.md +9 -5
  372. package/dist/bn-template-engine/p-3141c4a2.entry.js +0 -1
  373. package/dist/bn-template-engine/p-67538176.entry.js +0 -1
  374. package/dist/bn-template-engine/p-916296a5.entry.js +0 -1
  375. package/dist/bn-template-engine/p-96006b06.entry.js +0 -1
  376. package/dist/bn-template-engine/p-Ck-NYtot.js +0 -1
  377. package/dist/bn-template-engine/p-CnDq0oVa.js +0 -1
  378. package/dist/bn-template-engine/p-DSXNgKLa.js +0 -1
  379. package/dist/bn-template-engine/p-bc711fb0.entry.js +0 -1
  380. package/dist/bn-template-engine/p-c86395b8.entry.js +0 -1
  381. package/dist/bn-template-engine/p-e6f646b1.entry.js +0 -1
  382. package/dist/bn-template-engine/p-f41d9242.entry.js +0 -1
  383. package/dist/bn-template-engine/p-gFbbuhtl.js +0 -1
  384. package/dist/cjs/bn-asset_20.cjs.entry.js +0 -23547
  385. package/dist/cjs/context-protocol-ohYzcb5F.js +0 -663
  386. package/dist/cjs/scaling-CIAClQR5.js +0 -314
  387. package/dist/cjs/withStyled-qd94SSb4.js +0 -9535
  388. package/dist/collection/stores/datasets.js +0 -14
  389. package/dist/collection/stores/datasources.js +0 -14
  390. package/dist/components/_commonjsHelpers.js +0 -1
  391. package/dist/components/alasql.min.js +0 -1
  392. package/dist/components/ibcsRuleSet.js +0 -1
  393. package/dist/components/scaling.js +0 -1
  394. package/dist/components/withInheritedProps.js +0 -1
  395. package/dist/esm/bn-asset_20.entry.js +0 -23526
  396. package/dist/esm/context-protocol-DdbSplvE.js +0 -656
  397. package/dist/esm/scaling-DGKKkuL9.js +0 -309
  398. package/dist/esm/withStyled-BIkqU2w4.js +0 -9501
  399. package/dist/types/stores/datasets.d.ts +0 -14
  400. package/dist/types/stores/datasources.d.ts +0 -14
@@ -0,0 +1,1135 @@
1
+ import { g as getElement, f as forceUpdate } from './index-B_d-jp99.js';
2
+ import { g as getStores, c as clearStoresCache, D as DateTime } from './context-protocol-d8MHrEo8.js';
3
+ import { r as runIfExisits } from './withHasError-DW_vMDUp.js';
4
+ import { m as merge, S as Scenarios, b as Sentiments, A as AggregationLevel, c as AxisLabelsMode, T as TableBarColumnWidth, D as DataFormat, d as TableType, M as MeasureType, e as TableCategoryWidth, r as resolveMeasure } from './VarianceMeasure-CE3N8Bea.js';
5
+ import { b as OrderColumn, O as OrderDirection } from './Order-BQeJE_yi.js';
6
+
7
+ /**
8
+ * Mixin that provides themed styling to a Stencil component using a
9
+ * three-layer merge strategy.
10
+ *
11
+ * The effective style is computed by deep-merging three layers in order:
12
+ * 1. `_system` -- built-in defaults (lowest priority)
13
+ * 2. `_default` -- user-defined global overrides
14
+ * 3. The value of the host element's `selected-style` attribute (highest priority)
15
+ *
16
+ * A MutationObserver watches `selected-style` and the store subscription
17
+ * reacts to updates in the componentStyles store, triggering a re-merge
18
+ * and forced re-render on changes.
19
+ *
20
+ * @param component - The Stencil component instance
21
+ * @returns A query function `componentStyle(<selector>)` that provides type-safe
22
+ * access to the merged style object, e.g. `componentStyle(s => s.table.headerBg)`
23
+ */
24
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
25
+ const withComponentStyle = (component) => {
26
+ let subscription;
27
+ let stores;
28
+ let selectedStyle;
29
+ let style;
30
+ const updateStyle = () => {
31
+ const state = stores.componentStyles.state;
32
+ // Arrays overwrite instead of concatenating: ordered color lists like
33
+ // seriesColors/stackColors must be replaced wholesale by an override.
34
+ style = merge([state["_system"] || {}, state["_default"] || {}, state[selectedStyle] || {}], { arrayMergeType: "overwrite" });
35
+ };
36
+ const observer = new MutationObserver((mutations) => {
37
+ mutations.forEach((mutation) => {
38
+ if (mutation.attributeName === "selected-style") {
39
+ selectedStyle = getElement(component).getAttribute("selected-style");
40
+ updateStyle();
41
+ forceUpdate(component);
42
+ }
43
+ });
44
+ });
45
+ const connectedCallback = component["connectedCallback"];
46
+ component["connectedCallback"] = () => {
47
+ const element = getElement(component);
48
+ stores = getStores(element);
49
+ style = stores.componentStyles.state["_system"];
50
+ observer.observe(element, { attributes: true, attributeFilter: ["selected-style"] });
51
+ selectedStyle = getElement(component).getAttribute("selected-style");
52
+ updateStyle();
53
+ subscription = stores.componentStyles.on("set", (key) => {
54
+ if (key === selectedStyle) {
55
+ selectedStyle = getElement(component).getAttribute("selected-style");
56
+ updateStyle();
57
+ forceUpdate(getElement(component));
58
+ }
59
+ });
60
+ runIfExisits(connectedCallback, component);
61
+ };
62
+ const disconnectedCallback = component["disconnectedCallback"];
63
+ component["disconnectedCallback"] = () => {
64
+ observer.disconnect();
65
+ runIfExisits(subscription);
66
+ clearStoresCache(getElement(component));
67
+ runIfExisits(disconnectedCallback, component);
68
+ };
69
+ const componentStyle = (q) => {
70
+ return q(style);
71
+ };
72
+ return componentStyle;
73
+ };
74
+
75
+ const EXPRESSION_REGEX = /^\s*(set|first|last|min|max|avg|sum|lit)\(\s*(.*?)\s*\)\s*$/;
76
+ /** Field arguments must be plain identifiers — keeps user input out of SQL syntax. */
77
+ const FIELD_IDENTIFIER_REGEX = /^[A-Za-z_][A-Za-z0-9_]*$/;
78
+ const NUMERIC_FNS = ["min", "max", "avg", "sum"];
79
+ /**
80
+ * A custom table column computed from dataset fields via an aggregate expression,
81
+ * e.g. `set(_leiter)` or `sum(ac1)` (see the `attributes` prop on bn-table).
82
+ *
83
+ * The {@link label} is the user-facing header text and never enters SQL; queries
84
+ * use the positional {@link alias} (`attr_0`, `attr_1`, ...) instead.
85
+ */
86
+ class TableAttribute {
87
+ constructor(label, alias, fn, arg) {
88
+ this.label = label;
89
+ this.alias = alias;
90
+ this.fn = fn;
91
+ this.arg = arg;
92
+ }
93
+ /** Numeric aggregates are formatted like scenario cells (measure scale + decimals). */
94
+ get isNumeric() {
95
+ return NUMERIC_FNS.includes(this.fn);
96
+ }
97
+ }
98
+ /** Checks a single attribute expression string like "set(_leiter)" or "lit(Fix)". */
99
+ function isValidAttributeExpression(expression) {
100
+ if (typeof expression !== "string") {
101
+ return false;
102
+ }
103
+ const match = EXPRESSION_REGEX.exec(expression);
104
+ if (!match) {
105
+ return false;
106
+ }
107
+ const [, fn, arg] = match;
108
+ if (fn === "lit") {
109
+ return arg.length > 0;
110
+ }
111
+ return FIELD_IDENTIFIER_REGEX.test(arg);
112
+ }
113
+ /** Parses an attribute expression into a {@link TableAttribute}; null when invalid. */
114
+ function parseTableAttributeExpression(label, alias, expression) {
115
+ if (!isValidAttributeExpression(expression)) {
116
+ return null;
117
+ }
118
+ const [, fn, arg] = EXPRESSION_REGEX.exec(expression);
119
+ return new TableAttribute(label, alias, fn, arg);
120
+ }
121
+
122
+ /** Granularity levels for date intervals, from YEAR down to MILLISECOND. AUTO triggers auto-detection. */
123
+ var DateDistance;
124
+ (function (DateDistance) {
125
+ DateDistance["YEAR"] = "year";
126
+ DateDistance["QUARTER"] = "quarter";
127
+ DateDistance["MONTH"] = "month";
128
+ DateDistance["WEEK"] = "week";
129
+ DateDistance["DAY"] = "day";
130
+ DateDistance["HOUR"] = "hour";
131
+ DateDistance["MINUTE"] = "minute";
132
+ DateDistance["SECOND"] = "second";
133
+ DateDistance["MILLISECOND"] = "millisecond";
134
+ DateDistance["NONE"] = "fallback";
135
+ DateDistance["AUTO"] = "auto";
136
+ })(DateDistance || (DateDistance = {}));
137
+ /** IBCS date-link modes controlling how start/end dates are rendered in titles and axis labels. */
138
+ var DateLink;
139
+ (function (DateLink) {
140
+ DateLink["AVG"] = "avg";
141
+ DateLink["INTERVAL"] = "interval";
142
+ DateLink["START"] = "start";
143
+ DateLink["END"] = "end";
144
+ DateLink["YTD"] = "ytd";
145
+ DateLink["YTG"] = "ytg";
146
+ DateLink["CUM"] = "cum";
147
+ DateLink["MAT"] = "mat";
148
+ DateLink["NONE"] = "none";
149
+ DateLink["AUTO"] = "auto";
150
+ })(DateLink || (DateLink = {}));
151
+ /**
152
+ * Produces formatted date strings and IBCS date-link notations for time-series charts.
153
+ *
154
+ * Supports configurable date formats (full and abbreviated), locale-aware formatting
155
+ * via Luxon, smart boundary labels that append the parent period at crossings
156
+ * (e.g. month name shown at the first day of a new month), and IBCS date-link
157
+ * notation (AVG, YTD, YTG, CUM, MAT, INTERVAL, START, END).
158
+ */
159
+ class DateStringFactory {
160
+ constructor() {
161
+ this._dateFormat = {
162
+ year: "yyyy",
163
+ quarter: "q'Q' yyyy",
164
+ month: "LLL yyyy",
165
+ week: "'KW'WW yyyy",
166
+ day: "dd.MM.yyyy",
167
+ hour: "TT",
168
+ minute: "TT",
169
+ second: "TT",
170
+ millisecond: "TT:SSS",
171
+ fallback: "dd.MM.yyyy",
172
+ };
173
+ this._dateFormatShort = {
174
+ year: "yy",
175
+ quarter: "q'Q'",
176
+ month: "LLL",
177
+ week: "'KW'WW",
178
+ day: "dd",
179
+ hour: "hh'h'",
180
+ minute: "mm'm'",
181
+ second: "ss's'",
182
+ millisecond: "SSS'ms'",
183
+ fallback: "dd.MM.yyyy",
184
+ };
185
+ this._dateLinkFormat = {
186
+ avg: "Ø[LINK]",
187
+ interval: "[DATE]..[DATE2]",
188
+ start: ".[DATE]",
189
+ end: "[DATE].",
190
+ ytd: "_[DATE]",
191
+ ytg: "[DATE]_",
192
+ cum: "[DATE]_[DATE2]",
193
+ mat: "~[DATE]",
194
+ none: "[DATE]",
195
+ };
196
+ this.locale = "de";
197
+ /** Set once a caller supplies an explicit map, so `setLocale` stops overwriting it. */
198
+ this.dateFormatPinned = false;
199
+ this.dateFormatShortPinned = false;
200
+ this.dateFormat = this._dateFormat;
201
+ this.dateLinkFormat = this._dateLinkFormat;
202
+ this.dateFormatShort = this._dateFormatShort;
203
+ }
204
+ setDateLinkFormat(datelink) {
205
+ this.dateLinkFormat = datelink;
206
+ }
207
+ setDateFormat(dateFormat) {
208
+ this.dateFormat = dateFormat;
209
+ this.dateFormatPinned = true;
210
+ }
211
+ setDateFormatShort(dateFormatShort) {
212
+ this.dateFormatShort = dateFormatShort;
213
+ this.dateFormatShortPinned = true;
214
+ }
215
+ /**
216
+ * Selects the locale used for Luxon's localized tokens and swaps in the
217
+ * locale's pattern overrides. An explicit `setDateFormat` /
218
+ * `setDateFormatShort` always wins, whatever the call order.
219
+ */
220
+ setLocale(locale) {
221
+ this.locale = locale;
222
+ if (!this.dateFormatPinned) {
223
+ this.dateFormat = Object.assign(Object.assign({}, this._dateFormat), (DateStringFactory.LOCALE_DATE_FORMAT[locale] || {}));
224
+ }
225
+ if (!this.dateFormatShortPinned) {
226
+ this.dateFormatShort = Object.assign(Object.assign({}, this._dateFormatShort), (DateStringFactory.LOCALE_DATE_FORMAT_SHORT[locale] || {}));
227
+ }
228
+ }
229
+ /**
230
+ * Converts date string based on dateFormatMap and the selected Type
231
+ *
232
+ * @param date
233
+ * @param type?
234
+ */
235
+ getDateString(date, type) {
236
+ return date.setLocale(this.locale).toFormat(this.dateFormat[type] || this.dateFormat["fallback"]);
237
+ }
238
+ /**
239
+ * Produces abbreviated date labels that include the parent period at boundary crossings.
240
+ *
241
+ * For example, with MONTH granularity, most ticks show just "Jan", "Feb", etc.,
242
+ * but the first month of a new year also appends the year ("Jan 24").
243
+ * This avoids redundant repetition while keeping boundary context visible.
244
+ */
245
+ getSmartDateString(date, type) {
246
+ switch (type) {
247
+ case DateDistance.DAY: {
248
+ return this.getFormatedDayDate(date);
249
+ }
250
+ case DateDistance.MONTH: {
251
+ return this.getFormatedMonthDate(date);
252
+ }
253
+ case DateDistance.QUARTER: {
254
+ return this.getFormatedQuarterDate(date);
255
+ }
256
+ case DateDistance.WEEK: {
257
+ return this.getFormatedWeekDate(date);
258
+ }
259
+ case DateDistance.HOUR: {
260
+ return this.getFormatedHourDate(date);
261
+ }
262
+ case DateDistance.MINUTE: {
263
+ return this.getFormatedMinuteDate(date);
264
+ }
265
+ case DateDistance.SECOND: {
266
+ return this.getFormatedSecondDate(date);
267
+ }
268
+ case DateDistance.MILLISECOND: {
269
+ return this.getFormatedMilliSecondDate(date);
270
+ }
271
+ default: {
272
+ return this.getDateString(date, type);
273
+ }
274
+ }
275
+ }
276
+ /**
277
+ * Determines the best-fitting {@link DateDistance} granularity for the span between two dates.
278
+ *
279
+ * Cascades through granularities from finest (millisecond) to coarsest (year),
280
+ * comparing the span against the `limit` threshold at each level. Returns the
281
+ * first granularity where the span is below the limit, ensuring the number of
282
+ * axis ticks stays manageable. Defaults to DAY for zero-span or null end dates.
283
+ *
284
+ * @param limit Maximum number of intervals before stepping up to a coarser granularity (default 32).
285
+ */
286
+ calculateDistanceType(start, end, limit = 32) {
287
+ if (end == null) {
288
+ return DateDistance.DAY;
289
+ }
290
+ const mStart = typeof start == "number" ? DateTime.fromMillis(start) : start;
291
+ const mEnd = typeof end == "number" ? DateTime.fromMillis(end) : end;
292
+ if (mEnd.diff(mStart).as("milliseconds") === 0) {
293
+ return DateDistance.DAY;
294
+ }
295
+ else if (mEnd.diff(mStart).as("milliseconds") < limit) {
296
+ return DateDistance.MILLISECOND;
297
+ }
298
+ else if (mEnd.diff(mStart).as("seconds") < limit) {
299
+ return DateDistance.SECOND;
300
+ }
301
+ else if (mEnd.diff(mStart).as("minutes") < limit) {
302
+ return DateDistance.MINUTE;
303
+ }
304
+ else if (mEnd.diff(mStart).as("hours") < limit) {
305
+ return DateDistance.HOUR;
306
+ }
307
+ else if (mEnd.diff(mStart).as("days") < limit) {
308
+ return DateDistance.DAY;
309
+ }
310
+ else if (mEnd.diff(mStart).as("weeks") < limit) {
311
+ return DateDistance.WEEK;
312
+ }
313
+ else if (mEnd.diff(mStart).as("months") < limit) {
314
+ return DateDistance.MONTH;
315
+ }
316
+ else if (mEnd.diff(mStart).as("quarters") < limit) {
317
+ return DateDistance.QUARTER;
318
+ }
319
+ else {
320
+ return DateDistance.YEAR;
321
+ }
322
+ }
323
+ /**
324
+ * Get an array of moment instances, each representing a day beween given timestamps.
325
+ * @param {string|Date} from start date
326
+ * @param {string|Date} to end date
327
+ * @param dateInterval
328
+ * @param spanLimit
329
+ */
330
+ datesBetween(from, to, dateInterval, spanLimit) {
331
+ const unit = this.convertDateDistanceToMomentunitOfTime(dateInterval);
332
+ const fromDate = from.startOf(unit);
333
+ const toDate = to.endOf(unit);
334
+ let span = toDate.diff(fromDate).as(unit);
335
+ const days = [];
336
+ if (span >= spanLimit) {
337
+ span = spanLimit;
338
+ }
339
+ let currentDate = fromDate;
340
+ do {
341
+ days.push(currentDate);
342
+ currentDate = currentDate.plus(this.createDiratonLike(unit, 1));
343
+ } while (currentDate <= toDate && days.length < span);
344
+ return days;
345
+ }
346
+ /**
347
+ * Produces an IBCS date-link string combining date formatting with link notation.
348
+ *
349
+ * Supported modes map to IBCS conventions:
350
+ * - `AVG`: average symbol `Ø` wrapping the interval
351
+ * - `YTD` / `YTG`: year-to-date / year-to-go underline notation
352
+ * - `CUM`: cumulative range `start_end`
353
+ * - `MAT`: moving annual total `~date`
354
+ * - `INTERVAL`: `start..end` range
355
+ * - `START` / `END`: dot-prefixed/suffixed single date
356
+ *
357
+ * When start and end resolve to the same formatted string, INTERVAL is collapsed
358
+ * to NONE to avoid redundant display. Year parts are deduplicated when both dates
359
+ * share the same year (e.g. "Q1 .. Q3 2024" instead of "Q1 2024 .. Q3 2024").
360
+ *
361
+ * @param type DateDistance granularity; when AUTO, it is auto-detected via `calculateDistanceType`.
362
+ */
363
+ getDateLinkString(startDateTime, endDateTime, mode, type, spanLimit) {
364
+ // No Start/ End Date exists
365
+ if (startDateTime == null && endDateTime == null) {
366
+ // BinoSystem.warn('NO START AND END DATE SELECTED');
367
+ return "";
368
+ }
369
+ if (startDateTime == null && !(mode === DateLink.END || mode === DateLink.YTD)) {
370
+ // BinoSystem.warn('NO START N SELECTED');
371
+ return "";
372
+ }
373
+ if (endDateTime == null &&
374
+ (DateLink.INTERVAL === mode || DateLink.CUM === mode || DateLink.END === mode || DateLink.YTD === mode)) {
375
+ // BinoSystem.warn('NO END N SELECTED');
376
+ return "";
377
+ }
378
+ const date1 = startDateTime || DateTime.now();
379
+ const date2 = endDateTime;
380
+ // calculate type value aka. auto-mode
381
+ if (type === DateDistance.AUTO) {
382
+ type = this.calculateDistanceType(date1, date2, spanLimit);
383
+ }
384
+ let dateString1 = this.getDateString(date1, type);
385
+ let dateString2 = "";
386
+ let link = DateLink.NONE;
387
+ if (date2 != null) {
388
+ dateString2 = this.getDateString(date2, type);
389
+ link = DateLink.INTERVAL;
390
+ // clean up visualisation if start and end (formated) ist identical
391
+ if (dateString1 === dateString2 && mode === DateLink.INTERVAL) {
392
+ // BinoSystem.warn('CHANGED INTERVAL TO NONE; START AND END ARE IDENTICAL');
393
+ mode = DateLink.NONE;
394
+ }
395
+ if (dateString1 === dateString2 && mode === DateLink.AVG) {
396
+ // BinoSystem.warn('CHANGED INTERVAL TO NONE; START AND END ARE IDENTICAL');
397
+ link = DateLink.NONE;
398
+ }
399
+ if (DateLink.END === mode || DateLink.YTD === mode) {
400
+ dateString1 = dateString2;
401
+ }
402
+ // clean up dateString1 if same year
403
+ if (mode === DateLink.INTERVAL || mode === DateLink.CUM || DateLink.AVG) {
404
+ if (type === DateDistance.QUARTER) {
405
+ if (date1.quarter === date2.quarter && date1.year === date2.year) {
406
+ dateString2 = dateString2.replace(" " + date2.year, "");
407
+ }
408
+ else if (date1.year === date2.year) {
409
+ dateString1 = dateString1.replace(" " + date1.year, "");
410
+ }
411
+ }
412
+ else if (type === DateDistance.MONTH) {
413
+ if (date1.month === date2.month && date1.year === date2.year) {
414
+ dateString2 = dateString2.replace(" " + date2.year, "");
415
+ }
416
+ else if (date1.year === date2.year) {
417
+ dateString1 = dateString1.replace(" " + date1.year, "");
418
+ }
419
+ }
420
+ else if (type === DateDistance.WEEK) {
421
+ if (date1.weekNumber === date2.weekNumber && date1.year === date2.year) {
422
+ dateString2 = dateString2.replace(" " + date2.year, "");
423
+ }
424
+ else if (date1.year === date2.year) {
425
+ dateString1 = dateString1.replace(" " + date1.year, "");
426
+ }
427
+ }
428
+ }
429
+ }
430
+ return this.dateLinkFormat[mode]
431
+ .replace("[LINK]", this.dateLinkFormat[link])
432
+ .replace("[DATE]", dateString1)
433
+ .replace("[DATE2]", dateString2);
434
+ }
435
+ /** Returns an abbreviated date string using the short format map (e.g. "yy" for year, "LLL" for month). */
436
+ getShortDateString(date, type) {
437
+ return date
438
+ .setLocale(this.locale)
439
+ .toFormat(this.dateFormatShort[type] || this.dateFormatShort["fallback"]);
440
+ }
441
+ getFormatedDayDate(date) {
442
+ let format = this.dateFormatShort["day"];
443
+ if (this.isFirstInMonth(date)) {
444
+ format += " " + this.dateFormatShort["month"];
445
+ }
446
+ if (this.isJanuary(date)) {
447
+ format += " " + this.dateFormatShort["year"];
448
+ }
449
+ return date.setLocale(this.locale).toFormat(format);
450
+ }
451
+ getFormatedMonthDate(date) {
452
+ let format = this.dateFormatShort["month"];
453
+ if (this.isJanuary(date)) {
454
+ format += " " + this.dateFormatShort["year"];
455
+ }
456
+ return date.setLocale(this.locale).toFormat(format);
457
+ }
458
+ getFormatedQuarterDate(date) {
459
+ let format = this.dateFormatShort["quarter"];
460
+ if (this.isFirstQuarter(date)) {
461
+ format += " " + this.dateFormatShort["year"];
462
+ }
463
+ return date.setLocale(this.locale).toFormat(format);
464
+ }
465
+ getFormatedWeekDate(date) {
466
+ let format = this.dateFormatShort["week"];
467
+ if (this.isFirstWeek(date)) {
468
+ format += " " + this.dateFormatShort["year"];
469
+ }
470
+ return date.setLocale(this.locale).toFormat(format);
471
+ }
472
+ getFormatedHourDate(date) {
473
+ let format = this.dateFormatShort["hour"];
474
+ if (this.isFirstHour(date)) {
475
+ format += " " + this.dateFormatShort["day"];
476
+ }
477
+ return date.setLocale(this.locale).toFormat(format);
478
+ }
479
+ getFormatedMinuteDate(date) {
480
+ let format = this.dateFormatShort["minute"];
481
+ if (this.isFirstMinute(date)) {
482
+ format = this.dateFormatShort["hour"] + ":" + format;
483
+ }
484
+ return date.setLocale(this.locale).toFormat(format);
485
+ }
486
+ getFormatedSecondDate(date) {
487
+ let format = this.dateFormatShort["second"];
488
+ if (this.isFirstSecond(date)) {
489
+ format = this.dateFormatShort["minute"] + ":" + format;
490
+ }
491
+ return date.setLocale(this.locale).toFormat(format);
492
+ }
493
+ getFormatedMilliSecondDate(date) {
494
+ let format = this.dateFormatShort["millisecond"];
495
+ if (this.isFirstMilliSecond(date)) {
496
+ format = this.dateFormatShort["second"] + ":" + format;
497
+ }
498
+ return date.setLocale(this.locale).toFormat(format);
499
+ }
500
+ isFirstInMonth(date) {
501
+ return date.day === 1;
502
+ }
503
+ isJanuary(date) {
504
+ return date.month === 1;
505
+ }
506
+ isFirstQuarter(date) {
507
+ return date.quarter === 1;
508
+ }
509
+ isFirstWeek(date) {
510
+ return date.weekNumber === 1;
511
+ }
512
+ isFirstHour(date) {
513
+ return date.hour === 0;
514
+ }
515
+ isFirstMinute(date) {
516
+ return date.minute === 0;
517
+ }
518
+ isFirstSecond(date) {
519
+ return date.second === 0;
520
+ }
521
+ isFirstMilliSecond(date) {
522
+ return date.millisecond === 0;
523
+ }
524
+ convertDateDistanceToMomentunitOfTime(dateInterval) {
525
+ let unitOfTime;
526
+ switch (dateInterval) {
527
+ case DateDistance.YEAR:
528
+ unitOfTime = "year";
529
+ break;
530
+ case DateDistance.MONTH:
531
+ unitOfTime = "month";
532
+ break;
533
+ case DateDistance.QUARTER:
534
+ unitOfTime = "quarter";
535
+ break;
536
+ case DateDistance.WEEK:
537
+ unitOfTime = "week";
538
+ break;
539
+ case DateDistance.DAY:
540
+ unitOfTime = "day";
541
+ break;
542
+ case DateDistance.HOUR:
543
+ unitOfTime = "hour";
544
+ break;
545
+ case DateDistance.MINUTE:
546
+ unitOfTime = "minute";
547
+ break;
548
+ case DateDistance.SECOND:
549
+ unitOfTime = "second";
550
+ break;
551
+ case DateDistance.MILLISECOND:
552
+ unitOfTime = "millisecond";
553
+ break;
554
+ default:
555
+ unitOfTime = "day";
556
+ }
557
+ return unitOfTime;
558
+ }
559
+ createDiratonLike(unit, number) {
560
+ switch (unit) {
561
+ case "year":
562
+ return { years: number };
563
+ case "month":
564
+ return { months: number };
565
+ case "quarter":
566
+ return { quarters: number };
567
+ case "week":
568
+ return { weeks: number };
569
+ case "day":
570
+ return { days: number };
571
+ case "hour":
572
+ return { hours: number };
573
+ case "minute":
574
+ return { minutes: number };
575
+ case "second":
576
+ return { seconds: number };
577
+ case "millisecond":
578
+ return { milliseconds: number };
579
+ default:
580
+ return { days: number };
581
+ }
582
+ }
583
+ }
584
+ /**
585
+ * Per-locale overrides for the patterns whose literals are language-specific.
586
+ *
587
+ * The base maps above are German (`KW` = Kalenderwoche, `dd.MM.yyyy`); a
588
+ * locale listed here replaces only the entries it names. Locales that are not
589
+ * listed keep the base patterns, so adding a bundle never silently reformats
590
+ * existing reports. Luxon's `LLL` (month) and `q` (quarter) tokens are already
591
+ * locale-aware through `setLocale`, so they need no override.
592
+ */
593
+ DateStringFactory.LOCALE_DATE_FORMAT = {
594
+ en: { week: "'W'WW yyyy", day: "MM/dd/yyyy", fallback: "MM/dd/yyyy" },
595
+ };
596
+ DateStringFactory.LOCALE_DATE_FORMAT_SHORT = {
597
+ en: { week: "'W'WW", fallback: "MM/dd/yyyy" },
598
+ };
599
+
600
+ /**
601
+ * Prop validators for Stencil @Watch handlers.
602
+ *
603
+ * Each validator returns an array of invalid items; an empty array means the input is valid.
604
+ * These are used in component @Watch methods to warn about malformed attribute values
605
+ * without crashing the component.
606
+ */
607
+ /**
608
+ * Checks whether a value is blank, null, undefined, or the string `"null"`.
609
+ * The string `"null"` check handles serialized null values from HTML attributes,
610
+ * which arrive as the literal string "null" rather than a JS null.
611
+ */
612
+ function isBlankInput(value) {
613
+ return value === null || value === undefined || value === "" || value === "null";
614
+ }
615
+ /**
616
+ * Validates a comma-separated list of scenario identifiers.
617
+ * The special value `"auto"` is always valid. Base scenarios are validated against
618
+ * the Scenarios enum; remaining invalid entries are passed to `validateVariancesList`
619
+ * for variance format checking (e.g. `d_ac1_pl1_pos`).
620
+ */
621
+ function validateScenarioList(value) {
622
+ if (isBlankInput(value)) {
623
+ return [];
624
+ }
625
+ if (value.trim().toLowerCase() === "auto") {
626
+ return [];
627
+ }
628
+ const invalidScenarios = value === null || value === void 0 ? void 0 : value.split(",").filter((element) => !(element.toUpperCase().trim() in Scenarios));
629
+ return validateVariancesList(invalidScenarios.toString());
630
+ }
631
+ /**
632
+ * Validates variance identifiers in the format `d_<base>_<delta>_<sentiment>` or
633
+ * `dr_<base>_<delta>_<sentiment>`. Each component is checked against the Scenarios
634
+ * and Sentiments enums. Returns items that fail validation.
635
+ */
636
+ function validateVariancesList(value) {
637
+ if (isBlankInput(value)) {
638
+ return [];
639
+ }
640
+ const invalidScenarios = value
641
+ .replace(";", ",")
642
+ .split(",")
643
+ .filter((element) => {
644
+ var _a, _b, _c;
645
+ const splittedElement = element.split("_");
646
+ const scenarioSubtrahend = (_a = splittedElement[0]) === null || _a === void 0 ? void 0 : _a.replace(/^dr|^d/, "").toUpperCase().trim();
647
+ const scenarioMinuend = (_b = splittedElement[1]) === null || _b === void 0 ? void 0 : _b.toUpperCase().trim();
648
+ const scenarioSentiment = (_c = splittedElement[2]) === null || _c === void 0 ? void 0 : _c.toUpperCase().trim();
649
+ return (splittedElement.length !== 3 ||
650
+ !(scenarioSubtrahend in Scenarios) ||
651
+ !(scenarioMinuend in Scenarios) ||
652
+ !(scenarioSentiment in Sentiments));
653
+ });
654
+ return invalidScenarios;
655
+ }
656
+ /**
657
+ * Validates a comma-separated list of bar column identifiers. Both base scenarios
658
+ * (e.g. `ac1`) and variances (e.g. `dac1_pp1_pos`) are valid entries.
659
+ * Returns items that fail validation.
660
+ */
661
+ function validateBarColumnsList(value) {
662
+ if (isBlankInput(value)) {
663
+ return [];
664
+ }
665
+ const invalidScenarios = value.split(",").filter((element) => !(element.toUpperCase().trim() in Scenarios));
666
+ return validateVariancesList(invalidScenarios.toString());
667
+ }
668
+ function validateOrderList(value) {
669
+ if (isBlankInput(value)) {
670
+ return [];
671
+ }
672
+ if (value.trim().toLowerCase() === "auto") {
673
+ return [];
674
+ }
675
+ const invalidScenarios = value.split(",").filter((element) => !(element.toUpperCase() in OrderColumn));
676
+ return validateVariancesList(invalidScenarios.toString());
677
+ }
678
+ function isValidInteger(value) {
679
+ if (isBlankInput(value)) {
680
+ return false;
681
+ }
682
+ return Number.isInteger(Number(value));
683
+ }
684
+ function isValidNumber(value) {
685
+ if (isBlankInput(value)) {
686
+ return false;
687
+ }
688
+ return !Number.isNaN(Number(value));
689
+ }
690
+ function isValidDirection(value) {
691
+ if (isBlankInput(value)) {
692
+ return false;
693
+ }
694
+ return (value === null || value === void 0 ? void 0 : value.toUpperCase()) in OrderDirection;
695
+ }
696
+ function isValidLevel(value) {
697
+ if ((value === null || value === void 0 ? void 0 : value.toLowerCase()) === "auto") {
698
+ return true;
699
+ }
700
+ return (value === null || value === void 0 ? void 0 : value.toUpperCase()) in AggregationLevel;
701
+ }
702
+ function validateMeasureList(value) {
703
+ if (isBlankInput(value)) {
704
+ return [];
705
+ }
706
+ try {
707
+ const newObj = JSON.parse(value);
708
+ if (newObj instanceof Array) {
709
+ return newObj.filter((elem) => !(elem.hasOwnProperty("name") && elem.hasOwnProperty("unit")));
710
+ }
711
+ }
712
+ catch (e) {
713
+ console.error("validateMeasureList: failed to parse JSON", e);
714
+ }
715
+ return ["Invalid JSON structure"];
716
+ }
717
+ function isValidDate(value) {
718
+ const newDate = Date.parse(value);
719
+ return Number.isInteger(newDate);
720
+ }
721
+ function isValidDateLink(value) {
722
+ return (value === null || value === void 0 ? void 0 : value.toUpperCase()) in DateLink;
723
+ }
724
+ function isValidDateFormat(value) {
725
+ return (value === null || value === void 0 ? void 0 : value.toUpperCase()) in DateDistance;
726
+ }
727
+ function isValidAxisLabelsMode(value) {
728
+ return (value === null || value === void 0 ? void 0 : value.toUpperCase()) in AxisLabelsMode;
729
+ }
730
+ function isValidDataFormat(value) {
731
+ if (isBlankInput(value)) {
732
+ return false;
733
+ }
734
+ return (value === null || value === void 0 ? void 0 : value.toUpperCase()) in DataFormat;
735
+ }
736
+ function isValidBoolean(value) {
737
+ if (isBlankInput(value)) {
738
+ return false;
739
+ }
740
+ const validValues = ["true", "false", true, false];
741
+ return validValues.some((elem) => elem === value);
742
+ }
743
+ function isValidTableType(value) {
744
+ if (isBlankInput(value)) {
745
+ return false;
746
+ }
747
+ return (value === null || value === void 0 ? void 0 : value.toUpperCase()) in TableType;
748
+ }
749
+ function validateThereOfJsonStr(value) {
750
+ if (isBlankInput(value)) {
751
+ return [];
752
+ }
753
+ try {
754
+ const jsonObject = JSON.parse(value);
755
+ if (jsonObject instanceof Array) {
756
+ // return newObj.filter(elem => elem.hasOwnProperty('rowgroup') && elem.hasOwnProperty('category') && elem.hasOwnProperty('subcategory'))
757
+ return jsonObject.filter((elem) => !(elem.hasOwnProperty("rowGroup") && elem.hasOwnProperty("category") && elem.hasOwnProperty("subCategory")));
758
+ }
759
+ }
760
+ catch (err) {
761
+ console.error("validateThereOfJsonStr: failed to parse JSON", err);
762
+ }
763
+ return ["Invalid JSON structure"];
764
+ }
765
+ /**
766
+ * Validates the bn-table `attributes` prop: a JSON object mapping column labels
767
+ * to aggregate expressions like `set(_leiter)` or `sum(ac1)`.
768
+ * Returns the offending `label: expression` entries; empty array means valid.
769
+ */
770
+ function validateAttributesJsonStr(value) {
771
+ if (isBlankInput(value)) {
772
+ return [];
773
+ }
774
+ try {
775
+ const jsonObject = JSON.parse(value);
776
+ if (jsonObject !== null && typeof jsonObject === "object" && !(jsonObject instanceof Array)) {
777
+ return Object.entries(jsonObject)
778
+ .filter(([, expression]) => typeof expression !== "string" || !isValidAttributeExpression(expression))
779
+ .map(([label, expression]) => `${label}: ${expression}`);
780
+ }
781
+ }
782
+ catch (err) {
783
+ console.error("validateAttributesJsonStr: failed to parse JSON", err);
784
+ }
785
+ return ["Invalid JSON structure"];
786
+ }
787
+ function validatePartOfJsonStr(value) {
788
+ if (isBlankInput(value)) {
789
+ return [];
790
+ }
791
+ try {
792
+ const jsonObject = JSON.parse(value);
793
+ if (jsonObject instanceof Array) {
794
+ // return newObj.filter(elem => elem.hasOwnProperty('rowgroup') && elem.hasOwnProperty('category') && elem.hasOwnProperty('subcategory'))
795
+ return jsonObject.filter((elem) => !(elem.hasOwnProperty("rowGroup") && elem.hasOwnProperty("category")));
796
+ }
797
+ }
798
+ catch (e) {
799
+ console.error("validatePartOfJsonStr: failed to parse JSON", e);
800
+ }
801
+ return ["Invalid JSON structure"];
802
+ }
803
+ function isValidMeasureType(value) {
804
+ return (value === null || value === void 0 ? void 0 : value.trim().toUpperCase()) in MeasureType;
805
+ }
806
+ /**
807
+ * Validates a measure-scale attribute value.
808
+ * Accepted values: `"_"` (no scaling), SI prefix letters (k, M, G, T, P, E, Z, Y, m, etc.),
809
+ * or auto-detection modes `"GREATEST"` / `"LEAST"`.
810
+ */
811
+ function isValidMeasureScale(value) {
812
+ 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()));
813
+ }
814
+ function isTableCategoryWidth(value) {
815
+ return (value === null || value === void 0 ? void 0 : value.toUpperCase().trim()) in TableCategoryWidth;
816
+ }
817
+ function isTableBarColumnWidth(value) {
818
+ return (value === null || value === void 0 ? void 0 : value.toUpperCase().trim()) in TableBarColumnWidth;
819
+ }
820
+ function validateColumnThereOfJsonStr(value) {
821
+ if (isBlankInput(value)) {
822
+ return [];
823
+ }
824
+ try {
825
+ const jsonObject = JSON.parse(value);
826
+ return jsonObject.filter((elem) => !(elem.hasOwnProperty("scenario") && elem.hasOwnProperty("name") && elem.hasOwnProperty("subGroups")));
827
+ }
828
+ catch (e) {
829
+ console.error("validateColumnThereOfJsonStr: failed to parse JSON", e);
830
+ }
831
+ return ["Invalid JSON structure"];
832
+ }
833
+ function validateStackConfig(value) {
834
+ if (isBlankInput(value)) {
835
+ return [];
836
+ }
837
+ try {
838
+ const config = JSON.parse(value);
839
+ if (typeof config !== "object" || config === null || Array.isArray(config)) {
840
+ return ["stack: must be a JSON object"];
841
+ }
842
+ const errors = [];
843
+ if (!config.hasOwnProperty("by")) {
844
+ errors.push("stack: 'by' is required");
845
+ }
846
+ else {
847
+ const validBy = ["scenarios", "dimensions"];
848
+ if (!validBy.includes(config.by)) {
849
+ errors.push(`stack: 'by' must be one of: ${validBy.join(", ")}`);
850
+ }
851
+ }
852
+ if (config.hasOwnProperty("mode")) {
853
+ const validModes = ["absolute", "relative", "absolute-relative"];
854
+ if (!validModes.includes(config.mode)) {
855
+ errors.push(`stack: 'mode' must be one of: ${validModes.join(", ")}`);
856
+ }
857
+ }
858
+ if (config.hasOwnProperty("order")) {
859
+ const validOrders = ["asc", "desc", "dataset"];
860
+ if (!validOrders.includes(config.order)) {
861
+ errors.push(`stack: 'order' must be one of: ${validOrders.join(", ")}`);
862
+ }
863
+ }
864
+ return errors;
865
+ }
866
+ catch (_e) {
867
+ return ["stack: invalid JSON"];
868
+ }
869
+ }
870
+ /**
871
+ * Checks whether a value is a valid XY chart measure token: a scenario
872
+ * column (`ac1`…`pl4`) or a variance token (`d…`/`dr…`, sentiment suffix
873
+ * optional — spec §4.4 of the scatter/bubble charts).
874
+ */
875
+ function isValidMeasureToken(value) {
876
+ if (isBlankInput(value)) {
877
+ return false;
878
+ }
879
+ return resolveMeasure(value) !== null;
880
+ }
881
+
882
+ class StyleSheet {
883
+ constructor() {
884
+ this.cache = new Map();
885
+ this.tag = StyleSheet.makeStyleTag();
886
+ }
887
+ static makeStyleTag() {
888
+ const tag = document.createElement("style");
889
+ tag.type = "text/css";
890
+ tag.setAttribute("data-bn-computed-style", "");
891
+ tag.append(document.createTextNode(""));
892
+ (document.head || document.querySelector("head")).append(tag);
893
+ return tag;
894
+ }
895
+ apply(data) {
896
+ data.forEach((value) => this.cache.set(value.className, value.style));
897
+ this.tag.innerHTML = Array.from(this.cache.values())
898
+ .map((value) => value)
899
+ .join("\n");
900
+ }
901
+ }
902
+ const styleSheet = new StyleSheet();
903
+
904
+ /* eslint-disable */
905
+ // Inspired by https://github.com/garycourt/murmurhash-js
906
+ // Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86
907
+ function murmur2(str) {
908
+ // 'm' and 'r' are mixing constants generated offline.
909
+ // They're not really 'magic', they just happen to work well.
910
+ // const m = 0x5bd1e995;
911
+ // const r = 24;
912
+ // Initialize the hash
913
+ var h = 0; // Mix 4 bytes at a time into the hash
914
+
915
+ var k,
916
+ i = 0,
917
+ len = str.length;
918
+
919
+ for (; len >= 4; ++i, len -= 4) {
920
+ k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;
921
+ k =
922
+ /* Math.imul(k, m): */
923
+ (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16);
924
+ k ^=
925
+ /* k >>> r: */
926
+ k >>> 24;
927
+ h =
928
+ /* Math.imul(k, m): */
929
+ (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^
930
+ /* Math.imul(h, m): */
931
+ (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
932
+ } // Handle the last few bytes of the input array
933
+
934
+
935
+ switch (len) {
936
+ case 3:
937
+ h ^= (str.charCodeAt(i + 2) & 0xff) << 16;
938
+
939
+ case 2:
940
+ h ^= (str.charCodeAt(i + 1) & 0xff) << 8;
941
+
942
+ case 1:
943
+ h ^= str.charCodeAt(i) & 0xff;
944
+ h =
945
+ /* Math.imul(h, m): */
946
+ (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
947
+ } // Do a few final mixes of the hash to ensure the last few
948
+ // bytes are well-incorporated.
949
+
950
+
951
+ h ^= h >>> 13;
952
+ h =
953
+ /* Math.imul(h, m): */
954
+ (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);
955
+ return ((h ^ h >>> 15) >>> 0).toString(36);
956
+ }
957
+
958
+ const transofrmToUnitString = (value) => {
959
+ if (isValidNumber(value)) {
960
+ return `${value}px`;
961
+ }
962
+ else {
963
+ return value;
964
+ }
965
+ };
966
+ const width = {
967
+ className: "w",
968
+ cssName: "width",
969
+ attrName: "width",
970
+ transform: transofrmToUnitString,
971
+ };
972
+ const height = {
973
+ className: "h",
974
+ cssName: "height",
975
+ attrName: "height",
976
+ transform: transofrmToUnitString,
977
+ };
978
+ const position = {
979
+ className: "pst",
980
+ cssName: "position",
981
+ attrName: "position",
982
+ };
983
+ const top = {
984
+ className: "top",
985
+ cssName: "top",
986
+ attrName: "top",
987
+ transform: transofrmToUnitString,
988
+ };
989
+ const right = {
990
+ className: "rgt",
991
+ cssName: "right",
992
+ attrName: "right",
993
+ transform: transofrmToUnitString,
994
+ };
995
+ const bottom = {
996
+ className: "btm",
997
+ cssName: "bottom",
998
+ attrName: "bottom",
999
+ transform: transofrmToUnitString,
1000
+ };
1001
+ const left = {
1002
+ className: "lft",
1003
+ cssName: "left",
1004
+ attrName: "left",
1005
+ transform: transofrmToUnitString,
1006
+ };
1007
+ const fontSize = {
1008
+ className: "fts",
1009
+ cssName: "font-size",
1010
+ attrName: "font-size",
1011
+ transform: transofrmToUnitString,
1012
+ };
1013
+ const gridColumn = {
1014
+ className: "gdc",
1015
+ cssName: "grid-column",
1016
+ attrName: "grid-column",
1017
+ };
1018
+ const gridRow = {
1019
+ className: "gdr",
1020
+ cssName: "grid-row",
1021
+ attrName: "grid-row",
1022
+ };
1023
+ const attributes = {
1024
+ width: width,
1025
+ height: height,
1026
+ position: position,
1027
+ top: top,
1028
+ right: right,
1029
+ bottom: bottom,
1030
+ left: left,
1031
+ "font-size": fontSize,
1032
+ "grid-column": gridColumn,
1033
+ "grid-row": gridRow,
1034
+ };
1035
+ const attributesNames = Object.keys(attributes);
1036
+ function getClassName(attr, value) {
1037
+ const valueKey = murmur2(value);
1038
+ return `bn-c-${attr.className}_${valueKey}`;
1039
+ }
1040
+ function getStyle(attr, className, value) {
1041
+ return `.${className} {${attr.cssName}: ${value};}`;
1042
+ }
1043
+ function getCSS(attr, value) {
1044
+ const className = getClassName(attr, value);
1045
+ const style = getStyle(attr, className, value);
1046
+ return { className, style };
1047
+ }
1048
+ const apply = (el) => {
1049
+ const map = new Map();
1050
+ //map.set("position", getCSS(attributes["position"], "absolute"))
1051
+ attributesNames.forEach((name) => {
1052
+ const value = el.getAttribute(name);
1053
+ if (value) {
1054
+ if (["top", "left", "right", "bottom"].includes(name)) {
1055
+ map.set("position", getCSS(attributes["position"], "absolute"));
1056
+ }
1057
+ const transform = attributes[name].transform ||
1058
+ function (v) {
1059
+ return v;
1060
+ };
1061
+ map.set(name, getCSS(attributes[name], transform(value)));
1062
+ }
1063
+ });
1064
+ return map;
1065
+ };
1066
+
1067
+ /**
1068
+ * Shared MutationObserver that watches for style-attribute changes on all
1069
+ * subscribed elements. When a monitored attribute changes, it re-applies the
1070
+ * Styletron CSS-in-JS stylesheet and updates the element's className,
1071
+ * preserving any non-`bn-c-` classes.
1072
+ */
1073
+ const observer = new MutationObserver((mutations) => {
1074
+ for (const mutation of mutations) {
1075
+ const el = mutation.target;
1076
+ const map = apply(el);
1077
+ styleSheet.apply(map);
1078
+ const classes = Array.from(map.values()).map((value) => value.className);
1079
+ el.className = el.className
1080
+ .split(" ")
1081
+ .filter((value) => !value.startsWith("bn-c-"))
1082
+ .concat(...classes)
1083
+ .join(" ");
1084
+ forceUpdate(el);
1085
+ }
1086
+ });
1087
+ /**
1088
+ * Registers an element with the Styletron observer: applies the initial
1089
+ * stylesheet, assigns generated `bn-c-*` class names, and begins watching
1090
+ * for attribute mutations that affect styling.
1091
+ */
1092
+ const subscribe = (el) => {
1093
+ const map = apply(el);
1094
+ styleSheet.apply(map);
1095
+ const classes = Array.from(map.values()).map((value) => value.className);
1096
+ el.className = el.className
1097
+ .split(" ")
1098
+ .filter((value) => !value.startsWith("bn-c-"))
1099
+ .concat(...classes)
1100
+ .join(" ");
1101
+ observer.observe(el, { attributes: true, attributeFilter: attributesNames, childList: false, subtree: false });
1102
+ };
1103
+ /**
1104
+ * Mixin that integrates Styletron CSS-in-JS styling into a Stencil component.
1105
+ *
1106
+ * On `connectedCallback`, it subscribes the host element to a shared
1107
+ * MutationObserver that watches for style-related attribute changes. When
1108
+ * attributes change, the Styletron stylesheet is re-applied and the element's
1109
+ * class list is updated with generated `bn-c-*` class names, followed by a
1110
+ * forced re-render.
1111
+ *
1112
+ * @param component - The Stencil component instance
1113
+ */
1114
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1115
+ const withStyled = (component) => {
1116
+ const cstrConnectedCallback = component["connectedCallback"];
1117
+ const cstrDisconnectedCallback = component["disconnectedCallback"];
1118
+ component["connectedCallback"] = () => {
1119
+ const elm = getElement(component);
1120
+ if (elm) {
1121
+ subscribe(elm);
1122
+ }
1123
+ else {
1124
+ throw new Error(`Can't find element field in component ${undefined}`);
1125
+ }
1126
+ runIfExisits(cstrConnectedCallback, component);
1127
+ };
1128
+ component["disconnectedCallback"] = () => {
1129
+ // MutationObserver has no per-element unobserve — the shared observer
1130
+ // automatically stops firing for elements removed from the DOM.
1131
+ runIfExisits(cstrDisconnectedCallback, component);
1132
+ };
1133
+ };
1134
+
1135
+ export { validateColumnThereOfJsonStr as A, validateAttributesJsonStr as B, parseTableAttributeExpression as C, DateDistance as D, validateMeasureList as E, isValidDate as F, isValidDateLink as G, DateLink as H, isValidInteger as a, withComponentStyle as b, isValidMeasureToken as c, isValidDirection as d, isValidBoolean as e, isValidNumber as f, validateScenarioList as g, validateVariancesList as h, isBlankInput as i, isValidLevel as j, isValidMeasureScale as k, validateStackConfig as l, isValidDateFormat as m, isValidAxisLabelsMode as n, murmur2 as o, DateStringFactory as p, validateBarColumnsList as q, isTableBarColumnWidth as r, isValidDataFormat as s, isValidTableType as t, validateThereOfJsonStr as u, validateOrderList as v, withStyled as w, validatePartOfJsonStr as x, isValidMeasureType as y, isTableCategoryWidth as z };