@bino-bi/bn-template-engine 1.0.0-alpha.16 → 1.0.0-alpha.18

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 (326) hide show
  1. package/dist/bn-template-engine/bn-template-engine.esm.js +1 -1
  2. package/dist/bn-template-engine/p-0107f0cc.entry.js +1 -0
  3. package/dist/bn-template-engine/p-209351c9.entry.js +1 -0
  4. package/dist/bn-template-engine/p-22d0fb7a.entry.js +1 -0
  5. package/dist/bn-template-engine/p-2e6dc267.entry.js +1 -0
  6. package/dist/bn-template-engine/p-485d23d7.entry.js +1 -0
  7. package/dist/bn-template-engine/p-5651417d.entry.js +1 -0
  8. package/dist/bn-template-engine/p-5bfdc1e5.entry.js +1 -0
  9. package/dist/bn-template-engine/p-6b75762d.entry.js +1 -0
  10. package/dist/bn-template-engine/{p-ff659485.entry.js → p-7bdc0e28.entry.js} +1 -1
  11. package/dist/bn-template-engine/p-9879c9b2.entry.js +1 -0
  12. package/dist/bn-template-engine/p-BA48JiHe.js +1 -0
  13. package/dist/bn-template-engine/p-BWKdb9ym.js +1 -0
  14. package/dist/bn-template-engine/p-BZV1b5VH.js +1 -0
  15. package/dist/bn-template-engine/p-Bdfxd_Ke.js +1 -0
  16. package/dist/bn-template-engine/p-BqhIhYr1.js +1 -0
  17. package/dist/bn-template-engine/p-C0Pwqx-O.js +1 -0
  18. package/dist/bn-template-engine/p-CBqUr7I8.js +1 -0
  19. package/dist/bn-template-engine/{p-BPDZcex5.js → p-CPzF3Q2m.js} +1 -1
  20. package/dist/bn-template-engine/p-CiudZRQr.js +1 -0
  21. package/dist/bn-template-engine/p-Dg9OcXAO.js +1 -0
  22. package/dist/bn-template-engine/p-DsTzlzxQ.js +1 -0
  23. package/dist/bn-template-engine/p-X6CxL6W-.js +1 -0
  24. package/dist/bn-template-engine/p-a130cb43.entry.js +1 -0
  25. package/dist/bn-template-engine/p-aakBGfzL.js +1 -0
  26. package/dist/bn-template-engine/p-dc745c32.entry.js +1 -0
  27. package/dist/bn-template-engine/p-e96da91f.entry.js +1 -0
  28. package/dist/bn-template-engine/p-f3d1fa06.entry.js +1 -0
  29. package/dist/bn-template-engine/p-fcb43f2c.entry.js +1 -0
  30. package/dist/bn-template-engine/p-rdqTC0_5.js +1 -0
  31. package/dist/cjs/AxisConfig-VnVelfSV.js +233 -0
  32. package/dist/cjs/LabelCollisionManager-nfD5P__k.js +412 -0
  33. package/dist/cjs/NumericScale-BAyYXpKL.js +107 -0
  34. package/dist/cjs/Order-DobBozQC.js +87 -0
  35. package/dist/cjs/SVGStyle-BQOmGWLX.js +8209 -0
  36. package/dist/cjs/SVGVariancesStyleGroup-DCGfHrqh.js +50 -0
  37. package/dist/cjs/VarianceMeasure-NY9yhiNV.js +372 -0
  38. package/dist/cjs/XYChartDataRow-B7OKrAcC.js +829 -0
  39. package/dist/cjs/bn-asset_21.cjs.entry.js +1614 -9670
  40. package/dist/cjs/bn-chart-bubble.cjs.entry.js +762 -0
  41. package/dist/cjs/bn-chart-bullet.cjs.entry.js +785 -0
  42. package/dist/cjs/bn-chart-scatter.cjs.entry.js +658 -0
  43. package/dist/cjs/bn-grid.cjs.entry.js +5 -3
  44. package/dist/cjs/bn-image.cjs.entry.js +5 -3
  45. package/dist/cjs/bn-internationalization.cjs.entry.js +2 -2
  46. package/dist/cjs/bn-ruleset.cjs.entry.js +41 -0
  47. package/dist/cjs/bn-template-engine.cjs.js +1 -1
  48. package/dist/cjs/bn-template.cjs.entry.js +1 -1
  49. package/dist/cjs/bn-text.cjs.entry.js +8 -79
  50. package/dist/cjs/bn-tree.cjs.entry.js +4 -2
  51. package/dist/cjs/{context-protocol-Cn5PL928.js → context-protocol-BDrMkhc4.js} +272 -1
  52. package/dist/cjs/editor-companion.cjs.entry.js +2 -2
  53. package/dist/cjs/ibcs-chart-bubble.cjs.entry.js +624 -0
  54. package/dist/cjs/ibcs-chart-bullet.cjs.entry.js +673 -0
  55. package/dist/cjs/ibcs-chart-scatter.cjs.entry.js +667 -0
  56. package/dist/cjs/layoutObserver-p0wXIWFg.js +350 -0
  57. package/dist/cjs/loader.cjs.js +1 -1
  58. package/dist/cjs/sanitizeHtml-LuZr1IMd.js +85 -0
  59. package/dist/cjs/{scaling-DM2UILdF.js → scaling-BmqxcNOf.js} +1 -1
  60. package/dist/cjs/withScalingGroup-BmcRlWBs.js +73 -0
  61. package/dist/cjs/{withStyled-Dx3uRw9g.js → withStyled-CRiC9fzc.js} +44 -383
  62. package/dist/collection/collection-manifest.json +7 -0
  63. package/dist/collection/components/bn-chart-bubble/bn-chart-bubble.css +10 -0
  64. package/dist/collection/components/bn-chart-bubble/bn-chart-bubble.js +1110 -0
  65. package/dist/collection/components/bn-chart-bubble/ibcs-chart-bubble.css +9 -0
  66. package/dist/collection/components/bn-chart-bubble/ibcs-chart-bubble.js +653 -0
  67. package/dist/collection/components/bn-chart-bubble/utils/BubbleChart.js +472 -0
  68. package/dist/collection/components/bn-chart-bullet/bn-chart-bullet.css +10 -0
  69. package/dist/collection/components/bn-chart-bullet/bn-chart-bullet.js +1014 -0
  70. package/dist/collection/components/bn-chart-bullet/ibcs-chart-bullet.css +9 -0
  71. package/dist/collection/components/bn-chart-bullet/ibcs-chart-bullet.js +538 -0
  72. package/dist/collection/components/bn-chart-bullet/utils/BulletChart.js +440 -0
  73. package/dist/collection/components/bn-chart-bullet/utils/model/BulletChartStyle.js +132 -0
  74. package/dist/collection/components/bn-chart-bullet/utils/model/BulletConfig.js +89 -0
  75. package/dist/collection/components/bn-chart-bullet/utils/model/index.js +2 -0
  76. package/dist/collection/components/bn-chart-scatter/bn-chart-scatter.css +10 -0
  77. package/dist/collection/components/bn-chart-scatter/bn-chart-scatter.js +965 -0
  78. package/dist/collection/components/bn-chart-scatter/ibcs-chart-scatter.css +9 -0
  79. package/dist/collection/components/bn-chart-scatter/ibcs-chart-scatter.js +580 -0
  80. package/dist/collection/components/bn-chart-scatter/utils/ScatterChart.js +409 -0
  81. package/dist/collection/components/bn-chart-structure/bn-chart-structure.js +23 -2
  82. package/dist/collection/components/bn-chart-structure/ibcs-chart-structure.js +29 -4
  83. package/dist/collection/components/bn-chart-structure/utils/StructureChart.js +3 -0
  84. package/dist/collection/components/bn-chart-time/bn-chart-time.js +27 -4
  85. package/dist/collection/components/bn-chart-time/ibcs-chart-time.js +29 -4
  86. package/dist/collection/components/bn-chart-time/utils/TimeChart.js +16 -4
  87. package/dist/collection/components/bn-chart-time/utils/elements/StackedColumn.js +3 -3
  88. package/dist/collection/components/bn-component-style/bn-component-style.js +1 -1
  89. package/dist/collection/components/bn-context/bn-context.js +1 -1
  90. package/dist/collection/components/bn-dataset/bn-dataset.js +1 -1
  91. package/dist/collection/components/bn-datasource/bn-datasource.js +1 -1
  92. package/dist/collection/components/bn-footer/bn-footer.js +1 -1
  93. package/dist/collection/components/bn-grid/bn-grid.js +1 -1
  94. package/dist/collection/components/bn-image/bn-image.js +1 -1
  95. package/dist/collection/components/bn-internationalization/bn-internationalization.js +1 -1
  96. package/dist/collection/components/bn-layout-card/bn-layout-card.js +26 -3
  97. package/dist/collection/components/bn-layout-page/bn-layout-page.js +33 -4
  98. package/dist/collection/components/bn-message/bn-message.css +6 -2
  99. package/dist/collection/components/bn-message/bn-message.js +3 -2
  100. package/dist/collection/components/bn-page/bn-page.js +1 -1
  101. package/dist/collection/components/bn-ruleset/bn-ruleset.css +3 -0
  102. package/dist/collection/components/bn-ruleset/bn-ruleset.js +68 -0
  103. package/dist/collection/components/bn-scaling-group/bn-scaling-group.js +1 -1
  104. package/dist/collection/components/bn-table/bn-table.js +146 -14
  105. package/dist/collection/components/bn-table/ibcs-table.css +8 -0
  106. package/dist/collection/components/bn-table/ibcs-table.js +64 -8
  107. package/dist/collection/components/bn-table/utils/Table.js +43 -5
  108. package/dist/collection/components/bn-table/utils/elements/CellBarChart.js +13 -8
  109. package/dist/collection/components/bn-table/utils/elements/TableRow.js +3 -2
  110. package/dist/collection/components/bn-table/utils/elements/WaterfallBar.js +47 -0
  111. package/dist/collection/components/bn-table/utils/elements/index.js +1 -0
  112. package/dist/collection/components/bn-table/utils/factories/tableDataSetFactory.js +87 -15
  113. package/dist/collection/components/bn-table/utils/helper/DataQuery.js +284 -3
  114. package/dist/collection/components/bn-table/utils/helper/IntervalColumns.js +140 -0
  115. package/dist/collection/components/bn-table/utils/helper/WaterfallCalculator.js +166 -0
  116. package/dist/collection/components/bn-table/utils/helper/index.js +2 -0
  117. package/dist/collection/components/bn-table/utils/model/TableComponentConfig.js +10 -0
  118. package/dist/collection/components/bn-template/bn-template.js +1 -1
  119. package/dist/collection/components/bn-text/bn-text.js +2 -75
  120. package/dist/collection/components/bn-title/bn-title.js +27 -3
  121. package/dist/collection/components/bn-title/ibcs-title/ibcs-title.css +4 -0
  122. package/dist/collection/components/bn-title/ibcs-title/ibcs-title.js +29 -3
  123. package/dist/collection/components/bn-title/ibcs-title/utils/Title.js +3 -0
  124. package/dist/collection/components/editor-companion/editor-companion.js +1 -1
  125. package/dist/collection/stores/componentStyles.js +67 -0
  126. package/dist/collection/stores/createScopedStores.js +6 -1
  127. package/dist/collection/stores/internationalization.js +68 -0
  128. package/dist/collection/stores/ruleSets.js +46 -0
  129. package/dist/collection/utils/constants.js +5 -0
  130. package/dist/collection/utils/ibcsRuleSet.js +14 -26
  131. package/dist/collection/utils/sanitizeHtml.js +81 -0
  132. package/dist/collection/utils/validate.js +24 -0
  133. package/dist/collection/utils/withComponentStyle.js +3 -5
  134. package/dist/collection/utils/withInheritedProps.js +1 -1
  135. package/dist/collection/utils/withRuleSet.js +105 -0
  136. package/dist/collection/utils/withScalingGroup.js +3 -0
  137. package/dist/collection/utils/xy/FacetGrid.js +36 -0
  138. package/dist/collection/utils/xy/IsoCurves.js +156 -0
  139. package/dist/collection/utils/xy/NumericScale.js +103 -0
  140. package/dist/collection/utils/xy/PointLabeler.js +96 -0
  141. package/dist/collection/utils/xy/RadiusScale.js +42 -0
  142. package/dist/collection/utils/xy/SeriesPalette.js +80 -0
  143. package/dist/collection/utils/xy/VarianceMeasure.js +76 -0
  144. package/dist/collection/utils/xy/XYFrame.js +120 -0
  145. package/dist/collection/utils/xy/XYLegend.js +107 -0
  146. package/dist/collection/utils/xy/model/AxisConfig.js +221 -0
  147. package/dist/collection/utils/xy/model/ScaleFactorsXYChart.js +69 -0
  148. package/dist/collection/utils/xy/model/XYChartDataRow.js +0 -0
  149. package/dist/collection/utils/xy/model/XYChartStyle.js +52 -0
  150. package/dist/components/AxisConfig.js +1 -0
  151. package/dist/components/CompareUtil.js +1 -0
  152. package/dist/components/DataFormatDigits.js +1 -1
  153. package/dist/components/LabelCollisionManager.js +1 -0
  154. package/dist/components/NumericScale.js +1 -0
  155. package/dist/components/Order.js +1 -1
  156. package/dist/components/SVGVariancesStyleGroup.js +1 -1
  157. package/dist/components/SiPrefix.js +1 -0
  158. package/dist/components/StringAdapter.js +1 -0
  159. package/dist/components/VarianceMeasure.js +1 -0
  160. package/dist/components/XYChartDataRow.js +1 -0
  161. package/dist/components/bn-chart-bubble.d.ts +11 -0
  162. package/dist/components/bn-chart-bubble.js +1 -0
  163. package/dist/components/bn-chart-bullet.d.ts +11 -0
  164. package/dist/components/bn-chart-bullet.js +1 -0
  165. package/dist/components/bn-chart-scatter.d.ts +11 -0
  166. package/dist/components/bn-chart-scatter.js +1 -0
  167. package/dist/components/bn-chart-structure.js +1 -1
  168. package/dist/components/bn-chart-time.js +1 -1
  169. package/dist/components/bn-component-style.js +1 -1
  170. package/dist/components/bn-context.js +1 -1
  171. package/dist/components/bn-dataset.js +1 -1
  172. package/dist/components/bn-datasource.js +1 -1
  173. package/dist/components/bn-footer2.js +1 -1
  174. package/dist/components/bn-grid.js +1 -1
  175. package/dist/components/bn-image.js +1 -1
  176. package/dist/components/bn-internationalization.js +1 -1
  177. package/dist/components/bn-layout-card.js +1 -1
  178. package/dist/components/bn-layout-page.js +1 -1
  179. package/dist/components/bn-message2.js +1 -1
  180. package/dist/components/bn-page2.js +1 -1
  181. package/dist/components/bn-ruleset.d.ts +11 -0
  182. package/dist/components/bn-ruleset.js +1 -0
  183. package/dist/components/bn-scaling-group.js +1 -1
  184. package/dist/components/bn-table.js +1 -1
  185. package/dist/components/bn-template.js +1 -1
  186. package/dist/components/bn-text.js +1 -1
  187. package/dist/components/bn-title2.js +1 -1
  188. package/dist/components/bn-tree.js +1 -1
  189. package/dist/components/context-protocol.js +1 -1
  190. package/dist/components/editor-companion.js +1 -1
  191. package/dist/components/formatter.js +1 -0
  192. package/dist/components/ibcs-chart-bubble.d.ts +11 -0
  193. package/dist/components/ibcs-chart-bubble.js +1 -0
  194. package/dist/components/ibcs-chart-bubble2.js +1 -0
  195. package/dist/components/ibcs-chart-bullet.d.ts +11 -0
  196. package/dist/components/ibcs-chart-bullet.js +1 -0
  197. package/dist/components/ibcs-chart-bullet2.js +1 -0
  198. package/dist/components/ibcs-chart-scatter.d.ts +11 -0
  199. package/dist/components/ibcs-chart-scatter.js +1 -0
  200. package/dist/components/ibcs-chart-scatter2.js +1 -0
  201. package/dist/components/ibcs-chart-structure2.js +1 -1
  202. package/dist/components/ibcs-chart-time2.js +1 -1
  203. package/dist/components/ibcs-table2.js +1 -1
  204. package/dist/components/ibcs-title2.js +1 -1
  205. package/dist/components/layoutObserver.js +1 -1
  206. package/dist/components/luxon.js +1 -1
  207. package/dist/components/main.js +1 -0
  208. package/dist/components/merge.js +1 -0
  209. package/dist/components/sanitizeHtml.js +1 -0
  210. package/dist/components/stackColors.js +1 -0
  211. package/dist/components/validate.js +1 -1
  212. package/dist/components/withComponentStyle.js +1 -1
  213. package/dist/components/withDataset.js +1 -0
  214. package/dist/components/withRuleSet.js +1 -0
  215. package/dist/components/withScalingGroup.js +1 -0
  216. package/dist/components/withStyled.js +1 -1
  217. package/dist/esm/AxisConfig-C_zWCKlL.js +224 -0
  218. package/dist/esm/LabelCollisionManager-8swVQHKA.js +404 -0
  219. package/dist/esm/NumericScale-DsTzlzxQ.js +105 -0
  220. package/dist/esm/Order-BPeWfygb.js +83 -0
  221. package/dist/esm/SVGStyle-BxEDw9zh.js +8199 -0
  222. package/dist/esm/SVGVariancesStyleGroup-DRQYvSDD.js +48 -0
  223. package/dist/esm/VarianceMeasure-DnwNKspZ.js +364 -0
  224. package/dist/esm/XYChartDataRow-DeV4r-Wm.js +820 -0
  225. package/dist/esm/bn-asset_21.entry.js +1127 -9183
  226. package/dist/esm/bn-chart-bubble.entry.js +760 -0
  227. package/dist/esm/bn-chart-bullet.entry.js +783 -0
  228. package/dist/esm/bn-chart-scatter.entry.js +656 -0
  229. package/dist/esm/bn-grid.entry.js +5 -3
  230. package/dist/esm/bn-image.entry.js +5 -3
  231. package/dist/esm/bn-internationalization.entry.js +2 -2
  232. package/dist/esm/bn-ruleset.entry.js +39 -0
  233. package/dist/esm/bn-template-engine.js +1 -1
  234. package/dist/esm/bn-template.entry.js +1 -1
  235. package/dist/esm/bn-text.entry.js +7 -78
  236. package/dist/esm/bn-tree.entry.js +4 -2
  237. package/dist/esm/{context-protocol-BB-4Onmw.js → context-protocol-1Yj1uKvh.js} +268 -2
  238. package/dist/esm/editor-companion.entry.js +2 -2
  239. package/dist/esm/ibcs-chart-bubble.entry.js +622 -0
  240. package/dist/esm/ibcs-chart-bullet.entry.js +671 -0
  241. package/dist/esm/ibcs-chart-scatter.entry.js +665 -0
  242. package/dist/esm/layoutObserver-DCbmpGrz.js +345 -0
  243. package/dist/esm/loader.js +1 -1
  244. package/dist/esm/sanitizeHtml-BA48JiHe.js +83 -0
  245. package/dist/esm/{scaling-h4KcBet3.js → scaling-B_k50v9z.js} +2 -2
  246. package/dist/esm/withScalingGroup-Br70pAv9.js +71 -0
  247. package/dist/esm/{withStyled-BBvU2f-A.js → withStyled-Br2DGTPs.js} +30 -367
  248. package/dist/types/components/bn-chart-bubble/bn-chart-bubble.d.ts +193 -0
  249. package/dist/types/components/bn-chart-bubble/ibcs-chart-bubble.d.ts +58 -0
  250. package/dist/types/components/bn-chart-bubble/utils/BubbleChart.d.ts +91 -0
  251. package/dist/types/components/bn-chart-bullet/bn-chart-bullet.d.ts +172 -0
  252. package/dist/types/components/bn-chart-bullet/ibcs-chart-bullet.d.ts +52 -0
  253. package/dist/types/components/bn-chart-bullet/utils/BulletChart.d.ts +91 -0
  254. package/dist/types/components/bn-chart-bullet/utils/model/BulletChartStyle.d.ts +70 -0
  255. package/dist/types/components/bn-chart-bullet/utils/model/BulletConfig.d.ts +43 -0
  256. package/dist/types/components/bn-chart-bullet/utils/model/index.d.ts +2 -0
  257. package/dist/types/components/bn-chart-scatter/bn-chart-scatter.d.ts +172 -0
  258. package/dist/types/components/bn-chart-scatter/ibcs-chart-scatter.d.ts +53 -0
  259. package/dist/types/components/bn-chart-scatter/utils/ScatterChart.d.ts +66 -0
  260. package/dist/types/components/bn-chart-structure/bn-chart-structure.d.ts +7 -0
  261. package/dist/types/components/bn-chart-structure/ibcs-chart-structure.d.ts +2 -0
  262. package/dist/types/components/bn-chart-structure/utils/StructureChart.d.ts +1 -0
  263. package/dist/types/components/bn-chart-time/bn-chart-time.d.ts +10 -1
  264. package/dist/types/components/bn-chart-time/ibcs-chart-time.d.ts +2 -0
  265. package/dist/types/components/bn-chart-time/utils/TimeChart.d.ts +1 -0
  266. package/dist/types/components/bn-layout-card/bn-layout-card.d.ts +10 -0
  267. package/dist/types/components/bn-layout-page/bn-layout-page.d.ts +14 -0
  268. package/dist/types/components/bn-message/bn-message.d.ts +5 -2
  269. package/dist/types/components/bn-ruleset/bn-ruleset.d.ts +8 -0
  270. package/dist/types/components/bn-table/bn-table.d.ts +38 -5
  271. package/dist/types/components/bn-table/ibcs-table.d.ts +8 -1
  272. package/dist/types/components/bn-table/utils/Table.d.ts +8 -0
  273. package/dist/types/components/bn-table/utils/elements/Cell.d.ts +2 -0
  274. package/dist/types/components/bn-table/utils/elements/CellBarChart.d.ts +33 -0
  275. package/dist/types/components/bn-table/utils/elements/TableRow.d.ts +2 -1
  276. package/dist/types/components/bn-table/utils/elements/WaterfallBar.d.ts +21 -0
  277. package/dist/types/components/bn-table/utils/elements/index.d.ts +1 -0
  278. package/dist/types/components/bn-table/utils/factories/tableDataSetFactory.d.ts +13 -7
  279. package/dist/types/components/bn-table/utils/helper/DataQuery.d.ts +17 -0
  280. package/dist/types/components/bn-table/utils/helper/IntervalColumns.d.ts +37 -0
  281. package/dist/types/components/bn-table/utils/helper/WaterfallCalculator.d.ts +55 -0
  282. package/dist/types/components/bn-table/utils/helper/index.d.ts +2 -0
  283. package/dist/types/components/bn-table/utils/model/TableComponentConfig.d.ts +4 -0
  284. package/dist/types/components/bn-table/utils/model/index.d.ts +21 -0
  285. package/dist/types/components/bn-title/bn-title.d.ts +11 -1
  286. package/dist/types/components/bn-title/ibcs-title/ibcs-title.d.ts +2 -0
  287. package/dist/types/components/bn-title/ibcs-title/utils/Title.d.ts +1 -0
  288. package/dist/types/components.d.ts +1383 -82
  289. package/dist/types/context/context-protocol.d.ts +2 -0
  290. package/dist/types/stores/componentStyles.d.ts +41 -0
  291. package/dist/types/stores/createScopedStores.d.ts +2 -0
  292. package/dist/types/stores/ruleSets.d.ts +40 -0
  293. package/dist/types/utils/constants.d.ts +5 -0
  294. package/dist/types/utils/ibcsRuleSet.d.ts +6 -1
  295. package/dist/types/utils/model/ChartStyles.d.ts +2 -1
  296. package/dist/types/utils/sanitizeHtml.d.ts +6 -0
  297. package/dist/types/utils/validate.d.ts +12 -0
  298. package/dist/types/utils/withInheritedProps.d.ts +11 -0
  299. package/dist/types/utils/withRuleSet.d.ts +24 -0
  300. package/dist/types/utils/xy/FacetGrid.d.ts +27 -0
  301. package/dist/types/utils/xy/IsoCurves.d.ts +46 -0
  302. package/dist/types/utils/xy/NumericScale.d.ts +41 -0
  303. package/dist/types/utils/xy/PointLabeler.d.ts +58 -0
  304. package/dist/types/utils/xy/RadiusScale.d.ts +26 -0
  305. package/dist/types/utils/xy/SeriesPalette.d.ts +59 -0
  306. package/dist/types/utils/xy/VarianceMeasure.d.ts +37 -0
  307. package/dist/types/utils/xy/XYFrame.d.ts +44 -0
  308. package/dist/types/utils/xy/XYLegend.d.ts +43 -0
  309. package/dist/types/utils/xy/model/AxisConfig.d.ts +96 -0
  310. package/dist/types/utils/xy/model/ScaleFactorsXYChart.d.ts +36 -0
  311. package/dist/types/utils/xy/model/XYChartDataRow.d.ts +157 -0
  312. package/dist/types/utils/xy/model/XYChartStyle.d.ts +31 -0
  313. package/package.json +1 -1
  314. package/readme.md +7 -3
  315. package/dist/bn-template-engine/p-19f49fbc.entry.js +0 -1
  316. package/dist/bn-template-engine/p-3465fcdc.entry.js +0 -1
  317. package/dist/bn-template-engine/p-67746414.entry.js +0 -1
  318. package/dist/bn-template-engine/p-6b469808.entry.js +0 -1
  319. package/dist/bn-template-engine/p-86ca2d5e.entry.js +0 -1
  320. package/dist/bn-template-engine/p-Tx6omDWp.js +0 -1
  321. package/dist/bn-template-engine/p-d724ab88.entry.js +0 -1
  322. package/dist/bn-template-engine/p-efd3b67a.entry.js +0 -1
  323. package/dist/bn-template-engine/p-z9bPNFYF.js +0 -1
  324. package/dist/components/ibcsRuleSet.js +0 -1
  325. package/dist/components/scaling.js +0 -1
  326. package/dist/components/withInheritedProps.js +0 -1
