@bino-bi/bn-template-engine 1.0.0-next.26 → 1.0.0-next.28

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 (420) hide show
  1. package/dist/bn-template-engine/bn-template-engine.esm.js +1 -1
  2. package/dist/bn-template-engine/p-5075771a.entry.js +1 -0
  3. package/dist/bn-template-engine/p-5d516435.entry.js +1 -0
  4. package/dist/bn-template-engine/p-5e90e728.entry.js +1 -0
  5. package/dist/bn-template-engine/p-9ef7e132.entry.js +1 -0
  6. package/dist/bn-template-engine/{p-f06c3703.entry.js → p-9f7a1980.entry.js} +1 -1
  7. package/dist/bn-template-engine/p-BeXgxHkW.js +1 -0
  8. package/dist/bn-template-engine/p-CH0bpt_k.js +1 -0
  9. package/dist/bn-template-engine/p-ClruFZD_.js +1 -0
  10. package/dist/bn-template-engine/{p-CTrNbSXN.js → p-DFmSrSnf.js} +1 -1
  11. package/dist/bn-template-engine/{p-BcLsoDrW.js → p-DI3efDSV.js} +1 -1
  12. package/dist/bn-template-engine/p-DXLTTILG.js +1 -0
  13. package/dist/bn-template-engine/p-DtP4jqG5.js +1 -0
  14. package/dist/bn-template-engine/p-a8281b71.entry.js +1 -0
  15. package/dist/bn-template-engine/p-b31277e7.entry.js +1 -0
  16. package/dist/bn-template-engine/p-b396ac84.entry.js +1 -0
  17. package/dist/cjs/{bn-asset_21.cjs.entry.js → bn-asset_28.cjs.entry.js} +21358 -6528
  18. package/dist/cjs/bn-grid.cjs.entry.js +4 -6
  19. package/dist/cjs/bn-image.cjs.entry.js +3 -5
  20. package/dist/cjs/bn-internationalization.cjs.entry.js +17 -6
  21. package/dist/cjs/bn-ruleset.cjs.entry.js +5 -5
  22. package/dist/cjs/bn-template-engine.cjs.js +1 -1
  23. package/dist/cjs/bn-template.cjs.entry.js +2 -2
  24. package/dist/cjs/bn-text.cjs.entry.js +115 -43
  25. package/dist/cjs/{context-protocol-DcTEh1rq.js → context-protocol-C0rKepqu.js} +108 -22
  26. package/dist/cjs/{diagnostics-CTgbq_Gc.js → diagnostics-Cq-qDtXq.js} +1 -1
  27. package/dist/cjs/editor-companion.cjs.entry.js +2 -2
  28. package/dist/cjs/loader.cjs.js +1 -1
  29. package/dist/cjs/queryError-BZjnIW_w.js +16 -0
  30. package/dist/cjs/{scaling-Dsb5_NXy.js → sanitizeHtml-Yx1xn6i_.js} +467 -287
  31. package/dist/cjs/{withBodyObserver-DJO98AJ-.js → withBodyObserver-CaPUjuC5.js} +1 -1
  32. package/dist/cjs/withHasError-qGW_yqIv.js +426 -0
  33. package/dist/cjs/{withStyled-D0jLwCib.js → withStyled-vSfogp9J.js} +543 -42
  34. package/dist/collection/components/bn-chart-bubble/bn-chart-bubble.css +37 -0
  35. package/dist/collection/components/bn-chart-bubble/bn-chart-bubble.js +53 -28
  36. package/dist/collection/components/bn-chart-bubble/ibcs-chart-bubble.css +37 -5
  37. package/dist/collection/components/bn-chart-bubble/ibcs-chart-bubble.js +16 -7
  38. package/dist/collection/components/bn-chart-bubble/utils/BubbleChart.js +67 -30
  39. package/dist/collection/components/bn-chart-bullet/bn-chart-bullet.css +37 -0
  40. package/dist/collection/components/bn-chart-bullet/bn-chart-bullet.js +49 -29
  41. package/dist/collection/components/bn-chart-bullet/ibcs-chart-bullet.css +37 -5
  42. package/dist/collection/components/bn-chart-bullet/ibcs-chart-bullet.js +17 -7
  43. package/dist/collection/components/bn-chart-bullet/utils/BulletChart.js +34 -18
  44. package/dist/collection/components/bn-chart-bullet/utils/model/BulletChartStyle.js +2 -0
  45. package/dist/collection/components/bn-chart-bullet/utils/model/BulletConfig.js +1 -1
  46. package/dist/collection/components/bn-chart-scatter/bn-chart-scatter.css +37 -0
  47. package/dist/collection/components/bn-chart-scatter/bn-chart-scatter.js +52 -27
  48. package/dist/collection/components/bn-chart-scatter/ibcs-chart-scatter.css +37 -5
  49. package/dist/collection/components/bn-chart-scatter/ibcs-chart-scatter.js +16 -7
  50. package/dist/collection/components/bn-chart-scatter/utils/ScatterChart.js +52 -18
  51. package/dist/collection/components/bn-chart-structure/bn-chart-structure.css +37 -5
  52. package/dist/collection/components/bn-chart-structure/bn-chart-structure.js +74 -44
  53. package/dist/collection/components/bn-chart-structure/ibcs-chart-structure.js +60 -19
  54. package/dist/collection/components/bn-chart-structure/utils/StructureChart.js +218 -262
  55. package/dist/collection/components/bn-chart-structure/utils/elements/Label.js +1 -1
  56. package/dist/collection/components/bn-chart-structure/utils/elements/Needle.js +11 -4
  57. package/dist/collection/components/bn-chart-structure/utils/elements/StackedBar.js +16 -25
  58. package/dist/collection/components/bn-chart-structure/utils/model/StructureChartComponentConfig.js +3 -2
  59. package/dist/collection/components/bn-chart-structure/utils/model/styles/StructureChartStyle.js +2 -0
  60. package/dist/collection/components/bn-chart-time/bn-chart-time.css +37 -0
  61. package/dist/collection/components/bn-chart-time/bn-chart-time.js +122 -52
  62. package/dist/collection/components/bn-chart-time/ibcs-chart-time.css +37 -0
  63. package/dist/collection/components/bn-chart-time/ibcs-chart-time.js +60 -19
  64. package/dist/collection/components/bn-chart-time/utils/TimeChart.js +245 -250
  65. package/dist/collection/components/bn-chart-time/utils/elements/AreaFill.js +1 -1
  66. package/dist/collection/components/bn-chart-time/utils/elements/Label.js +1 -1
  67. package/dist/collection/components/bn-chart-time/utils/elements/LineSeries.js +1 -1
  68. package/dist/collection/components/bn-chart-time/utils/elements/Needle.js +11 -4
  69. package/dist/collection/components/bn-chart-time/utils/elements/StackedColumn.js +22 -34
  70. package/dist/collection/components/bn-chart-time/utils/helper/LabelCollisionManager.js +3 -3
  71. package/dist/collection/components/bn-chart-time/utils/model/TimeChartComponentConfig.js +4 -3
  72. package/dist/collection/components/bn-chart-time/utils/model/TimeChartDataRow.js +2 -2
  73. package/dist/collection/components/bn-chart-time/utils/model/styles/TimeChartStyle.js +2 -0
  74. package/dist/collection/components/bn-component-style/bn-component-style.js +14 -2
  75. package/dist/collection/components/bn-context/bn-context.js +92 -22
  76. package/dist/collection/components/bn-dataset/bn-dataset.js +246 -90
  77. package/dist/collection/components/bn-datasource/bn-datasource.js +169 -77
  78. package/dist/collection/components/bn-footer/bn-footer.js +6 -6
  79. package/dist/collection/components/bn-internationalization/bn-internationalization.js +14 -3
  80. package/dist/collection/components/bn-layout-card/bn-layout-card.js +25 -74
  81. package/dist/collection/components/bn-layout-page/bn-layout-page.js +59 -71
  82. package/dist/collection/components/bn-message/bn-message.js +2 -2
  83. package/dist/collection/components/bn-page/bn-page.css +0 -240
  84. package/dist/collection/components/bn-page/bn-page.js +14 -4
  85. package/dist/collection/components/bn-page/pageFormats.js +69 -0
  86. package/dist/collection/components/bn-ruleset/bn-ruleset.js +2 -2
  87. package/dist/collection/components/bn-scaling-group/bn-scaling-group.js +7 -7
  88. package/dist/collection/components/bn-table/bn-table.css +38 -1
  89. package/dist/collection/components/bn-table/bn-table.js +96 -59
  90. package/dist/collection/components/bn-table/ibcs-table.css +39 -1
  91. package/dist/collection/components/bn-table/ibcs-table.js +89 -30
  92. package/dist/collection/components/bn-table/utils/Table.js +12 -13
  93. package/dist/collection/components/bn-table/utils/elements/Cell.js +9 -3
  94. package/dist/collection/components/bn-table/utils/elements/CellBarChart.js +38 -34
  95. package/dist/collection/components/bn-table/utils/elements/TableRow.js +2 -1
  96. package/dist/collection/components/bn-table/utils/elements/WaterfallBar.js +4 -4
  97. package/dist/collection/components/bn-table/utils/factories/tableDataSetFactory.js +17 -4
  98. package/dist/collection/components/bn-table/utils/helper/DataQuery.js +128 -98
  99. package/dist/collection/components/bn-table/utils/helper/IntervalColumns.js +6 -20
  100. package/dist/collection/components/bn-table/utils/helper/QueryGroup.js +9 -2
  101. package/dist/collection/components/bn-table/utils/helper/barColumnGeometry.js +2 -2
  102. package/dist/collection/components/bn-table/utils/model/TableAttribute.js +2 -2
  103. package/dist/collection/components/bn-table/utils/model/TableComponentConfig.js +3 -2
  104. package/dist/collection/components/bn-template/bn-template.js +1 -1
  105. package/dist/collection/components/bn-text/bn-text.js +36 -39
  106. package/dist/collection/components/bn-text/utils/template.js +79 -0
  107. package/dist/collection/components/bn-title/bn-title.js +10 -4
  108. package/dist/collection/components/bn-title/ibcs-title/ibcs-title.js +3 -1
  109. package/dist/collection/components/bn-tree/bn-tree.js +119 -23
  110. package/dist/collection/components/bn-tree/utils/EdgeRenderer.js +59 -51
  111. package/dist/collection/components/bn-tree/utils/TreeLayout.js +30 -5
  112. package/dist/collection/components/bn-tree/utils/TreeParser.js +35 -0
  113. package/dist/collection/components/editor-companion/editor-companion.js +1 -1
  114. package/dist/collection/context/context-protocol.js +1 -1
  115. package/dist/collection/context/scopedDb.js +47 -4
  116. package/dist/collection/stores/componentStyles.js +39 -0
  117. package/dist/collection/stores/internationalization.js +15 -13
  118. package/dist/collection/utils/DateStringFactory.js +17 -15
  119. package/dist/collection/utils/autoFit.js +2 -2
  120. package/dist/collection/utils/componentRegister.js +60 -16
  121. package/dist/collection/utils/constants.js +2 -2
  122. package/dist/collection/utils/dataAnalyzer.js +9 -12
  123. package/dist/collection/utils/emptyState.js +21 -0
  124. package/dist/collection/utils/formatter.js +29 -20
  125. package/dist/collection/utils/layoutObserver.js +1 -1
  126. package/dist/collection/utils/layoutState/generic.js +1 -1
  127. package/dist/collection/utils/layoutState/svgChartElements.js +2 -2
  128. package/dist/collection/utils/layoutTemplate.js +81 -0
  129. package/dist/collection/utils/measurementHost.js +2 -2
  130. package/dist/collection/utils/model/Order.js +1 -1
  131. package/dist/collection/utils/model/styles/SVGStyle.js +12 -4
  132. package/dist/collection/utils/parentDimensions.js +35 -3
  133. package/dist/collection/utils/queryError.js +11 -0
  134. package/dist/collection/utils/relativeVariance.js +14 -0
  135. package/dist/collection/utils/sanitizeHtml.js +30 -16
  136. package/dist/collection/utils/scaling.js +2 -2
  137. package/dist/collection/utils/stackColors.js +27 -5
  138. package/dist/collection/utils/stackLayout.js +71 -0
  139. package/dist/collection/utils/styled/attributes.js +16 -3
  140. package/dist/collection/utils/styled/style-sheet.js +1 -1
  141. package/dist/collection/utils/styled/withStyled.js +1 -1
  142. package/dist/collection/utils/testing/fakeGroup.js +21 -0
  143. package/dist/collection/utils/testing/mutationObserver.js +44 -0
  144. package/dist/collection/utils/testing/structureChart.js +26 -0
  145. package/dist/collection/utils/testing/timeChart.js +28 -0
  146. package/dist/collection/utils/validate.js +1 -1
  147. package/dist/collection/utils/withComponentStatus.js +137 -12
  148. package/dist/collection/utils/withInheritedProps.js +113 -64
  149. package/dist/collection/utils/withRuleSet.js +10 -7
  150. package/dist/collection/utils/withTranslation.js +3 -3
  151. package/dist/collection/utils/xy/FacetGrid.js +1 -1
  152. package/dist/collection/utils/xy/IsoCurves.js +1 -1
  153. package/dist/collection/utils/xy/NumericScale.js +46 -15
  154. package/dist/collection/utils/xy/PointLabeler.js +2 -2
  155. package/dist/collection/utils/xy/RadiusScale.js +2 -2
  156. package/dist/collection/utils/xy/SeriesPalette.js +3 -3
  157. package/dist/collection/utils/xy/VarianceMeasure.js +22 -4
  158. package/dist/collection/utils/xy/XYFrame.js +4 -4
  159. package/dist/collection/utils/xy/XYLegend.js +5 -7
  160. package/dist/collection/utils/xy/checkXYOverflow.js +32 -0
  161. package/dist/collection/utils/xy/formatXYValue.js +13 -0
  162. package/dist/collection/utils/xy/model/XYChartDataRow.js +0 -0
  163. package/dist/collection/utils/xy/model/XYChartStyle.js +2 -0
  164. package/dist/components/DataFormatDigits.js +1 -1
  165. package/dist/components/DateStringFactory.js +1 -1
  166. package/dist/components/LabelCollisionManager.js +1 -1
  167. package/dist/components/NumericScale.js +1 -1
  168. package/dist/components/Order.js +1 -1
  169. package/dist/components/SVGStyle.js +1 -0
  170. package/dist/components/TableAttribute.js +1 -0
  171. package/dist/components/VarianceMeasure.js +1 -1
  172. package/dist/components/XYChartDataRow.js +1 -1
  173. package/dist/components/bn-asset.js +1 -1
  174. package/dist/components/bn-body2.js +1 -1
  175. package/dist/components/bn-card2.js +1 -1
  176. package/dist/components/bn-chart-bubble.js +1 -1
  177. package/dist/components/bn-chart-bullet.js +1 -1
  178. package/dist/components/bn-chart-scatter.js +1 -1
  179. package/dist/components/bn-chart-structure.js +1 -1
  180. package/dist/components/bn-chart-time.js +1 -1
  181. package/dist/components/bn-component-style.js +1 -1
  182. package/dist/components/bn-context.js +1 -1
  183. package/dist/components/bn-dataset.js +1 -1
  184. package/dist/components/bn-datasource.js +1 -1
  185. package/dist/components/bn-footer2.js +1 -1
  186. package/dist/components/bn-grid.js +1 -1
  187. package/dist/components/bn-image.js +1 -1
  188. package/dist/components/bn-internationalization.js +1 -1
  189. package/dist/components/bn-layout-card.js +1 -1
  190. package/dist/components/bn-layout-page.js +1 -1
  191. package/dist/components/bn-message2.js +1 -1
  192. package/dist/components/bn-page2.js +1 -1
  193. package/dist/components/bn-ruleset.js +1 -1
  194. package/dist/components/bn-scaling-group.js +1 -1
  195. package/dist/components/bn-table.js +1 -1
  196. package/dist/components/bn-template.js +1 -1
  197. package/dist/components/bn-text.js +1 -1
  198. package/dist/components/bn-title2.js +1 -1
  199. package/dist/components/bn-tree.js +1 -1
  200. package/dist/components/checkXYOverflow.js +1 -0
  201. package/dist/components/context-protocol.js +1 -1
  202. package/dist/components/editor-companion.js +1 -1
  203. package/dist/components/emptyState.js +1 -0
  204. package/dist/components/formatter.js +1 -1
  205. package/dist/components/ibcs-chart-bubble2.js +1 -1
  206. package/dist/components/ibcs-chart-bullet2.js +1 -1
  207. package/dist/components/ibcs-chart-scatter2.js +1 -1
  208. package/dist/components/ibcs-chart-structure2.js +1 -1
  209. package/dist/components/ibcs-chart-time2.js +1 -1
  210. package/dist/components/ibcs-table2.js +1 -1
  211. package/dist/components/ibcs-title2.js +1 -1
  212. package/dist/components/layoutTemplate.js +1 -0
  213. package/dist/components/pageFormats.js +1 -0
  214. package/dist/components/parentDimensions.js +1 -0
  215. package/dist/components/queryError.js +1 -0
  216. package/dist/components/relativeVariance.js +1 -0
  217. package/dist/components/sanitizeHtml.js +1 -1
  218. package/dist/components/stackColors.js +1 -1
  219. package/dist/components/stackLayout.js +1 -0
  220. package/dist/components/svg.esm.js +1 -0
  221. package/dist/components/validate.js +1 -1
  222. package/dist/components/withBodyObserver.js +1 -1
  223. package/dist/components/withComponentStatus.js +1 -0
  224. package/dist/components/withComponentStyle.js +1 -1
  225. package/dist/components/withDataset.js +1 -1
  226. package/dist/components/withHasError.js +1 -1
  227. package/dist/components/withRuleSet.js +1 -1
  228. package/dist/components/withScalingGroup.js +1 -1
  229. package/dist/components/withStyled.js +1 -1
  230. package/dist/components/withTranslation.js +1 -1
  231. package/dist/esm/{bn-asset_21.entry.js → bn-asset_28.entry.js} +20948 -6125
  232. package/dist/esm/bn-grid.entry.js +4 -6
  233. package/dist/esm/bn-image.entry.js +3 -5
  234. package/dist/esm/bn-internationalization.entry.js +17 -6
  235. package/dist/esm/bn-ruleset.entry.js +5 -5
  236. package/dist/esm/bn-template-engine.js +1 -1
  237. package/dist/esm/bn-template.entry.js +2 -2
  238. package/dist/esm/bn-text.entry.js +111 -39
  239. package/dist/esm/{context-protocol-B-vdGKeG.js → context-protocol-CdTp19uA.js} +106 -22
  240. package/dist/esm/{diagnostics-CiquIw8B.js → diagnostics-vw6TKMiT.js} +1 -1
  241. package/dist/esm/editor-companion.entry.js +2 -2
  242. package/dist/esm/loader.js +1 -1
  243. package/dist/esm/queryError-ClruFZD_.js +13 -0
  244. package/dist/esm/{scaling-Dggyeqts.js → sanitizeHtml-C5bFtARM.js} +464 -287
  245. package/dist/esm/{withBodyObserver-Cb9ZC5_J.js → withBodyObserver-DD_-r04o.js} +1 -1
  246. package/dist/esm/withHasError-73WV2SP5.js +422 -0
  247. package/dist/esm/{withStyled-DoNsbwS3.js → withStyled-BDEyKd_H.js} +513 -27
  248. package/dist/types/components/bn-chart-bubble/bn-chart-bubble.d.ts +8 -4
  249. package/dist/types/components/bn-chart-bubble/ibcs-chart-bubble.d.ts +2 -1
  250. package/dist/types/components/bn-chart-bubble/utils/BubbleChart.d.ts +14 -2
  251. package/dist/types/components/bn-chart-bullet/bn-chart-bullet.d.ts +12 -11
  252. package/dist/types/components/bn-chart-bullet/ibcs-chart-bullet.d.ts +2 -1
  253. package/dist/types/components/bn-chart-bullet/utils/BulletChart.d.ts +8 -5
  254. package/dist/types/components/bn-chart-bullet/utils/model/BulletChartStyle.d.ts +2 -0
  255. package/dist/types/components/bn-chart-bullet/utils/model/BulletConfig.d.ts +1 -1
  256. package/dist/types/components/bn-chart-scatter/bn-chart-scatter.d.ts +8 -4
  257. package/dist/types/components/bn-chart-scatter/ibcs-chart-scatter.d.ts +2 -1
  258. package/dist/types/components/bn-chart-scatter/utils/ScatterChart.d.ts +11 -1
  259. package/dist/types/components/bn-chart-structure/bn-chart-structure.d.ts +13 -12
  260. package/dist/types/components/bn-chart-structure/ibcs-chart-structure.d.ts +8 -1
  261. package/dist/types/components/bn-chart-structure/utils/StructureChart.d.ts +29 -6
  262. package/dist/types/components/bn-chart-structure/utils/elements/StackedBar.d.ts +4 -3
  263. package/dist/types/components/bn-chart-structure/utils/model/DataPoint.d.ts +3 -2
  264. package/dist/types/components/bn-chart-structure/utils/model/StructureChartComponentConfig.d.ts +2 -1
  265. package/dist/types/components/bn-chart-structure/utils/model/styles/StructureChartStyle.d.ts +2 -0
  266. package/dist/types/components/bn-chart-time/bn-chart-time.d.ts +19 -15
  267. package/dist/types/components/bn-chart-time/ibcs-chart-time.d.ts +8 -1
  268. package/dist/types/components/bn-chart-time/utils/TimeChart.d.ts +63 -5
  269. package/dist/types/components/bn-chart-time/utils/elements/AreaFill.d.ts +1 -1
  270. package/dist/types/components/bn-chart-time/utils/elements/StackedColumn.d.ts +9 -8
  271. package/dist/types/components/bn-chart-time/utils/model/DataPoint.d.ts +3 -2
  272. package/dist/types/components/bn-chart-time/utils/model/TimeChartComponentConfig.d.ts +3 -2
  273. package/dist/types/components/bn-chart-time/utils/model/styles/TimeChartStyle.d.ts +2 -0
  274. package/dist/types/components/bn-context/bn-context.d.ts +15 -3
  275. package/dist/types/components/bn-dataset/bn-dataset.d.ts +41 -20
  276. package/dist/types/components/bn-datasource/bn-datasource.d.ts +34 -18
  277. package/dist/types/components/bn-footer/bn-footer.d.ts +2 -2
  278. package/dist/types/components/bn-layout-card/bn-layout-card.d.ts +3 -10
  279. package/dist/types/components/bn-layout-page/bn-layout-page.d.ts +13 -6
  280. package/dist/types/components/bn-message/bn-message.d.ts +2 -1
  281. package/dist/types/components/bn-page/bn-page.d.ts +2 -1
  282. package/dist/types/components/bn-page/pageFormats.d.ts +40 -0
  283. package/dist/types/components/bn-scaling-group/bn-scaling-group.d.ts +2 -2
  284. package/dist/types/components/bn-table/bn-table.d.ts +11 -10
  285. package/dist/types/components/bn-table/ibcs-table.d.ts +8 -5
  286. package/dist/types/components/bn-table/utils/Table.d.ts +3 -1
  287. package/dist/types/components/bn-table/utils/elements/Cell.d.ts +2 -2
  288. package/dist/types/components/bn-table/utils/elements/CellBarChart.d.ts +6 -4
  289. package/dist/types/components/bn-table/utils/elements/WaterfallBar.d.ts +1 -1
  290. package/dist/types/components/bn-table/utils/factories/tableDataSetFactory.d.ts +2 -0
  291. package/dist/types/components/bn-table/utils/helper/DataQuery.d.ts +14 -5
  292. package/dist/types/components/bn-table/utils/helper/IntervalColumns.d.ts +2 -2
  293. package/dist/types/components/bn-table/utils/helper/QueryGroup.d.ts +6 -1
  294. package/dist/types/components/bn-table/utils/helper/barColumnGeometry.d.ts +2 -2
  295. package/dist/types/components/bn-table/utils/model/TableAttribute.d.ts +2 -0
  296. package/dist/types/components/bn-table/utils/model/TableComponentConfig.d.ts +2 -1
  297. package/dist/types/components/bn-text/bn-text.d.ts +20 -13
  298. package/dist/types/components/bn-text/utils/template.d.ts +10 -0
  299. package/dist/types/components/bn-title/ibcs-title/ibcs-title.d.ts +1 -0
  300. package/dist/types/components/bn-tree/bn-tree.d.ts +8 -1
  301. package/dist/types/components/bn-tree/utils/EdgeRenderer.d.ts +18 -5
  302. package/dist/types/components/bn-tree/utils/TreeLayout.d.ts +5 -0
  303. package/dist/types/components.d.ts +226 -184
  304. package/dist/types/context/scopedDb.d.ts +20 -0
  305. package/dist/types/stores/componentStyles.d.ts +6 -0
  306. package/dist/types/utils/DateStringFactory.d.ts +3 -2
  307. package/dist/types/utils/autoFit.d.ts +2 -2
  308. package/dist/types/utils/componentRegister.d.ts +21 -5
  309. package/dist/types/utils/constants.d.ts +2 -2
  310. package/dist/types/utils/dataAnalyzer.d.ts +1 -1
  311. package/dist/types/utils/emptyState.d.ts +10 -0
  312. package/dist/types/utils/formatter.d.ts +7 -9
  313. package/dist/types/utils/layoutState/generic.d.ts +1 -1
  314. package/dist/types/utils/layoutState/svgChartElements.d.ts +2 -2
  315. package/dist/types/utils/layoutTemplate.d.ts +16 -0
  316. package/dist/types/utils/model/ChartStyles.d.ts +1 -1
  317. package/dist/types/utils/model/DataQueryResultRow.d.ts +2 -2
  318. package/dist/types/utils/model/Order.d.ts +1 -1
  319. package/dist/types/utils/model/styles/SVGStyle.d.ts +5 -1
  320. package/dist/types/utils/parentDimensions.d.ts +9 -0
  321. package/dist/types/utils/queryError.d.ts +5 -0
  322. package/dist/types/utils/relativeVariance.d.ts +9 -0
  323. package/dist/types/utils/sanitizeHtml.d.ts +2 -2
  324. package/dist/types/utils/scaling.d.ts +1 -1
  325. package/dist/types/utils/stackColors.d.ts +3 -2
  326. package/dist/types/utils/stackLayout.d.ts +49 -0
  327. package/dist/types/utils/testing/fakeGroup.d.ts +8 -0
  328. package/dist/types/utils/testing/mutationObserver.d.ts +5 -0
  329. package/dist/types/utils/testing/structureChart.d.ts +5 -0
  330. package/dist/types/utils/testing/timeChart.d.ts +5 -0
  331. package/dist/types/utils/validate.d.ts +1 -1
  332. package/dist/types/utils/withComponentStatus.d.ts +11 -3
  333. package/dist/types/utils/withInheritedProps.d.ts +42 -15
  334. package/dist/types/utils/withRuleSet.d.ts +2 -1
  335. package/dist/types/utils/withTranslation.d.ts +2 -2
  336. package/dist/types/utils/xy/FacetGrid.d.ts +1 -1
  337. package/dist/types/utils/xy/IsoCurves.d.ts +1 -1
  338. package/dist/types/utils/xy/NumericScale.d.ts +9 -4
  339. package/dist/types/utils/xy/PointLabeler.d.ts +2 -2
  340. package/dist/types/utils/xy/RadiusScale.d.ts +2 -2
  341. package/dist/types/utils/xy/SeriesPalette.d.ts +3 -3
  342. package/dist/types/utils/xy/VarianceMeasure.d.ts +10 -2
  343. package/dist/types/utils/xy/XYFrame.d.ts +4 -1
  344. package/dist/types/utils/xy/XYLegend.d.ts +3 -1
  345. package/dist/types/utils/xy/checkXYOverflow.d.ts +8 -0
  346. package/dist/types/utils/xy/formatXYValue.d.ts +7 -0
  347. package/dist/types/utils/xy/model/AxisConfig.d.ts +1 -1
  348. package/dist/types/utils/xy/model/XYChartStyle.d.ts +2 -0
  349. package/package.json +4 -2
  350. package/readme.md +11 -11
  351. package/dist/bn-template-engine/p-03304284.entry.js +0 -1
  352. package/dist/bn-template-engine/p-0fb02c57.entry.js +0 -1
  353. package/dist/bn-template-engine/p-4419db8f.entry.js +0 -1
  354. package/dist/bn-template-engine/p-45508f1b.entry.js +0 -1
  355. package/dist/bn-template-engine/p-461fdffa.entry.js +0 -1
  356. package/dist/bn-template-engine/p-5d7a3a77.entry.js +0 -1
  357. package/dist/bn-template-engine/p-62cc95b7.entry.js +0 -1
  358. package/dist/bn-template-engine/p-686d8e44.entry.js +0 -1
  359. package/dist/bn-template-engine/p-829212c3.entry.js +0 -1
  360. package/dist/bn-template-engine/p-B5Jd_eCX.js +0 -1
  361. package/dist/bn-template-engine/p-BA48JiHe.js +0 -1
  362. package/dist/bn-template-engine/p-BbmobTg0.js +0 -1
  363. package/dist/bn-template-engine/p-BcaI745G.js +0 -1
  364. package/dist/bn-template-engine/p-CG_Bcm6V.js +0 -1
  365. package/dist/bn-template-engine/p-CWWWM-XC.js +0 -1
  366. package/dist/bn-template-engine/p-CsJ84YRk.js +0 -1
  367. package/dist/bn-template-engine/p-D5e8I9Qe.js +0 -1
  368. package/dist/bn-template-engine/p-DVrDYxlh.js +0 -1
  369. package/dist/bn-template-engine/p-DjPXefnq.js +0 -1
  370. package/dist/bn-template-engine/p-DsTzlzxQ.js +0 -1
  371. package/dist/bn-template-engine/p-DtLI_CzV.js +0 -1
  372. package/dist/bn-template-engine/p-EtT29btN.js +0 -1
  373. package/dist/bn-template-engine/p-TuLpbB5O.js +0 -1
  374. package/dist/bn-template-engine/p-a5867a4c.entry.js +0 -1
  375. package/dist/bn-template-engine/p-b27009eb.entry.js +0 -1
  376. package/dist/bn-template-engine/p-bfa87b07.entry.js +0 -1
  377. package/dist/bn-template-engine/p-ceb80db3.entry.js +0 -1
  378. package/dist/bn-template-engine/p-fcfbb329.entry.js +0 -1
  379. package/dist/bn-template-engine/p-qRZrT-U3.js +0 -1
  380. package/dist/cjs/AxisConfig-DwiNUyYG.js +0 -233
  381. package/dist/cjs/LabelCollisionManager-Bv-xkeXw.js +0 -415
  382. package/dist/cjs/NumericScale-BAyYXpKL.js +0 -107
  383. package/dist/cjs/Order-2wRydarc.js +0 -87
  384. package/dist/cjs/SVGStyle-DoxylrEQ.js +0 -8219
  385. package/dist/cjs/SVGVariancesStyleGroup-CiI4GeWe.js +0 -50
  386. package/dist/cjs/VarianceMeasure-CQlSRzlp.js +0 -372
  387. package/dist/cjs/XYChartDataRow-C2FdL58s.js +0 -829
  388. package/dist/cjs/bn-chart-bubble.cjs.entry.js +0 -792
  389. package/dist/cjs/bn-chart-bullet.cjs.entry.js +0 -805
  390. package/dist/cjs/bn-chart-scatter.cjs.entry.js +0 -678
  391. package/dist/cjs/bn-tree.cjs.entry.js +0 -1042
  392. package/dist/cjs/ibcs-chart-bubble.cjs.entry.js +0 -624
  393. package/dist/cjs/ibcs-chart-bullet.cjs.entry.js +0 -673
  394. package/dist/cjs/ibcs-chart-scatter.cjs.entry.js +0 -667
  395. package/dist/cjs/sanitizeHtml-LuZr1IMd.js +0 -85
  396. package/dist/cjs/svgChartElements-tDA43aYj.js +0 -400
  397. package/dist/cjs/withHasError-BdDmiOXM.js +0 -258
  398. package/dist/cjs/withScalingGroup-CFIc5-6s.js +0 -73
  399. package/dist/components/autoFit.js +0 -1
  400. package/dist/components/main.js +0 -1
  401. package/dist/components/utils.js +0 -1
  402. package/dist/esm/AxisConfig-KqzWQbML.js +0 -224
  403. package/dist/esm/LabelCollisionManager-585bQMtP.js +0 -407
  404. package/dist/esm/NumericScale-DsTzlzxQ.js +0 -105
  405. package/dist/esm/Order-DZVWjEL_.js +0 -83
  406. package/dist/esm/SVGStyle-OrPkzjcb.js +0 -8209
  407. package/dist/esm/SVGVariancesStyleGroup-DO5QJfRQ.js +0 -48
  408. package/dist/esm/VarianceMeasure-DDjChp8C.js +0 -364
  409. package/dist/esm/XYChartDataRow-Dn83Tqh9.js +0 -820
  410. package/dist/esm/bn-chart-bubble.entry.js +0 -790
  411. package/dist/esm/bn-chart-bullet.entry.js +0 -803
  412. package/dist/esm/bn-chart-scatter.entry.js +0 -676
  413. package/dist/esm/bn-tree.entry.js +0 -1040
  414. package/dist/esm/ibcs-chart-bubble.entry.js +0 -622
  415. package/dist/esm/ibcs-chart-bullet.entry.js +0 -671
  416. package/dist/esm/ibcs-chart-scatter.entry.js +0 -665
  417. package/dist/esm/sanitizeHtml-BA48JiHe.js +0 -83
  418. package/dist/esm/svgChartElements-B3YClivG.js +0 -395
  419. package/dist/esm/withHasError-Bh1Viz52.js +0 -254
  420. package/dist/esm/withScalingGroup-DNBSqRC0.js +0 -71
