@bino-bi/bn-template-engine 1.0.0-alpha.9 → 1.0.0-next.20
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-28d5c266.entry.js +1 -0
- package/dist/bn-template-engine/p-2d3ea756.entry.js +1 -0
- package/dist/bn-template-engine/p-2fba7c99.entry.js +1 -0
- package/dist/bn-template-engine/p-6077155f.entry.js +1 -0
- package/dist/bn-template-engine/p-687032d5.entry.js +1 -0
- package/dist/bn-template-engine/p-6c7f0076.entry.js +1 -0
- package/dist/bn-template-engine/p-6lOdN-fB.js +1 -0
- package/dist/bn-template-engine/p-7e9dbc93.entry.js +1 -0
- package/dist/bn-template-engine/p-99477a27.entry.js +1 -0
- package/dist/bn-template-engine/p-A8xyE4b1.js +1 -0
- package/dist/bn-template-engine/p-BA48JiHe.js +1 -0
- package/dist/bn-template-engine/p-BgIpdpfH.js +1 -0
- package/dist/bn-template-engine/p-BjBz5cSL.js +1 -0
- package/dist/bn-template-engine/p-BpWWgN6k.js +1 -0
- package/dist/bn-template-engine/p-C5uvAEKI.js +1 -0
- package/dist/bn-template-engine/p-C8Q0lsaU.js +1 -0
- package/dist/bn-template-engine/p-C9i1Xsib.js +1 -0
- package/dist/bn-template-engine/p-CJThzFZm.js +1 -0
- package/dist/bn-template-engine/p-CYE0I1Mx.js +1 -0
- package/dist/bn-template-engine/p-DsTzlzxQ.js +1 -0
- package/dist/bn-template-engine/p-DwYUTvvI.js +1 -0
- package/dist/bn-template-engine/p-a1380d7c.entry.js +1 -0
- package/dist/bn-template-engine/p-a4ea9a79.entry.js +1 -0
- package/dist/bn-template-engine/p-a8291de2.entry.js +1 -0
- package/dist/bn-template-engine/p-b5274369.entry.js +1 -0
- package/dist/bn-template-engine/p-b9e94127.entry.js +1 -0
- package/dist/bn-template-engine/p-ba912130.entry.js +1 -0
- package/dist/bn-template-engine/p-de29986f.entry.js +1 -0
- package/dist/bn-template-engine/p-eEfqksk-.js +1 -0
- package/dist/bn-template-engine/p-fFtEvsY-.js +1 -0
- package/dist/cjs/AxisConfig-D7CAyPLO.js +233 -0
- package/dist/cjs/LabelCollisionManager-DkdQ9Xdg.js +412 -0
- package/dist/cjs/NumericScale-BAyYXpKL.js +107 -0
- package/dist/cjs/Order-IPfAP0q8.js +87 -0
- package/dist/cjs/SVGStyle-BD8jApd4.js +8209 -0
- package/dist/cjs/SVGVariancesStyleGroup-BaWzR951.js +50 -0
- package/dist/cjs/VarianceMeasure-BBWTgv2e.js +372 -0
- package/dist/cjs/XYChartDataRow-BoR0CTfl.js +829 -0
- package/dist/cjs/bn-asset_21.cjs.entry.js +16105 -0
- package/dist/cjs/bn-chart-bubble.cjs.entry.js +762 -0
- package/dist/cjs/bn-chart-bullet.cjs.entry.js +785 -0
- package/dist/cjs/bn-chart-scatter.cjs.entry.js +658 -0
- package/dist/cjs/bn-grid.cjs.entry.js +5 -3
- package/dist/cjs/bn-image.cjs.entry.js +5 -3
- package/dist/cjs/bn-internationalization.cjs.entry.js +10 -8
- package/dist/cjs/bn-ruleset.cjs.entry.js +41 -0
- package/dist/cjs/bn-template-engine.cjs.js +1 -1
- package/dist/cjs/bn-template.cjs.entry.js +1 -1
- package/dist/cjs/bn-text.cjs.entry.js +8 -79
- package/dist/cjs/bn-tree.cjs.entry.js +4 -2
- package/dist/cjs/context-protocol-BBhT9B52.js +9505 -0
- package/dist/cjs/editor-companion.cjs.entry.js +13 -6
- package/dist/cjs/ibcs-chart-bubble.cjs.entry.js +624 -0
- package/dist/cjs/ibcs-chart-bullet.cjs.entry.js +673 -0
- package/dist/cjs/ibcs-chart-scatter.cjs.entry.js +667 -0
- package/dist/cjs/layoutObserver-DUYYkDMQ.js +199 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sanitizeHtml-LuZr1IMd.js +85 -0
- package/dist/cjs/scaling-BIJQ2NV1.js +589 -0
- package/dist/cjs/{withBodyObserver-D7BKWN2N.js → withBodyObserver-BKUE_ypL.js} +12 -7
- package/dist/cjs/withScalingGroup-D5clRvRe.js +73 -0
- package/dist/cjs/withStyled-Cm9dWQhu.js +1168 -0
- package/dist/collection/collection-manifest.json +9 -1
- 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-bubble/bn-chart-bubble.css +10 -0
- package/dist/collection/components/bn-chart-bubble/bn-chart-bubble.js +1110 -0
- package/dist/collection/components/bn-chart-bubble/ibcs-chart-bubble.css +9 -0
- package/dist/collection/components/bn-chart-bubble/ibcs-chart-bubble.js +653 -0
- package/dist/collection/components/bn-chart-bubble/utils/BubbleChart.js +472 -0
- package/dist/collection/components/bn-chart-bullet/bn-chart-bullet.css +10 -0
- package/dist/collection/components/bn-chart-bullet/bn-chart-bullet.js +1014 -0
- package/dist/collection/components/bn-chart-bullet/ibcs-chart-bullet.css +9 -0
- package/dist/collection/components/bn-chart-bullet/ibcs-chart-bullet.js +538 -0
- package/dist/collection/components/bn-chart-bullet/utils/BulletChart.js +440 -0
- package/dist/collection/components/bn-chart-bullet/utils/model/BulletChartStyle.js +132 -0
- package/dist/collection/components/bn-chart-bullet/utils/model/BulletConfig.js +89 -0
- package/dist/collection/components/bn-chart-bullet/utils/model/index.js +2 -0
- package/dist/collection/components/bn-chart-scatter/bn-chart-scatter.css +10 -0
- package/dist/collection/components/bn-chart-scatter/bn-chart-scatter.js +965 -0
- package/dist/collection/components/bn-chart-scatter/ibcs-chart-scatter.css +9 -0
- package/dist/collection/components/bn-chart-scatter/ibcs-chart-scatter.js +580 -0
- package/dist/collection/components/bn-chart-scatter/utils/ScatterChart.js +409 -0
- package/dist/collection/components/bn-chart-structure/bn-chart-structure.js +126 -43
- package/dist/collection/components/bn-chart-structure/ibcs-chart-structure.js +104 -37
- package/dist/collection/components/bn-chart-structure/utils/StructureChart.js +101 -60
- package/dist/collection/components/bn-chart-structure/utils/helper/ElementPositions.js +46 -4
- package/dist/collection/components/bn-chart-structure/utils/model/StructureChartComponentConfig.js +5 -4
- package/dist/collection/components/bn-chart-time/bn-chart-time.css +1 -1
- package/dist/collection/components/bn-chart-time/bn-chart-time.js +161 -44
- package/dist/collection/components/bn-chart-time/ibcs-chart-time.js +97 -32
- package/dist/collection/components/bn-chart-time/utils/TimeChart.js +151 -75
- package/dist/collection/components/bn-chart-time/utils/elements/StackedColumn.js +3 -3
- package/dist/collection/components/bn-chart-time/utils/model/TimeChartComponentConfig.js +10 -4
- package/dist/collection/components/bn-chart-time/utils/model/TimeChartDataRow.js +2 -0
- package/dist/collection/components/bn-component-style/bn-component-style.js +1 -1
- package/dist/collection/components/bn-context/bn-context.js +20 -1
- package/dist/collection/components/bn-dataset/bn-dataset.js +226 -23
- package/dist/collection/components/bn-datasource/bn-datasource.js +163 -12
- package/dist/collection/components/bn-footer/bn-footer.js +1 -1
- package/dist/collection/components/bn-grid/bn-grid.js +20 -1
- package/dist/collection/components/bn-image/bn-image.js +1 -1
- package/dist/collection/components/bn-internationalization/bn-internationalization.js +10 -7
- package/dist/collection/components/bn-layout-card/bn-layout-card.css +8 -3
- package/dist/collection/components/bn-layout-card/bn-layout-card.js +98 -35
- package/dist/collection/components/bn-layout-page/bn-layout-page.css +5 -3
- package/dist/collection/components/bn-layout-page/bn-layout-page.js +98 -25
- package/dist/collection/components/bn-message/bn-message.css +6 -2
- package/dist/collection/components/bn-message/bn-message.js +3 -2
- package/dist/collection/components/bn-page/bn-page.js +1 -1
- package/dist/collection/components/bn-ruleset/bn-ruleset.css +3 -0
- package/dist/collection/components/bn-ruleset/bn-ruleset.js +68 -0
- 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 +318 -62
- package/dist/collection/components/bn-table/ibcs-table.css +8 -0
- package/dist/collection/components/bn-table/ibcs-table.js +162 -33
- package/dist/collection/components/bn-table/utils/Table.js +72 -29
- package/dist/collection/components/bn-table/utils/elements/CellBarChart.js +13 -8
- package/dist/collection/components/bn-table/utils/elements/TableRow.js +3 -2
- package/dist/collection/components/bn-table/utils/elements/WaterfallBar.js +47 -0
- package/dist/collection/components/bn-table/utils/elements/index.js +1 -0
- package/dist/collection/components/bn-table/utils/factories/tableDataSetFactory.js +120 -23
- package/dist/collection/components/bn-table/utils/helper/DataQuery.js +380 -50
- package/dist/collection/components/bn-table/utils/helper/IntervalColumns.js +140 -0
- package/dist/collection/components/bn-table/utils/helper/QueryGroup.js +4 -9
- package/dist/collection/components/bn-table/utils/helper/WaterfallCalculator.js +166 -0
- package/dist/collection/components/bn-table/utils/helper/index.js +2 -0
- package/dist/collection/components/bn-table/utils/model/TableAttribute.js +46 -0
- package/dist/collection/components/bn-table/utils/model/TableComponentConfig.js +20 -4
- package/dist/collection/components/bn-template/bn-template.js +1 -1
- package/dist/collection/components/bn-text/bn-text.js +2 -75
- package/dist/collection/components/bn-title/bn-title.js +31 -3
- package/dist/collection/components/bn-title/ibcs-title/ibcs-title.css +4 -0
- package/dist/collection/components/bn-title/ibcs-title/ibcs-title.js +52 -6
- package/dist/collection/components/bn-title/ibcs-title/utils/Title.js +7 -4
- package/dist/collection/components/bn-title/ibcs-title/utils/factories/TitleDataSetFactory.js +6 -2
- package/dist/collection/components/bn-title/ibcs-title/utils/model/TitleConfig.js +5 -0
- package/dist/collection/components/bn-tree/bn-tree.js +19 -0
- package/dist/collection/components/editor-companion/editor-companion.js +12 -5
- package/dist/collection/context/scopedDb.js +127 -0
- package/dist/collection/stores/componentStyles.js +67 -0
- package/dist/collection/stores/createScopedStores.js +11 -5
- package/dist/collection/stores/internationalization.js +77 -3
- package/dist/collection/stores/ruleSets.js +46 -0
- package/dist/collection/utils/DateStringFactory.js +31 -0
- package/dist/collection/utils/constants.js +5 -0
- package/dist/collection/utils/dataAnalyzer.js +14 -8
- package/dist/collection/utils/ibcsRuleSet.js +14 -26
- package/dist/collection/utils/layoutObserver.js +88 -0
- package/dist/collection/utils/parentDimensions.js +71 -15
- package/dist/collection/utils/sanitizeHtml.js +81 -0
- package/dist/collection/utils/validate.js +47 -0
- package/dist/collection/utils/withBodyObserver.js +12 -7
- package/dist/collection/utils/withComponentStyle.js +3 -5
- package/dist/collection/utils/withDataset.js +43 -39
- package/dist/collection/utils/withDatasource.js +28 -18
- package/dist/collection/utils/withInheritedProps.js +26 -1
- package/dist/collection/utils/withRuleSet.js +105 -0
- package/dist/collection/utils/withScalingGroup.js +69 -0
- package/dist/collection/utils/withTranslation.js +53 -15
- package/dist/collection/utils/xy/FacetGrid.js +36 -0
- package/dist/collection/utils/xy/IsoCurves.js +156 -0
- package/dist/collection/utils/xy/NumericScale.js +103 -0
- package/dist/collection/utils/xy/PointLabeler.js +96 -0
- package/dist/collection/utils/xy/RadiusScale.js +42 -0
- package/dist/collection/utils/xy/SeriesPalette.js +80 -0
- package/dist/collection/utils/xy/VarianceMeasure.js +76 -0
- package/dist/collection/utils/xy/XYFrame.js +120 -0
- package/dist/collection/utils/xy/XYLegend.js +107 -0
- package/dist/collection/utils/xy/model/AxisConfig.js +221 -0
- package/dist/collection/utils/xy/model/ScaleFactorsXYChart.js +69 -0
- package/dist/collection/utils/xy/model/XYChartDataRow.js +0 -0
- package/dist/collection/utils/xy/model/XYChartStyle.js +52 -0
- package/dist/components/AxisConfig.js +1 -0
- package/dist/components/CompareUtil.js +1 -0
- package/dist/components/DataFormatDigits.js +1 -1
- package/dist/components/DateStringFactory.js +1 -1
- package/dist/components/LabelCollisionManager.js +1 -0
- package/dist/components/NumericScale.js +1 -0
- package/dist/components/Order.js +1 -1
- package/dist/components/SVGVariancesStyleGroup.js +1 -1
- package/dist/components/SiPrefix.js +1 -0
- package/dist/components/StringAdapter.js +1 -0
- package/dist/components/VarianceMeasure.js +1 -0
- package/dist/components/XYChartDataRow.js +1 -0
- package/dist/components/bn-body2.js +1 -1
- package/dist/components/bn-card2.js +1 -1
- package/dist/components/bn-chart-bubble.d.ts +11 -0
- package/dist/components/bn-chart-bubble.js +1 -0
- package/dist/components/bn-chart-bullet.d.ts +11 -0
- package/dist/components/bn-chart-bullet.js +1 -0
- package/dist/components/bn-chart-scatter.d.ts +11 -0
- package/dist/components/bn-chart-scatter.js +1 -0
- package/dist/components/bn-chart-structure.js +1 -1
- package/dist/components/bn-chart-time.js +1 -1
- package/dist/components/bn-component-style.js +1 -1
- package/dist/components/bn-context.js +1 -1
- package/dist/components/bn-dataset.js +1 -1
- package/dist/components/bn-datasource.js +1 -1
- package/dist/components/bn-footer2.js +1 -1
- package/dist/components/bn-grid.js +1 -1
- package/dist/components/bn-image.js +1 -1
- package/dist/components/bn-internationalization.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/bn-ruleset.d.ts +11 -0
- package/dist/components/bn-ruleset.js +1 -0
- package/dist/components/bn-scaling-group.d.ts +11 -0
- 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/context-protocol.js +1 -1
- package/dist/components/editor-companion.js +1 -1
- package/dist/components/formatter.js +1 -0
- package/dist/components/ibcs-chart-bubble.d.ts +11 -0
- package/dist/components/ibcs-chart-bubble.js +1 -0
- package/dist/components/ibcs-chart-bubble2.js +1 -0
- package/dist/components/ibcs-chart-bullet.d.ts +11 -0
- package/dist/components/ibcs-chart-bullet.js +1 -0
- package/dist/components/ibcs-chart-bullet2.js +1 -0
- package/dist/components/ibcs-chart-scatter.d.ts +11 -0
- package/dist/components/ibcs-chart-scatter.js +1 -0
- package/dist/components/ibcs-chart-scatter2.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/layoutObserver.js +1 -0
- package/dist/components/luxon.js +1 -0
- package/dist/components/main.js +1 -0
- package/dist/components/merge.js +1 -0
- package/dist/components/sanitizeHtml.js +1 -0
- package/dist/components/stackColors.js +1 -0
- package/dist/components/validate.js +1 -1
- package/dist/components/withBodyObserver.js +1 -1
- package/dist/components/withComponentStyle.js +1 -1
- package/dist/components/withDataset.js +1 -0
- package/dist/components/withRuleSet.js +1 -0
- package/dist/components/withScalingGroup.js +1 -0
- package/dist/components/withStyled.js +1 -1
- package/dist/components/withTranslation.js +1 -1
- package/dist/esm/AxisConfig-ByIP5J-9.js +224 -0
- package/dist/esm/LabelCollisionManager-DaNiDiM9.js +404 -0
- package/dist/esm/NumericScale-DsTzlzxQ.js +105 -0
- package/dist/esm/Order-BQeJE_yi.js +83 -0
- package/dist/esm/SVGStyle-BwBlY3Km.js +8199 -0
- package/dist/esm/SVGVariancesStyleGroup-BpGW4CvN.js +48 -0
- package/dist/esm/VarianceMeasure-CE3N8Bea.js +364 -0
- package/dist/esm/XYChartDataRow-DeMI1JKU.js +820 -0
- package/dist/esm/bn-asset_21.entry.js +16083 -0
- package/dist/esm/bn-chart-bubble.entry.js +760 -0
- package/dist/esm/bn-chart-bullet.entry.js +783 -0
- package/dist/esm/bn-chart-scatter.entry.js +656 -0
- package/dist/esm/bn-grid.entry.js +5 -3
- package/dist/esm/bn-image.entry.js +5 -3
- package/dist/esm/bn-internationalization.entry.js +10 -8
- package/dist/esm/bn-ruleset.entry.js +39 -0
- package/dist/esm/bn-template-engine.js +1 -1
- package/dist/esm/bn-template.entry.js +1 -1
- package/dist/esm/bn-text.entry.js +7 -78
- package/dist/esm/bn-tree.entry.js +4 -2
- package/dist/esm/context-protocol-d8MHrEo8.js +9490 -0
- package/dist/esm/editor-companion.entry.js +13 -6
- package/dist/esm/ibcs-chart-bubble.entry.js +622 -0
- package/dist/esm/ibcs-chart-bullet.entry.js +671 -0
- package/dist/esm/ibcs-chart-scatter.entry.js +665 -0
- package/dist/esm/layoutObserver-BJBEyhNf.js +196 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sanitizeHtml-BA48JiHe.js +83 -0
- package/dist/esm/scaling-BGnpSN1j.js +581 -0
- package/dist/esm/{withBodyObserver-AFk2wwHT.js → withBodyObserver-IokS6fHD.js} +12 -7
- package/dist/esm/withScalingGroup-CC3UcvC5.js +71 -0
- package/dist/esm/withStyled-2l5Tx3cf.js +1135 -0
- package/dist/types/components/bn-chart-bubble/bn-chart-bubble.d.ts +193 -0
- package/dist/types/components/bn-chart-bubble/ibcs-chart-bubble.d.ts +58 -0
- package/dist/types/components/bn-chart-bubble/utils/BubbleChart.d.ts +91 -0
- package/dist/types/components/bn-chart-bullet/bn-chart-bullet.d.ts +172 -0
- package/dist/types/components/bn-chart-bullet/ibcs-chart-bullet.d.ts +52 -0
- package/dist/types/components/bn-chart-bullet/utils/BulletChart.d.ts +91 -0
- package/dist/types/components/bn-chart-bullet/utils/model/BulletChartStyle.d.ts +70 -0
- package/dist/types/components/bn-chart-bullet/utils/model/BulletConfig.d.ts +43 -0
- package/dist/types/components/bn-chart-bullet/utils/model/index.d.ts +2 -0
- package/dist/types/components/bn-chart-scatter/bn-chart-scatter.d.ts +172 -0
- package/dist/types/components/bn-chart-scatter/ibcs-chart-scatter.d.ts +53 -0
- package/dist/types/components/bn-chart-scatter/utils/ScatterChart.d.ts +66 -0
- package/dist/types/components/bn-chart-structure/bn-chart-structure.d.ts +19 -5
- package/dist/types/components/bn-chart-structure/ibcs-chart-structure.d.ts +13 -6
- package/dist/types/components/bn-chart-structure/utils/StructureChart.d.ts +21 -12
- package/dist/types/components/bn-chart-structure/utils/helper/ElementPositions.d.ts +16 -1
- package/dist/types/components/bn-chart-structure/utils/model/StructureChartComponentConfig.d.ts +5 -3
- package/dist/types/components/bn-chart-time/bn-chart-time.d.ts +53 -13
- package/dist/types/components/bn-chart-time/ibcs-chart-time.d.ts +13 -6
- package/dist/types/components/bn-chart-time/utils/TimeChart.d.ts +21 -12
- package/dist/types/components/bn-chart-time/utils/model/TimeChartComponentConfig.d.ts +7 -3
- package/dist/types/components/bn-context/bn-context.d.ts +8 -0
- package/dist/types/components/bn-dataset/bn-dataset.d.ts +47 -5
- package/dist/types/components/bn-datasource/bn-datasource.d.ts +53 -6
- package/dist/types/components/bn-grid/bn-grid.d.ts +8 -0
- package/dist/types/components/bn-layout-card/bn-layout-card.d.ts +39 -8
- package/dist/types/components/bn-layout-page/bn-layout-page.d.ts +36 -1
- package/dist/types/components/bn-message/bn-message.d.ts +5 -2
- package/dist/types/components/bn-ruleset/bn-ruleset.d.ts +8 -0
- package/dist/types/components/bn-scaling-group/bn-scaling-group.d.ts +37 -0
- package/dist/types/components/bn-table/bn-table.d.ts +74 -12
- package/dist/types/components/bn-table/ibcs-table.d.ts +27 -4
- package/dist/types/components/bn-table/utils/Table.d.ts +16 -6
- package/dist/types/components/bn-table/utils/elements/Cell.d.ts +2 -0
- package/dist/types/components/bn-table/utils/elements/CellBarChart.d.ts +33 -0
- package/dist/types/components/bn-table/utils/elements/TableRow.d.ts +2 -1
- package/dist/types/components/bn-table/utils/elements/WaterfallBar.d.ts +21 -0
- package/dist/types/components/bn-table/utils/elements/index.d.ts +1 -0
- package/dist/types/components/bn-table/utils/factories/tableDataSetFactory.d.ts +17 -9
- package/dist/types/components/bn-table/utils/helper/DataQuery.d.ts +35 -3
- package/dist/types/components/bn-table/utils/helper/IntervalColumns.d.ts +37 -0
- package/dist/types/components/bn-table/utils/helper/QueryGroup.d.ts +4 -5
- package/dist/types/components/bn-table/utils/helper/WaterfallCalculator.d.ts +55 -0
- package/dist/types/components/bn-table/utils/helper/index.d.ts +2 -0
- package/dist/types/components/bn-table/utils/model/TableAttribute.d.ts +22 -0
- package/dist/types/components/bn-table/utils/model/TableComponentConfig.d.ts +12 -3
- package/dist/types/components/bn-table/utils/model/index.d.ts +21 -0
- package/dist/types/components/bn-title/bn-title.d.ts +12 -1
- package/dist/types/components/bn-title/ibcs-title/ibcs-title.d.ts +4 -0
- package/dist/types/components/bn-title/ibcs-title/utils/Title.d.ts +1 -0
- package/dist/types/components/bn-title/ibcs-title/utils/factories/TitleDataSetFactory.d.ts +3 -1
- package/dist/types/components/bn-title/ibcs-title/utils/model/TitleConfig.d.ts +2 -0
- package/dist/types/components/bn-tree/bn-tree.d.ts +8 -0
- package/dist/types/components/editor-companion/editor-companion.d.ts +2 -0
- package/dist/types/components.d.ts +1725 -116
- package/dist/types/context/context-protocol.d.ts +7 -3
- package/dist/types/context/scopedDb.d.ts +37 -0
- package/dist/types/stores/componentStyles.d.ts +41 -0
- package/dist/types/stores/createScopedStores.d.ts +4 -2
- package/dist/types/stores/ruleSets.d.ts +40 -0
- package/dist/types/utils/DateStringFactory.d.ts +20 -1
- package/dist/types/utils/constants.d.ts +5 -0
- package/dist/types/utils/dataAnalyzer.d.ts +2 -1
- package/dist/types/utils/ibcsRuleSet.d.ts +6 -1
- package/dist/types/utils/layoutObserver.d.ts +27 -0
- package/dist/types/utils/model/ChartStyles.d.ts +2 -1
- package/dist/types/utils/parentDimensions.d.ts +1 -1
- package/dist/types/utils/sanitizeHtml.d.ts +6 -0
- package/dist/types/utils/validate.d.ts +18 -0
- package/dist/types/utils/withDataset.d.ts +6 -2
- package/dist/types/utils/withDatasource.d.ts +3 -3
- package/dist/types/utils/withInheritedProps.d.ts +19 -0
- package/dist/types/utils/withRuleSet.d.ts +24 -0
- package/dist/types/utils/withScalingGroup.d.ts +14 -0
- package/dist/types/utils/withTranslation.d.ts +15 -5
- package/dist/types/utils/xy/FacetGrid.d.ts +27 -0
- package/dist/types/utils/xy/IsoCurves.d.ts +46 -0
- package/dist/types/utils/xy/NumericScale.d.ts +41 -0
- package/dist/types/utils/xy/PointLabeler.d.ts +58 -0
- package/dist/types/utils/xy/RadiusScale.d.ts +26 -0
- package/dist/types/utils/xy/SeriesPalette.d.ts +59 -0
- package/dist/types/utils/xy/VarianceMeasure.d.ts +37 -0
- package/dist/types/utils/xy/XYFrame.d.ts +44 -0
- package/dist/types/utils/xy/XYLegend.d.ts +43 -0
- package/dist/types/utils/xy/model/AxisConfig.d.ts +96 -0
- package/dist/types/utils/xy/model/ScaleFactorsXYChart.d.ts +36 -0
- package/dist/types/utils/xy/model/XYChartDataRow.d.ts +157 -0
- package/dist/types/utils/xy/model/XYChartStyle.d.ts +31 -0
- package/package.json +5 -4
- package/readme.md +9 -5
- package/dist/bn-template-engine/p-3141c4a2.entry.js +0 -1
- package/dist/bn-template-engine/p-67538176.entry.js +0 -1
- package/dist/bn-template-engine/p-916296a5.entry.js +0 -1
- package/dist/bn-template-engine/p-96006b06.entry.js +0 -1
- package/dist/bn-template-engine/p-Ck-NYtot.js +0 -1
- package/dist/bn-template-engine/p-CnDq0oVa.js +0 -1
- package/dist/bn-template-engine/p-DSXNgKLa.js +0 -1
- package/dist/bn-template-engine/p-bc711fb0.entry.js +0 -1
- package/dist/bn-template-engine/p-c86395b8.entry.js +0 -1
- package/dist/bn-template-engine/p-e6f646b1.entry.js +0 -1
- package/dist/bn-template-engine/p-f41d9242.entry.js +0 -1
- package/dist/bn-template-engine/p-gFbbuhtl.js +0 -1
- package/dist/cjs/bn-asset_20.cjs.entry.js +0 -23547
- package/dist/cjs/context-protocol-ohYzcb5F.js +0 -663
- package/dist/cjs/scaling-CIAClQR5.js +0 -314
- package/dist/cjs/withStyled-qd94SSb4.js +0 -9535
- package/dist/collection/stores/datasets.js +0 -14
- package/dist/collection/stores/datasources.js +0 -14
- package/dist/components/_commonjsHelpers.js +0 -1
- package/dist/components/alasql.min.js +0 -1
- package/dist/components/ibcsRuleSet.js +0 -1
- package/dist/components/scaling.js +0 -1
- package/dist/components/withInheritedProps.js +0 -1
- package/dist/esm/bn-asset_20.entry.js +0 -23526
- package/dist/esm/context-protocol-DdbSplvE.js +0 -656
- package/dist/esm/scaling-DGKKkuL9.js +0 -309
- package/dist/esm/withStyled-BIkqU2w4.js +0 -9501
- package/dist/types/stores/datasets.d.ts +0 -14
- package/dist/types/stores/datasources.d.ts +0 -14
|
@@ -7,11 +7,9 @@ import { OrderAdapter, OrderDirection } from "../../../utils/model/Order";
|
|
|
7
7
|
import { I18nMode } from "../../../utils/constants";
|
|
8
8
|
import { IBCSRuleSet } from "../../../utils/ibcsRuleSet";
|
|
9
9
|
import { StringAdapter } from "../../../utils/helper/StringAdapter";
|
|
10
|
+
import { sanitizeHtml } from "../../../utils/sanitizeHtml";
|
|
10
11
|
export class IbcsTitle {
|
|
11
12
|
constructor() {
|
|
12
|
-
// sample fuer die chrome dev console:
|
|
13
|
-
// document.querySelector("ibcs-title").setBusinessUnit("Sven")
|
|
14
|
-
// document.querySelector("ibcs-title").setProps({businessUnit: "Lalal"})
|
|
15
13
|
this.businessUnit = "";
|
|
16
14
|
this.scenarios = [];
|
|
17
15
|
this.measures = [];
|
|
@@ -22,6 +20,8 @@ export class IbcsTitle {
|
|
|
22
20
|
};
|
|
23
21
|
this.i18n = new Map(); // I18nMode;
|
|
24
22
|
this.i18nMode = I18nMode.ALL;
|
|
23
|
+
/** Locale used to format the date-link labels (e.g. "en", "de"). */
|
|
24
|
+
this.locale = "de";
|
|
25
25
|
this.title = new Title(new IBCSRuleSet());
|
|
26
26
|
}
|
|
27
27
|
// so
|
|
@@ -36,17 +36,18 @@ export class IbcsTitle {
|
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
render() {
|
|
39
|
-
return (h("div", { key: '
|
|
39
|
+
return (h("div", { key: '4a675a92695130e13bd690587098cf70d81028c9' }, h("div", { key: '54c98ac466109f4ea1306aa57379f5cb25cf654f', innerHTML: sanitizeHtml(this.title.unit) }), h("div", { key: '35e8592454c45c06db9e3b6db5525165a3ee4a00' }, this.title.measures.map((measure, index) => (h("span", null, this.isFirstElement(index) ? this.title.i18n.get("SEPERATOR_WS") : "", h("span", { class: "measure" }, measure.name), " ", measure.unit ? this.title.i18n.get("in") : "", " ", measure.unit)))), h("div", { key: '29c93306567a592ac956d5c97501dc5e7acf90ec' }, this.title.dimension)));
|
|
40
40
|
}
|
|
41
41
|
componentWillLoad() {
|
|
42
42
|
const config = this.prepareConfig();
|
|
43
|
-
this.title = new Title(new IBCSRuleSet());
|
|
43
|
+
this.title = new Title(new IBCSRuleSet(this.ruleSetConfig));
|
|
44
44
|
this.title.setI18n(this.i18n);
|
|
45
45
|
this.title.setConfig(config);
|
|
46
46
|
}
|
|
47
47
|
componentWillUpdate() {
|
|
48
48
|
const config = this.prepareConfig();
|
|
49
49
|
this.title.setI18n(this.i18n);
|
|
50
|
+
this.title.setRuleSet(new IBCSRuleSet(this.ruleSetConfig));
|
|
50
51
|
this.title.setConfig(config);
|
|
51
52
|
}
|
|
52
53
|
componentWillRender() {
|
|
@@ -64,6 +65,7 @@ export class IbcsTitle {
|
|
|
64
65
|
intervalSpanLimit: this.intervalSpanLimit,
|
|
65
66
|
i18nMode: this.i18nMode,
|
|
66
67
|
order: this.order,
|
|
68
|
+
locale: this.locale,
|
|
67
69
|
});
|
|
68
70
|
}
|
|
69
71
|
static get is() { return "ibcs-title"; }
|
|
@@ -261,6 +263,50 @@ export class IbcsTitle {
|
|
|
261
263
|
"reflect": false,
|
|
262
264
|
"attribute": "i18n-mode",
|
|
263
265
|
"defaultValue": "I18nMode.ALL"
|
|
266
|
+
},
|
|
267
|
+
"locale": {
|
|
268
|
+
"type": "string",
|
|
269
|
+
"mutable": false,
|
|
270
|
+
"complexType": {
|
|
271
|
+
"original": "string",
|
|
272
|
+
"resolved": "string",
|
|
273
|
+
"references": {}
|
|
274
|
+
},
|
|
275
|
+
"required": false,
|
|
276
|
+
"optional": false,
|
|
277
|
+
"docs": {
|
|
278
|
+
"tags": [],
|
|
279
|
+
"text": "Locale used to format the date-link labels (e.g. \"en\", \"de\")."
|
|
280
|
+
},
|
|
281
|
+
"getter": false,
|
|
282
|
+
"setter": false,
|
|
283
|
+
"reflect": false,
|
|
284
|
+
"attribute": "locale",
|
|
285
|
+
"defaultValue": "\"de\""
|
|
286
|
+
},
|
|
287
|
+
"ruleSetConfig": {
|
|
288
|
+
"type": "unknown",
|
|
289
|
+
"mutable": false,
|
|
290
|
+
"complexType": {
|
|
291
|
+
"original": "RuleSetConfig",
|
|
292
|
+
"resolved": "RuleSetConfig",
|
|
293
|
+
"references": {
|
|
294
|
+
"RuleSetConfig": {
|
|
295
|
+
"location": "import",
|
|
296
|
+
"path": "../../../stores/ruleSets",
|
|
297
|
+
"id": "src/stores/ruleSets.ts::RuleSetConfig",
|
|
298
|
+
"referenceLocation": "RuleSetConfig"
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
"required": false,
|
|
303
|
+
"optional": true,
|
|
304
|
+
"docs": {
|
|
305
|
+
"tags": [],
|
|
306
|
+
"text": ""
|
|
307
|
+
},
|
|
308
|
+
"getter": false,
|
|
309
|
+
"setter": false
|
|
264
310
|
}
|
|
265
311
|
};
|
|
266
312
|
}
|
|
@@ -292,7 +338,7 @@ export class IbcsTitle {
|
|
|
292
338
|
"signature": "(data: Partial<IbcsTitle>) => Promise<void>",
|
|
293
339
|
"parameters": [{
|
|
294
340
|
"name": "data",
|
|
295
|
-
"type": "{ businessUnit?: string; setBusinessUnit?: (businessUnit: string) => Promise<void>; setProps?: (data: Partial<IbcsTitle>) => Promise<void>; scenarios?: string[]; measures?: MeasureEntry[]; timeperiod?: TimePeriod; intervalSpanLimit?: number; order?: Order; i18n?: Map<string, string>; i18nMode?: I18nMode; render?: () => any; componentWillLoad?: () => void; componentWillUpdate?: () => void; componentWillRender?: () => void; }",
|
|
341
|
+
"type": "{ businessUnit?: string; setBusinessUnit?: (businessUnit: string) => Promise<void>; setProps?: (data: Partial<IbcsTitle>) => Promise<void>; scenarios?: string[]; measures?: MeasureEntry[]; timeperiod?: TimePeriod; intervalSpanLimit?: number; order?: Order; i18n?: Map<string, string>; i18nMode?: I18nMode; locale?: string; ruleSetConfig?: RuleSetConfig; render?: () => any; componentWillLoad?: () => void; componentWillUpdate?: () => void; componentWillRender?: () => void; }",
|
|
296
342
|
"docs": ""
|
|
297
343
|
}],
|
|
298
344
|
"references": {
|
|
@@ -19,6 +19,9 @@ export class Title {
|
|
|
19
19
|
this.state = FactoryState.DIRTY;
|
|
20
20
|
this.setI18n(new Map());
|
|
21
21
|
}
|
|
22
|
+
setRuleSet(ruleSet) {
|
|
23
|
+
this.ruleSet = ruleSet || new IBCSRuleSet();
|
|
24
|
+
}
|
|
22
25
|
/**
|
|
23
26
|
* Set Localisation Map
|
|
24
27
|
* @param i18n
|
|
@@ -41,11 +44,11 @@ export class Title {
|
|
|
41
44
|
["ac3", "AC3"],
|
|
42
45
|
["pp3", "PY3"],
|
|
43
46
|
["fc3", "FC3"],
|
|
44
|
-
["
|
|
47
|
+
["pl3", "PL3"],
|
|
45
48
|
["ac4", "AC4"],
|
|
46
|
-
["
|
|
49
|
+
["pp4", "PY4"],
|
|
47
50
|
["fc4", "FC4"],
|
|
48
|
-
["
|
|
51
|
+
["pl4", "PL4"],
|
|
49
52
|
["category", " "],
|
|
50
53
|
["operation", " "],
|
|
51
54
|
["there_of", "davon"],
|
|
@@ -69,7 +72,7 @@ export class Title {
|
|
|
69
72
|
if (FactoryState.DIRTY === this.state) {
|
|
70
73
|
this.unit = this.config.businessunit;
|
|
71
74
|
this.measures = this.dataSetFactory.createMeasures(this.config.measures, this.i18n, this.config.i18nMode);
|
|
72
|
-
this.dimension = this.dataSetFactory.createDimension(this.config.scenarios, this.config.timeperiod, this.config.order, this.i18n, this.config.intervalSpanLimit);
|
|
75
|
+
this.dimension = this.dataSetFactory.createDimension(this.config.scenarios, this.config.timeperiod, this.config.order, this.i18n, this.config.intervalSpanLimit, this.config.locale);
|
|
73
76
|
this.state = FactoryState.UP_TO_DATE;
|
|
74
77
|
}
|
|
75
78
|
return this;
|
package/dist/collection/components/bn-title/ibcs-title/utils/factories/TitleDataSetFactory.js
CHANGED
|
@@ -51,11 +51,15 @@ export class TitleDataSetFactory {
|
|
|
51
51
|
* @param time
|
|
52
52
|
* @param order
|
|
53
53
|
* @param i18n
|
|
54
|
+
* @param spanLimit
|
|
55
|
+
* @param locale Locale used to format the date-link labels.
|
|
54
56
|
*/
|
|
55
|
-
createDimension(scenarios, time, order, i18n, spanLimit) {
|
|
57
|
+
createDimension(scenarios, time, order, i18n, spanLimit, locale = "de") {
|
|
56
58
|
let formatedTime = "";
|
|
57
59
|
if (time !== undefined) {
|
|
58
|
-
|
|
60
|
+
const dateStringFactory = new DateStringFactory();
|
|
61
|
+
dateStringFactory.setLocale(locale);
|
|
62
|
+
formatedTime = dateStringFactory.getDateLinkString(time.start, time.end, time.link, time.format, spanLimit);
|
|
59
63
|
}
|
|
60
64
|
const formatedScenarios = scenarios
|
|
61
65
|
.map((scenario) => {
|
|
@@ -8,6 +8,8 @@ export class TitleConfig {
|
|
|
8
8
|
this.scenarios = [];
|
|
9
9
|
this.i18nMode = I18nMode.ALL;
|
|
10
10
|
this.intervalSpanLimit = 32;
|
|
11
|
+
/** Locale used for the date-link labels; set from the bn-context locale. */
|
|
12
|
+
this.locale = "de";
|
|
11
13
|
}
|
|
12
14
|
}
|
|
13
15
|
export class TitleConifgAdapter {
|
|
@@ -40,6 +42,9 @@ export class TitleConifgAdapter {
|
|
|
40
42
|
if (CompareUtil.isExisting(data.order)) {
|
|
41
43
|
config.order = this.orderAdapter.adapt(data.order);
|
|
42
44
|
}
|
|
45
|
+
if (CompareUtil.isString(data.locale)) {
|
|
46
|
+
config.locale = data.locale;
|
|
47
|
+
}
|
|
43
48
|
return config;
|
|
44
49
|
}
|
|
45
50
|
default() {
|
|
@@ -468,6 +468,25 @@ export class ChartTree {
|
|
|
468
468
|
"attribute": "edge-style",
|
|
469
469
|
"defaultValue": "\"orthogonal\""
|
|
470
470
|
},
|
|
471
|
+
"i18nNamespace": {
|
|
472
|
+
"type": "string",
|
|
473
|
+
"mutable": false,
|
|
474
|
+
"complexType": {
|
|
475
|
+
"original": "string",
|
|
476
|
+
"resolved": "string",
|
|
477
|
+
"references": {}
|
|
478
|
+
},
|
|
479
|
+
"required": false,
|
|
480
|
+
"optional": false,
|
|
481
|
+
"docs": {
|
|
482
|
+
"tags": [],
|
|
483
|
+
"text": "I18n namespace inherited by this tree's children (their own namespace\nwins). Resolved at runtime from the `i18n-namespace` attribute by the\nnearest ancestor lookup in `withTranslation`; the tree renders no\ntranslated text itself. Declared so the attribute is part of the typed\npublic API rather than a bare DOM attribute."
|
|
484
|
+
},
|
|
485
|
+
"getter": false,
|
|
486
|
+
"setter": false,
|
|
487
|
+
"reflect": true,
|
|
488
|
+
"attribute": "i18n-namespace"
|
|
489
|
+
},
|
|
471
490
|
"showOperators": {
|
|
472
491
|
"type": "string",
|
|
473
492
|
"mutable": false,
|
|
@@ -23,8 +23,7 @@ export class EditorCompanion {
|
|
|
23
23
|
if (this.distinctCache.has(cacheKey)) {
|
|
24
24
|
return Promise.resolve(this.distinctCache.get(cacheKey));
|
|
25
25
|
}
|
|
26
|
-
|
|
27
|
-
const result = this.distinct(this.stores.datasources.get(dataSourceName) || [], key);
|
|
26
|
+
const result = this.distinct(this.queryRows(dataSourceName), key);
|
|
28
27
|
this.distinctCache.set(cacheKey, result);
|
|
29
28
|
return Promise.resolve(result);
|
|
30
29
|
}
|
|
@@ -33,13 +32,21 @@ export class EditorCompanion {
|
|
|
33
32
|
if (this.distinctCache.has(cacheKey)) {
|
|
34
33
|
return Promise.resolve(this.distinctCache.get(cacheKey));
|
|
35
34
|
}
|
|
36
|
-
|
|
37
|
-
const result = this.distinct(this.stores.datasets.get(datasetName) || [], key);
|
|
35
|
+
const result = this.distinct(this.queryRows(datasetName), key);
|
|
38
36
|
this.distinctCache.set(cacheKey, result);
|
|
39
37
|
return Promise.resolve(result);
|
|
40
38
|
}
|
|
41
39
|
render() {
|
|
42
|
-
return h(Fragment, { key: '
|
|
40
|
+
return h(Fragment, { key: '35a8fdaa36fb5f9b042d1fad904f9b54a58ba79c' });
|
|
41
|
+
}
|
|
42
|
+
/** Materialize a table or view from the shared db, returning [] when it doesn't exist yet. */
|
|
43
|
+
queryRows(name) {
|
|
44
|
+
try {
|
|
45
|
+
return this.stores.db.db.exec(`SELECT * FROM \`${name}\``);
|
|
46
|
+
}
|
|
47
|
+
catch (_e) {
|
|
48
|
+
return [];
|
|
49
|
+
}
|
|
43
50
|
}
|
|
44
51
|
distinct(data, key) {
|
|
45
52
|
return [...new Set(data.map((d) => d[key]))].filter((v) => v !== null && v !== undefined);
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-context isolated AlaSQL database with a tiny pub/sub for table/view
|
|
3
|
+
* data changes.
|
|
4
|
+
*
|
|
5
|
+
* Each `<bn-context>` owns one `ScopedDb`. `<bn-datasource>` and the static/
|
|
6
|
+
* URL branches of `<bn-dataset>` register tables; the SQL branch of
|
|
7
|
+
* `<bn-dataset>` registers views. Consumer components subscribe by name and
|
|
8
|
+
* re-render when the producer calls `notify(name)`.
|
|
9
|
+
*
|
|
10
|
+
* @module context/scopedDb
|
|
11
|
+
*/
|
|
12
|
+
import alasql from "alasql";
|
|
13
|
+
import { DateTime } from "luxon";
|
|
14
|
+
/**
|
|
15
|
+
* Builds a SQL FROM-clause expression for a dataset, optionally filtered.
|
|
16
|
+
*
|
|
17
|
+
* Helpers (DataQuery, Table, StructureChart, TimeChart, dataAnalyzer) embed
|
|
18
|
+
* this in their queries instead of accepting `[data]` array parameters, so
|
|
19
|
+
* alasql doesn't have to ingest a fresh table on every call.
|
|
20
|
+
*/
|
|
21
|
+
export function buildFromExpr(tableName, filter) {
|
|
22
|
+
if (filter != null && filter.length > 0) {
|
|
23
|
+
return `(SELECT * FROM \`${tableName}\` WHERE ${filter}) AS __src`;
|
|
24
|
+
}
|
|
25
|
+
return `\`${tableName}\``;
|
|
26
|
+
}
|
|
27
|
+
/** Coerces an unknown value into a Luxon `DateTime`, or `undefined` if it can't be parsed. */
|
|
28
|
+
function toDateTime(value) {
|
|
29
|
+
if (value == null)
|
|
30
|
+
return undefined;
|
|
31
|
+
if (typeof value === "string") {
|
|
32
|
+
const dt = DateTime.fromISO(value);
|
|
33
|
+
return dt.isValid ? dt : undefined;
|
|
34
|
+
}
|
|
35
|
+
if (typeof value === "number") {
|
|
36
|
+
const dt = DateTime.fromMillis(value);
|
|
37
|
+
return dt.isValid ? dt : undefined;
|
|
38
|
+
}
|
|
39
|
+
// Already a DateTime-shaped object.
|
|
40
|
+
if (typeof value.isValid === "boolean") {
|
|
41
|
+
const dt = value;
|
|
42
|
+
return dt.isValid ? dt : undefined;
|
|
43
|
+
}
|
|
44
|
+
return undefined;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* AlaSQL custom functions (UDFs) live on the `alasql.fn` global, not per-DB.
|
|
48
|
+
* Register them once at module load — multiple contexts share the registrations.
|
|
49
|
+
*
|
|
50
|
+
* Signatures are widened to `(...x: unknown[]) => unknown` to satisfy alasql's
|
|
51
|
+
* `userDefinedFunction` type; argument validation happens inside each UDF.
|
|
52
|
+
*/
|
|
53
|
+
let udfsRegistered = false;
|
|
54
|
+
function registerUdfs() {
|
|
55
|
+
if (udfsRegistered)
|
|
56
|
+
return;
|
|
57
|
+
udfsRegistered = true;
|
|
58
|
+
alasql.fn.transformOperator = ((a) => (a === "-" ? -1 : 1));
|
|
59
|
+
alasql.fn.normalizeDate = ((date, normalizationLevel, _locale) => {
|
|
60
|
+
const dt = toDateTime(date);
|
|
61
|
+
if (!dt)
|
|
62
|
+
return undefined;
|
|
63
|
+
return dt.startOf(normalizationLevel);
|
|
64
|
+
});
|
|
65
|
+
// Custom aggregate collecting unique values per group, used by bn-table attribute
|
|
66
|
+
// expressions like set(_leiter). alasql stages: 1 = init, 2 = accumulate, 3 = finalize.
|
|
67
|
+
alasql.aggr.SETAGG = (value, accumulator, stage) => {
|
|
68
|
+
if (stage === 1) {
|
|
69
|
+
return value == null ? [] : [value];
|
|
70
|
+
}
|
|
71
|
+
const acc = accumulator;
|
|
72
|
+
if (stage === 2) {
|
|
73
|
+
if (value != null && !acc.includes(value))
|
|
74
|
+
acc.push(value);
|
|
75
|
+
return acc;
|
|
76
|
+
}
|
|
77
|
+
return acc.join(", ");
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
/** Creates a fresh isolated database with its own subscriber map. */
|
|
81
|
+
export function createScopedDb() {
|
|
82
|
+
registerUdfs();
|
|
83
|
+
const db = new alasql.Database();
|
|
84
|
+
const subscribers = new Map();
|
|
85
|
+
return {
|
|
86
|
+
db,
|
|
87
|
+
subscribe(name, cb) {
|
|
88
|
+
let set = subscribers.get(name);
|
|
89
|
+
if (!set) {
|
|
90
|
+
set = new Set();
|
|
91
|
+
subscribers.set(name, set);
|
|
92
|
+
}
|
|
93
|
+
set.add(cb);
|
|
94
|
+
return () => {
|
|
95
|
+
const s = subscribers.get(name);
|
|
96
|
+
if (!s)
|
|
97
|
+
return;
|
|
98
|
+
s.delete(cb);
|
|
99
|
+
if (s.size === 0)
|
|
100
|
+
subscribers.delete(name);
|
|
101
|
+
};
|
|
102
|
+
},
|
|
103
|
+
notify(name) {
|
|
104
|
+
const set = subscribers.get(name);
|
|
105
|
+
if (!set)
|
|
106
|
+
return;
|
|
107
|
+
for (const cb of set) {
|
|
108
|
+
try {
|
|
109
|
+
cb();
|
|
110
|
+
}
|
|
111
|
+
catch (e) {
|
|
112
|
+
console.error(`[bn] subscriber for "${name}" threw`, e);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
hasTable(name) {
|
|
117
|
+
var _a;
|
|
118
|
+
return ((_a = db.tables) === null || _a === void 0 ? void 0 : _a[name]) != null;
|
|
119
|
+
},
|
|
120
|
+
hasView(name) {
|
|
121
|
+
var _a;
|
|
122
|
+
// alasql stores views in db.views (separate from db.tables)
|
|
123
|
+
// @ts-ignore - views is not in the public typings
|
|
124
|
+
return ((_a = db.views) === null || _a === void 0 ? void 0 : _a[name]) != null;
|
|
125
|
+
},
|
|
126
|
+
};
|
|
127
|
+
}
|
|
@@ -1,3 +1,30 @@
|
|
|
1
|
+
import { XY_SERIES_PALETTE } from "../utils/xy/SeriesPalette";
|
|
2
|
+
const xyChartStyleDefaults = () => ({
|
|
3
|
+
scaleFactors: {
|
|
4
|
+
pointRadius: 0.4,
|
|
5
|
+
bubbleMaxRadius: 3.2,
|
|
6
|
+
bubbleMinRadius: 0.35,
|
|
7
|
+
axisTickLength: 0.35,
|
|
8
|
+
labelToMark: 0.3,
|
|
9
|
+
legendSwatch: 0.9,
|
|
10
|
+
panelGap: 1.6,
|
|
11
|
+
refLineWidth: 1,
|
|
12
|
+
gridLineWidth: 1,
|
|
13
|
+
},
|
|
14
|
+
axisStyles: {
|
|
15
|
+
ac: { stroke: "#A6A6A6", fill: "#A6A6A6", width: 1 },
|
|
16
|
+
fc: { stroke: "#808080", fill: "#808080", width: 1 },
|
|
17
|
+
pp: { stroke: "#D9D9D9", fill: "#D9D9D9", width: 1 },
|
|
18
|
+
pl: { stroke: "#EFEFEF", fill: "#EFEFEF", width: 1 },
|
|
19
|
+
},
|
|
20
|
+
seriesColors: [...XY_SERIES_PALETTE],
|
|
21
|
+
padding: {
|
|
22
|
+
top: 10,
|
|
23
|
+
left: 10,
|
|
24
|
+
right: 10,
|
|
25
|
+
bottom: 10,
|
|
26
|
+
},
|
|
27
|
+
});
|
|
1
28
|
export const SYSTEM_STYLE_DEFAULTS = {
|
|
2
29
|
global: {
|
|
3
30
|
fontFamily: "'Noto Sans', sans-serif",
|
|
@@ -92,6 +119,46 @@ export const SYSTEM_STYLE_DEFAULTS = {
|
|
|
92
119
|
bottom: 10,
|
|
93
120
|
},
|
|
94
121
|
},
|
|
122
|
+
"bn-chart-scatter": xyChartStyleDefaults(),
|
|
123
|
+
"bn-chart-bubble": xyChartStyleDefaults(),
|
|
124
|
+
"bn-chart-bullet": {
|
|
125
|
+
scaleFactors: {
|
|
126
|
+
rowHeight: 1.9,
|
|
127
|
+
barHeight: 0.66,
|
|
128
|
+
varianceHeight: 0.4,
|
|
129
|
+
targetTickHeight: 1.1,
|
|
130
|
+
targetLineWidth: 2,
|
|
131
|
+
axisLineWidth: 1,
|
|
132
|
+
labelToBar: 0.3,
|
|
133
|
+
labelToAxis: 0.3,
|
|
134
|
+
axisTickLength: 0.35,
|
|
135
|
+
tickStripHeight: 1.2,
|
|
136
|
+
},
|
|
137
|
+
axisStyles: {
|
|
138
|
+
ac: { stroke: "#121212", fill: "#121212", width: 0.1 },
|
|
139
|
+
fc: { stroke: "#121212", fill: "#ffffff", width: 0.1, dasharray: "10 5 5 5" },
|
|
140
|
+
pp: { stroke: "#606060", fill: "#606060", width: 0.1 },
|
|
141
|
+
pl: { stroke: "#121212", fill: "#ffffff", width: 0.1 },
|
|
142
|
+
},
|
|
143
|
+
barStyles: {
|
|
144
|
+
ac: { stroke: "#404040", fill: "#404040", width: 0.1 },
|
|
145
|
+
fc: { stroke: "#404040", fill: "#ffffff", width: 0.5, dasharray: "4 3" },
|
|
146
|
+
pp: { stroke: "#A6A6A6", fill: "#A6A6A6", width: 0.1 },
|
|
147
|
+
pl: { stroke: "#404040", fill: "#ffffff", width: 0.1 },
|
|
148
|
+
},
|
|
149
|
+
varianceStyles: {
|
|
150
|
+
pos: { stroke: "#008f96", fill: "#008f96", width: 0.1 },
|
|
151
|
+
neg: { stroke: "#ff0000", fill: "#ff0000", width: 0.1 },
|
|
152
|
+
neu: { stroke: "#808080", fill: "#808080", width: 0.1 },
|
|
153
|
+
},
|
|
154
|
+
rangeColors: ["#D9D9D9", "#EFEFEF"],
|
|
155
|
+
padding: {
|
|
156
|
+
top: 10,
|
|
157
|
+
left: 10,
|
|
158
|
+
right: 10,
|
|
159
|
+
bottom: 10,
|
|
160
|
+
},
|
|
161
|
+
},
|
|
95
162
|
"bn-tree": {
|
|
96
163
|
edgeColor: "#404040",
|
|
97
164
|
edgeWidth: 1,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Factory that creates a fresh set of all
|
|
2
|
+
* Factory that creates a fresh set of all 9 `@stencil/store` instances.
|
|
3
3
|
*
|
|
4
4
|
* Called once per `<bn-context>` element so that each context owns isolated
|
|
5
5
|
* reactive state. The returned object satisfies the {@link ScopedStores} interface.
|
|
@@ -9,9 +9,10 @@
|
|
|
9
9
|
import { createStore } from "@stencil/store";
|
|
10
10
|
import { SYSTEM_STYLE_DEFAULTS } from "./componentStyles";
|
|
11
11
|
import { SYSTEM_I18N_DEFAULTS } from "./internationalization";
|
|
12
|
+
import { SYSTEM_RULESET_DEFAULTS } from "./ruleSets";
|
|
13
|
+
import { createScopedDb } from "../context/scopedDb";
|
|
12
14
|
export function createScopedStores() {
|
|
13
|
-
const
|
|
14
|
-
const datasets = createStore({});
|
|
15
|
+
const db = createScopedDb();
|
|
15
16
|
const datasetsMeta = createStore({});
|
|
16
17
|
const componentStyles = createStore({
|
|
17
18
|
_system: SYSTEM_STYLE_DEFAULTS,
|
|
@@ -19,13 +20,18 @@ export function createScopedStores() {
|
|
|
19
20
|
const internationalization = createStore(Object.assign({}, SYSTEM_I18N_DEFAULTS));
|
|
20
21
|
const assets = createStore({});
|
|
21
22
|
const context = createStore({ locale: "en" });
|
|
23
|
+
const scalingGroups = createStore({});
|
|
24
|
+
const ruleSets = createStore({
|
|
25
|
+
_system: SYSTEM_RULESET_DEFAULTS,
|
|
26
|
+
});
|
|
22
27
|
return {
|
|
23
|
-
|
|
24
|
-
datasets,
|
|
28
|
+
db,
|
|
25
29
|
datasetsMeta,
|
|
26
30
|
componentStyles,
|
|
27
31
|
internationalization,
|
|
28
32
|
assets,
|
|
29
33
|
context,
|
|
34
|
+
scalingGroups,
|
|
35
|
+
ruleSets,
|
|
30
36
|
};
|
|
31
37
|
}
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
* **Token pattern**: Variance symbols use `{%}` as a placeholder for the
|
|
9
9
|
* scenario abbreviation. For example, `"Δ{%}"` becomes `"ΔPY"` when the
|
|
10
10
|
* comparison scenario is "PY". The `{%}` replacement is performed at render
|
|
11
|
-
* time by
|
|
11
|
+
* time by `Formatter.translateScenarioLabel` — not by `withTranslation`,
|
|
12
|
+
* which only interpolates `{{mustache}}` placeholders.
|
|
12
13
|
*
|
|
13
14
|
* @module stores/internationalization
|
|
14
15
|
*/
|
|
@@ -42,6 +43,42 @@ const globalLabelKeys = [
|
|
|
42
43
|
"ibcssymbol_delta_ac_relative",
|
|
43
44
|
"ibcssymbol_delta_generic_relative",
|
|
44
45
|
];
|
|
46
|
+
/**
|
|
47
|
+
* Message keys shared by both XY charts (`bn-chart-scatter`,
|
|
48
|
+
* `bn-chart-bubble`): axis captions, legend labels, the no-data text, and
|
|
49
|
+
* one message per warning/error code the charts can raise (`{{…}}`
|
|
50
|
+
* placeholders are interpolated by `withTranslation`).
|
|
51
|
+
*/
|
|
52
|
+
const xyChartKeysDe = {
|
|
53
|
+
axis: { in: "in" },
|
|
54
|
+
legend: { title: "" },
|
|
55
|
+
"no-data": "==Keine Daten==",
|
|
56
|
+
"xy-prop-json": "{{prop}}: ungültiges JSON.",
|
|
57
|
+
"xy-measure-invalid": "{{prop}}: '{{measure}}' ist weder eine Szenario-Spalte noch ein Varianz-Token.",
|
|
58
|
+
"xy-family-mixed": "Alle Kennzahlen müssen zur selben Szenario-Familie gehören (gefunden: {{families}}).",
|
|
59
|
+
"xy-level-order": "Facet-, Serien- und Punktebene müssen in der Hierarchie streng absteigen ({{detail}}).",
|
|
60
|
+
"xy-duplicate-point": "{{count}} doppelte Punkt-Identität(en) verworfen (erste Zeile gewinnt): {{names}}. Im DataSet-SQL aggregieren.",
|
|
61
|
+
"xy-point-clipped": "{{count}} Punkt(e) außerhalb des expliziten min/max ausgeschlossen.",
|
|
62
|
+
"xy-variance-nodata": "{{count}} Zeile(n) ohne Varianzdaten ausgeschlossen.",
|
|
63
|
+
"xy-label-unknown": "Unbekannte Label-Namen: {{names}}.",
|
|
64
|
+
"xy-series-overflow": "Mehr Serien als Palettenfarben; Farben wiederholen sich aufgehellt.",
|
|
65
|
+
"xy-point-budget": "{{count}} Punkte überschreiten das Budget von 5000 Punkten; 'limit' erwägen.",
|
|
66
|
+
};
|
|
67
|
+
const xyChartKeysEn = {
|
|
68
|
+
axis: { in: "in" },
|
|
69
|
+
legend: { title: "" },
|
|
70
|
+
"no-data": "==No Data==",
|
|
71
|
+
"xy-prop-json": "{{prop}}: invalid JSON.",
|
|
72
|
+
"xy-measure-invalid": "{{prop}}: '{{measure}}' is neither a scenario column nor a variance token.",
|
|
73
|
+
"xy-family-mixed": "All measures must share one scenario family (found: {{families}}).",
|
|
74
|
+
"xy-level-order": "Facet, series, and point levels must strictly descend in the hierarchy ({{detail}}).",
|
|
75
|
+
"xy-duplicate-point": "{{count}} duplicate point identitie(s) dropped (first row wins): {{names}}. Aggregate in the DataSet SQL.",
|
|
76
|
+
"xy-point-clipped": "{{count}} point(s) outside the explicit min/max excluded.",
|
|
77
|
+
"xy-variance-nodata": "{{count}} row(s) without variance data excluded.",
|
|
78
|
+
"xy-label-unknown": "Unknown label name(s): {{names}}.",
|
|
79
|
+
"xy-series-overflow": "More series than palette colors; colors repeat with a tint step.",
|
|
80
|
+
"xy-point-budget": "{{count}} points exceed the 5000-point budget; consider 'limit'.",
|
|
81
|
+
};
|
|
45
82
|
const de = flattenObject({
|
|
46
83
|
global: {
|
|
47
84
|
ac1: "AC",
|
|
@@ -72,7 +109,24 @@ const de = flattenObject({
|
|
|
72
109
|
CONNECTOR_WS: " und ",
|
|
73
110
|
in: "in",
|
|
74
111
|
},
|
|
75
|
-
"bn-chart": {},
|
|
112
|
+
"bn-chart-time": { "no-data": "==Keine Daten==" },
|
|
113
|
+
"bn-chart-structure": { "no-data": "==Keine Daten==", REST: "REST" },
|
|
114
|
+
"bn-chart-scatter": Object.assign(Object.assign({}, xyChartKeysDe), { "xy-iso-domain": "Iso-Linien benötigen einen strikt positiven Wertebereich auf beiden Achsen; übersprungen." }),
|
|
115
|
+
"bn-chart-bubble": Object.assign(Object.assign({}, xyChartKeysDe), { legend: Object.assign(Object.assign({}, xyChartKeysDe.legend), { size: "Größe", compare: "Szenarien" }), "xy-compare-variance": "compareWith kann nicht mit Varianz-Kennzahlen auf den Achsen kombiniert werden.", "bubble-size-negative": "{{count}} Blase(n) mit negativem Größenwert ausgeschlossen.", "bubble-share-range": "{{count}} Anteilswert(e) außerhalb [0,1] wurden begrenzt.", "bubble-scale-group-unknown": "size.group '{{group}}' verweist auf keine bn-scaling-group im Kontext.", "bubble-scale-overflow": "{{count}} gruppenskalierte Blase(n) überschreiten das Panel; in Originalgröße gezeichnet." }),
|
|
116
|
+
"bn-chart-bullet": {
|
|
117
|
+
axis: { in: "in" },
|
|
118
|
+
"no-data": "==Keine Daten==",
|
|
119
|
+
target: "Ziel",
|
|
120
|
+
"bullet-prop-json": "{{prop}}: ungültiges JSON.",
|
|
121
|
+
"bullet-measure-invalid": "{{prop}}: '{{measure}}' ist keine Szenario-Spalte (ac1…pl4).",
|
|
122
|
+
"bullet-measure-same": "actual und target müssen unterschiedliche Szenarien sein ('{{measure}}').",
|
|
123
|
+
"bullet-target-none": "Kein Ziel-Szenario gefunden (pl1/pp1/fc1); nur Ist-Balken werden gezeichnet.",
|
|
124
|
+
"bullet-target-missing": "{{count}} Zeile(n) ohne Zielwert; Varianz und Marker entfallen.",
|
|
125
|
+
"bullet-target-invalid": "{{count}} Zeile(n) mit Ziel ≤ 0 können nicht normalisiert werden; Balken entfällt.",
|
|
126
|
+
"bullet-mixed-operation": "{{count}} KPI-Gruppe(n) mischen '+'- und '-'-Zeilen; Sentiment fällt auf '+' zurück.",
|
|
127
|
+
"bullet-ranges-ignored": 'ranges: im normalisierten (IBCS-)Modus ignoriert; normalize="none" setzen.',
|
|
128
|
+
"bullet-ranges-invalid": "ranges: erwartet bis zu 2 aufsteigende positive Zielanteile ({{detail}}).",
|
|
129
|
+
},
|
|
76
130
|
"bn-table": {
|
|
77
131
|
in: "in",
|
|
78
132
|
category: " ",
|
|
@@ -81,6 +135,7 @@ const de = flattenObject({
|
|
|
81
135
|
part_of: "in % von",
|
|
82
136
|
SUM_TOTAL: "❖",
|
|
83
137
|
REST: "REST",
|
|
138
|
+
"no-data": "==Keine Daten==",
|
|
84
139
|
},
|
|
85
140
|
});
|
|
86
141
|
const en = flattenObject({
|
|
@@ -113,14 +168,33 @@ const en = flattenObject({
|
|
|
113
168
|
CONNECTOR_WS: " and ",
|
|
114
169
|
in: "in",
|
|
115
170
|
},
|
|
116
|
-
"bn-chart": {},
|
|
171
|
+
"bn-chart-time": { "no-data": "==No Data==" },
|
|
172
|
+
"bn-chart-structure": { "no-data": "==No Data==", REST: "REST" },
|
|
173
|
+
"bn-chart-scatter": Object.assign(Object.assign({}, xyChartKeysEn), { "xy-iso-domain": "Iso-lines need a strictly positive domain on both axes; skipped." }),
|
|
174
|
+
"bn-chart-bubble": Object.assign(Object.assign({}, xyChartKeysEn), { legend: Object.assign(Object.assign({}, xyChartKeysEn.legend), { size: "Size", compare: "Scenarios" }), "xy-compare-variance": "compareWith cannot be combined with variance measures on the axes.", "bubble-size-negative": "{{count}} bubble(s) with a negative size value excluded.", "bubble-share-range": "{{count}} share value(s) outside [0,1] were clamped.", "bubble-scale-group-unknown": "size.group '{{group}}' names no bn-scaling-group in scope.", "bubble-scale-overflow": "{{count}} group-scaled bubble(s) exceed the panel; rendered true-size." }),
|
|
175
|
+
"bn-chart-bullet": {
|
|
176
|
+
axis: { in: "in" },
|
|
177
|
+
"no-data": "==No Data==",
|
|
178
|
+
target: "Target",
|
|
179
|
+
"bullet-prop-json": "{{prop}}: invalid JSON.",
|
|
180
|
+
"bullet-measure-invalid": "{{prop}}: '{{measure}}' is not a scenario column (ac1…pl4).",
|
|
181
|
+
"bullet-measure-same": "actual and target must map different scenarios ('{{measure}}').",
|
|
182
|
+
"bullet-target-none": "No target scenario found (pl1/pp1/fc1); rendering actual bars only.",
|
|
183
|
+
"bullet-target-missing": "{{count}} row(s) without a target value; variance and marker omitted.",
|
|
184
|
+
"bullet-target-invalid": "{{count}} row(s) with target ≤ 0 cannot be normalized; bar omitted.",
|
|
185
|
+
"bullet-mixed-operation": "{{count}} KPI group(s) mix '+' and '-' rows; sentiment defaults to '+'.",
|
|
186
|
+
"bullet-ranges-ignored": 'ranges: ignored in normalized (IBCS) mode; set normalize="none".',
|
|
187
|
+
"bullet-ranges-invalid": "ranges: expected up to 2 ascending positive fractions of the target ({{detail}}).",
|
|
188
|
+
},
|
|
117
189
|
"bn-table": {
|
|
190
|
+
in: "in",
|
|
118
191
|
category: " ",
|
|
119
192
|
operation: " ",
|
|
120
193
|
there_of: "there of",
|
|
121
194
|
part_of: "in % of",
|
|
122
195
|
SUM_TOTAL: "❖",
|
|
123
196
|
REST: "REST",
|
|
197
|
+
"no-data": "==No Data==",
|
|
124
198
|
},
|
|
125
199
|
});
|
|
126
200
|
const BN_INTERNATIONALIZATION_KEYS = Object.keys(de || {});
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reactive store for user-adjustable IBCS visualization rule sets.
|
|
3
|
+
*
|
|
4
|
+
* Rule sets are resolved through a three-layer merge:
|
|
5
|
+
* 1. `_system` -- built-in IBCS defaults (scenario names, color and sort indices)
|
|
6
|
+
* 2. `_default` -- optional user-level overrides applied globally
|
|
7
|
+
* 3. Named rule sets -- overrides referenced by the `ruleset` attribute
|
|
8
|
+
*
|
|
9
|
+
* The `withRuleSet` mixin merges these layers and the resulting config seeds
|
|
10
|
+
* `IBCSRuleSet`, which expands each scenario prefix to its 1-4 variants.
|
|
11
|
+
*
|
|
12
|
+
* @module stores/ruleSets
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Built-in IBCS rule-set defaults per IBCS notation standard v1.2.
|
|
16
|
+
* Sort order: PP(100s) < PL(200s) < FC(300s) < AC(400s); variance prefixes
|
|
17
|
+
* add +1000 (absolute) or +2000 (relative).
|
|
18
|
+
*/
|
|
19
|
+
export const SYSTEM_RULESET_DEFAULTS = {
|
|
20
|
+
scenarios: {
|
|
21
|
+
ac: { name: "AC", colorIndex: 10, sortIndex: 400 },
|
|
22
|
+
fc: { name: "FC", colorIndex: 30, sortIndex: 300 },
|
|
23
|
+
pl: { name: "PL", colorIndex: 50, sortIndex: 200 },
|
|
24
|
+
bu: { name: "BU", colorIndex: 50, sortIndex: 200 },
|
|
25
|
+
pp: { name: "PP", colorIndex: 20, sortIndex: 100 },
|
|
26
|
+
py: { name: "PY", colorIndex: 20, sortIndex: 100 },
|
|
27
|
+
dac: { name: "dAC", colorIndex: 10, sortIndex: 1400 },
|
|
28
|
+
dfc: { name: "dFC", colorIndex: 30, sortIndex: 1300 },
|
|
29
|
+
dpl: { name: "dPL", colorIndex: 50, sortIndex: 1200 },
|
|
30
|
+
dbu: { name: "dBU", colorIndex: 50, sortIndex: 1200 },
|
|
31
|
+
dpp: { name: "dPP", colorIndex: 20, sortIndex: 1100 },
|
|
32
|
+
dpy: { name: "dPY", colorIndex: 20, sortIndex: 1100 },
|
|
33
|
+
drac: { name: "drAC", colorIndex: 10, sortIndex: 2400 },
|
|
34
|
+
drfc: { name: "drFC", colorIndex: 30, sortIndex: 2300 },
|
|
35
|
+
drpl: { name: "drPL", colorIndex: 50, sortIndex: 2200 },
|
|
36
|
+
drbu: { name: "drBU", colorIndex: 50, sortIndex: 2200 },
|
|
37
|
+
drpp: { name: "drPP", colorIndex: 20, sortIndex: 2100 },
|
|
38
|
+
drpy: { name: "drPY", colorIndex: 20, sortIndex: 2100 },
|
|
39
|
+
},
|
|
40
|
+
fallback: {
|
|
41
|
+
name: "Series",
|
|
42
|
+
group: "Series",
|
|
43
|
+
colorIndex: 10,
|
|
44
|
+
sortIndex: 120,
|
|
45
|
+
},
|
|
46
|
+
};
|