@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,58 @@
1
+ import { LabelCollisionManager } from "../../components/bn-chart-time/utils/helper/LabelCollisionManager";
2
+ import { LabelConfig } from "./model/AxisConfig";
3
+ import { Rect } from "./FacetGrid";
4
+ /** Candidate anchor positions, tried clockwise starting north (IBCS: labels proximate to their marks). */
5
+ export type LabelAnchor = "n" | "ne" | "e" | "se" | "s" | "sw" | "w" | "nw";
6
+ /** A label to place: the mark it belongs to plus the measured text box. */
7
+ export interface LabelCandidate {
8
+ name: string;
9
+ /** Mark center, pixel coordinates. */
10
+ cx: number;
11
+ cy: number;
12
+ /** Mark radius in pixels. */
13
+ r: number;
14
+ /** Measured text box. */
15
+ width: number;
16
+ height: number;
17
+ }
18
+ /** A successfully placed label; `x`/`y` is the label box's top-left corner. */
19
+ export interface PlacedLabel {
20
+ candidate: LabelCandidate;
21
+ x: number;
22
+ y: number;
23
+ anchor: LabelAnchor;
24
+ }
25
+ /** Result of candidate selection. */
26
+ export interface LabelSelection<T> {
27
+ selected: T[];
28
+ /** Names from an explicit `labels.points` list that match no point. */
29
+ unknownNames: string[];
30
+ }
31
+ /**
32
+ * Selective point labeling with greedy collision-free placement for the XY
33
+ * charts. Composes the existing {@link LabelCollisionManager} (AABB
34
+ * register/hasCollision core); marks are pre-registered as bounding
35
+ * squares — conservative for circles, acceptable for label proximity.
36
+ *
37
+ * Placement tries eight anchors clockwise from north and rejects positions
38
+ * that leave the frame or collide with marks or other labels; unplaceable
39
+ * labels are dropped (IBCS wants proximate labels — no leader lines).
40
+ */
41
+ export declare class PointLabeler {
42
+ private readonly frame;
43
+ private readonly gapPx;
44
+ private readonly manager;
45
+ constructor(frame: Rect, gapPx: number, manager?: LabelCollisionManager);
46
+ /** Registers a mark so labels avoid it (bounding-square approximation). */
47
+ registerMark(cx: number, cy: number, r: number): void;
48
+ /**
49
+ * Selects which points receive labels. `items` must be pre-ranked for
50
+ * `"auto"` mode (extremity for scatter, size descending for bubble).
51
+ */
52
+ selectCandidates<T>(items: T[], mode: LabelConfig["points"], max: number, nameOf: (item: T) => string): LabelSelection<T>;
53
+ /** Greedy placement in candidate order; returns only the labels that fit. */
54
+ place(candidates: LabelCandidate[]): PlacedLabel[];
55
+ private anchorBox;
56
+ private insideFrame;
57
+ private bounds;
58
+ }
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Area-true bubble sizing: bubble **area** is proportional to the data
3
+ * value (IBCS), so radius grows with the square root.
4
+ *
5
+ * Two modes:
6
+ * - **Local** (default): radii are normalized to the chart's own maximum
7
+ * value — `r = rMax · √(v / vMax)` with a minimum visible radius.
8
+ * `vMax` must be the max across all panels and both scenario sets of the
9
+ * chart instance (shared size scale, mandatory for comparability).
10
+ * - **Grouped** (`bn-scaling-group`): the group value is interpreted as
11
+ * **area px² per data unit** — `r = √(area · v / π)` with no
12
+ * normalization and no radius caps, so identical values render at
13
+ * identical sizes across every chart referencing the group.
14
+ */
15
+ export declare class RadiusScale {
16
+ private readonly mode;
17
+ private readonly vMax;
18
+ private readonly rMaxPx;
19
+ private readonly rMinPx;
20
+ private readonly areaPerUnitPx2;
21
+ private constructor();
22
+ static local(vMax: number, rMaxPx: number, rMinPx: number): RadiusScale;
23
+ static grouped(areaPerUnitPx2: number): RadiusScale;
24
+ /** Radius in pixels for a size value (values must be >= 0). */
25
+ radius(value: number): number;
26
+ }
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Series color palette and IBCS mark treatments for the XY charts
3
+ * (bn-chart-scatter, bn-chart-bubble).
4
+ *
5
+ * XY charts compose two orthogonal encodings: the **series hue** (which
6
+ * product line / group a point belongs to) and the **scenario treatment**
7
+ * (solid / tinted / hatched / outlined, selected through the rule-set
8
+ * `colorIndex`). Tints and shades are computed colors, never opacity —
9
+ * opacity creates blend artifacts where marks overlap.
10
+ */
11
+ /**
12
+ * Default series palette, assigned by series `*Index` order. The first
13
+ * series uses the near-black IBCS base color.
14
+ */
15
+ export declare const XY_SERIES_PALETTE: string[];
16
+ /**
17
+ * Mixes two hex colors per channel in sRGB space.
18
+ *
19
+ * @param hexA - Base color, `#rrggbb`
20
+ * @param hexB - Mix-in color, `#rrggbb`
21
+ * @param ratioOfB - Portion of `hexB` in the result, 0..1
22
+ */
23
+ export declare function mixHex(hexA: string, hexB: string, ratioOfB: number): string;
24
+ /** Light variant of a series hue (60% white) — the PP/PY treatment. */
25
+ export declare function tint(hex: string): string;
26
+ /** Dark variant of a series hue (25% black) — used for pie-share slices. */
27
+ export declare function shade(hex: string): string;
28
+ /**
29
+ * Resolves the color for a series by its order index. Indices beyond the
30
+ * palette cycle through it with a tint step per cycle; `overflowed` signals
31
+ * that the chart should raise the `xy-series-overflow` warning.
32
+ */
33
+ export declare function resolveSeriesColor(index: number, seriesColors: string[]): {
34
+ color: string;
35
+ overflowed: boolean;
36
+ };
37
+ /** Visual treatment of a single mark (dot or bubble). */
38
+ export interface MarkTreatment {
39
+ /** Fill color. When `hatch` is set the renderer replaces it with a pattern reference. */
40
+ fill: string;
41
+ stroke: string;
42
+ /** Stroke width in pixels. */
43
+ strokeWidth: number;
44
+ /** Dash pattern for the FC dot ring (hatching is illegible at dot size). */
45
+ dasharray?: string;
46
+ /** Bubble FC treatment: fill with a 45° series-hue hatch pattern instead of `fill`. */
47
+ hatch?: boolean;
48
+ }
49
+ /**
50
+ * Maps a rule-set `colorIndex` and a series hue to the IBCS mark treatment.
51
+ *
52
+ * | colorIndex | IBCS meaning | Bubble | Dot |
53
+ * | ---------- | ------------------- | ------------------------------- | ---------------------------- |
54
+ * | 10 (ac) | solid dark | solid hue | solid hue |
55
+ * | 20 (pp/py) | light | tinted hue | tinted hue |
56
+ * | 30 (fc) | hatched | white + hue hatch + hue stroke | white + dashed hue ring |
57
+ * | 50 (pl/bu) | outlined | white + solid hue stroke | white + solid hue ring |
58
+ */
59
+ export declare function markTreatment(colorIndex: number, hue: string, kind: "dot" | "bubble"): MarkTreatment;
@@ -0,0 +1,37 @@
1
+ export declare class VarianceMeasure {
2
+ /** `"d"` = absolute, `"dr"` = relative (fraction of delta). */
3
+ readonly type: "d" | "dr";
4
+ /** Minuend scenario slot, e.g. `"ac1"`. */
5
+ readonly base: string;
6
+ /** Subtrahend scenario slot, e.g. `"pp1"`. */
7
+ readonly delta: string;
8
+ private constructor();
9
+ /** Parses a variance token; returns `null` when the token doesn't match the grammar. */
10
+ static parse(token: string): VarianceMeasure | null;
11
+ /**
12
+ * Computes the variance value, mirroring the null-safe math of the
13
+ * existing charts: absolute = `base - delta`, relative =
14
+ * `(base - delta) / delta`. Returns `null` when either operand is
15
+ * missing or a relative variance would divide by zero.
16
+ */
17
+ compute(base: number | null | undefined, delta: number | null | undefined): number | null;
18
+ }
19
+ /** A resolved axis measure: either a plain scenario slot or a variance. */
20
+ export type MeasureRef = {
21
+ kind: "scenario";
22
+ slot: string;
23
+ } | {
24
+ kind: "variance";
25
+ measure: VarianceMeasure;
26
+ };
27
+ /**
28
+ * Resolves a measure token to a scenario slot or a variance measure.
29
+ * Returns `null` for tokens matching neither vocabulary.
30
+ */
31
+ export declare function resolveMeasure(token: string): MeasureRef | null;
32
+ /**
33
+ * Scenario family (`ac` | `pp` | `fc` | `pl`) of a plain scenario slot.
34
+ */
35
+ export declare function scenarioFamily(slot: string): string;
36
+ /** Slot number (`1`–`4`) of a plain scenario slot. */
37
+ export declare function scenarioSlotNumber(slot: string): string;
@@ -0,0 +1,44 @@
1
+ import { G } from "@svgdotjs/svg.js";
2
+ import { Rect } from "./FacetGrid";
3
+ import { NumericScale } from "./NumericScale";
4
+ import { HighlightRange } from "./model/AxisConfig";
5
+ import { XYChartStyle } from "./model/XYChartStyle";
6
+ /** Tick rendering configuration for one panel. */
7
+ export interface TickRenderConfig {
8
+ ticksX: number[];
9
+ ticksY: number[];
10
+ xDecimals: number;
11
+ yDecimals: number;
12
+ /** Outer-edge panels only (facet grids label outer edges, 10F/10G style). */
13
+ showXLabels: boolean;
14
+ showYLabels: boolean;
15
+ }
16
+ /**
17
+ * Per-panel plot frame for the XY charts: highlight bands, gridlines,
18
+ * reference lines, the frame rectangle, tick labels, and the panel title.
19
+ *
20
+ * Style roles are taken from the `axisStyles` scenario group:
21
+ * `ac` = frame + tick labels, `pp` = gridlines, `fc` = reference lines
22
+ * and iso-curves, `pl` = highlight band fill.
23
+ */
24
+ export declare class XYFrame {
25
+ private readonly xScale;
26
+ private readonly yScale;
27
+ private readonly rect;
28
+ private readonly styles;
29
+ constructor(xScale: NumericScale, yScale: NumericScale, rect: Rect, styles: XYChartStyle);
30
+ private get em();
31
+ private fontFamily;
32
+ /** Shaded bands behind everything; open ends run to the domain edge. */
33
+ drawBands(group: G, xHighlight?: HighlightRange, yHighlight?: HighlightRange): void;
34
+ /** Horizontal gridlines at the y ticks; vertical ones only when `ticksX` is given. */
35
+ drawGrid(group: G, ticksY: number[], ticksX?: number[]): void;
36
+ /** Thin reference lines at the given axis values (10A quadrant crosshair). */
37
+ drawRefLines(group: G, xRef?: number, yRef?: number): void;
38
+ /** The four-sided thin plot frame (as in the IBCS template images). */
39
+ drawFrame(group: G): void;
40
+ /** Tick labels along the outer edges (no tick marks — template style). */
41
+ drawTickLabels(group: G, config: TickRenderConfig): void;
42
+ /** Facet panel title, top-left inside the panel, bold (10F "Europe"/"RoW"). */
43
+ drawPanelTitle(group: G, title: string): void;
44
+ }
@@ -0,0 +1,43 @@
1
+ import { G } from "@svgdotjs/svg.js";
2
+ import { MarkTreatment } from "./SeriesPalette";
3
+ import { XYChartStyle } from "./model/XYChartStyle";
4
+ /** One legend row: a color swatch plus its label. */
5
+ export interface LegendEntry {
6
+ label: string;
7
+ treatment: MarkTreatment;
8
+ }
9
+ /** The legend content of one chart (rendered once, chart-level). */
10
+ export interface LegendModel {
11
+ /** Size-measure caption lines, bubble only (e.g. `["Net sales", "in mEUR"]`). */
12
+ sizeCaption: string[];
13
+ /** Heading above the series entries (e.g. "Product lines"). */
14
+ title: string | null;
15
+ /** Scenario-family entries when a comparison overlay is active (e.g. PY/AC). */
16
+ compareEntries: LegendEntry[];
17
+ /** Series entries, ordered by the series level's `*Index`. */
18
+ entries: LegendEntry[];
19
+ }
20
+ /** Measured legend footprint. */
21
+ export interface LegendSize {
22
+ width: number;
23
+ height: number;
24
+ }
25
+ /**
26
+ * Series-color legend + bubble-size caption for the XY charts
27
+ * (IBCS requires a legend explaining colors — and, for bubbles, size).
28
+ * Positioned by the orchestrator: right column (default) or bottom row.
29
+ */
30
+ export declare class XYLegend {
31
+ private readonly styles;
32
+ constructor(styles: XYChartStyle);
33
+ private get em();
34
+ private get rowHeight();
35
+ private get swatchSize();
36
+ private textWidth;
37
+ private rows;
38
+ /** Footprint of the legend for layout reservation. */
39
+ measure(model: LegendModel, position: "right" | "bottom"): LegendSize;
40
+ /** Draws the legend with its top-left corner at `x`/`y`. */
41
+ draw(group: G, model: LegendModel, x: number, y: number, position: "right" | "bottom"): void;
42
+ private fontFamily;
43
+ }
@@ -0,0 +1,96 @@
1
+ /**
2
+ * Parsed shapes of the XY charts' structured object props (spec: the JSON
3
+ * attribute forms of `x`, `y`, `size`, `share`, `iso`, `labels`, `facet`,
4
+ * `legend`). Facades parse and validate the raw attribute once and pass
5
+ * these typed objects to the inner elements, following the `stackConfig`
6
+ * precedent of bn-chart-time.
7
+ */
8
+ /** Shaded band on one axis; open ends run to the domain edge. */
9
+ export interface HighlightRange {
10
+ from?: number;
11
+ to?: number;
12
+ }
13
+ /** Parsed `x` / `y` prop. */
14
+ export interface AxisConfig {
15
+ /** Scenario-column token (`ac1`…`pl4`) or variance token (`d…`/`dr…`). */
16
+ measure: string;
17
+ label?: string;
18
+ unit?: string;
19
+ min?: number;
20
+ max?: number;
21
+ refLine?: number;
22
+ highlight?: HighlightRange;
23
+ }
24
+ /** Parsed `size` prop (bubble). */
25
+ export interface SizeConfig {
26
+ measure: string;
27
+ label?: string;
28
+ unit?: string;
29
+ /** `bn-scaling-group` name for cross-chart value→area sync. */
30
+ group?: string;
31
+ }
32
+ /** Parsed `share` prop (bubble). */
33
+ export interface ShareConfig {
34
+ measure: string;
35
+ }
36
+ /** Parsed `iso` prop (scatter). */
37
+ export interface IsoConfig {
38
+ values: "auto" | number[];
39
+ label?: string;
40
+ unit?: string;
41
+ /** Shade the region `x·y >= from`. */
42
+ highlight?: {
43
+ from: number;
44
+ };
45
+ }
46
+ /** Parsed `labels` prop. */
47
+ export interface LabelConfig {
48
+ points: "auto" | "none" | "all" | string[];
49
+ /** Bubble only: render the value inside the bubble. */
50
+ values: boolean;
51
+ /** Candidate cap for `points: "auto"`. */
52
+ max: number;
53
+ }
54
+ /** Parsed `facet` prop. */
55
+ export interface FacetConfig {
56
+ level: "rowgroup" | "category";
57
+ /** Wrap width; default: all panels in one row. */
58
+ columns?: number;
59
+ }
60
+ /** Parsed `legend` prop. */
61
+ export interface LegendConfig {
62
+ show: boolean;
63
+ position: "right" | "bottom";
64
+ }
65
+ /** Result of parsing a raw attribute string into an untyped record. */
66
+ export interface ParsedSpec {
67
+ data: Record<string, unknown> | null;
68
+ parseError: boolean;
69
+ }
70
+ /** Result of converting an untyped record into a typed config. */
71
+ export interface SpecResult<T> {
72
+ config: T | null;
73
+ /** Sub-fields present but not part of the spec (forward compat — warning, never error). */
74
+ unknownKeys: string[];
75
+ /** Sub-fields present with an unusable type/value. */
76
+ invalidFields: string[];
77
+ }
78
+ /**
79
+ * Parses a raw object-prop attribute value. A blank value yields `data: null`
80
+ * without error. A value starting with `{` must be valid JSON describing an
81
+ * object. Any other bare string is treated as shorthand for
82
+ * `{ [shorthandKey]: value }` when a shorthand key is allowed, otherwise it
83
+ * is a parse error.
84
+ */
85
+ export declare function parseSpec(raw: string | undefined | null, shorthandKey: string | null): ParsedSpec;
86
+ export declare function toAxisConfig(data: Record<string, unknown>): SpecResult<AxisConfig>;
87
+ export declare function toSizeConfig(data: Record<string, unknown>): SpecResult<SizeConfig>;
88
+ export declare function toShareConfig(data: Record<string, unknown>): SpecResult<ShareConfig>;
89
+ export declare function toIsoConfig(data: Record<string, unknown>): SpecResult<IsoConfig>;
90
+ export declare function toLabelConfig(data: Record<string, unknown>, defaults: {
91
+ points: LabelConfig["points"];
92
+ values: boolean;
93
+ max: number;
94
+ }): SpecResult<LabelConfig>;
95
+ export declare function toFacetConfig(data: Record<string, unknown>): SpecResult<FacetConfig>;
96
+ export declare function toLegendConfig(data: Record<string, unknown>): SpecResult<LegendConfig>;
@@ -0,0 +1,36 @@
1
+ import { IAdapter } from "../../helper/IAdapter";
2
+ /**
3
+ * Proportional scale factors for XY chart elements (scatter and bubble).
4
+ *
5
+ * All values except the `*LineWidth` entries are expressed in **font-size
6
+ * multiples** (em-like units), so the chart scales uniformly when the base
7
+ * font size changes. The chart renderer multiplies each factor by the
8
+ * computed font size to get pixel dimensions. Line widths are absolute
9
+ * pixel values (hairlines must not scale with the font).
10
+ */
11
+ export declare class ScaleFactorsXYChart {
12
+ /** Radius of a scatter point. */
13
+ pointRadius: number;
14
+ /** Maximum bubble radius in local (vMax-normalized) sizing mode. */
15
+ bubbleMaxRadius: number;
16
+ /** Minimum visible bubble radius in local sizing mode. */
17
+ bubbleMinRadius: number;
18
+ /** Length of axis tick marks. */
19
+ axisTickLength: number;
20
+ /** Gap between a mark (dot/bubble) and its name label. */
21
+ labelToMark: number;
22
+ /** Diameter of a legend color swatch. */
23
+ legendSwatch: number;
24
+ /** Gap between facet panels. */
25
+ panelGap: number;
26
+ /** Stroke width of reference lines, in pixels. */
27
+ refLineWidth: number;
28
+ /** Stroke width of gridlines and the plot frame, in pixels. */
29
+ gridLineWidth: number;
30
+ constructor();
31
+ }
32
+ /** Converts untyped JSON into a validated {@link ScaleFactorsXYChart}. */
33
+ export declare class ScaleFactorsXYChartAdapter implements IAdapter<ScaleFactorsXYChart> {
34
+ adapt(data: Record<string, unknown>): ScaleFactorsXYChart;
35
+ default(): ScaleFactorsXYChart;
36
+ }
@@ -0,0 +1,157 @@
1
+ import { DateTime } from "luxon";
2
+ import { IAdapter } from "../../helper/IAdapter";
3
+ import { MeasureRef } from "../VarianceMeasure";
4
+ /**
5
+ * IBCS-compliant data row for XY (scatter/bubble) chart visualizations.
6
+ *
7
+ * Same schema as {@link StructureChartDataRow}: the full dimension hierarchy
8
+ * plus the 16 scenario value slots. `date` is parsed but unused (reserved),
9
+ * there are no `setName` semantics. `_`-prefixed passthrough columns are
10
+ * retained on the row (engine convention) but unused by v1 rendering;
11
+ * `<slot>_cnt` columns feed the variance no-data rule.
12
+ */
13
+ export declare class XYChartDataRow {
14
+ date?: DateTime | null | undefined;
15
+ operation: string;
16
+ rowGroup: string | null | undefined;
17
+ rowGroupIndex: number | null | undefined;
18
+ category: string | null | undefined;
19
+ categoryIndex: number | null | undefined;
20
+ subCategory: string | null | undefined;
21
+ subCategoryIndex: number | null | undefined;
22
+ columnGroup: string | null | undefined;
23
+ columnGroupIndex: number | null | undefined;
24
+ columnSubGroup: string | null | undefined;
25
+ columnSubGroupIndex: number | null | undefined;
26
+ ac1: number | null | undefined;
27
+ ac2: number | null | undefined;
28
+ ac3: number | null | undefined;
29
+ ac4: number | null | undefined;
30
+ pp1: number | null | undefined;
31
+ pp2: number | null | undefined;
32
+ pp3: number | null | undefined;
33
+ pp4: number | null | undefined;
34
+ fc1: number | null | undefined;
35
+ fc2: number | null | undefined;
36
+ fc3: number | null | undefined;
37
+ fc4: number | null | undefined;
38
+ pl1: number | null | undefined;
39
+ pl2: number | null | undefined;
40
+ pl3: number | null | undefined;
41
+ pl4: number | null | undefined;
42
+ /** `_`-prefixed passthrough columns, retained but unused by v1 rendering. */
43
+ custom: Record<string, unknown>;
44
+ /** `<slot>_cnt` columns: non-null value counts used by the variance no-data rule. */
45
+ counts: Record<string, number>;
46
+ constructor();
47
+ /** Value of a scenario slot, `null`-normalized. */
48
+ slotValue(slot: string): number | null;
49
+ /** True when the slot's `_cnt` column reports zero non-null source values. */
50
+ slotHasNoData(slot: string): boolean;
51
+ }
52
+ /**
53
+ * Converts untyped JSON records into validated {@link XYChartDataRow}
54
+ * instances. Only assigns fields that pass {@link CompareUtil} type guards,
55
+ * so malformed input data is silently dropped and defaults are preserved.
56
+ */
57
+ export declare class XYChartDataRowAdapter implements IAdapter<XYChartDataRow> {
58
+ adapt(data: Record<string, unknown>): XYChartDataRow;
59
+ default(): XYChartDataRow;
60
+ }
61
+ /** Hierarchy level a point identity can live on. */
62
+ export type PointLevel = "rowGroup" | "category" | "subCategory";
63
+ /** Hierarchy level series/facets can live on. */
64
+ export type GroupLevel = "rowGroup" | "category";
65
+ /** The measures mapped onto the chart. */
66
+ export interface XYMeasures {
67
+ x: MeasureRef;
68
+ y: MeasureRef;
69
+ size?: MeasureRef;
70
+ share?: MeasureRef;
71
+ }
72
+ export interface XYResolveOptions {
73
+ pointLevel: PointLevel;
74
+ /** `null` = single series. */
75
+ seriesLevel: GroupLevel | null;
76
+ /** `null` = no facet panels. */
77
+ facetLevel: GroupLevel | null;
78
+ measures: XYMeasures;
79
+ /** Comparison scenario family (bubble `compareWith`), e.g. `"pp"`. */
80
+ compareFamily?: string | null;
81
+ /** Explicit axis domain overrides; points outside are excluded. */
82
+ domains?: {
83
+ x?: {
84
+ min?: number;
85
+ max?: number;
86
+ };
87
+ y?: {
88
+ min?: number;
89
+ max?: number;
90
+ };
91
+ };
92
+ /** 0 = unlimited; applies per facet panel. */
93
+ limit: number;
94
+ /** `"size"`: top-N by size (bubble); `"order"`: first N rows (scatter). */
95
+ limitBy: "size" | "order";
96
+ }
97
+ /** Comparison-scenario values of a point (same slot numbers, other family). */
98
+ export interface XYComparePoint {
99
+ x: number;
100
+ y: number;
101
+ size?: number;
102
+ }
103
+ /** One resolved, renderable point. */
104
+ export interface XYPoint {
105
+ name: string;
106
+ seriesKey: string;
107
+ facetKey: string;
108
+ x: number;
109
+ y: number;
110
+ size?: number;
111
+ share?: number;
112
+ compare?: XYComparePoint | null;
113
+ row: XYChartDataRow;
114
+ }
115
+ export interface XYSeries {
116
+ key: string;
117
+ /** Order rank (0-based) following the series level's `*Index` sort keys. */
118
+ index: number;
119
+ }
120
+ export interface XYFacet {
121
+ key: string;
122
+ points: XYPoint[];
123
+ }
124
+ export interface XYWarningRecord {
125
+ code: string;
126
+ data: Record<string, string>;
127
+ }
128
+ export interface XYExtents {
129
+ xMin: number;
130
+ xMax: number;
131
+ yMin: number;
132
+ yMax: number;
133
+ /** Max size value across primary and comparison sets (shared bubble scale). */
134
+ sizeMax: number;
135
+ }
136
+ export interface ResolvedXYData {
137
+ /** Facet panels ordered by the facet level's `*Index`. Single unnamed facet when no facet level. */
138
+ facets: XYFacet[];
139
+ /** Series ordered by the series level's `*Index`. Single unnamed series when no series level. */
140
+ series: XYSeries[];
141
+ /** `null` when there are no points. */
142
+ extents: XYExtents | null;
143
+ warnings: XYWarningRecord[];
144
+ totalPoints: number;
145
+ }
146
+ /** Points above this budget raise the `xy-point-budget` warning (spec §10). */
147
+ export declare const XY_POINT_BUDGET = 5000;
148
+ /**
149
+ * Resolves adapted rows into facets, series, and renderable points —
150
+ * the shared data pipeline of both XY orchestrators.
151
+ *
152
+ * One row = one point. Duplicate identities (same facet + point name) keep
153
+ * the first row (deterministic) and raise `xy-duplicate-point`. There is no
154
+ * implicit aggregation — axes are frequently ratios where SUM is wrong; the
155
+ * DataSet SQL is the aggregation surface.
156
+ */
157
+ export declare function resolveXYData(rows: XYChartDataRow[], opts: XYResolveOptions): ResolvedXYData;
@@ -0,0 +1,31 @@
1
+ import { IAdapter } from "../../helper/IAdapter";
2
+ import { FontStyle, FontStyleAdapter } from "../../model/styles/FontStyle";
3
+ import { Padding, PaddingAdapter } from "../../model/styles/Padding";
4
+ import { SVGStyleGroup, SVGStyleGroupAdapter } from "../../model/styles/SVGStyleGroup";
5
+ import { ScaleFactorsXYChart, ScaleFactorsXYChartAdapter } from "./ScaleFactorsXYChart";
6
+ /**
7
+ * Aggregates all style configuration for an XY chart (scatter/bubble):
8
+ * scale factors, fonts, axis styles, the series color palette, and padding.
9
+ *
10
+ * The analog of {@link TimeChartStyle} with `seriesColors` in place of
11
+ * `stackColors` and no variance styles (variance measures position points,
12
+ * they don't color them).
13
+ */
14
+ export declare class XYChartStyle {
15
+ scaleFactors: ScaleFactorsXYChart;
16
+ fontStyles: FontStyle;
17
+ axisStyles: SVGStyleGroup;
18
+ padding: Padding;
19
+ seriesColors: string[];
20
+ constructor(scaleFactors: ScaleFactorsXYChart, fontStyles: FontStyle, axisStyles: SVGStyleGroup, padding: Padding);
21
+ }
22
+ /** Adapts raw componentStyle JSON into an XYChartStyle, falling back to defaults for missing properties. */
23
+ export declare class XYChartStylesAdapter implements IAdapter<XYChartStyle> {
24
+ private scaleFactorsXYChartAdapter;
25
+ private fontStyleAdapter;
26
+ private svgStyleGroupAdapter;
27
+ private paddingAdapter;
28
+ constructor(scaleFactorsXYChartAdapter: ScaleFactorsXYChartAdapter, fontStyleAdapter: FontStyleAdapter, svgStyleGroupAdapter: SVGStyleGroupAdapter, paddingAdapter: PaddingAdapter);
29
+ adapt(data: Record<string, unknown>): XYChartStyle;
30
+ default(): XYChartStyle;
31
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bino-bi/bn-template-engine",
3
- "version": "1.0.0-alpha.9",
3
+ "version": "1.0.0-next.20",
4
4
  "description": "IBCS-compliant web components for business intelligence tables and charts",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -42,19 +42,20 @@
42
42
  "@stencil/sass": "^3.2.3",
43
43
  "@stencil/store": "^2.2.2",
44
44
  "@types/jest": "^29.5.14",
45
+ "@types/luxon": "^3.7.1",
45
46
  "eslint": "^10.0.2",
46
47
  "eslint-config-prettier": "^10.1.8",
47
48
  "husky": "^9.1.7",
48
49
  "jest": "^29.7.0",
49
50
  "jest-cli": "^29.7.0",
50
- "lint-staged": "^16.3.1",
51
+ "lint-staged": "^17.0.8",
51
52
  "prettier": "^3.8.1",
52
- "puppeteer": "24.37.5",
53
+ "puppeteer": "25.3.0",
53
54
  "standard-version": "^9.5.0",
54
55
  "typescript": "^5.9.3",
55
56
  "typescript-eslint": "^8.56.1"
56
57
  },
