@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,70 @@
1
+ import { IAdapter } from "../../../../utils/helper/IAdapter";
2
+ import { FontStyle, FontStyleAdapter } from "../../../../utils/model/styles/FontStyle";
3
+ import { Padding, PaddingAdapter } from "../../../../utils/model/styles/Padding";
4
+ import { SVGStyleGroup, SVGStyleGroupAdapter } from "../../../../utils/model/styles/SVGStyleGroup";
5
+ import { SVGVariancesStyleGroup, SVGVariancesStyleGroupAdapter } from "../../../../utils/model/styles/SVGVariancesStyleGroup";
6
+ /**
7
+ * Proportional scale factors for bullet graph elements.
8
+ *
9
+ * All values except the `*LineWidth` entries are expressed in **font-size
10
+ * multiples** (em-like units), so the chart scales uniformly when the base
11
+ * font size changes. Line widths are absolute pixel values (hairlines must
12
+ * not scale with the font).
13
+ */
14
+ export declare class ScaleFactorsBulletChart {
15
+ /** Height of one KPI row. */
16
+ rowHeight: number;
17
+ /** Height of the actual-value bar. */
18
+ barHeight: number;
19
+ /** Height of the integrated variance bar overlay. */
20
+ varianceHeight: number;
21
+ /** Height of a per-row target tick (classic mode). */
22
+ targetTickHeight: number;
23
+ /** Stroke width of the shared target line, in pixels. */
24
+ targetLineWidth: number;
25
+ /** Stroke width of the baseline axis, in pixels. */
26
+ axisLineWidth: number;
27
+ /** Gap between a bar end and its value label. */
28
+ labelToBar: number;
29
+ /** Gap between the category label column and the baseline axis. */
30
+ labelToAxis: number;
31
+ /** Length of axis tick marks (classic mode). */
32
+ axisTickLength: number;
33
+ /** Height of the per-row tick-label strip (classic mode). */
34
+ tickStripHeight: number;
35
+ constructor();
36
+ }
37
+ /** Converts untyped JSON into a validated {@link ScaleFactorsBulletChart}. */
38
+ export declare class ScaleFactorsBulletChartAdapter implements IAdapter<ScaleFactorsBulletChart> {
39
+ adapt(data: Record<string, unknown>): ScaleFactorsBulletChart;
40
+ default(): ScaleFactorsBulletChart;
41
+ }
42
+ /**
43
+ * Aggregates all style configuration for a bullet graph: scale factors,
44
+ * fonts, scenario colors, variance colors, range-band grays, and padding.
45
+ *
46
+ * The analog of {@link StructureChartStyle} with `rangeColors` (the max two
47
+ * qualitative band grays) in place of `stackColors` and no fill patterns
48
+ * (the FC target treatment uses a dashed stroke, not hatching).
49
+ */
50
+ export declare class BulletChartStyle {
51
+ scaleFactors: ScaleFactorsBulletChart;
52
+ fontStyles: FontStyle;
53
+ axisStyles: SVGStyleGroup;
54
+ barStyles: SVGStyleGroup;
55
+ varianceStyles: SVGVariancesStyleGroup;
56
+ padding: Padding;
57
+ rangeColors: string[];
58
+ constructor(scaleFactors: ScaleFactorsBulletChart, fontStyles: FontStyle, axisStyles: SVGStyleGroup, barStyles: SVGStyleGroup, varianceStyles: SVGVariancesStyleGroup, padding: Padding);
59
+ }
60
+ /** Adapts raw componentStyle JSON into a BulletChartStyle, falling back to defaults for missing properties. */
61
+ export declare class BulletChartStylesAdapter implements IAdapter<BulletChartStyle> {
62
+ private scaleFactorsBulletChartAdapter;
63
+ private fontStyleAdapter;
64
+ private svgStyleGroupAdapter;
65
+ private svgVariancesStyleGroupAdapter;
66
+ private paddingAdapter;
67
+ constructor(scaleFactorsBulletChartAdapter: ScaleFactorsBulletChartAdapter, fontStyleAdapter: FontStyleAdapter, svgStyleGroupAdapter: SVGStyleGroupAdapter, svgVariancesStyleGroupAdapter: SVGVariancesStyleGroupAdapter, paddingAdapter: PaddingAdapter);
68
+ adapt(data: Record<string, unknown>): BulletChartStyle;
69
+ default(): BulletChartStyle;
70
+ }
@@ -0,0 +1,43 @@
1
+ import { SpecResult } from "../../../../utils/xy/model/AxisConfig";
2
+ /**
3
+ * Parsed shapes of the bullet graph's structured object props (spec: the
4
+ * JSON attribute forms of `actual`, `target`, `labels`, and the JSON array
5
+ * form of `ranges`). The facade parses and validates the raw attributes once
6
+ * and passes these typed objects to the inner element, following the
7
+ * `AxisConfig` precedent of the XY charts.
8
+ */
9
+ /** Parsed `actual` / `target` prop. */
10
+ export interface BulletMeasureConfig {
11
+ /** Scenario-column token (`ac1`…`pl4`). Variance tokens are not allowed. */
12
+ measure: string;
13
+ label?: string;
14
+ unit?: string;
15
+ }
16
+ /** Parsed `labels` prop. */
17
+ export interface BulletLabelConfig {
18
+ show: "auto" | "none";
19
+ /** Decimal places of the value labels. */
20
+ decimals: number;
21
+ }
22
+ /** Result of parsing the raw `ranges` attribute. */
23
+ export interface ParsedRanges {
24
+ /** Ascending fractions of the target, at most two entries. */
25
+ ranges: number[];
26
+ parseError: boolean;
27
+ /** Human-readable problems that were repaired (unsorted, too many entries). */
28
+ issues: string[];
29
+ }
30
+ export declare function toBulletMeasureConfig(data: Record<string, unknown>): SpecResult<BulletMeasureConfig>;
31
+ export declare function toBulletLabelConfig(data: Record<string, unknown>, defaults: {
32
+ show: BulletLabelConfig["show"];
33
+ decimals: number;
34
+ }): SpecResult<BulletLabelConfig>;
35
+ /**
36
+ * Parses the raw `ranges` attribute value. A blank value yields no ranges
37
+ * without error. Anything else must be a JSON array of positive numbers —
38
+ * ascending fractions of the target, e.g. `[0.6, 0.9]`. `parseSpec` cannot
39
+ * be used here because it rejects top-level JSON arrays. Unsorted input is
40
+ * sorted and more than two entries are truncated; both repairs are reported
41
+ * as issues.
42
+ */
43
+ export declare function parseRanges(raw: string | undefined | null): ParsedRanges;
@@ -0,0 +1,2 @@
1
+ export * from "./BulletChartStyle";
2
+ export * from "./BulletConfig";
@@ -0,0 +1,172 @@
1
+ import { AxisConfig, FacetConfig, LabelConfig, LegendConfig, SpecResult } from "../../utils/xy/model/AxisConfig";
2
+ import { GroupLevel, PointLevel } from "../../utils/xy/model/XYChartDataRow";
3
+ import { XYChartStyle } from "../../utils/xy/model/XYChartStyle";
4
+ /**
5
+ * SVG scattergram following IBCS template C09.
6
+ *
7
+ * Subscribes to a dataset (via `withDataset`) and renders an XY point cloud
8
+ * with series hues, selective labels, highlight bands, and hyperbolic
9
+ * iso-lines (`x·y = k`). The heavy SVG rendering is performed by the inner
10
+ * `ibcs-chart-scatter` element; this facade validates props, resolves
11
+ * auto-detected metadata, and computes styles.
12
+ */
13
+ export declare class ChartScatter {
14
+ private element;
15
+ /** Active dataset name (the last subscribed dataset to fire `onUpdate`). */
16
+ private datasetName;
17
+ /** Bumped on every data update so Stencil re-renders even when the name is unchanged. */
18
+ private dataVersion;
19
+ private datasetMeta;
20
+ private appliedScaleFactor;
21
+ private readonly t;
22
+ private readonly componentStyle;
23
+ private readonly ruleSetConfig;
24
+ private readonly errors;
25
+ private layoutObserver;
26
+ /** Ids of currently-active blocking errors — the chart renders empty while any is set. */
27
+ private readonly activeErrors;
28
+ /**
29
+ * Name of a registered IBCS rule set (see `bn-ruleset`) used for scenario
30
+ * treatments and display names. Supports `"inherited-closest"` /
31
+ * `"inherited-page"` to take over the value from an ancestor
32
+ * `bn-layout-card` / `bn-layout-page`.
33
+ */
34
+ ruleset?: string;
35
+ /**
36
+ * Custom chart title
37
+ */
38
+ chartTitle: string;
39
+ /**
40
+ * AlaSQL WHERE clause fragment injected into the data query to filter
41
+ * rows before rendering (e.g. `"rowGroup = 'Revenue'"`).
42
+ */
43
+ filter: string;
44
+ /**
45
+ * X axis mapping. JSON object (`AxisSpec`) or a bare measure token as
46
+ * shorthand: `{"measure":"ac1","label":"Margin","unit":"%","min":0,
47
+ * "max":40,"refLine":0.5,"highlight":{"from":30}}`. The measure is a
48
+ * scenario column (`ac1`…`pl4`) or a variance token (`d…`/`dr…`,
49
+ * sentiment suffix optional).
50
+ */
51
+ x: string;
52
+ validateX(newValue: string): void;
53
+ /**
54
+ * Y axis mapping — same shape as `x`.
55
+ */
56
+ y: string;
57
+ validateY(newValue: string): void;
58
+ /**
59
+ * Hyperbolic iso-lines `x·y = k` (IBCS 09C/09D). JSON object:
60
+ * `{"values":"auto"|[1,2,3],"label":"Gross profit","unit":"mUSD",
61
+ * "highlight":{"from":3}}`. Requires a strictly positive plot domain.
62
+ */
63
+ iso: string;
64
+ validateIso(newValue: string): void;
65
+ /**
66
+ * Point identity level: `auto` (deepest populated level from the dataset
67
+ * meta), `category`, or `subcategory`.
68
+ */
69
+ level: string;
70
+ validateLevel(newValue: string): void;
71
+ /**
72
+ * Series (color) grouping level: `auto` (parent of the point level),
73
+ * `rowgroup`, `category`, or `none` (single series).
74
+ */
75
+ seriesLevel: string;
76
+ validateSeriesLevel(newValue: string): void;
77
+ /**
78
+ * Small-multiple panels (IBCS 10E/10F/10G style). JSON object:
79
+ * `{"level":"rowgroup"|"category","columns":6}`. The facet level must sit
80
+ * above the series level in the hierarchy.
81
+ */
82
+ facet: string;
83
+ validateFacet(newValue: string): void;
84
+ /**
85
+ * Point labeling. JSON object: `{"points":"auto"|"none"|"all"|["VAB"],
86
+ * "max":12}` (IBCS requires selective, proximate labels).
87
+ */
88
+ labels: string;
89
+ validateLabels(newValue: string): void;
90
+ /**
91
+ * Series-color legend. JSON object: `{"show":true,"position":"right"|"bottom"}`.
92
+ */
93
+ legend: string;
94
+ validateLegend(newValue: string): void;
95
+ /**
96
+ * Plot aspect ratio as `"w:h"` (default `"16:9"`). XY charts have no
97
+ * data-driven height; this is the explicit height control.
98
+ */
99
+ aspect: string;
100
+ validateAspect(newValue: string): void;
101
+ /**
102
+ * Maximum number of points per panel (0 = unlimited). Scatter keeps the
103
+ * first N rows in dataset order.
104
+ */
105
+ limit: number;
106
+ validateLimit(newValue: number): void;
107
+ /**
108
+ * Font-size auto-fit: `""`/`auto` shrink to the parent width (with/without
109
+ * a warning), `none` disables, a number applies a fixed factor.
110
+ */
111
+ scale?: string;
112
+ validateScale(newValue: string): void;
113
+ constructor();
114
+ componentWillLoad(): void;
115
+ private _autoScaleGuard;
116
+ private _lastObservedWidth;
117
+ componentDidRender(): void;
118
+ componentDidLoad(): void;
119
+ disconnectedCallback(): void;
120
+ /** Default label behavior differs between scatter (`auto`) and bubble (`all`). */
121
+ protected labelDefaults(): {
122
+ points: LabelConfig["points"];
123
+ values: boolean;
124
+ max: number;
125
+ };
126
+ /** Sets or clears a blocking error (type `error`) with a stable id. */
127
+ private setBlockingError;
128
+ private hasBlockingErrors;
129
+ /** Shared validator for the x/y axis props. */
130
+ protected validateAxisSpec(prop: "x" | "y" | "size" | "share", raw: string): void;
131
+ /** Shared validator for optional object props (iso/facet/labels/legend/…). */
132
+ protected validateObjectSpec<T>(prop: string, raw: string, shorthandKey: string | null, convert: (data: Record<string, unknown>) => SpecResult<T>): void;
133
+ /** Unknown sub-fields → warning, never error (forward compatibility). */
134
+ private reportSpecIssues;
135
+ protected prepareAxis(prop: "x" | "y", raw: string): AxisConfig | null;
136
+ private prepareIso;
137
+ protected prepareLabels(): LabelConfig;
138
+ protected prepareLegend(): LegendConfig;
139
+ protected prepareFacet(): FacetConfig | null;
140
+ /** Point identity level; `auto` resolves to the dataset's deepest populated level. */
141
+ protected preparePointLevel(): PointLevel;
142
+ /** Series level; `auto` resolves to the parent of the point level. */
143
+ protected prepareSeriesLevel(pointLevel: PointLevel): GroupLevel | null;
144
+ /**
145
+ * Cross-prop checks that need several parsed props at once: the scenario
146
+ * family of all mapped measures and the facet > series > point level
147
+ * order. Runs while preparing the template (stable-id add/remove).
148
+ */
149
+ protected validateCrossProp(measures: (string | undefined)[], facet: FacetConfig | null): void;
150
+ private parseAspect;
151
+ protected prepareAspect(): number;
152
+ protected prepareLimit(): number;
153
+ /** Local i18n keys handed to the inner element (bubble adds its legend keys). */
154
+ protected i18nLocalKeys(): string[];
155
+ protected prepareI18n(): Map<string, string>;
156
+ protected prepareStyle(): XYChartStyle;
157
+ protected getEffectiveScaleFactor(): number;
158
+ private getFontStyles;
159
+ /** Facade-bound translator handed to the inner element for warning messages. */
160
+ private readonly translateForInner;
161
+ /**
162
+ * Dataset field map for the editor-companion: hierarchy fields plus the
163
+ * 16 scenario slots; descriptions of currently-mapped slots reflect the
164
+ * live mapping (e.g. `ac1 → "x: Margin"`).
165
+ */
166
+ getDataStructure(): any;
167
+ /** Mapped measure-carrying configs by prop name (overridden by the bubble chart). */
168
+ protected mappedAxes(): Record<string, AxisConfig | null>;
169
+ protected dataStructureName(): string;
170
+ protected chartTemplate(): any;
171
+ render(): any;
172
+ }
@@ -0,0 +1,53 @@
1
+ import { RuleSetConfig } from "../../stores/ruleSets";
2
+ import { ErrorDispatcher } from "../../utils/withHasError";
3
+ import { AxisConfig, FacetConfig, IsoConfig, LabelConfig, LegendConfig } from "../../utils/xy/model/AxisConfig";
4
+ import { GroupLevel, PointLevel } from "../../utils/xy/model/XYChartDataRow";
5
+ import { XYChartStyle } from "../../utils/xy/model/XYChartStyle";
6
+ /**
7
+ * Inner presentational element of `bn-chart-scatter`: owns the
8
+ * {@link ScatterChart} orchestrator and emits its SVG string. All props
9
+ * arrive validated and parsed from the facade.
10
+ */
11
+ export declare class IbcsChartScatter {
12
+ element: HTMLElement;
13
+ /** Name of the dataset (table or view in the scoped alasql database). */
14
+ tableName: string;
15
+ /** Bumped by the facade when the dataset changes; triggers re-render. */
16
+ dataVersion: number;
17
+ chartTitle: string;
18
+ x: AxisConfig;
19
+ y: AxisConfig;
20
+ iso: IsoConfig | null;
21
+ labels: LabelConfig;
22
+ legend: LegendConfig;
23
+ facet: FacetConfig | null;
24
+ pointLevel: PointLevel;
25
+ seriesLevel: GroupLevel | null;
26
+ /** Plot aspect ratio, width/height. */
27
+ aspect: number;
28
+ limit: number;
29
+ filter: string;
30
+ styles: XYChartStyle | undefined;
31
+ i18n: Map<string, string>;
32
+ containerWidth: number;
33
+ ruleSetConfig?: RuleSetConfig;
34
+ /** The facade's error dispatcher — data warnings are synced through it (stable ids). */
35
+ errors?: ErrorDispatcher;
36
+ /** Facade-bound translator for warning messages (resolves `.key` in the facade's namespace). */
37
+ translate?: (key: string, data?: object) => string;
38
+ private chart;
39
+ private svgMarkup;
40
+ private stores;
41
+ private getDb;
42
+ componentWillLoad(): void;
43
+ componentWillUpdate(): void;
44
+ private rebuild;
45
+ /**
46
+ * Syncs the orchestrator's data warnings to the facade's dispatcher.
47
+ * Walks the full fixed code list so cleared warnings are removed again
48
+ * (addOrReplace/remove discipline, stable ids).
49
+ */
50
+ private syncWarnings;
51
+ private prepareStyle;
52
+ render(): any;
53
+ }
@@ -0,0 +1,66 @@
1
+ import { AlaSQLDatabase } from "../../../context/scopedDb";
2
+ import { IBCSRuleSet } from "../../../utils/ibcsRuleSet";
3
+ import { AxisConfig, FacetConfig, IsoConfig, LabelConfig, LegendConfig } from "../../../utils/xy/model/AxisConfig";
4
+ import { GroupLevel, PointLevel, XYWarningRecord } from "../../../utils/xy/model/XYChartDataRow";
5
+ import { XYChartStyle } from "../../../utils/xy/model/XYChartStyle";
6
+ /** Prepared configuration handed to the scatter orchestrator by the inner element. */
7
+ export interface ScatterChartConfig {
8
+ chartTitle: string;
9
+ x: AxisConfig;
10
+ y: AxisConfig;
11
+ iso: IsoConfig | null;
12
+ labels: LabelConfig;
13
+ legend: LegendConfig;
14
+ facet: FacetConfig | null;
15
+ pointLevel: PointLevel;
16
+ seriesLevel: GroupLevel | null;
17
+ /** Plot aspect ratio as width/height (16:9 → 16/9). */
18
+ aspect: number;
19
+ limit: number;
20
+ }
21
+ /**
22
+ * SVG orchestrator for `bn-chart-scatter` (IBCS template C09).
23
+ *
24
+ * Pipeline per render: adapt rows → resolve facets/series/points → resolve
25
+ * shared scales → per panel: bands → iso → refLines → frame → dots →
26
+ * labels → tick labels → panel title; then the legend and chart title.
27
+ * The SVG is built on a detached `Svg` root and emitted via `toString()`.
28
+ */
29
+ export declare class ScatterChart {
30
+ private readonly ruleSet;
31
+ private readonly config;
32
+ readonly styles: XYChartStyle;
33
+ private readonly availableWidth;
34
+ private data;
35
+ private warnings;
36
+ private canvasHeight;
37
+ constructor(ruleSet: IBCSRuleSet, db: AlaSQLDatabase, fromExpr: string, config: ScatterChartConfig, styles: XYChartStyle, availableWidth: number);
38
+ private get em();
39
+ private fontFamily;
40
+ private textWidth;
41
+ private drawText;
42
+ hasNoData(): boolean;
43
+ /** Warnings collected during data resolution and drawing (§8 codes). */
44
+ getWarnings(): XYWarningRecord[];
45
+ getAllocatedCanvasWidth(): number;
46
+ getAllocatedCanvasHeight(): number;
47
+ /** Axis title in the IBCS "Label in Unit" form. */
48
+ private axisTitle;
49
+ private i18nMap;
50
+ setI18n(i18n: Map<string, string>): void;
51
+ /** Ordered legend entries: one per series, colored by the primary treatment. */
52
+ private legendModel;
53
+ /** ColorIndex of the primary scenario family (variance axes → 10, spec §4.4). */
54
+ private primaryColorIndex;
55
+ private seriesTreatment;
56
+ private addWarningOnce;
57
+ toString(): string;
58
+ private draw;
59
+ /** Axis title with the label bold and the "in Unit" part regular. */
60
+ private drawAxisTitleText;
61
+ private buildPanels;
62
+ private drawPanel;
63
+ private drawPointLabels;
64
+ private drawIso;
65
+ private formatTick;
66
+ }
@@ -1,5 +1,4 @@
1
1
  import { ParentDimensions } from "../../utils/parentDimensions";
