@bino-bi/bn-template-engine 1.0.0-alpha.9 → 1.0.0-next.19

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 (391) hide show
  1. package/LICENSE +203 -21
  2. package/dist/bn-template-engine/bn-template-engine.esm.js +1 -1
  3. package/dist/bn-template-engine/p-19bbac66.entry.js +1 -0
  4. package/dist/bn-template-engine/p-209351c9.entry.js +1 -0
  5. package/dist/bn-template-engine/p-22d0fb7a.entry.js +1 -0
  6. package/dist/bn-template-engine/p-2e6dc267.entry.js +1 -0
  7. package/dist/bn-template-engine/p-485d23d7.entry.js +1 -0
  8. package/dist/bn-template-engine/p-74c5a95d.entry.js +1 -0
  9. package/dist/bn-template-engine/p-7bdc0e28.entry.js +1 -0
  10. package/dist/bn-template-engine/p-83c71b16.entry.js +1 -0
  11. package/dist/bn-template-engine/p-90806e7a.entry.js +1 -0
  12. package/dist/bn-template-engine/p-9879c9b2.entry.js +1 -0
  13. package/dist/bn-template-engine/p-BA48JiHe.js +1 -0
  14. package/dist/bn-template-engine/p-BWKdb9ym.js +1 -0
  15. package/dist/bn-template-engine/p-BZV1b5VH.js +1 -0
  16. package/dist/bn-template-engine/p-Bdfxd_Ke.js +1 -0
  17. package/dist/bn-template-engine/p-BjBz5cSL.js +1 -0
  18. package/dist/bn-template-engine/p-BqhIhYr1.js +1 -0
  19. package/dist/bn-template-engine/p-C0Pwqx-O.js +1 -0
  20. package/dist/bn-template-engine/p-CiudZRQr.js +1 -0
  21. package/dist/bn-template-engine/p-DTuaq8Pj.js +1 -0
  22. package/dist/bn-template-engine/p-DY7YYmpa.js +1 -0
  23. package/dist/bn-template-engine/p-Dg9OcXAO.js +1 -0
  24. package/dist/bn-template-engine/p-DsTzlzxQ.js +1 -0
  25. package/dist/bn-template-engine/p-X6CxL6W-.js +1 -0
  26. package/dist/bn-template-engine/p-a8291de2.entry.js +1 -0
  27. package/dist/bn-template-engine/p-aakBGfzL.js +1 -0
  28. package/dist/bn-template-engine/p-b25455a7.entry.js +1 -0
  29. package/dist/bn-template-engine/p-e96da91f.entry.js +1 -0
  30. package/dist/bn-template-engine/p-eca8e2e2.entry.js +1 -0
  31. package/dist/bn-template-engine/p-f9dfd120.entry.js +1 -0
  32. package/dist/bn-template-engine/p-rdqTC0_5.js +1 -0
  33. package/dist/cjs/AxisConfig-VnVelfSV.js +233 -0
  34. package/dist/cjs/LabelCollisionManager-nfD5P__k.js +412 -0
  35. package/dist/cjs/NumericScale-BAyYXpKL.js +107 -0
  36. package/dist/cjs/Order-DobBozQC.js +87 -0
  37. package/dist/cjs/SVGStyle-BQOmGWLX.js +8209 -0
  38. package/dist/cjs/SVGVariancesStyleGroup-DCGfHrqh.js +50 -0
  39. package/dist/cjs/VarianceMeasure-NY9yhiNV.js +372 -0
  40. package/dist/cjs/XYChartDataRow-B7OKrAcC.js +829 -0
  41. package/dist/cjs/bn-asset_21.cjs.entry.js +16047 -0
  42. package/dist/cjs/bn-chart-bubble.cjs.entry.js +762 -0
  43. package/dist/cjs/bn-chart-bullet.cjs.entry.js +785 -0
  44. package/dist/cjs/bn-chart-scatter.cjs.entry.js +658 -0
  45. package/dist/cjs/bn-grid.cjs.entry.js +5 -3
  46. package/dist/cjs/bn-image.cjs.entry.js +5 -3
  47. package/dist/cjs/bn-internationalization.cjs.entry.js +10 -8
  48. package/dist/cjs/bn-ruleset.cjs.entry.js +41 -0
  49. package/dist/cjs/bn-template-engine.cjs.js +1 -1
  50. package/dist/cjs/bn-template.cjs.entry.js +1 -1
  51. package/dist/cjs/bn-text.cjs.entry.js +8 -79
  52. package/dist/cjs/bn-tree.cjs.entry.js +4 -2
  53. package/dist/cjs/context-protocol-BDrMkhc4.js +9499 -0
  54. package/dist/cjs/editor-companion.cjs.entry.js +13 -6
  55. package/dist/cjs/ibcs-chart-bubble.cjs.entry.js +624 -0
  56. package/dist/cjs/ibcs-chart-bullet.cjs.entry.js +673 -0
  57. package/dist/cjs/ibcs-chart-scatter.cjs.entry.js +667 -0
  58. package/dist/cjs/layoutObserver-o03YUfn_.js +199 -0
  59. package/dist/cjs/loader.cjs.js +1 -1
  60. package/dist/cjs/sanitizeHtml-LuZr1IMd.js +85 -0
  61. package/dist/cjs/scaling-DKZyjWj5.js +587 -0
  62. package/dist/cjs/{withBodyObserver-D7BKWN2N.js → withBodyObserver-BKUE_ypL.js} +12 -7
  63. package/dist/cjs/withScalingGroup-BmcRlWBs.js +73 -0
  64. package/dist/cjs/withStyled-CRiC9fzc.js +1137 -0
  65. package/dist/collection/collection-manifest.json +9 -1
  66. package/dist/collection/components/bn-body/bn-body.css +1 -0
  67. package/dist/collection/components/bn-card/bn-card.css +2 -0
  68. package/dist/collection/components/bn-chart-bubble/bn-chart-bubble.css +10 -0
  69. package/dist/collection/components/bn-chart-bubble/bn-chart-bubble.js +1110 -0
  70. package/dist/collection/components/bn-chart-bubble/ibcs-chart-bubble.css +9 -0
  71. package/dist/collection/components/bn-chart-bubble/ibcs-chart-bubble.js +653 -0
  72. package/dist/collection/components/bn-chart-bubble/utils/BubbleChart.js +472 -0
  73. package/dist/collection/components/bn-chart-bullet/bn-chart-bullet.css +10 -0
  74. package/dist/collection/components/bn-chart-bullet/bn-chart-bullet.js +1014 -0
  75. package/dist/collection/components/bn-chart-bullet/ibcs-chart-bullet.css +9 -0
  76. package/dist/collection/components/bn-chart-bullet/ibcs-chart-bullet.js +538 -0
  77. package/dist/collection/components/bn-chart-bullet/utils/BulletChart.js +440 -0
  78. package/dist/collection/components/bn-chart-bullet/utils/model/BulletChartStyle.js +132 -0
  79. package/dist/collection/components/bn-chart-bullet/utils/model/BulletConfig.js +89 -0
  80. package/dist/collection/components/bn-chart-bullet/utils/model/index.js +2 -0
  81. package/dist/collection/components/bn-chart-scatter/bn-chart-scatter.css +10 -0
  82. package/dist/collection/components/bn-chart-scatter/bn-chart-scatter.js +965 -0
  83. package/dist/collection/components/bn-chart-scatter/ibcs-chart-scatter.css +9 -0
  84. package/dist/collection/components/bn-chart-scatter/ibcs-chart-scatter.js +580 -0
  85. package/dist/collection/components/bn-chart-scatter/utils/ScatterChart.js +409 -0
  86. package/dist/collection/components/bn-chart-structure/bn-chart-structure.js +125 -42
  87. package/dist/collection/components/bn-chart-structure/ibcs-chart-structure.js +103 -36
  88. package/dist/collection/components/bn-chart-structure/utils/StructureChart.js +82 -58
  89. package/dist/collection/components/bn-chart-structure/utils/helper/ElementPositions.js +46 -4
  90. package/dist/collection/components/bn-chart-structure/utils/model/StructureChartComponentConfig.js +5 -4
  91. package/dist/collection/components/bn-chart-time/bn-chart-time.css +1 -1
  92. package/dist/collection/components/bn-chart-time/bn-chart-time.js +160 -43
  93. package/dist/collection/components/bn-chart-time/ibcs-chart-time.js +94 -31
  94. package/dist/collection/components/bn-chart-time/utils/TimeChart.js +132 -74
  95. package/dist/collection/components/bn-chart-time/utils/elements/StackedColumn.js +3 -3
  96. package/dist/collection/components/bn-chart-time/utils/model/TimeChartComponentConfig.js +5 -4
  97. package/dist/collection/components/bn-chart-time/utils/model/TimeChartDataRow.js +2 -0
  98. package/dist/collection/components/bn-component-style/bn-component-style.js +1 -1
  99. package/dist/collection/components/bn-context/bn-context.js +1 -1
  100. package/dist/collection/components/bn-dataset/bn-dataset.js +226 -23
  101. package/dist/collection/components/bn-datasource/bn-datasource.js +163 -12
  102. package/dist/collection/components/bn-footer/bn-footer.js +1 -1
  103. package/dist/collection/components/bn-grid/bn-grid.js +1 -1
  104. package/dist/collection/components/bn-image/bn-image.js +1 -1
  105. package/dist/collection/components/bn-internationalization/bn-internationalization.js +10 -7
  106. package/dist/collection/components/bn-layout-card/bn-layout-card.css +8 -3
  107. package/dist/collection/components/bn-layout-card/bn-layout-card.js +98 -35
  108. package/dist/collection/components/bn-layout-page/bn-layout-page.css +5 -3
  109. package/dist/collection/components/bn-layout-page/bn-layout-page.js +98 -25
  110. package/dist/collection/components/bn-message/bn-message.css +6 -2
  111. package/dist/collection/components/bn-message/bn-message.js +3 -2
  112. package/dist/collection/components/bn-page/bn-page.js +1 -1
  113. package/dist/collection/components/bn-ruleset/bn-ruleset.css +3 -0
  114. package/dist/collection/components/bn-ruleset/bn-ruleset.js +68 -0
  115. package/dist/collection/components/bn-scaling-group/bn-scaling-group.css +3 -0
  116. package/dist/collection/components/bn-scaling-group/bn-scaling-group.js +136 -0
  117. package/dist/collection/components/bn-table/bn-table.js +317 -61
  118. package/dist/collection/components/bn-table/ibcs-table.css +8 -0
  119. package/dist/collection/components/bn-table/ibcs-table.js +161 -32
  120. package/dist/collection/components/bn-table/utils/Table.js +72 -28
  121. package/dist/collection/components/bn-table/utils/elements/CellBarChart.js +13 -8
  122. package/dist/collection/components/bn-table/utils/elements/TableRow.js +3 -2
  123. package/dist/collection/components/bn-table/utils/elements/WaterfallBar.js +47 -0
  124. package/dist/collection/components/bn-table/utils/elements/index.js +1 -0
  125. package/dist/collection/components/bn-table/utils/factories/tableDataSetFactory.js +117 -22
  126. package/dist/collection/components/bn-table/utils/helper/DataQuery.js +380 -50
  127. package/dist/collection/components/bn-table/utils/helper/IntervalColumns.js +140 -0
  128. package/dist/collection/components/bn-table/utils/helper/QueryGroup.js +4 -9
  129. package/dist/collection/components/bn-table/utils/helper/WaterfallCalculator.js +166 -0
  130. package/dist/collection/components/bn-table/utils/helper/index.js +2 -0
  131. package/dist/collection/components/bn-table/utils/model/TableAttribute.js +46 -0
  132. package/dist/collection/components/bn-table/utils/model/TableComponentConfig.js +20 -4
  133. package/dist/collection/components/bn-template/bn-template.js +1 -1
  134. package/dist/collection/components/bn-text/bn-text.js +2 -75
  135. package/dist/collection/components/bn-title/bn-title.js +27 -3
  136. package/dist/collection/components/bn-title/ibcs-title/ibcs-title.css +4 -0
  137. package/dist/collection/components/bn-title/ibcs-title/ibcs-title.js +29 -6
  138. package/dist/collection/components/bn-title/ibcs-title/utils/Title.js +3 -0
  139. package/dist/collection/components/editor-companion/editor-companion.js +12 -5
  140. package/dist/collection/context/scopedDb.js +127 -0
  141. package/dist/collection/stores/componentStyles.js +67 -0
  142. package/dist/collection/stores/createScopedStores.js +11 -5
  143. package/dist/collection/stores/internationalization.js +68 -0
  144. package/dist/collection/stores/ruleSets.js +46 -0
  145. package/dist/collection/utils/constants.js +5 -0
  146. package/dist/collection/utils/dataAnalyzer.js +14 -8
  147. package/dist/collection/utils/ibcsRuleSet.js +14 -26
  148. package/dist/collection/utils/layoutObserver.js +88 -0
  149. package/dist/collection/utils/parentDimensions.js +71 -15
  150. package/dist/collection/utils/sanitizeHtml.js +81 -0
  151. package/dist/collection/utils/validate.js +47 -0
  152. package/dist/collection/utils/withBodyObserver.js +12 -7
  153. package/dist/collection/utils/withComponentStyle.js +3 -5
  154. package/dist/collection/utils/withDataset.js +43 -39
  155. package/dist/collection/utils/withDatasource.js +28 -18
  156. package/dist/collection/utils/withInheritedProps.js +26 -1
  157. package/dist/collection/utils/withRuleSet.js +105 -0
  158. package/dist/collection/utils/withScalingGroup.js +69 -0
  159. package/dist/collection/utils/withTranslation.js +50 -14
  160. package/dist/collection/utils/xy/FacetGrid.js +36 -0
  161. package/dist/collection/utils/xy/IsoCurves.js +156 -0
  162. package/dist/collection/utils/xy/NumericScale.js +103 -0
  163. package/dist/collection/utils/xy/PointLabeler.js +96 -0
  164. package/dist/collection/utils/xy/RadiusScale.js +42 -0
  165. package/dist/collection/utils/xy/SeriesPalette.js +80 -0
  166. package/dist/collection/utils/xy/VarianceMeasure.js +76 -0
  167. package/dist/collection/utils/xy/XYFrame.js +120 -0
  168. package/dist/collection/utils/xy/XYLegend.js +107 -0
  169. package/dist/collection/utils/xy/model/AxisConfig.js +221 -0
  170. package/dist/collection/utils/xy/model/ScaleFactorsXYChart.js +69 -0
  171. package/dist/collection/utils/xy/model/XYChartDataRow.js +0 -0
  172. package/dist/collection/utils/xy/model/XYChartStyle.js +52 -0
  173. package/dist/components/AxisConfig.js +1 -0
  174. package/dist/components/CompareUtil.js +1 -0
  175. package/dist/components/DataFormatDigits.js +1 -1
  176. package/dist/components/DateStringFactory.js +1 -1
  177. package/dist/components/LabelCollisionManager.js +1 -0
  178. package/dist/components/NumericScale.js +1 -0
  179. package/dist/components/Order.js +1 -1
  180. package/dist/components/SVGVariancesStyleGroup.js +1 -1
  181. package/dist/components/SiPrefix.js +1 -0
  182. package/dist/components/StringAdapter.js +1 -0
  183. package/dist/components/VarianceMeasure.js +1 -0
  184. package/dist/components/XYChartDataRow.js +1 -0
  185. package/dist/components/bn-body2.js +1 -1
  186. package/dist/components/bn-card2.js +1 -1
  187. package/dist/components/bn-chart-bubble.d.ts +11 -0
  188. package/dist/components/bn-chart-bubble.js +1 -0
  189. package/dist/components/bn-chart-bullet.d.ts +11 -0
  190. package/dist/components/bn-chart-bullet.js +1 -0
  191. package/dist/components/bn-chart-scatter.d.ts +11 -0
  192. package/dist/components/bn-chart-scatter.js +1 -0
  193. package/dist/components/bn-chart-structure.js +1 -1
  194. package/dist/components/bn-chart-time.js +1 -1
  195. package/dist/components/bn-component-style.js +1 -1
  196. package/dist/components/bn-context.js +1 -1
  197. package/dist/components/bn-dataset.js +1 -1
  198. package/dist/components/bn-datasource.js +1 -1
  199. package/dist/components/bn-footer2.js +1 -1
  200. package/dist/components/bn-grid.js +1 -1
  201. package/dist/components/bn-image.js +1 -1
  202. package/dist/components/bn-internationalization.js +1 -1
  203. package/dist/components/bn-layout-card.js +1 -1
  204. package/dist/components/bn-layout-page.js +1 -1
  205. package/dist/components/bn-message2.js +1 -1
  206. package/dist/components/bn-page2.js +1 -1
  207. package/dist/components/bn-ruleset.d.ts +11 -0
  208. package/dist/components/bn-ruleset.js +1 -0
  209. package/dist/components/bn-scaling-group.d.ts +11 -0
  210. package/dist/components/bn-scaling-group.js +1 -0
  211. package/dist/components/bn-table.js +1 -1
  212. package/dist/components/bn-template.js +1 -1
  213. package/dist/components/bn-text.js +1 -1
  214. package/dist/components/bn-title2.js +1 -1
  215. package/dist/components/bn-tree.js +1 -1
  216. package/dist/components/context-protocol.js +1 -1
  217. package/dist/components/editor-companion.js +1 -1
  218. package/dist/components/formatter.js +1 -0
  219. package/dist/components/ibcs-chart-bubble.d.ts +11 -0
  220. package/dist/components/ibcs-chart-bubble.js +1 -0
  221. package/dist/components/ibcs-chart-bubble2.js +1 -0
  222. package/dist/components/ibcs-chart-bullet.d.ts +11 -0
  223. package/dist/components/ibcs-chart-bullet.js +1 -0
  224. package/dist/components/ibcs-chart-bullet2.js +1 -0
  225. package/dist/components/ibcs-chart-scatter.d.ts +11 -0
  226. package/dist/components/ibcs-chart-scatter.js +1 -0
  227. package/dist/components/ibcs-chart-scatter2.js +1 -0
  228. package/dist/components/ibcs-chart-structure2.js +1 -1
  229. package/dist/components/ibcs-chart-time2.js +1 -1
  230. package/dist/components/ibcs-table2.js +1 -1
  231. package/dist/components/ibcs-title2.js +1 -1
  232. package/dist/components/layoutObserver.js +1 -0
  233. package/dist/components/luxon.js +1 -0
  234. package/dist/components/main.js +1 -0
  235. package/dist/components/merge.js +1 -0
  236. package/dist/components/sanitizeHtml.js +1 -0
  237. package/dist/components/stackColors.js +1 -0
  238. package/dist/components/validate.js +1 -1
  239. package/dist/components/withBodyObserver.js +1 -1
  240. package/dist/components/withComponentStyle.js +1 -1
  241. package/dist/components/withDataset.js +1 -0
  242. package/dist/components/withRuleSet.js +1 -0
  243. package/dist/components/withScalingGroup.js +1 -0
  244. package/dist/components/withStyled.js +1 -1
  245. package/dist/components/withTranslation.js +1 -1
  246. package/dist/esm/AxisConfig-C_zWCKlL.js +224 -0
  247. package/dist/esm/LabelCollisionManager-8swVQHKA.js +404 -0
  248. package/dist/esm/NumericScale-DsTzlzxQ.js +105 -0
  249. package/dist/esm/Order-BPeWfygb.js +83 -0
  250. package/dist/esm/SVGStyle-BxEDw9zh.js +8199 -0
  251. package/dist/esm/SVGVariancesStyleGroup-DRQYvSDD.js +48 -0
  252. package/dist/esm/VarianceMeasure-DnwNKspZ.js +364 -0
  253. package/dist/esm/XYChartDataRow-DeV4r-Wm.js +820 -0
  254. package/dist/esm/bn-asset_21.entry.js +16025 -0
  255. package/dist/esm/bn-chart-bubble.entry.js +760 -0
  256. package/dist/esm/bn-chart-bullet.entry.js +783 -0
  257. package/dist/esm/bn-chart-scatter.entry.js +656 -0
  258. package/dist/esm/bn-grid.entry.js +5 -3
  259. package/dist/esm/bn-image.entry.js +5 -3
  260. package/dist/esm/bn-internationalization.entry.js +10 -8
  261. package/dist/esm/bn-ruleset.entry.js +39 -0
  262. package/dist/esm/bn-template-engine.js +1 -1
  263. package/dist/esm/bn-template.entry.js +1 -1
  264. package/dist/esm/bn-text.entry.js +7 -78
  265. package/dist/esm/bn-tree.entry.js +4 -2
  266. package/dist/esm/context-protocol-1Yj1uKvh.js +9484 -0
  267. package/dist/esm/editor-companion.entry.js +13 -6
  268. package/dist/esm/ibcs-chart-bubble.entry.js +622 -0
  269. package/dist/esm/ibcs-chart-bullet.entry.js +671 -0
  270. package/dist/esm/ibcs-chart-scatter.entry.js +665 -0
  271. package/dist/esm/layoutObserver-BG5dOBYH.js +196 -0
  272. package/dist/esm/loader.js +1 -1
  273. package/dist/esm/sanitizeHtml-BA48JiHe.js +83 -0
  274. package/dist/esm/scaling-CeSRcRl1.js +579 -0
  275. package/dist/esm/{withBodyObserver-AFk2wwHT.js → withBodyObserver-IokS6fHD.js} +12 -7
  276. package/dist/esm/withScalingGroup-Br70pAv9.js +71 -0
  277. package/dist/esm/withStyled-Br2DGTPs.js +1104 -0
  278. package/dist/types/components/bn-chart-bubble/bn-chart-bubble.d.ts +193 -0
  279. package/dist/types/components/bn-chart-bubble/ibcs-chart-bubble.d.ts +58 -0
  280. package/dist/types/components/bn-chart-bubble/utils/BubbleChart.d.ts +91 -0
  281. package/dist/types/components/bn-chart-bullet/bn-chart-bullet.d.ts +172 -0
  282. package/dist/types/components/bn-chart-bullet/ibcs-chart-bullet.d.ts +52 -0
  283. package/dist/types/components/bn-chart-bullet/utils/BulletChart.d.ts +91 -0
  284. package/dist/types/components/bn-chart-bullet/utils/model/BulletChartStyle.d.ts +70 -0
  285. package/dist/types/components/bn-chart-bullet/utils/model/BulletConfig.d.ts +43 -0
  286. package/dist/types/components/bn-chart-bullet/utils/model/index.d.ts +2 -0
  287. package/dist/types/components/bn-chart-scatter/bn-chart-scatter.d.ts +172 -0
  288. package/dist/types/components/bn-chart-scatter/ibcs-chart-scatter.d.ts +53 -0
  289. package/dist/types/components/bn-chart-scatter/utils/ScatterChart.d.ts +66 -0
  290. package/dist/types/components/bn-chart-structure/bn-chart-structure.d.ts +19 -5
  291. package/dist/types/components/bn-chart-structure/ibcs-chart-structure.d.ts +13 -6
  292. package/dist/types/components/bn-chart-structure/utils/StructureChart.d.ts +16 -12
  293. package/dist/types/components/bn-chart-structure/utils/helper/ElementPositions.d.ts +16 -1
  294. package/dist/types/components/bn-chart-structure/utils/model/StructureChartComponentConfig.d.ts +5 -3
  295. package/dist/types/components/bn-chart-time/bn-chart-time.d.ts +53 -13
  296. package/dist/types/components/bn-chart-time/ibcs-chart-time.d.ts +13 -6
  297. package/dist/types/components/bn-chart-time/utils/TimeChart.d.ts +16 -12
  298. package/dist/types/components/bn-chart-time/utils/model/TimeChartComponentConfig.d.ts +5 -3
  299. package/dist/types/components/bn-dataset/bn-dataset.d.ts +47 -5
  300. package/dist/types/components/bn-datasource/bn-datasource.d.ts +53 -6
  301. package/dist/types/components/bn-layout-card/bn-layout-card.d.ts +35 -8
  302. package/dist/types/components/bn-layout-page/bn-layout-page.d.ts +32 -1
  303. package/dist/types/components/bn-message/bn-message.d.ts +5 -2
  304. package/dist/types/components/bn-ruleset/bn-ruleset.d.ts +8 -0
  305. package/dist/types/components/bn-scaling-group/bn-scaling-group.d.ts +37 -0
  306. package/dist/types/components/bn-table/bn-table.d.ts +74 -12
  307. package/dist/types/components/bn-table/ibcs-table.d.ts +27 -4
  308. package/dist/types/components/bn-table/utils/Table.d.ts +16 -6
  309. package/dist/types/components/bn-table/utils/elements/Cell.d.ts +2 -0
  310. package/dist/types/components/bn-table/utils/elements/CellBarChart.d.ts +33 -0
  311. package/dist/types/components/bn-table/utils/elements/TableRow.d.ts +2 -1
  312. package/dist/types/components/bn-table/utils/elements/WaterfallBar.d.ts +21 -0
  313. package/dist/types/components/bn-table/utils/elements/index.d.ts +1 -0
  314. package/dist/types/components/bn-table/utils/factories/tableDataSetFactory.d.ts +17 -9
  315. package/dist/types/components/bn-table/utils/helper/DataQuery.d.ts +35 -3
  316. package/dist/types/components/bn-table/utils/helper/IntervalColumns.d.ts +37 -0
  317. package/dist/types/components/bn-table/utils/helper/QueryGroup.d.ts +4 -5
  318. package/dist/types/components/bn-table/utils/helper/WaterfallCalculator.d.ts +55 -0
  319. package/dist/types/components/bn-table/utils/helper/index.d.ts +2 -0
  320. package/dist/types/components/bn-table/utils/model/TableAttribute.d.ts +22 -0
  321. package/dist/types/components/bn-table/utils/model/TableComponentConfig.d.ts +12 -3
  322. package/dist/types/components/bn-table/utils/model/index.d.ts +21 -0
  323. package/dist/types/components/bn-title/bn-title.d.ts +11 -1
  324. package/dist/types/components/bn-title/ibcs-title/ibcs-title.d.ts +2 -0
  325. package/dist/types/components/bn-title/ibcs-title/utils/Title.d.ts +1 -0
  326. package/dist/types/components/editor-companion/editor-companion.d.ts +2 -0
  327. package/dist/types/components.d.ts +1691 -120
  328. package/dist/types/context/context-protocol.d.ts +7 -3
  329. package/dist/types/context/scopedDb.d.ts +37 -0
  330. package/dist/types/stores/componentStyles.d.ts +41 -0
  331. package/dist/types/stores/createScopedStores.d.ts +4 -2
  332. package/dist/types/stores/ruleSets.d.ts +40 -0
  333. package/dist/types/utils/DateStringFactory.d.ts +1 -1
  334. package/dist/types/utils/constants.d.ts +5 -0
  335. package/dist/types/utils/dataAnalyzer.d.ts +2 -1
  336. package/dist/types/utils/ibcsRuleSet.d.ts +6 -1
  337. package/dist/types/utils/layoutObserver.d.ts +27 -0
  338. package/dist/types/utils/model/ChartStyles.d.ts +2 -1
  339. package/dist/types/utils/parentDimensions.d.ts +1 -1
  340. package/dist/types/utils/sanitizeHtml.d.ts +6 -0
  341. package/dist/types/utils/validate.d.ts +18 -0
  342. package/dist/types/utils/withDataset.d.ts +6 -2
  343. package/dist/types/utils/withDatasource.d.ts +3 -3
  344. package/dist/types/utils/withInheritedProps.d.ts +19 -0
  345. package/dist/types/utils/withRuleSet.d.ts +24 -0
  346. package/dist/types/utils/withScalingGroup.d.ts +14 -0
  347. package/dist/types/utils/withTranslation.d.ts +12 -4
  348. package/dist/types/utils/xy/FacetGrid.d.ts +27 -0
  349. package/dist/types/utils/xy/IsoCurves.d.ts +46 -0
  350. package/dist/types/utils/xy/NumericScale.d.ts +41 -0
  351. package/dist/types/utils/xy/PointLabeler.d.ts +58 -0
  352. package/dist/types/utils/xy/RadiusScale.d.ts +26 -0
  353. package/dist/types/utils/xy/SeriesPalette.d.ts +59 -0
  354. package/dist/types/utils/xy/VarianceMeasure.d.ts +37 -0
  355. package/dist/types/utils/xy/XYFrame.d.ts +44 -0
  356. package/dist/types/utils/xy/XYLegend.d.ts +43 -0
  357. package/dist/types/utils/xy/model/AxisConfig.d.ts +96 -0
  358. package/dist/types/utils/xy/model/ScaleFactorsXYChart.d.ts +36 -0
  359. package/dist/types/utils/xy/model/XYChartDataRow.d.ts +157 -0
  360. package/dist/types/utils/xy/model/XYChartStyle.d.ts +31 -0
  361. package/package.json +5 -4
  362. package/readme.md +9 -5
  363. package/dist/bn-template-engine/p-3141c4a2.entry.js +0 -1
  364. package/dist/bn-template-engine/p-67538176.entry.js +0 -1
  365. package/dist/bn-template-engine/p-916296a5.entry.js +0 -1
  366. package/dist/bn-template-engine/p-96006b06.entry.js +0 -1
  367. package/dist/bn-template-engine/p-Ck-NYtot.js +0 -1
  368. package/dist/bn-template-engine/p-CnDq0oVa.js +0 -1
  369. package/dist/bn-template-engine/p-DSXNgKLa.js +0 -1
  370. package/dist/bn-template-engine/p-bc711fb0.entry.js +0 -1
  371. package/dist/bn-template-engine/p-c86395b8.entry.js +0 -1
  372. package/dist/bn-template-engine/p-e6f646b1.entry.js +0 -1
  373. package/dist/bn-template-engine/p-f41d9242.entry.js +0 -1
  374. package/dist/bn-template-engine/p-gFbbuhtl.js +0 -1
  375. package/dist/cjs/bn-asset_20.cjs.entry.js +0 -23547
  376. package/dist/cjs/context-protocol-ohYzcb5F.js +0 -663
  377. package/dist/cjs/scaling-CIAClQR5.js +0 -314
  378. package/dist/cjs/withStyled-qd94SSb4.js +0 -9535
  379. package/dist/collection/stores/datasets.js +0 -14
  380. package/dist/collection/stores/datasources.js +0 -14
  381. package/dist/components/_commonjsHelpers.js +0 -1
  382. package/dist/components/alasql.min.js +0 -1
  383. package/dist/components/ibcsRuleSet.js +0 -1
  384. package/dist/components/scaling.js +0 -1
  385. package/dist/components/withInheritedProps.js +0 -1
  386. package/dist/esm/bn-asset_20.entry.js +0 -23526
  387. package/dist/esm/context-protocol-DdbSplvE.js +0 -656
  388. package/dist/esm/scaling-DGKKkuL9.js +0 -309
  389. package/dist/esm/withStyled-BIkqU2w4.js +0 -9501
  390. package/dist/types/stores/datasets.d.ts +0 -14
  391. package/dist/types/stores/datasources.d.ts +0 -14
