@bino-bi/bn-template-engine 1.0.0-alpha.2 → 1.0.0-alpha.4

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 (205) 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-4426d484.entry.js +1 -0
  7. package/dist/bn-template-engine/p-51f8dc9e.entry.js +1 -0
  8. package/dist/bn-template-engine/p-53d4e690.entry.js +1 -0
  9. package/dist/bn-template-engine/p-5KQYRQLK.js +1 -0
  10. package/dist/bn-template-engine/p-745f4596.entry.js +1 -0
  11. package/dist/bn-template-engine/{p-0f1504f3.entry.js → p-75e97c87.entry.js} +1 -1
  12. package/dist/bn-template-engine/p-7a560278.entry.js +1 -0
  13. package/dist/bn-template-engine/p-7ea7c325.entry.js +1 -0
  14. package/dist/bn-template-engine/p-945cc95d.entry.js +1 -0
  15. package/dist/bn-template-engine/p-BYBpC0EO.js +1 -0
  16. package/dist/bn-template-engine/p-BfXY5dsy.js +1 -0
  17. package/dist/bn-template-engine/p-BgnHJQ9Q.js +1 -0
  18. package/dist/bn-template-engine/{p-DgfL-ffj.js → p-Bhd_WSML.js} +1 -1
  19. package/dist/bn-template-engine/p-Bka-Z6jo.js +1 -0
  20. package/dist/bn-template-engine/p-Bnhh02CF.js +1 -0
  21. package/dist/bn-template-engine/p-C7dQL8CS.js +1 -0
  22. package/dist/bn-template-engine/p-CL1RYuNU.js +1 -0
  23. package/dist/bn-template-engine/p-CYwd_ZNM.js +1 -0
  24. package/dist/bn-template-engine/p-ChlK-T9I.js +1 -0
  25. package/dist/bn-template-engine/p-DHezf8pZ.js +1 -0
  26. package/dist/bn-template-engine/{p-DVMu6dEy.js → p-DlppAFq9.js} +1 -1
  27. package/dist/bn-template-engine/p-DvDDgmcV.js +1 -0
  28. package/dist/bn-template-engine/p-DvvwfRQG.js +1 -0
  29. package/dist/bn-template-engine/{p-DG-1MR_T.js → p-P7pGJBgc.js} +1 -1
  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-CvXqez4D.js → p-u8igQLRZ.js} +1 -1
  39. package/dist/cjs/{DataFormatDigits-CbIVfGEH.js → DataFormatDigits-DKcOeLNK.js} +1 -1
  40. package/dist/cjs/{DateStringFactory-CfkXYAMN.js → DateStringFactory-CSKvbS8K.js} +1 -1
  41. package/dist/cjs/{Order-DtpbD8mQ.js → Order-iG11HI4R.js} +36 -5
  42. package/dist/cjs/{SVGVariancesStyleGroup-D-rTWlDo.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} +1058 -28
  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 +979 -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} +159 -1259
  67. package/dist/cjs/{StringAdapter-ByCHdlDO.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-BBtMesx3.js → withStyled-CS1Yp4sv.js} +12 -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/StackedBar.js +3 -4
  82. package/dist/collection/components/bn-chart-structure/utils/model/styles/StructureChartStyle.js +4 -0
  83. package/dist/collection/components/bn-chart-time/bn-chart-time.js +28 -4
  84. package/dist/collection/components/bn-chart-time/utils/TimeChart.js +3 -3
  85. package/dist/collection/components/bn-chart-time/utils/elements/StackedColumn.js +3 -4
  86. package/dist/collection/components/bn-chart-time/utils/model/styles/TimeChartStyle.js +4 -0
  87. package/dist/collection/components/bn-dataset/bn-dataset.js +49 -2
  88. package/dist/collection/components/bn-datasource/bn-datasource.js +46 -3
  89. package/dist/collection/components/bn-table/bn-table.js +60 -12
  90. package/dist/collection/components/bn-table/ibcs-table.css +7 -5
  91. package/dist/collection/components/bn-table/ibcs-table.js +22 -1
  92. package/dist/collection/components/bn-table/utils/elements/CellBarChart.js +79 -31
  93. package/dist/collection/components/bn-table/utils/elements/TableRow.js +3 -1
  94. package/dist/collection/components/bn-table/utils/factories/tableDataSetFactory.js +12 -3
  95. package/dist/collection/components/bn-table/utils/helper/ColumnStatistics.js +9 -1
  96. package/dist/collection/stores/componentStyles.js +2 -0
  97. package/dist/collection/utils/constants.js +35 -5
  98. package/dist/collection/utils/contentDecoder.js +28 -0
  99. package/dist/collection/utils/stackColors.js +2 -2
  100. package/dist/collection/utils/validate.js +5 -2
  101. package/dist/components/DataFormatDigits.js +1 -1
  102. package/dist/components/DateStringFactory.js +1 -1
  103. package/dist/components/Order.js +1 -1
  104. package/dist/components/SVGVariancesStyleGroup.js +1 -1
  105. package/dist/components/bn-chart-structure.js +1 -1
  106. package/dist/components/bn-chart-time.js +1 -1
  107. package/dist/components/bn-dataset.js +1 -1
  108. package/dist/components/bn-datasource.js +1 -1
  109. package/dist/components/bn-table.js +1 -1
  110. package/dist/components/bn-title2.js +1 -1
  111. package/dist/components/contentDecoder.js +1 -0
  112. package/dist/components/context-protocol.js +1 -1
  113. package/dist/components/emotion-hash.esm.js +1 -0
  114. package/dist/components/ibcs-chart-structure2.js +1 -1
  115. package/dist/components/ibcs-chart-time2.js +1 -1
  116. package/dist/components/ibcs-table2.js +1 -1
  117. package/dist/components/ibcs-title2.js +1 -1
  118. package/dist/components/ibcsRuleSet.js +1 -1
  119. package/dist/components/validate.js +1 -1
  120. package/dist/components/withStyled.js +1 -1
  121. package/dist/esm/{DataFormatDigits-DYdbRX-1.js → DataFormatDigits-oSZ1hBKE.js} +1 -1
  122. package/dist/esm/{DateStringFactory-DRcbojUT.js → DateStringFactory-CSGz6TDk.js} +1 -1
  123. package/dist/esm/{Order-DdexOqTs.js → Order-Bnhh02CF.js} +36 -6
  124. package/dist/esm/{SVGVariancesStyleGroup-D0Cwprv1.js → SVGVariancesStyleGroup-CqTjrZYg.js} +2 -13
  125. package/dist/esm/bn-asset.entry.js +5 -4
  126. package/dist/esm/bn-body_4.entry.js +11 -9
  127. package/dist/esm/bn-card.entry.js +5 -4
  128. package/dist/esm/{ibcs-chart-structure.entry.js → bn-chart-structure_5.entry.js} +1048 -22
  129. package/dist/esm/bn-chart-time.entry.js +38 -12
  130. package/dist/esm/bn-component-style.entry.js +5 -4
  131. package/dist/esm/bn-dataset.entry.js +35 -6
  132. package/dist/esm/bn-grid.entry.js +9 -7
  133. package/dist/esm/bn-image.entry.js +9 -7
  134. package/dist/esm/bn-internationalization.entry.js +5 -4
  135. package/dist/esm/bn-layout-card.entry.js +3 -2
  136. package/dist/esm/bn-layout-page.entry.js +2 -1
  137. package/dist/esm/bn-message.entry.js +5 -4
  138. package/dist/esm/bn-table.entry.js +977 -0
  139. package/dist/esm/bn-template-engine.js +1 -1
  140. package/dist/esm/bn-template.entry.js +3 -2
  141. package/dist/esm/bn-text.entry.js +11 -9
  142. package/dist/esm/bn-tree.entry.js +9 -7
  143. package/dist/esm/contentDecoder-oMmxz6nJ.js +416 -0
  144. package/dist/esm/{context-protocol-Bz5klD-F.js → context-protocol-BHnQsVsr.js} +2 -0
  145. package/dist/esm/editor-companion.entry.js +1 -1
  146. package/dist/esm/emotion-hash.esm-BYBpC0EO.js +55 -0
  147. package/dist/esm/ibcs-chart-time.entry.js +15 -11
  148. package/dist/esm/{bn-context_5.entry.js → ibcs-table.entry.js} +106 -1202
  149. package/dist/esm/{StringAdapter-CTL-Dvzp.js → ibcsRuleSet-K4ytuA1f.js} +10 -10
  150. package/dist/esm/index-DHezf8pZ.js +65 -0
  151. package/dist/esm/loader.js +1 -1
  152. package/dist/esm/{scaling-C6K8FYSF.js → scaling-Cehc74IE.js} +2 -2
  153. package/dist/esm/{withHasError-B3QX2emi.js → utils-DvvwfRQG.js} +1 -69
  154. package/dist/esm/{withBodyObserver-DczL5ia8.js → withBodyObserver-FQ8NwCIz.js} +1 -1
  155. package/dist/esm/{withComponentStatus-DodoSXe-.js → withComponentStatus-DWjDYtZ7.js} +1 -1
  156. package/dist/esm/{withComponentStyle-BerJY64r.js → withComponentStyle-9uP_hcDq.js} +2 -2
  157. package/dist/esm/withHasError-FyY5mQ_3.js +70 -0
  158. package/dist/esm/{withStyled-DCipbf2O.js → withStyled--qQWquTH.js} +9 -59
  159. package/dist/esm/{withTranslation-mimbJdER.js → withTranslation-BqD0Kp7b.js} +2 -2
  160. package/dist/types/components/bn-chart-structure/bn-chart-structure.d.ts +155 -109
  161. package/dist/types/components/bn-chart-structure/utils/StructureChart.d.ts +7 -0
  162. package/dist/types/components/bn-chart-structure/utils/model/styles/StructureChartStyle.d.ts +1 -0
  163. package/dist/types/components/bn-chart-time/utils/model/styles/TimeChartStyle.d.ts +1 -0
  164. package/dist/types/components/bn-dataset/bn-dataset.d.ts +6 -0
  165. package/dist/types/components/bn-datasource/bn-datasource.d.ts +8 -0
  166. package/dist/types/components/bn-table/bn-table.d.ts +12 -8
  167. package/dist/types/components/bn-table/ibcs-table.d.ts +1 -0
  168. package/dist/types/components/bn-table/utils/elements/Cell.d.ts +1 -0
  169. package/dist/types/components/bn-table/utils/elements/CellBarChart.d.ts +1 -0
  170. package/dist/types/components.d.ts +118 -34
  171. package/dist/types/stores/componentStyles.d.ts +2 -0
  172. package/dist/types/utils/constants.d.ts +23 -5
  173. package/dist/types/utils/contentDecoder.d.ts +12 -0
  174. package/dist/types/utils/validate.d.ts +1 -0
  175. package/package.json +2 -1
  176. package/dist/bn-template-engine/p--PSoPbDM.js +0 -1
  177. package/dist/bn-template-engine/p-05a82a77.entry.js +0 -1
  178. package/dist/bn-template-engine/p-0ca8dc17.entry.js +0 -1
  179. package/dist/bn-template-engine/p-1d9a3be9.entry.js +0 -1
  180. package/dist/bn-template-engine/p-35638ad0.entry.js +0 -1
  181. package/dist/bn-template-engine/p-37881d05.entry.js +0 -1
  182. package/dist/bn-template-engine/p-3b894997.entry.js +0 -1
  183. package/dist/bn-template-engine/p-50e49732.entry.js +0 -1
  184. package/dist/bn-template-engine/p-60a7fc59.entry.js +0 -1
  185. package/dist/bn-template-engine/p-6c7c0455.entry.js +0 -1
  186. package/dist/bn-template-engine/p-6da93eae.entry.js +0 -1
  187. package/dist/bn-template-engine/p-701e1578.entry.js +0 -1
  188. package/dist/bn-template-engine/p-BSfqOkN_.js +0 -1
  189. package/dist/bn-template-engine/p-CRLgp9-v.js +0 -1
  190. package/dist/bn-template-engine/p-CYjZRKdI.js +0 -1
  191. package/dist/bn-template-engine/p-DRikHQE-.js +0 -1
  192. package/dist/bn-template-engine/p-DVo6aZUE.js +0 -1
  193. package/dist/bn-template-engine/p-DdexOqTs.js +0 -1
  194. package/dist/bn-template-engine/p-DyRaC0MB.js +0 -1
  195. package/dist/bn-template-engine/p-a95ccc16.entry.js +0 -1
  196. package/dist/bn-template-engine/p-b7bec050.entry.js +0 -1
  197. package/dist/bn-template-engine/p-bc59ea5c.entry.js +0 -1
  198. package/dist/bn-template-engine/p-d279b578.entry.js +0 -1
  199. package/dist/bn-template-engine/p-dd9dd407.entry.js +0 -1
  200. package/dist/bn-template-engine/p-e102a490.entry.js +0 -1
  201. package/dist/bn-template-engine/p-f27995c9.entry.js +0 -1
  202. package/dist/bn-template-engine/p-f89e55c6.entry.js +0 -1
  203. package/dist/bn-template-engine/p-tzFCK9qn.js +0 -1
  204. package/dist/cjs/bn-chart-structure.cjs.entry.js +0 -700
  205. 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
  /**
@@ -556,6 +586,11 @@ export namespace Components {
556
586
  * to the inner `ibcs-table` element.
557
587
  */
