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

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 (278) hide show
  1. package/dist/bn-template-engine/bn-template-engine.esm.js +1 -1
  2. package/dist/bn-template-engine/{p-_LBTIfNN.js → p--PSoPbDM.js} +1 -1
  3. package/dist/bn-template-engine/p-05a82a77.entry.js +1 -0
  4. package/dist/bn-template-engine/p-0ca8dc17.entry.js +1 -0
  5. package/dist/bn-template-engine/p-0f1504f3.entry.js +1 -0
  6. package/dist/bn-template-engine/p-1d9a3be9.entry.js +1 -0
  7. package/dist/bn-template-engine/p-35638ad0.entry.js +1 -0
  8. package/dist/bn-template-engine/p-37881d05.entry.js +1 -0
  9. package/dist/bn-template-engine/{p-65f8962a.entry.js → p-3b894997.entry.js} +1 -1
  10. package/dist/bn-template-engine/p-50e49732.entry.js +1 -0
  11. package/dist/bn-template-engine/p-60a7fc59.entry.js +1 -0
  12. package/dist/bn-template-engine/{p-ad94cf63.entry.js → p-6c7c0455.entry.js} +1 -1
  13. package/dist/bn-template-engine/p-6da93eae.entry.js +1 -0
  14. package/dist/bn-template-engine/p-701e1578.entry.js +1 -0
  15. package/dist/bn-template-engine/p-BSfqOkN_.js +1 -0
  16. package/dist/bn-template-engine/{p--TeDldm8.js → p-CRLgp9-v.js} +1 -1
  17. package/dist/bn-template-engine/p-CYjZRKdI.js +1 -0
  18. package/dist/bn-template-engine/{p-Cp4MVxCu.js → p-CvXqez4D.js} +1 -1
  19. package/dist/bn-template-engine/p-DG-1MR_T.js +1 -0
  20. package/dist/bn-template-engine/{p-CnI71OA9.js → p-DRikHQE-.js} +1 -1
  21. package/dist/bn-template-engine/p-DVMu6dEy.js +1 -0
  22. package/dist/bn-template-engine/p-DVo6aZUE.js +1 -0
  23. package/dist/bn-template-engine/p-DdexOqTs.js +1 -0
  24. package/dist/bn-template-engine/p-DgfL-ffj.js +1 -0
  25. package/dist/bn-template-engine/p-DyRaC0MB.js +1 -0
  26. package/dist/bn-template-engine/p-JNHhIe7t.js +2 -0
  27. package/dist/bn-template-engine/p-a95ccc16.entry.js +1 -0
  28. package/dist/bn-template-engine/p-b7bec050.entry.js +1 -0
  29. package/dist/bn-template-engine/p-bc59ea5c.entry.js +1 -0
  30. package/dist/bn-template-engine/p-d279b578.entry.js +1 -0
  31. package/dist/bn-template-engine/p-dd9dd407.entry.js +1 -0
  32. package/dist/bn-template-engine/p-e102a490.entry.js +1 -0
  33. package/dist/bn-template-engine/p-f27995c9.entry.js +1 -0
  34. package/dist/bn-template-engine/p-f89e55c6.entry.js +1 -0
  35. package/dist/bn-template-engine/{p-CY1RzLjU.js → p-tzFCK9qn.js} +1 -1
  36. package/dist/cjs/{DataFormatDigits-DmTbhF8q.js → DataFormatDigits-CbIVfGEH.js} +1 -1
  37. package/dist/cjs/{DateStringFactory-Dn0aRj2Y.js → DateStringFactory-CfkXYAMN.js} +4 -5
  38. package/dist/cjs/{luxon-8hyy5YD7.js → Order-DtpbD8mQ.js} +282 -0
  39. package/dist/cjs/{SVGVariancesStyleGroup-Czizhngt.js → SVGVariancesStyleGroup-D-rTWlDo.js} +1 -1
  40. package/dist/cjs/{StringAdapter-0EbYMkR0.js → StringAdapter-ByCHdlDO.js} +1 -1
  41. package/dist/cjs/bn-asset.cjs.entry.js +5 -6
  42. package/dist/cjs/{bn-body_3.cjs.entry.js → bn-body_4.cjs.entry.js} +360 -27
  43. package/dist/cjs/bn-card.cjs.entry.js +5 -6
  44. package/dist/cjs/bn-chart-structure.cjs.entry.js +17 -22
  45. package/dist/cjs/bn-chart-time.cjs.entry.js +38 -51
  46. package/dist/cjs/bn-component-style.cjs.entry.js +5 -6
  47. package/dist/cjs/bn-context_5.cjs.entry.js +36 -40
  48. package/dist/cjs/bn-dataset.cjs.entry.js +5 -6
  49. package/dist/cjs/bn-grid.cjs.entry.js +8 -11
  50. package/dist/cjs/bn-image.cjs.entry.js +8 -11
  51. package/dist/cjs/bn-internationalization.cjs.entry.js +5 -6
  52. package/dist/cjs/bn-layout-card.cjs.entry.js +3 -3
  53. package/dist/cjs/bn-layout-page.cjs.entry.js +2 -2
  54. package/dist/cjs/bn-message.cjs.entry.js +6 -7
  55. package/dist/cjs/bn-template-engine.cjs.js +2 -2
  56. package/dist/cjs/bn-template.cjs.entry.js +4 -5
  57. package/dist/cjs/bn-text.cjs.entry.js +12 -16
  58. package/dist/cjs/bn-tree.cjs.entry.js +8 -11
  59. package/dist/cjs/{context-protocol-BkYHFkXE.js → context-protocol-CRPmux5D.js} +1 -1
  60. package/dist/cjs/editor-companion.cjs.entry.js +3 -3
  61. package/dist/cjs/ibcs-chart-structure.cjs.entry.js +31 -33
  62. package/dist/cjs/ibcs-chart-time.cjs.entry.js +42 -44
  63. package/dist/cjs/{index-CScBFiS1.js → index-Cjw0q6gP.js} +1 -2
  64. package/dist/cjs/loader.cjs.js +2 -2
  65. package/dist/cjs/{withDataset-ZdN-RRTx.js → scaling-D8sIIKft.js} +68 -3
  66. package/dist/cjs/{withBodyObserver-B0_W1VOf.js → withBodyObserver-C6gLgq_e.js} +2 -2
  67. package/dist/cjs/{componentRegister-C17UFNPh.js → withComponentStatus-_x4LQZ0N.js} +43 -6
  68. package/dist/cjs/{withComponentStyle-C6KHnZHt.js → withComponentStyle-DMtic_9Y.js} +3 -3
  69. package/dist/cjs/{withHasError-Dspb3lIV.js → withHasError-B8gHkfV2.js} +1 -1
  70. package/dist/cjs/{withStyled-Bf-stJTR.js → withStyled-BBtMesx3.js} +14 -63
  71. package/dist/cjs/{withTranslation-Cz0M5maV.js → withTranslation-CWPAIRjh.js} +3 -3
  72. package/dist/collection/collection-manifest.json +1 -10
  73. package/dist/collection/components/bn-chart-structure/bn-chart-structure.js +2 -3
  74. package/dist/collection/components/bn-chart-time/bn-chart-time.js +21 -30
  75. package/dist/collection/components/bn-message/bn-message.js +1 -1
  76. package/dist/collection/components/bn-page/bn-page.js +1 -1
  77. package/dist/collection/components/bn-table/bn-table.js +1 -1
  78. package/dist/collection/components/bn-template/bn-template.js +1 -1
  79. package/dist/collection/components/bn-text/bn-text.js +1 -1
  80. package/dist/collection/components/bn-title/bn-title.js +1 -9
  81. package/dist/collection/components/bn-title/ibcs-title/ibcs-title.js +1 -1
  82. package/dist/collection/components/editor-companion/editor-companion.js +1 -1
  83. package/dist/collection/utils/DateStringFactory.js +0 -1
  84. package/dist/components/DateStringFactory.js +1 -1
  85. package/dist/components/bn-chart-structure.js +1 -1
  86. package/dist/components/bn-chart-time.js +1 -1
  87. package/dist/components/bn-message2.js +1 -1
  88. package/dist/components/bn-page2.js +1 -1
  89. package/dist/components/bn-table.js +1 -1
  90. package/dist/components/bn-template.js +1 -1
  91. package/dist/components/bn-text.js +1 -1
  92. package/dist/components/bn-title2.js +1 -1
  93. package/dist/components/editor-companion.js +1 -1
  94. package/dist/components/ibcs-title2.js +1 -1
  95. package/dist/components/scaling.js +1 -1
  96. package/dist/components/validate.js +1 -1
  97. package/dist/components/withHasError.js +1 -1
  98. package/dist/esm/{DataFormatDigits-Dt6gpIiZ.js → DataFormatDigits-DYdbRX-1.js} +1 -1
  99. package/dist/esm/{DateStringFactory-_Qiv0IvF.js → DateStringFactory-DRcbojUT.js} +1 -2
  100. package/dist/esm/{luxon-DbyXf6dF.js → Order-DdexOqTs.js} +280 -1
  101. package/dist/esm/{SVGVariancesStyleGroup-DlWgvpzs.js → SVGVariancesStyleGroup-D0Cwprv1.js} +1 -1
  102. package/dist/esm/{StringAdapter-BLvo1Krl.js → StringAdapter-CTL-Dvzp.js} +1 -1
  103. package/dist/esm/bn-asset.entry.js +5 -6
  104. package/dist/esm/{bn-body_3.entry.js → bn-body_4.entry.js} +356 -24
  105. package/dist/esm/bn-card.entry.js +5 -6
  106. package/dist/esm/bn-chart-structure.entry.js +12 -17
  107. package/dist/esm/bn-chart-time.entry.js +31 -44
  108. package/dist/esm/bn-component-style.entry.js +5 -6
  109. package/dist/esm/bn-context_5.entry.js +15 -19
  110. package/dist/esm/bn-dataset.entry.js +5 -6
  111. package/dist/esm/bn-grid.entry.js +8 -11
  112. package/dist/esm/bn-image.entry.js +8 -11
  113. package/dist/esm/bn-internationalization.entry.js +5 -6
  114. package/dist/esm/bn-layout-card.entry.js +3 -3
  115. package/dist/esm/bn-layout-page.entry.js +2 -2
  116. package/dist/esm/bn-message.entry.js +6 -7
  117. package/dist/esm/bn-template-engine.js +3 -3
  118. package/dist/esm/bn-template.entry.js +4 -5
  119. package/dist/esm/bn-text.entry.js +11 -15
  120. package/dist/esm/bn-tree.entry.js +8 -11
  121. package/dist/esm/{context-protocol-DzeqZxg6.js → context-protocol-Bz5klD-F.js} +1 -1
  122. package/dist/esm/editor-companion.entry.js +3 -3
  123. package/dist/esm/ibcs-chart-structure.entry.js +5 -7
  124. package/dist/esm/ibcs-chart-time.entry.js +6 -8
  125. package/dist/esm/{index-B27Ax6P_.js → index-JNHhIe7t.js} +2 -2
  126. package/dist/esm/loader.js +3 -3
  127. package/dist/esm/{withDataset-BT2VQCsG.js → scaling-C6K8FYSF.js} +67 -4
  128. package/dist/esm/{withBodyObserver-gZpZiEIK.js → withBodyObserver-DczL5ia8.js} +2 -2
  129. package/dist/esm/{componentRegister-BtVfu16B.js → withComponentStatus-DodoSXe-.js} +36 -1
  130. package/dist/esm/{withComponentStyle-NaxfakAG.js → withComponentStyle-BerJY64r.js} +3 -3
  131. package/dist/esm/{withHasError-C48fTE2k.js → withHasError-B3QX2emi.js} +1 -1
  132. package/dist/esm/{withStyled-CpUTv74m.js → withStyled-DCipbf2O.js} +5 -51
  133. package/dist/esm/{withTranslation-Do4GhleK.js → withTranslation-mimbJdER.js} +3 -3
  134. package/dist/types/components/bn-chart-time/bn-chart-time.d.ts +1 -2
  135. package/dist/types/components/bn-title/bn-title.d.ts +0 -1
  136. package/dist/types/components.d.ts +0 -401
  137. package/package.json +2 -3
  138. package/readme.md +0 -1
  139. package/dist/bn-template-engine/assets/gpx/Chasing_Legends.gpx +0 -195076
  140. package/dist/bn-template-engine/assets/gpx/Fahrt_am_Nachmittag.gpx +0 -142007
  141. package/dist/bn-template-engine/assets/icons/gpx-finish.png +0 -0
  142. package/dist/bn-template-engine/assets/icons/gpx-shadow.png +0 -0
  143. package/dist/bn-template-engine/assets/icons/gpx-start.png +0 -0
  144. package/dist/bn-template-engine/assets/icons/marker-example.png +0 -0
  145. package/dist/bn-template-engine/assets/icons/pin-icon-end.png +0 -0
  146. package/dist/bn-template-engine/assets/icons/pin-icon-start.png +0 -0
  147. package/dist/bn-template-engine/assets/icons/pin-icon-wpt.png +0 -0
  148. package/dist/bn-template-engine/assets/icons/pin-shadow.png +0 -0
  149. package/dist/bn-template-engine/assets/icons/pin.png +0 -0
  150. package/dist/bn-template-engine/p-0e7dc113.entry.js +0 -1
  151. package/dist/bn-template-engine/p-264c6bad.entry.js +0 -1
  152. package/dist/bn-template-engine/p-326a0902.entry.js +0 -1
  153. package/dist/bn-template-engine/p-38a8bde3.entry.js +0 -1
  154. package/dist/bn-template-engine/p-577eafcd.entry.js +0 -1
  155. package/dist/bn-template-engine/p-5905cc43.entry.js +0 -1
  156. package/dist/bn-template-engine/p-5d155a72.entry.js +0 -1
  157. package/dist/bn-template-engine/p-6b8d1ebf.entry.js +0 -1
  158. package/dist/bn-template-engine/p-7995acb2.entry.js +0 -1
  159. package/dist/bn-template-engine/p-7afe431e.entry.js +0 -1
  160. package/dist/bn-template-engine/p-8014b1ac.entry.js +0 -1
  161. package/dist/bn-template-engine/p-80423fc8.entry.js +0 -1
  162. package/dist/bn-template-engine/p-91e74d42.entry.js +0 -1
  163. package/dist/bn-template-engine/p-930a9e29.entry.js +0 -1
  164. package/dist/bn-template-engine/p-93C9jL8R.js +0 -1
  165. package/dist/bn-template-engine/p-93ff8584.entry.js +0 -1
  166. package/dist/bn-template-engine/p-B0m0U4wJ.js +0 -1
  167. package/dist/bn-template-engine/p-B27Ax6P_.js +0 -2
  168. package/dist/bn-template-engine/p-B79VcHiT.js +0 -1
  169. package/dist/bn-template-engine/p-BBd0ZVLL.js +0 -1
  170. package/dist/bn-template-engine/p-BFatTBqh.js +0 -1
  171. package/dist/bn-template-engine/p-BQp6ZPYW.js +0 -1
  172. package/dist/bn-template-engine/p-BhEQy-2D.js +0 -1
  173. package/dist/bn-template-engine/p-BtVfu16B.js +0 -1
  174. package/dist/bn-template-engine/p-CfWnag33.js +0 -1
  175. package/dist/bn-template-engine/p-DbyXf6dF.js +0 -1
  176. package/dist/bn-template-engine/p-TdL-LRR9.js +0 -1
  177. package/dist/bn-template-engine/p-a342cd3c.entry.js +0 -1
  178. package/dist/bn-template-engine/p-bc37d750.entry.js +0 -1
  179. package/dist/bn-template-engine/p-c9f050bf.entry.js +0 -1
  180. package/dist/bn-template-engine/p-d07a0ca3.entry.js +0 -1
  181. package/dist/bn-template-engine/p-e5f372af.entry.js +0 -1
  182. package/dist/bn-template-engine/p-e620028c.entry.js +0 -1
  183. package/dist/bn-template-engine/p-e81e116a.entry.js +0 -1
  184. package/dist/bn-template-engine/p-eca98070.entry.js +0 -1
  185. package/dist/bn-template-engine/p-ee6de950.entry.js +0 -1
  186. package/dist/bn-template-engine/p-efe0ef1e.entry.js +0 -1
  187. package/dist/bn-template-engine/p-f034f1b8.entry.js +0 -1
  188. package/dist/bn-template-engine/p-f1c1a8a3.entry.js +0 -1
  189. package/dist/bn-template-engine/p-fe573a1a.entry.js +0 -1
  190. package/dist/bn-template-engine/p-kMyLevYy.js +0 -1
  191. package/dist/cjs/Order-B4NIqQWe.js +0 -129
  192. package/dist/cjs/bn-map.cjs.entry.js +0 -425
  193. package/dist/cjs/constants-DHqQXSSd.js +0 -158
  194. package/dist/cjs/ibcs-map.cjs.entry.js +0 -1075
  195. package/dist/cjs/ibcs-title.cjs.entry.js +0 -352
  196. package/dist/cjs/scaling-B23eOtsC.js +0 -67
  197. package/dist/cjs/test-runner-card.cjs.entry.js +0 -27
  198. package/dist/cjs/test-runner-chart-time.cjs.entry.js +0 -230
  199. package/dist/cjs/test-runner-chart.cjs.entry.js +0 -326
  200. package/dist/cjs/test-runner-map.cjs.entry.js +0 -1862
  201. package/dist/cjs/test-runner-table.cjs.entry.js +0 -477
  202. package/dist/cjs/test-runner-time.cjs.entry.js +0 -381
  203. package/dist/cjs/test-runner-title.cjs.entry.js +0 -115
  204. package/dist/cjs/withComponentStatus-BrxL7usr.js +0 -39
  205. package/dist/collection/components/bn-map/bn-map.css +0 -4
  206. package/dist/collection/components/bn-map/bn-map.js +0 -725
  207. package/dist/collection/components/bn-map/ibcs-map/assets/gpx/Chasing_Legends.gpx +0 -195076
  208. package/dist/collection/components/bn-map/ibcs-map/assets/gpx/Fahrt_am_Nachmittag.gpx +0 -142007
  209. package/dist/collection/components/bn-map/ibcs-map/assets/icons/gpx-finish.png +0 -0
  210. package/dist/collection/components/bn-map/ibcs-map/assets/icons/gpx-shadow.png +0 -0
  211. package/dist/collection/components/bn-map/ibcs-map/assets/icons/gpx-start.png +0 -0
  212. package/dist/collection/components/bn-map/ibcs-map/assets/icons/marker-example.png +0 -0
  213. package/dist/collection/components/bn-map/ibcs-map/assets/icons/pin-icon-end.png +0 -0
  214. package/dist/collection/components/bn-map/ibcs-map/assets/icons/pin-icon-start.png +0 -0
  215. package/dist/collection/components/bn-map/ibcs-map/assets/icons/pin-icon-wpt.png +0 -0
  216. package/dist/collection/components/bn-map/ibcs-map/assets/icons/pin-shadow.png +0 -0
  217. package/dist/collection/components/bn-map/ibcs-map/assets/icons/pin.png +0 -0
  218. package/dist/collection/components/bn-map/ibcs-map/ibcs-map.css +0 -674
  219. package/dist/collection/components/bn-map/ibcs-map/ibcs-map.js +0 -744
  220. package/dist/collection/components/bn-map/ibcs-map/utils/model/GeoJsonLayer.js +0 -9
  221. package/dist/collection/components/bn-map/ibcs-map/utils/model/GpxLayer.js +0 -13
  222. package/dist/collection/components/bn-map/ibcs-map/utils/model/Marker.js +0 -11
  223. package/dist/collection/components/bn-map/ibcs-map/utils/model/index.js +0 -2
  224. package/dist/collection/test-runner/test-runner-card.js +0 -36
  225. package/dist/collection/test-runner/test-runner-chart-time.js +0 -234
  226. package/dist/collection/test-runner/test-runner-chart.js +0 -364
  227. package/dist/collection/test-runner/test-runner-map.js +0 -1901
  228. package/dist/collection/test-runner/test-runner-table.js +0 -469
  229. package/dist/collection/test-runner/test-runner-time.js +0 -399
  230. package/dist/collection/test-runner/test-runner-title.js +0 -108
  231. package/dist/components/bn-map.d.ts +0 -11
  232. package/dist/components/bn-map.js +0 -1
  233. package/dist/components/componentRegister.js +0 -1
  234. package/dist/components/ibcs-map.d.ts +0 -11
  235. package/dist/components/ibcs-map.js +0 -1
  236. package/dist/components/ibcs-map2.js +0 -1
  237. package/dist/components/test-runner-card.d.ts +0 -11
  238. package/dist/components/test-runner-card.js +0 -1
  239. package/dist/components/test-runner-chart-time.d.ts +0 -11
  240. package/dist/components/test-runner-chart-time.js +0 -1
  241. package/dist/components/test-runner-chart.d.ts +0 -11
  242. package/dist/components/test-runner-chart.js +0 -1
  243. package/dist/components/test-runner-map.d.ts +0 -11
  244. package/dist/components/test-runner-map.js +0 -1
  245. package/dist/components/test-runner-table.d.ts +0 -11
  246. package/dist/components/test-runner-table.js +0 -1
  247. package/dist/components/test-runner-time.d.ts +0 -11
  248. package/dist/components/test-runner-time.js +0 -1
  249. package/dist/components/test-runner-title.d.ts +0 -11
  250. package/dist/components/test-runner-title.js +0 -1
  251. package/dist/components/withDataset.js +0 -1
  252. package/dist/esm/Order-B4fpLe_f.js +0 -125
  253. package/dist/esm/bn-map.entry.js +0 -423
  254. package/dist/esm/constants-kMyLevYy.js +0 -158
  255. package/dist/esm/ibcs-map.entry.js +0 -1073
  256. package/dist/esm/ibcs-title.entry.js +0 -350
  257. package/dist/esm/scaling-BBd0ZVLL.js +0 -64
  258. package/dist/esm/test-runner-card.entry.js +0 -25
  259. package/dist/esm/test-runner-chart-time.entry.js +0 -228
  260. package/dist/esm/test-runner-chart.entry.js +0 -324
  261. package/dist/esm/test-runner-map.entry.js +0 -1860
  262. package/dist/esm/test-runner-table.entry.js +0 -475
  263. package/dist/esm/test-runner-time.entry.js +0 -379
  264. package/dist/esm/test-runner-title.entry.js +0 -113
  265. package/dist/esm/withComponentStatus-elELReKt.js +0 -37
  266. package/dist/types/components/bn-map/bn-map.d.ts +0 -122
  267. package/dist/types/components/bn-map/ibcs-map/ibcs-map.d.ts +0 -73
  268. package/dist/types/components/bn-map/ibcs-map/utils/model/GeoJsonLayer.d.ts +0 -8
  269. package/dist/types/components/bn-map/ibcs-map/utils/model/GpxLayer.d.ts +0 -11
  270. package/dist/types/components/bn-map/ibcs-map/utils/model/Marker.d.ts +0 -9
  271. package/dist/types/components/bn-map/ibcs-map/utils/model/index.d.ts +0 -2
  272. package/dist/types/test-runner/test-runner-card.d.ts +0 -3
  273. package/dist/types/test-runner/test-runner-chart-time.d.ts +0 -3
  274. package/dist/types/test-runner/test-runner-chart.d.ts +0 -3
  275. package/dist/types/test-runner/test-runner-map.d.ts +0 -3
  276. package/dist/types/test-runner/test-runner-table.d.ts +0 -3
  277. package/dist/types/test-runner/test-runner-time.d.ts +0 -3
  278. package/dist/types/test-runner/test-runner-title.d.ts +0 -3
