@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
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { IAdapter } from "../../../../utils/helper/IAdapter";
|
|
2
|
+
import { FontStyle, FontStyleAdapter } from "../../../../utils/model/styles/FontStyle";
|
|
3
|
+
import { Padding, PaddingAdapter } from "../../../../utils/model/styles/Padding";
|
|
4
|
+
import { SVGStyleGroup, SVGStyleGroupAdapter } from "../../../../utils/model/styles/SVGStyleGroup";
|
|
5
|
+
import { SVGVariancesStyleGroup, SVGVariancesStyleGroupAdapter } from "../../../../utils/model/styles/SVGVariancesStyleGroup";
|
|
6
|
+
/**
|
|
7
|
+
* Proportional scale factors for bullet graph elements.
|
|
8
|
+
*
|
|
9
|
+
* All values except the `*LineWidth` entries are expressed in **font-size
|
|
10
|
+
* multiples** (em-like units), so the chart scales uniformly when the base
|
|
11
|
+
* font size changes. Line widths are absolute pixel values (hairlines must
|
|
12
|
+
* not scale with the font).
|
|
13
|
+
*/
|
|
14
|
+
export declare class ScaleFactorsBulletChart {
|
|
15
|
+
/** Height of one KPI row. */
|
|
16
|
+
rowHeight: number;
|
|
17
|
+
/** Height of the actual-value bar. */
|
|
18
|
+
barHeight: number;
|
|
19
|
+
/** Height of the integrated variance bar overlay. */
|
|
20
|
+
varianceHeight: number;
|
|
21
|
+
/** Height of a per-row target tick (classic mode). */
|
|
22
|
+
targetTickHeight: number;
|
|
23
|
+
/** Stroke width of the shared target line, in pixels. */
|
|
24
|
+
targetLineWidth: number;
|
|
25
|
+
/** Stroke width of the baseline axis, in pixels. */
|
|
26
|
+
axisLineWidth: number;
|
|
27
|
+
/** Gap between a bar end and its value label. */
|
|
28
|
+
labelToBar: number;
|
|
29
|
+
/** Gap between the category label column and the baseline axis. */
|
|
30
|
+
labelToAxis: number;
|
|
31
|
+
/** Length of axis tick marks (classic mode). */
|
|
32
|
+
axisTickLength: number;
|
|
33
|
+
/** Height of the per-row tick-label strip (classic mode). */
|
|
34
|
+
tickStripHeight: number;
|
|
35
|
+
constructor();
|
|
36
|
+
}
|
|
37
|
+
/** Converts untyped JSON into a validated {@link ScaleFactorsBulletChart}. */
|
|
38
|
+
export declare class ScaleFactorsBulletChartAdapter implements IAdapter<ScaleFactorsBulletChart> {
|
|
39
|
+
adapt(data: Record<string, unknown>): ScaleFactorsBulletChart;
|
|
40
|
+
default(): ScaleFactorsBulletChart;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Aggregates all style configuration for a bullet graph: scale factors,
|
|
44
|
+
* fonts, scenario colors, variance colors, range-band grays, and padding.
|
|
45
|
+
*
|
|
46
|
+
* The analog of {@link StructureChartStyle} with `rangeColors` (the max two
|
|
47
|
+
* qualitative band grays) in place of `stackColors` and no fill patterns
|
|
48
|
+
* (the FC target treatment uses a dashed stroke, not hatching).
|
|
49
|
+
*/
|
|
50
|
+
export declare class BulletChartStyle {
|
|
51
|
+
scaleFactors: ScaleFactorsBulletChart;
|
|
52
|
+
fontStyles: FontStyle;
|
|
53
|
+
axisStyles: SVGStyleGroup;
|
|
54
|
+
barStyles: SVGStyleGroup;
|
|
55
|
+
varianceStyles: SVGVariancesStyleGroup;
|
|
56
|
+
padding: Padding;
|
|
57
|
+
rangeColors: string[];
|
|
58
|
+
constructor(scaleFactors: ScaleFactorsBulletChart, fontStyles: FontStyle, axisStyles: SVGStyleGroup, barStyles: SVGStyleGroup, varianceStyles: SVGVariancesStyleGroup, padding: Padding);
|
|
59
|
+
}
|
|
60
|
+
/** Adapts raw componentStyle JSON into a BulletChartStyle, falling back to defaults for missing properties. */
|
|
61
|
+
export declare class BulletChartStylesAdapter implements IAdapter<BulletChartStyle> {
|
|
62
|
+
private scaleFactorsBulletChartAdapter;
|
|
63
|
+
private fontStyleAdapter;
|
|
64
|
+
private svgStyleGroupAdapter;
|
|
65
|
+
private svgVariancesStyleGroupAdapter;
|
|
66
|
+
private paddingAdapter;
|
|
67
|
+
constructor(scaleFactorsBulletChartAdapter: ScaleFactorsBulletChartAdapter, fontStyleAdapter: FontStyleAdapter, svgStyleGroupAdapter: SVGStyleGroupAdapter, svgVariancesStyleGroupAdapter: SVGVariancesStyleGroupAdapter, paddingAdapter: PaddingAdapter);
|
|
68
|
+
adapt(data: Record<string, unknown>): BulletChartStyle;
|
|
69
|
+
default(): BulletChartStyle;
|
|
70
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { SpecResult } from "../../../../utils/xy/model/AxisConfig";
|
|
2
|
+
/**
|
|
3
|
+
* Parsed shapes of the bullet graph's structured object props (spec: the
|
|
4
|
+
* JSON attribute forms of `actual`, `target`, `labels`, and the JSON array
|
|
5
|
+
* form of `ranges`). The facade parses and validates the raw attributes once
|
|
6
|
+
* and passes these typed objects to the inner element, following the
|
|
7
|
+
* `AxisConfig` precedent of the XY charts.
|
|
8
|
+
*/
|
|
9
|
+
/** Parsed `actual` / `target` prop. */
|
|
10
|
+
export interface BulletMeasureConfig {
|
|
11
|
+
/** Scenario-column token (`ac1`…`pl4`). Variance tokens are not allowed. */
|
|
12
|
+
measure: string;
|
|
13
|
+
label?: string;
|
|
14
|
+
unit?: string;
|
|
15
|
+
}
|
|
16
|
+
/** Parsed `labels` prop. */
|
|
17
|
+
export interface BulletLabelConfig {
|
|
18
|
+
show: "auto" | "none";
|
|
19
|
+
/** Decimal places of the value labels. */
|
|
20
|
+
decimals: number;
|
|
21
|
+
}
|
|
22
|
+
/** Result of parsing the raw `ranges` attribute. */
|
|
23
|
+
export interface ParsedRanges {
|
|
24
|
+
/** Ascending fractions of the target, at most two entries. */
|
|
25
|
+
ranges: number[];
|
|
26
|
+
parseError: boolean;
|
|
27
|
+
/** Human-readable problems that were repaired (unsorted, too many entries). */
|
|
28
|
+
issues: string[];
|
|
29
|
+
}
|
|
30
|
+
export declare function toBulletMeasureConfig(data: Record<string, unknown>): SpecResult<BulletMeasureConfig>;
|
|
31
|
+
export declare function toBulletLabelConfig(data: Record<string, unknown>, defaults: {
|
|
32
|
+
show: BulletLabelConfig["show"];
|
|
33
|
+
decimals: number;
|
|
34
|
+
}): SpecResult<BulletLabelConfig>;
|
|
35
|
+
/**
|
|
36
|
+
* Parses the raw `ranges` attribute value. A blank value yields no ranges
|
|
37
|
+
* without error. Anything else must be a JSON array of positive numbers —
|
|
38
|
+
* ascending fractions of the target, e.g. `[0.6, 0.9]`. `parseSpec` cannot
|
|
39
|
+
* be used here because it rejects top-level JSON arrays. Unsorted input is
|
|
40
|
+
* sorted and more than two entries are truncated; both repairs are reported
|
|
41
|
+
* as issues.
|
|
42
|
+
*/
|
|
43
|
+
export declare function parseRanges(raw: string | undefined | null): ParsedRanges;
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { AxisConfig, FacetConfig, LabelConfig, LegendConfig, SpecResult } from "../../utils/xy/model/AxisConfig";
|
|
2
|
+
import { GroupLevel, PointLevel } from "../../utils/xy/model/XYChartDataRow";
|
|
3
|
+
import { XYChartStyle } from "../../utils/xy/model/XYChartStyle";
|
|
4
|
+
/**
|
|
5
|
+
* SVG scattergram following IBCS template C09.
|
|
6
|
+
*
|
|
7
|
+
* Subscribes to a dataset (via `withDataset`) and renders an XY point cloud
|
|
8
|
+
* with series hues, selective labels, highlight bands, and hyperbolic
|
|
9
|
+
* iso-lines (`x·y = k`). The heavy SVG rendering is performed by the inner
|
|
10
|
+
* `ibcs-chart-scatter` element; this facade validates props, resolves
|
|
11
|
+
* auto-detected metadata, and computes styles.
|
|
12
|
+
*/
|
|
13
|
+
export declare class ChartScatter {
|
|
14
|
+
private element;
|
|
15
|
+
/** Active dataset name (the last subscribed dataset to fire `onUpdate`). */
|
|
16
|
+
private datasetName;
|
|
17
|
+
/** Bumped on every data update so Stencil re-renders even when the name is unchanged. */
|
|
18
|
+
private dataVersion;
|
|
19
|
+
private datasetMeta;
|
|
20
|
+
private appliedScaleFactor;
|
|
21
|
+
private readonly t;
|
|
22
|
+
private readonly componentStyle;
|
|
23
|
+
private readonly ruleSetConfig;
|
|
24
|
+
private readonly errors;
|
|
25
|
+
private layoutObserver;
|
|
26
|
+
/** Ids of currently-active blocking errors — the chart renders empty while any is set. */
|
|
27
|
+
private readonly activeErrors;
|
|
28
|
+
/**
|
|
29
|
+
* Name of a registered IBCS rule set (see `bn-ruleset`) used for scenario
|
|
30
|
+
* treatments and display names. Supports `"inherited-closest"` /
|
|
31
|
+
* `"inherited-page"` to take over the value from an ancestor
|
|
32
|
+
* `bn-layout-card` / `bn-layout-page`.
|
|
33
|
+
*/
|
|
34
|
+
ruleset?: string;
|
|
35
|
+
/**
|
|
36
|
+
* Custom chart title
|
|
37
|
+
*/
|
|
38
|
+
chartTitle: string;
|
|
39
|
+
/**
|
|
40
|
+
* AlaSQL WHERE clause fragment injected into the data query to filter
|
|
41
|
+
* rows before rendering (e.g. `"rowGroup = 'Revenue'"`).
|
|
42
|
+
*/
|
|
43
|
+
filter: string;
|
|
44
|
+
/**
|
|
45
|
+
* X axis mapping. JSON object (`AxisSpec`) or a bare measure token as
|
|
46
|
+
* shorthand: `{"measure":"ac1","label":"Margin","unit":"%","min":0,
|
|
47
|
+
* "max":40,"refLine":0.5,"highlight":{"from":30}}`. The measure is a
|
|
48
|
+
* scenario column (`ac1`…`pl4`) or a variance token (`d…`/`dr…`,
|
|
49
|
+
* sentiment suffix optional).
|
|
50
|
+
*/
|
|
51
|
+
x: string;
|
|
52
|
+
validateX(newValue: string): void;
|
|
53
|
+
/**
|
|
54
|
+
* Y axis mapping — same shape as `x`.
|
|
55
|
+
*/
|
|
56
|
+
y: string;
|
|
57
|
+
validateY(newValue: string): void;
|
|
58
|
+
/**
|
|
59
|
+
* Hyperbolic iso-lines `x·y = k` (IBCS 09C/09D). JSON object:
|
|
60
|
+
* `{"values":"auto"|[1,2,3],"label":"Gross profit","unit":"mUSD",
|
|
61
|
+
* "highlight":{"from":3}}`. Requires a strictly positive plot domain.
|
|
62
|
+
*/
|
|
63
|
+
iso: string;
|
|
64
|
+
validateIso(newValue: string): void;
|
|
65
|
+
/**
|
|
66
|
+
* Point identity level: `auto` (deepest populated level from the dataset
|
|
67
|
+
* meta), `category`, or `subcategory`.
|
|
68
|
+
*/
|
|
69
|
+
level: string;
|
|
70
|
+
validateLevel(newValue: string): void;
|
|
71
|
+
/**
|
|
72
|
+
* Series (color) grouping level: `auto` (parent of the point level),
|
|
73
|
+
* `rowgroup`, `category`, or `none` (single series).
|
|
74
|
+
*/
|
|
75
|
+
seriesLevel: string;
|
|
76
|
+
validateSeriesLevel(newValue: string): void;
|
|
77
|
+
/**
|
|
78
|
+
* Small-multiple panels (IBCS 10E/10F/10G style). JSON object:
|
|
79
|
+
* `{"level":"rowgroup"|"category","columns":6}`. The facet level must sit
|
|
80
|
+
* above the series level in the hierarchy.
|
|
81
|
+
*/
|
|
82
|
+
facet: string;
|
|
83
|
+
validateFacet(newValue: string): void;
|
|
84
|
+
/**
|
|
85
|
+
* Point labeling. JSON object: `{"points":"auto"|"none"|"all"|["VAB"],
|
|
86
|
+
* "max":12}` (IBCS requires selective, proximate labels).
|
|
87
|
+
*/
|
|
88
|
+
labels: string;
|
|
89
|
+
validateLabels(newValue: string): void;
|
|
90
|
+
/**
|
|
91
|
+
* Series-color legend. JSON object: `{"show":true,"position":"right"|"bottom"}`.
|
|
92
|
+
*/
|
|
93
|
+
legend: string;
|
|
94
|
+
validateLegend(newValue: string): void;
|
|
95
|
+
/**
|
|
96
|
+
* Plot aspect ratio as `"w:h"` (default `"16:9"`). XY charts have no
|
|
97
|
+
* data-driven height; this is the explicit height control.
|
|
98
|
+
*/
|
|
99
|
+
aspect: string;
|
|
100
|
+
validateAspect(newValue: string): void;
|
|
101
|
+
/**
|
|
102
|
+
* Maximum number of points per panel (0 = unlimited). Scatter keeps the
|
|
103
|
+
* first N rows in dataset order.
|
|
104
|
+
*/
|
|
105
|
+
limit: number;
|
|
106
|
+
validateLimit(newValue: number): void;
|
|
107
|
+
/**
|
|
108
|
+
* Font-size auto-fit: `""`/`auto` shrink to the parent width (with/without
|
|
109
|
+
* a warning), `none` disables, a number applies a fixed factor.
|
|
110
|
+
*/
|
|
111
|
+
scale?: string;
|
|
112
|
+
validateScale(newValue: string): void;
|
|
113
|
+
constructor();
|
|
114
|
+
componentWillLoad(): void;
|
|
115
|
+
private _autoScaleGuard;
|
|
116
|
+
private _lastObservedWidth;
|
|
117
|
+
componentDidRender(): void;
|
|
118
|
+
componentDidLoad(): void;
|
|
119
|
+
disconnectedCallback(): void;
|
|
120
|
+
/** Default label behavior differs between scatter (`auto`) and bubble (`all`). */
|
|
121
|
+
protected labelDefaults(): {
|
|
122
|
+
points: LabelConfig["points"];
|
|
123
|
+
values: boolean;
|
|
124
|
+
max: number;
|
|
125
|
+
};
|
|
126
|
+
/** Sets or clears a blocking error (type `error`) with a stable id. */
|
|
127
|
+
private setBlockingError;
|
|
128
|
+
private hasBlockingErrors;
|
|
129
|
+
/** Shared validator for the x/y axis props. */
|
|
130
|
+
protected validateAxisSpec(prop: "x" | "y" | "size" | "share", raw: string): void;
|
|
131
|
+
/** Shared validator for optional object props (iso/facet/labels/legend/…). */
|
|
132
|
+
protected validateObjectSpec<T>(prop: string, raw: string, shorthandKey: string | null, convert: (data: Record<string, unknown>) => SpecResult<T>): void;
|
|
133
|
+
/** Unknown sub-fields → warning, never error (forward compatibility). */
|
|
134
|
+
private reportSpecIssues;
|
|
135
|
+
protected prepareAxis(prop: "x" | "y", raw: string): AxisConfig | null;
|
|
136
|
+
private prepareIso;
|
|
137
|
+
protected prepareLabels(): LabelConfig;
|
|
138
|
+
protected prepareLegend(): LegendConfig;
|
|
139
|
+
protected prepareFacet(): FacetConfig | null;
|
|
140
|
+
/** Point identity level; `auto` resolves to the dataset's deepest populated level. */
|
|
141
|
+
protected preparePointLevel(): PointLevel;
|
|
142
|
+
/** Series level; `auto` resolves to the parent of the point level. */
|
|
143
|
+
protected prepareSeriesLevel(pointLevel: PointLevel): GroupLevel | null;
|
|
144
|
+
/**
|
|
145
|
+
* Cross-prop checks that need several parsed props at once: the scenario
|
|
146
|
+
* family of all mapped measures and the facet > series > point level
|
|
147
|
+
* order. Runs while preparing the template (stable-id add/remove).
|
|
148
|
+
*/
|
|
149
|
+
protected validateCrossProp(measures: (string | undefined)[], facet: FacetConfig | null): void;
|
|
150
|
+
private parseAspect;
|
|
151
|
+
protected prepareAspect(): number;
|
|
152
|
+
protected prepareLimit(): number;
|
|
153
|
+
/** Local i18n keys handed to the inner element (bubble adds its legend keys). */
|
|
154
|
+
protected i18nLocalKeys(): string[];
|
|
155
|
+
protected prepareI18n(): Map<string, string>;
|
|
156
|
+
protected prepareStyle(): XYChartStyle;
|
|
157
|
+
protected getEffectiveScaleFactor(): number;
|
|
158
|
+
private getFontStyles;
|
|
159
|
+
/** Facade-bound translator handed to the inner element for warning messages. */
|
|
160
|
+
private readonly translateForInner;
|
|
161
|
+
/**
|
|
162
|
+
* Dataset field map for the editor-companion: hierarchy fields plus the
|
|
163
|
+
* 16 scenario slots; descriptions of currently-mapped slots reflect the
|
|
164
|
+
* live mapping (e.g. `ac1 → "x: Margin"`).
|
|
165
|
+
*/
|
|
166
|
+
getDataStructure(): any;
|
|
167
|
+
/** Mapped measure-carrying configs by prop name (overridden by the bubble chart). */
|
|
168
|
+
protected mappedAxes(): Record<string, AxisConfig | null>;
|
|
169
|
+
protected dataStructureName(): string;
|
|
170
|
+
protected chartTemplate(): any;
|
|
171
|
+
render(): any;
|
|
172
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { RuleSetConfig } from "../../stores/ruleSets";
|
|
2
|
+
import { ErrorDispatcher } from "../../utils/withHasError";
|
|
3
|
+
import { AxisConfig, FacetConfig, IsoConfig, LabelConfig, LegendConfig } from "../../utils/xy/model/AxisConfig";
|
|
4
|
+
import { GroupLevel, PointLevel } from "../../utils/xy/model/XYChartDataRow";
|
|
5
|
+
import { XYChartStyle } from "../../utils/xy/model/XYChartStyle";
|
|
6
|
+
/**
|
|
7
|
+
* Inner presentational element of `bn-chart-scatter`: owns the
|
|
8
|
+
* {@link ScatterChart} orchestrator and emits its SVG string. All props
|
|
9
|
+
* arrive validated and parsed from the facade.
|
|
10
|
+
*/
|
|
11
|
+
export declare class IbcsChartScatter {
|
|
12
|
+
element: HTMLElement;
|
|
13
|
+
/** Name of the dataset (table or view in the scoped alasql database). */
|
|
14
|
+
tableName: string;
|
|
15
|
+
/** Bumped by the facade when the dataset changes; triggers re-render. */
|
|
16
|
+
dataVersion: number;
|
|
17
|
+
chartTitle: string;
|
|
18
|
+
x: AxisConfig;
|
|
19
|
+
y: AxisConfig;
|
|
20
|
+
iso: IsoConfig | null;
|
|
21
|
+
labels: LabelConfig;
|
|
22
|
+
legend: LegendConfig;
|
|
23
|
+
facet: FacetConfig | null;
|
|
24
|
+
pointLevel: PointLevel;
|
|
25
|
+
seriesLevel: GroupLevel | null;
|
|
26
|
+
/** Plot aspect ratio, width/height. */
|
|
27
|
+
aspect: number;
|
|
28
|
+
limit: number;
|
|
29
|
+
filter: string;
|
|
30
|
+
styles: XYChartStyle | undefined;
|
|
31
|
+
i18n: Map<string, string>;
|
|
32
|
+
containerWidth: number;
|
|
33
|
+
ruleSetConfig?: RuleSetConfig;
|
|
34
|
+
/** The facade's error dispatcher — data warnings are synced through it (stable ids). */
|
|
35
|
+
errors?: ErrorDispatcher;
|
|
36
|
+
/** Facade-bound translator for warning messages (resolves `.key` in the facade's namespace). */
|
|
37
|
+
translate?: (key: string, data?: object) => string;
|
|
38
|
+
private chart;
|
|
39
|
+
private svgMarkup;
|
|
40
|
+
private stores;
|
|
41
|
+
private getDb;
|
|
42
|
+
componentWillLoad(): void;
|
|
43
|
+
componentWillUpdate(): void;
|
|
44
|
+
private rebuild;
|
|
45
|
+
/**
|
|
46
|
+
* Syncs the orchestrator's data warnings to the facade's dispatcher.
|
|
47
|
+
* Walks the full fixed code list so cleared warnings are removed again
|
|
48
|
+
* (addOrReplace/remove discipline, stable ids).
|
|
49
|
+
*/
|
|
50
|
+
private syncWarnings;
|
|
51
|
+
private prepareStyle;
|
|
52
|
+
render(): any;
|
|
53
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { AlaSQLDatabase } from "../../../context/scopedDb";
|
|
2
|
+
import { IBCSRuleSet } from "../../../utils/ibcsRuleSet";
|
|
3
|
+
import { AxisConfig, FacetConfig, IsoConfig, LabelConfig, LegendConfig } from "../../../utils/xy/model/AxisConfig";
|
|
4
|
+
import { GroupLevel, PointLevel, XYWarningRecord } from "../../../utils/xy/model/XYChartDataRow";
|
|
5
|
+
import { XYChartStyle } from "../../../utils/xy/model/XYChartStyle";
|
|
6
|
+
/** Prepared configuration handed to the scatter orchestrator by the inner element. */
|
|
7
|
+
export interface ScatterChartConfig {
|
|
8
|
+
chartTitle: string;
|
|
9
|
+
x: AxisConfig;
|
|
10
|
+
y: AxisConfig;
|
|
11
|
+
iso: IsoConfig | null;
|
|
12
|
+
labels: LabelConfig;
|
|
13
|
+
legend: LegendConfig;
|
|
14
|
+
facet: FacetConfig | null;
|
|
15
|
+
pointLevel: PointLevel;
|
|
16
|
+
seriesLevel: GroupLevel | null;
|
|
17
|
+
/** Plot aspect ratio as width/height (16:9 → 16/9). */
|
|
18
|
+
aspect: number;
|
|
19
|
+
limit: number;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* SVG orchestrator for `bn-chart-scatter` (IBCS template C09).
|
|
23
|
+
*
|
|
24
|
+
* Pipeline per render: adapt rows → resolve facets/series/points → resolve
|
|
25
|
+
* shared scales → per panel: bands → iso → refLines → frame → dots →
|
|
26
|
+
* labels → tick labels → panel title; then the legend and chart title.
|
|
27
|
+
* The SVG is built on a detached `Svg` root and emitted via `toString()`.
|
|
28
|
+
*/
|
|
29
|
+
export declare class ScatterChart {
|
|
30
|
+
private readonly ruleSet;
|
|
31
|
+
private readonly config;
|
|
32
|
+
readonly styles: XYChartStyle;
|
|
33
|
+
private readonly availableWidth;
|
|
34
|
+
private data;
|
|
35
|
+
private warnings;
|
|
36
|
+
private canvasHeight;
|
|
37
|
+
constructor(ruleSet: IBCSRuleSet, db: AlaSQLDatabase, fromExpr: string, config: ScatterChartConfig, styles: XYChartStyle, availableWidth: number);
|
|
38
|
+
private get em();
|
|
39
|
+
private fontFamily;
|
|
40
|
+
private textWidth;
|
|
41
|
+
private drawText;
|
|
42
|
+
hasNoData(): boolean;
|
|
43
|
+
/** Warnings collected during data resolution and drawing (§8 codes). */
|
|
44
|
+
getWarnings(): XYWarningRecord[];
|
|
45
|
+
getAllocatedCanvasWidth(): number;
|
|
46
|
+
getAllocatedCanvasHeight(): number;
|
|
47
|
+
/** Axis title in the IBCS "Label in Unit" form. */
|
|
48
|
+
private axisTitle;
|
|
49
|
+
private i18nMap;
|
|
50
|
+
setI18n(i18n: Map<string, string>): void;
|
|
51
|
+
/** Ordered legend entries: one per series, colored by the primary treatment. */
|
|
52
|
+
private legendModel;
|
|
53
|
+
/** ColorIndex of the primary scenario family (variance axes → 10, spec §4.4). */
|
|
54
|
+
private primaryColorIndex;
|
|
55
|
+
private seriesTreatment;
|
|
56
|
+
private addWarningOnce;
|
|
57
|
+
toString(): string;
|
|
58
|
+
private draw;
|
|
59
|
+
/** Axis title with the label bold and the "in Unit" part regular. */
|
|
60
|
+
private drawAxisTitleText;
|
|
61
|
+
private buildPanels;
|
|
62
|
+
private drawPanel;
|
|
63
|
+
private drawPointLabels;
|
|
64
|
+
private drawIso;
|
|
65
|
+
private formatTick;
|
|
66
|
+
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ParentDimensions } from "../../utils/parentDimensions";
|
|
2
|
-
import { StructureChartDataRow } from "./utils/model";
|
|
3
2
|
/**
|
|
4
3
|
* SVG structure (categorical) bar chart following IBCS standards.
|
|
5
4
|
*
|
|
@@ -12,13 +11,20 @@ import { StructureChartDataRow } from "./utils/model";
|
|
|
12
11
|
*/
|
|
13
12
|
export declare class Chart {
|
|
14
13
|
private element;
|
|
15
|
-
|
|
14
|
+
/** Active dataset name (the last subscribed dataset to fire `onUpdate`). */
|
|
15
|
+
private datasetName;
|
|
16
|
+
/** Bumped on every data update so Stencil re-renders even when the name is unchanged. */
|
|
17
|
+
private dataVersion;
|
|
16
18
|
private datasetMeta;
|
|
17
19
|
private appliedScaleFactor;
|
|
18
20
|
private readonly t;
|
|
19
21
|
private readonly componentStyle;
|
|
22
|
+
private readonly ruleSetConfig;
|
|
20
23
|
private readonly errors;
|
|
21
24
|
private readonly resolveInherited;
|
|
25
|
+
private layoutObserver;
|
|
26
|
+
/** Last parent height seen, used to suppress ResizeObserver noise. */
|
|
27
|
+
private _lastScaledParentHeight;
|
|
22
28
|
/**
|
|
23
29
|
* Title displayed above the chart. When empty, the title is derived
|
|
24
30
|
* from the variance scenario labels (if variances are configured).
|
|
@@ -26,6 +32,12 @@ export declare class Chart {
|
|
|
26
32
|
* @example chart-title="Revenue by Category"
|
|
27
33
|
*/
|
|
28
34
|
chartTitle: string;
|
|
35
|
+
/**
|
|
36
|
+
* Name of a registered IBCS rule set (see `bn-ruleset`) used for scenario
|
|
37
|
+
* ordering. Supports `"inherited-closest"` / `"inherited-page"` to take
|
|
38
|
+
* over the value from an ancestor `bn-layout-card` / `bn-layout-page`.
|
|
39
|
+
*/
|
|
40
|
+
ruleset?: string;
|
|
29
41
|
/**
|
|
30
42
|
* AlaSQL WHERE clause fragment injected into the data query to filter
|
|
31
43
|
* rows before rendering.
|
|
@@ -74,13 +86,14 @@ export declare class Chart {
|
|
|
74
86
|
* | `"auto"` | Auto-fit bars to fill the available container width (no warning) |
|
|
75
87
|
* | not set / `""` | Same as auto, but emits `AUTO_unitScaling` warning |
|
|
76
88
|
* | `"0.03"`, `1` | Explicit pixels-per-unit value; bars scale proportionally |
|
|
77
|
-
* | group name | References a
|
|
89
|
+
* | group name | References a `<bn-scaling-group>` for synchronized scaling |
|
|
78
90
|
*
|
|
79
91
|
* When using a custom value that causes the chart to exceed its container,
|
|
80
92
|
* a `WARN_overflow` error is emitted.
|
|
81
93
|
*
|
|
82
94
|
* @example unit-scaling="auto"
|
|
83
95
|
* @example unit-scaling="0.05"
|
|
96
|
+
* @example unit-scaling="revenue-scale"
|
|
84
97
|
*/
|
|
85
98
|
unitScaling: string | number;
|
|
86
99
|
validateUnitScaling(newValue: string | number): void;
|
|
@@ -92,9 +105,10 @@ export declare class Chart {
|
|
|
92
105
|
* | `"auto"` | Auto-fit to available width |
|
|
93
106
|
* | not set / `""` | Same as auto with warning |
|
|
94
107
|
* | `"50"`, `1.5` | Explicit pixels-per-percentage-point value |
|
|
95
|
-
* | group name | References a
|
|
108
|
+
* | group name | References a `<bn-scaling-group>` for synchronized scaling |
|
|
96
109
|
*
|
|
97
110
|
* @example percentage-scaling="50"
|
|
111
|
+
* @example percentage-scaling="pct-scale"
|
|
98
112
|
*/
|
|
99
113
|
percentageScaling: string | number;
|
|
100
114
|
validatePercentageScaling(newValue: string | number): void;
|
|
@@ -244,7 +258,6 @@ export declare class Chart {
|
|
|
244
258
|
*/
|
|
245
259
|
scale?: string;
|
|
246
260
|
validateScaling(newValue: string): void;
|
|
247
|
-
private scenariosArray;
|
|
248
261
|
private canvasWidthSegmented;
|
|
249
262
|
private pixelPerUnitGroupMap;
|
|
250
263
|
constructor();
|
|
@@ -252,6 +265,7 @@ export declare class Chart {
|
|
|
252
265
|
private _autoScaleGuard;
|
|
253
266
|
componentDidRender(): void;
|
|
254
267
|
componentDidLoad(): void;
|
|
268
|
+
disconnectedCallback(): void;
|
|
255
269
|
/**
|
|
256
270
|
* Emits an error when a custom unit-scaling value causes the chart to exceed its container width.
|
|
257
271
|
* Skipped for auto/unset unit-scaling since auto-fit handles width.
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
-
import { StructureChartDataRow } from "./utils/model";
|
|
2
1
|
import { StackConfigParsed } from "./utils/model/StructureChartComponentConfig";
|
|
3
2
|
import { StructureChartStyle } from "./utils/model/styles/StructureChartStyle";
|
|
4
3
|
import { Order } from "../../utils/model/Order";
|
|
5
4
|
import { AggregationLevel } from "../../utils/constants";
|
|
6
5
|
import { ParentDimensions } from "../../utils/parentDimensions";
|
|
7
6
|
import { DataFormatDigits } from "../../utils/model/DataFormatDigits";
|
|
7
|
+
import { RuleSetConfig } from "../../stores/ruleSets";
|
|
8
8
|
export declare class IbcsChartStructure {
|
|
9
|
-
element: HTMLElement
|
|
10
|
-
|
|
9
|
+
element: HTMLElement;
|
|
10
|
+
/** Name of the dataset (table or view in the shared alasql database). */
|
|
11
|
+
tableName: string;
|
|
12
|
+
/** Bumped by `bn-chart-structure` when the dataset changes; triggers re-render. */
|
|
13
|
+
dataVersion: number;
|
|
11
14
|
chartTitle: string;
|
|
12
15
|
scenarios: string[];
|
|
13
16
|
variances: string[];
|
|
@@ -26,17 +29,21 @@ export declare class IbcsChartStructure {
|
|
|
26
29
|
dataFormatDigits: DataFormatDigits;
|
|
27
30
|
stackConfig: StackConfigParsed | null;
|
|
28
31
|
parentDimensions: ParentDimensions;
|
|
32
|
+
ruleSetConfig?: RuleSetConfig;
|
|
29
33
|
private chart;
|
|
30
34
|
private pattern;
|
|
35
|
+
private stores;
|
|
31
36
|
constructor();
|
|
37
|
+
private getDb;
|
|
32
38
|
render(): any;
|
|
33
39
|
componentWillLoad(): Promise<void>;
|
|
34
40
|
componentWillUpdate(): Promise<void>;
|
|
35
41
|
/**
|
|
36
|
-
* Two-pass auto-fit
|
|
37
|
-
*
|
|
38
|
-
*
|
|
42
|
+
* Two-pass auto-fit for pixelPerUnit and/or pixelPerPercentage.
|
|
43
|
+
* When either is 0 (auto mode), renders a measurement pass at 1,
|
|
44
|
+
* computes the ratio to fit the available width, and rebuilds.
|
|
39
45
|
* Structure charts grow horizontally, so we fit to width.
|
|
46
|
+
* Explicit (> 0) values are never overridden.
|
|
40
47
|
*/
|
|
41
48
|
private autoFitScaling;
|
|
42
49
|
componentWillRender(): Promise<void>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Svg } from "@svgdotjs/svg.js";
|
|
2
|
-
import { StructureChartComponentConfig,
|
|
2
|
+
import { StructureChartComponentConfig, StructureChartStyle } from "./model";
|
|
3
3
|
import { SVGPolgonPattern } from "../../../utils/model";
|
|
4
4
|
import { VisualisationRuleSet } from "../../bn-table/utils/model";
|
|
5
|
+
import { AlaSQLDatabase } from "../../../context/scopedDb";
|
|
5
6
|
/**
|
|
6
7
|
* Orchestrates the full rendering pipeline for an IBCS structure (categorical) chart.
|
|
7
8
|
*
|
|
@@ -29,6 +30,9 @@ export declare class StructureChart {
|
|
|
29
30
|
private position;
|
|
30
31
|
styles: StructureChartStyle;
|
|
31
32
|
private title;
|
|
33
|
+
/** Raw config inputs the title derives from; kept so setI18n can recompute it. */
|
|
34
|
+
private configTitle;
|
|
35
|
+
private configVariances;
|
|
32
36
|
private smallestDataPointValue;
|
|
33
37
|
private highestDataPointValue;
|
|
34
38
|
private smallestVarianceDataPointValue;
|
|
@@ -38,7 +42,6 @@ export declare class StructureChart {
|
|
|
38
42
|
private hideCategories;
|
|
39
43
|
private axisScenario;
|
|
40
44
|
readonly CSS_CATEGORIES: string;
|
|
41
|
-
private preparedDataSet;
|
|
42
45
|
private state;
|
|
43
46
|
private i18n;
|
|
44
47
|
private titleLength;
|
|
@@ -49,14 +52,20 @@ export declare class StructureChart {
|
|
|
49
52
|
private measureUnit;
|
|
50
53
|
private dataFormatDigits;
|
|
51
54
|
private stackConfig;
|
|
55
|
+
private scenarioPropOrder;
|
|
52
56
|
private overflowConfig;
|
|
53
57
|
private highestStackedTotal;
|
|
54
|
-
|
|
58
|
+
private db;
|
|
59
|
+
private tableName;
|
|
60
|
+
private fromExpr;
|
|
61
|
+
private rowCount;
|
|
62
|
+
constructor(ruleSet: VisualisationRuleSet, db: AlaSQLDatabase, tableName: string, config: StructureChartComponentConfig, styles: StructureChartStyle);
|
|
55
63
|
private updatePosition;
|
|
56
64
|
private createElementPosition;
|
|
57
|
-
initSQLFunctions(): void;
|
|
58
65
|
setStyles(newStyle: StructureChartStyle): void;
|
|
66
|
+
setRuleSet(ruleSet: VisualisationRuleSet): void;
|
|
59
67
|
setConfig(config: StructureChartComponentConfig): void;
|
|
68
|
+
/** Returns a new array; the input keeps the `scenarios` prop order (the config is reused across rebuilds). */
|
|
60
69
|
private sortScenariosbyVisualisationRules;
|
|
61
70
|
/**
|
|
62
71
|
* Init load of translation dictionary map
|
|
@@ -72,17 +81,15 @@ export declare class StructureChart {
|
|
|
72
81
|
* @param i18n
|
|
73
82
|
*/
|
|
74
83
|
setI18n(i18n: Map<string, string>): void;
|
|
84
|
+
/** Derives the variance title from the stored config and the current i18n map. */
|
|
85
|
+
private updateTitle;
|
|
75
86
|
private createI18n;
|
|
76
87
|
/**
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
* @param data
|
|
82
|
-
* @param filter - data filter
|
|
83
|
-
* @param customColumnNameMap Custon ColumnNameMap can be used if data uses non standard columnames
|
|
88
|
+
* Resolves the dataset (a table or view in the shared alasql database) and
|
|
89
|
+
* caches its row count. All subsequent queries reference the source by name,
|
|
90
|
+
* so alasql doesn't have to ingest a fresh array per call.
|
|
84
91
|
*/
|
|
85
|
-
|
|
92
|
+
setSource(filter: string): void;
|
|
86
93
|
/**
|
|
87
94
|
* Returns the data value whose bar extent is proportional to pixelPerUnit.
|
|
88
95
|
* Used by autoFitScaling to separate fixed vs variable width components.
|
|
@@ -117,6 +124,8 @@ export declare class StructureChart {
|
|
|
117
124
|
private drawAxisAndLabels;
|
|
118
125
|
private drawScenarios;
|
|
119
126
|
private drawVarianceScenario;
|
|
127
|
+
/** Restore the original `scenarios` prop order for stacked segments (IBCS sort reorders the slots). */
|
|
128
|
+
private sortSegmentsByPropOrder;
|
|
120
129
|
/**
|
|
121
130
|
* Draw stacked horizontal bars. Supports stacking by scenario or by data dimension.
|
|
122
131
|
* When stacking by scenario with multiple scenario types (e.g. ac+pl),
|
|
@@ -27,13 +27,15 @@ export declare class ElementPositions {
|
|
|
27
27
|
private leftSideLengthSync;
|
|
28
28
|
private leftSideLabelLength;
|
|
29
29
|
private topSideLabelHeight;
|
|
30
|
-
|
|
30
|
+
private hasStackedHeaders;
|
|
31
|
+
constructor(padding: Padding, scaleFactors: ScaleFactorsStructureChart, fontSize: number, numberOfColumns: number, leftSideLengthSync: number, titleLength: number, leftSideWidth: number, categoryWidth: number, hasStackedHeaders?: boolean);
|
|
31
32
|
getBarPositionX(): number;
|
|
32
33
|
getBarCenterPositionY(index: number): number;
|
|
33
34
|
getBarPositionY(index: number, isPrimaryMarker: boolean): number;
|
|
34
35
|
getCategoryPositionX(isPositive: boolean): number;
|
|
35
36
|
getAxisTitlePositionX(): number;
|
|
36
37
|
getAxisTitlePositionY(): number;
|
|
38
|
+
getStackedHeaderPositionY(): number;
|
|
37
39
|
getNeedleWidth(): number;
|
|
38
40
|
getAxisPositionX(): number;
|
|
39
41
|
getAxisPositionY(): number;
|
|
@@ -56,5 +58,18 @@ export declare class ElementPositions {
|
|
|
56
58
|
private calculateAxisPosition;
|
|
57
59
|
private recalculatePositions;
|
|
58
60
|
private getAxisTitleOffset;
|
|
61
|
+
private getTopLabelOverhang;
|
|
62
|
+
/**
|
|
63
|
+
* How far the stacked-segment header row (anchored just above the first bar)
|
|
64
|
+
* reaches above the axis start. The title is moved up by this amount so the
|
|
65
|
+
* header row sits between title and bars without overlapping either.
|
|
66
|
+
*/
|
|
67
|
+
private getStackedHeaderOverhang;
|
|
68
|
+
/**
|
|
69
|
+
* How far the scenario labels above the first bar (secondary bar label) or
|
|
70
|
+
* above the first marker (primary marker label) reach above the axis start.
|
|
71
|
+
* The title is moved up by this amount so it does not overlap them.
|
|
72
|
+
*/
|
|
73
|
+
private getTopScenarioLabelOverhang;
|
|
59
74
|
private calculateSideLabelLength;
|
|
60
75
|
}
|