@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.
- package/LICENSE +203 -21
- package/dist/bn-template-engine/bn-template-engine.esm.js +1 -1
- package/dist/bn-template-engine/p-095f74d7.entry.js +1 -0
- package/dist/bn-template-engine/p-14318b0d.entry.js +1 -0
- package/dist/bn-template-engine/{p-c9f050bf.entry.js → p-2133e02b.entry.js} +1 -1
- package/dist/bn-template-engine/p-6b469808.entry.js +1 -0
- package/dist/bn-template-engine/p-7HSTE79g.js +1 -0
- package/dist/bn-template-engine/p-B4JfKvVT.js +1 -0
- package/dist/bn-template-engine/p-B_d-jp99.js +2 -0
- package/dist/bn-template-engine/p-Bi2wx-el.js +1 -0
- package/dist/bn-template-engine/p-CWiZks2h.js +1 -0
- package/dist/bn-template-engine/{p-BQp6ZPYW.js → p-DSXNgKLa.js} +1 -1
- package/dist/bn-template-engine/p-c2cbb8ea.entry.js +1 -0
- package/dist/bn-template-engine/p-e783733e.entry.js +1 -0
- package/dist/bn-template-engine/p-e94b4e31.entry.js +1 -0
- package/dist/bn-template-engine/p-fdb3e99a.entry.js +1 -0
- package/dist/cjs/bn-asset_21.cjs.entry.js +23995 -0
- package/dist/cjs/bn-grid.cjs.entry.js +6 -13
- package/dist/cjs/bn-image.cjs.entry.js +6 -13
- package/dist/cjs/bn-internationalization.cjs.entry.js +5 -7
- package/dist/cjs/bn-template-engine.cjs.js +2 -2
- package/dist/cjs/bn-template.cjs.entry.js +4 -6
- package/dist/cjs/bn-text.cjs.entry.js +10 -19
- package/dist/cjs/bn-tree.cjs.entry.js +11 -14
- package/dist/cjs/{context-protocol-BkYHFkXE.js → context-protocol-B_jipZpJ.js} +6 -2
- package/dist/cjs/editor-companion.cjs.entry.js +3 -3
- package/dist/cjs/{index-CScBFiS1.js → index-CDKG4xmO.js} +2 -2
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/scaling-eyzCrFB8.js +329 -0
- package/dist/cjs/{withBodyObserver-B0_W1VOf.js → withBodyObserver-D7BKWN2N.js} +2 -2
- package/dist/cjs/{withHasError-Dspb3lIV.js → withHasError-Cl2gTQzA.js} +106 -2
- package/dist/{esm/luxon-DbyXf6dF.js → cjs/withStyled-V7xz_x1c.js} +1406 -1
- package/dist/collection/collection-manifest.json +2 -10
- package/dist/collection/components/bn-body/bn-body.css +1 -0
- package/dist/collection/components/bn-card/bn-card.css +2 -0
- package/dist/collection/components/bn-chart-structure/bn-chart-structure.js +368 -130
- package/dist/collection/components/bn-chart-structure/ibcs-chart-structure.js +34 -10
- package/dist/collection/components/bn-chart-structure/utils/StructureChart.js +94 -11
- package/dist/collection/components/bn-chart-structure/utils/elements/Label.js +11 -0
- package/dist/collection/components/bn-chart-structure/utils/elements/StackedBar.js +8 -6
- package/dist/collection/components/bn-chart-structure/utils/model/styles/StructureChartStyle.js +4 -0
- package/dist/collection/components/bn-chart-time/bn-chart-time.css +1 -1
- package/dist/collection/components/bn-chart-time/bn-chart-time.js +172 -51
- package/dist/collection/components/bn-chart-time/ibcs-chart-time.js +22 -9
- package/dist/collection/components/bn-chart-time/utils/TimeChart.js +3 -3
- package/dist/collection/components/bn-chart-time/utils/elements/StackedColumn.js +3 -4
- package/dist/collection/components/bn-chart-time/utils/model/styles/TimeChartStyle.js +4 -0
- package/dist/collection/components/bn-dataset/bn-dataset.js +49 -2
- package/dist/collection/components/bn-datasource/bn-datasource.js +173 -8
- package/dist/collection/components/bn-layout-card/bn-layout-card.css +3 -2
- package/dist/collection/components/bn-layout-card/bn-layout-card.js +207 -32
- package/dist/collection/components/bn-layout-page/bn-layout-page.css +1 -3
- package/dist/collection/components/bn-layout-page/bn-layout-page.js +172 -43
- package/dist/collection/components/bn-message/bn-message.js +1 -1
- package/dist/collection/components/bn-page/bn-page.js +1 -1
- package/dist/collection/components/bn-scaling-group/bn-scaling-group.css +3 -0
- package/dist/collection/components/bn-scaling-group/bn-scaling-group.js +136 -0
- package/dist/collection/components/bn-table/bn-table.js +201 -58
- package/dist/collection/components/bn-table/ibcs-table.css +7 -5
- package/dist/collection/components/bn-table/ibcs-table.js +91 -5
- package/dist/collection/components/bn-table/utils/elements/CellBarChart.js +79 -31
- package/dist/collection/components/bn-table/utils/elements/TableRow.js +3 -1
- package/dist/collection/components/bn-table/utils/factories/tableDataSetFactory.js +12 -3
- package/dist/collection/components/bn-table/utils/helper/ColumnStatistics.js +9 -1
- package/dist/collection/components/bn-template/bn-template.js +1 -1
- package/dist/collection/components/bn-text/bn-text.js +1 -1
- package/dist/collection/components/bn-title/bn-title.js +1 -9
- package/dist/collection/components/bn-title/ibcs-title/ibcs-title.js +1 -4
- package/dist/collection/components/bn-tree/bn-tree.js +5 -1
- package/dist/collection/components/editor-companion/editor-companion.js +1 -1
- package/dist/collection/stores/componentStyles.js +2 -0
- package/dist/collection/stores/createScopedStores.js +3 -1
- package/dist/collection/utils/DateStringFactory.js +0 -1
- package/dist/collection/utils/constants.js +35 -5
- package/dist/collection/utils/contentDecoder.js +28 -0
- package/dist/collection/utils/layoutObserver.js +88 -0
- package/dist/collection/utils/parentDimensions.js +57 -10
- package/dist/collection/utils/stackColors.js +2 -2
- package/dist/collection/utils/validate.js +5 -2
- package/dist/collection/utils/withInheritedProps.js +152 -0
- package/dist/collection/utils/withScalingGroup.js +66 -0
- package/dist/components/DataFormatDigits.js +1 -1
- package/dist/components/DateStringFactory.js +1 -1
- package/dist/components/Order.js +1 -1
- package/dist/components/SVGVariancesStyleGroup.js +1 -1
- package/dist/components/bn-body2.js +1 -1
- package/dist/components/bn-card2.js +1 -1
- package/dist/components/bn-chart-structure.js +1 -1
- package/dist/components/bn-chart-time.js +1 -1
- package/dist/components/bn-dataset.js +1 -1
- package/dist/components/bn-datasource.js +1 -1
- package/dist/components/bn-layout-card.js +1 -1
- package/dist/components/bn-layout-page.js +1 -1
- package/dist/components/bn-message2.js +1 -1
- package/dist/components/bn-page2.js +1 -1
- package/dist/components/{test-runner-time.d.ts → bn-scaling-group.d.ts} +4 -4
- package/dist/components/bn-scaling-group.js +1 -0
- package/dist/components/bn-table.js +1 -1
- package/dist/components/bn-template.js +1 -1
- package/dist/components/bn-text.js +1 -1
- package/dist/components/bn-title2.js +1 -1
- package/dist/components/bn-tree.js +1 -1
- package/dist/components/contentDecoder.js +1 -0
- package/dist/components/context-protocol.js +1 -1
- package/dist/components/editor-companion.js +1 -1
- package/dist/components/emotion-hash.esm.js +1 -0
- package/dist/components/ibcs-chart-structure2.js +1 -1
- package/dist/components/ibcs-chart-time2.js +1 -1
- package/dist/components/ibcs-table2.js +1 -1
- package/dist/components/ibcs-title2.js +1 -1
- package/dist/components/ibcsRuleSet.js +1 -1
- package/dist/components/layoutObserver.js +1 -0
- package/dist/components/scaling.js +1 -1
- package/dist/components/validate.js +1 -1
- package/dist/components/withHasError.js +1 -1
- package/dist/components/withInheritedProps.js +1 -0
- package/dist/components/withStyled.js +1 -1
- package/dist/esm/bn-asset_21.entry.js +23973 -0
- package/dist/esm/bn-grid.entry.js +4 -11
- package/dist/esm/bn-image.entry.js +4 -11
- package/dist/esm/bn-internationalization.entry.js +4 -6
- package/dist/esm/bn-template-engine.js +3 -3
- package/dist/esm/bn-template.entry.js +3 -5
- package/dist/esm/bn-text.entry.js +6 -15
- package/dist/esm/bn-tree.entry.js +9 -12
- package/dist/esm/{context-protocol-DzeqZxg6.js → context-protocol-D-o_UZ33.js} +6 -2
- package/dist/esm/editor-companion.entry.js +3 -3
- package/dist/esm/{index-B27Ax6P_.js → index-B_d-jp99.js} +2 -2
- package/dist/esm/loader.js +3 -3
- package/dist/esm/scaling-BzbiBnuN.js +324 -0
- package/dist/esm/{withBodyObserver-gZpZiEIK.js → withBodyObserver-AFk2wwHT.js} +2 -2
- package/dist/esm/{withHasError-C48fTE2k.js → withHasError-DW_vMDUp.js} +106 -2
- package/dist/{cjs/luxon-8hyy5YD7.js → esm/withStyled-5RqF8WBL.js} +1371 -2
- package/dist/types/components/bn-chart-structure/bn-chart-structure.d.ts +163 -110
- package/dist/types/components/bn-chart-structure/ibcs-chart-structure.d.ts +4 -3
- package/dist/types/components/bn-chart-structure/utils/StructureChart.d.ts +7 -0
- package/dist/types/components/bn-chart-structure/utils/elements/Label.d.ts +2 -0
- package/dist/types/components/bn-chart-structure/utils/model/styles/StructureChartStyle.d.ts +1 -0
- package/dist/types/components/bn-chart-time/bn-chart-time.d.ts +29 -12
- package/dist/types/components/bn-chart-time/ibcs-chart-time.d.ts +4 -3
- package/dist/types/components/bn-chart-time/utils/model/styles/TimeChartStyle.d.ts +1 -0
- package/dist/types/components/bn-dataset/bn-dataset.d.ts +6 -0
- package/dist/types/components/bn-datasource/bn-datasource.d.ts +48 -5
- package/dist/types/components/bn-layout-card/bn-layout-card.d.ts +153 -0
- package/dist/types/components/bn-layout-page/bn-layout-page.d.ts +160 -1
- package/dist/types/components/bn-scaling-group/bn-scaling-group.d.ts +37 -0
- package/dist/types/components/bn-table/bn-table.d.ts +32 -17
- package/dist/types/components/bn-table/ibcs-table.d.ts +20 -0
- package/dist/types/components/bn-table/utils/elements/Cell.d.ts +1 -0
- package/dist/types/components/bn-table/utils/elements/CellBarChart.d.ts +1 -0
- package/dist/types/components/bn-title/bn-title.d.ts +0 -1
- package/dist/types/components.d.ts +438 -461
- package/dist/types/context/context-protocol.d.ts +2 -1
- package/dist/types/stores/componentStyles.d.ts +2 -0
- package/dist/types/stores/createScopedStores.d.ts +1 -0
- package/dist/types/utils/constants.d.ts +23 -5
- package/dist/types/utils/contentDecoder.d.ts +12 -0
- package/dist/types/utils/layoutObserver.d.ts +27 -0
- package/dist/types/utils/parentDimensions.d.ts +7 -2
- package/dist/types/utils/validate.d.ts +1 -0
- package/dist/types/utils/withInheritedProps.d.ts +38 -0
- package/dist/types/utils/withScalingGroup.d.ts +14 -0
- package/package.json +4 -4
- package/readme.md +2 -3
- package/dist/bn-template-engine/assets/gpx/Chasing_Legends.gpx +0 -195076
- package/dist/bn-template-engine/assets/gpx/Fahrt_am_Nachmittag.gpx +0 -142007
- package/dist/bn-template-engine/assets/icons/gpx-finish.png +0 -0
- package/dist/bn-template-engine/assets/icons/gpx-shadow.png +0 -0
- package/dist/bn-template-engine/assets/icons/gpx-start.png +0 -0
- package/dist/bn-template-engine/assets/icons/marker-example.png +0 -0
- package/dist/bn-template-engine/assets/icons/pin-icon-end.png +0 -0
- package/dist/bn-template-engine/assets/icons/pin-icon-start.png +0 -0
- package/dist/bn-template-engine/assets/icons/pin-icon-wpt.png +0 -0
- package/dist/bn-template-engine/assets/icons/pin-shadow.png +0 -0
- package/dist/bn-template-engine/assets/icons/pin.png +0 -0
- package/dist/bn-template-engine/p--TeDldm8.js +0 -1
- package/dist/bn-template-engine/p-0e7dc113.entry.js +0 -1
- package/dist/bn-template-engine/p-1jFf17Vj.js +0 -1
- package/dist/bn-template-engine/p-264c6bad.entry.js +0 -1
- package/dist/bn-template-engine/p-326a0902.entry.js +0 -1
- package/dist/bn-template-engine/p-38a8bde3.entry.js +0 -1
- package/dist/bn-template-engine/p-577eafcd.entry.js +0 -1
- package/dist/bn-template-engine/p-5905cc43.entry.js +0 -1
- package/dist/bn-template-engine/p-5d155a72.entry.js +0 -1
- package/dist/bn-template-engine/p-65f8962a.entry.js +0 -1
- package/dist/bn-template-engine/p-6b8d1ebf.entry.js +0 -1
- package/dist/bn-template-engine/p-7995acb2.entry.js +0 -1
- package/dist/bn-template-engine/p-7afe431e.entry.js +0 -1
- package/dist/bn-template-engine/p-8014b1ac.entry.js +0 -1
- package/dist/bn-template-engine/p-80423fc8.entry.js +0 -1
- package/dist/bn-template-engine/p-91e74d42.entry.js +0 -1
- package/dist/bn-template-engine/p-930a9e29.entry.js +0 -1
- package/dist/bn-template-engine/p-93C9jL8R.js +0 -1
- package/dist/bn-template-engine/p-93ff8584.entry.js +0 -1
- package/dist/bn-template-engine/p-B0m0U4wJ.js +0 -1
- package/dist/bn-template-engine/p-B27Ax6P_.js +0 -2
- package/dist/bn-template-engine/p-B79VcHiT.js +0 -1
- package/dist/bn-template-engine/p-BBd0ZVLL.js +0 -1
- package/dist/bn-template-engine/p-BFTU3MAI.js +0 -1
- package/dist/bn-template-engine/p-BFatTBqh.js +0 -1
- package/dist/bn-template-engine/p-BYmPQYxx.js +0 -1
- package/dist/bn-template-engine/p-BhEQy-2D.js +0 -1
- package/dist/bn-template-engine/p-BtVfu16B.js +0 -1
- package/dist/bn-template-engine/p-CY1RzLjU.js +0 -1
- package/dist/bn-template-engine/p-CfWnag33.js +0 -1
- package/dist/bn-template-engine/p-CnI71OA9.js +0 -1
- package/dist/bn-template-engine/p-Cp4MVxCu.js +0 -1
- package/dist/bn-template-engine/p-DbyXf6dF.js +0 -1
- package/dist/bn-template-engine/p-TdL-LRR9.js +0 -1
- package/dist/bn-template-engine/p-_LBTIfNN.js +0 -1
- package/dist/bn-template-engine/p-a342cd3c.entry.js +0 -1
- package/dist/bn-template-engine/p-ad94cf63.entry.js +0 -1
- package/dist/bn-template-engine/p-bc37d750.entry.js +0 -1
- package/dist/bn-template-engine/p-d07a0ca3.entry.js +0 -1
- package/dist/bn-template-engine/p-e5f372af.entry.js +0 -1
- package/dist/bn-template-engine/p-e620028c.entry.js +0 -1
- package/dist/bn-template-engine/p-e81e116a.entry.js +0 -1
- package/dist/bn-template-engine/p-eca98070.entry.js +0 -1
- package/dist/bn-template-engine/p-ee6de950.entry.js +0 -1
- package/dist/bn-template-engine/p-efe0ef1e.entry.js +0 -1
- package/dist/bn-template-engine/p-f034f1b8.entry.js +0 -1
- package/dist/bn-template-engine/p-f1c1a8a3.entry.js +0 -1
- package/dist/bn-template-engine/p-fe573a1a.entry.js +0 -1
- package/dist/bn-template-engine/p-kMyLevYy.js +0 -1
- package/dist/cjs/DataFormatDigits-DmTbhF8q.js +0 -142
- package/dist/cjs/DateStringFactory-Dn0aRj2Y.js +0 -453
- package/dist/cjs/Order-B4NIqQWe.js +0 -129
- package/dist/cjs/SVGVariancesStyleGroup-Czizhngt.js +0 -7973
- package/dist/cjs/StringAdapter-0EbYMkR0.js +0 -136
- package/dist/cjs/_commonjsHelpers-BJu3ubxk.js +0 -10
- package/dist/cjs/alasql.min-C_nHTuEQ.js +0 -306
- package/dist/cjs/bn-asset.cjs.entry.js +0 -42
- package/dist/cjs/bn-body_3.cjs.entry.js +0 -413
- package/dist/cjs/bn-card.cjs.entry.js +0 -37
- package/dist/cjs/bn-chart-structure.cjs.entry.js +0 -705
- package/dist/cjs/bn-chart-time.cjs.entry.js +0 -987
- package/dist/cjs/bn-component-style.cjs.entry.js +0 -44
- package/dist/cjs/bn-context_5.cjs.entry.js +0 -3380
- package/dist/cjs/bn-dataset.cjs.entry.js +0 -278
- package/dist/cjs/bn-layout-card.cjs.entry.js +0 -128
- package/dist/cjs/bn-layout-page.cjs.entry.js +0 -142
- package/dist/cjs/bn-map.cjs.entry.js +0 -425
- package/dist/cjs/bn-message.cjs.entry.js +0 -52
- package/dist/cjs/componentRegister-C17UFNPh.js +0 -72
- package/dist/cjs/constants-DHqQXSSd.js +0 -158
- package/dist/cjs/formatter-DIJL_crx.js +0 -215
- package/dist/cjs/ibcs-chart-structure.cjs.entry.js +0 -2906
- package/dist/cjs/ibcs-chart-time.cjs.entry.js +0 -4140
- package/dist/cjs/ibcs-map.cjs.entry.js +0 -1075
- package/dist/cjs/ibcs-title.cjs.entry.js +0 -352
- package/dist/cjs/scaling-B23eOtsC.js +0 -67
- package/dist/cjs/test-runner-card.cjs.entry.js +0 -27
- package/dist/cjs/test-runner-chart-time.cjs.entry.js +0 -230
- package/dist/cjs/test-runner-chart.cjs.entry.js +0 -326
- package/dist/cjs/test-runner-map.cjs.entry.js +0 -1862
- package/dist/cjs/test-runner-table.cjs.entry.js +0 -477
- package/dist/cjs/test-runner-time.cjs.entry.js +0 -381
- package/dist/cjs/test-runner-title.cjs.entry.js +0 -115
- package/dist/cjs/withComponentStatus-BrxL7usr.js +0 -39
- package/dist/cjs/withComponentStyle-C6KHnZHt.js +0 -128
- package/dist/cjs/withDataset-ZdN-RRTx.js +0 -146
- package/dist/cjs/withStyled-Bf-stJTR.js +0 -567
- package/dist/cjs/withTranslation-Cz0M5maV.js +0 -77
- package/dist/collection/components/bn-map/bn-map.css +0 -4
- package/dist/collection/components/bn-map/bn-map.js +0 -725
- package/dist/collection/components/bn-map/ibcs-map/assets/gpx/Chasing_Legends.gpx +0 -195076
- package/dist/collection/components/bn-map/ibcs-map/assets/gpx/Fahrt_am_Nachmittag.gpx +0 -142007
- package/dist/collection/components/bn-map/ibcs-map/assets/icons/gpx-finish.png +0 -0
- package/dist/collection/components/bn-map/ibcs-map/assets/icons/gpx-shadow.png +0 -0
- package/dist/collection/components/bn-map/ibcs-map/assets/icons/gpx-start.png +0 -0
- package/dist/collection/components/bn-map/ibcs-map/assets/icons/marker-example.png +0 -0
- package/dist/collection/components/bn-map/ibcs-map/assets/icons/pin-icon-end.png +0 -0
- package/dist/collection/components/bn-map/ibcs-map/assets/icons/pin-icon-start.png +0 -0
- package/dist/collection/components/bn-map/ibcs-map/assets/icons/pin-icon-wpt.png +0 -0
- package/dist/collection/components/bn-map/ibcs-map/assets/icons/pin-shadow.png +0 -0
- package/dist/collection/components/bn-map/ibcs-map/assets/icons/pin.png +0 -0
- package/dist/collection/components/bn-map/ibcs-map/ibcs-map.css +0 -674
- package/dist/collection/components/bn-map/ibcs-map/ibcs-map.js +0 -744
- package/dist/collection/components/bn-map/ibcs-map/utils/model/GeoJsonLayer.js +0 -9
- package/dist/collection/components/bn-map/ibcs-map/utils/model/GpxLayer.js +0 -13
- package/dist/collection/components/bn-map/ibcs-map/utils/model/Marker.js +0 -11
- package/dist/collection/components/bn-map/ibcs-map/utils/model/index.js +0 -2
- package/dist/collection/test-runner/test-runner-card.js +0 -36
- package/dist/collection/test-runner/test-runner-chart-time.js +0 -234
- package/dist/collection/test-runner/test-runner-chart.js +0 -364
- package/dist/collection/test-runner/test-runner-map.js +0 -1901
- package/dist/collection/test-runner/test-runner-table.js +0 -469
- package/dist/collection/test-runner/test-runner-time.js +0 -399
- package/dist/collection/test-runner/test-runner-title.js +0 -108
- package/dist/components/bn-map.d.ts +0 -11
- package/dist/components/bn-map.js +0 -1
- package/dist/components/componentRegister.js +0 -1
- package/dist/components/ibcs-map.d.ts +0 -11
- package/dist/components/ibcs-map.js +0 -1
- package/dist/components/ibcs-map2.js +0 -1
- package/dist/components/test-runner-card.d.ts +0 -11
- package/dist/components/test-runner-card.js +0 -1
- package/dist/components/test-runner-chart-time.d.ts +0 -11
- package/dist/components/test-runner-chart-time.js +0 -1
- package/dist/components/test-runner-chart.d.ts +0 -11
- package/dist/components/test-runner-chart.js +0 -1
- package/dist/components/test-runner-map.d.ts +0 -11
- package/dist/components/test-runner-map.js +0 -1
- package/dist/components/test-runner-table.d.ts +0 -11
- package/dist/components/test-runner-table.js +0 -1
- package/dist/components/test-runner-time.js +0 -1
- package/dist/components/test-runner-title.d.ts +0 -11
- package/dist/components/test-runner-title.js +0 -1
- package/dist/components/withDataset.js +0 -1
- package/dist/esm/DataFormatDigits-Dt6gpIiZ.js +0 -137
- package/dist/esm/DateStringFactory-_Qiv0IvF.js +0 -451
- package/dist/esm/Order-B4fpLe_f.js +0 -125
- package/dist/esm/SVGVariancesStyleGroup-DlWgvpzs.js +0 -7961
- package/dist/esm/StringAdapter-BLvo1Krl.js +0 -133
- package/dist/esm/_commonjsHelpers-BFTU3MAI.js +0 -7
- package/dist/esm/alasql.min-CWu4NkIt.js +0 -304
- package/dist/esm/bn-asset.entry.js +0 -40
- package/dist/esm/bn-body_3.entry.js +0 -409
- package/dist/esm/bn-card.entry.js +0 -35
- package/dist/esm/bn-chart-structure.entry.js +0 -703
- package/dist/esm/bn-chart-time.entry.js +0 -985
- package/dist/esm/bn-component-style.entry.js +0 -42
- package/dist/esm/bn-context_5.entry.js +0 -3374
- package/dist/esm/bn-dataset.entry.js +0 -276
- package/dist/esm/bn-layout-card.entry.js +0 -126
- package/dist/esm/bn-layout-page.entry.js +0 -140
- package/dist/esm/bn-map.entry.js +0 -423
- package/dist/esm/bn-message.entry.js +0 -50
- package/dist/esm/componentRegister-BtVfu16B.js +0 -72
- package/dist/esm/constants-kMyLevYy.js +0 -158
- package/dist/esm/formatter-DTMEZ6d8.js +0 -211
- package/dist/esm/ibcs-chart-structure.entry.js +0 -2904
- package/dist/esm/ibcs-chart-time.entry.js +0 -4138
- package/dist/esm/ibcs-map.entry.js +0 -1073
- package/dist/esm/ibcs-title.entry.js +0 -350
- package/dist/esm/scaling-BBd0ZVLL.js +0 -64
- package/dist/esm/test-runner-card.entry.js +0 -25
- package/dist/esm/test-runner-chart-time.entry.js +0 -228
- package/dist/esm/test-runner-chart.entry.js +0 -324
- package/dist/esm/test-runner-map.entry.js +0 -1860
- package/dist/esm/test-runner-table.entry.js +0 -475
- package/dist/esm/test-runner-time.entry.js +0 -379
- package/dist/esm/test-runner-title.entry.js +0 -113
- package/dist/esm/withComponentStatus-elELReKt.js +0 -37
- package/dist/esm/withComponentStyle-NaxfakAG.js +0 -126
- package/dist/esm/withDataset-BT2VQCsG.js +0 -144
- package/dist/esm/withStyled-CpUTv74m.js +0 -539
- package/dist/esm/withTranslation-Do4GhleK.js +0 -75
- package/dist/types/components/bn-map/bn-map.d.ts +0 -122
- package/dist/types/components/bn-map/ibcs-map/ibcs-map.d.ts +0 -73
- package/dist/types/components/bn-map/ibcs-map/utils/model/GeoJsonLayer.d.ts +0 -8
- package/dist/types/components/bn-map/ibcs-map/utils/model/GpxLayer.d.ts +0 -11
- package/dist/types/components/bn-map/ibcs-map/utils/model/Marker.d.ts +0 -9
- package/dist/types/components/bn-map/ibcs-map/utils/model/index.d.ts +0 -2
- package/dist/types/test-runner/test-runner-card.d.ts +0 -3
- package/dist/types/test-runner/test-runner-chart-time.d.ts +0 -3
- package/dist/types/test-runner/test-runner-chart.d.ts +0 -3
- package/dist/types/test-runner/test-runner-map.d.ts +0 -3
- package/dist/types/test-runner/test-runner-table.d.ts +0 -3
- package/dist/types/test-runner/test-runner-time.d.ts +0 -3
- package/dist/types/test-runner/test-runner-title.d.ts +0 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h, Host } from "@stencil/core";
|
|
2
|
-
import { OrderDirection, TableType } from "./utils/model";
|
|
2
|
+
import { OrderDirection, TableRowType, TableType } from "./utils/model";
|
|
3
3
|
import { Table } from "./utils/Table";
|
|
4
4
|
import { TableComponentConfigAdapter } from "./utils/model/TableComponentConfig";
|
|
5
5
|
import { TableDrillGroupAdapter } from "./utils/model/TableDrillGroup";
|
|
@@ -48,6 +48,7 @@ export class IbcsTable {
|
|
|
48
48
|
this.measureType = MeasureType.VOLUME;
|
|
49
49
|
this.filter = "";
|
|
50
50
|
this.barColumns = [];
|
|
51
|
+
this.barColumnMaxWidth = 30;
|
|
51
52
|
this.unitScaling = 0.01;
|
|
52
53
|
this.percentageScaling = 0.5;
|
|
53
54
|
this.scaleFactor = 1;
|
|
@@ -63,7 +64,7 @@ export class IbcsTable {
|
|
|
63
64
|
const errorMsg = this.i18n.get("NO_DATA") || "==No Data==";
|
|
64
65
|
return h("p", { class: "warning" }, errorMsg);
|
|
65
66
|
}
|
|
66
|
-
return (h("table", null, h("thead", null, this.table.getHeader().map((row) => (h("tr", { class: row.cssStyle }, row.getCells().map((cell) => (h("th", { colSpan: cell.colSpan, class: cell.cssStyle }, cell.getAsHeaderList().map((line, i, arr) => (h("span", null, i === arr.length - 1 ? (h("span", { class: line === " " ? "table-footer" : "" }, line, cell.drawPrefix(), " ")) : (h("span", null, line, cell.drawPrefix(), h("br", null))))))))))))), h("tbody", null, this.table.getBody().map((row) => (h("tr", { class: row.cssStyle }, row === null || row === void 0 ? void 0 : row.getCells().map((cell) => (h("td", { colSpan: cell.colSpan, class: cell.
|
|
67
|
+
return (h("table", null, h("thead", null, this.table.getHeader().map((row) => (h("tr", { class: row.cssStyle }, row.getCells().map((cell) => (h("th", { colSpan: cell.colSpan, class: cell.cssStyle }, cell.getAsHeaderList().map((line, i, arr) => (h("span", null, i === arr.length - 1 ? (h("span", { class: line === " " ? "table-footer" : "" }, line, cell.drawPrefix(), " ")) : (h("span", null, line, cell.drawPrefix(), h("br", null))))))))))))), h("tbody", null, this.table.getBody().map((row) => (h("tr", { class: row.cssStyle }, row === null || row === void 0 ? void 0 : row.getCells().map((cell) => (h("td", { colSpan: cell.colSpan, class: cell.type ? `${cell.cssStyle} ${cell.type}` : cell.cssStyle }, cell.prefix != null ? (h("span", { class: cell.cssStyle + " " + cell.prefixStyle }, cell.drawPrefix())) : (""), cell.isBarChart && cell.columnStats && row.type !== TableRowType.SUM ? (h(CellBarChart, { value: cell.value, scenario: cell.key, columnStats: cell.columnStats, height: 18 * this.scaleFactor, isRelative: cell.key.startsWith("dr"), isPositiveGood: cell.key.endsWith("_pos"), measureScale: cell.measureScale, maxBarWidth: this.barColumnMaxWidth, styles: this.barChartStyles })) : (cell.draw(this.componentDataFormatDigits)))))))))));
|
|
67
68
|
};
|
|
68
69
|
return h(Host, null, helper());
|
|
69
70
|
}
|
|
@@ -71,9 +72,9 @@ export class IbcsTable {
|
|
|
71
72
|
const config = this.prepareConfig();
|
|
72
73
|
const data = this.prepareData();
|
|
73
74
|
this.componentDataFormatDigits = new DataFormatDigitsAdapter().adapt(this.dataFormatDigits);
|
|
74
|
-
this.barChartStyles = this.prepareBarChartStyles();
|
|
75
75
|
this.table = new Table(new IBCSRuleSet(), data, config);
|
|
76
76
|
this.table.setI18n(this.i18n);
|
|
77
|
+
this.barChartStyles = this.prepareBarChartStyles();
|
|
77
78
|
}
|
|
78
79
|
prepareConfig() {
|
|
79
80
|
const config = new TableComponentConfigAdapter(new TableDrillGroupAdapter(), new StringAdapter(), new OrderAdapter(new StringAdapter()), this.data).adapt({
|
|
@@ -165,12 +166,77 @@ export class IbcsTable {
|
|
|
165
166
|
fontColor: ((_z = $["global"]) === null || _z === void 0 ? void 0 : _z["fontColor"]) || "#000000",
|
|
166
167
|
fontSize: (((_0 = $["global"]) === null || _0 === void 0 ? void 0 : _0["fontSizePx"]) || 13.3333) * 0.85 * this.scaleFactor,
|
|
167
168
|
fontFamily: ((_1 = $["global"]) === null || _1 === void 0 ? void 0 : _1["fontFamily"]) || "'Noto Sans', sans-serif",
|
|
168
|
-
unitScaling: this.unitScaling,
|
|
169
|
-
percentageScaling: this.percentageScaling,
|
|
169
|
+
unitScaling: this.unitScaling > 0 ? this.unitScaling : this.autoUnitScaling(),
|
|
170
|
+
percentageScaling: this.percentageScaling > 0 ? this.percentageScaling : this.autoPercentageScaling(),
|
|
170
171
|
scaleFactor: this.scaleFactor,
|
|
171
172
|
};
|
|
172
173
|
});
|
|
173
174
|
}
|
|
175
|
+
/**
|
|
176
|
+
* Auto-calculate unitScaling so the largest absolute variance bar
|
|
177
|
+
* fills ~80% of the bar column width.
|
|
178
|
+
*/
|
|
179
|
+
autoUnitScaling() {
|
|
180
|
+
const fs = this.componentStyle(($) => { var _a; return (((_a = $["global"]) === null || _a === void 0 ? void 0 : _a["fontSizePx"]) || 13.3333) * 0.85 * this.scaleFactor; });
|
|
181
|
+
const maxBarWidthPx = this.barColumnMaxWidth * fs;
|
|
182
|
+
const targetWidth = maxBarWidthPx * 0.8;
|
|
183
|
+
const absMax = this.getMaxAbsValue();
|
|
184
|
+
if (absMax <= 0 || fs <= 0) {
|
|
185
|
+
return 0.01;
|
|
186
|
+
}
|
|
187
|
+
return targetWidth / (absMax * fs);
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Auto-calculate percentageScaling so the largest relative variance pin
|
|
191
|
+
* fills ~80% of the pin area.
|
|
192
|
+
*/
|
|
193
|
+
autoPercentageScaling() {
|
|
194
|
+
const fs = this.componentStyle(($) => { var _a; return (((_a = $["global"]) === null || _a === void 0 ? void 0 : _a["fontSizePx"]) || 13.3333) * 0.85 * this.scaleFactor; });
|
|
195
|
+
const maxPinLength = Math.round(this.barColumnMaxWidth * 0.67 * fs);
|
|
196
|
+
const targetLength = maxPinLength * 0.8;
|
|
197
|
+
const maxPct = this.getMaxRelativeValue();
|
|
198
|
+
if (maxPct <= 0 || fs <= 0) {
|
|
199
|
+
return 0.5;
|
|
200
|
+
}
|
|
201
|
+
return targetLength / (maxPct * fs);
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Find the maximum absolute value across all absolute variance columns (d_*) in the table body.
|
|
205
|
+
*/
|
|
206
|
+
getMaxAbsValue() {
|
|
207
|
+
if (!this.table)
|
|
208
|
+
return 0;
|
|
209
|
+
let max = 0;
|
|
210
|
+
for (const row of this.table.getBody()) {
|
|
211
|
+
if (row.type === TableRowType.SUM)
|
|
212
|
+
continue;
|
|
213
|
+
for (const cell of row.getCells()) {
|
|
214
|
+
if (cell.isBarChart && cell.columnStats && !cell.key.startsWith("dr")) {
|
|
215
|
+
max = Math.max(max, cell.columnStats.absMax);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
return max;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Find the maximum percentage value across all relative variance columns (dr_*) in the table body.
|
|
223
|
+
* Values are stored as decimals (e.g. 0.2 = 20%), returned as percentage (20).
|
|
224
|
+
*/
|
|
225
|
+
getMaxRelativeValue() {
|
|
226
|
+
if (!this.table)
|
|
227
|
+
return 0;
|
|
228
|
+
let max = 0;
|
|
229
|
+
for (const row of this.table.getBody()) {
|
|
230
|
+
if (row.type === TableRowType.SUM)
|
|
231
|
+
continue;
|
|
232
|
+
for (const cell of row.getCells()) {
|
|
233
|
+
if (cell.isBarChart && cell.columnStats && cell.key.startsWith("dr")) {
|
|
234
|
+
max = Math.max(max, cell.columnStats.absMax * 100);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
return max;
|
|
239
|
+
}
|
|
174
240
|
static get is() { return "ibcs-table"; }
|
|
175
241
|
static get encapsulation() { return "shadow"; }
|
|
176
242
|
static get originalStyleUrls() {
|
|
@@ -691,6 +757,26 @@ export class IbcsTable {
|
|
|
691
757
|
"setter": false,
|
|
692
758
|
"defaultValue": "[]"
|
|
693
759
|
},
|
|
760
|
+
"barColumnMaxWidth": {
|
|
761
|
+
"type": "number",
|
|
762
|
+
"mutable": false,
|
|
763
|
+
"complexType": {
|
|
764
|
+
"original": "number",
|
|
765
|
+
"resolved": "number",
|
|
766
|
+
"references": {}
|
|
767
|
+
},
|
|
768
|
+
"required": false,
|
|
769
|
+
"optional": false,
|
|
770
|
+
"docs": {
|
|
771
|
+
"tags": [],
|
|
772
|
+
"text": ""
|
|
773
|
+
},
|
|
774
|
+
"getter": false,
|
|
775
|
+
"setter": false,
|
|
776
|
+
"reflect": false,
|
|
777
|
+
"attribute": "bar-column-max-width",
|
|
778
|
+
"defaultValue": "30"
|
|
779
|
+
},
|
|
694
780
|
"unitScaling": {
|
|
695
781
|
"type": "number",
|
|
696
782
|
"mutable": false,
|
|
@@ -150,34 +150,74 @@ function getBarStroke(varianceStyle) {
|
|
|
150
150
|
// Solid and hatched bars don't need visible stroke
|
|
151
151
|
return { stroke: "none", strokeWidth: 0 };
|
|
152
152
|
}
|
|
153
|
+
/**
|
|
154
|
+
* Renders a zigzag break indicator at a given x position, matching the structure chart style.
|
|
155
|
+
* Two mirrored zigzag lines with a white background covering the break gap.
|
|
156
|
+
*/
|
|
157
|
+
function renderZigzagBreak(breakX, breakGap, yTop, barHeight, s) {
|
|
158
|
+
const midX = breakX + breakGap / 2;
|
|
159
|
+
const halfGap = breakGap * 0.35;
|
|
160
|
+
const zigCount = 3;
|
|
161
|
+
const segHeight = barHeight / zigCount;
|
|
162
|
+
const amplitude = breakGap * 0.3;
|
|
163
|
+
let leftPath = `M ${midX - halfGap} ${yTop}`;
|
|
164
|
+
for (let i = 0; i < zigCount; i++) {
|
|
165
|
+
const y1 = yTop + segHeight * (i + 0.5);
|
|
166
|
+
const y2 = yTop + segHeight * (i + 1);
|
|
167
|
+
leftPath += ` L ${midX - halfGap - amplitude} ${y1} L ${midX - halfGap} ${y2}`;
|
|
168
|
+
}
|
|
169
|
+
let rightPath = `M ${midX + halfGap} ${yTop}`;
|
|
170
|
+
for (let i = 0; i < zigCount; i++) {
|
|
171
|
+
const y1 = yTop + segHeight * (i + 0.5);
|
|
172
|
+
const y2 = yTop + segHeight * (i + 1);
|
|
173
|
+
rightPath += ` L ${midX + halfGap + amplitude} ${y1} L ${midX + halfGap} ${y2}`;
|
|
174
|
+
}
|
|
175
|
+
return [
|
|
176
|
+
h("rect", { x: breakX, y: yTop - 1, width: breakGap, height: barHeight + 2, fill: "#ffffff" }),
|
|
177
|
+
h("path", { d: leftPath, fill: "none", stroke: "#000000", "stroke-width": 1 * s }),
|
|
178
|
+
h("path", { d: rightPath, fill: "none", stroke: "#000000", "stroke-width": 1 * s }),
|
|
179
|
+
];
|
|
180
|
+
}
|
|
153
181
|
/**
|
|
154
182
|
* Renders an absolute variance bar chart (d_ prefix).
|
|
155
183
|
* Horizontal bar with centered axis, green for positive, red for negative.
|
|
156
|
-
*
|
|
184
|
+
* When a bar exceeds maxBarWidth it is drawn as an overdrive bar:
|
|
185
|
+
* base segment + zigzag break + proportional overdrive stub (like structure chart).
|
|
157
186
|
*
|
|
158
187
|
* Layout: [left label area][bar area with axis][right label area]
|
|
159
|
-
* Uses unitScaling to determine bar width (pixels per unit of measure).
|
|
160
188
|
*/
|
|
161
189
|
const AbsoluteVarianceBar = (props) => {
|
|
162
|
-
const { value, scenario, height, isPositiveGood, formattedValue, measureScale, styles = DEFAULT_STYLES } = props;
|
|
190
|
+
const { value, scenario, columnStats, height, isPositiveGood, formattedValue, measureScale, maxBarWidth: maxBarWidthEm = 10, styles = DEFAULT_STYLES, } = props;
|
|
163
191
|
const s = styles.scaleFactor;
|
|
164
|
-
const
|
|
165
|
-
const
|
|
166
|
-
const
|
|
167
|
-
|
|
192
|
+
const fs = styles.fontSize;
|
|
193
|
+
const labelAreaWidth = 38 * s;
|
|
194
|
+
const maxBarWidth = maxBarWidthEm * fs;
|
|
195
|
+
// Overdrive layout constants
|
|
196
|
+
const breakGap = 4 * s;
|
|
197
|
+
const overdriveZoneWidth = maxBarWidth * 0.15;
|
|
198
|
+
const cutWidth = maxBarWidth - breakGap - overdriveZoneWidth;
|
|
199
|
+
// Direct unit scaling via fontSize
|
|
200
|
+
const scaledWidth = Math.abs(value) * styles.unitScaling * fs;
|
|
201
|
+
const isExtreme = scaledWidth > cutWidth;
|
|
202
|
+
// Compute proportional overdrive width across the column
|
|
203
|
+
const maxScaledWidth = columnStats.absMax * styles.unitScaling * fs;
|
|
204
|
+
const maxOverflow = Math.max(0, maxScaledWidth - cutWidth);
|
|
205
|
+
const overflowAmount = Math.max(0, scaledWidth - cutWidth);
|
|
206
|
+
const overdriveWidth = maxOverflow > 0 ? (overflowAmount / maxOverflow) * overdriveZoneWidth : 0;
|
|
207
|
+
// Adaptive axis placement based on data range
|
|
208
|
+
const hasNeg = columnStats.min < 0;
|
|
209
|
+
const hasPos = columnStats.max > 0;
|
|
210
|
+
const negBarWidth = hasNeg ? maxBarWidth : 0;
|
|
211
|
+
const posBarWidth = hasPos ? maxBarWidth : 0;
|
|
212
|
+
const barAreaWidth = negBarWidth + posBarWidth;
|
|
213
|
+
const totalWidth = (hasNeg ? labelAreaWidth : 0) + barAreaWidth + (hasPos ? labelAreaWidth : 0);
|
|
168
214
|
const padding = 2 * s;
|
|
169
215
|
const barHeight = height - padding * 2;
|
|
170
|
-
const axisX =
|
|
171
|
-
// Calculate bar width using unitScaling (pixels per unit)
|
|
172
|
-
// Clamp to maxBarWidth to prevent overflow
|
|
173
|
-
const scaledWidth = Math.abs(value) * styles.unitScaling * s;
|
|
174
|
-
const barWidth = Math.min(scaledWidth, maxBarWidth);
|
|
175
|
-
const isPositive = value >= 0;
|
|
176
|
-
const barX = isPositive ? axisX : axisX - barWidth;
|
|
216
|
+
const axisX = (hasNeg ? labelAreaWidth : 0) + negBarWidth;
|
|
177
217
|
const barY = padding;
|
|
218
|
+
const isPositive = value >= 0;
|
|
178
219
|
// Get style based on column type (scenario vs variance)
|
|
179
220
|
const barStyle = getBarStyle(scenario, value, isPositiveGood, styles);
|
|
180
|
-
// Pattern prefix for scenarios uses scenario type, for variances uses pos/neg
|
|
181
221
|
const patternPrefix = isScenarioColumn(scenario)
|
|
182
222
|
? getScenarioType(scenario)
|
|
183
223
|
: isPositiveGood
|
|
@@ -190,12 +230,14 @@ const AbsoluteVarianceBar = (props) => {
|
|
|
190
230
|
const fillValue = getBarFill(barStyle, patternPrefix);
|
|
191
231
|
const { stroke: barStroke, strokeWidth: barStrokeWidth } = getBarStroke(barStyle);
|
|
192
232
|
const displayValue = formattedValue || formatValue(value, false, measureScale);
|
|
193
|
-
//
|
|
194
|
-
|
|
195
|
-
//
|
|
196
|
-
const
|
|
233
|
+
// Normal bar width (clamped to cutWidth when extreme)
|
|
234
|
+
const baseBarWidth = isExtreme ? cutWidth : scaledWidth;
|
|
235
|
+
// Label position accounts for overdrive
|
|
236
|
+
const totalVisualWidth = isExtreme ? cutWidth + breakGap + overdriveWidth : scaledWidth;
|
|
237
|
+
const labelX = isPositive ? axisX + totalVisualWidth + 4 * s : axisX - totalVisualWidth - 4 * s;
|
|
197
238
|
const labelAnchor = isPositive ? "start" : "end";
|
|
198
|
-
return (h("svg", { width: totalWidth, height: height, class: "cell-bar-chart absolute-variance", style: { overflow: "visible" } }, h(PatternDefs, { styles: styles }), h("line", { x1: axisX, y1: 0, x2: axisX, y2: height, stroke: AXIS_COLOR, "stroke-width": 1 * s }),
|
|
239
|
+
return (h("svg", { width: totalWidth, height: height, class: "cell-bar-chart absolute-variance", style: { overflow: "visible" } }, h(PatternDefs, { styles: styles }), h("line", { x1: axisX, y1: 0, x2: axisX, y2: height, stroke: AXIS_COLOR, "stroke-width": 1 * s }), baseBarWidth > 0 && (h("rect", { x: isPositive ? axisX : axisX - baseBarWidth, y: barY, width: baseBarWidth, height: barHeight, fill: fillValue, stroke: barStroke, "stroke-width": barStrokeWidth * s })), isExtreme && overdriveWidth > 0 && (h("rect", { x: isPositive ? axisX + cutWidth + breakGap : axisX - cutWidth - breakGap - overdriveWidth, y: barY, width: overdriveWidth, height: barHeight, fill: fillValue, stroke: barStroke, "stroke-width": barStrokeWidth * s })), isExtreme &&
|
|
240
|
+
renderZigzagBreak(isPositive ? axisX + cutWidth : axisX - cutWidth - breakGap, breakGap, barY, barHeight, s), h("text", { x: labelX, y: height / 2, dy: "0.35em", "text-anchor": labelAnchor, fill: styles.fontColor, "font-size": fs, "font-family": styles.fontFamily }, displayValue)));
|
|
199
241
|
};
|
|
200
242
|
/**
|
|
201
243
|
* Renders a relative variance pin chart (dr_ prefix).
|
|
@@ -205,30 +247,36 @@ const AbsoluteVarianceBar = (props) => {
|
|
|
205
247
|
* Uses percentageScaling to determine pin length (pixels per percentage point).
|
|
206
248
|
*/
|
|
207
249
|
const RelativeVariancePin = (props) => {
|
|
208
|
-
const { value, scenario, height, isPositiveGood, formattedValue, measureScale, styles = DEFAULT_STYLES } = props;
|
|
250
|
+
const { value, scenario, columnStats, height, isPositiveGood, formattedValue, measureScale, maxBarWidth: maxBarWidthEm = 10, styles = DEFAULT_STYLES, } = props;
|
|
209
251
|
const s = styles.scaleFactor;
|
|
210
|
-
const
|
|
211
|
-
|
|
212
|
-
const
|
|
252
|
+
const fs = styles.fontSize;
|
|
253
|
+
// Pin length is ~2/3 of bar width for visual balance
|
|
254
|
+
const maxPinLength = Math.round(maxBarWidthEm * 0.67 * fs);
|
|
255
|
+
const pinPadding = 5 * s;
|
|
256
|
+
// Adaptive axis placement based on data range
|
|
257
|
+
const hasNeg = columnStats.min < 0;
|
|
258
|
+
const hasPos = columnStats.max > 0;
|
|
259
|
+
const negPinWidth = hasNeg ? maxPinLength + pinPadding : 0;
|
|
260
|
+
const posPinWidth = hasPos ? maxPinLength + pinPadding : 0;
|
|
261
|
+
const pinAreaWidth = negPinWidth + posPinWidth;
|
|
262
|
+
const labelAreaWidth = 45 * s;
|
|
213
263
|
const totalWidth = pinAreaWidth + labelAreaWidth;
|
|
214
|
-
const axisX =
|
|
264
|
+
const axisX = negPinWidth;
|
|
215
265
|
const centerY = height / 2;
|
|
216
|
-
//
|
|
217
|
-
// Value is in decimal form (e.g., 0.5 = 50%), multiply by 100 to get percentage
|
|
266
|
+
// Direct unit scaling via fontSize
|
|
218
267
|
const percentValue = Math.abs(value) * 100;
|
|
219
|
-
const scaledLength = percentValue * styles.percentageScaling *
|
|
268
|
+
const scaledLength = percentValue * styles.percentageScaling * fs;
|
|
269
|
+
const isExtreme = scaledLength > maxPinLength;
|
|
220
270
|
const pinLength = Math.min(scaledLength, maxPinLength);
|
|
221
271
|
const isPositive = value >= 0;
|
|
222
272
|
const pinEndX = isPositive ? axisX + pinLength : axisX - pinLength;
|
|
223
273
|
// Get style based on column type (scenario vs variance)
|
|
224
274
|
const barStyle = getBarStyle(scenario, value, isPositiveGood, styles);
|
|
225
275
|
const dotRadius = 3 * s;
|
|
226
|
-
// Show arrow for extreme values (when pin would exceed max length)
|
|
227
|
-
const isExtreme = scaledLength > maxPinLength;
|
|
228
276
|
const displayValue = formattedValue || formatValue(value, true, measureScale);
|
|
229
277
|
// Label always on the right side after the pin area
|
|
230
278
|
const labelX = pinAreaWidth + 4 * s;
|
|
231
|
-
return (h("svg", { width: totalWidth, height: height, class: "cell-bar-chart relative-variance", style: { overflow: "visible" } }, h("line", { x1: axisX, y1: 0, x2: axisX, y2: height, stroke: AXIS_COLOR, "stroke-width": 1 * s }), !isExtreme && h("circle", { cx: pinEndX, cy: centerY, r: dotRadius, fill: styles.fontColor }), h("line", { x1: axisX, y1: centerY, x2: pinEndX, y2: centerY, stroke: barStyle.fill, "stroke-width": 2 * s }), isExtreme && isPositive && (h("polygon", { points: `${
|
|
279
|
+
return (h("svg", { width: totalWidth, height: height, class: "cell-bar-chart relative-variance", style: { overflow: "visible" } }, h("line", { x1: axisX, y1: 0, x2: axisX, y2: height, stroke: AXIS_COLOR, "stroke-width": 1 * s }), !isExtreme && h("circle", { cx: pinEndX, cy: centerY, r: dotRadius, fill: styles.fontColor }), h("line", { x1: axisX, y1: centerY, x2: pinEndX, y2: centerY, stroke: barStyle.fill, "stroke-width": 2 * s }), isExtreme && isPositive && (h("polygon", { points: `${axisX + maxPinLength},${centerY} ${axisX + maxPinLength - 6 * s},${centerY - 3 * s} ${axisX + maxPinLength - 6 * s},${centerY + 3 * s}`, fill: barStyle.fill })), isExtreme && !isPositive && (h("polygon", { points: `${axisX - maxPinLength},${centerY} ${axisX - maxPinLength + 6 * s},${centerY - 3 * s} ${axisX - maxPinLength + 6 * s},${centerY + 3 * s}`, fill: barStyle.fill })), h("text", { x: labelX, y: height / 2, dy: "0.35em", "text-anchor": "start", fill: styles.fontColor, "font-size": fs, "font-style": "italic", "font-family": styles.fontFamily }, displayValue)));
|
|
232
280
|
};
|
|
233
281
|
/**
|
|
234
282
|
* CellBarChart - Renders IBCS-compliant variance bar charts.
|
|
@@ -79,7 +79,9 @@ export class TableRow {
|
|
|
79
79
|
if (isSecondaryElement) {
|
|
80
80
|
prefixStyle = "prefix-second";
|
|
81
81
|
}
|
|
82
|
-
|
|
82
|
+
if (columnType) {
|
|
83
|
+
cssStyle = `${cssStyle} ${columnType}`;
|
|
84
|
+
}
|
|
83
85
|
const cell = new Cell(scenario, this.elements.length, value, cssStyle, cellType, prefix, prefixStyle, 1, measureScale);
|
|
84
86
|
cell.isBarChart = isBarChart;
|
|
85
87
|
cell.columnStats = columnStats;
|
|
@@ -113,9 +113,11 @@ export class TableDataSetFactory {
|
|
|
113
113
|
if (!barColumns || barColumns.length === 0) {
|
|
114
114
|
return statsMap;
|
|
115
115
|
}
|
|
116
|
-
//
|
|
116
|
+
// Collect all values per column for median calculation
|
|
117
|
+
const valuesMap = new Map();
|
|
117
118
|
for (const column of barColumns) {
|
|
118
|
-
statsMap.set(column, { min: Infinity, max: -Infinity, absMax: 0 });
|
|
119
|
+
statsMap.set(column, { min: Infinity, max: -Infinity, absMax: 0, median: 0 });
|
|
120
|
+
valuesMap.set(column, []);
|
|
119
121
|
}
|
|
120
122
|
// Iterate through all groups and rows
|
|
121
123
|
for (const groupData of queryData) {
|
|
@@ -126,17 +128,24 @@ export class TableDataSetFactory {
|
|
|
126
128
|
const stats = statsMap.get(column);
|
|
127
129
|
stats.min = Math.min(stats.min, value);
|
|
128
130
|
stats.max = Math.max(stats.max, value);
|
|
131
|
+
valuesMap.get(column).push(Math.abs(value));
|
|
129
132
|
}
|
|
130
133
|
}
|
|
131
134
|
}
|
|
132
135
|
}
|
|
133
|
-
// Finalize absMax values
|
|
136
|
+
// Finalize absMax and median values
|
|
134
137
|
for (const [column, stats] of statsMap) {
|
|
135
138
|
if (stats.min === Infinity || stats.max === -Infinity) {
|
|
136
139
|
stats.min = 0;
|
|
137
140
|
stats.max = 0;
|
|
138
141
|
}
|
|
139
142
|
stats.absMax = Math.max(Math.abs(stats.min), Math.abs(stats.max));
|
|
143
|
+
const absValues = valuesMap.get(column);
|
|
144
|
+
if (absValues.length > 0) {
|
|
145
|
+
absValues.sort((a, b) => a - b);
|
|
146
|
+
const mid = Math.floor(absValues.length / 2);
|
|
147
|
+
stats.median = absValues.length % 2 === 0 ? (absValues[mid - 1] + absValues[mid]) / 2 : absValues[mid];
|
|
148
|
+
}
|
|
140
149
|
statsMap.set(column, stats);
|
|
141
150
|
}
|
|
142
151
|
return statsMap;
|
|
@@ -17,12 +17,14 @@ export class ColumnStatistics {
|
|
|
17
17
|
for (const column of columns) {
|
|
18
18
|
let min = Infinity;
|
|
19
19
|
let max = -Infinity;
|
|
20
|
+
const absValues = [];
|
|
20
21
|
for (const group of data) {
|
|
21
22
|
for (const row of group) {
|
|
22
23
|
const value = this.extractValue(row, column);
|
|
23
24
|
if (value !== null && !isNaN(value)) {
|
|
24
25
|
min = Math.min(min, value);
|
|
25
26
|
max = Math.max(max, value);
|
|
27
|
+
absValues.push(Math.abs(value));
|
|
26
28
|
}
|
|
27
29
|
}
|
|
28
30
|
}
|
|
@@ -32,7 +34,13 @@ export class ColumnStatistics {
|
|
|
32
34
|
max = 0;
|
|
33
35
|
}
|
|
34
36
|
const absMax = Math.max(Math.abs(min), Math.abs(max));
|
|
35
|
-
|
|
37
|
+
let median = 0;
|
|
38
|
+
if (absValues.length > 0) {
|
|
39
|
+
absValues.sort((a, b) => a - b);
|
|
40
|
+
const mid = Math.floor(absValues.length / 2);
|
|
41
|
+
median = absValues.length % 2 === 0 ? (absValues[mid - 1] + absValues[mid]) / 2 : absValues[mid];
|
|
42
|
+
}
|
|
43
|
+
statsMap.set(column, { min, max, absMax, median });
|
|
36
44
|
}
|
|
37
45
|
return statsMap;
|
|
38
46
|
}
|
|
@@ -7,7 +7,7 @@ export class Template {
|
|
|
7
7
|
this.errors = withHasError(this);
|
|
8
8
|
}
|
|
9
9
|
render() {
|
|
10
|
-
return (h(Host, { key: '
|
|
10
|
+
return (h(Host, { key: 'cd6a2945603feda3610bc9f2678e03b26f54d6dd' }, h("slot", { key: '0e2ba3942a4ef74ab334572656383e85be7e1654' })));
|
|
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: '
|
|
267
|
+
return (h(Host, { key: '086c3caad1f7c502e26ebbd1bf7d9044782333ab', style: cssVars }, h("div", { key: '584938536bedd3de7a6390ce9d57fb568a69191b' }, h("span", { key: 'b545bd809b32d2d0cac2310bd1003dab39bebc8a', 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: '
|
|
289
|
+
return (h(Host, { key: 'e84349bd356bc6ac3a3f3dccad01b0ef7d818077', style: fontStyles }, h("ibcs-title", { key: 'cde3f65fff090e3ade3909a4d3c0b103e5b91ba5', 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"; }
|
|
@@ -9,9 +9,6 @@ import { IBCSRuleSet } from "../../../utils/ibcsRuleSet";
|
|
|
9
9
|
import { StringAdapter } from "../../../utils/helper/StringAdapter";
|
|
10
10
|
export class IbcsTitle {
|
|
11
11
|
constructor() {
|
|
12
|
-
// sample fuer die chrome dev console:
|
|
13
|
-
// document.querySelector("ibcs-title").setBusinessUnit("Sven")
|
|
14
|
-
// document.querySelector("ibcs-title").setProps({businessUnit: "Lalal"})
|
|
15
12
|
this.businessUnit = "";
|
|
16
13
|
this.scenarios = [];
|
|
17
14
|
this.measures = [];
|
|
@@ -36,7 +33,7 @@ export class IbcsTitle {
|
|
|
36
33
|
});
|
|
37
34
|
}
|
|
38
35
|
render() {
|
|
39
|
-
return (h("div", { key: '
|
|
36
|
+
return (h("div", { key: '314cf7dad025643a6cdc190312eb100a310f076b' }, h("div", { key: 'b2e5c89f5d9d08987d09d0ee46e63b5889ede87c' }, this.title.unit), h("div", { key: 'd9cb4aa0cc02d8b354eb61609d4e22f4641e10a1' }, 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: 'ccbfb094dd5fa097fe339b03958ea3854e87083e' }, this.title.dimension)));
|
|
40
37
|
}
|
|
41
38
|
componentWillLoad() {
|
|
42
39
|
const config = this.prepareConfig();
|
|
@@ -167,7 +167,11 @@ export class ChartTree {
|
|
|
167
167
|
}
|
|
168
168
|
componentDidLoad() {
|
|
169
169
|
this.setupResizeObserver();
|
|
170
|
-
|
|
170
|
+
// Defer DOM measurement to after the browser has completed layout.
|
|
171
|
+
// getBoundingClientRect() can return zeros if called before first paint.
|
|
172
|
+
requestAnimationFrame(() => {
|
|
173
|
+
this.updateNodeRects();
|
|
174
|
+
});
|
|
171
175
|
}
|
|
172
176
|
disconnectedCallback() {
|
|
173
177
|
if (this.resizeObserver) {
|
|
@@ -39,7 +39,7 @@ export class EditorCompanion {
|
|
|
39
39
|
return Promise.resolve(result);
|
|
40
40
|
}
|
|
41
41
|
render() {
|
|
42
|
-
return h(Fragment, { key: '
|
|
42
|
+
return h(Fragment, { key: '08296ac47b5313afdb49e0cbedad5a765830672c' });
|
|
43
43
|
}
|
|
44
44
|
distinct(data, key) {
|
|
45
45
|
return [...new Set(data.map((d) => d[key]))].filter((v) => v !== null && v !== undefined);
|
|
@@ -41,6 +41,7 @@ export const SYSTEM_STYLE_DEFAULTS = {
|
|
|
41
41
|
neg: { stroke: "#ff0000", fill: "#ff0000", width: 0.1 },
|
|
42
42
|
neu: { stroke: "#808080", fill: "#808080", width: 0.1 },
|
|
43
43
|
},
|
|
44
|
+
stackColors: ["#000000", "#c0c0c0", "#808080"],
|
|
44
45
|
padding: {
|
|
45
46
|
top: 10,
|
|
46
47
|
left: 10,
|
|
@@ -83,6 +84,7 @@ export const SYSTEM_STYLE_DEFAULTS = {
|
|
|
83
84
|
neg: { stroke: "#ff0000", fill: "#ff0000", width: 0.1 },
|
|
84
85
|
neu: { stroke: "#808080", fill: "#808080", width: 0.1 },
|
|
85
86
|
},
|
|
87
|
+
stackColors: ["#000000", "#c0c0c0", "#808080"],
|
|
86
88
|
padding: {
|
|
87
89
|
top: 10,
|
|
88
90
|
left: 10,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Factory that creates a fresh set of all
|
|
2
|
+
* Factory that creates a fresh set of all 8 `@stencil/store` instances.
|
|
3
3
|
*
|
|
4
4
|
* Called once per `<bn-context>` element so that each context owns isolated
|
|
5
5
|
* reactive state. The returned object satisfies the {@link ScopedStores} interface.
|
|
@@ -19,6 +19,7 @@ export function createScopedStores() {
|
|
|
19
19
|
const internationalization = createStore(Object.assign({}, SYSTEM_I18N_DEFAULTS));
|
|
20
20
|
const assets = createStore({});
|
|
21
21
|
const context = createStore({ locale: "en" });
|
|
22
|
+
const scalingGroups = createStore({});
|
|
22
23
|
return {
|
|
23
24
|
datasources,
|
|
24
25
|
datasets,
|
|
@@ -27,5 +28,6 @@ export function createScopedStores() {
|
|
|
27
28
|
internationalization,
|
|
28
29
|
assets,
|
|
29
30
|
context,
|
|
31
|
+
scalingGroups,
|
|
30
32
|
};
|
|
31
33
|
}
|
|
@@ -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;
|
|
@@ -82,6 +82,33 @@ export var TableCategoryWidth;
|
|
|
82
82
|
TableCategoryWidth["W10"] = "w10";
|
|
83
83
|
TableCategoryWidth["W5"] = "w5";
|
|
84
84
|
})(TableCategoryWidth || (TableCategoryWidth = {}));
|
|
85
|
+
/** Width preset for inline bar/pin chart columns. Value = max bar width in em. */
|
|
86
|
+
export var TableBarColumnWidth;
|
|
87
|
+
(function (TableBarColumnWidth) {
|
|
88
|
+
TableBarColumnWidth["W5"] = "w5";
|
|
89
|
+
TableBarColumnWidth["W10"] = "w10";
|
|
90
|
+
TableBarColumnWidth["W15"] = "w15";
|
|
91
|
+
TableBarColumnWidth["W20"] = "w20";
|
|
92
|
+
TableBarColumnWidth["W25"] = "w25";
|
|
93
|
+
TableBarColumnWidth["W30"] = "w30";
|
|
94
|
+
TableBarColumnWidth["W40"] = "w40";
|
|
95
|
+
TableBarColumnWidth["W60"] = "w60";
|
|
96
|
+
TableBarColumnWidth["W80"] = "w80";
|
|
97
|
+
TableBarColumnWidth["W100"] = "w100";
|
|
98
|
+
})(TableBarColumnWidth || (TableBarColumnWidth = {}));
|
|
99
|
+
/** Maps TableBarColumnWidth presets to max bar width in em. */
|
|
100
|
+
export const BAR_COLUMN_WIDTH_EM = {
|
|
101
|
+
[TableBarColumnWidth.W5]: 5,
|
|
102
|
+
[TableBarColumnWidth.W10]: 10,
|
|
103
|
+
[TableBarColumnWidth.W15]: 15,
|
|
104
|
+
[TableBarColumnWidth.W20]: 20,
|
|
105
|
+
[TableBarColumnWidth.W25]: 25,
|
|
106
|
+
[TableBarColumnWidth.W30]: 30,
|
|
107
|
+
[TableBarColumnWidth.W40]: 40,
|
|
108
|
+
[TableBarColumnWidth.W60]: 60,
|
|
109
|
+
[TableBarColumnWidth.W80]: 80,
|
|
110
|
+
[TableBarColumnWidth.W100]: 100,
|
|
111
|
+
};
|
|
85
112
|
/**
|
|
86
113
|
* Three-level row hierarchy for grouping and drill-down: rowGroup > category > subCategory.
|
|
87
114
|
* Index variants (e.g. ROWGROUPINDEX) provide stable numeric sort keys that preserve
|
|
@@ -127,13 +154,16 @@ export var ChartMode;
|
|
|
127
154
|
ChartMode["LINE"] = "line";
|
|
128
155
|
ChartMode["AUTO"] = "auto";
|
|
129
156
|
})(ChartMode || (ChartMode = {}));
|
|
130
|
-
/**
|
|
157
|
+
/**
|
|
158
|
+
* Stacking dimension for multi-segment bar charts.
|
|
159
|
+
* - SCENARIOS: stack the scenarios from the `scenarios` prop end-to-end
|
|
160
|
+
* - DIMENSIONS: stack by the next-lower hierarchy level derived from the `level` prop
|
|
161
|
+
* (rowGroup → category, category → subCategory)
|
|
162
|
+
*/
|
|
131
163
|
export var StackBy;
|
|
132
164
|
(function (StackBy) {
|
|
133
|
-
StackBy["
|
|
134
|
-
StackBy["
|
|
135
|
-
StackBy["SUBCATEGORY"] = "subcategory";
|
|
136
|
-
StackBy["ROWGROUP"] = "rowgroup";
|
|
165
|
+
StackBy["SCENARIOS"] = "scenarios";
|
|
166
|
+
StackBy["DIMENSIONS"] = "dimensions";
|
|
137
167
|
})(StackBy || (StackBy = {}));
|
|
138
168
|
/**
|
|
139
169
|
* How stacked values are presented.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import hash from "@emotion/hash";
|
|
2
|
+
import { gunzipSync } from "fflate";
|
|
3
|
+
/**
|
|
4
|
+
* Compute a short deterministic hash of a string.
|
|
5
|
+
*/
|
|
6
|
+
export function computeContentHash(text) {
|
|
7
|
+
return hash(text);
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Decode a compressed payload in the format `<hash>:<base64_gzip>`.
|
|
11
|
+
* Returns the embedded hash and the decompressed JSON string.
|
|
12
|
+
*/
|
|
13
|
+
export function decodeCompressedContent(text) {
|
|
14
|
+
const colonIndex = text.indexOf(":");
|
|
15
|
+
if (colonIndex === -1) {
|
|
16
|
+
throw new Error("Invalid compressed format: missing ':' separator");
|
|
17
|
+
}
|
|
18
|
+
const embeddedHash = text.slice(0, colonIndex);
|
|
19
|
+
const base64Data = text.slice(colonIndex + 1);
|
|
20
|
+
const binaryString = atob(base64Data);
|
|
21
|
+
const bytes = new Uint8Array(binaryString.length);
|
|
22
|
+
for (let i = 0; i < binaryString.length; i++) {
|
|
23
|
+
bytes[i] = binaryString.charCodeAt(i);
|
|
24
|
+
}
|
|
25
|
+
const decompressed = gunzipSync(bytes);
|
|
26
|
+
const json = new TextDecoder().decode(decompressed);
|
|
27
|
+
return { hash: embeddedHash, json };
|
|
28
|
+
}
|