@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
@@ -1,4 +1,5 @@
1
1
  import { forceUpdate, h, Host, writeTask } from "@stencil/core";
2
+ import { hasInlineJs } from "../../context/scopedDb";
2
3
  import { collectXYFacadeState, originsFor } from "../../utils/layoutState";
3
4
  import { globalLabelKeys } from "../../stores/internationalization";
4
5
  import { AggregationLevel } from "../../utils/constants";
@@ -17,6 +18,7 @@ import { withStyled } from "../../utils/styled/withStyled";
17
18
  import { resolveMeasure } from "../../utils/xy/VarianceMeasure";
18
19
  import { parseSpec } from "../../utils/xy/model/AxisConfig";
19
20
  import { parseRanges, toBulletLabelConfig, toBulletMeasureConfig, } from "./utils/model/BulletConfig";
21
+ import { syncEmptyState } from "../../utils/emptyState";
20
22
  /** Auto-detection preference for the target scenario. */
21
23
  const TARGET_SLOT_PREFERENCE = ["pl1", "pp1", "fc1"];
22
24
  /**
@@ -24,9 +26,9 @@ const TARGET_SLOT_PREFERENCE = ["pl1", "pp1", "fc1"];
24
26
  * a target marker.
25
27
  *
26
28
  * Subscribes to a dataset (via `withDataset`) and renders in the IBCS
27
- * default mode with **normalized targets** — every row is scaled to
29
+ * default mode with **normalized targets** - every row is scaled to
28
30
  * fractions of its target so one continuous target line spans all rows and
29
- * KPIs become visually comparable — plus integrated variance bars in the
31
+ * KPIs become visually comparable - plus integrated variance bars in the
30
32
  * IBCS variance colors. The classic Stephen Few look is opt-in via
31
33
  * `normalize="none"` (per-row scales) and `ranges` (max two qualitative
32
34
  * gray bands). Actual and target scenarios are auto-detected from the
@@ -35,6 +37,19 @@ const TARGET_SLOT_PREFERENCE = ["pl1", "pp1", "fc1"];
35
37
  * auto-detected metadata, and computes styles.
36
38
  */
37
39
  export class ChartBullet {
40
+ validateFilter(newValue) {
41
+ const errId = "ERR_filter";
42
+ if (hasInlineJs(newValue)) {
43
+ this.errors.addOrReplace({
44
+ id: errId,
45
+ type: "error",
46
+ message: "filter: double backticks are not allowed.",
47
+ });
48
+ }
49
+ else {
50
+ this.errors.remove(errId);
51
+ }
52
+ }
38
53
  validateActual(newValue) {
39
54
  this.validateMeasureSpec("actual", newValue);
40
55
  }
@@ -94,7 +109,7 @@ export class ChartBullet {
94
109
  this.errors.addOrReplace({
95
110
  id: errId,
96
111
  type: "warning",
97
- message: `order-direction: invalid value '${newValue}' — expected asc/desc; using asc.`,
112
+ message: `order-direction: invalid value '${newValue}' - expected asc/desc; using asc.`,
98
113
  });
99
114
  }
100
115
  }
@@ -107,7 +122,7 @@ export class ChartBullet {
107
122
  this.errors.addOrReplace({
108
123
  id: errId,
109
124
  type: "warning",
110
- message: `limit: invalid value '${newValue}' — expected a non-negative integer; using 0.`,
125
+ message: `limit: invalid value '${newValue}' - expected a non-negative integer; using 0.`,
111
126
  });
112
127
  }
113
128
  }
@@ -138,7 +153,7 @@ export class ChartBullet {
138
153
  this.errors.addOrReplace({
139
154
  id: errId,
140
155
  type: "warning",
141
- message: `scale: invalid value '${newValue}' — expected none/auto or a positive number.`,
156
+ message: `scale: invalid value '${newValue}' - expected none/auto or a positive number.`,
142
157
  });
143
158
  }
