@bino-bi/bn-template-engine 1.0.0-alpha.3 → 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 (195) 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-B4ySv9KQ.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-C0yAPzJz.js → p-u8igQLRZ.js} +1 -1
  39. package/dist/cjs/{DataFormatDigits-DAmZzqbD.js → DataFormatDigits-DKcOeLNK.js} +1 -1
  40. package/dist/cjs/{DateStringFactory-CcluhpGI.js → DateStringFactory-CSKvbS8K.js} +1 -1
  41. package/dist/cjs/{Order-BKoDS21t.js → Order-iG11HI4R.js} +8 -5
  42. package/dist/cjs/{SVGVariancesStyleGroup-DYYAU-81.js → SVGVariancesStyleGroup-K-Tw6lOD.js} +1 -14
  43. package/dist/cjs/bn-asset.cjs.entry.js +5 -4
  44. package/dist/cjs/bn-body_4.cjs.entry.js +15 -13
  45. package/dist/cjs/bn-card.cjs.entry.js +5 -4
  46. package/dist/cjs/{ibcs-chart-structure.cjs.entry.js → bn-chart-structure_5.cjs.entry.js} +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} +122 -1293
  67. package/dist/cjs/{StringAdapter-Bneo8T4k.js → ibcsRuleSet-DgUoXOfd.js} +10 -10
  68. package/dist/cjs/index-Dm85hG6t.js +65 -0
  69. package/dist/cjs/loader.cjs.js +1 -1
  70. package/dist/cjs/{scaling-D8sIIKft.js → scaling-9Tz595RQ.js} +7 -7
  71. package/dist/cjs/{withHasError-B8gHkfV2.js → utils-CwHIVbbL.js} +1 -69
  72. package/dist/cjs/{withBodyObserver-C6gLgq_e.js → withBodyObserver-CKpSD8UT.js} +3 -3
  73. package/dist/cjs/{withComponentStatus-_x4LQZ0N.js → withComponentStatus-Bw70BhO0.js} +5 -5
  74. package/dist/cjs/{withComponentStyle-DMtic_9Y.js → withComponentStyle-aIbTCtfj.js} +5 -5
  75. package/dist/cjs/withHasError-D7ue5vAv.js +72 -0
  76. package/dist/cjs/{withStyled-CW30Bh6c.js → withStyled-CS1Yp4sv.js} +8 -61
  77. package/dist/cjs/{withTranslation-CWPAIRjh.js → withTranslation-rwgyITqe.js} +5 -5
  78. package/dist/collection/components/bn-chart-structure/bn-chart-structure.js +226 -99
  79. package/dist/collection/components/bn-chart-structure/ibcs-chart-structure.js +13 -3
  80. package/dist/collection/components/bn-chart-structure/utils/StructureChart.js +94 -11
  81. package/dist/collection/components/bn-chart-structure/utils/elements/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 +9 -12
  90. package/dist/collection/components/bn-table/utils/elements/CellBarChart.js +58 -41
  91. package/dist/collection/stores/componentStyles.js +2 -0
  92. package/dist/collection/utils/constants.js +8 -5
  93. package/dist/collection/utils/contentDecoder.js +28 -0
  94. package/dist/collection/utils/stackColors.js +2 -2
  95. package/dist/collection/utils/validate.js +1 -1
  96. package/dist/components/DataFormatDigits.js +1 -1
  97. package/dist/components/Order.js +1 -1
  98. package/dist/components/SVGVariancesStyleGroup.js +1 -1
  99. package/dist/components/bn-chart-structure.js +1 -1
  100. package/dist/components/bn-chart-time.js +1 -1
  101. package/dist/components/bn-dataset.js +1 -1
  102. package/dist/components/bn-datasource.js +1 -1
  103. package/dist/components/bn-table.js +1 -1
  104. package/dist/components/contentDecoder.js +1 -0
  105. package/dist/components/context-protocol.js +1 -1
  106. package/dist/components/emotion-hash.esm.js +1 -0
  107. package/dist/components/ibcs-chart-structure2.js +1 -1
  108. package/dist/components/ibcs-chart-time2.js +1 -1
  109. package/dist/components/ibcs-table2.js +1 -1
  110. package/dist/components/ibcs-title2.js +1 -1
  111. package/dist/components/ibcsRuleSet.js +1 -1
  112. package/dist/components/validate.js +1 -1
  113. package/dist/components/withStyled.js +1 -1
  114. package/dist/esm/{DataFormatDigits--qIbKvXa.js → DataFormatDigits-oSZ1hBKE.js} +1 -1
  115. package/dist/esm/{DateStringFactory-XWdUjsn8.js → DateStringFactory-CSGz6TDk.js} +1 -1
  116. package/dist/esm/{Order-sqjrku2z.js → Order-Bnhh02CF.js} +9 -6
  117. package/dist/esm/{SVGVariancesStyleGroup-ibg3sLjM.js → SVGVariancesStyleGroup-CqTjrZYg.js} +2 -13
  118. package/dist/esm/bn-asset.entry.js +5 -4
  119. package/dist/esm/bn-body_4.entry.js +11 -9
  120. package/dist/esm/bn-card.entry.js +5 -4
  121. package/dist/esm/{ibcs-chart-structure.entry.js → bn-chart-structure_5.entry.js} +1048 -22
  122. package/dist/esm/bn-chart-time.entry.js +38 -12
  123. package/dist/esm/bn-component-style.entry.js +5 -4
  124. package/dist/esm/bn-dataset.entry.js +35 -6
  125. package/dist/esm/bn-grid.entry.js +9 -7
  126. package/dist/esm/bn-image.entry.js +9 -7
  127. package/dist/esm/bn-internationalization.entry.js +5 -4
  128. package/dist/esm/bn-layout-card.entry.js +3 -2
  129. package/dist/esm/bn-layout-page.entry.js +2 -1
  130. package/dist/esm/bn-message.entry.js +5 -4
  131. package/dist/esm/bn-table.entry.js +977 -0
  132. package/dist/esm/bn-template-engine.js +1 -1
  133. package/dist/esm/bn-template.entry.js +3 -2
  134. package/dist/esm/bn-text.entry.js +11 -9
  135. package/dist/esm/bn-tree.entry.js +9 -7
  136. package/dist/esm/contentDecoder-oMmxz6nJ.js +416 -0
  137. package/dist/esm/{context-protocol-Bz5klD-F.js → context-protocol-BHnQsVsr.js} +2 -0
  138. package/dist/esm/editor-companion.entry.js +1 -1
  139. package/dist/esm/emotion-hash.esm-BYBpC0EO.js +55 -0
  140. package/dist/esm/ibcs-chart-time.entry.js +15 -11
  141. package/dist/esm/{bn-context_5.entry.js → ibcs-table.entry.js} +68 -1235
  142. package/dist/esm/{StringAdapter-BCLJpQQ8.js → ibcsRuleSet-K4ytuA1f.js} +10 -10
  143. package/dist/esm/index-DHezf8pZ.js +65 -0
  144. package/dist/esm/loader.js +1 -1
  145. package/dist/esm/{scaling-C6K8FYSF.js → scaling-Cehc74IE.js} +2 -2
  146. package/dist/esm/{withHasError-B3QX2emi.js → utils-DvvwfRQG.js} +1 -69
  147. package/dist/esm/{withBodyObserver-DczL5ia8.js → withBodyObserver-FQ8NwCIz.js} +1 -1
  148. package/dist/esm/{withComponentStatus-DodoSXe-.js → withComponentStatus-DWjDYtZ7.js} +1 -1
  149. package/dist/esm/{withComponentStyle-BerJY64r.js → withComponentStyle-9uP_hcDq.js} +2 -2
  150. package/dist/esm/withHasError-FyY5mQ_3.js +70 -0
  151. package/dist/esm/{withStyled-D1fAWJ3g.js → withStyled--qQWquTH.js} +6 -59
  152. package/dist/esm/{withTranslation-mimbJdER.js → withTranslation-BqD0Kp7b.js} +2 -2
  153. package/dist/types/components/bn-chart-structure/bn-chart-structure.d.ts +155 -109
  154. package/dist/types/components/bn-chart-structure/utils/StructureChart.d.ts +7 -0
  155. package/dist/types/components/bn-chart-structure/utils/model/styles/StructureChartStyle.d.ts +1 -0
  156. package/dist/types/components/bn-chart-time/utils/model/styles/TimeChartStyle.d.ts +1 -0
  157. package/dist/types/components/bn-dataset/bn-dataset.d.ts +6 -0
  158. package/dist/types/components/bn-datasource/bn-datasource.d.ts +8 -0
  159. package/dist/types/components/bn-table/bn-table.d.ts +3 -3
  160. package/dist/types/components/bn-table/utils/elements/CellBarChart.d.ts +0 -2
  161. package/dist/types/components.d.ts +100 -36
  162. package/dist/types/stores/componentStyles.d.ts +2 -0
  163. package/dist/types/utils/constants.d.ts +8 -5
  164. package/dist/types/utils/contentDecoder.d.ts +12 -0
  165. package/package.json +2 -1
  166. package/dist/bn-template-engine/p-05a82a77.entry.js +0 -1
  167. package/dist/bn-template-engine/p-1970906d.entry.js +0 -1
  168. package/dist/bn-template-engine/p-1dbd339c.entry.js +0 -1
  169. package/dist/bn-template-engine/p-2e68cf09.entry.js +0 -1
  170. package/dist/bn-template-engine/p-31cc6a2d.entry.js +0 -1
  171. package/dist/bn-template-engine/p-37881d05.entry.js +0 -1
  172. package/dist/bn-template-engine/p-3b894997.entry.js +0 -1
  173. package/dist/bn-template-engine/p-50e49732.entry.js +0 -1
  174. package/dist/bn-template-engine/p-6c7c0455.entry.js +0 -1
  175. package/dist/bn-template-engine/p-6da93eae.entry.js +0 -1
  176. package/dist/bn-template-engine/p-701e1578.entry.js +0 -1
  177. package/dist/bn-template-engine/p-8tsCnxIz.js +0 -1
  178. package/dist/bn-template-engine/p-997b2fe4.entry.js +0 -1
  179. package/dist/bn-template-engine/p-BL8gyUwE.js +0 -1
  180. package/dist/bn-template-engine/p-BSfqOkN_.js +0 -1
  181. package/dist/bn-template-engine/p-CRLgp9-v.js +0 -1
  182. package/dist/bn-template-engine/p-CYjZRKdI.js +0 -1
  183. package/dist/bn-template-engine/p-DRikHQE-.js +0 -1
  184. package/dist/bn-template-engine/p-DtdQCMzj.js +0 -1
  185. package/dist/bn-template-engine/p-a90f1cbe.entry.js +0 -1
  186. package/dist/bn-template-engine/p-b7bec050.entry.js +0 -1
  187. package/dist/bn-template-engine/p-d7f0cbaf.entry.js +0 -1
  188. package/dist/bn-template-engine/p-dfb61aa5.entry.js +0 -1
  189. package/dist/bn-template-engine/p-ece17f84.entry.js +0 -1
  190. package/dist/bn-template-engine/p-f27995c9.entry.js +0 -1
  191. package/dist/bn-template-engine/p-fd427179.entry.js +0 -1
  192. package/dist/bn-template-engine/p-sqjrku2z.js +0 -1
  193. package/dist/bn-template-engine/p-tzFCK9qn.js +0 -1
  194. package/dist/cjs/bn-chart-structure.cjs.entry.js +0 -700
  195. package/dist/esm/bn-chart-structure.entry.js +0 -698
