@bino-bi/bn-template-engine 1.0.0-next.26 → 1.0.0-next.28
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/dist/bn-template-engine/bn-template-engine.esm.js +1 -1
- package/dist/bn-template-engine/p-5075771a.entry.js +1 -0
- package/dist/bn-template-engine/p-5d516435.entry.js +1 -0
- package/dist/bn-template-engine/p-5e90e728.entry.js +1 -0
- package/dist/bn-template-engine/p-9ef7e132.entry.js +1 -0
- package/dist/bn-template-engine/{p-f06c3703.entry.js → p-9f7a1980.entry.js} +1 -1
- package/dist/bn-template-engine/p-BeXgxHkW.js +1 -0
- package/dist/bn-template-engine/p-CH0bpt_k.js +1 -0
- package/dist/bn-template-engine/p-ClruFZD_.js +1 -0
- package/dist/bn-template-engine/{p-CTrNbSXN.js → p-DFmSrSnf.js} +1 -1
- package/dist/bn-template-engine/{p-BcLsoDrW.js → p-DI3efDSV.js} +1 -1
- package/dist/bn-template-engine/p-DXLTTILG.js +1 -0
- package/dist/bn-template-engine/p-DtP4jqG5.js +1 -0
- package/dist/bn-template-engine/p-a8281b71.entry.js +1 -0
- package/dist/bn-template-engine/p-b31277e7.entry.js +1 -0
- package/dist/bn-template-engine/p-b396ac84.entry.js +1 -0
- package/dist/cjs/{bn-asset_21.cjs.entry.js → bn-asset_28.cjs.entry.js} +21358 -6528
- package/dist/cjs/bn-grid.cjs.entry.js +4 -6
- package/dist/cjs/bn-image.cjs.entry.js +3 -5
- package/dist/cjs/bn-internationalization.cjs.entry.js +17 -6
- package/dist/cjs/bn-ruleset.cjs.entry.js +5 -5
- package/dist/cjs/bn-template-engine.cjs.js +1 -1
- package/dist/cjs/bn-template.cjs.entry.js +2 -2
- package/dist/cjs/bn-text.cjs.entry.js +115 -43
- package/dist/cjs/{context-protocol-DcTEh1rq.js → context-protocol-C0rKepqu.js} +108 -22
- package/dist/cjs/{diagnostics-CTgbq_Gc.js → diagnostics-Cq-qDtXq.js} +1 -1
- package/dist/cjs/editor-companion.cjs.entry.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/queryError-BZjnIW_w.js +16 -0
- package/dist/cjs/{scaling-Dsb5_NXy.js → sanitizeHtml-Yx1xn6i_.js} +467 -287
- package/dist/cjs/{withBodyObserver-DJO98AJ-.js → withBodyObserver-CaPUjuC5.js} +1 -1
- package/dist/cjs/withHasError-qGW_yqIv.js +426 -0
- package/dist/cjs/{withStyled-D0jLwCib.js → withStyled-vSfogp9J.js} +543 -42
- package/dist/collection/components/bn-chart-bubble/bn-chart-bubble.css +37 -0
- package/dist/collection/components/bn-chart-bubble/bn-chart-bubble.js +53 -28
- package/dist/collection/components/bn-chart-bubble/ibcs-chart-bubble.css +37 -5
- package/dist/collection/components/bn-chart-bubble/ibcs-chart-bubble.js +16 -7
- package/dist/collection/components/bn-chart-bubble/utils/BubbleChart.js +67 -30
- package/dist/collection/components/bn-chart-bullet/bn-chart-bullet.css +37 -0
- package/dist/collection/components/bn-chart-bullet/bn-chart-bullet.js +49 -29
- package/dist/collection/components/bn-chart-bullet/ibcs-chart-bullet.css +37 -5
- package/dist/collection/components/bn-chart-bullet/ibcs-chart-bullet.js +17 -7
- package/dist/collection/components/bn-chart-bullet/utils/BulletChart.js +34 -18
- package/dist/collection/components/bn-chart-bullet/utils/model/BulletChartStyle.js +2 -0
- package/dist/collection/components/bn-chart-bullet/utils/model/BulletConfig.js +1 -1
- package/dist/collection/components/bn-chart-scatter/bn-chart-scatter.css +37 -0
- package/dist/collection/components/bn-chart-scatter/bn-chart-scatter.js +52 -27
- package/dist/collection/components/bn-chart-scatter/ibcs-chart-scatter.css +37 -5
- package/dist/collection/components/bn-chart-scatter/ibcs-chart-scatter.js +16 -7
- package/dist/collection/components/bn-chart-scatter/utils/ScatterChart.js +52 -18
- package/dist/collection/components/bn-chart-structure/bn-chart-structure.css +37 -5
- package/dist/collection/components/bn-chart-structure/bn-chart-structure.js +74 -44
- package/dist/collection/components/bn-chart-structure/ibcs-chart-structure.js +60 -19
- package/dist/collection/components/bn-chart-structure/utils/StructureChart.js +218 -262
- package/dist/collection/components/bn-chart-structure/utils/elements/Label.js +1 -1
- package/dist/collection/components/bn-chart-structure/utils/elements/Needle.js +11 -4
- package/dist/collection/components/bn-chart-structure/utils/elements/StackedBar.js +16 -25
- package/dist/collection/components/bn-chart-structure/utils/model/StructureChartComponentConfig.js +3 -2
- package/dist/collection/components/bn-chart-structure/utils/model/styles/StructureChartStyle.js +2 -0
- package/dist/collection/components/bn-chart-time/bn-chart-time.css +37 -0
- package/dist/collection/components/bn-chart-time/bn-chart-time.js +122 -52
- package/dist/collection/components/bn-chart-time/ibcs-chart-time.css +37 -0
- package/dist/collection/components/bn-chart-time/ibcs-chart-time.js +60 -19
- package/dist/collection/components/bn-chart-time/utils/TimeChart.js +245 -250
- package/dist/collection/components/bn-chart-time/utils/elements/AreaFill.js +1 -1
- package/dist/collection/components/bn-chart-time/utils/elements/Label.js +1 -1
- package/dist/collection/components/bn-chart-time/utils/elements/LineSeries.js +1 -1
- package/dist/collection/components/bn-chart-time/utils/elements/Needle.js +11 -4
- package/dist/collection/components/bn-chart-time/utils/elements/StackedColumn.js +22 -34
- package/dist/collection/components/bn-chart-time/utils/helper/LabelCollisionManager.js +3 -3
- package/dist/collection/components/bn-chart-time/utils/model/TimeChartComponentConfig.js +4 -3
- package/dist/collection/components/bn-chart-time/utils/model/TimeChartDataRow.js +2 -2
- package/dist/collection/components/bn-chart-time/utils/model/styles/TimeChartStyle.js +2 -0
- package/dist/collection/components/bn-component-style/bn-component-style.js +14 -2
- package/dist/collection/components/bn-context/bn-context.js +92 -22
- package/dist/collection/components/bn-dataset/bn-dataset.js +246 -90
- package/dist/collection/components/bn-datasource/bn-datasource.js +169 -77
- package/dist/collection/components/bn-footer/bn-footer.js +6 -6
- package/dist/collection/components/bn-internationalization/bn-internationalization.js +14 -3
- package/dist/collection/components/bn-layout-card/bn-layout-card.js +25 -74
- package/dist/collection/components/bn-layout-page/bn-layout-page.js +59 -71
- package/dist/collection/components/bn-message/bn-message.js +2 -2
- package/dist/collection/components/bn-page/bn-page.css +0 -240
- package/dist/collection/components/bn-page/bn-page.js +14 -4
- package/dist/collection/components/bn-page/pageFormats.js +69 -0
- package/dist/collection/components/bn-ruleset/bn-ruleset.js +2 -2
- package/dist/collection/components/bn-scaling-group/bn-scaling-group.js +7 -7
- package/dist/collection/components/bn-table/bn-table.css +38 -1
- package/dist/collection/components/bn-table/bn-table.js +96 -59
- package/dist/collection/components/bn-table/ibcs-table.css +39 -1
- package/dist/collection/components/bn-table/ibcs-table.js +89 -30
- package/dist/collection/components/bn-table/utils/Table.js +12 -13
- package/dist/collection/components/bn-table/utils/elements/Cell.js +9 -3
- package/dist/collection/components/bn-table/utils/elements/CellBarChart.js +38 -34
- package/dist/collection/components/bn-table/utils/elements/TableRow.js +2 -1
- package/dist/collection/components/bn-table/utils/elements/WaterfallBar.js +4 -4
- package/dist/collection/components/bn-table/utils/factories/tableDataSetFactory.js +17 -4
- package/dist/collection/components/bn-table/utils/helper/DataQuery.js +128 -98
- package/dist/collection/components/bn-table/utils/helper/IntervalColumns.js +6 -20
- package/dist/collection/components/bn-table/utils/helper/QueryGroup.js +9 -2
- package/dist/collection/components/bn-table/utils/helper/barColumnGeometry.js +2 -2
- package/dist/collection/components/bn-table/utils/model/TableAttribute.js +2 -2
- package/dist/collection/components/bn-table/utils/model/TableComponentConfig.js +3 -2
- package/dist/collection/components/bn-template/bn-template.js +1 -1
- package/dist/collection/components/bn-text/bn-text.js +36 -39
- package/dist/collection/components/bn-text/utils/template.js +79 -0
- package/dist/collection/components/bn-title/bn-title.js +10 -4
- package/dist/collection/components/bn-title/ibcs-title/ibcs-title.js +3 -1
- package/dist/collection/components/bn-tree/bn-tree.js +119 -23
- package/dist/collection/components/bn-tree/utils/EdgeRenderer.js +59 -51
- package/dist/collection/components/bn-tree/utils/TreeLayout.js +30 -5
- package/dist/collection/components/bn-tree/utils/TreeParser.js +35 -0
- package/dist/collection/components/editor-companion/editor-companion.js +1 -1
- package/dist/collection/context/context-protocol.js +1 -1
- package/dist/collection/context/scopedDb.js +47 -4
- package/dist/collection/stores/componentStyles.js +39 -0
- package/dist/collection/stores/internationalization.js +15 -13
- package/dist/collection/utils/DateStringFactory.js +17 -15
- package/dist/collection/utils/autoFit.js +2 -2
- package/dist/collection/utils/componentRegister.js +60 -16
- package/dist/collection/utils/constants.js +2 -2
- package/dist/collection/utils/dataAnalyzer.js +9 -12
- package/dist/collection/utils/emptyState.js +21 -0
- package/dist/collection/utils/formatter.js +29 -20
- package/dist/collection/utils/layoutObserver.js +1 -1
- package/dist/collection/utils/layoutState/generic.js +1 -1
- package/dist/collection/utils/layoutState/svgChartElements.js +2 -2
- package/dist/collection/utils/layoutTemplate.js +81 -0
- package/dist/collection/utils/measurementHost.js +2 -2
- package/dist/collection/utils/model/Order.js +1 -1
- package/dist/collection/utils/model/styles/SVGStyle.js +12 -4
- package/dist/collection/utils/parentDimensions.js +35 -3
- package/dist/collection/utils/queryError.js +11 -0
- package/dist/collection/utils/relativeVariance.js +14 -0
- package/dist/collection/utils/sanitizeHtml.js +30 -16
- package/dist/collection/utils/scaling.js +2 -2
- package/dist/collection/utils/stackColors.js +27 -5
- package/dist/collection/utils/stackLayout.js +71 -0
- package/dist/collection/utils/styled/attributes.js +16 -3
- package/dist/collection/utils/styled/style-sheet.js +1 -1
- package/dist/collection/utils/styled/withStyled.js +1 -1
- package/dist/collection/utils/testing/fakeGroup.js +21 -0
- package/dist/collection/utils/testing/mutationObserver.js +44 -0
- package/dist/collection/utils/testing/structureChart.js +26 -0
- package/dist/collection/utils/testing/timeChart.js +28 -0
- package/dist/collection/utils/validate.js +1 -1
- package/dist/collection/utils/withComponentStatus.js +137 -12
- package/dist/collection/utils/withInheritedProps.js +113 -64
- package/dist/collection/utils/withRuleSet.js +10 -7
- package/dist/collection/utils/withTranslation.js +3 -3
- package/dist/collection/utils/xy/FacetGrid.js +1 -1
- package/dist/collection/utils/xy/IsoCurves.js +1 -1
- package/dist/collection/utils/xy/NumericScale.js +46 -15
- package/dist/collection/utils/xy/PointLabeler.js +2 -2
- package/dist/collection/utils/xy/RadiusScale.js +2 -2
- package/dist/collection/utils/xy/SeriesPalette.js +3 -3
- package/dist/collection/utils/xy/VarianceMeasure.js +22 -4
- package/dist/collection/utils/xy/XYFrame.js +4 -4
- package/dist/collection/utils/xy/XYLegend.js +5 -7
- package/dist/collection/utils/xy/checkXYOverflow.js +32 -0
- package/dist/collection/utils/xy/formatXYValue.js +13 -0
- package/dist/collection/utils/xy/model/XYChartDataRow.js +0 -0
- package/dist/collection/utils/xy/model/XYChartStyle.js +2 -0
- package/dist/components/DataFormatDigits.js +1 -1
- package/dist/components/DateStringFactory.js +1 -1
- package/dist/components/LabelCollisionManager.js +1 -1
- package/dist/components/NumericScale.js +1 -1
- package/dist/components/Order.js +1 -1
- package/dist/components/SVGStyle.js +1 -0
- package/dist/components/TableAttribute.js +1 -0
- package/dist/components/VarianceMeasure.js +1 -1
- package/dist/components/XYChartDataRow.js +1 -1
- package/dist/components/bn-asset.js +1 -1
- package/dist/components/bn-body2.js +1 -1
- package/dist/components/bn-card2.js +1 -1
- package/dist/components/bn-chart-bubble.js +1 -1
- package/dist/components/bn-chart-bullet.js +1 -1
- package/dist/components/bn-chart-scatter.js +1 -1
- package/dist/components/bn-chart-structure.js +1 -1
- package/dist/components/bn-chart-time.js +1 -1
- package/dist/components/bn-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.js +1 -1
- package/dist/components/bn-scaling-group.js +1 -1
- 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/checkXYOverflow.js +1 -0
- package/dist/components/context-protocol.js +1 -1
- package/dist/components/editor-companion.js +1 -1
- package/dist/components/emptyState.js +1 -0
- package/dist/components/formatter.js +1 -1
- package/dist/components/ibcs-chart-bubble2.js +1 -1
- package/dist/components/ibcs-chart-bullet2.js +1 -1
- package/dist/components/ibcs-chart-scatter2.js +1 -1
- 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/layoutTemplate.js +1 -0
- package/dist/components/pageFormats.js +1 -0
- package/dist/components/parentDimensions.js +1 -0
- package/dist/components/queryError.js +1 -0
- package/dist/components/relativeVariance.js +1 -0
- package/dist/components/sanitizeHtml.js +1 -1
- package/dist/components/stackColors.js +1 -1
- package/dist/components/stackLayout.js +1 -0
- package/dist/components/svg.esm.js +1 -0
- package/dist/components/validate.js +1 -1
- package/dist/components/withBodyObserver.js +1 -1
- package/dist/components/withComponentStatus.js +1 -0
- package/dist/components/withComponentStyle.js +1 -1
- package/dist/components/withDataset.js +1 -1
- package/dist/components/withHasError.js +1 -1
- package/dist/components/withRuleSet.js +1 -1
- package/dist/components/withScalingGroup.js +1 -1
- package/dist/components/withStyled.js +1 -1
- package/dist/components/withTranslation.js +1 -1
- package/dist/esm/{bn-asset_21.entry.js → bn-asset_28.entry.js} +20948 -6125
- package/dist/esm/bn-grid.entry.js +4 -6
- package/dist/esm/bn-image.entry.js +3 -5
- package/dist/esm/bn-internationalization.entry.js +17 -6
- package/dist/esm/bn-ruleset.entry.js +5 -5
- package/dist/esm/bn-template-engine.js +1 -1
- package/dist/esm/bn-template.entry.js +2 -2
- package/dist/esm/bn-text.entry.js +111 -39
- package/dist/esm/{context-protocol-B-vdGKeG.js → context-protocol-CdTp19uA.js} +106 -22
- package/dist/esm/{diagnostics-CiquIw8B.js → diagnostics-vw6TKMiT.js} +1 -1
- package/dist/esm/editor-companion.entry.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/queryError-ClruFZD_.js +13 -0
- package/dist/esm/{scaling-Dggyeqts.js → sanitizeHtml-C5bFtARM.js} +464 -287
- package/dist/esm/{withBodyObserver-Cb9ZC5_J.js → withBodyObserver-DD_-r04o.js} +1 -1
- package/dist/esm/withHasError-73WV2SP5.js +422 -0
- package/dist/esm/{withStyled-DoNsbwS3.js → withStyled-BDEyKd_H.js} +513 -27
- package/dist/types/components/bn-chart-bubble/bn-chart-bubble.d.ts +8 -4
- package/dist/types/components/bn-chart-bubble/ibcs-chart-bubble.d.ts +2 -1
- package/dist/types/components/bn-chart-bubble/utils/BubbleChart.d.ts +14 -2
- package/dist/types/components/bn-chart-bullet/bn-chart-bullet.d.ts +12 -11
- package/dist/types/components/bn-chart-bullet/ibcs-chart-bullet.d.ts +2 -1
- package/dist/types/components/bn-chart-bullet/utils/BulletChart.d.ts +8 -5
- package/dist/types/components/bn-chart-bullet/utils/model/BulletChartStyle.d.ts +2 -0
- package/dist/types/components/bn-chart-bullet/utils/model/BulletConfig.d.ts +1 -1
- package/dist/types/components/bn-chart-scatter/bn-chart-scatter.d.ts +8 -4
- package/dist/types/components/bn-chart-scatter/ibcs-chart-scatter.d.ts +2 -1
- package/dist/types/components/bn-chart-scatter/utils/ScatterChart.d.ts +11 -1
- package/dist/types/components/bn-chart-structure/bn-chart-structure.d.ts +13 -12
- package/dist/types/components/bn-chart-structure/ibcs-chart-structure.d.ts +8 -1
- package/dist/types/components/bn-chart-structure/utils/StructureChart.d.ts +29 -6
- package/dist/types/components/bn-chart-structure/utils/elements/StackedBar.d.ts +4 -3
- package/dist/types/components/bn-chart-structure/utils/model/DataPoint.d.ts +3 -2
- package/dist/types/components/bn-chart-structure/utils/model/StructureChartComponentConfig.d.ts +2 -1
- package/dist/types/components/bn-chart-structure/utils/model/styles/StructureChartStyle.d.ts +2 -0
- package/dist/types/components/bn-chart-time/bn-chart-time.d.ts +19 -15
- package/dist/types/components/bn-chart-time/ibcs-chart-time.d.ts +8 -1
- package/dist/types/components/bn-chart-time/utils/TimeChart.d.ts +63 -5
- package/dist/types/components/bn-chart-time/utils/elements/AreaFill.d.ts +1 -1
- package/dist/types/components/bn-chart-time/utils/elements/StackedColumn.d.ts +9 -8
- package/dist/types/components/bn-chart-time/utils/model/DataPoint.d.ts +3 -2
- package/dist/types/components/bn-chart-time/utils/model/TimeChartComponentConfig.d.ts +3 -2
- package/dist/types/components/bn-chart-time/utils/model/styles/TimeChartStyle.d.ts +2 -0
- package/dist/types/components/bn-context/bn-context.d.ts +15 -3
- package/dist/types/components/bn-dataset/bn-dataset.d.ts +41 -20
- package/dist/types/components/bn-datasource/bn-datasource.d.ts +34 -18
- package/dist/types/components/bn-footer/bn-footer.d.ts +2 -2
- package/dist/types/components/bn-layout-card/bn-layout-card.d.ts +3 -10
- package/dist/types/components/bn-layout-page/bn-layout-page.d.ts +13 -6
- package/dist/types/components/bn-message/bn-message.d.ts +2 -1
- package/dist/types/components/bn-page/bn-page.d.ts +2 -1
- package/dist/types/components/bn-page/pageFormats.d.ts +40 -0
- package/dist/types/components/bn-scaling-group/bn-scaling-group.d.ts +2 -2
- package/dist/types/components/bn-table/bn-table.d.ts +11 -10
- package/dist/types/components/bn-table/ibcs-table.d.ts +8 -5
- package/dist/types/components/bn-table/utils/Table.d.ts +3 -1
- package/dist/types/components/bn-table/utils/elements/Cell.d.ts +2 -2
- package/dist/types/components/bn-table/utils/elements/CellBarChart.d.ts +6 -4
- package/dist/types/components/bn-table/utils/elements/WaterfallBar.d.ts +1 -1
- package/dist/types/components/bn-table/utils/factories/tableDataSetFactory.d.ts +2 -0
- package/dist/types/components/bn-table/utils/helper/DataQuery.d.ts +14 -5
- package/dist/types/components/bn-table/utils/helper/IntervalColumns.d.ts +2 -2
- package/dist/types/components/bn-table/utils/helper/QueryGroup.d.ts +6 -1
- package/dist/types/components/bn-table/utils/helper/barColumnGeometry.d.ts +2 -2
- package/dist/types/components/bn-table/utils/model/TableAttribute.d.ts +2 -0
- package/dist/types/components/bn-table/utils/model/TableComponentConfig.d.ts +2 -1
- package/dist/types/components/bn-text/bn-text.d.ts +20 -13
- package/dist/types/components/bn-text/utils/template.d.ts +10 -0
- package/dist/types/components/bn-title/ibcs-title/ibcs-title.d.ts +1 -0
- package/dist/types/components/bn-tree/bn-tree.d.ts +8 -1
- package/dist/types/components/bn-tree/utils/EdgeRenderer.d.ts +18 -5
- package/dist/types/components/bn-tree/utils/TreeLayout.d.ts +5 -0
- package/dist/types/components.d.ts +226 -184
- package/dist/types/context/scopedDb.d.ts +20 -0
- package/dist/types/stores/componentStyles.d.ts +6 -0
- package/dist/types/utils/DateStringFactory.d.ts +3 -2
- package/dist/types/utils/autoFit.d.ts +2 -2
- package/dist/types/utils/componentRegister.d.ts +21 -5
- package/dist/types/utils/constants.d.ts +2 -2
- package/dist/types/utils/dataAnalyzer.d.ts +1 -1
- package/dist/types/utils/emptyState.d.ts +10 -0
- package/dist/types/utils/formatter.d.ts +7 -9
- package/dist/types/utils/layoutState/generic.d.ts +1 -1
- package/dist/types/utils/layoutState/svgChartElements.d.ts +2 -2
- package/dist/types/utils/layoutTemplate.d.ts +16 -0
- package/dist/types/utils/model/ChartStyles.d.ts +1 -1
- package/dist/types/utils/model/DataQueryResultRow.d.ts +2 -2
- package/dist/types/utils/model/Order.d.ts +1 -1
- package/dist/types/utils/model/styles/SVGStyle.d.ts +5 -1
- package/dist/types/utils/parentDimensions.d.ts +9 -0
- package/dist/types/utils/queryError.d.ts +5 -0
- package/dist/types/utils/relativeVariance.d.ts +9 -0
- package/dist/types/utils/sanitizeHtml.d.ts +2 -2
- package/dist/types/utils/scaling.d.ts +1 -1
- package/dist/types/utils/stackColors.d.ts +3 -2
- package/dist/types/utils/stackLayout.d.ts +49 -0
- package/dist/types/utils/testing/fakeGroup.d.ts +8 -0
- package/dist/types/utils/testing/mutationObserver.d.ts +5 -0
- package/dist/types/utils/testing/structureChart.d.ts +5 -0
- package/dist/types/utils/testing/timeChart.d.ts +5 -0
- package/dist/types/utils/validate.d.ts +1 -1
- package/dist/types/utils/withComponentStatus.d.ts +11 -3
- package/dist/types/utils/withInheritedProps.d.ts +42 -15
- package/dist/types/utils/withRuleSet.d.ts +2 -1
- package/dist/types/utils/withTranslation.d.ts +2 -2
- package/dist/types/utils/xy/FacetGrid.d.ts +1 -1
- package/dist/types/utils/xy/IsoCurves.d.ts +1 -1
- package/dist/types/utils/xy/NumericScale.d.ts +9 -4
- package/dist/types/utils/xy/PointLabeler.d.ts +2 -2
- package/dist/types/utils/xy/RadiusScale.d.ts +2 -2
- package/dist/types/utils/xy/SeriesPalette.d.ts +3 -3
- package/dist/types/utils/xy/VarianceMeasure.d.ts +10 -2
- package/dist/types/utils/xy/XYFrame.d.ts +4 -1
- package/dist/types/utils/xy/XYLegend.d.ts +3 -1
- package/dist/types/utils/xy/checkXYOverflow.d.ts +8 -0
- package/dist/types/utils/xy/formatXYValue.d.ts +7 -0
- package/dist/types/utils/xy/model/AxisConfig.d.ts +1 -1
- package/dist/types/utils/xy/model/XYChartStyle.d.ts +2 -0
- package/package.json +4 -2
- package/readme.md +11 -11
- package/dist/bn-template-engine/p-03304284.entry.js +0 -1
- package/dist/bn-template-engine/p-0fb02c57.entry.js +0 -1
- package/dist/bn-template-engine/p-4419db8f.entry.js +0 -1
- package/dist/bn-template-engine/p-45508f1b.entry.js +0 -1
- package/dist/bn-template-engine/p-461fdffa.entry.js +0 -1
- package/dist/bn-template-engine/p-5d7a3a77.entry.js +0 -1
- package/dist/bn-template-engine/p-62cc95b7.entry.js +0 -1
- package/dist/bn-template-engine/p-686d8e44.entry.js +0 -1
- package/dist/bn-template-engine/p-829212c3.entry.js +0 -1
- package/dist/bn-template-engine/p-B5Jd_eCX.js +0 -1
- package/dist/bn-template-engine/p-BA48JiHe.js +0 -1
- package/dist/bn-template-engine/p-BbmobTg0.js +0 -1
- package/dist/bn-template-engine/p-BcaI745G.js +0 -1
- package/dist/bn-template-engine/p-CG_Bcm6V.js +0 -1
- package/dist/bn-template-engine/p-CWWWM-XC.js +0 -1
- package/dist/bn-template-engine/p-CsJ84YRk.js +0 -1
- package/dist/bn-template-engine/p-D5e8I9Qe.js +0 -1
- package/dist/bn-template-engine/p-DVrDYxlh.js +0 -1
- package/dist/bn-template-engine/p-DjPXefnq.js +0 -1
- package/dist/bn-template-engine/p-DsTzlzxQ.js +0 -1
- package/dist/bn-template-engine/p-DtLI_CzV.js +0 -1
- package/dist/bn-template-engine/p-EtT29btN.js +0 -1
- package/dist/bn-template-engine/p-TuLpbB5O.js +0 -1
- package/dist/bn-template-engine/p-a5867a4c.entry.js +0 -1
- package/dist/bn-template-engine/p-b27009eb.entry.js +0 -1
- package/dist/bn-template-engine/p-bfa87b07.entry.js +0 -1
- package/dist/bn-template-engine/p-ceb80db3.entry.js +0 -1
- package/dist/bn-template-engine/p-fcfbb329.entry.js +0 -1
- package/dist/bn-template-engine/p-qRZrT-U3.js +0 -1
- package/dist/cjs/AxisConfig-DwiNUyYG.js +0 -233
- package/dist/cjs/LabelCollisionManager-Bv-xkeXw.js +0 -415
- package/dist/cjs/NumericScale-BAyYXpKL.js +0 -107
- package/dist/cjs/Order-2wRydarc.js +0 -87
- package/dist/cjs/SVGStyle-DoxylrEQ.js +0 -8219
- package/dist/cjs/SVGVariancesStyleGroup-CiI4GeWe.js +0 -50
- package/dist/cjs/VarianceMeasure-CQlSRzlp.js +0 -372
- package/dist/cjs/XYChartDataRow-C2FdL58s.js +0 -829
- package/dist/cjs/bn-chart-bubble.cjs.entry.js +0 -792
- package/dist/cjs/bn-chart-bullet.cjs.entry.js +0 -805
- package/dist/cjs/bn-chart-scatter.cjs.entry.js +0 -678
- package/dist/cjs/bn-tree.cjs.entry.js +0 -1042
- package/dist/cjs/ibcs-chart-bubble.cjs.entry.js +0 -624
- package/dist/cjs/ibcs-chart-bullet.cjs.entry.js +0 -673
- package/dist/cjs/ibcs-chart-scatter.cjs.entry.js +0 -667
- package/dist/cjs/sanitizeHtml-LuZr1IMd.js +0 -85
- package/dist/cjs/svgChartElements-tDA43aYj.js +0 -400
- package/dist/cjs/withHasError-BdDmiOXM.js +0 -258
- package/dist/cjs/withScalingGroup-CFIc5-6s.js +0 -73
- package/dist/components/autoFit.js +0 -1
- package/dist/components/main.js +0 -1
- package/dist/components/utils.js +0 -1
- package/dist/esm/AxisConfig-KqzWQbML.js +0 -224
- package/dist/esm/LabelCollisionManager-585bQMtP.js +0 -407
- package/dist/esm/NumericScale-DsTzlzxQ.js +0 -105
- package/dist/esm/Order-DZVWjEL_.js +0 -83
- package/dist/esm/SVGStyle-OrPkzjcb.js +0 -8209
- package/dist/esm/SVGVariancesStyleGroup-DO5QJfRQ.js +0 -48
- package/dist/esm/VarianceMeasure-DDjChp8C.js +0 -364
- package/dist/esm/XYChartDataRow-Dn83Tqh9.js +0 -820
- package/dist/esm/bn-chart-bubble.entry.js +0 -790
- package/dist/esm/bn-chart-bullet.entry.js +0 -803
- package/dist/esm/bn-chart-scatter.entry.js +0 -676
- package/dist/esm/bn-tree.entry.js +0 -1040
- package/dist/esm/ibcs-chart-bubble.entry.js +0 -622
- package/dist/esm/ibcs-chart-bullet.entry.js +0 -671
- package/dist/esm/ibcs-chart-scatter.entry.js +0 -665
- package/dist/esm/sanitizeHtml-BA48JiHe.js +0 -83
- package/dist/esm/svgChartElements-B3YClivG.js +0 -395
- package/dist/esm/withHasError-Bh1Viz52.js +0 -254
- package/dist/esm/withScalingGroup-DNBSqRC0.js +0 -71
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { forceUpdate, h, Host, writeTask } from "@stencil/core";
|
|
2
|
+
import { hasInlineJs } from "../../context/scopedDb";
|
|
2
3
|
import { isBlankInput, isValidAxisLabelsMode, isValidBoolean, isValidDateFormat, isValidDirection, isValidInteger, isValidLevel, isValidMeasureScale, isValidNumber, validateOrderList, validateScenarioList, validateStackConfig, validateVariancesList, } from "../../utils/validate";
|
|
3
4
|
import withDataset from "../../utils/withDataset";
|
|
4
5
|
import withComponentStatus from "../../utils/withComponentStatus";
|
|
@@ -13,11 +14,13 @@ import withInheritedProps, { isInheritedValue } from "../../utils/withInheritedP
|
|
|
13
14
|
import { getParentDimensions } from "../../utils/parentDimensions";
|
|
14
15
|
import { formatScalingValue, parseScaling, resolveScalingValue } from "../../utils/scaling";
|
|
15
16
|
import { observeParentResize } from "../../utils/layoutObserver";
|
|
17
|
+
import { VarianceScenario } from "../../utils/model/VarianceScenario";
|
|
16
18
|
import { OrderColumn, OrderDirection } from "../../utils/model/Order";
|
|
17
19
|
import { Formatter } from "../../utils/formatter";
|
|
18
20
|
import { AxisLabelsMode, ChartMode, StackBy, StackMode, StackOrder } from "../../utils/constants";
|
|
19
21
|
import { DateDistance } from "../../utils/DateStringFactory";
|
|
20
22
|
import { LAYOUT_STATE_VERSION, collectChartFacadeLayout, measure, originsFor, readDiagnostics, resolveStandaloneId, } from "../../utils/layoutState";
|
|
23
|
+
import { syncEmptyState } from "../../utils/emptyState";
|
|
21
24
|
var AggregationLevel;
|
|
22
25
|
(function (AggregationLevel) {
|
|
23
26
|
AggregationLevel["ROWGROUP"] = "rowGroup";
|
|
@@ -38,6 +41,19 @@ var AggregationLevel;
|
|
|
38
41
|
* validates props, resolves auto-detected metadata, and computes styles.
|
|
39
42
|
*/
|
|
40
43
|
export class Chart {
|
|
44
|
+
validateFilter(newValue) {
|
|
45
|
+
const errId = "ERR_filter";
|
|
46
|
+
if (hasInlineJs(newValue)) {
|
|
47
|
+
this.errors.addOrReplace({
|
|
48
|
+
id: errId,
|
|
49
|
+
type: "error",
|
|
50
|
+
message: "filter: double backticks are not allowed.",
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
this.errors.remove(errId);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
41
57
|
validateScenario(newValue) {
|
|
42
58
|
const errId = "ERR_scenarios";
|
|
43
59
|
if (isInheritedValue(newValue)) {
|
|
@@ -102,6 +118,10 @@ export class Chart {
|
|
|
102
118
|
}
|
|
103
119
|
validateUnitScaling(newValue) {
|
|
104
120
|
const errId = "ERR_unitScaling";
|
|
121
|
+
if (isBlankInput(newValue)) {
|
|
122
|
+
this.errors.remove(errId);
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
105
125
|
if (resolveScalingValue(newValue, this.pixelPerUnitGroupMap).kind === "invalid") {
|
|
106
126
|
this.errors.addOrReplace({
|
|
107
127
|
id: errId,
|
|
@@ -115,6 +135,10 @@ export class Chart {
|
|
|
115
135
|
}
|
|
116
136
|
validatePercentageScaling(newValue) {
|
|
117
137
|
const errId = "ERR_percentageScaling";
|
|
138
|
+
if (isBlankInput(newValue)) {
|
|
139
|
+
this.errors.remove(errId);
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
118
142
|
if (resolveScalingValue(newValue, this.pixelPerUnitGroupMap).kind === "invalid") {
|
|
119
143
|
this.errors.addOrReplace({
|
|
120
144
|
id: errId,
|
|
@@ -128,6 +152,10 @@ export class Chart {
|
|
|
128
152
|
}
|
|
129
153
|
validateLevel(newValue) {
|
|
130
154
|
const errId = "ERR_level";
|
|
155
|
+
if (isBlankInput(newValue)) {
|
|
156
|
+
this.errors.remove(errId);
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
131
159
|
if (!isValidLevel(newValue)) {
|
|
132
160
|
this.errors.addOrReplace({
|
|
133
161
|
id: errId,
|
|
@@ -159,7 +187,7 @@ export class Chart {
|
|
|
159
187
|
}
|
|
160
188
|
validateOrderDirection(newValue) {
|
|
161
189
|
const errId = "ERR_orderDirection";
|
|
162
|
-
if (isInheritedValue(newValue)) {
|
|
190
|
+
if (isInheritedValue(newValue) || isBlankInput(newValue)) {
|
|
163
191
|
this.errors.remove(errId);
|
|
164
192
|
return;
|
|
165
193
|
}
|
|
@@ -176,6 +204,10 @@ export class Chart {
|
|
|
176
204
|
}
|
|
177
205
|
validateDateInterval(newValue) {
|
|
178
206
|
const errId = "ERR_dateInterval";
|
|
207
|
+
if (isBlankInput(newValue)) {
|
|
208
|
+
this.errors.remove(errId);
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
179
211
|
if (!isValidDateFormat(newValue)) {
|
|
180
212
|
this.errors.addOrReplace({
|
|
181
213
|
id: errId,
|
|
@@ -249,6 +281,10 @@ export class Chart {
|
|
|
249
281
|
}
|
|
250
282
|
validateAxisLabelsMode(newValue) {
|
|
251
283
|
const errId = "ERR_axisLabelsMode";
|
|
284
|
+
if (isBlankInput(newValue)) {
|
|
285
|
+
this.errors.remove(errId);
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
252
288
|
if (!isValidAxisLabelsMode(newValue)) {
|
|
253
289
|
this.errors.addOrReplace({
|
|
254
290
|
id: errId,
|
|
@@ -300,7 +336,7 @@ export class Chart {
|
|
|
300
336
|
}
|
|
301
337
|
}
|
|
302
338
|
validateShowMeasureScale(newValue) {
|
|
303
|
-
const errId = "
|
|
339
|
+
const errId = "ERR_showMeasureScale";
|
|
304
340
|
if (!isValidBoolean(newValue)) {
|
|
305
341
|
this.errors.addOrReplace({
|
|
306
342
|
id: errId,
|
|
@@ -313,7 +349,7 @@ export class Chart {
|
|
|
313
349
|
}
|
|
314
350
|
}
|
|
315
351
|
validateShowOverlayAvg(newValue) {
|
|
316
|
-
const errId = "
|
|
352
|
+
const errId = "ERR_showOverlayAvg";
|
|
317
353
|
if (!isValidBoolean(newValue)) {
|
|
318
354
|
this.errors.addOrReplace({
|
|
319
355
|
id: errId,
|
|
@@ -326,7 +362,7 @@ export class Chart {
|
|
|
326
362
|
}
|
|
327
363
|
}
|
|
328
364
|
validateShowOverlayMedian(newValue) {
|
|
329
|
-
const errId = "
|
|
365
|
+
const errId = "ERR_showOverlayMedian";
|
|
330
366
|
if (!isValidBoolean(newValue)) {
|
|
331
367
|
this.errors.addOrReplace({
|
|
332
368
|
id: errId,
|
|
@@ -396,21 +432,21 @@ export class Chart {
|
|
|
396
432
|
* ```
|
|
397
433
|
*
|
|
398
434
|
* - `by` (required): The dimension to stack.
|
|
399
|
-
* - `"scenario"`
|
|
400
|
-
* - `"category"` / `"subcategory"` / `"rowgroup"`
|
|
435
|
+
* - `"scenario"` - stack the scenarios from the `scenarios` prop as layers.
|
|
436
|
+
* - `"category"` / `"subcategory"` / `"rowgroup"` - decompose a single
|
|
401
437
|
* scenario by this data dimension. Must be finer than `level`.
|
|
402
438
|
* - `mode` (optional, default `"absolute"`):
|
|
403
|
-
* - `"absolute"`
|
|
404
|
-
* - `"relative"`
|
|
439
|
+
* - `"absolute"` - additive stacking, axis shows absolute units.
|
|
440
|
+
* - `"relative"` - 100% stacking, axis shows 0%-100%. `unit-scaling` is
|
|
405
441
|
* interpreted as pixels per percentage point (e.g. `0.4` → 40px full
|
|
406
442
|
* stack); `"auto"` fits the stack to the available height as usual.
|
|
407
|
-
* - `"absolute-relative"`
|
|
443
|
+
* - `"absolute-relative"` - bar height is absolute (real value), but
|
|
408
444
|
* segment labels inside show percentages.
|
|
409
445
|
* - `order` (optional, default `"dataset"`): Segment order within each stack.
|
|
410
446
|
* `"asc"` / `"desc"` sort segments by value; `"dataset"` preserves the
|
|
411
447
|
* original data/scenario order.
|
|
412
448
|
*
|
|
413
|
-
* @default '' (empty
|
|
449
|
+
* @default '' (empty - no stacking)
|
|
414
450
|
*
|
|
415
451
|
* @example
|
|
416
452
|
* // Stack scenarios
|
|
@@ -421,8 +457,9 @@ export class Chart {
|
|
|
421
457
|
* stack='{"by":"category","mode":"relative"}'
|
|
422
458
|
*/
|
|
423
459
|
this.stack = "";
|
|
424
|
-
/** Max number of
|
|
425
|
-
*
|
|
460
|
+
/** Max number of columns.
|
|
461
|
+
* Only used to choose the date interval when dateInterval is AUTO:
|
|
462
|
+
* the finest interval that gives fewer periods than this. The series is never cut.
|
|
426
463
|
*/
|
|
427
464
|
this.intervalSpanLimit = 28;
|
|
428
465
|
/** When true (default), line charts stretch to fill the full parent width
|
|
@@ -497,7 +534,7 @@ export class Chart {
|
|
|
497
534
|
*/
|
|
498
535
|
this.handleAutoScalingReport = (report) => {
|
|
499
536
|
var _a, _b, _c, _d, _e, _f;
|
|
500
|
-
// A report only carries the auto-resolved quantities
|
|
537
|
+
// A report only carries the auto-resolved quantities - keep the other one.
|
|
501
538
|
this.lastAutoScalingReport = {
|
|
502
539
|
unit: (_a = report.unit) !== null && _a !== void 0 ? _a : (_b = this.lastAutoScalingReport) === null || _b === void 0 ? void 0 : _b.unit,
|
|
503
540
|
percentage: (_c = report.percentage) !== null && _c !== void 0 ? _c : (_d = this.lastAutoScalingReport) === null || _d === void 0 ? void 0 : _d.percentage,
|
|
@@ -546,9 +583,10 @@ export class Chart {
|
|
|
546
583
|
{ propName: "variances", ancestorAttr: "title-variances" },
|
|
547
584
|
{ propName: "order", ancestorAttr: "title-order" },
|
|
548
585
|
{ propName: "orderDirection", ancestorAttr: "title-order-direction" },
|
|
549
|
-
]);
|
|
586
|
+
], this.errors);
|
|
550
587
|
}
|
|
551
588
|
componentWillLoad() {
|
|
589
|
+
this.validateFilter(this.filter);
|
|
552
590
|
this.validateScenario(this.scenarios);
|
|
553
591
|
this.validateVariances(this.variances);
|
|
554
592
|
this.validateUnitScaling(this.unitScaling);
|
|
@@ -573,7 +611,7 @@ export class Chart {
|
|
|
573
611
|
}
|
|
574
612
|
/**
|
|
575
613
|
* Content width from the rendered SVG width attributes (segments stack
|
|
576
|
-
* vertically, so the widest one counts)
|
|
614
|
+
* vertically, so the widest one counts) - immune to overflow:hidden
|
|
577
615
|
* clipping along the ancestor chain. Falls back to scrollWidth before the
|
|
578
616
|
* inner charts have rendered.
|
|
579
617
|
*/
|
|
@@ -618,7 +656,7 @@ export class Chart {
|
|
|
618
656
|
* Reports a WARN_overflow item when the rendered chart exceeds its
|
|
619
657
|
* container. Overflow attributable to a fixed scaling attribute is an
|
|
620
658
|
* error (height: unit-scaling / percentage-scaling, width: scale);
|
|
621
|
-
* overflow in fully-auto mode is a warning
|
|
659
|
+
* overflow in fully-auto mode is a warning - auto-fit prevents it by
|
|
622
660
|
* construction, so it only fires when the content cannot fit at any scale.
|
|
623
661
|
*/
|
|
624
662
|
checkOverflow() {
|
|
@@ -659,6 +697,7 @@ export class Chart {
|
|
|
659
697
|
});
|
|
660
698
|
}
|
|
661
699
|
componentDidRender() {
|
|
700
|
+
syncEmptyState(this.element, "ibcs-chart-time");
|
|
662
701
|
const { mode } = parseScaling(this.scale);
|
|
663
702
|
if (mode !== "auto" && mode !== "empty") {
|
|
664
703
|
this._autoScaleGuard = false;
|
|
@@ -682,7 +721,7 @@ export class Chart {
|
|
|
682
721
|
const baseFontSize = this.componentStyle(($) => { var _a; return ((_a = $["global"]) === null || _a === void 0 ? void 0 : _a["fontSizePx"]) || 13.3333; });
|
|
683
722
|
const currentWidth = host.scrollWidth;
|
|
684
723
|
const currentFactor = this.appliedScaleFactor;
|
|
685
|
-
// Content fits at current factor
|
|
724
|
+
// Content fits at current factor - done. Don't reset to factor 1;
|
|
686
725
|
// the content only fits BECAUSE of the current factor.
|
|
687
726
|
if (currentWidth <= parentWidth + 1) {
|
|
688
727
|
this.errors.remove("AUTO_scale");
|
|
@@ -694,7 +733,7 @@ export class Chart {
|
|
|
694
733
|
const computedFactor = Math.max(0.3, (currentFactor * (parentWidth - 1)) / currentWidth);
|
|
695
734
|
// Only apply if the change is significant (> 1% of current factor).
|
|
696
735
|
if (Math.abs(computedFactor - currentFactor) < 0.01) {
|
|
697
|
-
// Converged (possibly at the 0.3 floor) but still overflowing
|
|
736
|
+
// Converged (possibly at the 0.3 floor) but still overflowing - report it.
|
|
698
737
|
this.checkOverflow();
|
|
699
738
|
return;
|
|
700
739
|
}
|
|
@@ -724,7 +763,7 @@ export class Chart {
|
|
|
724
763
|
if (this._autoScaleGuard)
|
|
725
764
|
return;
|
|
726
765
|
const { width } = getParentDimensions(this.element);
|
|
727
|
-
// Only react to WIDTH changes
|
|
766
|
+
// Only react to WIDTH changes - this chart scales by width.
|
|
728
767
|
// Height changes (e.g. from page-fit-to-content auto grid rows)
|
|
729
768
|
// are irrelevant and would cause an infinite render loop.
|
|
730
769
|
if (width > 0 && Math.abs(width - this._lastObservedWidth) > 2) {
|
|
@@ -748,7 +787,7 @@ export class Chart {
|
|
|
748
787
|
/**
|
|
749
788
|
* The initial renders can measure mid-hydration, before ancestor CSS
|
|
750
789
|
* (fixed page height, overflow) is applied, so the height used for
|
|
751
|
-
* auto-fit may be a transient value
|
|
790
|
+
* auto-fit may be a transient value - and the resize observer above
|
|
752
791
|
* deliberately ignores height changes. Re-measure on a short backoff
|
|
753
792
|
* schedule and re-render when the measurement no longer matches the
|
|
754
793
|
* height the last render actually used (_lastAppliedHeight, recorded
|
|
@@ -800,15 +839,16 @@ export class Chart {
|
|
|
800
839
|
}
|
|
801
840
|
prepareScenarios() {
|
|
802
841
|
var _a, _b, _c, _d;
|
|
803
|
-
const
|
|
804
|
-
if (inherited
|
|
842
|
+
const scenarios = this.resolveInherited("scenarios", this.scenarios);
|
|
843
|
+
if (scenarios.inherited) {
|
|
805
844
|
this.errors.remove("AUTO_scenarios");
|
|
806
|
-
return
|
|
845
|
+
return scenarios.value.split(",").map((entry) => entry.trim());
|
|
807
846
|
}
|
|
808
|
-
const isAuto = ((_a =
|
|
809
|
-
if (isBlankInput(
|
|
847
|
+
const isAuto = ((_a = scenarios.value) === null || _a === void 0 ? void 0 : _a.trim().toLowerCase()) === "auto";
|
|
848
|
+
if (isBlankInput(scenarios.value) || isAuto) {
|
|
810
849
|
if (((_c = (_b = this.datasetMeta) === null || _b === void 0 ? void 0 : _b.availableScenarios) === null || _c === void 0 ? void 0 : _c.length) > 0) {
|
|
811
|
-
|
|
850
|
+
// An unresolved keyword has its own warning, so it gets no AUTO_scenarios on top.
|
|
851
|
+
if (!isAuto && !scenarios.unresolved) {
|
|
812
852
|
this.errors.addOrReplace({
|
|
813
853
|
id: "AUTO_scenarios",
|
|
814
854
|
type: "warning",
|
|
@@ -823,7 +863,7 @@ export class Chart {
|
|
|
823
863
|
return [];
|
|
824
864
|
}
|
|
825
865
|
this.errors.remove("AUTO_scenarios");
|
|
826
|
-
return (_d =
|
|
866
|
+
return (_d = scenarios.value) === null || _d === void 0 ? void 0 : _d.split(",").map((entry) => entry.trim());
|
|
827
867
|
}
|
|
828
868
|
prepareAvg() {
|
|
829
869
|
return this.showOverlayAvg === "true";
|
|
@@ -832,15 +872,39 @@ export class Chart {
|
|
|
832
872
|
return this.showOverlayMedian === "true";
|
|
833
873
|
}
|
|
834
874
|
prepareVariances() {
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
if (inherited !== undefined) {
|
|
838
|
-
return inherited.split(",").map((entry) => entry.trim());
|
|
839
|
-
}
|
|
840
|
-
if (isBlankInput(this.variances)) {
|
|
875
|
+
const variances = this.resolveInherited("variances", this.variances).value;
|
|
876
|
+
if (isBlankInput(variances)) {
|
|
841
877
|
return [];
|
|
842
878
|
}
|
|
843
|
-
return
|
|
879
|
+
return variances === null || variances === void 0 ? void 0 : variances.split(",").map((entry) => entry.trim());
|
|
880
|
+
}
|
|
881
|
+
/** A variance over a scenario that is not drawn has no values, so its segment would be empty without a hint. */
|
|
882
|
+
checkVarianceScenarios(variances) {
|
|
883
|
+
const errId = "WARN_variances_scenario";
|
|
884
|
+
const scenarios = this.prepareScenarios();
|
|
885
|
+
const missing = [];
|
|
886
|
+
for (const variance of variances) {
|
|
887
|
+
const parsed = new VarianceScenario(variance);
|
|
888
|
+
// a variance with a syntax error has ERR_variances
|
|
889
|
+
if (!parsed.isValid) {
|
|
890
|
+
continue;
|
|
891
|
+
}
|
|
892
|
+
for (const scenario of [parsed.base, parsed.delta]) {
|
|
893
|
+
if (!scenarios.includes(scenario)) {
|
|
894
|
+
missing.push(`'${variance}' needs '${scenario}'`);
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
}
|
|
898
|
+
if (scenarios.length > 0 && missing.length > 0) {
|
|
899
|
+
this.errors.addOrReplace({
|
|
900
|
+
id: errId,
|
|
901
|
+
type: "warning",
|
|
902
|
+
message: `variances: ${missing.join(", ")}, which is not in scenarios (${scenarios.join(", ")}). The variance has no values.`,
|
|
903
|
+
});
|
|
904
|
+
}
|
|
905
|
+
else {
|
|
906
|
+
this.errors.remove(errId);
|
|
907
|
+
}
|
|
844
908
|
}
|
|
845
909
|
prepareHideAxisLabels(idx) {
|
|
846
910
|
return idx >= 1 || this.showCategories !== "true";
|
|
@@ -852,7 +916,7 @@ export class Chart {
|
|
|
852
916
|
const i18nMapGlobal = new Map(i18nMetaLabelsGlobal.map((key) => [key, this.t("global.".concat(key))]));
|
|
853
917
|
return new Map([...i18nMapGlobal.entries(), ...i18nMapLocal.entries()]);
|
|
854
918
|
}
|
|
855
|
-
/** "not set" for blank input, `invalid value "x"` otherwise
|
|
919
|
+
/** "not set" for blank input, `invalid value "x"` otherwise - for AUTO_* messages. */
|
|
856
920
|
static describeScalingInput(raw) {
|
|
857
921
|
return raw === "" ? "not set" : `invalid value "${raw}"`;
|
|
858
922
|
}
|
|
@@ -929,16 +993,16 @@ export class Chart {
|
|
|
929
993
|
}
|
|
930
994
|
prepareOrder() {
|
|
931
995
|
var _a, _b, _c;
|
|
932
|
-
const
|
|
933
|
-
const
|
|
934
|
-
const
|
|
935
|
-
const effectiveDirection = inheritedDirection !== null && inheritedDirection !== void 0 ? inheritedDirection : this.orderDirection;
|
|
996
|
+
const order = this.resolveInherited("order", this.order);
|
|
997
|
+
const effectiveOrder = order.value;
|
|
998
|
+
const effectiveDirection = this.resolveInherited("orderDirection", this.orderDirection).value;
|
|
936
999
|
const isLevelAuto = isBlankInput(this.level) || ((_a = this.level) === null || _a === void 0 ? void 0 : _a.trim().toLowerCase()) === "auto";
|
|
937
1000
|
let entryValue = isLevelAuto && ((_b = this.datasetMeta) === null || _b === void 0 ? void 0 : _b.suggestedLevel) ? this.datasetMeta.suggestedLevel : this.level;
|
|
938
1001
|
const isOrderAuto = (effectiveOrder === null || effectiveOrder === void 0 ? void 0 : effectiveOrder.trim().toLowerCase()) === "auto";
|
|
939
1002
|
if (isBlankInput(effectiveOrder) || isOrderAuto) {
|
|
940
1003
|
if ((_c = this.datasetMeta) === null || _c === void 0 ? void 0 : _c.suggestedLevel) {
|
|
941
|
-
|
|
1004
|
+
// An unresolved keyword has its own warning, so it gets no AUTO_order on top.
|
|
1005
|
+
if (!isOrderAuto && !order.unresolved) {
|
|
942
1006
|
this.errors.addOrReplace({
|
|
943
1007
|
id: "AUTO_order",
|
|
944
1008
|
type: "warning",
|
|
@@ -971,8 +1035,7 @@ export class Chart {
|
|
|
971
1035
|
scaleFactors: {
|
|
972
1036
|
scenarioOffset: $["bn-chart-time"]["scaleFactors"]["scenarioOffset"],
|
|
973
1037
|
scenarioLabelToColumn: $["bn-chart-time"]["scaleFactors"]["scenarioLabelToColumn"],
|
|
974
|
-
labelToColumn:
|
|
975
|
-
labelToColum: $["bn-chart-time"]["scaleFactors"]["labelToColum"],
|
|
1038
|
+
labelToColumn: $["bn-chart-time"]["scaleFactors"]["labelToColumn"],
|
|
976
1039
|
labelToAxis: $["bn-chart-time"]["scaleFactors"]["labelToAxis"],
|
|
977
1040
|
needleWidth: $["bn-chart-time"]["scaleFactors"]["needleWidth"],
|
|
978
1041
|
needleHeadWidth: $["bn-chart-time"]["scaleFactors"]["needleHeadWidth"],
|
|
@@ -1000,6 +1063,8 @@ export class Chart {
|
|
|
1000
1063
|
stackColors: $["bn-chart-time"]["stackColors"],
|
|
1001
1064
|
padding: $["bn-chart-time"]["padding"],
|
|
1002
1065
|
pattern: null,
|
|
1066
|
+
// placeholder, ibcs-chart-time sets the locale of its context
|
|
1067
|
+
locale: "de",
|
|
1003
1068
|
};
|
|
1004
1069
|
});
|
|
1005
1070
|
}
|
|
@@ -1045,7 +1110,8 @@ export class Chart {
|
|
|
1045
1110
|
return DateDistance[(_c = this.dateInterval) === null || _c === void 0 ? void 0 : _c.toUpperCase()];
|
|
1046
1111
|
}
|
|
1047
1112
|
prepareIntervalSpanLimit() {
|
|
1048
|
-
|
|
1113
|
+
const limit = Number(this.intervalSpanLimit);
|
|
1114
|
+
return limit > 0 ? limit : 28;
|
|
1049
1115
|
}
|
|
1050
1116
|
prepareAxisLabelsMode() {
|
|
1051
1117
|
var _a;
|
|
@@ -1177,7 +1243,7 @@ export class Chart {
|
|
|
1177
1243
|
const stackConfig = this.prepareStackConfig();
|
|
1178
1244
|
const scenarios = this.prepareScenarios();
|
|
1179
1245
|
const effectiveScenarios = (stackConfig === null || stackConfig === void 0 ? void 0 : stackConfig.by) === StackBy.DIMENSIONS ? scenarios.slice(0, 1) : scenarios;
|
|
1180
|
-
return (h("ibcs-chart-time", { tableName: this.datasetName, dataVersion: this.dataVersion, chartTitle: this.prepareChartTitle(idx), scenarios: effectiveScenarios, variances: [localScenarioString], hideAxisLabels: this.prepareHideAxisLabels(idx), pixelPerUnit: ppu, pixelPerPercentage: ppp, reportAutoScaling: this.handleAutoScalingReport, limit: this.prepareLimit(), leftSideOffsetForHorizontalSync: this.prepareLeftSideOffset(preparedI18n, preparedStyle), styles: preparedStyle, i18n: preparedI18n, order: this.prepareOrder(), level: this.prepareLevel(), dateInterval: this.prepareDateInterval(), intervalSpanLimit: this.prepareIntervalSpanLimit(), axisLabelsMode: this.prepareAxisLabelsMode(), filter: this.prepareFilter(), "measure-scale": this.prepareMeasureScale(), "measure-unit": this.prepareMeasureUnit(), showOverlayAvg: this.prepareAvg(), showOverlayMedian: this.prepareMedian(), showMeasureScale: this.prepareShowMeasureScale(idx), chartMode: this.prepareChartMode(), maxBars: this.prepareMaxBars(), stackConfig: stackConfig, lineFullWidth: this.prepareLineFullWidth(), containerWidth: fullParentWidth, parentDimensions: this.prepareDimension(), ruleSetConfig: this.ruleSetConfig() }));
|
|
1246
|
+
return (h("ibcs-chart-time", { tableName: this.datasetName, dataVersion: this.dataVersion, chartTitle: this.prepareChartTitle(idx), scenarios: effectiveScenarios, variances: [localScenarioString], hideAxisLabels: this.prepareHideAxisLabels(idx), pixelPerUnit: ppu, pixelPerPercentage: ppp, reportAutoScaling: this.handleAutoScalingReport, errors: this.errors, limit: this.prepareLimit(), leftSideOffsetForHorizontalSync: this.prepareLeftSideOffset(preparedI18n, preparedStyle), styles: preparedStyle, i18n: preparedI18n, order: this.prepareOrder(), level: this.prepareLevel(), dateInterval: this.prepareDateInterval(), intervalSpanLimit: this.prepareIntervalSpanLimit(), axisLabelsMode: this.prepareAxisLabelsMode(), filter: this.prepareFilter(), "measure-scale": this.prepareMeasureScale(), "measure-unit": this.prepareMeasureUnit(), showOverlayAvg: this.prepareAvg(), showOverlayMedian: this.prepareMedian(), showMeasureScale: this.prepareShowMeasureScale(idx), chartMode: this.prepareChartMode(), maxBars: this.prepareMaxBars(), stackConfig: stackConfig, lineFullWidth: this.prepareLineFullWidth(), containerWidth: fullParentWidth, parentDimensions: this.prepareDimension(), ruleSetConfig: this.ruleSetConfig() }));
|
|
1181
1247
|
}
|
|
1182
1248
|
/**
|
|
1183
1249
|
* Lazily generates this chart's layout state: host box (context- and
|
|
@@ -1193,7 +1259,7 @@ export class Chart {
|
|
|
1193
1259
|
const detail = (_a = options === null || options === void 0 ? void 0 : options.detail) !== null && _a !== void 0 ? _a : "summary";
|
|
1194
1260
|
const origins = originsFor(this.element);
|
|
1195
1261
|
const rawFactor = this.getEffectiveScaleFactor();
|
|
1196
|
-
// Auto-scale can be mid-measurement (or unmeasurable in tests)
|
|
1262
|
+
// Auto-scale can be mid-measurement (or unmeasurable in tests) - report a sane factor.
|
|
1197
1263
|
const factor = Number.isFinite(rawFactor) && rawFactor > 0 ? rawFactor : 1;
|
|
1198
1264
|
const fontSizePx = this.componentStyle(($) => { var _a; return ((_a = $["global"]) === null || _a === void 0 ? void 0 : _a["fontSizePx"]) || 13.3333; }) * factor;
|
|
1199
1265
|
const variances = this.prepareVariances();
|
|
@@ -1290,11 +1356,12 @@ export class Chart {
|
|
|
1290
1356
|
render() {
|
|
1291
1357
|
let scenariosArray = [""];
|
|
1292
1358
|
const variancesArray = this.prepareVariances();
|
|
1359
|
+
this.checkVarianceScenarios(variancesArray);
|
|
1293
1360
|
if (variancesArray.length > 0) {
|
|
1294
1361
|
scenariosArray = [...scenariosArray, ...variancesArray];
|
|
1295
1362
|
}
|
|
1296
1363
|
const fontStyles = this.getFontStyles();
|
|
1297
|
-
return (h(Host, { key: '
|
|
1364
|
+
return (h(Host, { key: 'a357016dd99c03b2bd2a2a64036b7b8d7dbeac6b', style: fontStyles }, h("div", { key: '253fbdb945eca47c1bbec2484172186fb4ae8e8a', class: "container" }, scenariosArray.map(this.chartTemplate))));
|
|
1298
1365
|
}
|
|
1299
1366
|
static get is() { return "bn-chart-time"; }
|
|
1300
1367
|
static get encapsulation() { return "shadow"; }
|
|
@@ -1468,7 +1535,7 @@ export class Chart {
|
|
|
1468
1535
|
"name": "example",
|
|
1469
1536
|
"text": "unit-scaling=\"revenue-scale\""
|
|
1470
1537
|
}],
|
|
1471
|
-
"text": "Data units displayed per 1 em of bar length (vertical bars)
|
|
1538
|
+
"text": "Data units displayed per 1 em of bar length (vertical bars) - map-scale\nsemantics: a larger value means smaller bars.\n\n| Value | Behavior |\n|--------------------|-------------------------------------------------------------|\n| `\"auto\"` | Auto-fit bars to fill the available container height |\n| not set / invalid | Same as auto, but emits `AUTO_unitScaling` warning |\n| `\"250000\"`, `\"1M\"` | Units per em; optional SI suffix `k`/`K`/`M`/`G`/`T` |\n| group name | References a `<bn-scaling-group>` for synchronized scaling |"
|
|
1472
1539
|
},
|
|
1473
1540
|
"getter": false,
|
|
1474
1541
|
"setter": false,
|
|
@@ -1493,7 +1560,7 @@ export class Chart {
|
|
|
1493
1560
|
"name": "example",
|
|
1494
1561
|
"text": "percentage-scaling=\"pct-scale\""
|
|
1495
1562
|
}],
|
|
1496
|
-
"text": "Percentage points displayed per 1 em of pin/bar length for relative\nvariances
|
|
1563
|
+
"text": "Percentage points displayed per 1 em of pin/bar length for relative\nvariances - a larger value means shorter pins.\n\n| Value | Behavior |\n|-------------------|---------------------------------------------------------------|\n| `\"auto\"` | Auto-fit to available height (same two-pass as unit-scaling) |\n| not set / invalid | Same as auto with `AUTO_percentageScaling` warning |\n| `\"10\"`, `\"2.5\"` | Percentage points per em; optional SI suffix `k`/`K`/`M`/`G`/`T` |\n| group name | References a `<bn-scaling-group>` for synchronized scaling |"
|
|
1497
1564
|
},
|
|
1498
1565
|
"getter": false,
|
|
1499
1566
|
"setter": false,
|
|
@@ -1629,7 +1696,7 @@ export class Chart {
|
|
|
1629
1696
|
"docs": {
|
|
1630
1697
|
"tags": [{
|
|
1631
1698
|
"name": "default",
|
|
1632
|
-
"text": "'' (empty
|
|
1699
|
+
"text": "'' (empty - no stacking)"
|
|
1633
1700
|
}, {
|
|
1634
1701
|
"name": "example",
|
|
1635
1702
|
"text": "// Stack scenarios\nstack='{\"by\":\"scenario\"}'"
|
|
@@ -1637,7 +1704,7 @@ export class Chart {
|
|
|
1637
1704
|
"name": "example",
|
|
1638
1705
|
"text": "// Stack by category, relative mode\nstack='{\"by\":\"category\",\"mode\":\"relative\"}'"
|
|
1639
1706
|
}],
|
|
1640
|
-
"text": "Stacking configuration for the chart as a JSON string.\n\nWhen set, bars/columns are drawn stacked (additive layers) instead of\nside-by-side. In line mode (`chart-mode=\"line\"`), stacking produces a\nstacked area chart with filled regions between cumulative lines.\n\n**JSON schema:**\n```json\n{\n \"by\": \"scenario\" | \"category\" | \"subcategory\" | \"rowgroup\",\n \"mode\": \"absolute\" | \"relative\" | \"absolute-relative\",\n \"order\": \"asc\" | \"desc\" | \"dataset\"\n}\n```\n\n- `by` (required): The dimension to stack.\n - `\"scenario\"`
|
|
1707
|
+
"text": "Stacking configuration for the chart as a JSON string.\n\nWhen set, bars/columns are drawn stacked (additive layers) instead of\nside-by-side. In line mode (`chart-mode=\"line\"`), stacking produces a\nstacked area chart with filled regions between cumulative lines.\n\n**JSON schema:**\n```json\n{\n \"by\": \"scenario\" | \"category\" | \"subcategory\" | \"rowgroup\",\n \"mode\": \"absolute\" | \"relative\" | \"absolute-relative\",\n \"order\": \"asc\" | \"desc\" | \"dataset\"\n}\n```\n\n- `by` (required): The dimension to stack.\n - `\"scenario\"` - stack the scenarios from the `scenarios` prop as layers.\n - `\"category\"` / `\"subcategory\"` / `\"rowgroup\"` - decompose a single\n scenario by this data dimension. Must be finer than `level`.\n- `mode` (optional, default `\"absolute\"`):\n - `\"absolute\"` - additive stacking, axis shows absolute units.\n - `\"relative\"` - 100% stacking, axis shows 0%-100%. `unit-scaling` is\n interpreted as pixels per percentage point (e.g. `0.4` \u2192 40px full\n stack); `\"auto\"` fits the stack to the available height as usual.\n - `\"absolute-relative\"` - bar height is absolute (real value), but\n segment labels inside show percentages.\n- `order` (optional, default `\"dataset\"`): Segment order within each stack.\n `\"asc\"` / `\"desc\"` sort segments by value; `\"dataset\"` preserves the\n original data/scenario order."
|
|
1641
1708
|
},
|
|
1642
1709
|
"getter": false,
|
|
1643
1710
|
"setter": false,
|
|
@@ -1657,7 +1724,7 @@ export class Chart {
|
|
|
1657
1724
|
"optional": true,
|
|
1658
1725
|
"docs": {
|
|
1659
1726
|
"tags": [],
|
|
1660
|
-
"text": "Controls proportional scaling of the chart to fit the available parent width.\n\n| Value | Behavior |\n|---------------------|-----------------------------------------------------------------------------------|\n| not set / `\"\"` | Auto-scale to fit parent width; emit `AUTO_scale` warning with the applied factor |\n| `\"none\"` | No scaling (render at base font size regardless of available space) |\n| `\"auto\"` | Auto-scale to fit parent width silently (no warning) |\n| `\"0.5\"`, `\"1.2\"`, \u2026 | Fixed factor
|
|
1727
|
+
"text": "Controls proportional scaling of the chart to fit the available parent width.\n\n| Value | Behavior |\n|---------------------|-----------------------------------------------------------------------------------|\n| not set / `\"\"` | Auto-scale to fit parent width; emit `AUTO_scale` warning with the applied factor |\n| `\"none\"` | No scaling (render at base font size regardless of available space) |\n| `\"auto\"` | Auto-scale to fit parent width silently (no warning) |\n| `\"0.5\"`, `\"1.2\"`, \u2026 | Fixed factor - apply `baseFontSize \u00D7 factor` |"
|
|
1661
1728
|
},
|
|
1662
1729
|
"getter": false,
|
|
1663
1730
|
"setter": false,
|
|
@@ -1676,7 +1743,7 @@ export class Chart {
|
|
|
1676
1743
|
"optional": false,
|
|
1677
1744
|
"docs": {
|
|
1678
1745
|
"tags": [],
|
|
1679
|
-
"text": "Max number of
|
|
1746
|
+
"text": "Max number of columns.\nOnly used to choose the date interval when dateInterval is AUTO:\nthe finest interval that gives fewer periods than this. The series is never cut."
|
|
1680
1747
|
},
|
|
1681
1748
|
"getter": false,
|
|
1682
1749
|
"setter": false,
|
|
@@ -1896,6 +1963,9 @@ export class Chart {
|
|
|
1896
1963
|
static get elementRef() { return "element"; }
|
|
1897
1964
|
static get watchers() {
|
|
1898
1965
|
return [{
|
|
1966
|
+
"propName": "filter",
|
|
1967
|
+
"methodName": "validateFilter"
|
|
1968
|
+
}, {
|
|
1899
1969
|
"propName": "scenarios",
|
|
1900
1970
|
"methodName": "validateScenario"
|
|
1901
1971
|
}, {
|
|
@@ -1,3 +1,40 @@
|
|
|
1
|
+
:host(.no-data) {
|
|
2
|
+
display: block;
|
|
3
|
+
box-sizing: border-box;
|
|
4
|
+
width: 100%;
|
|
5
|
+
height: 100%;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
:host(.no-data) > div {
|
|
9
|
+
float: none;
|
|
10
|
+
width: 100%;
|
|
11
|
+
height: 100%;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
:host(.no-data) .no-data ~ .no-data {
|
|
15
|
+
display: none;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.empty-state {
|
|
19
|
+
box-sizing: border-box;
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
float: none;
|
|
24
|
+
width: 100%;
|
|
25
|
+
height: 100%;
|
|
26
|
+
min-height: 3em;
|
|
27
|
+
margin: 0;
|
|
28
|
+
padding: 0.5em;
|
|
29
|
+
overflow: hidden;
|
|
30
|
+
border: 0.1em dashed #ddd;
|
|
31
|
+
color: #808080;
|
|
32
|
+
font-family: var(--bn-font-family, "Noto Sans", sans-serif);
|
|
33
|
+
font-size: var(--bn-font-size, 13.3333px);
|
|
34
|
+
font-style: normal;
|
|
35
|
+
text-align: center;
|
|
36
|
+
}
|
|
37
|
+
|
|
1
38
|
:host {
|
|
2
39
|
position: relative;
|
|
3
40
|
display: inline-block;
|