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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (198) hide show
  1. package/dist/bn-template-engine/bn-template-engine.esm.js +1 -1
  2. package/dist/bn-template-engine/p-1265d8d3.entry.js +1 -0
  3. package/dist/bn-template-engine/p-15516dac.entry.js +1 -0
  4. package/dist/bn-template-engine/p-1c716641.entry.js +1 -0
  5. package/dist/bn-template-engine/p-27cc8dc0.entry.js +1 -0
  6. package/dist/bn-template-engine/p-3b4c7425.entry.js +1 -0
  7. package/dist/bn-template-engine/p-4426d484.entry.js +1 -0
  8. package/dist/bn-template-engine/p-51f8dc9e.entry.js +1 -0
  9. package/dist/bn-template-engine/p-53d4e690.entry.js +1 -0
  10. package/dist/bn-template-engine/p-5KQYRQLK.js +1 -0
  11. package/dist/bn-template-engine/p-7337e03d.entry.js +1 -0
  12. package/dist/bn-template-engine/{p-0f1504f3.entry.js → p-75e97c87.entry.js} +1 -1
  13. package/dist/bn-template-engine/p-7a560278.entry.js +1 -0
  14. package/dist/bn-template-engine/p-BYBpC0EO.js +1 -0
  15. package/dist/bn-template-engine/p-BfXY5dsy.js +1 -0
  16. package/dist/bn-template-engine/p-BgnHJQ9Q.js +1 -0
  17. package/dist/bn-template-engine/{p-B4ySv9KQ.js → p-Bhd_WSML.js} +1 -1
  18. package/dist/bn-template-engine/p-Bka-Z6jo.js +1 -0
  19. package/dist/bn-template-engine/p-Bnhh02CF.js +1 -0
  20. package/dist/bn-template-engine/p-C7dQL8CS.js +1 -0
  21. package/dist/bn-template-engine/p-CL1RYuNU.js +1 -0
  22. package/dist/bn-template-engine/p-CYwd_ZNM.js +1 -0
  23. package/dist/bn-template-engine/p-ChlK-T9I.js +1 -0
  24. package/dist/bn-template-engine/p-DHezf8pZ.js +1 -0
  25. package/dist/bn-template-engine/{p-DVMu6dEy.js → p-DlppAFq9.js} +1 -1
  26. package/dist/bn-template-engine/p-DvDDgmcV.js +1 -0
  27. package/dist/bn-template-engine/p-DvvwfRQG.js +1 -0
  28. package/dist/bn-template-engine/{p-DG-1MR_T.js → p-P7pGJBgc.js} +1 -1
  29. package/dist/bn-template-engine/p-abc0067c.entry.js +1 -0
  30. package/dist/bn-template-engine/p-b34eaf86.entry.js +1 -0
  31. package/dist/bn-template-engine/p-bdb8b44c.entry.js +1 -0
  32. package/dist/bn-template-engine/p-c44fcb8e.entry.js +1 -0
  33. package/dist/bn-template-engine/p-c7e1a49b.entry.js +1 -0
  34. package/dist/bn-template-engine/p-d9003041.entry.js +1 -0
  35. package/dist/bn-template-engine/p-daa7ffa3.entry.js +1 -0
  36. package/dist/bn-template-engine/p-e084f50a.entry.js +1 -0
  37. package/dist/bn-template-engine/p-eaba6658.entry.js +1 -0
  38. package/dist/bn-template-engine/{p-C0yAPzJz.js → p-u8igQLRZ.js} +1 -1
  39. package/dist/cjs/{DataFormatDigits-DAmZzqbD.js → DataFormatDigits-DKcOeLNK.js} +1 -1
  40. package/dist/cjs/{DateStringFactory-CcluhpGI.js → DateStringFactory-CSKvbS8K.js} +1 -1
  41. package/dist/cjs/{Order-BKoDS21t.js → Order-iG11HI4R.js} +8 -5
  42. package/dist/cjs/{SVGVariancesStyleGroup-DYYAU-81.js → SVGVariancesStyleGroup-K-Tw6lOD.js} +1 -14
  43. package/dist/cjs/bn-asset.cjs.entry.js +5 -4
  44. package/dist/cjs/bn-body_4.cjs.entry.js +15 -13
  45. package/dist/cjs/bn-card.cjs.entry.js +5 -4
  46. package/dist/cjs/{ibcs-chart-structure.cjs.entry.js → bn-chart-structure_5.cjs.entry.js} +1074 -30
  47. package/dist/cjs/bn-chart-time.cjs.entry.js +38 -12
  48. package/dist/cjs/bn-component-style.cjs.entry.js +5 -4
  49. package/dist/cjs/bn-dataset.cjs.entry.js +38 -9
  50. package/dist/cjs/bn-grid.cjs.entry.js +9 -7
  51. package/dist/cjs/bn-image.cjs.entry.js +9 -7
  52. package/dist/cjs/bn-internationalization.cjs.entry.js +5 -4
  53. package/dist/cjs/bn-layout-card.cjs.entry.js +3 -2
  54. package/dist/cjs/bn-layout-page.cjs.entry.js +2 -1
  55. package/dist/cjs/bn-message.cjs.entry.js +5 -4
  56. package/dist/cjs/bn-table.cjs.entry.js +981 -0
  57. package/dist/cjs/bn-template-engine.cjs.js +1 -1
  58. package/dist/cjs/bn-template.cjs.entry.js +3 -2
  59. package/dist/cjs/bn-text.cjs.entry.js +11 -9
  60. package/dist/cjs/bn-tree.cjs.entry.js +9 -7
  61. package/dist/cjs/contentDecoder-JxOldq1e.js +419 -0
  62. package/dist/cjs/{context-protocol-CRPmux5D.js → context-protocol-DRQWrwsA.js} +2 -0
  63. package/dist/cjs/editor-companion.cjs.entry.js +1 -1
  64. package/dist/cjs/emotion-hash.esm-nbbEQ0Dn.js +57 -0
  65. package/dist/cjs/ibcs-chart-time.cjs.entry.js +22 -18
  66. package/dist/cjs/{bn-context_5.cjs.entry.js → ibcs-table.cjs.entry.js} +122 -1293
  67. package/dist/cjs/{StringAdapter-Bneo8T4k.js → ibcsRuleSet-DgUoXOfd.js} +10 -10
  68. package/dist/cjs/index-Dm85hG6t.js +65 -0
  69. package/dist/cjs/loader.cjs.js +1 -1
  70. package/dist/cjs/{scaling-D8sIIKft.js → scaling-9Tz595RQ.js} +7 -7
  71. package/dist/cjs/{withHasError-B8gHkfV2.js → utils-CwHIVbbL.js} +1 -69
  72. package/dist/cjs/{withBodyObserver-C6gLgq_e.js → withBodyObserver-CKpSD8UT.js} +3 -3
  73. package/dist/cjs/{withComponentStatus-_x4LQZ0N.js → withComponentStatus-Bw70BhO0.js} +5 -5
  74. package/dist/cjs/{withComponentStyle-DMtic_9Y.js → withComponentStyle-aIbTCtfj.js} +5 -5
  75. package/dist/cjs/withHasError-D7ue5vAv.js +72 -0
  76. package/dist/cjs/{withStyled-CW30Bh6c.js → withStyled-CS1Yp4sv.js} +8 -61
  77. package/dist/cjs/{withTranslation-CWPAIRjh.js → withTranslation-rwgyITqe.js} +5 -5
  78. package/dist/collection/components/bn-chart-structure/bn-chart-structure.js +226 -99
  79. package/dist/collection/components/bn-chart-structure/ibcs-chart-structure.js +13 -3
  80. package/dist/collection/components/bn-chart-structure/utils/StructureChart.js +94 -11
  81. package/dist/collection/components/bn-chart-structure/utils/elements/Label.js +11 -0
  82. package/dist/collection/components/bn-chart-structure/utils/elements/StackedBar.js +8 -6
  83. package/dist/collection/components/bn-chart-structure/utils/model/styles/StructureChartStyle.js +4 -0
  84. package/dist/collection/components/bn-chart-time/bn-chart-time.js +28 -4
  85. package/dist/collection/components/bn-chart-time/utils/TimeChart.js +3 -3
  86. package/dist/collection/components/bn-chart-time/utils/elements/StackedColumn.js +3 -4
  87. package/dist/collection/components/bn-chart-time/utils/model/styles/TimeChartStyle.js +4 -0
  88. package/dist/collection/components/bn-dataset/bn-dataset.js +49 -2
  89. package/dist/collection/components/bn-datasource/bn-datasource.js +46 -3
  90. package/dist/collection/components/bn-table/bn-table.js +20 -21
  91. package/dist/collection/components/bn-table/ibcs-table.js +2 -2
  92. package/dist/collection/components/bn-table/utils/elements/CellBarChart.js +58 -41
  93. package/dist/collection/stores/componentStyles.js +2 -0
  94. package/dist/collection/utils/constants.js +8 -5
  95. package/dist/collection/utils/contentDecoder.js +28 -0
  96. package/dist/collection/utils/stackColors.js +2 -2
  97. package/dist/collection/utils/validate.js +1 -1
  98. package/dist/components/DataFormatDigits.js +1 -1
  99. package/dist/components/Order.js +1 -1
  100. package/dist/components/SVGVariancesStyleGroup.js +1 -1
  101. package/dist/components/bn-chart-structure.js +1 -1
  102. package/dist/components/bn-chart-time.js +1 -1
  103. package/dist/components/bn-dataset.js +1 -1
  104. package/dist/components/bn-datasource.js +1 -1
  105. package/dist/components/bn-table.js +1 -1
  106. package/dist/components/contentDecoder.js +1 -0
  107. package/dist/components/context-protocol.js +1 -1
  108. package/dist/components/emotion-hash.esm.js +1 -0
  109. package/dist/components/ibcs-chart-structure2.js +1 -1
  110. package/dist/components/ibcs-chart-time2.js +1 -1
  111. package/dist/components/ibcs-table2.js +1 -1
  112. package/dist/components/ibcs-title2.js +1 -1
  113. package/dist/components/ibcsRuleSet.js +1 -1
  114. package/dist/components/validate.js +1 -1
  115. package/dist/components/withStyled.js +1 -1
  116. package/dist/esm/{DataFormatDigits--qIbKvXa.js → DataFormatDigits-oSZ1hBKE.js} +1 -1
  117. package/dist/esm/{DateStringFactory-XWdUjsn8.js → DateStringFactory-CSGz6TDk.js} +1 -1
  118. package/dist/esm/{Order-sqjrku2z.js → Order-Bnhh02CF.js} +9 -6
  119. package/dist/esm/{SVGVariancesStyleGroup-ibg3sLjM.js → SVGVariancesStyleGroup-CqTjrZYg.js} +2 -13
  120. package/dist/esm/bn-asset.entry.js +5 -4
  121. package/dist/esm/bn-body_4.entry.js +11 -9
  122. package/dist/esm/bn-card.entry.js +5 -4
  123. package/dist/esm/{ibcs-chart-structure.entry.js → bn-chart-structure_5.entry.js} +1064 -24
  124. package/dist/esm/bn-chart-time.entry.js +38 -12
  125. package/dist/esm/bn-component-style.entry.js +5 -4
  126. package/dist/esm/bn-dataset.entry.js +35 -6
  127. package/dist/esm/bn-grid.entry.js +9 -7
  128. package/dist/esm/bn-image.entry.js +9 -7
  129. package/dist/esm/bn-internationalization.entry.js +5 -4
  130. package/dist/esm/bn-layout-card.entry.js +3 -2
  131. package/dist/esm/bn-layout-page.entry.js +2 -1
  132. package/dist/esm/bn-message.entry.js +5 -4
  133. package/dist/esm/bn-table.entry.js +979 -0
  134. package/dist/esm/bn-template-engine.js +1 -1
  135. package/dist/esm/bn-template.entry.js +3 -2
  136. package/dist/esm/bn-text.entry.js +11 -9
  137. package/dist/esm/bn-tree.entry.js +9 -7
  138. package/dist/esm/contentDecoder-oMmxz6nJ.js +416 -0
  139. package/dist/esm/{context-protocol-Bz5klD-F.js → context-protocol-BHnQsVsr.js} +2 -0
  140. package/dist/esm/editor-companion.entry.js +1 -1
  141. package/dist/esm/emotion-hash.esm-BYBpC0EO.js +55 -0
  142. package/dist/esm/ibcs-chart-time.entry.js +15 -11
  143. package/dist/esm/{bn-context_5.entry.js → ibcs-table.entry.js} +69 -1236
  144. package/dist/esm/{StringAdapter-BCLJpQQ8.js → ibcsRuleSet-K4ytuA1f.js} +10 -10
  145. package/dist/esm/index-DHezf8pZ.js +65 -0
  146. package/dist/esm/loader.js +1 -1
  147. package/dist/esm/{scaling-C6K8FYSF.js → scaling-Cehc74IE.js} +2 -2
  148. package/dist/esm/{withHasError-B3QX2emi.js → utils-DvvwfRQG.js} +1 -69
  149. package/dist/esm/{withBodyObserver-DczL5ia8.js → withBodyObserver-FQ8NwCIz.js} +1 -1
  150. package/dist/esm/{withComponentStatus-DodoSXe-.js → withComponentStatus-DWjDYtZ7.js} +1 -1
  151. package/dist/esm/{withComponentStyle-BerJY64r.js → withComponentStyle-9uP_hcDq.js} +2 -2
  152. package/dist/esm/withHasError-FyY5mQ_3.js +70 -0
  153. package/dist/esm/{withStyled-D1fAWJ3g.js → withStyled--qQWquTH.js} +6 -59
  154. package/dist/esm/{withTranslation-mimbJdER.js → withTranslation-BqD0Kp7b.js} +2 -2
  155. package/dist/types/components/bn-chart-structure/bn-chart-structure.d.ts +155 -109
  156. package/dist/types/components/bn-chart-structure/utils/StructureChart.d.ts +7 -0
  157. package/dist/types/components/bn-chart-structure/utils/elements/Label.d.ts +2 -0
  158. package/dist/types/components/bn-chart-structure/utils/model/styles/StructureChartStyle.d.ts +1 -0
  159. package/dist/types/components/bn-chart-time/utils/model/styles/TimeChartStyle.d.ts +1 -0
  160. package/dist/types/components/bn-dataset/bn-dataset.d.ts +6 -0
  161. package/dist/types/components/bn-datasource/bn-datasource.d.ts +8 -0
  162. package/dist/types/components/bn-table/bn-table.d.ts +10 -8
  163. package/dist/types/components/bn-table/utils/elements/CellBarChart.d.ts +0 -2
  164. package/dist/types/components.d.ts +102 -38
  165. package/dist/types/stores/componentStyles.d.ts +2 -0
  166. package/dist/types/utils/constants.d.ts +8 -5
  167. package/dist/types/utils/contentDecoder.d.ts +12 -0
  168. package/package.json +2 -1
  169. package/dist/bn-template-engine/p-05a82a77.entry.js +0 -1
  170. package/dist/bn-template-engine/p-1970906d.entry.js +0 -1
  171. package/dist/bn-template-engine/p-1dbd339c.entry.js +0 -1
  172. package/dist/bn-template-engine/p-2e68cf09.entry.js +0 -1
  173. package/dist/bn-template-engine/p-31cc6a2d.entry.js +0 -1
  174. package/dist/bn-template-engine/p-37881d05.entry.js +0 -1
  175. package/dist/bn-template-engine/p-3b894997.entry.js +0 -1
  176. package/dist/bn-template-engine/p-50e49732.entry.js +0 -1
  177. package/dist/bn-template-engine/p-6c7c0455.entry.js +0 -1
  178. package/dist/bn-template-engine/p-6da93eae.entry.js +0 -1
  179. package/dist/bn-template-engine/p-701e1578.entry.js +0 -1
  180. package/dist/bn-template-engine/p-8tsCnxIz.js +0 -1
  181. package/dist/bn-template-engine/p-997b2fe4.entry.js +0 -1
  182. package/dist/bn-template-engine/p-BL8gyUwE.js +0 -1
  183. package/dist/bn-template-engine/p-BSfqOkN_.js +0 -1
  184. package/dist/bn-template-engine/p-CRLgp9-v.js +0 -1
  185. package/dist/bn-template-engine/p-CYjZRKdI.js +0 -1
  186. package/dist/bn-template-engine/p-DRikHQE-.js +0 -1
  187. package/dist/bn-template-engine/p-DtdQCMzj.js +0 -1
  188. package/dist/bn-template-engine/p-a90f1cbe.entry.js +0 -1
  189. package/dist/bn-template-engine/p-b7bec050.entry.js +0 -1
  190. package/dist/bn-template-engine/p-d7f0cbaf.entry.js +0 -1
  191. package/dist/bn-template-engine/p-dfb61aa5.entry.js +0 -1
  192. package/dist/bn-template-engine/p-ece17f84.entry.js +0 -1
  193. package/dist/bn-template-engine/p-f27995c9.entry.js +0 -1
  194. package/dist/bn-template-engine/p-fd427179.entry.js +0 -1
  195. package/dist/bn-template-engine/p-sqjrku2z.js +0 -1
  196. package/dist/bn-template-engine/p-tzFCK9qn.js +0 -1
  197. package/dist/cjs/bn-chart-structure.cjs.entry.js +0 -700
  198. package/dist/esm/bn-chart-structure.entry.js +0 -698
