@bino-bi/bn-template-engine 1.0.0-alpha.8 → 1.0.0-next.19
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-19bbac66.entry.js +1 -0
- package/dist/bn-template-engine/p-209351c9.entry.js +1 -0
- package/dist/bn-template-engine/p-22d0fb7a.entry.js +1 -0
- package/dist/bn-template-engine/p-2e6dc267.entry.js +1 -0
- package/dist/bn-template-engine/p-485d23d7.entry.js +1 -0
- package/dist/bn-template-engine/p-74c5a95d.entry.js +1 -0
- package/dist/bn-template-engine/p-7bdc0e28.entry.js +1 -0
- package/dist/bn-template-engine/p-83c71b16.entry.js +1 -0
- package/dist/bn-template-engine/p-90806e7a.entry.js +1 -0
- package/dist/bn-template-engine/p-9879c9b2.entry.js +1 -0
- package/dist/bn-template-engine/p-BA48JiHe.js +1 -0
- package/dist/bn-template-engine/p-BWKdb9ym.js +1 -0
- package/dist/bn-template-engine/p-BZV1b5VH.js +1 -0
- package/dist/bn-template-engine/p-Bdfxd_Ke.js +1 -0
- package/dist/bn-template-engine/p-BjBz5cSL.js +1 -0
- package/dist/bn-template-engine/p-BqhIhYr1.js +1 -0
- package/dist/bn-template-engine/p-C0Pwqx-O.js +1 -0
- package/dist/bn-template-engine/p-CiudZRQr.js +1 -0
- package/dist/bn-template-engine/p-DTuaq8Pj.js +1 -0
- package/dist/bn-template-engine/p-DY7YYmpa.js +1 -0
- package/dist/bn-template-engine/p-Dg9OcXAO.js +1 -0
- package/dist/bn-template-engine/p-DsTzlzxQ.js +1 -0
- package/dist/bn-template-engine/p-X6CxL6W-.js +1 -0
- package/dist/bn-template-engine/p-a8291de2.entry.js +1 -0
- package/dist/bn-template-engine/p-aakBGfzL.js +1 -0
- package/dist/bn-template-engine/p-b25455a7.entry.js +1 -0
- package/dist/bn-template-engine/p-e96da91f.entry.js +1 -0
- package/dist/bn-template-engine/p-eca8e2e2.entry.js +1 -0
- package/dist/bn-template-engine/p-f9dfd120.entry.js +1 -0
- package/dist/bn-template-engine/p-rdqTC0_5.js +1 -0
- package/dist/cjs/AxisConfig-VnVelfSV.js +233 -0
- package/dist/cjs/LabelCollisionManager-nfD5P__k.js +412 -0
- package/dist/cjs/NumericScale-BAyYXpKL.js +107 -0
- package/dist/cjs/Order-DobBozQC.js +87 -0
- package/dist/cjs/SVGStyle-BQOmGWLX.js +8209 -0
- package/dist/cjs/SVGVariancesStyleGroup-DCGfHrqh.js +50 -0
- package/dist/cjs/VarianceMeasure-NY9yhiNV.js +372 -0
- package/dist/cjs/XYChartDataRow-B7OKrAcC.js +829 -0
- package/dist/cjs/bn-asset_21.cjs.entry.js +16047 -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 +9 -3
- package/dist/cjs/context-protocol-BDrMkhc4.js +9499 -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-o03YUfn_.js +199 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sanitizeHtml-LuZr1IMd.js +85 -0
- package/dist/cjs/scaling-DKZyjWj5.js +587 -0
- package/dist/cjs/{withBodyObserver-D7BKWN2N.js → withBodyObserver-BKUE_ypL.js} +12 -7
- package/dist/cjs/withScalingGroup-BmcRlWBs.js +73 -0
- package/dist/cjs/withStyled-CRiC9fzc.js +1137 -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 +127 -41
- package/dist/collection/components/bn-chart-structure/ibcs-chart-structure.js +103 -36
- package/dist/collection/components/bn-chart-structure/utils/StructureChart.js +82 -58
- 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 +162 -42
- package/dist/collection/components/bn-chart-time/ibcs-chart-time.js +94 -31
- package/dist/collection/components/bn-chart-time/utils/TimeChart.js +132 -74
- package/dist/collection/components/bn-chart-time/utils/elements/StackedColumn.js +3 -3
- package/dist/collection/components/bn-chart-time/utils/model/TimeChartComponentConfig.js +5 -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 +1 -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 +1 -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 +317 -61
- package/dist/collection/components/bn-table/ibcs-table.css +8 -0
- package/dist/collection/components/bn-table/ibcs-table.js +161 -32
- package/dist/collection/components/bn-table/utils/Table.js +72 -28
- 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 +117 -22
- 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 +27 -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 +29 -6
- package/dist/collection/components/bn-title/ibcs-title/utils/Title.js +3 -0
- package/dist/collection/components/bn-tree/bn-tree.js +5 -1
- 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 +68 -0
- package/dist/collection/stores/ruleSets.js +46 -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 +50 -14
- 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-C_zWCKlL.js +224 -0
- package/dist/esm/LabelCollisionManager-8swVQHKA.js +404 -0
- package/dist/esm/NumericScale-DsTzlzxQ.js +105 -0
- package/dist/esm/Order-BPeWfygb.js +83 -0
- package/dist/esm/SVGStyle-BxEDw9zh.js +8199 -0
- package/dist/esm/SVGVariancesStyleGroup-DRQYvSDD.js +48 -0
- package/dist/esm/VarianceMeasure-DnwNKspZ.js +364 -0
- package/dist/esm/XYChartDataRow-DeV4r-Wm.js +820 -0
- package/dist/esm/bn-asset_21.entry.js +16025 -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 +9 -3
- package/dist/esm/context-protocol-1Yj1uKvh.js +9484 -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-BG5dOBYH.js +196 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sanitizeHtml-BA48JiHe.js +83 -0
- package/dist/esm/scaling-CeSRcRl1.js +579 -0
- package/dist/esm/{withBodyObserver-AFk2wwHT.js → withBodyObserver-IokS6fHD.js} +12 -7
- package/dist/esm/withScalingGroup-Br70pAv9.js +71 -0
- package/dist/esm/withStyled-Br2DGTPs.js +1104 -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 +16 -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 +16 -12
- package/dist/types/components/bn-chart-time/utils/model/TimeChartComponentConfig.d.ts +5 -3
- 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-layout-card/bn-layout-card.d.ts +35 -8
- package/dist/types/components/bn-layout-page/bn-layout-page.d.ts +32 -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 +11 -1
- package/dist/types/components/bn-title/ibcs-title/ibcs-title.d.ts +2 -0
- package/dist/types/components/bn-title/ibcs-title/utils/Title.d.ts +1 -0
- package/dist/types/components/editor-companion/editor-companion.d.ts +2 -0
- package/dist/types/components.d.ts +1691 -120
- 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 +1 -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 +12 -4
- 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-0d41c5d8.entry.js +0 -1
- package/dist/bn-template-engine/p-67538176.entry.js +0 -1
- package/dist/bn-template-engine/p-825a07a8.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-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 -23541
- 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 -23520
- 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,785 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-CDKG4xmO.js');
|
|
4
|
+
var contextProtocol = require('./context-protocol-BDrMkhc4.js');
|
|
5
|
+
var VarianceMeasure = require('./VarianceMeasure-NY9yhiNV.js');
|
|
6
|
+
var layoutObserver = require('./layoutObserver-o03YUfn_.js');
|
|
7
|
+
var Order = require('./Order-DobBozQC.js');
|
|
8
|
+
var scaling = require('./scaling-DKZyjWj5.js');
|
|
9
|
+
var withStyled = require('./withStyled-CRiC9fzc.js');
|
|
10
|
+
var withHasError = require('./withHasError-Cl2gTQzA.js');
|
|
11
|
+
var AxisConfig = require('./AxisConfig-VnVelfSV.js');
|
|
12
|
+
|
|
13
|
+
const MEASURE_KEYS = ["measure", "label", "unit"];
|
|
14
|
+
function toBulletMeasureConfig(data) {
|
|
15
|
+
const invalidFields = [];
|
|
16
|
+
const measure = readString(data, "measure", invalidFields);
|
|
17
|
+
if (measure === undefined || measure.trim() === "") {
|
|
18
|
+
invalidFields.push("measure");
|
|
19
|
+
return { config: null, unknownKeys: collectUnknownKeys(data, MEASURE_KEYS), invalidFields };
|
|
20
|
+
}
|
|
21
|
+
const config = { measure: measure.trim() };
|
|
22
|
+
config.label = readString(data, "label", invalidFields);
|
|
23
|
+
config.unit = readString(data, "unit", invalidFields);
|
|
24
|
+
return { config, unknownKeys: collectUnknownKeys(data, MEASURE_KEYS), invalidFields };
|
|
25
|
+
}
|
|
26
|
+
const LABEL_KEYS = ["show", "decimals"];
|
|
27
|
+
function toBulletLabelConfig(data, defaults) {
|
|
28
|
+
const invalidFields = [];
|
|
29
|
+
const config = { show: defaults.show, decimals: defaults.decimals };
|
|
30
|
+
if (VarianceMeasure.CompareUtil.isExisting(data.show)) {
|
|
31
|
+
if (data.show === "auto" || data.show === "none") {
|
|
32
|
+
config.show = data.show;
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
invalidFields.push("show");
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
if (VarianceMeasure.CompareUtil.isExisting(data.decimals)) {
|
|
39
|
+
if (VarianceMeasure.CompareUtil.isNumber(data.decimals) && data.decimals >= 0 && data.decimals <= 4) {
|
|
40
|
+
config.decimals = Math.floor(data.decimals);
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
invalidFields.push("decimals");
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return { config, unknownKeys: collectUnknownKeys(data, LABEL_KEYS), invalidFields };
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Parses the raw `ranges` attribute value. A blank value yields no ranges
|
|
50
|
+
* without error. Anything else must be a JSON array of positive numbers —
|
|
51
|
+
* ascending fractions of the target, e.g. `[0.6, 0.9]`. `parseSpec` cannot
|
|
52
|
+
* be used here because it rejects top-level JSON arrays. Unsorted input is
|
|
53
|
+
* sorted and more than two entries are truncated; both repairs are reported
|
|
54
|
+
* as issues.
|
|
55
|
+
*/
|
|
56
|
+
function parseRanges(raw) {
|
|
57
|
+
var _a;
|
|
58
|
+
const trimmed = (_a = raw === null || raw === void 0 ? void 0 : raw.trim()) !== null && _a !== void 0 ? _a : "";
|
|
59
|
+
if (trimmed === "" || trimmed === "null") {
|
|
60
|
+
return { ranges: [], parseError: false, issues: [] };
|
|
61
|
+
}
|
|
62
|
+
let parsed;
|
|
63
|
+
try {
|
|
64
|
+
parsed = JSON.parse(trimmed);
|
|
65
|
+
}
|
|
66
|
+
catch (_b) {
|
|
67
|
+
return { ranges: [], parseError: true, issues: [] };
|
|
68
|
+
}
|
|
69
|
+
if (!Array.isArray(parsed) || parsed.length === 0) {
|
|
70
|
+
return { ranges: [], parseError: true, issues: [] };
|
|
71
|
+
}
|
|
72
|
+
if (!parsed.every((entry) => VarianceMeasure.CompareUtil.isNumber(entry) && isFinite(entry) && entry > 0)) {
|
|
73
|
+
return { ranges: [], parseError: true, issues: [] };
|
|
74
|
+
}
|
|
75
|
+
const issues = [];
|
|
76
|
+
let ranges = parsed;
|
|
77
|
+
const sorted = [...ranges].sort((a, b) => a - b);
|
|
78
|
+
if (sorted.some((value, index) => value !== ranges[index])) {
|
|
79
|
+
issues.push("not ascending, sorted");
|
|
80
|
+
}
|
|
81
|
+
ranges = sorted;
|
|
82
|
+
if (ranges.length > 2) {
|
|
83
|
+
issues.push(`${ranges.length} entries, first 2 kept`);
|
|
84
|
+
ranges = ranges.slice(0, 2);
|
|
85
|
+
}
|
|
86
|
+
return { ranges, parseError: false, issues };
|
|
87
|
+
}
|
|
88
|
+
function collectUnknownKeys(data, knownKeys) {
|
|
89
|
+
return Object.keys(data).filter((key) => !knownKeys.includes(key));
|
|
90
|
+
}
|
|
91
|
+
function readString(data, key, invalid) {
|
|
92
|
+
if (!VarianceMeasure.CompareUtil.isExisting(data[key])) {
|
|
93
|
+
return undefined;
|
|
94
|
+
}
|
|
95
|
+
if (VarianceMeasure.CompareUtil.isString(data[key])) {
|
|
96
|
+
return data[key];
|
|
97
|
+
}
|
|
98
|
+
invalid.push(key);
|
|
99
|
+
return undefined;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const bnChartBulletCss = () => `:host{display:inline-block;position:relative;overflow:hidden}.container{display:flex;flex-direction:column}`;
|
|
103
|
+
|
|
104
|
+
/** Auto-detection preference for the target scenario. */
|
|
105
|
+
const TARGET_SLOT_PREFERENCE = ["pl1", "pp1", "fc1"];
|
|
106
|
+
const ChartBullet = class {
|
|
107
|
+
validateActual(newValue) {
|
|
108
|
+
this.validateMeasureSpec("actual", newValue);
|
|
109
|
+
}
|
|
110
|
+
validateTarget(newValue) {
|
|
111
|
+
this.validateMeasureSpec("target", newValue);
|
|
112
|
+
}
|
|
113
|
+
validateRanges(newValue) {
|
|
114
|
+
const errId = "ERR_bullet_json_ranges";
|
|
115
|
+
const warnId = "WARN_bullet_ranges";
|
|
116
|
+
const parsed = parseRanges(newValue);
|
|
117
|
+
if (parsed.parseError) {
|
|
118
|
+
this.setBlockingError(errId, this.t(".bullet-prop-json", { prop: "ranges" }));
|
|
119
|
+
this.errors.remove(warnId);
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
this.setBlockingError(errId, null);
|
|
123
|
+
if (parsed.issues.length > 0) {
|
|
124
|
+
this.errors.addOrReplace({
|
|
125
|
+
id: warnId,
|
|
126
|
+
type: "warning",
|
|
127
|
+
message: this.t(".bullet-ranges-invalid", { detail: parsed.issues.join("; ") }),
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
else {
|
|
131
|
+
this.errors.remove(warnId);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
validateNormalize(newValue) {
|
|
135
|
+
this.validateEnum("normalize", "ERR_normalize", newValue, ["target", "none"], "target");
|
|
136
|
+
}
|
|
137
|
+
validateVariances(newValue) {
|
|
138
|
+
this.validateEnum("variances", "ERR_variances", newValue, ["auto", "none"], "auto");
|
|
139
|
+
}
|
|
140
|
+
validateLevel(newValue) {
|
|
141
|
+
this.validateEnum("level", "ERR_level", newValue, ["auto", "rowgroup", "category", "subcategory"], "auto");
|
|
142
|
+
}
|
|
143
|
+
validateOrder(newValue) {
|
|
144
|
+
const errId = "ERR_order";
|
|
145
|
+
const invalid = withStyled.validateOrderList(newValue).filter((entry) => entry !== "");
|
|
146
|
+
if (invalid.length === 0) {
|
|
147
|
+
this.errors.remove(errId);
|
|
148
|
+
}
|
|
149
|
+
else {
|
|
150
|
+
this.errors.addOrReplace({
|
|
151
|
+
id: errId,
|
|
152
|
+
type: "warning",
|
|
153
|
+
message: `order: invalid value(s) '${invalid.join(", ")}'; using the dataset order.`,
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
validateOrderDirection(newValue) {
|
|
158
|
+
const errId = "ERR_orderDirection";
|
|
159
|
+
if (withStyled.isBlankInput(newValue) || withStyled.isValidDirection(newValue)) {
|
|
160
|
+
this.errors.remove(errId);
|
|
161
|
+
}
|
|
162
|
+
else {
|
|
163
|
+
this.errors.addOrReplace({
|
|
164
|
+
id: errId,
|
|
165
|
+
type: "warning",
|
|
166
|
+
message: `order-direction: invalid value '${newValue}' — expected asc/desc; using asc.`,
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
validateLimit(newValue) {
|
|
171
|
+
const errId = "ERR_limit";
|
|
172
|
+
if (withStyled.isValidInteger(newValue) && Number(newValue) >= 0) {
|
|
173
|
+
this.errors.remove(errId);
|
|
174
|
+
}
|
|
175
|
+
else {
|
|
176
|
+
this.errors.addOrReplace({
|
|
177
|
+
id: errId,
|
|
178
|
+
type: "warning",
|
|
179
|
+
message: `limit: invalid value '${newValue}' — expected a non-negative integer; using 0.`,
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
validateLabels(newValue) {
|
|
184
|
+
const jsonId = "ERR_bullet_json_labels";
|
|
185
|
+
const fieldsId = "WARN_bullet_fields_labels";
|
|
186
|
+
const { data, parseError } = AxisConfig.parseSpec(newValue, null);
|
|
187
|
+
if (parseError) {
|
|
188
|
+
this.setBlockingError(jsonId, this.t(".bullet-prop-json", { prop: "labels" }));
|
|
189
|
+
this.errors.remove(fieldsId);
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
this.setBlockingError(jsonId, null);
|
|
193
|
+
if (data === null) {
|
|
194
|
+
this.errors.remove(fieldsId);
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
this.reportSpecIssues(fieldsId, "labels", toBulletLabelConfig(data, this.labelDefaults()));
|
|
198
|
+
}
|
|
199
|
+
validateScale(newValue) {
|
|
200
|
+
const errId = "ERR_scale";
|
|
201
|
+
if (withStyled.isBlankInput(newValue)) {
|
|
202
|
+
this.errors.remove(errId);
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
const { mode, factor } = scaling.parseScaling(newValue);
|
|
206
|
+
if (mode === "factor" && (factor === undefined || factor <= 0)) {
|
|
207
|
+
this.errors.addOrReplace({
|
|
208
|
+
id: errId,
|
|
209
|
+
type: "warning",
|
|
210
|
+
message: `scale: invalid value '${newValue}' — expected none/auto or a positive number.`,
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
else {
|
|
214
|
+
this.errors.remove(errId);
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
constructor(hostRef) {
|
|
218
|
+
index.registerInstance(this, hostRef);
|
|
219
|
+
/** Active dataset name (the last subscribed dataset to fire `onUpdate`). */
|
|
220
|
+
this.datasetName = "";
|
|
221
|
+
/** Bumped on every data update so Stencil re-renders even when the name is unchanged. */
|
|
222
|
+
this.dataVersion = 0;
|
|
223
|
+
this.datasetMeta = null;
|
|
224
|
+
this.appliedScaleFactor = 1;
|
|
225
|
+
this.layoutObserver = null;
|
|
226
|
+
/** Ids of currently-active blocking errors — the chart renders empty while any is set. */
|
|
227
|
+
this.activeErrors = new Set();
|
|
228
|
+
/**
|
|
229
|
+
* Custom chart title
|
|
230
|
+
*/
|
|
231
|
+
this.chartTitle = "";
|
|
232
|
+
/**
|
|
233
|
+
* AlaSQL WHERE clause fragment injected into the data query to filter
|
|
234
|
+
* rows before rendering (e.g. `"rowGroup = 'Revenue'"`).
|
|
235
|
+
*/
|
|
236
|
+
this.filter = "";
|
|
237
|
+
/**
|
|
238
|
+
* Actual-value measure. JSON object or a bare scenario slot as shorthand:
|
|
239
|
+
* `{"measure":"ac1","label":"Revenue","unit":"EUR k"}`. Only plain
|
|
240
|
+
* scenario slots (`ac1`…`pl4`) are allowed — variance tokens are not.
|
|
241
|
+
* Empty or `"auto"` auto-detects (`ac1`, else the first available
|
|
242
|
+
* scenario).
|
|
243
|
+
*/
|
|
244
|
+
this.actual = "";
|
|
245
|
+
/**
|
|
246
|
+
* Target measure — same shape as `actual`. Empty or `"auto"` auto-detects
|
|
247
|
+
* (`pl1` > `pp1` > `fc1`); without any target scenario the chart renders
|
|
248
|
+
* actual bars only.
|
|
249
|
+
*/
|
|
250
|
+
this.target = "";
|
|
251
|
+
/**
|
|
252
|
+
* Qualitative range bands as a JSON array of ascending fractions of the
|
|
253
|
+
* target, at most two — e.g. `[0.6, 0.9]` (IBCS rejects a third band of
|
|
254
|
+
* arbitrary length). Classic mode only; ignored while `normalize` is
|
|
255
|
+
* `"target"`.
|
|
256
|
+
*/
|
|
257
|
+
this.ranges = "";
|
|
258
|
+
/**
|
|
259
|
+
* Target normalization: `target` (default — rows share an aligned target
|
|
260
|
+
* position, the IBCS-comparable form) or `none` (classic per-row scales
|
|
261
|
+
* with tick strips).
|
|
262
|
+
*/
|
|
263
|
+
this.normalize = "target";
|
|
264
|
+
/**
|
|
265
|
+
* Variance bars between actual and target: `auto` (default — drawn in
|
|
266
|
+
* normalized mode, favorable/unfavorable in the IBCS variance colors) or
|
|
267
|
+
* `none`.
|
|
268
|
+
*/
|
|
269
|
+
this.variances = "auto";
|
|
270
|
+
/**
|
|
271
|
+
* KPI row level: `auto` (deepest populated level from the dataset meta),
|
|
272
|
+
* `rowgroup`, `category`, or `subcategory`.
|
|
273
|
+
*/
|
|
274
|
+
this.level = "auto";
|
|
275
|
+
/**
|
|
276
|
+
* Sort key(s) of the KPI rows: hierarchy columns or scenario slots (e.g.
|
|
277
|
+
* `"ac1"`), comma-separated for multi-level sorting. Empty or `"auto"`
|
|
278
|
+
* uses the dataset's suggested order.
|
|
279
|
+
*/
|
|
280
|
+
this.order = "";
|
|
281
|
+
/**
|
|
282
|
+
* Sorting direction: `asc` or `desc`.
|
|
283
|
+
*/
|
|
284
|
+
this.orderDirection = "";
|
|
285
|
+
/**
|
|
286
|
+
* Maximum number of KPI rows (0 = unlimited). Truncates — there is no
|
|
287
|
+
* REST aggregate, summing heterogeneous KPIs would be meaningless.
|
|
288
|
+
*/
|
|
289
|
+
this.limit = 0;
|
|
290
|
+
/**
|
|
291
|
+
* Value labels. JSON object: `{"show":"auto"|"none","decimals":1}`.
|
|
292
|
+
*/
|
|
293
|
+
this.labels = "";
|
|
294
|
+
this._autoScaleGuard = false;
|
|
295
|
+
this._lastScaledParentHeight = 0;
|
|
296
|
+
/** Facade-bound translator handed to the inner element for warning messages. */
|
|
297
|
+
this.translateForInner = (key, data) => this.t(key, data);
|
|
298
|
+
withStyled.withStyled(this);
|
|
299
|
+
withHasError.withComponentStatus(this);
|
|
300
|
+
scaling.withDataset(this, (name, _data) => {
|
|
301
|
+
this.datasetName = (name === null || name === void 0 ? void 0 : name.startsWith("$")) ? name.substring(1) : name || "";
|
|
302
|
+
this.dataVersion = this.dataVersion + 1;
|
|
303
|
+
}, (_name, meta) => {
|
|
304
|
+
this.datasetMeta = meta;
|
|
305
|
+
});
|
|
306
|
+
this.errors = withHasError.withHasError(this);
|
|
307
|
+
this.componentStyle = withStyled.withComponentStyle(this);
|
|
308
|
+
this.ruleSetConfig = layoutObserver.withRuleSet(this);
|
|
309
|
+
this.t = scaling.withTranslation(this).t;
|
|
310
|
+
}
|
|
311
|
+
componentWillLoad() {
|
|
312
|
+
this.validateActual(this.actual);
|
|
313
|
+
this.validateTarget(this.target);
|
|
314
|
+
this.validateRanges(this.ranges);
|
|
315
|
+
this.validateNormalize(this.normalize);
|
|
316
|
+
this.validateVariances(this.variances);
|
|
317
|
+
this.validateLevel(this.level);
|
|
318
|
+
this.validateOrder(this.order);
|
|
319
|
+
this.validateOrderDirection(this.orderDirection);
|
|
320
|
+
this.validateLimit(this.limit);
|
|
321
|
+
this.validateLabels(this.labels);
|
|
322
|
+
this.validateScale(this.scale);
|
|
323
|
+
}
|
|
324
|
+
componentDidRender() {
|
|
325
|
+
// Bullet height is data-driven (rows × rowHeight), so the auto-fit
|
|
326
|
+
// scales against the parent HEIGHT — the structure-chart variant, not
|
|
327
|
+
// the width-based XY one.
|
|
328
|
+
const { mode } = scaling.parseScaling(this.scale);
|
|
329
|
+
if (mode !== "auto" && mode !== "empty") {
|
|
330
|
+
this._autoScaleGuard = false;
|
|
331
|
+
return;
|
|
332
|
+
}
|
|
333
|
+
if (this._autoScaleGuard) {
|
|
334
|
+
this._autoScaleGuard = false;
|
|
335
|
+
return;
|
|
336
|
+
}
|
|
337
|
+
const host = this.element;
|
|
338
|
+
const { height: parentHeight } = scaling.getParentDimensions(host);
|
|
339
|
+
if (parentHeight <= 0)
|
|
340
|
+
return;
|
|
341
|
+
this._lastScaledParentHeight = parentHeight;
|
|
342
|
+
const baseFontSize = this.componentStyle(($) => { var _a; return ((_a = $["global"]) === null || _a === void 0 ? void 0 : _a["fontSizePx"]) || 13.3333; });
|
|
343
|
+
const currentHeight = host.scrollHeight;
|
|
344
|
+
const currentFactor = this.appliedScaleFactor;
|
|
345
|
+
// Content fits at the current factor — don't reset to 1, it only fits
|
|
346
|
+
// BECAUSE of the current factor (resetting would oscillate).
|
|
347
|
+
if (currentHeight <= parentHeight + 1) {
|
|
348
|
+
this.errors.remove("AUTO_scale");
|
|
349
|
+
return;
|
|
350
|
+
}
|
|
351
|
+
const computedFactor = Math.max(0.3, (currentFactor * (parentHeight - 1)) / currentHeight);
|
|
352
|
+
if (Math.abs(computedFactor - currentFactor) < 0.01) {
|
|
353
|
+
return;
|
|
354
|
+
}
|
|
355
|
+
host.style.setProperty("--bn-font-size", `${baseFontSize * computedFactor}px`);
|
|
356
|
+
if (mode === "empty") {
|
|
357
|
+
this.errors.addOrReplace({
|
|
358
|
+
id: "AUTO_scale",
|
|
359
|
+
type: "warning",
|
|
360
|
+
message: `Auto-scaled chart by factor ${computedFactor.toFixed(3)}`,
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
else {
|
|
364
|
+
this.errors.remove("AUTO_scale");
|
|
365
|
+
}
|
|
366
|
+
this._autoScaleGuard = true;
|
|
367
|
+
index.writeTask(() => {
|
|
368
|
+
this.appliedScaleFactor = computedFactor;
|
|
369
|
+
});
|
|
370
|
+
}
|
|
371
|
+
componentDidLoad() {
|
|
372
|
+
// Watch for size changes (window resize, card relayout) — height only.
|
|
373
|
+
this.layoutObserver = layoutObserver.observeParentResize(this.element, () => {
|
|
374
|
+
if (this._autoScaleGuard)
|
|
375
|
+
return;
|
|
376
|
+
const { height } = scaling.getParentDimensions(this.element);
|
|
377
|
+
if (height > 0 && Math.abs(height - this._lastScaledParentHeight) > 2) {
|
|
378
|
+
this._lastScaledParentHeight = height;
|
|
379
|
+
index.forceUpdate(this);
|
|
380
|
+
}
|
|
381
|
+
});
|
|
382
|
+
// Double-rAF: guarantees the browser completed at least one full paint
|
|
383
|
+
// cycle so all nested card/body/grid layouts are finalized.
|
|
384
|
+
requestAnimationFrame(() => {
|
|
385
|
+
requestAnimationFrame(() => {
|
|
386
|
+
if (this._autoScaleGuard)
|
|
387
|
+
return;
|
|
388
|
+
const { height } = scaling.getParentDimensions(this.element);
|
|
389
|
+
this._lastScaledParentHeight = height;
|
|
390
|
+
index.forceUpdate(this);
|
|
391
|
+
});
|
|
392
|
+
});
|
|
393
|
+
}
|
|
394
|
+
disconnectedCallback() {
|
|
395
|
+
var _a;
|
|
396
|
+
(_a = this.layoutObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
397
|
+
this.layoutObserver = null;
|
|
398
|
+
}
|
|
399
|
+
labelDefaults() {
|
|
400
|
+
return { show: "auto", decimals: 1 };
|
|
401
|
+
}
|
|
402
|
+
/** Sets or clears a blocking error (type `error`) with a stable id. */
|
|
403
|
+
setBlockingError(id, message) {
|
|
404
|
+
if (message === null) {
|
|
405
|
+
this.errors.remove(id);
|
|
406
|
+
this.activeErrors.delete(id);
|
|
407
|
+
}
|
|
408
|
+
else {
|
|
409
|
+
this.errors.addOrReplace({ id, type: "error", message });
|
|
410
|
+
this.activeErrors.add(id);
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
hasBlockingErrors() {
|
|
414
|
+
return this.activeErrors.size > 0;
|
|
415
|
+
}
|
|
416
|
+
/** Shared validator for the measure-carrying object props (actual/target). */
|
|
417
|
+
validateMeasureSpec(prop, raw) {
|
|
418
|
+
var _a;
|
|
419
|
+
const jsonId = `ERR_bullet_json_${prop}`;
|
|
420
|
+
const measureId = `ERR_bullet_measure_${prop}`;
|
|
421
|
+
const fieldsId = `WARN_bullet_fields_${prop}`;
|
|
422
|
+
const { data, parseError } = AxisConfig.parseSpec(raw, "measure");
|
|
423
|
+
if (parseError) {
|
|
424
|
+
this.setBlockingError(jsonId, this.t(".bullet-prop-json", { prop }));
|
|
425
|
+
this.setBlockingError(measureId, null);
|
|
426
|
+
this.errors.remove(fieldsId);
|
|
427
|
+
return;
|
|
428
|
+
}
|
|
429
|
+
this.setBlockingError(jsonId, null);
|
|
430
|
+
if (data === null) {
|
|
431
|
+
// Blank is valid — the measure is auto-detected.
|
|
432
|
+
this.setBlockingError(measureId, null);
|
|
433
|
+
this.errors.remove(fieldsId);
|
|
434
|
+
return;
|
|
435
|
+
}
|
|
436
|
+
const measure = ((_a = data.measure) !== null && _a !== void 0 ? _a : "").trim();
|
|
437
|
+
const ref = VarianceMeasure.resolveMeasure(measure);
|
|
438
|
+
// Plain scenario slots only — the bullet variance is implicit
|
|
439
|
+
// (actual vs target), variance tokens have no meaning here.
|
|
440
|
+
if (measure.toLowerCase() !== "auto" && (ref === null || ref.kind !== "scenario")) {
|
|
441
|
+
this.setBlockingError(measureId, this.t(".bullet-measure-invalid", { prop, measure }));
|
|
442
|
+
}
|
|
443
|
+
else {
|
|
444
|
+
this.setBlockingError(measureId, null);
|
|
445
|
+
}
|
|
446
|
+
this.reportSpecIssues(fieldsId, prop, toBulletMeasureConfig(data));
|
|
447
|
+
}
|
|
448
|
+
validateEnum(prop, errId, raw, valid, fallback) {
|
|
449
|
+
if (withStyled.isBlankInput(raw) || valid.includes(raw.trim().toLowerCase())) {
|
|
450
|
+
this.errors.remove(errId);
|
|
451
|
+
}
|
|
452
|
+
else {
|
|
453
|
+
this.errors.addOrReplace({
|
|
454
|
+
id: errId,
|
|
455
|
+
type: "warning",
|
|
456
|
+
message: `${prop}: invalid value '${raw}' — expected ${valid.join("/")}; using '${fallback}'.`,
|
|
457
|
+
});
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
/** Unknown sub-fields → warning, never error (forward compatibility). */
|
|
461
|
+
reportSpecIssues(errId, prop, result) {
|
|
462
|
+
const issues = [];
|
|
463
|
+
if (result !== null && result.invalidFields.length > 0) {
|
|
464
|
+
issues.push(`invalid: ${result.invalidFields.join(", ")}`);
|
|
465
|
+
}
|
|
466
|
+
if (result !== null && result.unknownKeys.length > 0) {
|
|
467
|
+
issues.push(`unknown: ${result.unknownKeys.join(", ")}`);
|
|
468
|
+
}
|
|
469
|
+
if (issues.length > 0) {
|
|
470
|
+
this.errors.addOrReplace({
|
|
471
|
+
id: errId,
|
|
472
|
+
type: "warning",
|
|
473
|
+
message: `${prop}: ignored sub-fields (${issues.join("; ")}).`,
|
|
474
|
+
});
|
|
475
|
+
}
|
|
476
|
+
else {
|
|
477
|
+
this.errors.remove(errId);
|
|
478
|
+
}
|
|
479
|
+
}
|
|
480
|
+
/**
|
|
481
|
+
* Resolved actual measure. Blank/`auto` auto-detects `ac1`, else the
|
|
482
|
+
* first `ac*` slot, else the first available scenario — blank (unlike an
|
|
483
|
+
* explicit `auto`) additionally raises the `AUTO_actual` info warning
|
|
484
|
+
* (structure-chart convention).
|
|
485
|
+
*/
|
|
486
|
+
prepareActual() {
|
|
487
|
+
var _a, _b, _c, _d, _e;
|
|
488
|
+
const { data, parseError } = AxisConfig.parseSpec(this.actual, "measure");
|
|
489
|
+
if (parseError) {
|
|
490
|
+
return null;
|
|
491
|
+
}
|
|
492
|
+
const config = data !== null ? toBulletMeasureConfig(data).config : null;
|
|
493
|
+
if (config === null || config.measure.toLowerCase() === "auto") {
|
|
494
|
+
const explicitAuto = config !== null;
|
|
495
|
+
const available = (_b = (_a = this.datasetMeta) === null || _a === void 0 ? void 0 : _a.availableScenarios) !== null && _b !== void 0 ? _b : [];
|
|
496
|
+
const detected = (_d = (available.includes("ac1") ? "ac1" : ((_c = available.find((slot) => slot.startsWith("ac"))) !== null && _c !== void 0 ? _c : available[0]))) !== null && _d !== void 0 ? _d : "ac1";
|
|
497
|
+
if (!explicitAuto && this.datasetMeta !== null) {
|
|
498
|
+
this.errors.addOrReplace({
|
|
499
|
+
id: "AUTO_actual",
|
|
500
|
+
type: "warning",
|
|
501
|
+
message: `actual: not set, auto-detected: ${detected}`,
|
|
502
|
+
});
|
|
503
|
+
}
|
|
504
|
+
else {
|
|
505
|
+
this.errors.remove("AUTO_actual");
|
|
506
|
+
}
|
|
507
|
+
return config === null ? { measure: detected } : Object.assign(Object.assign({}, config), { measure: detected });
|
|
508
|
+
}
|
|
509
|
+
this.errors.remove("AUTO_actual");
|
|
510
|
+
return ((_e = VarianceMeasure.resolveMeasure(config.measure)) === null || _e === void 0 ? void 0 : _e.kind) === "scenario" ? config : null;
|
|
511
|
+
}
|
|
512
|
+
/**
|
|
513
|
+
* Resolved target measure. Blank/`auto` auto-detects `pl1` > `pp1` >
|
|
514
|
+
* `fc1`; when the dataset offers none the chart renders actual bars only
|
|
515
|
+
* (with a warning) and `null` is returned.
|
|
516
|
+
*/
|
|
517
|
+
prepareTarget() {
|
|
518
|
+
var _a, _b, _c;
|
|
519
|
+
const { data, parseError } = AxisConfig.parseSpec(this.target, "measure");
|
|
520
|
+
if (parseError) {
|
|
521
|
+
return null;
|
|
522
|
+
}
|
|
523
|
+
const config = data !== null ? toBulletMeasureConfig(data).config : null;
|
|
524
|
+
if (config === null || config.measure.toLowerCase() === "auto") {
|
|
525
|
+
const explicitAuto = config !== null;
|
|
526
|
+
const available = (_b = (_a = this.datasetMeta) === null || _a === void 0 ? void 0 : _a.availableScenarios) !== null && _b !== void 0 ? _b : [];
|
|
527
|
+
const detected = TARGET_SLOT_PREFERENCE.find((slot) => available.includes(slot));
|
|
528
|
+
if (detected === undefined) {
|
|
529
|
+
this.errors.remove("AUTO_target");
|
|
530
|
+
// Distinct id from the orchestrator-synced WARN_bullet-target-none:
|
|
531
|
+
// the inner element's sync walk would otherwise clear this warning.
|
|
532
|
+
if (this.datasetMeta !== null) {
|
|
533
|
+
this.errors.addOrReplace({
|
|
534
|
+
id: "WARN_bullet_target_unavailable",
|
|
535
|
+
type: "warning",
|
|
536
|
+
message: this.t(".bullet-target-none"),
|
|
537
|
+
});
|
|
538
|
+
}
|
|
539
|
+
else {
|
|
540
|
+
this.errors.remove("WARN_bullet_target_unavailable");
|
|
541
|
+
}
|
|
542
|
+
return null;
|
|
543
|
+
}
|
|
544
|
+
this.errors.remove("WARN_bullet_target_unavailable");
|
|
545
|
+
if (!explicitAuto && this.datasetMeta !== null) {
|
|
546
|
+
this.errors.addOrReplace({
|
|
547
|
+
id: "AUTO_target",
|
|
548
|
+
type: "warning",
|
|
549
|
+
message: `target: not set, auto-detected: ${detected}`,
|
|
550
|
+
});
|
|
551
|
+
}
|
|
552
|
+
else {
|
|
553
|
+
this.errors.remove("AUTO_target");
|
|
554
|
+
}
|
|
555
|
+
return config === null ? { measure: detected } : Object.assign(Object.assign({}, config), { measure: detected });
|
|
556
|
+
}
|
|
557
|
+
this.errors.remove("AUTO_target");
|
|
558
|
+
this.errors.remove("WARN_bullet_target_unavailable");
|
|
559
|
+
return ((_c = VarianceMeasure.resolveMeasure(config.measure)) === null || _c === void 0 ? void 0 : _c.kind) === "scenario" ? config : null;
|
|
560
|
+
}
|
|
561
|
+
prepareNormalize() {
|
|
562
|
+
var _a;
|
|
563
|
+
return ((_a = this.normalize) === null || _a === void 0 ? void 0 : _a.trim().toLowerCase()) === "none" ? "none" : "target";
|
|
564
|
+
}
|
|
565
|
+
prepareShowVariances() {
|
|
566
|
+
var _a;
|
|
567
|
+
return ((_a = this.variances) === null || _a === void 0 ? void 0 : _a.trim().toLowerCase()) !== "none";
|
|
568
|
+
}
|
|
569
|
+
/** KPI row level; `auto` resolves to the dataset's deepest populated level. */
|
|
570
|
+
prepareLevel() {
|
|
571
|
+
var _a, _b;
|
|
572
|
+
const value = (_a = this.level) === null || _a === void 0 ? void 0 : _a.trim().toLowerCase();
|
|
573
|
+
if (value === "rowgroup") {
|
|
574
|
+
return VarianceMeasure.AggregationLevel.ROWGROUP;
|
|
575
|
+
}
|
|
576
|
+
if (value === "category") {
|
|
577
|
+
return VarianceMeasure.AggregationLevel.CATEGORY;
|
|
578
|
+
}
|
|
579
|
+
if (value === "subcategory") {
|
|
580
|
+
return VarianceMeasure.AggregationLevel.SUBCATEGORY;
|
|
581
|
+
}
|
|
582
|
+
const suggested = (_b = this.datasetMeta) === null || _b === void 0 ? void 0 : _b.suggestedLevel;
|
|
583
|
+
if (suggested !== undefined && suggested !== "") {
|
|
584
|
+
const resolved = VarianceMeasure.AggregationLevel[suggested.toUpperCase()];
|
|
585
|
+
if (resolved !== undefined) {
|
|
586
|
+
return resolved;
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
return VarianceMeasure.AggregationLevel.CATEGORY;
|
|
590
|
+
}
|
|
591
|
+
/** Sort order; blank/`auto` uses the dataset's suggested order (structure-chart convention). */
|
|
592
|
+
prepareOrder() {
|
|
593
|
+
var _a, _b, _c, _d;
|
|
594
|
+
const isAuto = ((_a = this.order) === null || _a === void 0 ? void 0 : _a.trim().toLowerCase()) === "auto";
|
|
595
|
+
let orderStr;
|
|
596
|
+
if (withStyled.isBlankInput(this.order) || isAuto) {
|
|
597
|
+
if ((_b = this.datasetMeta) === null || _b === void 0 ? void 0 : _b.suggestedOrder) {
|
|
598
|
+
if (!isAuto) {
|
|
599
|
+
this.errors.addOrReplace({
|
|
600
|
+
id: "AUTO_order",
|
|
601
|
+
type: "warning",
|
|
602
|
+
message: `order: not set, auto-detected: ${this.datasetMeta.suggestedOrder}`,
|
|
603
|
+
});
|
|
604
|
+
}
|
|
605
|
+
else {
|
|
606
|
+
this.errors.remove("AUTO_order");
|
|
607
|
+
}
|
|
608
|
+
orderStr = this.datasetMeta.suggestedOrder;
|
|
609
|
+
}
|
|
610
|
+
else {
|
|
611
|
+
this.errors.remove("AUTO_order");
|
|
612
|
+
orderStr = "";
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
else {
|
|
616
|
+
this.errors.remove("AUTO_order");
|
|
617
|
+
orderStr = this.order;
|
|
618
|
+
}
|
|
619
|
+
const direction = (_d = Order.OrderDirection[(_c = this.orderDirection) === null || _c === void 0 ? void 0 : _c.toUpperCase()]) !== null && _d !== void 0 ? _d : Order.OrderDirection.ASC;
|
|
620
|
+
if (withStyled.isBlankInput(orderStr)) {
|
|
621
|
+
return new Order.Order([Order.OrderColumn.CATEGORYINDEX], direction);
|
|
622
|
+
}
|
|
623
|
+
const hierarchy = orderStr
|
|
624
|
+
.split(",")
|
|
625
|
+
.map((entry) => Order.OrderColumn[entry.trim().toUpperCase()])
|
|
626
|
+
.filter((entry) => entry !== undefined);
|
|
627
|
+
return new Order.Order(hierarchy.length > 0 ? hierarchy : [Order.OrderColumn.CATEGORYINDEX], direction);
|
|
628
|
+
}
|
|
629
|
+
prepareLabels() {
|
|
630
|
+
const defaults = this.labelDefaults();
|
|
631
|
+
const { data, parseError } = AxisConfig.parseSpec(this.labels, null);
|
|
632
|
+
if (parseError || data === null) {
|
|
633
|
+
return { show: defaults.show, decimals: defaults.decimals };
|
|
634
|
+
}
|
|
635
|
+
return toBulletLabelConfig(data, defaults).config;
|
|
636
|
+
}
|
|
637
|
+
prepareLimit() {
|
|
638
|
+
const value = Math.floor(Number(this.limit) || 0);
|
|
639
|
+
return value > 0 ? value : 0;
|
|
640
|
+
}
|
|
641
|
+
i18nLocalKeys() {
|
|
642
|
+
return ["no-data", "target", "axis.in"];
|
|
643
|
+
}
|
|
644
|
+
prepareI18n() {
|
|
645
|
+
const i18nMapLocal = new Map(this.i18nLocalKeys().map((key) => [key, this.t(".".concat(key))]));
|
|
646
|
+
const i18nMapGlobal = new Map(contextProtocol.globalLabelKeys.map((key) => [key, this.t("global.".concat(key))]));
|
|
647
|
+
return new Map([...i18nMapGlobal.entries(), ...i18nMapLocal.entries()]);
|
|
648
|
+
}
|
|
649
|
+
prepareStyle() {
|
|
650
|
+
const effectiveFactor = this.getEffectiveScaleFactor();
|
|
651
|
+
return this.componentStyle(($) => {
|
|
652
|
+
const baseFontSize = $["global"]["fontSizePx"];
|
|
653
|
+
const scaledFontSize = baseFontSize * effectiveFactor;
|
|
654
|
+
return {
|
|
655
|
+
scaleFactors: $["bn-chart-bullet"]["scaleFactors"],
|
|
656
|
+
fontStyles: {
|
|
657
|
+
font: `${scaledFontSize}px ${$["global"]["fontFamily"]}`,
|
|
658
|
+
size: scaledFontSize,
|
|
659
|
+
color: $["global"]["fontColor"],
|
|
660
|
+
background: $["global"]["fontBackgroundColor"],
|
|
661
|
+
leading: 1.8,
|
|
662
|
+
},
|
|
663
|
+
axisStyles: $["bn-chart-bullet"]["axisStyles"],
|
|
664
|
+
barStyles: $["bn-chart-bullet"]["barStyles"],
|
|
665
|
+
varianceStyles: $["bn-chart-bullet"]["varianceStyles"],
|
|
666
|
+
rangeColors: $["bn-chart-bullet"]["rangeColors"],
|
|
667
|
+
padding: $["bn-chart-bullet"]["padding"],
|
|
668
|
+
};
|
|
669
|
+
});
|
|
670
|
+
}
|
|
671
|
+
getEffectiveScaleFactor() {
|
|
672
|
+
const { mode, factor } = scaling.parseScaling(this.scale);
|
|
673
|
+
if (mode === "factor")
|
|
674
|
+
return factor;
|
|
675
|
+
if (mode === "auto" || mode === "empty")
|
|
676
|
+
return this.appliedScaleFactor;
|
|
677
|
+
return 1;
|
|
678
|
+
}
|
|
679
|
+
getFontStyles() {
|
|
680
|
+
const effectiveFactor = this.getEffectiveScaleFactor();
|
|
681
|
+
return this.componentStyle(($) => {
|
|
682
|
+
var _a, _b, _c, _d;
|
|
683
|
+
const baseFontSize = ((_a = $["global"]) === null || _a === void 0 ? void 0 : _a["fontSizePx"]) || 13.3333;
|
|
684
|
+
return {
|
|
685
|
+
"--bn-font-family": ((_b = $["global"]) === null || _b === void 0 ? void 0 : _b["fontFamily"]) || "'Noto Sans', sans-serif",
|
|
686
|
+
"--bn-font-size": `${baseFontSize * effectiveFactor}px`,
|
|
687
|
+
"--bn-font-color": ((_c = $["global"]) === null || _c === void 0 ? void 0 : _c["fontColor"]) || "#000000",
|
|
688
|
+
"--bn-font-background": ((_d = $["global"]) === null || _d === void 0 ? void 0 : _d["fontBackgroundColor"]) || "#ffffff",
|
|
689
|
+
};
|
|
690
|
+
});
|
|
691
|
+
}
|
|
692
|
+
/**
|
|
693
|
+
* Dataset field map for the editor-companion: hierarchy fields plus the
|
|
694
|
+
* 16 scenario slots; descriptions of currently-mapped slots reflect the
|
|
695
|
+
* live mapping (e.g. `pl1 → "target: Plan"`).
|
|
696
|
+
*/
|
|
697
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
698
|
+
getDataStructure() {
|
|
699
|
+
const slots = {};
|
|
700
|
+
for (const family of ["ac", "pp", "fc", "pl"]) {
|
|
701
|
+
for (const index of [1, 2, 3, 4]) {
|
|
702
|
+
slots[`${family}${index}`] = { type: "number", isOptional: true, description: "" };
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
const mapped = {
|
|
706
|
+
actual: this.prepareActual(),
|
|
707
|
+
target: this.prepareTarget(),
|
|
708
|
+
};
|
|
709
|
+
for (const [prop, config] of Object.entries(mapped)) {
|
|
710
|
+
if (config === null || slots[config.measure] === undefined) {
|
|
711
|
+
continue;
|
|
712
|
+
}
|
|
713
|
+
const label = config.label !== undefined ? config.label : config.measure;
|
|
714
|
+
slots[config.measure].description = `${prop}: ${label}`;
|
|
715
|
+
}
|
|
716
|
+
return {
|
|
717
|
+
IBulletChartDataRow: Object.assign({ operation: { type: "string", isOptional: false, description: "" }, rowGroup: { type: "string", isOptional: true, description: "" }, rowGroupIndex: { type: "number", isOptional: true, description: "" }, category: { type: "string", isOptional: false, description: "" }, categoryIndex: { type: "number", isOptional: false, description: "" }, subCategory: { type: "string", isOptional: true, description: "" }, subCategoryIndex: { type: "number", isOptional: true, description: "" } }, slots),
|
|
718
|
+
};
|
|
719
|
+
}
|
|
720
|
+
chartTemplate() {
|
|
721
|
+
const actual = this.prepareActual();
|
|
722
|
+
const target = this.prepareTarget();
|
|
723
|
+
const ranges = parseRanges(this.ranges).ranges;
|
|
724
|
+
const normalize = this.prepareNormalize();
|
|
725
|
+
this.setBlockingError("ERR_bullet_measure_same", actual !== null && target !== null && actual.measure === target.measure
|
|
726
|
+
? this.t(".bullet-measure-same", { measure: actual.measure })
|
|
727
|
+
: null);
|
|
728
|
+
if (ranges.length > 0 && normalize === "target") {
|
|
729
|
+
this.errors.addOrReplace({
|
|
730
|
+
id: "WARN_bullet_ranges_ignored",
|
|
731
|
+
type: "warning",
|
|
732
|
+
message: this.t(".bullet-ranges-ignored"),
|
|
733
|
+
});
|
|
734
|
+
}
|
|
735
|
+
else {
|
|
736
|
+
this.errors.remove("WARN_bullet_ranges_ignored");
|
|
737
|
+
}
|
|
738
|
+
if (this.hasBlockingErrors() || actual === null) {
|
|
739
|
+
return null;
|
|
740
|
+
}
|
|
741
|
+
return (index.h("ibcs-chart-bullet", { tableName: this.datasetName, dataVersion: this.dataVersion, chartTitle: this.chartTitle, actual: actual, target: target, ranges: ranges, normalize: normalize, showVariances: this.prepareShowVariances(), level: this.prepareLevel(), order: this.prepareOrder(), limit: this.prepareLimit(), labels: this.prepareLabels(), filter: this.filter, styles: this.prepareStyle(), i18n: this.prepareI18n(), containerWidth: scaling.getParentDimensions(this.element).width, ruleSetConfig: this.ruleSetConfig(), errors: this.errors, translate: this.translateForInner }));
|
|
742
|
+
}
|
|
743
|
+
render() {
|
|
744
|
+
return (index.h(index.Host, { key: '9fd8c656471de9582652769edf49b80756575830', style: this.getFontStyles() }, index.h("div", { key: 'a6fe8d33dde8912a77a86244db092bb364c1aeaa', class: "container" }, this.chartTemplate())));
|
|
745
|
+
}
|
|
746
|
+
get element() { return index.getElement(this); }
|
|
747
|
+
static get watchers() { return {
|
|
748
|
+
"actual": [{
|
|
749
|
+
"validateActual": 0
|
|
750
|
+
}],
|
|
751
|
+
"target": [{
|
|
752
|
+
"validateTarget": 0
|
|
753
|
+
}],
|
|
754
|
+
"ranges": [{
|
|
755
|
+
"validateRanges": 0
|
|
756
|
+
}],
|
|
757
|
+
"normalize": [{
|
|
758
|
+
"validateNormalize": 0
|
|
759
|
+
}],
|
|
760
|
+
"variances": [{
|
|
761
|
+
"validateVariances": 0
|
|
762
|
+
}],
|
|
763
|
+
"level": [{
|
|
764
|
+
"validateLevel": 0
|
|
765
|
+
}],
|
|
766
|
+
"order": [{
|
|
767
|
+
"validateOrder": 0
|
|
768
|
+
}],
|
|
769
|
+
"orderDirection": [{
|
|
770
|
+
"validateOrderDirection": 0
|
|
771
|
+
}],
|
|
772
|
+
"limit": [{
|
|
773
|
+
"validateLimit": 0
|
|
774
|
+
}],
|
|
775
|
+
"labels": [{
|
|
776
|
+
"validateLabels": 0
|
|
777
|
+
}],
|
|
778
|
+
"scale": [{
|
|
779
|
+
"validateScale": 0
|
|
780
|
+
}]
|
|
781
|
+
}; }
|
|
782
|
+
};
|
|
783
|
+
ChartBullet.style = bnChartBulletCss();
|
|
784
|
+
|
|
785
|
+
exports.bn_chart_bullet = ChartBullet;
|