@@ -3,7 +3,6 @@ import withDatasource from "../../utils/withDatasource";
3
3
  import withBodyObserver from "../../utils/withBodyObserver";
4
4
  import { getStores } from "../../context/context-protocol";
5
5
  import { calculateDatasetMeta } from "../../utils/datasetMetaCalculator";
6
- import alasql from "alasql";
7
6
  import withComponentStatus from "../../utils/withComponentStatus";
8
7
  import withHasError from "../../utils/withHasError";
9
8
  import { computeContentHash, decodeCompressedContent } from "../../utils/contentDecoder";
@@ -11,10 +10,14 @@ import { computeContentHash, decodeCompressedContent } from "../../utils/content
11
10
  * Queries data from one or more `bn-datasource` entries via AlaSQL and
12
11
  * writes the result to the `datasets` store (+ computed `DatasetMeta`).
13
12
  *
14
- * The SQL query is provided as text inside the element body (observed via
15
- * `withBodyObserver`). When any referenced datasource changes, the query
16
- * is re-executed automatically. Set `static="true"` to bypass the SQL
17
- * engine and treat the body content as raw JSON data directly.
13
+ * The body content is observed via `withBodyObserver` and may be:
14
+ * 1. **SQL** (default) — AlaSQL query against referenced `datasources`.
15
+ * 2. **Static JSON** — set `static="true"` to bypass SQL and write the
16
+ * parsed body directly to the `datasets` store.
17
+ * 3. **URL** — place an `http://`/`https://` URL or a same-origin path
18
+ * starting with `/` in the body to fetch JSON from an HTTP endpoint and
19
+ * write it to the `datasets` store. Set the `interval` prop (in seconds)
20
+ * to enable periodic re-fetching.
18
21
  */
