@bino-bi/bn-template-engine 1.0.0-alpha.3 → 1.0.0-alpha.5

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 (198) hide show
  1. package/dist/bn-template-engine/bn-template-engine.esm.js +1 -1
  2. package/dist/bn-template-engine/p-1265d8d3.entry.js +1 -0
  3. package/dist/bn-template-engine/p-15516dac.entry.js +1 -0
  4. package/dist/bn-template-engine/p-1c716641.entry.js +1 -0
  5. package/dist/bn-template-engine/p-27cc8dc0.entry.js +1 -0
  6. package/dist/bn-template-engine/p-3b4c7425.entry.js +1 -0
  7. package/dist/bn-template-engine/p-4426d484.entry.js +1 -0
  8. package/dist/bn-template-engine/p-51f8dc9e.entry.js +1 -0
  9. package/dist/bn-template-engine/p-53d4e690.entry.js +1 -0
  10. package/dist/bn-template-engine/p-5KQYRQLK.js +1 -0
  11. package/dist/bn-template-engine/p-7337e03d.entry.js +1 -0
  12. package/dist/bn-template-engine/{p-0f1504f3.entry.js → p-75e97c87.entry.js} +1 -1
  13. package/dist/bn-template-engine/p-7a560278.entry.js +1 -0
  14. package/dist/bn-template-engine/p-BYBpC0EO.js +1 -0
  15. package/dist/bn-template-engine/p-BfXY5dsy.js +1 -0
  16. package/dist/bn-template-engine/p-BgnHJQ9Q.js +1 -0
  17. package/dist/bn-template-engine/{p-B4ySv9KQ.js → p-Bhd_WSML.js} +1 -1
  18. package/dist/bn-template-engine/p-Bka-Z6jo.js +1 -0
  19. package/dist/bn-template-engine/p-Bnhh02CF.js +1 -0
  20. package/dist/bn-template-engine/p-C7dQL8CS.js +1 -0
  21. package/dist/bn-template-engine/p-CL1RYuNU.js +1 -0
  22. package/dist/bn-template-engine/p-CYwd_ZNM.js +1 -0
  23. package/dist/bn-template-engine/p-ChlK-T9I.js +1 -0
  24. package/dist/bn-template-engine/p-DHezf8pZ.js +1 -0
  25. package/dist/bn-template-engine/{p-DVMu6dEy.js → p-DlppAFq9.js} +1 -1
  26. package/dist/bn-template-engine/p-DvDDgmcV.js +1 -0
  27. package/dist/bn-template-engine/p-DvvwfRQG.js +1 -0
  28. package/dist/bn-template-engine/{p-DG-1MR_T.js → p-P7pGJBgc.js} +1 -1
  29. package/dist/bn-template-engine/p-abc0067c.entry.js +1 -0
  30. package/dist/bn-template-engine/p-b34eaf86.entry.js +1 -0
  31. package/dist/bn-template-engine/p-bdb8b44c.entry.js +1 -0
  32. package/dist/bn-template-engine/p-c44fcb8e.entry.js +1 -0
  33. package/dist/bn-template-engine/p-c7e1a49b.entry.js +1 -0
  34. package/dist/bn-template-engine/p-d9003041.entry.js +1 -0
  35. package/dist/bn-template-engine/p-daa7ffa3.entry.js +1 -0
  36. package/dist/bn-template-engine/p-e084f50a.entry.js +1 -0
  37. package/dist/bn-template-engine/p-eaba6658.entry.js +1 -0
  38. package/dist/bn-template-engine/{p-C0yAPzJz.js → p-u8igQLRZ.js} +1 -1
  39. package/dist/cjs/{DataFormatDigits-DAmZzqbD.js → DataFormatDigits-DKcOeLNK.js} +1 -1
  40. package/dist/cjs/{DateStringFactory-CcluhpGI.js → DateStringFactory-CSKvbS8K.js} +1 -1
  41. package/dist/cjs/{Order-BKoDS21t.js → Order-iG11HI4R.js} +8 -5
  42. package/dist/cjs/{SVGVariancesStyleGroup-DYYAU-81.js → SVGVariancesStyleGroup-K-Tw6lOD.js} +1 -14
  43. package/dist/cjs/bn-asset.cjs.entry.js +5 -4
  44. package/dist/cjs/bn-body_4.cjs.entry.js +15 -13
  45. package/dist/cjs/bn-card.cjs.entry.js +5 -4
  46. package/dist/cjs/{ibcs-chart-structure.cjs.entry.js → bn-chart-structure_5.cjs.entry.js} +1074 -30
  47. package/dist/cjs/bn-chart-time.cjs.entry.js +38 -12
  48. package/dist/cjs/bn-component-style.cjs.entry.js +5 -4
  49. package/dist/cjs/bn-dataset.cjs.entry.js +38 -9
  50. package/dist/cjs/bn-grid.cjs.entry.js +9 -7
  51. package/dist/cjs/bn-image.cjs.entry.js +9 -7
  52. package/dist/cjs/bn-internationalization.cjs.entry.js +5 -4
  53. package/dist/cjs/bn-layout-card.cjs.entry.js +3 -2
  54. package/dist/cjs/bn-layout-page.cjs.entry.js +2 -1
  55. package/dist/cjs/bn-message.cjs.entry.js +5 -4
  56. package/dist/cjs/bn-table.cjs.entry.js +981 -0
  57. package/dist/cjs/bn-template-engine.cjs.js +1 -1
  58. package/dist/cjs/bn-template.cjs.entry.js +3 -2
  59. package/dist/cjs/bn-text.cjs.entry.js +11 -9
  60. package/dist/cjs/bn-tree.cjs.entry.js +9 -7
  61. package/dist/cjs/contentDecoder-JxOldq1e.js +419 -0
  62. package/dist/cjs/{context-protocol-CRPmux5D.js → context-protocol-DRQWrwsA.js} +2 -0
  63. package/dist/cjs/editor-companion.cjs.entry.js +1 -1
  64. package/dist/cjs/emotion-hash.esm-nbbEQ0Dn.js +57 -0
  65. package/dist/cjs/ibcs-chart-time.cjs.entry.js +22 -18
  66. package/dist/cjs/{bn-context_5.cjs.entry.js → ibcs-table.cjs.entry.js} +122 -1293
  67. package/dist/cjs/{StringAdapter-Bneo8T4k.js → ibcsRuleSet-DgUoXOfd.js} +10 -10
  68. package/dist/cjs/index-Dm85hG6t.js +65 -0
  69. package/dist/cjs/loader.cjs.js +1 -1
  70. package/dist/cjs/{scaling-D8sIIKft.js → scaling-9Tz595RQ.js} +7 -7
  71. package/dist/cjs/{withHasError-B8gHkfV2.js → utils-CwHIVbbL.js} +1 -69
  72. package/dist/cjs/{withBodyObserver-C6gLgq_e.js → withBodyObserver-CKpSD8UT.js} +3 -3
  73. package/dist/cjs/{withComponentStatus-_x4LQZ0N.js → withComponentStatus-Bw70BhO0.js} +5 -5
  74. package/dist/cjs/{withComponentStyle-DMtic_9Y.js → withComponentStyle-aIbTCtfj.js} +5 -5
  75. package/dist/cjs/withHasError-D7ue5vAv.js +72 -0
  76. package/dist/cjs/{withStyled-CW30Bh6c.js → withStyled-CS1Yp4sv.js} +8 -61
  77. package/dist/cjs/{withTranslation-CWPAIRjh.js → withTranslation-rwgyITqe.js} +5 -5
  78. package/dist/collection/components/bn-chart-structure/bn-chart-structure.js +226 -99
  79. package/dist/collection/components/bn-chart-structure/ibcs-chart-structure.js +13 -3
  80. package/dist/collection/components/bn-chart-structure/utils/StructureChart.js +94 -11
  81. package/dist/collection/components/bn-chart-structure/utils/elements/Label.js +11 -0
  82. package/dist/collection/components/bn-chart-structure/utils/elements/StackedBar.js +8 -6
  83. package/dist/collection/components/bn-chart-structure/utils/model/styles/StructureChartStyle.js +4 -0
  84. package/dist/collection/components/bn-chart-time/bn-chart-time.js +28 -4
  85. package/dist/collection/components/bn-chart-time/utils/TimeChart.js +3 -3
  86. package/dist/collection/components/bn-chart-time/utils/elements/StackedColumn.js +3 -4
  87. package/dist/collection/components/bn-chart-time/utils/model/styles/TimeChartStyle.js +4 -0
  88. package/dist/collection/components/bn-dataset/bn-dataset.js +49 -2
  89. package/dist/collection/components/bn-datasource/bn-datasource.js +46 -3
  90. package/dist/collection/components/bn-table/bn-table.js +20 -21
  91. package/dist/collection/components/bn-table/ibcs-table.js +2 -2
  92. package/dist/collection/components/bn-table/utils/elements/CellBarChart.js +58 -41
  93. package/dist/collection/stores/componentStyles.js +2 -0
  94. package/dist/collection/utils/constants.js +8 -5
  95. package/dist/collection/utils/contentDecoder.js +28 -0
  96. package/dist/collection/utils/stackColors.js +2 -2
  97. package/dist/collection/utils/validate.js +1 -1
  98. package/dist/components/DataFormatDigits.js +1 -1
  99. package/dist/components/Order.js +1 -1
  100. package/dist/components/SVGVariancesStyleGroup.js +1 -1
  101. package/dist/components/bn-chart-structure.js +1 -1
  102. package/dist/components/bn-chart-time.js +1 -1
  103. package/dist/components/bn-dataset.js +1 -1
  104. package/dist/components/bn-datasource.js +1 -1
  105. package/dist/components/bn-table.js +1 -1
  106. package/dist/components/contentDecoder.js +1 -0
  107. package/dist/components/context-protocol.js +1 -1
  108. package/dist/components/emotion-hash.esm.js +1 -0
  109. package/dist/components/ibcs-chart-structure2.js +1 -1
  110. package/dist/components/ibcs-chart-time2.js +1 -1
  111. package/dist/components/ibcs-table2.js +1 -1
  112. package/dist/components/ibcs-title2.js +1 -1
  113. package/dist/components/ibcsRuleSet.js +1 -1
  114. package/dist/components/validate.js +1 -1
  115. package/dist/components/withStyled.js +1 -1
  116. package/dist/esm/{DataFormatDigits--qIbKvXa.js → DataFormatDigits-oSZ1hBKE.js} +1 -1
  117. package/dist/esm/{DateStringFactory-XWdUjsn8.js → DateStringFactory-CSGz6TDk.js} +1 -1
  118. package/dist/esm/{Order-sqjrku2z.js → Order-Bnhh02CF.js} +9 -6
  119. package/dist/esm/{SVGVariancesStyleGroup-ibg3sLjM.js → SVGVariancesStyleGroup-CqTjrZYg.js} +2 -13
  120. package/dist/esm/bn-asset.entry.js +5 -4
  121. package/dist/esm/bn-body_4.entry.js +11 -9
  122. package/dist/esm/bn-card.entry.js +5 -4
  123. package/dist/esm/{ibcs-chart-structure.entry.js → bn-chart-structure_5.entry.js} +1064 -24
  124. package/dist/esm/bn-chart-time.entry.js +38 -12
  125. package/dist/esm/bn-component-style.entry.js +5 -4
  126. package/dist/esm/bn-dataset.entry.js +35 -6
  127. package/dist/esm/bn-grid.entry.js +9 -7
  128. package/dist/esm/bn-image.entry.js +9 -7
  129. package/dist/esm/bn-internationalization.entry.js +5 -4
  130. package/dist/esm/bn-layout-card.entry.js +3 -2
  131. package/dist/esm/bn-layout-page.entry.js +2 -1
  132. package/dist/esm/bn-message.entry.js +5 -4
  133. package/dist/esm/bn-table.entry.js +979 -0
  134. package/dist/esm/bn-template-engine.js +1 -1
  135. package/dist/esm/bn-template.entry.js +3 -2
  136. package/dist/esm/bn-text.entry.js +11 -9
  137. package/dist/esm/bn-tree.entry.js +9 -7
  138. package/dist/esm/contentDecoder-oMmxz6nJ.js +416 -0
  139. package/dist/esm/{context-protocol-Bz5klD-F.js → context-protocol-BHnQsVsr.js} +2 -0
  140. package/dist/esm/editor-companion.entry.js +1 -1
  141. package/dist/esm/emotion-hash.esm-BYBpC0EO.js +55 -0
  142. package/dist/esm/ibcs-chart-time.entry.js +15 -11
  143. package/dist/esm/{bn-context_5.entry.js → ibcs-table.entry.js} +69 -1236
  144. package/dist/esm/{StringAdapter-BCLJpQQ8.js → ibcsRuleSet-K4ytuA1f.js} +10 -10
  145. package/dist/esm/index-DHezf8pZ.js +65 -0
  146. package/dist/esm/loader.js +1 -1
  147. package/dist/esm/{scaling-C6K8FYSF.js → scaling-Cehc74IE.js} +2 -2
  148. package/dist/esm/{withHasError-B3QX2emi.js → utils-DvvwfRQG.js} +1 -69
  149. package/dist/esm/{withBodyObserver-DczL5ia8.js → withBodyObserver-FQ8NwCIz.js} +1 -1
  150. package/dist/esm/{withComponentStatus-DodoSXe-.js → withComponentStatus-DWjDYtZ7.js} +1 -1
  151. package/dist/esm/{withComponentStyle-BerJY64r.js → withComponentStyle-9uP_hcDq.js} +2 -2
  152. package/dist/esm/withHasError-FyY5mQ_3.js +70 -0
  153. package/dist/esm/{withStyled-D1fAWJ3g.js → withStyled--qQWquTH.js} +6 -59
  154. package/dist/esm/{withTranslation-mimbJdER.js → withTranslation-BqD0Kp7b.js} +2 -2
  155. package/dist/types/components/bn-chart-structure/bn-chart-structure.d.ts +155 -109
  156. package/dist/types/components/bn-chart-structure/utils/StructureChart.d.ts +7 -0
  157. package/dist/types/components/bn-chart-structure/utils/elements/Label.d.ts +2 -0
  158. package/dist/types/components/bn-chart-structure/utils/model/styles/StructureChartStyle.d.ts +1 -0
  159. package/dist/types/components/bn-chart-time/utils/model/styles/TimeChartStyle.d.ts +1 -0
  160. package/dist/types/components/bn-dataset/bn-dataset.d.ts +6 -0
  161. package/dist/types/components/bn-datasource/bn-datasource.d.ts +8 -0
  162. package/dist/types/components/bn-table/bn-table.d.ts +10 -8
  163. package/dist/types/components/bn-table/utils/elements/CellBarChart.d.ts +0 -2
  164. package/dist/types/components.d.ts +102 -38
  165. package/dist/types/stores/componentStyles.d.ts +2 -0
  166. package/dist/types/utils/constants.d.ts +8 -5
  167. package/dist/types/utils/contentDecoder.d.ts +12 -0
  168. package/package.json +2 -1
  169. package/dist/bn-template-engine/p-05a82a77.entry.js +0 -1
  170. package/dist/bn-template-engine/p-1970906d.entry.js +0 -1
  171. package/dist/bn-template-engine/p-1dbd339c.entry.js +0 -1
  172. package/dist/bn-template-engine/p-2e68cf09.entry.js +0 -1
  173. package/dist/bn-template-engine/p-31cc6a2d.entry.js +0 -1
  174. package/dist/bn-template-engine/p-37881d05.entry.js +0 -1
  175. package/dist/bn-template-engine/p-3b894997.entry.js +0 -1
  176. package/dist/bn-template-engine/p-50e49732.entry.js +0 -1
  177. package/dist/bn-template-engine/p-6c7c0455.entry.js +0 -1
  178. package/dist/bn-template-engine/p-6da93eae.entry.js +0 -1
  179. package/dist/bn-template-engine/p-701e1578.entry.js +0 -1
  180. package/dist/bn-template-engine/p-8tsCnxIz.js +0 -1
  181. package/dist/bn-template-engine/p-997b2fe4.entry.js +0 -1
  182. package/dist/bn-template-engine/p-BL8gyUwE.js +0 -1
  183. package/dist/bn-template-engine/p-BSfqOkN_.js +0 -1
  184. package/dist/bn-template-engine/p-CRLgp9-v.js +0 -1
  185. package/dist/bn-template-engine/p-CYjZRKdI.js +0 -1
  186. package/dist/bn-template-engine/p-DRikHQE-.js +0 -1
  187. package/dist/bn-template-engine/p-DtdQCMzj.js +0 -1
  188. package/dist/bn-template-engine/p-a90f1cbe.entry.js +0 -1
  189. package/dist/bn-template-engine/p-b7bec050.entry.js +0 -1
  190. package/dist/bn-template-engine/p-d7f0cbaf.entry.js +0 -1
  191. package/dist/bn-template-engine/p-dfb61aa5.entry.js +0 -1
  192. package/dist/bn-template-engine/p-ece17f84.entry.js +0 -1
  193. package/dist/bn-template-engine/p-f27995c9.entry.js +0 -1
  194. package/dist/bn-template-engine/p-fd427179.entry.js +0 -1
  195. package/dist/bn-template-engine/p-sqjrku2z.js +0 -1
  196. package/dist/bn-template-engine/p-tzFCK9qn.js +0 -1
  197. package/dist/cjs/bn-chart-structure.cjs.entry.js +0 -700
  198. package/dist/esm/bn-chart-structure.entry.js +0 -698