@@ -1,1200 +1,16 @@
1
1
  'use strict';
2
2
 
3
- var index = require('./index-Cjw0q6gP.js');
4
- var contextProtocol = require('./context-protocol-CRPmux5D.js');
5
- var withComponentStatus = require('./withComponentStatus-_x4LQZ0N.js');
6
- var withHasError = require('./withHasError-B8gHkfV2.js');
7
- var withBodyObserver = require('./withBodyObserver-C6gLgq_e.js');
8
- var withStyled = require('./withStyled-CW30Bh6c.js');
9
- var withComponentStyle = require('./withComponentStyle-DMtic_9Y.js');
10
- var scaling = require('./scaling-D8sIIKft.js');
11
- var withTranslation = require('./withTranslation-CWPAIRjh.js');
12
- var Order = require('./Order-BKoDS21t.js');
3
+ var index$1 = require('./index-Cjw0q6gP.js');
4
+ var index = require('./index-Dm85hG6t.js');
13
5
  var formatter = require('./formatter-DIJL_crx.js');
6
+ var Order = require('./Order-iG11HI4R.js');
14
7
  var alasql_min = require('./alasql.min-C_nHTuEQ.js');
15
- var StringAdapter = require('./StringAdapter-Bneo8T4k.js');
16
- var DataFormatDigits = require('./DataFormatDigits-DAmZzqbD.js');
17
- require('./DateStringFactory-CcluhpGI.js');
8
+ var ibcsRuleSet = require('./ibcsRuleSet-DgUoXOfd.js');
9
+ var DataFormatDigits = require('./DataFormatDigits-DKcOeLNK.js');
10
+ var withComponentStyle = require('./withComponentStyle-aIbTCtfj.js');
18
11
  require('./_commonjsHelpers-BJu3ubxk.js');
