@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,987 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-CScBFiS1.js');
|
|
4
|
-
var withStyled = require('./withStyled-Bf-stJTR.js');
|
|
5
|
-
var withDataset = require('./withDataset-ZdN-RRTx.js');
|
|
6
|
-
var withComponentStatus = require('./withComponentStatus-BrxL7usr.js');
|
|
7
|
-
var withTranslation = require('./withTranslation-Cz0M5maV.js');
|
|
8
|
-
var contextProtocol = require('./context-protocol-BkYHFkXE.js');
|
|
9
|
-
var withComponentStyle = require('./withComponentStyle-C6KHnZHt.js');
|
|
10
|
-
var withHasError = require('./withHasError-Dspb3lIV.js');
|
|
11
|
-
var scaling = require('./scaling-B23eOtsC.js');
|
|
12
|
-
var Order = require('./Order-B4NIqQWe.js');
|
|
13
|
-
var formatter = require('./formatter-DIJL_crx.js');
|
|
14
|
-
var constants = require('./constants-DHqQXSSd.js');
|
|
15
|
-
var DateStringFactory = require('./DateStringFactory-Dn0aRj2Y.js');
|
|
16
|
-
require('./componentRegister-C17UFNPh.js');
|
|
17
|
-
require('./luxon-8hyy5YD7.js');
|
|
18
|
-
require('./_commonjsHelpers-BJu3ubxk.js');
|
|
19
|
-
|
|
20
|
-
const bnChartTimeCss = () => `:host{display:inline-block;position:relative;overflow:visible;}.container{display:flex;flex-direction:column-reverse}.background-image{display:flex;flex-wrap:wrap;justify-content:flex-end}`;
|
|
21
|
-
|
|
22
|
-
var AggregationLevel;
|
|
23
|
-
(function (AggregationLevel) {
|
|
24
|
-
AggregationLevel["ROWGROUP"] = "rowGroup";
|
|
25
|
-
AggregationLevel["ROWGROUPINDEX"] = "rowGroupIndex";
|
|
26
|
-
AggregationLevel["CATEGORY"] = "category";
|
|
27
|
-
AggregationLevel["CATEGORYINDEX"] = "categoryIndex";
|
|
28
|
-
AggregationLevel["SUBCATEGORY"] = "subCategory";
|
|
29
|
-
AggregationLevel["SUBCATEGORYINDEX"] = "subCategoryIndex";
|
|
30
|
-
})(AggregationLevel || (AggregationLevel = {}));
|
|
31
|
-
const Chart = class {
|
|
32
|
-
validateScenario(newValue) {
|
|
33
|
-
const invalidScenarios = withStyled.validateScenarioList(newValue);
|
|
34
|
-
const errId = "ERR_scenarios";
|
|
35
|
-
if (invalidScenarios.length > 0) {
|
|
36
|
-
this.errors.addOrReplace({
|
|
37
|
-
id: errId,
|
|
38
|
-
type: "warning",
|
|
39
|
-
message: "scenarios: invalid value(s) '" + JSON.stringify(invalidScenarios) + "' are not supported.",
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
this.errors.remove(errId);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
validateVariances(newValue) {
|
|
47
|
-
const errIdVar = "ERR_variances";
|
|
48
|
-
const invalidVariances = withStyled.validateVariancesList(newValue);
|
|
49
|
-
if (invalidVariances.length > 0) {
|
|
50
|
-
this.errors.addOrReplace({
|
|
51
|
-
id: errIdVar,
|
|
52
|
-
type: "warning",
|
|
53
|
-
message: "variances: invalid value(s) '" + JSON.stringify(invalidVariances) + "' are not supported.",
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
else {
|
|
57
|
-
this.errors.remove(errIdVar);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
validateLeftSync(newValue) {
|
|
61
|
-
const errId = "ERR_syncSpaceLeft";
|
|
62
|
-
if (!withStyled.isValidNumber(newValue)) {
|
|
63
|
-
this.errors.addOrReplace({
|
|
64
|
-
id: errId,
|
|
65
|
-
type: "warning",
|
|
66
|
-
message: "syncSpaceLeft: invalid value(s) '" + newValue + "' are not supported.",
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
else {
|
|
70
|
-
this.errors.remove(errId);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
validateLimit(newValue) {
|
|
74
|
-
const errId = "ERR_limit";
|
|
75
|
-
if (!withStyled.isValidInteger(newValue)) {
|
|
76
|
-
this.errors.addOrReplace({
|
|
77
|
-
id: errId,
|
|
78
|
-
type: "warning",
|
|
79
|
-
message: "limit: invalid value '" + (newValue === null || newValue === void 0 ? void 0 : newValue.toString()) + "' is not supported.",
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
83
|
-
this.errors.remove(errId);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
validateUnitScaling(newValue) {
|
|
87
|
-
const errId = "ERR_unitScaling";
|
|
88
|
-
if (!withStyled.isValidNumber(newValue) && !this.pixelPerUnitGroupMap.has(newValue)) {
|
|
89
|
-
this.errors.addOrReplace({
|
|
90
|
-
id: errId,
|
|
91
|
-
type: "warning",
|
|
92
|
-
message: "unitScaling: invalid value(s) '" + newValue + "' are not supported.",
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
else {
|
|
96
|
-
this.errors.remove(errId);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
validatePercentageScaling(newValue) {
|
|
100
|
-
const errId = "ERR_percentageScaling";
|
|
101
|
-
if (!withStyled.isValidNumber(newValue) && !this.pixelPerUnitGroupMap.has(newValue)) {
|
|
102
|
-
this.errors.addOrReplace({
|
|
103
|
-
id: errId,
|
|
104
|
-
type: "warning",
|
|
105
|
-
message: "percentageScaling: invalid value(s) '" + newValue + "' are not supported.",
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
else {
|
|
109
|
-
this.errors.remove(errId);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
validateLevel(newValue) {
|
|
113
|
-
const errId = "ERR_level";
|
|
114
|
-
if (!withStyled.isValidLevel(newValue)) {
|
|
115
|
-
this.errors.addOrReplace({
|
|
116
|
-
id: errId,
|
|
117
|
-
type: "warning",
|
|
118
|
-
message: "level: invalid value(s) '" + newValue + "' are not supported.",
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
else {
|
|
122
|
-
this.errors.remove(errId);
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
validateOrderList(newValue) {
|
|
126
|
-
const errId = "ERR_order";
|
|
127
|
-
const invalidElements = withStyled.validateOrderList(newValue);
|
|
128
|
-
if (invalidElements.length > 0) {
|
|
129
|
-
this.errors.addOrReplace({
|
|
130
|
-
id: errId,
|
|
131
|
-
type: "warning",
|
|
132
|
-
message: "order: invalid value(s) '" + JSON.stringify(invalidElements) + "' are not supported.",
|
|
133
|
-
});
|
|
134
|
-
}
|
|
135
|
-
else {
|
|
136
|
-
this.errors.remove(errId);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
validateOrderDirection(newValue) {
|
|
140
|
-
const errId = "ERR_orderDirection";
|
|
141
|
-
if (!withStyled.isValidDirection(newValue)) {
|
|
142
|
-
this.errors.addOrReplace({
|
|
143
|
-
id: errId,
|
|
144
|
-
type: "warning",
|
|
145
|
-
message: "orderDirection: invalid value '" + (newValue === null || newValue === void 0 ? void 0 : newValue.toString()) + "' is not supported.",
|
|
146
|
-
});
|
|
147
|
-
}
|
|
148
|
-
else {
|
|
149
|
-
this.errors.remove(errId);
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
validateDateInterval(newValue) {
|
|
153
|
-
const errId = "ERR_dateInterval";
|
|
154
|
-
if (!withStyled.isValidDateFormat(newValue)) {
|
|
155
|
-
this.errors.addOrReplace({
|
|
156
|
-
id: errId,
|
|
157
|
-
type: "warning",
|
|
158
|
-
message: "dateInterval: invalid value '" + (newValue === null || newValue === void 0 ? void 0 : newValue.toString()) + "' is not supported.",
|
|
159
|
-
});
|
|
160
|
-
}
|
|
161
|
-
else {
|
|
162
|
-
this.errors.remove(errId);
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
validateChartMode(newValue) {
|
|
166
|
-
const errId = "ERR_chartMode";
|
|
167
|
-
const validModes = ["bar", "line", "auto"];
|
|
168
|
-
if (!validModes.includes(newValue === null || newValue === void 0 ? void 0 : newValue.toLowerCase())) {
|
|
169
|
-
this.errors.addOrReplace({
|
|
170
|
-
id: errId,
|
|
171
|
-
type: "warning",
|
|
172
|
-
message: "chartMode: invalid value '" +
|
|
173
|
-
(newValue === null || newValue === void 0 ? void 0 : newValue.toString()) +
|
|
174
|
-
"' is not supported. Valid values are: bar, line, auto.",
|
|
175
|
-
});
|
|
176
|
-
}
|
|
177
|
-
else {
|
|
178
|
-
this.errors.remove(errId);
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
validateMaxBars(newValue) {
|
|
182
|
-
const errId = "ERR_maxBars";
|
|
183
|
-
if (!withStyled.isValidInteger(newValue) || newValue < 1) {
|
|
184
|
-
this.errors.addOrReplace({
|
|
185
|
-
id: errId,
|
|
186
|
-
type: "warning",
|
|
187
|
-
message: "maxBars: invalid value '" + (newValue === null || newValue === void 0 ? void 0 : newValue.toString()) + "' is not supported. Must be a positive integer.",
|
|
188
|
-
});
|
|
189
|
-
}
|
|
190
|
-
else {
|
|
191
|
-
this.errors.remove(errId);
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
validateStack(newValue) {
|
|
195
|
-
const errId = "ERR_stack";
|
|
196
|
-
const errors = withStyled.validateStackConfig(newValue);
|
|
197
|
-
if (errors.length > 0) {
|
|
198
|
-
this.errors.addOrReplace({
|
|
199
|
-
id: errId,
|
|
200
|
-
type: "warning",
|
|
201
|
-
message: errors.join("; "),
|
|
202
|
-
});
|
|
203
|
-
}
|
|
204
|
-
else {
|
|
205
|
-
this.errors.remove(errId);
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
validateScaling(newValue) {
|
|
209
|
-
if (newValue == null || newValue === "" || newValue === "none" || newValue === "auto") {
|
|
210
|
-
this.errors.remove("ERR_scale");
|
|
211
|
-
return;
|
|
212
|
-
}
|
|
213
|
-
const num = Number(newValue);
|
|
214
|
-
if (isNaN(num) || num <= 0) {
|
|
215
|
-
this.errors.addOrReplace({
|
|
216
|
-
id: "ERR_scale",
|
|
217
|
-
type: "warning",
|
|
218
|
-
message: `Invalid scale value: "${newValue}". Use "none", "auto", or a positive number.`,
|
|
219
|
-
});
|
|
220
|
-
}
|
|
221
|
-
else {
|
|
222
|
-
this.errors.remove("ERR_scale");
|
|
223
|
-
}
|
|
224
|
-
}
|
|
225
|
-
validateAxisLabelsMode(newValue) {
|
|
226
|
-
const errId = "ERR_axisLabelsMode";
|
|
227
|
-
if (!withStyled.isValidAxisLabelsMode(newValue)) {
|
|
228
|
-
this.errors.addOrReplace({
|
|
229
|
-
id: errId,
|
|
230
|
-
type: "warning",
|
|
231
|
-
message: "axisLabelsMode: invalid value '" + (newValue === null || newValue === void 0 ? void 0 : newValue.toString()) + "' is not supported.",
|
|
232
|
-
});
|
|
233
|
-
}
|
|
234
|
-
else {
|
|
235
|
-
this.errors.remove(errId);
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
validateLineFullWidth(newValue) {
|
|
239
|
-
const errId = "ERR_lineFullWidth";
|
|
240
|
-
if (!withStyled.isValidBoolean(newValue)) {
|
|
241
|
-
this.errors.addOrReplace({
|
|
242
|
-
id: errId,
|
|
243
|
-
type: "warning",
|
|
244
|
-
message: "lineFullWidth: invalid value(s) '" + (newValue === null || newValue === void 0 ? void 0 : newValue.toString()) + "' are not supported.",
|
|
245
|
-
});
|
|
246
|
-
}
|
|
247
|
-
else {
|
|
248
|
-
this.errors.remove(errId);
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
validateShowCategories(newValue) {
|
|
252
|
-
const errId = "ERR_showCategories";
|
|
253
|
-
if (!withStyled.isValidBoolean(newValue)) {
|
|
254
|
-
this.errors.addOrReplace({
|
|
255
|
-
id: errId,
|
|
256
|
-
type: "warning",
|
|
257
|
-
message: "showCategories: invalid value(s) '" + (newValue === null || newValue === void 0 ? void 0 : newValue.toString()) + "' are not supported.",
|
|
258
|
-
});
|
|
259
|
-
}
|
|
260
|
-
else {
|
|
261
|
-
this.errors.remove(errId);
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
validateMeasureScale(newValue) {
|
|
265
|
-
const errId = "ERR_measureScale";
|
|
266
|
-
if (!withStyled.isValidMeasureScale(newValue)) {
|
|
267
|
-
this.errors.addOrReplace({
|
|
268
|
-
id: errId,
|
|
269
|
-
type: "warning",
|
|
270
|
-
message: "measureScale: invalid value '" + (newValue === null || newValue === void 0 ? void 0 : newValue.toString()) + "' is not supported.",
|
|
271
|
-
});
|
|
272
|
-
}
|
|
273
|
-
else {
|
|
274
|
-
this.errors.remove(errId);
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
validateShowMeasureScale(newValue) {
|
|
278
|
-
const errId = "ERR_grouped";
|
|
279
|
-
if (!withStyled.isValidBoolean(newValue)) {
|
|
280
|
-
this.errors.addOrReplace({
|
|
281
|
-
id: errId,
|
|
282
|
-
type: "warning",
|
|
283
|
-
message: "showMeasureScale: invalid value(s) '" + (newValue === null || newValue === void 0 ? void 0 : newValue.toString()) + "' are not supported.",
|
|
284
|
-
});
|
|
285
|
-
}
|
|
286
|
-
else {
|
|
287
|
-
this.errors.remove(errId);
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
validateShowOverlayAvg(newValue) {
|
|
291
|
-
const errId = "ERR_grouped";
|
|
292
|
-
if (!withStyled.isValidBoolean(newValue)) {
|
|
293
|
-
this.errors.addOrReplace({
|
|
294
|
-
id: errId,
|
|
295
|
-
type: "warning",
|
|
296
|
-
message: "showOverlayAvg: invalid value(s) '" + (newValue === null || newValue === void 0 ? void 0 : newValue.toString()) + "' are not supported.",
|
|
297
|
-
});
|
|
298
|
-
}
|
|
299
|
-
else {
|
|
300
|
-
this.errors.remove(errId);
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
validateShowOverlayMedian(newValue) {
|
|
304
|
-
const errId = "ERR_grouped";
|
|
305
|
-
if (!withStyled.isValidBoolean(newValue)) {
|
|
306
|
-
this.errors.addOrReplace({
|
|
307
|
-
id: errId,
|
|
308
|
-
type: "warning",
|
|
309
|
-
message: "showOverlayMedian: invalid value(s) '" + (newValue === null || newValue === void 0 ? void 0 : newValue.toString()) + "' are not supported.",
|
|
310
|
-
});
|
|
311
|
-
}
|
|
312
|
-
else {
|
|
313
|
-
this.errors.remove(errId);
|
|
314
|
-
}
|
|
315
|
-
}
|
|
316
|
-
constructor(hostRef) {
|
|
317
|
-
index.registerInstance(this, hostRef);
|
|
318
|
-
this.data = [];
|
|
319
|
-
this.datasetMeta = null;
|
|
320
|
-
this.appliedScaleFactor = 1;
|
|
321
|
-
/**
|
|
322
|
-
* Custom chart title
|
|
323
|
-
*/
|
|
324
|
-
this.chartTitle = "";
|
|
325
|
-
/**
|
|
326
|
-
* AlaSQL WHERE clause fragment injected into the data query to filter
|
|
327
|
-
* rows before rendering (e.g. `"rowGroup = 'Revenue'"`).
|
|
328
|
-
*/
|
|
329
|
-
this.filter = "";
|
|
330
|
-
this.syncSpaceLeft = -1;
|
|
331
|
-
/**
|
|
332
|
-
* Set the maximum number of columns stacks The value 0 means *no limit*
|
|
333
|
-
* <br /><br />
|
|
334
|
-
*
|
|
335
|
-
* columns stacks wich where cut by the limit are cumulated as REST
|
|
336
|
-
*
|
|
337
|
-
*/
|
|
338
|
-
this.limit = 0;
|
|
339
|
-
/** Chart Mode - controls how the chart is rendered
|
|
340
|
-
* <br /><br />
|
|
341
|
-
* values:<br />
|
|
342
|
-
* ```bar // line // auto```
|
|
343
|
-
* <br /><br />
|
|
344
|
-
* When set to 'auto', the chart will switch to line mode
|
|
345
|
-
* when the number of data points exceeds maxBars.
|
|
346
|
-
*/
|
|
347
|
-
this.chartMode = "bar";
|
|
348
|
-
/** Max Bars - threshold for auto-switching to line mode
|
|
349
|
-
* <br /><br />
|
|
350
|
-
* When chartMode is set to 'auto' and the number of data points
|
|
351
|
-
* exceeds this value, the chart will render as a line chart.
|
|
352
|
-
*/
|
|
353
|
-
this.maxBars = 28;
|
|
354
|
-
/**
|
|
355
|
-
* Stacking configuration for the chart as a JSON string.
|
|
356
|
-
*
|
|
357
|
-
* When set, bars/columns are drawn stacked (additive layers) instead of
|
|
358
|
-
* side-by-side. In line mode (`chart-mode="line"`), stacking produces a
|
|
359
|
-
* stacked area chart with filled regions between cumulative lines.
|
|
360
|
-
*
|
|
361
|
-
* **JSON schema:**
|
|
362
|
-
* ```json
|
|
363
|
-
* {
|
|
364
|
-
* "by": "scenario" | "category" | "subcategory" | "rowgroup",
|
|
365
|
-
* "mode": "absolute" | "relative" | "absolute-relative",
|
|
366
|
-
* "order": "asc" | "desc" | "dataset"
|
|
367
|
-
* }
|
|
368
|
-
* ```
|
|
369
|
-
*
|
|
370
|
-
* - `by` (required): The dimension to stack.
|
|
371
|
-
* - `"scenario"` — stack the scenarios from the `scenarios` prop as layers.
|
|
372
|
-
* - `"category"` / `"subcategory"` / `"rowgroup"` — decompose a single
|
|
373
|
-
* scenario by this data dimension. Must be finer than `level`.
|
|
374
|
-
* - `mode` (optional, default `"absolute"`):
|
|
375
|
-
* - `"absolute"` — additive stacking, axis shows absolute units.
|
|
376
|
-
* - `"relative"` — 100% stacking, axis shows 0%–100%.
|
|
377
|
-
* - `"absolute-relative"` — bar height is absolute (real value), but
|
|
378
|
-
* segment labels inside show percentages.
|
|
379
|
-
* - `order` (optional, default `"dataset"`): Segment order within each stack.
|
|
380
|
-
* `"asc"` / `"desc"` sort segments by value; `"dataset"` preserves the
|
|
381
|
-
* original data/scenario order.
|
|
382
|
-
*
|
|
383
|
-
* @default '' (empty — no stacking)
|
|
384
|
-
*
|
|
385
|
-
* @example
|
|
386
|
-
* // Stack scenarios
|
|
387
|
-
* stack='{"by":"scenario"}'
|
|
388
|
-
*
|
|
389
|
-
* @example
|
|
390
|
-
* // Stack by category, relative mode
|
|
391
|
-
* stack='{"by":"category","mode":"relative"}'
|
|
392
|
-
*/
|
|
393
|
-
this.stack = "";
|
|
394
|
-
/** Max number of collumns
|
|
395
|
-
* is used to calculate Axis Date Interval (if dateInterval is set to AUTO)
|
|
396
|
-
*/
|
|
397
|
-
this.intervalSpanLimit = 28;
|
|
398
|
-
/** When true (default), line charts stretch to fill the full parent width
|
|
399
|
-
* instead of using fixed per-data-point spacing.
|
|
400
|
-
* Has no effect in bar mode.
|
|
401
|
-
* <br /><br />
|
|
402
|
-
* values:<br />
|
|
403
|
-
* ```true // false```
|
|
404
|
-
*/
|
|
405
|
-
this.lineFullWidth = "true";
|
|
406
|
-
this.showCategories = "true";
|
|
407
|
-
/**
|
|
408
|
-
* Sets the SiPrefix of the Mesaurements and converts the
|
|
409
|
-
* original value.
|
|
410
|
-
* <br /><br />
|
|
411
|
-
* values: <br />
|
|
412
|
-
* ```_ // k // M // G // T // P // E // Z // Y // m // μ // n // p // P // f // a // z // y // GREATEST // LEAST```
|
|
413
|
-
* <br /><br />
|
|
414
|
-
* SiPrefix overview:
|
|
415
|
-
* ``` "Y": 1E+24,```<br />
|
|
416
|
-
* ``` "Z": 1E+21,```<br />
|
|
417
|
-
* ``` "E": 1E+18,```<br />
|
|
418
|
-
* ``` "P": 1E+15,```<br />
|
|
419
|
-
* ``` "T": 1E+12,```<br />
|
|
420
|
-
* ``` "G": 1000000000,```<br />
|
|
421
|
-
* ``` "M": 1000000,```<br />
|
|
422
|
-
* ``` "k": 1000,```<br />
|
|
423
|
-
* <br />
|
|
424
|
-
* ``` "m": 0.001,```<br />
|
|
425
|
-
* ``` "μ": 0.000001,```<br />
|
|
426
|
-
* ``` "n": 0.000000001,```<br />
|
|
427
|
-
* ``` "p": 0.000000000001,```<br />
|
|
428
|
-
* ``` "f": 0.000000000000001,```<br />
|
|
429
|
-
* ``` "a": 0.000000000000000001,```<br />
|
|
430
|
-
* ``` "z": 0.000000000000000000001,```<br />
|
|
431
|
-
* ``` "y": 0.000000000000000000000001,```<br />
|
|
432
|
-
* <br /><br />
|
|
433
|
-
* Special modes:
|
|
434
|
-
* ```GREATEST``` seaches for the bigest (farest to zero) Value in the dataset and sets this value to SiPrefix<br />
|
|
435
|
-
* ```LEAST``` searches for smallest (closest to zero) Value in the dataset and sets this value to SiPrefix<br />
|
|
436
|
-
*<br /><br />
|
|
437
|
-
* ```_``` is the value for no SiPrefix the value is displayed as in the dataset stored.
|
|
438
|
-
*
|
|
439
|
-
*
|
|
440
|
-
*/
|
|
441
|
-
this.measureScale = "greatest";
|
|
442
|
-
/**
|
|
443
|
-
* Toggles display of measure units in table header
|
|
444
|
-
* <br /><br />
|
|
445
|
-
* values: <br />
|
|
446
|
-
* ```true // false```
|
|
447
|
-
*/
|
|
448
|
-
this.showMeasureScale = "false";
|
|
449
|
-
this.showOverlayAvg = "true";
|
|
450
|
-
this.showOverlayMedian = "false";
|
|
451
|
-
/**
|
|
452
|
-
* measureUnit displayed in table.
|
|
453
|
-
*/
|
|
454
|
-
this.measureUnit = "";
|
|
455
|
-
this.pixelPerUnitGroupMap = new Map();
|
|
456
|
-
this._autoScaleIterations = 0;
|
|
457
|
-
withStyled.withStyled(this);
|
|
458
|
-
withComponentStatus.withComponentStatus(this);
|
|
459
|
-
withDataset.withDataset(this, (_name, data) => {
|
|
460
|
-
this.data = (data || []);
|
|
461
|
-
}, (_name, meta) => {
|
|
462
|
-
this.datasetMeta = meta;
|
|
463
|
-
});
|
|
464
|
-
this.chartTemplate = this.chartTemplate.bind(this);
|
|
465
|
-
this.errors = withHasError.withHasError(this);
|
|
466
|
-
this.componentStyle = withComponentStyle.withComponentStyle(this);
|
|
467
|
-
this.t = withTranslation.withTranslation(this).t;
|
|
468
|
-
}
|
|
469
|
-
componentWillLoad() {
|
|
470
|
-
this.validateScenario(this.scenarios);
|
|
471
|
-
this.validateVariances(this.variances);
|
|
472
|
-
this.validateUnitScaling(this.unitScaling);
|
|
473
|
-
this.validateLimit(this.limit);
|
|
474
|
-
// this.validateStyles(this.styles);
|
|
475
|
-
this.validateLevel(this.level);
|
|
476
|
-
this.validateOrderDirection(this.orderDirection);
|
|
477
|
-
this.validateOrderList(this.order);
|
|
478
|
-
this.validateLeftSync(this.syncSpaceLeft);
|
|
479
|
-
this.validateDateInterval(this.dateInterval);
|
|
480
|
-
this.validateAxisLabelsMode(this.axisLabelsMode);
|
|
481
|
-
this.validateLineFullWidth(this.lineFullWidth);
|
|
482
|
-
this.validateShowCategories(this.showCategories);
|
|
483
|
-
this.validateMeasureScale(this.measureScale);
|
|
484
|
-
this.validateShowMeasureScale(this.showMeasureScale);
|
|
485
|
-
this.validateShowOverlayAvg(this.showOverlayAvg);
|
|
486
|
-
this.validateShowOverlayMedian(this.showOverlayMedian);
|
|
487
|
-
this.validateChartMode(this.chartMode);
|
|
488
|
-
this.validateMaxBars(this.maxBars);
|
|
489
|
-
this.validateStack(this.stack);
|
|
490
|
-
this.validateScaling(this.scale);
|
|
491
|
-
}
|
|
492
|
-
componentDidRender() {
|
|
493
|
-
var _a, _b;
|
|
494
|
-
const { mode } = scaling.parseScaling(this.scale);
|
|
495
|
-
if (mode !== "auto" && mode !== "empty") {
|
|
496
|
-
this._autoScaleIterations = 0;
|
|
497
|
-
// Keep existing width-based overflow warning for non-auto modes
|
|
498
|
-
const parent = scaling.getParentDimensions(this.element);
|
|
499
|
-
const errId = "WARN_overflow";
|
|
500
|
-
if (parent.width > 0 && this.element.scrollWidth > parent.width + 1) {
|
|
501
|
-
this.errors.addOrReplace({
|
|
502
|
-
id: errId,
|
|
503
|
-
type: "warning",
|
|
504
|
-
message: "Chart exceeds available space and will be cut off. Check unit-scaling value.",
|
|
505
|
-
});
|
|
506
|
-
}
|
|
507
|
-
else {
|
|
508
|
-
this.errors.remove(errId);
|
|
509
|
-
}
|
|
510
|
-
return;
|
|
511
|
-
}
|
|
512
|
-
const host = this.element;
|
|
513
|
-
const { width: parentWidth } = scaling.getParentDimensions(host);
|
|
514
|
-
if (parentWidth <= 0)
|
|
515
|
-
return;
|
|
516
|
-
const div = (_a = host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(".container");
|
|
517
|
-
const currentWidth = (_b = div === null || div === void 0 ? void 0 : div.scrollWidth) !== null && _b !== void 0 ? _b : host.scrollWidth;
|
|
518
|
-
const baseFontSize = this.componentStyle(($) => { var _a; return ((_a = $["global"]) === null || _a === void 0 ? void 0 : _a["fontSizePx"]) || 13.3333; });
|
|
519
|
-
// Content fits — no scaling needed (or current scale is sufficient)
|
|
520
|
-
if (currentWidth <= parentWidth + 1) {
|
|
521
|
-
this._autoScaleIterations = 0;
|
|
522
|
-
this.errors.remove("AUTO_scale");
|
|
523
|
-
// If previously scaled but content now fits at base, reset to 1
|
|
524
|
-
if (this.appliedScaleFactor !== 1) {
|
|
525
|
-
// Try resetting — if that overflows, the next didRender will re-scale
|
|
526
|
-
this._autoScaleIterations = 1;
|
|
527
|
-
this.appliedScaleFactor = 1;
|
|
528
|
-
host.style.setProperty("--bn-font-size", `${baseFontSize}px`);
|
|
529
|
-
}
|
|
530
|
-
return;
|
|
531
|
-
}
|
|
532
|
-
// Prevent infinite loop
|
|
533
|
-
if (this._autoScaleIterations >= Chart.MAX_SCALE_ITERATIONS) {
|
|
534
|
-
this._autoScaleIterations = 0;
|
|
535
|
-
return;
|
|
536
|
-
}
|
|
537
|
-
// Content overflows — compute multiplicative correction
|
|
538
|
-
const correction = (parentWidth - 1) / currentWidth;
|
|
539
|
-
const newFactor = this.appliedScaleFactor * correction;
|
|
540
|
-
host.style.setProperty("--bn-font-size", `${baseFontSize * newFactor}px`);
|
|
541
|
-
if (mode === "empty") {
|
|
542
|
-
this.errors.addOrReplace({
|
|
543
|
-
id: "AUTO_scale",
|
|
544
|
-
type: "warning",
|
|
545
|
-
message: `Auto-scaled chart by factor ${newFactor.toFixed(3)}`,
|
|
546
|
-
});
|
|
547
|
-
}
|
|
548
|
-
else {
|
|
549
|
-
this.errors.remove("AUTO_scale");
|
|
550
|
-
}
|
|
551
|
-
if (Math.abs(newFactor - this.appliedScaleFactor) > 0.001) {
|
|
552
|
-
this._autoScaleIterations++;
|
|
553
|
-
this.appliedScaleFactor = newFactor;
|
|
554
|
-
}
|
|
555
|
-
else {
|
|
556
|
-
this._autoScaleIterations = 0;
|
|
557
|
-
}
|
|
558
|
-
}
|
|
559
|
-
prepareDimension() {
|
|
560
|
-
const parent = scaling.getParentDimensions(this.element);
|
|
561
|
-
const scenariosList = this.prepareScenarios();
|
|
562
|
-
const variancesList = this.prepareVariances();
|
|
563
|
-
this.canvasWidthSegmented = parent.width / (scenariosList.length + variancesList.length || 1);
|
|
564
|
-
return { width: this.canvasWidthSegmented, height: parent.height };
|
|
565
|
-
}
|
|
566
|
-
prepareScenarios() {
|
|
567
|
-
var _a, _b, _c, _d;
|
|
568
|
-
const isAuto = ((_a = this.scenarios) === null || _a === void 0 ? void 0 : _a.trim().toLowerCase()) === "auto";
|
|
569
|
-
if (withStyled.isBlankInput(this.scenarios) || isAuto) {
|
|
570
|
-
if (((_c = (_b = this.datasetMeta) === null || _b === void 0 ? void 0 : _b.availableScenarios) === null || _c === void 0 ? void 0 : _c.length) > 0) {
|
|
571
|
-
if (!isAuto) {
|
|
572
|
-
this.errors.addOrReplace({
|
|
573
|
-
id: "AUTO_scenarios",
|
|
574
|
-
type: "warning",
|
|
575
|
-
message: `scenarios: not set, auto-detected: ${this.datasetMeta.availableScenarios.join(",")}`,
|
|
576
|
-
});
|
|
577
|
-
}
|
|
578
|
-
else {
|
|
579
|
-
this.errors.remove("AUTO_scenarios");
|
|
580
|
-
}
|
|
581
|
-
return this.datasetMeta.availableScenarios;
|
|
582
|
-
}
|
|
583
|
-
return [];
|
|
584
|
-
}
|
|
585
|
-
this.errors.remove("AUTO_scenarios");
|
|
586
|
-
return (_d = this.scenarios) === null || _d === void 0 ? void 0 : _d.split(",").map((entry) => entry.trim());
|
|
587
|
-
}
|
|
588
|
-
prepareAvg() {
|
|
589
|
-
return this.showOverlayAvg === "true";
|
|
590
|
-
}
|
|
591
|
-
prepareMedian() {
|
|
592
|
-
return this.showOverlayMedian === "true";
|
|
593
|
-
}
|
|
594
|
-
prepareVariances() {
|
|
595
|
-
var _a;
|
|
596
|
-
if (withStyled.isBlankInput(this.variances)) {
|
|
597
|
-
return [];
|
|
598
|
-
}
|
|
599
|
-
return (_a = this.variances) === null || _a === void 0 ? void 0 : _a.split(",").map((entry) => entry.trim());
|
|
600
|
-
}
|
|
601
|
-
prepareHideAxisLabels(idx) {
|
|
602
|
-
return idx >= 1 || this.showCategories !== "true";
|
|
603
|
-
}
|
|
604
|
-
prepareI18n() {
|
|
605
|
-
const i18nMetaLabelsLocal = [];
|
|
606
|
-
const i18nMetaLabelsGlobal = contextProtocol.globalLabelKeys;
|
|
607
|
-
const i18nMapLocal = new Map(i18nMetaLabelsLocal.map((key) => [key, this.t(".".concat(key))]));
|
|
608
|
-
const i18nMapGlobal = new Map(i18nMetaLabelsGlobal.map((key) => [key, this.t("global.".concat(key))]));
|
|
609
|
-
return new Map([...i18nMapGlobal.entries(), ...i18nMapLocal.entries()]);
|
|
610
|
-
}
|
|
611
|
-
preparePixelPerUnit() {
|
|
612
|
-
var _a;
|
|
613
|
-
if (this.pixelPerUnitGroupMap.has(this.unitScaling)) {
|
|
614
|
-
this.errors.remove("AUTO_unitScaling");
|
|
615
|
-
return this.pixelPerUnitGroupMap.get(this.unitScaling);
|
|
616
|
-
}
|
|
617
|
-
// Explicit 'auto' → auto-calculate silently
|
|
618
|
-
if (((_a = this.unitScaling) === null || _a === void 0 ? void 0 : _a.toString().trim().toLowerCase()) === "auto") {
|
|
619
|
-
this.errors.remove("AUTO_unitScaling");
|
|
620
|
-
return 0;
|
|
621
|
-
}
|
|
622
|
-
const numeric = Number(this.unitScaling);
|
|
623
|
-
if (!isNaN(numeric) && numeric > 0) {
|
|
624
|
-
this.errors.remove("AUTO_unitScaling");
|
|
625
|
-
return numeric;
|
|
626
|
-
}
|
|
627
|
-
// Not set / invalid → auto-calculate with warning
|
|
628
|
-
this.errors.addOrReplace({
|
|
629
|
-
id: "AUTO_unitScaling",
|
|
630
|
-
type: "warning",
|
|
631
|
-
message: `unit-scaling: not set, auto-calculated to fit available space.`,
|
|
632
|
-
});
|
|
633
|
-
return 0;
|
|
634
|
-
}
|
|
635
|
-
preparePixelPerPercentage() {
|
|
636
|
-
if (this.pixelPerUnitGroupMap.has(this.percentageScaling)) {
|
|
637
|
-
return this.pixelPerUnitGroupMap.get(this.percentageScaling); // TODO(JHE): revisit '* 100' correctness when global scaling groups are implemented
|
|
638
|
-
}
|
|
639
|
-
return Number(this.percentageScaling) * 100;
|
|
640
|
-
}
|
|
641
|
-
prepareLevel() {
|
|
642
|
-
var _a, _b, _c;
|
|
643
|
-
const isAuto = ((_a = this.level) === null || _a === void 0 ? void 0 : _a.trim().toLowerCase()) === "auto";
|
|
644
|
-
if (withStyled.isBlankInput(this.level) || isAuto) {
|
|
645
|
-
if ((_b = this.datasetMeta) === null || _b === void 0 ? void 0 : _b.suggestedLevel) {
|
|
646
|
-
if (!isAuto) {
|
|
647
|
-
this.errors.addOrReplace({
|
|
648
|
-
id: "AUTO_level",
|
|
649
|
-
type: "warning",
|
|
650
|
-
message: `level: not set, auto-detected: ${this.datasetMeta.suggestedLevel}`,
|
|
651
|
-
});
|
|
652
|
-
}
|
|
653
|
-
else {
|
|
654
|
-
this.errors.remove("AUTO_level");
|
|
655
|
-
}
|
|
656
|
-
return AggregationLevel[this.datasetMeta.suggestedLevel.toUpperCase()];
|
|
657
|
-
}
|
|
658
|
-
return undefined;
|
|
659
|
-
}
|
|
660
|
-
this.errors.remove("AUTO_level");
|
|
661
|
-
return AggregationLevel[(_c = this.level) === null || _c === void 0 ? void 0 : _c.toUpperCase()];
|
|
662
|
-
}
|
|
663
|
-
prepareOrder() {
|
|
664
|
-
var _a, _b, _c, _d, _e, _f;
|
|
665
|
-
const isLevelAuto = withStyled.isBlankInput(this.level) || ((_a = this.level) === null || _a === void 0 ? void 0 : _a.trim().toLowerCase()) === "auto";
|
|
666
|
-
let entryValue = isLevelAuto && ((_b = this.datasetMeta) === null || _b === void 0 ? void 0 : _b.suggestedLevel) ? this.datasetMeta.suggestedLevel : this.level;
|
|
667
|
-
const isOrderAuto = ((_c = this.order) === null || _c === void 0 ? void 0 : _c.trim().toLowerCase()) === "auto";
|
|
668
|
-
if (withStyled.isBlankInput(this.order) || isOrderAuto) {
|
|
669
|
-
if ((_d = this.datasetMeta) === null || _d === void 0 ? void 0 : _d.suggestedLevel) {
|
|
670
|
-
if (!isOrderAuto) {
|
|
671
|
-
this.errors.addOrReplace({
|
|
672
|
-
id: "AUTO_order",
|
|
673
|
-
type: "warning",
|
|
674
|
-
message: `order: not set, auto-detected: ${entryValue}`,
|
|
675
|
-
});
|
|
676
|
-
}
|
|
677
|
-
else {
|
|
678
|
-
this.errors.remove("AUTO_order");
|
|
679
|
-
}
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
|
-
else {
|
|
683
|
-
this.errors.remove("AUTO_order");
|
|
684
|
-
if (((_e = this.order) === null || _e === void 0 ? void 0 : _e.toLocaleLowerCase()) === "levelindex") {
|
|
685
|
-
entryValue += "Index";
|
|
686
|
-
}
|
|
687
|
-
}
|
|
688
|
-
const tableOrder = {
|
|
689
|
-
hierarchy: [Order.OrderColumn[entryValue === null || entryValue === void 0 ? void 0 : entryValue.toUpperCase()]],
|
|
690
|
-
direction: Order.OrderDirection[(_f = this.orderDirection) === null || _f === void 0 ? void 0 : _f.toUpperCase()],
|
|
691
|
-
};
|
|
692
|
-
return tableOrder;
|
|
693
|
-
}
|
|
694
|
-
prepareStyle() {
|
|
695
|
-
const effectiveFactor = this.getEffectiveScaleFactor();
|
|
696
|
-
return this.componentStyle(($) => {
|
|
697
|
-
const baseFontSize = $["global"]["fontSizePx"];
|
|
698
|
-
const scaledFontSize = baseFontSize * effectiveFactor;
|
|
699
|
-
return {
|
|
700
|
-
scaleFactors: {
|
|
701
|
-
scenarioOffset: $["bn-chart-time"]["scaleFactors"]["scenarioOffset"],
|
|
702
|
-
scenarioLabelToColumn: $["bn-chart-time"]["scaleFactors"]["scenarioLabelToColumn"],
|
|
703
|
-
labelToColumn: 0.3,
|
|
704
|
-
labelToColum: $["bn-chart-time"]["scaleFactors"]["labelToColum"],
|
|
705
|
-
labelToAxis: $["bn-chart-time"]["scaleFactors"]["labelToAxis"],
|
|
706
|
-
needleWidth: $["bn-chart-time"]["scaleFactors"]["needleWidth"],
|
|
707
|
-
needleHeadWidth: $["bn-chart-time"]["scaleFactors"]["needleHeadWidth"],
|
|
708
|
-
columnWidth: $["bn-chart-time"]["scaleFactors"]["columnWidth"],
|
|
709
|
-
varianceAxisLineWidth: $["bn-chart-time"]["scaleFactors"]["varianceAxisLineWidth"],
|
|
710
|
-
axisLineWidth: $["bn-chart-time"]["scaleFactors"]["axisLineWidth"],
|
|
711
|
-
auxiliaryLineWidth: $["bn-chart-time"]["scaleFactors"]["auxiliaryLineWidth"],
|
|
712
|
-
scenarioLineWidth: $["bn-chart-time"]["scaleFactors"]["scenarioLineWidth"],
|
|
713
|
-
markerWidth: $["bn-chart-time"]["scaleFactors"]["markerWidth"],
|
|
714
|
-
markerOffset: $["bn-chart-time"]["scaleFactors"]["markerOffset"],
|
|
715
|
-
categoryWidth: $["bn-chart-time"]["scaleFactors"]["categoryWidth"],
|
|
716
|
-
axisTickLength: $["bn-chart-time"]["scaleFactors"]["axisTickLength"],
|
|
717
|
-
},
|
|
718
|
-
fontStyles: {
|
|
719
|
-
font: `${scaledFontSize}px ${$["global"]["fontFamily"]}`,
|
|
720
|
-
size: scaledFontSize,
|
|
721
|
-
color: $["global"]["fontColor"],
|
|
722
|
-
background: $["global"]["fontBackgroundColor"],
|
|
723
|
-
leading: 1.8,
|
|
724
|
-
},
|
|
725
|
-
axisStyles: $["bn-chart-time"]["axisStyles"],
|
|
726
|
-
barStyles: $["bn-chart-time"]["barStyles"],
|
|
727
|
-
varianceStyles: $["bn-chart-time"]["varianceStyles"],
|
|
728
|
-
padding: $["bn-chart-time"]["padding"],
|
|
729
|
-
pattern: null,
|
|
730
|
-
};
|
|
731
|
-
});
|
|
732
|
-
}
|
|
733
|
-
prepareLeftSideOffset(preparedI18n, preparedStyle) {
|
|
734
|
-
if (this.syncSpaceLeft > -1) {
|
|
735
|
-
return this.syncSpaceLeft;
|
|
736
|
-
}
|
|
737
|
-
const leftSideOffset = formatter.Formatter.getMaxWidthOfArrayItems([...this.prepareVariances(), ...this.prepareScenarios(), this.chartTitle], preparedI18n, preparedStyle);
|
|
738
|
-
//if(leftSideOffset < this.syncSpaceLeft) {
|
|
739
|
-
// return this.syncSpaceLeft;
|
|
740
|
-
//}
|
|
741
|
-
return leftSideOffset;
|
|
742
|
-
}
|
|
743
|
-
prepareChartTitle(idx) {
|
|
744
|
-
if (idx >= 1) {
|
|
745
|
-
return "";
|
|
746
|
-
}
|
|
747
|
-
return this.chartTitle;
|
|
748
|
-
}
|
|
749
|
-
prepareLimit() {
|
|
750
|
-
return Math.floor(Number(this.limit) || 0);
|
|
751
|
-
}
|
|
752
|
-
prepareDateInterval() {
|
|
753
|
-
var _a, _b, _c;
|
|
754
|
-
const isAuto = ((_a = this.dateInterval) === null || _a === void 0 ? void 0 : _a.trim().toLowerCase()) === "auto";
|
|
755
|
-
if (withStyled.isBlankInput(this.dateInterval) || isAuto) {
|
|
756
|
-
if ((_b = this.datasetMeta) === null || _b === void 0 ? void 0 : _b.suggestedDateInterval) {
|
|
757
|
-
if (!isAuto) {
|
|
758
|
-
this.errors.addOrReplace({
|
|
759
|
-
id: "AUTO_dateInterval",
|
|
760
|
-
type: "warning",
|
|
761
|
-
message: `dateInterval: not set, auto-detected: ${this.datasetMeta.suggestedDateInterval}`,
|
|
762
|
-
});
|
|
763
|
-
}
|
|
764
|
-
else {
|
|
765
|
-
this.errors.remove("AUTO_dateInterval");
|
|
766
|
-
}
|
|
767
|
-
return DateStringFactory.DateDistance[this.datasetMeta.suggestedDateInterval.toUpperCase()];
|
|
768
|
-
}
|
|
769
|
-
return isAuto ? DateStringFactory.DateDistance.AUTO : undefined;
|
|
770
|
-
}
|
|
771
|
-
this.errors.remove("AUTO_dateInterval");
|
|
772
|
-
return DateStringFactory.DateDistance[(_c = this.dateInterval) === null || _c === void 0 ? void 0 : _c.toUpperCase()];
|
|
773
|
-
}
|
|
774
|
-
prepareIntervalSpanLimit() {
|
|
775
|
-
return this.intervalSpanLimit;
|
|
776
|
-
}
|
|
777
|
-
prepareAxisLabelsMode() {
|
|
778
|
-
var _a;
|
|
779
|
-
return constants.AxisLabelsMode[(_a = this.axisLabelsMode) === null || _a === void 0 ? void 0 : _a.toUpperCase()];
|
|
780
|
-
}
|
|
781
|
-
prepareFilter() {
|
|
782
|
-
if (this.filter.length === 0) {
|
|
783
|
-
return "";
|
|
784
|
-
}
|
|
785
|
-
return this.filter;
|
|
786
|
-
}
|
|
787
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
788
|
-
getDataStructure() {
|
|
789
|
-
const dataSetStructure = {
|
|
790
|
-
ITimeChartDataRow: {
|
|
791
|
-
setName: { type: "string", isOptional: false, description: "" },
|
|
792
|
-
date: { type: "string", isOptional: false, description: "" },
|
|
793
|
-
operation: { type: "string", isOptional: false, description: "" },
|
|
794
|
-
rowGroup: { type: "string", isOptional: false, description: "" },
|
|
795
|
-
rowGroupIndex: { type: "number", isOptional: false, description: "" },
|
|
796
|
-
category: { type: "string", isOptional: false, description: "" },
|
|
797
|
-
categoryIndex: { type: "number", isOptional: false, description: "" },
|
|
798
|
-
subCategory: { type: "string", isOptional: false, description: "" },
|
|
799
|
-
subCategoryIndex: { type: "number", isOptional: false, description: "" },
|
|
800
|
-
columnGroup: { type: "string", isOptional: false, description: "" },
|
|
801
|
-
columnGroupIndex: { type: "number", isOptional: false, description: "" },
|
|
802
|
-
columnSubGroup: { type: "string", isOptional: false, description: "" },
|
|
803
|
-
columnSubGroupIndex: { type: "number", isOptional: false, description: "" },
|
|
804
|
-
ac1: { type: "number", isOptional: false, description: "" },
|
|
805
|
-
ac2: { type: "number", isOptional: false, description: "" },
|
|
806
|
-
ac3: { type: "number", isOptional: false, description: "" },
|
|
807
|
-
ac4: { type: "number", isOptional: false, description: "" },
|
|
808
|
-
pp1: { type: "number", isOptional: false, description: "" },
|
|
809
|
-
pp2: { type: "number", isOptional: false, description: "" },
|
|
810
|
-
pp3: { type: "number", isOptional: false, description: "" },
|
|
811
|
-
pp4: { type: "number", isOptional: false, description: "" },
|
|
812
|
-
fc1: { type: "number", isOptional: false, description: "" },
|
|
813
|
-
fc2: { type: "number", isOptional: false, description: "" },
|
|
814
|
-
fc3: { type: "number", isOptional: false, description: "" },
|
|
815
|
-
fc4: { type: "number", isOptional: false, description: "" },
|
|
816
|
-
pl1: { type: "number", isOptional: false, description: "" },
|
|
817
|
-
pl2: { type: "number", isOptional: false, description: "" },
|
|
818
|
-
pl3: { type: "number", isOptional: false, description: "" },
|
|
819
|
-
pl4: { type: "number", isOptional: false, description: "" },
|
|
820
|
-
},
|
|
821
|
-
};
|
|
822
|
-
return dataSetStructure;
|
|
823
|
-
}
|
|
824
|
-
prepareMeasureScale() {
|
|
825
|
-
if (withStyled.isBlankInput(this.measureScale)) {
|
|
826
|
-
return "GREATEST";
|
|
827
|
-
}
|
|
828
|
-
if (["_", "k", "M", "G", "T", "P", "E", "Z", "Y", "m", "μ", "n", "p", "P", "f", "a", "z", "y"].includes(this.measureScale.trim())) {
|
|
829
|
-
return this.measureScale.trim();
|
|
830
|
-
}
|
|
831
|
-
if (this.measureScale.trim().toUpperCase() === "LEAST") {
|
|
832
|
-
return this.measureScale.trim();
|
|
833
|
-
}
|
|
834
|
-
return "GREATEST";
|
|
835
|
-
}
|
|
836
|
-
prepareShowMeasureScale(idx) {
|
|
837
|
-
return idx === 0 && this.showMeasureScale === "true";
|
|
838
|
-
}
|
|
839
|
-
prepareMeasureUnit() {
|
|
840
|
-
if (this.measureUnit === "" || this.measureUnit == null) {
|
|
841
|
-
return "";
|
|
842
|
-
}
|
|
843
|
-
return this.measureUnit;
|
|
844
|
-
}
|
|
845
|
-
prepareStackConfig() {
|
|
846
|
-
if (withStyled.isBlankInput(this.stack)) {
|
|
847
|
-
return null;
|
|
848
|
-
}
|
|
849
|
-
try {
|
|
850
|
-
const parsed = JSON.parse(this.stack);
|
|
851
|
-
return {
|
|
852
|
-
by: parsed.by,
|
|
853
|
-
mode: parsed.mode || constants.StackMode.ABSOLUTE,
|
|
854
|
-
order: parsed.order || constants.StackOrder.DATASET,
|
|
855
|
-
};
|
|
856
|
-
}
|
|
857
|
-
catch (_a) {
|
|
858
|
-
return null;
|
|
859
|
-
}
|
|
860
|
-
}
|
|
861
|
-
prepareLineFullWidth() {
|
|
862
|
-
return this.lineFullWidth === "true";
|
|
863
|
-
}
|
|
864
|
-
prepareChartMode() {
|
|
865
|
-
var _a;
|
|
866
|
-
const mode = (_a = this.chartMode) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
|
867
|
-
if (mode === "line") {
|
|
868
|
-
return constants.ChartMode.LINE;
|
|
869
|
-
}
|
|
870
|
-
else if (mode === "auto") {
|
|
871
|
-
return constants.ChartMode.AUTO;
|
|
872
|
-
}
|
|
873
|
-
return constants.ChartMode.BAR;
|
|
874
|
-
}
|
|
875
|
-
prepareMaxBars() {
|
|
876
|
-
return Math.floor(Number(this.maxBars) || 28);
|
|
877
|
-
}
|
|
878
|
-
chartTemplate(localScenarioString, idx) {
|
|
879
|
-
const preparedI18n = this.prepareI18n();
|
|
880
|
-
const preparedStyle = this.prepareStyle();
|
|
881
|
-
const fullParentWidth = scaling.getParentDimensions(this.element).width;
|
|
882
|
-
const effectiveFactor = this.getEffectiveScaleFactor();
|
|
883
|
-
const ppu = this.preparePixelPerUnit();
|
|
884
|
-
const ppp = this.preparePixelPerPercentage();
|
|
885
|
-
return (index.h("ibcs-chart-time", { data: this.data, chartTitle: this.prepareChartTitle(idx), scenarios: this.prepareScenarios(), variances: [localScenarioString], hideAxisLabels: this.prepareHideAxisLabels(idx), pixelPerUnit: ppu > 0 ? ppu * effectiveFactor : 0, pixelPerPercentage: ppp > 0 ? ppp * effectiveFactor : 0, limit: this.prepareLimit(), leftSideOffsetForHorizontalSync: this.prepareLeftSideOffset(preparedI18n, preparedStyle), styles: preparedStyle, i18n: preparedI18n, order: this.prepareOrder(), level: this.prepareLevel(), dateInterval: this.prepareDateInterval(), intervalSpanLimit: this.prepareIntervalSpanLimit(), axisLabelsMode: this.prepareAxisLabelsMode(), filter: this.prepareFilter(), "measure-scale": this.prepareMeasureScale(), "measure-unit": this.prepareMeasureUnit(), showOverlayAvg: this.prepareAvg(), showOverlayMedian: this.prepareMedian(), showMeasureScale: this.prepareShowMeasureScale(idx), chartMode: this.prepareChartMode(), maxBars: this.prepareMaxBars(), stackConfig: this.prepareStackConfig(), lineFullWidth: this.prepareLineFullWidth(), containerWidth: fullParentWidth, parentDimensions: this.prepareDimension() }));
|
|
886
|
-
}
|
|
887
|
-
getEffectiveScaleFactor() {
|
|
888
|
-
const { mode, factor } = scaling.parseScaling(this.scale);
|
|
889
|
-
if (mode === "factor")
|
|
890
|
-
return factor;
|
|
891
|
-
if (mode === "auto" || mode === "empty")
|
|
892
|
-
return this.appliedScaleFactor;
|
|
893
|
-
return 1;
|
|
894
|
-
}
|
|
895
|
-
getFontStyles() {
|
|
896
|
-
const effectiveFactor = this.getEffectiveScaleFactor();
|
|
897
|
-
return this.componentStyle(($) => {
|
|
898
|
-
var _a, _b, _c, _d;
|
|
899
|
-
const baseFontSize = ((_a = $["global"]) === null || _a === void 0 ? void 0 : _a["fontSizePx"]) || 13.3333;
|
|
900
|
-
return {
|
|
901
|
-
"--bn-font-family": ((_b = $["global"]) === null || _b === void 0 ? void 0 : _b["fontFamily"]) || "'Noto Sans', sans-serif",
|
|
902
|
-
"--bn-font-size": `${baseFontSize * effectiveFactor}px`,
|
|
903
|
-
"--bn-font-color": ((_c = $["global"]) === null || _c === void 0 ? void 0 : _c["fontColor"]) || "#000000",
|
|
904
|
-
"--bn-font-background": ((_d = $["global"]) === null || _d === void 0 ? void 0 : _d["fontBackgroundColor"]) || "#ffffff",
|
|
905
|
-
};
|
|
906
|
-
});
|
|
907
|
-
}
|
|
908
|
-
render() {
|
|
909
|
-
let scenariosArray = [""];
|
|
910
|
-
const variancesArray = this.prepareVariances();
|
|
911
|
-
if (variancesArray.length > 0) {
|
|
912
|
-
scenariosArray = [...scenariosArray, ...variancesArray];
|
|
913
|
-
}
|
|
914
|
-
const fontStyles = this.getFontStyles();
|
|
915
|
-
return (index.h(index.Host, { key: 'b1fbfa70b5fda0078c06f5983e2defc9c603a96b', style: fontStyles }, index.h("div", { key: '96666d16869645a1bbe9382a019ac78534229e55', class: "container" }, scenariosArray.map(this.chartTemplate))));
|
|
916
|
-
}
|
|
917
|
-
get element() { return index.getElement(this); }
|
|
918
|
-
static get watchers() { return {
|
|
919
|
-
"scenarios": [{
|
|
920
|
-
"validateScenario": 0
|
|
921
|
-
}],
|
|
922
|
-
"variances": [{
|
|
923
|
-
"validateVariances": 0
|
|
924
|
-
}],
|
|
925
|
-
"syncSpaceLeft": [{
|
|
926
|
-
"validateLeftSync": 0
|
|
927
|
-
}],
|
|
928
|
-
"limit": [{
|
|
929
|
-
"validateLimit": 0
|
|
930
|
-
}],
|
|
931
|
-
"unitScaling": [{
|
|
932
|
-
"validateUnitScaling": 0
|
|
933
|
-
}],
|
|
934
|
-
"percentageScaling": [{
|
|
935
|
-
"validatePercentageScaling": 0
|
|
936
|
-
}],
|
|
937
|
-
"level": [{
|
|
938
|
-
"validateLevel": 0
|
|
939
|
-
}],
|
|
940
|
-
"order": [{
|
|
941
|
-
"validateOrderList": 0
|
|
942
|
-
}],
|
|
943
|
-
"orderDirection": [{
|
|
944
|
-
"validateOrderDirection": 0
|
|
945
|
-
}],
|
|
946
|
-
"dateInterval": [{
|
|
947
|
-
"validateDateInterval": 0
|
|
948
|
-
}],
|
|
949
|
-
"chartMode": [{
|
|
950
|
-
"validateChartMode": 0
|
|
951
|
-
}],
|
|
952
|
-
"maxBars": [{
|
|
953
|
-
"validateMaxBars": 0
|
|
954
|
-
}],
|
|
955
|
-
"stack": [{
|
|
956
|
-
"validateStack": 0
|
|
957
|
-
}],
|
|
958
|
-
"scale": [{
|
|
959
|
-
"validateScaling": 0
|
|
960
|
-
}],
|
|
961
|
-
"axisLabelsMode": [{
|
|
962
|
-
"validateAxisLabelsMode": 0
|
|
963
|
-
}],
|
|
964
|
-
"lineFullWidth": [{
|
|
965
|
-
"validateLineFullWidth": 0
|
|
966
|
-
}],
|
|
967
|
-
"showCategories": [{
|
|
968
|
-
"validateShowCategories": 0
|
|
969
|
-
}],
|
|
970
|
-
"measureScale": [{
|
|
971
|
-
"validateMeasureScale": 0
|
|
972
|
-
}],
|
|
973
|
-
"showMeasureScale": [{
|
|
974
|
-
"validateShowMeasureScale": 0
|
|
975
|
-
}],
|
|
976
|
-
"showOverlayAvg": [{
|
|
977
|
-
"validateShowOverlayAvg": 0
|
|
978
|
-
}],
|
|
979
|
-
"showOverlayMedian": [{
|
|
980
|
-
"validateShowOverlayMedian": 0
|
|
981
|
-
}]
|
|
982
|
-
}; }
|
|
983
|
-
};
|
|
984
|
-
Chart.MAX_SCALE_ITERATIONS = 3;
|
|
985
|
-
Chart.style = bnChartTimeCss();
|
|
986
|
-
|
|
987
|
-
exports.bn_chart_time = Chart;
|