@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.
- package/dist/bn-template-engine/bn-template-engine.esm.js +1 -1
- package/dist/bn-template-engine/p-1265d8d3.entry.js +1 -0
- package/dist/bn-template-engine/p-15516dac.entry.js +1 -0
- package/dist/bn-template-engine/p-1c716641.entry.js +1 -0
- package/dist/bn-template-engine/p-27cc8dc0.entry.js +1 -0
- package/dist/bn-template-engine/p-4426d484.entry.js +1 -0
- package/dist/bn-template-engine/p-51f8dc9e.entry.js +1 -0
- package/dist/bn-template-engine/p-53d4e690.entry.js +1 -0
- package/dist/bn-template-engine/p-5KQYRQLK.js +1 -0
- package/dist/bn-template-engine/p-745f4596.entry.js +1 -0
- package/dist/bn-template-engine/{p-0f1504f3.entry.js → p-75e97c87.entry.js} +1 -1
- package/dist/bn-template-engine/p-7a560278.entry.js +1 -0
- package/dist/bn-template-engine/p-7ea7c325.entry.js +1 -0
- package/dist/bn-template-engine/p-945cc95d.entry.js +1 -0
- package/dist/bn-template-engine/p-BYBpC0EO.js +1 -0
- package/dist/bn-template-engine/p-BfXY5dsy.js +1 -0
- package/dist/bn-template-engine/p-BgnHJQ9Q.js +1 -0
- package/dist/bn-template-engine/{p-DgfL-ffj.js → p-Bhd_WSML.js} +1 -1
- package/dist/bn-template-engine/p-Bka-Z6jo.js +1 -0
- package/dist/bn-template-engine/p-Bnhh02CF.js +1 -0
- package/dist/bn-template-engine/p-C7dQL8CS.js +1 -0
- package/dist/bn-template-engine/p-CL1RYuNU.js +1 -0
- package/dist/bn-template-engine/p-CYwd_ZNM.js +1 -0
- package/dist/bn-template-engine/p-ChlK-T9I.js +1 -0
- package/dist/bn-template-engine/p-DHezf8pZ.js +1 -0
- package/dist/bn-template-engine/{p-DVMu6dEy.js → p-DlppAFq9.js} +1 -1
- package/dist/bn-template-engine/p-DvDDgmcV.js +1 -0
- package/dist/bn-template-engine/p-DvvwfRQG.js +1 -0
- package/dist/bn-template-engine/{p-DG-1MR_T.js → p-P7pGJBgc.js} +1 -1
- package/dist/bn-template-engine/p-b34eaf86.entry.js +1 -0
- package/dist/bn-template-engine/p-bdb8b44c.entry.js +1 -0
- package/dist/bn-template-engine/p-c44fcb8e.entry.js +1 -0
- package/dist/bn-template-engine/p-c7e1a49b.entry.js +1 -0
- package/dist/bn-template-engine/p-d9003041.entry.js +1 -0
- package/dist/bn-template-engine/p-daa7ffa3.entry.js +1 -0
- package/dist/bn-template-engine/p-e084f50a.entry.js +1 -0
- package/dist/bn-template-engine/p-eaba6658.entry.js +1 -0
- package/dist/bn-template-engine/{p-CvXqez4D.js → p-u8igQLRZ.js} +1 -1
- package/dist/cjs/{DataFormatDigits-CbIVfGEH.js → DataFormatDigits-DKcOeLNK.js} +1 -1
- package/dist/cjs/{DateStringFactory-CfkXYAMN.js → DateStringFactory-CSKvbS8K.js} +1 -1
- package/dist/cjs/{Order-DtpbD8mQ.js → Order-iG11HI4R.js} +36 -5
- package/dist/cjs/{SVGVariancesStyleGroup-D-rTWlDo.js → SVGVariancesStyleGroup-K-Tw6lOD.js} +1 -14
- package/dist/cjs/bn-asset.cjs.entry.js +5 -4
- package/dist/cjs/bn-body_4.cjs.entry.js +15 -13
- package/dist/cjs/bn-card.cjs.entry.js +5 -4
- package/dist/cjs/{ibcs-chart-structure.cjs.entry.js → bn-chart-structure_5.cjs.entry.js} +1058 -28
- package/dist/cjs/bn-chart-time.cjs.entry.js +38 -12
- package/dist/cjs/bn-component-style.cjs.entry.js +5 -4
- package/dist/cjs/bn-dataset.cjs.entry.js +38 -9
- package/dist/cjs/bn-grid.cjs.entry.js +9 -7
- package/dist/cjs/bn-image.cjs.entry.js +9 -7
- package/dist/cjs/bn-internationalization.cjs.entry.js +5 -4
- package/dist/cjs/bn-layout-card.cjs.entry.js +3 -2
- package/dist/cjs/bn-layout-page.cjs.entry.js +2 -1
- package/dist/cjs/bn-message.cjs.entry.js +5 -4
- package/dist/cjs/bn-table.cjs.entry.js +979 -0
- package/dist/cjs/bn-template-engine.cjs.js +1 -1
- package/dist/cjs/bn-template.cjs.entry.js +3 -2
- package/dist/cjs/bn-text.cjs.entry.js +11 -9
- package/dist/cjs/bn-tree.cjs.entry.js +9 -7
- package/dist/cjs/contentDecoder-JxOldq1e.js +419 -0
- package/dist/cjs/{context-protocol-CRPmux5D.js → context-protocol-DRQWrwsA.js} +2 -0
- package/dist/cjs/editor-companion.cjs.entry.js +1 -1
- package/dist/cjs/emotion-hash.esm-nbbEQ0Dn.js +57 -0
- package/dist/cjs/ibcs-chart-time.cjs.entry.js +22 -18
- package/dist/cjs/{bn-context_5.cjs.entry.js → ibcs-table.cjs.entry.js} +159 -1259
- package/dist/cjs/{StringAdapter-ByCHdlDO.js → ibcsRuleSet-DgUoXOfd.js} +10 -10
- package/dist/cjs/index-Dm85hG6t.js +65 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{scaling-D8sIIKft.js → scaling-9Tz595RQ.js} +7 -7
- package/dist/cjs/{withHasError-B8gHkfV2.js → utils-CwHIVbbL.js} +1 -69
- package/dist/cjs/{withBodyObserver-C6gLgq_e.js → withBodyObserver-CKpSD8UT.js} +3 -3
- package/dist/cjs/{withComponentStatus-_x4LQZ0N.js → withComponentStatus-Bw70BhO0.js} +5 -5
- package/dist/cjs/{withComponentStyle-DMtic_9Y.js → withComponentStyle-aIbTCtfj.js} +5 -5
- package/dist/cjs/withHasError-D7ue5vAv.js +72 -0
- package/dist/cjs/{withStyled-BBtMesx3.js → withStyled-CS1Yp4sv.js} +12 -61
- package/dist/cjs/{withTranslation-CWPAIRjh.js → withTranslation-rwgyITqe.js} +5 -5
- package/dist/collection/components/bn-chart-structure/bn-chart-structure.js +226 -99
- package/dist/collection/components/bn-chart-structure/ibcs-chart-structure.js +13 -3
- package/dist/collection/components/bn-chart-structure/utils/StructureChart.js +94 -11
- package/dist/collection/components/bn-chart-structure/utils/elements/StackedBar.js +3 -4
- package/dist/collection/components/bn-chart-structure/utils/model/styles/StructureChartStyle.js +4 -0
- package/dist/collection/components/bn-chart-time/bn-chart-time.js +28 -4
- package/dist/collection/components/bn-chart-time/utils/TimeChart.js +3 -3
- package/dist/collection/components/bn-chart-time/utils/elements/StackedColumn.js +3 -4
- package/dist/collection/components/bn-chart-time/utils/model/styles/TimeChartStyle.js +4 -0
- package/dist/collection/components/bn-dataset/bn-dataset.js +49 -2
- package/dist/collection/components/bn-datasource/bn-datasource.js +46 -3
- package/dist/collection/components/bn-table/bn-table.js +60 -12
- package/dist/collection/components/bn-table/ibcs-table.css +7 -5
- package/dist/collection/components/bn-table/ibcs-table.js +22 -1
- package/dist/collection/components/bn-table/utils/elements/CellBarChart.js +79 -31
- package/dist/collection/components/bn-table/utils/elements/TableRow.js +3 -1
- package/dist/collection/components/bn-table/utils/factories/tableDataSetFactory.js +12 -3
- package/dist/collection/components/bn-table/utils/helper/ColumnStatistics.js +9 -1
- package/dist/collection/stores/componentStyles.js +2 -0
- package/dist/collection/utils/constants.js +35 -5
- package/dist/collection/utils/contentDecoder.js +28 -0
- package/dist/collection/utils/stackColors.js +2 -2
- package/dist/collection/utils/validate.js +5 -2
- package/dist/components/DataFormatDigits.js +1 -1
- package/dist/components/DateStringFactory.js +1 -1
- package/dist/components/Order.js +1 -1
- package/dist/components/SVGVariancesStyleGroup.js +1 -1
- package/dist/components/bn-chart-structure.js +1 -1
- package/dist/components/bn-chart-time.js +1 -1
- package/dist/components/bn-dataset.js +1 -1
- package/dist/components/bn-datasource.js +1 -1
- package/dist/components/bn-table.js +1 -1
- package/dist/components/bn-title2.js +1 -1
- package/dist/components/contentDecoder.js +1 -0
- package/dist/components/context-protocol.js +1 -1
- package/dist/components/emotion-hash.esm.js +1 -0
- package/dist/components/ibcs-chart-structure2.js +1 -1
- package/dist/components/ibcs-chart-time2.js +1 -1
- package/dist/components/ibcs-table2.js +1 -1
- package/dist/components/ibcs-title2.js +1 -1
- package/dist/components/ibcsRuleSet.js +1 -1
- package/dist/components/validate.js +1 -1
- package/dist/components/withStyled.js +1 -1
- package/dist/esm/{DataFormatDigits-DYdbRX-1.js → DataFormatDigits-oSZ1hBKE.js} +1 -1
- package/dist/esm/{DateStringFactory-DRcbojUT.js → DateStringFactory-CSGz6TDk.js} +1 -1
- package/dist/esm/{Order-DdexOqTs.js → Order-Bnhh02CF.js} +36 -6
- package/dist/esm/{SVGVariancesStyleGroup-D0Cwprv1.js → SVGVariancesStyleGroup-CqTjrZYg.js} +2 -13
- package/dist/esm/bn-asset.entry.js +5 -4
- package/dist/esm/bn-body_4.entry.js +11 -9
- package/dist/esm/bn-card.entry.js +5 -4
- package/dist/esm/{ibcs-chart-structure.entry.js → bn-chart-structure_5.entry.js} +1048 -22
- package/dist/esm/bn-chart-time.entry.js +38 -12
- package/dist/esm/bn-component-style.entry.js +5 -4
- package/dist/esm/bn-dataset.entry.js +35 -6
- package/dist/esm/bn-grid.entry.js +9 -7
- package/dist/esm/bn-image.entry.js +9 -7
- package/dist/esm/bn-internationalization.entry.js +5 -4
- package/dist/esm/bn-layout-card.entry.js +3 -2
- package/dist/esm/bn-layout-page.entry.js +2 -1
- package/dist/esm/bn-message.entry.js +5 -4
- package/dist/esm/bn-table.entry.js +977 -0
- package/dist/esm/bn-template-engine.js +1 -1
- package/dist/esm/bn-template.entry.js +3 -2
- package/dist/esm/bn-text.entry.js +11 -9
- package/dist/esm/bn-tree.entry.js +9 -7
- package/dist/esm/contentDecoder-oMmxz6nJ.js +416 -0
- package/dist/esm/{context-protocol-Bz5klD-F.js → context-protocol-BHnQsVsr.js} +2 -0
- package/dist/esm/editor-companion.entry.js +1 -1
- package/dist/esm/emotion-hash.esm-BYBpC0EO.js +55 -0
- package/dist/esm/ibcs-chart-time.entry.js +15 -11
- package/dist/esm/{bn-context_5.entry.js → ibcs-table.entry.js} +106 -1202
- package/dist/esm/{StringAdapter-CTL-Dvzp.js → ibcsRuleSet-K4ytuA1f.js} +10 -10
- package/dist/esm/index-DHezf8pZ.js +65 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{scaling-C6K8FYSF.js → scaling-Cehc74IE.js} +2 -2
- package/dist/esm/{withHasError-B3QX2emi.js → utils-DvvwfRQG.js} +1 -69
- package/dist/esm/{withBodyObserver-DczL5ia8.js → withBodyObserver-FQ8NwCIz.js} +1 -1
- package/dist/esm/{withComponentStatus-DodoSXe-.js → withComponentStatus-DWjDYtZ7.js} +1 -1
- package/dist/esm/{withComponentStyle-BerJY64r.js → withComponentStyle-9uP_hcDq.js} +2 -2
- package/dist/esm/withHasError-FyY5mQ_3.js +70 -0
- package/dist/esm/{withStyled-DCipbf2O.js → withStyled--qQWquTH.js} +9 -59
- package/dist/esm/{withTranslation-mimbJdER.js → withTranslation-BqD0Kp7b.js} +2 -2
- package/dist/types/components/bn-chart-structure/bn-chart-structure.d.ts +155 -109
- package/dist/types/components/bn-chart-structure/utils/StructureChart.d.ts +7 -0
- package/dist/types/components/bn-chart-structure/utils/model/styles/StructureChartStyle.d.ts +1 -0
- package/dist/types/components/bn-chart-time/utils/model/styles/TimeChartStyle.d.ts +1 -0
- package/dist/types/components/bn-dataset/bn-dataset.d.ts +6 -0
- package/dist/types/components/bn-datasource/bn-datasource.d.ts +8 -0
- package/dist/types/components/bn-table/bn-table.d.ts +12 -8
- package/dist/types/components/bn-table/ibcs-table.d.ts +1 -0
- package/dist/types/components/bn-table/utils/elements/Cell.d.ts +1 -0
- package/dist/types/components/bn-table/utils/elements/CellBarChart.d.ts +1 -0
- package/dist/types/components.d.ts +118 -34
- package/dist/types/stores/componentStyles.d.ts +2 -0
- package/dist/types/utils/constants.d.ts +23 -5
- package/dist/types/utils/contentDecoder.d.ts +12 -0
- package/dist/types/utils/validate.d.ts +1 -0
- package/package.json +2 -1
- package/dist/bn-template-engine/p--PSoPbDM.js +0 -1
- package/dist/bn-template-engine/p-05a82a77.entry.js +0 -1
- package/dist/bn-template-engine/p-0ca8dc17.entry.js +0 -1
- package/dist/bn-template-engine/p-1d9a3be9.entry.js +0 -1
- package/dist/bn-template-engine/p-35638ad0.entry.js +0 -1
- package/dist/bn-template-engine/p-37881d05.entry.js +0 -1
- package/dist/bn-template-engine/p-3b894997.entry.js +0 -1
- package/dist/bn-template-engine/p-50e49732.entry.js +0 -1
- package/dist/bn-template-engine/p-60a7fc59.entry.js +0 -1
- package/dist/bn-template-engine/p-6c7c0455.entry.js +0 -1
- package/dist/bn-template-engine/p-6da93eae.entry.js +0 -1
- package/dist/bn-template-engine/p-701e1578.entry.js +0 -1
- package/dist/bn-template-engine/p-BSfqOkN_.js +0 -1
- package/dist/bn-template-engine/p-CRLgp9-v.js +0 -1
- package/dist/bn-template-engine/p-CYjZRKdI.js +0 -1
- package/dist/bn-template-engine/p-DRikHQE-.js +0 -1
- package/dist/bn-template-engine/p-DVo6aZUE.js +0 -1
- package/dist/bn-template-engine/p-DdexOqTs.js +0 -1
- package/dist/bn-template-engine/p-DyRaC0MB.js +0 -1
- package/dist/bn-template-engine/p-a95ccc16.entry.js +0 -1
- package/dist/bn-template-engine/p-b7bec050.entry.js +0 -1
- package/dist/bn-template-engine/p-bc59ea5c.entry.js +0 -1
- package/dist/bn-template-engine/p-d279b578.entry.js +0 -1
- package/dist/bn-template-engine/p-dd9dd407.entry.js +0 -1
- package/dist/bn-template-engine/p-e102a490.entry.js +0 -1
- package/dist/bn-template-engine/p-f27995c9.entry.js +0 -1
- package/dist/bn-template-engine/p-f89e55c6.entry.js +0 -1
- package/dist/bn-template-engine/p-tzFCK9qn.js +0 -1
- package/dist/cjs/bn-chart-structure.cjs.entry.js +0 -700
- 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
|
-
*
|
|
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
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
|
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
|
|
125
|
-
* @default
|
|
126
|
-
* @example stack='{"by":"
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
|
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
|
|
1492
|
-
* @default
|
|
1493
|
-
* @example stack='{"by":"
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
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
|
-
/**
|
|
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
|
-
|
|
122
|
-
|
|
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.
|
|
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}
|