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

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 (157) hide show
  1. package/dist/bn-template-engine/bn-template-engine.esm.js +1 -1
  2. package/dist/bn-template-engine/p-06946f44.entry.js +1 -0
  3. package/dist/bn-template-engine/p-0fabe296.entry.js +1 -0
  4. package/dist/bn-template-engine/p-1164c0b0.entry.js +1 -0
  5. package/dist/bn-template-engine/p-355abdf0.entry.js +1 -0
  6. package/dist/bn-template-engine/p-79KuA4Ox.js +1 -0
  7. package/dist/bn-template-engine/p-859cc06d.entry.js +1 -0
  8. package/dist/bn-template-engine/p-8acec99e.entry.js +1 -0
  9. package/dist/bn-template-engine/p-8f490c45.entry.js +1 -0
  10. package/dist/bn-template-engine/p-98cf512f.entry.js +1 -0
  11. package/dist/bn-template-engine/p-9a564f8f.entry.js +1 -0
  12. package/dist/bn-template-engine/{p-CL1RYuNU.js → p-B0lsgVuN.js} +1 -1
  13. package/dist/bn-template-engine/p-B7p8beYH.js +1 -0
  14. package/dist/bn-template-engine/p-BDh7GfC5.js +1 -0
  15. package/dist/bn-template-engine/p-BoMtoHJB.js +1 -0
  16. package/dist/bn-template-engine/p-Bs8BqBsb.js +1 -0
  17. package/dist/bn-template-engine/p-CYjZRKdI.js +1 -0
  18. package/dist/bn-template-engine/{p-P7pGJBgc.js → p-DG-1MR_T.js} +1 -1
  19. package/dist/bn-template-engine/p-bdd2b243.entry.js +1 -0
  20. package/dist/bn-template-engine/p-e6b24f15.entry.js +1 -0
  21. package/dist/bn-template-engine/p-f27995c9.entry.js +1 -0
  22. package/dist/bn-template-engine/{p-Bnhh02CF.js → p-sRO-lj7X.js} +1 -1
  23. package/dist/bn-template-engine/p-tzFCK9qn.js +1 -0
  24. package/dist/cjs/{Order-iG11HI4R.js → Order-BGx39pS5.js} +448 -0
  25. package/dist/cjs/{alasql.min-C_nHTuEQ.js → SVGVariancesStyleGroup-BqAdPYtL.js} +8228 -3
  26. package/dist/cjs/bn-asset_16.cjs.entry.js +9018 -0
  27. package/dist/cjs/bn-card.cjs.entry.js +3 -4
  28. package/dist/cjs/bn-chart-time.cjs.entry.js +11 -16
  29. package/dist/cjs/bn-grid.cjs.entry.js +5 -8
  30. package/dist/cjs/bn-image.cjs.entry.js +5 -8
  31. package/dist/cjs/bn-internationalization.cjs.entry.js +3 -4
  32. package/dist/cjs/bn-layout-card.cjs.entry.js +125 -6
  33. package/dist/cjs/bn-template-engine.cjs.js +1 -1
  34. package/dist/cjs/bn-template.cjs.entry.js +2 -3
  35. package/dist/cjs/bn-text.cjs.entry.js +7 -11
  36. package/dist/cjs/bn-tree.cjs.entry.js +5 -8
  37. package/dist/cjs/{formatter-DIJL_crx.js → formatter-4XCS0d2B.js} +8 -2
  38. package/dist/cjs/ibcs-chart-time.cjs.entry.js +37 -42
  39. package/dist/cjs/loader.cjs.js +1 -1
  40. package/dist/cjs/{scaling-9Tz595RQ.js → scaling-BidPsO53.js} +115 -12
  41. package/dist/cjs/{withBodyObserver-CKpSD8UT.js → withBodyObserver-C6gLgq_e.js} +3 -3
  42. package/dist/cjs/{withComponentStatus-Bw70BhO0.js → withComponentStatus-_x4LQZ0N.js} +5 -5
  43. package/dist/cjs/{withComponentStyle-aIbTCtfj.js → withComponentStyle-ClSJfCku.js} +4 -4
  44. package/dist/cjs/{utils-CwHIVbbL.js → withHasError-B8gHkfV2.js} +69 -1
  45. package/dist/cjs/{withStyled-CS1Yp4sv.js → withStyled-9tG024gQ.js} +62 -9
  46. package/dist/collection/components/bn-layout-card/bn-layout-card.css +1 -0
  47. package/dist/collection/components/bn-layout-card/bn-layout-card.js +162 -27
  48. package/dist/collection/components/bn-layout-page/bn-layout-page.css +1 -0
  49. package/dist/collection/components/bn-layout-page/bn-layout-page.js +151 -33
  50. package/dist/collection/utils/parentDimensions.js +38 -6
  51. package/dist/components/bn-layout-card.js +1 -1
  52. package/dist/components/bn-layout-page.js +1 -1
  53. package/dist/components/scaling.js +1 -1
  54. package/dist/esm/{Order-Bnhh02CF.js → Order-sRO-lj7X.js} +448 -1
  55. package/dist/esm/{alasql.min-CWu4NkIt.js → SVGVariancesStyleGroup-DOIT-zvI.js} +8212 -2
  56. package/dist/esm/bn-asset_16.entry.js +9001 -0
  57. package/dist/esm/bn-card.entry.js +4 -5
  58. package/dist/esm/bn-chart-time.entry.js +8 -13
  59. package/dist/esm/bn-grid.entry.js +6 -9
  60. package/dist/esm/bn-image.entry.js +6 -9
  61. package/dist/esm/bn-internationalization.entry.js +4 -5
  62. package/dist/esm/bn-layout-card.entry.js +126 -7
  63. package/dist/esm/bn-template-engine.js +1 -1
  64. package/dist/esm/bn-template.entry.js +2 -3
  65. package/dist/esm/bn-text.entry.js +7 -11
  66. package/dist/esm/bn-tree.entry.js +6 -9
  67. package/dist/esm/{context-protocol-BHnQsVsr.js → context-protocol-2peaD4y8.js} +1 -1
  68. package/dist/esm/editor-companion.entry.js +1 -1
  69. package/dist/esm/{formatter-DTMEZ6d8.js → formatter-BDh7GfC5.js} +6 -2
  70. package/dist/esm/ibcs-chart-time.entry.js +3 -8
  71. package/dist/esm/loader.js +1 -1
  72. package/dist/esm/{scaling-Cehc74IE.js → scaling-BOcjT8M0.js} +112 -10
  73. package/dist/esm/{withBodyObserver-FQ8NwCIz.js → withBodyObserver-DczL5ia8.js} +1 -1
  74. package/dist/esm/{withComponentStatus-DWjDYtZ7.js → withComponentStatus-DodoSXe-.js} +1 -1
  75. package/dist/esm/{withComponentStyle-9uP_hcDq.js → withComponentStyle-D3VWOsto.js} +2 -2
  76. package/dist/esm/{utils-DvvwfRQG.js → withHasError-B3QX2emi.js} +69 -1
  77. package/dist/esm/{withStyled--qQWquTH.js → withStyled-CE3_3taP.js} +57 -5
  78. package/dist/types/components/bn-layout-card/bn-layout-card.d.ts +139 -0
  79. package/dist/types/components/bn-layout-page/bn-layout-page.d.ts +154 -0
  80. package/dist/types/components.d.ts +168 -0
  81. package/dist/types/utils/parentDimensions.d.ts +6 -1
  82. package/package.json +1 -1
  83. package/dist/bn-template-engine/p-1265d8d3.entry.js +0 -1
  84. package/dist/bn-template-engine/p-15516dac.entry.js +0 -1
  85. package/dist/bn-template-engine/p-1c716641.entry.js +0 -1
  86. package/dist/bn-template-engine/p-1jFf17Vj.js +0 -1
  87. package/dist/bn-template-engine/p-27cc8dc0.entry.js +0 -1
  88. package/dist/bn-template-engine/p-3b4c7425.entry.js +0 -1
  89. package/dist/bn-template-engine/p-4426d484.entry.js +0 -1
  90. package/dist/bn-template-engine/p-51f8dc9e.entry.js +0 -1
  91. package/dist/bn-template-engine/p-53d4e690.entry.js +0 -1
  92. package/dist/bn-template-engine/p-5KQYRQLK.js +0 -1
  93. package/dist/bn-template-engine/p-7337e03d.entry.js +0 -1
  94. package/dist/bn-template-engine/p-75e97c87.entry.js +0 -1
  95. package/dist/bn-template-engine/p-7a560278.entry.js +0 -1
  96. package/dist/bn-template-engine/p-BFTU3MAI.js +0 -1
  97. package/dist/bn-template-engine/p-BYBpC0EO.js +0 -1
  98. package/dist/bn-template-engine/p-BYmPQYxx.js +0 -1
  99. package/dist/bn-template-engine/p-BfXY5dsy.js +0 -1
  100. package/dist/bn-template-engine/p-BgnHJQ9Q.js +0 -1
  101. package/dist/bn-template-engine/p-Bhd_WSML.js +0 -1
  102. package/dist/bn-template-engine/p-Bka-Z6jo.js +0 -1
  103. package/dist/bn-template-engine/p-C7dQL8CS.js +0 -1
  104. package/dist/bn-template-engine/p-CYwd_ZNM.js +0 -1
  105. package/dist/bn-template-engine/p-ChlK-T9I.js +0 -1
  106. package/dist/bn-template-engine/p-DHezf8pZ.js +0 -1
  107. package/dist/bn-template-engine/p-DlppAFq9.js +0 -1
  108. package/dist/bn-template-engine/p-DvDDgmcV.js +0 -1
  109. package/dist/bn-template-engine/p-DvvwfRQG.js +0 -1
  110. package/dist/bn-template-engine/p-abc0067c.entry.js +0 -1
  111. package/dist/bn-template-engine/p-b34eaf86.entry.js +0 -1
  112. package/dist/bn-template-engine/p-bdb8b44c.entry.js +0 -1
  113. package/dist/bn-template-engine/p-c44fcb8e.entry.js +0 -1
  114. package/dist/bn-template-engine/p-c7e1a49b.entry.js +0 -1
  115. package/dist/bn-template-engine/p-d9003041.entry.js +0 -1
  116. package/dist/bn-template-engine/p-daa7ffa3.entry.js +0 -1
  117. package/dist/bn-template-engine/p-e084f50a.entry.js +0 -1
  118. package/dist/bn-template-engine/p-eaba6658.entry.js +0 -1
  119. package/dist/bn-template-engine/p-u8igQLRZ.js +0 -1
  120. package/dist/cjs/DataFormatDigits-DKcOeLNK.js +0 -142
  121. package/dist/cjs/DateStringFactory-CSKvbS8K.js +0 -452
  122. package/dist/cjs/SVGVariancesStyleGroup-K-Tw6lOD.js +0 -7960
  123. package/dist/cjs/_commonjsHelpers-BJu3ubxk.js +0 -10
  124. package/dist/cjs/bn-asset.cjs.entry.js +0 -42
  125. package/dist/cjs/bn-body_4.cjs.entry.js +0 -748
  126. package/dist/cjs/bn-chart-structure_5.cjs.entry.js +0 -3948
  127. package/dist/cjs/bn-component-style.cjs.entry.js +0 -44
  128. package/dist/cjs/bn-dataset.cjs.entry.js +0 -306
  129. package/dist/cjs/bn-layout-page.cjs.entry.js +0 -143
  130. package/dist/cjs/bn-message.cjs.entry.js +0 -52
  131. package/dist/cjs/bn-table.cjs.entry.js +0 -981
  132. package/dist/cjs/contentDecoder-JxOldq1e.js +0 -419
  133. package/dist/cjs/emotion-hash.esm-nbbEQ0Dn.js +0 -57
  134. package/dist/cjs/ibcs-table.cjs.entry.js +0 -2276
  135. package/dist/cjs/ibcsRuleSet-DgUoXOfd.js +0 -136
  136. package/dist/cjs/index-Dm85hG6t.js +0 -65
  137. package/dist/cjs/withHasError-D7ue5vAv.js +0 -72
  138. package/dist/cjs/withTranslation-rwgyITqe.js +0 -77
  139. package/dist/esm/DataFormatDigits-oSZ1hBKE.js +0 -137
  140. package/dist/esm/DateStringFactory-CSGz6TDk.js +0 -450
  141. package/dist/esm/SVGVariancesStyleGroup-CqTjrZYg.js +0 -7950
  142. package/dist/esm/_commonjsHelpers-BFTU3MAI.js +0 -7
  143. package/dist/esm/bn-asset.entry.js +0 -40
  144. package/dist/esm/bn-body_4.entry.js +0 -743
  145. package/dist/esm/bn-chart-structure_5.entry.js +0 -3942
  146. package/dist/esm/bn-component-style.entry.js +0 -42
  147. package/dist/esm/bn-dataset.entry.js +0 -304
  148. package/dist/esm/bn-layout-page.entry.js +0 -141
  149. package/dist/esm/bn-message.entry.js +0 -50
  150. package/dist/esm/bn-table.entry.js +0 -979
  151. package/dist/esm/contentDecoder-oMmxz6nJ.js +0 -416
  152. package/dist/esm/emotion-hash.esm-BYBpC0EO.js +0 -55
  153. package/dist/esm/ibcs-table.entry.js +0 -2274
  154. package/dist/esm/ibcsRuleSet-K4ytuA1f.js +0 -133
  155. package/dist/esm/index-DHezf8pZ.js +0 -65
  156. package/dist/esm/withHasError-FyY5mQ_3.js +0 -70
  157. package/dist/esm/withTranslation-BqD0Kp7b.js +0 -75
