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

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 (361) hide show
  1. package/LICENSE +203 -21
  2. package/dist/bn-template-engine/bn-template-engine.esm.js +1 -1
  3. package/dist/bn-template-engine/p-095f74d7.entry.js +1 -0
  4. package/dist/bn-template-engine/p-14318b0d.entry.js +1 -0
  5. package/dist/bn-template-engine/{p-c9f050bf.entry.js → p-2133e02b.entry.js} +1 -1
  6. package/dist/bn-template-engine/p-6b469808.entry.js +1 -0
  7. package/dist/bn-template-engine/p-7HSTE79g.js +1 -0
  8. package/dist/bn-template-engine/p-B4JfKvVT.js +1 -0
  9. package/dist/bn-template-engine/p-B_d-jp99.js +2 -0
  10. package/dist/bn-template-engine/p-Bi2wx-el.js +1 -0
  11. package/dist/bn-template-engine/p-CWiZks2h.js +1 -0
  12. package/dist/bn-template-engine/{p-BQp6ZPYW.js → p-DSXNgKLa.js} +1 -1
  13. package/dist/bn-template-engine/p-c2cbb8ea.entry.js +1 -0
  14. package/dist/bn-template-engine/p-e783733e.entry.js +1 -0
  15. package/dist/bn-template-engine/p-e94b4e31.entry.js +1 -0
  16. package/dist/bn-template-engine/p-fdb3e99a.entry.js +1 -0
  17. package/dist/cjs/bn-asset_21.cjs.entry.js +23995 -0
  18. package/dist/cjs/bn-grid.cjs.entry.js +6 -13
  19. package/dist/cjs/bn-image.cjs.entry.js +6 -13
  20. package/dist/cjs/bn-internationalization.cjs.entry.js +5 -7
  21. package/dist/cjs/bn-template-engine.cjs.js +2 -2
  22. package/dist/cjs/bn-template.cjs.entry.js +4 -6
  23. package/dist/cjs/bn-text.cjs.entry.js +10 -19
  24. package/dist/cjs/bn-tree.cjs.entry.js +11 -14
  25. package/dist/cjs/{context-protocol-BkYHFkXE.js → context-protocol-B_jipZpJ.js} +6 -2
  26. package/dist/cjs/editor-companion.cjs.entry.js +3 -3
  27. package/dist/cjs/{index-CScBFiS1.js → index-CDKG4xmO.js} +2 -2
  28. package/dist/cjs/loader.cjs.js +2 -2
  29. package/dist/cjs/scaling-eyzCrFB8.js +329 -0
  30. package/dist/cjs/{withBodyObserver-B0_W1VOf.js → withBodyObserver-D7BKWN2N.js} +2 -2
  31. package/dist/cjs/{withHasError-Dspb3lIV.js → withHasError-Cl2gTQzA.js} +106 -2
  32. package/dist/{esm/luxon-DbyXf6dF.js → cjs/withStyled-V7xz_x1c.js} +1406 -1
  33. package/dist/collection/collection-manifest.json +2 -10
  34. package/dist/collection/components/bn-body/bn-body.css +1 -0
  35. package/dist/collection/components/bn-card/bn-card.css +2 -0
  36. package/dist/collection/components/bn-chart-structure/bn-chart-structure.js +368 -130
  37. package/dist/collection/components/bn-chart-structure/ibcs-chart-structure.js +34 -10
  38. package/dist/collection/components/bn-chart-structure/utils/StructureChart.js +94 -11
  39. package/dist/collection/components/bn-chart-structure/utils/elements/Label.js +11 -0
  40. package/dist/collection/components/bn-chart-structure/utils/elements/StackedBar.js +8 -6
  41. package/dist/collection/components/bn-chart-structure/utils/model/styles/StructureChartStyle.js +4 -0
  42. package/dist/collection/components/bn-chart-time/bn-chart-time.css +1 -1
  43. package/dist/collection/components/bn-chart-time/bn-chart-time.js +172 -51
  44. package/dist/collection/components/bn-chart-time/ibcs-chart-time.js +22 -9
  45. package/dist/collection/components/bn-chart-time/utils/TimeChart.js +3 -3
  46. package/dist/collection/components/bn-chart-time/utils/elements/StackedColumn.js +3 -4
  47. package/dist/collection/components/bn-chart-time/utils/model/styles/TimeChartStyle.js +4 -0
  48. package/dist/collection/components/bn-dataset/bn-dataset.js +49 -2
  49. package/dist/collection/components/bn-datasource/bn-datasource.js +173 -8
  50. package/dist/collection/components/bn-layout-card/bn-layout-card.css +3 -2
  51. package/dist/collection/components/bn-layout-card/bn-layout-card.js +207 -32
  52. package/dist/collection/components/bn-layout-page/bn-layout-page.css +1 -3
  53. package/dist/collection/components/bn-layout-page/bn-layout-page.js +172 -43
  54. package/dist/collection/components/bn-message/bn-message.js +1 -1
  55. package/dist/collection/components/bn-page/bn-page.js +1 -1
  56. package/dist/collection/components/bn-scaling-group/bn-scaling-group.css +3 -0
  57. package/dist/collection/components/bn-scaling-group/bn-scaling-group.js +136 -0
  58. package/dist/collection/components/bn-table/bn-table.js +201 -58
  59. package/dist/collection/components/bn-table/ibcs-table.css +7 -5
  60. package/dist/collection/components/bn-table/ibcs-table.js +91 -5
  61. package/dist/collection/components/bn-table/utils/elements/CellBarChart.js +79 -31
  62. package/dist/collection/components/bn-table/utils/elements/TableRow.js +3 -1
  63. package/dist/collection/components/bn-table/utils/factories/tableDataSetFactory.js +12 -3
  64. package/dist/collection/components/bn-table/utils/helper/ColumnStatistics.js +9 -1
  65. package/dist/collection/components/bn-template/bn-template.js +1 -1
  66. package/dist/collection/components/bn-text/bn-text.js +1 -1
  67. package/dist/collection/components/bn-title/bn-title.js +1 -9
  68. package/dist/collection/components/bn-title/ibcs-title/ibcs-title.js +1 -4
  69. package/dist/collection/components/bn-tree/bn-tree.js +5 -1
  70. package/dist/collection/components/editor-companion/editor-companion.js +1 -1
  71. package/dist/collection/stores/componentStyles.js +2 -0
  72. package/dist/collection/stores/createScopedStores.js +3 -1
  73. package/dist/collection/utils/DateStringFactory.js +0 -1
  74. package/dist/collection/utils/constants.js +35 -5
  75. package/dist/collection/utils/contentDecoder.js +28 -0
  76. package/dist/collection/utils/layoutObserver.js +88 -0
  77. package/dist/collection/utils/parentDimensions.js +57 -10
  78. package/dist/collection/utils/stackColors.js +2 -2
  79. package/dist/collection/utils/validate.js +5 -2
  80. package/dist/collection/utils/withInheritedProps.js +152 -0
  81. package/dist/collection/utils/withScalingGroup.js +66 -0
  82. package/dist/components/DataFormatDigits.js +1 -1
  83. package/dist/components/DateStringFactory.js +1 -1
  84. package/dist/components/Order.js +1 -1
  85. package/dist/components/SVGVariancesStyleGroup.js +1 -1
  86. package/dist/components/bn-body2.js +1 -1
  87. package/dist/components/bn-card2.js +1 -1
  88. package/dist/components/bn-chart-structure.js +1 -1
  89. package/dist/components/bn-chart-time.js +1 -1
  90. package/dist/components/bn-dataset.js +1 -1
  91. package/dist/components/bn-datasource.js +1 -1
  92. package/dist/components/bn-layout-card.js +1 -1
  93. package/dist/components/bn-layout-page.js +1 -1
  94. package/dist/components/bn-message2.js +1 -1
  95. package/dist/components/bn-page2.js +1 -1
  96. package/dist/components/{test-runner-time.d.ts → bn-scaling-group.d.ts} +4 -4
  97. package/dist/components/bn-scaling-group.js +1 -0
  98. package/dist/components/bn-table.js +1 -1
  99. package/dist/components/bn-template.js +1 -1
  100. package/dist/components/bn-text.js +1 -1
  101. package/dist/components/bn-title2.js +1 -1
  102. package/dist/components/bn-tree.js +1 -1
  103. package/dist/components/contentDecoder.js +1 -0
  104. package/dist/components/context-protocol.js +1 -1
  105. package/dist/components/editor-companion.js +1 -1
  106. package/dist/components/emotion-hash.esm.js +1 -0
  107. package/dist/components/ibcs-chart-structure2.js +1 -1
  108. package/dist/components/ibcs-chart-time2.js +1 -1
  109. package/dist/components/ibcs-table2.js +1 -1
  110. package/dist/components/ibcs-title2.js +1 -1
  111. package/dist/components/ibcsRuleSet.js +1 -1
  112. package/dist/components/layoutObserver.js +1 -0
  113. package/dist/components/scaling.js +1 -1
  114. package/dist/components/validate.js +1 -1
  115. package/dist/components/withHasError.js +1 -1
  116. package/dist/components/withInheritedProps.js +1 -0
  117. package/dist/components/withStyled.js +1 -1
  118. package/dist/esm/bn-asset_21.entry.js +23973 -0
  119. package/dist/esm/bn-grid.entry.js +4 -11
  120. package/dist/esm/bn-image.entry.js +4 -11
  121. package/dist/esm/bn-internationalization.entry.js +4 -6
  122. package/dist/esm/bn-template-engine.js +3 -3
  123. package/dist/esm/bn-template.entry.js +3 -5
  124. package/dist/esm/bn-text.entry.js +6 -15
  125. package/dist/esm/bn-tree.entry.js +9 -12
  126. package/dist/esm/{context-protocol-DzeqZxg6.js → context-protocol-D-o_UZ33.js} +6 -2
  127. package/dist/esm/editor-companion.entry.js +3 -3
  128. package/dist/esm/{index-B27Ax6P_.js → index-B_d-jp99.js} +2 -2
  129. package/dist/esm/loader.js +3 -3
  130. package/dist/esm/scaling-BzbiBnuN.js +324 -0
  131. package/dist/esm/{withBodyObserver-gZpZiEIK.js → withBodyObserver-AFk2wwHT.js} +2 -2
  132. package/dist/esm/{withHasError-C48fTE2k.js → withHasError-DW_vMDUp.js} +106 -2
  133. package/dist/{cjs/luxon-8hyy5YD7.js → esm/withStyled-5RqF8WBL.js} +1371 -2
  134. package/dist/types/components/bn-chart-structure/bn-chart-structure.d.ts +163 -110
  135. package/dist/types/components/bn-chart-structure/ibcs-chart-structure.d.ts +4 -3
  136. package/dist/types/components/bn-chart-structure/utils/StructureChart.d.ts +7 -0
  137. package/dist/types/components/bn-chart-structure/utils/elements/Label.d.ts +2 -0
  138. package/dist/types/components/bn-chart-structure/utils/model/styles/StructureChartStyle.d.ts +1 -0
  139. package/dist/types/components/bn-chart-time/bn-chart-time.d.ts +29 -12
  140. package/dist/types/components/bn-chart-time/ibcs-chart-time.d.ts +4 -3
  141. package/dist/types/components/bn-chart-time/utils/model/styles/TimeChartStyle.d.ts +1 -0
  142. package/dist/types/components/bn-dataset/bn-dataset.d.ts +6 -0
  143. package/dist/types/components/bn-datasource/bn-datasource.d.ts +48 -5
  144. package/dist/types/components/bn-layout-card/bn-layout-card.d.ts +153 -0
  145. package/dist/types/components/bn-layout-page/bn-layout-page.d.ts +160 -1
  146. package/dist/types/components/bn-scaling-group/bn-scaling-group.d.ts +37 -0
  147. package/dist/types/components/bn-table/bn-table.d.ts +32 -17
  148. package/dist/types/components/bn-table/ibcs-table.d.ts +20 -0
  149. package/dist/types/components/bn-table/utils/elements/Cell.d.ts +1 -0
  150. package/dist/types/components/bn-table/utils/elements/CellBarChart.d.ts +1 -0
  151. package/dist/types/components/bn-title/bn-title.d.ts +0 -1
  152. package/dist/types/components.d.ts +438 -461
  153. package/dist/types/context/context-protocol.d.ts +2 -1
  154. package/dist/types/stores/componentStyles.d.ts +2 -0
  155. package/dist/types/stores/createScopedStores.d.ts +1 -0
  156. package/dist/types/utils/constants.d.ts +23 -5
  157. package/dist/types/utils/contentDecoder.d.ts +12 -0
  158. package/dist/types/utils/layoutObserver.d.ts +27 -0
  159. package/dist/types/utils/parentDimensions.d.ts +7 -2
  160. package/dist/types/utils/validate.d.ts +1 -0
  161. package/dist/types/utils/withInheritedProps.d.ts +38 -0
  162. package/dist/types/utils/withScalingGroup.d.ts +14 -0
  163. package/package.json +4 -4
  164. package/readme.md +2 -3
  165. package/dist/bn-template-engine/assets/gpx/Chasing_Legends.gpx +0 -195076
  166. package/dist/bn-template-engine/assets/gpx/Fahrt_am_Nachmittag.gpx +0 -142007
  167. package/dist/bn-template-engine/assets/icons/gpx-finish.png +0 -0
  168. package/dist/bn-template-engine/assets/icons/gpx-shadow.png +0 -0
  169. package/dist/bn-template-engine/assets/icons/gpx-start.png +0 -0
  170. package/dist/bn-template-engine/assets/icons/marker-example.png +0 -0
  171. package/dist/bn-template-engine/assets/icons/pin-icon-end.png +0 -0
  172. package/dist/bn-template-engine/assets/icons/pin-icon-start.png +0 -0
  173. package/dist/bn-template-engine/assets/icons/pin-icon-wpt.png +0 -0
  174. package/dist/bn-template-engine/assets/icons/pin-shadow.png +0 -0
  175. package/dist/bn-template-engine/assets/icons/pin.png +0 -0
  176. package/dist/bn-template-engine/p--TeDldm8.js +0 -1
  177. package/dist/bn-template-engine/p-0e7dc113.entry.js +0 -1
  178. package/dist/bn-template-engine/p-1jFf17Vj.js +0 -1
  179. package/dist/bn-template-engine/p-264c6bad.entry.js +0 -1
  180. package/dist/bn-template-engine/p-326a0902.entry.js +0 -1
  181. package/dist/bn-template-engine/p-38a8bde3.entry.js +0 -1
  182. package/dist/bn-template-engine/p-577eafcd.entry.js +0 -1
  183. package/dist/bn-template-engine/p-5905cc43.entry.js +0 -1
  184. package/dist/bn-template-engine/p-5d155a72.entry.js +0 -1
  185. package/dist/bn-template-engine/p-65f8962a.entry.js +0 -1
  186. package/dist/bn-template-engine/p-6b8d1ebf.entry.js +0 -1
  187. package/dist/bn-template-engine/p-7995acb2.entry.js +0 -1
  188. package/dist/bn-template-engine/p-7afe431e.entry.js +0 -1
  189. package/dist/bn-template-engine/p-8014b1ac.entry.js +0 -1
  190. package/dist/bn-template-engine/p-80423fc8.entry.js +0 -1
  191. package/dist/bn-template-engine/p-91e74d42.entry.js +0 -1
  192. package/dist/bn-template-engine/p-930a9e29.entry.js +0 -1
  193. package/dist/bn-template-engine/p-93C9jL8R.js +0 -1
  194. package/dist/bn-template-engine/p-93ff8584.entry.js +0 -1
  195. package/dist/bn-template-engine/p-B0m0U4wJ.js +0 -1
  196. package/dist/bn-template-engine/p-B27Ax6P_.js +0 -2
  197. package/dist/bn-template-engine/p-B79VcHiT.js +0 -1
  198. package/dist/bn-template-engine/p-BBd0ZVLL.js +0 -1
  199. package/dist/bn-template-engine/p-BFTU3MAI.js +0 -1
  200. package/dist/bn-template-engine/p-BFatTBqh.js +0 -1
  201. package/dist/bn-template-engine/p-BYmPQYxx.js +0 -1
  202. package/dist/bn-template-engine/p-BhEQy-2D.js +0 -1
  203. package/dist/bn-template-engine/p-BtVfu16B.js +0 -1
  204. package/dist/bn-template-engine/p-CY1RzLjU.js +0 -1
  205. package/dist/bn-template-engine/p-CfWnag33.js +0 -1
  206. package/dist/bn-template-engine/p-CnI71OA9.js +0 -1
  207. package/dist/bn-template-engine/p-Cp4MVxCu.js +0 -1
  208. package/dist/bn-template-engine/p-DbyXf6dF.js +0 -1
  209. package/dist/bn-template-engine/p-TdL-LRR9.js +0 -1
  210. package/dist/bn-template-engine/p-_LBTIfNN.js +0 -1
  211. package/dist/bn-template-engine/p-a342cd3c.entry.js +0 -1
  212. package/dist/bn-template-engine/p-ad94cf63.entry.js +0 -1
  213. package/dist/bn-template-engine/p-bc37d750.entry.js +0 -1
  214. package/dist/bn-template-engine/p-d07a0ca3.entry.js +0 -1
  215. package/dist/bn-template-engine/p-e5f372af.entry.js +0 -1
  216. package/dist/bn-template-engine/p-e620028c.entry.js +0 -1
  217. package/dist/bn-template-engine/p-e81e116a.entry.js +0 -1
  218. package/dist/bn-template-engine/p-eca98070.entry.js +0 -1
  219. package/dist/bn-template-engine/p-ee6de950.entry.js +0 -1
  220. package/dist/bn-template-engine/p-efe0ef1e.entry.js +0 -1
  221. package/dist/bn-template-engine/p-f034f1b8.entry.js +0 -1
  222. package/dist/bn-template-engine/p-f1c1a8a3.entry.js +0 -1
  223. package/dist/bn-template-engine/p-fe573a1a.entry.js +0 -1
  224. package/dist/bn-template-engine/p-kMyLevYy.js +0 -1
  225. package/dist/cjs/DataFormatDigits-DmTbhF8q.js +0 -142
  226. package/dist/cjs/DateStringFactory-Dn0aRj2Y.js +0 -453
  227. package/dist/cjs/Order-B4NIqQWe.js +0 -129
  228. package/dist/cjs/SVGVariancesStyleGroup-Czizhngt.js +0 -7973
  229. package/dist/cjs/StringAdapter-0EbYMkR0.js +0 -136
  230. package/dist/cjs/_commonjsHelpers-BJu3ubxk.js +0 -10
  231. package/dist/cjs/alasql.min-C_nHTuEQ.js +0 -306
  232. package/dist/cjs/bn-asset.cjs.entry.js +0 -42
  233. package/dist/cjs/bn-body_3.cjs.entry.js +0 -413
  234. package/dist/cjs/bn-card.cjs.entry.js +0 -37
  235. package/dist/cjs/bn-chart-structure.cjs.entry.js +0 -705
  236. package/dist/cjs/bn-chart-time.cjs.entry.js +0 -987
  237. package/dist/cjs/bn-component-style.cjs.entry.js +0 -44
  238. package/dist/cjs/bn-context_5.cjs.entry.js +0 -3380
  239. package/dist/cjs/bn-dataset.cjs.entry.js +0 -278
  240. package/dist/cjs/bn-layout-card.cjs.entry.js +0 -128
  241. package/dist/cjs/bn-layout-page.cjs.entry.js +0 -142
  242. package/dist/cjs/bn-map.cjs.entry.js +0 -425
  243. package/dist/cjs/bn-message.cjs.entry.js +0 -52
  244. package/dist/cjs/componentRegister-C17UFNPh.js +0 -72
  245. package/dist/cjs/constants-DHqQXSSd.js +0 -158
  246. package/dist/cjs/formatter-DIJL_crx.js +0 -215
  247. package/dist/cjs/ibcs-chart-structure.cjs.entry.js +0 -2906
  248. package/dist/cjs/ibcs-chart-time.cjs.entry.js +0 -4140
  249. package/dist/cjs/ibcs-map.cjs.entry.js +0 -1075
  250. package/dist/cjs/ibcs-title.cjs.entry.js +0 -352
  251. package/dist/cjs/scaling-B23eOtsC.js +0 -67
  252. package/dist/cjs/test-runner-card.cjs.entry.js +0 -27
  253. package/dist/cjs/test-runner-chart-time.cjs.entry.js +0 -230
  254. package/dist/cjs/test-runner-chart.cjs.entry.js +0 -326
  255. package/dist/cjs/test-runner-map.cjs.entry.js +0 -1862
  256. package/dist/cjs/test-runner-table.cjs.entry.js +0 -477
  257. package/dist/cjs/test-runner-time.cjs.entry.js +0 -381
  258. package/dist/cjs/test-runner-title.cjs.entry.js +0 -115
  259. package/dist/cjs/withComponentStatus-BrxL7usr.js +0 -39
  260. package/dist/cjs/withComponentStyle-C6KHnZHt.js +0 -128
  261. package/dist/cjs/withDataset-ZdN-RRTx.js +0 -146
  262. package/dist/cjs/withStyled-Bf-stJTR.js +0 -567
  263. package/dist/cjs/withTranslation-Cz0M5maV.js +0 -77
  264. package/dist/collection/components/bn-map/bn-map.css +0 -4
  265. package/dist/collection/components/bn-map/bn-map.js +0 -725
  266. package/dist/collection/components/bn-map/ibcs-map/assets/gpx/Chasing_Legends.gpx +0 -195076
  267. package/dist/collection/components/bn-map/ibcs-map/assets/gpx/Fahrt_am_Nachmittag.gpx +0 -142007
  268. package/dist/collection/components/bn-map/ibcs-map/assets/icons/gpx-finish.png +0 -0
  269. package/dist/collection/components/bn-map/ibcs-map/assets/icons/gpx-shadow.png +0 -0
  270. package/dist/collection/components/bn-map/ibcs-map/assets/icons/gpx-start.png +0 -0
  271. package/dist/collection/components/bn-map/ibcs-map/assets/icons/marker-example.png +0 -0
  272. package/dist/collection/components/bn-map/ibcs-map/assets/icons/pin-icon-end.png +0 -0
  273. package/dist/collection/components/bn-map/ibcs-map/assets/icons/pin-icon-start.png +0 -0
  274. package/dist/collection/components/bn-map/ibcs-map/assets/icons/pin-icon-wpt.png +0 -0
  275. package/dist/collection/components/bn-map/ibcs-map/assets/icons/pin-shadow.png +0 -0
  276. package/dist/collection/components/bn-map/ibcs-map/assets/icons/pin.png +0 -0
  277. package/dist/collection/components/bn-map/ibcs-map/ibcs-map.css +0 -674
  278. package/dist/collection/components/bn-map/ibcs-map/ibcs-map.js +0 -744
  279. package/dist/collection/components/bn-map/ibcs-map/utils/model/GeoJsonLayer.js +0 -9
  280. package/dist/collection/components/bn-map/ibcs-map/utils/model/GpxLayer.js +0 -13
  281. package/dist/collection/components/bn-map/ibcs-map/utils/model/Marker.js +0 -11
  282. package/dist/collection/components/bn-map/ibcs-map/utils/model/index.js +0 -2
  283. package/dist/collection/test-runner/test-runner-card.js +0 -36
  284. package/dist/collection/test-runner/test-runner-chart-time.js +0 -234
  285. package/dist/collection/test-runner/test-runner-chart.js +0 -364
  286. package/dist/collection/test-runner/test-runner-map.js +0 -1901
  287. package/dist/collection/test-runner/test-runner-table.js +0 -469
  288. package/dist/collection/test-runner/test-runner-time.js +0 -399
  289. package/dist/collection/test-runner/test-runner-title.js +0 -108
  290. package/dist/components/bn-map.d.ts +0 -11
  291. package/dist/components/bn-map.js +0 -1
  292. package/dist/components/componentRegister.js +0 -1
  293. package/dist/components/ibcs-map.d.ts +0 -11
  294. package/dist/components/ibcs-map.js +0 -1
  295. package/dist/components/ibcs-map2.js +0 -1
  296. package/dist/components/test-runner-card.d.ts +0 -11
  297. package/dist/components/test-runner-card.js +0 -1
  298. package/dist/components/test-runner-chart-time.d.ts +0 -11
  299. package/dist/components/test-runner-chart-time.js +0 -1
  300. package/dist/components/test-runner-chart.d.ts +0 -11
  301. package/dist/components/test-runner-chart.js +0 -1
  302. package/dist/components/test-runner-map.d.ts +0 -11
  303. package/dist/components/test-runner-map.js +0 -1
  304. package/dist/components/test-runner-table.d.ts +0 -11
  305. package/dist/components/test-runner-table.js +0 -1
  306. package/dist/components/test-runner-time.js +0 -1
  307. package/dist/components/test-runner-title.d.ts +0 -11
  308. package/dist/components/test-runner-title.js +0 -1
  309. package/dist/components/withDataset.js +0 -1
  310. package/dist/esm/DataFormatDigits-Dt6gpIiZ.js +0 -137
  311. package/dist/esm/DateStringFactory-_Qiv0IvF.js +0 -451
  312. package/dist/esm/Order-B4fpLe_f.js +0 -125
  313. package/dist/esm/SVGVariancesStyleGroup-DlWgvpzs.js +0 -7961
  314. package/dist/esm/StringAdapter-BLvo1Krl.js +0 -133
  315. package/dist/esm/_commonjsHelpers-BFTU3MAI.js +0 -7
  316. package/dist/esm/alasql.min-CWu4NkIt.js +0 -304
  317. package/dist/esm/bn-asset.entry.js +0 -40
  318. package/dist/esm/bn-body_3.entry.js +0 -409
  319. package/dist/esm/bn-card.entry.js +0 -35
  320. package/dist/esm/bn-chart-structure.entry.js +0 -703
  321. package/dist/esm/bn-chart-time.entry.js +0 -985
  322. package/dist/esm/bn-component-style.entry.js +0 -42
  323. package/dist/esm/bn-context_5.entry.js +0 -3374
  324. package/dist/esm/bn-dataset.entry.js +0 -276
  325. package/dist/esm/bn-layout-card.entry.js +0 -126
  326. package/dist/esm/bn-layout-page.entry.js +0 -140
  327. package/dist/esm/bn-map.entry.js +0 -423
  328. package/dist/esm/bn-message.entry.js +0 -50
  329. package/dist/esm/componentRegister-BtVfu16B.js +0 -72
  330. package/dist/esm/constants-kMyLevYy.js +0 -158
  331. package/dist/esm/formatter-DTMEZ6d8.js +0 -211
  332. package/dist/esm/ibcs-chart-structure.entry.js +0 -2904
  333. package/dist/esm/ibcs-chart-time.entry.js +0 -4138
  334. package/dist/esm/ibcs-map.entry.js +0 -1073
  335. package/dist/esm/ibcs-title.entry.js +0 -350
  336. package/dist/esm/scaling-BBd0ZVLL.js +0 -64
  337. package/dist/esm/test-runner-card.entry.js +0 -25
  338. package/dist/esm/test-runner-chart-time.entry.js +0 -228
  339. package/dist/esm/test-runner-chart.entry.js +0 -324
  340. package/dist/esm/test-runner-map.entry.js +0 -1860
  341. package/dist/esm/test-runner-table.entry.js +0 -475
  342. package/dist/esm/test-runner-time.entry.js +0 -379
  343. package/dist/esm/test-runner-title.entry.js +0 -113
  344. package/dist/esm/withComponentStatus-elELReKt.js +0 -37
  345. package/dist/esm/withComponentStyle-NaxfakAG.js +0 -126
  346. package/dist/esm/withDataset-BT2VQCsG.js +0 -144
  347. package/dist/esm/withStyled-CpUTv74m.js +0 -539
  348. package/dist/esm/withTranslation-Do4GhleK.js +0 -75
  349. package/dist/types/components/bn-map/bn-map.d.ts +0 -122
  350. package/dist/types/components/bn-map/ibcs-map/ibcs-map.d.ts +0 -73
  351. package/dist/types/components/bn-map/ibcs-map/utils/model/GeoJsonLayer.d.ts +0 -8
  352. package/dist/types/components/bn-map/ibcs-map/utils/model/GpxLayer.d.ts +0 -11
  353. package/dist/types/components/bn-map/ibcs-map/utils/model/Marker.d.ts +0 -9
  354. package/dist/types/components/bn-map/ibcs-map/utils/model/index.d.ts +0 -2
  355. package/dist/types/test-runner/test-runner-card.d.ts +0 -3
  356. package/dist/types/test-runner/test-runner-chart-time.d.ts +0 -3
  357. package/dist/types/test-runner/test-runner-chart.d.ts +0 -3
  358. package/dist/types/test-runner/test-runner-map.d.ts +0 -3
  359. package/dist/types/test-runner/test-runner-table.d.ts +0 -3
  360. package/dist/types/test-runner/test-runner-time.d.ts +0 -3
  361. package/dist/types/test-runner/test-runner-title.d.ts +0 -3