@@ -1,1198 +1,14 @@
1
- import { r as registerInstance, h, H as Host, g as getElement } from './index-JNHhIe7t.js';
2
- import { b as getOrCreateStores, g as getStores, a as globalLabelKeys } from './context-protocol-Bz5klD-F.js';
3
- import { w as withComponentStatus } from './withComponentStatus-DodoSXe-.js';
4
- import { w as withHasError } from './withHasError-B3QX2emi.js';
5
- import { w as withBodyObserver } from './withBodyObserver-DczL5ia8.js';
6
- import { j as isBlankInput, w as withStyled, v as validateScenarioList, a as validateVariancesList, p as isTableBarColumnWidth, i as isValidNumber, q as isValidDataFormat, f as isValidBoolean, r as isValidTableType, e as isValidInteger, s as validateThereOfJsonStr, t as validatePartOfJsonStr, c as validateOrderList, d as isValidDirection, u as isValidMeasureType, g as isValidMeasureScale, x as isTableCategoryWidth, y as validateColumnThereOfJsonStr } from './withStyled-D1fAWJ3g.js';
7
- import { w as withComponentStyle } from './withComponentStyle-BerJY64r.js';
8
- import { w as withDataset, g as getParentDimensions, p as parseScaling } from './scaling-C6K8FYSF.js';
9
- import { w as withTranslation } from './withTranslation-mimbJdER.js';
10
- import { h as DataFormat, O as OrderDirection$1, a as OrderColumn, I as I18nMode, j as TableCategoryWidth, M as MeasureType, B as BAR_COLUMN_WIDTH_EM, T as TableBarColumnWidth, e as CompareUtil, d as AdapterUtils, k as OrderAdapter } from './Order-sqjrku2z.js';
1
+ import { h, r as registerInstance, H as Host, g as getElement } from './index-JNHhIe7t.js';
2
+ import { a as TableRowType, T as TableType, O as OrderDirection, F as FactoryState } from './index-DHezf8pZ.js';
11
3
  import { F as Formatter, Q as QueryColumnNames, V as VarianceScenario } from './formatter-DTMEZ6d8.js';
4
+ import { I as I18nMode, d as DataFormat, g as CompareUtil, f as AdapterUtils, l as OrderAdapter, T as TableCategoryWidth, M as MeasureType } from './Order-Bnhh02CF.js';
12
5
  import { a as alasql } from './alasql.min-CWu4NkIt.js';
13
- import { I as IBCSRuleSet, S as StringAdapter } from './StringAdapter-BCLJpQQ8.js';
14
- import { D as DataAnalyzer, S as SiPrefix, a as DataFormatDigits, b as DataFormatDigitsAdapter } from './DataFormatDigits--qIbKvXa.js';
15
- import './DateStringFactory-XWdUjsn8.js';
6
+ import { I as IBCSRuleSet, S as StringAdapter } from './ibcsRuleSet-K4ytuA1f.js';
7
+ import { D as DataAnalyzer, S as SiPrefix, a as DataFormatDigits, b as DataFormatDigitsAdapter } from './DataFormatDigits-oSZ1hBKE.js';
8
+ import { w as withComponentStyle } from './withComponentStyle-9uP_hcDq.js';
16
9
  import './_commonjsHelpers-BFTU3MAI.js';