19
22
  export class Dataset {
20
23
  constructor() {
@@ -36,16 +39,45 @@ export class Dataset {
36
39
  * When false, body content is a compressed payload (`<hash>:<base64_gzip>`).
37
40
  */
38
41
  this.raw = true;
42
+ /**
43
+ * Polling interval in **seconds** for URL mode.
44
+ * When set and the body content is a URL, the component re-fetches
45
+ * data at this interval. Has no effect for SQL, inline JSON or
46
+ * compressed content. Set to `0` or leave unset to disable polling.
47
+ */
48
+ this.interval = 0;
39
49
  this.lastBodyHash = null;
50
+ /** The query text last used to (re)create the SQL view, so we only `CREATE VIEW` when it actually changes. */
51
+ this.lastViewQuery = null;
52
+ /** The currently active URL (`null` when not in URL mode). */
53
+ this.currentUrl = null;
54
+ /** Timer ID for the polling interval. */
55
+ this.pollTimerId = null;
56
+ /** AbortController for cancelling in-flight fetch requests. */
57
+ this.abortController = null;
40
58
  withComponentStatus(this);
41
59
  this.errors = withHasError(this);
42
- // @ts-ignore
43
- this.database = new alasql.Database();
44
- withDatasource(this, (name, data) => {
45
- this.database.tables[name] = { data };
60
+ // Datasources already live in the shared db; just re-execute when any upstream notifies.
61
+ withDatasource(this, () => {
46
62
  this.executeQuery();
47
63
  });
48
64
  withBodyObserver(this, (data) => {
65
+ const trimmed = data.trim();
66
+ // --- URL mode ---
67
+ if (this.isUrl(trimmed)) {
68
+ if (trimmed === this.currentUrl)
69
+ return;
70
+ this.currentUrl = trimmed;
71
+ this.lastBodyHash = null;
72
+ this.fetchAndStore(trimmed);
73
+ this.startPolling();
74
+ return;
75
+ }
76
+ // --- Leaving URL mode → clean up ---
77
+ if (this.currentUrl !== null) {
78
+ this.cancelInFlight();
79
+ this.currentUrl = null;
80
+ }
49
81
  let contentHash;
50
82
  let body;
51
83
  if (!this.raw && this.static) {
@@ -73,34 +105,182 @@ export class Dataset {
73
105
  executeQuery() {
74
106
  if (!this.stores)
75
107
  this.stores = getStores(this.element);
76
- if (!!this.query && !!this.name) {
77
- let result;
78
- if (this.static) {
108
+ if (!this.query || !this.name)
109
+ return;
110
+ const db = this.stores.db.db;
111
+ let result;
112
+ if (this.static) {
113
+ // Static JSON: parse and register as a table in the shared db.
114
+ try {
115
+ result = JSON.parse(this.query);
116
+ }
117
+ catch (e) {
118
+ console.error("Failed to parse static dataset", e);
119
+ result = [];
120
+ }
121
+ db.tables[this.name] = { data: Array.isArray(result) ? result : [] };
122
+ this.lastViewQuery = null;
123
+ }
124
+ else {
125
+ // SQL: register the dataset as a view in the shared db. Recreate only when the
126
+ // query text changes; otherwise we just re-materialize so upstream data updates
127
+ // flow through.
128
+ if (this.lastViewQuery !== this.query) {
129
+ // alasql tracks names in BOTH `db.tables` and `db.views`, and its
130
+ // CREATE-conflict check looks at `db.tables`. Clean both locations
131
+ // before creating so devtools "Edit as HTML" (which destroys the old
132
+ // element and creates a new one without giving us a clean slate)
133
+ // doesn't trip the "already exists" guard.
134
+ try {
135
+ db.exec(`DROP VIEW \`${this.name}\``);
136
+ }
137
+ catch (_e) {
138
+ /* not registered as a view — fine */
139
+ }
140
+ if (db.tables[this.name] != null) {
141
+ delete db.tables[this.name];
142
+ }
143
+ // @ts-ignore - views typing is loose
144
+ if (db.views && db.views[this.name] != null) {
145
+ // @ts-ignore
146
+ delete db.views[this.name];
147
+ }
79
148
  try {
80
- result = JSON.parse(this.query);
149
+ db.exec(`CREATE VIEW \`${this.name}\` AS ${this.query}`);
150
+ this.lastViewQuery = this.query;
81
151
  }
82
152
  catch (e) {
83
- console.error("Failed to parse static dataset", e);
153
+ console.error("bn-dataset: failed to register SQL view", e, this.query);
154
+ this.lastViewQuery = null;
84
155
  result = [];
156
+ this.publish(result);
157
+ return;
85
158
  }
86
159
  }
87
- else {
88
- result = this.database.exec(this.query);
160
+ try {
161
+ result = db.exec(`SELECT * FROM \`${this.name}\``);
89
162
  }
90
- if (this.latestResult !== result) {
91
- this.latestResult = result;
92
- // @ts-ignore
93
- this.stores.datasets.set(this.name, result);
94
- // @ts-ignore
95
- this.stores.datasetsMeta.set(this.name, calculateDatasetMeta(result));
163
+ catch (_e) {
164
+ // Most common cause: an upstream datasource referenced by the view hasn't
165
+ // been registered yet (HTML parse/connectedCallback race). `withDatasource`
166
+ // re-fires executeQuery on every upstream notify, so we'll retry then.
167
+ // Skip publish so we don't clobber datasetsMeta with empty data.
168
+ return;
96
169
  }
97
170
  }
171
+ this.publish(result);
172
+ }
173
+ /** Notifies db subscribers and updates the derived `datasetsMeta` store. */
174
+ publish(result) {
175
+ if (this.latestResult === result) {
176
+ // Even if the materialized object reference is unchanged, upstream data may have moved
177
+ // (notably for views) — fire notify so consumers re-render against the fresh table state.
178
+ this.stores.db.notify(this.name);
179
+ return;
180
+ }
181
+ this.latestResult = result;
182
+ this.stores.db.notify(this.name);
183
+ // @ts-ignore - DatasetMeta is small derived metadata; kept as a @stencil/store per the plan.
184
+ this.stores.datasetsMeta.set(this.name, calculateDatasetMeta(result));
98
185
  }
99
186
  nameUpdated() {
100
187
  this.executeQuery();
101
188
  }
189
+ onIntervalChange() {
190
+ if (this.currentUrl) {
191
+ this.startPolling();
192
+ }
193
+ }
194
+ disconnectedCallback() {
195
+ var _a, _b;
196
+ this.cancelInFlight();
197
+ if (((_b = (_a = this.stores) === null || _a === void 0 ? void 0 : _a.db) === null || _b === void 0 ? void 0 : _b.db) && this.name) {
198
+ const db = this.stores.db.db;
199
+ try {
200
+ db.exec(`DROP VIEW \`${this.name}\``);
201
+ }
202
+ catch (_e) {
203
+ // not registered as a view — fine
204
+ }
205
+ if (db.tables[this.name] != null) {
206
+ delete db.tables[this.name];
207
+ }
208
+ // @ts-ignore - views typing is loose
209
+ if (db.views && db.views[this.name] != null) {
210
+ // @ts-ignore
211
+ delete db.views[this.name];
212
+ }
213
+ this.stores.db.notify(this.name);
214
+ }
215
+ }
216
+ /**
217
+ * Returns `true` if the text is a fetchable URL: an absolute `http(s)://`
218
+ * URL, or a same-origin path starting with `/` (but not `//`, which is a
219
+ * protocol-relative URL we treat as inline-mode escape).
220
+ */
221
+ isUrl(text) {
222
+ if (text.startsWith("http://") || text.startsWith("https://"))
223
+ return true;
224
+ return text.startsWith("/") && !text.startsWith("//");
225
+ }
226
+ /**
227
+ * Fetches JSON from the given URL and stores the result as the dataset.
228
+ * Cancels any in-flight request before starting a new one.
229
+ */
230
+ async fetchAndStore(url) {
231
+ var _a;
232
+ (_a = this.abortController) === null || _a === void 0 ? void 0 : _a.abort();
233
+ this.abortController = new AbortController();
234
+ if (!this.stores)
235
+ this.stores = getStores(this.element);
236
+ try {
237
+ const response = await fetch(url, { signal: this.abortController.signal });
238
+ const json = await response.json();
239
+ const db = this.stores.db.db;
240
+ db.tables[this.name] = { data: Array.isArray(json) ? json : [] };
241
+ this.lastViewQuery = null;
242
+ this.publish(json);
243
+ }
244
+ catch (e) {
245
+ if (e instanceof DOMException && e.name === "AbortError")
246
+ return;
247
+ console.error("bn-dataset: error fetching URL", e, url);
248
+ const db = this.stores.db.db;
249
+ db.tables[this.name] = { data: [] };
250
+ this.lastViewQuery = null;
251
+ this.publish([]);
252
+ }
253
+ }
254
+ /** Stops the polling timer (does NOT touch any in-flight fetch). */
255
+ clearPollTimer() {
256
+ if (this.pollTimerId !== null) {
257
+ clearInterval(this.pollTimerId);
258
+ this.pollTimerId = null;
259
+ }
260
+ }
261
+ /** Stops the polling timer AND cancels any in-flight fetch. Use only when
262
+ * leaving URL mode entirely (disconnect or body changed to inline). */
263
+ cancelInFlight() {
264
+ var _a;
265
+ this.clearPollTimer();
266
+ (_a = this.abortController) === null || _a === void 0 ? void 0 : _a.abort();
267
+ this.abortController = null;
268
+ }
269
+ /** Starts (or restarts) the polling timer if in URL mode with a positive
270
+ * interval. Does NOT abort the kick-off fetch issued by the caller — it
271
+ * only resets the interval timer. */
272
+ startPolling() {
273
+ this.clearPollTimer();
274
+ if (this.currentUrl && this.interval > 0) {
275
+ this.pollTimerId = setInterval(() => {
276
+ if (this.currentUrl) {
277
+ this.fetchAndStore(this.currentUrl);
278
+ }
279
+ }, this.interval * 1000);
280
+ }
281
+ }
102
282
  render() {
103
- return h(Host, { key: '3e8b6fbc52b5b5cbe0ae88d7aa1d259f86d63e1b' });
283
+ return h(Host, { key: 'bfa62b924abb8097cd9bad75eb71ab38caf02267' });
104
284
  }
105
285
  static get is() { return "bn-dataset"; }
106
286
  static get originalStyleUrls() {
@@ -193,6 +373,26 @@ export class Dataset {
193
373
  "reflect": false,
194
374
  "attribute": "raw",
195
375
  "defaultValue": "true"
376
+ },
377
+ "interval": {
378
+ "type": "number",
379
+ "mutable": false,
380
+ "complexType": {
381
+ "original": "number",
382
+ "resolved": "number",
383
+ "references": {}
384
+ },
385
+ "required": false,
386
+ "optional": false,
387
+ "docs": {
388
+ "tags": [],
389
+ "text": "Polling interval in **seconds** for URL mode.\nWhen set and the body content is a URL, the component re-fetches\ndata at this interval. Has no effect for SQL, inline JSON or\ncompressed content. Set to `0` or leave unset to disable polling."
390
+ },
391
+ "getter": false,
392
+ "setter": false,
393
+ "reflect": false,
394
+ "attribute": "interval",
395
+ "defaultValue": "0"
196
396
  }
197
397
  };
198
398
  }
@@ -201,6 +401,9 @@ export class Dataset {
201
401
  return [{
202
402
  "propName": "name",
203
403
  "methodName": "nameUpdated"
404
+ }, {
405
+ "propName": "interval",
406
+ "methodName": "onIntervalChange"
204
407
  }];
205
408
  }
206
409
  }
@@ -5,27 +5,64 @@ import withComponentStatus from "../../utils/withComponentStatus";
5
5
  import withHasError from "../../utils/withHasError";
6
6
  import { computeContentHash, decodeCompressedContent } from "../../utils/contentDecoder";
7
7
  /**
8
- * Ingests raw JSON data and writes it to the scoped `datasources` store.
8
+ * Ingests data and writes it to the scoped `datasources` store.
9
9
  *
10
- * Data is provided as JSON text inside the element body (observed via
11
- * `withBodyObserver`). Other components (e.g. `bn-dataset`) reference
12
- * the stored data by the `name` prop to run queries against it.
10
+ * Data can be provided in three ways:
11
+ * 1. **Inline JSON** — Place JSON text inside the element body (default).
12
+ * 2. **Compressed payload** — Set `raw="false"` and provide `<hash>:<base64_gzip>` format.
13
+ * 3. **URL** — Place an `http://`/`https://` URL or a same-origin path
14
+ * starting with `/` in the body to fetch JSON from an HTTP endpoint.
13
15
  *
14
- * Set `raw="false"` to accept pre-compressed payloads in `<hash>:<base64_gzip>` format.
16
+ * In URL mode the component fetches JSON from the URL. Set the `interval`
17
+ * prop (in seconds) to enable periodic re-fetching (polling).
18
+ *
19
+ * Other components (e.g. `bn-dataset`) reference the stored data by the
20
+ * `name` prop to run queries against it.
15
21
  */
16
22
  export class Datasource {
17
23
  constructor() {
18
24
  /**
19
25
  * When true (default), body content is plain JSON text.
20
26
  * When false, body content is a compressed payload (`<hash>:<base64_gzip>`).
27
+ * Ignored in URL mode.
21
28
  */
22
29
  this.raw = true;
30
+ /**
31
+ * Polling interval in **seconds** for URL mode.
32
+ * When set and the body content is a URL, the component re-fetches
33
+ * data at this interval. Has no effect for inline JSON or compressed content.
34
+ * Set to `0` or leave unset to disable polling.
35
+ */
36
+ this.interval = 0;
23
37
  this.lastHash = null;
38
+ /** The currently active URL (`null` when in inline-JSON mode). */
39
+ this.currentUrl = null;
40
+ /** Timer ID for the polling interval. */
41
+ this.pollTimerId = null;
42
+ /** AbortController for cancelling in-flight fetch requests. */
43
+ this.abortController = null;
24
44
  withComponentStatus(this);
25
45
  this.errors = withHasError(this);
26
46
  withBodyObserver(this, (data) => {
27
47
  if (!this.stores)
28
48
  this.stores = getStores(this.element);
49
+ const trimmed = data.trim();
50
+ // --- URL mode ---
51
+ if (this.isUrl(trimmed)) {
52
+ if (trimmed === this.currentUrl)
53
+ return;
54
+ this.currentUrl = trimmed;
55
+ this.lastHash = null;
56
+ this.fetchAndStore(trimmed);
57
+ this.startPolling();
58
+ return;
59
+ }
60
+ // --- Leaving URL mode → clean up ---
61
+ if (this.currentUrl !== null) {
62
+ this.cancelInFlight();
63
+ this.currentUrl = null;
64
+ }
65
+ // --- Inline JSON / compressed mode ---
29
66
  try {
30
67
  let contentHash;
31
68
  let jsonString;
@@ -42,18 +79,106 @@ export class Datasource {
42
79
  return;
43
80
  this.lastHash = contentHash;
44
81
  const json = JSON.parse(jsonString);
45
- // @ts-ignore
46
- this.stores.datasources.set(this.name, json);
82
+ this.publish(json);
47
83
  }
48
84
  catch (e) {
49
85
  console.error("Error parsing datasource", e, String(data).slice(0, 200));
50
- // @ts-ignore
51
- this.stores.datasources.set(this.name, []);
86
+ this.publish([]);
52
87
  }
53
88
  });
54
89
  }
90
+ /**
91
+ * Writes the parsed data into the shared alasql database (as a table named
92
+ * after this datasource) and notifies subscribers.
93
+ */
94
+ publish(json) {
95
+ const db = this.stores.db.db;
96
+ db.tables[this.name] = { data: Array.isArray(json) ? json : [] };
97
+ this.stores.db.notify(this.name);
98
+ }
99
+ onIntervalChange() {
100
+ if (this.currentUrl) {
101
+ this.startPolling();
102
+ }
103
+ }
104
+ disconnectedCallback() {
105
+ var _a, _b;
106
+ this.cancelInFlight();
107
+ const db = (_b = (_a = this.stores) === null || _a === void 0 ? void 0 : _a.db) === null || _b === void 0 ? void 0 : _b.db;
108
+ if (db && this.name) {
109
+ if (db.tables[this.name] != null) {
110
+ delete db.tables[this.name];
111
+ }
112
+ // @ts-ignore - views typing is loose
113
+ if (db.views && db.views[this.name] != null) {
114
+ // @ts-ignore
115
+ delete db.views[this.name];
116
+ }
117
+ this.stores.db.notify(this.name);
118
+ }
119
+ }
120
+ /**
121
+ * Returns `true` if the text is a fetchable URL: an absolute `http(s)://`
122
+ * URL, or a same-origin path starting with `/` (but not `//`, which is a
123
+ * protocol-relative URL we treat as inline-mode escape).
124
+ */
125
+ isUrl(text) {
126
+ if (text.startsWith("http://") || text.startsWith("https://"))
127
+ return true;
128
+ return text.startsWith("/") && !text.startsWith("//");
129
+ }
130
+ /**
131
+ * Fetches JSON from the given URL and stores the result.
132
+ * Cancels any in-flight request before starting a new one.
133
+ */
134
+ async fetchAndStore(url) {
135
+ var _a;
136
+ (_a = this.abortController) === null || _a === void 0 ? void 0 : _a.abort();
137
+ this.abortController = new AbortController();
138
+ if (!this.stores)
139
+ this.stores = getStores(this.element);
140
+ try {
141
+ const response = await fetch(url, { signal: this.abortController.signal });
142
+ const json = await response.json();
143
+ this.publish(json);
144
+ }
145
+ catch (e) {
146
+ if (e instanceof DOMException && e.name === "AbortError")
147
+ return;
148
+ console.error("bn-datasource: error fetching URL", e, url);
149
+ this.publish([]);
150
+ }
151
+ }
152
+ /** Stops the polling timer (does NOT touch any in-flight fetch). */
153
+ clearPollTimer() {
154
+ if (this.pollTimerId !== null) {
155
+ clearInterval(this.pollTimerId);
156
+ this.pollTimerId = null;
157
+ }
158
+ }
159
+ /** Stops the polling timer AND cancels any in-flight fetch. Use only when
160
+ * leaving URL mode entirely (disconnect or body changed to inline). */
161
+ cancelInFlight() {
162
+ var _a;
163
+ this.clearPollTimer();
164
+ (_a = this.abortController) === null || _a === void 0 ? void 0 : _a.abort();
165
+ this.abortController = null;
166
+ }
167
+ /** Starts (or restarts) the polling timer if in URL mode with a positive
168
+ * interval. Does NOT abort the kick-off fetch issued by the caller — it
169
+ * only resets the interval timer. */
170
+ startPolling() {
171
+ this.clearPollTimer();
172
+ if (this.currentUrl && this.interval > 0) {
173
+ this.pollTimerId = setInterval(() => {
174
+ if (this.currentUrl) {
175
+ this.fetchAndStore(this.currentUrl);
176
+ }
177
+ }, this.interval * 1000);
178
+ }
179
+ }
55
180
  render() {
56
- return h(Host, { key: '43b691b07f63d12ad6c835dfb5d5bf6053b3bbf4' });
181
+ return h(Host, { key: '4beaa62937dea949255669bfd5008a2928e460fc' });
57
182
  }
58
183
  static get is() { return "bn-datasource"; }
59
184
  static get originalStyleUrls() {
@@ -80,7 +205,7 @@ export class Datasource {
80
205
  "optional": false,
81
206
  "docs": {
82
207
  "tags": [],
83
- "text": "Unique (template scope) name of the datasource"
208
+ "text": "Unique (template scope) name of the datasource."
84
209
  },
85
210
  "getter": false,
86
211
  "setter": false,
@@ -99,15 +224,41 @@ export class Datasource {
99
224
  "optional": false,
100
225
  "docs": {
101
226
  "tags": [],
102
- "text": "When true (default), body content is plain JSON text.\nWhen false, body content is a compressed payload (`<hash>:<base64_gzip>`)."
227
+ "text": "When true (default), body content is plain JSON text.\nWhen false, body content is a compressed payload (`<hash>:<base64_gzip>`).\nIgnored in URL mode."
103
228
  },
104
229
  "getter": false,
105
230
  "setter": false,
106
231
  "reflect": false,
107
232
  "attribute": "raw",
108
233
  "defaultValue": "true"
234
+ },
235
+ "interval": {
236
+ "type": "number",
237
+ "mutable": false,
238
+ "complexType": {
239
+ "original": "number",
240
+ "resolved": "number",
241
+ "references": {}
242
+ },
243
+ "required": false,
244
+ "optional": false,
245
+ "docs": {
246
+ "tags": [],
247
+ "text": "Polling interval in **seconds** for URL mode.\nWhen set and the body content is a URL, the component re-fetches\ndata at this interval. Has no effect for inline JSON or compressed content.\nSet to `0` or leave unset to disable polling."
248
+ },
249
+ "getter": false,
250
+ "setter": false,
251
+ "reflect": false,
252
+ "attribute": "interval",
253
+ "defaultValue": "0"
109
254
  }
110
255
  };
111
256
  }
112
257
  static get elementRef() { return "element"; }
258
+ static get watchers() {
259
+ return [{
260
+ "propName": "interval",
261
+ "methodName": "onIntervalChange"
262
+ }];
263
+ }
113
264
  }
@@ -45,7 +45,7 @@ export class Footer {
45
45
  return `./assets/${imgUrl}.png`;
46
46
  }
47
47
  render() {
48
- return (h(Host, { key: 'c445ca8c8abde56b46564932a6fcd079aa1e640d', id: this.displayPageNumber || this.text || this.code ? "container-page-footer" : "container", style: this.getFontStyles() }, h("div", { key: '2e5829597d228c78acbbbf130bfc440092456cb4', id: "footer-text" }, this.text != null ? h("span", { class: "note" }, this.text) : ""), h("div", { key: 'a2c98bf85fc41fa0aebc35fded0528cd8ba4948f', id: "code" }, this.code != null ? h("img", { class: "image", src: getAssetPath(`${this.prepareAssetUrl(this.code)}`) }) : ""), h("div", { key: 'e879c6ed16996d8b505d64426e2253f3057863f5', id: "page-number" }, this.displayPageNumber ? h("span", { class: "page" }, this.pageNumber) : "")));
48
+ return (h(Host, { key: '666fa787056f32825c15427f2a6c15b971fbc25e', id: this.displayPageNumber || this.text || this.code ? "container-page-footer" : "container", style: this.getFontStyles() }, h("div", { key: '691752d51748c4e1eb7ec25d380c00ddf0095c83', id: "footer-text" }, this.text != null ? h("span", { class: "note" }, this.text) : ""), h("div", { key: '561a81e063e110ef6386fb0056a05f1b6a0e0f44', id: "code" }, this.code != null ? h("img", { class: "image", src: getAssetPath(`${this.prepareAssetUrl(this.code)}`) }) : ""), h("div", { key: '963658fcff1a6dd07b448f85e8d170000422e3cc', id: "page-number" }, this.displayPageNumber ? h("span", { class: "page" }, this.pageNumber) : "")));
49
49
  }
50
50
  static get is() { return "bn-footer"; }
51
51
  static get encapsulation() { return "shadow"; }
@@ -262,7 +262,7 @@ export class Grid {
262
262
  "grid-template-rows": this.getGridTemplateRows(),
263
263
  gap: this.cellGap,
264
264
  };
265
- return (h(Host, { key: 'e84402bafd778e7069cd17bd86687a6648dbafe0', style: this.getFontStyles() }, h("div", { key: '91941a42bc41fbbaf53c66551035bf97765a9f88', class: "grid-container", style: gridContainerStyle }, this.renderTitle(), this.renderColumnHeaders(), this.renderDataCells()), h("slot", { key: '349958090f4bf35b9ec768c8994bdf5a96636a36' })));
265
+ return (h(Host, { key: '05d4b729414b87446a98ea2f98552e8c17e3f4e1', style: this.getFontStyles() }, h("div", { key: 'dd2325babb734553c8661e2e18c0ab12f59e0c9f', class: "grid-container", style: gridContainerStyle }, this.renderTitle(), this.renderColumnHeaders(), this.renderDataCells()), h("slot", { key: '30cab0c8effc88704e781ff48e9295aa3cc9c954' })));
266
266
  }
267
267
  static get is() { return "bn-grid"; }
268
268
  static get encapsulation() { return "shadow"; }
@@ -37,7 +37,7 @@ export class Image {
37
37
  return assetsState[value] || value;
38
38
  }
39
39
  render() {
40
- return (h(Host, { key: '656f301d5fb1a7650f4c7d0cbb3fe1ef15b8ae92', style: this.getFontStyles() }, this.source != null && this.source !== "" ? h("img", { src: this.prepareAssetUrl(this.source) }) : ""));
40
+ return (h(Host, { key: 'cfa7e1b2978773f449f6596174edf51e4a61d4d7', style: this.getFontStyles() }, this.source != null && this.source !== "" ? h("img", { src: this.prepareAssetUrl(this.source) }) : ""));
41
41
  }
42
42
  static get is() { return "bn-image"; }
43
43
  static get encapsulation() { return "shadow"; }
@@ -6,6 +6,7 @@ import withComponentStatus from "../../utils/withComponentStatus";
6
6
  import withHasError from "../../utils/withHasError";
7
7
  export class Internationalization {
8
8
  constructor() {
9
+ this.namespace = "_system";
9
10
  withComponentStatus(this);
10
11
  this.errors = withHasError(this);
11
12
  withBodyObserver(this, (data) => {
@@ -13,11 +14,12 @@ export class Internationalization {
13
14
  this.stores = getStores(this.element);
14
15
  try {
15
16
  const i18n = flattenObject(JSON.parse(data));
16
- // @ts-ignore
17
- const namespace = Object.assign({}, this.stores.internationalization.get(this.namespace));
18
- namespace[this.code] = i18n;
19
- // @ts-ignore
20
- this.stores.internationalization.set(this.namespace, namespace);
17
+ const ns = this.namespace || "_system";
18
+ const namespace = Object.assign({}, this.stores.internationalization.get(ns));
19
+ // Merge over the existing bundle (built-ins or earlier manifests) so
20
+ // partial overrides don't wipe unrelated keys.
21
+ namespace[this.code] = Object.assign(Object.assign({}, namespace[this.code]), i18n);
22
+ this.stores.internationalization.set(ns, namespace);
21
23
  }
22
24
  catch (e) {
23
25
  console.error(e);
@@ -25,7 +27,7 @@ export class Internationalization {
25
27
  });
26
28
  }
27
29
  render() {
28
- return h(Host, { key: 'dd384ecf77e4fd5d46ed04b04c4395fba8bac4e1' });
30
+ return h(Host, { key: '1b5e46fd06494aada4db697402746be6bcf950db' });
29
31
  }
30
32
  static get is() { return "bn-internationalization"; }
31
33
  static get originalStyleUrls() {
@@ -76,7 +78,8 @@ export class Internationalization {
76
78
  "getter": false,
77
79
  "setter": false,
78
80
  "reflect": false,
79
- "attribute": "namespace"
81
+ "attribute": "namespace",
82
+ "defaultValue": "\"_system\""
80
83
  }
81
84
  };
82
85
  }
@@ -3,17 +3,22 @@
3
3
  color: var(--bn-font-color, black);
4
4
  font-family: var(--bn-font-family, "Noto Sans", sans-serif);
5
5
  font-size: var(--bn-font-size, 13.3333px);
6
- display: block;
6
+ display: flex;
7
7
  flex-direction: column;
8
+ width: 100%;
9
+ height: 100%;
8
10
  overflow: hidden;
9
- float: left;
10
- clear: left;
11
11
  }
12
12
 
13
13
  .cardtitle {
14
14
  display: inline-flex;
15
15
  }
16
16
 
17
+ ::slotted(*) {
18
+ flex: 1 1 auto;
19
+ min-width: 0;
20
+ }
21
+
17
22
  .image {
18
23
  margin-right: 0.5em;
19
24
  margin-top: 0.5em;