@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,278 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-CScBFiS1.js');
|
|
4
|
-
var contextProtocol = require('./context-protocol-BkYHFkXE.js');
|
|
5
|
-
var withHasError = require('./withHasError-Dspb3lIV.js');
|
|
6
|
-
var withBodyObserver = require('./withBodyObserver-B0_W1VOf.js');
|
|
7
|
-
var alasql_min = require('./alasql.min-C_nHTuEQ.js');
|
|
8
|
-
var withComponentStatus = require('./withComponentStatus-BrxL7usr.js');
|
|
9
|
-
require('./_commonjsHelpers-BJu3ubxk.js');
|
|
10
|
-
require('./componentRegister-C17UFNPh.js');
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Mixin that subscribes a Stencil component to raw datasources.
|
|
14
|
-
*
|
|
15
|
-
* This is the simpler counterpart of {@link withDataset} -- it reads directly from
|
|
16
|
-
* the datasources store without going through bn-dataset query processing.
|
|
17
|
-
* Primarily used by bn-dataset itself, which needs access to raw data before
|
|
18
|
-
* producing a processed dataset.
|
|
19
|
-
*
|
|
20
|
-
* Watches the host element's `datasources` attribute via MutationObserver for
|
|
21
|
-
* dynamic rebinding at runtime.
|
|
22
|
-
*
|
|
23
|
-
* @param component - The Stencil component instance
|
|
24
|
-
* @param onUpdate - Callback invoked with `(name, data)` whenever a subscribed datasource changes
|
|
25
|
-
*/
|
|
26
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
27
|
-
const withDatasource = (component, onUpdate) => {
|
|
28
|
-
let subscription;
|
|
29
|
-
let datasources = [];
|
|
30
|
-
let stores;
|
|
31
|
-
const observer = new MutationObserver((mutations) => {
|
|
32
|
-
mutations.forEach((mutation) => {
|
|
33
|
-
if (mutation.attributeName === "datasources") {
|
|
34
|
-
datasources = (index.getElement(component).getAttribute("datasources") || "").split(",");
|
|
35
|
-
datasources.forEach((name) => {
|
|
36
|
-
// @ts-ignore
|
|
37
|
-
onUpdate(name, stores.datasources.get(name));
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
});
|
|
42
|
-
const connectedCallback = component["connectedCallback"];
|
|
43
|
-
component["connectedCallback"] = () => {
|
|
44
|
-
const element = index.getElement(component);
|
|
45
|
-
stores = contextProtocol.getStores(element);
|
|
46
|
-
datasources = (element.getAttribute("datasources") || "").split(",");
|
|
47
|
-
datasources.forEach((name) => {
|
|
48
|
-
// @ts-ignore
|
|
49
|
-
onUpdate(name, stores.datasources.get(name));
|
|
50
|
-
});
|
|
51
|
-
observer.observe(element, { attributes: true, attributeFilter: ["datasources"] });
|
|
52
|
-
subscription = stores.datasources.on("set", (key, newVlaue) => {
|
|
53
|
-
if (datasources.includes(key)) {
|
|
54
|
-
onUpdate(key, newVlaue);
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
withHasError.runIfExisits(connectedCallback, component);
|
|
58
|
-
};
|
|
59
|
-
const disconnectedCallback = component["disconnectedCallback"];
|
|
60
|
-
component["disconnectedCallback"] = () => {
|
|
61
|
-
observer.disconnect();
|
|
62
|
-
withHasError.runIfExisits(subscription);
|
|
63
|
-
contextProtocol.clearStoresCache(index.getElement(component));
|
|
64
|
-
withHasError.runIfExisits(disconnectedCallback, component);
|
|
65
|
-
};
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
/** All recognized IBCS scenario column keys: actual (ac1-4), previous period (pp1-4), forecast (fc1-4), plan (pl1-4). */
|
|
69
|
-
const SCENARIO_KEYS = [
|
|
70
|
-
"ac1",
|
|
71
|
-
"ac2",
|
|
72
|
-
"ac3",
|
|
73
|
-
"ac4",
|
|
74
|
-
"pp1",
|
|
75
|
-
"pp2",
|
|
76
|
-
"pp3",
|
|
77
|
-
"pp4",
|
|
78
|
-
"fc1",
|
|
79
|
-
"fc2",
|
|
80
|
-
"fc3",
|
|
81
|
-
"fc4",
|
|
82
|
-
"pl1",
|
|
83
|
-
"pl2",
|
|
84
|
-
"pl3",
|
|
85
|
-
"pl4",
|
|
86
|
-
];
|
|
87
|
-
/** Hierarchical dimension fields from coarsest (rowGroup) to finest (columnSubGroup). */
|
|
88
|
-
const DIMENSION_FIELDS = ["rowGroup", "category", "subCategory", "columnGroup", "columnSubGroup"];
|
|
89
|
-
function isNumericValue(val) {
|
|
90
|
-
return typeof val === "number" && !isNaN(val) && isFinite(val);
|
|
91
|
-
}
|
|
92
|
-
/** Converts a Set of collected distinct values into a {@link DimensionMeta} summary. */
|
|
93
|
-
function buildDimensionMeta(values) {
|
|
94
|
-
const distinctValues = Array.from(values);
|
|
95
|
-
return {
|
|
96
|
-
distinctValues,
|
|
97
|
-
count: distinctValues.length,
|
|
98
|
-
hasData: distinctValues.length > 0,
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Computes metadata for a dataset in a single O(n) pass over all rows.
|
|
103
|
-
*
|
|
104
|
-
* Collects:
|
|
105
|
-
* - **Dimensions**: distinct values per dimension field (using Sets for deduplication)
|
|
106
|
-
* - **Scenarios**: presence flag, min/max values for each scenario column
|
|
107
|
-
* - **Date range**: min/max date strings and distinct date count
|
|
108
|
-
* - **Suggested defaults**: `suggestedLevel` is the deepest populated dimension
|
|
109
|
-
* (subCategory > category > rowGroup), `suggestedOrder` mirrors it,
|
|
110
|
-
* and `suggestedDateInterval` is "auto" when date data exists.
|
|
111
|
-
*
|
|
112
|
-
* This function is called by bn-dataset whenever data changes and the result is
|
|
113
|
-
* stored in the datasetsMeta store for consumption by visualization components.
|
|
114
|
-
*/
|
|
115
|
-
function calculateDatasetMeta(data) {
|
|
116
|
-
const dimensionSets = {};
|
|
117
|
-
for (const field of DIMENSION_FIELDS) {
|
|
118
|
-
dimensionSets[field] = new Set();
|
|
119
|
-
}
|
|
120
|
-
const scenarioStats = {};
|
|
121
|
-
for (const key of SCENARIO_KEYS) {
|
|
122
|
-
scenarioStats[key] = { hasData: false, min: null, max: null };
|
|
123
|
-
}
|
|
124
|
-
const dateSeen = new Set();
|
|
125
|
-
let dateMin = null;
|
|
126
|
-
let dateMax = null;
|
|
127
|
-
const rows = Array.isArray(data) ? data : [];
|
|
128
|
-
for (let i = 0; i < rows.length; i++) {
|
|
129
|
-
const row = rows[i];
|
|
130
|
-
if (row == null)
|
|
131
|
-
continue;
|
|
132
|
-
for (const field of DIMENSION_FIELDS) {
|
|
133
|
-
const val = row[field];
|
|
134
|
-
if (val != null && val !== "") {
|
|
135
|
-
dimensionSets[field].add(String(val));
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
for (const key of SCENARIO_KEYS) {
|
|
139
|
-
const val = row[key];
|
|
140
|
-
if (isNumericValue(val)) {
|
|
141
|
-
const stat = scenarioStats[key];
|
|
142
|
-
stat.hasData = true;
|
|
143
|
-
if (stat.min === null || val < stat.min)
|
|
144
|
-
stat.min = val;
|
|
145
|
-
if (stat.max === null || val > stat.max)
|
|
146
|
-
stat.max = val;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
const dateVal = row["date"];
|
|
150
|
-
if (dateVal != null && dateVal !== "") {
|
|
151
|
-
const dateStr = String(dateVal);
|
|
152
|
-
dateSeen.add(dateStr);
|
|
153
|
-
if (dateMin === null || dateStr < dateMin)
|
|
154
|
-
dateMin = dateStr;
|
|
155
|
-
if (dateMax === null || dateStr > dateMax)
|
|
156
|
-
dateMax = dateStr;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
const scenarios = SCENARIO_KEYS.map((key) => ({
|
|
160
|
-
key,
|
|
161
|
-
hasData: scenarioStats[key].hasData,
|
|
162
|
-
min: scenarioStats[key].min,
|
|
163
|
-
max: scenarioStats[key].max,
|
|
164
|
-
}));
|
|
165
|
-
const availableScenarios = scenarios.filter((s) => s.hasData).map((s) => s.key);
|
|
166
|
-
const rowGroup = buildDimensionMeta(dimensionSets["rowGroup"]);
|
|
167
|
-
const category = buildDimensionMeta(dimensionSets["category"]);
|
|
168
|
-
const subCategory = buildDimensionMeta(dimensionSets["subCategory"]);
|
|
169
|
-
const columnGroup = buildDimensionMeta(dimensionSets["columnGroup"]);
|
|
170
|
-
const columnSubGroup = buildDimensionMeta(dimensionSets["columnSubGroup"]);
|
|
171
|
-
const dateRange = {
|
|
172
|
-
min: dateMin,
|
|
173
|
-
max: dateMax,
|
|
174
|
-
hasData: dateSeen.size > 0,
|
|
175
|
-
distinctCount: dateSeen.size,
|
|
176
|
-
};
|
|
177
|
-
let suggestedLevel = "category";
|
|
178
|
-
if (subCategory.hasData) {
|
|
179
|
-
suggestedLevel = "subCategory";
|
|
180
|
-
}
|
|
181
|
-
else if (category.hasData) {
|
|
182
|
-
suggestedLevel = "category";
|
|
183
|
-
}
|
|
184
|
-
else if (rowGroup.hasData) {
|
|
185
|
-
suggestedLevel = "rowGroup";
|
|
186
|
-
}
|
|
187
|
-
const suggestedOrder = suggestedLevel;
|
|
188
|
-
const suggestedDateInterval = dateRange.hasData ? "auto" : null;
|
|
189
|
-
return {
|
|
190
|
-
rowCount: rows.length,
|
|
191
|
-
scenarios,
|
|
192
|
-
availableScenarios,
|
|
193
|
-
rowGroup,
|
|
194
|
-
category,
|
|
195
|
-
subCategory,
|
|
196
|
-
columnGroup,
|
|
197
|
-
columnSubGroup,
|
|
198
|
-
dateRange,
|
|
199
|
-
suggestedLevel,
|
|
200
|
-
suggestedOrder,
|
|
201
|
-
suggestedDateInterval,
|
|
202
|
-
calculatedAt: Date.now(),
|
|
203
|
-
};
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
const bnDatasetCss = () => `bn-dataset{display:none}`;
|
|
207
|
-
|
|
208
|
-
const Dataset = class {
|
|
209
|
-
constructor(hostRef) {
|
|
210
|
-
index.registerInstance(this, hostRef);
|
|
211
|
-
/**
|
|
212
|
-
* Commaseperated list of datasourcees
|
|
213
|
-
* <br /><br />
|
|
214
|
-
* example: <br />
|
|
215
|
-
* ```source1,source2```
|
|
216
|
-
*
|
|
217
|
-
*/
|
|
218
|
-
this.datasources = "";
|
|
219
|
-
/**
|
|
220
|
-
* When true, bypasses the AlaSQL query engine and parses the body
|
|
221
|
-
* content as raw JSON, writing it directly to the datasets store.
|
|
222
|
-
*/
|
|
223
|
-
this.static = false;
|
|
224
|
-
withComponentStatus.withComponentStatus(this);
|
|
225
|
-
this.errors = withHasError.withHasError(this);
|
|
226
|
-
// @ts-ignore
|
|
227
|
-
this.database = new alasql_min.alasql.Database();
|
|
228
|
-
withDatasource(this, (name, data) => {
|
|
229
|
-
this.database.tables[name] = { data };
|
|
230
|
-
this.executeQuery();
|
|
231
|
-
});
|
|
232
|
-
withBodyObserver.withBodyObserver(this, (data) => {
|
|
233
|
-
this.query = data;
|
|
234
|
-
this.executeQuery();
|
|
235
|
-
});
|
|
236
|
-
}
|
|
237
|
-
executeQuery() {
|
|
238
|
-
if (!this.stores)
|
|
239
|
-
this.stores = contextProtocol.getStores(this.element);
|
|
240
|
-
if (!!this.query && !!this.name) {
|
|
241
|
-
let result;
|
|
242
|
-
if (this.static) {
|
|
243
|
-
try {
|
|
244
|
-
result = JSON.parse(this.query);
|
|
245
|
-
}
|
|
246
|
-
catch (e) {
|
|
247
|
-
console.error("Failed to parse static dataset", e);
|
|
248
|
-
result = [];
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
else {
|
|
252
|
-
result = this.database.exec(this.query);
|
|
253
|
-
}
|
|
254
|
-
if (this.latestResult !== result) {
|
|
255
|
-
this.latestResult = result;
|
|
256
|
-
// @ts-ignore
|
|
257
|
-
this.stores.datasets.set(this.name, result);
|
|
258
|
-
// @ts-ignore
|
|
259
|
-
this.stores.datasetsMeta.set(this.name, calculateDatasetMeta(result));
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
nameUpdated() {
|
|
264
|
-
this.executeQuery();
|
|
265
|
-
}
|
|
266
|
-
render() {
|
|
267
|
-
return index.h(index.Host, { key: '0aecc50d8aa488f49d6630fec9f0755d306f213e' });
|
|
268
|
-
}
|
|
269
|
-
get element() { return index.getElement(this); }
|
|
270
|
-
static get watchers() { return {
|
|
271
|
-
"name": [{
|
|
272
|
-
"nameUpdated": 0
|
|
273
|
-
}]
|
|
274
|
-
}; }
|
|
275
|
-
};
|
|
276
|
-
Dataset.style = bnDatasetCss();
|
|
277
|
-
|
|
278
|
-
exports.bn_dataset = Dataset;
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-CScBFiS1.js');
|
|
4
|
-
var contextProtocol = require('./context-protocol-BkYHFkXE.js');
|
|
5
|
-
var withHasError = require('./withHasError-Dspb3lIV.js');
|
|
6
|
-
|
|
7
|
-
const bnLayoutCardCss = () => `:host{background:var(--bn-font-background, white);color:var(--bn-font-color, black);font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);flex-direction:column;overflow:hidden;float:left;clear:left}.cardtitle{display:inline-flex}.image{margin-right:0.5em;margin-top:0.5em;z-index:2;background-color:transparent;border:transparent;height:4em;width:auto;display:inline}`;
|
|
8
|
-
|
|
9
|
-
const LayoutCard = class {
|
|
10
|
-
constructor(hostRef) {
|
|
11
|
-
index.registerInstance(this, hostRef);
|
|
12
|
-
this.titleImage = "";
|
|
13
|
-
this.titleBusinessUnit = "";
|
|
14
|
-
this.titleOrder = "category";
|
|
15
|
-
this.titleOrderDirection = "asc";
|
|
16
|
-
this.titleDateFormat = "none";
|
|
17
|
-
this.titleDateLink = "none";
|
|
18
|
-
this.titleNamespace = "_system";
|
|
19
|
-
this.footerText = "";
|
|
20
|
-
this.cardLayout = "full";
|
|
21
|
-
this.cardCustomTemplate = '"a b" "c d"';
|
|
22
|
-
this.cardGridGap = "0";
|
|
23
|
-
this.cardFitToContent = true;
|
|
24
|
-
this.cardShowBorder = true;
|
|
25
|
-
this.templateMap = new Map([
|
|
26
|
-
["split-vertical", '"a b"'],
|
|
27
|
-
["split-horizontal", '"a" "b"'],
|
|
28
|
-
["2x2", '"a b" "c d"'],
|
|
29
|
-
["3x3", '"a b c" "d e f" "g h i"'],
|
|
30
|
-
["4x4", '"a b c d" "e f g h" "i j k l" "m n o p"'],
|
|
31
|
-
["1-over-2", '"a a" "b c"'],
|
|
32
|
-
["2-over-1", '"a b" "c c"'],
|
|
33
|
-
["1-over-3", '"a a a " "b c d"'],
|
|
34
|
-
["3-over-1", '"a b c" "d d d"'],
|
|
35
|
-
["custom-template", '"a b" "c c c"'],
|
|
36
|
-
["gold3", '"a c" "b c"'],
|
|
37
|
-
["gold4", '"a b c c" "d d c c"'],
|
|
38
|
-
]);
|
|
39
|
-
this.errors = withHasError.withHasError(this);
|
|
40
|
-
}
|
|
41
|
-
connectedCallback() {
|
|
42
|
-
this.stores = contextProtocol.getStores(this.element);
|
|
43
|
-
}
|
|
44
|
-
getCommonStyles() {
|
|
45
|
-
let height = "100%";
|
|
46
|
-
let width = "100%";
|
|
47
|
-
if (this.cardFitToContent === true) {
|
|
48
|
-
width = "fit-content";
|
|
49
|
-
height = "fit-content";
|
|
50
|
-
}
|
|
51
|
-
return {
|
|
52
|
-
display: "grid",
|
|
53
|
-
height: height,
|
|
54
|
-
width: width,
|
|
55
|
-
gap: this.cardGridGap + "px",
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
getLayoutStyle() {
|
|
59
|
-
return Object.assign(Object.assign({}, this.getCommonStyles()), { "grid-template-areas": this.getTemplatePattern(this.cardLayout) });
|
|
60
|
-
}
|
|
61
|
-
createDivAreaStyles(elements) {
|
|
62
|
-
return elements.map((x) => ({
|
|
63
|
-
overflow: "hidden",
|
|
64
|
-
"grid-area": x,
|
|
65
|
-
}));
|
|
66
|
-
}
|
|
67
|
-
getSlots(slotNames) {
|
|
68
|
-
const items = this.createDivAreaStyles(slotNames);
|
|
69
|
-
return (index.h(index.Fragment, null, items.map((value, index$1) => {
|
|
70
|
-
return (index.h("div", { style: value }, index.h("slot", { name: "card-slot-" + index$1 })));
|
|
71
|
-
})));
|
|
72
|
-
}
|
|
73
|
-
extractSlotNames(styleElement) {
|
|
74
|
-
if (styleElement == null) {
|
|
75
|
-
return [];
|
|
76
|
-
}
|
|
77
|
-
const words = styleElement.match(/\b\w+\b/g);
|
|
78
|
-
if (!words) {
|
|
79
|
-
return [];
|
|
80
|
-
}
|
|
81
|
-
return Array.from(new Set(words));
|
|
82
|
-
}
|
|
83
|
-
getTemplatePattern(name) {
|
|
84
|
-
console.warn("getTemplatePattern", { name: name });
|
|
85
|
-
if (this.templateMap.has(name) === false && name !== "custom-template") {
|
|
86
|
-
return '"a"';
|
|
87
|
-
}
|
|
88
|
-
if (name === "custom-template") {
|
|
89
|
-
return this.cardCustomTemplate;
|
|
90
|
-
}
|
|
91
|
-
return this.templateMap.get(name);
|
|
92
|
-
}
|
|
93
|
-
async getNumberOfSlot(name) {
|
|
94
|
-
const template = this.getTemplatePattern(name);
|
|
95
|
-
return this.extractSlotNames(template).length;
|
|
96
|
-
}
|
|
97
|
-
componentDidUpdate() {
|
|
98
|
-
// workaround for the render rotation issue
|
|
99
|
-
}
|
|
100
|
-
setCardClass() {
|
|
101
|
-
if (this.cardShowBorder === true) {
|
|
102
|
-
return "card_box border";
|
|
103
|
-
}
|
|
104
|
-
return "card_box";
|
|
105
|
-
}
|
|
106
|
-
prepareTitleImage(value) {
|
|
107
|
-
if (value == null || value === "") {
|
|
108
|
-
return "";
|
|
109
|
-
}
|
|
110
|
-
const assetsState = this.stores.assets.state;
|
|
111
|
-
// for backward compatibility deprecated "asset:" prefix
|
|
112
|
-
if (value.startsWith("asset:")) {
|
|
113
|
-
return assetsState[value.substring(6)];
|
|
114
|
-
}
|
|
115
|
-
return assetsState[value] || value;
|
|
116
|
-
}
|
|
117
|
-
render() {
|
|
118
|
-
const style = this.getLayoutStyle();
|
|
119
|
-
const arrOfSlots = this.extractSlotNames(style["grid-template-areas"]);
|
|
120
|
-
return (
|
|
121
|
-
// @ts-ignore
|
|
122
|
-
index.h("bn-card", { key: 'cdc04f3414fa80148fc8be40cbaf0cac1035fca1', styles: this.styles, class: this.setCardClass() }, index.h("div", { key: '3374b14ec8a8a73de58f866b0c6a691ee0b8d2ae', class: "cardtitle" }, index.h("bn-title", { key: '23a6f991ad6b1a8b74066943b108f3666ae0c863', namespace: this.titleNamespace, "business-unit": this.titleBusinessUnit, scenarios: this.titleScenarios, variances: this.titleVariances, order: this.titleOrder, "order-direction": this.titleOrderDirection, measures: this.titleMeasures, "date-start": this.titleDateStart, "date-end": this.titleDateEnd, "date-format": this.titleDateFormat, "date-link": this.titleDateLink }), this.titleImage != null && this.titleImage !== "" ? (index.h("img", { class: "image", src: this.prepareTitleImage(this.titleImage) })) : ("")), index.h("bn-body", { key: '06d86283489ea2db12d448b1d4b72b540ad352f8' }, index.h("div", { key: '659cfb06f4d756ffd4e1d08910c66a0751d71f9d', style: style }, this.getSlots(arrOfSlots))), index.h("bn-footer", { key: '8aa67fdf3bcbb465c7861f83f6371bc7f73ae75e', text: this.footerText, "page-number": 0, "display-page-number": "false" })));
|
|
123
|
-
}
|
|
124
|
-
get element() { return index.getElement(this); }
|
|
125
|
-
};
|
|
126
|
-
LayoutCard.style = bnLayoutCardCss();
|
|
127
|
-
|
|
128
|
-
exports.bn_layout_card = LayoutCard;
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-CScBFiS1.js');
|
|
4
|
-
var withHasError = require('./withHasError-Dspb3lIV.js');
|
|
5
|
-
|
|
6
|
-
const bnLayoutPageCss = () => `:host{background:var(--bn-font-background, white);color:var(--bn-font-color, black);font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);flex-direction:column;overflow:hidden;float:left;clear:left}`;
|
|
7
|
-
|
|
8
|
-
const LayoutPage = class {
|
|
9
|
-
constructor(hostRef) {
|
|
10
|
-
index.registerInstance(this, hostRef);
|
|
11
|
-
this.messageText = "";
|
|
12
|
-
this.messageImage = "";
|
|
13
|
-
this.titleBusinessUnit = "";
|
|
14
|
-
this.titleOrder = "category";
|
|
15
|
-
this.titleOrderDirection = "asc";
|
|
16
|
-
this.titleDateFormat = "none";
|
|
17
|
-
this.titleDateLink = "none";
|
|
18
|
-
this.titleNamespace = "_system";
|
|
19
|
-
this.footerDisplayPageNumber = true;
|
|
20
|
-
this.pageLayout = "full";
|
|
21
|
-
this.pageCustomTemplate = '"a b" "c d"';
|
|
22
|
-
this.pageGridGap = "0";
|
|
23
|
-
this.pageFitToContent = true;
|
|
24
|
-
this.templateMap = new Map([
|
|
25
|
-
["split-vertical", '"a b"'],
|
|
26
|
-
["split-horizontal", '"a" "b"'],
|
|
27
|
-
["2x2", '"a b" "c d"'],
|
|
28
|
-
["3x3", '"a b c" "d e f" "g h i"'],
|
|
29
|
-
["4x4", '"a b c d" "e f g h" "i j k l" "m n o p"'],
|
|
30
|
-
["1-over-2", '"a a" "b c"'],
|
|
31
|
-
["2-over-1", '"a b" "c c"'],
|
|
32
|
-
["1-over-3", '"a a a " "b c d"'],
|
|
33
|
-
["3-over-1", '"a b c" "d d d"'],
|
|
34
|
-
["custom-template", '"a b" "c c c"'],
|
|
35
|
-
["gold3", '"a c" "b c"'],
|
|
36
|
-
["gold4", '"a b c c" "d d c c"'],
|
|
37
|
-
]);
|
|
38
|
-
this.errors = withHasError.withHasError(this);
|
|
39
|
-
}
|
|
40
|
-
getCommonStyles() {
|
|
41
|
-
let height = "100%";
|
|
42
|
-
let width = "100%";
|
|
43
|
-
if (this.pageFitToContent === true) {
|
|
44
|
-
width = "fit-content";
|
|
45
|
-
height = "fit-content";
|
|
46
|
-
}
|
|
47
|
-
return {
|
|
48
|
-
display: "grid",
|
|
49
|
-
height: height,
|
|
50
|
-
width: width,
|
|
51
|
-
gap: this.pageGridGap + "px",
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
getLayoutStyle() {
|
|
55
|
-
return Object.assign(Object.assign({}, this.getCommonStyles()), { "grid-template-areas": this.getTemplateAreas(this.pageLayout), "grid-template-columns": this.getGridTemplateColumns(this.pageLayout) });
|
|
56
|
-
}
|
|
57
|
-
createDivAreaStyles(elements) {
|
|
58
|
-
return elements.map((x) => ({
|
|
59
|
-
width: "100%",
|
|
60
|
-
overflow: "hidden",
|
|
61
|
-
"grid-area": x,
|
|
62
|
-
height: "100%",
|
|
63
|
-
}));
|
|
64
|
-
}
|
|
65
|
-
getSlots(slotNames) {
|
|
66
|
-
const items = this.createDivAreaStyles(slotNames);
|
|
67
|
-
return (index.h(index.Fragment, null, items.map((value, index$1) => {
|
|
68
|
-
return (index.h("div", { style: value }, index.h("slot", { name: "slot-" + index$1 })));
|
|
69
|
-
})));
|
|
70
|
-
}
|
|
71
|
-
extractSlotNames(styleElement) {
|
|
72
|
-
if (styleElement == null) {
|
|
73
|
-
return [];
|
|
74
|
-
}
|
|
75
|
-
const words = styleElement.match(/\b\w+\b/g);
|
|
76
|
-
if (!words) {
|
|
77
|
-
return [];
|
|
78
|
-
}
|
|
79
|
-
return Array.from(new Set(words));
|
|
80
|
-
}
|
|
81
|
-
getTemplateAreas(name) {
|
|
82
|
-
if (this.templateMap.has(name) === false && name !== "custom-template") {
|
|
83
|
-
return '"a"';
|
|
84
|
-
}
|
|
85
|
-
if (name === "custom-template") {
|
|
86
|
-
return this.pageCustomTemplate;
|
|
87
|
-
}
|
|
88
|
-
return this.templateMap.get(name);
|
|
89
|
-
}
|
|
90
|
-
calculatePercentages(input) {
|
|
91
|
-
const items = input.trim().split(/\s+/);
|
|
92
|
-
const count = items.length;
|
|
93
|
-
if (count === 0)
|
|
94
|
-
return "100%";
|
|
95
|
-
const percentage = (100 / count).toFixed(0) + "%";
|
|
96
|
-
return Array(count).fill(percentage).join(" ");
|
|
97
|
-
}
|
|
98
|
-
getGridTemplateColumns(name) {
|
|
99
|
-
if (this.templateMap.has(name) === false && name !== "custom-template") {
|
|
100
|
-
return "100%";
|
|
101
|
-
}
|
|
102
|
-
let template;
|
|
103
|
-
const pattern = /"[\w\d\s.]+"/g;
|
|
104
|
-
if (name === "custom-template") {
|
|
105
|
-
template = this.pageCustomTemplate;
|
|
106
|
-
}
|
|
107
|
-
else {
|
|
108
|
-
template = this.templateMap.get(name);
|
|
109
|
-
}
|
|
110
|
-
const matches = template.match(pattern);
|
|
111
|
-
return this.calculatePercentages(matches[0]);
|
|
112
|
-
}
|
|
113
|
-
async getNumberOfSlot(name) {
|
|
114
|
-
const template = this.getTemplateAreas(name);
|
|
115
|
-
return this.extractSlotNames(template).length;
|
|
116
|
-
}
|
|
117
|
-
componentDidUpdate() {
|
|
118
|
-
// workaround for the render rotation issue
|
|
119
|
-
const renderOrientation = this.element.closest("bn-context").getAttribute("render-orientation");
|
|
120
|
-
if (renderOrientation && renderOrientation !== this.pageOrientation) {
|
|
121
|
-
const page = this.element.shadowRoot.querySelector("bn-page");
|
|
122
|
-
const layout = this.element.closest("bn-layout-page");
|
|
123
|
-
if (layout && page) {
|
|
124
|
-
page.style.transform = "rotate(-90deg) translate(-100%)";
|
|
125
|
-
page.style.transformOrigin = "top left";
|
|
126
|
-
layout.style.width = `${page.clientHeight}px`;
|
|
127
|
-
layout.style.height = `${page.clientWidth}px`;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
render() {
|
|
132
|
-
const style = this.getLayoutStyle();
|
|
133
|
-
const arrOfSlots = this.extractSlotNames(style["grid-template-areas"]);
|
|
134
|
-
return (
|
|
135
|
-
// @ts-ignore
|
|
136
|
-
index.h("bn-page", { key: '2f67c9b949ab18de247ea492c95b1e53e450fcca', styles: this.styles, format: this.pageFormat, orientation: this.pageOrientation }, index.h("bn-message", { key: '6fb865fe6cf9785c6a3932967d9969d5e0a4eda5', text: this.messageText, image: this.messageImage }), index.h("bn-title", { key: '3ba10325d834b364d0a68012f589ba5508877652', namespace: this.titleNamespace, "business-unit": this.titleBusinessUnit, scenarios: this.titleScenarios, variances: this.titleVariances, order: this.titleOrder, "order-direction": this.titleOrderDirection, measures: this.titleMeasures, "date-start": this.titleDateStart, "date-end": this.titleDateEnd, "date-format": this.titleDateFormat, "date-link": this.titleDateLink }), index.h("bn-body", { key: '16bcb1e231d65b2f0e90c82d8e3ec1a84cc79c59' }, index.h("div", { key: '1408692a37d04686e5d9ad00bca7f1d24787b595', style: style }, this.getSlots(arrOfSlots))), index.h("bn-footer", { key: '83e924e38db44fb678490a8a4d12b264699fc3e2', text: this.footerText, "page-number": this.pageNumber, "display-page-number": this.footerDisplayPageNumber })));
|
|
137
|
-
}
|
|
138
|
-
get element() { return index.getElement(this); }
|
|
139
|
-
};
|
|
140
|
-
LayoutPage.style = bnLayoutPageCss();
|
|
141
|
-
|
|
142
|
-
exports.bn_layout_page = LayoutPage;
|