17
-
18
- const bnContextCss = () => `:host{display:block}`;
19
-
20
- const Context = class {
21
- constructor(hostRef) {
22
- registerInstance(this, hostRef);
23
- this.currentPageUpdate = undefined;
24
- withComponentStatus(this);
25
- this.errors = withHasError(this);
26
- }
27
- setLocale(newValue) {
28
- this.stores.context.state.locale = newValue;
29
- }
30
- connectedCallback() {
31
- // Retrieve (or create) the stores for this context element.
32
- // A descendant component may have already triggered creation via
33
- // getStores() if Stencil initialized it before this component.
34
- this.stores = getOrCreateStores(this.element);
35
- if (this.locale) {
36
- this.stores.context.state.locale = this.locale;
37
- }
38
- this.currentPageUpdate = setTimeout(() => {
39
- this.element.querySelectorAll("bn-page, bn-layout-page").forEach((page, index) => {
40
- if (page.localName === "bn-layout-page") {
41
- page.setAttribute("page-number", (index + 1).toString());
42
- }
43
- else {
44
- const footer = page.querySelector("bn-footer");
45
- if (footer) {
46
- // @ts-ignore
47
- footer.setAttribute("page-number", (index + 1).toString());
48
- }
49
- }
50
- });
51
- }, 250);
52
- }
53
- disconnectedCallback() {
54
- if (this.currentPageUpdate) {
55
- clearTimeout(this.currentPageUpdate);
56
- }
57
- }
58
- componentWillLoad() {
59
- // stencil needs one componenet implementing all lifecycle steps to get mixing working
60
- }
61
- componentDidLoad() { }
62
- componentShouldUpdate() { }
63
- componentWillRender() { }
64
- componentDidRender() { }
65
- componentWillUpdate() { }
66
- componentDidUpdate() { }
67
- render() {
68
- return (h(Host, { key: 'b92019b909e271225baca2cf740c8301e324164e' }, h("slot", { key: '87bac4bb29bca32d961afe31355dc1bd48fff0f8' })));
69
- }
70
- get element() { return getElement(this); }
71
- static get watchers() { return {
72
- "locale": [{
73
- "setLocale": 0
74
- }]
75
- }; }
76
- };
77
- Context.style = bnContextCss();
78
-
79
- const bnDatasourceCss = () => `bn-datasource{display:none}`;
80
-
81
- const Datasource = class {
82
- constructor(hostRef) {
83
- registerInstance(this, hostRef);
84
- withComponentStatus(this);
85
- this.errors = withHasError(this);
86
- withBodyObserver(this, (data) => {
87
- if (!this.stores)
88
- this.stores = getStores(this.element);
89
- try {
90
- const json = JSON.parse(data);
91
- // @ts-ignore
92
- this.stores.datasources.set(this.name, json);
93
- }
94
- catch (e) {
95
- console.error("Error parsing datasource", e, data);
96
- // @ts-ignore
97
- this.stores.datasources.set(this.name, []);
98
- }
99
- });
100
- }
101
- render() {
102
- return h(Host, { key: 'e47e62c941bb7954cabe331cb500a7d2fdd7c487' });
103
- }
104
- get element() { return getElement(this); }
105
- };
106
- Datasource.style = bnDatasourceCss();
107
-
108
- const bnPageCss = () => `:host{background:var(--bn-font-background, white);color:var(--bn-font-color, black);font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);height:768px;width:1024px;display:flex;flex-direction:column;page-break-after:always;overflow:hidden}:host([format=xga]){height:768px;width:1024px}:host([format=xga][orientation=portrait]){height:1024px;width:768px}:host([format=xga][orientation=landscape]){height:768px;width:1024px}:host([format=hd]){height:720px;width:1280px}:host([format=hd][orientation=portrait]){height:1280px;width:720px}:host([format=hd][orientation=landscape]){height:720px;width:1280px}:host([format=full_hd]){height:1080px;width:1920px}:host([format=full_hd][orientation=portrait]){height:1920px;width:1080px}:host([format=full_hd][orientation=landscape]){height:1080px;width:1920px}:host([format="4k"]){height:2160px;width:3840px}:host([format="4k"][orientation=portrait]){height:3840px;width:2160px}:host([format="4k"][orientation=landscape]){height:2160px;width:3840px}:host([format="4k2k"]){height:2160px;width:4096px}:host([format="4k2k"][orientation=portrait]){height:4096px;width:2160px}:host([format="4k2k"][orientation=landscape]){height:2160px;width:4096px}:host([format=a6]){height:5.83in;width:4.13in}:host([format=a6][orientation=portrait]){height:5.83in;width:4.13in}:host([format=a6][orientation=landscape]){height:4.13in;width:5.83in}:host([format=a5]){height:8.27in;width:5.83in}:host([format=a5][orientation=portrait]){height:8.27in;width:5.83in}:host([format=a5][orientation=landscape]){height:5.83in;width:8.27in}:host([format=a4]){height:11.6in;width:8.17in}:host([format=a4][orientation=portrait]){height:11.6in;width:8.17in}:host([format=a4][orientation=landscape]){height:8.17in;width:11.6in}:host([format=a3]){height:16.54in;width:11.7in}:host([format=a3][orientation=portrait]){height:16.54in;width:11.7in}:host([format=a3][orientation=landscape]){height:11.7in;width:16.54in}:host([format=a2]){height:23.4in;width:16.54in}:host([format=a2][orientation=portrait]){height:23.4in;width:16.54in}:host([format=a2][orientation=landscape]){height:16.54in;width:23.4in}:host([format=a1]){height:33.1in;width:23.4in}:host([format=a1][orientation=portrait]){height:33.1in;width:23.4in}:host([format=a1][orientation=landscape]){height:23.4in;width:33.1in}:host([format=a0]){height:46.8in;width:33.1in}:host([format=a0][orientation=portrait]){height:46.8in;width:33.1in}:host([format=a0][orientation=landscape]){height:33.1in;width:46.8in}:host([format=letter]){height:11in;width:8.5in}:host([format=letter][orientation=portrait]){height:11in;width:8.5in}:host([format=letter][orientation=landscape]){height:8.5in;width:11in}:host([format=legal]){height:14in;width:8.5in}:host([format=legal][orientation=portrait]){height:14in;width:8.5in}:host([format=legal][orientation=landscape]){height:8.5in;width:14in}:host([format=tabloid]){height:17in;width:11in}:host([format=tabloid][orientation=portrait]){height:17in;width:11in}:host([format=tabloid][orientation=landscape]){height:11in;width:17in}:host([format=ledger]){height:11in;width:17in}:host([format=ledger][orientation=portrait]){height:17in;width:11in}:host([format=ledger][orientation=landscape]){height:11in;width:17in}`;
109
-
110
- const VALID_FORMATS = ["xga", "hd", "full-hd", "4k", "4k2k", "a4", "a3", "a2", "a1", "a0", "letter", "legal"];
111
- const VALID_ORIENTATIONS = ["landscape", "portrait"];
112
- const Page = class {
113
- constructor(hostRef) {
114
- registerInstance(this, hostRef);
115
- withComponentStatus(this);
116
- this.errors = withHasError(this);
117
- this.componentStyle = withComponentStyle(this);
118
- }
119
- validateFormat(newValue) {
120
- const errId = "ERR_format";
121
- if (!isBlankInput(newValue) && !VALID_FORMATS.includes(newValue)) {
122
- this.errors.addOrReplace({
123
- id: errId,
124
- type: "warning",
125
- message: `format: invalid value '${newValue}' is not supported. Valid values: ${VALID_FORMATS.join(", ")}`,
126
- });
127
- }
128
- else {
129
- this.errors.remove(errId);
130
- }
131
- }
132
- validateOrientation(newValue) {
133
- const errId = "ERR_orientation";
134
- if (!isBlankInput(newValue) && !VALID_ORIENTATIONS.includes(newValue)) {
135
- this.errors.addOrReplace({
136
- id: errId,
137
- type: "warning",
138
- message: `orientation: invalid value '${newValue}' is not supported. Valid values: ${VALID_ORIENTATIONS.join(", ")}`,
139
- });
140
- }
141
- else {
142
- this.errors.remove(errId);
143
- }
144
- }
145
- render() {
146
- return (h(Host, { key: 'b4d682a8f6e83f77c58236265eaf9d1327809c6f', format: this.format, orientation: this.orientation, style: this.prepareStyle() }, h("slot", { key: 'ef49c43c1f8926c4c968b752608627adbe330d6c' })));
147
- }
148
- prepareStyle() {
149
- const pageStyle = {
150
- "font-family": this.componentStyle(($) => $.global["fontFamily"]),
151
- "font-size": `${this.componentStyle(($) => $.global["fontSizePx"])}px`,
152
- "--bn-font-family": this.componentStyle(($) => $.global["fontFamily"]) || "'Noto Sans', sans-serif",
153
- "--bn-font-size": `${this.componentStyle(($) => $.global["fontSizePx"]) || 13.3333}px`,
154
- "--bn-font-color": this.componentStyle(($) => $.global["fontColor"]) || "#000000",
155
- "--bn-font-background": this.componentStyle(($) => $.global["fontBackgroundColor"]) || "#ffffff",
156
- };
157
- return pageStyle;
158
- }
159
- get element() { return getElement(this); }
160
- static get watchers() { return {
161
- "format": [{
162
- "validateFormat": 0
163
- }],
164
- "orientation": [{
165
- "validateOrientation": 0
166
- }]
167
- }; }
168
- };
169
- Page.style = bnPageCss();
170
-
171
- /** Sentinel value indicating all groups should be included. */
172
- var GroupSelection;
173
- (function (GroupSelection) {
174
- GroupSelection[GroupSelection["ALL"] = -1] = "ALL";
175
- })(GroupSelection || (GroupSelection = {}));
176
- /**
177
- * Tracks whether a factory's output is current or needs recalculation.
178
- * Used to avoid redundant re-rendering when underlying data has not changed.
179
- */
180
- var FactoryState;
181
- (function (FactoryState) {
182
- /** Output matches the current input data. */
183
- FactoryState[FactoryState["UP_TO_DATE"] = 0] = "UP_TO_DATE";
184
- /** Input data has changed; output needs to be regenerated. */
185
- FactoryState[FactoryState["DIRTY"] = 1] = "DIRTY";
186
- })(FactoryState || (FactoryState = {}));
187
- /**
188
- * Table aggregation modes controlling how rows are grouped and totalled.
189
- *
190
- * - `LIST` -- Flat list with no aggregation.
191
- * - `SUM` -- Grouped rows with sum totals per group and a grand total.
192
- * - `SUMNOTOTAL` -- Grouped rows with group sums but no grand total row.
193
- * - `OPT` -- Operation-aware aggregation (respects the +/- operation field).
194
- * - `OPTNOTOTAL` -- Operation-aware aggregation without a grand total row.
195
- */
196
- var TableType;
197
- (function (TableType) {
198
- TableType["LIST"] = "list";
199
- TableType["SUM"] = "sum";
200
- TableType["SUMNOTOTAL"] = "sumnototal";
201
- TableType["OPT"] = "opt";
202
- TableType["OPTNOTOTAL"] = "optnototal";
203
- })(TableType || (TableType = {}));
204
- var OrderDirection;
205
- (function (OrderDirection) {
206
- OrderDirection["ASC"] = "asc";
207
- OrderDirection["DESC"] = "desc";
208
- })(OrderDirection || (OrderDirection = {}));
209
- /**
210
- * Discriminator for rendered table rows, controlling visual styling and behavior.
211
- *
212
- * - `HEADER` -- Column header row.
213
- * - `GROUPHEAD` -- Group title row (rendered when `grouped` is true).
214
- * - `SEPERATORLINE` -- Visual divider between groups.
215
- * - `SUM` -- Grand total row.
216
- * - `GROUPSUM` -- Sub-total row for a single group.
217
- * - `DRILLELEMENT` -- "Thereof" drill-down sub-row.
218
- * - `STANDARD` -- Normal data row.
219
- * - `PARTELEMENT` -- "Part of" percentage row.
220
- * - `ENTRY` -- Generic entry row.
221
- */
222
- var TableRowType;
223
- (function (TableRowType) {
224
- TableRowType["HEADER"] = "HEADER";
225
- TableRowType["GROUPHEAD"] = "GROUPHEAD";
226
- TableRowType["SEPERATORLINE"] = "SEPERATORLINE";
227
- TableRowType["SUM"] = "SUM";
228
- TableRowType["GROUPSUM"] = "GROUP_SUM";
229
- TableRowType["DRILLELEMENT"] = "DRILLELEMENT";
230
- TableRowType["STANDARD"] = "STANDARD";
231
- TableRowType["PARTELEMENT"] = "PARTELEMENT";
232
- TableRowType["ENTRY"] = "ENTRY";
233
- })(TableRowType || (TableRowType = {}));
234
-
235
- const bnTableCss = () => `:host{display:inline-block;position:relative;overflow:hidden}`;
236
-
237
- const Table$1 = class Table {
238
- validateScaling(newValue) {
239
- if (newValue == null || newValue === "" || newValue === "none" || newValue === "auto") {
240
- this.errors.remove("ERR_scale");
241
- return;
242
- }
243
- const num = Number(newValue);
244
- if (isNaN(num) || num <= 0) {
245
- this.errors.addOrReplace({
246
- id: "ERR_scale",
247
- type: "warning",
248
- message: `Invalid scale value: "${newValue}". Use "none", "auto", or a positive number.`,
249
- });
250
- }
251
- else {
252
- this.errors.remove("ERR_scale");
253
- }
254
- }
255
- constructor(hostRef) {
256
- registerInstance(this, hostRef);
257
- this.data = [];
258
- this.datasetMeta = null;
259
- this.appliedScaleFactor = 1;
260
- /**
261
- * A not mundane tile which should describes the shown data.
262
- */
263
- this.tableTitle = "";
264
- /**
265
- * AlaSQL WHERE clause fragment injected into the data query to filter
266
- * rows before rendering (e.g. `"category = 'Sales'"`).
267
- */
268
- this.filter = "";
269
- /**
270
- * measureUnit displayed in table.
271
- */
272
- this.measureUnit = "";
273
- /**
274
- * Set width of bar chart columns. Controls the max bar/pin width in pixels.
275
- * <br /><br />
276
- * values:<br />
277
- * ``` w5 // w10 // w15 // w20 // w25 // w30 // w40 // w60 // w80 // w100 ```
278
- */
279
- this.barColumnWidth = "w30";
280
- /**
281
- * @deprecated Bars now scale proportionally via column statistics. Kept for backward compatibility.
282
- * <br /><br />
283
- * Scaling for absolute variance bar charts (ΔPY).
284
- * <br /><br />
285
- * Default: 0.01
286
- */
287
- this.unitScaling = 0.01;
288
- /**
289
- * Scaling for relative variance pin charts (ΔPY%).
290
- * <br /><br />
291
- * Name of the 'scaling-group' which the table uses.
292
- * Scaling groups are maintained globally.
293
- * <br /><br />
294
- * Alternatively a number which represents pixels per percentage point.
295
- * <br /><br />
296
- * Example: 0.5 means 100% = 50 pixels width.
297
- * <br /><br />
298
- * Default: 0.5
299
- */
300
- this.percentageScaling = 0.5;
301
- // Global scaling groups map - can be populated externally for shared scaling across components
302
- this.pixelPerUnitGroupMap = new Map();
303
- /**
304
- * Defines the data unit type of the tables data.
305
- * <br /><br />
306
- * If percent is chosen all data values are converted into percent
307
- * (0.02 -> 2%)
308
- * <br /><br />
309
- * values: <br />
310
- * ```percent // decimal```
311
- */
312
- this.dataFormat = "decimal";
313
- /**
314
- * Toggles of data should be grouped by
315
- * 'rowgroup'.
316
- * <br /><br />
317
- * values: <br />
318
- * ```true // false```
319
- */
320
- this.grouped = "false";
321
- /**
322
- * Toggles display of measure units in table header
323
- * <br /><br />
324
- * values: <br />
325
- * ```true // false```
326
- */
327
- this.showMeasureScale = "false";
328
- /**
329
- * Toggles a title header for each (row-)group
330
- * the title header value is found set by 'rowgroup'
331
- * <br /><br />
332
- * values: <br />
333
- * ```true // false```
334
- *
335
- */
336
- this.showGroupTitle = "true";
337
- /**
338
- * Set the table type
339
- * <br /><br />
340
- * values: <br />
341
- * ```list // sum // opt // sumnototal // optnototal```
342
- *
343
- */
344
- this.type = "list";
345
- /**
346
- * Set the maximum number of rows for each
347
- * group. The value 0 means *no limit*
348
- * <br /><br />
349
- * rows wich where cut by the limit are cumulated as REST
350
- *
351
- */
352
- this.limit = 0;
353
- /**
354
- * Stringified Array of drilldown Objects {
355
- "rowGroup": string,<br />
356
- "category": string,<br />
357
- "subCategory": string,<br />
358
- },<br /><br />
359
- * rowgroup, categroy defines the location of the drill
360
- * subcategory is the displayed label of the data row
361
- *<br /><br />
362
- * example:<br />
363
- * ```[{
364
- "rowGroup":"Umsatz",
365
- "category": "Applications",
366
- "subCategory": "Applications-A",
367
- },]```
368
- */
369
- this.thereof = "[]";
370
- /**
371
- * Stringified Array of Partof Objects <br />{<br />
372
- "rowGroup": string,<br />
373
- "category": string<br />
374
- },<br /><br />
375
- * rowgroup, categroy defines the location of the drill
376
- * percentage of category in rowgorup
377
- *<br /><br />
378
- * example:<br />
379
- * ```[{
380
- "rowGroups":"Umsatz",
381
- "category": "Applications",
382
- },]```
383
- */
384
- this.partof = "[]";
385
- /** List of the primary scenarios on which the order direction are applied valid scenarios are
386
- * If order is set to a scenario it has also exists in scenariolist
387
- * <br /><br />
388
- * values: <br />
389
- * ```category // categoryindex // rowgroup // rowgroup // rowgroupindex // ac[1-4] // fc[1-4] // pp[1-4] // pl[1-4] // auto```
390
- * <br /><br />
391
- * When set to ```auto```, order is detected from the dataset silently.
392
- */
393
- this.order = "category";
394
- /** Set sorting order direction
395
- * <br /><br />
396
- * values: <br />
397
- * ```asc // desc```
398
- */
399
- this.orderDirection = "asc";
400
- /** Sets the Measure Type of the Table
401
- * volume is different displayed and interpreted as currency
402
- * names of siprefix are adapted.
403
- * <br /><br />
404
- * values: <br />
405
- * ```volume // currency```
406
-
407
- */
408
- this.measureType = "volume";
409
- /**
410
- * Sets the SiPrefix of the Mesaurements and converts the
411
- * original value.
412
- * <br /><br />
413
- * values: <br />
414
- * ```_ // k // M // G // T // P // E // Z // Y // m // μ // n // p // P // f // a // z // y // GREATEST // LEAST```
415
- * <br /><br />
416
- * SiPrefix overview:
417
- * ``` "Y": 1E+24,```<br />
418
- * ``` "Z": 1E+21,```<br />
419
- * ``` "E": 1E+18,```<br />
420
- * ``` "P": 1E+15,```<br />
421
- * ``` "T": 1E+12,```<br />
422
- * ``` "G": 1000000000,```<br />
423
- * ``` "M": 1000000,```<br />
424
- * ``` "k": 1000,```<br />
425
- * <br />
426
- * ``` "m": 0.001,```<br />
427
- * ``` "μ": 0.000001,```<br />
428
- * ``` "n": 0.000000001,```<br />
429
- * ``` "p": 0.000000000001,```<br />
430
- * ``` "f": 0.000000000000001,```<br />
431
- * ``` "a": 0.000000000000000001,```<br />
432
- * ``` "z": 0.000000000000000000001,```<br />
433
- * ``` "y": 0.000000000000000000000001,```<br />
434
- * <br /><br />
435
- * Special modes:
436
- * ```GREATEST``` seaches for the bigest (farest to zero) Value in the dataset and sets this value to SiPrefix<br />
437
- * ```LEAST``` searches for smallest (closest to zero) Value in the dataset and sets this value to SiPrefix<br />
438
- *<br /><br />
439
- * ```_``` is the value for no SiPrefix the value is displayed as in the dataset stored.
440
- *
441
- *
442
- */
443
- this.measureScale = "greatest";
444
- /**
445
- * Number of decimal digits in a table cell
446
- */
447
- this.dataFormatDigitsDecimal = 1;
448
- /**
449
- * Number of percent digits in a table cell
450
- */
451
- this.dataFormatDigitsPercent = 2;
452
- /**
453
- * Set width of category column. <br />
454
- * If INF is selected the columns scaling to the min space they need
455
- * seperatly.
456
- * <br /><br />
457
- * values:<br />
458
- * ``` w5 // w10 // w15 // w20 // w25 // w50 // inf ```
459
- */
460
- this.categoryWidth = "w15";
461
- /**
462
- * Defines which drill-column is displayed. <br />
463
- * <br /><br />
464
- * ```scenario``` the scenaro to drill <br/>
465
- * ```group``` is a list of child columns of the parent <br/><br/>
466
- * ```subGroups``` is a list of child columns of the parent <br/><br/>
467
- * example:<br />
468
- * ```[{"scenario": "ac1", "name": "DE", "subGroups": ["Berlin"]},
469
- * {"scenario": "ac2", "name": "UK", "subGroups": []}],
470
- * ```
471
- */
472
- this.columnthereof = null;
473
- this._autoScaleGuard = false;
474
- withStyled(this);
475
- withComponentStatus(this);
476
- this.errors = withHasError(this);
477
- this.componentStyle = withComponentStyle(this);
478
- withDataset(this, (_name, data) => {
479
- this.data = (data || []);
480
- }, (_name, meta) => {
481
- this.datasetMeta = meta;
482
- });
483
- this.t = withTranslation(this).t;
484
- }
485
- validateScenario(newValue) {
486
- const errId = "ERR_scenarios";
487
- const invalidScenarios = validateScenarioList(newValue);
488
- if (invalidScenarios.length > 0) {
489
- this.errors.addOrReplace({
490
- id: errId,
491
- type: "warning",
492
- message: "scenarios: invalid value(s) '" + (invalidScenarios === null || invalidScenarios === void 0 ? void 0 : invalidScenarios.toString()) + "' are not supported.",
493
- });
494
- }
495
- else {
496
- this.errors.remove(errId);
497
- }
498
- }
499
- validateVariances(newValue) {
500
- const errId = "ERR_variances";
501
- const invalidVariances = validateVariancesList(newValue);
502
- if (invalidVariances.length > 0) {
503
- this.errors.addOrReplace({
504
- id: errId,
505
- type: "warning",
506
- message: "variances: invalid value(s) '" + JSON.stringify(invalidVariances) + "' are not supported.",
507
- });
508
- }
509
- else {
510
- this.errors.remove(errId);
511
- }
512
- }
513
- validateBarColumns(newValue) {
514
- const errId = "ERR_barColumns";
515
- if (isBlankInput(newValue)) {
516
- this.errors.remove(errId);
517
- return;
518
- }
519
- const invalidColumns = validateVariancesList(newValue);
520
- if (invalidColumns.length > 0) {
521
- this.errors.addOrReplace({
522
- id: errId,
523
- type: "warning",
524
- message: "barColumns: invalid value(s) '" + JSON.stringify(invalidColumns) + "' are not supported.",
525
- });
526
- }
527
- else {
528
- this.errors.remove(errId);
529
- }
530
- }
531
- validateBarColumnWidth(newValue) {
532
- const errId = "ERR_barColumnWidth";
533
- if (!isTableBarColumnWidth(newValue)) {
534
- this.errors.addOrReplace({
535
- id: errId,
536
- type: "warning",
537
- message: "barColumnWidth: invalid value '" + newValue + "' is not supported.",
538
- });
539
- }
540
- else {
541
- this.errors.remove(errId);
542
- }
543
- }
544
- validateUnitScaling(newValue) {
545
- const errId = "ERR_unitScaling";
546
- if (!isValidNumber(newValue) && !this.pixelPerUnitGroupMap.has(newValue)) {
547
- this.errors.addOrReplace({
548
- id: errId,
549
- type: "warning",
550
- message: "unitScaling: invalid value '" + newValue + "' is not supported.",
551
- });
552
- }
553
- else {
554
- this.errors.remove(errId);
555
- }
556
- }
557
- validatePercentageScaling(newValue) {
558
- const errId = "ERR_percentageScaling";
559
- if (!isValidNumber(newValue) && !this.pixelPerUnitGroupMap.has(newValue)) {
560
- this.errors.addOrReplace({
561
- id: errId,
562
- type: "warning",
563
- message: "percentageScaling: invalid value '" + newValue + "' is not supported.",
564
- });
565
- }
566
- else {
567
- this.errors.remove(errId);
568
- }
569
- }
570
- validateDataFormat(newValue) {
571
- const errId = "ERR_dataFormat";
572
- if (!isValidDataFormat(newValue)) {
573
- this.errors.addOrReplace({
574
- id: errId,
575
- type: "warning",
576
- message: "dataFormat: invalid value(s) '" + (newValue === null || newValue === void 0 ? void 0 : newValue.toString()) + "' are not supported.",
577
- });
578
- }
579
- else {
580
- this.errors.remove(errId);
581
- }
582
- }
583
- validateGrouped(newValue) {
584
- const errId = "ERR_grouped";
585
- if (!isValidBoolean(newValue)) {
586
- this.errors.addOrReplace({
587
- id: errId,
588
- type: "warning",
589
- message: "grouped: invalid value(s) '" + (newValue === null || newValue === void 0 ? void 0 : newValue.toString()) + "' are not supported.",
590
- });
591
- }
592
- else {
593
- this.errors.remove(errId);
594
- }
595
- }
596
- validateShowMeasureScale(newValue) {
597
- const errId = "ERR_grouped";
598
- if (!isValidBoolean(newValue)) {
599
- this.errors.addOrReplace({
600
- id: errId,
601
- type: "warning",
602
- message: "showMeasureScale: invalid value(s) '" + (newValue === null || newValue === void 0 ? void 0 : newValue.toString()) + "' are not supported.",
603
- });
604
- }
605
- else {
606
- this.errors.remove(errId);
607
- }
608
- }
609
- validateShowGroupTitle(newValue) {
610
- const errId = "ERR_showGroupTitle";
611
- if (!isValidBoolean(newValue)) {
612
- this.errors.addOrReplace({
613
- id: errId,
614
- type: "warning",
615
- message: "showGroupTitle: invalid value(s) '" + (newValue === null || newValue === void 0 ? void 0 : newValue.toString()) + "' are not supported.",
616
- });
617
- }
618
- else {
619
- this.errors.remove(errId);
620
- }
621
- }
622
- validateType(newValue) {
623
- const errId = "ERR_type";
624
- if (!isValidTableType(newValue)) {
625
- this.errors.addOrReplace({
626
- id: errId,
627
- type: "warning",
628
- message: "type: invalid value(s) '" + (newValue === null || newValue === void 0 ? void 0 : newValue.toString()) + "' are not supported.",
629
- });
630
- }
631
- else {
632
- this.errors.remove(errId);
633
- }
634
- }
635
- validateLimit(newValue) {
636
- const errId = "ERR_limit";
637
- if (!isValidInteger(newValue)) {
638
- this.errors.addOrReplace({
639
- id: errId,
640
- type: "warning",
641
- message: "order: invalid value '" + (newValue === null || newValue === void 0 ? void 0 : newValue.toString()) + "' is not supported.",
642
- });
643
- }
644
- else {
645
- this.errors.remove(errId);
646
- }
647
- }
648
- validateThereOf(newValue) {
649
- const errId = "ERR_thereof";
650
- const invalidElements = validateThereOfJsonStr(newValue);
651
- if (invalidElements.length > 0) {
652
- this.errors.addOrReplace({
653
- id: errId,
654
- type: "warning",
655
- message: "ThereOf: invalid value(s) '" + JSON.stringify(invalidElements) + "' are not supported.",
656
- });
657
- }
658
- else {
659
- this.errors.remove(errId);
660
- }
661
- }
662
- validatePartOf(newValue) {
663
- const errId = "ERR_partof";
664
- const invalidElements = validatePartOfJsonStr(newValue);
665
- if (invalidElements.length > 0) {
666
- this.errors.addOrReplace({
667
- id: errId,
668
- type: "warning",
669
- message: "partof: invalid value(s) '" + JSON.stringify(invalidElements) + "' are not supported.",
670
- });
671
- }
672
- else {
673
- this.errors.remove(errId);
674
- }
675
- }
676
- validateOrderList(newValue) {
677
- const errId = "ERR_order";
678
- const invalidElements = validateOrderList(newValue);
679
- if (invalidElements.length > 0) {
680
- this.errors.addOrReplace({
681
- id: errId,
682
- type: "warning",
683
- message: "order: invalid value(s) '" + JSON.stringify(invalidElements) + "' are not supported.",
684
- });
685
- }
686
- else {
687
- this.errors.remove(errId);
688
- }
689
- }
690
- validateOrderDirection(newValue) {
691
- const errId = "ERR_orderDirection";
692
- if (!isValidDirection(newValue)) {
693
- this.errors.addOrReplace({
694
- id: errId,
695
- type: "warning",
696
- message: "orderDirection: invalid value '" + (newValue === null || newValue === void 0 ? void 0 : newValue.toString()) + "' is not supported.",
697
- });
698
- }
699
- else {
700
- this.errors.remove(errId);
701
- }
702
- }
703
- validateMeasureType(newValue) {
704
- const errId = "ERR_measureType";
705
- if (!isValidMeasureType(newValue)) {
706
- this.errors.addOrReplace({
707
- id: errId,
708
- type: "warning",
709
- message: "measureType: invalid value '" + (newValue === null || newValue === void 0 ? void 0 : newValue.toString()) + "' is not supported.",
710
- });
711
- }
712
- else {
713
- this.errors.remove(errId);
714
- }
715
- }
716
- validateMeasureScale(newValue) {
717
- const errId = "ERR_measureScale";
718
- if (!isValidMeasureScale(newValue)) {
719
- this.errors.addOrReplace({
720
- id: errId,
721
- type: "warning",
722
- message: "measureScale: invalid value '" + (newValue === null || newValue === void 0 ? void 0 : newValue.toString()) + "' is not supported.",
723
- });
724
- }
725
- else {
726
- this.errors.remove(errId);
727
- }
728
- }
729
- validateDataFormatDigitsDecimal(newValue) {
730
- const errId = "ERR_dataFormatDigitsDecimal";
731
- if (!isValidInteger(newValue)) {
732
- this.errors.addOrReplace({
733
- id: errId,
734
- type: "warning",
735
- message: "dataFormatDigitsDecimal: invalid value(s) '" + newValue + "' are not supported.",
736
- });
737
- }
738
- else {
739
- this.errors.remove(errId);
740
- }
741
- }
742
- validateDateFormatDigitsPercent(newValue) {
743
- const errId = "ERR_dataFormatDigitsPercent";
744
- if (!isValidInteger(newValue)) {
745
- this.errors.addOrReplace({
746
- id: errId,
747
- type: "warning",
748
- message: "dataFormatDigitsPercent: invalid value(s) '" + newValue + "' are not supported.",
749
- });
750
- }
751
- else {
752
- this.errors.remove(errId);
753
- }
754
- }
755
- validateCategoryWidth(newValue) {
756
- const errId = "ERR_categoryWidth";
757
- if (!isTableCategoryWidth(newValue)) {
758
- this.errors.addOrReplace({
759
- id: errId,
760
- type: "warning",
761
- message: "categoryWidth: invalid value(s) '" + newValue + "' are not supported.",
762
- });
763
- }
764
- else {
765
- this.errors.remove(errId);
766
- }
767
- }
768
- validateColumnThereOf(newValue) {
769
- const invalidElements = validateColumnThereOfJsonStr(newValue);
770
- const errId = "ERR_categorythereof";
771
- if (invalidElements.length > 0) {
772
- this.errors.addOrReplace({
773
- id: errId,
774
- type: "warning",
775
- message: "columnthereof: invalid value(s) '" + JSON.stringify(invalidElements) + "' are not supported.",
776
- });
777
- }
778
- else {
779
- this.errors.remove(errId);
780
- }
781
- }
782
- componentWillLoad() {
783
- //this.datasouce = get("test");
784
- // this.unsubscribe = onChange("test", (value) => this.datasouce = value);
785
- this.validateScenario(this.scenarios);
786
- this.validateVariances(this.variances);
787
- this.validateDataFormat(this.dataFormat);
788
- this.validateGrouped(this.grouped);
789
- this.validateShowGroupTitle(this.showGroupTitle);
790
- this.validateType(this.type);
791
- this.validateLimit(this.limit);
792
- this.validateThereOf(this.thereof);
793
- this.validatePartOf(this.partof);
794
- this.validateOrderDirection(this.orderDirection);
795
- this.validateOrderList(this.order);
796
- this.validateDataFormatDigitsDecimal(this.dataFormatDigitsDecimal);
797
- this.validateDateFormatDigitsPercent(this.dataFormatDigitsPercent);
798
- this.validateCategoryWidth(this.categoryWidth);
799
- this.validateMeasureType(this.measureType);
800
- this.validateMeasureScale(this.measureScale);
801
- this.validateColumnThereOf(this.columnthereof);
802
- this.validateShowMeasureScale(this.showMeasureScale);
803
- this.validateBarColumns(this.barColumns);
804
- this.validateBarColumnWidth(this.barColumnWidth);
805
- this.validateUnitScaling(this.unitScaling);
806
- this.validatePercentageScaling(this.percentageScaling);
807
- this.validateScaling(this.scale);
808
- }
809
- disconnectedCallback() {
810
- this.unsubscribe();
811
- }
812
- componentDidRender() {
813
- var _a, _b;
814
- const { mode } = parseScaling(this.scale);
815
- // Only auto-scale for 'auto' and 'empty' (blank) modes
816
- if (mode !== "auto" && mode !== "empty") {
817
- this._autoScaleGuard = false;
818
- return;
819
- }
820
- // Skip re-measurement after the state-triggered re-render
821
- if (this._autoScaleGuard) {
822
- this._autoScaleGuard = false;
823
- return;
824
- }
825
- const host = this.element;
826
- const { width: parentWidth } = getParentDimensions(host);
827
- if (parentWidth <= 0)
828
- return;
829
- // Measure at base (unscaled) font size to get true content width.
830
- // This avoids the oscillation where scaled-down content fits → reset
831
- // to 1 → overflows → scale down → fits → …
832
- const baseFontSize = this.componentStyle(($) => { var _a; return ((_a = $["global"]) === null || _a === void 0 ? void 0 : _a["fontSizePx"]) || 13.3333; });
833
- host.style.setProperty("--bn-font-size", `${baseFontSize}px`);
834
- // Reading scrollWidth forces a synchronous reflow at base size
835
- const div = (_a = host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector("div");
836
- const unscaledWidth = (_b = div === null || div === void 0 ? void 0 : div.scrollWidth) !== null && _b !== void 0 ? _b : host.scrollWidth;
837
- if (unscaledWidth <= parentWidth + 1) {
838
- // Content fits at base size — no scaling needed
839
- this.errors.remove("AUTO_scale");
840
- if (this.appliedScaleFactor !== 1) {
841
- this._autoScaleGuard = true;
842
- this.appliedScaleFactor = 1;
843
- }
844
- return;
845
- }
846
- // Subtract 1px to account for sub-pixel rounding after scaling,
847
- // preventing the right edge from being clipped by overflow:hidden.
848
- const computedFactor = (parentWidth - 1) / unscaledWidth;
849
- // Apply immediately via CSS var for smooth visual (before state re-render)
850
- host.style.setProperty("--bn-font-size", `${baseFontSize * computedFactor}px`);
851
- if (mode === "empty") {
852
- this.errors.addOrReplace({
853
- id: "AUTO_scale",
854
- type: "warning",
855
- message: `Auto-scaled table by factor ${computedFactor.toFixed(3)}`,
856
- });
857
- }
858
- else {
859
- this.errors.remove("AUTO_scale");
860
- }
861
- // Update state so bar charts re-render at the new scale
862
- if (Math.abs(computedFactor - this.appliedScaleFactor) > 0.001) {
863
- this._autoScaleGuard = true;
864
- this.appliedScaleFactor = computedFactor;
865
- }
866
- }
867
- prepareDataFormat() {
868
- var _a;
869
- return DataFormat[(_a = this.dataFormat) === null || _a === void 0 ? void 0 : _a.toUpperCase()];
870
- }
871
- prepareGrouped() {
872
- return this.grouped === "true";
873
- }
874
- prepareShowGroupTitle() {
875
- return this.showGroupTitle === "true";
876
- }
877
- prepareTableType() {
878
- var _a;
879
- return TableType[(_a = this.type) === null || _a === void 0 ? void 0 : _a.toUpperCase()];
880
- }
881
- prepareLimit() {
882
- return Math.floor(Number(this.limit) || 0);
883
- }
884
- prepareThereOf() {
885
- if (this.thereof == null || this.thereof.trim() === "") {
886
- return [];
887
- }
888
- return JSON.parse(this.thereof);
889
- }
890
- preparePartOf() {
891
- if (this.partof == null || this.partof.trim() === "") {
892
- return [];
893
- }
894
- return JSON.parse(this.partof);
895
- }
896
- prepareOrder() {
897
- var _a, _b, _c;
898
- const isAuto = ((_a = this.order) === null || _a === void 0 ? void 0 : _a.trim().toLowerCase()) === "auto";
899
- let orderStr = this.order;
900
- if (isAuto && ((_b = this.datasetMeta) === null || _b === void 0 ? void 0 : _b.suggestedOrder)) {
901
- orderStr = this.datasetMeta.suggestedOrder;
902
- }
903
- const tableOrder = {
904
- hierarchy: orderStr.split(",").map((entry) => OrderColumn[entry === null || entry === void 0 ? void 0 : entry.toUpperCase()]),
905
- direction: OrderDirection$1[(_c = this.orderDirection) === null || _c === void 0 ? void 0 : _c.toUpperCase()],
906
- };
907
- return tableOrder;
908
- }
909
- prepareI18nMode() {
910
- return I18nMode.META;
911
- }
912
- prepareI18n() {
913
- const i18nMetaLabelsLocal = ["in", "category", "operation", "there_of", "part_of", "SUM_TOTAL"];
914
- const i18nMetaLabelsGlobal = globalLabelKeys;
915
- // system
916
- const i18nMapLocal = new Map(i18nMetaLabelsLocal.map((key) => [key, this.t(".".concat(key))]));
917
- const i18nMapGlobal = new Map(i18nMetaLabelsGlobal.map((key) => [key, this.t("global.".concat(key))]));
918
- return new Map([...i18nMapGlobal.entries(), ...i18nMapLocal.entries()]);
919
- }
920
- prepareDataFormatDigits() {
921
- const formatDigits = {
922
- percent: this.dataFormatDigitsPercent,
923
- decimal: this.dataFormatDigitsDecimal,
924
- };
925
- return formatDigits;
926
- }
927
- prepareScenarios() {
928
- var _a, _b, _c, _d, _e, _f, _g, _h;
929
- const isAuto = ((_a = this.scenarios) === null || _a === void 0 ? void 0 : _a.trim().toLowerCase()) === "auto";
930
- if ((isBlankInput(this.scenarios) || isAuto) && isBlankInput(this.variances)) {
931
- if (((_c = (_b = this.datasetMeta) === null || _b === void 0 ? void 0 : _b.availableScenarios) === null || _c === void 0 ? void 0 : _c.length) > 0) {
932
- if (!isAuto) {
933
- this.errors.addOrReplace({
934
- id: "AUTO_scenarios",
935
- type: "warning",
936
- message: `scenarios: not set, auto-detected: ${this.datasetMeta.availableScenarios.join(",")}`,
937
- });
938
- }
939
- else {
940
- this.errors.remove("AUTO_scenarios");
941
- }
942
- return this.datasetMeta.availableScenarios;
943
- }
944
- return [];
945
- }
946
- let scenarios = [];
947
- if (isAuto || isBlankInput(this.scenarios)) {
948
- if (((_e = (_d = this.datasetMeta) === null || _d === void 0 ? void 0 : _d.availableScenarios) === null || _e === void 0 ? void 0 : _e.length) > 0) {
949
- if (!isAuto) {
950
- this.errors.addOrReplace({
951
- id: "AUTO_scenarios",
952
- type: "warning",
953
- message: `scenarios: not set, auto-detected: ${this.datasetMeta.availableScenarios.join(",")}`,
954
- });
955
- }
956
- else {
957
- this.errors.remove("AUTO_scenarios");
958
- }
959
- scenarios = scenarios.concat(this.datasetMeta.availableScenarios);
960
- }
961
- }
962
- else {
963
- this.errors.remove("AUTO_scenarios");
964
- scenarios = scenarios.concat((_f = this.scenarios) === null || _f === void 0 ? void 0 : _f.split(","));
965
- }
966
- if (((_g = this.variances) === null || _g === void 0 ? void 0 : _g.trim().length) > 0) {
967
- scenarios = scenarios.concat((_h = this.variances) === null || _h === void 0 ? void 0 : _h.split(","));
968
- }
969
- return scenarios.map((entry) => entry.trim());
970
- }
971
- prepareCategoryWidth() {
972
- var _a;
973
- if (isBlankInput(this.categoryWidth)) {
974
- return TableCategoryWidth.INF;
975
- }
976
- return TableCategoryWidth[(_a = this.categoryWidth) === null || _a === void 0 ? void 0 : _a.toUpperCase()];
977
- }
978
- prepareMeasureScale() {
979
- if (isBlankInput(this.measureScale)) {
980
- return "GREATEST";
981
- }
982
- if (["_", "k", "M", "G", "T", "P", "E", "Z", "Y", "m", "μ", "n", "p", "P", "f", "a", "z", "y"].includes(this.measureScale.trim())) {
983
- return this.measureScale.trim();
984
- }
985
- if (this.measureScale.trim().toUpperCase() === "LEAST") {
986
- return this.measureScale.trim();
987
- }
988
- return "GREATEST";
989
- }
990
- prepareMeasureType() {
991
- var _a;
992
- if (isBlankInput(this.measureType)) {
993
- return MeasureType.VOLUME;
994
- }
995
- return MeasureType[(_a = this.measureType) === null || _a === void 0 ? void 0 : _a.toUpperCase()];
996
- }
997
- prepareColumnThereOf() {
998
- if (this.columnthereof == null || this.columnthereof.trim() === "") {
999
- return new Map();
1000
- }
1001
- const parsedString = JSON.parse(this.columnthereof);
1002
- const map = new Map();
1003
- for (const [_key, value] of Object.entries(parsedString)) {
1004
- if (map.has(value["scenario"]) === false) {
1005
- map.set(value["scenario"], []);
1006
- }
1007
- map.get(value["scenario"]).push(value);
1008
- }
1009
- return map;
1010
- }
1011
- prepareTableTitle() {
1012
- if (this.tableTitle === "" || this.tableTitle == null) {
1013
- return "SUM_TOTAL";
1014
- }
1015
- return this.tableTitle;
1016
- }
1017
- prepareShowMeasureScale() {
1018
- return this.showMeasureScale === "true";
1019
- }
1020
- prepareMeasureUnit() {
1021
- if (this.measureUnit === "" || this.measureUnit == null) {
1022
- return "";
1023
- }
1024
- return this.measureUnit;
1025
- }
1026
- prepareFilter() {
1027
- if (this.filter.length === 0) {
1028
- return "";
1029
- }
1030
- return this.filter;
1031
- }
1032
- prepareBarColumnWidth() {
1033
- var _a;
1034
- const key = (_a = this.barColumnWidth) === null || _a === void 0 ? void 0 : _a.toUpperCase();
1035
- const preset = TableBarColumnWidth[key];
1036
- if (preset) {
1037
- return BAR_COLUMN_WIDTH_EM[preset];
1038
- }
1039
- return BAR_COLUMN_WIDTH_EM[TableBarColumnWidth.W30];
1040
- }
1041
- prepareBarColumns() {
1042
- if (isBlankInput(this.barColumns)) {
1043
- return [];
1044
- }
1045
- return this.barColumns.split(",").map((col) => col.trim());
1046
- }
1047
- prepareUnitScaling() {
1048
- if (this.pixelPerUnitGroupMap.has(this.unitScaling)) {
1049
- return this.pixelPerUnitGroupMap.get(this.unitScaling);
1050
- }
1051
- return Number(this.unitScaling);
1052
- }
1053
- preparePercentageScaling() {
1054
- if (this.pixelPerUnitGroupMap.has(this.percentageScaling)) {
1055
- return this.pixelPerUnitGroupMap.get(this.percentageScaling);
1056
- }
1057
- return Number(this.percentageScaling);
1058
- }
1059
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1060
- getDataStructure() {
1061
- const dataSetStructure = {
1062
- ITableDataRow: {
1063
- setName: { type: "string", isOptional: false, description: "" },
1064
- date: { type: "string", isOptional: false, description: "" },
1065
- operation: { type: "string", isOptional: false, description: "" },
1066
- rowGroup: { type: "string", isOptional: false, description: "" },
1067
- rowGroupIndex: { type: "number", isOptional: false, description: "" },
1068
- category: { type: "string", isOptional: false, description: "" },
1069
- categoryIndex: { type: "number", isOptional: false, description: "" },
1070
- subCategory: { type: "string", isOptional: false, description: "" },
1071
- subCategoryIndex: { type: "number", isOptional: false, description: "" },
1072
- columnGroup: { type: "string", isOptional: false, description: "" },
1073
- columnGroupIndex: { type: "number", isOptional: false, description: "" },
1074
- columnSubGroup: { type: "string", isOptional: false, description: "" },
1075
- columnSubGroupIndex: { type: "number", isOptional: false, description: "" },
1076
- ac1: { type: "number", isOptional: false, description: "" },
1077
- ac2: { type: "number", isOptional: false, description: "" },
1078
- ac3: { type: "number", isOptional: false, description: "" },
1079
- ac4: { type: "number", isOptional: false, description: "" },
1080
- pp1: { type: "number", isOptional: false, description: "" },
1081
- pp2: { type: "number", isOptional: false, description: "" },
1082
- pp3: { type: "number", isOptional: false, description: "" },
1083
- pp4: { type: "number", isOptional: false, description: "" },
1084
- fc1: { type: "number", isOptional: false, description: "" },
1085
- fc2: { type: "number", isOptional: false, description: "" },
1086
- fc3: { type: "number", isOptional: false, description: "" },
1087
- fc4: { type: "number", isOptional: false, description: "" },
1088
- pl1: { type: "number", isOptional: false, description: "" },
1089
- pl2: { type: "number", isOptional: false, description: "" },
1090
- pl3: { type: "number", isOptional: false, description: "" },
1091
- pl4: { type: "number", isOptional: false, description: "" },
1092
- },
1093
- };
1094
- return dataSetStructure;
1095
- }
1096
- getEffectiveScaleFactor() {
1097
- const { mode, factor } = parseScaling(this.scale);
1098
- if (mode === "factor")
1099
- return factor;
1100
- if (mode === "auto" || mode === "empty")
1101
- return this.appliedScaleFactor;
1102
- return 1;
1103
- }
1104
- getFontStyles() {
1105
- const effectiveFactor = this.getEffectiveScaleFactor();
1106
- return this.componentStyle(($) => {
1107
- var _a, _b, _c, _d;
1108
- const baseFontSize = ((_a = $["global"]) === null || _a === void 0 ? void 0 : _a["fontSizePx"]) || 13.3333;
1109
- return {
1110
- "--bn-font-family": ((_b = $["global"]) === null || _b === void 0 ? void 0 : _b["fontFamily"]) || "'Noto Sans', sans-serif",
1111
- "--bn-font-size": `${baseFontSize * effectiveFactor}px`,
1112
- "--bn-font-color": ((_c = $["global"]) === null || _c === void 0 ? void 0 : _c["fontColor"]) || "#000000",
1113
- "--bn-font-background": ((_d = $["global"]) === null || _d === void 0 ? void 0 : _d["fontBackgroundColor"]) || "#ffffff",
1114
- };
1115
- });
1116
- }
1117
- render() {
1118
- const fontStyles = this.getFontStyles();
1119
- const effectiveFactor = this.getEffectiveScaleFactor();
1120
- return (h(Host, { key: 'b379c18d4d92805e91404917ffb096e582b9bec2', style: fontStyles }, h("div", { key: 'a45679a84d85b856f0e01615952c0ccfe05108f9' }, h("ibcs-table", { key: '0b375fca9ab9422bc61a4d0ba75eaf30eedfa77d', data: this.data, "table-title": this.prepareTableTitle(), scenarios: this.prepareScenarios(), "scenarios-data-format": this.prepareDataFormat(), grouped: this.prepareGrouped(), limit: this.prepareLimit(), showGroupTitle: this.prepareShowGroupTitle(), thereof: this.prepareThereOf(), partof: this.preparePartOf(), order: this.prepareOrder(), categorythereof: this.prepareColumnThereOf(), type: this.prepareTableType(), "category-width": this.prepareCategoryWidth(), dataFormatDigits: this.prepareDataFormatDigits(), i18n: this.prepareI18n(), "i18n-mode": this.prepareI18nMode(), "measure-scale": this.prepareMeasureScale(), "measure-type": this.prepareMeasureType(), "measure-unit": this.prepareMeasureUnit(), showMeasureScale: this.prepareShowMeasureScale(), filter: this.prepareFilter(), barColumns: this.prepareBarColumns(), barColumnMaxWidth: this.prepareBarColumnWidth(), unitScaling: this.prepareUnitScaling(), percentageScaling: this.preparePercentageScaling(), scaleFactor: effectiveFactor }))));
1121
- }
1122
- get element() { return getElement(this); }
1123
- static get watchers() { return {
1124
- "scale": [{
1125
- "validateScaling": 0
1126
- }],
1127
- "scenarios": [{
1128
- "validateScenario": 0
1129
- }],
1130
- "variances": [{
1131
- "validateVariances": 0
1132
- }],
1133
- "barColumns": [{
1134
- "validateBarColumns": 0
1135
- }],
1136
- "barColumnWidth": [{
1137
- "validateBarColumnWidth": 0
1138
- }],
1139
- "unitScaling": [{
1140
- "validateUnitScaling": 0
1141
- }],
1142
- "percentageScaling": [{
1143
- "validatePercentageScaling": 0
1144
- }],
1145
- "dataFormat": [{
1146
- "validateDataFormat": 0
1147
- }],
1148
- "grouped": [{
1149
- "validateGrouped": 0
1150
- }],
1151
- "showMeasureScale": [{
1152
- "validateShowMeasureScale": 0
1153
- }],
1154
- "showGroupTitle": [{
1155
- "validateShowGroupTitle": 0
1156
- }],
1157
- "type": [{
1158
- "validateType": 0
1159
- }],
1160
- "limit": [{
1161
- "validateLimit": 0
1162
- }],
1163
- "thereof": [{
1164
- "validateThereOf": 0
1165
- }],
1166
- "partof": [{
1167
- "validatePartOf": 0
1168
- }],
1169
- "order": [{
1170
- "validateOrderList": 0
1171
- }],
1172
- "orderDirection": [{
1173
- "validateOrderDirection": 0
1174
- }],
1175
- "measureType": [{
1176
- "validateMeasureType": 0
1177
- }],
1178
- "measureScale": [{
1179
- "validateMeasureScale": 0
1180
- }],
1181
- "dataFormatDigitsDecimal": [{
1182
- "validateDataFormatDigitsDecimal": 0
1183
- }],
1184
- "dataFormatDigitsPercent": [{
1185
- "validateDateFormatDigitsPercent": 0
1186
- }],
1187
- "categoryWidth": [{
1188
- "validateCategoryWidth": 0
1189
- }],
1190
- "columnthereof": [{
1191
- "validateColumnThereOf": 0
1192
- }]
1193
- }; }
1194
- };
1195
- Table$1.style = bnTableCss();
10
+ import './context-protocol-BHnQsVsr.js';
11
+ import './utils-DvvwfRQG.js';
1196
12
 
1197
13
  // import {Formatter} from "../../../../utils/formatter";
1198
14
  // import {DataFormatDigits} from "../../../../utils/model/DataFormatDigits";
@@ -1501,35 +317,59 @@ function getBarStroke(varianceStyle) {
1501
317
  return { stroke: "none", strokeWidth: 0 };
1502
318
  }
1503
319
  /**
1504
- * Computes an effective max for proportional scaling that keeps most bars readable.
1505
- * If a few outliers (extreme values) dominate, the effective max is capped so the
1506
- * majority of bars remain at a useful size. Values exceeding the effective max are
1507
- * flagged as "extreme" and rendered with an arrow indicator.
1508
- *
1509
- * Algorithm: effectiveMax = median * EXTREME_THRESHOLD (default 3×).
1510
- * If this would be less than absMax, some values are extreme.
1511
- * If the median is 0 (e.g. single value), falls back to absMax.
320
+ * Renders a zigzag break indicator at a given x position, matching the structure chart style.
321
+ * Two mirrored zigzag lines with a white background covering the break gap.
1512
322
  */
1513
- const EXTREME_THRESHOLD = 3;
1514
- function computeEffectiveMax(columnStats) {
1515
- if (columnStats.median <= 0) {
1516
- return columnStats.absMax;
1517
- }
1518
- const cap = columnStats.median * EXTREME_THRESHOLD;
1519
- return Math.min(cap, columnStats.absMax);
323
+ function renderZigzagBreak(breakX, breakGap, yTop, barHeight, s) {
324
+ const midX = breakX + breakGap / 2;
325
+ const halfGap = breakGap * 0.35;
326
+ const zigCount = 3;
327
+ const segHeight = barHeight / zigCount;
328
+ const amplitude = breakGap * 0.3;
329
+ let leftPath = `M ${midX - halfGap} ${yTop}`;
330
+ for (let i = 0; i < zigCount; i++) {
331
+ const y1 = yTop + segHeight * (i + 0.5);
332
+ const y2 = yTop + segHeight * (i + 1);
333
+ leftPath += ` L ${midX - halfGap - amplitude} ${y1} L ${midX - halfGap} ${y2}`;
334
+ }
335
+ let rightPath = `M ${midX + halfGap} ${yTop}`;
336
+ for (let i = 0; i < zigCount; i++) {
337
+ const y1 = yTop + segHeight * (i + 0.5);
338
+ const y2 = yTop + segHeight * (i + 1);
339
+ rightPath += ` L ${midX + halfGap + amplitude} ${y1} L ${midX + halfGap} ${y2}`;
340
+ }
341
+ return [
342
+ h("rect", { x: breakX, y: yTop - 1, width: breakGap, height: barHeight + 2, fill: "#ffffff" }),
343
+ h("path", { d: leftPath, fill: "none", stroke: "#000000", "stroke-width": 1 * s }),
344
+ h("path", { d: rightPath, fill: "none", stroke: "#000000", "stroke-width": 1 * s }),
345
+ ];
1520
346
  }
1521
347
  /**
1522
348
  * Renders an absolute variance bar chart (d_ prefix).
1523
349
  * Horizontal bar with centered axis, green for positive, red for negative.
1524
- * Value label shown next to the bar (black text per IBCS).
350
+ * When a bar exceeds maxBarWidth it is drawn as an overdrive bar:
351
+ * base segment + zigzag break + proportional overdrive stub (like structure chart).
1525
352
  *
1526
353
  * Layout: [left label area][bar area with axis][right label area]
1527
354
  */
1528
355
  const AbsoluteVarianceBar = (props) => {
1529
- const { value, scenario, columnStats, height, isPositiveGood, formattedValue, measureScale, maxBarWidth: maxBarWidthEm = 3, styles = DEFAULT_STYLES, } = props;
356
+ const { value, scenario, columnStats, height, isPositiveGood, formattedValue, measureScale, maxBarWidth: maxBarWidthEm = 10, styles = DEFAULT_STYLES, } = props;
1530
357
  const s = styles.scaleFactor;
358
+ const fs = styles.fontSize;
1531
359
  const labelAreaWidth = 38 * s;
1532
- const maxBarWidth = maxBarWidthEm * styles.fontSize * s;
360
+ const maxBarWidth = maxBarWidthEm * fs;
361
+ // Overdrive layout constants
362
+ const breakGap = 4 * s;
363
+ const overdriveZoneWidth = maxBarWidth * 0.15;
364
+ const cutWidth = maxBarWidth - breakGap - overdriveZoneWidth;
365
+ // Direct unit scaling via fontSize
366
+ const scaledWidth = Math.abs(value) * styles.unitScaling * fs;
367
+ const isExtreme = scaledWidth > cutWidth;
368
+ // Compute proportional overdrive width across the column
369
+ const maxScaledWidth = columnStats.absMax * styles.unitScaling * fs;
370
+ const maxOverflow = Math.max(0, maxScaledWidth - cutWidth);
371
+ const overflowAmount = Math.max(0, scaledWidth - cutWidth);
372
+ const overdriveWidth = maxOverflow > 0 ? (overflowAmount / maxOverflow) * overdriveZoneWidth : 0;
1533
373
  // Adaptive axis placement based on data range
1534
374
  const hasNeg = columnStats.min < 0;
1535
375
  const hasPos = columnStats.max > 0;
@@ -1540,18 +380,10 @@ const AbsoluteVarianceBar = (props) => {
1540
380
  const padding = 2 * s;
1541
381
  const barHeight = height - padding * 2;
1542
382
  const axisX = (hasNeg ? labelAreaWidth : 0) + negBarWidth;
1543
- // Proportional scaling with outlier detection
1544
- const effectiveMax = computeEffectiveMax(columnStats);
1545
- const absValue = Math.abs(value);
1546
- const proportion = effectiveMax > 0 ? absValue / effectiveMax : 0;
1547
- const isExtreme = absValue > effectiveMax;
1548
- const barWidth = Math.min(proportion, 1) * maxBarWidth;
1549
- const isPositive = value >= 0;
1550
- const barX = isPositive ? axisX : axisX - barWidth;
1551
383
  const barY = padding;
384
+ const isPositive = value >= 0;
1552
385
  // Get style based on column type (scenario vs variance)
1553
386
  const barStyle = getBarStyle(scenario, value, isPositiveGood, styles);
1554
- // Pattern prefix for scenarios uses scenario type, for variances uses pos/neg
1555
387
  const patternPrefix = isScenarioColumn(scenario)
1556
388
  ? getScenarioType(scenario)
1557
389
  : isPositiveGood
@@ -1564,13 +396,14 @@ const AbsoluteVarianceBar = (props) => {
1564
396
  const fillValue = getBarFill(barStyle, patternPrefix);
1565
397
  const { stroke: barStroke, strokeWidth: barStrokeWidth } = getBarStroke(barStyle);
1566
398
  const displayValue = formattedValue || formatValue(value, false, measureScale);
1567
- // Label position: in the label area on the appropriate side
1568
- // Positive values: label in right area, left-aligned
1569
- // Negative values: label in left area, right-aligned
1570
- const labelX = isPositive ? axisX + barWidth + 4 * s : axisX - barWidth - 4 * s;
399
+ // Normal bar width (clamped to cutWidth when extreme)
400
+ const baseBarWidth = isExtreme ? cutWidth : scaledWidth;
401
+ // Label position accounts for overdrive
402
+ const totalVisualWidth = isExtreme ? cutWidth + breakGap + overdriveWidth : scaledWidth;
403
+ const labelX = isPositive ? axisX + totalVisualWidth + 4 * s : axisX - totalVisualWidth - 4 * s;
1571
404
  const labelAnchor = isPositive ? "start" : "end";
1572
- const centerY = height / 2;
1573
- return (h("svg", { width: totalWidth, height: height, class: "cell-bar-chart absolute-variance", style: { overflow: "visible" } }, h(PatternDefs, { styles: styles }), h("line", { x1: axisX, y1: 0, x2: axisX, y2: height, stroke: AXIS_COLOR, "stroke-width": 1 * s }), barWidth > 0 && (h("rect", { x: barX, y: barY, width: barWidth, height: barHeight, fill: fillValue, stroke: barStroke, "stroke-width": barStrokeWidth * s })), isExtreme && isPositive && (h("polygon", { points: `${axisX + maxBarWidth},${centerY} ${axisX + maxBarWidth - 6 * s},${centerY - 3 * s} ${axisX + maxBarWidth - 6 * s},${centerY + 3 * s}`, fill: barStyle.fill === "transparent" ? barStyle.stroke : barStyle.fill })), isExtreme && !isPositive && (h("polygon", { points: `${axisX - maxBarWidth},${centerY} ${axisX - maxBarWidth + 6 * s},${centerY - 3 * s} ${axisX - maxBarWidth + 6 * s},${centerY + 3 * s}`, fill: barStyle.fill === "transparent" ? barStyle.stroke : barStyle.fill })), h("text", { x: labelX, y: height / 2, dy: "0.35em", "text-anchor": labelAnchor, fill: styles.fontColor, "font-size": styles.fontSize, "font-family": styles.fontFamily }, displayValue)));
405
+ return (h("svg", { width: totalWidth, height: height, class: "cell-bar-chart absolute-variance", style: { overflow: "visible" } }, h(PatternDefs, { styles: styles }), h("line", { x1: axisX, y1: 0, x2: axisX, y2: height, stroke: AXIS_COLOR, "stroke-width": 1 * s }), baseBarWidth > 0 && (h("rect", { x: isPositive ? axisX : axisX - baseBarWidth, y: barY, width: baseBarWidth, height: barHeight, fill: fillValue, stroke: barStroke, "stroke-width": barStrokeWidth * s })), isExtreme && overdriveWidth > 0 && (h("rect", { x: isPositive ? axisX + cutWidth + breakGap : axisX - cutWidth - breakGap - overdriveWidth, y: barY, width: overdriveWidth, height: barHeight, fill: fillValue, stroke: barStroke, "stroke-width": barStrokeWidth * s })), isExtreme &&
406
+ renderZigzagBreak(isPositive ? axisX + cutWidth : axisX - cutWidth - breakGap, breakGap, barY, barHeight, s), h("text", { x: labelX, y: height / 2, dy: "0.35em", "text-anchor": labelAnchor, fill: styles.fontColor, "font-size": fs, "font-family": styles.fontFamily }, displayValue)));
1574
407
  };
1575
408
  /**
1576
409
  * Renders a relative variance pin chart (dr_ prefix).
@@ -1580,10 +413,11 @@ const AbsoluteVarianceBar = (props) => {
1580
413
  * Uses percentageScaling to determine pin length (pixels per percentage point).
1581
414
  */
1582
415
  const RelativeVariancePin = (props) => {
1583
- const { value, scenario, columnStats, height, isPositiveGood, formattedValue, measureScale, maxBarWidth: maxBarWidthEm = 3, styles = DEFAULT_STYLES, } = props;
416
+ const { value, scenario, columnStats, height, isPositiveGood, formattedValue, measureScale, maxBarWidth: maxBarWidthEm = 10, styles = DEFAULT_STYLES, } = props;
1584
417
  const s = styles.scaleFactor;
418
+ const fs = styles.fontSize;
1585
419
  // Pin length is ~2/3 of bar width for visual balance
1586
- const maxPinLength = Math.round(maxBarWidthEm * 0.67 * styles.fontSize) * s;
420
+ const maxPinLength = Math.round(maxBarWidthEm * 0.67 * fs);
1587
421
  const pinPadding = 5 * s;
1588
422
  // Adaptive axis placement based on data range
1589
423
  const hasNeg = columnStats.min < 0;
@@ -1595,12 +429,11 @@ const RelativeVariancePin = (props) => {
1595
429
  const totalWidth = pinAreaWidth + labelAreaWidth;
1596
430
  const axisX = negPinWidth;
1597
431
  const centerY = height / 2;
1598
- // Proportional scaling with outlier detection
1599
- const effectiveMax = computeEffectiveMax(columnStats);
1600
- const absValue = Math.abs(value);
1601
- const proportion = effectiveMax > 0 ? absValue / effectiveMax : 0;
1602
- const isExtreme = absValue > effectiveMax;
1603
- const pinLength = Math.min(proportion, 1) * maxPinLength;
432
+ // Direct unit scaling via fontSize
433
+ const percentValue = Math.abs(value) * 100;
434
+ const scaledLength = percentValue * styles.percentageScaling * fs;
435
+ const isExtreme = scaledLength > maxPinLength;
436
+ const pinLength = Math.min(scaledLength, maxPinLength);
1604
437
  const isPositive = value >= 0;
1605
438
  const pinEndX = isPositive ? axisX + pinLength : axisX - pinLength;
1606
439
  // Get style based on column type (scenario vs variance)
@@ -1609,7 +442,7 @@ const RelativeVariancePin = (props) => {
1609
442
  const displayValue = formattedValue || formatValue(value, true, measureScale);
1610
443
  // Label always on the right side after the pin area
1611
444
  const labelX = pinAreaWidth + 4 * s;
1612
- return (h("svg", { width: totalWidth, height: height, class: "cell-bar-chart relative-variance", style: { overflow: "visible" } }, h("line", { x1: axisX, y1: 0, x2: axisX, y2: height, stroke: AXIS_COLOR, "stroke-width": 1 * s }), !isExtreme && h("circle", { cx: pinEndX, cy: centerY, r: dotRadius, fill: styles.fontColor }), h("line", { x1: axisX, y1: centerY, x2: pinEndX, y2: centerY, stroke: barStyle.fill, "stroke-width": 2 * s }), isExtreme && isPositive && (h("polygon", { points: `${axisX + maxPinLength},${centerY} ${axisX + maxPinLength - 6 * s},${centerY - 3 * s} ${axisX + maxPinLength - 6 * s},${centerY + 3 * s}`, fill: barStyle.fill })), isExtreme && !isPositive && (h("polygon", { points: `${axisX - maxPinLength},${centerY} ${axisX - maxPinLength + 6 * s},${centerY - 3 * s} ${axisX - maxPinLength + 6 * s},${centerY + 3 * s}`, fill: barStyle.fill })), h("text", { x: labelX, y: height / 2, dy: "0.35em", "text-anchor": "start", fill: styles.fontColor, "font-size": styles.fontSize, "font-style": "italic", "font-family": styles.fontFamily }, displayValue)));
445
+ return (h("svg", { width: totalWidth, height: height, class: "cell-bar-chart relative-variance", style: { overflow: "visible" } }, h("line", { x1: axisX, y1: 0, x2: axisX, y2: height, stroke: AXIS_COLOR, "stroke-width": 1 * s }), !isExtreme && h("circle", { cx: pinEndX, cy: centerY, r: dotRadius, fill: styles.fontColor }), h("line", { x1: axisX, y1: centerY, x2: pinEndX, y2: centerY, stroke: barStyle.fill, "stroke-width": 2 * s }), isExtreme && isPositive && (h("polygon", { points: `${axisX + maxPinLength},${centerY} ${axisX + maxPinLength - 6 * s},${centerY - 3 * s} ${axisX + maxPinLength - 6 * s},${centerY + 3 * s}`, fill: barStyle.fill })), isExtreme && !isPositive && (h("polygon", { points: `${axisX - maxPinLength},${centerY} ${axisX - maxPinLength + 6 * s},${centerY - 3 * s} ${axisX - maxPinLength + 6 * s},${centerY + 3 * s}`, fill: barStyle.fill })), h("text", { x: labelX, y: height / 2, dy: "0.35em", "text-anchor": "start", fill: styles.fontColor, "font-size": fs, "font-style": "italic", "font-family": styles.fontFamily }, displayValue)));
1613
446
  };
1614
447
  /**
1615
448
  * CellBarChart - Renders IBCS-compliant variance bar charts.
@@ -3438,4 +2271,4 @@ const IbcsTable = class {
3438
2271
  };
3439
2272
  IbcsTable.style = ibcsTableCss();
3440
2273
 
3441
- export { Context as bn_context, Datasource as bn_datasource, Page as bn_page, Table$1 as bn_table, IbcsTable as ibcs_table };
2274
+ export { IbcsTable as ibcs_table };