@bino-bi/bn-template-engine 1.0.0-alpha.9 → 1.0.0-next.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +203 -21
- package/dist/bn-template-engine/bn-template-engine.esm.js +1 -1
- package/dist/bn-template-engine/p-28d5c266.entry.js +1 -0
- package/dist/bn-template-engine/p-2d3ea756.entry.js +1 -0
- package/dist/bn-template-engine/p-2fba7c99.entry.js +1 -0
- package/dist/bn-template-engine/p-6077155f.entry.js +1 -0
- package/dist/bn-template-engine/p-687032d5.entry.js +1 -0
- package/dist/bn-template-engine/p-6c7f0076.entry.js +1 -0
- package/dist/bn-template-engine/p-6lOdN-fB.js +1 -0
- package/dist/bn-template-engine/p-7e9dbc93.entry.js +1 -0
- package/dist/bn-template-engine/p-99477a27.entry.js +1 -0
- package/dist/bn-template-engine/p-A8xyE4b1.js +1 -0
- package/dist/bn-template-engine/p-BA48JiHe.js +1 -0
- package/dist/bn-template-engine/p-BgIpdpfH.js +1 -0
- package/dist/bn-template-engine/p-BjBz5cSL.js +1 -0
- package/dist/bn-template-engine/p-BpWWgN6k.js +1 -0
- package/dist/bn-template-engine/p-C5uvAEKI.js +1 -0
- package/dist/bn-template-engine/p-C8Q0lsaU.js +1 -0
- package/dist/bn-template-engine/p-C9i1Xsib.js +1 -0
- package/dist/bn-template-engine/p-CJThzFZm.js +1 -0
- package/dist/bn-template-engine/p-CYE0I1Mx.js +1 -0
- package/dist/bn-template-engine/p-DsTzlzxQ.js +1 -0
- package/dist/bn-template-engine/p-DwYUTvvI.js +1 -0
- package/dist/bn-template-engine/p-a1380d7c.entry.js +1 -0
- package/dist/bn-template-engine/p-a4ea9a79.entry.js +1 -0
- package/dist/bn-template-engine/p-a8291de2.entry.js +1 -0
- package/dist/bn-template-engine/p-b5274369.entry.js +1 -0
- package/dist/bn-template-engine/p-b9e94127.entry.js +1 -0
- package/dist/bn-template-engine/p-ba912130.entry.js +1 -0
- package/dist/bn-template-engine/p-de29986f.entry.js +1 -0
- package/dist/bn-template-engine/p-eEfqksk-.js +1 -0
- package/dist/bn-template-engine/p-fFtEvsY-.js +1 -0
- package/dist/cjs/AxisConfig-D7CAyPLO.js +233 -0
- package/dist/cjs/LabelCollisionManager-DkdQ9Xdg.js +412 -0
- package/dist/cjs/NumericScale-BAyYXpKL.js +107 -0
- package/dist/cjs/Order-IPfAP0q8.js +87 -0
- package/dist/cjs/SVGStyle-BD8jApd4.js +8209 -0
- package/dist/cjs/SVGVariancesStyleGroup-BaWzR951.js +50 -0
- package/dist/cjs/VarianceMeasure-BBWTgv2e.js +372 -0
- package/dist/cjs/XYChartDataRow-BoR0CTfl.js +829 -0
- package/dist/cjs/bn-asset_21.cjs.entry.js +16105 -0
- package/dist/cjs/bn-chart-bubble.cjs.entry.js +762 -0
- package/dist/cjs/bn-chart-bullet.cjs.entry.js +785 -0
- package/dist/cjs/bn-chart-scatter.cjs.entry.js +658 -0
- package/dist/cjs/bn-grid.cjs.entry.js +5 -3
- package/dist/cjs/bn-image.cjs.entry.js +5 -3
- package/dist/cjs/bn-internationalization.cjs.entry.js +10 -8
- package/dist/cjs/bn-ruleset.cjs.entry.js +41 -0
- package/dist/cjs/bn-template-engine.cjs.js +1 -1
- package/dist/cjs/bn-template.cjs.entry.js +1 -1
- package/dist/cjs/bn-text.cjs.entry.js +8 -79
- package/dist/cjs/bn-tree.cjs.entry.js +4 -2
- package/dist/cjs/context-protocol-BBhT9B52.js +9505 -0
- package/dist/cjs/editor-companion.cjs.entry.js +13 -6
- package/dist/cjs/ibcs-chart-bubble.cjs.entry.js +624 -0
- package/dist/cjs/ibcs-chart-bullet.cjs.entry.js +673 -0
- package/dist/cjs/ibcs-chart-scatter.cjs.entry.js +667 -0
- package/dist/cjs/layoutObserver-DUYYkDMQ.js +199 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sanitizeHtml-LuZr1IMd.js +85 -0
- package/dist/cjs/scaling-BIJQ2NV1.js +589 -0
- package/dist/cjs/{withBodyObserver-D7BKWN2N.js → withBodyObserver-BKUE_ypL.js} +12 -7
- package/dist/cjs/withScalingGroup-D5clRvRe.js +73 -0
- package/dist/cjs/withStyled-Cm9dWQhu.js +1168 -0
- package/dist/collection/collection-manifest.json +9 -1
- package/dist/collection/components/bn-body/bn-body.css +1 -0
- package/dist/collection/components/bn-card/bn-card.css +2 -0
- package/dist/collection/components/bn-chart-bubble/bn-chart-bubble.css +10 -0
- package/dist/collection/components/bn-chart-bubble/bn-chart-bubble.js +1110 -0
- package/dist/collection/components/bn-chart-bubble/ibcs-chart-bubble.css +9 -0
- package/dist/collection/components/bn-chart-bubble/ibcs-chart-bubble.js +653 -0
- package/dist/collection/components/bn-chart-bubble/utils/BubbleChart.js +472 -0
- package/dist/collection/components/bn-chart-bullet/bn-chart-bullet.css +10 -0
- package/dist/collection/components/bn-chart-bullet/bn-chart-bullet.js +1014 -0
- package/dist/collection/components/bn-chart-bullet/ibcs-chart-bullet.css +9 -0
- package/dist/collection/components/bn-chart-bullet/ibcs-chart-bullet.js +538 -0
- package/dist/collection/components/bn-chart-bullet/utils/BulletChart.js +440 -0
- package/dist/collection/components/bn-chart-bullet/utils/model/BulletChartStyle.js +132 -0
- package/dist/collection/components/bn-chart-bullet/utils/model/BulletConfig.js +89 -0
- package/dist/collection/components/bn-chart-bullet/utils/model/index.js +2 -0
- package/dist/collection/components/bn-chart-scatter/bn-chart-scatter.css +10 -0
- package/dist/collection/components/bn-chart-scatter/bn-chart-scatter.js +965 -0
- package/dist/collection/components/bn-chart-scatter/ibcs-chart-scatter.css +9 -0
- package/dist/collection/components/bn-chart-scatter/ibcs-chart-scatter.js +580 -0
- package/dist/collection/components/bn-chart-scatter/utils/ScatterChart.js +409 -0
- package/dist/collection/components/bn-chart-structure/bn-chart-structure.js +126 -43
- package/dist/collection/components/bn-chart-structure/ibcs-chart-structure.js +104 -37
- package/dist/collection/components/bn-chart-structure/utils/StructureChart.js +101 -60
- package/dist/collection/components/bn-chart-structure/utils/helper/ElementPositions.js +46 -4
- package/dist/collection/components/bn-chart-structure/utils/model/StructureChartComponentConfig.js +5 -4
- package/dist/collection/components/bn-chart-time/bn-chart-time.css +1 -1
- package/dist/collection/components/bn-chart-time/bn-chart-time.js +161 -44
- package/dist/collection/components/bn-chart-time/ibcs-chart-time.js +97 -32
- package/dist/collection/components/bn-chart-time/utils/TimeChart.js +151 -75
- package/dist/collection/components/bn-chart-time/utils/elements/StackedColumn.js +3 -3
- package/dist/collection/components/bn-chart-time/utils/model/TimeChartComponentConfig.js +10 -4
- package/dist/collection/components/bn-chart-time/utils/model/TimeChartDataRow.js +2 -0
- package/dist/collection/components/bn-component-style/bn-component-style.js +1 -1
- package/dist/collection/components/bn-context/bn-context.js +20 -1
- package/dist/collection/components/bn-dataset/bn-dataset.js +226 -23
- package/dist/collection/components/bn-datasource/bn-datasource.js +163 -12
- package/dist/collection/components/bn-footer/bn-footer.js +1 -1
- package/dist/collection/components/bn-grid/bn-grid.js +20 -1
- package/dist/collection/components/bn-image/bn-image.js +1 -1
- package/dist/collection/components/bn-internationalization/bn-internationalization.js +10 -7
- package/dist/collection/components/bn-layout-card/bn-layout-card.css +8 -3
- package/dist/collection/components/bn-layout-card/bn-layout-card.js +98 -35
- package/dist/collection/components/bn-layout-page/bn-layout-page.css +5 -3
- package/dist/collection/components/bn-layout-page/bn-layout-page.js +98 -25
- package/dist/collection/components/bn-message/bn-message.css +6 -2
- package/dist/collection/components/bn-message/bn-message.js +3 -2
- package/dist/collection/components/bn-page/bn-page.js +1 -1
- package/dist/collection/components/bn-ruleset/bn-ruleset.css +3 -0
- package/dist/collection/components/bn-ruleset/bn-ruleset.js +68 -0
- package/dist/collection/components/bn-scaling-group/bn-scaling-group.css +3 -0
- package/dist/collection/components/bn-scaling-group/bn-scaling-group.js +136 -0
- package/dist/collection/components/bn-table/bn-table.js +318 -62
- package/dist/collection/components/bn-table/ibcs-table.css +8 -0
- package/dist/collection/components/bn-table/ibcs-table.js +162 -33
- package/dist/collection/components/bn-table/utils/Table.js +72 -29
- package/dist/collection/components/bn-table/utils/elements/CellBarChart.js +13 -8
- package/dist/collection/components/bn-table/utils/elements/TableRow.js +3 -2
- package/dist/collection/components/bn-table/utils/elements/WaterfallBar.js +47 -0
- package/dist/collection/components/bn-table/utils/elements/index.js +1 -0
- package/dist/collection/components/bn-table/utils/factories/tableDataSetFactory.js +120 -23
- package/dist/collection/components/bn-table/utils/helper/DataQuery.js +380 -50
- package/dist/collection/components/bn-table/utils/helper/IntervalColumns.js +140 -0
- package/dist/collection/components/bn-table/utils/helper/QueryGroup.js +4 -9
- package/dist/collection/components/bn-table/utils/helper/WaterfallCalculator.js +166 -0
- package/dist/collection/components/bn-table/utils/helper/index.js +2 -0
- package/dist/collection/components/bn-table/utils/model/TableAttribute.js +46 -0
- package/dist/collection/components/bn-table/utils/model/TableComponentConfig.js +20 -4
- package/dist/collection/components/bn-template/bn-template.js +1 -1
- package/dist/collection/components/bn-text/bn-text.js +2 -75
- package/dist/collection/components/bn-title/bn-title.js +31 -3
- package/dist/collection/components/bn-title/ibcs-title/ibcs-title.css +4 -0
- package/dist/collection/components/bn-title/ibcs-title/ibcs-title.js +52 -6
- package/dist/collection/components/bn-title/ibcs-title/utils/Title.js +7 -4
- package/dist/collection/components/bn-title/ibcs-title/utils/factories/TitleDataSetFactory.js +6 -2
- package/dist/collection/components/bn-title/ibcs-title/utils/model/TitleConfig.js +5 -0
- package/dist/collection/components/bn-tree/bn-tree.js +19 -0
- package/dist/collection/components/editor-companion/editor-companion.js +12 -5
- package/dist/collection/context/scopedDb.js +127 -0
- package/dist/collection/stores/componentStyles.js +67 -0
- package/dist/collection/stores/createScopedStores.js +11 -5
- package/dist/collection/stores/internationalization.js +77 -3
- package/dist/collection/stores/ruleSets.js +46 -0
- package/dist/collection/utils/DateStringFactory.js +31 -0
- package/dist/collection/utils/constants.js +5 -0
- package/dist/collection/utils/dataAnalyzer.js +14 -8
- package/dist/collection/utils/ibcsRuleSet.js +14 -26
- package/dist/collection/utils/layoutObserver.js +88 -0
- package/dist/collection/utils/parentDimensions.js +71 -15
- package/dist/collection/utils/sanitizeHtml.js +81 -0
- package/dist/collection/utils/validate.js +47 -0
- package/dist/collection/utils/withBodyObserver.js +12 -7
- package/dist/collection/utils/withComponentStyle.js +3 -5
- package/dist/collection/utils/withDataset.js +43 -39
- package/dist/collection/utils/withDatasource.js +28 -18
- package/dist/collection/utils/withInheritedProps.js +26 -1
- package/dist/collection/utils/withRuleSet.js +105 -0
- package/dist/collection/utils/withScalingGroup.js +69 -0
- package/dist/collection/utils/withTranslation.js +53 -15
- package/dist/collection/utils/xy/FacetGrid.js +36 -0
- package/dist/collection/utils/xy/IsoCurves.js +156 -0
- package/dist/collection/utils/xy/NumericScale.js +103 -0
- package/dist/collection/utils/xy/PointLabeler.js +96 -0
- package/dist/collection/utils/xy/RadiusScale.js +42 -0
- package/dist/collection/utils/xy/SeriesPalette.js +80 -0
- package/dist/collection/utils/xy/VarianceMeasure.js +76 -0
- package/dist/collection/utils/xy/XYFrame.js +120 -0
- package/dist/collection/utils/xy/XYLegend.js +107 -0
- package/dist/collection/utils/xy/model/AxisConfig.js +221 -0
- package/dist/collection/utils/xy/model/ScaleFactorsXYChart.js +69 -0
- package/dist/collection/utils/xy/model/XYChartDataRow.js +0 -0
- package/dist/collection/utils/xy/model/XYChartStyle.js +52 -0
- package/dist/components/AxisConfig.js +1 -0
- package/dist/components/CompareUtil.js +1 -0
- package/dist/components/DataFormatDigits.js +1 -1
- package/dist/components/DateStringFactory.js +1 -1
- package/dist/components/LabelCollisionManager.js +1 -0
- package/dist/components/NumericScale.js +1 -0
- package/dist/components/Order.js +1 -1
- package/dist/components/SVGVariancesStyleGroup.js +1 -1
- package/dist/components/SiPrefix.js +1 -0
- package/dist/components/StringAdapter.js +1 -0
- package/dist/components/VarianceMeasure.js +1 -0
- package/dist/components/XYChartDataRow.js +1 -0
- package/dist/components/bn-body2.js +1 -1
- package/dist/components/bn-card2.js +1 -1
- package/dist/components/bn-chart-bubble.d.ts +11 -0
- package/dist/components/bn-chart-bubble.js +1 -0
- package/dist/components/bn-chart-bullet.d.ts +11 -0
- package/dist/components/bn-chart-bullet.js +1 -0
- package/dist/components/bn-chart-scatter.d.ts +11 -0
- package/dist/components/bn-chart-scatter.js +1 -0
- package/dist/components/bn-chart-structure.js +1 -1
- package/dist/components/bn-chart-time.js +1 -1
- package/dist/components/bn-component-style.js +1 -1
- package/dist/components/bn-context.js +1 -1
- package/dist/components/bn-dataset.js +1 -1
- package/dist/components/bn-datasource.js +1 -1
- package/dist/components/bn-footer2.js +1 -1
- package/dist/components/bn-grid.js +1 -1
- package/dist/components/bn-image.js +1 -1
- package/dist/components/bn-internationalization.js +1 -1
- package/dist/components/bn-layout-card.js +1 -1
- package/dist/components/bn-layout-page.js +1 -1
- package/dist/components/bn-message2.js +1 -1
- package/dist/components/bn-page2.js +1 -1
- package/dist/components/bn-ruleset.d.ts +11 -0
- package/dist/components/bn-ruleset.js +1 -0
- package/dist/components/bn-scaling-group.d.ts +11 -0
- package/dist/components/bn-scaling-group.js +1 -0
- package/dist/components/bn-table.js +1 -1
- package/dist/components/bn-template.js +1 -1
- package/dist/components/bn-text.js +1 -1
- package/dist/components/bn-title2.js +1 -1
- package/dist/components/bn-tree.js +1 -1
- package/dist/components/context-protocol.js +1 -1
- package/dist/components/editor-companion.js +1 -1
- package/dist/components/formatter.js +1 -0
- package/dist/components/ibcs-chart-bubble.d.ts +11 -0
- package/dist/components/ibcs-chart-bubble.js +1 -0
- package/dist/components/ibcs-chart-bubble2.js +1 -0
- package/dist/components/ibcs-chart-bullet.d.ts +11 -0
- package/dist/components/ibcs-chart-bullet.js +1 -0
- package/dist/components/ibcs-chart-bullet2.js +1 -0
- package/dist/components/ibcs-chart-scatter.d.ts +11 -0
- package/dist/components/ibcs-chart-scatter.js +1 -0
- package/dist/components/ibcs-chart-scatter2.js +1 -0
- package/dist/components/ibcs-chart-structure2.js +1 -1
- package/dist/components/ibcs-chart-time2.js +1 -1
- package/dist/components/ibcs-table2.js +1 -1
- package/dist/components/ibcs-title2.js +1 -1
- package/dist/components/layoutObserver.js +1 -0
- package/dist/components/luxon.js +1 -0
- package/dist/components/main.js +1 -0
- package/dist/components/merge.js +1 -0
- package/dist/components/sanitizeHtml.js +1 -0
- package/dist/components/stackColors.js +1 -0
- package/dist/components/validate.js +1 -1
- package/dist/components/withBodyObserver.js +1 -1
- package/dist/components/withComponentStyle.js +1 -1
- package/dist/components/withDataset.js +1 -0
- package/dist/components/withRuleSet.js +1 -0
- package/dist/components/withScalingGroup.js +1 -0
- package/dist/components/withStyled.js +1 -1
- package/dist/components/withTranslation.js +1 -1
- package/dist/esm/AxisConfig-ByIP5J-9.js +224 -0
- package/dist/esm/LabelCollisionManager-DaNiDiM9.js +404 -0
- package/dist/esm/NumericScale-DsTzlzxQ.js +105 -0
- package/dist/esm/Order-BQeJE_yi.js +83 -0
- package/dist/esm/SVGStyle-BwBlY3Km.js +8199 -0
- package/dist/esm/SVGVariancesStyleGroup-BpGW4CvN.js +48 -0
- package/dist/esm/VarianceMeasure-CE3N8Bea.js +364 -0
- package/dist/esm/XYChartDataRow-DeMI1JKU.js +820 -0
- package/dist/esm/bn-asset_21.entry.js +16083 -0
- package/dist/esm/bn-chart-bubble.entry.js +760 -0
- package/dist/esm/bn-chart-bullet.entry.js +783 -0
- package/dist/esm/bn-chart-scatter.entry.js +656 -0
- package/dist/esm/bn-grid.entry.js +5 -3
- package/dist/esm/bn-image.entry.js +5 -3
- package/dist/esm/bn-internationalization.entry.js +10 -8
- package/dist/esm/bn-ruleset.entry.js +39 -0
- package/dist/esm/bn-template-engine.js +1 -1
- package/dist/esm/bn-template.entry.js +1 -1
- package/dist/esm/bn-text.entry.js +7 -78
- package/dist/esm/bn-tree.entry.js +4 -2
- package/dist/esm/context-protocol-d8MHrEo8.js +9490 -0
- package/dist/esm/editor-companion.entry.js +13 -6
- package/dist/esm/ibcs-chart-bubble.entry.js +622 -0
- package/dist/esm/ibcs-chart-bullet.entry.js +671 -0
- package/dist/esm/ibcs-chart-scatter.entry.js +665 -0
- package/dist/esm/layoutObserver-BJBEyhNf.js +196 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sanitizeHtml-BA48JiHe.js +83 -0
- package/dist/esm/scaling-BGnpSN1j.js +581 -0
- package/dist/esm/{withBodyObserver-AFk2wwHT.js → withBodyObserver-IokS6fHD.js} +12 -7
- package/dist/esm/withScalingGroup-CC3UcvC5.js +71 -0
- package/dist/esm/withStyled-2l5Tx3cf.js +1135 -0
- package/dist/types/components/bn-chart-bubble/bn-chart-bubble.d.ts +193 -0
- package/dist/types/components/bn-chart-bubble/ibcs-chart-bubble.d.ts +58 -0
- package/dist/types/components/bn-chart-bubble/utils/BubbleChart.d.ts +91 -0
- package/dist/types/components/bn-chart-bullet/bn-chart-bullet.d.ts +172 -0
- package/dist/types/components/bn-chart-bullet/ibcs-chart-bullet.d.ts +52 -0
- package/dist/types/components/bn-chart-bullet/utils/BulletChart.d.ts +91 -0
- package/dist/types/components/bn-chart-bullet/utils/model/BulletChartStyle.d.ts +70 -0
- package/dist/types/components/bn-chart-bullet/utils/model/BulletConfig.d.ts +43 -0
- package/dist/types/components/bn-chart-bullet/utils/model/index.d.ts +2 -0
- package/dist/types/components/bn-chart-scatter/bn-chart-scatter.d.ts +172 -0
- package/dist/types/components/bn-chart-scatter/ibcs-chart-scatter.d.ts +53 -0
- package/dist/types/components/bn-chart-scatter/utils/ScatterChart.d.ts +66 -0
- package/dist/types/components/bn-chart-structure/bn-chart-structure.d.ts +19 -5
- package/dist/types/components/bn-chart-structure/ibcs-chart-structure.d.ts +13 -6
- package/dist/types/components/bn-chart-structure/utils/StructureChart.d.ts +21 -12
- package/dist/types/components/bn-chart-structure/utils/helper/ElementPositions.d.ts +16 -1
- package/dist/types/components/bn-chart-structure/utils/model/StructureChartComponentConfig.d.ts +5 -3
- package/dist/types/components/bn-chart-time/bn-chart-time.d.ts +53 -13
- package/dist/types/components/bn-chart-time/ibcs-chart-time.d.ts +13 -6
- package/dist/types/components/bn-chart-time/utils/TimeChart.d.ts +21 -12
- package/dist/types/components/bn-chart-time/utils/model/TimeChartComponentConfig.d.ts +7 -3
- package/dist/types/components/bn-context/bn-context.d.ts +8 -0
- package/dist/types/components/bn-dataset/bn-dataset.d.ts +47 -5
- package/dist/types/components/bn-datasource/bn-datasource.d.ts +53 -6
- package/dist/types/components/bn-grid/bn-grid.d.ts +8 -0
- package/dist/types/components/bn-layout-card/bn-layout-card.d.ts +39 -8
- package/dist/types/components/bn-layout-page/bn-layout-page.d.ts +36 -1
- package/dist/types/components/bn-message/bn-message.d.ts +5 -2
- package/dist/types/components/bn-ruleset/bn-ruleset.d.ts +8 -0
- package/dist/types/components/bn-scaling-group/bn-scaling-group.d.ts +37 -0
- package/dist/types/components/bn-table/bn-table.d.ts +74 -12
- package/dist/types/components/bn-table/ibcs-table.d.ts +27 -4
- package/dist/types/components/bn-table/utils/Table.d.ts +16 -6
- package/dist/types/components/bn-table/utils/elements/Cell.d.ts +2 -0
- package/dist/types/components/bn-table/utils/elements/CellBarChart.d.ts +33 -0
- package/dist/types/components/bn-table/utils/elements/TableRow.d.ts +2 -1
- package/dist/types/components/bn-table/utils/elements/WaterfallBar.d.ts +21 -0
- package/dist/types/components/bn-table/utils/elements/index.d.ts +1 -0
- package/dist/types/components/bn-table/utils/factories/tableDataSetFactory.d.ts +17 -9
- package/dist/types/components/bn-table/utils/helper/DataQuery.d.ts +35 -3
- package/dist/types/components/bn-table/utils/helper/IntervalColumns.d.ts +37 -0
- package/dist/types/components/bn-table/utils/helper/QueryGroup.d.ts +4 -5
- package/dist/types/components/bn-table/utils/helper/WaterfallCalculator.d.ts +55 -0
- package/dist/types/components/bn-table/utils/helper/index.d.ts +2 -0
- package/dist/types/components/bn-table/utils/model/TableAttribute.d.ts +22 -0
- package/dist/types/components/bn-table/utils/model/TableComponentConfig.d.ts +12 -3
- package/dist/types/components/bn-table/utils/model/index.d.ts +21 -0
- package/dist/types/components/bn-title/bn-title.d.ts +12 -1
- package/dist/types/components/bn-title/ibcs-title/ibcs-title.d.ts +4 -0
- package/dist/types/components/bn-title/ibcs-title/utils/Title.d.ts +1 -0
- package/dist/types/components/bn-title/ibcs-title/utils/factories/TitleDataSetFactory.d.ts +3 -1
- package/dist/types/components/bn-title/ibcs-title/utils/model/TitleConfig.d.ts +2 -0
- package/dist/types/components/bn-tree/bn-tree.d.ts +8 -0
- package/dist/types/components/editor-companion/editor-companion.d.ts +2 -0
- package/dist/types/components.d.ts +1725 -116
- package/dist/types/context/context-protocol.d.ts +7 -3
- package/dist/types/context/scopedDb.d.ts +37 -0
- package/dist/types/stores/componentStyles.d.ts +41 -0
- package/dist/types/stores/createScopedStores.d.ts +4 -2
- package/dist/types/stores/ruleSets.d.ts +40 -0
- package/dist/types/utils/DateStringFactory.d.ts +20 -1
- package/dist/types/utils/constants.d.ts +5 -0
- package/dist/types/utils/dataAnalyzer.d.ts +2 -1
- package/dist/types/utils/ibcsRuleSet.d.ts +6 -1
- package/dist/types/utils/layoutObserver.d.ts +27 -0
- package/dist/types/utils/model/ChartStyles.d.ts +2 -1
- package/dist/types/utils/parentDimensions.d.ts +1 -1
- package/dist/types/utils/sanitizeHtml.d.ts +6 -0
- package/dist/types/utils/validate.d.ts +18 -0
- package/dist/types/utils/withDataset.d.ts +6 -2
- package/dist/types/utils/withDatasource.d.ts +3 -3
- package/dist/types/utils/withInheritedProps.d.ts +19 -0
- package/dist/types/utils/withRuleSet.d.ts +24 -0
- package/dist/types/utils/withScalingGroup.d.ts +14 -0
- package/dist/types/utils/withTranslation.d.ts +15 -5
- package/dist/types/utils/xy/FacetGrid.d.ts +27 -0
- package/dist/types/utils/xy/IsoCurves.d.ts +46 -0
- package/dist/types/utils/xy/NumericScale.d.ts +41 -0
- package/dist/types/utils/xy/PointLabeler.d.ts +58 -0
- package/dist/types/utils/xy/RadiusScale.d.ts +26 -0
- package/dist/types/utils/xy/SeriesPalette.d.ts +59 -0
- package/dist/types/utils/xy/VarianceMeasure.d.ts +37 -0
- package/dist/types/utils/xy/XYFrame.d.ts +44 -0
- package/dist/types/utils/xy/XYLegend.d.ts +43 -0
- package/dist/types/utils/xy/model/AxisConfig.d.ts +96 -0
- package/dist/types/utils/xy/model/ScaleFactorsXYChart.d.ts +36 -0
- package/dist/types/utils/xy/model/XYChartDataRow.d.ts +157 -0
- package/dist/types/utils/xy/model/XYChartStyle.d.ts +31 -0
- package/package.json +5 -4
- package/readme.md +9 -5
- package/dist/bn-template-engine/p-3141c4a2.entry.js +0 -1
- package/dist/bn-template-engine/p-67538176.entry.js +0 -1
- package/dist/bn-template-engine/p-916296a5.entry.js +0 -1
- package/dist/bn-template-engine/p-96006b06.entry.js +0 -1
- package/dist/bn-template-engine/p-Ck-NYtot.js +0 -1
- package/dist/bn-template-engine/p-CnDq0oVa.js +0 -1
- package/dist/bn-template-engine/p-DSXNgKLa.js +0 -1
- package/dist/bn-template-engine/p-bc711fb0.entry.js +0 -1
- package/dist/bn-template-engine/p-c86395b8.entry.js +0 -1
- package/dist/bn-template-engine/p-e6f646b1.entry.js +0 -1
- package/dist/bn-template-engine/p-f41d9242.entry.js +0 -1
- package/dist/bn-template-engine/p-gFbbuhtl.js +0 -1
- package/dist/cjs/bn-asset_20.cjs.entry.js +0 -23547
- package/dist/cjs/context-protocol-ohYzcb5F.js +0 -663
- package/dist/cjs/scaling-CIAClQR5.js +0 -314
- package/dist/cjs/withStyled-qd94SSb4.js +0 -9535
- package/dist/collection/stores/datasets.js +0 -14
- package/dist/collection/stores/datasources.js +0 -14
- package/dist/components/_commonjsHelpers.js +0 -1
- package/dist/components/alasql.min.js +0 -1
- package/dist/components/ibcsRuleSet.js +0 -1
- package/dist/components/scaling.js +0 -1
- package/dist/components/withInheritedProps.js +0 -1
- package/dist/esm/bn-asset_20.entry.js +0 -23526
- package/dist/esm/context-protocol-DdbSplvE.js +0 -656
- package/dist/esm/scaling-DGKKkuL9.js +0 -309
- package/dist/esm/withStyled-BIkqU2w4.js +0 -9501
- package/dist/types/stores/datasets.d.ts +0 -14
- package/dist/types/stores/datasources.d.ts +0 -14
|
@@ -1,663 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var index = require('./index-CDKG4xmO.js');
|
|
4
|
-
|
|
5
|
-
const appendToMap = (map, propName, value) => {
|
|
6
|
-
let refs = map.get(propName);
|
|
7
|
-
if (!refs) {
|
|
8
|
-
refs = [];
|
|
9
|
-
map.set(propName, refs);
|
|
10
|
-
}
|
|
11
|
-
if (!refs.some((ref) => ref.deref() === value)) {
|
|
12
|
-
refs.push(new WeakRef(value));
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
const debounce = (fn, ms) => {
|
|
16
|
-
let timeoutId;
|
|
17
|
-
return (...args) => {
|
|
18
|
-
if (timeoutId) {
|
|
19
|
-
clearTimeout(timeoutId);
|
|
20
|
-
}
|
|
21
|
-
timeoutId = setTimeout(() => {
|
|
22
|
-
timeoutId = 0;
|
|
23
|
-
fn(...args);
|
|
24
|
-
}, ms);
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Check if a possible element isConnected.
|
|
30
|
-
* The property might not be there, so we check for it.
|
|
31
|
-
*
|
|
32
|
-
* We want it to return true if isConnected is not a property,
|
|
33
|
-
* otherwise we would remove these elements and would not update.
|
|
34
|
-
*
|
|
35
|
-
* Better leak in Edge than to be useless.
|
|
36
|
-
*/
|
|
37
|
-
const isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;
|
|
38
|
-
const cleanupElements = debounce((map) => {
|
|
39
|
-
for (let key of map.keys()) {
|
|
40
|
-
const refs = map.get(key).filter((ref) => {
|
|
41
|
-
const elm = ref.deref();
|
|
42
|
-
return elm && isConnected(elm);
|
|
43
|
-
});
|
|
44
|
-
map.set(key, refs);
|
|
45
|
-
}
|
|
46
|
-
}, 2_000);
|
|
47
|
-
const core = index.StencilCore;
|
|
48
|
-
const forceUpdate = core.forceUpdate;
|
|
49
|
-
const getRenderingRef = core.getRenderingRef;
|
|
50
|
-
const stencilSubscription = () => {
|
|
51
|
-
if (typeof getRenderingRef !== 'function' || typeof forceUpdate !== 'function') {
|
|
52
|
-
// If we are not in a stencil project, we do nothing.
|
|
53
|
-
// This function is not really exported by @stencil/core.
|
|
54
|
-
return {};
|
|
55
|
-
}
|
|
56
|
-
const ensureForceUpdate = forceUpdate;
|
|
57
|
-
const ensureGetRenderingRef = getRenderingRef;
|
|
58
|
-
const elmsToUpdate = new Map();
|
|
59
|
-
return {
|
|
60
|
-
dispose: () => elmsToUpdate.clear(),
|
|
61
|
-
get: (propName) => {
|
|
62
|
-
const elm = ensureGetRenderingRef();
|
|
63
|
-
if (elm) {
|
|
64
|
-
appendToMap(elmsToUpdate, propName, elm);
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
set: (propName) => {
|
|
68
|
-
const refs = elmsToUpdate.get(propName);
|
|
69
|
-
if (refs) {
|
|
70
|
-
const nextRefs = refs.filter((ref) => {
|
|
71
|
-
const elm = ref.deref();
|
|
72
|
-
if (!elm)
|
|
73
|
-
return false;
|
|
74
|
-
return ensureForceUpdate(elm);
|
|
75
|
-
});
|
|
76
|
-
elmsToUpdate.set(propName, nextRefs);
|
|
77
|
-
}
|
|
78
|
-
cleanupElements(elmsToUpdate);
|
|
79
|
-
},
|
|
80
|
-
reset: () => {
|
|
81
|
-
elmsToUpdate.forEach((refs) => {
|
|
82
|
-
refs.forEach((ref) => {
|
|
83
|
-
const elm = ref.deref();
|
|
84
|
-
if (elm)
|
|
85
|
-
ensureForceUpdate(elm);
|
|
86
|
-
});
|
|
87
|
-
});
|
|
88
|
-
cleanupElements(elmsToUpdate);
|
|
89
|
-
},
|
|
90
|
-
};
|
|
91
|
-
};
|
|
92
|
-
|
|
93
|
-
const unwrap = (val) => (typeof val === 'function' ? val() : val);
|
|
94
|
-
const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {
|
|
95
|
-
const resolveDefaultState = () => (unwrap(defaultState) ?? {});
|
|
96
|
-
const initialState = resolveDefaultState();
|
|
97
|
-
let states = new Map(Object.entries(initialState));
|
|
98
|
-
const proxyAvailable = typeof Proxy !== 'undefined';
|
|
99
|
-
const plainState = proxyAvailable ? null : {};
|
|
100
|
-
const handlers = {
|
|
101
|
-
dispose: [],
|
|
102
|
-
get: [],
|
|
103
|
-
set: [],
|
|
104
|
-
reset: [],
|
|
105
|
-
};
|
|
106
|
-
// Track onChange listeners to enable removeListener functionality
|
|
107
|
-
const changeListeners = new Map();
|
|
108
|
-
const reset = () => {
|
|
109
|
-
// When resetting the state, the default state may be a function - unwrap it to invoke it.
|
|
110
|
-
// otherwise, the state won't be properly reset
|
|
111
|
-
states = new Map(Object.entries(resolveDefaultState()));
|
|
112
|
-
if (!proxyAvailable) {
|
|
113
|
-
syncPlainStateKeys();
|
|
114
|
-
}
|
|
115
|
-
handlers.reset.forEach((cb) => cb());
|
|
116
|
-
};
|
|
117
|
-
const dispose = () => {
|
|
118
|
-
// Call first dispose as resetting the state would
|
|
119
|
-
// cause less updates ;)
|
|
120
|
-
handlers.dispose.forEach((cb) => cb());
|
|
121
|
-
reset();
|
|
122
|
-
};
|
|
123
|
-
const get = (propName) => {
|
|
124
|
-
handlers.get.forEach((cb) => cb(propName));
|
|
125
|
-
return states.get(propName);
|
|
126
|
-
};
|
|
127
|
-
const set = (propName, value) => {
|
|
128
|
-
const oldValue = states.get(propName);
|
|
129
|
-
if (shouldUpdate(value, oldValue, propName)) {
|
|
130
|
-
states.set(propName, value);
|
|
131
|
-
if (!proxyAvailable) {
|
|
132
|
-
ensurePlainProperty(propName);
|
|
133
|
-
}
|
|
134
|
-
handlers.set.forEach((cb) => cb(propName, value, oldValue));
|
|
135
|
-
}
|
|
136
|
-
};
|
|
137
|
-
const state = (proxyAvailable
|
|
138
|
-
? new Proxy(initialState, {
|
|
139
|
-
get(_, propName) {
|
|
140
|
-
return get(propName);
|
|
141
|
-
},
|
|
142
|
-
ownKeys(_) {
|
|
143
|
-
return Array.from(states.keys());
|
|
144
|
-
},
|
|
145
|
-
getOwnPropertyDescriptor() {
|
|
146
|
-
return {
|
|
147
|
-
enumerable: true,
|
|
148
|
-
configurable: true,
|
|
149
|
-
};
|
|
150
|
-
},
|
|
151
|
-
has(_, propName) {
|
|
152
|
-
return states.has(propName);
|
|
153
|
-
},
|
|
154
|
-
set(_, propName, value) {
|
|
155
|
-
set(propName, value);
|
|
156
|
-
return true;
|
|
157
|
-
},
|
|
158
|
-
})
|
|
159
|
-
: (() => {
|
|
160
|
-
syncPlainStateKeys();
|
|
161
|
-
return plainState;
|
|
162
|
-
})());
|
|
163
|
-
const on = (eventName, callback) => {
|
|
164
|
-
handlers[eventName].push(callback);
|
|
165
|
-
return () => {
|
|
166
|
-
removeFromArray(handlers[eventName], callback);
|
|
167
|
-
};
|
|
168
|
-
};
|
|
169
|
-
const onChange = (propName, cb) => {
|
|
170
|
-
const setHandler = (key, newValue) => {
|
|
171
|
-
if (key === propName) {
|
|
172
|
-
cb(newValue);
|
|
173
|
-
}
|
|
174
|
-
};
|
|
175
|
-
const resetHandler = () => {
|
|
176
|
-
const snapshot = resolveDefaultState();
|
|
177
|
-
cb(snapshot[propName]);
|
|
178
|
-
};
|
|
179
|
-
// Register the handlers
|
|
180
|
-
const unSet = on('set', setHandler);
|
|
181
|
-
const unReset = on('reset', resetHandler);
|
|
182
|
-
// Track the relationship between the user callback and internal handlers
|
|
183
|
-
changeListeners.set(cb, { setHandler, resetHandler, propName });
|
|
184
|
-
return () => {
|
|
185
|
-
unSet();
|
|
186
|
-
unReset();
|
|
187
|
-
changeListeners.delete(cb);
|
|
188
|
-
};
|
|
189
|
-
};
|
|
190
|
-
const use = (...subscriptions) => {
|
|
191
|
-
const unsubs = subscriptions.reduce((unsubs, subscription) => {
|
|
192
|
-
if (subscription.set) {
|
|
193
|
-
unsubs.push(on('set', subscription.set));
|
|
194
|
-
}
|
|
195
|
-
if (subscription.get) {
|
|
196
|
-
unsubs.push(on('get', subscription.get));
|
|
197
|
-
}
|
|
198
|
-
if (subscription.reset) {
|
|
199
|
-
unsubs.push(on('reset', subscription.reset));
|
|
200
|
-
}
|
|
201
|
-
if (subscription.dispose) {
|
|
202
|
-
unsubs.push(on('dispose', subscription.dispose));
|
|
203
|
-
}
|
|
204
|
-
return unsubs;
|
|
205
|
-
}, []);
|
|
206
|
-
return () => unsubs.forEach((unsub) => unsub());
|
|
207
|
-
};
|
|
208
|
-
const forceUpdate = (key) => {
|
|
209
|
-
const oldValue = states.get(key);
|
|
210
|
-
handlers.set.forEach((cb) => cb(key, oldValue, oldValue));
|
|
211
|
-
};
|
|
212
|
-
const removeListener = (propName, listener) => {
|
|
213
|
-
const listenerInfo = changeListeners.get(listener);
|
|
214
|
-
if (listenerInfo && listenerInfo.propName === propName) {
|
|
215
|
-
// Remove the specific handlers that were created for this listener
|
|
216
|
-
removeFromArray(handlers.set, listenerInfo.setHandler);
|
|
217
|
-
removeFromArray(handlers.reset, listenerInfo.resetHandler);
|
|
218
|
-
changeListeners.delete(listener);
|
|
219
|
-
}
|
|
220
|
-
};
|
|
221
|
-
function ensurePlainProperty(key) {
|
|
222
|
-
if (proxyAvailable || !plainState) {
|
|
223
|
-
return;
|
|
224
|
-
}
|
|
225
|
-
if (Object.prototype.hasOwnProperty.call(plainState, key)) {
|
|
226
|
-
return;
|
|
227
|
-
}
|
|
228
|
-
Object.defineProperty(plainState, key, {
|
|
229
|
-
configurable: true,
|
|
230
|
-
enumerable: true,
|
|
231
|
-
get() {
|
|
232
|
-
return get(key);
|
|
233
|
-
},
|
|
234
|
-
set(value) {
|
|
235
|
-
set(key, value);
|
|
236
|
-
},
|
|
237
|
-
});
|
|
238
|
-
}
|
|
239
|
-
function syncPlainStateKeys() {
|
|
240
|
-
if (proxyAvailable || !plainState) {
|
|
241
|
-
return;
|
|
242
|
-
}
|
|
243
|
-
const knownKeys = new Set(states.keys());
|
|
244
|
-
for (const key of Object.keys(plainState)) {
|
|
245
|
-
if (!knownKeys.has(key)) {
|
|
246
|
-
delete plainState[key];
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
for (const key of knownKeys) {
|
|
250
|
-
ensurePlainProperty(key);
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
return {
|
|
254
|
-
state,
|
|
255
|
-
get,
|
|
256
|
-
set,
|
|
257
|
-
on,
|
|
258
|
-
onChange,
|
|
259
|
-
use,
|
|
260
|
-
dispose,
|
|
261
|
-
reset,
|
|
262
|
-
forceUpdate,
|
|
263
|
-
removeListener,
|
|
264
|
-
};
|
|
265
|
-
};
|
|
266
|
-
const removeFromArray = (array, item) => {
|
|
267
|
-
const index = array.indexOf(item);
|
|
268
|
-
if (index >= 0) {
|
|
269
|
-
array[index] = array[array.length - 1];
|
|
270
|
-
array.length--;
|
|
271
|
-
}
|
|
272
|
-
};
|
|
273
|
-
|
|
274
|
-
const createStore = (defaultState, shouldUpdate) => {
|
|
275
|
-
const map = createObservableMap(defaultState, shouldUpdate);
|
|
276
|
-
map.use(stencilSubscription());
|
|
277
|
-
return map;
|
|
278
|
-
};
|
|
279
|
-
|
|
280
|
-
const SYSTEM_STYLE_DEFAULTS = {
|
|
281
|
-
global: {
|
|
282
|
-
fontFamily: "'Noto Sans', sans-serif",
|
|
283
|
-
fontSizePx: 13.3333,
|
|
284
|
-
fontColor: "#000000",
|
|
285
|
-
fontBackgroundColor: "#ffffff",
|
|
286
|
-
},
|
|
287
|
-
"bn-text": {},
|
|
288
|
-
"bn-chart-time": {
|
|
289
|
-
scaleFactors: {
|
|
290
|
-
scenarioOffset: 0.3,
|
|
291
|
-
scenarioLabelToColumn: 0.3,
|
|
292
|
-
labelToColumn: 0.3,
|
|
293
|
-
labelToAxis: 0.3,
|
|
294
|
-
needleWidth: 0.3,
|
|
295
|
-
needleHeadWidth: 0.6,
|
|
296
|
-
columnWidth: 2.0,
|
|
297
|
-
varianceAxisLineWidth: 0.3,
|
|
298
|
-
axisLineWidth: 0.1,
|
|
299
|
-
auxiliaryLineWidth: 0.1,
|
|
300
|
-
scenarioLineWidth: 0.2,
|
|
301
|
-
markerWidth: 0.7,
|
|
302
|
-
markerOffset: 0.0,
|
|
303
|
-
categoryWidth: 3.0,
|
|
304
|
-
axisTickLength: 0.3,
|
|
305
|
-
},
|
|
306
|
-
axisStyles: {
|
|
307
|
-
ac: { stroke: "#121212", fill: "#121212", width: 0.1 },
|
|
308
|
-
fc: { stroke: "#121212", fill: "#ffffff", width: 0.1, dasharray: "10 5 5 5" },
|
|
309
|
-
pp: { stroke: "#606060", fill: "#606060", width: 0.1 },
|
|
310
|
-
pl: { stroke: "#121212", fill: "#ffffff", width: 0.1 },
|
|
311
|
-
},
|
|
312
|
-
barStyles: {
|
|
313
|
-
ac: { stroke: "#404040", fill: "#404040", width: 0.1 },
|
|
314
|
-
fc: { stroke: "#404040", fill: "#ffffff", width: 0.5, fillpattern: "fc" },
|
|
315
|
-
pp: { stroke: "#A6A6A6", fill: "#A6A6A6", width: 0.1 },
|
|
316
|
-
pl: { stroke: "#404040", fill: "#ffffff", width: 0.1 },
|
|
317
|
-
},
|
|
318
|
-
varianceStyles: {
|
|
319
|
-
pos: { stroke: "#008f96", fill: "#008f96", width: 0.1 },
|
|
320
|
-
neg: { stroke: "#ff0000", fill: "#ff0000", width: 0.1 },
|
|
321
|
-
neu: { stroke: "#808080", fill: "#808080", width: 0.1 },
|
|
322
|
-
},
|
|
323
|
-
stackColors: ["#000000", "#c0c0c0", "#808080"],
|
|
324
|
-
padding: {
|
|
325
|
-
top: 10,
|
|
326
|
-
left: 10,
|
|
327
|
-
right: 10,
|
|
328
|
-
bottom: 10,
|
|
329
|
-
},
|
|
330
|
-
},
|
|
331
|
-
"bn-chart-structure": {
|
|
332
|
-
scaleFactors: {
|
|
333
|
-
scenarioOffset: 0.3,
|
|
334
|
-
scenarioLabelToBar: 0.1,
|
|
335
|
-
labelToBar: 0.3,
|
|
336
|
-
labelToAxis: 0.3,
|
|
337
|
-
needleWidth: 0.3,
|
|
338
|
-
needleHeadWidth: 0.6,
|
|
339
|
-
barWidth: 1.2,
|
|
340
|
-
varianceAxisLineWidth: 0.3,
|
|
341
|
-
axisLineWidth: 0.1,
|
|
342
|
-
auxiliaryLineWidth: 0.1,
|
|
343
|
-
scenarioLineWidth: 0.2,
|
|
344
|
-
markerWidth: 0.7,
|
|
345
|
-
markerOffset: 0.0,
|
|
346
|
-
categoryWidth: 1.9,
|
|
347
|
-
axisTickLength: 0.3,
|
|
348
|
-
},
|
|
349
|
-
axisStyles: {
|
|
350
|
-
ac: { stroke: "#121212", fill: "#121212", width: 0.1 },
|
|
351
|
-
fc: { stroke: "#121212", fill: "#ffffff", width: 0.1, dasharray: "10 5 5 5" },
|
|
352
|
-
pp: { stroke: "#606060", fill: "#606060", width: 0.1 },
|
|
353
|
-
pl: { stroke: "#121212", fill: "#ffffff", width: 0.1 },
|
|
354
|
-
},
|
|
355
|
-
barStyles: {
|
|
356
|
-
ac: { stroke: "#404040", fill: "#404040", width: 0.1 },
|
|
357
|
-
fc: { stroke: "#404040", fill: "#ffffff", width: 0.5, fillpattern: "fc" },
|
|
358
|
-
pp: { stroke: "#A6A6A6", fill: "#A6A6A6", width: 0.1 },
|
|
359
|
-
pl: { stroke: "#404040", fill: "#ffffff", width: 0.1 },
|
|
360
|
-
},
|
|
361
|
-
varianceStyles: {
|
|
362
|
-
pos: { stroke: "#008f96", fill: "#008f96", width: 0.1 },
|
|
363
|
-
neg: { stroke: "#ff0000", fill: "#ff0000", width: 0.1 },
|
|
364
|
-
neu: { stroke: "#808080", fill: "#808080", width: 0.1 },
|
|
365
|
-
},
|
|
366
|
-
stackColors: ["#000000", "#c0c0c0", "#808080"],
|
|
367
|
-
padding: {
|
|
368
|
-
top: 10,
|
|
369
|
-
left: 10,
|
|
370
|
-
right: 10,
|
|
371
|
-
bottom: 10,
|
|
372
|
-
},
|
|
373
|
-
},
|
|
374
|
-
"bn-tree": {
|
|
375
|
-
edgeColor: "#404040",
|
|
376
|
-
edgeWidth: 1,
|
|
377
|
-
operatorCircleRadius: 10,
|
|
378
|
-
operatorFontSizeScale: 0.9,
|
|
379
|
-
operatorColor: "#404040",
|
|
380
|
-
},
|
|
381
|
-
"bn-grid": {
|
|
382
|
-
headerBackground: "transparent",
|
|
383
|
-
borderColor: "#A6A6A6",
|
|
384
|
-
borderWidth: 1,
|
|
385
|
-
cellPadding: 4,
|
|
386
|
-
},
|
|
387
|
-
};
|
|
388
|
-
|
|
389
|
-
/**
|
|
390
|
-
* Recursively flattens a nested object into a single-depth object with
|
|
391
|
-
* dot-separated keys.
|
|
392
|
-
*
|
|
393
|
-
* Used by the i18n store to convert hierarchical locale files into a flat
|
|
394
|
-
* lookup map, e.g. `{ a: { b: "hello" } }` becomes `{ "a.b": "hello" }`.
|
|
395
|
-
*
|
|
396
|
-
* @param ob - The nested object to flatten
|
|
397
|
-
* @param prefix - Internal accumulator for the current key path (omit on initial call)
|
|
398
|
-
* @param result - Internal accumulator for the output object (omit on initial call)
|
|
399
|
-
* @returns A flat object with dot-separated keys mapping to leaf values
|
|
400
|
-
*/
|
|
401
|
-
function flattenObject(ob, prefix = undefined, result = null) {
|
|
402
|
-
result = result || {};
|
|
403
|
-
prefix = prefix ? prefix + "." : "";
|
|
404
|
-
for (const i in ob) {
|
|
405
|
-
if (Object.prototype.hasOwnProperty.call(ob, i)) {
|
|
406
|
-
if (typeof ob[i] === "object" && ob[i] !== null) {
|
|
407
|
-
// Recursion on deeper objects
|
|
408
|
-
flattenObject(ob[i], prefix + i, result);
|
|
409
|
-
}
|
|
410
|
-
else {
|
|
411
|
-
result[prefix + i] = ob[i];
|
|
412
|
-
}
|
|
413
|
-
}
|
|
414
|
-
}
|
|
415
|
-
return result;
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
/**
|
|
419
|
-
* Reactive store for internationalized labels and symbols.
|
|
420
|
-
*
|
|
421
|
-
* Organized by namespace (`_system` ships built-in `de`/`en` bundles). Each
|
|
422
|
-
* bundle is a flat key-value map produced by `flattenObject()` from a nested
|
|
423
|
-
* `{ namespace: { key: label } }` structure, yielding keys like `"bn-table.SUM_TOTAL"`.
|
|
424
|
-
*
|
|
425
|
-
* **Token pattern**: Variance symbols use `{%}` as a placeholder for the
|
|
426
|
-
* scenario abbreviation. For example, `"Δ{%}"` becomes `"ΔPY"` when the
|
|
427
|
-
* comparison scenario is "PY". The `{%}` replacement is performed at render
|
|
428
|
-
* time by the `withTranslation` mixin.
|
|
429
|
-
*
|
|
430
|
-
* @module stores/internationalization
|
|
431
|
-
*/
|
|
432
|
-
/**
|
|
433
|
-
* Keys that are treated as global (not namespace-scoped) across all components.
|
|
434
|
-
* Includes scenario abbreviations (ac1..pl4), sort-order arrows, and IBCS
|
|
435
|
-
* variance symbols with the `{%}` token for scenario substitution.
|
|
436
|
-
*/
|
|
437
|
-
const globalLabelKeys = [
|
|
438
|
-
"ORDER_asc",
|
|
439
|
-
"ORDER_desc",
|
|
440
|
-
"ac1",
|
|
441
|
-
"pp1",
|
|
442
|
-
"fc1",
|
|
443
|
-
"pl1",
|
|
444
|
-
"ac2",
|
|
445
|
-
"pp2",
|
|
446
|
-
"fc2",
|
|
447
|
-
"pl2",
|
|
448
|
-
"ac3",
|
|
449
|
-
"pp3",
|
|
450
|
-
"fc3",
|
|
451
|
-
"pl3",
|
|
452
|
-
"ac4",
|
|
453
|
-
"pp4",
|
|
454
|
-
"fc4",
|
|
455
|
-
"pl4",
|
|
456
|
-
"ibcssymbol_delta_ac",
|
|
457
|
-
"ibcssymbol_delta_generic",
|
|
458
|
-
"ibcssymbol_delta_ac_relative",
|
|
459
|
-
"ibcssymbol_delta_generic_relative",
|
|
460
|
-
];
|
|
461
|
-
const de = flattenObject({
|
|
462
|
-
global: {
|
|
463
|
-
ac1: "AC",
|
|
464
|
-
pp1: "PY",
|
|
465
|
-
fc1: "FC",
|
|
466
|
-
pl1: "PL",
|
|
467
|
-
ac2: "AC2",
|
|
468
|
-
pp2: "PY2",
|
|
469
|
-
fc2: "FC2",
|
|
470
|
-
pl2: "PL2",
|
|
471
|
-
ac3: "AC3",
|
|
472
|
-
pp3: "PY3",
|
|
473
|
-
fc3: "FC3",
|
|
474
|
-
pl3: "PL3",
|
|
475
|
-
ac4: "AC4",
|
|
476
|
-
pp4: "PY4",
|
|
477
|
-
fc4: "FC4",
|
|
478
|
-
pl4: "PL4",
|
|
479
|
-
ORDER_asc: "↑",
|
|
480
|
-
ORDER_desc: "↓",
|
|
481
|
-
ibcssymbol_delta_ac: "Δ{%}",
|
|
482
|
-
ibcssymbol_delta_generic: "Δ({%})",
|
|
483
|
-
ibcssymbol_delta_ac_relative: "Δ{%}%",
|
|
484
|
-
ibcssymbol_delta_generic_relative: "Δ({%})%",
|
|
485
|
-
},
|
|
486
|
-
"bn-title": {
|
|
487
|
-
SEPERATOR_WS: ", ",
|
|
488
|
-
CONNECTOR_WS: " und ",
|
|
489
|
-
in: "in",
|
|
490
|
-
},
|
|
491
|
-
"bn-chart": {},
|
|
492
|
-
"bn-table": {
|
|
493
|
-
in: "in",
|
|
494
|
-
category: " ",
|
|
495
|
-
operation: " ",
|
|
496
|
-
there_of: "davon",
|
|
497
|
-
part_of: "in % von",
|
|
498
|
-
SUM_TOTAL: "❖",
|
|
499
|
-
REST: "REST",
|
|
500
|
-
},
|
|
501
|
-
});
|
|
502
|
-
const en = flattenObject({
|
|
503
|
-
global: {
|
|
504
|
-
ac1: "AC",
|
|
505
|
-
pp1: "PY",
|
|
506
|
-
fc1: "FC",
|
|
507
|
-
pl1: "PL",
|
|
508
|
-
ac2: "AC2",
|
|
509
|
-
pp2: "PY2",
|
|
510
|
-
fc2: "FC2",
|
|
511
|
-
pl2: "PL2",
|
|
512
|
-
ac3: "AC3",
|
|
513
|
-
pp3: "PY3",
|
|
514
|
-
fc3: "FC3",
|
|
515
|
-
pl3: "PL3",
|
|
516
|
-
ac4: "AC4",
|
|
517
|
-
pp4: "PY4",
|
|
518
|
-
fc4: "FC4",
|
|
519
|
-
pl4: "PL4",
|
|
520
|
-
ORDER_asc: "↑",
|
|
521
|
-
ORDER_desc: "↓",
|
|
522
|
-
ibcssymbol_delta_ac: "Δ{%}",
|
|
523
|
-
ibcssymbol_delta_generic: "Δ({%})",
|
|
524
|
-
ibcssymbol_delta_ac_relative: "Δ{%}%",
|
|
525
|
-
ibcssymbol_delta_generic_relative: "Δ({%})%",
|
|
526
|
-
},
|
|
527
|
-
"bn-title": {
|
|
528
|
-
SEPERATOR_WS: ", ",
|
|
529
|
-
CONNECTOR_WS: " and ",
|
|
530
|
-
in: "in",
|
|
531
|
-
},
|
|
532
|
-
"bn-chart": {},
|
|
533
|
-
"bn-table": {
|
|
534
|
-
category: " ",
|
|
535
|
-
operation: " ",
|
|
536
|
-
there_of: "there of",
|
|
537
|
-
part_of: "in % of",
|
|
538
|
-
SUM_TOTAL: "❖",
|
|
539
|
-
REST: "REST",
|
|
540
|
-
},
|
|
541
|
-
});
|
|
542
|
-
const BN_INTERNATIONALIZATION_KEYS = Object.keys(de || {});
|
|
543
|
-
const SYSTEM_I18N_DEFAULTS = { _system: { de, en } };
|
|
544
|
-
|
|
545
|
-
/**
|
|
546
|
-
* Factory that creates a fresh set of all 7 `@stencil/store` instances.
|
|
547
|
-
*
|
|
548
|
-
* Called once per `<bn-context>` element so that each context owns isolated
|
|
549
|
-
* reactive state. The returned object satisfies the {@link ScopedStores} interface.
|
|
550
|
-
*
|
|
551
|
-
* @module stores/createScopedStores
|
|
552
|
-
*/
|
|
553
|
-
function createScopedStores() {
|
|
554
|
-
const datasources = createStore({});
|
|
555
|
-
const datasets = createStore({});
|
|
556
|
-
const datasetsMeta = createStore({});
|
|
557
|
-
const componentStyles = createStore({
|
|
558
|
-
_system: SYSTEM_STYLE_DEFAULTS,
|
|
559
|
-
});
|
|
560
|
-
const internationalization = createStore(Object.assign({}, SYSTEM_I18N_DEFAULTS));
|
|
561
|
-
const assets = createStore({});
|
|
562
|
-
const context = createStore({ locale: "en" });
|
|
563
|
-
return {
|
|
564
|
-
datasources,
|
|
565
|
-
datasets,
|
|
566
|
-
datasetsMeta,
|
|
567
|
-
componentStyles,
|
|
568
|
-
internationalization,
|
|
569
|
-
assets,
|
|
570
|
-
context,
|
|
571
|
-
};
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
/**
|
|
575
|
-
* Scoped store resolution for `<bn-context>`.
|
|
576
|
-
*
|
|
577
|
-
* Each `<bn-context>` element owns its own set of `@stencil/store` instances.
|
|
578
|
-
* Because Stencil does NOT guarantee parent-before-child initialization order,
|
|
579
|
-
* stores are created lazily: the first component that calls `getStores()` walks
|
|
580
|
-
* the DOM to find the nearest `<bn-context>` element and creates (or retrieves)
|
|
581
|
-
* the stores for it. When `<bn-context>` itself initializes, it picks up the
|
|
582
|
-
* already-created stores from the registry.
|
|
583
|
-
*
|
|
584
|
-
* @module context/context-protocol
|
|
585
|
-
*/
|
|
586
|
-
/**
|
|
587
|
-
* Module-level registry mapping `<bn-context>` DOM elements to their stores.
|
|
588
|
-
* Stores are created lazily by `getOrCreateStores()` — whichever component
|
|
589
|
-
* initializes first triggers creation for its ancestor `<bn-context>`.
|
|
590
|
-
*/
|
|
591
|
-
const contextRegistry = new WeakMap();
|
|
592
|
-
/**
|
|
593
|
-
* Returns the stores for a `<bn-context>` element, creating them if needed.
|
|
594
|
-
* Called both by descendant components (via `getStores()`) and by the
|
|
595
|
-
* `<bn-context>` component itself during its initialization.
|
|
596
|
-
*/
|
|
597
|
-
function getOrCreateStores(contextElement) {
|
|
598
|
-
let stores = contextRegistry.get(contextElement);
|
|
599
|
-
if (!stores) {
|
|
600
|
-
stores = createScopedStores();
|
|
601
|
-
contextRegistry.set(contextElement, stores);
|
|
602
|
-
}
|
|
603
|
-
return stores;
|
|
604
|
-
}
|
|
605
|
-
const storesCache = new WeakMap();
|
|
606
|
-
/**
|
|
607
|
-
* Walks up the DOM tree (crossing shadow boundaries) to find the nearest
|
|
608
|
-
* `<bn-context>` ancestor element.
|
|
609
|
-
*/
|
|
610
|
-
function findContextElement(element) {
|
|
611
|
-
var _a;
|
|
612
|
-
let current = element.parentNode;
|
|
613
|
-
while (current) {
|
|
614
|
-
if (current instanceof HTMLElement && ((_a = current.nodeName) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === "bn-context") {
|
|
615
|
-
return current;
|
|
616
|
-
}
|
|
617
|
-
if (current.parentNode) {
|
|
618
|
-
current = current.parentNode;
|
|
619
|
-
}
|
|
620
|
-
else if (current instanceof ShadowRoot) {
|
|
621
|
-
current = current.host;
|
|
622
|
-
}
|
|
623
|
-
else {
|
|
624
|
-
break;
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
|
-
return undefined;
|
|
628
|
-
}
|
|
629
|
-
/**
|
|
630
|
-
* Resolves scoped stores from the nearest `<bn-context>` ancestor.
|
|
631
|
-
*
|
|
632
|
-
* Walks the DOM tree to find the nearest `<bn-context>` element, then
|
|
633
|
-
* returns (or lazily creates) the stores for it. This works regardless
|
|
634
|
-
* of Stencil component initialization order because it only depends on
|
|
635
|
-
* the native DOM tree being in place.
|
|
636
|
-
*
|
|
637
|
-
* Results are cached per element in a WeakMap.
|
|
638
|
-
*
|
|
639
|
-
* @throws Error if no `<bn-context>` ancestor is found in the DOM
|
|
640
|
-
*/
|
|
641
|
-
function getStores(element) {
|
|
642
|
-
const cached = storesCache.get(element);
|
|
643
|
-
if (cached)
|
|
644
|
-
return cached;
|
|
645
|
-
const contextEl = findContextElement(element);
|
|
646
|
-
if (!contextEl) {
|
|
647
|
-
throw new Error(`[bn] <${element.localName}> must be inside a <bn-context>. No ancestor <bn-context> found.`);
|
|
648
|
-
}
|
|
649
|
-
const stores = getOrCreateStores(contextEl);
|
|
650
|
-
storesCache.set(element, stores);
|
|
651
|
-
return stores;
|
|
652
|
-
}
|
|
653
|
-
/** Removes the cached stores entry for an element (call in `disconnectedCallback`). */
|
|
654
|
-
function clearStoresCache(element) {
|
|
655
|
-
storesCache.delete(element);
|
|
656
|
-
}
|
|
657
|
-
|
|
658
|
-
exports.BN_INTERNATIONALIZATION_KEYS = BN_INTERNATIONALIZATION_KEYS;
|
|
659
|
-
exports.clearStoresCache = clearStoresCache;
|
|
660
|
-
exports.flattenObject = flattenObject;
|
|
661
|
-
exports.getOrCreateStores = getOrCreateStores;
|
|
662
|
-
exports.getStores = getStores;
|
|
663
|
-
exports.globalLabelKeys = globalLabelKeys;
|