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

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 (449) hide show
  1. package/dist/bn-template-engine/bn-template-engine.esm.js +1 -1
  2. package/dist/bn-template-engine/p-132ad556.entry.js +1 -0
  3. package/dist/bn-template-engine/p-17d71782.entry.js +1 -0
  4. package/dist/bn-template-engine/p-40ba7f43.entry.js +1 -0
  5. package/dist/bn-template-engine/p-467871f3.entry.js +1 -0
  6. package/dist/bn-template-engine/p-64803a42.entry.js +1 -0
  7. package/dist/bn-template-engine/p-B8AjeKja.js +1 -0
  8. package/dist/bn-template-engine/p-CCZcKl0Q.js +2 -0
  9. package/dist/bn-template-engine/p-CrT83eO4.js +1 -0
  10. package/dist/bn-template-engine/p-D_DzKxRV.js +1 -0
  11. package/dist/bn-template-engine/p-Z2rUaSh_.js +1 -0
  12. package/dist/bn-template-engine/p-c41c0a1b.entry.js +1 -0
  13. package/dist/bn-template-engine/p-yc69rwuH.js +1 -0
  14. package/dist/cjs/{bn-asset_28.cjs.entry.js → bn-annotation-layer_30.cjs.entry.js} +27566 -26774
  15. package/dist/cjs/bn-grid.cjs.entry.js +11 -63
  16. package/dist/cjs/bn-image.cjs.entry.js +5 -6
  17. package/dist/cjs/bn-internationalization.cjs.entry.js +11 -7
  18. package/dist/cjs/bn-ruleset.cjs.entry.js +7 -8
  19. package/dist/cjs/bn-template-engine.cjs.js +2 -2
  20. package/dist/cjs/bn-text.cjs.entry.js +18 -18
  21. package/dist/cjs/{diagnostics-Cq-qDtXq.js → diagnostics-C4Ggts3w.js} +50 -2
  22. package/dist/cjs/{index-C1Z9vO7z.js → index-DGis1BzT.js} +0 -1
  23. package/dist/cjs/loader.cjs.js +2 -2
  24. package/dist/cjs/{withBodyObserver-CaPUjuC5.js → withBodyObserver-BK4idxqG.js} +2 -2
  25. package/dist/cjs/{context-protocol-C0rKepqu.js → withHasError-CqvcS23z.js} +462 -14
  26. package/dist/cjs/{withStyled-vSfogp9J.js → withStyled-70D4Isgt.js} +22 -35
  27. package/dist/cjs/{sanitizeHtml-Yx1xn6i_.js → withTranslation-C6Pye2CM.js} +148 -129
  28. package/dist/collection/collection-manifest.json +11 -11
  29. package/dist/collection/components/bn-annotation-layer/bn-annotation-layer.css +24 -0
  30. package/dist/collection/components/bn-annotation-layer/bn-annotation-layer.js +430 -0
  31. package/dist/collection/components/bn-annotation-layer/utils/marks.js +161 -0
  32. package/dist/collection/components/bn-annotation-layer/utils/matchPoint.js +25 -0
  33. package/dist/collection/components/bn-annotation-list/bn-annotation-list.css +46 -0
  34. package/dist/collection/components/bn-annotation-list/bn-annotation-list.js +112 -0
  35. package/dist/collection/components/bn-asset/bn-asset.js +1 -1
  36. package/dist/collection/components/bn-body/bn-body.js +24 -1
  37. package/dist/collection/components/bn-card/bn-card.js +24 -1
  38. package/dist/collection/components/bn-chart-bubble/{ibcs-chart-bubble.js → bn-chart-bubble-renderer/bn-chart-bubble-renderer.js} +153 -59
  39. package/dist/collection/components/bn-chart-bubble/bn-chart-bubble.js +70 -13
  40. package/dist/collection/components/bn-chart-bubble/utils/BubbleChart.js +29 -21
  41. package/dist/collection/components/bn-chart-bullet/{ibcs-chart-bullet.js → bn-chart-bullet-renderer/bn-chart-bullet-renderer.js} +127 -53
  42. package/dist/collection/components/bn-chart-bullet/bn-chart-bullet.js +83 -20
  43. package/dist/collection/components/bn-chart-bullet/utils/BulletChart.js +26 -17
  44. package/dist/collection/components/bn-chart-bullet/utils/model/BulletChartStyle.js +4 -4
  45. package/dist/collection/components/bn-chart-scatter/{ibcs-chart-scatter.js → bn-chart-scatter-renderer/bn-chart-scatter-renderer.js} +132 -53
  46. package/dist/collection/components/bn-chart-scatter/bn-chart-scatter.js +69 -12
  47. package/dist/collection/components/bn-chart-scatter/utils/ScatterChart.js +26 -14
  48. package/dist/collection/components/bn-chart-structure/{ibcs-chart-structure.js → bn-chart-structure-renderer/bn-chart-structure-renderer.js} +159 -66
  49. package/dist/collection/components/bn-chart-structure/bn-chart-structure.js +115 -95
  50. package/dist/collection/components/bn-chart-structure/utils/StructureChart.js +44 -15
  51. package/dist/collection/components/bn-chart-structure/utils/elements/Axis.js +1 -1
  52. package/dist/collection/components/bn-chart-structure/utils/elements/Bar.js +6 -2
  53. package/dist/collection/components/bn-chart-structure/utils/elements/Label.js +11 -0
  54. package/dist/collection/components/bn-chart-structure/utils/elements/Marker.js +5 -1
  55. package/dist/collection/components/bn-chart-structure/utils/elements/Needle.js +4 -1
  56. package/dist/collection/components/bn-chart-structure/utils/elements/StackedBar.js +6 -2
  57. package/dist/collection/components/bn-chart-time/{ibcs-chart-time.js → bn-chart-time-renderer/bn-chart-time-renderer.js} +188 -150
  58. package/dist/collection/components/bn-chart-time/bn-chart-time.js +140 -405
  59. package/dist/collection/components/bn-chart-time/utils/TimeChart.js +55 -15
  60. package/dist/collection/components/bn-chart-time/utils/elements/Column.js +5 -1
  61. package/dist/collection/components/bn-chart-time/utils/elements/Label.js +14 -0
  62. package/dist/collection/components/bn-chart-time/utils/elements/LineSeries.js +18 -12
  63. package/dist/collection/components/bn-chart-time/utils/elements/Marker.js +5 -1
  64. package/dist/collection/components/bn-chart-time/utils/elements/Needle.js +4 -1
  65. package/dist/collection/components/bn-chart-time/utils/elements/StackedColumn.js +6 -2
  66. package/dist/collection/components/bn-chart-time/utils/factories/ScenarioFactory.js +2 -2
  67. package/dist/collection/components/bn-chart-time/utils/model/TimeChartComponentConfig.js +2 -18
  68. package/dist/collection/components/bn-component-style/bn-component-style.js +3 -3
  69. package/dist/collection/components/bn-context/bn-context.js +24 -5
  70. package/dist/collection/components/bn-dataset/bn-dataset.js +8 -8
  71. package/dist/collection/components/bn-datasource/bn-datasource.js +8 -8
  72. package/dist/collection/components/bn-footer/bn-footer.css +1 -15
  73. package/dist/collection/components/bn-footer/bn-footer.js +17 -34
  74. package/dist/collection/components/bn-grid/bn-grid.js +38 -71
  75. package/dist/collection/components/bn-image/bn-image.js +21 -2
  76. package/dist/collection/components/bn-internationalization/bn-internationalization.js +7 -1
  77. package/dist/collection/components/bn-layout-card/bn-layout-card.js +3 -32
  78. package/dist/collection/components/bn-layout-page/bn-layout-page.js +3 -32
  79. package/dist/collection/components/bn-message/bn-message.js +20 -2
  80. package/dist/collection/components/bn-page/bn-page.js +22 -3
  81. package/dist/collection/components/bn-ruleset/bn-ruleset.js +3 -3
  82. package/dist/collection/components/bn-scaling-group/bn-scaling-group.js +9 -9
  83. package/dist/collection/components/bn-table/{ibcs-table.js → bn-table-renderer/bn-table-renderer.js} +230 -83
  84. package/dist/collection/components/bn-table/bn-table.js +134 -157
  85. package/dist/collection/components/bn-table/utils/Table.js +3 -3
  86. package/dist/collection/components/bn-table/utils/elements/TableRow.js +1 -1
  87. package/dist/collection/components/bn-table/utils/factories/tableDataSetFactory.js +38 -4
  88. package/dist/collection/components/bn-table/utils/helper/DataQuery.js +3 -1
  89. package/dist/collection/components/bn-table/utils/helper/barColumnGeometry.js +2 -2
  90. package/dist/collection/components/bn-text/bn-text.js +66 -8
  91. package/dist/collection/components/bn-title/{ibcs-title/ibcs-title.js → bn-title-renderer/bn-title-renderer.js} +59 -83
  92. package/dist/collection/components/bn-title/{ibcs-title → bn-title-renderer}/utils/Title.js +2 -2
  93. package/dist/collection/components/bn-title/{ibcs-title → bn-title-renderer}/utils/factories/TitleDataSetFactory.js +1 -1
  94. package/dist/collection/components/bn-title/bn-title.js +58 -14
  95. package/dist/collection/components/bn-tree/bn-tree.js +30 -28
  96. package/dist/collection/index.js +0 -1
  97. package/dist/collection/schemas.js +1 -0
  98. package/dist/collection/stores/componentStyles.js +10 -6
  99. package/dist/collection/stores/createScopedStores.js +3 -1
  100. package/dist/collection/stores/internationalization.js +10 -6
  101. package/dist/collection/utils/annotations.js +66 -0
  102. package/dist/collection/utils/autoFit.js +2 -2
  103. package/dist/collection/utils/emptyState.js +1 -1
  104. package/dist/collection/utils/ibcsRuleSet.js +42 -0
  105. package/dist/collection/utils/layoutState/dataPoint.js +59 -0
  106. package/dist/collection/utils/layoutState/geometry.js +46 -0
  107. package/dist/collection/utils/layoutState/index.js +1 -0
  108. package/dist/collection/utils/layoutState/svgChartElements.js +113 -11
  109. package/dist/collection/utils/layoutTemplate.js +0 -2
  110. package/dist/collection/utils/scaling.js +9 -0
  111. package/dist/collection/utils/validate.js +0 -7
  112. package/dist/collection/utils/withComponentStyle.js +14 -18
  113. package/dist/collection/utils/withDataset.js +22 -11
  114. package/dist/collection/utils/withHasError.js +17 -2
  115. package/dist/collection/utils/withRuleSet.js +7 -7
  116. package/dist/collection/utils/withTranslation.js +14 -14
  117. package/dist/collection/utils/xy/XYFrame.js +13 -3
  118. package/dist/collection/utils/xy/model/ScaleFactorsXYChart.js +8 -9
  119. package/dist/collection/utils/xy/pointKey.js +10 -0
  120. package/dist/components/{ibcs-chart-bullet.d.ts → bn-annotation-layer.d.ts} +4 -4
  121. package/dist/components/bn-annotation-layer.js +1 -0
  122. package/dist/components/{ibcs-chart-scatter.d.ts → bn-annotation-list.d.ts} +4 -4
  123. package/dist/components/bn-annotation-list.js +1 -0
  124. package/dist/components/bn-asset.js +1 -1
  125. package/dist/components/bn-body.js +1 -1
  126. package/dist/components/bn-card.js +1 -1
  127. package/dist/components/bn-chart-bubble-renderer.d.ts +11 -0
  128. package/dist/components/bn-chart-bubble-renderer.js +1 -0
  129. package/dist/components/bn-chart-bubble.js +1 -1
  130. package/dist/components/bn-chart-bullet-renderer.d.ts +11 -0
  131. package/dist/components/bn-chart-bullet-renderer.js +1 -0
  132. package/dist/components/bn-chart-bullet.js +1 -1
  133. package/dist/components/bn-chart-scatter-renderer.d.ts +11 -0
  134. package/dist/components/bn-chart-scatter-renderer.js +1 -0
  135. package/dist/components/bn-chart-scatter.js +1 -1
  136. package/dist/components/bn-chart-structure-renderer.d.ts +11 -0
  137. package/dist/components/bn-chart-structure-renderer.js +1 -0
  138. package/dist/components/bn-chart-structure.js +1 -1
  139. package/dist/components/{bn-template.d.ts → bn-chart-time-renderer.d.ts} +4 -4
  140. package/dist/components/bn-chart-time-renderer.js +1 -0
  141. package/dist/components/bn-chart-time.js +1 -1
  142. package/dist/components/bn-component-style.js +1 -1
  143. package/dist/components/bn-context.js +1 -1
  144. package/dist/components/bn-dataset.js +1 -1
  145. package/dist/components/bn-datasource.js +1 -1
  146. package/dist/components/bn-footer.js +1 -1
  147. package/dist/components/bn-grid.js +1 -1
  148. package/dist/components/bn-image.js +1 -1
  149. package/dist/components/bn-internationalization.js +1 -1
  150. package/dist/components/bn-layout-card.js +1 -1
  151. package/dist/components/bn-layout-page.js +1 -1
  152. package/dist/components/bn-message.js +1 -1
  153. package/dist/components/bn-page.js +1 -1
  154. package/dist/components/bn-ruleset.js +1 -1
  155. package/dist/components/bn-scaling-group.js +1 -1
  156. package/dist/components/{ibcs-chart-bubble.d.ts → bn-table-renderer.d.ts} +4 -4
  157. package/dist/components/bn-table-renderer.js +1 -0
  158. package/dist/components/bn-table.js +1 -1
  159. package/dist/components/bn-text.js +1 -1
  160. package/dist/components/{editor-companion.d.ts → bn-title-renderer.d.ts} +4 -4
  161. package/dist/components/bn-title-renderer.js +1 -0
  162. package/dist/components/bn-title.js +1 -1
  163. package/dist/components/bn-tree.js +1 -1
  164. package/dist/components/index.js +1 -1
  165. package/dist/components/p-B1nL0yOa.js +1 -0
  166. package/dist/components/p-B7uwck1J.js +1 -0
  167. package/dist/components/p-BDS_jiow.js +1 -0
  168. package/dist/components/p-BIIDTtcR.js +1 -0
  169. package/dist/components/p-BQMKgvEC.js +1 -0
  170. package/dist/components/p-BSV_vyqs.js +1 -0
  171. package/dist/components/p-BVKLCz2k.js +1 -0
  172. package/dist/components/p-BWBHlztH.js +1 -0
  173. package/dist/components/p-BXrPfAvP.js +1 -0
  174. package/dist/components/p-Ba9PUiBp.js +1 -0
  175. package/dist/components/p-BpCL2bfw.js +1 -0
  176. package/dist/components/p-BpsXOtoW.js +1 -0
  177. package/dist/components/p-Bs-YxJEt.js +1 -0
  178. package/dist/components/p-CGI6XIaK.js +1 -0
  179. package/dist/components/p-CMM8vtHW.js +1 -0
  180. package/dist/components/p-COqIkH1M.js +1 -0
  181. package/dist/components/p-CYwd_ZNM.js +1 -0
  182. package/dist/components/p-CkW23yp2.js +1 -0
  183. package/dist/components/p-CtBM3KFY.js +1 -0
  184. package/dist/{bn-template-engine/p-DFmSrSnf.js → components/p-CurWSJkH.js} +1 -1
  185. package/dist/components/p-CxPSvrcF.js +1 -0
  186. package/dist/components/p-D2Epww9R.js +1 -0
  187. package/dist/components/p-D5-dYgK_.js +1 -0
  188. package/dist/components/p-D6YGOYV1.js +2 -0
  189. package/dist/components/p-DEHnizot.js +1 -0
  190. package/dist/components/p-DIyUaSBg.js +1 -0
  191. package/dist/components/p-DPLcGhVt.js +1 -0
  192. package/dist/components/p-DUHp_9X-.js +1 -0
  193. package/dist/components/p-DYG9FH_u.js +1 -0
  194. package/dist/components/p-DdGnuNtc.js +1 -0
  195. package/dist/components/p-Dlb4ncGF.js +1 -0
  196. package/dist/components/p-Dm55bMs2.js +1 -0
  197. package/dist/components/p-Dq1AzGKX.js +1 -0
  198. package/dist/components/p-Dq4KMCDU.js +1 -0
  199. package/dist/components/p-DsOaqeTN.js +1 -0
  200. package/dist/components/p-Ds_BSK8v.js +1 -0
  201. package/dist/components/p-LZ9lAY8T.js +1 -0
  202. package/dist/components/p-U3zkcEJZ.js +1 -0
  203. package/dist/components/p-WzaayhTX.js +1 -0
  204. package/dist/components/p-X9hpquOX.js +1 -0
  205. package/dist/components/p-Xb6Ilq8u.js +1 -0
  206. package/dist/components/p-ey23VlID.js +1 -0
  207. package/dist/components/p-jbp6YiHf.js +1 -0
  208. package/dist/components/p-oJjMz8JF.js +1 -0
  209. package/dist/components/p-xhiPDAZa.js +1 -0
  210. package/dist/components/p-xpguaboj.js +1 -0
  211. package/dist/esm/{bn-asset_28.entry.js → bn-annotation-layer_30.entry.js} +24689 -23899
  212. package/dist/esm/bn-grid.entry.js +11 -63
  213. package/dist/esm/bn-image.entry.js +4 -5
  214. package/dist/esm/bn-internationalization.entry.js +9 -5
  215. package/dist/esm/bn-ruleset.entry.js +6 -7
  216. package/dist/esm/bn-template-engine.js +3 -3
  217. package/dist/esm/bn-text.entry.js +12 -12
  218. package/dist/esm/{diagnostics-vw6TKMiT.js → diagnostics-Cyqy1zDT.js} +48 -2
  219. package/dist/esm/{index-C5UYpZUU.js → index-CCZcKl0Q.js} +1 -1
  220. package/dist/esm/loader.js +3 -3
  221. package/dist/esm/{withBodyObserver-DD_-r04o.js → withBodyObserver-JcRB9OPQ.js} +2 -2
  222. package/dist/esm/{context-protocol-CdTp19uA.js → withHasError-l3cMN-oP.js} +458 -14
  223. package/dist/esm/{withStyled-BDEyKd_H.js → withStyled-DGOiR00Q.js} +17 -29
  224. package/dist/esm/{sanitizeHtml-C5bFtARM.js → withTranslation-BpO8BC5B.js} +144 -126
  225. package/dist/schemas/axis.schema.json +52 -0
  226. package/dist/schemas/i18n.schema.json +31 -0
  227. package/dist/schemas/partof.schema.json +33 -0
  228. package/dist/schemas/ruleset.schema.json +59 -0
  229. package/dist/schemas/stack.schema.json +51 -0
  230. package/dist/schemas/theme.schema.json +604 -0
  231. package/dist/schemas/thereof.schema.json +34 -0
  232. package/dist/types/components/bn-annotation-layer/bn-annotation-layer.d.ts +81 -0
  233. package/dist/types/components/bn-annotation-layer/utils/marks.d.ts +69 -0
  234. package/dist/types/components/bn-annotation-layer/utils/matchPoint.d.ts +17 -0
  235. package/dist/types/components/bn-annotation-list/bn-annotation-list.d.ts +35 -0
  236. package/dist/types/components/bn-body/bn-body.d.ts +5 -0
  237. package/dist/types/components/bn-card/bn-card.d.ts +5 -0
  238. package/dist/types/components/bn-chart-bubble/bn-chart-bubble-renderer/bn-chart-bubble-renderer.d.ts +97 -0
  239. package/dist/types/components/bn-chart-bubble/bn-chart-bubble.d.ts +20 -2
  240. package/dist/types/components/bn-chart-bullet/bn-chart-bullet-renderer/bn-chart-bullet-renderer.d.ts +81 -0
  241. package/dist/types/components/bn-chart-bullet/bn-chart-bullet.d.ts +21 -3
  242. package/dist/types/components/bn-chart-bullet/utils/BulletChart.d.ts +2 -0
  243. package/dist/types/components/bn-chart-bullet/utils/model/BulletChartStyle.d.ts +2 -2
  244. package/dist/types/components/bn-chart-scatter/bn-chart-scatter-renderer/bn-chart-scatter-renderer.d.ts +85 -0
  245. package/dist/types/components/bn-chart-scatter/bn-chart-scatter.d.ts +20 -2
  246. package/dist/types/components/bn-chart-structure/{ibcs-chart-structure.d.ts → bn-chart-structure-renderer/bn-chart-structure-renderer.d.ts} +43 -13
  247. package/dist/types/components/bn-chart-structure/bn-chart-structure.d.ts +29 -17
  248. package/dist/types/components/bn-chart-structure/utils/StructureChart.d.ts +7 -0
  249. package/dist/types/components/bn-chart-structure/utils/elements/Label.d.ts +5 -0
  250. package/dist/types/components/bn-chart-structure/utils/elements/Marker.d.ts +1 -0
  251. package/dist/types/components/bn-chart-structure/utils/elements/StackedBar.d.ts +2 -1
  252. package/dist/types/components/bn-chart-structure/utils/model/DataPoint.d.ts +3 -0
  253. package/dist/types/components/bn-chart-time/{ibcs-chart-time.d.ts → bn-chart-time-renderer/bn-chart-time-renderer.d.ts} +50 -17
  254. package/dist/types/components/bn-chart-time/bn-chart-time.d.ts +36 -66
  255. package/dist/types/components/bn-chart-time/utils/TimeChart.d.ts +7 -0
  256. package/dist/types/components/bn-chart-time/utils/elements/Label.d.ts +5 -0
  257. package/dist/types/components/bn-chart-time/utils/elements/LineSeries.d.ts +5 -1
  258. package/dist/types/components/bn-chart-time/utils/elements/Marker.d.ts +1 -0
  259. package/dist/types/components/bn-chart-time/utils/elements/StackedColumn.d.ts +2 -1
  260. package/dist/types/components/bn-chart-time/utils/factories/ScenarioFactory.d.ts +1 -1
  261. package/dist/types/components/bn-chart-time/utils/model/DataPoint.d.ts +3 -0
  262. package/dist/types/components/bn-chart-time/utils/model/TimeChartComponentConfig.d.ts +2 -8
  263. package/dist/types/components/bn-context/bn-context.d.ts +7 -1
  264. package/dist/types/components/bn-dataset/bn-dataset.d.ts +2 -2
  265. package/dist/types/components/bn-datasource/bn-datasource.d.ts +2 -2
  266. package/dist/types/components/bn-footer/bn-footer.d.ts +5 -7
  267. package/dist/types/components/bn-grid/bn-grid.d.ts +8 -6
  268. package/dist/types/components/bn-image/bn-image.d.ts +4 -0
  269. package/dist/types/components/bn-layout-card/bn-layout-card.d.ts +0 -1
  270. package/dist/types/components/bn-layout-page/bn-layout-page.d.ts +0 -1
  271. package/dist/types/components/bn-message/bn-message.d.ts +5 -0
  272. package/dist/types/components/bn-page/bn-page.d.ts +5 -0
  273. package/dist/types/components/bn-table/{ibcs-table.d.ts → bn-table-renderer/bn-table-renderer.d.ts} +49 -12
  274. package/dist/types/components/bn-table/bn-table.d.ts +48 -49
  275. package/dist/types/components/bn-table/utils/elements/Cell.d.ts +2 -0
  276. package/dist/types/components/bn-table/utils/elements/CellBarChart.d.ts +2 -1
  277. package/dist/types/components/bn-table/utils/elements/TableRow.d.ts +3 -0
  278. package/dist/types/components/bn-table/utils/factories/tableDataSetFactory.d.ts +9 -2
  279. package/dist/types/components/bn-text/bn-text.d.ts +19 -1
  280. package/dist/types/components/bn-title/{ibcs-title/ibcs-title.d.ts → bn-title-renderer/bn-title-renderer.d.ts} +15 -4
  281. package/dist/types/components/bn-title/bn-title.d.ts +15 -3
  282. package/dist/types/components/bn-tree/bn-tree.d.ts +6 -2
  283. package/dist/types/components.d.ts +2070 -2406
  284. package/dist/types/context/context-protocol.d.ts +2 -0
  285. package/dist/types/context/scopedDb.d.ts +9 -12
  286. package/dist/types/index.d.ts +0 -1
  287. package/dist/types/schemas.d.ts +50 -0
  288. package/dist/types/stores/componentStyles.d.ts +8 -0
  289. package/dist/types/stores/createScopedStores.d.ts +1 -0
  290. package/dist/types/stores/internationalization.d.ts +3 -2
  291. package/dist/types/stores/ruleSets.d.ts +15 -3
  292. package/dist/types/utils/annotations.d.ts +45 -0
  293. package/dist/types/utils/autoFit.d.ts +2 -2
  294. package/dist/types/utils/emptyState.d.ts +1 -1
  295. package/dist/types/utils/ibcsRuleSet.d.ts +16 -0
  296. package/dist/types/utils/layoutState/dataPoint.d.ts +13 -0
  297. package/dist/types/utils/layoutState/geometry.d.ts +12 -0
  298. package/dist/types/utils/layoutState/index.d.ts +1 -0
  299. package/dist/types/utils/layoutState/svgChartElements.d.ts +9 -6
  300. package/dist/types/utils/layoutState/types.d.ts +29 -0
  301. package/dist/types/utils/model/ChartStyles.d.ts +2 -1
  302. package/dist/types/utils/scaling.d.ts +2 -0
  303. package/dist/types/utils/validate.d.ts +0 -1
  304. package/dist/types/utils/withComponentStyle.d.ts +4 -4
  305. package/dist/types/utils/withDataset.d.ts +3 -3
  306. package/dist/types/utils/withHasError.d.ts +22 -1
  307. package/dist/types/utils/withRuleSet.d.ts +3 -2
  308. package/dist/types/utils/withTranslation.d.ts +1 -2
  309. package/dist/types/utils/xy/model/ScaleFactorsXYChart.d.ts +6 -7
  310. package/dist/types/utils/xy/pointKey.d.ts +9 -0
  311. package/package.json +24 -8
  312. package/readme.md +14 -8
  313. package/dist/bn-template-engine/assets/bar.png +0 -0
  314. package/dist/bn-template-engine/assets/matrix.png +0 -0
  315. package/dist/bn-template-engine/p-5075771a.entry.js +0 -1
  316. package/dist/bn-template-engine/p-5d516435.entry.js +0 -1
  317. package/dist/bn-template-engine/p-5e90e728.entry.js +0 -1
  318. package/dist/bn-template-engine/p-9ef7e132.entry.js +0 -1
  319. package/dist/bn-template-engine/p-9f7a1980.entry.js +0 -1
  320. package/dist/bn-template-engine/p-BeXgxHkW.js +0 -1
  321. package/dist/bn-template-engine/p-C5UYpZUU.js +0 -2
  322. package/dist/bn-template-engine/p-CH0bpt_k.js +0 -1
  323. package/dist/bn-template-engine/p-DI3efDSV.js +0 -1
  324. package/dist/bn-template-engine/p-DXLTTILG.js +0 -1
  325. package/dist/bn-template-engine/p-DtP4jqG5.js +0 -1
  326. package/dist/bn-template-engine/p-a8281b71.entry.js +0 -1
  327. package/dist/bn-template-engine/p-b31277e7.entry.js +0 -1
  328. package/dist/bn-template-engine/p-b396ac84.entry.js +0 -1
  329. package/dist/cjs/bn-template.cjs.entry.js +0 -18
  330. package/dist/cjs/editor-companion.cjs.entry.js +0 -56
  331. package/dist/cjs/withHasError-qGW_yqIv.js +0 -426
  332. package/dist/collection/components/bn-footer/assets/bar.png +0 -0
  333. package/dist/collection/components/bn-footer/assets/matrix.png +0 -0
  334. package/dist/collection/components/bn-message/assets/bar.png +0 -0
  335. package/dist/collection/components/bn-message/assets/matrix.png +0 -0
  336. package/dist/collection/components/bn-template/bn-template.js +0 -38
  337. package/dist/collection/components/editor-companion/editor-companion.css +0 -3
  338. package/dist/collection/components/editor-companion/editor-companion.js +0 -137
  339. package/dist/collection/utils/templateId.js +0 -12
  340. package/dist/collection/utils/testing/fakeGroup.js +0 -21
  341. package/dist/collection/utils/testing/hostFont.js +0 -20
  342. package/dist/collection/utils/testing/mutationObserver.js +0 -44
  343. package/dist/collection/utils/testing/structureChart.js +0 -26
  344. package/dist/collection/utils/testing/timeChart.js +0 -28
  345. package/dist/components/AxisConfig.js +0 -1
  346. package/dist/components/CompareUtil.js +0 -1
  347. package/dist/components/DataFormatDigits.js +0 -1
  348. package/dist/components/DateStringFactory.js +0 -1
  349. package/dist/components/LabelCollisionManager.js +0 -1
  350. package/dist/components/Order.js +0 -1
  351. package/dist/components/SVGStyle.js +0 -1
  352. package/dist/components/SVGVariancesStyleGroup.js +0 -1
  353. package/dist/components/StringAdapter.js +0 -1
  354. package/dist/components/VarianceMeasure.js +0 -1
  355. package/dist/components/XYChartDataRow.js +0 -1
  356. package/dist/components/bn-body2.js +0 -1
  357. package/dist/components/bn-card2.js +0 -1
  358. package/dist/components/bn-footer2.js +0 -1
  359. package/dist/components/bn-message2.js +0 -1
  360. package/dist/components/bn-page2.js +0 -1
  361. package/dist/components/bn-template.js +0 -1
  362. package/dist/components/bn-title2.js +0 -1
  363. package/dist/components/checkXYOverflow.js +0 -1
  364. package/dist/components/contentDecoder.js +0 -1
  365. package/dist/components/context-protocol.js +0 -1
  366. package/dist/components/editor-companion.js +0 -1
  367. package/dist/components/formatter.js +0 -1
  368. package/dist/components/geometry.js +0 -1
  369. package/dist/components/ibcs-chart-bubble.js +0 -1
  370. package/dist/components/ibcs-chart-bubble2.js +0 -1
  371. package/dist/components/ibcs-chart-bullet.js +0 -1
  372. package/dist/components/ibcs-chart-bullet2.js +0 -1
  373. package/dist/components/ibcs-chart-scatter.js +0 -1
  374. package/dist/components/ibcs-chart-scatter2.js +0 -1
  375. package/dist/components/ibcs-chart-structure.d.ts +0 -11
  376. package/dist/components/ibcs-chart-structure.js +0 -1
  377. package/dist/components/ibcs-chart-structure2.js +0 -1
  378. package/dist/components/ibcs-chart-time.d.ts +0 -11
  379. package/dist/components/ibcs-chart-time.js +0 -1
  380. package/dist/components/ibcs-chart-time2.js +0 -1
  381. package/dist/components/ibcs-table.d.ts +0 -11
  382. package/dist/components/ibcs-table.js +0 -1
  383. package/dist/components/ibcs-table2.js +0 -1
  384. package/dist/components/ibcs-title.d.ts +0 -11
  385. package/dist/components/ibcs-title.js +0 -1
  386. package/dist/components/ibcs-title2.js +0 -1
  387. package/dist/components/layoutTemplate.js +0 -1
  388. package/dist/components/luxon.js +0 -1
  389. package/dist/components/scaling.js +0 -1
  390. package/dist/components/svg.esm.js +0 -1
  391. package/dist/components/svgChartElements.js +0 -1
  392. package/dist/components/types.js +0 -1
  393. package/dist/components/validate.js +0 -1
  394. package/dist/components/withBodyObserver.js +0 -1
  395. package/dist/components/withComponentStatus.js +0 -1
  396. package/dist/components/withComponentStyle.js +0 -1
  397. package/dist/components/withDataset.js +0 -1
  398. package/dist/components/withHasError.js +0 -1
  399. package/dist/components/withRuleSet.js +0 -1
  400. package/dist/components/withScalingGroup.js +0 -1
  401. package/dist/components/withStyled.js +0 -1
  402. package/dist/components/withTranslation.js +0 -1
  403. package/dist/esm/bn-template.entry.js +0 -16
  404. package/dist/esm/editor-companion.entry.js +0 -54
  405. package/dist/esm/withHasError-73WV2SP5.js +0 -422
  406. package/dist/types/components/bn-chart-bubble/ibcs-chart-bubble.d.ts +0 -59
  407. package/dist/types/components/bn-chart-bullet/ibcs-chart-bullet.d.ts +0 -53
  408. package/dist/types/components/bn-chart-scatter/ibcs-chart-scatter.d.ts +0 -54
  409. package/dist/types/components/bn-template/bn-template.d.ts +0 -10
  410. package/dist/types/components/editor-companion/editor-companion.d.ts +0 -20
  411. package/dist/types/utils/templateId.d.ts +0 -9
  412. package/dist/types/utils/testing/fakeGroup.d.ts +0 -8
  413. package/dist/types/utils/testing/hostFont.d.ts +0 -16
  414. package/dist/types/utils/testing/mutationObserver.d.ts +0 -5
  415. package/dist/types/utils/testing/structureChart.d.ts +0 -5
  416. package/dist/types/utils/testing/timeChart.d.ts +0 -5
  417. /package/dist/collection/components/bn-chart-bubble/{ibcs-chart-bubble.css → bn-chart-bubble-renderer/bn-chart-bubble-renderer.css} +0 -0
  418. /package/dist/collection/components/bn-chart-bullet/{ibcs-chart-bullet.css → bn-chart-bullet-renderer/bn-chart-bullet-renderer.css} +0 -0
  419. /package/dist/collection/components/bn-chart-scatter/{ibcs-chart-scatter.css → bn-chart-scatter-renderer/bn-chart-scatter-renderer.css} +0 -0
  420. /package/dist/collection/components/bn-chart-time/{ibcs-chart-time.css → bn-chart-time-renderer/bn-chart-time-renderer.css} +0 -0
  421. /package/dist/collection/components/bn-table/{ibcs-table.css → bn-table-renderer/bn-table-renderer.css} +0 -0
  422. /package/dist/collection/components/bn-title/{ibcs-title/ibcs-title.css → bn-title-renderer/bn-title-renderer.css} +0 -0
  423. /package/dist/collection/components/bn-title/{ibcs-title → bn-title-renderer}/utils/factories/index.js +0 -0
  424. /package/dist/collection/components/bn-title/{ibcs-title → bn-title-renderer}/utils/model/MeasureEntriy.js +0 -0
  425. /package/dist/collection/components/bn-title/{ibcs-title → bn-title-renderer}/utils/model/TimePeriod.js +0 -0
  426. /package/dist/collection/components/bn-title/{ibcs-title → bn-title-renderer}/utils/model/TitleConfig.js +0 -0
  427. /package/dist/collection/components/bn-title/{ibcs-title → bn-title-renderer}/utils/model/index.js +0 -0
  428. /package/dist/components/{stackColors.js → p-4q8nRcWC.js} +0 -0
  429. /package/dist/components/{merge.js → p-B2NXsfMz.js} +0 -0
  430. /package/dist/components/{layoutObserver.js → p-B6kka9sT.js} +0 -0
  431. /package/dist/components/{NumericScale.js → p-BJmwHV0a.js} +0 -0
  432. /package/dist/components/{stackLayout.js → p-BTnRaHPb.js} +0 -0
  433. /package/dist/components/{emotion-hash.esm.js → p-BYBpC0EO.js} +0 -0
  434. /package/dist/components/{diagnostics.js → p-CckAR27O.js} +0 -0
  435. /package/dist/components/{SiPrefix.js → p-CeE4_3wQ.js} +0 -0
  436. /package/dist/components/{queryError.js → p-ClruFZD_.js} +0 -0
  437. /package/dist/components/{sanitizeHtml.js → p-CyUmrWfW.js} +0 -0
  438. /package/dist/components/{TableAttribute.js → p-DCPLGEs_.js} +0 -0
  439. /package/dist/components/{parentDimensions.js → p-DD1zlev_.js} +0 -0
  440. /package/dist/components/{pageFormats.js → p-DM7fwmH4.js} +0 -0
  441. /package/dist/components/{emptyState.js → p-DakXa7Dp.js} +0 -0
  442. /package/dist/components/{relativeVariance.js → p-fCjsrD7I.js} +0 -0
  443. /package/dist/types/components/bn-title/{ibcs-title → bn-title-renderer}/utils/Title.d.ts +0 -0
  444. /package/dist/types/components/bn-title/{ibcs-title → bn-title-renderer}/utils/factories/TitleDataSetFactory.d.ts +0 -0
  445. /package/dist/types/components/bn-title/{ibcs-title → bn-title-renderer}/utils/factories/index.d.ts +0 -0
  446. /package/dist/types/components/bn-title/{ibcs-title → bn-title-renderer}/utils/model/MeasureEntriy.d.ts +0 -0
  447. /package/dist/types/components/bn-title/{ibcs-title → bn-title-renderer}/utils/model/TimePeriod.d.ts +0 -0
  448. /package/dist/types/components/bn-title/{ibcs-title → bn-title-renderer}/utils/model/TitleConfig.d.ts +0 -0
  449. /package/dist/types/components/bn-title/{ibcs-title → bn-title-renderer}/utils/model/index.d.ts +0 -0