144
159
  else {
@@ -153,7 +168,7 @@ export class ChartBullet {
153
168
  this.datasetMeta = null;
154
169
  this.appliedScaleFactor = 1;
155
170
  this.layoutObserver = null;
156
- /** Ids of currently-active blocking errors — the chart renders empty while any is set. */
171
+ /** Ids of currently-active blocking errors - the chart renders empty while any is set. */
157
172
  this.activeErrors = new Set();
158
173
  /**
159
174
  * Custom chart title
@@ -167,32 +182,32 @@ export class ChartBullet {
167
182
  /**
168
183
  * Actual-value measure. JSON object or a bare scenario slot as shorthand:
169
184
  * `{"measure":"ac1","label":"Revenue","unit":"EUR k"}`. Only plain
170
- * scenario slots (`ac1`…`pl4`) are allowed — variance tokens are not.
185
+ * scenario slots (`ac1`…`pl4`) are allowed - variance tokens are not.
171
186
  * Empty or `"auto"` auto-detects (`ac1`, else the first available
172
187
  * scenario).
173
188
  */
174
189
  this.actual = "";
175
190
  /**
176
- * Target measure — same shape as `actual`. Empty or `"auto"` auto-detects
191
+ * Target measure - same shape as `actual`. Empty or `"auto"` auto-detects
177
192
  * (`pl1` > `pp1` > `fc1`); without any target scenario the chart renders
178
193
  * actual bars only.
179
194
  */
180
195
  this.target = "";
181
196
  /**
182
197
  * Qualitative range bands as a JSON array of ascending fractions of the
183
- * target, at most two — e.g. `[0.6, 0.9]` (IBCS rejects a third band of
198
+ * target, at most two - e.g. `[0.6, 0.9]` (IBCS rejects a third band of
184
199
  * arbitrary length). Classic mode only; ignored while `normalize` is
185
200
  * `"target"`.
186
201
  */
187
202
  this.ranges = "";
188
203
  /**
189
- * Target normalization: `target` (default — rows share an aligned target
204
+ * Target normalization: `target` (default - rows share an aligned target
190
205
  * position, the IBCS-comparable form) or `none` (classic per-row scales
191
206
  * with tick strips).
192
207
  */
193
208
  this.normalize = "target";
194
209
  /**
195
- * Variance bars between actual and target: `auto` (default — drawn in
210
+ * Variance bars between actual and target: `auto` (default - drawn in
196
211
  * normalized mode, favorable/unfavorable in the IBCS variance colors) or
197
212
  * `none`.
198
213
  */
@@ -213,7 +228,7 @@ export class ChartBullet {
213
228
  */
214
229
  this.orderDirection = "";
215
230
  /**
216
- * Maximum number of KPI rows (0 = unlimited). Truncates — there is no
231
+ * Maximum number of KPI rows (0 = unlimited). Truncates - there is no
217
232
  * REST aggregate, summing heterogeneous KPIs would be meaningless.
218
233
  */
219
234
  this.limit = 0;
@@ -239,6 +254,7 @@ export class ChartBullet {
239
254
  this.t = withTranslation(this).t;
240
255
  }
241
256
  componentWillLoad() {
257
+ this.validateFilter(this.filter);
242
258
  this.validateActual(this.actual);
243
259
  this.validateTarget(this.target);
244
260
  this.validateRanges(this.ranges);
@@ -252,8 +268,9 @@ export class ChartBullet {
252
268
  this.validateScale(this.scale);
253
269
  }
254
270
  componentDidRender() {
271
+ syncEmptyState(this.element, "ibcs-chart-bullet");
255
272
  // Bullet height is data-driven (rows × rowHeight), so the auto-fit
256
- // scales against the parent HEIGHT — the structure-chart variant, not
273
+ // scales against the parent HEIGHT - the structure-chart variant, not
257
274
  // the width-based XY one.
258
275
  const { mode } = parseScaling(this.scale);
259
276
  if (mode !== "auto" && mode !== "empty") {
@@ -272,7 +289,7 @@ export class ChartBullet {
272
289
  const baseFontSize = this.componentStyle(($) => { var _a; return ((_a = $["global"]) === null || _a === void 0 ? void 0 : _a["fontSizePx"]) || 13.3333; });
273
290
  const currentHeight = host.scrollHeight;
274
291
  const currentFactor = this.appliedScaleFactor;
275
- // Content fits at the current factor — don't reset to 1, it only fits
292
+ // Content fits at the current factor - don't reset to 1, it only fits
276
293
  // BECAUSE of the current factor (resetting would oscillate).
277
294
  if (currentHeight <= parentHeight + 1) {
278
295
  this.errors.remove("AUTO_scale");
@@ -299,7 +316,7 @@ export class ChartBullet {
299
316
  });
300
317
  }
301
318
  componentDidLoad() {
302
- // Watch for size changes (window resize, card relayout) — height only.
319
+ // Watch for size changes (window resize, card relayout) - height only.
303
320
  this.layoutObserver = observeParentResize(this.element, () => {
304
321
  if (this._autoScaleGuard)
305
322
  return;
@@ -358,14 +375,14 @@ export class ChartBullet {
358
375
  }
359
376
  this.setBlockingError(jsonId, null);
360
377
  if (data === null) {
361
- // Blank is valid — the measure is auto-detected.
378
+ // Blank is valid - the measure is auto-detected.
362
379
  this.setBlockingError(measureId, null);
363
380
  this.errors.remove(fieldsId);
364
381
  return;
365
382
  }
366
383
  const measure = ((_a = data.measure) !== null && _a !== void 0 ? _a : "").trim();
367
384
  const ref = resolveMeasure(measure);
368
- // Plain scenario slots only — the bullet variance is implicit
385
+ // Plain scenario slots only - the bullet variance is implicit
369
386
  // (actual vs target), variance tokens have no meaning here.
370
387
  if (measure.toLowerCase() !== "auto" && (ref === null || ref.kind !== "scenario")) {
371
388
  this.setBlockingError(measureId, this.t(".bullet-measure-invalid", { prop, measure }));
@@ -383,7 +400,7 @@ export class ChartBullet {
383
400
  this.errors.addOrReplace({
384
401
  id: errId,
385
402
  type: "warning",
386
- message: `${prop}: invalid value '${raw}' — expected ${valid.join("/")}; using '${fallback}'.`,
403
+ message: `${prop}: invalid value '${raw}' - expected ${valid.join("/")}; using '${fallback}'.`,
387
404
  });
388
405
  }
389
406
  }
@@ -409,7 +426,7 @@ export class ChartBullet {
409
426
  }
410
427
  /**
411
428
  * Resolved actual measure. Blank/`auto` auto-detects `ac1`, else the
412
- * first `ac*` slot, else the first available scenario — blank (unlike an
429
+ * first `ac*` slot, else the first available scenario - blank (unlike an
413
430
  * explicit `auto`) additionally raises the `AUTO_actual` info warning
414
431
  * (structure-chart convention).
415
432
  */
@@ -602,7 +619,7 @@ export class ChartBullet {
602
619
  * Lazily generates this chart's layout state: host box (context- and
603
620
  * component-relative, CSS px), the canvas region and diagnostics. With
604
621
  * `detail: "full"` the rendered marks and labels are listed with their
605
- * geometry (tag-classified — bullet marks carry no ids).
622
+ * geometry (tag-classified - bullet marks carry no ids).
606
623
  *
607
624
  * @param options - `{ detail: "summary" | "full" }`, default `"summary"`
608
625
  */
@@ -611,7 +628,7 @@ export class ChartBullet {
611
628
  const detail = (_a = options === null || options === void 0 ? void 0 : options.detail) !== null && _a !== void 0 ? _a : "summary";
612
629
  const origins = originsFor(this.element);
613
630
  const rawFactor = this.getEffectiveScaleFactor();
614
- // Auto-scale can be mid-measurement (or unmeasurable in tests) — report a sane factor.
631
+ // Auto-scale can be mid-measurement (or unmeasurable in tests) - report a sane factor.
615
632
  const factor = Number.isFinite(rawFactor) && rawFactor > 0 ? rawFactor : 1;
616
633
  const fontSizePx = this.componentStyle(($) => { var _a; return ((_a = $["global"]) === null || _a === void 0 ? void 0 : _a["fontSizePx"]) || 13.3333; }) * factor;
617
634
  return collectXYFacadeState(this.element, "ibcs-chart-bullet", this.chartTitle || undefined, { fontSizePx, appliedScaleFactor: factor }, origins, detail);
@@ -689,7 +706,7 @@ export class ChartBullet {
689
706
  return (h("ibcs-chart-bullet", { tableName: this.datasetName, dataVersion: this.dataVersion, chartTitle: this.chartTitle, actual: actual, target: target, ranges: ranges, normalize: normalize, showVariances: this.prepareShowVariances(), level: this.prepareLevel(), order: this.prepareOrder(), limit: this.prepareLimit(), labels: this.prepareLabels(), filter: this.filter, styles: this.prepareStyle(), i18n: this.prepareI18n(), containerWidth: getParentDimensions(this.element).width, ruleSetConfig: this.ruleSetConfig(), errors: this.errors, translate: this.translateForInner }));
690
707
  }
691
708
  render() {
692
- return (h(Host, { key: '31096e122fe62354e4a9ad0a15af5329a72265ba', style: this.getFontStyles() }, h("div", { key: '8288f32a3ac40790136b751a5630787cfd958a9d', class: "container" }, this.chartTemplate())));
709
+ return (h(Host, { key: '895f33380b663aff0f9aa116add2d485e02588e6', style: this.getFontStyles() }, h("div", { key: '58425ce02fa1cf074333464dfe17e702fd41acb0', class: "container" }, this.chartTemplate())));
693
710
  }
694
711
  static get is() { return "bn-chart-bullet"; }
695
712
  static get encapsulation() { return "shadow"; }
@@ -776,7 +793,7 @@ export class ChartBullet {
776
793
  "optional": false,
777
794
  "docs": {
778
795
  "tags": [],
779
- "text": "Actual-value measure. JSON object or a bare scenario slot as shorthand:\n`{\"measure\":\"ac1\",\"label\":\"Revenue\",\"unit\":\"EUR k\"}`. Only plain\nscenario slots (`ac1`\u2026`pl4`) are allowed \u2014 variance tokens are not.\nEmpty or `\"auto\"` auto-detects (`ac1`, else the first available\nscenario)."
796
+ "text": "Actual-value measure. JSON object or a bare scenario slot as shorthand:\n`{\"measure\":\"ac1\",\"label\":\"Revenue\",\"unit\":\"EUR k\"}`. Only plain\nscenario slots (`ac1`\u2026`pl4`) are allowed - variance tokens are not.\nEmpty or `\"auto\"` auto-detects (`ac1`, else the first available\nscenario)."
780
797
  },
781
798
  "getter": false,
782
799
  "setter": false,
@@ -796,7 +813,7 @@ export class ChartBullet {
796
813
  "optional": false,
797
814
  "docs": {
798
815
  "tags": [],
799
- "text": "Target measure \u2014 same shape as `actual`. Empty or `\"auto\"` auto-detects\n(`pl1` > `pp1` > `fc1`); without any target scenario the chart renders\nactual bars only."
816
+ "text": "Target measure - same shape as `actual`. Empty or `\"auto\"` auto-detects\n(`pl1` > `pp1` > `fc1`); without any target scenario the chart renders\nactual bars only."
800
817
  },
801
818
  "getter": false,
802
819
  "setter": false,
@@ -816,7 +833,7 @@ export class ChartBullet {
816
833
  "optional": false,
817
834
  "docs": {
818
835
  "tags": [],
819
- "text": "Qualitative range bands as a JSON array of ascending fractions of the\ntarget, at most two \u2014 e.g. `[0.6, 0.9]` (IBCS rejects a third band of\narbitrary length). Classic mode only; ignored while `normalize` is\n`\"target\"`."
836
+ "text": "Qualitative range bands as a JSON array of ascending fractions of the\ntarget, at most two - e.g. `[0.6, 0.9]` (IBCS rejects a third band of\narbitrary length). Classic mode only; ignored while `normalize` is\n`\"target\"`."
820
837
  },
821
838
  "getter": false,
822
839
  "setter": false,
@@ -836,7 +853,7 @@ export class ChartBullet {
836
853
  "optional": false,
837
854
  "docs": {
838
855
  "tags": [],
839
- "text": "Target normalization: `target` (default \u2014 rows share an aligned target\nposition, the IBCS-comparable form) or `none` (classic per-row scales\nwith tick strips)."
856
+ "text": "Target normalization: `target` (default - rows share an aligned target\nposition, the IBCS-comparable form) or `none` (classic per-row scales\nwith tick strips)."
840
857
  },
841
858
  "getter": false,
842
859
  "setter": false,
@@ -856,7 +873,7 @@ export class ChartBullet {
856
873
  "optional": false,
857
874
  "docs": {
858
875
  "tags": [],
859
- "text": "Variance bars between actual and target: `auto` (default \u2014 drawn in\nnormalized mode, favorable/unfavorable in the IBCS variance colors) or\n`none`."
876
+ "text": "Variance bars between actual and target: `auto` (default - drawn in\nnormalized mode, favorable/unfavorable in the IBCS variance colors) or\n`none`."
860
877
  },
861
878
  "getter": false,
862
879
  "setter": false,
@@ -936,7 +953,7 @@ export class ChartBullet {
936
953
  "optional": false,
937
954
  "docs": {
938
955
  "tags": [],
939
- "text": "Maximum number of KPI rows (0 = unlimited). Truncates \u2014 there is no\nREST aggregate, summing heterogeneous KPIs would be meaningless."
956
+ "text": "Maximum number of KPI rows (0 = unlimited). Truncates - there is no\nREST aggregate, summing heterogeneous KPIs would be meaningless."
940
957
  },
941
958
  "getter": false,
942
959
  "setter": false,
@@ -1024,7 +1041,7 @@ export class ChartBullet {
1024
1041
  "return": "Promise<ComponentLayoutState>"
1025
1042
  },
1026
1043
  "docs": {
1027
- "text": "Lazily generates this chart's layout state: host box (context- and\ncomponent-relative, CSS px), the canvas region and diagnostics. With\n`detail: \"full\"` the rendered marks and labels are listed with their\ngeometry (tag-classified \u2014 bullet marks carry no ids).",
1044
+ "text": "Lazily generates this chart's layout state: host box (context- and\ncomponent-relative, CSS px), the canvas region and diagnostics. With\n`detail: \"full\"` the rendered marks and labels are listed with their\ngeometry (tag-classified - bullet marks carry no ids).",
1028
1045
  "tags": [{
1029
1046
  "name": "param",
1030
1047
  "text": "options - `{ detail: \"summary\" | \"full\" }`, default `\"summary\"`"
@@ -1036,6 +1053,9 @@ export class ChartBullet {
1036
1053
  static get elementRef() { return "element"; }
1037
1054
  static get watchers() {
1038
1055
  return [{
1056
+ "propName": "filter",
1057
+ "methodName": "validateFilter"
1058
+ }, {
1039
1059
  "propName": "actual",
1040
1060
  "methodName": "validateActual"
1041
1061
  }, {
@@ -1,9 +1,41 @@
1
+ :host(.no-data) {
2
+ display: block;
3
+ box-sizing: border-box;
4
+ width: 100%;
5
+ height: 100%;
6
+ }
7
+
8
+ :host(.no-data) > div {
9
+ float: none;
10
+ width: 100%;
11
+ height: 100%;
12
+ }
13
+
14
+ :host(.no-data) .no-data ~ .no-data {
15
+ display: none;
16
+ }
17
+
18
+ .empty-state {
19
+ box-sizing: border-box;
20
+ display: flex;
21
+ align-items: center;
22
+ justify-content: center;
23
+ float: none;
24
+ width: 100%;
25
+ height: 100%;
26
+ min-height: 3em;
27
+ margin: 0;
28
+ padding: 0.5em;
29
+ overflow: hidden;
30
+ border: 0.1em dashed #ddd;
31
+ color: #808080;
32
+ font-family: var(--bn-font-family, "Noto Sans", sans-serif);
33
+ font-size: var(--bn-font-size, 13.3333px);
34
+ font-style: normal;
35
+ text-align: center;
36
+ }
37
+
1
38
  :host {
2
39
  position: relative;
3
40
  display: inline-block;
4
- }
5
-
6
- .warning {
7
- font-family: var(--bn-font-family, "Noto Sans", "Helvetica Neue", Helvetica, sans-serif);
8
- color: var(--bn-font-color, black);
9
41
  }
@@ -1,19 +1,22 @@
1
1
  import { h, Host } from "@stencil/core";
2
2
  import { getStores } from "../../context/context-protocol";
3
- import { buildFromExpr } from "../../context/scopedDb";
3
+ import { sourceExpr } from "../../context/scopedDb";
4
4
  import { AggregationLevel } from "../../utils/constants";
5
5
  import { IBCSRuleSet } from "../../utils/ibcsRuleSet";
6
+ import withComponentStatus from "../../utils/withComponentStatus";
6
7
  import { FontStyleAdapter } from "../../utils/model/styles/FontStyle";
7
8
  import { PaddingAdapter } from "../../utils/model/styles/Padding";
8
9
  import { SVGStyleAdapter } from "../../utils/model/styles/SVGStyle";
9
10
  import { SVGStyleGroupAdapter } from "../../utils/model/styles/SVGStyleGroup";
10
11
  import { SVGVariancesStyleGroupAdapter } from "../../utils/model/styles/SVGVariancesStyleGroup";
12
+ import { reportQueryError } from "../../utils/queryError";
11
13
  import { BulletChart } from "./utils/BulletChart";
12
14
  import { BulletChartStylesAdapter, ScaleFactorsBulletChartAdapter, } from "./utils/model/BulletChartStyle";
13
15
  /** The codes this chart can raise from data resolution. */
14
16
  const BULLET_DATA_WARNING_CODES = [
15
17
  "bullet-target-missing",
16
18
  "bullet-target-invalid",
19
+ "bullet-actual-negative",
17
20
  "bullet-mixed-operation",
18
21
  "bullet-target-none",
19
22
  ];
@@ -39,6 +42,7 @@ export class IbcsChartBullet {
39
42
  this.i18n = new Map();
40
43
  this.containerWidth = 0;
41
44
  this.svgMarkup = "";
45
+ withComponentStatus(this);
42
46
  }
43
47
  getDb() {
44
48
  if (!this.stores)
@@ -53,7 +57,7 @@ export class IbcsChartBullet {
53
57
  }
54
58
  rebuild() {
55
59
  const styles = this.prepareStyle();
56
- const fromExpr = this.tableName ? buildFromExpr(this.tableName, this.filter) : "";
60
+ const fromExpr = sourceExpr(this.getDb(), this.tableName, this.filter);
57
61
  this.chart = new BulletChart(new IBCSRuleSet(this.ruleSetConfig), this.getDb(), fromExpr, {
58
62
  chartTitle: this.chartTitle,
59
63
  actual: this.actual,
@@ -69,6 +73,7 @@ export class IbcsChartBullet {
69
73
  this.chart.setI18n(this.i18n);
70
74
  this.svgMarkup = this.chart.hasNoData() ? "" : this.chart.toString();
71
75
  this.syncWarnings(this.chart.getWarnings());
76
+ reportQueryError(this.errors, this.chart.getQueryError());
72
77
  }
73
78
  /**
74
79
  * Syncs the orchestrator's data warnings to the facade's dispatcher.
@@ -92,15 +97,20 @@ export class IbcsChartBullet {
92
97
  }
93
98
  }
94
99
  prepareStyle() {
95
- return new BulletChartStylesAdapter(new ScaleFactorsBulletChartAdapter(), new FontStyleAdapter(), new SVGStyleGroupAdapter(new SVGStyleAdapter()), new SVGVariancesStyleGroupAdapter(new SVGStyleAdapter()), new PaddingAdapter()).adapt(this.styles);
100
+ var _a, _b;
101
+ const styles = new BulletChartStylesAdapter(new ScaleFactorsBulletChartAdapter(), new FontStyleAdapter(), new SVGStyleGroupAdapter(new SVGStyleAdapter()), new SVGVariancesStyleGroupAdapter(new SVGStyleAdapter()), new PaddingAdapter()).adapt(this.styles);
102
+ styles.locale = ((_b = (_a = getStores(this.element).context) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.locale) || "de";
103
+ return styles;
96
104
  }
97
105
  render() {
98
- if (this.chart === undefined) {
106
+ var _a;
107
+ // a failed query is the facade's ERR_sql item, not "No Data"
108
+ if (this.chart === undefined || this.chart.getQueryError() !== undefined) {
99
109
  return h(Host, null);
100
110
  }
101
111
  if (this.chart.hasNoData()) {
102
- const errorMsg = this.i18n.get("no-data") || "==No Data==";
103
- return (h(Host, null, h("p", { class: "warning" }, errorMsg)));
112
+ const errorMsg = (_a = this.i18n.get("no-data")) !== null && _a !== void 0 ? _a : "No Data";
113
+ return (h(Host, { class: "no-data" }, h("div", { class: "empty-state" }, errorMsg)));
104
114
  }
105
115
  return (h(Host, null, h("div", { innerHTML: this.svgMarkup })));
106
116
  }
@@ -510,7 +520,7 @@ export class IbcsChartBullet {
510
520
  "optional": true,
511
521
  "docs": {
512
522
  "tags": [],
513
- "text": "The facade's error dispatcher \u2014 data warnings are synced through it (stable ids)."
523
+ "text": "The facade's error dispatcher - data warnings are synced through it (stable ids)."
514
524
  },
515
525
  "getter": false,
516
526
  "setter": false
@@ -1,5 +1,6 @@
1
1
  import { Svg } from "@svgdotjs/svg.js";
2
2
  import CalculateSize from "calculate-size";
3
+ import { errorText } from "../../../utils/queryError";
3
4
  import { AggregationLevel } from "../../../utils/constants";
4
5
  import { Formatter } from "../../../utils/formatter";
5
6
  import { OrderColumn } from "../../../utils/model/Order";
@@ -8,8 +9,8 @@ import { scenarioFamily } from "../../../utils/xy/VarianceMeasure";
8
9
  /**
9
10
  * SVG orchestrator for `bn-chart-bullet` (IBCS bullet graph).
10
11
  *
11
- * One horizontal row per KPI: a solid AC bar, a target marker, and — in the
12
- * default normalized mode — an integrated variance bar between actual and
12
+ * One horizontal row per KPI: a solid AC bar, a target marker, and - in the
13
+ * default normalized mode - an integrated variance bar between actual and
13
14
  * target. Normalization maps every row to fractions of its target, so one
14
15
  * continuous target line spans all rows (IBCS: normalized target values).
15
16
  * Classic mode (`normalize: "none"`) draws per-row scales with tick strips
@@ -41,12 +42,17 @@ export class BulletChart {
41
42
  const order = this.config.order;
42
43
  const actualSlot = this.config.actual.measure;
43
44
  const targetSlot = (_b = (_a = this.config.target) === null || _a === void 0 ? void 0 : _a.measure) !== null && _b !== void 0 ? _b : null;
45
+ // A group of one kind keeps its plain sum (a cost KPI shows a positive value).
46
+ // A group that mixes '+' and '-' rows is a net value: the '-' rows are subtracted.
47
+ // The alias holds the value that is shown, so ORDER BY sorts by it.
48
+ const sign = "transformOperator(operation)";
44
49
  const measureSelect = [actualSlot, ...(targetSlot !== null ? [targetSlot] : [])]
45
- .map((slot) => `SUM(${slot}) as ${slot}, COUNT(ISNULL(${slot})) as ${slot}_cnt`)
50
+ .map((slot) => `CASE WHEN MIN(${sign}) = MAX(${sign}) THEN SUM(${slot}) ELSE SUM(${slot} * ${sign}) END as ${slot}, ` +
51
+ `SUM(ABS(${slot})) as ${slot}_gross, COUNT(ISNULL(${slot})) as ${slot}_cnt`)
46
52
  .join(", ");
47
53
  let result;
48
54
  try {
49
- // transformOperator maps the operation strings to ±1 — alasql cannot MIN/MAX over VARCHAR columns.
55
+ // transformOperator maps the operation strings to ±1 - alasql cannot MIN/MAX over VARCHAR columns.
50
56
  result = db.exec(`SELECT ${this.createSelectString(level, order)}, ${measureSelect},
51
57
  MIN(transformOperator(operation)) as opMin, MAX(transformOperator(operation)) as opMax
52
58
  FROM ${fromExpr}
@@ -54,7 +60,7 @@ export class BulletChart {
54
60
  ORDER BY ${this.createOrderStr(level, order)}`);
55
61
  }
56
62
  catch (e) {
57
- console.error("BulletChart: populateModel query failed", e);
63
+ this.queryError = errorText(e);
58
64
  return;
59
65
  }
60
66
  let records = result !== null && result !== void 0 ? result : [];
@@ -64,9 +70,8 @@ export class BulletChart {
64
70
  let mixedOperations = 0;
65
71
  let targetMissing = 0;
66
72
  let targetInvalid = 0;
73
+ let actualNegative = 0;
67
74
  for (const record of records) {
68
- const actual = this.readValue(record, actualSlot);
69
- const target = targetSlot !== null ? this.readValue(record, targetSlot) : null;
70
75
  const opMin = typeof record.opMin === "number" ? record.opMin : 1;
71
76
  const opMax = typeof record.opMax === "number" ? record.opMax : 1;
72
77
  let operation = opMin === -1 && opMax === -1 ? "-" : "+";
@@ -74,6 +79,11 @@ export class BulletChart {
74
79
  operation = "+";
75
80
  mixedOperations++;
76
81
  }
82
+ const actual = this.readValue(record, actualSlot);
83
+ const target = targetSlot !== null ? this.readValue(record, targetSlot) : null;
84
+ if (actual !== null && actual < 0) {
85
+ actualNegative++;
86
+ }
77
87
  let fraction = null;
78
88
  if (this.config.normalize === "target") {
79
89
  if (target === null) {
@@ -84,13 +94,8 @@ export class BulletChart {
84
94
  else if (target <= 0) {
85
95
  targetInvalid++;
86
96
  }
87
- else if (actual !== null) {
88
- if (actual < 0) {
89
- targetInvalid++;
90
- }
91
- else {
92
- fraction = actual / target;
93
- }
97
+ else if (actual !== null && actual >= 0) {
98
+ fraction = actual / target;
94
99
  }
95
100
  }
96
101
  this.rows.push({
@@ -111,17 +116,25 @@ export class BulletChart {
111
116
  if (targetInvalid > 0) {
112
117
  this.warnings.push({ code: "bullet-target-invalid", data: { count: String(targetInvalid) } });
113
118
  }
119
+ if (actualNegative > 0) {
120
+ this.warnings.push({ code: "bullet-actual-negative", data: { count: String(actualNegative) } });
121
+ }
114
122
  }
115
123
  readValue(record, slot) {
116
124
  if (record[`${slot}_cnt`] === 0) {
117
125
  return null;
118
126
  }
119
127
  const value = record[slot];
128
+ // a net value that is 0 only up to the float rounding of its sum (0.3 - 0.1 - 0.2) is 0, not a tiny negative
129
+ const gross = record[`${slot}_gross`];
130
+ if (typeof value === "number" && typeof gross === "number" && Math.abs(value) <= gross * 1e-9) {
131
+ return 0;
132
+ }
120
133
  return typeof value === "number" && isFinite(value) ? value : null;
121
134
  }
122
135
  /**
123
136
  * Favorable/unfavorable direction of the actual-vs-target variance.
124
- * `operation: "-"` marks cost-type KPIs, inverting the reading — the sign
137
+ * `operation: "-"` marks cost-type KPIs, inverting the reading - the sign
125
138
  * flip philosophy of the structure chart's `DataPoint.getVarianceStyle()`,
126
139
  * keyed on the row operation because bullet variances are implicit rather
127
140
  * than user-declared `_pos`/`_neg` tokens.
@@ -163,7 +176,7 @@ export class BulletChart {
163
176
  createOrderStr(level, sortOrder) {
164
177
  let orderStr = `${level.toLowerCase()}`;
165
178
  if (sortOrder.hierarchy.length >= 1) {
166
- orderStr = `${sortOrder.hierarchy.toString()} ${sortOrder === null || sortOrder === void 0 ? void 0 : sortOrder.direction}`;
179
+ orderStr = sortOrder.hierarchy.map((column) => `${column} ${sortOrder.direction}`).toString();
167
180
  }
168
181
  return orderStr;
169
182
  }
@@ -204,6 +217,9 @@ export class BulletChart {
204
217
  getWarnings() {
205
218
  return this.warnings;
206
219
  }
220
+ getQueryError() {
221
+ return this.queryError;
222
+ }
207
223
  getAllocatedCanvasWidth() {
208
224
  return this.availableWidth;
209
225
  }
@@ -229,7 +245,7 @@ export class BulletChart {
229
245
  if (value === null || this.config.labels.show === "none") {
230
246
  return "";
231
247
  }
232
- return Formatter.number(value, "decimal", this.config.labels.decimals, 0);
248
+ return Formatter.number(value, "decimal", this.config.labels.decimals, 0, 1, this.styles.locale);
233
249
  }
234
250
  /**
235
251
  * Style family of the target marker, resolved through the rule set's
@@ -427,7 +443,7 @@ export class BulletChart {
427
443
  root
428
444
  .line(tickX, tickTop, tickX, tickTop + factors.axisTickLength * em)
429
445
  .stroke({ color: this.styles.axisStyles.ac.stroke, width: factors.axisLineWidth });
430
- this.drawText(root, Formatter.number(tick, "decimal", decimals, decimals), tickX, tickTop + factors.tickStripHeight * em - 0.2 * em, { anchor: "middle" });
446
+ this.drawText(root, Formatter.number(tick, "decimal", decimals, decimals, 1, this.styles.locale), tickX, tickTop + factors.tickStripHeight * em - 0.2 * em, { anchor: "middle" });
431
447
  }
432
448
  });
433
449
  }
@@ -88,6 +88,8 @@ export class BulletChartStyle {
88
88
  this.varianceStyles = varianceStyles;
89
89
  this.padding = padding;
90
90
  this.rangeColors = ["#D9D9D9", "#EFEFEF"];
91
+ /** Locale for number labels. */
92
+ this.locale = "de";
91
93
  }
92
94
  }
93
95
  /** Adapts raw componentStyle JSON into a BulletChartStyle, falling back to defaults for missing properties. */
@@ -36,7 +36,7 @@ export function toBulletLabelConfig(data, defaults) {
36
36
  }
37
37
  /**
38
38
  * Parses the raw `ranges` attribute value. A blank value yields no ranges
39
- * without error. Anything else must be a JSON array of positive numbers —
39
+ * without error. Anything else must be a JSON array of positive numbers -
40
40
  * ascending fractions of the target, e.g. `[0.6, 0.9]`. `parseSpec` cannot
41
41
  * be used here because it rejects top-level JSON arrays. Unsorted input is
42
42
  * sorted and more than two entries are truncated; both repairs are reported
@@ -1,3 +1,40 @@
1
+ :host(.no-data) {
2
+ display: block;
3
+ box-sizing: border-box;
4
+ width: 100%;
5
+ height: 100%;
6
+ }
7
+
8
+ :host(.no-data) > div {
9
+ float: none;
10
+ width: 100%;
11
+ height: 100%;
12
+ }
13
+
14
+ :host(.no-data) .no-data ~ .no-data {
15
+ display: none;
16
+ }
17
+
18
+ .empty-state {
19
+ box-sizing: border-box;
20
+ display: flex;
21
+ align-items: center;
22
+ justify-content: center;
23
+ float: none;
24
+ width: 100%;
25
+ height: 100%;
26
+ min-height: 3em;
27
+ margin: 0;
28
+ padding: 0.5em;
29
+ overflow: hidden;
30
+ border: 0.1em dashed #ddd;
31
+ color: #808080;
32
+ font-family: var(--bn-font-family, "Noto Sans", sans-serif);
33
+ font-size: var(--bn-font-size, 13.3333px);
34
+ font-style: normal;
35
+ text-align: center;
36
+ }
37
+
1
38
  :host {
2
39
  display: inline-block;
3
40
  position: relative;