57
- "license": "MIT",
58
+ "license": "Apache-2.0",
58
59
  "dependencies": {
59
60
  "@corex/deepmerge": "^4.0.43",
60
61
  "@emotion/hash": "^0.9.2",
package/readme.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  IBCS-compliant web components for business intelligence visualizations.
4
4
 
5
- [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
5
+ [![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](LICENSE)
6
6
  [![npm version](https://img.shields.io/npm/v/@bino-bi/bn-template-engine)](https://www.npmjs.com/package/@bino-bi/bn-template-engine)
7
7
 
8
8
  **bn-template-engine** is a [Stencil.js](https://stenciljs.com/) web component library that renders tables and charts following [IBCS (International Business Communication Standards)](https://www.ibcs.com/). It supports multi-scenario comparisons (actual, forecast, plan, previous period), variance calculations, hierarchical data grouping, and more — all as standard Web Components that work in any HTML page or framework.
@@ -60,8 +60,8 @@ This renders an IBCS-compliant table comparing actual vs. plan revenue with an a
60
60
  Data flows through three layers:
61
61
 
62
62
  ```
63
- bn-datasource → bn-dataset → Visualization (bn-table, bn-chart-time, bn-chart-structure)
64
- (raw JSON) (SQL query) (renders IBCS output)
63
+ bn-datasource → bn-dataset → Visualization (bn-table, bn-chart-time, bn-chart-structure,
64
+ (raw JSON) (SQL query) bn-chart-scatter, bn-chart-bubble — renders IBCS output)
65
65
  ```
66
66
 
67
67
  1. **`<bn-datasource>`** — Receives raw JSON data and stores it by name
@@ -83,7 +83,9 @@ All components must be wrapped in a **`<bn-context>`** element, which provides s
83
83
  │ ├── <bn-body> Content area
84
84
  │ │ ├── <bn-table> Data table
85
85
  │ │ ├── <bn-chart-time> Time series chart
86
- │ │ └── <bn-chart-structure> Structure chart
86
+ │ │ ├── <bn-chart-structure> Structure chart
87
+ │ │ ├── <bn-chart-scatter> XY scattergram (IBCS C09)
88
+ │ │ └── <bn-chart-bubble> Bubble portfolio chart (IBCS C10)
87
89
  │ └── <bn-footer> Footer
88
90
  │
89
91
  └── <bn-template> Multi-page wrapper (optional)
@@ -106,6 +108,8 @@ All components must be wrapped in a **`<bn-context>`** element, which provides s
106
108
  | [`<bn-table>`](src/components/bn-table/readme.md) | IBCS data table with grouping, drill-down, and variances |
107
109
  | [`<bn-chart-time>`](src/components/bn-chart-time/readme.md) | Time series bar/line chart |
108
110
  | [`<bn-chart-structure>`](src/components/bn-chart-structure/readme.md) | Categorical/structural bar chart |
111
+ | [`<bn-chart-scatter>`](src/components/bn-chart-scatter/readme.md) | XY scattergram with iso-lines and highlight bands (IBCS C09) |
112
+ | [`<bn-chart-bubble>`](src/components/bn-chart-bubble/readme.md) | Area-true bubble chart with scenario overlay and pie shares (IBCS C10) |
109
113
 
110
114
  ### Layout
111
115
 
@@ -160,4 +164,4 @@ bn-template-engine uses standard [Web Components](https://developer.mozilla.org/
160
164
 
161
165
  ## License
162
166
 
163
- [MIT](LICENSE)
167
+ [Apache 2.0](LICENSE)