@@ -18,6 +18,8 @@ export function getNodeRect(element, containerRect) {
18
18
  centerY: top + rect.height / 2,
19
19
  };
20
20
  }
21
+ /** An orthogonal edge turns towards its child at this share of the way. */
22
+ const BEND_RATIO = 0.7;
21
23
  /**
22
24
  * Get the connection point on a node based on layout direction
23
25
  */
@@ -66,9 +68,11 @@ export function getMultiParentConnectionPoint(rect, direction, parentIndex, tota
66
68
  }
67
69
  }
68
70
  /**
69
- * Generate an SVG path connecting two points with the specified style
71
+ * Generate an SVG path connecting two points with the specified style.
72
+ * `bend` is the place where an orthogonal edge turns towards its child, see `calculateBend`.
73
+ * Without it the edge turns 70% of the way to its own child.
70
74
  */
71
- export function generateEdgePath(start, end, style, direction) {
75
+ export function generateEdgePath(start, end, style, direction, bend) {
72
76
  switch (style) {
73
77
  case "straight":
74
78
  return generateStraightPath(start, end);
@@ -76,7 +80,7 @@ export function generateEdgePath(start, end, style, direction) {
76
80
  return generateCurvedPath(start, end, direction);
77
81
  case "orthogonal":
78
82
  default:
79
- return generateOrthogonalPath(start, end, direction);
83
+ return generateOrthogonalPath(start, end, direction, bend);
80
84
  }
81
85
  }
82
86
  /**
@@ -119,73 +123,77 @@ function generateCurvedPath(start, end, direction) {
119
123
  * Generate an orthogonal (right-angle) path
120
124
  * The bend point is positioned closer to the children (70% of the way) for better visual balance
121
125
  */
122
- function generateOrthogonalPath(start, end, direction) {
126
+ function generateOrthogonalPath(start, end, direction, bend) {
123
127
  const isHorizontal = direction === "ltr" || direction === "rtl";
124
128
  let path;
125
129
  let midpoint;
126
- const bendRatio = 0.7; // Position bend point 70% towards the end
127
130
  if (isHorizontal) {
128
131
  // For horizontal layouts, go horizontally first, then vertically
129
- const midX = start.x + (end.x - start.x) * bendRatio;
132
+ const midX = bend !== null && bend !== void 0 ? bend : start.x + (end.x - start.x) * BEND_RATIO;
130
133
  path = `M ${start.x} ${start.y} L ${midX} ${start.y} L ${midX} ${end.y} L ${end.x} ${end.y}`;
131
134
  midpoint = { x: midX, y: (start.y + end.y) / 2 };
132
135
  }
133
136
  else {
134
137
  // For vertical layouts, go vertically first, then horizontally
135
- const midY = start.y + (end.y - start.y) * bendRatio;
138
+ const midY = bend !== null && bend !== void 0 ? bend : start.y + (end.y - start.y) * BEND_RATIO;
136
139
  path = `M ${start.x} ${start.y} L ${start.x} ${midY} L ${end.x} ${midY} L ${end.x} ${end.y}`;
137
140
  midpoint = { x: (start.x + end.x) / 2, y: midY };
138
141
  }
139
142
  return { path, midpoint };
140
143
  }
141
144
  /**
142
- * Calculate the position for an operator label between sibling nodes.
143
- * The operator is placed at the T-junction where the parent's line meets the vertical/horizontal split.
145
+ * The place where the edges of one parent turn towards the children: 70% of the way from
146
+ * the parent to its nearest child. It is an x for ltr and rtl and a y for ttb and btt.
147
+ * All edges of the parent share it, so they meet in one bus also when the children have
148
+ * different sizes.
149
+ *
150
+ * Only children ahead of the parent count. A child with a second parent can sit beside
151
+ * this parent, in its own level. Without a child ahead there is no bend.
144
152
  */
145
- export function calculateOperatorPosition(parentRect, sibling1Rect, sibling2Rect, direction) {
146
- const bendRatio = 0.7; // Must match the bendRatio in generateOrthogonalPath
153
+ export function calculateBend(parentRect, childRects, direction) {
154
+ // the edge of the parent the edges leave from, and the edges of the children they arrive at
155
+ let parentEdge;
156
+ let childEdges;
157
+ // +1 when the children are at larger coordinates than the parent
158
+ let ahead;
147
159
  switch (direction) {
148
- case "ltr": {
149
- // T-junction: where parent's horizontal line meets the vertical split
150
- const parentRight = parentRect.left + parentRect.width;
151
- const childrenLeft = Math.min(sibling1Rect.left, sibling2Rect.left);
152
- const midX = parentRight + (childrenLeft - parentRight) * bendRatio;
153
- return {
154
- x: midX,
155
- y: parentRect.centerY, // At parent's Y level (the T-junction)
156
- };
157
- }
158
- case "rtl": {
159
- // T-junction for RTL
160
- const parentLeft = parentRect.left;
161
- const childrenRight = Math.max(sibling1Rect.left + sibling1Rect.width, sibling2Rect.left + sibling2Rect.width);
162
- const midX = childrenRight + (parentLeft - childrenRight) * bendRatio;
163
- return {
164
- x: midX,
165
- y: parentRect.centerY,
166
- };
167
- }
168
- case "ttb": {
169
- // T-junction for top-to-bottom
170
- const parentBottom = parentRect.top + parentRect.height;
171
- const childrenTop = Math.min(sibling1Rect.top, sibling2Rect.top);
172
- const midY = parentBottom + (childrenTop - parentBottom) * bendRatio;
173
- return {
174
- x: parentRect.centerX, // At parent's X level (the T-junction)
175
- y: midY,
176
- };
177
- }
178
- case "btt": {
179
- // T-junction for bottom-to-top
180
- const parentTop = parentRect.top;
181
- const childrenBottom = Math.max(sibling1Rect.top + sibling1Rect.height, sibling2Rect.top + sibling2Rect.height);
182
- const midY = childrenBottom + (parentTop - childrenBottom) * bendRatio;
183
- return {
184
- x: parentRect.centerX,
185
- y: midY,
186
- };
187
- }
160
+ case "ltr":
161
+ parentEdge = parentRect.left + parentRect.width;
162
+ childEdges = childRects.map((rect) => rect.left);
163
+ ahead = 1;
164
+ break;
165
+ case "rtl":
166
+ parentEdge = parentRect.left;
167
+ childEdges = childRects.map((rect) => rect.left + rect.width);
168
+ ahead = -1;
169
+ break;
170
+ case "ttb":
171
+ parentEdge = parentRect.top + parentRect.height;
172
+ childEdges = childRects.map((rect) => rect.top);
173
+ ahead = 1;
174
+ break;
175
+ case "btt":
176
+ parentEdge = parentRect.top;
177
+ childEdges = childRects.map((rect) => rect.top + rect.height);
178
+ ahead = -1;
179
+ break;
180
+ }
181
+ const distances = childEdges.map((edge) => (edge - parentEdge) * ahead).filter((distance) => distance >= 0);
182
+ if (distances.length === 0) {
183
+ return undefined;
184
+ }
185
+ return parentEdge + Math.min(...distances) * ahead * BEND_RATIO;
186
+ }
187
+ /**
188
+ * Calculate the position for an operator label between two sibling nodes.
189
+ * The operator sits on the bus that joins the children (at `bend`, see `calculateBend`),
190
+ * halfway between the two siblings. For two children that is where the parent meets the bus.
191
+ */
192
+ export function calculateOperatorPosition(bend, sibling1Rect, sibling2Rect, direction) {
193
+ if (direction === "ltr" || direction === "rtl") {
194
+ return { x: bend, y: (sibling1Rect.centerY + sibling2Rect.centerY) / 2 };
188
195
  }
196
+ return { x: (sibling1Rect.centerX + sibling2Rect.centerX) / 2, y: bend };
189
197
  }
190
198
  /**
191
199
  * Get SVG style attributes for an edge
@@ -77,6 +77,9 @@ function calculateNodeIndices(config) {
77
77
  return existing;
78
78
  }
79
79
  const children = config.adjacencyList.get(node) || [];
80
+ // Marked before the children are visited, so an edge back to this node ends here.
81
+ // validateEdges rejects cycles, this only keeps the layout from running forever.
82
+ indices.set(node, { startIndex: currentIndex, endIndex: currentIndex });
80
83
  if (children.length === 0) {
81
84
  // Leaf node
82
85
  const info = { startIndex: currentIndex, endIndex: currentIndex };
@@ -111,31 +114,46 @@ function calculateGridPositions(config, levels, indices, direction) {
111
114
  const indexInfo = (_b = indices.get(nodeId)) !== null && _b !== void 0 ? _b : { startIndex: 0, endIndex: 0 };
112
115
  let gridColumn;
113
116
  let gridRow;
114
- let gridRowSpan;
117
+ let gridRowSpan = 1;
118
+ let gridColumnSpan = 1;
119
+ // a parent spans its children, so it sits centred next to them or over them
120
+ const span = indexInfo.endIndex - indexInfo.startIndex + 1;
121
+ // Two parents that share a child have ranges that overlap. As columns their spans
122
+ // would put the two boxes on top of each other: such a parent keeps the column of its first child.
123
+ const sharesColumns = Array.from(config.allNodes).some((other) => {
124
+ var _a;
125
+ const otherInfo = indices.get(other);
126
+ return (other !== nodeId &&
127
+ otherInfo !== undefined &&
128
+ ((_a = levels.get(other)) !== null && _a !== void 0 ? _a : 0) === level &&
129
+ otherInfo.startIndex <= indexInfo.endIndex &&
130
+ indexInfo.startIndex <= otherInfo.endIndex);
131
+ });
132
+ const columnSpan = sharesColumns ? 1 : span;
115
133
  switch (direction) {
116
134
  case "ltr":
117
135
  // Left to right: levels are columns, indices are rows
118
136
  gridColumn = level + 1; // CSS grid is 1-indexed
119
137
  gridRow = indexInfo.startIndex + 1;
120
- gridRowSpan = indexInfo.endIndex - indexInfo.startIndex + 1;
138
+ gridRowSpan = span;
121
139
  break;
122
140
  case "rtl":
123
141
  // Right to left: levels are reversed columns
124
142
  gridColumn = maxLevel - level + 1;
125
143
  gridRow = indexInfo.startIndex + 1;
126
- gridRowSpan = indexInfo.endIndex - indexInfo.startIndex + 1;
144
+ gridRowSpan = span;
127
145
  break;
128
146
  case "ttb":
129
147
  // Top to bottom: levels are rows, indices are columns
130
148
  gridRow = level + 1;
131
149
  gridColumn = indexInfo.startIndex + 1;
132
- gridRowSpan = 1;
150
+ gridColumnSpan = columnSpan;
133
151
  break;
134
152
  case "btt":
135
153
  // Bottom to top: levels are reversed rows
136
154
  gridRow = maxLevel - level + 1;
137
155
  gridColumn = indexInfo.startIndex + 1;
138
- gridRowSpan = 1;
156
+ gridColumnSpan = columnSpan;
139
157
  break;
140
158
  }
141
159
  positions.set(nodeId, {
@@ -145,6 +163,7 @@ function calculateGridPositions(config, levels, indices, direction) {
145
163
  gridColumn,
146
164
  gridRow,
147
165
  gridRowSpan,
166
+ gridColumnSpan,
148
167
  });
149
168
  }
150
169
  return positions;
@@ -223,3 +242,9 @@ export function getActualGridRowSpan(baseRowSpan) {
223
242
  // Span includes the spacer rows between nodes
224
243
  return (baseRowSpan - 1) * 2 + 1;
225
244
  }
245
+ /**
246
+ * Get the actual grid column span accounting for spacer columns
247
+ */
248
+ export function getActualGridColumnSpan(baseColumnSpan) {
249
+ return getActualGridRowSpan(baseColumnSpan);
250
+ }
@@ -62,6 +62,7 @@ export function validateEdges(json) {
62
62
  }
63
63
  const allNodes = new Set();
64
64
  const targetNodes = new Set();
65
+ const children = new Map();
65
66
  parsed.forEach((edge, index) => {
66
67
  if (typeof edge !== "object" || edge === null) {
67
68
  errors.push(`edges[${index}]: must be an object`);
@@ -80,6 +81,9 @@ export function validateEdges(json) {
80
81
  else {
81
82
  allNodes.add(typedEdge.to);
82
83
  targetNodes.add(typedEdge.to);
84
+ if (typeof typedEdge.from === "string") {
85
+ children.set(typedEdge.from, [...(children.get(typedEdge.from) || []), typedEdge.to]);
86
+ }
83
87
  }
84
88
  if (typedEdge.operator !== undefined) {
85
89
  if (typeof typedEdge.operator !== "string" || !VALID_OPERATORS.includes(typedEdge.operator)) {
@@ -115,6 +119,37 @@ export function validateEdges(json) {
115
119
  else if (rootNodes.length > 1) {
116
120
  errors.push(`edges: tree has multiple root nodes: ${rootNodes.join(", ")}`);
117
121
  }
122
+ else {
123
+ errors.push(...findCycleErrors(rootNodes[0], children, allNodes));
124
+ }
125
+ return errors;
126
+ }
127
+ /**
128
+ * Walks the tree from its root. An edge that leads back to a node on the way from the
129
+ * root is a cycle. A node the walk never reaches hangs in a cycle of its own.
130
+ */
131
+ function findCycleErrors(root, children, allNodes) {
132
+ const errors = [];
133
+ const onPath = new Set();
134
+ const visited = new Set();
135
+ const visit = (node) => {
136
+ visited.add(node);
137
+ onPath.add(node);
138
+ for (const child of children.get(node) || []) {
139
+ if (onPath.has(child)) {
140
+ errors.push(`edges: circular reference, the edge from '${node}' to '${child}' leads back`);
141
+ }
142
+ else if (!visited.has(child)) {
143
+ visit(child);
144
+ }
145
+ }
146
+ onPath.delete(node);
147
+ };
148
+ visit(root);
149
+ const unreachable = Array.from(allNodes).filter((node) => !visited.has(node));
150
+ if (unreachable.length > 0) {
151
+ errors.push(`edges: nodes not connected to the root '${root}': ${unreachable.join(", ")}`);
152
+ }
118
153
  return errors;
119
154
  }
120
155
  /**
@@ -37,7 +37,7 @@ export class EditorCompanion {
37
37
  return Promise.resolve(result);
38
38
  }
39
39
  render() {
40
- return h(Fragment, { key: '35a8fdaa36fb5f9b042d1fad904f9b54a58ba79c' });
40
+ return h(Fragment, { key: '8471f86389578b1f8fa96b139fcbe011edd1ab1a' });
41
41
  }
42
42
  /** Materialize a table or view from the shared db, returning [] when it doesn't exist yet. */
43
43
  queryRows(name) {
@@ -13,7 +13,7 @@
13
13
  import { createScopedStores } from "../stores/createScopedStores";
14
14
  /**
15
15
  * Module-level registry mapping `<bn-context>` DOM elements to their stores.
16
- * Stores are created lazily by `getOrCreateStores()` — whichever component
16
+ * Stores are created lazily by `getOrCreateStores()` - whichever component
17
17
  * initializes first triggers creation for its ancestor `<bn-context>`.
18
18
  */
19
19
  const contextRegistry = new WeakMap();
@@ -20,20 +20,48 @@ import { DateTime } from "luxon";
20
20
  */
21
21
  export function buildFromExpr(tableName, filter) {
22
22
  if (filter != null && filter.length > 0) {
23
- return `(SELECT * FROM \`${tableName}\` WHERE ${filter}) AS __src`;
23
+ // a rejected filter (the wrappers report ERR_filter) selects nothing instead of reaching alasql
24
+ return `(SELECT * FROM \`${tableName}\` WHERE ${hasInlineJs(filter) ? "1 = 0" : filter}) AS __src`;
24
25
  }
25
26
  return `\`${tableName}\``;
26
27
  }
28
+ /**
29
+ * True when `name` is registered as a table or a view. A query on a name that
30
+ * is not registered yet means "no data so far". A failing query on a
31
+ * registered name is an error.
32
+ */
33
+ export function isRegistered(db, name) {
34
+ var _a;
35
+ // alasql keeps a view in db.tables as well
36
+ return ((_a = db.tables) === null || _a === void 0 ? void 0 : _a[name]) != null;
37
+ }
38
+ /** {@link buildFromExpr} for a registered source, `""` otherwise. The query helpers read `""` as "no data". */
39
+ export function sourceExpr(db, tableName, filter) {
40
+ return tableName && isRegistered(db, tableName) ? buildFromExpr(tableName, filter) : "";
41
+ }
42
+ /**
43
+ * True when alasql would find a double backtick in `sql`: it runs the text
44
+ * between double backticks as JavaScript. alasql strips comments before it
45
+ * reads the text, so two backticks with only a comment between them count too.
46
+ */
47
+ export function hasInlineJs(sql) {
48
+ var _a, _b, _c;
49
+ if (!sql)
50
+ return false;
51
+ // @ts-ignore - utils is not in the public typings
52
+ const uncommented = (_c = (_b = (_a = alasql.utils) === null || _a === void 0 ? void 0 : _a.uncomment) === null || _b === void 0 ? void 0 : _b.call(_a, sql)) !== null && _c !== void 0 ? _c : "";
53
+ return sql.includes("``") || uncommented.includes("``");
54
+ }
27
55
  /** Coerces an unknown value into a Luxon `DateTime`, or `undefined` if it can't be parsed. */
28
56
  function toDateTime(value) {
29
57
  if (value == null)
30
58
  return undefined;
31
59
  if (typeof value === "string") {
32
- const dt = DateTime.fromISO(value);
60
+ const dt = DateTime.fromISO(value, { zone: "utc" });
33
61
  return dt.isValid ? dt : undefined;
34
62
  }
35
63
  if (typeof value === "number") {
36
- const dt = DateTime.fromMillis(value);
64
+ const dt = DateTime.fromMillis(value, { zone: "utc" });
37
65
  return dt.isValid ? dt : undefined;
38
66
  }
39
67
  // Already a DateTime-shaped object.
@@ -45,7 +73,7 @@ function toDateTime(value) {
45
73
  }
46
74
  /**
47
75
  * AlaSQL custom functions (UDFs) live on the `alasql.fn` global, not per-DB.
48
- * Register them once at module load — multiple contexts share the registrations.
76
+ * Register them once at module load - multiple contexts share the registrations.
49
77
  *
50
78
  * Signatures are widened to `(...x: unknown[]) => unknown` to satisfy alasql's
51
79
  * `userDefinedFunction` type; argument validation happens inside each UDF.
@@ -82,6 +110,7 @@ export function createScopedDb() {
82
110
  registerUdfs();
83
111
  const db = new alasql.Database();
84
112
  const subscribers = new Map();
113
+ const claims = new Map();
85
114
  return {
86
115
  db,
87
116
  subscribe(name, cb) {
@@ -123,5 +152,19 @@ export function createScopedDb() {
123
152
  // @ts-ignore - views is not in the public typings
124
153
  return ((_a = db.views) === null || _a === void 0 ? void 0 : _a[name]) != null;
125
154
  },
155
+ claim(name, onShared) {
156
+ var _a;
157
+ const producers = (_a = claims.get(name)) !== null && _a !== void 0 ? _a : new Set();
158
+ claims.set(name, producers);
159
+ producers.add(onShared);
160
+ const tell = () => producers.forEach((cb) => cb(producers.size > 1));
161
+ tell();
162
+ return () => {
163
+ producers.delete(onShared);
164
+ if (producers.size === 0)
165
+ claims.delete(name);
166
+ tell();
167
+ };
168
+ },
126
169
  };
127
170
  }
@@ -173,3 +173,42 @@ export const SYSTEM_STYLE_DEFAULTS = {
173
173
  cellPadding: 4,
174
174
  },
175
175
  };
176
+ /** `bn-text` keys. All are optional, so the defaults do not list them. */
177
+ const TEXT_STYLE_KEYS = ["fontFamily", "fontSizePx", "fontColor", "fontBackgroundColor", "leading"];
178
+ // The keys of these groups are checked too. The style groups (`axisStyles.ac`, ...) are not: their keys differ per scenario.
179
+ const CHECKED_GROUPS = ["scaleFactors", "padding"];
180
+ const isPlainObject = (value) => value !== null && typeof value === "object" && !Array.isArray(value);
181
+ /**
182
+ * The keys of a style body that no component reads, as paths
183
+ * (e.g. `bn-chart-time.scaleFactors.labelToColum`). Such a key is ignored
184
+ * when the style is applied, so a typo would otherwise go unnoticed.
185
+ */
186
+ export function unknownStyleKeys(style) {
187
+ const unknown = [];
188
+ if (!isPlainObject(style)) {
189
+ return unknown;
190
+ }
191
+ const defaults = SYSTEM_STYLE_DEFAULTS;
192
+ for (const [section, value] of Object.entries(style)) {
193
+ if (!(section in defaults)) {
194
+ unknown.push(section);
195
+ continue;
196
+ }
197
+ if (!isPlainObject(value)) {
198
+ continue;
199
+ }
200
+ const sectionKeys = section === "bn-text" ? TEXT_STYLE_KEYS : Object.keys(defaults[section]);
201
+ for (const [key, group] of Object.entries(value)) {
202
+ if (!sectionKeys.includes(key)) {
203
+ unknown.push(`${section}.${key}`);
204
+ }
205
+ else if (CHECKED_GROUPS.includes(key) && isPlainObject(group)) {
206
+ const groupKeys = Object.keys(defaults[section][key]);
207
+ unknown.push(...Object.keys(group)
208
+ .filter((name) => !groupKeys.includes(name))
209
+ .map((name) => `${section}.${key}.${name}`));
210
+ }
211
+ }
212
+ }
213
+ return unknown;
214
+ }
@@ -8,7 +8,7 @@
8
8
  * **Token pattern**: Variance symbols use `{%}` as a placeholder for the
9
9
  * scenario abbreviation. For example, `"Δ{%}"` becomes `"ΔPY"` when the
10
10
  * comparison scenario is "PY". The `{%}` replacement is performed at render
11
- * time by `Formatter.translateScenarioLabel` — not by `withTranslation`,
11
+ * time by `Formatter.translateScenarioLabel` - not by `withTranslation`,
12
12
  * which only interpolates `{{mustache}}` placeholders.
13
13
  *
14
14
  * @module stores/internationalization
@@ -52,7 +52,7 @@ const globalLabelKeys = [
52
52
  const xyChartKeysDe = {
53
53
  axis: { in: "in" },
54
54
  legend: { title: "" },
55
- "no-data": "==Keine Daten==",
55
+ "no-data": "Keine Daten",
56
56
  "xy-prop-json": "{{prop}}: ungültiges JSON.",
57
57
  "xy-measure-invalid": "{{prop}}: '{{measure}}' ist weder eine Szenario-Spalte noch ein Varianz-Token.",
58
58
  "xy-family-mixed": "Alle Kennzahlen müssen zur selben Szenario-Familie gehören (gefunden: {{families}}).",
@@ -67,7 +67,7 @@ const xyChartKeysDe = {
67
67
  const xyChartKeysEn = {
68
68
  axis: { in: "in" },
69
69
  legend: { title: "" },
70
- "no-data": "==No Data==",
70
+ "no-data": "No Data",
71
71
  "xy-prop-json": "{{prop}}: invalid JSON.",
72
72
  "xy-measure-invalid": "{{prop}}: '{{measure}}' is neither a scenario column nor a variance token.",
73
73
  "xy-family-mixed": "All measures must share one scenario family (found: {{families}}).",
@@ -109,13 +109,13 @@ const de = flattenObject({
109
109
  CONNECTOR_WS: " und ",
110
110
  in: "in",
111
111
  },
112
- "bn-chart-time": { "no-data": "==Keine Daten==" },
113
- "bn-chart-structure": { "no-data": "==Keine Daten==", REST: "REST" },
112
+ "bn-chart-time": { "no-data": "Keine Daten" },
113
+ "bn-chart-structure": { "no-data": "Keine Daten", REST: "REST" },
114
114
  "bn-chart-scatter": Object.assign(Object.assign({}, xyChartKeysDe), { "xy-iso-domain": "Iso-Linien benötigen einen strikt positiven Wertebereich auf beiden Achsen; übersprungen." }),
115
115
  "bn-chart-bubble": Object.assign(Object.assign({}, xyChartKeysDe), { legend: Object.assign(Object.assign({}, xyChartKeysDe.legend), { size: "Größe", compare: "Szenarien" }), "xy-compare-variance": "compareWith kann nicht mit Varianz-Kennzahlen auf den Achsen kombiniert werden.", "bubble-size-negative": "{{count}} Blase(n) mit negativem Größenwert ausgeschlossen.", "bubble-share-range": "{{count}} Anteilswert(e) außerhalb [0,1] wurden begrenzt.", "bubble-scale-group-unknown": "size.group '{{group}}' verweist auf keine bn-scaling-group im Kontext.", "bubble-scale-overflow": "{{count}} gruppenskalierte Blase(n) überschreiten das Panel; in Originalgröße gezeichnet." }),
116
116
  "bn-chart-bullet": {
117
117
  axis: { in: "in" },
118
- "no-data": "==Keine Daten==",
118
+ "no-data": "Keine Daten",
119
119
  target: "Ziel",
120
120
  "bullet-prop-json": "{{prop}}: ungültiges JSON.",
121
121
  "bullet-measure-invalid": "{{prop}}: '{{measure}}' ist keine Szenario-Spalte (ac1…pl4).",
@@ -123,7 +123,8 @@ const de = flattenObject({
123
123
  "bullet-target-none": "Kein Ziel-Szenario gefunden (pl1/pp1/fc1); nur Ist-Balken werden gezeichnet.",
124
124
  "bullet-target-missing": "{{count}} Zeile(n) ohne Zielwert; Varianz und Marker entfallen.",
125
125
  "bullet-target-invalid": "{{count}} Zeile(n) mit Ziel ≤ 0 können nicht normalisiert werden; Balken entfällt.",
126
- "bullet-mixed-operation": "{{count}} KPI-Gruppe(n) mischen '+'- und '-'-Zeilen; Sentiment fällt auf '+' zurück.",
126
+ "bullet-actual-negative": "{{count}} Zeile(n) mit negativem Ist-Wert; der Balken kann nicht gezeichnet werden, der Wert steht als Text.",
127
+ "bullet-mixed-operation": "{{count}} KPI-Gruppe(n) mischen '+'- und '-'-Zeilen; '-'-Zeilen werden abgezogen, das Sentiment ist '+'.",
127
128
  "bullet-ranges-ignored": 'ranges: im normalisierten (IBCS-)Modus ignoriert; normalize="none" setzen.',
128
129
  "bullet-ranges-invalid": "ranges: erwartet bis zu 2 aufsteigende positive Zielanteile ({{detail}}).",
129
130
  },
@@ -135,7 +136,7 @@ const de = flattenObject({
135
136
  part_of: "in % von",
136
137
  SUM_TOTAL: "❖",
137
138
  REST: "REST",
138
- "no-data": "==Keine Daten==",
139
+ "no-data": "Keine Daten",
139
140
  },
140
141
  });
141
142
  const en = flattenObject({
@@ -168,13 +169,13 @@ const en = flattenObject({
168
169
  CONNECTOR_WS: " and ",
169
170
  in: "in",
170
171
  },
171
- "bn-chart-time": { "no-data": "==No Data==" },
172
- "bn-chart-structure": { "no-data": "==No Data==", REST: "REST" },
172
+ "bn-chart-time": { "no-data": "No Data" },
173
+ "bn-chart-structure": { "no-data": "No Data", REST: "REST" },
173
174
  "bn-chart-scatter": Object.assign(Object.assign({}, xyChartKeysEn), { "xy-iso-domain": "Iso-lines need a strictly positive domain on both axes; skipped." }),
174
175
  "bn-chart-bubble": Object.assign(Object.assign({}, xyChartKeysEn), { legend: Object.assign(Object.assign({}, xyChartKeysEn.legend), { size: "Size", compare: "Scenarios" }), "xy-compare-variance": "compareWith cannot be combined with variance measures on the axes.", "bubble-size-negative": "{{count}} bubble(s) with a negative size value excluded.", "bubble-share-range": "{{count}} share value(s) outside [0,1] were clamped.", "bubble-scale-group-unknown": "size.group '{{group}}' names no bn-scaling-group in scope.", "bubble-scale-overflow": "{{count}} group-scaled bubble(s) exceed the panel; rendered true-size." }),
175
176
  "bn-chart-bullet": {
176
177
  axis: { in: "in" },
177
- "no-data": "==No Data==",
178
+ "no-data": "No Data",
178
179
  target: "Target",
179
180
  "bullet-prop-json": "{{prop}}: invalid JSON.",
180
181
  "bullet-measure-invalid": "{{prop}}: '{{measure}}' is not a scenario column (ac1…pl4).",
@@ -182,7 +183,8 @@ const en = flattenObject({
182
183
  "bullet-target-none": "No target scenario found (pl1/pp1/fc1); rendering actual bars only.",
183
184
  "bullet-target-missing": "{{count}} row(s) without a target value; variance and marker omitted.",
184
185
  "bullet-target-invalid": "{{count}} row(s) with target ≤ 0 cannot be normalized; bar omitted.",
185
- "bullet-mixed-operation": "{{count}} KPI group(s) mix '+' and '-' rows; sentiment defaults to '+'.",
186
+ "bullet-actual-negative": "{{count}} row(s) with a negative actual value; the bar cannot be drawn, the value is shown as text.",
187
+ "bullet-mixed-operation": "{{count}} KPI group(s) mix '+' and '-' rows; '-' rows are subtracted and the sentiment is '+'.",
186
188
  "bullet-ranges-ignored": 'ranges: ignored in normalized (IBCS) mode; set normalize="none".',
187
189
  "bullet-ranges-invalid": "ranges: expected up to 2 ascending positive fractions of the target ({{detail}}).",
188
190
  },
@@ -194,7 +196,7 @@ const en = flattenObject({
194
196
  part_of: "in % of",
195
197
  SUM_TOTAL: "❖",
196
198
  REST: "REST",
197
- "no-data": "==No Data==",
199
+ "no-data": "No Data",
198
200
  },
199
201
  });
200
202
  const BN_INTERNATIONALIZATION_KEYS = Object.keys(de || {});
@@ -42,7 +42,8 @@ export class DateStringFactory {
42
42
  year: "yyyy",
43
43
  quarter: "q'Q' yyyy",
44
44
  month: "LLL yyyy",
45
- week: "'KW'WW yyyy",
45
+ // kkkk is the ISO week year: week 1 of 2025 starts on Monday 2024-12-30
46
+ week: "'KW'WW kkkk",
46
47
  day: "dd.MM.yyyy",
47
48
  hour: "TT",
48
49
  minute: "TT",
@@ -205,24 +206,24 @@ export class DateStringFactory {
205
206
  * @param {string|Date} from start date
206
207
  * @param {string|Date} to end date
207
208
  * @param dateInterval
208
- * @param spanLimit
209
209
  */
210
- datesBetween(from, to, dateInterval, spanLimit) {
210
+ datesBetween(from, to, dateInterval) {
211
211
  const unit = this.convertDateDistanceToMomentunitOfTime(dateInterval);
212
212
  const fromDate = from.startOf(unit);
213
213
  const toDate = to.endOf(unit);
214
- let span = toDate.diff(fromDate).as(unit);
215
214
  const days = [];
216
- if (span >= spanLimit) {
217
- span = spanLimit;
218
- }
219
215
  let currentDate = fromDate;
220
216
  do {
221
217
  days.push(currentDate);
222
218
  currentDate = currentDate.plus(this.createDiratonLike(unit, 1));
223
- } while (currentDate <= toDate && days.length < span);
219
+ } while (currentDate <= toDate);
224
220
  return days;
225
221
  }
222
+ /** Number of `dateInterval` periods from `from` to `to`, both included. */
223
+ countBetween(from, to, dateInterval) {
224
+ const unit = this.convertDateDistanceToMomentunitOfTime(dateInterval);
225
+ return Math.floor(to.startOf(unit).diff(from.startOf(unit), unit).as(unit)) + 1;
226
+ }
226
227
  /**
227
228
  * Produces an IBCS date-link string combining date formatting with link notation.
228
229
  *
@@ -280,7 +281,7 @@ export class DateStringFactory {
280
281
  dateString1 = dateString2;
281
282
  }
282
283
  // clean up dateString1 if same year
283
- if (mode === DateLink.INTERVAL || mode === DateLink.CUM || DateLink.AVG) {
284
+ if (mode === DateLink.INTERVAL || mode === DateLink.CUM || mode === DateLink.AVG) {
284
285
  if (type === DateDistance.QUARTER) {
285
286
  if (date1.quarter === date2.quarter && date1.year === date2.year) {
286
287
  dateString2 = dateString2.replace(" " + date2.year, "");
@@ -298,11 +299,11 @@ export class DateStringFactory {
298
299
  }
299
300
  }
300
301
  else if (type === DateDistance.WEEK) {
301
- if (date1.weekNumber === date2.weekNumber && date1.year === date2.year) {
302
- dateString2 = dateString2.replace(" " + date2.year, "");
302
+ if (date1.weekNumber === date2.weekNumber && date1.weekYear === date2.weekYear) {
303
+ dateString2 = dateString2.replace(" " + date2.weekYear, "");
303
304
  }
304
- else if (date1.year === date2.year) {
305
- dateString1 = dateString1.replace(" " + date1.year, "");
305
+ else if (date1.weekYear === date2.weekYear) {
306
+ dateString1 = dateString1.replace(" " + date1.weekYear, "");
306
307
  }
307
308
  }
308
309
  }
@@ -345,7 +346,8 @@ export class DateStringFactory {
345
346
  getFormatedWeekDate(date) {
346
347
  let format = this.dateFormatShort["week"];
347
348
  if (this.isFirstWeek(date)) {
348
- format += " " + this.dateFormatShort["year"];
349
+ // the short ISO week year, see the week format
350
+ format += " kk";
349
351
  }
350
352
  return date.setLocale(this.locale).toFormat(format);
351
353
  }
@@ -471,7 +473,7 @@ export class DateStringFactory {
471
473
  * locale-aware through `setLocale`, so they need no override.
472
474
  */
473
475
  DateStringFactory.LOCALE_DATE_FORMAT = {
474
- en: { week: "'W'WW yyyy", day: "MM/dd/yyyy", fallback: "MM/dd/yyyy" },
476
+ en: { week: "'W'WW kkkk", day: "MM/dd/yyyy", fallback: "MM/dd/yyyy" },
475
477
  };
476
478
  DateStringFactory.LOCALE_DATE_FORMAT_SHORT = {
477
479
  en: { week: "'W'WW", fallback: "MM/dd/yyyy" },
@@ -15,7 +15,7 @@
15
15
  export const MIN_PIXEL_SCALE = 0.001;
16
16
  /**
17
17
  * Total bar extent (in data units) that scales linearly with pixelPerUnit.
18
- * Counts BOTH sides of the axis — a chart with values -13..+12 spans 25
18
+ * Counts BOTH sides of the axis - a chart with values -13..+12 spans 25
19
19
  * units, not 12 (fitting only the positive side is how charts used to
20
20
  * overshoot their container).
21
21
  */
@@ -46,7 +46,7 @@ export function computePercentBarExtent(inputs) {
46
46
  /**
47
47
  * Solves the affine size model for the target and returns corrected scale
48
48
  * values (floored at {@link MIN_PIXEL_SCALE}). Returns an empty object when
49
- * nothing scales with the solved values (both extents 0) — callers fall back
49
+ * nothing scales with the solved values (both extents 0) - callers fall back
50
50
  * to a ratio heuristic. Only the quantities whose extent is > 0 are returned.
51
51
  */
52
52
  export function solveAutoFitStep(inputs) {