@@ -0,0 +1,88 @@
1
+ /**
2
+ * Shared ResizeObserver utility for visualization components.
3
+ *
4
+ * Wraps ResizeObserver with debouncing and a size-stability check so
5
+ * auto-scaling logic reacts to genuine container size changes (window
6
+ * resizes, card relayouts, async sibling loads) without creating
7
+ * feedback loops when the component's own scaling changes its content
8
+ * dimensions.
9
+ */
10
+ const DEFAULT_DEBOUNCE_MS = 80;
11
+ const SIZE_THRESHOLD_PX = 2;
12
+ /**
13
+ * Observes the parent container of `element` for size changes.
14
+ *
15
+ * The callback only fires when the observed target's dimensions change
16
+ * by more than {@link SIZE_THRESHOLD_PX} pixels compared to the last
17
+ * time the callback was invoked. This prevents feedback loops where
18
+ * auto-scaling → font-size change → content reflow → ResizeObserver
19
+ * fires again → auto-scaling …
20
+ *
21
+ * @param element The component's host element
22
+ * @param callback Called when the observed parent genuinely resizes
23
+ * @param debounceMs Debounce interval (default 80ms)
24
+ */
25
+ export function observeParentResize(element, callback, debounceMs = DEFAULT_DEBOUNCE_MS) {
26
+ let timer = null;
27
+ let disconnected = false;
28
+ let lastWidth = -1;
29
+ let lastHeight = -1;
30
+ const target = findObservationTarget(element);
31
+ if (!target) {
32
+ return { disconnect() { } };
33
+ }
34
+ const observer = new ResizeObserver((entries) => {
35
+ var _a;
36
+ if (disconnected)
37
+ return;
38
+ // Use the first entry's contentBoxSize when available, fall back
39
+ // to the target's clientWidth/clientHeight.
40
+ let w;
41
+ let h;
42
+ const entry = entries[0];
43
+ if ((_a = entry === null || entry === void 0 ? void 0 : entry.contentBoxSize) === null || _a === void 0 ? void 0 : _a.length) {
44
+ const box = entry.contentBoxSize[0];
45
+ w = box.inlineSize;
46
+ h = box.blockSize;
47
+ }
48
+ else {
49
+ w = target.clientWidth;
50
+ h = target.clientHeight;
51
+ }
52
+ // Only fire when the parent genuinely resized — not when the
53
+ // child's own scaling caused a sub-pixel content reflow.
54
+ if (Math.abs(w - lastWidth) <= SIZE_THRESHOLD_PX && Math.abs(h - lastHeight) <= SIZE_THRESHOLD_PX) {
55
+ return;
56
+ }
57
+ lastWidth = w;
58
+ lastHeight = h;
59
+ if (timer != null)
60
+ clearTimeout(timer);
61
+ timer = setTimeout(() => {
62
+ if (!disconnected)
63
+ callback();
64
+ }, debounceMs);
65
+ });
66
+ observer.observe(target);
67
+ return {
68
+ disconnect() {
69
+ disconnected = true;
70
+ if (timer != null)
71
+ clearTimeout(timer);
72
+ observer.disconnect();
73
+ },
74
+ };
75
+ }
76
+ /**
77
+ * Finds the best element to observe for size changes.
78
+ * Prefers the slot wrapper inside the shadow DOM (the actual layout
79
+ * container), falls back to the light DOM parent.
80
+ */
81
+ function findObservationTarget(element) {
82
+ var _a;
83
+ const lightParent = element.parentElement;
84
+ if ((_a = lightParent === null || lightParent === void 0 ? void 0 : lightParent.assignedSlot) === null || _a === void 0 ? void 0 : _a.parentElement) {
85
+ return lightParent.assignedSlot.parentElement;
86
+ }
87
+ return lightParent;
88
+ }
@@ -1,34 +1,78 @@
1
1
  /**
2
2
  * Returns the available dimensions for a component.
3
3
  *
4
- * Width: parent content-box width (excluding padding).
4
+ * Width: visual parent's content-box width (excluding padding).
5
5
  * Height: walks up the DOM to find the nearest ancestor with a constrained
6
6
  * height (overflow !== 'visible' or explicit max-height). Falls back to
7
7
  * the viewport height when every ancestor auto-grows with its content.
8
+ *
9
+ * When the component is slotted into a shadow DOM (e.g. inside
10
+ * bn-layout-page or bn-layout-card), the light DOM parentElement is NOT the
11
+ * visual container. We cross the light→shadow boundary via assignedSlot to
12
+ * find the actual slot wrapper that determines layout.
8
13
  */