@@ -6,6 +6,7 @@ import withTranslation from "../../utils/withTranslation";
6
6
  import { globalLabelKeys } from "../../stores/internationalization";
7
7
  import { withStyled } from "../../utils/styled/withStyled";
8
8
  import withComponentStyle from "../../utils/withComponentStyle";
9
+ import { ruleSetLabels } from "../../utils/ibcsRuleSet";
9
10
  import withRuleSet from "../../utils/withRuleSet";
10
11
  import withHasError from "../../utils/withHasError";
11
12
  import { I18nMode } from "../../utils/constants";
@@ -17,7 +18,7 @@ import { getStores } from "../../context/context-protocol";
17
18
  *
18
19
  * Renders business unit, scenario labels, measure names with units, a
19
20
  * formatted date/time period, and sort-order indicators as a structured
20
- * header. Delegates the actual layout to the inner `ibcs-title` element.
21
+ * header. Delegates the actual layout to the inner `bn-title-renderer` element.
21
22
  */
22
23
  export class Title {
23
24
  constructor() {
@@ -83,7 +84,7 @@ export class Title {
83
84
  this.ruleSetConfig = withRuleSet(this);
84
85
  }
85
86
  validateScenario(newValue) {
86
- const errId = "ERR_scenarios";
87
+ const errId = "WARN_scenarios";
87
88
  const invalidScenarios = validateScenarioList(newValue);
88
89
  if (invalidScenarios.length > 0) {
89
90
  this.errors.addOrReplace({
@@ -97,7 +98,7 @@ export class Title {
97
98
  }
98
99
  }
99
100
  validateVariances(newValue) {
100
- const errId = "ERR_variances";
101
+ const errId = "WARN_variances";
101
102
  const invalidVariances = validateVariancesList(newValue);
102
103
  if (invalidVariances.length > 0) {
103
104
  this.errors.addOrReplace({
@@ -112,7 +113,7 @@ export class Title {
112
113
  }
113
114
  validateOrder(newValue) {
114
115
  const invalidElements = validateOrderList(newValue);
115
- const errId = "ERR_order";
116
+ const errId = "WARN_order";
116
117
  if (invalidElements.length > 0) {
117
118
  this.errors.addOrReplace({
118
119
  id: errId,
@@ -125,7 +126,7 @@ export class Title {
125
126
  }
126
127
  }
127
128
  validateOrderDirection(newValue) {
128
- const errId = "ERR_orderDirection";
129
+ const errId = "WARN_orderDirection";
129
130
  if (!isValidDirection(newValue)) {
130
131
  this.errors.addOrReplace({
131
132
  id: errId,
@@ -138,7 +139,7 @@ export class Title {
138
139
  }
139
140
  }
140
141
  validateMeasures(newValue) {
141
- const errId = "ERR_measures";
142
+ const errId = "WARN_measures";
142
143
  const invalidMeasures = validateMeasureList(newValue);
143
144
  if (invalidMeasures.length > 0) {
144
145
  this.errors.addOrReplace({
@@ -154,7 +155,7 @@ export class Title {
154
155
  }
155
156
  }
156
157
  validateDateStart(newValue) {
157
- const errId = "ERR_dateStart";
158
+ const errId = "WARN_dateStart";
158
159
  if (!isValidDate(newValue) && !isBlankInput(newValue)) {
159
160
  this.errors.addOrReplace({
160
161
  id: errId,
@@ -167,7 +168,7 @@ export class Title {
167
168
  }
168
169
  }
169
170
  validateDateEnd(newValue) {
170
- const errId = "ERR_dateEnd";
171
+ const errId = "WARN_dateEnd";
171
172
  if (!isValidDate(newValue) && !isBlankInput(newValue)) {
172
173
  this.errors.addOrReplace({
173
174
  id: errId,
@@ -180,7 +181,7 @@ export class Title {
180
181
  }
181
182
  }
182
183
  validateDateFormat(newValue) {
183
- const errId = "ERR_dateFormat";
184
+ const errId = "WARN_dateFormat";
184
185
  if (!isValidDateFormat(newValue) && !isBlankInput(newValue)) {
185
186
  this.errors.addOrReplace({
186
187
  id: errId,
@@ -193,7 +194,7 @@ export class Title {
193
194
  }
194
195
  }
195
196
  validateDateLink(newValue) {
196
- const errId = "ERR_dateLink";
197
+ const errId = "WARN_dateLink";
197
198
  if (!isValidDateLink(newValue) && !isBlankInput(newValue)) {
198
199
  this.errors.addOrReplace({
199
200
  id: errId,
@@ -217,13 +218,18 @@ export class Title {
217
218
  this.validateOrder(this.order);
218
219
  }
219
220
  prepareI18n() {
220
- const i18nMetaLabelsLocal = ["SEPERATOR_WS", "in", "CONNECTOR_WS"];
221
+ const i18nMetaLabelsLocal = ["SEPARATOR_WS", "in", "CONNECTOR_WS"];
221
222
  const i18nMetaLabelsGlobal = globalLabelKeys;
222
223
  // system
223
224
  const i18nMapSystemLocal = new Map(i18nMetaLabelsLocal.map((key) => [key, this.t(".".concat(key))]));
224
225
  const i18nMapSystemGlobal = new Map(i18nMetaLabelsGlobal.map((key) => [key, this.t("global.".concat(key))]));
225
226
  //let i18nMapCustom =
226
- return new Map([...i18nMapSystemGlobal.entries(), ...i18nMapSystemLocal.entries()]);
227
+ // a name from a <bn-ruleset> wins over the i18n label of the scenario
228
+ return new Map([
229
+ ...i18nMapSystemGlobal.entries(),
230
+ ...i18nMapSystemLocal.entries(),
231
+ ...ruleSetLabels(this.ruleSetConfig("user")),
232
+ ]);
227
233
  }
228
234
  prepareI18nMode() {
229
235
  return I18nMode.META;
@@ -301,7 +307,7 @@ export class Title {
301
307
  }
302
308
  render() {
303
309
  const fontStyles = this.getFontStyles();
304
- return (h(Host, { key: '542f7c564c8675dd7a493fc697a65a308601321f', style: fontStyles }, h("ibcs-title", { key: 'aea2b5c0395d68a2d2cb947aa0284e0d0d7c4787', businessUnit: this.prepareBusinessUnit(), scenarios: this.prepareScenarios(), measures: this.prepareMeasures(), timeperiod: this.prepareTitleTimePeriod(), order: this.prepareTitleOrder(), i18n: this.prepareI18n(), "i18n-mode": this.prepareI18nMode(), locale: this.prepareLocale(), ruleSetConfig: this.ruleSetConfig() })));
310
+ return (h(Host, { key: 'f7509ed1e738bade4d252ae05b14e2531f118cb4', style: fontStyles }, h("bn-title-renderer", { key: 'fb9dcca5c06a11c4d3d6237ce4ade4d42a62396b', businessUnit: this.prepareBusinessUnit(), scenarios: this.prepareScenarios(), measures: this.prepareMeasures(), timeperiod: this.prepareTitleTimePeriod(), order: this.prepareTitleOrder(), i18n: this.prepareI18n(), "i18n-mode": this.prepareI18nMode(), locale: this.prepareLocale(), ruleSetConfig: this.ruleSetConfig() })));
305
311
  }
306
312
  static get is() { return "bn-title"; }
307
313
  static get encapsulation() { return "shadow"; }
@@ -317,6 +323,44 @@ export class Title {
317
323
  }
318
324
  static get properties() {
319
325
  return {
326
+ "selectedStyle": {
327
+ "type": "string",
328
+ "mutable": false,
329
+ "complexType": {
330
+ "original": "string",
331
+ "resolved": "string",
332
+ "references": {}
333
+ },
334
+ "required": false,
335
+ "optional": true,
336
+ "docs": {
337
+ "tags": [],
338
+ "text": "Name of the component style to use (the `name` of a\n`<bn-component-style>`). Its values go on top of the default style."
339
+ },
340
+ "getter": false,
341
+ "setter": false,
342
+ "reflect": true,
343
+ "attribute": "selected-style"
344
+ },
345
+ "i18nNamespace": {
346
+ "type": "string",
347
+ "mutable": false,
348
+ "complexType": {
349
+ "original": "string",
350
+ "resolved": "string",
351
+ "references": {}
352
+ },
353
+ "required": false,
354
+ "optional": true,
355
+ "docs": {
356
+ "tags": [],
357
+ "text": "Namespace of the translations to use (the `namespace` of a\n`<bn-internationalization>`). Without it the component takes the\n`i18n-namespace` of the nearest ancestor that has one, then the built-in\ntexts."
358
+ },
359
+ "getter": false,
360
+ "setter": false,
361
+ "reflect": true,
362
+ "attribute": "i18n-namespace"
363
+ },
320
364
  "ruleset": {
321
365
  "type": "string",
322
366
  "mutable": false,
@@ -329,7 +373,7 @@ export class Title {
329
373
  "optional": true,
330
374
  "docs": {
331
375
  "tags": [],
332
- "text": "Name of a registered IBCS rule set (see `bn-ruleset`) used for scenario\nordering. Supports `\"inherited-closest\"` / `\"inherited-page\"` to take\nover the value from an ancestor `bn-layout-card` / `bn-layout-page`."
376
+ "text": "Name of a registered IBCS rule set (see `bn-ruleset`) used for scenario\nordering and names. Supports `\"inherited-closest\"` / `\"inherited-page\"` to\ntake over the value from an ancestor `bn-layout-card` / `bn-layout-page`."
333
377
  },
334
378
  "getter": false,
335
379
  "setter": false,
@@ -1,5 +1,5 @@
1
1
  import { h, Host } from "@stencil/core";
2
- import { isValidBoolean, isValidNumber } from "../../utils/validate";
2
+ import { isValidNumber } from "../../utils/validate";
3
3
  import { LAYOUT_STATE_VERSION, measure, originsFor, readDiagnostics, resolveStandaloneId, } from "../../utils/layoutState";
4
4
  import withComponentStatus from "../../utils/withComponentStatus";
5
5
  import { withStyled } from "../../utils/styled/withStyled";
@@ -53,7 +53,7 @@ export class ChartTree {
53
53
  this.recalculateLayout();
54
54
  }
55
55
  validateDirection(newValue) {
56
- const errId = "ERR_direction";
56
+ const errId = "WARN_direction";
57
57
  const validValues = ["ltr", "rtl", "ttb", "btt"];
58
58
  if (!validValues.includes(newValue)) {
59
59
  this.errors.addOrReplace({
@@ -68,7 +68,7 @@ export class ChartTree {
68
68
  this.recalculateLayout();
69
69
  }
70
70
  validateLevelSpacing(newValue) {
71
- const errId = "ERR_levelSpacing";
71
+ const errId = "WARN_levelSpacing";
72
72
  if (!isValidNumber(newValue) || newValue < 0) {
73
73
  this.errors.addOrReplace({
74
74
  id: errId,
@@ -82,7 +82,7 @@ export class ChartTree {
82
82
  this.recalculateLayout();
83
83
  }
84
84
  validateNodeSpacing(newValue) {
85
- const errId = "ERR_nodeSpacing";
85
+ const errId = "WARN_nodeSpacing";
86
86
  if (!isValidNumber(newValue) || newValue < 0) {
87
87
  this.errors.addOrReplace({
88
88
  id: errId,
@@ -96,7 +96,7 @@ export class ChartTree {
96
96
  this.recalculateLayout();
97
97
  }
98
98
  validateEdgeStyle(newValue) {
99
- const errId = "ERR_edgeStyle";
99
+ const errId = "WARN_edgeStyle";
100
100
  const validValues = ["straight", "orthogonal", "curved"];
101
101
  if (!validValues.includes(newValue)) {
102
102
  this.errors.addOrReplace({
@@ -109,19 +109,6 @@ export class ChartTree {
109
109
  this.errors.remove(errId);
110
110
  }
111
111
  }
112
- validateShowOperators(newValue) {
113
- const errId = "ERR_showOperators";
114
- if (!isValidBoolean(newValue)) {
115
- this.errors.addOrReplace({
116
- id: errId,
117
- type: "warning",
118
- message: `show-operators: invalid value '${newValue}', must be 'true' or 'false'`,
119
- });
120
- }
121
- else {
122
- this.errors.remove(errId);
123
- }
124
- }
125
112
  constructor() {
126
113
  this.treeConfig = null;
127
114
  this.layout = null;
@@ -158,7 +145,7 @@ export class ChartTree {
158
145
  /**
159
146
  * Show operator labels between sibling nodes.
160
147
  */
161
- this.showOperators = "true";
148
+ this.showOperators = true;
162
149
  withStyled(this);
163
150
  withComponentStatus(this);
164
151
  this.errors = withHasError(this);
@@ -257,7 +244,6 @@ export class ChartTree {
257
244
  this.validateLevelSpacing(this.levelSpacing);
258
245
  this.validateNodeSpacing(this.nodeSpacing);
259
246
  this.validateEdgeStyle(this.edgeStyle);
260
- this.validateShowOperators(this.showOperators);
261
247
  }
262
248
  connectedCallback() {
263
249
  // After a move in the document the observers are gone. Before the first render there is no grid yet.
@@ -450,7 +436,7 @@ export class ChartTree {
450
436
  paths.push(h("path", { key: `edge-${edge.from}-${edge.to}`, d: path, fill: "none", stroke: svgStyle.stroke, "stroke-width": svgStyle.strokeWidth, "stroke-dasharray": svgStyle.strokeDasharray }));
451
437
  }
452
438
  // Render operators between siblings
453
- if (this.showOperators === "true") {
439
+ if (this.showOperators) {
454
440
  for (const [parent, children] of this.treeConfig.adjacencyList.entries()) {
455
441
  const bend = bends.get(parent);
456
442
  if (bend === undefined) {
@@ -524,6 +510,25 @@ export class ChartTree {
524
510
  }
525
511
  static get properties() {
526
512
  return {
513
+ "selectedStyle": {
514
+ "type": "string",
515
+ "mutable": false,
516
+ "complexType": {
517
+ "original": "string",
518
+ "resolved": "string",
519
+ "references": {}
520
+ },
521
+ "required": false,
522
+ "optional": true,
523
+ "docs": {
524
+ "tags": [],
525
+ "text": "Name of the component style to use (the `name` of a\n`<bn-component-style>`). Its values go on top of the default style."
526
+ },
527
+ "getter": false,
528
+ "setter": false,
529
+ "reflect": true,
530
+ "attribute": "selected-style"
531
+ },
527
532
  "edges": {
528
533
  "type": "string",
529
534
  "mutable": false,
@@ -657,11 +662,11 @@ export class ChartTree {
657
662
  "attribute": "i18n-namespace"
658
663
  },
659
664
  "showOperators": {
660
- "type": "string",
665
+ "type": "boolean",
661
666
  "mutable": false,
662
667
  "complexType": {
663
- "original": "string",
664
- "resolved": "string",
668
+ "original": "boolean",
669
+ "resolved": "boolean",
665
670
  "references": {}
666
671
  },
667
672
  "required": false,
@@ -674,7 +679,7 @@ export class ChartTree {
674
679
  "setter": false,
675
680
  "reflect": false,
676
681
  "attribute": "show-operators",
677
- "defaultValue": "\"true\""
682
+ "defaultValue": "true"
678
683
  }
679
684
  };
680
685
  }
@@ -768,9 +773,6 @@ export class ChartTree {
768
773
  }, {
769
774
  "propName": "edgeStyle",
770
775
  "methodName": "validateEdgeStyle"
771
- }, {
772
- "propName": "showOperators",
773
- "methodName": "validateShowOperators"
774
776
  }];
775
777
  }
776
778
  }
@@ -1,3 +1,2 @@
1
- import "./global.css";
2
1
  export * from "./components";
3
2
  export * from "./utils/layoutState/types";
@@ -0,0 +1 @@
1
+ export {};
@@ -8,8 +8,8 @@ const xyChartStyleDefaults = () => ({
8
8
  labelToMark: 0.3,
9
9
  legendSwatch: 0.9,
10
10
  panelGap: 1.6,
11
- refLineWidth: 1,
12
- gridLineWidth: 1,
11
+ refLineWidth: 0.075,
12
+ gridLineWidth: 0.075,
13
13
  },
14
14
  axisStyles: {
15
15
  ac: { stroke: "#A6A6A6", fill: "#A6A6A6", width: 1 },
@@ -59,7 +59,7 @@ export const SYSTEM_STYLE_DEFAULTS = {
59
59
  },
60
60
  barStyles: {
61
61
  ac: { stroke: "#404040", fill: "#404040", width: 0.1 },
62
- fc: { stroke: "#404040", fill: "#ffffff", width: 0.5, fillpattern: "fc" },
62
+ fc: { stroke: "#404040", fill: "#ffffff", width: 0.5, fillpattern: "hatched" },
63
63
  pp: { stroke: "#A6A6A6", fill: "#A6A6A6", width: 0.1 },
64
64
  pl: { stroke: "#404040", fill: "#ffffff", width: 0.1 },
65
65
  },
@@ -102,7 +102,7 @@ export const SYSTEM_STYLE_DEFAULTS = {
102
102
  },
103
103
  barStyles: {
104
104
  ac: { stroke: "#404040", fill: "#404040", width: 0.1 },
105
- fc: { stroke: "#404040", fill: "#ffffff", width: 0.5, fillpattern: "fc" },
105
+ fc: { stroke: "#404040", fill: "#ffffff", width: 0.5, fillpattern: "hatched" },
106
106
  pp: { stroke: "#A6A6A6", fill: "#A6A6A6", width: 0.1 },
107
107
  pl: { stroke: "#404040", fill: "#ffffff", width: 0.1 },
108
108
  },
@@ -127,8 +127,8 @@ export const SYSTEM_STYLE_DEFAULTS = {
127
127
  barHeight: 0.66,
128
128
  varianceHeight: 0.4,
129
129
  targetTickHeight: 1.1,
130
- targetLineWidth: 2,
131
- axisLineWidth: 1,
130
+ targetLineWidth: 0.15,
131
+ axisLineWidth: 0.075,
132
132
  labelToBar: 0.3,
133
133
  labelToAxis: 0.3,
134
134
  axisTickLength: 0.35,
@@ -172,6 +172,10 @@ export const SYSTEM_STYLE_DEFAULTS = {
172
172
  borderWidth: 1,
173
173
  cellPadding: 4,
174
174
  },
175
+ "bn-annotation": {
176
+ color: "#0070c0",
177
+ colors: { negative: "#ff0000", positive: "#008f96" },
178
+ },
175
179
  };
176
180
  /** `bn-text` keys. All are optional, so the defaults do not list them. */
177
181
  const TEXT_STYLE_KEYS = ["fontFamily", "fontSizePx", "fontColor", "fontBackgroundColor", "leading"];
@@ -1,5 +1,5 @@
1
1
  /**
2
- * Factory that creates a fresh set of all 9 `@stencil/store` instances.
2
+ * Factory that creates a fresh set of all 8 `@stencil/store` instances.
3
3
  *
4
4
  * Called once per `<bn-context>` element so that each context owns isolated
5
5
  * reactive state. The returned object satisfies the {@link ScopedStores} interface.
@@ -24,6 +24,7 @@ export function createScopedStores() {
24
24
  const ruleSets = createStore({
25
25
  _system: SYSTEM_RULESET_DEFAULTS,
26
26
  });
27
+ const annotationsUnplaced = createStore({});
27
28
  return {
28
29
  db,
29
30
  datasetsMeta,
@@ -33,5 +34,6 @@ export function createScopedStores() {
33
34
  context,
34
35
  scalingGroups,
35
36
  ruleSets,
37
+ annotationsUnplaced,
36
38
  };
37
39
  }
@@ -105,7 +105,7 @@ const de = flattenObject({
105
105
  ibcssymbol_delta_generic_relative: "Δ({%})%",
106
106
  },
107
107
  "bn-title": {
108
- SEPERATOR_WS: ", ",
108
+ SEPARATOR_WS: ", ",
109
109
  CONNECTOR_WS: " und ",
110
110
  in: "in",
111
111
  },
@@ -132,7 +132,7 @@ const de = flattenObject({
132
132
  in: "in",
133
133
  category: " ",
134
134
  operation: " ",
135
- there_of: "davon",
135
+ thereof: "davon",
136
136
  part_of: "in % von",
137
137
  SUM_TOTAL: "❖",
138
138
  REST: "REST",
@@ -165,7 +165,7 @@ const en = flattenObject({
165
165
  ibcssymbol_delta_generic_relative: "Δ({%})%",
166
166
  },
167
167
  "bn-title": {
168
- SEPERATOR_WS: ", ",
168
+ SEPARATOR_WS: ", ",
169
169
  CONNECTOR_WS: " and ",
170
170
  in: "in",
171
171
  },
@@ -192,13 +192,17 @@ const en = flattenObject({
192
192
  in: "in",
193
193
  category: " ",
194
194
  operation: " ",
195
- there_of: "there of",
195
+ thereof: "there of",
196
196
  part_of: "in % of",
197
197
  SUM_TOTAL: "❖",
198
198
  REST: "REST",
199
199
  "no-data": "No Data",
200
200
  },
201
201
  });
202
- const BN_INTERNATIONALIZATION_KEYS = Object.keys(de || {});
202
+ /** Old key names (deprecated) and what they are called now. A text is still found and still read under the old name. */
203
+ export const RENAMED_I18N_KEYS = {
204
+ "bn-title.SEPERATOR_WS": "bn-title.SEPARATOR_WS",
205
+ "bn-table.there_of": "bn-table.thereof",
206
+ };
203
207
  export const SYSTEM_I18N_DEFAULTS = { _system: { de, en } };
204
- export { globalLabelKeys, BN_INTERNATIONALIZATION_KEYS };
208
+ export { globalLabelKeys };
@@ -0,0 +1,66 @@
1
+ import { SYSTEM_STYLE_DEFAULTS } from "../stores/componentStyles";
2
+ const COLOR_NAME = /^[a-z][a-z0-9-]*$/i;
3
+ /**
4
+ * CSS value of a named colour: `--bn-annotation-color-<name>` when the page
5
+ * sets it, else the colour of that name in the style, else the main colour
6
+ * (`--bn-annotation-color`, else `color` of the style). The name ends up in a
7
+ * style, so only a plain name counts.
8
+ */
9
+ export function annotationColor(name, style) {
10
+ var _a, _b;
11
+ // a style can set the section or its keys to null, and that must not cost the page its marks
12
+ const main = (_a = style === null || style === void 0 ? void 0 : style.color) !== null && _a !== void 0 ? _a : SYSTEM_STYLE_DEFAULTS["bn-annotation"].color;
13
+ const colors = (_b = style === null || style === void 0 ? void 0 : style.colors) !== null && _b !== void 0 ? _b : {};
14
+ const base = `var(--bn-annotation-color, ${main})`;
15
+ if (!name || !COLOR_NAME.test(name))
16
+ return base;
17
+ const own = Object.prototype.hasOwnProperty.call(colors, name) ? colors[name] : undefined;
18
+ return `var(--bn-annotation-color-${name}, ${own !== null && own !== void 0 ? own : base})`;
19
+ }
20
+ /** A value of an item as text. Anything else is dropped: an object in a JSX child would be taken for a vnode. */
21
+ const text = (value) => typeof value === "string" || typeof value === "number" ? String(value) : undefined;
22
+ /** The `items` of a layer. `undefined` when it is not a JSON array of objects. */
23
+ export function parseLayerItems(json) {
24
+ var _a;
25
+ return (_a = parseItems(json)) === null || _a === void 0 ? void 0 : _a.map((item) => {
26
+ var _a;
27
+ return (Object.assign(Object.assign({}, item), { label: text(item.label), color: text(item.color), target: (_a = text(item.target)) !== null && _a !== void 0 ? _a : "", to: text(item.to) }));
28
+ });
29
+ }
30
+ /** The `items` of a list. `undefined` when it is not a JSON array of objects. */
31
+ export function parseListItems(json) {
32
+ var _a;
33
+ return (_a = parseItems(json)) === null || _a === void 0 ? void 0 : _a.map((item) => ({
34
+ label: text(item.label),
35
+ title: text(item.title),
36
+ html: text(item.html),
37
+ }));
38
+ }
39
+ function parseItems(json) {
40
+ if (json == null || json.trim() === "")
41
+ return [];
42
+ try {
43
+ const parsed = JSON.parse(json);
44
+ if (Array.isArray(parsed) && parsed.every((item) => item !== null && typeof item === "object")) {
45
+ return parsed;
46
+ }
47
+ }
48
+ catch (_a) {
49
+ // reported by the caller
50
+ }
51
+ return undefined;
52
+ }
53
+ const pageKeys = new WeakMap();
54
+ let nextPageKey = 1;
55
+ /** Key of the page an annotation element sits on: a label is unique only within one page. */
56
+ export function annotationPageKey(element) {
57
+ const page = element.closest("bn-layout-page");
58
+ if (!page)
59
+ return "";
60
+ let key = pageKeys.get(page);
61
+ if (!key) {
62
+ key = `page-${nextPageKey++}`;
63
+ pageKeys.set(page, key);
64
+ }
65
+ return key;
66
+ }
@@ -1,6 +1,6 @@
1
1
  /**
2
- * Pure math for the chart auto-fit loops (ibcs-chart-structure fits width,
3
- * ibcs-chart-time fits height). Kept free of chart/svg.js imports so it can
2
+ * Pure math for the chart auto-fit loops (bn-chart-structure-renderer fits width,
3
+ * bn-chart-time-renderer fits height). Kept free of chart/svg.js imports so it can
4
4
  * be unit-tested under mock-doc (which lacks getBBox).
5
5
  *
6
6
  * Model: a chart's size along its fit axis is affine in the pixel scales,
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Mirrors the inner no-data state on the outer component's host.
3
3
  *
4
- * Only the inner `ibcs-*` element knows it has no rows; it sets `no-data` on
4
+ * Only the inner `bn-*-renderer` element knows it has no rows; it sets `no-data` on
5
5
  * its own host. The outer host sits in a layout slot wrapper as an
6
6
  * inline-block, so it must fill that wrapper too before the empty-state box
7
7
  * can fill the cell (see styles/_empty-state.scss). Call from the outer
@@ -1,6 +1,48 @@
1
1
  import { merge } from "@corex/deepmerge";
2
2
  import { SYSTEM_RULESET_DEFAULTS } from "../stores/ruleSets";
3
3
  import { VarianceScenario } from "./model/VarianceScenario";
4
+ const FAMILIES = ["ac", "pp", "fc", "pl"];
5
+ const SLOT_BY_COLOR_INDEX = { 10: "ac", 20: "pp", 30: "fc", 50: "pl" };
6
+ /** The theme style slot a colorIndex selects. An unknown value counts as 10. */
7
+ export function styleSlot(colorIndex) {
8
+ var _a;
9
+ return (_a = SLOT_BY_COLOR_INDEX[colorIndex]) !== null && _a !== void 0 ? _a : "ac";
10
+ }
11
+ /**
12
+ * A style group (ac, pp, fc, pl) with each scenario on the slot its colorIndex
13
+ * selects. Returns `styles` itself when no scenario moves, which is the case
14
+ * for the built-in rule set.
15
+ */
16
+ export function stylesBySlot(styles, ruleSet) {
17
+ const slots = FAMILIES.map((family) => styleSlot(ruleSet.getScenarioColorIndex(`${family}1`)));
18
+ if (slots.every((slot, index) => slot === FAMILIES[index])) {
19
+ return styles;
20
+ }
21
+ // keeps the prototype: a style group can be a class with methods
22
+ const moved = Object.assign(Object.create(Object.getPrototypeOf(styles)), styles);
23
+ FAMILIES.forEach((family, index) => {
24
+ moved[family] = styles[slots[index]];
25
+ });
26
+ return moved;
27
+ }
28
+ /**
29
+ * The labels a rule set gives the scenarios, keyed like the i18n map (ac1 ...
30
+ * pl4): the name as is for slot 1, with the number for slots 2 to 4. Pass the
31
+ * user layers only, the built-in names are not labels.
32
+ */
33
+ export function ruleSetLabels(config) {
34
+ var _a, _b;
35
+ const labels = new Map();
36
+ for (const family of FAMILIES) {
37
+ const name = (_b = (_a = config === null || config === void 0 ? void 0 : config.scenarios) === null || _a === void 0 ? void 0 : _a[family]) === null || _b === void 0 ? void 0 : _b.name;
38
+ if (!name)
39
+ continue;
40
+ for (const slot of [1, 2, 3, 4]) {
41
+ labels.set(`${family}${slot}`, slot === 1 ? name : `${name}${slot}`);
42
+ }
43
+ }
44
+ return labels;
45
+ }
4
46
  /**
5
47
  * IBCS rule set defining scenario→style mappings per IBCS notation standard v1.2.
6
48
  *
@@ -0,0 +1,59 @@
1
+ const KEY_ATTRIBUTES = [
2
+ ["rowGroup", "data-bn-row-group"],
3
+ ["category", "data-bn-category"],
4
+ ["subCategory", "data-bn-sub-category"],
5
+ ["date", "data-bn-date"],
6
+ ["scenario", "data-bn-scenario"],
7
+ ["row", "data-bn-row"],
8
+ ];
9
+ const PART_ATTRIBUTE = "data-bn-part";
10
+ /**
11
+ * The `data-bn-*` attributes of a data-point element. Unknown fields stay out.
12
+ * Without `part` the element only carries the keys and cannot be addressed:
13
+ * the group around a bar, or a second shape of one data point.
14
+ */
15
+ export function dataPointAttributes(key, part) {
16
+ const attributes = {};
17
+ if (!key)
18
+ return attributes;
19
+ for (const [field, attribute] of KEY_ATTRIBUTES) {
20
+ const value = key[field];
21
+ if (value != null && value !== "")
22
+ attributes[attribute] = String(value);
23
+ }
24
+ if (part)
25
+ attributes[PART_ATTRIBUTE] = part;
26
+ return attributes;
27
+ }
28
+ /** The key of a rendered element, read back from its attributes. Only an element with a part has one. */
29
+ export function readLayoutPoint(element) {
30
+ const part = element.getAttribute(PART_ATTRIBUTE);
31
+ if (!part)
32
+ return undefined;
33
+ const point = { part: part };
34
+ for (const [field, attribute] of KEY_ATTRIBUTES) {
35
+ const value = element.getAttribute(attribute);
36
+ if (value != null)
37
+ point[field] = value;
38
+ }
39
+ return point;
40
+ }
41
+ /** The start of a bucket as `YYYY-MM-DD`, with the time when it is not midnight: a bucket can be shorter than a day. */
42
+ export function pointDate(iso) {
43
+ if (!iso)
44
+ return undefined;
45
+ const match = /^(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}:\d{2})/.exec(iso);
46
+ if (!match)
47
+ return iso;
48
+ return match[2] === "00:00:00" ? match[1] : `${match[1]}T${match[2]}`;
49
+ }
50
+ /** The dimension a chart's `level` shows, with the value of its row: `category` for `categoryIndex` too. */
51
+ export function levelKey(level, value) {
52
+ if (value == null)
53
+ return {};
54
+ if (level.startsWith("rowGroup"))
55
+ return { rowGroup: String(value) };
56
+ if (level.startsWith("subCategory"))
57
+ return { subCategory: String(value) };
58
+ return { category: String(value) };
59
+ }