@@ -1,10 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var constants = require('./constants-DHqQXSSd.js');
4
- var DateStringFactory = require('./DateStringFactory-Dn0aRj2Y.js');
5
- var Order = require('./Order-B4NIqQWe.js');
6
- var index = require('./index-CScBFiS1.js');
7
- var withHasError = require('./withHasError-Dspb3lIV.js');
3
+ var Order = require('./Order-DtpbD8mQ.js');
4
+ var DateStringFactory = require('./DateStringFactory-CfkXYAMN.js');
5
+ var index = require('./index-Cjw0q6gP.js');
6
+ var withHasError = require('./withHasError-B8gHkfV2.js');
8
7
 
9
8
  /**
10
9
  * Prop validators for Stencil @Watch handlers.
@@ -34,7 +33,7 @@ function validateScenarioList(value) {
34
33
  if (value.trim().toLowerCase() === "auto") {
35
34
  return [];
36
35
  }
37
- const invalidScenarios = value === null || value === void 0 ? void 0 : value.split(",").filter((element) => !(element.toUpperCase().trim() in constants.Scenarios));
36
+ const invalidScenarios = value === null || value === void 0 ? void 0 : value.split(",").filter((element) => !(element.toUpperCase().trim() in Order.Scenarios));
38
37
  return validateVariancesList(invalidScenarios.toString());
39
38
  }
40
39
  /**
@@ -56,9 +55,9 @@ function validateVariancesList(value) {
56
55
  const scenarioMinuend = (_b = splittedElement[1]) === null || _b === void 0 ? void 0 : _b.toUpperCase().trim();
57
56
  const scenarioSentiment = (_c = splittedElement[2]) === null || _c === void 0 ? void 0 : _c.toUpperCase().trim();
58
57
  return (splittedElement.length !== 3 ||
59
- !(scenarioSubtrahend in constants.Scenarios) ||
60
- !(scenarioMinuend in constants.Scenarios) ||
61
- !(scenarioSentiment in constants.Sentiments));
58
+ !(scenarioSubtrahend in Order.Scenarios) ||
59
+ !(scenarioMinuend in Order.Scenarios) ||
60
+ !(scenarioSentiment in Order.Sentiments));
62
61
  });
63
62
  return invalidScenarios;
64
63
  }
@@ -94,7 +93,7 @@ function isValidLevel(value) {
94
93
  if ((value === null || value === void 0 ? void 0 : value.toLowerCase()) === "auto") {
95
94
  return true;
96
95
  }
97
- return (value === null || value === void 0 ? void 0 : value.toUpperCase()) in constants.AggregationLevel;
96
+ return (value === null || value === void 0 ? void 0 : value.toUpperCase()) in Order.AggregationLevel;
98
97
  }
99
98
  function validateMeasureList(value) {
100
99
  if (isBlankInput(value)) {
@@ -111,51 +110,6 @@ function validateMeasureList(value) {
111
110
  }
112
111
  return ["Invalid JSON structure"];
113
112
  }
114
- function validateMarkerType(value) {
115
- if (isBlankInput(value)) {
116
- return [];
117
- }
118
- try {
119
- const newObj = JSON.parse(value);
120
- if (newObj instanceof Array) {
121
- return newObj.filter((elem) => !elem.hasOwnProperty("latitude") && !elem.hasOwnProperty("longitude") && !elem.hasOwnProperty("iconUrl"));
122
- }
123
- }
124
- catch (e) {
125
- throw e;
126
- }
127
- return ["Invalid JSON structure"];
128
- }
129
- function validateGpxType(value) {
130
- if (isBlankInput(value)) {
131
- return [];
132
- }
133
- try {
134
- const newObj = JSON.parse(value);
135
- if (newObj instanceof Array) {
136
- return newObj.filter((elem) => !elem.hasOwnProperty("file"));
137
- }
138
- }
139
- catch (e) {
140
- throw e;
141
- }
142
- return ["Invalid JSON structure"];
143
- }
144
- function validateGeojsonType(value) {
145
- if (isBlankInput(value)) {
146
- return [];
147
- }
148
- try {
149
- const newObj = JSON.parse(value);
150
- if (newObj instanceof Array) {
151
- return newObj.filter((elem) => !elem.hasOwnProperty("file"));
152
- }
153
- }
154
- catch (e) {
155
- throw e;
156
- }
157
- return ["Invalid JSON structure"];
158
- }
159
113
  function isValidDate(value) {
160
114
  const newDate = Date.parse(value);
161
115
  return Number.isInteger(newDate);
@@ -167,13 +121,13 @@ function isValidDateFormat(value) {
167
121
  return (value === null || value === void 0 ? void 0 : value.toUpperCase()) in DateStringFactory.DateDistance;
168
122
  }
169
123
  function isValidAxisLabelsMode(value) {
170
- return (value === null || value === void 0 ? void 0 : value.toUpperCase()) in constants.AxisLabelsMode;
124
+ return (value === null || value === void 0 ? void 0 : value.toUpperCase()) in Order.AxisLabelsMode;
171
125
  }
172
126
  function isValidDataFormat(value) {
173
127
  if (isBlankInput(value)) {
174
128
  return false;
175
129
  }
176
- return (value === null || value === void 0 ? void 0 : value.toUpperCase()) in constants.DataFormat;
130
+ return (value === null || value === void 0 ? void 0 : value.toUpperCase()) in Order.DataFormat;
177
131
  }
178
132
  function isValidBoolean(value) {
179
133
  if (isBlankInput(value)) {
@@ -186,7 +140,7 @@ function isValidTableType(value) {
186
140
  if (isBlankInput(value)) {
187
141
  return false;
188
142
  }
189
- return (value === null || value === void 0 ? void 0 : value.toUpperCase()) in constants.TableType;
143
+ return (value === null || value === void 0 ? void 0 : value.toUpperCase()) in Order.TableType;
190
144
  }
191
145
  function validateThereOfJsonStr(value) {
192
146
  if (isBlankInput(value)) {
@@ -221,7 +175,7 @@ function validatePartOfJsonStr(value) {
221
175
  return ["Invalid JSON structure"];
222
176
  }
223
177
  function isValidMeasureType(value) {
224
- return (value === null || value === void 0 ? void 0 : value.trim().toUpperCase()) in constants.MeasureType;
178
+ return (value === null || value === void 0 ? void 0 : value.trim().toUpperCase()) in Order.MeasureType;
225
179
  }
226
180
  /**
227
181
  * Validates a measure-scale attribute value.
@@ -232,7 +186,7 @@ function isValidMeasureScale(value) {
232
186
  return (["_", "k", "M", "G", "T", "P", "E", "Z", "Y", "m", "μ", "n", "p", "P", "f", "a", "z", "y"].includes(value === null || value === void 0 ? void 0 : value.trim()) || ["GREATEST", "LEAST"].includes(value === null || value === void 0 ? void 0 : value.trim().toUpperCase()));
233
187
  }
234
188
  function isTableCategoryWidth(value) {
235
- return (value === null || value === void 0 ? void 0 : value.toUpperCase().trim()) in constants.TableCategoryWidth;
189
+ return (value === null || value === void 0 ? void 0 : value.toUpperCase().trim()) in Order.TableCategoryWidth;
236
190
  }
237
191
  function validateColumnThereOfJsonStr(value) {
238
192
  if (isBlankInput(value)) {
@@ -554,9 +508,6 @@ exports.isValidMeasureType = isValidMeasureType;
554
508
  exports.isValidNumber = isValidNumber;
555
509
  exports.isValidTableType = isValidTableType;
556
510
  exports.validateColumnThereOfJsonStr = validateColumnThereOfJsonStr;
557
- exports.validateGeojsonType = validateGeojsonType;
558
- exports.validateGpxType = validateGpxType;
559
- exports.validateMarkerType = validateMarkerType;
560
511
  exports.validateMeasureList = validateMeasureList;
561
512
  exports.validateOrderList = validateOrderList;
562
513
  exports.validatePartOfJsonStr = validatePartOfJsonStr;
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var contextProtocol = require('./context-protocol-BkYHFkXE.js');
4
- var index = require('./index-CScBFiS1.js');
5
- var withHasError = require('./withHasError-Dspb3lIV.js');
3
+ var contextProtocol = require('./context-protocol-CRPmux5D.js');
4
+ var index = require('./index-Cjw0q6gP.js');
5
+ var withHasError = require('./withHasError-B8gHkfV2.js');
6
6
 
7
7
  /**
8
8
  * Mixin that provides i18n translation support to a Stencil component.
@@ -17,8 +17,6 @@
17
17
  "components/bn-internationalization/bn-internationalization.js",
18
18
  "components/bn-layout-card/bn-layout-card.js",
19
19
  "components/bn-layout-page/bn-layout-page.js",
20
- "components/bn-map/bn-map.js",
21
- "components/bn-map/ibcs-map/ibcs-map.js",
22
20
  "components/bn-message/bn-message.js",
23
21
  "components/bn-page/bn-page.js",
24
22
  "components/bn-table/bn-table.js",
@@ -28,14 +26,7 @@
28
26
  "components/bn-title/bn-title.js",
29
27
  "components/bn-title/ibcs-title/ibcs-title.js",
30
28
  "components/bn-tree/bn-tree.js",
31
- "components/editor-companion/editor-companion.js",
32
- "test-runner/test-runner-card.js",
33
- "test-runner/test-runner-chart-time.js",
34
- "test-runner/test-runner-chart.js",
35
- "test-runner/test-runner-map.js",
36
- "test-runner/test-runner-table.js",
37
- "test-runner/test-runner-time.js",
38
- "test-runner/test-runner-title.js"
29
+ "components/editor-companion/editor-companion.js"
39
30
  ],
40
31
  "mixins": [],
41
32
  "compiler": {
@@ -439,7 +439,7 @@ export class Chart {
439
439
  }
440
440
  preparePixelPerPercentage() {
441
441
  if (this.pixelPerUnitGroupMap.has(this.percentageScaling)) {
442
- return this.pixelPerUnitGroupMap.get(this.percentageScaling); // TODO(JHE): revisit '* 100' correctness when global scaling groups are implemented
442
+ return this.pixelPerUnitGroupMap.get(this.percentageScaling);
443
443
  }
444
444
  return Number(this.percentageScaling) * 100;
445
445
  }
@@ -497,7 +497,6 @@ export class Chart {
497
497
  };
498
498
  return tableOrder;
499
499
  }
500
- // TODO(JHE): consider extracting style preparation into an adapter pattern
501
500
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
502
501
  prepareStyle() {
503
502
  const effectiveFactor = this.getEffectiveScaleFactor();
@@ -658,7 +657,7 @@ export class Chart {
658
657
  scenariosArray = [...scenariosArray, ...variancesArray];
659
658
  }
660
659
  const fontStyles = this.getFontStyles();
661
- return (h(Host, { key: '292a75492d9ba0f6ae65e25aa9da26bc094ed69d', style: fontStyles }, h("div", { key: '97e10ab499494b6fb71c628cdab049b077e62c44', class: "container" }, scenariosArray.map(this.chartTemplate))));
660
+ return (h(Host, { key: 'c8ad939fbe92ab4a01af1e5ce17e097dbb5eab56', style: fontStyles }, h("div", { key: 'd786c49dd808c2dd9093ede7100e16ac52f50689', class: "container" }, scenariosArray.map(this.chartTemplate))));
662
661
  }
663
662
  static get is() { return "bn-chart-structure"; }
664
663
  static get encapsulation() { return "shadow"; }
@@ -456,7 +456,7 @@ export class Chart {
456
456
  */