9
- export function getParentDimensions(element) {
10
- const parent = element.parentElement;
14
+ export function getParentDimensions(element, debug = false) {
15
+ const parent = findLayoutParent(element);
11
16
  if (!parent) {
17
+ if (debug)
18
+ console.log("[parentDims] no layout parent found for", element.tagName);
12
19
  return { width: 0, height: 0 };
13
20
  }
14
21
  const parentStyle = getComputedStyle(parent);
15
22
  const width = parent.clientWidth - parseFloat(parentStyle.paddingLeft) - parseFloat(parentStyle.paddingRight);
16
- const height = findConstrainedHeight(element);
23
+ const height = findConstrainedHeight(element, debug);
24
+ if (debug) {
25
+ console.log("[parentDims]", element.tagName, "→ layoutParent:", parent.tagName, parent.className || "(no class)", `clientW=${parent.clientWidth} → w=${Math.round(width)}, h=${Math.round(height)}`, "overflow:", parentStyle.overflow);
26
+ }
17
27
  return { width: Math.max(0, width), height: Math.max(0, height) };
18
28
  }
29
+ /**
30
+ * Returns the visual layout parent of an element, crossing the
31
+ * light→shadow DOM boundary when the element's parent is slotted.
32
+ *
33
+ * For a slotted element, the light DOM parentElement is NOT where
34
+ * the element renders visually. The actual container is the shadow
35
+ * DOM element that wraps the <slot>. We reach it via assignedSlot.
36
+ */
37
+ function findLayoutParent(element) {
38
+ var _a;
39
+ const lightParent = element.parentElement;
40
+ if ((_a = lightParent === null || lightParent === void 0 ? void 0 : lightParent.assignedSlot) === null || _a === void 0 ? void 0 : _a.parentElement) {
41
+ return lightParent.assignedSlot.parentElement;
42
+ }
43
+ return lightParent;
44
+ }
45
+ /**
46
+ * Returns the visual parent, crossing shadow DOM boundaries via assignedSlot.
47
+ */
48
+ function getVisualParent(element) {
49
+ var _a;
50
+ if ((_a = element.assignedSlot) === null || _a === void 0 ? void 0 : _a.parentElement) {
51
+ return element.assignedSlot.parentElement;
52
+ }
53
+ return element.parentElement;
54
+ }
19
55
  /**
20
56
  * Walks up the ancestor chain to find a height that is actually constrained
21
- * (not just "whatever my content needs"). Returns viewport height as a
22
- * last resort.
57
+ * (not just "whatever my content needs"). Crosses shadow DOM boundaries
58
+ * via assignedSlot when encountering slotted elements. Returns viewport
59
+ * height as a last resort.
23
60
  */
24
- function findConstrainedHeight(element) {
25
- let current = element.parentElement;
61
+ function findConstrainedHeight(element, debug = false) {
62
+ let current = findLayoutParent(element);
63
+ let depth = 0;
26
64
  while (current) {
27
65
  const style = getComputedStyle(current);
28
66
  const overflow = style.overflowY;
67
+ if (debug) {
68
+ console.log(`[height:${depth}]`, current.tagName, current.className || "(no class)", `overflow=${overflow} clientH=${current.clientHeight} h=${style.height}`);
69
+ }
29
70
  // An ancestor that clips / scrolls its content has a meaningful height
30
71
  if (overflow === "hidden" || overflow === "scroll" || overflow === "auto") {
31
- return current.clientHeight - parseFloat(style.paddingTop) - parseFloat(style.paddingBottom);
72
+ const h = current.clientHeight - parseFloat(style.paddingTop) - parseFloat(style.paddingBottom);
73
+ if (debug)
74
+ console.log(`[height] FOUND constrained at depth ${depth}: ${Math.round(h)}px`);
75
+ return h;
32
76
  }
33
77
  // An explicit max-height constrains the available space
34
78
  if (style.maxHeight !== "none") {
@@ -37,8 +81,11 @@ function findConstrainedHeight(element) {
37
81
  return Math.min(mh, current.clientHeight - parseFloat(style.paddingTop) - parseFloat(style.paddingBottom));
38
82
  }
39
83
  }
40
- current = current.parentElement;
84
+ current = getVisualParent(current);
85
+ depth++;
41
86
  }
87
+ if (debug)
88
+ console.log("[height] NO constrained ancestor → viewport fallback");
42
89
  // No constrained ancestor found — use viewport
43
90
  return typeof window !== "undefined" ? window.innerHeight : 0;
44
91
  }
@@ -1,7 +1,7 @@
1
1
  /** Default fill colors cycled through for stacked chart segments. */
2
- export const STACK_FILLS = ["#808080", "#c0c0c0", "#000000"];
2
+ export const STACK_FILLS = ["#000000", "#c0c0c0", "#808080"];
3
3
  /** Default stroke colors cycled through for stacked chart segments. */
4
- export const STACK_STROKES = ["#808080", "#c0c0c0", "#000000"];
4
+ export const STACK_STROKES = ["#000000", "#c0c0c0", "#808080"];
5
5
  /**
6
6
  * IBCS rendering order: back-to-front (PL behind FC behind PP behind AC).
7
7
  * Used to ensure correct visual layering when scenarios overlap.
@@ -5,7 +5,7 @@
5
5
  * These are used in component @Watch methods to warn about malformed attribute values
6
6
  * without crashing the component.
7
7
  */
8
- import { AggregationLevel, AxisLabelsMode, DataFormat, I18nMode, MeasureType, Scenarios, Sentiments, TableCategoryWidth, TableType, } from "./constants";
8
+ import { AggregationLevel, AxisLabelsMode, DataFormat, I18nMode, MeasureType, Scenarios, Sentiments, TableBarColumnWidth, TableCategoryWidth, TableType, } from "./constants";
9
9
  import { DateDistance, DateLink } from "./DateStringFactory";
10
10
  import { OrderColumn, OrderDirection } from "./model/Order";
11
11
  /**
@@ -264,6 +264,9 @@ export function validateStylesString(value) {
264
264
  export function isTableCategoryWidth(value) {
265
265
  return (value === null || value === void 0 ? void 0 : value.toUpperCase().trim()) in TableCategoryWidth;
266
266
  }
267
+ export function isTableBarColumnWidth(value) {
268
+ return (value === null || value === void 0 ? void 0 : value.toUpperCase().trim()) in TableBarColumnWidth;
269
+ }
267
270
  export function validateColumnThereOfJsonStr(value) {
268
271
  if (isBlankInput(value)) {
269
272
  return [];
@@ -291,7 +294,7 @@ export function validateStackConfig(value) {
291
294
  errors.push("stack: 'by' is required");
292
295
  }
293
296
  else {
294
- const validBy = ["scenario", "category", "subcategory", "rowgroup"];
297
+ const validBy = ["scenarios", "dimensions"];
295
298
  if (!validBy.includes(config.by)) {
296
299
  errors.push(`stack: 'by' must be one of: ${validBy.join(", ")}`);
297
300
  }
@@ -0,0 +1,152 @@
1
+ import { forceUpdate, getElement } from "@stencil/core";
2
+ import { runIfExisits } from "./utils";
3
+ /**
4
+ * Reserved prop values that activate inheritance from ancestor layout
5
+ * components (`bn-layout-card` or `bn-layout-page`).
6
+ */
7
+ export const INHERITED_CLOSEST = "inherited-closest";
8
+ export const INHERITED_PAGE = "inherited-page";
9
+ /** Tags that qualify as inheritance ancestors. */
10
+ const ANCESTOR_CARD = "bn-layout-card";
11
+ const ANCESTOR_PAGE = "bn-layout-page";
12
+ /**
13
+ * Returns `true` when `value` is one of the recognised inheritance keywords.
14
+ */
15
+ export function isInheritedValue(value) {
16
+ return value === INHERITED_CLOSEST || value === INHERITED_PAGE;
17
+ }
18
+ /**
19
+ * Walks up the DOM tree (crossing shadow boundaries) to find the nearest
20
+ * ancestor layout component.
21
+ *
22
+ * - `"inherited-closest"` matches the first `bn-layout-card` or `bn-layout-page`.
23
+ * - `"inherited-page"` skips cards and matches only `bn-layout-page`.
24
+ *
25
+ * Uses the same traversal pattern as `findContextElement` in
26
+ * `context-protocol.ts`.
27
+ */
28
+ function findAncestor(element, mode) {
29
+ let current = element.parentNode;
30
+ while (current) {
31
+ if (current instanceof HTMLElement) {
32
+ const tag = current.nodeName.toLowerCase();
33
+ if (mode === INHERITED_PAGE) {
34
+ if (tag === ANCESTOR_PAGE)
35
+ return current;
36
+ }
37
+ else {
38
+ if (tag === ANCESTOR_CARD || tag === ANCESTOR_PAGE)
39
+ return current;
40
+ }
41
+ }
42
+ if (current.parentNode) {
43
+ current = current.parentNode;
44
+ }
45
+ else if (current instanceof ShadowRoot) {
46
+ current = current.host;
47
+ }
48
+ else {
49
+ break;
50
+ }
51
+ }
52
+ return undefined;
53
+ }
54
+ /**
55
+ * Mixin that enables property inheritance from ancestor layout components.
56
+ *
57
+ * When a component sets a prop to `"inherited-closest"` or `"inherited-page"`,
58
+ * this mixin resolves the actual value by walking up the DOM to find the
59
+ * nearest `bn-layout-card` / `bn-layout-page` and reading the corresponding
60
+ * HTML attribute. A `MutationObserver` watches the ancestor for attribute
61
+ * changes, triggering a re-render when inherited values update.
62
+ *
63
+ * Follows the same decorator-style pattern as `withComponentStyle`.
64
+ *
65
+ * @param component The Stencil component instance
66
+ * @param mappings Array of prop-to-attribute mappings
67
+ * @returns A resolver function used inside `prepare*()` methods
68
+ */
69
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
70
+ const withInheritedProps = (component, mappings) => {
71
+ /** Resolved values keyed by propName. */
72
+ const resolved = new Map();
73
+ /** Observer watching the ancestor element's attributes. */
74
+ let observer = null;
75
+ /** The ancestor element currently being observed. */
76
+ let ancestorEl;
77
+ /**
78
+ * For each mapping whose prop is an inheritance keyword, walk the DOM once
79
+ * and read the corresponding attribute from the ancestor.
80
+ */
81
+ const resolveAll = () => {
82
+ const element = getElement(component);
83
+ resolved.clear();
84
+ // Determine which attrs to watch on which ancestor
85
+ const attrsToWatch = [];
86
+ for (const mapping of mappings) {
87
+ const value = component[mapping.propName];
88
+ if (typeof value !== "string" || !isInheritedValue(value))
89
+ continue;
90
+ // Find ancestor (re-use the first one found for the same mode)
91
+ if (!ancestorEl) {
92
+ ancestorEl = findAncestor(element, value);
93
+ }
94
+ if (!ancestorEl)
95
+ continue;
96
+ const attrValue = ancestorEl.getAttribute(mapping.ancestorAttr);
97
+ if (attrValue != null) {
98
+ resolved.set(mapping.propName, attrValue);
99
+ }
100
+ attrsToWatch.push(mapping.ancestorAttr);
101
+ }
102
+ // Set up MutationObserver on the ancestor
103
+ if (ancestorEl && attrsToWatch.length > 0) {
104
+ observer = new MutationObserver(() => {
105
+ // Re-read all inherited attributes from the ancestor
106
+ for (const mapping of mappings) {
107
+ if (!isInheritedValue(component[mapping.propName]))
108
+ continue;
109
+ const attrValue = ancestorEl.getAttribute(mapping.ancestorAttr);
110
+ if (attrValue != null) {
111
+ resolved.set(mapping.propName, attrValue);
112
+ }
113
+ else {
114
+ resolved.delete(mapping.propName);
115
+ }
116
+ }
117
+ forceUpdate(component);
118
+ });
119
+ observer.observe(ancestorEl, {
120
+ attributes: true,
121
+ attributeFilter: attrsToWatch,
122
+ });
123
+ }
124
+ };
125
+ const connectedCallback = component["connectedCallback"];
126
+ component["connectedCallback"] = () => {
127
+ resolveAll();
128
+ runIfExisits(connectedCallback, component);
129
+ };
130
+ const disconnectedCallback = component["disconnectedCallback"];
131
+ component["disconnectedCallback"] = () => {
132
+ if (observer) {
133
+ observer.disconnect();
134
+ observer = null;
135
+ }
136
+ ancestorEl = undefined;
137
+ resolved.clear();
138
+ runIfExisits(disconnectedCallback, component);
139
+ };
140
+ /**
141
+ * Resolver: returns the inherited value for the given prop, or `undefined`
142
+ * when the prop is not using inheritance (so the caller falls through to
143
+ * its normal logic).
144
+ */
145
+ const resolve = (propName, currentValue) => {
146
+ if (!isInheritedValue(currentValue))
147
+ return undefined;
148
+ return resolved.get(propName);
149
+ };
150
+ return resolve;
151
+ };
152
+ export default withInheritedProps;
@@ -0,0 +1,66 @@
1
+ import { forceUpdate, getElement } from "@stencil/core";
2
+ import { getStores, clearStoresCache } from "../context/context-protocol";
3
+ import { runIfExisits } from "./utils";
4
+ /**
5
+ * Mixin that syncs the scoped `scalingGroups` store into a component's
6
+ * `pixelPerUnitGroupMap` and triggers re-renders on changes.
7
+ *
8
+ * When a scaling group value is added or updated in the store (by a
9
+ * `<bn-scaling-group>` element), this mixin updates the local map,
10
+ * re-runs the component's scaling validators to clear/set error states,
11
+ * and forces a re-render so `preparePixelPerUnit` / `preparePixelPerPercentage`
12
+ * pick up the new value.
13
+ *
14
+ * @param component - Stencil component instance that has a `pixelPerUnitGroupMap` field
15
+ */
16
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
17
+ const withScalingGroup = (component) => {
18
+ let subscription;
19
+ let stores;
20
+ const syncAllEntries = () => {
21
+ const state = stores.scalingGroups.state;
22
+ for (const key of Object.keys(state)) {
23
+ if (state[key] !== undefined) {
24
+ component.pixelPerUnitGroupMap.set(key, state[key]);
25
+ }
26
+ else {
27
+ component.pixelPerUnitGroupMap.delete(key);
28
+ }
29
+ }
30
+ };
31
+ const revalidate = () => {
32
+ if (typeof component.validateUnitScaling === "function") {
33
+ component.validateUnitScaling(component.unitScaling);
34
+ }
35
+ if (typeof component.validatePercentageScaling === "function") {
36
+ component.validatePercentageScaling(component.percentageScaling);
37
+ }
38
+ };
39
+ const connectedCallback = component["connectedCallback"];
40
+ component["connectedCallback"] = () => {
41
+ const element = getElement(component);
42
+ stores = getStores(element);
43
+ // Initial sync of all existing scaling group entries
44
+ syncAllEntries();
45
+ revalidate();
46
+ // Subscribe to future changes
47
+ subscription = stores.scalingGroups.on("set", (key, newValue) => {
48
+ if (newValue !== undefined) {
49
+ component.pixelPerUnitGroupMap.set(key, newValue);
50
+ }
51
+ else {
52
+ component.pixelPerUnitGroupMap.delete(key);
53
+ }
54
+ revalidate();
55
+ forceUpdate(getElement(component));
56
+ });
57
+ runIfExisits(connectedCallback, component);
58
+ };
59
+ const disconnectedCallback = component["disconnectedCallback"];
60
+ component["disconnectedCallback"] = () => {
61
+ runIfExisits(subscription);
62
+ clearStoresCache(getElement(component));
63
+ runIfExisits(disconnectedCallback, component);
64
+ };
65
+ };
66
+ export default withScalingGroup;
@@ -1 +1 @@
1
- import{a as e}from"./alasql.min.js";import{h as t}from"./Order.js";class a{constructor(e="",t=1){this.prefix=e,this.value=t}}var s;!function(e){e[e.Y=1e24]="Y",e[e.Z=1e21]="Z",e[e.E=1e18]="E",e[e.P=1e15]="P",e[e.T=1e12]="T",e[e.G=1e9]="G",e[e.M=1e6]="M",e[e.k=1e3]="k",e[e.h=100]="h",e[e.da=10]="da",e[e.d=.1]="d",e[e.c=.01]="c",e[e.m=.001]="m",e[e.my=1e-6]="my",e[e.n=1e-9]="n",e[e.p=1e-12]="p",e[e.f=1e-15]="f",e[e.a=1e-18]="a",e[e.z=1e-21]="z",e[e.y=1e-24]="y"}(s||(s={}));class r{static calculateMeasureScale(t,s,r){var n;if("_"===r)return new a;if(null!=r&&[...this.unitsLeast,...this.unitsGreat].includes(r))return this.lookupPrefix(r);if(0===s.length)return new a;const i=`SELECT MAX(GREATEST(${s.filter((e=>3===e.length)).map((e=>"ABS("+e+")")).toString()})) as prefixvalue\n FROM ?`,u=`SELECT MIN(LEAST(${s.filter((e=>3===e.length)).map((e=>"ABS("+e+")")).toString()})) as prefixvalue\n FROM ?`;let c=i;"LEAST"===(null==r?void 0:r.toUpperCase())&&(c=u);const h=null===(n=e(c,[t])[0])||void 0===n?void 0:n.prefixvalue;return this.determinePrefix(Math.abs(h))}static determinePrefix(e){if(e>=1e3){const t=Math.floor(Math.floor(Math.abs(e)).toString().length/3),s=+Math.pow(1e3,t);return new a(this.unitsGreat[t-1],s)}if(e<=.001){const t=Math.floor(Math.abs(e).toString().length/3),s=1/Math.pow(1e3,t);return new a(this.unitsLeast[t-1],s)}return new a}static lookupPrefix(e){return new a(e,s[e])}}r.unitsGreat=["k","M","G","T","P","E","Z","Y"],r.unitsLeast=["m","my","n","p","P","f","a","z","y"];class n{constructor(e=2,t=1){this.percent=e,this.decimal=t}}class i{adapt(e){const a=new n;return t.isNumber(e.percent)&&(a.percent=e.percent),t.isNumber(e.decimal)&&(a.decimal=e.decimal),a}default(){return new n}}export{r as D,a as S,n as a,i as b}
1
+ import{a as e}from"./alasql.min.js";import{j as t}from"./Order.js";class a{constructor(e="",t=1){this.prefix=e,this.value=t}}var s;!function(e){e[e.Y=1e24]="Y",e[e.Z=1e21]="Z",e[e.E=1e18]="E",e[e.P=1e15]="P",e[e.T=1e12]="T",e[e.G=1e9]="G",e[e.M=1e6]="M",e[e.k=1e3]="k",e[e.h=100]="h",e[e.da=10]="da",e[e.d=.1]="d",e[e.c=.01]="c",e[e.m=.001]="m",e[e.my=1e-6]="my",e[e.n=1e-9]="n",e[e.p=1e-12]="p",e[e.f=1e-15]="f",e[e.a=1e-18]="a",e[e.z=1e-21]="z",e[e.y=1e-24]="y"}(s||(s={}));class r{static calculateMeasureScale(t,s,r){var n;if("_"===r)return new a;if(null!=r&&[...this.unitsLeast,...this.unitsGreat].includes(r))return this.lookupPrefix(r);if(0===s.length)return new a;const i=`SELECT MAX(GREATEST(${s.filter((e=>3===e.length)).map((e=>"ABS("+e+")")).toString()})) as prefixvalue\n FROM ?`,u=`SELECT MIN(LEAST(${s.filter((e=>3===e.length)).map((e=>"ABS("+e+")")).toString()})) as prefixvalue\n FROM ?`;let c=i;"LEAST"===(null==r?void 0:r.toUpperCase())&&(c=u);const l=null===(n=e(c,[t])[0])||void 0===n?void 0:n.prefixvalue;return this.determinePrefix(Math.abs(l))}static determinePrefix(e){if(e>=1e3){const t=Math.floor(Math.floor(Math.abs(e)).toString().length/3),s=+Math.pow(1e3,t);return new a(this.unitsGreat[t-1],s)}if(e<=.001){const t=Math.floor(Math.abs(e).toString().length/3),s=1/Math.pow(1e3,t);return new a(this.unitsLeast[t-1],s)}return new a}static lookupPrefix(e){return new a(e,s[e])}}r.unitsGreat=["k","M","G","T","P","E","Z","Y"],r.unitsLeast=["m","my","n","p","P","f","a","z","y"];class n{constructor(e=2,t=1){this.percent=e,this.decimal=t}}class i{adapt(e){const a=new n;return t.isNumber(e.percent)&&(a.percent=e.percent),t.isNumber(e.decimal)&&(a.decimal=e.decimal),a}default(){return new n}}export{r as D,a as S,n as a,i as b}
@@ -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{f 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}