2
- import { StructureChartDataRow } from "./utils/model";
3
2
  /**
4
3
  * SVG structure (categorical) bar chart following IBCS standards.
5
4
  *
@@ -12,13 +11,20 @@ import { StructureChartDataRow } from "./utils/model";
12
11
  */
13
12
  export declare class Chart {
14
13
  private element;
15
- data: StructureChartDataRow[];
14
+ /** Active dataset name (the last subscribed dataset to fire `onUpdate`). */
15
+ private datasetName;
16
+ /** Bumped on every data update so Stencil re-renders even when the name is unchanged. */
17
+ private dataVersion;
16
18
  private datasetMeta;
17
19
  private appliedScaleFactor;
18
20
  private readonly t;
19
21
  private readonly componentStyle;
22
+ private readonly ruleSetConfig;
20
23
  private readonly errors;
21
24
  private readonly resolveInherited;
25
+ private layoutObserver;
26
+ /** Last parent height seen, used to suppress ResizeObserver noise. */
27
+ private _lastScaledParentHeight;
22
28
  /**
23
29
  * Title displayed above the chart. When empty, the title is derived
24
30
  * from the variance scenario labels (if variances are configured).
@@ -26,6 +32,12 @@ export declare class Chart {
26
32
  * @example chart-title="Revenue by Category"
27
33
  */
28
34
  chartTitle: string;
35
+ /**
36
+ * Name of a registered IBCS rule set (see `bn-ruleset`) used for scenario
37
+ * ordering. Supports `"inherited-closest"` / `"inherited-page"` to take
38
+ * over the value from an ancestor `bn-layout-card` / `bn-layout-page`.
39
+ */
40
+ ruleset?: string;
29
41
  /**
30
42
  * AlaSQL WHERE clause fragment injected into the data query to filter
31
43
  * rows before rendering.
@@ -74,13 +86,14 @@ export declare class Chart {
74
86
  * | `"auto"` | Auto-fit bars to fill the available container width (no warning) |
75
87
  * | not set / `""` | Same as auto, but emits `AUTO_unitScaling` warning |
76
88
  * | `"0.03"`, `1` | Explicit pixels-per-unit value; bars scale proportionally |
77
- * | group name | References a shared scaling group for synchronized charts |
89
+ * | group name | References a `<bn-scaling-group>` for synchronized scaling |
78
90
  *
79
91
  * When using a custom value that causes the chart to exceed its container,
80
92
  * a `WARN_overflow` error is emitted.
81
93
  *
82
94
  * @example unit-scaling="auto"
83
95
  * @example unit-scaling="0.05"
96
+ * @example unit-scaling="revenue-scale"
84
97
  */
85
98
  unitScaling: string | number;
86
99
  validateUnitScaling(newValue: string | number): void;
@@ -92,9 +105,10 @@ export declare class Chart {
92
105
  * | `"auto"` | Auto-fit to available width |
93
106
  * | not set / `""` | Same as auto with warning |
94
107
  * | `"50"`, `1.5` | Explicit pixels-per-percentage-point value |
95
- * | group name | References a shared scaling group for synchronized charts |
108
+ * | group name | References a `<bn-scaling-group>` for synchronized scaling |
96
109
  *
97
110
  * @example percentage-scaling="50"
111
+ * @example percentage-scaling="pct-scale"
98
112
  */
99
113
  percentageScaling: string | number;
100
114
  validatePercentageScaling(newValue: string | number): void;
@@ -244,7 +258,6 @@ export declare class Chart {
244
258
  */
245
259
  scale?: string;
246
260
  validateScaling(newValue: string): void;
247
- private scenariosArray;
248
261
  private canvasWidthSegmented;
249
262
  private pixelPerUnitGroupMap;
250
263
  constructor();
@@ -252,6 +265,7 @@ export declare class Chart {
252
265
  private _autoScaleGuard;
253
266
  componentDidRender(): void;
254
267
  componentDidLoad(): void;
268
+ disconnectedCallback(): void;
255
269
  /**
256
270
  * Emits an error when a custom unit-scaling value causes the chart to exceed its container width.
257
271
  * Skipped for auto/unset unit-scaling since auto-fit handles width.
@@ -1,13 +1,16 @@
1
- import { StructureChartDataRow } from "./utils/model";
2
1
  import { StackConfigParsed } from "./utils/model/StructureChartComponentConfig";
3
2
  import { StructureChartStyle } from "./utils/model/styles/StructureChartStyle";
4
3
  import { Order } from "../../utils/model/Order";
5
4
  import { AggregationLevel } from "../../utils/constants";
6
5
  import { ParentDimensions } from "../../utils/parentDimensions";
7
6
  import { DataFormatDigits } from "../../utils/model/DataFormatDigits";
7
+ import { RuleSetConfig } from "../../stores/ruleSets";
8
8
  export declare class IbcsChartStructure {
9
- element: HTMLElement | undefined;
10
- data: StructureChartDataRow[];
9
+ element: HTMLElement;
10
+ /** Name of the dataset (table or view in the shared alasql database). */
11
+ tableName: string;
12
+ /** Bumped by `bn-chart-structure` when the dataset changes; triggers re-render. */
13
+ dataVersion: number;
11
14
  chartTitle: string;
12
15
  scenarios: string[];
13
16
  variances: string[];
@@ -26,17 +29,21 @@ export declare class IbcsChartStructure {
26
29
  dataFormatDigits: DataFormatDigits;
27
30
  stackConfig: StackConfigParsed | null;
28
31
  parentDimensions: ParentDimensions;
32
+ ruleSetConfig?: RuleSetConfig;
29
33
  private chart;
30
34
  private pattern;
35
+ private stores;
31
36
  constructor();
37
+ private getDb;
32
38
  render(): any;
33
39
  componentWillLoad(): Promise<void>;
34
40
  componentWillUpdate(): Promise<void>;
35
41
  /**
36
- * Two-pass auto-fit: only when pixelPerUnit is 0 (auto mode).
37
- * Explicit values are never overridden — the outer component warns
38
- * about overflow via componentDidRender.
42
+ * Two-pass auto-fit for pixelPerUnit and/or pixelPerPercentage.
43
+ * When either is 0 (auto mode), renders a measurement pass at 1,
44
+ * computes the ratio to fit the available width, and rebuilds.
39
45
  * Structure charts grow horizontally, so we fit to width.
46
+ * Explicit (> 0) values are never overridden.
40
47
  */
41
48
  private autoFitScaling;
42
49
  componentWillRender(): Promise<void>;
@@ -1,7 +1,8 @@
1
1
  import { Svg } from "@svgdotjs/svg.js";
2
- import { StructureChartComponentConfig, StructureChartDataRow, StructureChartStyle } from "./model";
2
+ import { StructureChartComponentConfig, StructureChartStyle } from "./model";
3
3
  import { SVGPolgonPattern } from "../../../utils/model";
4
4
  import { VisualisationRuleSet } from "../../bn-table/utils/model";
5
+ import { AlaSQLDatabase } from "../../../context/scopedDb";
5
6
  /**
6
7
  * Orchestrates the full rendering pipeline for an IBCS structure (categorical) chart.
7
8
  *
@@ -29,6 +30,9 @@ export declare class StructureChart {
29
30
  private position;
30
31
  styles: StructureChartStyle;
31
32
  private title;
33
+ /** Raw config inputs the title derives from; kept so setI18n can recompute it. */
34
+ private configTitle;
35
+ private configVariances;
32
36
  private smallestDataPointValue;
33
37
  private highestDataPointValue;
34
38
  private smallestVarianceDataPointValue;
@@ -38,7 +42,6 @@ export declare class StructureChart {
38
42
  private hideCategories;
39
43
  private axisScenario;
40
44
  readonly CSS_CATEGORIES: string;
41
- private preparedDataSet;
42
45
  private state;
43
46
  private i18n;
44
47
  private titleLength;
@@ -49,14 +52,20 @@ export declare class StructureChart {
49
52
  private measureUnit;
50
53
  private dataFormatDigits;
51
54
  private stackConfig;
55
+ private scenarioPropOrder;
52
56
  private overflowConfig;
53
57
  private highestStackedTotal;
54
- constructor(ruleSet: VisualisationRuleSet, config: StructureChartComponentConfig, styles: StructureChartStyle);
58
+ private db;
59
+ private tableName;
60
+ private fromExpr;
61
+ private rowCount;
62
+ constructor(ruleSet: VisualisationRuleSet, db: AlaSQLDatabase, tableName: string, config: StructureChartComponentConfig, styles: StructureChartStyle);
55
63
  private updatePosition;
56
64
  private createElementPosition;
57
- initSQLFunctions(): void;
58
65
  setStyles(newStyle: StructureChartStyle): void;
66
+ setRuleSet(ruleSet: VisualisationRuleSet): void;
59
67
  setConfig(config: StructureChartComponentConfig): void;
68
+ /** Returns a new array; the input keeps the `scenarios` prop order (the config is reused across rebuilds). */
60
69
  private sortScenariosbyVisualisationRules;
61
70
  /**
62
71
  * Init load of translation dictionary map
@@ -72,17 +81,15 @@ export declare class StructureChart {
72
81
  * @param i18n
73
82
  */
74
83
  setI18n(i18n: Map<string, string>): void;
84
+ /** Derives the variance title from the stored config and the current i18n map. */
85
+ private updateTitle;
75
86
  private createI18n;
76
87
  /**
77
- * Init load raw datasets the loaded dataset is
78
- * the base on which the filters defined in the config
79
- * are apllied on internaly it is called prepared DataSet
80
- *
81
- * @param data
82
- * @param filter - data filter
83
- * @param customColumnNameMap Custon ColumnNameMap can be used if data uses non standard columnames
88
+ * Resolves the dataset (a table or view in the shared alasql database) and
89
+ * caches its row count. All subsequent queries reference the source by name,
90
+ * so alasql doesn't have to ingest a fresh array per call.
84
91
  */
85
- setData(data: StructureChartDataRow[], filter: string): void;
92
+ setSource(filter: string): void;
86
93
  /**
87
94
  * Returns the data value whose bar extent is proportional to pixelPerUnit.
88
95
  * Used by autoFitScaling to separate fixed vs variable width components.
@@ -117,6 +124,8 @@ export declare class StructureChart {
117
124
  private drawAxisAndLabels;
118
125
  private drawScenarios;
119
126
  private drawVarianceScenario;
127
+ /** Restore the original `scenarios` prop order for stacked segments (IBCS sort reorders the slots). */
128
+ private sortSegmentsByPropOrder;
120
129
  /**
121
130
  * Draw stacked horizontal bars. Supports stacking by scenario or by data dimension.
122
131
  * When stacking by scenario with multiple scenario types (e.g. ac+pl),
@@ -27,13 +27,15 @@ export declare class ElementPositions {
27
27
  private leftSideLengthSync;
28
28
  private leftSideLabelLength;
29
29
  private topSideLabelHeight;
30
- constructor(padding: Padding, scaleFactors: ScaleFactorsStructureChart, fontSize: number, numberOfColumns: number, leftSideLengthSync: number, titleLength: number, leftSideWidth: number, categoryWidth: number);
30
+ private hasStackedHeaders;
31
+ constructor(padding: Padding, scaleFactors: ScaleFactorsStructureChart, fontSize: number, numberOfColumns: number, leftSideLengthSync: number, titleLength: number, leftSideWidth: number, categoryWidth: number, hasStackedHeaders?: boolean);
31
32
  getBarPositionX(): number;
32
33
  getBarCenterPositionY(index: number): number;
33
34
  getBarPositionY(index: number, isPrimaryMarker: boolean): number;
34
35
  getCategoryPositionX(isPositive: boolean): number;
35
36
  getAxisTitlePositionX(): number;
36
37
  getAxisTitlePositionY(): number;
38
+ getStackedHeaderPositionY(): number;
37
39
  getNeedleWidth(): number;
38
40
  getAxisPositionX(): number;
39
41
  getAxisPositionY(): number;
@@ -56,5 +58,18 @@ export declare class ElementPositions {
56
58
  private calculateAxisPosition;
57
59
  private recalculatePositions;
58
60
  private getAxisTitleOffset;
61
+ private getTopLabelOverhang;
62
+ /**
63
+ * How far the stacked-segment header row (anchored just above the first bar)
64
+ * reaches above the axis start. The title is moved up by this amount so the
65
+ * header row sits between title and bars without overlapping either.
66
+ */
67
+ private getStackedHeaderOverhang;
68
+ /**
69
+ * How far the scenario labels above the first bar (secondary bar label) or
70
+ * above the first marker (primary marker label) reach above the axis start.
71
+ * The title is moved up by this amount so it does not overlap them.
72
+ */
73
+ private getTopScenarioLabelOverhang;
59
74
  private calculateSideLabelLength;
60
75
  }