@@ -1,981 +0,0 @@
1
- 'use strict';
2
-
3
- var index = require('./index-Cjw0q6gP.js');
4
- var withStyled = require('./withStyled-CS1Yp4sv.js');
5
- var scaling = require('./scaling-9Tz595RQ.js');
6
- var withComponentStatus = require('./withComponentStatus-Bw70BhO0.js');
7
- var contextProtocol = require('./context-protocol-DRQWrwsA.js');
8
- var withTranslation = require('./withTranslation-rwgyITqe.js');
9
- var withComponentStyle = require('./withComponentStyle-aIbTCtfj.js');
10
- var withHasError = require('./withHasError-D7ue5vAv.js');
11
- var Order = require('./Order-iG11HI4R.js');
12
- var index$1 = require('./index-Dm85hG6t.js');
13
- require('./emotion-hash.esm-nbbEQ0Dn.js');
14
- require('./DateStringFactory-CSKvbS8K.js');
15
- require('./utils-CwHIVbbL.js');
16
-
17
- const bnTableCss = () => `:host{display:inline-block;position:relative;overflow:hidden}`;
18
-
19
- const Table = class {
20
- validateScaling(newValue) {
21
- if (newValue == null || newValue === "" || newValue === "none" || newValue === "auto") {
22
- this.errors.remove("ERR_scale");
23
- return;
24
- }
25
- const num = Number(newValue);
26
- if (isNaN(num) || num <= 0) {
27
- this.errors.addOrReplace({
28
- id: "ERR_scale",
29
- type: "warning",
30
- message: `Invalid scale value: "${newValue}". Use "none", "auto", or a positive number.`,
31
- });
32
- }
33
- else {
34
- this.errors.remove("ERR_scale");
35
- }
36
- }
37
- constructor(hostRef) {
38
- index.registerInstance(this, hostRef);
39
- this.data = [];
40
- this.datasetMeta = null;
41
- this.appliedScaleFactor = 1;
42
- /**
43
- * A not mundane tile which should describes the shown data.
44
- */
45
- this.tableTitle = "";
46
- /**
47
- * AlaSQL WHERE clause fragment injected into the data query to filter
48
- * rows before rendering (e.g. `"category = 'Sales'"`).
49
- */
50
- this.filter = "";
51
- /**
52
- * measureUnit displayed in table.
53
- */
54
- this.measureUnit = "";
55
- /**
56
- * Set width of bar chart columns. Controls the max bar/pin width in pixels.
57
- * <br /><br />
58
- * values:<br />
59
- * ``` w5 // w10 // w15 // w20 // w25 // w30 // w40 // w60 // w80 // w100 ```
60
- */
61
- this.barColumnWidth = "w10";
62
- /**
63
- * Pixels per unit for absolute variance bar charts (ΔPY).
64
- * Controls bar width: barWidth = value × unitScaling.
65
- * Bars exceeding barColumnWidth are shown with an arrow indicator.
66
- * <br /><br />
67
- * Default: 0.01
68
- */
69
- this.unitScaling = 0.01;
70
- /**
71
- * Scaling for relative variance pin charts (ΔPY%).
72
- * <br /><br />
73
- * Name of the 'scaling-group' which the table uses.
74
- * Scaling groups are maintained globally.
75
- * <br /><br />
76
- * Alternatively a number which represents pixels per percentage point.
77
- * <br /><br />
78
- * Example: 0.5 means 100% = 50 pixels width.
79
- * <br /><br />
80
- * Default: 0.5
81
- */
82
- this.percentageScaling = 0.5;
83
- // Global scaling groups map - can be populated externally for shared scaling across components
84
- this.pixelPerUnitGroupMap = new Map();
85
- /**
86
- * Defines the data unit type of the tables data.
87
- * <br /><br />
88
- * If percent is chosen all data values are converted into percent
89
- * (0.02 -> 2%)
90
- * <br /><br />
91
- * values: <br />
92
- * ```percent // decimal```
93
- */
94
- this.dataFormat = "decimal";
95
- /**
96
- * Toggles of data should be grouped by
97
- * 'rowgroup'.
98
- * <br /><br />
99
- * values: <br />
100
- * ```true // false```
101
- */
102
- this.grouped = "false";
103
- /**
104
- * Toggles display of measure units in table header
105
- * <br /><br />
106
- * values: <br />
107
- * ```true // false```
108
- */
109
- this.showMeasureScale = "false";
110
- /**
111
- * Toggles a title header for each (row-)group
112
- * the title header value is found set by 'rowgroup'
113
- * <br /><br />
114
- * values: <br />
115
- * ```true // false```
116
- *
117
- */
118
- this.showGroupTitle = "true";
119
- /**
120
- * Set the table type
121
- * <br /><br />
122
- * values: <br />
123
- * ```list // sum // opt // sumnototal // optnototal```
124
- *
125
- */
126
- this.type = "list";
127
- /**
128
- * Set the maximum number of rows for each
129
- * group. The value 0 means *no limit*
130
- * <br /><br />
131
- * rows wich where cut by the limit are cumulated as REST
132
- *
133
- */
134
- this.limit = 0;
135
- /**
136
- * Stringified Array of drilldown Objects {
137
- "rowGroup": string,<br />
138
- "category": string,<br />
139
- "subCategory": string,<br />
140
- },<br /><br />
141
- * rowgroup, categroy defines the location of the drill
142
- * subcategory is the displayed label of the data row
143
- *<br /><br />
144
- * example:<br />
145
- * ```[{
146
- "rowGroup":"Umsatz",
147
- "category": "Applications",
148
- "subCategory": "Applications-A",
149
- },]```
150
- */
151
- this.thereof = "[]";
152
- /**
153
- * Stringified Array of Partof Objects <br />{<br />
154
- "rowGroup": string,<br />
155
- "category": string<br />
156
- },<br /><br />
157
- * rowgroup, categroy defines the location of the drill
158
- * percentage of category in rowgorup
159
- *<br /><br />
160
- * example:<br />
161
- * ```[{
162
- "rowGroups":"Umsatz",
163
- "category": "Applications",
164
- },]```
165
- */
166
- this.partof = "[]";
167
- /** List of the primary scenarios on which the order direction are applied valid scenarios are
168
- * If order is set to a scenario it has also exists in scenariolist
169
- * <br /><br />
170
- * values: <br />
171
- * ```category // categoryindex // rowgroup // rowgroup // rowgroupindex // ac[1-4] // fc[1-4] // pp[1-4] // pl[1-4] // auto```
172
- * <br /><br />
173
- * When set to ```auto```, order is detected from the dataset silently.
174
- */
175
- this.order = "category";
176
- /** Set sorting order direction
177
- * <br /><br />
178
- * values: <br />
179
- * ```asc // desc```
180
- */
181
- this.orderDirection = "asc";
182
- /** Sets the Measure Type of the Table
183
- * volume is different displayed and interpreted as currency
184
- * names of siprefix are adapted.
185
- * <br /><br />
186
- * values: <br />
187
- * ```volume // currency```
188
-
189
- */
190
- this.measureType = "volume";
191
- /**
192
- * Sets the SiPrefix of the Mesaurements and converts the
193
- * original value.
194
- * <br /><br />
195
- * values: <br />
196
- * ```_ // k // M // G // T // P // E // Z // Y // m // μ // n // p // P // f // a // z // y // GREATEST // LEAST```
197
- * <br /><br />
198
- * SiPrefix overview:
199
- * ``` "Y": 1E+24,```<br />
200
- * ``` "Z": 1E+21,```<br />
201
- * ``` "E": 1E+18,```<br />
202
- * ``` "P": 1E+15,```<br />
203
- * ``` "T": 1E+12,```<br />
204
- * ``` "G": 1000000000,```<br />
205
- * ``` "M": 1000000,```<br />
206
- * ``` "k": 1000,```<br />
207
- * <br />
208
- * ``` "m": 0.001,```<br />
209
- * ``` "μ": 0.000001,```<br />
210
- * ``` "n": 0.000000001,```<br />
211
- * ``` "p": 0.000000000001,```<br />
212
- * ``` "f": 0.000000000000001,```<br />
213
- * ``` "a": 0.000000000000000001,```<br />
214
- * ``` "z": 0.000000000000000000001,```<br />
215
- * ``` "y": 0.000000000000000000000001,```<br />
216
- * <br /><br />
217
- * Special modes:
218
- * ```GREATEST``` seaches for the bigest (farest to zero) Value in the dataset and sets this value to SiPrefix<br />
219
- * ```LEAST``` searches for smallest (closest to zero) Value in the dataset and sets this value to SiPrefix<br />
220
- *<br /><br />
221
- * ```_``` is the value for no SiPrefix the value is displayed as in the dataset stored.
222
- *
223
- *
224
- */
225
- this.measureScale = "greatest";
226
- /**
227
- * Number of decimal digits in a table cell
228
- */
229
- this.dataFormatDigitsDecimal = 1;
230
- /**
231
- * Number of percent digits in a table cell
232
- */
233
- this.dataFormatDigitsPercent = 2;
234
- /**
235
- * Set width of category column. <br />
236
- * If INF is selected the columns scaling to the min space they need
237
- * seperatly.
238
- * <br /><br />
239
- * values:<br />
240
- * ``` w5 // w10 // w15 // w20 // w25 // w50 // inf ```
241
- */
242
- this.categoryWidth = "w15";
243
- /**
244
- * Defines which drill-column is displayed. <br />
245
- * <br /><br />
246
- * ```scenario``` the scenaro to drill <br/>
247
- * ```group``` is a list of child columns of the parent <br/><br/>
248
- * ```subGroups``` is a list of child columns of the parent <br/><br/>
249
- * example:<br />
250
- * ```[{"scenario": "ac1", "name": "DE", "subGroups": ["Berlin"]},
251
- * {"scenario": "ac2", "name": "UK", "subGroups": []}],
252
- * ```
253
- */
254
- this.columnthereof = null;
255
- this._autoScaleGuard = false;
256
- withStyled.withStyled(this);
257
- withComponentStatus.withComponentStatus(this);
258
- this.errors = withHasError.withHasError(this);
259
- this.componentStyle = withComponentStyle.withComponentStyle(this);
260
- scaling.withDataset(this, (_name, data) => {
261
- this.data = (data || []);
262
- }, (_name, meta) => {
263
- this.datasetMeta = meta;
264
- });
265
- this.t = withTranslation.withTranslation(this).t;
266
- }
267
- validateScenario(newValue) {
268
- const errId = "ERR_scenarios";
269
- const invalidScenarios = withStyled.validateScenarioList(newValue);
270
- if (invalidScenarios.length > 0) {
271
- this.errors.addOrReplace({
272
- id: errId,
273
- type: "warning",
274
- message: "scenarios: invalid value(s) '" + (invalidScenarios === null || invalidScenarios === void 0 ? void 0 : invalidScenarios.toString()) + "' are not supported.",
275
- });
276
- }
277
- else {
278
- this.errors.remove(errId);
279
- }
280
- }
281
- validateVariances(newValue) {
282
- const errId = "ERR_variances";
283
- const invalidVariances = withStyled.validateVariancesList(newValue);
284
- if (invalidVariances.length > 0) {
285
- this.errors.addOrReplace({
286
- id: errId,
287
- type: "warning",
288
- message: "variances: invalid value(s) '" + JSON.stringify(invalidVariances) + "' are not supported.",
289
- });
290
- }
291
- else {
292
- this.errors.remove(errId);
293
- }
294
- }
295
- validateBarColumns(newValue) {
296
- const errId = "ERR_barColumns";
297
- if (withStyled.isBlankInput(newValue)) {
298
- this.errors.remove(errId);
299
- return;
300
- }
301
- const invalidColumns = withStyled.validateVariancesList(newValue);
302
- if (invalidColumns.length > 0) {
303
- this.errors.addOrReplace({
304
- id: errId,
305
- type: "warning",
306
- message: "barColumns: invalid value(s) '" + JSON.stringify(invalidColumns) + "' are not supported.",
307
- });
308
- }
309
- else {
310
- this.errors.remove(errId);
311
- }
312
- }
313
- validateBarColumnWidth(newValue) {
314
- const errId = "ERR_barColumnWidth";
315
- if (!withStyled.isTableBarColumnWidth(newValue)) {
316
- this.errors.addOrReplace({
317
- id: errId,
318
- type: "warning",
319
- message: "barColumnWidth: invalid value '" + newValue + "' is not supported.",
320
- });
321
- }
322
- else {
323
- this.errors.remove(errId);
324
- }
325
- }
326
- validateUnitScaling(newValue) {
327
- const errId = "ERR_unitScaling";
328
- if (!withStyled.isValidNumber(newValue) && !this.pixelPerUnitGroupMap.has(newValue)) {
329
- this.errors.addOrReplace({
330
- id: errId,
331
- type: "warning",
332
- message: "unitScaling: invalid value '" + newValue + "' is not supported.",
333
- });
334
- }
335
- else {
336
- this.errors.remove(errId);
337
- }
338
- }
339
- validatePercentageScaling(newValue) {
340
- const errId = "ERR_percentageScaling";
341
- if (!withStyled.isValidNumber(newValue) && !this.pixelPerUnitGroupMap.has(newValue)) {
342
- this.errors.addOrReplace({
343
- id: errId,
344
- type: "warning",
345
- message: "percentageScaling: invalid value '" + newValue + "' is not supported.",
346
- });
347
- }
348
- else {
349
- this.errors.remove(errId);
350
- }
351
- }
352
- validateDataFormat(newValue) {
353
- const errId = "ERR_dataFormat";
354
- if (!withStyled.isValidDataFormat(newValue)) {
355
- this.errors.addOrReplace({
356
- id: errId,
357
- type: "warning",
358
- message: "dataFormat: invalid value(s) '" + (newValue === null || newValue === void 0 ? void 0 : newValue.toString()) + "' are not supported.",
359
- });
360
- }
361
- else {
362
- this.errors.remove(errId);
363
- }
364
- }
365
- validateGrouped(newValue) {
366
- const errId = "ERR_grouped";
367
- if (!withStyled.isValidBoolean(newValue)) {
368
- this.errors.addOrReplace({
369
- id: errId,
370
- type: "warning",
371
- message: "grouped: invalid value(s) '" + (newValue === null || newValue === void 0 ? void 0 : newValue.toString()) + "' are not supported.",
372
- });
373
- }
374
- else {
375
- this.errors.remove(errId);
376
- }
377
- }
378
- validateShowMeasureScale(newValue) {
379
- const errId = "ERR_grouped";
380
- if (!withStyled.isValidBoolean(newValue)) {
381
- this.errors.addOrReplace({
382
- id: errId,
383
- type: "warning",
384
- message: "showMeasureScale: invalid value(s) '" + (newValue === null || newValue === void 0 ? void 0 : newValue.toString()) + "' are not supported.",
385
- });
386
- }
387
- else {
388
- this.errors.remove(errId);
389
- }
390
- }
391
- validateShowGroupTitle(newValue) {
392
- const errId = "ERR_showGroupTitle";
393
- if (!withStyled.isValidBoolean(newValue)) {
394
- this.errors.addOrReplace({
395
- id: errId,
396
- type: "warning",
397
- message: "showGroupTitle: invalid value(s) '" + (newValue === null || newValue === void 0 ? void 0 : newValue.toString()) + "' are not supported.",
398
- });
399
- }
400
- else {
401
- this.errors.remove(errId);
402
- }
403
- }
404
- validateType(newValue) {
405
- const errId = "ERR_type";
406
- if (!withStyled.isValidTableType(newValue)) {
407
- this.errors.addOrReplace({
408
- id: errId,
409
- type: "warning",
410
- message: "type: invalid value(s) '" + (newValue === null || newValue === void 0 ? void 0 : newValue.toString()) + "' are not supported.",
411
- });
412
- }
413
- else {
414
- this.errors.remove(errId);
415
- }
416
- }
417
- validateLimit(newValue) {
418
- const errId = "ERR_limit";
419
- if (!withStyled.isValidInteger(newValue)) {
420
- this.errors.addOrReplace({
421
- id: errId,
422
- type: "warning",
423
- message: "order: invalid value '" + (newValue === null || newValue === void 0 ? void 0 : newValue.toString()) + "' is not supported.",
424
- });
425
- }
426
- else {
427
- this.errors.remove(errId);
428
- }
429
- }
430
- validateThereOf(newValue) {
431
- const errId = "ERR_thereof";
432
- const invalidElements = withStyled.validateThereOfJsonStr(newValue);
433
- if (invalidElements.length > 0) {
434
- this.errors.addOrReplace({
435
- id: errId,
436
- type: "warning",
437
- message: "ThereOf: invalid value(s) '" + JSON.stringify(invalidElements) + "' are not supported.",
438
- });
439
- }
440
- else {
441
- this.errors.remove(errId);
442
- }
443
- }
444
- validatePartOf(newValue) {
445
- const errId = "ERR_partof";
446
- const invalidElements = withStyled.validatePartOfJsonStr(newValue);
447
- if (invalidElements.length > 0) {
448
- this.errors.addOrReplace({
449
- id: errId,
450
- type: "warning",
451
- message: "partof: invalid value(s) '" + JSON.stringify(invalidElements) + "' are not supported.",
452
- });
453
- }
454
- else {
455
- this.errors.remove(errId);
456
- }
457
- }
458
- validateOrderList(newValue) {
459
- const errId = "ERR_order";
460
- const invalidElements = withStyled.validateOrderList(newValue);
461
- if (invalidElements.length > 0) {
462
- this.errors.addOrReplace({
463
- id: errId,
464
- type: "warning",
465
- message: "order: invalid value(s) '" + JSON.stringify(invalidElements) + "' are not supported.",
466
- });
467
- }
468
- else {
469
- this.errors.remove(errId);
470
- }
471
- }
472
- validateOrderDirection(newValue) {
473
- const errId = "ERR_orderDirection";
474
- if (!withStyled.isValidDirection(newValue)) {
475
- this.errors.addOrReplace({
476
- id: errId,
477
- type: "warning",
478
- message: "orderDirection: invalid value '" + (newValue === null || newValue === void 0 ? void 0 : newValue.toString()) + "' is not supported.",
479
- });
480
- }
481
- else {
482
- this.errors.remove(errId);
483
- }
484
- }
485
- validateMeasureType(newValue) {
486
- const errId = "ERR_measureType";
487
- if (!withStyled.isValidMeasureType(newValue)) {
488
- this.errors.addOrReplace({
489
- id: errId,
490
- type: "warning",
491
- message: "measureType: invalid value '" + (newValue === null || newValue === void 0 ? void 0 : newValue.toString()) + "' is not supported.",
492
- });
493
- }
494
- else {
495
- this.errors.remove(errId);
496
- }
497
- }
498
- validateMeasureScale(newValue) {
499
- const errId = "ERR_measureScale";
500
- if (!withStyled.isValidMeasureScale(newValue)) {
501
- this.errors.addOrReplace({
502
- id: errId,
503
- type: "warning",
504
- message: "measureScale: invalid value '" + (newValue === null || newValue === void 0 ? void 0 : newValue.toString()) + "' is not supported.",
505
- });
506
- }
507
- else {
508
- this.errors.remove(errId);
509
- }
510
- }
511
- validateDataFormatDigitsDecimal(newValue) {
512
- const errId = "ERR_dataFormatDigitsDecimal";
513
- if (!withStyled.isValidInteger(newValue)) {
514
- this.errors.addOrReplace({
515
- id: errId,
516
- type: "warning",
517
- message: "dataFormatDigitsDecimal: invalid value(s) '" + newValue + "' are not supported.",
518
- });
519
- }
520
- else {
521
- this.errors.remove(errId);
522
- }
523
- }
524
- validateDateFormatDigitsPercent(newValue) {
525
- const errId = "ERR_dataFormatDigitsPercent";
526
- if (!withStyled.isValidInteger(newValue)) {
527
- this.errors.addOrReplace({
528
- id: errId,
529
- type: "warning",
530
- message: "dataFormatDigitsPercent: invalid value(s) '" + newValue + "' are not supported.",
531
- });
532
- }
533
- else {
534
- this.errors.remove(errId);
535
- }
536
- }
537
- validateCategoryWidth(newValue) {
538
- const errId = "ERR_categoryWidth";
539
- if (!withStyled.isTableCategoryWidth(newValue)) {
540
- this.errors.addOrReplace({
541
- id: errId,
542
- type: "warning",
543
- message: "categoryWidth: invalid value(s) '" + newValue + "' are not supported.",
544
- });
545
- }
546
- else {
547
- this.errors.remove(errId);
548
- }
549
- }
550
- validateColumnThereOf(newValue) {
551
- const invalidElements = withStyled.validateColumnThereOfJsonStr(newValue);
552
- const errId = "ERR_categorythereof";
553
- if (invalidElements.length > 0) {
554
- this.errors.addOrReplace({
555
- id: errId,
556
- type: "warning",
557
- message: "columnthereof: invalid value(s) '" + JSON.stringify(invalidElements) + "' are not supported.",
558
- });
559
- }
560
- else {
561
- this.errors.remove(errId);
562
- }
563
- }
564
- componentWillLoad() {
565
- //this.datasouce = get("test");
566
- // this.unsubscribe = onChange("test", (value) => this.datasouce = value);
567
- this.validateScenario(this.scenarios);
568
- this.validateVariances(this.variances);
569
- this.validateDataFormat(this.dataFormat);
570
- this.validateGrouped(this.grouped);
571
- this.validateShowGroupTitle(this.showGroupTitle);
572
- this.validateType(this.type);
573
- this.validateLimit(this.limit);
574
- this.validateThereOf(this.thereof);
575
- this.validatePartOf(this.partof);
576
- this.validateOrderDirection(this.orderDirection);
577
- this.validateOrderList(this.order);
578
- this.validateDataFormatDigitsDecimal(this.dataFormatDigitsDecimal);
579
- this.validateDateFormatDigitsPercent(this.dataFormatDigitsPercent);
580
- this.validateCategoryWidth(this.categoryWidth);
581
- this.validateMeasureType(this.measureType);
582
- this.validateMeasureScale(this.measureScale);
583
- this.validateColumnThereOf(this.columnthereof);
584
- this.validateShowMeasureScale(this.showMeasureScale);
585
- this.validateBarColumns(this.barColumns);
586
- this.validateBarColumnWidth(this.barColumnWidth);
587
- this.validateUnitScaling(this.unitScaling);
588
- this.validatePercentageScaling(this.percentageScaling);
589
- this.validateScaling(this.scale);
590
- }
591
- disconnectedCallback() {
592
- this.unsubscribe();
593
- }
594
- componentDidRender() {
595
- const { mode } = scaling.parseScaling(this.scale);
596
- // Only auto-scale for 'auto' and 'empty' (blank) modes
597
- if (mode !== "auto" && mode !== "empty") {
598
- this._autoScaleGuard = false;
599
- return;
600
- }
601
- // Skip re-measurement after the state-triggered re-render
602
- if (this._autoScaleGuard) {
603
- this._autoScaleGuard = false;
604
- return;
605
- }
606
- const host = this.element;
607
- const { width: parentWidth } = scaling.getParentDimensions(host);
608
- if (parentWidth <= 0)
609
- return;
610
- const baseFontSize = this.componentStyle(($) => { var _a; return ((_a = $["global"]) === null || _a === void 0 ? void 0 : _a["fontSizePx"]) || 13.3333; });
611
- // Measure current content width. host has overflow:hidden, so scrollWidth
612
- // reliably includes full content including shadow DOM overflow.
613
- const currentWidth = host.scrollWidth;
614
- const currentFactor = this.appliedScaleFactor;
615
- // Both em-based and SVG-based dimensions scale proportionally with the
616
- // factor, so dividing by the current factor recovers the base-size width.
617
- // This avoids resetting --bn-font-size to base which only changes em
618
- // widths but not SVG pixel attributes, causing measurement mismatch.
619
- const unscaledWidth = currentFactor > 0 ? currentWidth / currentFactor : currentWidth;
620
- if (unscaledWidth <= parentWidth + 1) {
621
- // Content fits at base size — no scaling needed
622
- this.errors.remove("AUTO_scale");
623
- if (this.appliedScaleFactor !== 1) {
624
- host.style.setProperty("--bn-font-size", `${baseFontSize}px`);
625
- this._autoScaleGuard = true;
626
- this.appliedScaleFactor = 1;
627
- }
628
- return;
629
- }
630
- // Subtract 1px to account for sub-pixel rounding after scaling,
631
- // preventing the right edge from being clipped by overflow:hidden.
632
- const computedFactor = (parentWidth - 1) / unscaledWidth;
633
- // Apply immediately via CSS var for smooth visual (before state re-render)
634
- host.style.setProperty("--bn-font-size", `${baseFontSize * computedFactor}px`);
635
- if (mode === "empty") {
636
- this.errors.addOrReplace({
637
- id: "AUTO_scale",
638
- type: "warning",
639
- message: `Auto-scaled table by factor ${computedFactor.toFixed(3)}`,
640
- });
641
- }
642
- else {
643
- this.errors.remove("AUTO_scale");
644
- }
645
- // Update state so bar charts re-render at the new scale
646
- if (Math.abs(computedFactor - this.appliedScaleFactor) > 0.001) {
647
- this._autoScaleGuard = true;
648
- this.appliedScaleFactor = computedFactor;
649
- }
650
- }
651
- prepareDataFormat() {
652
- var _a;
653
- return Order.DataFormat[(_a = this.dataFormat) === null || _a === void 0 ? void 0 : _a.toUpperCase()];
654
- }
655
- prepareGrouped() {
656
- return this.grouped === "true";
657
- }
658
- prepareShowGroupTitle() {
659
- return this.showGroupTitle === "true";
660
- }
661
- prepareTableType() {
662
- var _a;
663
- return index$1.TableType[(_a = this.type) === null || _a === void 0 ? void 0 : _a.toUpperCase()];
664
- }
665
- prepareLimit() {
666
- return Math.floor(Number(this.limit) || 0);
667
- }
668
- prepareThereOf() {
669
- if (this.thereof == null || this.thereof.trim() === "") {
670
- return [];
671
- }
672
- return JSON.parse(this.thereof);
673
- }
674
- preparePartOf() {
675
- if (this.partof == null || this.partof.trim() === "") {
676
- return [];
677
- }
678
- return JSON.parse(this.partof);
679
- }
680
- prepareOrder() {
681
- var _a, _b, _c;
682
- const isAuto = ((_a = this.order) === null || _a === void 0 ? void 0 : _a.trim().toLowerCase()) === "auto";
683
- let orderStr = this.order;
684
- if (isAuto && ((_b = this.datasetMeta) === null || _b === void 0 ? void 0 : _b.suggestedOrder)) {
685
- orderStr = this.datasetMeta.suggestedOrder;
686
- }
687
- const tableOrder = {
688
- hierarchy: orderStr.split(",").map((entry) => Order.OrderColumn[entry === null || entry === void 0 ? void 0 : entry.toUpperCase()]),
689
- direction: Order.OrderDirection[(_c = this.orderDirection) === null || _c === void 0 ? void 0 : _c.toUpperCase()],
690
- };
691
- return tableOrder;
692
- }
693
- prepareI18nMode() {
694
- return Order.I18nMode.META;
695
- }
696
- prepareI18n() {
697
- const i18nMetaLabelsLocal = ["in", "category", "operation", "there_of", "part_of", "SUM_TOTAL"];
698
- const i18nMetaLabelsGlobal = contextProtocol.globalLabelKeys;
699
- // system
700
- const i18nMapLocal = new Map(i18nMetaLabelsLocal.map((key) => [key, this.t(".".concat(key))]));
701
- const i18nMapGlobal = new Map(i18nMetaLabelsGlobal.map((key) => [key, this.t("global.".concat(key))]));
702
- return new Map([...i18nMapGlobal.entries(), ...i18nMapLocal.entries()]);
703
- }
704
- prepareDataFormatDigits() {
705
- const formatDigits = {
706
- percent: this.dataFormatDigitsPercent,
707
- decimal: this.dataFormatDigitsDecimal,
708
- };
709
- return formatDigits;
710
- }
711
- prepareScenarios() {
712
- var _a, _b, _c, _d, _e, _f, _g, _h;
713
- const isAuto = ((_a = this.scenarios) === null || _a === void 0 ? void 0 : _a.trim().toLowerCase()) === "auto";
714
- if ((withStyled.isBlankInput(this.scenarios) || isAuto) && withStyled.isBlankInput(this.variances)) {
715
- if (((_c = (_b = this.datasetMeta) === null || _b === void 0 ? void 0 : _b.availableScenarios) === null || _c === void 0 ? void 0 : _c.length) > 0) {
716
- if (!isAuto) {
717
- this.errors.addOrReplace({
718
- id: "AUTO_scenarios",
719
- type: "warning",
720
- message: `scenarios: not set, auto-detected: ${this.datasetMeta.availableScenarios.join(",")}`,
721
- });
722
- }
723
- else {
724
- this.errors.remove("AUTO_scenarios");
725
- }
726
- return this.datasetMeta.availableScenarios;
727
- }
728
- return [];
729
- }
730
- let scenarios = [];
731
- if (isAuto || withStyled.isBlankInput(this.scenarios)) {
732
- if (((_e = (_d = this.datasetMeta) === null || _d === void 0 ? void 0 : _d.availableScenarios) === null || _e === void 0 ? void 0 : _e.length) > 0) {
733
- if (!isAuto) {
734
- this.errors.addOrReplace({
735
- id: "AUTO_scenarios",
736
- type: "warning",
737
- message: `scenarios: not set, auto-detected: ${this.datasetMeta.availableScenarios.join(",")}`,
738
- });
739
- }
740
- else {
741
- this.errors.remove("AUTO_scenarios");
742
- }
743
- scenarios = scenarios.concat(this.datasetMeta.availableScenarios);
744
- }
745
- }
746
- else {
747
- this.errors.remove("AUTO_scenarios");
748
- scenarios = scenarios.concat((_f = this.scenarios) === null || _f === void 0 ? void 0 : _f.split(","));
749
- }
750
- if (((_g = this.variances) === null || _g === void 0 ? void 0 : _g.trim().length) > 0) {
751
- scenarios = scenarios.concat((_h = this.variances) === null || _h === void 0 ? void 0 : _h.split(","));
752
- }
753
- return scenarios.map((entry) => entry.trim());
754
- }
755
- prepareCategoryWidth() {
756
- var _a;
757
- if (withStyled.isBlankInput(this.categoryWidth)) {
758
- return Order.TableCategoryWidth.INF;
759
- }
760
- return Order.TableCategoryWidth[(_a = this.categoryWidth) === null || _a === void 0 ? void 0 : _a.toUpperCase()];
761
- }
762
- prepareMeasureScale() {
763
- if (withStyled.isBlankInput(this.measureScale)) {
764
- return "GREATEST";
765
- }
766
- if (["_", "k", "M", "G", "T", "P", "E", "Z", "Y", "m", "μ", "n", "p", "P", "f", "a", "z", "y"].includes(this.measureScale.trim())) {
767
- return this.measureScale.trim();
768
- }
769
- if (this.measureScale.trim().toUpperCase() === "LEAST") {
770
- return this.measureScale.trim();
771
- }
772
- return "GREATEST";
773
- }
774
- prepareMeasureType() {
775
- var _a;
776
- if (withStyled.isBlankInput(this.measureType)) {
777
- return Order.MeasureType.VOLUME;
778
- }
779
- return Order.MeasureType[(_a = this.measureType) === null || _a === void 0 ? void 0 : _a.toUpperCase()];
780
- }
781
- prepareColumnThereOf() {
782
- if (this.columnthereof == null || this.columnthereof.trim() === "") {
783
- return new Map();
784
- }
785
- const parsedString = JSON.parse(this.columnthereof);
786
- const map = new Map();
787
- for (const [_key, value] of Object.entries(parsedString)) {
788
- if (map.has(value["scenario"]) === false) {
789
- map.set(value["scenario"], []);
790
- }
791
- map.get(value["scenario"]).push(value);
792
- }
793
- return map;
794
- }
795
- prepareTableTitle() {
796
- if (this.tableTitle === "" || this.tableTitle == null) {
797
- return "SUM_TOTAL";
798
- }
799
- return this.tableTitle;
800
- }
801
- prepareShowMeasureScale() {
802
- return this.showMeasureScale === "true";
803
- }
804
- prepareMeasureUnit() {
805
- if (this.measureUnit === "" || this.measureUnit == null) {
806
- return "";
807
- }
808
- return this.measureUnit;
809
- }
810
- prepareFilter() {
811
- if (this.filter.length === 0) {
812
- return "";
813
- }
814
- return this.filter;
815
- }
816
- prepareBarColumnWidth() {
817
- var _a;
818
- const key = (_a = this.barColumnWidth) === null || _a === void 0 ? void 0 : _a.toUpperCase();
819
- const preset = Order.TableBarColumnWidth[key];
820
- if (preset) {
821
- return Order.BAR_COLUMN_WIDTH_EM[preset];
822
- }
823
- return Order.BAR_COLUMN_WIDTH_EM[Order.TableBarColumnWidth.W10];
824
- }
825
- prepareBarColumns() {
826
- if (withStyled.isBlankInput(this.barColumns)) {
827
- return [];
828
- }
829
- return this.barColumns.split(",").map((col) => col.trim());
830
- }
831
- prepareUnitScaling() {
832
- if (this.pixelPerUnitGroupMap.has(this.unitScaling)) {
833
- return this.pixelPerUnitGroupMap.get(this.unitScaling);
834
- }
835
- return Number(this.unitScaling);
836
- }
837
- preparePercentageScaling() {
838
- if (this.pixelPerUnitGroupMap.has(this.percentageScaling)) {
839
- return this.pixelPerUnitGroupMap.get(this.percentageScaling);
840
- }
841
- return Number(this.percentageScaling);
842
- }
843
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
844
- getDataStructure() {
845
- const dataSetStructure = {
846
- ITableDataRow: {
847
- setName: { type: "string", isOptional: false, description: "" },
848
- date: { type: "string", isOptional: false, description: "" },
849
- operation: { type: "string", isOptional: false, description: "" },
850
- rowGroup: { type: "string", isOptional: false, description: "" },
851
- rowGroupIndex: { type: "number", isOptional: false, description: "" },
852
- category: { type: "string", isOptional: false, description: "" },
853
- categoryIndex: { type: "number", isOptional: false, description: "" },
854
- subCategory: { type: "string", isOptional: false, description: "" },
855
- subCategoryIndex: { type: "number", isOptional: false, description: "" },
856
- columnGroup: { type: "string", isOptional: false, description: "" },
857
- columnGroupIndex: { type: "number", isOptional: false, description: "" },
858
- columnSubGroup: { type: "string", isOptional: false, description: "" },
859
- columnSubGroupIndex: { type: "number", isOptional: false, description: "" },
860
- ac1: { type: "number", isOptional: false, description: "" },
861
- ac2: { type: "number", isOptional: false, description: "" },
862
- ac3: { type: "number", isOptional: false, description: "" },
863
- ac4: { type: "number", isOptional: false, description: "" },
864
- pp1: { type: "number", isOptional: false, description: "" },
865
- pp2: { type: "number", isOptional: false, description: "" },
866
- pp3: { type: "number", isOptional: false, description: "" },
867
- pp4: { type: "number", isOptional: false, description: "" },
868
- fc1: { type: "number", isOptional: false, description: "" },
869
- fc2: { type: "number", isOptional: false, description: "" },
870
- fc3: { type: "number", isOptional: false, description: "" },
871
- fc4: { type: "number", isOptional: false, description: "" },
872
- pl1: { type: "number", isOptional: false, description: "" },
873
- pl2: { type: "number", isOptional: false, description: "" },
874
- pl3: { type: "number", isOptional: false, description: "" },
875
- pl4: { type: "number", isOptional: false, description: "" },
876
- },
877
- };
878
- return dataSetStructure;
879
- }
880
- getEffectiveScaleFactor() {
881
- const { mode, factor } = scaling.parseScaling(this.scale);
882
- if (mode === "factor")
883
- return factor;
884
- if (mode === "auto" || mode === "empty")
885
- return this.appliedScaleFactor;
886
- return 1;
887
- }
888
- getFontStyles() {
889
- const effectiveFactor = this.getEffectiveScaleFactor();
890
- return this.componentStyle(($) => {
891
- var _a, _b, _c, _d;
892
- const baseFontSize = ((_a = $["global"]) === null || _a === void 0 ? void 0 : _a["fontSizePx"]) || 13.3333;
893
- return {
894
- "--bn-font-family": ((_b = $["global"]) === null || _b === void 0 ? void 0 : _b["fontFamily"]) || "'Noto Sans', sans-serif",
895
- "--bn-font-size": `${baseFontSize * effectiveFactor}px`,
896
- "--bn-font-color": ((_c = $["global"]) === null || _c === void 0 ? void 0 : _c["fontColor"]) || "#000000",
897
- "--bn-font-background": ((_d = $["global"]) === null || _d === void 0 ? void 0 : _d["fontBackgroundColor"]) || "#ffffff",
898
- };
899
- });
900
- }
901
- render() {
902
- const fontStyles = this.getFontStyles();
903
- const effectiveFactor = this.getEffectiveScaleFactor();
904
- return (index.h(index.Host, { key: '3690ce4fee5e38012a2f956035110cc3e2500b39', style: fontStyles }, index.h("div", { key: 'e6481956a6873beefb15ea7369a7352d2662c1a2' }, index.h("ibcs-table", { key: '3260517d31fa04294c8df293a6fefd88b129f7b6', 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 }))));
905
- }
906
- get element() { return index.getElement(this); }
907
- static get watchers() { return {
908
- "scale": [{
909
- "validateScaling": 0
910
- }],
911
- "scenarios": [{
912
- "validateScenario": 0
913
- }],
914
- "variances": [{
915
- "validateVariances": 0
916
- }],
917
- "barColumns": [{
918
- "validateBarColumns": 0
919
- }],
920
- "barColumnWidth": [{
921
- "validateBarColumnWidth": 0
922
- }],
923
- "unitScaling": [{
924
- "validateUnitScaling": 0
925
- }],
926
- "percentageScaling": [{
927
- "validatePercentageScaling": 0
928
- }],
929
- "dataFormat": [{
930
- "validateDataFormat": 0
931
- }],
932
- "grouped": [{
933
- "validateGrouped": 0
934
- }],
935
- "showMeasureScale": [{
936
- "validateShowMeasureScale": 0
937
- }],
938
- "showGroupTitle": [{
939
- "validateShowGroupTitle": 0
940
- }],
941
- "type": [{
942
- "validateType": 0
943
- }],
944
- "limit": [{
945
- "validateLimit": 0
946
- }],
947
- "thereof": [{
948
- "validateThereOf": 0
949
- }],
950
- "partof": [{
951
- "validatePartOf": 0
952
- }],
953
- "order": [{
954
- "validateOrderList": 0
955
- }],
956
- "orderDirection": [{
957
- "validateOrderDirection": 0
958
- }],
959
- "measureType": [{
960
- "validateMeasureType": 0
961
- }],
962
- "measureScale": [{
963
- "validateMeasureScale": 0
964
- }],
965
- "dataFormatDigitsDecimal": [{
966
- "validateDataFormatDigitsDecimal": 0
967
- }],
968
- "dataFormatDigitsPercent": [{
969
- "validateDateFormatDigitsPercent": 0
970
- }],
971
- "categoryWidth": [{
972
- "validateCategoryWidth": 0
973
- }],
974
- "columnthereof": [{
975
- "validateColumnThereOf": 0
976
- }]
977
- }; }
978
- };
979
- Table.style = bnTableCss();
980
-
981
- exports.bn_table = Table;