19
-
20
- const bnContextCss = () => `:host{display:block}`;
21
-
22
- const Context = class {
23
- constructor(hostRef) {
24
- index.registerInstance(this, hostRef);
25
- this.currentPageUpdate = undefined;
26
- withComponentStatus.withComponentStatus(this);
27
- this.errors = withHasError.withHasError(this);
28
- }
29
- setLocale(newValue) {
30
- this.stores.context.state.locale = newValue;
31
- }
32
- connectedCallback() {
33
- // Retrieve (or create) the stores for this context element.
34
- // A descendant component may have already triggered creation via
35
- // getStores() if Stencil initialized it before this component.
36
- this.stores = contextProtocol.getOrCreateStores(this.element);
37
- if (this.locale) {
38
- this.stores.context.state.locale = this.locale;
39
- }
40
- this.currentPageUpdate = setTimeout(() => {
41
- this.element.querySelectorAll("bn-page, bn-layout-page").forEach((page, index) => {
42
- if (page.localName === "bn-layout-page") {
43
- page.setAttribute("page-number", (index + 1).toString());
44
- }
45
- else {
46
- const footer = page.querySelector("bn-footer");
47
- if (footer) {
48
- // @ts-ignore
49
- footer.setAttribute("page-number", (index + 1).toString());
50
- }
51
- }
52
- });
53
- }, 250);
54
- }
55
- disconnectedCallback() {
56
- if (this.currentPageUpdate) {
57
- clearTimeout(this.currentPageUpdate);
58
- }
59
- }
60
- componentWillLoad() {
61
- // stencil needs one componenet implementing all lifecycle steps to get mixing working
62
- }
63
- componentDidLoad() { }
64
- componentShouldUpdate() { }
65
- componentWillRender() { }
66
- componentDidRender() { }
67
- componentWillUpdate() { }
68
- componentDidUpdate() { }
69
- render() {
70
- return (index.h(index.Host, { key: 'b92019b909e271225baca2cf740c8301e324164e' }, index.h("slot", { key: '87bac4bb29bca32d961afe31355dc1bd48fff0f8' })));
71
- }
72
- get element() { return index.getElement(this); }
73
- static get watchers() { return {
74
- "locale": [{
75
- "setLocale": 0
76
- }]
77
- }; }
78
- };
79
- Context.style = bnContextCss();
80
-
81
- const bnDatasourceCss = () => `bn-datasource{display:none}`;
82
-
83
- const Datasource = class {
84
- constructor(hostRef) {
85
- index.registerInstance(this, hostRef);
86
- withComponentStatus.withComponentStatus(this);
87
- this.errors = withHasError.withHasError(this);
88
- withBodyObserver.withBodyObserver(this, (data) => {
89
- if (!this.stores)
90
- this.stores = contextProtocol.getStores(this.element);
91
- try {
92
- const json = JSON.parse(data);
93
- // @ts-ignore
94
- this.stores.datasources.set(this.name, json);
95
- }
96
- catch (e) {
97
- console.error("Error parsing datasource", e, data);
98
- // @ts-ignore
99
- this.stores.datasources.set(this.name, []);
100
- }
101
- });
102
- }
103
- render() {
104
- return index.h(index.Host, { key: 'e47e62c941bb7954cabe331cb500a7d2fdd7c487' });
105
- }
106
- get element() { return index.getElement(this); }
107
- };
108
- Datasource.style = bnDatasourceCss();
109
-
110
- 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}`;
111
-
112
- const VALID_FORMATS = ["xga", "hd", "full-hd", "4k", "4k2k", "a4", "a3", "a2", "a1", "a0", "letter", "legal"];
113
- const VALID_ORIENTATIONS = ["landscape", "portrait"];
114
- const Page = class {
115
- constructor(hostRef) {
116
- index.registerInstance(this, hostRef);
117
- withComponentStatus.withComponentStatus(this);
118
- this.errors = withHasError.withHasError(this);
119
- this.componentStyle = withComponentStyle.withComponentStyle(this);
120
- }
121
- validateFormat(newValue) {
122
- const errId = "ERR_format";
123
- if (!withStyled.isBlankInput(newValue) && !VALID_FORMATS.includes(newValue)) {
124
- this.errors.addOrReplace({
125
- id: errId,
126
- type: "warning",
127
- message: `format: invalid value '${newValue}' is not supported. Valid values: ${VALID_FORMATS.join(", ")}`,
128
- });
129
- }
130
- else {
131
- this.errors.remove(errId);
132
- }
133
- }
134
- validateOrientation(newValue) {
135
- const errId = "ERR_orientation";
136
- if (!withStyled.isBlankInput(newValue) && !VALID_ORIENTATIONS.includes(newValue)) {
137
- this.errors.addOrReplace({
138
- id: errId,
139
- type: "warning",
140
- message: `orientation: invalid value '${newValue}' is not supported. Valid values: ${VALID_ORIENTATIONS.join(", ")}`,
141
- });
142
- }
143
- else {
144
- this.errors.remove(errId);
145
- }
146
- }
147
- render() {
148
- return (index.h(index.Host, { key: 'b4d682a8f6e83f77c58236265eaf9d1327809c6f', format: this.format, orientation: this.orientation, style: this.prepareStyle() }, index.h("slot", { key: 'ef49c43c1f8926c4c968b752608627adbe330d6c' })));
149
- }
150
- prepareStyle() {
151
- const pageStyle = {
152
- "font-family": this.componentStyle(($) => $.global["fontFamily"]),
153
- "font-size": `${this.componentStyle(($) => $.global["fontSizePx"])}px`,
154
- "--bn-font-family": this.componentStyle(($) => $.global["fontFamily"]) || "'Noto Sans', sans-serif",
155
- "--bn-font-size": `${this.componentStyle(($) => $.global["fontSizePx"]) || 13.3333}px`,
156
- "--bn-font-color": this.componentStyle(($) => $.global["fontColor"]) || "#000000",
157
- "--bn-font-background": this.componentStyle(($) => $.global["fontBackgroundColor"]) || "#ffffff",
158
- };
159
- return pageStyle;
160
- }
161
- get element() { return index.getElement(this); }
162
- static get watchers() { return {
163
- "format": [{
164
- "validateFormat": 0
165
- }],
166
- "orientation": [{
167
- "validateOrientation": 0
168
- }]
169
- }; }
170
- };
171
- Page.style = bnPageCss();
172
-
173
- /** Sentinel value indicating all groups should be included. */
174
- var GroupSelection;
175
- (function (GroupSelection) {
176
- GroupSelection[GroupSelection["ALL"] = -1] = "ALL";
177
- })(GroupSelection || (GroupSelection = {}));
178
- /**
179
- * Tracks whether a factory's output is current or needs recalculation.
180
- * Used to avoid redundant re-rendering when underlying data has not changed.
181
- */
182
- var FactoryState;
183
- (function (FactoryState) {
184
- /** Output matches the current input data. */
185
- FactoryState[FactoryState["UP_TO_DATE"] = 0] = "UP_TO_DATE";
186
- /** Input data has changed; output needs to be regenerated. */
187
- FactoryState[FactoryState["DIRTY"] = 1] = "DIRTY";
188
- })(FactoryState || (FactoryState = {}));
189
- /**
190
- * Table aggregation modes controlling how rows are grouped and totalled.
191
- *
192
- * - `LIST` -- Flat list with no aggregation.
193
- * - `SUM` -- Grouped rows with sum totals per group and a grand total.
194
- * - `SUMNOTOTAL` -- Grouped rows with group sums but no grand total row.
195
- * - `OPT` -- Operation-aware aggregation (respects the +/- operation field).
196
- * - `OPTNOTOTAL` -- Operation-aware aggregation without a grand total row.
197
- */
198
- var TableType;
199
- (function (TableType) {
200
- TableType["LIST"] = "list";
201
- TableType["SUM"] = "sum";
202
- TableType["SUMNOTOTAL"] = "sumnototal";
203
- TableType["OPT"] = "opt";
204
- TableType["OPTNOTOTAL"] = "optnototal";
205
- })(TableType || (TableType = {}));
206
- var OrderDirection;
207
- (function (OrderDirection) {
208
- OrderDirection["ASC"] = "asc";
209
- OrderDirection["DESC"] = "desc";
210
- })(OrderDirection || (OrderDirection = {}));
211
- /**
212
- * Discriminator for rendered table rows, controlling visual styling and behavior.
213
- *
214
- * - `HEADER` -- Column header row.
215
- * - `GROUPHEAD` -- Group title row (rendered when `grouped` is true).
216
- * - `SEPERATORLINE` -- Visual divider between groups.
217
- * - `SUM` -- Grand total row.
218
- * - `GROUPSUM` -- Sub-total row for a single group.
219
- * - `DRILLELEMENT` -- "Thereof" drill-down sub-row.
220
- * - `STANDARD` -- Normal data row.
221
- * - `PARTELEMENT` -- "Part of" percentage row.
222
- * - `ENTRY` -- Generic entry row.
223
- */
224
- var TableRowType;
225
- (function (TableRowType) {
226
- TableRowType["HEADER"] = "HEADER";
227
- TableRowType["GROUPHEAD"] = "GROUPHEAD";
228
- TableRowType["SEPERATORLINE"] = "SEPERATORLINE";
229
- TableRowType["SUM"] = "SUM";
230
- TableRowType["GROUPSUM"] = "GROUP_SUM";
231
- TableRowType["DRILLELEMENT"] = "DRILLELEMENT";
232
- TableRowType["STANDARD"] = "STANDARD";
233
- TableRowType["PARTELEMENT"] = "PARTELEMENT";
234
- TableRowType["ENTRY"] = "ENTRY";
235
- })(TableRowType || (TableRowType = {}));
236
-
237
- const bnTableCss = () => `:host{display:inline-block;position:relative;overflow:hidden}`;
238
-
239
- const Table$1 = class Table {
240
- validateScaling(newValue) {
241
- if (newValue == null || newValue === "" || newValue === "none" || newValue === "auto") {
242
- this.errors.remove("ERR_scale");
243
- return;
244
- }
245
- const num = Number(newValue);
246
- if (isNaN(num) || num <= 0) {
247
- this.errors.addOrReplace({
248
- id: "ERR_scale",
249
- type: "warning",
250
- message: `Invalid scale value: "${newValue}". Use "none", "auto", or a positive number.`,
251
- });
252
- }
253
- else {
254
- this.errors.remove("ERR_scale");
255
- }
256
- }
257
- constructor(hostRef) {
258
- index.registerInstance(this, hostRef);
259
- this.data = [];
260
- this.datasetMeta = null;
261
- this.appliedScaleFactor = 1;
262
- /**
263
- * A not mundane tile which should describes the shown data.
264
- */
265
- this.tableTitle = "";
266
- /**
267
- * AlaSQL WHERE clause fragment injected into the data query to filter
268
- * rows before rendering (e.g. `"category = 'Sales'"`).
269
- */
270
- this.filter = "";
271
- /**
272
- * measureUnit displayed in table.
273
- */
274
- this.measureUnit = "";
275
- /**
276
- * Set width of bar chart columns. Controls the max bar/pin width in pixels.
277
- * <br /><br />
278
- * values:<br />
279
- * ``` w5 // w10 // w15 // w20 // w25 // w30 // w40 // w60 // w80 // w100 ```
280
- */
281
- this.barColumnWidth = "w30";
282
- /**
283
- * @deprecated Bars now scale proportionally via column statistics. Kept for backward compatibility.
284
- * <br /><br />
285
- * Scaling for absolute variance bar charts (ΔPY).
286
- * <br /><br />
287
- * Default: 0.01
288
- */
289
- this.unitScaling = 0.01;
290
- /**
291
- * Scaling for relative variance pin charts (ΔPY%).
292
- * <br /><br />
293
- * Name of the 'scaling-group' which the table uses.
294
- * Scaling groups are maintained globally.
295
- * <br /><br />
296
- * Alternatively a number which represents pixels per percentage point.
297
- * <br /><br />
298
- * Example: 0.5 means 100% = 50 pixels width.
299
- * <br /><br />
300
- * Default: 0.5
301
- */
302
- this.percentageScaling = 0.5;
303
- // Global scaling groups map - can be populated externally for shared scaling across components
304
- this.pixelPerUnitGroupMap = new Map();
305
- /**
306
- * Defines the data unit type of the tables data.
307
- * <br /><br />
308
- * If percent is chosen all data values are converted into percent
309
- * (0.02 -> 2%)
310
- * <br /><br />
311
- * values: <br />
312
- * ```percent // decimal```
313
- */
314
- this.dataFormat = "decimal";
315
- /**
316
- * Toggles of data should be grouped by
317
- * 'rowgroup'.
318
- * <br /><br />
319
- * values: <br />
320
- * ```true // false```
321
- */
322
- this.grouped = "false";
323
- /**
324
- * Toggles display of measure units in table header
325
- * <br /><br />
326
- * values: <br />
327
- * ```true // false```
328
- */
329
- this.showMeasureScale = "false";
330
- /**
331
- * Toggles a title header for each (row-)group
332
- * the title header value is found set by 'rowgroup'
333
- * <br /><br />
334
- * values: <br />
335
- * ```true // false```
336
- *
337
- */
338
- this.showGroupTitle = "true";
339
- /**
340
- * Set the table type
341
- * <br /><br />
342
- * values: <br />
343
- * ```list // sum // opt // sumnototal // optnototal```
344
- *
345
- */
346
- this.type = "list";
347
- /**
348
- * Set the maximum number of rows for each
349
- * group. The value 0 means *no limit*
350
- * <br /><br />
351
- * rows wich where cut by the limit are cumulated as REST
352
- *
353
- */
354
- this.limit = 0;
355
- /**
356
- * Stringified Array of drilldown Objects {
357
- "rowGroup": string,<br />
358
- "category": string,<br />
359
- "subCategory": string,<br />
360
- },<br /><br />
361
- * rowgroup, categroy defines the location of the drill
362
- * subcategory is the displayed label of the data row
363
- *<br /><br />
364
- * example:<br />
365
- * ```[{
366
- "rowGroup":"Umsatz",
367
- "category": "Applications",
368
- "subCategory": "Applications-A",
369
- },]```
370
- */
371
- this.thereof = "[]";
372
- /**
373
- * Stringified Array of Partof Objects <br />{<br />
374
- "rowGroup": string,<br />
375
- "category": string<br />
376
- },<br /><br />
377
- * rowgroup, categroy defines the location of the drill
378
- * percentage of category in rowgorup
379
- *<br /><br />
380
- * example:<br />
381
- * ```[{
382
- "rowGroups":"Umsatz",
383
- "category": "Applications",
384
- },]```
385
- */
386
- this.partof = "[]";
387
- /** List of the primary scenarios on which the order direction are applied valid scenarios are
388
- * If order is set to a scenario it has also exists in scenariolist
389
- * <br /><br />
390
- * values: <br />
391
- * ```category // categoryindex // rowgroup // rowgroup // rowgroupindex // ac[1-4] // fc[1-4] // pp[1-4] // pl[1-4] // auto```
392
- * <br /><br />
393
- * When set to ```auto```, order is detected from the dataset silently.
394
- */
395
- this.order = "category";
396
- /** Set sorting order direction
397
- * <br /><br />
398
- * values: <br />
399
- * ```asc // desc```
400
- */
401
- this.orderDirection = "asc";
402
- /** Sets the Measure Type of the Table
403
- * volume is different displayed and interpreted as currency
404
- * names of siprefix are adapted.
405
- * <br /><br />
406
- * values: <br />
407
- * ```volume // currency```
408
-
409
- */
410
- this.measureType = "volume";
411
- /**
412
- * Sets the SiPrefix of the Mesaurements and converts the
413
- * original value.
414
- * <br /><br />
415
- * values: <br />
416
- * ```_ // k // M // G // T // P // E // Z // Y // m // μ // n // p // P // f // a // z // y // GREATEST // LEAST```
417
- * <br /><br />
418
- * SiPrefix overview:
419
- * ``` "Y": 1E+24,```<br />
420
- * ``` "Z": 1E+21,```<br />
421
- * ``` "E": 1E+18,```<br />
422
- * ``` "P": 1E+15,```<br />
423
- * ``` "T": 1E+12,```<br />
424
- * ``` "G": 1000000000,```<br />
425
- * ``` "M": 1000000,```<br />
426
- * ``` "k": 1000,```<br />
427
- * <br />
428
- * ``` "m": 0.001,```<br />
429
- * ``` "μ": 0.000001,```<br />
430
- * ``` "n": 0.000000001,```<br />
431
- * ``` "p": 0.000000000001,```<br />
432
- * ``` "f": 0.000000000000001,```<br />
433
- * ``` "a": 0.000000000000000001,```<br />
434
- * ``` "z": 0.000000000000000000001,```<br />
435
- * ``` "y": 0.000000000000000000000001,```<br />
436
- * <br /><br />
437
- * Special modes:
438
- * ```GREATEST``` seaches for the bigest (farest to zero) Value in the dataset and sets this value to SiPrefix<br />
439
- * ```LEAST``` searches for smallest (closest to zero) Value in the dataset and sets this value to SiPrefix<br />
440
- *<br /><br />
441
- * ```_``` is the value for no SiPrefix the value is displayed as in the dataset stored.
442
- *
443
- *
444
- */
445
- this.measureScale = "greatest";
446
- /**
447
- * Number of decimal digits in a table cell
448
- */
449
- this.dataFormatDigitsDecimal = 1;
450
- /**
451
- * Number of percent digits in a table cell
452
- */
453
- this.dataFormatDigitsPercent = 2;
454
- /**
455
- * Set width of category column. <br />
456
- * If INF is selected the columns scaling to the min space they need
457
- * seperatly.
458
- * <br /><br />
459
- * values:<br />
460
- * ``` w5 // w10 // w15 // w20 // w25 // w50 // inf ```
461
- */
462
- this.categoryWidth = "w15";
463
- /**
464
- * Defines which drill-column is displayed. <br />
465
- * <br /><br />
466
- * ```scenario``` the scenaro to drill <br/>
467
- * ```group``` is a list of child columns of the parent <br/><br/>
468
- * ```subGroups``` is a list of child columns of the parent <br/><br/>
469
- * example:<br />
470
- * ```[{"scenario": "ac1", "name": "DE", "subGroups": ["Berlin"]},
471
- * {"scenario": "ac2", "name": "UK", "subGroups": []}],
472
- * ```
473
- */
474
- this.columnthereof = null;
475
- this._autoScaleGuard = false;
476
- withStyled.withStyled(this);
477
- withComponentStatus.withComponentStatus(this);
478
- this.errors = withHasError.withHasError(this);
479
- this.componentStyle = withComponentStyle.withComponentStyle(this);
480
- scaling.withDataset(this, (_name, data) => {
481
- this.data = (data || []);
482
- }, (_name, meta) => {
483
- this.datasetMeta = meta;
484
- });
485
- this.t = withTranslation.withTranslation(this).t;
486
- }
487
- validateScenario(newValue) {
488
- const errId = "ERR_scenarios";
489
- const invalidScenarios = withStyled.validateScenarioList(newValue);
490
- if (invalidScenarios.length > 0) {
491
- this.errors.addOrReplace({
492
- id: errId,
493
- type: "warning",
494
- message: "scenarios: invalid value(s) '" + (invalidScenarios === null || invalidScenarios === void 0 ? void 0 : invalidScenarios.toString()) + "' are not supported.",
495
- });
496
- }
497
- else {
498
- this.errors.remove(errId);
499
- }
500
- }
501
- validateVariances(newValue) {
502
- const errId = "ERR_variances";
503
- const invalidVariances = withStyled.validateVariancesList(newValue);
504
- if (invalidVariances.length > 0) {
505
- this.errors.addOrReplace({
506
- id: errId,
507
- type: "warning",
508
- message: "variances: invalid value(s) '" + JSON.stringify(invalidVariances) + "' are not supported.",
509
- });
510
- }
511
- else {
512
- this.errors.remove(errId);
513
- }
514
- }
515
- validateBarColumns(newValue) {
516
- const errId = "ERR_barColumns";
517
- if (withStyled.isBlankInput(newValue)) {
518
- this.errors.remove(errId);
519
- return;
520
- }
521
- const invalidColumns = withStyled.validateVariancesList(newValue);
522
- if (invalidColumns.length > 0) {
523
- this.errors.addOrReplace({
524
- id: errId,
525
- type: "warning",
526
- message: "barColumns: invalid value(s) '" + JSON.stringify(invalidColumns) + "' are not supported.",
527
- });
528
- }
529
- else {
530
- this.errors.remove(errId);
531
- }
532
- }
533
- validateBarColumnWidth(newValue) {
534
- const errId = "ERR_barColumnWidth";
535
- if (!withStyled.isTableBarColumnWidth(newValue)) {
536
- this.errors.addOrReplace({
537
- id: errId,
538
- type: "warning",
539
- message: "barColumnWidth: invalid value '" + newValue + "' is not supported.",
540
- });
541
- }
542
- else {
543
- this.errors.remove(errId);
544
- }
545
- }
546
- validateUnitScaling(newValue) {
547
- const errId = "ERR_unitScaling";
548
- if (!withStyled.isValidNumber(newValue) && !this.pixelPerUnitGroupMap.has(newValue)) {
549
- this.errors.addOrReplace({
550
- id: errId,
551
- type: "warning",
552
- message: "unitScaling: invalid value '" + newValue + "' is not supported.",
553
- });
554
- }
555
- else {
556
- this.errors.remove(errId);
557
- }
558
- }
559
- validatePercentageScaling(newValue) {
560
- const errId = "ERR_percentageScaling";
561
- if (!withStyled.isValidNumber(newValue) && !this.pixelPerUnitGroupMap.has(newValue)) {
562
- this.errors.addOrReplace({
563
- id: errId,
564
- type: "warning",
565
- message: "percentageScaling: invalid value '" + newValue + "' is not supported.",
566
- });
567
- }
568
- else {
569
- this.errors.remove(errId);
570
- }
571
- }
572
- validateDataFormat(newValue) {
573
- const errId = "ERR_dataFormat";
574
- if (!withStyled.isValidDataFormat(newValue)) {
575
- this.errors.addOrReplace({
576
- id: errId,
577
- type: "warning",
578
- message: "dataFormat: invalid value(s) '" + (newValue === null || newValue === void 0 ? void 0 : newValue.toString()) + "' are not supported.",
579
- });
580
- }
581
- else {
582
- this.errors.remove(errId);
583
- }
584
- }
585
- validateGrouped(newValue) {
586
- const errId = "ERR_grouped";
587
- if (!withStyled.isValidBoolean(newValue)) {
588
- this.errors.addOrReplace({
589
- id: errId,
590
- type: "warning",
591
- message: "grouped: invalid value(s) '" + (newValue === null || newValue === void 0 ? void 0 : newValue.toString()) + "' are not supported.",
592
- });
593
- }
594
- else {
595
- this.errors.remove(errId);
596
- }
597
- }
598
- validateShowMeasureScale(newValue) {
599
- const errId = "ERR_grouped";
600
- if (!withStyled.isValidBoolean(newValue)) {
601
- this.errors.addOrReplace({
602
- id: errId,
603
- type: "warning",
604
- message: "showMeasureScale: invalid value(s) '" + (newValue === null || newValue === void 0 ? void 0 : newValue.toString()) + "' are not supported.",
605
- });
606
- }
607
- else {
608
- this.errors.remove(errId);
609
- }
610
- }
611
- validateShowGroupTitle(newValue) {
612
- const errId = "ERR_showGroupTitle";
613
- if (!withStyled.isValidBoolean(newValue)) {
614
- this.errors.addOrReplace({
615
- id: errId,
616
- type: "warning",
617
- message: "showGroupTitle: invalid value(s) '" + (newValue === null || newValue === void 0 ? void 0 : newValue.toString()) + "' are not supported.",
618
- });
619
- }
620
- else {
621
- this.errors.remove(errId);
622
- }
623
- }
624
- validateType(newValue) {
625
- const errId = "ERR_type";
626
- if (!withStyled.isValidTableType(newValue)) {
627
- this.errors.addOrReplace({
628
- id: errId,
629
- type: "warning",
630
- message: "type: invalid value(s) '" + (newValue === null || newValue === void 0 ? void 0 : newValue.toString()) + "' are not supported.",
631
- });
632
- }
633
- else {
634
- this.errors.remove(errId);
635
- }
636
- }
637
- validateLimit(newValue) {
638
- const errId = "ERR_limit";
639
- if (!withStyled.isValidInteger(newValue)) {
640
- this.errors.addOrReplace({
641
- id: errId,
642
- type: "warning",
643
- message: "order: invalid value '" + (newValue === null || newValue === void 0 ? void 0 : newValue.toString()) + "' is not supported.",
644
- });
645
- }
646
- else {
647
- this.errors.remove(errId);
648
- }
649
- }
650
- validateThereOf(newValue) {
651
- const errId = "ERR_thereof";
652
- const invalidElements = withStyled.validateThereOfJsonStr(newValue);
653
- if (invalidElements.length > 0) {
654
- this.errors.addOrReplace({
655
- id: errId,
656
- type: "warning",
657
- message: "ThereOf: invalid value(s) '" + JSON.stringify(invalidElements) + "' are not supported.",
658
- });
659
- }
660
- else {
661
- this.errors.remove(errId);
662
- }
663
- }
664
- validatePartOf(newValue) {
665
- const errId = "ERR_partof";
666
- const invalidElements = withStyled.validatePartOfJsonStr(newValue);
667
- if (invalidElements.length > 0) {
668
- this.errors.addOrReplace({
669
- id: errId,
670
- type: "warning",
671
- message: "partof: invalid value(s) '" + JSON.stringify(invalidElements) + "' are not supported.",
672
- });
673
- }
674
- else {
675
- this.errors.remove(errId);
676
- }
677
- }
678
- validateOrderList(newValue) {
679
- const errId = "ERR_order";
680
- const invalidElements = withStyled.validateOrderList(newValue);
681
- if (invalidElements.length > 0) {
682
- this.errors.addOrReplace({
683
- id: errId,
684
- type: "warning",
685
- message: "order: invalid value(s) '" + JSON.stringify(invalidElements) + "' are not supported.",
686
- });
687
- }
688
- else {
689
- this.errors.remove(errId);
690
- }
691
- }
692
- validateOrderDirection(newValue) {
693
- const errId = "ERR_orderDirection";
694
- if (!withStyled.isValidDirection(newValue)) {
695
- this.errors.addOrReplace({
696
- id: errId,
697
- type: "warning",
698
- message: "orderDirection: invalid value '" + (newValue === null || newValue === void 0 ? void 0 : newValue.toString()) + "' is not supported.",
699
- });
700
- }
701
- else {
702
- this.errors.remove(errId);
703
- }
704
- }
705
- validateMeasureType(newValue) {
706
- const errId = "ERR_measureType";
707
- if (!withStyled.isValidMeasureType(newValue)) {
708
- this.errors.addOrReplace({
709
- id: errId,
710
- type: "warning",
711
- message: "measureType: invalid value '" + (newValue === null || newValue === void 0 ? void 0 : newValue.toString()) + "' is not supported.",
712
- });
713
- }
714
- else {
715
- this.errors.remove(errId);
716
- }
717
- }
718
- validateMeasureScale(newValue) {
719
- const errId = "ERR_measureScale";
720
- if (!withStyled.isValidMeasureScale(newValue)) {
721
- this.errors.addOrReplace({
722
- id: errId,
723
- type: "warning",
724
- message: "measureScale: invalid value '" + (newValue === null || newValue === void 0 ? void 0 : newValue.toString()) + "' is not supported.",
725
- });
726
- }
727
- else {
728
- this.errors.remove(errId);
729
- }
730
- }
731
- validateDataFormatDigitsDecimal(newValue) {
732
- const errId = "ERR_dataFormatDigitsDecimal";
733
- if (!withStyled.isValidInteger(newValue)) {
734
- this.errors.addOrReplace({
735
- id: errId,
736
- type: "warning",
737
- message: "dataFormatDigitsDecimal: invalid value(s) '" + newValue + "' are not supported.",
738
- });
739
- }
740
- else {
741
- this.errors.remove(errId);
742
- }
743
- }
744
- validateDateFormatDigitsPercent(newValue) {
745
- const errId = "ERR_dataFormatDigitsPercent";
746
- if (!withStyled.isValidInteger(newValue)) {
747
- this.errors.addOrReplace({
748
- id: errId,
749
- type: "warning",
750
- message: "dataFormatDigitsPercent: invalid value(s) '" + newValue + "' are not supported.",
751
- });
752
- }
753
- else {
754
- this.errors.remove(errId);
755
- }
756
- }
757
- validateCategoryWidth(newValue) {
758
- const errId = "ERR_categoryWidth";
759
- if (!withStyled.isTableCategoryWidth(newValue)) {
760
- this.errors.addOrReplace({
761
- id: errId,
762
- type: "warning",
763
- message: "categoryWidth: invalid value(s) '" + newValue + "' are not supported.",
764
- });
765
- }
766
- else {
767
- this.errors.remove(errId);
768
- }
769
- }
770
- validateColumnThereOf(newValue) {
771
- const invalidElements = withStyled.validateColumnThereOfJsonStr(newValue);
772
- const errId = "ERR_categorythereof";
773
- if (invalidElements.length > 0) {
774
- this.errors.addOrReplace({
775
- id: errId,
776
- type: "warning",
777
- message: "columnthereof: invalid value(s) '" + JSON.stringify(invalidElements) + "' are not supported.",
778
- });
779
- }
780
- else {
781
- this.errors.remove(errId);
782
- }
783
- }
784
- componentWillLoad() {
785
- //this.datasouce = get("test");
786
- // this.unsubscribe = onChange("test", (value) => this.datasouce = value);
787
- this.validateScenario(this.scenarios);
788
- this.validateVariances(this.variances);
789
- this.validateDataFormat(this.dataFormat);
790
- this.validateGrouped(this.grouped);
791
- this.validateShowGroupTitle(this.showGroupTitle);
792
- this.validateType(this.type);
793
- this.validateLimit(this.limit);
794
- this.validateThereOf(this.thereof);
795
- this.validatePartOf(this.partof);
796
- this.validateOrderDirection(this.orderDirection);
797
- this.validateOrderList(this.order);
798
- this.validateDataFormatDigitsDecimal(this.dataFormatDigitsDecimal);
799
- this.validateDateFormatDigitsPercent(this.dataFormatDigitsPercent);
800
- this.validateCategoryWidth(this.categoryWidth);
801
- this.validateMeasureType(this.measureType);
802
- this.validateMeasureScale(this.measureScale);
803
- this.validateColumnThereOf(this.columnthereof);
804
- this.validateShowMeasureScale(this.showMeasureScale);
805
- this.validateBarColumns(this.barColumns);
806
- this.validateBarColumnWidth(this.barColumnWidth);
807
- this.validateUnitScaling(this.unitScaling);
808
- this.validatePercentageScaling(this.percentageScaling);
809
- this.validateScaling(this.scale);
810
- }
811
- disconnectedCallback() {
812
- this.unsubscribe();
813
- }
814
- componentDidRender() {
815
- var _a, _b;
816
- const { mode } = scaling.parseScaling(this.scale);
817
- // Only auto-scale for 'auto' and 'empty' (blank) modes
818
- if (mode !== "auto" && mode !== "empty") {
819
- this._autoScaleGuard = false;
820
- return;
821
- }
822
- // Skip re-measurement after the state-triggered re-render
823
- if (this._autoScaleGuard) {
824
- this._autoScaleGuard = false;
825
- return;
826
- }
827
- const host = this.element;
828
- const { width: parentWidth } = scaling.getParentDimensions(host);
829
- if (parentWidth <= 0)
830
- return;
831
- // Measure at base (unscaled) font size to get true content width.
832
- // This avoids the oscillation where scaled-down content fits → reset
833
- // to 1 → overflows → scale down → fits → …
834
- const baseFontSize = this.componentStyle(($) => { var _a; return ((_a = $["global"]) === null || _a === void 0 ? void 0 : _a["fontSizePx"]) || 13.3333; });
835
- host.style.setProperty("--bn-font-size", `${baseFontSize}px`);
836
- // Reading scrollWidth forces a synchronous reflow at base size
837
- const div = (_a = host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector("div");
838
- const unscaledWidth = (_b = div === null || div === void 0 ? void 0 : div.scrollWidth) !== null && _b !== void 0 ? _b : host.scrollWidth;
839
- if (unscaledWidth <= parentWidth + 1) {
840
- // Content fits at base size — no scaling needed
841
- this.errors.remove("AUTO_scale");
842
- if (this.appliedScaleFactor !== 1) {
843
- this._autoScaleGuard = true;
844
- this.appliedScaleFactor = 1;
845
- }
846
- return;
847
- }
848
- // Subtract 1px to account for sub-pixel rounding after scaling,
849
- // preventing the right edge from being clipped by overflow:hidden.
850
- const computedFactor = (parentWidth - 1) / unscaledWidth;
851
- // Apply immediately via CSS var for smooth visual (before state re-render)
852
- host.style.setProperty("--bn-font-size", `${baseFontSize * computedFactor}px`);
853
- if (mode === "empty") {
854
- this.errors.addOrReplace({
855
- id: "AUTO_scale",
856
- type: "warning",
857
- message: `Auto-scaled table by factor ${computedFactor.toFixed(3)}`,
858
- });
859
- }
860
- else {
861
- this.errors.remove("AUTO_scale");
862
- }
863
- // Update state so bar charts re-render at the new scale
864
- if (Math.abs(computedFactor - this.appliedScaleFactor) > 0.001) {
865
- this._autoScaleGuard = true;
866
- this.appliedScaleFactor = computedFactor;
867
- }
868
- }
869
- prepareDataFormat() {
870
- var _a;
871
- return Order.DataFormat[(_a = this.dataFormat) === null || _a === void 0 ? void 0 : _a.toUpperCase()];
872
- }
873
- prepareGrouped() {
874
- return this.grouped === "true";
875
- }
876
- prepareShowGroupTitle() {
877
- return this.showGroupTitle === "true";
878
- }
879
- prepareTableType() {
880
- var _a;
881
- return TableType[(_a = this.type) === null || _a === void 0 ? void 0 : _a.toUpperCase()];
882
- }
883
- prepareLimit() {
884
- return Math.floor(Number(this.limit) || 0);
885
- }
886
- prepareThereOf() {
887
- if (this.thereof == null || this.thereof.trim() === "") {
888
- return [];
889
- }
890
- return JSON.parse(this.thereof);
891
- }
892
- preparePartOf() {
893
- if (this.partof == null || this.partof.trim() === "") {
894
- return [];
895
- }
896
- return JSON.parse(this.partof);
897
- }
898
- prepareOrder() {
899
- var _a, _b, _c;
900
- const isAuto = ((_a = this.order) === null || _a === void 0 ? void 0 : _a.trim().toLowerCase()) === "auto";
901
- let orderStr = this.order;
902
- if (isAuto && ((_b = this.datasetMeta) === null || _b === void 0 ? void 0 : _b.suggestedOrder)) {
903
- orderStr = this.datasetMeta.suggestedOrder;
904
- }
905
- const tableOrder = {
906
- hierarchy: orderStr.split(",").map((entry) => Order.OrderColumn[entry === null || entry === void 0 ? void 0 : entry.toUpperCase()]),
907
- direction: Order.OrderDirection[(_c = this.orderDirection) === null || _c === void 0 ? void 0 : _c.toUpperCase()],
908
- };
909
- return tableOrder;
910
- }
911
- prepareI18nMode() {
912
- return Order.I18nMode.META;
913
- }
914
- prepareI18n() {
915
- const i18nMetaLabelsLocal = ["in", "category", "operation", "there_of", "part_of", "SUM_TOTAL"];
916
- const i18nMetaLabelsGlobal = contextProtocol.globalLabelKeys;
917
- // system
918
- const i18nMapLocal = new Map(i18nMetaLabelsLocal.map((key) => [key, this.t(".".concat(key))]));
919
- const i18nMapGlobal = new Map(i18nMetaLabelsGlobal.map((key) => [key, this.t("global.".concat(key))]));
920
- return new Map([...i18nMapGlobal.entries(), ...i18nMapLocal.entries()]);
921
- }
922
- prepareDataFormatDigits() {
923
- const formatDigits = {
924
- percent: this.dataFormatDigitsPercent,
925
- decimal: this.dataFormatDigitsDecimal,
926
- };
927
- return formatDigits;
928
- }
929
- prepareScenarios() {
930
- var _a, _b, _c, _d, _e, _f, _g, _h;
931
- const isAuto = ((_a = this.scenarios) === null || _a === void 0 ? void 0 : _a.trim().toLowerCase()) === "auto";
932
- if ((withStyled.isBlankInput(this.scenarios) || isAuto) && withStyled.isBlankInput(this.variances)) {
933
- if (((_c = (_b = this.datasetMeta) === null || _b === void 0 ? void 0 : _b.availableScenarios) === null || _c === void 0 ? void 0 : _c.length) > 0) {
934
- if (!isAuto) {
935
- this.errors.addOrReplace({
936
- id: "AUTO_scenarios",
937
- type: "warning",
938
- message: `scenarios: not set, auto-detected: ${this.datasetMeta.availableScenarios.join(",")}`,
939
- });
940
- }
941
- else {
942
- this.errors.remove("AUTO_scenarios");
943
- }
944
- return this.datasetMeta.availableScenarios;
945
- }
946
- return [];
947
- }
948
- let scenarios = [];
949
- if (isAuto || withStyled.isBlankInput(this.scenarios)) {
950
- if (((_e = (_d = this.datasetMeta) === null || _d === void 0 ? void 0 : _d.availableScenarios) === null || _e === void 0 ? void 0 : _e.length) > 0) {
951
- if (!isAuto) {
952
- this.errors.addOrReplace({
953
- id: "AUTO_scenarios",
954
- type: "warning",
955
- message: `scenarios: not set, auto-detected: ${this.datasetMeta.availableScenarios.join(",")}`,
956
- });
957
- }
958
- else {
959
- this.errors.remove("AUTO_scenarios");
960
- }
961
- scenarios = scenarios.concat(this.datasetMeta.availableScenarios);
962
- }
963
- }
964
- else {
965
- this.errors.remove("AUTO_scenarios");
966
- scenarios = scenarios.concat((_f = this.scenarios) === null || _f === void 0 ? void 0 : _f.split(","));
967
- }
968
- if (((_g = this.variances) === null || _g === void 0 ? void 0 : _g.trim().length) > 0) {
969
- scenarios = scenarios.concat((_h = this.variances) === null || _h === void 0 ? void 0 : _h.split(","));
970
- }
971
- return scenarios.map((entry) => entry.trim());
972
- }
973
- prepareCategoryWidth() {
974
- var _a;
975
- if (withStyled.isBlankInput(this.categoryWidth)) {
976
- return Order.TableCategoryWidth.INF;
977
- }
978
- return Order.TableCategoryWidth[(_a = this.categoryWidth) === null || _a === void 0 ? void 0 : _a.toUpperCase()];
979
- }
980
- prepareMeasureScale() {
981
- if (withStyled.isBlankInput(this.measureScale)) {
982
- return "GREATEST";
983
- }
984
- if (["_", "k", "M", "G", "T", "P", "E", "Z", "Y", "m", "μ", "n", "p", "P", "f", "a", "z", "y"].includes(this.measureScale.trim())) {
985
- return this.measureScale.trim();
986
- }
987
- if (this.measureScale.trim().toUpperCase() === "LEAST") {
988
- return this.measureScale.trim();
989
- }
990
- return "GREATEST";
991
- }
992
- prepareMeasureType() {
993
- var _a;
994
- if (withStyled.isBlankInput(this.measureType)) {
995
- return Order.MeasureType.VOLUME;
996
- }
997
- return Order.MeasureType[(_a = this.measureType) === null || _a === void 0 ? void 0 : _a.toUpperCase()];
998
- }
999
- prepareColumnThereOf() {
1000
- if (this.columnthereof == null || this.columnthereof.trim() === "") {
1001
- return new Map();
1002
- }
1003
- const parsedString = JSON.parse(this.columnthereof);
1004
- const map = new Map();
1005
- for (const [_key, value] of Object.entries(parsedString)) {
1006
- if (map.has(value["scenario"]) === false) {
1007
- map.set(value["scenario"], []);
1008
- }
1009
- map.get(value["scenario"]).push(value);
1010
- }
1011
- return map;
1012
- }
1013
- prepareTableTitle() {
1014
- if (this.tableTitle === "" || this.tableTitle == null) {
1015
- return "SUM_TOTAL";
1016
- }
1017
- return this.tableTitle;
1018
- }
1019
- prepareShowMeasureScale() {
1020
- return this.showMeasureScale === "true";
1021
- }
1022
- prepareMeasureUnit() {
1023
- if (this.measureUnit === "" || this.measureUnit == null) {
1024
- return "";
1025
- }
1026
- return this.measureUnit;
1027
- }
1028
- prepareFilter() {
1029
- if (this.filter.length === 0) {
1030
- return "";
1031
- }
1032
- return this.filter;
1033
- }
1034
- prepareBarColumnWidth() {
1035
- var _a;
1036
- const key = (_a = this.barColumnWidth) === null || _a === void 0 ? void 0 : _a.toUpperCase();
1037
- const preset = Order.TableBarColumnWidth[key];
1038
- if (preset) {
1039
- return Order.BAR_COLUMN_WIDTH_EM[preset];
1040
- }
1041
- return Order.BAR_COLUMN_WIDTH_EM[Order.TableBarColumnWidth.W30];
1042
- }
1043
- prepareBarColumns() {
1044
- if (withStyled.isBlankInput(this.barColumns)) {
1045
- return [];
1046
- }
1047
- return this.barColumns.split(",").map((col) => col.trim());
1048
- }
1049
- prepareUnitScaling() {
1050
- if (this.pixelPerUnitGroupMap.has(this.unitScaling)) {
1051
- return this.pixelPerUnitGroupMap.get(this.unitScaling);
1052
- }
1053
- return Number(this.unitScaling);
1054
- }
1055
- preparePercentageScaling() {
1056
- if (this.pixelPerUnitGroupMap.has(this.percentageScaling)) {
1057
- return this.pixelPerUnitGroupMap.get(this.percentageScaling);
1058
- }
1059
- return Number(this.percentageScaling);
1060
- }
1061
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
1062
- getDataStructure() {
1063
- const dataSetStructure = {
1064
- ITableDataRow: {
1065
- setName: { type: "string", isOptional: false, description: "" },
1066
- date: { type: "string", isOptional: false, description: "" },
1067
- operation: { type: "string", isOptional: false, description: "" },
1068
- rowGroup: { type: "string", isOptional: false, description: "" },
1069
- rowGroupIndex: { type: "number", isOptional: false, description: "" },
1070
- category: { type: "string", isOptional: false, description: "" },
1071
- categoryIndex: { type: "number", isOptional: false, description: "" },
1072
- subCategory: { type: "string", isOptional: false, description: "" },
1073
- subCategoryIndex: { type: "number", isOptional: false, description: "" },
1074
- columnGroup: { type: "string", isOptional: false, description: "" },
1075
- columnGroupIndex: { type: "number", isOptional: false, description: "" },
1076
- columnSubGroup: { type: "string", isOptional: false, description: "" },
1077
- columnSubGroupIndex: { type: "number", isOptional: false, description: "" },
1078
- ac1: { type: "number", isOptional: false, description: "" },
1079
- ac2: { type: "number", isOptional: false, description: "" },
1080
- ac3: { type: "number", isOptional: false, description: "" },
1081
- ac4: { type: "number", isOptional: false, description: "" },
1082
- pp1: { type: "number", isOptional: false, description: "" },
1083
- pp2: { type: "number", isOptional: false, description: "" },
1084
- pp3: { type: "number", isOptional: false, description: "" },
1085
- pp4: { type: "number", isOptional: false, description: "" },
1086
- fc1: { type: "number", isOptional: false, description: "" },
1087
- fc2: { type: "number", isOptional: false, description: "" },
1088
- fc3: { type: "number", isOptional: false, description: "" },
1089
- fc4: { type: "number", isOptional: false, description: "" },
1090
- pl1: { type: "number", isOptional: false, description: "" },
1091
- pl2: { type: "number", isOptional: false, description: "" },
1092
- pl3: { type: "number", isOptional: false, description: "" },
1093
- pl4: { type: "number", isOptional: false, description: "" },
1094
- },
1095
- };
1096
- return dataSetStructure;
1097
- }
1098
- getEffectiveScaleFactor() {
1099
- const { mode, factor } = scaling.parseScaling(this.scale);
1100
- if (mode === "factor")
1101
- return factor;
1102
- if (mode === "auto" || mode === "empty")
1103
- return this.appliedScaleFactor;
1104
- return 1;
1105
- }
1106
- getFontStyles() {
1107
- const effectiveFactor = this.getEffectiveScaleFactor();
1108
- return this.componentStyle(($) => {
1109
- var _a, _b, _c, _d;
1110
- const baseFontSize = ((_a = $["global"]) === null || _a === void 0 ? void 0 : _a["fontSizePx"]) || 13.3333;
1111
- return {
1112
- "--bn-font-family": ((_b = $["global"]) === null || _b === void 0 ? void 0 : _b["fontFamily"]) || "'Noto Sans', sans-serif",
1113
- "--bn-font-size": `${baseFontSize * effectiveFactor}px`,
1114
- "--bn-font-color": ((_c = $["global"]) === null || _c === void 0 ? void 0 : _c["fontColor"]) || "#000000",
1115
- "--bn-font-background": ((_d = $["global"]) === null || _d === void 0 ? void 0 : _d["fontBackgroundColor"]) || "#ffffff",
1116
- };
1117
- });
1118
- }
1119
- render() {
1120
- const fontStyles = this.getFontStyles();
1121
- const effectiveFactor = this.getEffectiveScaleFactor();
1122
- return (index.h(index.Host, { key: 'b379c18d4d92805e91404917ffb096e582b9bec2', style: fontStyles }, index.h("div", { key: 'a45679a84d85b856f0e01615952c0ccfe05108f9' }, index.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 }))));
1123
- }
1124
- get element() { return index.getElement(this); }
1125
- static get watchers() { return {
1126
- "scale": [{
1127
- "validateScaling": 0
1128
- }],
1129
- "scenarios": [{
1130
- "validateScenario": 0
1131
- }],
1132
- "variances": [{
1133
- "validateVariances": 0
1134
- }],
1135
- "barColumns": [{
1136
- "validateBarColumns": 0
1137
- }],
1138
- "barColumnWidth": [{
1139
- "validateBarColumnWidth": 0
1140
- }],
1141
- "unitScaling": [{
1142
- "validateUnitScaling": 0
1143
- }],
1144
- "percentageScaling": [{
1145
- "validatePercentageScaling": 0
1146
- }],
1147
- "dataFormat": [{
1148
- "validateDataFormat": 0
1149
- }],
1150
- "grouped": [{
1151
- "validateGrouped": 0
1152
- }],
1153
- "showMeasureScale": [{
1154
- "validateShowMeasureScale": 0
1155
- }],
1156
- "showGroupTitle": [{
1157
- "validateShowGroupTitle": 0
1158
- }],
1159
- "type": [{
1160
- "validateType": 0
1161
- }],
1162
- "limit": [{
1163
- "validateLimit": 0
1164
- }],
1165
- "thereof": [{
1166
- "validateThereOf": 0
1167
- }],
1168
- "partof": [{
1169
- "validatePartOf": 0
1170
- }],
1171
- "order": [{
1172
- "validateOrderList": 0
1173
- }],
1174
- "orderDirection": [{
1175
- "validateOrderDirection": 0
1176
- }],
1177
- "measureType": [{
1178
- "validateMeasureType": 0
1179
- }],
1180
- "measureScale": [{
1181
- "validateMeasureScale": 0
1182
- }],
1183
- "dataFormatDigitsDecimal": [{
1184
- "validateDataFormatDigitsDecimal": 0
1185
- }],
1186
- "dataFormatDigitsPercent": [{
1187
- "validateDateFormatDigitsPercent": 0
1188
- }],
1189
- "categoryWidth": [{
1190
- "validateCategoryWidth": 0
1191
- }],
1192
- "columnthereof": [{
1193
- "validateColumnThereOf": 0
1194
- }]
1195
- }; }
1196
- };
1197
- Table$1.style = bnTableCss();
12
+ require('./context-protocol-DRQWrwsA.js');
13
+ require('./utils-CwHIVbbL.js');
1198
14
 