@@ -0,0 +1,107 @@
1
+ import CalculateSize from "calculate-size";
2
+ /**
3
+ * Series-color legend + bubble-size caption for the XY charts
4
+ * (IBCS requires a legend explaining colors — and, for bubbles, size).
5
+ * Positioned by the orchestrator: right column (default) or bottom row.
6
+ */
7
+ export class XYLegend {
8
+ constructor(styles) {
9
+ this.styles = styles;
10
+ }
11
+ get em() {
12
+ return this.styles.fontStyles.size;
13
+ }
14
+ get rowHeight() {
15
+ return this.em * 1.5;
16
+ }
17
+ get swatchSize() {
18
+ return this.styles.scaleFactors.legendSwatch * this.em;
19
+ }
20
+ textWidth(text, bold = false) {
21
+ const width = CalculateSize(text, {
22
+ font: this.styles.fontStyles.font,
23
+ fontSize: this.styles.fontStyles.size + "px",
24
+ fontWeight: bold ? "bold" : "normal",
25
+ }).width;
26
+ // calculate-size needs a live DOM; fall back to an estimate in test environments.
27
+ return Number.isFinite(width) && width > 0 ? width : text.length * 0.6 * this.em;
28
+ }
29
+ rows(model) {
30
+ const rows = [];
31
+ model.sizeCaption.forEach((line, index) => {
32
+ rows.push({ text: line, bold: index === 0, treatment: null });
33
+ });
34
+ if (model.title !== null && model.title !== "") {
35
+ rows.push({ text: model.title, bold: true, treatment: null });
36
+ }
37
+ for (const entry of model.compareEntries) {
38
+ rows.push({ text: entry.label, bold: false, treatment: entry.treatment });
39
+ }
40
+ for (const entry of model.entries) {
41
+ rows.push({ text: entry.label, bold: false, treatment: entry.treatment });
42
+ }
43
+ return rows;
44
+ }
45
+ /** Footprint of the legend for layout reservation. */
46
+ measure(model, position) {
47
+ const rows = this.rows(model);
48
+ if (rows.length === 0) {
49
+ return { width: 0, height: 0 };
50
+ }
51
+ const swatchSpan = this.swatchSize + 0.4 * this.em;
52
+ if (position === "bottom") {
53
+ let width = 0;
54
+ for (const row of rows) {
55
+ width += (row.treatment !== null ? swatchSpan : 0) + this.textWidth(row.text, row.bold) + 1.5 * this.em;
56
+ }
57
+ return { width, height: this.rowHeight };
58
+ }
59
+ let width = 0;
60
+ for (const row of rows) {
61
+ width = Math.max(width, (row.treatment !== null ? swatchSpan : 0) + this.textWidth(row.text, row.bold));
62
+ }
63
+ return { width, height: rows.length * this.rowHeight };
64
+ }
65
+ /** Draws the legend with its top-left corner at `x`/`y`. */
66
+ draw(group, model, x, y, position) {
67
+ const rows = this.rows(model);
68
+ const swatchSpan = this.swatchSize + 0.4 * this.em;
69
+ let cursorX = x;
70
+ let cursorY = y;
71
+ for (const row of rows) {
72
+ let textX = cursorX;
73
+ if (row.treatment !== null) {
74
+ const swatch = group
75
+ .circle(this.swatchSize)
76
+ .move(cursorX, cursorY + (this.rowHeight - this.swatchSize) / 2)
77
+ .fill(row.treatment.hatch ? "#ffffff" : row.treatment.fill)
78
+ .stroke({
79
+ color: row.treatment.stroke === "#ffffff" ? row.treatment.fill : row.treatment.stroke,
80
+ width: row.treatment.strokeWidth,
81
+ });
82
+ if (row.treatment.dasharray !== undefined) {
83
+ swatch.attr("stroke-dasharray", row.treatment.dasharray);
84
+ }
85
+ textX += swatchSpan;
86
+ }
87
+ group
88
+ .text(row.text)
89
+ .font({
90
+ size: this.styles.fontStyles.size,
91
+ weight: row.bold ? "bold" : "normal",
92
+ anchor: "start",
93
+ })
94
+ .fill(this.styles.fontStyles.color)
95
+ .attr({ x: textX, y: cursorY + this.rowHeight / 2 + this.em * 0.35, "font-family": this.fontFamily() });
96
+ if (position === "bottom") {
97
+ cursorX = textX + this.textWidth(row.text, row.bold) + 1.5 * this.em;
98
+ }
99
+ else {
100
+ cursorY += this.rowHeight;
101
+ }
102
+ }
103
+ }
104
+ fontFamily() {
105
+ return this.styles.fontStyles.font.replace(/^[\d.]+px\s*/, "");
106
+ }
107
+ }
@@ -0,0 +1,221 @@
1
+ import { CompareUtil } from "../../helper/CompareUtil";
2
+ /**
3
+ * Parses a raw object-prop attribute value. A blank value yields `data: null`
4
+ * without error. A value starting with `{` must be valid JSON describing an
5
+ * object. Any other bare string is treated as shorthand for
6
+ * `{ [shorthandKey]: value }` when a shorthand key is allowed, otherwise it
7
+ * is a parse error.
8
+ */
9
+ export function parseSpec(raw, shorthandKey) {
10
+ var _a;
11
+ const trimmed = (_a = raw === null || raw === void 0 ? void 0 : raw.trim()) !== null && _a !== void 0 ? _a : "";
12
+ if (trimmed === "" || trimmed === "null") {
13
+ return { data: null, parseError: false };
14
+ }
15
+ if (trimmed.startsWith("{") || trimmed.startsWith("[")) {
16
+ try {
17
+ const parsed = JSON.parse(trimmed);
18
+ if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
19
+ return { data: null, parseError: true };
20
+ }
21
+ return { data: parsed, parseError: false };
22
+ }
23
+ catch (_b) {
24
+ return { data: null, parseError: true };
25
+ }
26
+ }
27
+ if (shorthandKey !== null) {
28
+ return { data: { [shorthandKey]: trimmed }, parseError: false };
29
+ }
30
+ return { data: null, parseError: true };
31
+ }
32
+ function collectUnknownKeys(data, knownKeys) {
33
+ return Object.keys(data).filter((key) => !knownKeys.includes(key));
34
+ }
35
+ function readString(data, key, invalid) {
36
+ if (!CompareUtil.isExisting(data[key])) {
37
+ return undefined;
38
+ }
39
+ if (CompareUtil.isString(data[key])) {
40
+ return data[key];
41
+ }
42
+ invalid.push(key);
43
+ return undefined;
44
+ }
45
+ function readNumber(data, key, invalid) {
46
+ if (!CompareUtil.isExisting(data[key])) {
47
+ return undefined;
48
+ }
49
+ if (CompareUtil.isNumber(data[key])) {
50
+ return data[key];
51
+ }
52
+ invalid.push(key);
53
+ return undefined;
54
+ }
55
+ function readHighlight(data, invalid) {
56
+ if (!CompareUtil.isExisting(data.highlight)) {
57
+ return undefined;
58
+ }
59
+ if (!CompareUtil.isObject(data.highlight) || Array.isArray(data.highlight)) {
60
+ invalid.push("highlight");
61
+ return undefined;
62
+ }
63
+ const range = data.highlight;
64
+ const result = {};
65
+ const from = readNumber(range, "from", invalid);
66
+ const to = readNumber(range, "to", invalid);
67
+ if (from !== undefined) {
68
+ result.from = from;
69
+ }
70
+ if (to !== undefined) {
71
+ result.to = to;
72
+ }
73
+ return result;
74
+ }
75
+ const AXIS_KEYS = ["measure", "label", "unit", "min", "max", "refLine", "highlight"];
76
+ export function toAxisConfig(data) {
77
+ const invalidFields = [];
78
+ const measure = readString(data, "measure", invalidFields);
79
+ if (measure === undefined || measure.trim() === "") {
80
+ invalidFields.push("measure");
81
+ return { config: null, unknownKeys: collectUnknownKeys(data, AXIS_KEYS), invalidFields };
82
+ }
83
+ const config = { measure: measure.trim() };
84
+ config.label = readString(data, "label", invalidFields);
85
+ config.unit = readString(data, "unit", invalidFields);
86
+ config.min = readNumber(data, "min", invalidFields);
87
+ config.max = readNumber(data, "max", invalidFields);
88
+ config.refLine = readNumber(data, "refLine", invalidFields);
89
+ config.highlight = readHighlight(data, invalidFields);
90
+ return { config, unknownKeys: collectUnknownKeys(data, AXIS_KEYS), invalidFields };
91
+ }
92
+ const SIZE_KEYS = ["measure", "label", "unit", "group"];
93
+ export function toSizeConfig(data) {
94
+ const invalidFields = [];
95
+ const measure = readString(data, "measure", invalidFields);
96
+ if (measure === undefined || measure.trim() === "") {
97
+ invalidFields.push("measure");
98
+ return { config: null, unknownKeys: collectUnknownKeys(data, SIZE_KEYS), invalidFields };
99
+ }
100
+ const config = { measure: measure.trim() };
101
+ config.label = readString(data, "label", invalidFields);
102
+ config.unit = readString(data, "unit", invalidFields);
103
+ config.group = readString(data, "group", invalidFields);
104
+ return { config, unknownKeys: collectUnknownKeys(data, SIZE_KEYS), invalidFields };
105
+ }
106
+ const SHARE_KEYS = ["measure"];
107
+ export function toShareConfig(data) {
108
+ const invalidFields = [];
109
+ const measure = readString(data, "measure", invalidFields);
110
+ if (measure === undefined || measure.trim() === "") {
111
+ invalidFields.push("measure");
112
+ return { config: null, unknownKeys: collectUnknownKeys(data, SHARE_KEYS), invalidFields };
113
+ }
114
+ return { config: { measure: measure.trim() }, unknownKeys: collectUnknownKeys(data, SHARE_KEYS), invalidFields };
115
+ }
116
+ const ISO_KEYS = ["values", "label", "unit", "highlight"];
117
+ export function toIsoConfig(data) {
118
+ const invalidFields = [];
119
+ let values = null;
120
+ if (data.values === "auto") {
121
+ values = "auto";
122
+ }
123
+ else if (CompareUtil.isArray(data.values) && data.values.every((v) => CompareUtil.isNumber(v))) {
124
+ values = data.values;
125
+ }
126
+ else {
127
+ invalidFields.push("values");
128
+ }
129
+ if (values === null) {
130
+ return { config: null, unknownKeys: collectUnknownKeys(data, ISO_KEYS), invalidFields };
131
+ }
132
+ const config = { values };
133
+ config.label = readString(data, "label", invalidFields);
134
+ config.unit = readString(data, "unit", invalidFields);
135
+ if (CompareUtil.isExisting(data.highlight)) {
136
+ if (CompareUtil.isObject(data.highlight) && !Array.isArray(data.highlight)) {
137
+ const from = readNumber(data.highlight, "from", invalidFields);
138
+ if (from !== undefined) {
139
+ config.highlight = { from };
140
+ }
141
+ }
142
+ else {
143
+ invalidFields.push("highlight");
144
+ }
145
+ }
146
+ return { config, unknownKeys: collectUnknownKeys(data, ISO_KEYS), invalidFields };
147
+ }
148
+ const LABEL_KEYS = ["points", "values", "max"];
149
+ export function toLabelConfig(data, defaults) {
150
+ const invalidFields = [];
151
+ const config = { points: defaults.points, values: defaults.values, max: defaults.max };
152
+ if (CompareUtil.isExisting(data.points)) {
153
+ if (data.points === "auto" || data.points === "none" || data.points === "all") {
154
+ config.points = data.points;
155
+ }
156
+ else if (CompareUtil.isArray(data.points) && data.points.every((p) => CompareUtil.isString(p))) {
157
+ config.points = data.points;
158
+ }
159
+ else {
160
+ invalidFields.push("points");
161
+ }
162
+ }
163
+ if (CompareUtil.isExisting(data.values)) {
164
+ if (CompareUtil.isBoolean(data.values)) {
165
+ config.values = data.values;
166
+ }
167
+ else {
168
+ invalidFields.push("values");
169
+ }
170
+ }
171
+ if (CompareUtil.isExisting(data.max)) {
172
+ if (CompareUtil.isNumber(data.max) && data.max > 0) {
173
+ config.max = Math.floor(data.max);
174
+ }
175
+ else {
176
+ invalidFields.push("max");
177
+ }
178
+ }
179
+ return { config, unknownKeys: collectUnknownKeys(data, LABEL_KEYS), invalidFields };
180
+ }
181
+ const FACET_KEYS = ["level", "columns"];
182
+ export function toFacetConfig(data) {
183
+ const invalidFields = [];
184
+ const level = CompareUtil.isString(data.level) ? data.level.toLowerCase() : null;
185
+ if (level !== "rowgroup" && level !== "category") {
186
+ invalidFields.push("level");
187
+ return { config: null, unknownKeys: collectUnknownKeys(data, FACET_KEYS), invalidFields };
188
+ }
189
+ const config = { level };
190
+ if (CompareUtil.isExisting(data.columns)) {
191
+ if (CompareUtil.isNumber(data.columns) && data.columns >= 1) {
192
+ config.columns = Math.floor(data.columns);
193
+ }
194
+ else {
195
+ invalidFields.push("columns");
196
+ }
197
+ }
198
+ return { config, unknownKeys: collectUnknownKeys(data, FACET_KEYS), invalidFields };
199
+ }
200
+ const LEGEND_KEYS = ["show", "position"];
201
+ export function toLegendConfig(data) {
202
+ const invalidFields = [];
203
+ const config = { show: true, position: "right" };
204
+ if (CompareUtil.isExisting(data.show)) {
205
+ if (CompareUtil.isBoolean(data.show)) {
206
+ config.show = data.show;
207
+ }
208
+ else {
209
+ invalidFields.push("show");
210
+ }
211
+ }
212
+ if (CompareUtil.isExisting(data.position)) {
213
+ if (data.position === "right" || data.position === "bottom") {
214
+ config.position = data.position;
215
+ }
216
+ else {
217
+ invalidFields.push("position");
218
+ }
219
+ }
220
+ return { config, unknownKeys: collectUnknownKeys(data, LEGEND_KEYS), invalidFields };
221
+ }
@@ -0,0 +1,69 @@
1
+ import { CompareUtil } from "../../helper/CompareUtil";
2
+ /**
3
+ * Proportional scale factors for XY chart elements (scatter and bubble).
4
+ *
5
+ * All values except the `*LineWidth` entries are expressed in **font-size
6
+ * multiples** (em-like units), so the chart scales uniformly when the base
7
+ * font size changes. The chart renderer multiplies each factor by the
8
+ * computed font size to get pixel dimensions. Line widths are absolute
9
+ * pixel values (hairlines must not scale with the font).
10
+ */
11
+ export class ScaleFactorsXYChart {
12
+ constructor() {
13
+ /** Radius of a scatter point. */
14
+ this.pointRadius = 0.4;
15
+ /** Maximum bubble radius in local (vMax-normalized) sizing mode. */
16
+ this.bubbleMaxRadius = 3.2;
17
+ /** Minimum visible bubble radius in local sizing mode. */
18
+ this.bubbleMinRadius = 0.35;
19
+ /** Length of axis tick marks. */
20
+ this.axisTickLength = 0.35;
21
+ /** Gap between a mark (dot/bubble) and its name label. */
22
+ this.labelToMark = 0.3;
23
+ /** Diameter of a legend color swatch. */
24
+ this.legendSwatch = 0.9;
25
+ /** Gap between facet panels. */
26
+ this.panelGap = 1.6;
27
+ /** Stroke width of reference lines, in pixels. */
28
+ this.refLineWidth = 1;
29
+ /** Stroke width of gridlines and the plot frame, in pixels. */
30
+ this.gridLineWidth = 1;
31
+ }
32
+ }
33
+ /** Converts untyped JSON into a validated {@link ScaleFactorsXYChart}. */
34
+ export class ScaleFactorsXYChartAdapter {
35
+ adapt(data) {
36
+ const scaleFactors = new ScaleFactorsXYChart();
37
+ if (CompareUtil.isNumber(data.pointRadius)) {
38
+ scaleFactors.pointRadius = data.pointRadius;
39
+ }
40
+ if (CompareUtil.isNumber(data.bubbleMaxRadius)) {
41
+ scaleFactors.bubbleMaxRadius = data.bubbleMaxRadius;
42
+ }
43
+ if (CompareUtil.isNumber(data.bubbleMinRadius)) {
44
+ scaleFactors.bubbleMinRadius = data.bubbleMinRadius;
45
+ }
46
+ if (CompareUtil.isNumber(data.axisTickLength)) {
47
+ scaleFactors.axisTickLength = data.axisTickLength;
48
+ }
49
+ if (CompareUtil.isNumber(data.labelToMark)) {
50
+ scaleFactors.labelToMark = data.labelToMark;
51
+ }
52
+ if (CompareUtil.isNumber(data.legendSwatch)) {
53
+ scaleFactors.legendSwatch = data.legendSwatch;
54
+ }
55
+ if (CompareUtil.isNumber(data.panelGap)) {
56
+ scaleFactors.panelGap = data.panelGap;
57
+ }
58
+ if (CompareUtil.isNumber(data.refLineWidth)) {
59
+ scaleFactors.refLineWidth = data.refLineWidth;
60
+ }
61
+ if (CompareUtil.isNumber(data.gridLineWidth)) {
62
+ scaleFactors.gridLineWidth = data.gridLineWidth;
63
+ }
64
+ return scaleFactors;
65
+ }
66
+ default() {
67
+ return new ScaleFactorsXYChart();
68
+ }
69
+ }
@@ -0,0 +1,52 @@
1
+ import { CompareUtil } from "../../helper/CompareUtil";
2
+ import { XY_SERIES_PALETTE } from "../SeriesPalette";
3
+ /**
4
+ * Aggregates all style configuration for an XY chart (scatter/bubble):
5
+ * scale factors, fonts, axis styles, the series color palette, and padding.
6
+ *
7
+ * The analog of {@link TimeChartStyle} with `seriesColors` in place of
8
+ * `stackColors` and no variance styles (variance measures position points,
9
+ * they don't color them).
10
+ */
11
+ export class XYChartStyle {
12
+ constructor(scaleFactors, fontStyles, axisStyles, padding) {
13
+ this.scaleFactors = scaleFactors;
14
+ this.fontStyles = fontStyles;
15
+ this.axisStyles = axisStyles;
16
+ this.padding = padding;
17
+ this.seriesColors = [...XY_SERIES_PALETTE];
18
+ }
19
+ }
20
+ /** Adapts raw componentStyle JSON into an XYChartStyle, falling back to defaults for missing properties. */
21
+ export class XYChartStylesAdapter {
22
+ constructor(scaleFactorsXYChartAdapter, fontStyleAdapter, svgStyleGroupAdapter, paddingAdapter) {
23
+ this.scaleFactorsXYChartAdapter = scaleFactorsXYChartAdapter;
24
+ this.fontStyleAdapter = fontStyleAdapter;
25
+ this.svgStyleGroupAdapter = svgStyleGroupAdapter;
26
+ this.paddingAdapter = paddingAdapter;
27
+ }
28
+ adapt(data) {
29
+ const styles = this.default();
30
+ if (CompareUtil.isExisting(data)) {
31
+ if (CompareUtil.isExisting(data.scaleFactors)) {
32
+ styles.scaleFactors = this.scaleFactorsXYChartAdapter.adapt(data.scaleFactors);
33
+ }
34
+ if (CompareUtil.isExisting(data.fontStyles)) {
35
+ styles.fontStyles = this.fontStyleAdapter.adapt(data.fontStyles);
36
+ }
37
+ if (CompareUtil.isExisting(data.axisStyles)) {
38
+ styles.axisStyles = this.svgStyleGroupAdapter.adapt(data.axisStyles);
39
+ }
40
+ if (CompareUtil.isExisting(data.padding)) {
41
+ styles.padding = this.paddingAdapter.adapt(data.padding);
42
+ }
43
+ if (Array.isArray(data.seriesColors) && data.seriesColors.length > 0) {
44
+ styles.seriesColors = data.seriesColors;
45
+ }
46
+ }
47
+ return styles;
48
+ }
49
+ default() {
50
+ return new XYChartStyle(this.scaleFactorsXYChartAdapter.default(), this.fontStyleAdapter.default(), this.svgStyleGroupAdapter.default(), this.paddingAdapter.default());
51
+ }
52
+ }
@@ -0,0 +1 @@
1
+ import{C as n}from"./CompareUtil.js";function i(n,i){var o;const e=null!==(o=null==n?void 0:n.trim())&&void 0!==o?o:"";if(""===e||"null"===e)return{data:null,parseError:!1};if(e.startsWith("{")||e.startsWith("["))try{const n=JSON.parse(e);return"object"!=typeof n||null===n||Array.isArray(n)?{data:null,parseError:!0}:{data:n,parseError:!1}}catch(n){return{data:null,parseError:!0}}return null!==i?{data:{[i]:e},parseError:!1}:{data:null,parseError:!0}}function o(n,i){return Object.keys(n).filter((n=>!i.includes(n)))}function e(i,o,e){if(n.isExisting(i[o]))return n.isString(i[o])?i[o]:void e.push(o)}function r(i,o,e){if(n.isExisting(i[o]))return n.isNumber(i[o])?i[o]:void e.push(o)}const t=["measure","label","unit","min","max","refLine","highlight"];function u(i){const u=[],l=e(i,"measure",u);if(void 0===l||""===l.trim())return u.push("measure"),{config:null,unknownKeys:o(i,t),invalidFields:u};const s={measure:l.trim()};return s.label=e(i,"label",u),s.unit=e(i,"unit",u),s.min=r(i,"min",u),s.max=r(i,"max",u),s.refLine=r(i,"refLine",u),s.highlight=function(i,o){if(!n.isExisting(i.highlight))return;if(!n.isObject(i.highlight)||Array.isArray(i.highlight))return void o.push("highlight");const e=i.highlight,t={},u=r(e,"from",o),l=r(e,"to",o);return void 0!==u&&(t.from=u),void 0!==l&&(t.to=l),t}(i,u),{config:s,unknownKeys:o(i,t),invalidFields:u}}const l=["measure","label","unit","group"];function s(n){const i=[],r=e(n,"measure",i);if(void 0===r||""===r.trim())return i.push("measure"),{config:null,unknownKeys:o(n,l),invalidFields:i};const t={measure:r.trim()};return t.label=e(n,"label",i),t.unit=e(n,"unit",i),t.group=e(n,"group",i),{config:t,unknownKeys:o(n,l),invalidFields:i}}const a=["measure"];function c(n){const i=[],r=e(n,"measure",i);return void 0===r||""===r.trim()?(i.push("measure"),{config:null,unknownKeys:o(n,a),invalidFields:i}):{config:{measure:r.trim()},unknownKeys:o(n,a),invalidFields:i}}const f=["values","label","unit","highlight"];function d(i){const t=[];let u=null;if("auto"===i.values?u="auto":n.isArray(i.values)&&i.values.every((i=>n.isNumber(i)))?u=i.values:t.push("values"),null===u)return{config:null,unknownKeys:o(i,f),invalidFields:t};const l={values:u};if(l.label=e(i,"label",t),l.unit=e(i,"unit",t),n.isExisting(i.highlight))if(n.isObject(i.highlight)&&!Array.isArray(i.highlight)){const n=r(i.highlight,"from",t);void 0!==n&&(l.highlight={from:n})}else t.push("highlight");return{config:l,unknownKeys:o(i,f),invalidFields:t}}const v=["points","values","max"];function m(i,e){const r=[],t={points:e.points,values:e.values,max:e.max};return n.isExisting(i.points)&&("auto"===i.points||"none"===i.points||"all"===i.points||n.isArray(i.points)&&i.points.every((i=>n.isString(i)))?t.points=i.points:r.push("points")),n.isExisting(i.values)&&(n.isBoolean(i.values)?t.values=i.values:r.push("values")),n.isExisting(i.max)&&(n.isNumber(i.max)&&i.max>0?t.max=Math.floor(i.max):r.push("max")),{config:t,unknownKeys:o(i,v),invalidFields:r}}const g=["level","columns"];function h(i){const e=[],r=n.isString(i.level)?i.level.toLowerCase():null;if("rowgroup"!==r&&"category"!==r)return e.push("level"),{config:null,unknownKeys:o(i,g),invalidFields:e};const t={level:r};return n.isExisting(i.columns)&&(n.isNumber(i.columns)&&i.columns>=1?t.columns=Math.floor(i.columns):e.push("columns")),{config:t,unknownKeys:o(i,g),invalidFields:e}}const p=["show","position"];function y(i){const e=[],r={show:!0,position:"right"};return n.isExisting(i.show)&&(n.isBoolean(i.show)?r.show=i.show:e.push("show")),n.isExisting(i.position)&&("right"===i.position||"bottom"===i.position?r.position=i.position:e.push("position")),{config:r,unknownKeys:o(i,p),invalidFields:e}}export{s as a,c as b,h as c,m as d,y as e,d as f,i as p,u as t}
@@ -0,0 +1 @@
1
+ import{D as t}from"./luxon.js";var n,a,s,o,e,r,c,i;!function(t){t.ALL="all",t.META="meta"}(n||(n={})),function(t){t.CURRENCY="currency",t.VOLUME="volume"}(a||(a={})),function(t){t.AC1="ac1",t.AC2="ac2",t.AC3="ac3",t.AC4="ac4",t.PP1="pp1",t.PP2="pp2",t.PP3="pp3",t.PP4="pp4",t.FC1="fc1",t.FC2="fc2",t.FC3="fc3",t.FC4="fc4",t.PL1="pl1",t.PL2="pl2",t.PL3="pl3",t.PL4="pl4"}(s||(s={})),function(t){t.POS="pos",t.NEG="neg",t.NEU="neu"}(o||(o={})),function(t){t.DECIMAL="decimal",t.PERCENT="percent"}(e||(e={})),function(t){t.LIST="list",t.SUM="sum",t.SUMNOTOTAL="sumnototal",t.OPT="opt",t.OPTNOTOTAL="optnototal"}(r||(r={})),function(t){t.INF="inf",t.W100="w100",t.W50="w50",t.W25="w25",t.W20="w20",t.W15="w15",t.W10="w10",t.W5="w5"}(c||(c={})),function(t){t.W5="w5",t.W10="w10",t.W15="w15",t.W20="w20",t.W25="w25",t.W30="w30",t.W40="w40",t.W60="w60",t.W80="w80",t.W100="w100"}(i||(i={}));const u={[i.W5]:5,[i.W10]:10,[i.W15]:15,[i.W20]:20,[i.W25]:25,[i.W30]:30,[i.W40]:40,[i.W60]:60,[i.W80]:80,[i.W100]:100};var l,f,p,w,m,b;!function(t){t.ROWGROUP="rowGroup",t.ROWGROUPINDEX="rowGroupIndex",t.CATEGORY="category",t.CATEGORYINDEX="categoryIndex",t.SUBCATEGORY="subCategory",t.SUBCATEGORYINDEX="subCategoryIndex"}(l||(l={})),function(t){t.SMART="smart",t.LONG="long",t.SHORT="short"}(f||(f={})),function(t){t.COLUMN="column",t.LINE="line",t.WATERFALL="waterfall"}(p||(p={})),function(t){t.BAR="bar",t.LINE="line",t.AUTO="auto"}(w||(w={})),function(t){t.SCENARIOS="scenarios",t.DIMENSIONS="dimensions"}(m||(m={})),function(t){t.ABSOLUTE="absolute",t.RELATIVE="relative",t.ABSOLUTE_RELATIVE="absolute-relative"}(b||(b={}));const y=100;var g;!function(t){t.ASC="asc",t.DESC="desc",t.DATASET="dataset"}(g||(g={}));class d{static isExisting(t){return null!=t}static isString(t){return"string"==typeof t}static isNumber(t){return"number"==typeof t&&!Number.isNaN(t)}static isBoolean(t){return"boolean"==typeof t}static isArray(t){return Array.isArray(t)}static isObject(t){return"object"==typeof t&&null!==t}static isOperator(t){return"+"===t||"-"===t}static isDate(n){return n instanceof t&&n.isValid}}export{l as A,u as B,d as C,e as D,n as I,a as M,y as R,s as S,i as T,o as a,f as b,r as c,c as d,m as e,g as f,b as g,w as h}
@@ -1 +1 @@
1
- import{i as e}from"./Order.js";class t{constructor(e="",t=1){this.prefix=e,this.value=t}}var a;!function(e){e[e.Y=1e24]="Y",e[e.Z=1e21]="Z",e[e.E=1e18]="E",e[e.P=1e15]="P",e[e.T=1e12]="T",e[e.G=1e9]="G",e[e.M=1e6]="M",e[e.k=1e3]="k",e[e.h=100]="h",e[e.da=10]="da",e[e.d=.1]="d",e[e.c=.01]="c",e[e.m=.001]="m",e[e.my=1e-6]="my",e[e.n=1e-9]="n",e[e.p=1e-12]="p",e[e.f=1e-15]="f",e[e.a=1e-18]="a",e[e.z=1e-21]="z",e[e.y=1e-24]="y"}(a||(a={}));class r{static calculateMeasureScale(e,a,r,n){var s,i;if("_"===n)return new t;if(null!=n&&[...this.unitsLeast,...this.unitsGreat].includes(n))return this.lookupPrefix(n);if(0===r.length||!a)return new t;const u=`SELECT MAX(GREATEST(${r.filter((e=>3===e.length)).map((e=>"ABS("+e+")")).toString()})) as prefixvalue\n FROM ${a}`,c=`SELECT MIN(LEAST(${r.filter((e=>3===e.length)).map((e=>"ABS("+e+")")).toString()})) as prefixvalue\n FROM ${a}`;let l,h=u;"LEAST"===(null==n?void 0:n.toUpperCase())&&(h=c);try{l=null!==(i=null===(s=e.exec(h)[0])||void 0===s?void 0:s.prefixvalue)&&void 0!==i?i:0}catch(e){return console.error("DataAnalyzer: measure-scale query failed",h,e),new t}return this.determinePrefix(Math.abs(l))}static determinePrefix(e){if(e>=1e3){const a=Math.floor(Math.floor(Math.abs(e)).toString().length/3),r=+Math.pow(1e3,a);return new t(this.unitsGreat[a-1],r)}if(e<=.001){const a=Math.floor(Math.abs(e).toString().length/3),r=1/Math.pow(1e3,a);return new t(this.unitsLeast[a-1],r)}return new t}static lookupPrefix(e){return new t(e,a[e])}}r.unitsGreat=["k","M","G","T","P","E","Z","Y"],r.unitsLeast=["m","my","n","p","P","f","a","z","y"];class n{constructor(e=2,t=1){this.percent=e,this.decimal=t}}class s{adapt(t){const a=new n;return e.isNumber(t.percent)&&(a.percent=t.percent),e.isNumber(t.decimal)&&(a.decimal=t.decimal),a}default(){return new n}}export{r as D,t as S,n as a,s as b}
1
+ import{S as e}from"./SiPrefix.js";import{C as t}from"./CompareUtil.js";var a;!function(e){e[e.Y=1e24]="Y",e[e.Z=1e21]="Z",e[e.E=1e18]="E",e[e.P=1e15]="P",e[e.T=1e12]="T",e[e.G=1e9]="G",e[e.M=1e6]="M",e[e.k=1e3]="k",e[e.h=100]="h",e[e.da=10]="da",e[e.d=.1]="d",e[e.c=.01]="c",e[e.m=.001]="m",e[e.my=1e-6]="my",e[e.n=1e-9]="n",e[e.p=1e-12]="p",e[e.f=1e-15]="f",e[e.a=1e-18]="a",e[e.z=1e-21]="z",e[e.y=1e-24]="y"}(a||(a={}));class r{static calculateMeasureScale(t,a,r,n){var s,i;if("_"===n)return new e;if(null!=n&&[...this.unitsLeast,...this.unitsGreat].includes(n))return this.lookupPrefix(n);if(0===r.length||!a)return new e;const u=`SELECT MAX(GREATEST(${r.filter((e=>3===e.length)).map((e=>"ABS("+e+")")).toString()})) as prefixvalue\n FROM ${a}`,l=`SELECT MIN(LEAST(${r.filter((e=>3===e.length)).map((e=>"ABS("+e+")")).toString()})) as prefixvalue\n FROM ${a}`;let c,o=u;"LEAST"===(null==n?void 0:n.toUpperCase())&&(o=l);try{c=null!==(i=null===(s=t.exec(o)[0])||void 0===s?void 0:s.prefixvalue)&&void 0!==i?i:0}catch(t){return console.error("DataAnalyzer: measure-scale query failed",o,t),new e}return this.determinePrefix(Math.abs(c))}static determinePrefix(t){if(t>=1e3){const a=Math.floor(Math.floor(Math.abs(t)).toString().length/3),r=+Math.pow(1e3,a);return new e(this.unitsGreat[a-1],r)}if(t<=.001){const a=Math.floor(Math.abs(t).toString().length/3),r=1/Math.pow(1e3,a);return new e(this.unitsLeast[a-1],r)}return new e}static lookupPrefix(t){return new e(t,a[t])}}r.unitsGreat=["k","M","G","T","P","E","Z","Y"],r.unitsLeast=["m","my","n","p","P","f","a","z","y"];class n{constructor(e=2,t=1){this.percent=e,this.decimal=t}}class s{adapt(e){const a=new n;return t.isNumber(e.percent)&&(a.percent=e.percent),t.isNumber(e.decimal)&&(a.decimal=e.decimal),a}default(){return new n}}export{r as D,n as a,s as b}
@@ -0,0 +1 @@
1
+ import{S as t}from"./SiPrefix.js";import{F as s}from"./formatter.js";import"./CompareUtil.js";import{g as i}from"./stackColors.js";var e;!function(t){t[t.Left=0]="Left",t[t.Center=1]="Center",t[t.Right=2]="Right",t[t.Top=3]="Top",t[t.Bottom=4]="Bottom"}(e||(e={}));class r{constructor(t,s,i,r,h,n,o,a){this.ID_SCENARIOLABEL="Label",this.CSS_CATEGORIES="categories",this.isRelativeLabel=!1,this.segmentFillColor=null,this.x=s,this.y=i,this.value=h,this.group=t.group().id(this.createElementID(t.toString(),r)),this.styles=n,this.isVarianceLabel=!1,this.verticalHookLocation=o||e.Top,this.horizontalHookLocation=a||e.Left}setToVarianceLabel(){return this.isVarianceLabel=!0,this}setToRelativeVarianceLabel(){return this.isVarianceLabel=!0,this.isRelativeLabel=!0,this}setSegmentFill(t){return this.segmentFillColor=t,this}updateGroup(t){return this.group=t,this}draw(i=!0,e={percent:2,decimal:1},r=new t){if(this.isEmpty())return this;const h=this.group;let n,o="";if(!1===Number.isNaN(Number(this.value))){let t="percent",i=e.percent,h=e.percent,a=1;!1===this.isRelativeLabel&&(i=e.decimal,h=e.decimal,a=r.value,t="decimal"),n=s.number(Number(this.value),t,i,h,a),this.isVarianceLabel&&Number(this.value)>=0&&(o="+")}else n=""+this.value;const a=this.drawLabel(h,o+n);return!1===i&&(a.addClass("hide"),h.addClass("hide")),this}isEmpty(){return null==this.value||""===this.value}setPos(t,s){return this.x=t,this.y=s,this}forceStringTypeDraw(){return this.drawLabel(this.group,""+this.value),this}drawLabel(t,s){const r=this.styles.fontStyles.background||"#ffffff";let h="start";const n=t.text(s);n.move(this.x,this.y);const o=n.bbox().w,a=n.bbox().h;let l=0,c=0;const u=n.x();let f=n.y();return this.horizontalHookLocation===e.Left?(h="left",l=n.x()):this.horizontalHookLocation===e.Center?(h="middle",l=n.x()-(o+2)/2):this.horizontalHookLocation===e.Right&&(h="end",l=n.x()-o),this.verticalHookLocation===e.Center?(f=n.y()-1.2*a/2,c=f+.2*a):this.verticalHookLocation===e.Top?(f-=a/4,c=f+.2*a):this.verticalHookLocation===e.Bottom&&(f-=a,c=f+.2*a),n.move(u,f),n.font({anchor:h}),null!=this.segmentFillColor?n.fill(i(this.segmentFillColor)):t.rect(o+2,.8*a).stroke(r).fill(r).opacity(.9).move(l-1,c).insertBefore(n),n}createElementID(t,s){return t+"_"+s+"_"+this.ID_SCENARIOLABEL}}const h={ac:1,pp:2,fc:3,pl:4};var n;!function(t){t[t.Above=0]="Above",t[t.Below=1]="Below",t[t.Left=2]="Left",t[t.Right=3]="Right"}(n||(n={}));class o{constructor(){this.labels=[],this.scenarioLabels=[]}clear(){this.labels=[],this.scenarioLabels=[]}register(t){this.labels.push(t)}hasCollision(t){return this.labels.some((s=>this.intersects(t,s)))}getOptimalPlacement(t,s,i,e,r,n,o,a){const l=h[o]||99,c=n/2;for(const h of a){const n=this.calculatePlacementForDirection(t,s,i,e,r,c,8,h);if(!this.hasCollision(n.bounds))return n}for(const h of a){const n=this.calculatePlacementForDirection(t,s,i,e,r,c,8,h);if(!this.collidesWithHigherPriority(n.bounds,l))return n}return null}calculatePlacementForDirection(t,s,i,r,h,o,a,l){let c,u,f,m,p,b;switch(l){case n.Above:c=t,u=s-o-a,f=e.Bottom,m=e.Center,p=t-i/2,b=s-o-a-r;break;case n.Below:c=t,u=s+o+a,f=e.Top,m=e.Center,p=t-i/2,b=s+o+a-r/4;break;case n.Left:c=t-o-a,u=s,f=e.Center,m=e.Right,p=t-o-a-i,b=s-.6*r;break;case n.Right:c=t+o+a,u=s,f=e.Center,m=e.Left,p=t+o+a,b=s-.6*r}return{labelX:c,labelY:u,verticalHook:f,horizontalHook:m,bounds:{x:p,y:b,width:i,height:r,pointIndex:h,preferredHook:f}}}collidesWithHigherPriority(t,s){return this.labels.some((i=>!!i.scenarioType&&((h[i.scenarioType]||99)<s&&this.intersects(t,i))))}shouldHideScenarioLabel(t,s,i,e=20){const r=h[i]||99;return!(r<=1)&&this.scenarioLabels.some((i=>{if((h[i.scenarioType]||99)>=r)return!1;const n=Math.abs(s-i.y),o=Math.abs(t-i.x);return n<e&&o<e}))}registerScenarioLabel(t,s,i){this.scenarioLabels.push({x:t,y:s,scenarioType:i})}intersects(t,s){return!(t.x+t.width<s.x||s.x+s.width<t.x||t.y+t.height<s.y||s.y+s.height<t.y)}getLabelCount(){return this.labels.length}}export{e as H,o as L,h as S,r as a,n as b}
@@ -0,0 +1 @@
1
+ class t{constructor(t,s,i,h){this.domainMin=t,this.domainMax=s,this.rangeMin=i,this.rangeMax=h}scale(t){const s=this.domainMax-this.domainMin;return 0===s?(this.rangeMin+this.rangeMax)/2:this.rangeMin+(t-this.domainMin)/s*(this.rangeMax-this.rangeMin)}static domain(t,s,i,h=.04){let n=s-t;if(0===n){const i=0===t?1:.1*Math.abs(t);n=(s+=i)-(t-=i)}return[void 0!==(null==i?void 0:i.min)?i.min:t-n*h,void 0!==(null==i?void 0:i.max)?i.max:s+n*h]}static niceStep(t,s){if(t<=0||s<=0)return 1;const i=t/s,h=Math.pow(10,Math.floor(Math.log10(i))),n=i/h;let r;return r=n<=1?1:n<=2?2:n<=2.5?2.5:n<=5?5:10,r*h}ticks(s){const i=this.domainMax-this.domainMin;if(i<=0)return[this.domainMin];const h=t.niceStep(i,s),n=[];for(let t=Math.ceil(this.domainMin/h)*h;t<=this.domainMax+1e-9*h;t+=h)n.push(Math.abs(t)<1e-9*h?0:t);return n}static tickDecimals(t){let s=0;for(const i of t){const t=String(i),h=t.indexOf(".");h>=0&&(s=Math.max(s,Math.min(2,t.length-h-1)))}return s}}export{t as N}
@@ -1 +1 @@
1
- import{D as t}from"./luxon.js";var a,n,s,r,o,c,e,i;!function(t){t.ALL="all",t.META="meta"}(a||(a={})),function(t){t.CURRENCY="currency",t.VOLUME="volume"}(n||(n={})),function(t){t.AC1="ac1",t.AC2="ac2",t.AC3="ac3",t.AC4="ac4",t.PP1="pp1",t.PP2="pp2",t.PP3="pp3",t.PP4="pp4",t.FC1="fc1",t.FC2="fc2",t.FC3="fc3",t.FC4="fc4",t.PL1="pl1",t.PL2="pl2",t.PL3="pl3",t.PL4="pl4"}(s||(s={})),function(t){t.POS="pos",t.NEG="neg",t.NEU="neu"}(r||(r={})),function(t){t.DECIMAL="decimal",t.PERCENT="percent"}(o||(o={})),function(t){t.LIST="list",t.SUM="sum",t.SUMNOTOTAL="sumnototal",t.OPT="opt",t.OPTNOTOTAL="optnototal"}(c||(c={})),function(t){t.INF="inf",t.W100="w100",t.W50="w50",t.W25="w25",t.W20="w20",t.W15="w15",t.W10="w10",t.W5="w5"}(e||(e={})),function(t){t.W5="w5",t.W10="w10",t.W15="w15",t.W20="w20",t.W25="w25",t.W30="w30",t.W40="w40",t.W60="w60",t.W80="w80",t.W100="w100"}(i||(i={}));const u={[i.W5]:5,[i.W10]:10,[i.W15]:15,[i.W20]:20,[i.W25]:25,[i.W30]:30,[i.W40]:40,[i.W60]:60,[i.W80]:80,[i.W100]:100};var p,l,f,w,d,y,g,b,m;!function(t){t.ROWGROUP="rowGroup",t.ROWGROUPINDEX="rowGroupIndex",t.CATEGORY="category",t.CATEGORYINDEX="categoryIndex",t.SUBCATEGORY="subCategory",t.SUBCATEGORYINDEX="subCategoryIndex"}(p||(p={})),function(t){t.SMART="smart",t.LONG="long",t.SHORT="short"}(l||(l={})),function(t){t.COLUMN="column",t.LINE="line",t.WATERFALL="waterfall"}(f||(f={})),function(t){t.BAR="bar",t.LINE="line",t.AUTO="auto"}(w||(w={})),function(t){t.SCENARIOS="scenarios",t.DIMENSIONS="dimensions"}(d||(d={})),function(t){t.ABSOLUTE="absolute",t.RELATIVE="relative",t.ABSOLUTE_RELATIVE="absolute-relative"}(y||(y={})),function(t){t.ASC="asc",t.DESC="desc",t.DATASET="dataset"}(g||(g={}));class x{static isExisting(t){return null!=t}static isString(t){return"string"==typeof t}static isNumber(t){return"number"==typeof t&&!Number.isNaN(t)}static isBoolean(t){return"boolean"==typeof t}static isArray(t){return Array.isArray(t)}static isObject(t){return"object"==typeof t&&null!==t}static isOperator(t){return"+"===t||"-"===t}static isDate(a){return a instanceof t&&a.isValid}}class v{static adaptDefaultString(t){return x.isString(t)?t.trim():""}static adaptArray(t,a){const n=[];return x.isArray(t)&&t.forEach((t=>{n.push(a.adapt(t))})),n}}!function(t){t.ASC="asc",t.DESC="desc"}(b||(b={})),function(t){t.ROWGROUP="rowGroup",t.ROWGROUPINDEX="rowGroupIndex",t.CATEGORY="category",t.CATEGORYINDEX="categoryIndex",t.SUBCATEGORY="subCategory",t.SUBCATEGORYINDEX="subCategoryIndex",t.AC1="ac1",t.AC2="ac2",t.AC3="ac3",t.AC4="ac4",t.PP1="pp1",t.PP2="pp2",t.PP3="pp3",t.PP4="pp4",t.FC1="fc1",t.FC2="fc2",t.FC3="fc3",t.FC4="fc4",t.PL1="pl1",t.PL2="pl2",t.PL3="pl3",t.PL4="pl4"}(m||(m={}));class I{constructor(t=["category"],a=b.ASC){this.hierarchy=t,this.direction=a}}class h{constructor(t){this.stringAdapter=t}adapt(t){var a;const n=v.adaptArray(t.hierarchy,this.stringAdapter),s=b[null===(a=t.direction)||void 0===a?void 0:a.toUpperCase()]||b.ASC;return new I(n.map((t=>m[t.toUpperCase()]||m.CATEGORY)),s)}default(){return new I(["category"],b.ASC)}}export{p as A,u as B,w as C,o as D,a as I,n as M,b as O,s as S,i as T,r as a,m as b,l as c,c as d,e,d as f,g,y as h,x as i,v as j,h as k}
1
+ import{C as a}from"./CompareUtil.js";class t{static adaptDefaultString(t){return a.isString(t)?t.trim():""}static adaptArray(t,r){const c=[];return a.isArray(t)&&t.forEach((a=>{c.push(r.adapt(a))})),c}}var r,c;!function(a){a.ASC="asc",a.DESC="desc"}(r||(r={})),function(a){a.ROWGROUP="rowGroup",a.ROWGROUPINDEX="rowGroupIndex",a.CATEGORY="category",a.CATEGORYINDEX="categoryIndex",a.SUBCATEGORY="subCategory",a.SUBCATEGORYINDEX="subCategoryIndex",a.AC1="ac1",a.AC2="ac2",a.AC3="ac3",a.AC4="ac4",a.PP1="pp1",a.PP2="pp2",a.PP3="pp3",a.PP4="pp4",a.FC1="fc1",a.FC2="fc2",a.FC3="fc3",a.FC4="fc4",a.PL1="pl1",a.PL2="pl2",a.PL3="pl3",a.PL4="pl4"}(c||(c={}));class s{constructor(a=["category"],t=r.ASC){this.hierarchy=a,this.direction=t}}class o{constructor(a){this.stringAdapter=a}adapt(a){var o;const e=t.adaptArray(a.hierarchy,this.stringAdapter),p=r[null===(o=a.direction)||void 0===o?void 0:o.toUpperCase()]||r.ASC;return new s(e.map((a=>c[a.toUpperCase()]||c.CATEGORY)),p)}default(){return new s(["category"],r.ASC)}}export{t as A,r as O,c as a,s as b,o as c}