@@ -63,44 +63,54 @@ export namespace Components {
63
63
  */
64
64
  interface BnChartStructure {
65
65
  /**
66
- * Custom chart title
66
+ * Title displayed above the chart. When empty, the title is derived from the variance scenario labels (if variances are configured).
67
+ * @example chart-title="Revenue by Category"
67
68
  * @default ""
68
69
  */
69
70
  "chartTitle": string;
70
71
  /**
71
- * AlaSQL WHERE clause fragment injected into the data query to filter rows before rendering (e.g. `"rowGroup = 'Revenue'"`).
72
+ * AlaSQL WHERE clause fragment injected into the data query to filter rows before rendering.
73
+ * @example filter="rowGroup = 'Revenue'"
72
74
  * @default ""
73
75
  */
74
76
  "filter": string;
75
77
  /**
76
- * Determines level on which the chart is aggregated on. <br /> <br /> values:<br/> ``` rowcategory // category // subcategory // auto``` <br /> <br /> When set to ```auto```, level is detected from the dataset silently. When left blank, level is detected from the dataset with a warning.
78
+ * Aggregation level that determines which hierarchy dimension each bar represents. | Value | Bars represent | |--------------------|---------------------------| | `"rowGroup"` | Row groups | | `"rowGroupIndex"` | Row groups (dataset order)| | `"category"` | Categories | | `"categoryIndex"` | Categories (dataset order)| | `"subCategory"` | Sub-categories | | `"subCategoryIndex"` | Sub-categories (dataset order)| | `"auto"` | Auto-detect from dataset metadata (no warning) | | not set / `""` | Auto-detect with `AUTO_level` warning | Index variants preserve the original dataset order instead of sorting alphabetically. When `stack.by` is `"dimensions"`, the chart automatically stacks by the next-lower level (e.g. level `"rowGroup"` stacks by category).
79
+ * @example level="category"
77
80
  */
78
81
  "level": string;
79
82
  /**
80
- * Set the maximum number of bars for each group. The value 0 means *no limit* <br /><br /> rows wich where cut by the limit are cumulated as REST
83
+ * Maximum number of bars to display. Excess rows are aggregated into a "REST" summary bar. `0` means no limit (all rows are shown).
81
84
  * @default 0
85
+ * @example limit="5"
82
86
  */
83
87
  "limit": number;
84
88
  /**
85
- * Sets the SiPrefix of the Mesaurements and converts the original value. <br /><br /> values: <br /> ```_ // k // M // G // T // P // E // Z // Y // m // μ // n // p // P // f // a // z // y // GREATEST // LEAST``` <br /><br /> SiPrefix overview: ``` "Y": 1E+24,```<br /> ``` "Z": 1E+21,```<br /> ``` "E": 1E+18,```<br /> ``` "P": 1E+15,```<br /> ``` "T": 1E+12,```<br /> ``` "G": 1000000000,```<br /> ``` "M": 1000000,```<br /> ``` "k": 1000,```<br /> <br /> ``` "m": 0.001,```<br /> ``` "μ": 0.000001,```<br /> ``` "n": 0.000000001,```<br /> ``` "p": 0.000000000001,```<br /> ``` "f": 0.000000000000001,```<br /> ``` "a": 0.000000000000000001,```<br /> ``` "z": 0.000000000000000000001,```<br /> ``` "y": 0.000000000000000000000001,```<br /> <br /><br /> Special modes: ```GREATEST``` seaches for the bigest (farest to zero) Value in the dataset and sets this value to SiPrefix<br /> ```LEAST``` searches for smallest (closest to zero) Value in the dataset and sets this value to SiPrefix<br /> <br /><br /> ```_``` is the value for no SiPrefix the value is displayed as in the dataset stored.
89
+ * SI prefix applied to data values, dividing them for display (e.g. `"k"` divides by 1 000, showing 14 000 as "14"). Common prefixes: `"k"` (×10³), `"M"` (×10⁶), `"G"` (×10⁹), `"T"` (×10¹²). Use `"_"` for no prefix (raw values). | Special value | Behavior | |---------------|--------------------------------------------------------------| | `"GREATEST"` | Auto-select prefix based on the largest value in the dataset | | `"LEAST"` | Auto-select prefix based on the smallest value | The selected prefix is shown in the chart footer when `show-measure-scale` is enabled.
86
90
  * @default "greatest"
91
+ * @example measure-scale="k"
87
92
  */
88
93
  "measureScale": string;
89
94
  /**
90
- * measureUnit displayed in table.
95
+ * Unit label displayed alongside the SI prefix in the chart footer (e.g. "EUR", "USD", "pcs"). Only visible when `show-measure-scale` is `"true"`.
91
96
  * @default ""
97
+ * @example measure-unit="EUR"
92
98
  */
93
99
  "measureUnit": string;
94
100
  /**
95
- * List of the primary scenarios on which the order direction are applied valid scenarios are If order is set to a scenario it has also exists in scenariolist <br /><br /> values:<br /> ``` category // categoryindex // rowgroup // rowgroup // rowgroupindex // ac[1-4] // fc[1-4] // py[1-4] // pl[1-4] // auto``` <br /><br /> When set to ```auto```, order is detected from the dataset silently. When left blank, order is detected from the dataset with a warning.
101
+ * Comma-separated list of columns that define the sort order of bars. When ordering by a scenario column, that scenario must also be listed in `scenarios`. Valid values: `category`, `categoryIndex`, `rowGroup`, `rowGroupIndex`, `subCategory`, `subCategoryIndex`, `ac1`–`ac4`, `fc1`–`fc4`, `pp1`–`pp4`, `pl1`–`pl4`. | Value | Behavior | |----------------|-----------------------------------------------------| | `"ac1"` | Sort bars by the ac1 scenario values | | `"category"` | Sort bars alphabetically by category name | | `"auto"` | Auto-detect from dataset metadata (no warning) | | not set / `""` | Auto-detect with `AUTO_order` warning |
102
+ * @example order="ac1"
96
103
  */
97
104
  "order": string;
98
105
  /**
99
- * set sorting order direction <br /><br /> values:<br /> ```asc // desc```
106
+ * Sort direction applied to the columns specified in `order`. Values: `"asc"` (ascending) | `"desc"` (descending).
107
+ * @default "asc"
108
+ * @example order-direction="desc"
100
109
  */
101
110
  "orderDirection": string;
102
111
  /**
103
- * Name of the 'scaling-group' which the chart uses scaling groups are maintained globally <br /> <br /> alternatively a number which represent the pixel per percentage.
112
+ * Controls scaling of relative variance bars (pixels per percentage point). | Value | Behavior | |----------------|---------------------------------------------------------------| | `"auto"` | Auto-fit to available width | | not set / `""` | Same as auto with warning | | `"50"`, `1.5` | Explicit pixels-per-percentage-point value | | group name | References a shared scaling group for synchronized charts |
113
+ * @example percentage-scaling="50"
104
114
  */
105
115
  "percentageScaling": string | number;
106
116
  /**
@@ -108,30 +118,39 @@ export namespace Components {
108
118
  */
109
119
  "scale"?: string;
110
120
  /**
111
- * List of Scenarios Map. <br /> <br /> per chart there are up to 4 different scenarios supported. The first 4 scenarios in the list are used, the rest ignored. <br /> <br /> values:<br /> ```ac // fc // pp // pl [1-4] // auto``` example:<br /> ```ac1,ac2,ac3,ac4``` <br /> <br /> When set to ```auto```, scenarios are detected from the dataset silently. When left blank, scenarios are detected from the dataset with a warning.
121
+ * Comma-separated list of scenario columns to display as bars. Up to 4 scenarios are supported; additional values are ignored. Valid scenario names: `ac1`–`ac4`, `fc1`–`fc4`, `pp1`–`pp4`, `pl1`–`pl4`. | Value | Behavior | |---------------|-------------------------------------------------------------| | `"ac1,fc1"` | Show the listed scenarios | | `"auto"` | Auto-detect from dataset metadata (no warning) | | not set / `""` | Auto-detect from dataset metadata (emits `AUTO_scenarios` warning) |
122
+ * @example scenarios="ac1,pp1,pl1"
112
123
  */
113
124
  "scenarios": string;
114
125
  /**
126
+ * Whether to display category labels on the left side of the chart. Values: `"true"` | `"false"`.
115
127
  * @default "true"
128
+ * @example show-categories="false"
116
129
  */
117
130
  "showCategories": string;
118
131
  /**
119
- * Toggles display of measure units in table header <br /><br /> values: <br /> ```true // false```
132
+ * Toggles display of the SI prefix and unit label in the chart footer (e.g. "k EUR"). Values: `"true"` | `"false"`.
120
133
  * @default "false"
134
+ * @example show-measure-scale="true"
121
135
  */
122
136
  "showMeasureScale": string;
123
137
  /**
124
- * Stacking configuration for the chart as a JSON string. When set, bars are drawn stacked (additive layers) instead of side-by-side.
125
- * @default '' (empty — no stacking)
126
- * @example stack='{"by":"scenario"}'
138
+ * Stacking configuration as a JSON string. When set, bars are drawn as stacked segments instead of side-by-side. **Properties:** | Key | Values | Description | |---------|-----------------------------------------------|----------------------------------------------------| | `by` | `"scenarios"` \| `"dimensions"` | **Required.** What to stack. | | `mode` | `"absolute"` \| `"relative"` \| `"absolute-relative"` | Stacking mode. Default: `"absolute"`. | | `order` | `"asc"` \| `"desc"` \| `"dataset"` | Segment sort order. Default: `"dataset"`. | - `by: "scenarios"` — stacks the scenarios listed in the `scenarios` prop end-to-end. - `by: "dimensions"` — stacks by the next-lower hierarchy level derived from `level` (e.g. level `"rowGroup"` stacks by category). Only the first scenario is used; extra scenarios trigger a `WARN_stack_dimensions_scenarios` warning. - `mode: "relative"` — normalizes each bar to 100%, showing proportions. - `mode: "absolute-relative"` — absolute bars with percentage labels. Segment colors are configurable via the `stackColors` array in component styles.
139
+ * @default "" (no stacking)
140
+ * @example stack='{"by":"scenarios","mode":"absolute"}'
141
+ * @example stack='{"by":"dimensions","mode":"relative"}'
127
142
  */
128
143
  "stack": string;
129
144
  /**
130
- * Name of the 'scaling-group' which the chart uses scaling groups are maintained globally <br /> <br /> alternatively a number which represent the pixel per measure unit.
145
+ * Controls horizontal bar scaling (pixels per data unit). | Value | Behavior | |----------------|-----------------------------------------------------------------| | `"auto"` | Auto-fit bars to fill the available container width (no warning) | | not set / `""` | Same as auto, but emits `AUTO_unitScaling` warning | | `"0.03"`, `1` | Explicit pixels-per-unit value; bars scale proportionally | | group name | References a shared scaling group for synchronized charts | When using a custom value that causes the chart to exceed its container, a `WARN_overflow` error is emitted.
146
+ * @example unit-scaling="auto"
147
+ * @example unit-scaling="0.05"
131
148
  */
132
149
  "unitScaling": string | number;
133
150
  /**
134
- * List of Variance Map. <br /> <br /> Variance chart can be added by seperating the scenarios of each chart with ```;```<br /> The additonal variances which are calculated form the given scenarios. the scenarios used in the variances have also be defined in the *scenarios* property. <br /> <br /> the variance is defiend as (Scenario A - ScenarioB) neu. neg and pos post fix defines which value is *good* a negative or a positive value. <br /> <br /> if empty variance charts are hidden <br /> <br /> each variance creates a chart <br /> <br /> pattern:<br /> ```d<scenarioB>_<scenarioA>_[pos/neg/neu]``` example: <br />```'dpp1_ac1_neg,dfc1_ac1_neg'```
151
+ * Comma-separated list of variance definitions. Each variance adds a separate sub-chart next to the main bar chart. **Pattern:** `d<base>_<comparison>_<sentiment>` (absolute) or `dr<base>_<comparison>_<sentiment>` (relative / percentage). - `base` / `comparison`: scenario names that must also appear in `scenarios`. - `sentiment`: `pos` (positive is good), `neg` (negative is good), `neu` (neutral). When empty, no variance charts are shown.
152
+ * @example variances="dpp1_ac1_neg,dfc1_ac1_neg"
153
+ * @example variances="drac1_pl1_pos"
135
154
  */
136
155
  "variances": string;
137
156
  }
@@ -286,6 +305,11 @@ export namespace Components {
286
305
  * Unique (template scope) name of the datasource
287
306
  */
288
307
  "name": string;
308
+ /**
309
+ * When true (default), body content is plain text (SQL or JSON). When false, body content is a compressed payload (`<hash>:<base64_gzip>`).
310
+ * @default true
311
+ */
312
+ "raw": boolean;
289
313
  /**
290
314
  * When true, bypasses the AlaSQL query engine and parses the body content as raw JSON, writing it directly to the datasets store.
291
315
  * @default false
@@ -297,12 +321,18 @@ export namespace Components {
297
321
  * Data is provided as JSON text inside the element body (observed via
298
322
  * `withBodyObserver`). Other components (e.g. `bn-dataset`) reference
299
323
  * the stored data by the `name` prop to run queries against it.
324
+ * Set `raw="false"` to accept pre-compressed payloads in `<hash>:<base64_gzip>` format.
300
325
  */
301
326
  interface BnDatasource {
302
327
  /**
303
328
  * Unique (template scope) name of the datasource
304
329
  */
305
330
  "name": string;
331
+ /**
332
+ * When true (default), body content is plain JSON text. When false, body content is a compressed payload (`<hash>:<base64_gzip>`).
333
+ * @default true
334
+ */
335
+ "raw": boolean;
306
336
  }
307
337
  interface BnFooter {
308
338
  /**
@@ -558,7 +588,7 @@ export namespace Components {
558
588
  interface BnTable {
559
589
  /**
560
590
  * Set width of bar chart columns. Controls the max bar/pin width in pixels. <br /><br /> values:<br /> ``` w5 // w10 // w15 // w20 // w25 // w30 // w40 // w60 // w80 // w100 ```
561
- * @default "w30"
591
+ * @default "w10"
562
592
  */
563
593
  "barColumnWidth": string;
564
594
  /**
@@ -641,7 +671,7 @@ export namespace Components {
641
671
  */
642
672
  "percentageScaling": string | number;
643
673
  /**
644
- * Controls proportional scaling of the entire table relative to the available parent width. All visual dimensions scale together: font size, em-based spacing/padding, SVG bar-chart widths, pin lengths, dot radii, pattern fills, axis strokes, and label offsets. Scaling is driven by a single factor applied to the base font size (`global.fontSizePx` from the component-style store, default 13.3333 px). Because the table's SCSS uses `em` units for padding, borders, and column widths, changing the font size cascades to all layout dimensions. SVG elements (bars, pins, patterns) receive the factor via the `scaleFactor` prop on `ibcs-table` and multiply every pixel constant by it, so they stay proportional to the surrounding text. | Value | Behavior | |---------------------|----------------------------------------------------------------------------------| | not set / `""` | Auto-scale to fit parent width; emit `AUTO_scale` warning with the applied factor | | `"none"` | No scaling (render at base font size regardless of available space) | | `"auto"` | Auto-scale to fit parent width silently (no warning) | | `"0.5"`, `"1.2"`, … | Fixed factor — apply `baseFontSize × factor` | **Auto-scale algorithm** (modes `""` and `"auto"`): 1. After each render, the CSS variable `--bn-font-size` is temporarily reset to the unscaled base size and a synchronous reflow is forced. 2. The unscaled `scrollWidth` of the table container is compared against the parent's content-box width (via `getParentDimensions`). 3. If the table overflows, `factor = parentWidth / unscaledScrollWidth` is computed and applied to both the CSS variable and the `appliedScaleFactor` state (which re-renders the SVG charts). 4. A guard flag (`_autoScaleGuard`) prevents the subsequent state-triggered re-render from re-measuring, avoiding an infinite measure → scale → fits → reset → overflow loop. Invalid values (negative numbers, non-numeric strings that are not `"none"` or `"auto"`) fall back to the default behaviour (auto + warning) and emit an `ERR_scale` warning.
674
+ * Controls proportional scaling of the entire table relative to the available parent width. All visual dimensions scale together: font size, em-based spacing/padding, SVG bar-chart widths, pin lengths, dot radii, pattern fills, axis strokes, and label offsets. Scaling is driven by a single factor applied to the base font size (`global.fontSizePx` from the component-style store, default 13.3333 px). Because the table's SCSS uses `em` units for padding, borders, and column widths, changing the font size cascades to all layout dimensions. SVG elements (bars, pins, patterns) receive the factor via the `scaleFactor` prop on `ibcs-table` and multiply every pixel constant by it, so they stay proportional to the surrounding text. | Value | Behavior | |---------------------|----------------------------------------------------------------------------------| | not set / `""` | Auto-scale to fit parent width; emit `AUTO_scale` warning with the applied factor | | `"none"` | No scaling (render at base font size regardless of available space) | | `"auto"` | Auto-scale to fit parent width silently (no warning) | | `"0.5"`, `"1.2"`, … | Fixed factor — apply `baseFontSize × factor` | **Auto-scale algorithm** (modes `""` and `"auto"`): 1. After each render, the current `scrollWidth` of the host element is divided by the current `appliedScaleFactor` to derive the unscaled content width. This avoids resetting `--bn-font-size` to base (which would only affect em-based widths but not SVG pixel attributes). 2. This unscaled width is compared against the parent's content-box width (via `getParentDimensions`). 3. If the table overflows, `factor = parentWidth / unscaledWidth` is computed and applied to both the CSS variable and the `appliedScaleFactor` state (which re-renders the SVG charts). 4. A guard flag (`_autoScaleGuard`) prevents the subsequent state-triggered re-render from re-measuring, avoiding an infinite measure → scale → fits → reset → overflow loop. Invalid values (negative numbers, non-numeric strings that are not `"none"` or `"auto"`) fall back to the default behaviour (auto + warning) and emit an `ERR_scale` warning.
645
675
  * @example // Auto-scale to parent (silent) <bn-table scale="auto" ...></bn-table> // Fixed 50 % reduction <bn-table scale="0.5" ...></bn-table> // Double size <bn-table scale="2" ...></bn-table> // No scaling — always render at base font size <bn-table scale="none" ...></bn-table>
646
676
  */
647
677
  "scale"?: string;
@@ -675,7 +705,7 @@ export namespace Components {
675
705
  */
676
706
  "type": string;
677
707
  /**
678
- * @deprecated Bars now scale proportionally via column statistics. Kept for backward compatibility. <br /><br /> Scaling for absolute variance bar charts (ΔPY). <br /><br /> Default: 0.01
708
+ * Pixels per unit for absolute variance bar charts (ΔPY). Controls bar width: barWidth = value × unitScaling. Bars exceeding barColumnWidth are shown with an arrow indicator. <br /><br /> Default: 0.01
679
709
  * @default 0.01
680
710
  */
681
711
  "unitScaling": string | number;
@@ -1224,6 +1254,7 @@ declare global {
1224
1254
  * Data is provided as JSON text inside the element body (observed via
1225
1255
  * `withBodyObserver`). Other components (e.g. `bn-dataset`) reference
1226
1256
  * the stored data by the `name` prop to run queries against it.
1257
+ * Set `raw="false"` to accept pre-compressed payloads in `<hash>:<base64_gzip>` format.
1227
1258
  */
1228
1259
  interface HTMLBnDatasourceElement extends Components.BnDatasource, HTMLStencilElement {
1229
1260
  }
@@ -1439,44 +1470,54 @@ declare namespace LocalJSX {
1439
1470
  */
1440
1471
  interface BnChartStructure {
1441
1472
  /**
1442
- * Custom chart title
1473
+ * Title displayed above the chart. When empty, the title is derived from the variance scenario labels (if variances are configured).
1474
+ * @example chart-title="Revenue by Category"
1443
1475
  * @default ""
1444
1476
  */
1445
1477
  "chartTitle"?: string;
1446
1478
  /**
1447
- * AlaSQL WHERE clause fragment injected into the data query to filter rows before rendering (e.g. `"rowGroup = 'Revenue'"`).
1479
+ * AlaSQL WHERE clause fragment injected into the data query to filter rows before rendering.
1480
+ * @example filter="rowGroup = 'Revenue'"
1448
1481
  * @default ""
1449
1482
  */
1450
1483
  "filter"?: string;
1451
1484
  /**
1452
- * Determines level on which the chart is aggregated on. <br /> <br /> values:<br/> ``` rowcategory // category // subcategory // auto``` <br /> <br /> When set to ```auto```, level is detected from the dataset silently. When left blank, level is detected from the dataset with a warning.
1485
+ * Aggregation level that determines which hierarchy dimension each bar represents. | Value | Bars represent | |--------------------|---------------------------| | `"rowGroup"` | Row groups | | `"rowGroupIndex"` | Row groups (dataset order)| | `"category"` | Categories | | `"categoryIndex"` | Categories (dataset order)| | `"subCategory"` | Sub-categories | | `"subCategoryIndex"` | Sub-categories (dataset order)| | `"auto"` | Auto-detect from dataset metadata (no warning) | | not set / `""` | Auto-detect with `AUTO_level` warning | Index variants preserve the original dataset order instead of sorting alphabetically. When `stack.by` is `"dimensions"`, the chart automatically stacks by the next-lower level (e.g. level `"rowGroup"` stacks by category).
1486
+ * @example level="category"
1453
1487
  */
1454
1488
  "level": string;
1455
1489
  /**
1456
- * Set the maximum number of bars for each group. The value 0 means *no limit* <br /><br /> rows wich where cut by the limit are cumulated as REST
1490
+ * Maximum number of bars to display. Excess rows are aggregated into a "REST" summary bar. `0` means no limit (all rows are shown).
1457
1491
  * @default 0
1492
+ * @example limit="5"
1458
1493
  */
1459
1494
  "limit"?: number;
1460
1495
  /**
1461
- * Sets the SiPrefix of the Mesaurements and converts the original value. <br /><br /> values: <br /> ```_ // k // M // G // T // P // E // Z // Y // m // μ // n // p // P // f // a // z // y // GREATEST // LEAST``` <br /><br /> SiPrefix overview: ``` "Y": 1E+24,```<br /> ``` "Z": 1E+21,```<br /> ``` "E": 1E+18,```<br /> ``` "P": 1E+15,```<br /> ``` "T": 1E+12,```<br /> ``` "G": 1000000000,```<br /> ``` "M": 1000000,```<br /> ``` "k": 1000,```<br /> <br /> ``` "m": 0.001,```<br /> ``` "μ": 0.000001,```<br /> ``` "n": 0.000000001,```<br /> ``` "p": 0.000000000001,```<br /> ``` "f": 0.000000000000001,```<br /> ``` "a": 0.000000000000000001,```<br /> ``` "z": 0.000000000000000000001,```<br /> ``` "y": 0.000000000000000000000001,```<br /> <br /><br /> Special modes: ```GREATEST``` seaches for the bigest (farest to zero) Value in the dataset and sets this value to SiPrefix<br /> ```LEAST``` searches for smallest (closest to zero) Value in the dataset and sets this value to SiPrefix<br /> <br /><br /> ```_``` is the value for no SiPrefix the value is displayed as in the dataset stored.
1496
+ * SI prefix applied to data values, dividing them for display (e.g. `"k"` divides by 1 000, showing 14 000 as "14"). Common prefixes: `"k"` (×10³), `"M"` (×10⁶), `"G"` (×10⁹), `"T"` (×10¹²). Use `"_"` for no prefix (raw values). | Special value | Behavior | |---------------|--------------------------------------------------------------| | `"GREATEST"` | Auto-select prefix based on the largest value in the dataset | | `"LEAST"` | Auto-select prefix based on the smallest value | The selected prefix is shown in the chart footer when `show-measure-scale` is enabled.
1462
1497
  * @default "greatest"
1498
+ * @example measure-scale="k"
1463
1499
  */
1464
1500
  "measureScale"?: string;
1465
1501
  /**
1466
- * measureUnit displayed in table.
1502
+ * Unit label displayed alongside the SI prefix in the chart footer (e.g. "EUR", "USD", "pcs"). Only visible when `show-measure-scale` is `"true"`.
1467
1503
  * @default ""
1504
+ * @example measure-unit="EUR"
1468
1505
  */
1469
1506
  "measureUnit"?: string;
1470
1507
  /**
1471
- * List of the primary scenarios on which the order direction are applied valid scenarios are If order is set to a scenario it has also exists in scenariolist <br /><br /> values:<br /> ``` category // categoryindex // rowgroup // rowgroup // rowgroupindex // ac[1-4] // fc[1-4] // py[1-4] // pl[1-4] // auto``` <br /><br /> When set to ```auto```, order is detected from the dataset silently. When left blank, order is detected from the dataset with a warning.
1508
+ * Comma-separated list of columns that define the sort order of bars. When ordering by a scenario column, that scenario must also be listed in `scenarios`. Valid values: `category`, `categoryIndex`, `rowGroup`, `rowGroupIndex`, `subCategory`, `subCategoryIndex`, `ac1`–`ac4`, `fc1`–`fc4`, `pp1`–`pp4`, `pl1`–`pl4`. | Value | Behavior | |----------------|-----------------------------------------------------| | `"ac1"` | Sort bars by the ac1 scenario values | | `"category"` | Sort bars alphabetically by category name | | `"auto"` | Auto-detect from dataset metadata (no warning) | | not set / `""` | Auto-detect with `AUTO_order` warning |
1509
+ * @example order="ac1"
1472
1510
  */
1473
1511
  "order": string;
1474
1512
  /**
1475
- * set sorting order direction <br /><br /> values:<br /> ```asc // desc```
1513
+ * Sort direction applied to the columns specified in `order`. Values: `"asc"` (ascending) | `"desc"` (descending).
1514
+ * @default "asc"
1515
+ * @example order-direction="desc"
1476
1516
  */
1477
1517
  "orderDirection": string;
1478
1518
  /**
1479
- * Name of the 'scaling-group' which the chart uses scaling groups are maintained globally <br /> <br /> alternatively a number which represent the pixel per percentage.
1519
+ * Controls scaling of relative variance bars (pixels per percentage point). | Value | Behavior | |----------------|---------------------------------------------------------------| | `"auto"` | Auto-fit to available width | | not set / `""` | Same as auto with warning | | `"50"`, `1.5` | Explicit pixels-per-percentage-point value | | group name | References a shared scaling group for synchronized charts |
1520
+ * @example percentage-scaling="50"
1480
1521
  */
1481
1522
  "percentageScaling": string | number;
1482
1523
  /**
@@ -1484,30 +1525,39 @@ declare namespace LocalJSX {
1484
1525
  */
1485
1526
  "scale"?: string;
1486
1527
  /**
1487
- * List of Scenarios Map. <br /> <br /> per chart there are up to 4 different scenarios supported. The first 4 scenarios in the list are used, the rest ignored. <br /> <br /> values:<br /> ```ac // fc // pp // pl [1-4] // auto``` example:<br /> ```ac1,ac2,ac3,ac4``` <br /> <br /> When set to ```auto```, scenarios are detected from the dataset silently. When left blank, scenarios are detected from the dataset with a warning.
1528
+ * Comma-separated list of scenario columns to display as bars. Up to 4 scenarios are supported; additional values are ignored. Valid scenario names: `ac1`–`ac4`, `fc1`–`fc4`, `pp1`–`pp4`, `pl1`–`pl4`. | Value | Behavior | |---------------|-------------------------------------------------------------| | `"ac1,fc1"` | Show the listed scenarios | | `"auto"` | Auto-detect from dataset metadata (no warning) | | not set / `""` | Auto-detect from dataset metadata (emits `AUTO_scenarios` warning) |
1529
+ * @example scenarios="ac1,pp1,pl1"
1488
1530
  */
1489
1531
  "scenarios": string;
1490
1532
  /**
1533
+ * Whether to display category labels on the left side of the chart. Values: `"true"` | `"false"`.
1491
1534
  * @default "true"
1535
+ * @example show-categories="false"
1492
1536
  */
1493
1537
  "showCategories"?: string;
1494
1538
  /**
1495
- * Toggles display of measure units in table header <br /><br /> values: <br /> ```true // false```
1539
+ * Toggles display of the SI prefix and unit label in the chart footer (e.g. "k EUR"). Values: `"true"` | `"false"`.
1496
1540
  * @default "false"
1541
+ * @example show-measure-scale="true"
1497
1542
  */
1498
1543
  "showMeasureScale"?: string;
1499
1544
  /**
1500
- * Stacking configuration for the chart as a JSON string. When set, bars are drawn stacked (additive layers) instead of side-by-side.
1501
- * @default '' (empty — no stacking)
1502
- * @example stack='{"by":"scenario"}'
1545
+ * Stacking configuration as a JSON string. When set, bars are drawn as stacked segments instead of side-by-side. **Properties:** | Key | Values | Description | |---------|-----------------------------------------------|----------------------------------------------------| | `by` | `"scenarios"` \| `"dimensions"` | **Required.** What to stack. | | `mode` | `"absolute"` \| `"relative"` \| `"absolute-relative"` | Stacking mode. Default: `"absolute"`. | | `order` | `"asc"` \| `"desc"` \| `"dataset"` | Segment sort order. Default: `"dataset"`. | - `by: "scenarios"` — stacks the scenarios listed in the `scenarios` prop end-to-end. - `by: "dimensions"` — stacks by the next-lower hierarchy level derived from `level` (e.g. level `"rowGroup"` stacks by category). Only the first scenario is used; extra scenarios trigger a `WARN_stack_dimensions_scenarios` warning. - `mode: "relative"` — normalizes each bar to 100%, showing proportions. - `mode: "absolute-relative"` — absolute bars with percentage labels. Segment colors are configurable via the `stackColors` array in component styles.
1546
+ * @default "" (no stacking)
1547
+ * @example stack='{"by":"scenarios","mode":"absolute"}'
1548
+ * @example stack='{"by":"dimensions","mode":"relative"}'
1503
1549
  */
1504
1550
  "stack"?: string;
1505
1551
  /**
1506
- * Name of the 'scaling-group' which the chart uses scaling groups are maintained globally <br /> <br /> alternatively a number which represent the pixel per measure unit.
1552
+ * Controls horizontal bar scaling (pixels per data unit). | Value | Behavior | |----------------|-----------------------------------------------------------------| | `"auto"` | Auto-fit bars to fill the available container width (no warning) | | not set / `""` | Same as auto, but emits `AUTO_unitScaling` warning | | `"0.03"`, `1` | Explicit pixels-per-unit value; bars scale proportionally | | group name | References a shared scaling group for synchronized charts | When using a custom value that causes the chart to exceed its container, a `WARN_overflow` error is emitted.
1553
+ * @example unit-scaling="auto"
1554
+ * @example unit-scaling="0.05"
1507
1555
  */
1508
1556
  "unitScaling": string | number;
1509
1557
  /**
1510
- * List of Variance Map. <br /> <br /> Variance chart can be added by seperating the scenarios of each chart with ```;```<br /> The additonal variances which are calculated form the given scenarios. the scenarios used in the variances have also be defined in the *scenarios* property. <br /> <br /> the variance is defiend as (Scenario A - ScenarioB) neu. neg and pos post fix defines which value is *good* a negative or a positive value. <br /> <br /> if empty variance charts are hidden <br /> <br /> each variance creates a chart <br /> <br /> pattern:<br /> ```d<scenarioB>_<scenarioA>_[pos/neg/neu]``` example: <br />```'dpp1_ac1_neg,dfc1_ac1_neg'```
1558
+ * Comma-separated list of variance definitions. Each variance adds a separate sub-chart next to the main bar chart. **Pattern:** `d<base>_<comparison>_<sentiment>` (absolute) or `dr<base>_<comparison>_<sentiment>` (relative / percentage). - `base` / `comparison`: scenario names that must also appear in `scenarios`. - `sentiment`: `pos` (positive is good), `neg` (negative is good), `neu` (neutral). When empty, no variance charts are shown.
1559
+ * @example variances="dpp1_ac1_neg,dfc1_ac1_neg"
1560
+ * @example variances="drac1_pl1_pos"
1511
1561
  */
1512
1562
  "variances": string;
1513
1563
  }
@@ -1662,6 +1712,11 @@ declare namespace LocalJSX {
1662
1712
  * Unique (template scope) name of the datasource
1663
1713
  */
1664
1714
  "name": string;
1715
+ /**
1716
+ * When true (default), body content is plain text (SQL or JSON). When false, body content is a compressed payload (`<hash>:<base64_gzip>`).
1717
+ * @default true
1718
+ */
1719
+ "raw"?: boolean;
1665
1720
  /**
1666
1721
  * When true, bypasses the AlaSQL query engine and parses the body content as raw JSON, writing it directly to the datasets store.
1667
1722
  * @default false
@@ -1673,12 +1728,18 @@ declare namespace LocalJSX {
1673
1728
  * Data is provided as JSON text inside the element body (observed via
1674
1729
  * `withBodyObserver`). Other components (e.g. `bn-dataset`) reference
1675
1730
  * the stored data by the `name` prop to run queries against it.
1731
+ * Set `raw="false"` to accept pre-compressed payloads in `<hash>:<base64_gzip>` format.
1676
1732
  */
1677
1733
  interface BnDatasource {
1678
1734
  /**
1679
1735
  * Unique (template scope) name of the datasource
1680
1736
  */
1681
1737
  "name": string;
1738
+ /**
1739
+ * When true (default), body content is plain JSON text. When false, body content is a compressed payload (`<hash>:<base64_gzip>`).
1740
+ * @default true
1741
+ */
1742
+ "raw"?: boolean;
1682
1743
  }
1683
1744
  interface BnFooter {
1684
1745
  /**
@@ -1932,7 +1993,7 @@ declare namespace LocalJSX {
1932
1993
  interface BnTable {
1933
1994
  /**
1934
1995
  * Set width of bar chart columns. Controls the max bar/pin width in pixels. <br /><br /> values:<br /> ``` w5 // w10 // w15 // w20 // w25 // w30 // w40 // w60 // w80 // w100 ```
1935
- * @default "w30"
1996
+ * @default "w10"
1936
1997
  */
1937
1998
  "barColumnWidth"?: string;
1938
1999
  /**
@@ -2015,7 +2076,7 @@ declare namespace LocalJSX {
2015
2076
  */
2016
2077
  "percentageScaling"?: string | number;
2017
2078
  /**
2018
- * Controls proportional scaling of the entire table relative to the available parent width. All visual dimensions scale together: font size, em-based spacing/padding, SVG bar-chart widths, pin lengths, dot radii, pattern fills, axis strokes, and label offsets. Scaling is driven by a single factor applied to the base font size (`global.fontSizePx` from the component-style store, default 13.3333 px). Because the table's SCSS uses `em` units for padding, borders, and column widths, changing the font size cascades to all layout dimensions. SVG elements (bars, pins, patterns) receive the factor via the `scaleFactor` prop on `ibcs-table` and multiply every pixel constant by it, so they stay proportional to the surrounding text. | Value | Behavior | |---------------------|----------------------------------------------------------------------------------| | not set / `""` | Auto-scale to fit parent width; emit `AUTO_scale` warning with the applied factor | | `"none"` | No scaling (render at base font size regardless of available space) | | `"auto"` | Auto-scale to fit parent width silently (no warning) | | `"0.5"`, `"1.2"`, … | Fixed factor — apply `baseFontSize × factor` | **Auto-scale algorithm** (modes `""` and `"auto"`): 1. After each render, the CSS variable `--bn-font-size` is temporarily reset to the unscaled base size and a synchronous reflow is forced. 2. The unscaled `scrollWidth` of the table container is compared against the parent's content-box width (via `getParentDimensions`). 3. If the table overflows, `factor = parentWidth / unscaledScrollWidth` is computed and applied to both the CSS variable and the `appliedScaleFactor` state (which re-renders the SVG charts). 4. A guard flag (`_autoScaleGuard`) prevents the subsequent state-triggered re-render from re-measuring, avoiding an infinite measure → scale → fits → reset → overflow loop. Invalid values (negative numbers, non-numeric strings that are not `"none"` or `"auto"`) fall back to the default behaviour (auto + warning) and emit an `ERR_scale` warning.
2079
+ * Controls proportional scaling of the entire table relative to the available parent width. All visual dimensions scale together: font size, em-based spacing/padding, SVG bar-chart widths, pin lengths, dot radii, pattern fills, axis strokes, and label offsets. Scaling is driven by a single factor applied to the base font size (`global.fontSizePx` from the component-style store, default 13.3333 px). Because the table's SCSS uses `em` units for padding, borders, and column widths, changing the font size cascades to all layout dimensions. SVG elements (bars, pins, patterns) receive the factor via the `scaleFactor` prop on `ibcs-table` and multiply every pixel constant by it, so they stay proportional to the surrounding text. | Value | Behavior | |---------------------|----------------------------------------------------------------------------------| | not set / `""` | Auto-scale to fit parent width; emit `AUTO_scale` warning with the applied factor | | `"none"` | No scaling (render at base font size regardless of available space) | | `"auto"` | Auto-scale to fit parent width silently (no warning) | | `"0.5"`, `"1.2"`, … | Fixed factor — apply `baseFontSize × factor` | **Auto-scale algorithm** (modes `""` and `"auto"`): 1. After each render, the current `scrollWidth` of the host element is divided by the current `appliedScaleFactor` to derive the unscaled content width. This avoids resetting `--bn-font-size` to base (which would only affect em-based widths but not SVG pixel attributes). 2. This unscaled width is compared against the parent's content-box width (via `getParentDimensions`). 3. If the table overflows, `factor = parentWidth / unscaledWidth` is computed and applied to both the CSS variable and the `appliedScaleFactor` state (which re-renders the SVG charts). 4. A guard flag (`_autoScaleGuard`) prevents the subsequent state-triggered re-render from re-measuring, avoiding an infinite measure → scale → fits → reset → overflow loop. Invalid values (negative numbers, non-numeric strings that are not `"none"` or `"auto"`) fall back to the default behaviour (auto + warning) and emit an `ERR_scale` warning.
2019
2080
  * @example // Auto-scale to parent (silent) <bn-table scale="auto" ...></bn-table> // Fixed 50 % reduction <bn-table scale="0.5" ...></bn-table> // Double size <bn-table scale="2" ...></bn-table> // No scaling — always render at base font size <bn-table scale="none" ...></bn-table>
2020
2081
  */
2021
2082
  "scale"?: string;
@@ -2049,7 +2110,7 @@ declare namespace LocalJSX {
2049
2110
  */
2050
2111
  "type"?: string;
2051
2112
  /**
2052
- * @deprecated Bars now scale proportionally via column statistics. Kept for backward compatibility. <br /><br /> Scaling for absolute variance bar charts (ΔPY). <br /><br /> Default: 0.01
2113
+ * Pixels per unit for absolute variance bar charts (ΔPY). Controls bar width: barWidth = value × unitScaling. Bars exceeding barColumnWidth are shown with an arrow indicator. <br /><br /> Default: 0.01
2053
2114
  * @default 0.01
2054
2115
  */
2055
2116
  "unitScaling"?: string | number;
@@ -2571,9 +2632,11 @@ declare namespace LocalJSX {
2571
2632
  "name": string;
2572
2633
  "datasources": string;
2573
2634
  "static": boolean;
2635
+ "raw": boolean;
2574
2636
  }
2575
2637
  interface BnDatasourceAttributes {
2576
2638
  "name": string;
2639
+ "raw": boolean;
2577
2640
  }
2578
2641
  interface BnFooterAttributes {
2579
2642
  "pageNumber": number | null;
@@ -2859,6 +2922,7 @@ declare module "@stencil/core" {
2859
2922
  * Data is provided as JSON text inside the element body (observed via
2860
2923
  * `withBodyObserver`). Other components (e.g. `bn-dataset`) reference
2861
2924
  * the stored data by the `name` prop to run queries against it.
2925
+ * Set `raw="false"` to accept pre-compressed payloads in `<hash>:<base64_gzip>` format.
2862
2926
  */
2863
2927
  "bn-datasource": LocalJSX.IntrinsicElements["bn-datasource"] & JSXBase.HTMLAttributes<HTMLBnDatasourceElement>;
2864
2928
  "bn-footer": LocalJSX.IntrinsicElements["bn-footer"] & JSXBase.HTMLAttributes<HTMLBnFooterElement>;
@@ -59,6 +59,7 @@ export interface TimeChartStyle {
59
59
  axisStyles: SVGStyleGroup;
60
60
  barStyles: SVGStyleGroup;
61
61
  varianceStyles: SVGVariancesStyleGroup;
62
+ stackColors: string[];
62
63
  padding: {
63
64
  top: number;
64
65
  left: number;
@@ -72,6 +73,7 @@ export interface StructureChartStyle {
72
73
  axisStyles: SVGStyleGroup;
73
74
  barStyles: SVGStyleGroup;
74
75
  varianceStyles: SVGVariancesStyleGroup;
76
+ stackColors: string[];
75
77
  padding: {
76
78
  top: number;
77
79
  left: number;
@@ -131,12 +131,15 @@ export declare enum ChartMode {
131
131
  LINE = "line",
132
132
  AUTO = "auto"
133
133
  }
134
- /** Dimension used to split bars into stacked segments within a single data point. */
134
+ /**
135
+ * Stacking dimension for multi-segment bar charts.
136
+ * - SCENARIOS: stack the scenarios from the `scenarios` prop end-to-end
137
+ * - DIMENSIONS: stack by the next-lower hierarchy level derived from the `level` prop
138
+ * (rowGroup → category, category → subCategory)
139
+ */
135
140
  export declare enum StackBy {
136
- SCENARIO = "scenario",
137
- CATEGORY = "category",
138
- SUBCATEGORY = "subcategory",
139
- ROWGROUP = "rowgroup"
141
+ SCENARIOS = "scenarios",
142
+ DIMENSIONS = "dimensions"
140
143
  }
141
144
  /**
142
145
  * How stacked values are presented.
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Compute a short deterministic hash of a string.
3
+ */
4
+ export declare function computeContentHash(text: string): string;
5
+ /**
6
+ * Decode a compressed payload in the format `<hash>:<base64_gzip>`.
7
+ * Returns the embedded hash and the decompressed JSON string.
8
+ */
9
+ export declare function decodeCompressedContent(text: string): {
10
+ hash: string;
11
+ json: string;
12
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bino-bi/bn-template-engine",
3
- "version": "1.0.0-alpha.3",
3
+ "version": "1.0.0-alpha.5",
4
4
  "description": "IBCS-compliant web components for business intelligence tables and charts",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.js",
@@ -61,6 +61,7 @@
61
61
  "@svgdotjs/svg.js": "^3.2.5",
62
62
  "alasql": "^4.17.0",
63
63
  "calculate-size": "^1.1.1",
64
+ "fflate": "^0.8.2",
64
65
  "luxon": "^3.7.2",
65
66
  "nanoid": "^5.1.6"
66
67
  }
@@ -1 +0,0 @@
1
- import{r as t,h as s,H as i,g as r}from"./p-JNHhIe7t.js";import{w as o}from"./p-DG-1MR_T.js";import{g as n,f as a}from"./p-DRikHQE-.js";import{w as e}from"./p-CYjZRKdI.js";import{w as h}from"./p-tzFCK9qn.js";const c=class{constructor(s){t(this,s),e(this),this.errors=h(this),o(this,(t=>{this.stores||(this.stores=n(this.element));try{const s=a(JSON.parse(t)),i=Object.assign({},this.stores.internationalization.get(this.namespace));i[this.code]=s,this.stores.internationalization.set(this.namespace,i)}catch(t){console.error(t)}}))}render(){return s(i,{key:"dd384ecf77e4fd5d46ed04b04c4395fba8bac4e1"})}get element(){return r(this)}};c.style="bn-internationalization{display:none}";export{c as bn_internationalization}