457
457
  this.measureUnit = "";
458
458
  this.pixelPerUnitGroupMap = new Map();
459
- this._autoScaleIterations = 0;
459
+ this._autoScaleGuard = false;
460
460
  withStyled(this);
461
461
  withComponentStatus(this);
462
462
  withDataset(this, (_name, data) => {
@@ -496,7 +496,7 @@ export class Chart {
496
496
  var _a, _b;
497
497
  const { mode } = parseScaling(this.scale);
498
498
  if (mode !== "auto" && mode !== "empty") {
499
- this._autoScaleIterations = 0;
499
+ this._autoScaleGuard = false;
500
500
  // Keep existing width-based overflow warning for non-auto modes
501
501
  const parent = getParentDimensions(this.element);
502
502
  const errId = "WARN_overflow";
@@ -512,51 +512,43 @@ export class Chart {
512
512
  }
513
513
  return;
514
514
  }
515
+ if (this._autoScaleGuard) {
516
+ this._autoScaleGuard = false;
517
+ return;
518
+ }
515
519
  const host = this.element;
516
520
  const { width: parentWidth } = getParentDimensions(host);
517
521
  if (parentWidth <= 0)
518
522
  return;
519
- const div = (_a = host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(".container");
520
- const currentWidth = (_b = div === null || div === void 0 ? void 0 : div.scrollWidth) !== null && _b !== void 0 ? _b : host.scrollWidth;
523
+ // Measure at base (unscaled) font size to get true content width
521
524
  const baseFontSize = this.componentStyle(($) => { var _a; return ((_a = $["global"]) === null || _a === void 0 ? void 0 : _a["fontSizePx"]) || 13.3333; });
522
- // Content fits — no scaling needed (or current scale is sufficient)
523
- if (currentWidth <= parentWidth + 1) {
524
- this._autoScaleIterations = 0;
525
+ host.style.setProperty("--bn-font-size", `${baseFontSize}px`);
526
+ // Reading scrollWidth forces a synchronous reflow at base size
527
+ const div = (_a = host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(".container");
528
+ const unscaledWidth = (_b = div === null || div === void 0 ? void 0 : div.scrollWidth) !== null && _b !== void 0 ? _b : host.scrollWidth;
529
+ if (unscaledWidth <= parentWidth + 1) {
525
530
  this.errors.remove("AUTO_scale");
526
- // If previously scaled but content now fits at base, reset to 1
527
531
  if (this.appliedScaleFactor !== 1) {
528
- // Try resetting — if that overflows, the next didRender will re-scale
529
- this._autoScaleIterations = 1;
532
+ this._autoScaleGuard = true;
530
533
  this.appliedScaleFactor = 1;
531
- host.style.setProperty("--bn-font-size", `${baseFontSize}px`);
532
534
  }
533
535
  return;
534
536
  }
535
- // Prevent infinite loop
536
- if (this._autoScaleIterations >= Chart.MAX_SCALE_ITERATIONS) {
537
- this._autoScaleIterations = 0;
538
- return;
539
- }
540
- // Content overflows — compute multiplicative correction
541
- const correction = (parentWidth - 1) / currentWidth;
542
- const newFactor = this.appliedScaleFactor * correction;
543
- host.style.setProperty("--bn-font-size", `${baseFontSize * newFactor}px`);
537
+ const computedFactor = (parentWidth - 1) / unscaledWidth;
538
+ host.style.setProperty("--bn-font-size", `${baseFontSize * computedFactor}px`);
544
539
  if (mode === "empty") {
545
540
  this.errors.addOrReplace({
546
541
  id: "AUTO_scale",
547
542
  type: "warning",
548
- message: `Auto-scaled chart by factor ${newFactor.toFixed(3)}`,
543
+ message: `Auto-scaled chart by factor ${computedFactor.toFixed(3)}`,
549
544
  });
550
545
  }
551
546
  else {
552
547
  this.errors.remove("AUTO_scale");
553
548
  }
554
- if (Math.abs(newFactor - this.appliedScaleFactor) > 0.001) {
555
- this._autoScaleIterations++;
556
- this.appliedScaleFactor = newFactor;
557
- }
558
- else {
559
- this._autoScaleIterations = 0;
549
+ if (Math.abs(computedFactor - this.appliedScaleFactor) > 0.001) {
550
+ this._autoScaleGuard = true;
551
+ this.appliedScaleFactor = computedFactor;
560
552
  }
561
553
  }
562
554
  prepareDimension() {
@@ -637,7 +629,7 @@ export class Chart {
637
629
  }
638
630
  preparePixelPerPercentage() {
639
631
  if (this.pixelPerUnitGroupMap.has(this.percentageScaling)) {
640
- return this.pixelPerUnitGroupMap.get(this.percentageScaling); // TODO(JHE): revisit '* 100' correctness when global scaling groups are implemented
632
+ return this.pixelPerUnitGroupMap.get(this.percentageScaling);
641
633
  }
642
634
  return Number(this.percentageScaling) * 100;
643
635
  }
@@ -915,7 +907,7 @@ export class Chart {
915
907
  scenariosArray = [...scenariosArray, ...variancesArray];
916
908
  }
917
909
  const fontStyles = this.getFontStyles();
918
- return (h(Host, { key: 'b1fbfa70b5fda0078c06f5983e2defc9c603a96b', style: fontStyles }, h("div", { key: '96666d16869645a1bbe9382a019ac78534229e55', class: "container" }, scenariosArray.map(this.chartTemplate))));
910
+ return (h(Host, { key: 'ed9bf10764443d9b4be0bf05dbbcd858d271993a', style: fontStyles }, h("div", { key: 'c2bda702b470a4ddba2da84d81908d96ce893c8e', class: "container" }, scenariosArray.map(this.chartTemplate))));
919
911
  }
920
912
  static get is() { return "bn-chart-time"; }
921
913
  static get encapsulation() { return "shadow"; }
@@ -1507,4 +1499,3 @@ export class Chart {
1507
1499
  }];
1508
1500
  }
1509
1501
  }
1510
- Chart.MAX_SCALE_ITERATIONS = 3;
@@ -35,7 +35,7 @@ export class Footer {
35
35
  return assetsState[value] || value;
36
36
  }
37
37
  render() {
38
- return (h(Host, { key: 'fc5f029a310621d2dc911d05549a8128896d22bc', id: this.text || this.image ? "container-page-message" : "container", style: this.getFontStyles() }, h("div", { key: '7e8b92d010ade7d71360145c2d9ca82c5682dfb9', id: "message-text" }, this.text != null && this.text !== "" ? h("span", { class: "note" }, this.text) : ""), h("div", { key: 'b40fdf7a7af3ba9352015c42617b39aa9d17a0dc', id: "page-image" }, this.image != null && this.image !== "" ? h("img", { class: "image", src: this.prepareAssetUrl(this.image) }) : "")));
38
+ return (h(Host, { key: 'bbe7f6098aa6f3a5495b36557b218a82ec2ccbca', id: this.text || this.image ? "container-page-message" : "container", style: this.getFontStyles() }, h("div", { key: 'd89297da5605b0ee1cc757b1771b6a48525a24e5', id: "message-text" }, this.text != null && this.text !== "" ? h("span", { class: "note" }, this.text) : ""), h("div", { key: '70bc74b0a8a5a39fdd2931cf86faada294142a26', id: "page-image" }, this.image != null && this.image !== "" ? h("img", { class: "image", src: this.prepareAssetUrl(this.image) }) : "")));
39
39
  }
40
40
  static get is() { return "bn-message"; }
41
41
  static get encapsulation() { return "shadow"; }
@@ -38,7 +38,7 @@ export class Page {
38
38
  }
39
39
  }
40
40
  render() {
41
- return (h(Host, { key: '7623fe9a67534d467f10d7ad25afb201e895110f', format: this.format, orientation: this.orientation, style: this.prepareStyle() }, h("slot", { key: '8a2e3cce4449d2ce5ce898aff45ca8b4b903ab6c' })));
41
+ return (h(Host, { key: 'b4d682a8f6e83f77c58236265eaf9d1327809c6f', format: this.format, orientation: this.orientation, style: this.prepareStyle() }, h("slot", { key: 'ef49c43c1f8926c4c968b752608627adbe330d6c' })));
42
42
  }
43
43
  prepareStyle() {
44
44
  const pageStyle = {
@@ -878,7 +878,7 @@ export class Table {
878
878
  render() {
879
879
  const fontStyles = this.getFontStyles();
880
880
  const effectiveFactor = this.getEffectiveScaleFactor();
881
- return (h(Host, { key: 'ff1e93fe32fef547dfcd092016cbde05a82e54ce', style: fontStyles }, h("div", { key: '54a4539d8f67b50ed96036e66492a5a280cef987' }, h("ibcs-table", { key: '54a47b6ffd1ca979583b79339bfe19cbbaa00ce8', 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(), unitScaling: this.prepareUnitScaling(), percentageScaling: this.preparePercentageScaling(), scaleFactor: effectiveFactor }))));
881
+ return (h(Host, { key: '5434656c0626dc8aceea109e4f6ab795443a7c7b', style: fontStyles }, h("div", { key: 'a3d90ae3bce33b025bac95cc486aba1778907762' }, h("ibcs-table", { key: 'fbff577c7d0bf23f63f6d06edafd75e32a183b49', 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(), unitScaling: this.prepareUnitScaling(), percentageScaling: this.preparePercentageScaling(), scaleFactor: effectiveFactor }))));
882
882
  }
883
883
  static get is() { return "bn-table"; }
884
884
  static get encapsulation() { return "shadow"; }
@@ -7,7 +7,7 @@ export class Template {
7
7
  this.errors = withHasError(this);
8
8
  }
9
9
  render() {
10
- return (h(Host, { key: '0631cee9bc39ad92a09f85eba7c3baa1e680bcd8' }, h("slot", { key: '97677ca91f2c193b7ac3f3c3e897a5c89e93f565' })));
10
+ return (h(Host, { key: 'ef4bc925d3e711445f9533e0b1e59a8942700283' }, h("slot", { key: 'c338dd99289b256bab83240cf923b23fd62b4ef1' })));
11
11
  }
12
12
  static get is() { return "bn-template"; }
13
13
  static get encapsulation() { return "shadow"; }
@@ -264,7 +264,7 @@ export class Text {
264
264
  "--bn-font-color": fontStyles.color,
265
265
  "--bn-font-background": fontStyles.background,
266
266
  };
267
- return (h(Host, { key: '96ef774aa76e3ec2ef09d29fe92df0c427c4c94d', style: cssVars }, h("div", { key: 'fb1fc02d7e464c40043a24b8a59642d6ae5a6690' }, h("span", { key: 'a053d732b4965b31f696d34847ebaef5cb0e2e76', class: "container", ref: (el) => {
267
+ return (h(Host, { key: '49a4060ebb36623a64a41efbdefcdcc9060457c3', style: cssVars }, h("div", { key: '19f66b3d17d38d3c8119f9cb6b046e0d18c0f022' }, h("span", { key: '3b8cf9f75aeb668cb0c32a7a3540e0ed8f336050', class: "container", ref: (el) => {
268
268
  this.container = el;
269
269
  } }))));
270
270
  }
@@ -70,14 +70,6 @@ export class Title {
70
70
  *
71
71
  */
72
72
  this.dateLink = "none";
73
- this.scopedEval = (scope, script) => {
74
- try {
75
- return Function(`"use strict"; try { return ${script} } catch { return ""}`).bind(scope)();
76
- }
77
- catch (e) {
78
- console.error("bn-text", e);
79
- }
80
- };
81
73
  withStyled(this);
82
74
  withComponentStatus(this);
83
75
  this.t = withTranslation(this).t;
@@ -294,7 +286,7 @@ export class Title {
294
286
  }
295
287
  render() {
296
288
  const fontStyles = this.getFontStyles();
297
- return (h(Host, { key: '9c5abc4be100b587450ccaee6e94277a62d00cce', style: fontStyles }, h("ibcs-title", { key: 'b2655f2bc27cb1270e1b6a2d2418e409aa3257e3', businessUnit: this.prepareBusinessUnit(), scenarios: this.prepareScenarios(), measures: this.prepareMeasures(), timeperiod: this.prepareTitleTimePeriod(), order: this.prepareTitleOrder(), i18n: this.prepareI18n(), "i18n-mode": this.prepareI18nMode() })));
289
+ return (h(Host, { key: '029abd8096c5274f94123da2dc1c1e88e76be922', style: fontStyles }, h("ibcs-title", { key: 'c8b128a6ea36d44d8a0730898b35fa3f944e23ae', businessUnit: this.prepareBusinessUnit(), scenarios: this.prepareScenarios(), measures: this.prepareMeasures(), timeperiod: this.prepareTitleTimePeriod(), order: this.prepareTitleOrder(), i18n: this.prepareI18n(), "i18n-mode": this.prepareI18nMode() })));
298
290
  }
299
291
  static get is() { return "bn-title"; }
300
292
  static get encapsulation() { return "shadow"; }
@@ -36,7 +36,7 @@ export class IbcsTitle {
36
36
  });
37
37
  }
38
38
  render() {
39
- return (h("div", { key: '5c9f0c8cdfba5e01f46ee0e5ab820bb88811f365' }, h("div", { key: '2dce919eb35df3d35c696c95ad04d5e41a40c374' }, this.title.unit), h("div", { key: 'f5979715f3203637c7b2256b31230b3794902849' }, this.title.measures.map((measure, index) => (h("span", null, this.isFirstElement(index) ? this.title.i18n.get("SEPERATOR_WS") : "", h("span", { class: "measure" }, measure.name), " ", measure.unit ? this.title.i18n.get("in") : "", " ", measure.unit)))), h("div", { key: '6dbe3c259c571ec902afa2815e82997b37dd8f8c' }, this.title.dimension)));
39
+ return (h("div", { key: '08439c867ae47a9ee17ef8280801896a823c8826' }, h("div", { key: 'bb5b7325de2ae2f2e0bdba8d7f7f36511835efa9' }, this.title.unit), h("div", { key: '3edb730c95280ca0c47db70e32dd8e471747d989' }, this.title.measures.map((measure, index) => (h("span", null, this.isFirstElement(index) ? this.title.i18n.get("SEPERATOR_WS") : "", h("span", { class: "measure" }, measure.name), " ", measure.unit ? this.title.i18n.get("in") : "", " ", measure.unit)))), h("div", { key: '3bae51f2fddef6b2195d1c24915512b6255c9a75' }, this.title.dimension)));
40
40
  }
41
41
  componentWillLoad() {
42
42
  const config = this.prepareConfig();
@@ -39,7 +39,7 @@ export class EditorCompanion {
39
39
  return Promise.resolve(result);
40
40
  }
41
41
  render() {
42
- return h(Fragment, { key: '1380161960ef3791df5ddf8314818ae135d01de9' });
42
+ return h(Fragment, { key: 'ee282c29dd433c77fddae8e99e844bf299ebfa29' });
43
43
  }
44
44
  distinct(data, key) {
45
45
  return [...new Set(data.map((d) => d[key]))].filter((v) => v !== null && v !== undefined);
@@ -198,7 +198,6 @@ export class DateStringFactory {
198
198
  let span = toDate.diff(fromDate).as(unit);
199
199
  const days = [];
200
200
  if (span >= spanLimit) {
201
- console.warn("Clip Span from", span, "to spanLimit", spanLimit);
202
201
  span = spanLimit;
203
202
  }
204
203
  let currentDate = fromDate;
@@ -1 +1 @@
1
- import{e as t}from"./Order.js";var e,r;!function(t){t.YEAR="year",t.QUARTER="quarter",t.MONTH="month",t.WEEK="week",t.DAY="day",t.HOUR="hour",t.MINUTE="minute",t.SECOND="second",t.MILLISECOND="millisecond",t.NONE="fallback",t.AUTO="auto"}(e||(e={})),function(t){t.AVG="avg",t.INTERVAL="interval",t.START="start",t.END="end",t.YTD="ytd",t.YTG="ytg",t.CUM="cum",t.MAT="mat",t.NONE="none",t.AUTO="auto"}(r||(r={}));class s{constructor(){this._dateFormat={year:"yyyy",quarter:"q'Q' yyyy",month:"LLL yyyy",week:"'KW'WW yyyy",day:"dd.MM.yyyy",hour:"TT",minute:"TT",second:"TT",millisecond:"TT:SSS",fallback:"dd.MM.yyyy"},this._dateFormatShort={year:"yy",quarter:"q'Q'",month:"LLL",week:"'KW'WW",day:"dd",hour:"hh'h'",minute:"mm'm'",second:"ss's'",millisecond:"SSS'ms'",fallback:"dd.MM.yyyy"},this._dateLinkFormat={avg:"Ø[LINK]",interval:"[DATE]..[DATE2]",start:".[DATE]",end:"[DATE].",ytd:"_[DATE]",ytg:"[DATE]_",cum:"[DATE]_[DATE2]",mat:"~[DATE]",none:"[DATE]"},this.locale="de",this.dateFormat=this._dateFormat,this.dateLinkFormat=this._dateLinkFormat,this.dateFormatShort=this._dateFormatShort}setDateLinkFormat(t){this.dateLinkFormat=t}setDateFormat(t){this.dateFormat=t}setDateFormatShort(t){this.dateFormatShort=t}setLocale(t){this.locale=t}getDateString(t,e){return t.setLocale(this.locale).toFormat(this.dateFormat[e]||this.dateFormat.fallback)}getSmartDateString(t,r){switch(r){case e.DAY:return this.getFormatedDayDate(t);case e.MONTH:return this.getFormatedMonthDate(t);case e.QUARTER:return this.getFormatedQuarterDate(t);case e.WEEK:return this.getFormatedWeekDate(t);case e.HOUR:return this.getFormatedHourDate(t);case e.MINUTE:return this.getFormatedMinuteDate(t);case e.SECOND:return this.getFormatedSecondDate(t);case e.MILLISECOND:return this.getFormatedMilliSecondDate(t);default:return this.getDateString(t,r)}}calculateDistanceType(r,s,i=32){if(null==s)return e.DAY;const a="number"==typeof r?t.fromMillis(r):r,n="number"==typeof s?t.fromMillis(s):s;return 0===n.diff(a).as("milliseconds")?e.DAY:n.diff(a).as("milliseconds")<i?e.MILLISECOND:n.diff(a).as("seconds")<i?e.SECOND:n.diff(a).as("minutes")<i?e.MINUTE:n.diff(a).as("hours")<i?e.HOUR:n.diff(a).as("days")<i?e.DAY:n.diff(a).as("weeks")<i?e.WEEK:n.diff(a).as("months")<i?e.MONTH:n.diff(a).as("quarters")<i?e.QUARTER:e.YEAR}datesBetween(t,e,r,s){const i=this.convertDateDistanceToMomentunitOfTime(r),a=t.startOf(i),n=e.endOf(i);let h=n.diff(a).as(i);const u=[];h>=s&&(console.warn("Clip Span from",h,"to spanLimit",s),h=s);let o=a;do{u.push(o),o=o.plus(this.createDiratonLike(i,1))}while(o<=n&&u.length<h);return u}getDateLinkString(s,i,a,n,h){if(null==s&&null==i)return"";if(null==s&&a!==r.END&&a!==r.YTD)return"";if(null==i&&(r.INTERVAL===a||r.CUM===a||r.END===a||r.YTD===a))return"";const u=s||t.now(),o=i;n===e.AUTO&&(n=this.calculateDistanceType(u,o,h));let c=this.getDateString(u,n),l="",d=r.NONE;return null!=o&&(l=this.getDateString(o,n),d=r.INTERVAL,c===l&&a===r.INTERVAL&&(a=r.NONE),c===l&&a===r.AVG&&(d=r.NONE),r.END!==a&&r.YTD!==a||(c=l),(a===r.INTERVAL||a===r.CUM||r.AVG)&&(n===e.QUARTER?u.quarter===o.quarter&&u.year===o.year?l=l.replace(" "+o.year,""):u.year===o.year&&(c=c.replace(" "+u.year,"")):n===e.MONTH?u.month===o.month&&u.year===o.year?l=l.replace(" "+o.year,""):u.year===o.year&&(c=c.replace(" "+u.year,"")):n===e.WEEK&&(u.weekNumber===o.weekNumber&&u.year===o.year?l=l.replace(" "+o.year,""):u.year===o.year&&(c=c.replace(" "+u.year,""))))),this.dateLinkFormat[a].replace("[LINK]",this.dateLinkFormat[d]).replace("[DATE]",c).replace("[DATE2]",l)}getShortDateString(t,e){return t.setLocale(this.locale).toFormat(this.dateFormatShort[e]||this.dateFormatShort.fallback)}getFormatedDayDate(t){let e=this.dateFormatShort.day;return this.isFirstInMonth(t)&&(e+=" "+this.dateFormatShort.month),this.isJanuary(t)&&(e+=" "+this.dateFormatShort.year),t.setLocale(this.locale).toFormat(e)}getFormatedMonthDate(t){let e=this.dateFormatShort.month;return this.isJanuary(t)&&(e+=" "+this.dateFormatShort.year),t.setLocale(this.locale).toFormat(e)}getFormatedQuarterDate(t){let e=this.dateFormatShort.quarter;return this.isFirstQuarter(t)&&(e+=" "+this.dateFormatShort.year),t.setLocale(this.locale).toFormat(e)}getFormatedWeekDate(t){let e=this.dateFormatShort.week;return this.isFirstWeek(t)&&(e+=" "+this.dateFormatShort.year),t.setLocale(this.locale).toFormat(e)}getFormatedHourDate(t){let e=this.dateFormatShort.hour;return this.isFirstHour(t)&&(e+=" "+this.dateFormatShort.day),t.setLocale(this.locale).toFormat(e)}getFormatedMinuteDate(t){let e=this.dateFormatShort.minute;return this.isFirstMinute(t)&&(e=this.dateFormatShort.hour+":"+e),t.setLocale(this.locale).toFormat(e)}getFormatedSecondDate(t){let e=this.dateFormatShort.second;return this.isFirstSecond(t)&&(e=this.dateFormatShort.minute+":"+e),t.setLocale(this.locale).toFormat(e)}getFormatedMilliSecondDate(t){let e=this.dateFormatShort.millisecond;return this.isFirstMilliSecond(t)&&(e=this.dateFormatShort.second+":"+e),t.setLocale(this.locale).toFormat(e)}isFirstInMonth(t){return 1===t.day}isJanuary(t){return 1===t.month}isFirstQuarter(t){return 1===t.quarter}isFirstWeek(t){return 1===t.weekNumber}isFirstHour(t){return 0===t.hour}isFirstMinute(t){return 0===t.minute}isFirstSecond(t){return 0===t.second}isFirstMilliSecond(t){return 0===t.millisecond}convertDateDistanceToMomentunitOfTime(t){let r;switch(t){case e.YEAR:r="year";break;case e.MONTH:r="month";break;case e.QUARTER:r="quarter";break;case e.WEEK:r="week";break;case e.DAY:r="day";break;case e.HOUR:r="hour";break;case e.MINUTE:r="minute";break;case e.SECOND:r="second";break;case e.MILLISECOND:r="millisecond";break;default:r="day"}return r}createDiratonLike(t,e){switch(t){case"year":return{years:e};case"month":return{months:e};case"quarter":return{quarters:e};case"week":return{weeks:e};case"day":default:return{days:e};case"hour":return{hours:e};case"minute":return{minutes:e};case"second":return{seconds:e};case"millisecond":return{milliseconds:e}}}}export{e as D,r as a,s as b}
1
+ import{e as t}from"./Order.js";var e,r;!function(t){t.YEAR="year",t.QUARTER="quarter",t.MONTH="month",t.WEEK="week",t.DAY="day",t.HOUR="hour",t.MINUTE="minute",t.SECOND="second",t.MILLISECOND="millisecond",t.NONE="fallback",t.AUTO="auto"}(e||(e={})),function(t){t.AVG="avg",t.INTERVAL="interval",t.START="start",t.END="end",t.YTD="ytd",t.YTG="ytg",t.CUM="cum",t.MAT="mat",t.NONE="none",t.AUTO="auto"}(r||(r={}));class s{constructor(){this._dateFormat={year:"yyyy",quarter:"q'Q' yyyy",month:"LLL yyyy",week:"'KW'WW yyyy",day:"dd.MM.yyyy",hour:"TT",minute:"TT",second:"TT",millisecond:"TT:SSS",fallback:"dd.MM.yyyy"},this._dateFormatShort={year:"yy",quarter:"q'Q'",month:"LLL",week:"'KW'WW",day:"dd",hour:"hh'h'",minute:"mm'm'",second:"ss's'",millisecond:"SSS'ms'",fallback:"dd.MM.yyyy"},this._dateLinkFormat={avg:"Ø[LINK]",interval:"[DATE]..[DATE2]",start:".[DATE]",end:"[DATE].",ytd:"_[DATE]",ytg:"[DATE]_",cum:"[DATE]_[DATE2]",mat:"~[DATE]",none:"[DATE]"},this.locale="de",this.dateFormat=this._dateFormat,this.dateLinkFormat=this._dateLinkFormat,this.dateFormatShort=this._dateFormatShort}setDateLinkFormat(t){this.dateLinkFormat=t}setDateFormat(t){this.dateFormat=t}setDateFormatShort(t){this.dateFormatShort=t}setLocale(t){this.locale=t}getDateString(t,e){return t.setLocale(this.locale).toFormat(this.dateFormat[e]||this.dateFormat.fallback)}getSmartDateString(t,r){switch(r){case e.DAY:return this.getFormatedDayDate(t);case e.MONTH:return this.getFormatedMonthDate(t);case e.QUARTER:return this.getFormatedQuarterDate(t);case e.WEEK:return this.getFormatedWeekDate(t);case e.HOUR:return this.getFormatedHourDate(t);case e.MINUTE:return this.getFormatedMinuteDate(t);case e.SECOND:return this.getFormatedSecondDate(t);case e.MILLISECOND:return this.getFormatedMilliSecondDate(t);default:return this.getDateString(t,r)}}calculateDistanceType(r,s,i=32){if(null==s)return e.DAY;const a="number"==typeof r?t.fromMillis(r):r,n="number"==typeof s?t.fromMillis(s):s;return 0===n.diff(a).as("milliseconds")?e.DAY:n.diff(a).as("milliseconds")<i?e.MILLISECOND:n.diff(a).as("seconds")<i?e.SECOND:n.diff(a).as("minutes")<i?e.MINUTE:n.diff(a).as("hours")<i?e.HOUR:n.diff(a).as("days")<i?e.DAY:n.diff(a).as("weeks")<i?e.WEEK:n.diff(a).as("months")<i?e.MONTH:n.diff(a).as("quarters")<i?e.QUARTER:e.YEAR}datesBetween(t,e,r,s){const i=this.convertDateDistanceToMomentunitOfTime(r),a=t.startOf(i),n=e.endOf(i);let h=n.diff(a).as(i);const u=[];h>=s&&(h=s);let o=a;do{u.push(o),o=o.plus(this.createDiratonLike(i,1))}while(o<=n&&u.length<h);return u}getDateLinkString(s,i,a,n,h){if(null==s&&null==i)return"";if(null==s&&a!==r.END&&a!==r.YTD)return"";if(null==i&&(r.INTERVAL===a||r.CUM===a||r.END===a||r.YTD===a))return"";const u=s||t.now(),o=i;n===e.AUTO&&(n=this.calculateDistanceType(u,o,h));let c=this.getDateString(u,n),l="",d=r.NONE;return null!=o&&(l=this.getDateString(o,n),d=r.INTERVAL,c===l&&a===r.INTERVAL&&(a=r.NONE),c===l&&a===r.AVG&&(d=r.NONE),r.END!==a&&r.YTD!==a||(c=l),(a===r.INTERVAL||a===r.CUM||r.AVG)&&(n===e.QUARTER?u.quarter===o.quarter&&u.year===o.year?l=l.replace(" "+o.year,""):u.year===o.year&&(c=c.replace(" "+u.year,"")):n===e.MONTH?u.month===o.month&&u.year===o.year?l=l.replace(" "+o.year,""):u.year===o.year&&(c=c.replace(" "+u.year,"")):n===e.WEEK&&(u.weekNumber===o.weekNumber&&u.year===o.year?l=l.replace(" "+o.year,""):u.year===o.year&&(c=c.replace(" "+u.year,""))))),this.dateLinkFormat[a].replace("[LINK]",this.dateLinkFormat[d]).replace("[DATE]",c).replace("[DATE2]",l)}getShortDateString(t,e){return t.setLocale(this.locale).toFormat(this.dateFormatShort[e]||this.dateFormatShort.fallback)}getFormatedDayDate(t){let e=this.dateFormatShort.day;return this.isFirstInMonth(t)&&(e+=" "+this.dateFormatShort.month),this.isJanuary(t)&&(e+=" "+this.dateFormatShort.year),t.setLocale(this.locale).toFormat(e)}getFormatedMonthDate(t){let e=this.dateFormatShort.month;return this.isJanuary(t)&&(e+=" "+this.dateFormatShort.year),t.setLocale(this.locale).toFormat(e)}getFormatedQuarterDate(t){let e=this.dateFormatShort.quarter;return this.isFirstQuarter(t)&&(e+=" "+this.dateFormatShort.year),t.setLocale(this.locale).toFormat(e)}getFormatedWeekDate(t){let e=this.dateFormatShort.week;return this.isFirstWeek(t)&&(e+=" "+this.dateFormatShort.year),t.setLocale(this.locale).toFormat(e)}getFormatedHourDate(t){let e=this.dateFormatShort.hour;return this.isFirstHour(t)&&(e+=" "+this.dateFormatShort.day),t.setLocale(this.locale).toFormat(e)}getFormatedMinuteDate(t){let e=this.dateFormatShort.minute;return this.isFirstMinute(t)&&(e=this.dateFormatShort.hour+":"+e),t.setLocale(this.locale).toFormat(e)}getFormatedSecondDate(t){let e=this.dateFormatShort.second;return this.isFirstSecond(t)&&(e=this.dateFormatShort.minute+":"+e),t.setLocale(this.locale).toFormat(e)}getFormatedMilliSecondDate(t){let e=this.dateFormatShort.millisecond;return this.isFirstMilliSecond(t)&&(e=this.dateFormatShort.second+":"+e),t.setLocale(this.locale).toFormat(e)}isFirstInMonth(t){return 1===t.day}isJanuary(t){return 1===t.month}isFirstQuarter(t){return 1===t.quarter}isFirstWeek(t){return 1===t.weekNumber}isFirstHour(t){return 0===t.hour}isFirstMinute(t){return 0===t.minute}isFirstSecond(t){return 0===t.second}isFirstMilliSecond(t){return 0===t.millisecond}convertDateDistanceToMomentunitOfTime(t){let r;switch(t){case e.YEAR:r="year";break;case e.MONTH:r="month";break;case e.QUARTER:r="quarter";break;case e.WEEK:r="week";break;case e.DAY:r="day";break;case e.HOUR:r="hour";break;case e.MINUTE:r="minute";break;case e.SECOND:r="second";break;case e.MILLISECOND:r="millisecond";break;default:r="day"}return r}createDiratonLike(t,e){switch(t){case"year":return{years:e};case"month":return{months:e};case"quarter":return{quarters:e};case"week":return{weeks:e};case"day":default:return{days:e};case"hour":return{hours:e};case"minute":return{minutes:e};case"second":return{seconds:e};case"millisecond":return{milliseconds:e}}}}export{e as D,r as a,s as b}
@@ -1 +1 @@
1
- import{proxyCustomElement as e,HTMLElement as t,h as i,Host as s,transformTag as a}from"@stencil/core/internal/client";import{v as r,a as n,h as o,j as l,b as c,c as h,k as d,l as p,m as u,n as v,i as g}from"./validate.js";import{w as m}from"./withDataset.js";import{w as f,a as y}from"./withHasError.js";import{w as b}from"./withTranslation.js";import{a as S}from"./context-protocol.js";import{w}from"./withStyled.js";import{w as O}from"./withComponentStyle.js";import{g as k,p as x}from"./scaling.js";import{A as R,b as _,O as T,f as E,g as A}from"./Order.js";import{d as U}from"./ibcs-chart-structure2.js";const M=e(class extends t{validateScenario(e){const t=r(e),i="ERR_scenarios";t.length>0?this.errors.addOrReplace({id:i,type:"warning",message:"scenarios: invalid value(s) '"+JSON.stringify(t)+"' are not supported."}):this.errors.remove(i)}validateVariances(e){const t="ERR_variances",i=n(e);i.length>0?this.errors.addOrReplace({id:t,type:"warning",message:"variances: invalid value(s) '"+JSON.stringify(i)+"' are not supported."}):this.errors.remove(t)}validateUnitScaling(e){const t="ERR_unitScaling";o(e)||this.pixelPerUnitGroupMap.has(e)?this.errors.remove(t):this.errors.addOrReplace({id:t,type:"warning",message:"unitScaling: invalid value(s) '"+e+"' are not supported."})}validatePercentageScaling(e){const t="ERR_percentageScaling";o(e)||this.pixelPerUnitGroupMap.has(e)?this.errors.remove(t):this.errors.addOrReplace({id:t,type:"warning",message:"percentageScaling: invalid value(s) '"+e+"' are not supported."})}validateLevel(e){const t="ERR_level";l(e)?this.errors.remove(t):this.errors.addOrReplace({id:t,type:"warning",message:"level: invalid value(s) '"+e+"' are not supported."})}validateOrderList(e){const t=c(e),i="ERR_order";t.length>0?this.errors.addOrReplace({id:i,type:"warning",message:"order: invalid value(s) '"+JSON.stringify(t)+"' are not supported."}):this.errors.remove(i)}validateOrderDirection(e){const t="ERR_orderDirection";h(e)?this.errors.remove(t):this.errors.addOrReplace({id:t,type:"warning",message:"orderDirection: invalid value '"+(null==e?void 0:""+e)+"' is not supported."})}validateLimit(e){const t="ERR_limit";d(e)?this.errors.remove(t):this.errors.addOrReplace({id:t,type:"warning",message:"limit: invalid value '"+(null==e?void 0:""+e)+"' is not supported."})}validateShowCategories(e){const t="ERR_showCategories";p(e)?this.errors.remove(t):this.errors.addOrReplace({id:t,type:"warning",message:"showCategories: invalid value(s) '"+(null==e?void 0:""+e)+"' are not supported."})}validateMeasureScale(e){const t="ERR_measureScale";u(e)?this.errors.remove(t):this.errors.addOrReplace({id:t,type:"warning",message:"measureScale: invalid value '"+(null==e?void 0:""+e)+"' is not supported."})}validateShowMeasureScale(e){const t="ERR_grouped";p(e)?this.errors.remove(t):this.errors.addOrReplace({id:t,type:"warning",message:"showMeasureScale: invalid value(s) '"+(null==e?void 0:""+e)+"' are not supported."})}validateStack(e){const t="ERR_stack",i=v(e);i.length>0?this.errors.addOrReplace({id:t,type:"warning",message:i.join("; ")}):this.errors.remove(t)}validateScaling(e){if(null==e||""===e||"none"===e||"auto"===e)return void this.errors.remove("ERR_scale");const t=Number(e);isNaN(t)||t<=0?this.errors.addOrReplace({id:"ERR_scale",type:"warning",message:`Invalid scale value: "${e}". Use "none", "auto", or a positive number.`}):this.errors.remove("ERR_scale")}constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.data=[],this.datasetMeta=null,this.appliedScaleFactor=1,this.chartTitle="",this.filter="",this.limit=0,this.showCategories="true",this.measureScale="greatest",this.showMeasureScale="false",this.measureUnit="",this.stack="",this.scenariosArray=[""],this.pixelPerUnitGroupMap=new Map,this._autoScaleGuard=!1,w(this),f(this),m(this,((e,t)=>{this.data=t||[]}),((e,t)=>{this.datasetMeta=t})),this.chartTemplate=this.chartTemplate.bind(this),this.errors=y(this),this.componentStyle=O(this),this.t=b(this).t}componentWillLoad(){this.validateScenario(this.scenarios),this.validateVariances(this.variances),this.validateUnitScaling(this.unitScaling),this.validateLevel(this.level),this.validateOrderDirection(this.orderDirection),this.validateOrderList(this.order),this.validateShowCategories(this.showCategories),this.validateMeasureScale(this.measureScale),this.validateShowMeasureScale(this.showMeasureScale),this.validateStack(this.stack),this.validateScaling(this.scale)}componentDidRender(){var e,t;const{mode:i}=x(this.scale);if("auto"!==i&&"empty"!==i){this._autoScaleGuard=!1;const e=k(this.element),t="WARN_overflow";return void(e.width>0&&this.element.scrollWidth>e.width+1?this.errors.addOrReplace({id:t,type:"warning",message:"Chart exceeds available space and will be cut off. Check unit-scaling value."}):this.errors.remove(t))}if(this._autoScaleGuard)return void(this._autoScaleGuard=!1);const s=this.element,{height:a}=k(s);if(a<=0)return;const r=this.componentStyle((e=>{var t;return(null===(t=e.global)||void 0===t?void 0:t.fontSizePx)||13.3333}));s.style.setProperty("--bn-font-size",r+"px");const n=null===(e=s.shadowRoot)||void 0===e?void 0:e.querySelector(".container"),o=null!==(t=null==n?void 0:n.scrollHeight)&&void 0!==t?t:s.scrollHeight;if(o<=a+1)return this.errors.remove("AUTO_scale"),void(1!==this.appliedScaleFactor&&(this._autoScaleGuard=!0,this.appliedScaleFactor=1));const l=(a-1)/o;s.style.setProperty("--bn-font-size",r*l+"px"),"empty"===i?this.errors.addOrReplace({id:"AUTO_scale",type:"warning",message:"Auto-scaled chart by factor "+l.toFixed(3)}):this.errors.remove("AUTO_scale"),Math.abs(l-this.appliedScaleFactor)>.001&&(this._autoScaleGuard=!0,this.appliedScaleFactor=l)}prepareDimension(){const e=k(this.element);return this.canvasWidthSegmented=e.width/this.scenariosArray.length,{width:this.canvasWidthSegmented,height:e.height}}prepareScenarios(){var e,t,i,s;const a="auto"===(null===(e=this.scenarios)||void 0===e?void 0:e.trim().toLowerCase());return g(this.scenarios)||a?(null===(i=null===(t=this.datasetMeta)||void 0===t?void 0:t.availableScenarios)||void 0===i?void 0:i.length)>0?(a?this.errors.remove("AUTO_scenarios"):this.errors.addOrReplace({id:"AUTO_scenarios",type:"warning",message:"scenarios: not set, auto-detected: "+this.datasetMeta.availableScenarios.join(",")}),this.datasetMeta.availableScenarios):[]:(this.errors.remove("AUTO_scenarios"),null===(s=this.scenarios)||void 0===s?void 0:s.split(",").map((e=>e.trim())))}prepareVariances(){var e;return g(this.variances)?[]:null===(e=this.variances)||void 0===e?void 0:e.split(",").map((e=>e.trim()))}prepareHideCategories(e){return e>=1||"true"!==this.showCategories}prepareI18n(){const e=S,t=new Map([].map((e=>[e,this.t(".".concat(e))]))),i=new Map(e.map((e=>[e,this.t("global.".concat(e))])));return new Map([...i.entries(),...t.entries()])}preparePixelPerUnit(){var e;if(this.pixelPerUnitGroupMap.has(this.unitScaling))return this.errors.remove("AUTO_unitScaling"),this.pixelPerUnitGroupMap.get(this.unitScaling);if("auto"===(null===(e=this.unitScaling)||void 0===e?void 0:(""+e).trim().toLowerCase()))return this.errors.remove("AUTO_unitScaling"),0;const t=Number(this.unitScaling);return!isNaN(t)&&t>0?(this.errors.remove("AUTO_unitScaling"),t):(this.errors.addOrReplace({id:"AUTO_unitScaling",type:"warning",message:"unit-scaling: not set, auto-calculated to fit available space."}),0)}preparePixelPerPercentage(){return this.pixelPerUnitGroupMap.has(this.percentageScaling)?this.pixelPerUnitGroupMap.get(this.percentageScaling):100*Number(this.percentageScaling)}prepareLevel(){var e,t,i;const s="auto"===(null===(e=this.level)||void 0===e?void 0:e.trim().toLowerCase());return g(this.level)||s?(null===(t=this.datasetMeta)||void 0===t?void 0:t.suggestedLevel)?(s?this.errors.remove("AUTO_level"):this.errors.addOrReplace({id:"AUTO_level",type:"warning",message:"level: not set, auto-detected: "+this.datasetMeta.suggestedLevel}),R[this.datasetMeta.suggestedLevel.toUpperCase()]):void 0:(this.errors.remove("AUTO_level"),R[null===(i=this.level)||void 0===i?void 0:i.toUpperCase()])}prepareOrder(){var e,t,i;const s="auto"===(null===(e=this.order)||void 0===e?void 0:e.trim().toLowerCase());let a;return g(this.order)||s?(null===(t=this.datasetMeta)||void 0===t?void 0:t.suggestedOrder)?(s?this.errors.remove("AUTO_order"):this.errors.addOrReplace({id:"AUTO_order",type:"warning",message:"order: not set, auto-detected: "+this.datasetMeta.suggestedOrder}),a=this.datasetMeta.suggestedOrder):a=this.order:(this.errors.remove("AUTO_order"),a=this.order),{hierarchy:null==a?void 0:a.split(",").map((e=>T[null==e?void 0:e.toUpperCase()])),direction:_[null===(i=this.orderDirection)||void 0===i?void 0:i.toUpperCase()]}}prepareStyle(){const e=this.getEffectiveScaleFactor();return this.componentStyle((t=>{const i=t.global.fontSizePx*e;return{scaleFactors:{scenarioOffset:t["bn-chart-structure"].scaleFactors.scenarioOffset,scenarioLabelToBar:t["bn-chart-structure"].scaleFactors.scenarioLabelToBar,labelToBar:t["bn-chart-structure"].scaleFactors.labelToBar,labelToAxis:t["bn-chart-structure"].scaleFactors.labelToAxis,needleWidth:t["bn-chart-structure"].scaleFactors.needleWidth,needleHeadWidth:t["bn-chart-structure"].scaleFactors.needleHeadWidth,barWidth:t["bn-chart-structure"].scaleFactors.barWidth,varianceAxisLineWidth:t["bn-chart-structure"].scaleFactors.varianceAxisLineWidth,axisLineWidth:t["bn-chart-structure"].scaleFactors.axisLineWidth,auxiliaryLineWidth:t["bn-chart-structure"].scaleFactors.auxiliaryLineWidth,scenarioLineWidth:t["bn-chart-structure"].scaleFactors.scenarioLineWidth,markerWidth:t["bn-chart-structure"].scaleFactors.markerWidth,markerOffset:t["bn-chart-structure"].scaleFactors.markerOffset,categoryWidth:t["bn-chart-structure"].scaleFactors.categoryWidth,axisTickLength:t["bn-chart-structure"].scaleFactors.axisTickLength},fontStyles:{font:`${i}px ${t.global.fontFamily}`,size:i,color:t.global.fontColor,background:t.global.fontBackgroundColor,leading:1.8},axisStyles:t["bn-chart-structure"].axisStyles,barStyles:t["bn-chart-structure"].barStyles,varianceStyles:t["bn-chart-structure"].varianceStyles,padding:t["bn-chart-structure"].padding,pattern:null}}))}prepareChartTitle(e){return e>=1?"":this.chartTitle}prepareStackConfig(){if(g(this.stack))return null;try{const e=JSON.parse(this.stack);return{by:e.by,mode:e.mode||A.ABSOLUTE,order:e.order||E.DATASET}}catch(e){return null}}prepareFilter(){return 0===this.filter.length?"":this.filter}prepareLimit(){return Math.floor(Number(this.limit)||0)}getDataStructure(){return{IStructureChartDataRow:{operation:{type:"string",isOptional:!1,description:""},rowGroup:{type:"string",isOptional:!1,description:""},rowGroupIndex:{type:"number",isOptional:!1,description:""},category:{type:"string",isOptional:!1,description:""},categoryIndex:{type:"number",isOptional:!1,description:""},subCategory:{type:"string",isOptional:!1,description:""},subCategoryIndex:{type:"number",isOptional:!1,description:""},columnGroup:{type:"string",isOptional:!1,description:""},columnGroupIndex:{type:"number",isOptional:!1,description:""},columnSubGroup:{type:"string",isOptional:!1,description:""},columnSubGroupIndex:{type:"number",isOptional:!1,description:""},ac1:{type:"number",isOptional:!1,description:""},ac2:{type:"number",isOptional:!1,description:""},ac3:{type:"number",isOptional:!1,description:""},ac4:{type:"number",isOptional:!1,description:""},pp1:{type:"number",isOptional:!1,description:""},pp2:{type:"number",isOptional:!1,description:""},pp3:{type:"number",isOptional:!1,description:""},pp4:{type:"number",isOptional:!1,description:""},fc1:{type:"number",isOptional:!1,description:""},fc2:{type:"number",isOptional:!1,description:""},fc3:{type:"number",isOptional:!1,description:""},fc4:{type:"number",isOptional:!1,description:""},pl1:{type:"number",isOptional:!1,description:""},pl2:{type:"number",isOptional:!1,description:""},pl3:{type:"number",isOptional:!1,description:""},pl4:{type:"number",isOptional:!1,description:""}}}}prepareMeasureScale(){return g(this.measureScale)?"GREATEST":["_","k","M","G","T","P","E","Z","Y","m","μ","n","p","P","f","a","z","y"].includes(this.measureScale.trim())||"LEAST"===this.measureScale.trim().toUpperCase()?this.measureScale.trim():"GREATEST"}prepareShowMeasureScale(e){return 0===e&&"true"===this.showMeasureScale}prepareMeasureUnit(){return""===this.measureUnit||null==this.measureUnit?"":this.measureUnit}chartTemplate(e,t){const s=this.getEffectiveScaleFactor(),a=this.preparePixelPerUnit(),r=this.preparePixelPerPercentage();return i("ibcs-chart-structure",{data:this.data,chartTitle:this.prepareChartTitle(t),scenarios:this.prepareScenarios(),variances:[e],hideCategories:this.prepareHideCategories(t),pixelPerUnit:a>0?a*s:0,pixelPerPercentage:r>0?r*s:0,limit:this.prepareLimit(),styles:this.prepareStyle(),i18n:this.prepareI18n(),order:this.prepareOrder(),level:this.prepareLevel(),filter:this.prepareFilter(),"measure-scale":this.prepareMeasureScale(),"measure-unit":this.prepareMeasureUnit(),showMeasureScale:this.prepareShowMeasureScale(t),stackConfig:this.prepareStackConfig(),parentDimensions:this.prepareDimension()})}getEffectiveScaleFactor(){const{mode:e,factor:t}=x(this.scale);return"factor"===e?t:"auto"===e||"empty"===e?this.appliedScaleFactor:1}getFontStyles(){const e=this.getEffectiveScaleFactor();return this.componentStyle((t=>{var i,s,a,r;const n=(null===(i=t.global)||void 0===i?void 0:i.fontSizePx)||13.3333;return{"--bn-font-family":(null===(s=t.global)||void 0===s?void 0:s.fontFamily)||"'Noto Sans', sans-serif","--bn-font-size":n*e+"px","--bn-font-color":(null===(a=t.global)||void 0===a?void 0:a.fontColor)||"#000000","--bn-font-background":(null===(r=t.global)||void 0===r?void 0:r.fontBackgroundColor)||"#ffffff"}}))}render(){let e=[""];const t=this.prepareVariances();t.length>0&&(e=[...e,...t]);const a=this.getFontStyles();return i(s,{key:"292a75492d9ba0f6ae65e25aa9da26bc094ed69d",style:a},i("div",{key:"97e10ab499494b6fb71c628cdab049b077e62c44",class:"container"},e.map(this.chartTemplate)))}get element(){return this}static get watchers(){return{scenarios:[{validateScenario:0}],variances:[{validateVariances:0}],unitScaling:[{validateUnitScaling:0}],percentageScaling:[{validatePercentageScaling:0}],level:[{validateLevel:0}],order:[{validateOrderList:0}],orderDirection:[{validateOrderDirection:0}],limit:[{validateLimit:0}],showCategories:[{validateShowCategories:0}],measureScale:[{validateMeasureScale:0}],showMeasureScale:[{validateShowMeasureScale:0}],stack:[{validateStack:0}],scale:[{validateScaling:0}]}}static get style(){return':host{display:inline-block;position:relative;overflow:hidden}.container{display:flex;flex-direction:row}.background-image{display:flex;flex-wrap:wrap;justify-content:flex-end}.categories{text-align:right;font-size:var(--bn-font-size, 1em);font-family:var(--bn-font-family, "Noto Sans", "Helvetica Neue", Helvetica, sans-serif);color:var(--bn-font-color, black)}.label-bg{fill:var(--bn-font-background, white);opacity:0.7}.label-text{text-align:right;font-size:var(--bn-font-size, 1em);font-family:var(--bn-font-family, "Noto Sans", "Helvetica Neue", Helvetica, sans-serif);color:var(--bn-font-color, black)}.axis-title{text-align:center;font-family:var(--bn-font-family, "Noto Sans", "Helvetica Neue", Helvetica, sans-serif);color:var(--bn-font-color, black)}.axis-ac{stroke:black;stroke-width:0.1em}.axis-pp{stroke:grey;stroke-width:0.1em}.axis-fc{stroke:black;stroke-dasharray:2;stroke-width:0.1em}.axis-pl{stroke:white;stroke-width:0.1em;outline-offset:0em;outline:0.1em solid black}canvas{image-rendering:-moz-crisp-edges;image-rendering:-webkit-crisp-edges;image-rendering:pixelated;image-rendering:crisp-edges}.measure{font-weight:bold}span{display:inline-block}.hidePatternContainer{height:0;width:0}div{float:left}.warning{font-size:0.8em;font-style:italic}.footer{margin:0.2em;font-size:0.6em}.footer-hide{margin:0.2em;font-size:0.6em;opacity:0}'}},[1,"bn-chart-structure",{chartTitle:[1,"chart-title"],filter:[1],scenarios:[1],variances:[1],unitScaling:[8,"unit-scaling"],percentageScaling:[8,"percentage-scaling"],level:[1],order:[1],orderDirection:[1,"order-direction"],limit:[2],showCategories:[1,"show-categories"],measureScale:[1,"measure-scale"],showMeasureScale:[1,"show-measure-scale"],measureUnit:[1,"measure-unit"],stack:[1],scale:[1],data:[32],datasetMeta:[32],appliedScaleFactor:[32]},void 0,{scenarios:[{validateScenario:0}],variances:[{validateVariances:0}],unitScaling:[{validateUnitScaling:0}],percentageScaling:[{validatePercentageScaling:0}],level:[{validateLevel:0}],order:[{validateOrderList:0}],orderDirection:[{validateOrderDirection:0}],limit:[{validateLimit:0}],showCategories:[{validateShowCategories:0}],measureScale:[{validateMeasureScale:0}],showMeasureScale:[{validateShowMeasureScale:0}],stack:[{validateStack:0}],scale:[{validateScaling:0}]}]),C=M,N=function(){"undefined"!=typeof customElements&&["bn-chart-structure","ibcs-chart-structure"].forEach((e=>{switch(e){case"bn-chart-structure":customElements.get(a(e))||customElements.define(a(e),M);break;case"ibcs-chart-structure":customElements.get(a(e))||U()}}))};export{C as BnChartStructure,N as defineCustomElement}
1
+ import{proxyCustomElement as e,HTMLElement as t,h as i,Host as s,transformTag as a}from"@stencil/core/internal/client";import{v as r,a as n,h as o,j as l,b as c,c as d,k as h,l as p,m as u,n as v,i as g}from"./validate.js";import{w as m,g as f,p as y}from"./scaling.js";import{w as b,a as S}from"./withHasError.js";import{w}from"./withTranslation.js";import{a as O}from"./context-protocol.js";import{w as k}from"./withStyled.js";import{w as x}from"./withComponentStyle.js";import{A as R,b as _,O as T,f as E,g as A}from"./Order.js";import{d as U}from"./ibcs-chart-structure2.js";const M=e(class extends t{validateScenario(e){const t=r(e),i="ERR_scenarios";t.length>0?this.errors.addOrReplace({id:i,type:"warning",message:"scenarios: invalid value(s) '"+JSON.stringify(t)+"' are not supported."}):this.errors.remove(i)}validateVariances(e){const t="ERR_variances",i=n(e);i.length>0?this.errors.addOrReplace({id:t,type:"warning",message:"variances: invalid value(s) '"+JSON.stringify(i)+"' are not supported."}):this.errors.remove(t)}validateUnitScaling(e){const t="ERR_unitScaling";o(e)||this.pixelPerUnitGroupMap.has(e)?this.errors.remove(t):this.errors.addOrReplace({id:t,type:"warning",message:"unitScaling: invalid value(s) '"+e+"' are not supported."})}validatePercentageScaling(e){const t="ERR_percentageScaling";o(e)||this.pixelPerUnitGroupMap.has(e)?this.errors.remove(t):this.errors.addOrReplace({id:t,type:"warning",message:"percentageScaling: invalid value(s) '"+e+"' are not supported."})}validateLevel(e){const t="ERR_level";l(e)?this.errors.remove(t):this.errors.addOrReplace({id:t,type:"warning",message:"level: invalid value(s) '"+e+"' are not supported."})}validateOrderList(e){const t=c(e),i="ERR_order";t.length>0?this.errors.addOrReplace({id:i,type:"warning",message:"order: invalid value(s) '"+JSON.stringify(t)+"' are not supported."}):this.errors.remove(i)}validateOrderDirection(e){const t="ERR_orderDirection";d(e)?this.errors.remove(t):this.errors.addOrReplace({id:t,type:"warning",message:"orderDirection: invalid value '"+(null==e?void 0:""+e)+"' is not supported."})}validateLimit(e){const t="ERR_limit";h(e)?this.errors.remove(t):this.errors.addOrReplace({id:t,type:"warning",message:"limit: invalid value '"+(null==e?void 0:""+e)+"' is not supported."})}validateShowCategories(e){const t="ERR_showCategories";p(e)?this.errors.remove(t):this.errors.addOrReplace({id:t,type:"warning",message:"showCategories: invalid value(s) '"+(null==e?void 0:""+e)+"' are not supported."})}validateMeasureScale(e){const t="ERR_measureScale";u(e)?this.errors.remove(t):this.errors.addOrReplace({id:t,type:"warning",message:"measureScale: invalid value '"+(null==e?void 0:""+e)+"' is not supported."})}validateShowMeasureScale(e){const t="ERR_grouped";p(e)?this.errors.remove(t):this.errors.addOrReplace({id:t,type:"warning",message:"showMeasureScale: invalid value(s) '"+(null==e?void 0:""+e)+"' are not supported."})}validateStack(e){const t="ERR_stack",i=v(e);i.length>0?this.errors.addOrReplace({id:t,type:"warning",message:i.join("; ")}):this.errors.remove(t)}validateScaling(e){if(null==e||""===e||"none"===e||"auto"===e)return void this.errors.remove("ERR_scale");const t=Number(e);isNaN(t)||t<=0?this.errors.addOrReplace({id:"ERR_scale",type:"warning",message:`Invalid scale value: "${e}". Use "none", "auto", or a positive number.`}):this.errors.remove("ERR_scale")}constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.data=[],this.datasetMeta=null,this.appliedScaleFactor=1,this.chartTitle="",this.filter="",this.limit=0,this.showCategories="true",this.measureScale="greatest",this.showMeasureScale="false",this.measureUnit="",this.stack="",this.scenariosArray=[""],this.pixelPerUnitGroupMap=new Map,this._autoScaleGuard=!1,k(this),b(this),m(this,((e,t)=>{this.data=t||[]}),((e,t)=>{this.datasetMeta=t})),this.chartTemplate=this.chartTemplate.bind(this),this.errors=S(this),this.componentStyle=x(this),this.t=w(this).t}componentWillLoad(){this.validateScenario(this.scenarios),this.validateVariances(this.variances),this.validateUnitScaling(this.unitScaling),this.validateLevel(this.level),this.validateOrderDirection(this.orderDirection),this.validateOrderList(this.order),this.validateShowCategories(this.showCategories),this.validateMeasureScale(this.measureScale),this.validateShowMeasureScale(this.showMeasureScale),this.validateStack(this.stack),this.validateScaling(this.scale)}componentDidRender(){var e,t;const{mode:i}=y(this.scale);if("auto"!==i&&"empty"!==i){this._autoScaleGuard=!1;const e=f(this.element),t="WARN_overflow";return void(e.width>0&&this.element.scrollWidth>e.width+1?this.errors.addOrReplace({id:t,type:"warning",message:"Chart exceeds available space and will be cut off. Check unit-scaling value."}):this.errors.remove(t))}if(this._autoScaleGuard)return void(this._autoScaleGuard=!1);const s=this.element,{height:a}=f(s);if(a<=0)return;const r=this.componentStyle((e=>{var t;return(null===(t=e.global)||void 0===t?void 0:t.fontSizePx)||13.3333}));s.style.setProperty("--bn-font-size",r+"px");const n=null===(e=s.shadowRoot)||void 0===e?void 0:e.querySelector(".container"),o=null!==(t=null==n?void 0:n.scrollHeight)&&void 0!==t?t:s.scrollHeight;if(o<=a+1)return this.errors.remove("AUTO_scale"),void(1!==this.appliedScaleFactor&&(this._autoScaleGuard=!0,this.appliedScaleFactor=1));const l=(a-1)/o;s.style.setProperty("--bn-font-size",r*l+"px"),"empty"===i?this.errors.addOrReplace({id:"AUTO_scale",type:"warning",message:"Auto-scaled chart by factor "+l.toFixed(3)}):this.errors.remove("AUTO_scale"),Math.abs(l-this.appliedScaleFactor)>.001&&(this._autoScaleGuard=!0,this.appliedScaleFactor=l)}prepareDimension(){const e=f(this.element);return this.canvasWidthSegmented=e.width/this.scenariosArray.length,{width:this.canvasWidthSegmented,height:e.height}}prepareScenarios(){var e,t,i,s;const a="auto"===(null===(e=this.scenarios)||void 0===e?void 0:e.trim().toLowerCase());return g(this.scenarios)||a?(null===(i=null===(t=this.datasetMeta)||void 0===t?void 0:t.availableScenarios)||void 0===i?void 0:i.length)>0?(a?this.errors.remove("AUTO_scenarios"):this.errors.addOrReplace({id:"AUTO_scenarios",type:"warning",message:"scenarios: not set, auto-detected: "+this.datasetMeta.availableScenarios.join(",")}),this.datasetMeta.availableScenarios):[]:(this.errors.remove("AUTO_scenarios"),null===(s=this.scenarios)||void 0===s?void 0:s.split(",").map((e=>e.trim())))}prepareVariances(){var e;return g(this.variances)?[]:null===(e=this.variances)||void 0===e?void 0:e.split(",").map((e=>e.trim()))}prepareHideCategories(e){return e>=1||"true"!==this.showCategories}prepareI18n(){const e=O,t=new Map([].map((e=>[e,this.t(".".concat(e))]))),i=new Map(e.map((e=>[e,this.t("global.".concat(e))])));return new Map([...i.entries(),...t.entries()])}preparePixelPerUnit(){var e;if(this.pixelPerUnitGroupMap.has(this.unitScaling))return this.errors.remove("AUTO_unitScaling"),this.pixelPerUnitGroupMap.get(this.unitScaling);if("auto"===(null===(e=this.unitScaling)||void 0===e?void 0:(""+e).trim().toLowerCase()))return this.errors.remove("AUTO_unitScaling"),0;const t=Number(this.unitScaling);return!isNaN(t)&&t>0?(this.errors.remove("AUTO_unitScaling"),t):(this.errors.addOrReplace({id:"AUTO_unitScaling",type:"warning",message:"unit-scaling: not set, auto-calculated to fit available space."}),0)}preparePixelPerPercentage(){return this.pixelPerUnitGroupMap.has(this.percentageScaling)?this.pixelPerUnitGroupMap.get(this.percentageScaling):100*Number(this.percentageScaling)}prepareLevel(){var e,t,i;const s="auto"===(null===(e=this.level)||void 0===e?void 0:e.trim().toLowerCase());return g(this.level)||s?(null===(t=this.datasetMeta)||void 0===t?void 0:t.suggestedLevel)?(s?this.errors.remove("AUTO_level"):this.errors.addOrReplace({id:"AUTO_level",type:"warning",message:"level: not set, auto-detected: "+this.datasetMeta.suggestedLevel}),R[this.datasetMeta.suggestedLevel.toUpperCase()]):void 0:(this.errors.remove("AUTO_level"),R[null===(i=this.level)||void 0===i?void 0:i.toUpperCase()])}prepareOrder(){var e,t,i;const s="auto"===(null===(e=this.order)||void 0===e?void 0:e.trim().toLowerCase());let a;return g(this.order)||s?(null===(t=this.datasetMeta)||void 0===t?void 0:t.suggestedOrder)?(s?this.errors.remove("AUTO_order"):this.errors.addOrReplace({id:"AUTO_order",type:"warning",message:"order: not set, auto-detected: "+this.datasetMeta.suggestedOrder}),a=this.datasetMeta.suggestedOrder):a=this.order:(this.errors.remove("AUTO_order"),a=this.order),{hierarchy:null==a?void 0:a.split(",").map((e=>T[null==e?void 0:e.toUpperCase()])),direction:_[null===(i=this.orderDirection)||void 0===i?void 0:i.toUpperCase()]}}prepareStyle(){const e=this.getEffectiveScaleFactor();return this.componentStyle((t=>{const i=t.global.fontSizePx*e;return{scaleFactors:{scenarioOffset:t["bn-chart-structure"].scaleFactors.scenarioOffset,scenarioLabelToBar:t["bn-chart-structure"].scaleFactors.scenarioLabelToBar,labelToBar:t["bn-chart-structure"].scaleFactors.labelToBar,labelToAxis:t["bn-chart-structure"].scaleFactors.labelToAxis,needleWidth:t["bn-chart-structure"].scaleFactors.needleWidth,needleHeadWidth:t["bn-chart-structure"].scaleFactors.needleHeadWidth,barWidth:t["bn-chart-structure"].scaleFactors.barWidth,varianceAxisLineWidth:t["bn-chart-structure"].scaleFactors.varianceAxisLineWidth,axisLineWidth:t["bn-chart-structure"].scaleFactors.axisLineWidth,auxiliaryLineWidth:t["bn-chart-structure"].scaleFactors.auxiliaryLineWidth,scenarioLineWidth:t["bn-chart-structure"].scaleFactors.scenarioLineWidth,markerWidth:t["bn-chart-structure"].scaleFactors.markerWidth,markerOffset:t["bn-chart-structure"].scaleFactors.markerOffset,categoryWidth:t["bn-chart-structure"].scaleFactors.categoryWidth,axisTickLength:t["bn-chart-structure"].scaleFactors.axisTickLength},fontStyles:{font:`${i}px ${t.global.fontFamily}`,size:i,color:t.global.fontColor,background:t.global.fontBackgroundColor,leading:1.8},axisStyles:t["bn-chart-structure"].axisStyles,barStyles:t["bn-chart-structure"].barStyles,varianceStyles:t["bn-chart-structure"].varianceStyles,padding:t["bn-chart-structure"].padding,pattern:null}}))}prepareChartTitle(e){return e>=1?"":this.chartTitle}prepareStackConfig(){if(g(this.stack))return null;try{const e=JSON.parse(this.stack);return{by:e.by,mode:e.mode||A.ABSOLUTE,order:e.order||E.DATASET}}catch(e){return null}}prepareFilter(){return 0===this.filter.length?"":this.filter}prepareLimit(){return Math.floor(Number(this.limit)||0)}getDataStructure(){return{IStructureChartDataRow:{operation:{type:"string",isOptional:!1,description:""},rowGroup:{type:"string",isOptional:!1,description:""},rowGroupIndex:{type:"number",isOptional:!1,description:""},category:{type:"string",isOptional:!1,description:""},categoryIndex:{type:"number",isOptional:!1,description:""},subCategory:{type:"string",isOptional:!1,description:""},subCategoryIndex:{type:"number",isOptional:!1,description:""},columnGroup:{type:"string",isOptional:!1,description:""},columnGroupIndex:{type:"number",isOptional:!1,description:""},columnSubGroup:{type:"string",isOptional:!1,description:""},columnSubGroupIndex:{type:"number",isOptional:!1,description:""},ac1:{type:"number",isOptional:!1,description:""},ac2:{type:"number",isOptional:!1,description:""},ac3:{type:"number",isOptional:!1,description:""},ac4:{type:"number",isOptional:!1,description:""},pp1:{type:"number",isOptional:!1,description:""},pp2:{type:"number",isOptional:!1,description:""},pp3:{type:"number",isOptional:!1,description:""},pp4:{type:"number",isOptional:!1,description:""},fc1:{type:"number",isOptional:!1,description:""},fc2:{type:"number",isOptional:!1,description:""},fc3:{type:"number",isOptional:!1,description:""},fc4:{type:"number",isOptional:!1,description:""},pl1:{type:"number",isOptional:!1,description:""},pl2:{type:"number",isOptional:!1,description:""},pl3:{type:"number",isOptional:!1,description:""},pl4:{type:"number",isOptional:!1,description:""}}}}prepareMeasureScale(){return g(this.measureScale)?"GREATEST":["_","k","M","G","T","P","E","Z","Y","m","μ","n","p","P","f","a","z","y"].includes(this.measureScale.trim())||"LEAST"===this.measureScale.trim().toUpperCase()?this.measureScale.trim():"GREATEST"}prepareShowMeasureScale(e){return 0===e&&"true"===this.showMeasureScale}prepareMeasureUnit(){return""===this.measureUnit||null==this.measureUnit?"":this.measureUnit}chartTemplate(e,t){const s=this.getEffectiveScaleFactor(),a=this.preparePixelPerUnit(),r=this.preparePixelPerPercentage();return i("ibcs-chart-structure",{data:this.data,chartTitle:this.prepareChartTitle(t),scenarios:this.prepareScenarios(),variances:[e],hideCategories:this.prepareHideCategories(t),pixelPerUnit:a>0?a*s:0,pixelPerPercentage:r>0?r*s:0,limit:this.prepareLimit(),styles:this.prepareStyle(),i18n:this.prepareI18n(),order:this.prepareOrder(),level:this.prepareLevel(),filter:this.prepareFilter(),"measure-scale":this.prepareMeasureScale(),"measure-unit":this.prepareMeasureUnit(),showMeasureScale:this.prepareShowMeasureScale(t),stackConfig:this.prepareStackConfig(),parentDimensions:this.prepareDimension()})}getEffectiveScaleFactor(){const{mode:e,factor:t}=y(this.scale);return"factor"===e?t:"auto"===e||"empty"===e?this.appliedScaleFactor:1}getFontStyles(){const e=this.getEffectiveScaleFactor();return this.componentStyle((t=>{var i,s,a,r;const n=(null===(i=t.global)||void 0===i?void 0:i.fontSizePx)||13.3333;return{"--bn-font-family":(null===(s=t.global)||void 0===s?void 0:s.fontFamily)||"'Noto Sans', sans-serif","--bn-font-size":n*e+"px","--bn-font-color":(null===(a=t.global)||void 0===a?void 0:a.fontColor)||"#000000","--bn-font-background":(null===(r=t.global)||void 0===r?void 0:r.fontBackgroundColor)||"#ffffff"}}))}render(){let e=[""];const t=this.prepareVariances();t.length>0&&(e=[...e,...t]);const a=this.getFontStyles();return i(s,{key:"c8ad939fbe92ab4a01af1e5ce17e097dbb5eab56",style:a},i("div",{key:"d786c49dd808c2dd9093ede7100e16ac52f50689",class:"container"},e.map(this.chartTemplate)))}get element(){return this}static get watchers(){return{scenarios:[{validateScenario:0}],variances:[{validateVariances:0}],unitScaling:[{validateUnitScaling:0}],percentageScaling:[{validatePercentageScaling:0}],level:[{validateLevel:0}],order:[{validateOrderList:0}],orderDirection:[{validateOrderDirection:0}],limit:[{validateLimit:0}],showCategories:[{validateShowCategories:0}],measureScale:[{validateMeasureScale:0}],showMeasureScale:[{validateShowMeasureScale:0}],stack:[{validateStack:0}],scale:[{validateScaling:0}]}}static get style(){return':host{display:inline-block;position:relative;overflow:hidden}.container{display:flex;flex-direction:row}.background-image{display:flex;flex-wrap:wrap;justify-content:flex-end}.categories{text-align:right;font-size:var(--bn-font-size, 1em);font-family:var(--bn-font-family, "Noto Sans", "Helvetica Neue", Helvetica, sans-serif);color:var(--bn-font-color, black)}.label-bg{fill:var(--bn-font-background, white);opacity:0.7}.label-text{text-align:right;font-size:var(--bn-font-size, 1em);font-family:var(--bn-font-family, "Noto Sans", "Helvetica Neue", Helvetica, sans-serif);color:var(--bn-font-color, black)}.axis-title{text-align:center;font-family:var(--bn-font-family, "Noto Sans", "Helvetica Neue", Helvetica, sans-serif);color:var(--bn-font-color, black)}.axis-ac{stroke:black;stroke-width:0.1em}.axis-pp{stroke:grey;stroke-width:0.1em}.axis-fc{stroke:black;stroke-dasharray:2;stroke-width:0.1em}.axis-pl{stroke:white;stroke-width:0.1em;outline-offset:0em;outline:0.1em solid black}canvas{image-rendering:-moz-crisp-edges;image-rendering:-webkit-crisp-edges;image-rendering:pixelated;image-rendering:crisp-edges}.measure{font-weight:bold}span{display:inline-block}.hidePatternContainer{height:0;width:0}div{float:left}.warning{font-size:0.8em;font-style:italic}.footer{margin:0.2em;font-size:0.6em}.footer-hide{margin:0.2em;font-size:0.6em;opacity:0}'}},[1,"bn-chart-structure",{chartTitle:[1,"chart-title"],filter:[1],scenarios:[1],variances:[1],unitScaling:[8,"unit-scaling"],percentageScaling:[8,"percentage-scaling"],level:[1],order:[1],orderDirection:[1,"order-direction"],limit:[2],showCategories:[1,"show-categories"],measureScale:[1,"measure-scale"],showMeasureScale:[1,"show-measure-scale"],measureUnit:[1,"measure-unit"],stack:[1],scale:[1],data:[32],datasetMeta:[32],appliedScaleFactor:[32]},void 0,{scenarios:[{validateScenario:0}],variances:[{validateVariances:0}],unitScaling:[{validateUnitScaling:0}],percentageScaling:[{validatePercentageScaling:0}],level:[{validateLevel:0}],order:[{validateOrderList:0}],orderDirection:[{validateOrderDirection:0}],limit:[{validateLimit:0}],showCategories:[{validateShowCategories:0}],measureScale:[{validateMeasureScale:0}],showMeasureScale:[{validateShowMeasureScale:0}],stack:[{validateStack:0}],scale:[{validateScaling:0}]}]),C=M,N=function(){"undefined"!=typeof customElements&&["bn-chart-structure","ibcs-chart-structure"].forEach((e=>{switch(e){case"bn-chart-structure":customElements.get(a(e))||customElements.define(a(e),M);break;case"ibcs-chart-structure":customElements.get(a(e))||U()}}))};export{C as BnChartStructure,N as defineCustomElement}