1199
15
  // import {Formatter} from "../../../../utils/formatter";
1200
16
  // import {DataFormatDigits} from "../../../../utils/model/DataFormatDigits";
@@ -1288,22 +104,22 @@ class TableRow {
1288
104
  }
1289
105
  initCssStyle() {
1290
106
  switch (this.type) {
1291
- case TableRowType.HEADER: {
107
+ case index.TableRowType.HEADER: {
1292
108
  return "groupheader";
1293
109
  }
1294
- case TableRowType.SEPERATORLINE: {
110
+ case index.TableRowType.SEPERATORLINE: {
1295
111
  return "";
1296
112
  }
1297
- case TableRowType.DRILLELEMENT: {
113
+ case index.TableRowType.DRILLELEMENT: {
1298
114
  return "ofit";
1299
115
  }
1300
- case TableRowType.PARTELEMENT: {
116
+ case index.TableRowType.PARTELEMENT: {
1301
117
  return "partof";
1302
118
  }
1303
- case TableRowType.STANDARD: {
119
+ case index.TableRowType.STANDARD: {
1304
120
  return "";
1305
121
  }
1306
- case TableRowType.SUM: {
122
+ case index.TableRowType.SUM: {
1307
123
  return "sum";
1308
124
  }
1309
125
  default: {
@@ -1319,13 +135,13 @@ class TableRow {
1319
135
  if (scenario === "category" && categoryWidth != null) {
1320
136
  cssStyle = `category-${categoryWidth.toString()}`;
1321
137
  }
1322
- if (this.type === TableRowType.HEADER) {
138
+ if (this.type === index.TableRowType.HEADER) {
1323
139
  cssStyle = "headerlabel";
1324
140
  }
1325
- else if (this.type === TableRowType.SEPERATORLINE) {
141
+ else if (this.type === index.TableRowType.SEPERATORLINE) {
1326
142
  cssStyle = scenario;
1327
143
  }
1328
- if (this.type === TableRowType.PARTELEMENT) {
144
+ if (this.type === index.TableRowType.PARTELEMENT) {
1329
145
  if (cellType === "percent") {
1330
146
  value = "-";
1331
147
  }
@@ -1387,7 +203,7 @@ const PatternDefs = ({ styles }) => {
1387
203
  { id: getPatternId("neg", styles.negative.stroke), stroke: styles.negative.stroke, fill: styles.negative.fill },
1388
204
  { id: getPatternId("neu", styles.neutral.stroke), stroke: styles.neutral.stroke, fill: styles.neutral.fill },
1389
205
  ];
1390
- return (index.h("defs", null, patterns.map((p) => (index.h("pattern", { id: p.id, patternUnits: "userSpaceOnUse", width: patternSize, height: patternSize }, index.h("rect", { width: patternSize, height: patternSize, fill: "#ffffff" }), index.h("line", { x1: "0", y1: patternSize, x2: patternSize, y2: "0", stroke: p.stroke, "stroke-width": 1.5 * s }))))));
206
+ return (index$1.h("defs", null, patterns.map((p) => (index$1.h("pattern", { id: p.id, patternUnits: "userSpaceOnUse", width: patternSize, height: patternSize }, index$1.h("rect", { width: patternSize, height: patternSize, fill: "#ffffff" }), index$1.h("line", { x1: "0", y1: patternSize, x2: patternSize, y2: "0", stroke: p.stroke, "stroke-width": 1.5 * s }))))));
1391
207
  };
1392
208
  /**
1393
209
  * Formats a number for display with appropriate SI prefix.
@@ -1503,35 +319,59 @@ function getBarStroke(varianceStyle) {
1503
319
  return { stroke: "none", strokeWidth: 0 };
1504
320
  }
1505
321
  /**
1506
- * Computes an effective max for proportional scaling that keeps most bars readable.
1507
- * If a few outliers (extreme values) dominate, the effective max is capped so the
1508
- * majority of bars remain at a useful size. Values exceeding the effective max are
1509
- * flagged as "extreme" and rendered with an arrow indicator.
1510
- *
1511
- * Algorithm: effectiveMax = median * EXTREME_THRESHOLD (default 3×).
1512
- * If this would be less than absMax, some values are extreme.
1513
- * If the median is 0 (e.g. single value), falls back to absMax.
322
+ * Renders a zigzag break indicator at a given x position, matching the structure chart style.
323
+ * Two mirrored zigzag lines with a white background covering the break gap.
1514
324
  */
1515
- const EXTREME_THRESHOLD = 3;
1516
- function computeEffectiveMax(columnStats) {
1517
- if (columnStats.median <= 0) {
1518
- return columnStats.absMax;
1519
- }
1520
- const cap = columnStats.median * EXTREME_THRESHOLD;
1521
- return Math.min(cap, columnStats.absMax);
325
+ function renderZigzagBreak(breakX, breakGap, yTop, barHeight, s) {
326
+ const midX = breakX + breakGap / 2;
327
+ const halfGap = breakGap * 0.35;
328
+ const zigCount = 3;
329
+ const segHeight = barHeight / zigCount;
330
+ const amplitude = breakGap * 0.3;
331
+ let leftPath = `M ${midX - halfGap} ${yTop}`;
332
+ for (let i = 0; i < zigCount; i++) {
333
+ const y1 = yTop + segHeight * (i + 0.5);
334
+ const y2 = yTop + segHeight * (i + 1);
335
+ leftPath += ` L ${midX - halfGap - amplitude} ${y1} L ${midX - halfGap} ${y2}`;
336
+ }
337
+ let rightPath = `M ${midX + halfGap} ${yTop}`;
338
+ for (let i = 0; i < zigCount; i++) {
339
+ const y1 = yTop + segHeight * (i + 0.5);
340
+ const y2 = yTop + segHeight * (i + 1);
341
+ rightPath += ` L ${midX + halfGap + amplitude} ${y1} L ${midX + halfGap} ${y2}`;
342
+ }
343
+ return [
344
+ index$1.h("rect", { x: breakX, y: yTop - 1, width: breakGap, height: barHeight + 2, fill: "#ffffff" }),
345
+ index$1.h("path", { d: leftPath, fill: "none", stroke: "#000000", "stroke-width": 1 * s }),
346
+ index$1.h("path", { d: rightPath, fill: "none", stroke: "#000000", "stroke-width": 1 * s }),
347
+ ];
1522
348
  }
1523
349
  /**
1524
350
  * Renders an absolute variance bar chart (d_ prefix).
1525
351
  * Horizontal bar with centered axis, green for positive, red for negative.
1526
- * Value label shown next to the bar (black text per IBCS).
352
+ * When a bar exceeds maxBarWidth it is drawn as an overdrive bar:
353
+ * base segment + zigzag break + proportional overdrive stub (like structure chart).
1527
354
  *
1528
355
  * Layout: [left label area][bar area with axis][right label area]
1529
356
  */
1530
357
  const AbsoluteVarianceBar = (props) => {
1531
- const { value, scenario, columnStats, height, isPositiveGood, formattedValue, measureScale, maxBarWidth: maxBarWidthEm = 3, styles = DEFAULT_STYLES, } = props;
358
+ const { value, scenario, columnStats, height, isPositiveGood, formattedValue, measureScale, maxBarWidth: maxBarWidthEm = 10, styles = DEFAULT_STYLES, } = props;
1532
359
  const s = styles.scaleFactor;
360
+ const fs = styles.fontSize;
1533
361
  const labelAreaWidth = 38 * s;
1534
- const maxBarWidth = maxBarWidthEm * styles.fontSize * s;
362
+ const maxBarWidth = maxBarWidthEm * fs;
363
+ // Overdrive layout constants
364
+ const breakGap = 4 * s;
365
+ const overdriveZoneWidth = maxBarWidth * 0.15;
366
+ const cutWidth = maxBarWidth - breakGap - overdriveZoneWidth;
367
+ // Direct unit scaling via fontSize
368
+ const scaledWidth = Math.abs(value) * styles.unitScaling * fs;
369
+ const isExtreme = scaledWidth > cutWidth;
370
+ // Compute proportional overdrive width across the column
371
+ const maxScaledWidth = columnStats.absMax * styles.unitScaling * fs;
372
+ const maxOverflow = Math.max(0, maxScaledWidth - cutWidth);
373
+ const overflowAmount = Math.max(0, scaledWidth - cutWidth);
374
+ const overdriveWidth = maxOverflow > 0 ? (overflowAmount / maxOverflow) * overdriveZoneWidth : 0;
1535
375
  // Adaptive axis placement based on data range
1536
376
  const hasNeg = columnStats.min < 0;
1537
377
  const hasPos = columnStats.max > 0;
@@ -1542,18 +382,10 @@ const AbsoluteVarianceBar = (props) => {
1542
382
  const padding = 2 * s;
1543
383
  const barHeight = height - padding * 2;
1544
384
  const axisX = (hasNeg ? labelAreaWidth : 0) + negBarWidth;
1545
- // Proportional scaling with outlier detection
1546
- const effectiveMax = computeEffectiveMax(columnStats);
1547
- const absValue = Math.abs(value);
1548
- const proportion = effectiveMax > 0 ? absValue / effectiveMax : 0;
1549
- const isExtreme = absValue > effectiveMax;
1550
- const barWidth = Math.min(proportion, 1) * maxBarWidth;
1551
- const isPositive = value >= 0;
1552
- const barX = isPositive ? axisX : axisX - barWidth;
1553
385
  const barY = padding;
386
+ const isPositive = value >= 0;
1554
387
  // Get style based on column type (scenario vs variance)
1555
388
  const barStyle = getBarStyle(scenario, value, isPositiveGood, styles);
1556
- // Pattern prefix for scenarios uses scenario type, for variances uses pos/neg
1557
389
  const patternPrefix = isScenarioColumn(scenario)
1558
390
  ? getScenarioType(scenario)
1559
391
  : isPositiveGood
@@ -1566,13 +398,14 @@ const AbsoluteVarianceBar = (props) => {
1566
398
  const fillValue = getBarFill(barStyle, patternPrefix);
1567
399
  const { stroke: barStroke, strokeWidth: barStrokeWidth } = getBarStroke(barStyle);
1568
400
  const displayValue = formattedValue || formatValue(value, false, measureScale);
1569
- // Label position: in the label area on the appropriate side
1570
- // Positive values: label in right area, left-aligned
1571
- // Negative values: label in left area, right-aligned
1572
- const labelX = isPositive ? axisX + barWidth + 4 * s : axisX - barWidth - 4 * s;
401
+ // Normal bar width (clamped to cutWidth when extreme)
402
+ const baseBarWidth = isExtreme ? cutWidth : scaledWidth;
403
+ // Label position accounts for overdrive
404
+ const totalVisualWidth = isExtreme ? cutWidth + breakGap + overdriveWidth : scaledWidth;
405
+ const labelX = isPositive ? axisX + totalVisualWidth + 4 * s : axisX - totalVisualWidth - 4 * s;
1573
406
  const labelAnchor = isPositive ? "start" : "end";
1574
- const centerY = height / 2;
1575
- return (index.h("svg", { width: totalWidth, height: height, class: "cell-bar-chart absolute-variance", style: { overflow: "visible" } }, index.h(PatternDefs, { styles: styles }), index.h("line", { x1: axisX, y1: 0, x2: axisX, y2: height, stroke: AXIS_COLOR, "stroke-width": 1 * s }), barWidth > 0 && (index.h("rect", { x: barX, y: barY, width: barWidth, height: barHeight, fill: fillValue, stroke: barStroke, "stroke-width": barStrokeWidth * s })), isExtreme && isPositive && (index.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 && (index.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 })), index.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)));
407
+ return (index$1.h("svg", { width: totalWidth, height: height, class: "cell-bar-chart absolute-variance", style: { overflow: "visible" } }, index$1.h(PatternDefs, { styles: styles }), index$1.h("line", { x1: axisX, y1: 0, x2: axisX, y2: height, stroke: AXIS_COLOR, "stroke-width": 1 * s }), baseBarWidth > 0 && (index$1.h("rect", { x: isPositive ? axisX : axisX - baseBarWidth, y: barY, width: baseBarWidth, height: barHeight, fill: fillValue, stroke: barStroke, "stroke-width": barStrokeWidth * s })), isExtreme && overdriveWidth > 0 && (index$1.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 &&
408
+ renderZigzagBreak(isPositive ? axisX + cutWidth : axisX - cutWidth - breakGap, breakGap, barY, barHeight, s), index$1.h("text", { x: labelX, y: height / 2, dy: "0.35em", "text-anchor": labelAnchor, fill: styles.fontColor, "font-size": fs, "font-family": styles.fontFamily }, displayValue)));
1576
409
  };
1577
410
  /**
1578
411
  * Renders a relative variance pin chart (dr_ prefix).
@@ -1582,10 +415,11 @@ const AbsoluteVarianceBar = (props) => {
1582
415
  * Uses percentageScaling to determine pin length (pixels per percentage point).
1583
416
  */
1584
417
  const RelativeVariancePin = (props) => {
1585
- const { value, scenario, columnStats, height, isPositiveGood, formattedValue, measureScale, maxBarWidth: maxBarWidthEm = 3, styles = DEFAULT_STYLES, } = props;
418
+ const { value, scenario, columnStats, height, isPositiveGood, formattedValue, measureScale, maxBarWidth: maxBarWidthEm = 10, styles = DEFAULT_STYLES, } = props;
1586
419
  const s = styles.scaleFactor;
420
+ const fs = styles.fontSize;
1587
421
  // Pin length is ~2/3 of bar width for visual balance
1588
- const maxPinLength = Math.round(maxBarWidthEm * 0.67 * styles.fontSize) * s;
422
+ const maxPinLength = Math.round(maxBarWidthEm * 0.67 * fs);
1589
423
  const pinPadding = 5 * s;
1590
424
  // Adaptive axis placement based on data range
1591
425
  const hasNeg = columnStats.min < 0;
@@ -1597,12 +431,11 @@ const RelativeVariancePin = (props) => {
1597
431
  const totalWidth = pinAreaWidth + labelAreaWidth;
1598
432
  const axisX = negPinWidth;
1599
433
  const centerY = height / 2;
1600
- // Proportional scaling with outlier detection
1601
- const effectiveMax = computeEffectiveMax(columnStats);
1602
- const absValue = Math.abs(value);
1603
- const proportion = effectiveMax > 0 ? absValue / effectiveMax : 0;
1604
- const isExtreme = absValue > effectiveMax;
1605
- const pinLength = Math.min(proportion, 1) * maxPinLength;
434
+ // Direct unit scaling via fontSize
435
+ const percentValue = Math.abs(value) * 100;
436
+ const scaledLength = percentValue * styles.percentageScaling * fs;
437
+ const isExtreme = scaledLength > maxPinLength;
438
+ const pinLength = Math.min(scaledLength, maxPinLength);
1606
439
  const isPositive = value >= 0;
1607
440
  const pinEndX = isPositive ? axisX + pinLength : axisX - pinLength;
1608
441
  // Get style based on column type (scenario vs variance)
@@ -1611,7 +444,7 @@ const RelativeVariancePin = (props) => {
1611
444
  const displayValue = formattedValue || formatValue(value, true, measureScale);
1612
445
  // Label always on the right side after the pin area
1613
446
  const labelX = pinAreaWidth + 4 * s;
1614
- return (index.h("svg", { width: totalWidth, height: height, class: "cell-bar-chart relative-variance", style: { overflow: "visible" } }, index.h("line", { x1: axisX, y1: 0, x2: axisX, y2: height, stroke: AXIS_COLOR, "stroke-width": 1 * s }), !isExtreme && index.h("circle", { cx: pinEndX, cy: centerY, r: dotRadius, fill: styles.fontColor }), index.h("line", { x1: axisX, y1: centerY, x2: pinEndX, y2: centerY, stroke: barStyle.fill, "stroke-width": 2 * s }), isExtreme && isPositive && (index.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 && (index.h("polygon", { points: `${axisX - maxPinLength},${centerY} ${axisX - maxPinLength + 6 * s},${centerY - 3 * s} ${axisX - maxPinLength + 6 * s},${centerY + 3 * s}`, fill: barStyle.fill })), index.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)));
447
+ return (index$1.h("svg", { width: totalWidth, height: height, class: "cell-bar-chart relative-variance", style: { overflow: "visible" } }, index$1.h("line", { x1: axisX, y1: 0, x2: axisX, y2: height, stroke: AXIS_COLOR, "stroke-width": 1 * s }), !isExtreme && index$1.h("circle", { cx: pinEndX, cy: centerY, r: dotRadius, fill: styles.fontColor }), index$1.h("line", { x1: axisX, y1: centerY, x2: pinEndX, y2: centerY, stroke: barStyle.fill, "stroke-width": 2 * s }), isExtreme && isPositive && (index$1.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 && (index$1.h("polygon", { points: `${axisX - maxPinLength},${centerY} ${axisX - maxPinLength + 6 * s},${centerY - 3 * s} ${axisX - maxPinLength + 6 * s},${centerY + 3 * s}`, fill: barStyle.fill })), index$1.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)));
1615
448
  };
1616
449
  /**
1617
450
  * CellBarChart - Renders IBCS-compliant variance bar charts.
@@ -1625,12 +458,12 @@ const CellBarChart = (props) => {
1625
458
  const { value, columnStats, isRelative, styles = DEFAULT_STYLES } = props;
1626
459
  // Handle invalid values
1627
460
  if (value === null || value === undefined || isNaN(value) || !columnStats || columnStats.absMax === 0) {
1628
- return (index.h("span", { class: "bar-chart-empty", style: { color: styles.fontColor, fontStyle: "italic" } }, "-"));
461
+ return (index$1.h("span", { class: "bar-chart-empty", style: { color: styles.fontColor, fontStyle: "italic" } }, "-"));
1629
462
  }
1630
463
  if (isRelative) {
1631
- return index.h(RelativeVariancePin, Object.assign({}, props));
464
+ return index$1.h(RelativeVariancePin, Object.assign({}, props));
1632
465
  }
1633
- return index.h(AbsoluteVarianceBar, Object.assign({}, props));
466
+ return index$1.h(AbsoluteVarianceBar, Object.assign({}, props));
1634
467
  };
1635
468
 
1636
469
  /**
@@ -1650,7 +483,7 @@ class QueryGroups {
1650
483
  return a === "-" ? -1 : 1;
1651
484
  };
1652
485
  this.groups = [formatter.QueryColumnNames.CATEGORY, formatter.QueryColumnNames.CATEGORYINDEX];
1653
- if (TableType.OPT === config.type || TableType.OPTNOTOTAL === config.type) {
486
+ if (index.TableType.OPT === config.type || index.TableType.OPTNOTOTAL === config.type) {
1654
487
  this.groups.unshift(formatter.QueryColumnNames.OPERATION);
1655
488
  }
1656
489
  if (config.grouped) {
@@ -1797,7 +630,7 @@ class DataQuery {
1797
630
  createPartOfDrillRows(scenarios, order, sumGroupQueries, data, res) {
1798
631
  if (this.config.partOf == null ||
1799
632
  this.config.partOf.length === 0 ||
1800
- this.config.type === TableType.LIST ||
633
+ this.config.type === index.TableType.LIST ||
1801
634
  data == null ||
1802
635
  data.length === 0) {
1803
636
  return;
@@ -1875,10 +708,10 @@ class DataQuery {
1875
708
  createGroupSumRow(querys, groupSumQuery, rowGroupEntry, scenariosSUMQuery, order) {
1876
709
  // Generates SUM Row; sumsup all rows of group
1877
710
  if (true === this.config.grouped &&
1878
- (TableType.SUM === this.config.type ||
1879
- TableType.SUMNOTOTAL === this.config.type ||
1880
- TableType.OPT === this.config.type ||
1881
- TableType.OPTNOTOTAL === this.config.type)) {
711
+ (index.TableType.SUM === this.config.type ||
712
+ index.TableType.SUMNOTOTAL === this.config.type ||
713
+ index.TableType.OPT === this.config.type ||
714
+ index.TableType.OPTNOTOTAL === this.config.type)) {
1882
715
  querys.push(`SELECT ${querys.length} as ${formatter.QueryColumnNames.ROWGROUPINDEX},
1883
716
  '=' as ${formatter.QueryColumnNames.OPERATION},
1884
717
  '${rowGroupEntry.rowGroup}' as ${formatter.QueryColumnNames.ROWGROUP},
@@ -1899,7 +732,7 @@ class DataQuery {
1899
732
  }
1900
733
  /** Generates a total SUM row across all groups (only for SUM / OPT table types). */
1901
734
  createTotalSumRow(querys, sumGroupQueries, scenariosSUMQuery) {
1902
- if (TableType.SUM === this.config.type || TableType.OPT === this.config.type) {
735
+ if (index.TableType.SUM === this.config.type || index.TableType.OPT === this.config.type) {
1903
736
  const title = `${this.hasPartOf && this.config.grouped === false ? `${this.i18n.get("SUM_TOTAL") || "SUM_TOTAL"} ` : ""}${this.config.title}`;
1904
737
  querys.push(`SELECT ${querys.length} as ${formatter.QueryColumnNames.ROWGROUPINDEX},
1905
738
  '${title}' as ${formatter.QueryColumnNames.ROWGROUP},
@@ -2135,7 +968,7 @@ class DataQuery {
2135
968
  */
2136
969
  translateScenarioSQL(scenario, isSumRow, type) {
2137
970
  const scenarios = new formatter.VarianceScenario(scenario);
2138
- if (TableType.OPT === type || TableType.OPTNOTOTAL === type) {
971
+ if (index.TableType.OPT === type || index.TableType.OPTNOTOTAL === type) {
2139
972
  if (scenarios.isValid) {
2140
973
  if (scenarios.type === "dr") {
2141
974
  return `SUM(${scenarios.base} - ${scenarios.delta}) as ${scenario}, SUM(${scenarios.delta}) as dr_${scenarios.delta}`;
@@ -2167,7 +1000,7 @@ class DataQuery {
2167
1000
  */
2168
1001
  createOrderString(orderComponent) {
2169
1002
  const base = `${orderComponent.hierarchy.toString()} ${orderComponent.direction}`;
2170
- const inverted = `${orderComponent.hierarchy.toString()} ${OrderDirection.ASC === orderComponent.direction ? OrderDirection.DESC : OrderDirection.ASC}`;
1003
+ const inverted = `${orderComponent.hierarchy.toString()} ${index.OrderDirection.ASC === orderComponent.direction ? index.OrderDirection.DESC : index.OrderDirection.ASC}`;
2171
1004
  return [base, inverted];
2172
1005
  }
2173
1006
  /** Returns a key/value pair mapping a relative variance column to its denominator, or null for non-relative scenarios. */
@@ -2442,8 +1275,8 @@ class TableDataSetFactory {
2442
1275
  createHeader(type, scenarios, i18n, measureScale, measureUnit, showMeasureScale) {
2443
1276
  const header = [];
2444
1277
  this.normalizedHeader = this.normalizeHeader(type, scenarios);
2445
- const headerRow = new TableRow(0, 0, TableRowType.HEADER);
2446
- const separatorRow = new TableRow(1, 0, TableRowType.SEPERATORLINE);
1278
+ const headerRow = new TableRow(0, 0, index.TableRowType.HEADER);
1279
+ const separatorRow = new TableRow(1, 0, index.TableRowType.SEPERATORLINE);
2447
1280
  for (const scenario of this.normalizedHeader) {
2448
1281
  headerRow.createElement(formatter.Formatter.translateScenarioLabel(scenario.name, i18n), scenario.type, this.createColumnType(scenario), null, this.setHeaderPrefix(scenario, i18n, measureScale, measureUnit, showMeasureScale), null, null, null, null);
2449
1282
  separatorRow.createElement(null, scenario.type, this.createColumnType(scenario), null, null, null, null, null, null);
@@ -2479,7 +1312,7 @@ class TableDataSetFactory {
2479
1312
  order: undefined,
2480
1313
  },
2481
1314
  ];
2482
- if (TableType.OPT === type || TableType.OPTNOTOTAL === type) {
1315
+ if (index.TableType.OPT === type || index.TableType.OPTNOTOTAL === type) {
2483
1316
  header = [
2484
1317
  {
2485
1318
  name: formatter.QueryColumnNames.OPERATION,
@@ -2641,18 +1474,18 @@ class TableDataSetFactory {
2641
1474
  */
2642
1475
  createDetailRow(type, rowIndex, groupIndex, maxIndex) {
2643
1476
  switch (type) {
2644
- case TableRowType.GROUPHEAD:
2645
- return new TableRow(rowIndex, groupIndex, TableRowType.HEADER);
2646
- case TableRowType.SUM:
2647
- return new TableRow(maxIndex + 2, groupIndex, TableRowType.SUM);
2648
- case TableRowType.GROUPSUM:
2649
- return new TableRow(maxIndex + 2, groupIndex, TableRowType.SUM);
2650
- case TableRowType.DRILLELEMENT:
2651
- return new TableRow(maxIndex + 2, groupIndex, TableRowType.DRILLELEMENT);
2652
- case TableRowType.PARTELEMENT:
2653
- return new TableRow(maxIndex + 2, groupIndex, TableRowType.PARTELEMENT);
1477
+ case index.TableRowType.GROUPHEAD:
1478
+ return new TableRow(rowIndex, groupIndex, index.TableRowType.HEADER);
1479
+ case index.TableRowType.SUM:
1480
+ return new TableRow(maxIndex + 2, groupIndex, index.TableRowType.SUM);
1481
+ case index.TableRowType.GROUPSUM:
1482
+ return new TableRow(maxIndex + 2, groupIndex, index.TableRowType.SUM);
1483
+ case index.TableRowType.DRILLELEMENT:
1484
+ return new TableRow(maxIndex + 2, groupIndex, index.TableRowType.DRILLELEMENT);
1485
+ case index.TableRowType.PARTELEMENT:
1486
+ return new TableRow(maxIndex + 2, groupIndex, index.TableRowType.PARTELEMENT);
2654
1487
  default:
2655
- return new TableRow(rowIndex, groupIndex, TableRowType.STANDARD);
1488
+ return new TableRow(rowIndex, groupIndex, index.TableRowType.STANDARD);
2656
1489
  }
2657
1490
  }
2658
1491
  /**
@@ -2820,12 +1653,12 @@ class Table {
2820
1653
  this.data = [];
2821
1654
  this.headerRows = [];
2822
1655
  this.bodyRows = [];
2823
- this.ruleSet = ruleSet || new StringAdapter.IBCSRuleSet();
1656
+ this.ruleSet = ruleSet || new ibcsRuleSet.IBCSRuleSet();
2824
1657
  this.dataSetFactory = new TableDataSetFactory();
2825
1658
  this.config = this.initConfig(config);
2826
1659
  this.i18n = this.initI18n(new Map());
2827
1660
  this.setData(data, config.filter);
2828
- this.state = FactoryState.DIRTY;
1661
+ this.state = index.FactoryState.DIRTY;
2829
1662
  }
2830
1663
  /**
2831
1664
  * Init load of translation dictionary map
@@ -2877,11 +1710,11 @@ class Table {
2877
1710
  ["ibcssymbol_delta_generic_relative", "Δ({%})%"],
2878
1711
  ["SUM_TOTAL", "❖"],
2879
1712
  ]);
2880
- this.state = FactoryState.DIRTY; // mark dataSet for update
1713
+ this.state = index.FactoryState.DIRTY; // mark dataSet for update
2881
1714
  return new Map([...defaultI18n, ...(i18n || new Map())]);
2882
1715
  }
2883
1716
  initConfig(config) {
2884
- this.state = FactoryState.DIRTY; // mark dataSet for update
1717
+ this.state = index.FactoryState.DIRTY; // mark dataSet for update
2885
1718
  const tmpConfig = config;
2886
1719
  // sorting scenario order based on Ruleset
2887
1720
  const self = this;
@@ -2920,22 +1753,22 @@ class Table {
2920
1753
  const normalizedScenarios = this.normalizeScenarios(this.config.scenarios, this.config.categoryThereOf, this.config.sortOrder);
2921
1754
  this.headerRows = this.dataSetFactory.createHeader(this.config.type, normalizedScenarios, this.i18n, this.config.measureScale, this.config.measureUnit, this.config.showMeasureScale);
2922
1755
  this.bodyRows = this.dataSetFactory.createBodyRows(this.config, this.i18n, this.data);
2923
- this.state = FactoryState.UP_TO_DATE;
1756
+ this.state = index.FactoryState.UP_TO_DATE;
2924
1757
  }
2925
1758
  update() {
2926
1759
  const normalizedScenarios = this.normalizeScenarios(this.config.scenarios, this.config.categoryThereOf, this.config.sortOrder);
2927
1760
  this.headerRows = this.dataSetFactory.createHeader(this.config.type, normalizedScenarios, this.i18n, this.config.measureScale, this.config.measureUnit, this.config.showMeasureScale);
2928
1761
  this.bodyRows = this.dataSetFactory.createBodyRows(this.config, this.i18n, this.data);
2929
- this.state = FactoryState.UP_TO_DATE;
1762
+ this.state = index.FactoryState.UP_TO_DATE;
2930
1763
  }
2931
1764
  getHeader() {
2932
- if (this.state === FactoryState.DIRTY) {
1765
+ if (this.state === index.FactoryState.DIRTY) {
2933
1766
  this.update();
2934
1767
  }
2935
1768
  return this.headerRows;
2936
1769
  }
2937
1770
  getBody() {
2938
- if (this.state === FactoryState.DIRTY) {
1771
+ if (this.state === index.FactoryState.DIRTY) {
2939
1772
  this.update();
2940
1773
  }
2941
1774
  return this.bodyRows;
@@ -3007,9 +1840,9 @@ class TableComponentConfig {
3007
1840
  this.categoryThereOf = new Map();
3008
1841
  /** Percentage-of-total sub-row definitions. */
3009
1842
  this.partOf = [];
3010
- this.sortOrder = new Order.OrderAdapter(new StringAdapter.StringAdapter()).default();
1843
+ this.sortOrder = new Order.OrderAdapter(new ibcsRuleSet.StringAdapter()).default();
3011
1844
  /** Table aggregation mode: LIST (flat), SUM (with totals), OPT (with optional totals), etc. */
3012
- this.type = TableType.LIST;
1845
+ this.type = index.TableType.LIST;
3013
1846
  /** Maximum rows to display; 0 means unlimited. */
3014
1847
  this.limit = 0;
3015
1848
  this.i18n = Order.I18nMode.ALL;
@@ -3286,7 +2119,7 @@ const ibcsTableCss = () => `:host{position:relative;display:inline-block}table{b
3286
2119
 
3287
2120
  const IbcsTable = class {
3288
2121
  constructor(hostRef) {
3289
- index.registerInstance(this, hostRef);
2122
+ index$1.registerInstance(this, hostRef);
3290
2123
  this.data = [];
3291
2124
  this.tableTitle = "SUM_TOTAL";
3292
2125
  this.scenarios = [];
@@ -3298,10 +2131,10 @@ const IbcsTable = class {
3298
2131
  this.partof = [];
3299
2132
  this.order = {
3300
2133
  hierarchy: [],
3301
- direction: OrderDirection.ASC,
2134
+ direction: index.OrderDirection.ASC,
3302
2135
  };
3303
2136
  this.categorythereof = new Map();
3304
- this.type = TableType.LIST;
2137
+ this.type = index.TableType.LIST;
3305
2138
  this.categoryWidth = Order.TableCategoryWidth.INF;
3306
2139
  this.dataFormatDigits = { percent: 2, decimal: 1 };
3307
2140
  this.i18n = new Map();
@@ -3326,22 +2159,22 @@ const IbcsTable = class {
3326
2159
  }
3327
2160
  if (this.table.hasNoData()) {
3328
2161
  const errorMsg = this.i18n.get("NO_DATA") || "==No Data==";
3329
- return index.h("p", { class: "warning" }, errorMsg);
2162
+ return index$1.h("p", { class: "warning" }, errorMsg);
3330
2163
  }
3331
- return (index.h("table", null, index.h("thead", null, this.table.getHeader().map((row) => (index.h("tr", { class: row.cssStyle }, row.getCells().map((cell) => (index.h("th", { colSpan: cell.colSpan, class: cell.cssStyle }, cell.getAsHeaderList().map((line, i, arr) => (index.h("span", null, i === arr.length - 1 ? (index.h("span", { class: line === " " ? "table-footer" : "" }, line, cell.drawPrefix(), " ")) : (index.h("span", null, line, cell.drawPrefix(), index.h("br", null))))))))))))), index.h("tbody", null, this.table.getBody().map((row) => (index.h("tr", { class: row.cssStyle }, row === null || row === void 0 ? void 0 : row.getCells().map((cell) => (index.h("td", { colSpan: cell.colSpan, class: cell.type ? `${cell.cssStyle} ${cell.type}` : cell.cssStyle }, cell.prefix != null ? (index.h("span", { class: cell.cssStyle + " " + cell.prefixStyle }, cell.drawPrefix())) : (""), cell.isBarChart && cell.columnStats ? (index.h(CellBarChart, { value: cell.value, scenario: cell.key, columnStats: cell.columnStats, height: 18 * this.scaleFactor, isRelative: cell.key.startsWith("dr"), isPositiveGood: cell.key.endsWith("_pos"), measureScale: cell.measureScale, maxBarWidth: this.barColumnMaxWidth, styles: this.barChartStyles })) : (cell.draw(this.componentDataFormatDigits)))))))))));
2164
+ return (index$1.h("table", null, index$1.h("thead", null, this.table.getHeader().map((row) => (index$1.h("tr", { class: row.cssStyle }, row.getCells().map((cell) => (index$1.h("th", { colSpan: cell.colSpan, class: cell.cssStyle }, cell.getAsHeaderList().map((line, i, arr) => (index$1.h("span", null, i === arr.length - 1 ? (index$1.h("span", { class: line === " " ? "table-footer" : "" }, line, cell.drawPrefix(), " ")) : (index$1.h("span", null, line, cell.drawPrefix(), index$1.h("br", null))))))))))))), index$1.h("tbody", null, this.table.getBody().map((row) => (index$1.h("tr", { class: row.cssStyle }, row === null || row === void 0 ? void 0 : row.getCells().map((cell) => (index$1.h("td", { colSpan: cell.colSpan, class: cell.type ? `${cell.cssStyle} ${cell.type}` : cell.cssStyle }, cell.prefix != null ? (index$1.h("span", { class: cell.cssStyle + " " + cell.prefixStyle }, cell.drawPrefix())) : (""), cell.isBarChart && cell.columnStats && row.type !== index.TableRowType.SUM ? (index$1.h(CellBarChart, { value: cell.value, scenario: cell.key, columnStats: cell.columnStats, height: 18 * this.scaleFactor, isRelative: cell.key.startsWith("dr"), isPositiveGood: cell.key.endsWith("_pos"), measureScale: cell.measureScale, maxBarWidth: this.barColumnMaxWidth, styles: this.barChartStyles })) : (cell.draw(this.componentDataFormatDigits)))))))))));
3332
2165
  };
3333
- return index.h(index.Host, null, helper());
2166
+ return index$1.h(index$1.Host, null, helper());
3334
2167
  }
3335
2168
  componentWillRender() {
3336
2169
  const config = this.prepareConfig();
3337
2170
  const data = this.prepareData();
3338
2171
  this.componentDataFormatDigits = new DataFormatDigits.DataFormatDigitsAdapter().adapt(this.dataFormatDigits);
3339
2172
  this.barChartStyles = this.prepareBarChartStyles();
3340
- this.table = new Table(new StringAdapter.IBCSRuleSet(), data, config);
2173
+ this.table = new Table(new ibcsRuleSet.IBCSRuleSet(), data, config);
3341
2174
  this.table.setI18n(this.i18n);
3342
2175
  }
3343
2176
  prepareConfig() {
3344
- const config = new TableComponentConfigAdapter(new TableDrillGroupAdapter(), new StringAdapter.StringAdapter(), new Order.OrderAdapter(new StringAdapter.StringAdapter()), this.data).adapt({
2177
+ const config = new TableComponentConfigAdapter(new TableDrillGroupAdapter(), new ibcsRuleSet.StringAdapter(), new Order.OrderAdapter(new ibcsRuleSet.StringAdapter()), this.data).adapt({
3345
2178
  title: this.tableTitle,
3346
2179
  scenarios: this.scenarios,
3347
2180
  scenariosUnitType: this.scenariosDataFormat,
@@ -3436,12 +2269,8 @@ const IbcsTable = class {
3436
2269
  };
3437
2270
  });
3438
2271
  }
3439
- get element() { return index.getElement(this); }
2272
+ get element() { return index$1.getElement(this); }
3440
2273
  };
3441
2274
  IbcsTable.style = ibcsTableCss();
3442
2275
 
3443
- exports.bn_context = Context;
3444
- exports.bn_datasource = Datasource;
3445
- exports.bn_page = Page;
3446
- exports.bn_table = Table$1;
3447
2276
  exports.ibcs_table = IbcsTable;