558
588
  interface BnTable {
589
+ /**
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 ```
591
+ * @default "w10"
592
+ */
593
+ "barColumnWidth": string;
559
594
  /**
560
595
  * List of variance column names to render as bar charts instead of numbers. <br /><br /> Absolute variances (d_*) render as horizontal bar charts. Relative variances (dr_*) render as pin/dot charts. <br /><br /> example:<br /> ```dac1_pp1_pos,drac1_pp1_pos```
561
596
  */
@@ -670,7 +705,7 @@ export namespace Components {
670
705
  */
671
706
  "type": string;
672
707
  /**
673
- * Scaling for absolute variance bar charts (ΔPY). <br /><br /> Name of the 'scaling-group' which the table uses. Scaling groups are maintained globally. <br /><br /> Alternatively a number which represents pixels per unit of measure. <br /><br /> Example: 0.01 means 1000 units = 10 pixels width. <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
674
709
  * @default 0.01
675
710
  */
676
711
  "unitScaling": string | number;
@@ -1000,6 +1035,10 @@ export namespace Components {
1000
1035
  * not be used directly; use `bn-table` instead.
1001
1036
  */
1002
1037
  interface IbcsTable {
1038
+ /**
1039
+ * @default 30
1040
+ */
1041
+ "barColumnMaxWidth": number;
1003
1042
  /**
1004
1043
  * @default []
1005
1044
  */
@@ -1215,6 +1254,7 @@ declare global {
1215
1254
  * Data is provided as JSON text inside the element body (observed via
1216
1255
  * `withBodyObserver`). Other components (e.g. `bn-dataset`) reference
1217
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.
1218
1258
  */
1219
1259
  interface HTMLBnDatasourceElement extends Components.BnDatasource, HTMLStencilElement {
1220
1260
  }
@@ -1430,44 +1470,54 @@ declare namespace LocalJSX {
1430
1470
  */
1431
1471
  interface BnChartStructure {
1432
1472
  /**
1433
- * 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"
1434
1475
  * @default ""
1435
1476
  */
1436
1477
  "chartTitle"?: string;
1437
1478
  /**
1438
- * 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'"
1439
1481
  * @default ""
1440
1482
  */
1441
1483
  "filter"?: string;
1442
1484
  /**
1443
- * 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"
1444
1487
  */
1445
1488
  "level": string;
1446
1489
  /**
1447
- * 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).
1448
1491
  * @default 0
1492
+ * @example limit="5"
1449
1493
  */
1450
1494
  "limit"?: number;
1451
1495
  /**
1452
- * 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.
1453
1497
  * @default "greatest"
1498
+ * @example measure-scale="k"
1454
1499
  */
1455
1500
  "measureScale"?: string;
1456
1501
  /**
1457
- * 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"`.
1458
1503
  * @default ""
1504
+ * @example measure-unit="EUR"
1459
1505
  */
1460
1506
  "measureUnit"?: string;
1461
1507
  /**
1462
- * 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"
1463
1510
  */
1464
1511
  "order": string;
1465
1512
  /**
1466
- * 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"
1467
1516
  */
1468
1517
  "orderDirection": string;
1469
1518
  /**
1470
- * 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"
1471
1521
  */
1472
1522
  "percentageScaling": string | number;
1473
1523
  /**
@@ -1475,30 +1525,39 @@ declare namespace LocalJSX {
1475
1525
  */
1476
1526
  "scale"?: string;
1477
1527
  /**
1478
- * 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"
1479
1530
  */
1480
1531
  "scenarios": string;
1481
1532
  /**
1533
+ * Whether to display category labels on the left side of the chart. Values: `"true"` | `"false"`.
1482
1534
  * @default "true"
1535
+ * @example show-categories="false"
1483
1536
  */
1484
1537
  "showCategories"?: string;
1485
1538
  /**
1486
- * 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"`.
1487
1540
  * @default "false"
1541
+ * @example show-measure-scale="true"
1488
1542
  */
1489
1543
  "showMeasureScale"?: string;
1490
1544
  /**
1491
- * Stacking configuration for the chart as a JSON string. When set, bars are drawn stacked (additive layers) instead of side-by-side.
1492
- * @default '' (empty — no stacking)
1493
- * @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"}'
1494
1549
  */
1495
1550
  "stack"?: string;
1496
1551
  /**
1497
- * 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"
1498
1555
  */
1499
1556
  "unitScaling": string | number;
1500
1557
  /**
1501
- * 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"
1502
1561
  */
1503
1562
  "variances": string;
1504
1563
  }
@@ -1653,6 +1712,11 @@ declare namespace LocalJSX {
1653
1712
  * Unique (template scope) name of the datasource
1654
1713
  */
1655
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;
1656
1720
  /**
1657
1721
  * When true, bypasses the AlaSQL query engine and parses the body content as raw JSON, writing it directly to the datasets store.
1658
1722
  * @default false
@@ -1664,12 +1728,18 @@ declare namespace LocalJSX {
1664
1728
  * Data is provided as JSON text inside the element body (observed via
1665
1729
  * `withBodyObserver`). Other components (e.g. `bn-dataset`) reference
1666
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.
1667
1732
  */
1668
1733
  interface BnDatasource {
1669
1734
  /**
1670
1735
  * Unique (template scope) name of the datasource
1671
1736
  */
1672
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;
1673
1743
  }
1674
1744
  interface BnFooter {
1675
1745
  /**
@@ -1921,6 +1991,11 @@ declare namespace LocalJSX {
1921
1991
  * to the inner `ibcs-table` element.
1922
1992
  */
1923
1993
  interface BnTable {
1994
+ /**
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 ```
1996
+ * @default "w10"
1997
+ */
1998
+ "barColumnWidth"?: string;
1924
1999
  /**
1925
2000
  * List of variance column names to render as bar charts instead of numbers. <br /><br /> Absolute variances (d_*) render as horizontal bar charts. Relative variances (dr_*) render as pin/dot charts. <br /><br /> example:<br /> ```dac1_pp1_pos,drac1_pp1_pos```
1926
2001
  */
@@ -2035,7 +2110,7 @@ declare namespace LocalJSX {
2035
2110
  */
2036
2111
  "type"?: string;
2037
2112
  /**
2038
- * Scaling for absolute variance bar charts (ΔPY). <br /><br /> Name of the 'scaling-group' which the table uses. Scaling groups are maintained globally. <br /><br /> Alternatively a number which represents pixels per unit of measure. <br /><br /> Example: 0.01 means 1000 units = 10 pixels width. <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
2039
2114
  * @default 0.01
2040
2115
  */
2041
2116
  "unitScaling"?: string | number;
@@ -2362,6 +2437,10 @@ declare namespace LocalJSX {
2362
2437
  * not be used directly; use `bn-table` instead.
2363
2438
  */
2364
2439
  interface IbcsTable {
2440
+ /**
2441
+ * @default 30
2442
+ */
2443
+ "barColumnMaxWidth"?: number;
2365
2444
  /**
2366
2445
  * @default []
2367
2446
  */
@@ -2553,9 +2632,11 @@ declare namespace LocalJSX {
2553
2632
  "name": string;
2554
2633
  "datasources": string;
2555
2634
  "static": boolean;
2635
+ "raw": boolean;
2556
2636
  }
2557
2637
  interface BnDatasourceAttributes {
2558
2638
  "name": string;
2639
+ "raw": boolean;
2559
2640
  }
2560
2641
  interface BnFooterAttributes {
2561
2642
  "pageNumber": number | null;
@@ -2662,6 +2743,7 @@ declare namespace LocalJSX {
2662
2743
  "scenarios": string;
2663
2744
  "variances": string;
2664
2745
  "barColumns": string;
2746
+ "barColumnWidth": string;
2665
2747
  "unitScaling": string;
2666
2748
  "percentageScaling": string;
2667
2749
  "dataFormat": string;
@@ -2756,6 +2838,7 @@ declare namespace LocalJSX {
2756
2838
  "showMeasureScale": boolean;
2757
2839
  "measureType": MeasureType;
2758
2840
  "filter": string;
2841
+ "barColumnMaxWidth": number;
2759
2842
  "unitScaling": number;
2760
2843
  "percentageScaling": number;
2761
2844
  "scaleFactor": number;
@@ -2839,6 +2922,7 @@ declare module "@stencil/core" {
2839
2922
  * Data is provided as JSON text inside the element body (observed via
2840
2923
  * `withBodyObserver`). Other components (e.g. `bn-dataset`) reference
2841
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.
2842
2926
  */
2843
2927
  "bn-datasource": LocalJSX.IntrinsicElements["bn-datasource"] & JSXBase.HTMLAttributes<HTMLBnDatasourceElement>;
2844
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;
@@ -75,6 +75,21 @@ export declare enum TableCategoryWidth {
75
75
  W10 = "w10",
76
76
  W5 = "w5"
77
77
  }
78
+ /** Width preset for inline bar/pin chart columns. Value = max bar width in em. */
79
+ export declare enum TableBarColumnWidth {
80
+ W5 = "w5",
81
+ W10 = "w10",
82
+ W15 = "w15",
83
+ W20 = "w20",
84
+ W25 = "w25",
85
+ W30 = "w30",
86
+ W40 = "w40",
87
+ W60 = "w60",
88
+ W80 = "w80",
89
+ W100 = "w100"
90
+ }
91
+ /** Maps TableBarColumnWidth presets to max bar width in em. */
92
+ export declare const BAR_COLUMN_WIDTH_EM: Record<TableBarColumnWidth, number>;
78
93
  /**
79
94
  * Three-level row hierarchy for grouping and drill-down: rowGroup > category > subCategory.
80
95
  * Index variants (e.g. ROWGROUPINDEX) provide stable numeric sort keys that preserve
@@ -116,12 +131,15 @@ export declare enum ChartMode {
116
131
  LINE = "line",
117
132
  AUTO = "auto"
118
133
  }
119
- /** 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
+ */
120
140
  export declare enum StackBy {
121
- SCENARIO = "scenario",
122
- CATEGORY = "category",
123
- SUBCATEGORY = "subcategory",
124
- ROWGROUP = "rowgroup"
141
+ SCENARIOS = "scenarios",
142
+ DIMENSIONS = "dimensions"
125
143
  }
126
144
  /**
127
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
+ };
@@ -46,6 +46,7 @@ export declare function isValidMeasureScale(value: string): boolean;
46
46
  export declare function validateI18nString(value: string): string[];
47
47
  export declare function validateStylesString(value: string): string[];
48
48
  export declare function isTableCategoryWidth(value: string): boolean;
49
+ export declare function isTableBarColumnWidth(value: string): boolean;
49
50
  export declare function validateColumnThereOfJsonStr(value: string): string[];
50
51
  export declare function validateStackConfig(value: string): string[];
51
52
  export declare function isValidFontSize(_value: string): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bino-bi/bn-template-engine",
3
- "version": "1.0.0-alpha.2",
3
+ "version": "1.0.0-alpha.4",
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{V as t}from"./p-1jFf17Vj.js";import{d as r}from"./p-DdexOqTs.js";class s{constructor(){this._dateFormat={year:"YYYY",quarter:"Q[Q] YYYY",month:"MMM YYYY",locale:"[KW]WW YYYY",day:"DD.MM.YYYY"},this._dateLinkFormat={avg:"Ø[DATE]",interval:"[DATE]..[DATE]",start:".[DATE]",end:"[DATE].",ytd:"_[DATE]",ytg:"[DATE]_",cum:"[DATE]_[DATE]",mat:"~[DATE]",none:"[DATE]"},this._scenarioMap=new Map,this._fallBackScenario={name:"Series",group:"Series",colorIndex:10,sortIndex:120},this.createScenarioMapEntry("ac","AC",10,400),this.createScenarioMapEntry("fc","FC",30,300),this.createScenarioMapEntry("pl","PL",50,200),this.createScenarioMapEntry("bu","BU",50,200),this.createScenarioMapEntry("pp","PP",20,100),this.createScenarioMapEntry("py","PY",20,100),this.createScenarioMapEntry("dac","dAC",10,1400),this.createScenarioMapEntry("dfc","dFC",30,1300),this.createScenarioMapEntry("dpl","dPL",50,1200),this.createScenarioMapEntry("dbu","dBU",50,1200),this.createScenarioMapEntry("dpp","dPP",20,1100),this.createScenarioMapEntry("dpy","dPY",20,1100),this.createScenarioMapEntry("drac","drAC",10,2400),this.createScenarioMapEntry("drfc","drFC",30,2300),this.createScenarioMapEntry("drpl","drPL",50,2200),this.createScenarioMapEntry("drbu","drBU",50,2200),this.createScenarioMapEntry("drpp","drPP",20,2100),this.createScenarioMapEntry("drpy","drPY",20,2100)}createScenarioMapEntry(t,r,s,i){const e=r,d=s;[1,2,3,4].forEach((s=>{this._scenarioMap.set(t+s,{name:r+s,group:e,colorIndex:d,sortIndex:i+10*s})}))}getScenario(t){return this._scenarioMap.has(t)?this._scenarioMap.get(t):this._fallBackScenario}getScenarioGroup(t){return this._scenarioMap.has(t)?this._scenarioMap.get(t).name:this._fallBackScenario.name}getScenarioColorIndex(t){return this._scenarioMap.has(t)?this._scenarioMap.get(t).colorIndex:this._fallBackScenario.colorIndex}getScenarioSorIndex(t){const r=this.normalizeVarianceScenario(t);return this._scenarioMap.has(r)?this._scenarioMap.get(r).sortIndex:this._fallBackScenario.sortIndex}normalizeVarianceScenario(r){if(null==r)return"";const s=new t(r);return s.isValid?s.type+s.delta:r}}class i{adapt(t){return r.adaptDefaultString(t)}default(){return""}}export{s as I,i as S}
@@ -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}
@@ -1 +0,0 @@
1
- import{r as t,h as o,H as i,g as e}from"./p-JNHhIe7t.js";import{w as n,g as s,p as a}from"./p-DVMu6dEy.js";import{w as r}from"./p-CRLgp9-v.js";import{w as l}from"./p-CYjZRKdI.js";import{w as d}from"./p-DyRaC0MB.js";import{w as c}from"./p-BSfqOkN_.js";import{w as f}from"./p-tzFCK9qn.js";import"./p-DRikHQE-.js";import"./p-DdexOqTs.js";import"./p-DgfL-ffj.js";const h=new Set(["br","b","i","strong","em","span","p","div","table","tr","td","th","thead","tbody","tfoot","ul","ol","li","h1","h2","h3","h4","h5","h6","sub","sup","small","hr","a","img"]),v=new Set(["class","style","colspan","rowspan","href","title","src","alt","width","height"]),u=/\b(__proto__|globalThis)\b|\.constructor\b/;function p(t){const o=document.createElement("div");return o.innerHTML=t,m(o),o.innerHTML}function m(t){for(const o of Array.from(t.childNodes)){if(o.nodeType!==Node.ELEMENT_NODE)continue;const i=o;if(h.has(i.tagName.toLowerCase())){for(const t of Array.from(i.attributes)){const o=t.name.toLowerCase();o.startsWith("on")||!v.has(o)?i.removeAttribute(t.name):"href"!==o&&"src"!==o||!/^\s*javascript:/i.test(t.value)?"style"===o&&/expression|javascript/i.test(t.value)&&i.removeAttribute(t.name):i.removeAttribute(t.name)}m(i)}else t.replaceChild(document.createTextNode(i.textContent||""),i)}}const b=class{constructor(o){t(this,o),this.data={},d(this),l(this),this.errors=f(this),this.t=r(this).t,n(this,((t,o)=>{this.data=Object.assign(Object.assign({},this.data),{[t]:o})})),this.componentStyle=c(this)}validateValue(t){"string"!=typeof t||""===t?this.errors.addOrReplace({id:"no_value",type:"warning",message:"Empty value"}):this.errors.remove("no_value")}validateScaling(t){if(null==t||""===t||"none"===t||"auto"===t)return void this.errors.remove("ERR_scale");const o=Number(t);isNaN(o)||o<=0?this.errors.addOrReplace({id:"ERR_scale",type:"warning",message:`Invalid scale value: "${t}". Use "none", "auto", or a positive number.`}):this.errors.remove("ERR_scale")}componentWillLoad(){this.validateValue(this.value),this.validateScaling(this.scale)}evalTemplate(t){if(!t)return"";if(u.test(t))return this.errors.addOrReplace({id:"ERR_value_eval",type:"error",message:"Template contains forbidden pattern"}),"";try{const o=new Proxy({data:this.data,t:this.t},{has:()=>!0,get:(t,o)=>o===Symbol.unscopables?void 0:t[o],set:()=>!0}),i=new Function("sandbox","with(sandbox){try{return`"+t+'`}catch(e){return""}}').call(o,o);return this.errors.remove("ERR_value_eval"),null!=i?String(i):""}catch(t){return this.errors.addOrReplace({id:"ERR_value_eval",type:"error",message:`Template evaluation failed: ${t instanceof Error?t.message:String(t)}`}),""}}prepareStyle(){return this.componentStyle((t=>{var o,i,e,n,s,a,r,l,d,c,f,h,v,u,p,m,b,g,y,w,_,R;return{fontStyles:{font:`${null!==(n=null!==(i=null===(o=t["bn-text"])||void 0===o?void 0:o.fontSizePx)&&void 0!==i?i:null===(e=t.global)||void 0===e?void 0:e.fontSizePx)&&void 0!==n?n:13.3333}px ${null!==(l=null!==(a=null===(s=t["bn-text"])||void 0===s?void 0:s.fontFamily)&&void 0!==a?a:null===(r=t.global)||void 0===r?void 0:r.fontFamily)&&void 0!==l?l:"'Noto Sans', sans-serif"}`,size:null!==(h=null!==(c=null===(d=t["bn-text"])||void 0===d?void 0:d.fontSizePx)&&void 0!==c?c:null===(f=t.global)||void 0===f?void 0:f.fontSizePx)&&void 0!==h?h:13.3333,color:null!==(m=null!==(u=null===(v=t["bn-text"])||void 0===v?void 0:v.fontColor)&&void 0!==u?u:null===(p=t.global)||void 0===p?void 0:p.fontColor)&&void 0!==m?m:"#000000",background:null!==(w=null!==(g=null===(b=t["bn-text"])||void 0===b?void 0:b.fontBackgroundColor)&&void 0!==g?g:null===(y=t.global)||void 0===y?void 0:y.fontBackgroundColor)&&void 0!==w?w:"#ffffff",leading:null!==(R=null===(_=t["bn-text"])||void 0===_?void 0:_.leading)&&void 0!==R?R:1.8}}}))}applyScaling(t){const o=this.element,{mode:i,factor:e}=a(this.scale),{width:n,height:r}=s(o),l=o.scrollHeight>o.clientHeight+1?o.clientHeight:r,d=n,c=d>0&&o.scrollWidth>d+1,f=l>0&&o.scrollHeight>l+1,h=c||f;if(d<=0&&l<=0)return;if("none"===i){if(h){const t=[];c&&t.push(`w:${o.scrollWidth}>${Math.round(d)}`),f&&t.push(`h:${o.scrollHeight}>${Math.round(l)}`),this.errors.addOrReplace({id:"WARN_overflow",type:"warning",message:`Content overflows container (${t.join(", ")})`})}else this.errors.remove("WARN_overflow");return}if("factor"===i){if(h){const t=[];c&&t.push(`w:${o.scrollWidth}>${Math.round(d)}`),f&&t.push(`h:${o.scrollHeight}>${Math.round(l)}`),this.errors.addOrReplace({id:"WARN_overflow",type:"warning",message:`Content overflows with factor ${e} (${t.join(", ")})`})}else this.errors.remove("WARN_overflow");return}o.style.setProperty("--bn-font-size",`${t}px`);const v=o.scrollWidth,u=o.scrollHeight,p=o.clientHeight,m=u>p+1?p:r,b=d<=0||v<=d+1,g=m<=0||u<=m+1;if(b&&g)return void this.errors.remove("AUTO_scale");const y=Math.min(1,!b&&d>0?d/v:1,!g&&m>0?m/u:1);o.style.setProperty("--bn-font-size",t*y+"px"),"empty"===i?this.errors.addOrReplace({id:"AUTO_scale",type:"warning",message:`Auto-scaled font by factor ${y.toFixed(3)}`}):this.errors.remove("AUTO_scale")}componentDidRender(){this.container.innerHTML=p(this.evalTemplate(this.value)),this.applyScaling(this.prepareStyle().fontStyles.size)}render(){const{fontStyles:t}=this.prepareStyle(),{mode:e,factor:n}=a(this.scale),s="factor"===e?t.size*n+"px":`${t.size}px`,r={"--bn-font-family":t.font.substring(t.font.indexOf("px ")+3),"--bn-font-size":s,"--bn-font-color":t.color,"--bn-font-background":t.background};return o(i,{key:"49a4060ebb36623a64a41efbdefcdcc9060457c3",style:r},o("div",{key:"19f66b3d17d38d3c8119f9cb6b046e0d18c0f022"},o("span",{key:"3b8cf9f75aeb668cb0c32a7a3540e0ed8f336050",class:"container",ref:t=>{this.container=t}})))}get element(){return e(this)}static get watchers(){return{value:[{validateValue:0}],scale:[{validateScaling:0}]}}};b.style=':host{padding:0.5em;display:inline-block;position:relative;overflow:hidden;font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);color:var(--bn-font-color, #000000);background-color:var(--bn-font-background, white)}span.container p{margin:0}';export{b as bn_text}