@bino-bi/bn-template-engine 1.0.0-next.26 → 1.0.0-next.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bn-template-engine/bn-template-engine.esm.js +1 -1
- package/dist/bn-template-engine/p-5075771a.entry.js +1 -0
- package/dist/bn-template-engine/p-5d516435.entry.js +1 -0
- package/dist/bn-template-engine/p-5e90e728.entry.js +1 -0
- package/dist/bn-template-engine/p-9ef7e132.entry.js +1 -0
- package/dist/bn-template-engine/{p-f06c3703.entry.js → p-9f7a1980.entry.js} +1 -1
- package/dist/bn-template-engine/p-BeXgxHkW.js +1 -0
- package/dist/bn-template-engine/p-CH0bpt_k.js +1 -0
- package/dist/bn-template-engine/p-ClruFZD_.js +1 -0
- package/dist/bn-template-engine/{p-CTrNbSXN.js → p-DFmSrSnf.js} +1 -1
- package/dist/bn-template-engine/{p-BcLsoDrW.js → p-DI3efDSV.js} +1 -1
- package/dist/bn-template-engine/p-DXLTTILG.js +1 -0
- package/dist/bn-template-engine/p-DtP4jqG5.js +1 -0
- package/dist/bn-template-engine/p-a8281b71.entry.js +1 -0
- package/dist/bn-template-engine/p-b31277e7.entry.js +1 -0
- package/dist/bn-template-engine/p-b396ac84.entry.js +1 -0
- package/dist/cjs/{bn-asset_21.cjs.entry.js → bn-asset_28.cjs.entry.js} +21358 -6528
- package/dist/cjs/bn-grid.cjs.entry.js +4 -6
- package/dist/cjs/bn-image.cjs.entry.js +3 -5
- package/dist/cjs/bn-internationalization.cjs.entry.js +17 -6
- package/dist/cjs/bn-ruleset.cjs.entry.js +5 -5
- package/dist/cjs/bn-template-engine.cjs.js +1 -1
- package/dist/cjs/bn-template.cjs.entry.js +2 -2
- package/dist/cjs/bn-text.cjs.entry.js +115 -43
- package/dist/cjs/{context-protocol-DcTEh1rq.js → context-protocol-C0rKepqu.js} +108 -22
- package/dist/cjs/{diagnostics-CTgbq_Gc.js → diagnostics-Cq-qDtXq.js} +1 -1
- package/dist/cjs/editor-companion.cjs.entry.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/queryError-BZjnIW_w.js +16 -0
- package/dist/cjs/{scaling-Dsb5_NXy.js → sanitizeHtml-Yx1xn6i_.js} +467 -287
- package/dist/cjs/{withBodyObserver-DJO98AJ-.js → withBodyObserver-CaPUjuC5.js} +1 -1
- package/dist/cjs/withHasError-qGW_yqIv.js +426 -0
- package/dist/cjs/{withStyled-D0jLwCib.js → withStyled-vSfogp9J.js} +543 -42
- package/dist/collection/components/bn-chart-bubble/bn-chart-bubble.css +37 -0
- package/dist/collection/components/bn-chart-bubble/bn-chart-bubble.js +53 -28
- package/dist/collection/components/bn-chart-bubble/ibcs-chart-bubble.css +37 -5
- package/dist/collection/components/bn-chart-bubble/ibcs-chart-bubble.js +16 -7
- package/dist/collection/components/bn-chart-bubble/utils/BubbleChart.js +67 -30
- package/dist/collection/components/bn-chart-bullet/bn-chart-bullet.css +37 -0
- package/dist/collection/components/bn-chart-bullet/bn-chart-bullet.js +49 -29
- package/dist/collection/components/bn-chart-bullet/ibcs-chart-bullet.css +37 -5
- package/dist/collection/components/bn-chart-bullet/ibcs-chart-bullet.js +17 -7
- package/dist/collection/components/bn-chart-bullet/utils/BulletChart.js +34 -18
- package/dist/collection/components/bn-chart-bullet/utils/model/BulletChartStyle.js +2 -0
- package/dist/collection/components/bn-chart-bullet/utils/model/BulletConfig.js +1 -1
- package/dist/collection/components/bn-chart-scatter/bn-chart-scatter.css +37 -0
- package/dist/collection/components/bn-chart-scatter/bn-chart-scatter.js +52 -27
- package/dist/collection/components/bn-chart-scatter/ibcs-chart-scatter.css +37 -5
- package/dist/collection/components/bn-chart-scatter/ibcs-chart-scatter.js +16 -7
- package/dist/collection/components/bn-chart-scatter/utils/ScatterChart.js +52 -18
- package/dist/collection/components/bn-chart-structure/bn-chart-structure.css +37 -5
- package/dist/collection/components/bn-chart-structure/bn-chart-structure.js +74 -44
- package/dist/collection/components/bn-chart-structure/ibcs-chart-structure.js +60 -19
- package/dist/collection/components/bn-chart-structure/utils/StructureChart.js +218 -262
- package/dist/collection/components/bn-chart-structure/utils/elements/Label.js +1 -1
- package/dist/collection/components/bn-chart-structure/utils/elements/Needle.js +11 -4
- package/dist/collection/components/bn-chart-structure/utils/elements/StackedBar.js +16 -25
- package/dist/collection/components/bn-chart-structure/utils/model/StructureChartComponentConfig.js +3 -2
- package/dist/collection/components/bn-chart-structure/utils/model/styles/StructureChartStyle.js +2 -0
- package/dist/collection/components/bn-chart-time/bn-chart-time.css +37 -0
- package/dist/collection/components/bn-chart-time/bn-chart-time.js +122 -52
- package/dist/collection/components/bn-chart-time/ibcs-chart-time.css +37 -0
- package/dist/collection/components/bn-chart-time/ibcs-chart-time.js +60 -19
- package/dist/collection/components/bn-chart-time/utils/TimeChart.js +245 -250
- package/dist/collection/components/bn-chart-time/utils/elements/AreaFill.js +1 -1
- package/dist/collection/components/bn-chart-time/utils/elements/Label.js +1 -1
- package/dist/collection/components/bn-chart-time/utils/elements/LineSeries.js +1 -1
- package/dist/collection/components/bn-chart-time/utils/elements/Needle.js +11 -4
- package/dist/collection/components/bn-chart-time/utils/elements/StackedColumn.js +22 -34
- package/dist/collection/components/bn-chart-time/utils/helper/LabelCollisionManager.js +3 -3
- package/dist/collection/components/bn-chart-time/utils/model/TimeChartComponentConfig.js +4 -3
- package/dist/collection/components/bn-chart-time/utils/model/TimeChartDataRow.js +2 -2
- package/dist/collection/components/bn-chart-time/utils/model/styles/TimeChartStyle.js +2 -0
- package/dist/collection/components/bn-component-style/bn-component-style.js +14 -2
- package/dist/collection/components/bn-context/bn-context.js +92 -22
- package/dist/collection/components/bn-dataset/bn-dataset.js +246 -90
- package/dist/collection/components/bn-datasource/bn-datasource.js +169 -77
- package/dist/collection/components/bn-footer/bn-footer.js +6 -6
- package/dist/collection/components/bn-internationalization/bn-internationalization.js +14 -3
- package/dist/collection/components/bn-layout-card/bn-layout-card.js +25 -74
- package/dist/collection/components/bn-layout-page/bn-layout-page.js +59 -71
- package/dist/collection/components/bn-message/bn-message.js +2 -2
- package/dist/collection/components/bn-page/bn-page.css +0 -240
- package/dist/collection/components/bn-page/bn-page.js +14 -4
- package/dist/collection/components/bn-page/pageFormats.js +69 -0
- package/dist/collection/components/bn-ruleset/bn-ruleset.js +2 -2
- package/dist/collection/components/bn-scaling-group/bn-scaling-group.js +7 -7
- package/dist/collection/components/bn-table/bn-table.css +38 -1
- package/dist/collection/components/bn-table/bn-table.js +96 -59
- package/dist/collection/components/bn-table/ibcs-table.css +39 -1
- package/dist/collection/components/bn-table/ibcs-table.js +89 -30
- package/dist/collection/components/bn-table/utils/Table.js +12 -13
- package/dist/collection/components/bn-table/utils/elements/Cell.js +9 -3
- package/dist/collection/components/bn-table/utils/elements/CellBarChart.js +38 -34
- package/dist/collection/components/bn-table/utils/elements/TableRow.js +2 -1
- package/dist/collection/components/bn-table/utils/elements/WaterfallBar.js +4 -4
- package/dist/collection/components/bn-table/utils/factories/tableDataSetFactory.js +17 -4
- package/dist/collection/components/bn-table/utils/helper/DataQuery.js +128 -98
- package/dist/collection/components/bn-table/utils/helper/IntervalColumns.js +6 -20
- package/dist/collection/components/bn-table/utils/helper/QueryGroup.js +9 -2
- package/dist/collection/components/bn-table/utils/helper/barColumnGeometry.js +2 -2
- package/dist/collection/components/bn-table/utils/model/TableAttribute.js +2 -2
- package/dist/collection/components/bn-table/utils/model/TableComponentConfig.js +3 -2
- package/dist/collection/components/bn-template/bn-template.js +1 -1
- package/dist/collection/components/bn-text/bn-text.js +36 -39
- package/dist/collection/components/bn-text/utils/template.js +79 -0
- package/dist/collection/components/bn-title/bn-title.js +10 -4
- package/dist/collection/components/bn-title/ibcs-title/ibcs-title.js +3 -1
- package/dist/collection/components/bn-tree/bn-tree.js +119 -23
- package/dist/collection/components/bn-tree/utils/EdgeRenderer.js +59 -51
- package/dist/collection/components/bn-tree/utils/TreeLayout.js +30 -5
- package/dist/collection/components/bn-tree/utils/TreeParser.js +35 -0
- package/dist/collection/components/editor-companion/editor-companion.js +1 -1
- package/dist/collection/context/context-protocol.js +1 -1
- package/dist/collection/context/scopedDb.js +47 -4
- package/dist/collection/stores/componentStyles.js +39 -0
- package/dist/collection/stores/internationalization.js +15 -13
- package/dist/collection/utils/DateStringFactory.js +17 -15
- package/dist/collection/utils/autoFit.js +2 -2
- package/dist/collection/utils/componentRegister.js +60 -16
- package/dist/collection/utils/constants.js +2 -2
- package/dist/collection/utils/dataAnalyzer.js +9 -12
- package/dist/collection/utils/emptyState.js +21 -0
- package/dist/collection/utils/formatter.js +29 -20
- package/dist/collection/utils/layoutObserver.js +1 -1
- package/dist/collection/utils/layoutState/generic.js +1 -1
- package/dist/collection/utils/layoutState/svgChartElements.js +2 -2
- package/dist/collection/utils/layoutTemplate.js +81 -0
- package/dist/collection/utils/measurementHost.js +2 -2
- package/dist/collection/utils/model/Order.js +1 -1
- package/dist/collection/utils/model/styles/SVGStyle.js +12 -4
- package/dist/collection/utils/parentDimensions.js +35 -3
- package/dist/collection/utils/queryError.js +11 -0
- package/dist/collection/utils/relativeVariance.js +14 -0
- package/dist/collection/utils/sanitizeHtml.js +30 -16
- package/dist/collection/utils/scaling.js +2 -2
- package/dist/collection/utils/stackColors.js +27 -5
- package/dist/collection/utils/stackLayout.js +71 -0
- package/dist/collection/utils/styled/attributes.js +16 -3
- package/dist/collection/utils/styled/style-sheet.js +1 -1
- package/dist/collection/utils/styled/withStyled.js +1 -1
- package/dist/collection/utils/testing/fakeGroup.js +21 -0
- package/dist/collection/utils/testing/mutationObserver.js +44 -0
- package/dist/collection/utils/testing/structureChart.js +26 -0
- package/dist/collection/utils/testing/timeChart.js +28 -0
- package/dist/collection/utils/validate.js +1 -1
- package/dist/collection/utils/withComponentStatus.js +137 -12
- package/dist/collection/utils/withInheritedProps.js +113 -64
- package/dist/collection/utils/withRuleSet.js +10 -7
- package/dist/collection/utils/withTranslation.js +3 -3
- package/dist/collection/utils/xy/FacetGrid.js +1 -1
- package/dist/collection/utils/xy/IsoCurves.js +1 -1
- package/dist/collection/utils/xy/NumericScale.js +46 -15
- package/dist/collection/utils/xy/PointLabeler.js +2 -2
- package/dist/collection/utils/xy/RadiusScale.js +2 -2
- package/dist/collection/utils/xy/SeriesPalette.js +3 -3
- package/dist/collection/utils/xy/VarianceMeasure.js +22 -4
- package/dist/collection/utils/xy/XYFrame.js +4 -4
- package/dist/collection/utils/xy/XYLegend.js +5 -7
- package/dist/collection/utils/xy/checkXYOverflow.js +32 -0
- package/dist/collection/utils/xy/formatXYValue.js +13 -0
- package/dist/collection/utils/xy/model/XYChartDataRow.js +0 -0
- package/dist/collection/utils/xy/model/XYChartStyle.js +2 -0
- package/dist/components/DataFormatDigits.js +1 -1
- package/dist/components/DateStringFactory.js +1 -1
- package/dist/components/LabelCollisionManager.js +1 -1
- package/dist/components/NumericScale.js +1 -1
- package/dist/components/Order.js +1 -1
- package/dist/components/SVGStyle.js +1 -0
- package/dist/components/TableAttribute.js +1 -0
- package/dist/components/VarianceMeasure.js +1 -1
- package/dist/components/XYChartDataRow.js +1 -1
- package/dist/components/bn-asset.js +1 -1
- package/dist/components/bn-body2.js +1 -1
- package/dist/components/bn-card2.js +1 -1
- package/dist/components/bn-chart-bubble.js +1 -1
- package/dist/components/bn-chart-bullet.js +1 -1
- package/dist/components/bn-chart-scatter.js +1 -1
- package/dist/components/bn-chart-structure.js +1 -1
- package/dist/components/bn-chart-time.js +1 -1
- package/dist/components/bn-component-style.js +1 -1
- package/dist/components/bn-context.js +1 -1
- package/dist/components/bn-dataset.js +1 -1
- package/dist/components/bn-datasource.js +1 -1
- package/dist/components/bn-footer2.js +1 -1
- package/dist/components/bn-grid.js +1 -1
- package/dist/components/bn-image.js +1 -1
- package/dist/components/bn-internationalization.js +1 -1
- package/dist/components/bn-layout-card.js +1 -1
- package/dist/components/bn-layout-page.js +1 -1
- package/dist/components/bn-message2.js +1 -1
- package/dist/components/bn-page2.js +1 -1
- package/dist/components/bn-ruleset.js +1 -1
- package/dist/components/bn-scaling-group.js +1 -1
- package/dist/components/bn-table.js +1 -1
- package/dist/components/bn-template.js +1 -1
- package/dist/components/bn-text.js +1 -1
- package/dist/components/bn-title2.js +1 -1
- package/dist/components/bn-tree.js +1 -1
- package/dist/components/checkXYOverflow.js +1 -0
- package/dist/components/context-protocol.js +1 -1
- package/dist/components/editor-companion.js +1 -1
- package/dist/components/emptyState.js +1 -0
- package/dist/components/formatter.js +1 -1
- package/dist/components/ibcs-chart-bubble2.js +1 -1
- package/dist/components/ibcs-chart-bullet2.js +1 -1
- package/dist/components/ibcs-chart-scatter2.js +1 -1
- package/dist/components/ibcs-chart-structure2.js +1 -1
- package/dist/components/ibcs-chart-time2.js +1 -1
- package/dist/components/ibcs-table2.js +1 -1
- package/dist/components/ibcs-title2.js +1 -1
- package/dist/components/layoutTemplate.js +1 -0
- package/dist/components/pageFormats.js +1 -0
- package/dist/components/parentDimensions.js +1 -0
- package/dist/components/queryError.js +1 -0
- package/dist/components/relativeVariance.js +1 -0
- package/dist/components/sanitizeHtml.js +1 -1
- package/dist/components/stackColors.js +1 -1
- package/dist/components/stackLayout.js +1 -0
- package/dist/components/svg.esm.js +1 -0
- package/dist/components/validate.js +1 -1
- package/dist/components/withBodyObserver.js +1 -1
- package/dist/components/withComponentStatus.js +1 -0
- package/dist/components/withComponentStyle.js +1 -1
- package/dist/components/withDataset.js +1 -1
- package/dist/components/withHasError.js +1 -1
- package/dist/components/withRuleSet.js +1 -1
- package/dist/components/withScalingGroup.js +1 -1
- package/dist/components/withStyled.js +1 -1
- package/dist/components/withTranslation.js +1 -1
- package/dist/esm/{bn-asset_21.entry.js → bn-asset_28.entry.js} +20948 -6125
- package/dist/esm/bn-grid.entry.js +4 -6
- package/dist/esm/bn-image.entry.js +3 -5
- package/dist/esm/bn-internationalization.entry.js +17 -6
- package/dist/esm/bn-ruleset.entry.js +5 -5
- package/dist/esm/bn-template-engine.js +1 -1
- package/dist/esm/bn-template.entry.js +2 -2
- package/dist/esm/bn-text.entry.js +111 -39
- package/dist/esm/{context-protocol-B-vdGKeG.js → context-protocol-CdTp19uA.js} +106 -22
- package/dist/esm/{diagnostics-CiquIw8B.js → diagnostics-vw6TKMiT.js} +1 -1
- package/dist/esm/editor-companion.entry.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/queryError-ClruFZD_.js +13 -0
- package/dist/esm/{scaling-Dggyeqts.js → sanitizeHtml-C5bFtARM.js} +464 -287
- package/dist/esm/{withBodyObserver-Cb9ZC5_J.js → withBodyObserver-DD_-r04o.js} +1 -1
- package/dist/esm/withHasError-73WV2SP5.js +422 -0
- package/dist/esm/{withStyled-DoNsbwS3.js → withStyled-BDEyKd_H.js} +513 -27
- package/dist/types/components/bn-chart-bubble/bn-chart-bubble.d.ts +8 -4
- package/dist/types/components/bn-chart-bubble/ibcs-chart-bubble.d.ts +2 -1
- package/dist/types/components/bn-chart-bubble/utils/BubbleChart.d.ts +14 -2
- package/dist/types/components/bn-chart-bullet/bn-chart-bullet.d.ts +12 -11
- package/dist/types/components/bn-chart-bullet/ibcs-chart-bullet.d.ts +2 -1
- package/dist/types/components/bn-chart-bullet/utils/BulletChart.d.ts +8 -5
- package/dist/types/components/bn-chart-bullet/utils/model/BulletChartStyle.d.ts +2 -0
- package/dist/types/components/bn-chart-bullet/utils/model/BulletConfig.d.ts +1 -1
- package/dist/types/components/bn-chart-scatter/bn-chart-scatter.d.ts +8 -4
- package/dist/types/components/bn-chart-scatter/ibcs-chart-scatter.d.ts +2 -1
- package/dist/types/components/bn-chart-scatter/utils/ScatterChart.d.ts +11 -1
- package/dist/types/components/bn-chart-structure/bn-chart-structure.d.ts +13 -12
- package/dist/types/components/bn-chart-structure/ibcs-chart-structure.d.ts +8 -1
- package/dist/types/components/bn-chart-structure/utils/StructureChart.d.ts +29 -6
- package/dist/types/components/bn-chart-structure/utils/elements/StackedBar.d.ts +4 -3
- package/dist/types/components/bn-chart-structure/utils/model/DataPoint.d.ts +3 -2
- package/dist/types/components/bn-chart-structure/utils/model/StructureChartComponentConfig.d.ts +2 -1
- package/dist/types/components/bn-chart-structure/utils/model/styles/StructureChartStyle.d.ts +2 -0
- package/dist/types/components/bn-chart-time/bn-chart-time.d.ts +19 -15
- package/dist/types/components/bn-chart-time/ibcs-chart-time.d.ts +8 -1
- package/dist/types/components/bn-chart-time/utils/TimeChart.d.ts +63 -5
- package/dist/types/components/bn-chart-time/utils/elements/AreaFill.d.ts +1 -1
- package/dist/types/components/bn-chart-time/utils/elements/StackedColumn.d.ts +9 -8
- package/dist/types/components/bn-chart-time/utils/model/DataPoint.d.ts +3 -2
- package/dist/types/components/bn-chart-time/utils/model/TimeChartComponentConfig.d.ts +3 -2
- package/dist/types/components/bn-chart-time/utils/model/styles/TimeChartStyle.d.ts +2 -0
- package/dist/types/components/bn-context/bn-context.d.ts +15 -3
- package/dist/types/components/bn-dataset/bn-dataset.d.ts +41 -20
- package/dist/types/components/bn-datasource/bn-datasource.d.ts +34 -18
- package/dist/types/components/bn-footer/bn-footer.d.ts +2 -2
- package/dist/types/components/bn-layout-card/bn-layout-card.d.ts +3 -10
- package/dist/types/components/bn-layout-page/bn-layout-page.d.ts +13 -6
- package/dist/types/components/bn-message/bn-message.d.ts +2 -1
- package/dist/types/components/bn-page/bn-page.d.ts +2 -1
- package/dist/types/components/bn-page/pageFormats.d.ts +40 -0
- package/dist/types/components/bn-scaling-group/bn-scaling-group.d.ts +2 -2
- package/dist/types/components/bn-table/bn-table.d.ts +11 -10
- package/dist/types/components/bn-table/ibcs-table.d.ts +8 -5
- package/dist/types/components/bn-table/utils/Table.d.ts +3 -1
- package/dist/types/components/bn-table/utils/elements/Cell.d.ts +2 -2
- package/dist/types/components/bn-table/utils/elements/CellBarChart.d.ts +6 -4
- package/dist/types/components/bn-table/utils/elements/WaterfallBar.d.ts +1 -1
- package/dist/types/components/bn-table/utils/factories/tableDataSetFactory.d.ts +2 -0
- package/dist/types/components/bn-table/utils/helper/DataQuery.d.ts +14 -5
- package/dist/types/components/bn-table/utils/helper/IntervalColumns.d.ts +2 -2
- package/dist/types/components/bn-table/utils/helper/QueryGroup.d.ts +6 -1
- package/dist/types/components/bn-table/utils/helper/barColumnGeometry.d.ts +2 -2
- package/dist/types/components/bn-table/utils/model/TableAttribute.d.ts +2 -0
- package/dist/types/components/bn-table/utils/model/TableComponentConfig.d.ts +2 -1
- package/dist/types/components/bn-text/bn-text.d.ts +20 -13
- package/dist/types/components/bn-text/utils/template.d.ts +10 -0
- package/dist/types/components/bn-title/ibcs-title/ibcs-title.d.ts +1 -0
- package/dist/types/components/bn-tree/bn-tree.d.ts +8 -1
- package/dist/types/components/bn-tree/utils/EdgeRenderer.d.ts +18 -5
- package/dist/types/components/bn-tree/utils/TreeLayout.d.ts +5 -0
- package/dist/types/components.d.ts +226 -184
- package/dist/types/context/scopedDb.d.ts +20 -0
- package/dist/types/stores/componentStyles.d.ts +6 -0
- package/dist/types/utils/DateStringFactory.d.ts +3 -2
- package/dist/types/utils/autoFit.d.ts +2 -2
- package/dist/types/utils/componentRegister.d.ts +21 -5
- package/dist/types/utils/constants.d.ts +2 -2
- package/dist/types/utils/dataAnalyzer.d.ts +1 -1
- package/dist/types/utils/emptyState.d.ts +10 -0
- package/dist/types/utils/formatter.d.ts +7 -9
- package/dist/types/utils/layoutState/generic.d.ts +1 -1
- package/dist/types/utils/layoutState/svgChartElements.d.ts +2 -2
- package/dist/types/utils/layoutTemplate.d.ts +16 -0
- package/dist/types/utils/model/ChartStyles.d.ts +1 -1
- package/dist/types/utils/model/DataQueryResultRow.d.ts +2 -2
- package/dist/types/utils/model/Order.d.ts +1 -1
- package/dist/types/utils/model/styles/SVGStyle.d.ts +5 -1
- package/dist/types/utils/parentDimensions.d.ts +9 -0
- package/dist/types/utils/queryError.d.ts +5 -0
- package/dist/types/utils/relativeVariance.d.ts +9 -0
- package/dist/types/utils/sanitizeHtml.d.ts +2 -2
- package/dist/types/utils/scaling.d.ts +1 -1
- package/dist/types/utils/stackColors.d.ts +3 -2
- package/dist/types/utils/stackLayout.d.ts +49 -0
- package/dist/types/utils/testing/fakeGroup.d.ts +8 -0
- package/dist/types/utils/testing/mutationObserver.d.ts +5 -0
- package/dist/types/utils/testing/structureChart.d.ts +5 -0
- package/dist/types/utils/testing/timeChart.d.ts +5 -0
- package/dist/types/utils/validate.d.ts +1 -1
- package/dist/types/utils/withComponentStatus.d.ts +11 -3
- package/dist/types/utils/withInheritedProps.d.ts +42 -15
- package/dist/types/utils/withRuleSet.d.ts +2 -1
- package/dist/types/utils/withTranslation.d.ts +2 -2
- package/dist/types/utils/xy/FacetGrid.d.ts +1 -1
- package/dist/types/utils/xy/IsoCurves.d.ts +1 -1
- package/dist/types/utils/xy/NumericScale.d.ts +9 -4
- package/dist/types/utils/xy/PointLabeler.d.ts +2 -2
- package/dist/types/utils/xy/RadiusScale.d.ts +2 -2
- package/dist/types/utils/xy/SeriesPalette.d.ts +3 -3
- package/dist/types/utils/xy/VarianceMeasure.d.ts +10 -2
- package/dist/types/utils/xy/XYFrame.d.ts +4 -1
- package/dist/types/utils/xy/XYLegend.d.ts +3 -1
- package/dist/types/utils/xy/checkXYOverflow.d.ts +8 -0
- package/dist/types/utils/xy/formatXYValue.d.ts +7 -0
- package/dist/types/utils/xy/model/AxisConfig.d.ts +1 -1
- package/dist/types/utils/xy/model/XYChartStyle.d.ts +2 -0
- package/package.json +4 -2
- package/readme.md +11 -11
- package/dist/bn-template-engine/p-03304284.entry.js +0 -1
- package/dist/bn-template-engine/p-0fb02c57.entry.js +0 -1
- package/dist/bn-template-engine/p-4419db8f.entry.js +0 -1
- package/dist/bn-template-engine/p-45508f1b.entry.js +0 -1
- package/dist/bn-template-engine/p-461fdffa.entry.js +0 -1
- package/dist/bn-template-engine/p-5d7a3a77.entry.js +0 -1
- package/dist/bn-template-engine/p-62cc95b7.entry.js +0 -1
- package/dist/bn-template-engine/p-686d8e44.entry.js +0 -1
- package/dist/bn-template-engine/p-829212c3.entry.js +0 -1
- package/dist/bn-template-engine/p-B5Jd_eCX.js +0 -1
- package/dist/bn-template-engine/p-BA48JiHe.js +0 -1
- package/dist/bn-template-engine/p-BbmobTg0.js +0 -1
- package/dist/bn-template-engine/p-BcaI745G.js +0 -1
- package/dist/bn-template-engine/p-CG_Bcm6V.js +0 -1
- package/dist/bn-template-engine/p-CWWWM-XC.js +0 -1
- package/dist/bn-template-engine/p-CsJ84YRk.js +0 -1
- package/dist/bn-template-engine/p-D5e8I9Qe.js +0 -1
- package/dist/bn-template-engine/p-DVrDYxlh.js +0 -1
- package/dist/bn-template-engine/p-DjPXefnq.js +0 -1
- package/dist/bn-template-engine/p-DsTzlzxQ.js +0 -1
- package/dist/bn-template-engine/p-DtLI_CzV.js +0 -1
- package/dist/bn-template-engine/p-EtT29btN.js +0 -1
- package/dist/bn-template-engine/p-TuLpbB5O.js +0 -1
- package/dist/bn-template-engine/p-a5867a4c.entry.js +0 -1
- package/dist/bn-template-engine/p-b27009eb.entry.js +0 -1
- package/dist/bn-template-engine/p-bfa87b07.entry.js +0 -1
- package/dist/bn-template-engine/p-ceb80db3.entry.js +0 -1
- package/dist/bn-template-engine/p-fcfbb329.entry.js +0 -1
- package/dist/bn-template-engine/p-qRZrT-U3.js +0 -1
- package/dist/cjs/AxisConfig-DwiNUyYG.js +0 -233
- package/dist/cjs/LabelCollisionManager-Bv-xkeXw.js +0 -415
- package/dist/cjs/NumericScale-BAyYXpKL.js +0 -107
- package/dist/cjs/Order-2wRydarc.js +0 -87
- package/dist/cjs/SVGStyle-DoxylrEQ.js +0 -8219
- package/dist/cjs/SVGVariancesStyleGroup-CiI4GeWe.js +0 -50
- package/dist/cjs/VarianceMeasure-CQlSRzlp.js +0 -372
- package/dist/cjs/XYChartDataRow-C2FdL58s.js +0 -829
- package/dist/cjs/bn-chart-bubble.cjs.entry.js +0 -792
- package/dist/cjs/bn-chart-bullet.cjs.entry.js +0 -805
- package/dist/cjs/bn-chart-scatter.cjs.entry.js +0 -678
- package/dist/cjs/bn-tree.cjs.entry.js +0 -1042
- package/dist/cjs/ibcs-chart-bubble.cjs.entry.js +0 -624
- package/dist/cjs/ibcs-chart-bullet.cjs.entry.js +0 -673
- package/dist/cjs/ibcs-chart-scatter.cjs.entry.js +0 -667
- package/dist/cjs/sanitizeHtml-LuZr1IMd.js +0 -85
- package/dist/cjs/svgChartElements-tDA43aYj.js +0 -400
- package/dist/cjs/withHasError-BdDmiOXM.js +0 -258
- package/dist/cjs/withScalingGroup-CFIc5-6s.js +0 -73
- package/dist/components/autoFit.js +0 -1
- package/dist/components/main.js +0 -1
- package/dist/components/utils.js +0 -1
- package/dist/esm/AxisConfig-KqzWQbML.js +0 -224
- package/dist/esm/LabelCollisionManager-585bQMtP.js +0 -407
- package/dist/esm/NumericScale-DsTzlzxQ.js +0 -105
- package/dist/esm/Order-DZVWjEL_.js +0 -83
- package/dist/esm/SVGStyle-OrPkzjcb.js +0 -8209
- package/dist/esm/SVGVariancesStyleGroup-DO5QJfRQ.js +0 -48
- package/dist/esm/VarianceMeasure-DDjChp8C.js +0 -364
- package/dist/esm/XYChartDataRow-Dn83Tqh9.js +0 -820
- package/dist/esm/bn-chart-bubble.entry.js +0 -790
- package/dist/esm/bn-chart-bullet.entry.js +0 -803
- package/dist/esm/bn-chart-scatter.entry.js +0 -676
- package/dist/esm/bn-tree.entry.js +0 -1040
- package/dist/esm/ibcs-chart-bubble.entry.js +0 -622
- package/dist/esm/ibcs-chart-bullet.entry.js +0 -671
- package/dist/esm/ibcs-chart-scatter.entry.js +0 -665
- package/dist/esm/sanitizeHtml-BA48JiHe.js +0 -83
- package/dist/esm/svgChartElements-B3YClivG.js +0 -395
- package/dist/esm/withHasError-Bh1Viz52.js +0 -254
- package/dist/esm/withScalingGroup-DNBSqRC0.js +0 -71
|
@@ -1,10 +1,59 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var index = require('./index-C1Z9vO7z.js');
|
|
4
|
-
var contextProtocol = require('./context-protocol-
|
|
5
|
-
var withHasError = require('./withHasError-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
var contextProtocol = require('./context-protocol-C0rKepqu.js');
|
|
5
|
+
var withHasError = require('./withHasError-qGW_yqIv.js');
|
|
6
|
+
|
|
7
|
+
const isObject = (obj) => {
|
|
8
|
+
if (typeof obj === 'object' && obj !== null) {
|
|
9
|
+
if (typeof Object.getPrototypeOf === 'function') {
|
|
10
|
+
const prototype = Object.getPrototypeOf(obj);
|
|
11
|
+
return prototype === Object.prototype || prototype === null;
|
|
12
|
+
}
|
|
13
|
+
return Object.prototype.toString.call(obj) === '[object Object]';
|
|
14
|
+
}
|
|
15
|
+
return false;
|
|
16
|
+
};
|
|
17
|
+
const overwriteMerge = (_, currArr) => currArr;
|
|
18
|
+
const combineMerge = (prevArr, currArr) => {
|
|
19
|
+
return [...new Set([...prevArr, ...currArr])];
|
|
20
|
+
};
|
|
21
|
+
const getMergeFn = (type) => {
|
|
22
|
+
switch (type) {
|
|
23
|
+
case 'overwrite':
|
|
24
|
+
return overwriteMerge;
|
|
25
|
+
case 'combine':
|
|
26
|
+
default:
|
|
27
|
+
return combineMerge;
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const withDefaultOptions = (options) => {
|
|
32
|
+
return {
|
|
33
|
+
arrayMergeType: 'combine',
|
|
34
|
+
arrayMerge: getMergeFn(options ? options.arrayMergeType : 'combine'),
|
|
35
|
+
...options,
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
const merge = (objects, options) => {
|
|
39
|
+
const opts = withDefaultOptions(options);
|
|
40
|
+
return objects.reduce((prev, curr) => {
|
|
41
|
+
Object.keys(curr).forEach((key) => {
|
|
42
|
+
if (Array.isArray(prev[key]) && Array.isArray(curr[key])) {
|
|
43
|
+
if (opts && opts.arrayMerge) {
|
|
44
|
+
prev[key] = opts.arrayMerge(prev[key], curr[key]);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
else if (isObject(prev[key]) && isObject(curr[key])) {
|
|
48
|
+
prev[key] = merge([prev[key], curr[key]], opts);
|
|
49
|
+
}
|
|
50
|
+
else {
|
|
51
|
+
prev[key] = curr[key];
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
return prev;
|
|
55
|
+
}, {});
|
|
56
|
+
};
|
|
8
57
|
|
|
9
58
|
/**
|
|
10
59
|
* Mixin that provides themed styling to a Stencil component using a
|
|
@@ -33,7 +82,7 @@ const withComponentStyle = (component) => {
|
|
|
33
82
|
const state = stores.componentStyles.state;
|
|
34
83
|
// Arrays overwrite instead of concatenating: ordered color lists like
|
|
35
84
|
// seriesColors/stackColors must be replaced wholesale by an override.
|
|
36
|
-
style =
|
|
85
|
+
style = merge([state["_system"] || {}, state["_default"] || {}, state[selectedStyle] || {}], { arrayMergeType: "overwrite" });
|
|
37
86
|
};
|
|
38
87
|
const observer = new MutationObserver((mutations) => {
|
|
39
88
|
mutations.forEach((mutation) => {
|
|
@@ -74,8 +123,200 @@ const withComponentStyle = (component) => {
|
|
|
74
123
|
return componentStyle;
|
|
75
124
|
};
|
|
76
125
|
|
|
126
|
+
/** Controls which parts of a component are translated: ALL=labels+data, META=labels only. */
|
|
127
|
+
exports.I18nMode = void 0;
|
|
128
|
+
(function (I18nMode) {
|
|
129
|
+
I18nMode["ALL"] = "all";
|
|
130
|
+
I18nMode["META"] = "meta";
|
|
131
|
+
})(exports.I18nMode || (exports.I18nMode = {}));
|
|
132
|
+
/** Unit type of the measured values - affects default formatting and SI prefix behavior. */
|
|
133
|
+
exports.MeasureType = void 0;
|
|
134
|
+
(function (MeasureType) {
|
|
135
|
+
MeasureType["CURRENCY"] = "currency";
|
|
136
|
+
MeasureType["VOLUME"] = "volume";
|
|
137
|
+
})(exports.MeasureType || (exports.MeasureType = {}));
|
|
138
|
+
/**
|
|
139
|
+
* IBCS four-scenario model with up to 4 variants per type.
|
|
140
|
+
* - AC (actual): reported/measured values
|
|
141
|
+
* - PP (previous period): prior year or period for comparison
|
|
142
|
+
* - FC (forecast): projected future values
|
|
143
|
+
* - PL (plan): budgeted/target values
|
|
144
|
+
*/
|
|
145
|
+
exports.Scenarios = void 0;
|
|
146
|
+
(function (Scenarios) {
|
|
147
|
+
Scenarios["AC1"] = "ac1";
|
|
148
|
+
Scenarios["AC2"] = "ac2";
|
|
149
|
+
Scenarios["AC3"] = "ac3";
|
|
150
|
+
Scenarios["AC4"] = "ac4";
|
|
151
|
+
Scenarios["PP1"] = "pp1";
|
|
152
|
+
Scenarios["PP2"] = "pp2";
|
|
153
|
+
Scenarios["PP3"] = "pp3";
|
|
154
|
+
Scenarios["PP4"] = "pp4";
|
|
155
|
+
Scenarios["FC1"] = "fc1";
|
|
156
|
+
Scenarios["FC2"] = "fc2";
|
|
157
|
+
Scenarios["FC3"] = "fc3";
|
|
158
|
+
Scenarios["FC4"] = "fc4";
|
|
159
|
+
Scenarios["PL1"] = "pl1";
|
|
160
|
+
Scenarios["PL2"] = "pl2";
|
|
161
|
+
Scenarios["PL3"] = "pl3";
|
|
162
|
+
Scenarios["PL4"] = "pl4";
|
|
163
|
+
})(exports.Scenarios || (exports.Scenarios = {}));
|
|
164
|
+
/**
|
|
165
|
+
* Variance direction for IBCS traffic-light coloring.
|
|
166
|
+
* - POS: favorable variance (green in IBCS)
|
|
167
|
+
* - NEG: unfavorable variance (red in IBCS)
|
|
168
|
+
* - NEU: neutral / no directional meaning
|
|
169
|
+
*/
|
|
170
|
+
var Sentiments;
|
|
171
|
+
(function (Sentiments) {
|
|
172
|
+
Sentiments["POS"] = "pos";
|
|
173
|
+
Sentiments["NEG"] = "neg";
|
|
174
|
+
Sentiments["NEU"] = "neu";
|
|
175
|
+
})(Sentiments || (Sentiments = {}));
|
|
176
|
+
/** Number display format: DECIMAL for absolute values, PERCENT for ratio columns. */
|
|
177
|
+
exports.DataFormat = void 0;
|
|
178
|
+
(function (DataFormat) {
|
|
179
|
+
DataFormat["DECIMAL"] = "decimal";
|
|
180
|
+
DataFormat["PERCENT"] = "percent";
|
|
181
|
+
})(exports.DataFormat || (exports.DataFormat = {}));
|
|
182
|
+
/**
|
|
183
|
+
* Table aggregation mode.
|
|
184
|
+
* - LIST: no aggregation, rows displayed as-is
|
|
185
|
+
* - SUM: simple sum per group with a grand total row
|
|
186
|
+
* - SUMNOTOTAL: sum per group without a grand total
|
|
187
|
+
* - OPT: operation-aware aggregation - rows with operation="-" subtract from the group sum
|
|
188
|
+
* - OPTNOTOTAL: operation-aware aggregation without a grand total
|
|
189
|
+
*/
|
|
190
|
+
var TableType;
|
|
191
|
+
(function (TableType) {
|
|
192
|
+
TableType["LIST"] = "list";
|
|
193
|
+
TableType["SUM"] = "sum";
|
|
194
|
+
TableType["SUMNOTOTAL"] = "sumnototal";
|
|
195
|
+
TableType["OPT"] = "opt";
|
|
196
|
+
TableType["OPTNOTOTAL"] = "optnototal";
|
|
197
|
+
})(TableType || (TableType = {}));
|
|
198
|
+
/** Width of the category label column, in em of the table font. INF = auto/infinite. */
|
|
199
|
+
exports.TableCategoryWidth = void 0;
|
|
200
|
+
(function (TableCategoryWidth) {
|
|
201
|
+
TableCategoryWidth["INF"] = "inf";
|
|
202
|
+
TableCategoryWidth["W100"] = "w100";
|
|
203
|
+
TableCategoryWidth["W50"] = "w50";
|
|
204
|
+
TableCategoryWidth["W25"] = "w25";
|
|
205
|
+
TableCategoryWidth["W20"] = "w20";
|
|
206
|
+
TableCategoryWidth["W15"] = "w15";
|
|
207
|
+
TableCategoryWidth["W10"] = "w10";
|
|
208
|
+
TableCategoryWidth["W5"] = "w5";
|
|
209
|
+
})(exports.TableCategoryWidth || (exports.TableCategoryWidth = {}));
|
|
210
|
+
/** Width preset for inline bar/pin chart columns. Value = total column width in em. */
|
|
211
|
+
exports.TableBarColumnWidth = void 0;
|
|
212
|
+
(function (TableBarColumnWidth) {
|
|
213
|
+
TableBarColumnWidth["W5"] = "w5";
|
|
214
|
+
TableBarColumnWidth["W10"] = "w10";
|
|
215
|
+
TableBarColumnWidth["W15"] = "w15";
|
|
216
|
+
TableBarColumnWidth["W20"] = "w20";
|
|
217
|
+
TableBarColumnWidth["W25"] = "w25";
|
|
218
|
+
TableBarColumnWidth["W30"] = "w30";
|
|
219
|
+
TableBarColumnWidth["W40"] = "w40";
|
|
220
|
+
TableBarColumnWidth["W60"] = "w60";
|
|
221
|
+
TableBarColumnWidth["W80"] = "w80";
|
|
222
|
+
TableBarColumnWidth["W100"] = "w100";
|
|
223
|
+
})(exports.TableBarColumnWidth || (exports.TableBarColumnWidth = {}));
|
|
224
|
+
/** Maps TableBarColumnWidth presets to total bar column width in em. */
|
|
225
|
+
const BAR_COLUMN_WIDTH_EM = {
|
|
226
|
+
[exports.TableBarColumnWidth.W5]: 5,
|
|
227
|
+
[exports.TableBarColumnWidth.W10]: 10,
|
|
228
|
+
[exports.TableBarColumnWidth.W15]: 15,
|
|
229
|
+
[exports.TableBarColumnWidth.W20]: 20,
|
|
230
|
+
[exports.TableBarColumnWidth.W25]: 25,
|
|
231
|
+
[exports.TableBarColumnWidth.W30]: 30,
|
|
232
|
+
[exports.TableBarColumnWidth.W40]: 40,
|
|
233
|
+
[exports.TableBarColumnWidth.W60]: 60,
|
|
234
|
+
[exports.TableBarColumnWidth.W80]: 80,
|
|
235
|
+
[exports.TableBarColumnWidth.W100]: 100,
|
|
236
|
+
};
|
|
237
|
+
/**
|
|
238
|
+
* Three-level row hierarchy for grouping and drill-down: rowGroup > category > subCategory.
|
|
239
|
+
* Index variants (e.g. ROWGROUPINDEX) provide stable numeric sort keys that preserve
|
|
240
|
+
* the original dataset order when alphabetical sorting is undesirable.
|
|
241
|
+
*/
|
|
242
|
+
exports.AggregationLevel = void 0;
|
|
243
|
+
(function (AggregationLevel) {
|
|
244
|
+
AggregationLevel["ROWGROUP"] = "rowGroup";
|
|
245
|
+
AggregationLevel["ROWGROUPINDEX"] = "rowGroupIndex";
|
|
246
|
+
AggregationLevel["CATEGORY"] = "category";
|
|
247
|
+
AggregationLevel["CATEGORYINDEX"] = "categoryIndex";
|
|
248
|
+
AggregationLevel["SUBCATEGORY"] = "subCategory";
|
|
249
|
+
AggregationLevel["SUBCATEGORYINDEX"] = "subCategoryIndex";
|
|
250
|
+
})(exports.AggregationLevel || (exports.AggregationLevel = {}));
|
|
251
|
+
/**
|
|
252
|
+
* Date axis label display strategy.
|
|
253
|
+
* - SMART: abbreviated labels with parent period shown at boundary crossings (e.g. "Jan" normally, "Jan 2024" at year boundary)
|
|
254
|
+
* - LONG: full date format for every label
|
|
255
|
+
* - SHORT: abbreviated format for every label
|
|
256
|
+
*/
|
|
257
|
+
exports.AxisLabelsMode = void 0;
|
|
258
|
+
(function (AxisLabelsMode) {
|
|
259
|
+
AxisLabelsMode["SMART"] = "smart";
|
|
260
|
+
AxisLabelsMode["LONG"] = "long";
|
|
261
|
+
AxisLabelsMode["SHORT"] = "short";
|
|
262
|
+
})(exports.AxisLabelsMode || (exports.AxisLabelsMode = {}));
|
|
263
|
+
/**
|
|
264
|
+
* Visual representation type for chart series.
|
|
265
|
+
* - COLUMN: vertical bars (time chart) or horizontal bars (structure chart)
|
|
266
|
+
* - LINE: connected data points
|
|
267
|
+
* - WATERFALL: cumulative flow where each bar starts where the previous one ended
|
|
268
|
+
*/
|
|
269
|
+
var ChartType;
|
|
270
|
+
(function (ChartType) {
|
|
271
|
+
ChartType["COLUMN"] = "column";
|
|
272
|
+
ChartType["LINE"] = "line";
|
|
273
|
+
ChartType["WATERFALL"] = "waterfall";
|
|
274
|
+
})(ChartType || (ChartType = {}));
|
|
275
|
+
/** Chart rendering mode. AUTO selects BAR or LINE based on scenario type. */
|
|
276
|
+
exports.ChartMode = void 0;
|
|
277
|
+
(function (ChartMode) {
|
|
278
|
+
ChartMode["BAR"] = "bar";
|
|
279
|
+
ChartMode["LINE"] = "line";
|
|
280
|
+
ChartMode["AUTO"] = "auto";
|
|
281
|
+
})(exports.ChartMode || (exports.ChartMode = {}));
|
|
282
|
+
/**
|
|
283
|
+
* Stacking dimension for multi-segment bar charts.
|
|
284
|
+
* - SCENARIOS: stack the scenarios from the `scenarios` prop end-to-end
|
|
285
|
+
* - DIMENSIONS: stack by the next-lower hierarchy level derived from the `level` prop
|
|
286
|
+
* (rowGroup → category, category → subCategory)
|
|
287
|
+
*/
|
|
288
|
+
exports.StackBy = void 0;
|
|
289
|
+
(function (StackBy) {
|
|
290
|
+
StackBy["SCENARIOS"] = "scenarios";
|
|
291
|
+
StackBy["DIMENSIONS"] = "dimensions";
|
|
292
|
+
})(exports.StackBy || (exports.StackBy = {}));
|
|
293
|
+
/**
|
|
294
|
+
* How stacked values are presented.
|
|
295
|
+
* - ABSOLUTE: raw values stacked
|
|
296
|
+
* - RELATIVE: normalized to 100% per data point
|
|
297
|
+
* - ABSOLUTE_RELATIVE: absolute bars with a relative (%) total label
|
|
298
|
+
*/
|
|
299
|
+
exports.StackMode = void 0;
|
|
300
|
+
(function (StackMode) {
|
|
301
|
+
StackMode["ABSOLUTE"] = "absolute";
|
|
302
|
+
StackMode["RELATIVE"] = "relative";
|
|
303
|
+
StackMode["ABSOLUTE_RELATIVE"] = "absolute-relative";
|
|
304
|
+
})(exports.StackMode || (exports.StackMode = {}));
|
|
305
|
+
/**
|
|
306
|
+
* Value domain of a RELATIVE (100%) stack: the full stack spans 100 units,
|
|
307
|
+
* so pixelPerUnit is interpreted as pixels per percentage point.
|
|
308
|
+
*/
|
|
309
|
+
const RELATIVE_STACK_UNITS = 100;
|
|
310
|
+
/** Sort order of segments within a stacked bar. DATASET preserves the original data order. */
|
|
311
|
+
exports.StackOrder = void 0;
|
|
312
|
+
(function (StackOrder) {
|
|
313
|
+
StackOrder["ASC"] = "asc";
|
|
314
|
+
StackOrder["DESC"] = "desc";
|
|
315
|
+
StackOrder["DATASET"] = "dataset";
|
|
316
|
+
})(exports.StackOrder || (exports.StackOrder = {}));
|
|
317
|
+
|
|
77
318
|
const EXPRESSION_REGEX = /^\s*(set|first|last|min|max|avg|sum|lit)\(\s*(.*?)\s*\)\s*$/;
|
|
78
|
-
/** Field arguments must be plain identifiers
|
|
319
|
+
/** Field arguments must be plain identifiers - keeps user input out of SQL syntax. */
|
|
79
320
|
const FIELD_IDENTIFIER_REGEX = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
80
321
|
const NUMERIC_FNS = ["min", "max", "avg", "sum"];
|
|
81
322
|
/**
|
|
@@ -164,7 +405,8 @@ class DateStringFactory {
|
|
|
164
405
|
year: "yyyy",
|
|
165
406
|
quarter: "q'Q' yyyy",
|
|
166
407
|
month: "LLL yyyy",
|
|
167
|
-
week:
|
|
408
|
+
// kkkk is the ISO week year: week 1 of 2025 starts on Monday 2024-12-30
|
|
409
|
+
week: "'KW'WW kkkk",
|
|
168
410
|
day: "dd.MM.yyyy",
|
|
169
411
|
hour: "TT",
|
|
170
412
|
minute: "TT",
|
|
@@ -327,24 +569,24 @@ class DateStringFactory {
|
|
|
327
569
|
* @param {string|Date} from start date
|
|
328
570
|
* @param {string|Date} to end date
|
|
329
571
|
* @param dateInterval
|
|
330
|
-
* @param spanLimit
|
|
331
572
|
*/
|
|
332
|
-
datesBetween(from, to, dateInterval
|
|
573
|
+
datesBetween(from, to, dateInterval) {
|
|
333
574
|
const unit = this.convertDateDistanceToMomentunitOfTime(dateInterval);
|
|
334
575
|
const fromDate = from.startOf(unit);
|
|
335
576
|
const toDate = to.endOf(unit);
|
|
336
|
-
let span = toDate.diff(fromDate).as(unit);
|
|
337
577
|
const days = [];
|
|
338
|
-
if (span >= spanLimit) {
|
|
339
|
-
span = spanLimit;
|
|
340
|
-
}
|
|
341
578
|
let currentDate = fromDate;
|
|
342
579
|
do {
|
|
343
580
|
days.push(currentDate);
|
|
344
581
|
currentDate = currentDate.plus(this.createDiratonLike(unit, 1));
|
|
345
|
-
} while (currentDate <= toDate
|
|
582
|
+
} while (currentDate <= toDate);
|
|
346
583
|
return days;
|
|
347
584
|
}
|
|
585
|
+
/** Number of `dateInterval` periods from `from` to `to`, both included. */
|
|
586
|
+
countBetween(from, to, dateInterval) {
|
|
587
|
+
const unit = this.convertDateDistanceToMomentunitOfTime(dateInterval);
|
|
588
|
+
return Math.floor(to.startOf(unit).diff(from.startOf(unit), unit).as(unit)) + 1;
|
|
589
|
+
}
|
|
348
590
|
/**
|
|
349
591
|
* Produces an IBCS date-link string combining date formatting with link notation.
|
|
350
592
|
*
|
|
@@ -402,7 +644,7 @@ class DateStringFactory {
|
|
|
402
644
|
dateString1 = dateString2;
|
|
403
645
|
}
|
|
404
646
|
// clean up dateString1 if same year
|
|
405
|
-
if (mode === exports.DateLink.INTERVAL || mode === exports.DateLink.CUM || exports.DateLink.AVG) {
|
|
647
|
+
if (mode === exports.DateLink.INTERVAL || mode === exports.DateLink.CUM || mode === exports.DateLink.AVG) {
|
|
406
648
|
if (type === exports.DateDistance.QUARTER) {
|
|
407
649
|
if (date1.quarter === date2.quarter && date1.year === date2.year) {
|
|
408
650
|
dateString2 = dateString2.replace(" " + date2.year, "");
|
|
@@ -420,11 +662,11 @@ class DateStringFactory {
|
|
|
420
662
|
}
|
|
421
663
|
}
|
|
422
664
|
else if (type === exports.DateDistance.WEEK) {
|
|
423
|
-
if (date1.weekNumber === date2.weekNumber && date1.
|
|
424
|
-
dateString2 = dateString2.replace(" " + date2.
|
|
665
|
+
if (date1.weekNumber === date2.weekNumber && date1.weekYear === date2.weekYear) {
|
|
666
|
+
dateString2 = dateString2.replace(" " + date2.weekYear, "");
|
|
425
667
|
}
|
|
426
|
-
else if (date1.
|
|
427
|
-
dateString1 = dateString1.replace(" " + date1.
|
|
668
|
+
else if (date1.weekYear === date2.weekYear) {
|
|
669
|
+
dateString1 = dateString1.replace(" " + date1.weekYear, "");
|
|
428
670
|
}
|
|
429
671
|
}
|
|
430
672
|
}
|
|
@@ -467,7 +709,8 @@ class DateStringFactory {
|
|
|
467
709
|
getFormatedWeekDate(date) {
|
|
468
710
|
let format = this.dateFormatShort["week"];
|
|
469
711
|
if (this.isFirstWeek(date)) {
|
|
470
|
-
|
|
712
|
+
// the short ISO week year, see the week format
|
|
713
|
+
format += " kk";
|
|
471
714
|
}
|
|
472
715
|
return date.setLocale(this.locale).toFormat(format);
|
|
473
716
|
}
|
|
@@ -593,12 +836,242 @@ class DateStringFactory {
|
|
|
593
836
|
* locale-aware through `setLocale`, so they need no override.
|
|
594
837
|
*/
|
|
595
838
|
DateStringFactory.LOCALE_DATE_FORMAT = {
|
|
596
|
-
en: { week: "'W'WW
|
|
839
|
+
en: { week: "'W'WW kkkk", day: "MM/dd/yyyy", fallback: "MM/dd/yyyy" },
|
|
597
840
|
};
|
|
598
841
|
DateStringFactory.LOCALE_DATE_FORMAT_SHORT = {
|
|
599
842
|
en: { week: "'W'WW", fallback: "MM/dd/yyyy" },
|
|
600
843
|
};
|
|
601
844
|
|
|
845
|
+
/**
|
|
846
|
+
* Type-checking utility used throughout the adapter layer for safe JSON-to-domain conversion.
|
|
847
|
+
*
|
|
848
|
+
* All methods are static guards that validate a single `unknown` value before it is
|
|
849
|
+
* assigned to a typed domain property. Methods that serve as TypeScript type guards
|
|
850
|
+
* use `data is T` return types to enable downstream type narrowing.
|
|
851
|
+
*/
|
|
852
|
+
class CompareUtil {
|
|
853
|
+
static isExisting(data) {
|
|
854
|
+
return data !== null && data !== undefined;
|
|
855
|
+
}
|
|
856
|
+
static isString(data) {
|
|
857
|
+
return typeof data === "string";
|
|
858
|
+
}
|
|
859
|
+
static isNumber(data) {
|
|
860
|
+
return typeof data === "number" && !Number.isNaN(data);
|
|
861
|
+
}
|
|
862
|
+
static isBoolean(data) {
|
|
863
|
+
return typeof data === "boolean";
|
|
864
|
+
}
|
|
865
|
+
static isArray(data) {
|
|
866
|
+
return Array.isArray(data);
|
|
867
|
+
}
|
|
868
|
+
static isObject(data) {
|
|
869
|
+
return typeof data === "object" && data !== null;
|
|
870
|
+
}
|
|
871
|
+
/**
|
|
872
|
+
* Checks if the value is a valid IBCS aggregation operator.
|
|
873
|
+
* Only `"+"` and `"-"` are valid; any other value is rejected.
|
|
874
|
+
*/
|
|
875
|
+
static isOperator(data) {
|
|
876
|
+
return data === "+" || data === "-";
|
|
877
|
+
}
|
|
878
|
+
/**
|
|
879
|
+
* Checks if the value is a valid Luxon DateTime instance.
|
|
880
|
+
* Returns false for invalid DateTime objects (e.g. parsed from malformed strings).
|
|
881
|
+
*/
|
|
882
|
+
static isDate(data) {
|
|
883
|
+
return data instanceof contextProtocol.DateTime && data.isValid;
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
/** Shared utilities for the adapter layer, used by all component config adapters. */
|
|
888
|
+
class AdapterUtils {
|
|
889
|
+
/** Returns the trimmed string value, or an empty string if the input is not a string. */
|
|
890
|
+
static adaptDefaultString(data) {
|
|
891
|
+
if (CompareUtil.isString(data)) {
|
|
892
|
+
return data.trim();
|
|
893
|
+
}
|
|
894
|
+
return "";
|
|
895
|
+
}
|
|
896
|
+
/**
|
|
897
|
+
* Safely adapts an array of untyped records through a typed adapter.
|
|
898
|
+
* If `data` is not an array, returns an empty array instead of throwing.
|
|
899
|
+
*/
|
|
900
|
+
static adaptArray(data, adapter) {
|
|
901
|
+
const targetArray = [];
|
|
902
|
+
if (CompareUtil.isArray(data)) {
|
|
903
|
+
data.forEach((b) => {
|
|
904
|
+
targetArray.push(adapter.adapt(b));
|
|
905
|
+
});
|
|
906
|
+
}
|
|
907
|
+
return targetArray;
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
|
|
911
|
+
exports.OrderDirection = void 0;
|
|
912
|
+
(function (OrderDirection) {
|
|
913
|
+
OrderDirection["ASC"] = "asc";
|
|
914
|
+
OrderDirection["DESC"] = "desc";
|
|
915
|
+
})(exports.OrderDirection || (exports.OrderDirection = {}));
|
|
916
|
+
/** Valid columns for ORDER BY in AlaSQL queries - includes hierarchy dimensions and all 16 scenario slots. */
|
|
917
|
+
exports.OrderColumn = void 0;
|
|
918
|
+
(function (OrderColumn) {
|
|
919
|
+
OrderColumn["ROWGROUP"] = "rowGroup";
|
|
920
|
+
OrderColumn["ROWGROUPINDEX"] = "rowGroupIndex";
|
|
921
|
+
OrderColumn["CATEGORY"] = "category";
|
|
922
|
+
OrderColumn["CATEGORYINDEX"] = "categoryIndex";
|
|
923
|
+
OrderColumn["SUBCATEGORY"] = "subCategory";
|
|
924
|
+
OrderColumn["SUBCATEGORYINDEX"] = "subCategoryIndex";
|
|
925
|
+
OrderColumn["AC1"] = "ac1";
|
|
926
|
+
OrderColumn["AC2"] = "ac2";
|
|
927
|
+
OrderColumn["AC3"] = "ac3";
|
|
928
|
+
OrderColumn["AC4"] = "ac4";
|
|
929
|
+
OrderColumn["PP1"] = "pp1";
|
|
930
|
+
OrderColumn["PP2"] = "pp2";
|
|
931
|
+
OrderColumn["PP3"] = "pp3";
|
|
932
|
+
OrderColumn["PP4"] = "pp4";
|
|
933
|
+
OrderColumn["FC1"] = "fc1";
|
|
934
|
+
OrderColumn["FC2"] = "fc2";
|
|
935
|
+
OrderColumn["FC3"] = "fc3";
|
|
936
|
+
OrderColumn["FC4"] = "fc4";
|
|
937
|
+
OrderColumn["PL1"] = "pl1";
|
|
938
|
+
OrderColumn["PL2"] = "pl2";
|
|
939
|
+
OrderColumn["PL3"] = "pl3";
|
|
940
|
+
OrderColumn["PL4"] = "pl4";
|
|
941
|
+
})(exports.OrderColumn || (exports.OrderColumn = {}));
|
|
942
|
+
class Order {
|
|
943
|
+
/**
|
|
944
|
+
* @param hierarchy Columns for multi-level sorting, applied left-to-right (e.g. `["rowGroup", "category"]`).
|
|
945
|
+
* @param direction Sort direction applied to all hierarchy levels.
|
|
946
|
+
*/
|
|
947
|
+
constructor(hierarchy = ["category"], direction = exports.OrderDirection.ASC) {
|
|
948
|
+
this.hierarchy = hierarchy;
|
|
949
|
+
this.direction = direction;
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
class OrderAdapter {
|
|
953
|
+
constructor(stringAdapter) {
|
|
954
|
+
this.stringAdapter = stringAdapter;
|
|
955
|
+
}
|
|
956
|
+
adapt(data) {
|
|
957
|
+
var _a;
|
|
958
|
+
const hierarchy = AdapterUtils.adaptArray(data.hierarchy, this.stringAdapter);
|
|
959
|
+
const order = exports.OrderDirection[(_a = data.direction) === null || _a === void 0 ? void 0 : _a.toUpperCase()] || exports.OrderDirection.ASC;
|
|
960
|
+
return new Order(hierarchy.map((str) => exports.OrderColumn[str.toUpperCase()] || exports.OrderColumn.CATEGORY), order);
|
|
961
|
+
}
|
|
962
|
+
default() {
|
|
963
|
+
return new Order(["category"], exports.OrderDirection.ASC);
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
/** Text shown for a relative variance whose reference is 0. */
|
|
968
|
+
const NOT_AVAILABLE = "n/a";
|
|
969
|
+
/**
|
|
970
|
+
* Relative variance (a - b) / |b|, from the difference a - b and the reference b.
|
|
971
|
+
* undefined: the reference is 0, callers show NOT_AVAILABLE and no bar.
|
|
972
|
+
* The reference counts as 0 also when it is 0 up to float rounding: a ratio above 1e9.
|
|
973
|
+
* NaN: an input is NaN, missing data stays missing.
|
|
974
|
+
*/
|
|
975
|
+
function relativeVariance(difference, reference) {
|
|
976
|
+
// a reference of 0, or 0 up to the float rounding of its sum, has no meaningful ratio
|
|
977
|
+
if (Math.abs(reference) <= Math.abs(difference) * 1e-9)
|
|
978
|
+
return undefined;
|
|
979
|
+
return difference / Math.abs(reference);
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
/**
|
|
983
|
+
* Variance-token parser for XY chart axis measures.
|
|
984
|
+
*
|
|
985
|
+
* Reuses the engine's variance grammar (`d{base}_{delta}_{sentiment}` /
|
|
986
|
+
* `dr{base}_{delta}_{sentiment}`) with one deviation from
|
|
987
|
+
* {@link VarianceScenario}: on axes the trailing sentiment segment is
|
|
988
|
+
* **optional and ignored** - position encodes the value, there is no
|
|
989
|
+
* pos/neg coloring. The regex is anchored, so partial matches inside a
|
|
990
|
+
* longer token are rejected.
|
|
991
|
+
*/
|
|
992
|
+
const VARIANCE_MEASURE_REGEX = /^(dr|d)((?:ac|pp|fc|pl)[1-4])_((?:ac|pp|fc|pl)[1-4])(?:_(pos|neg|neu))?$/;
|
|
993
|
+
class VarianceMeasure {
|
|
994
|
+
constructor(
|
|
995
|
+
/** `"d"` = absolute, `"dr"` = relative (fraction of delta). */
|
|
996
|
+
type,
|
|
997
|
+
/** Minuend scenario slot, e.g. `"ac1"`. */
|
|
998
|
+
base,
|
|
999
|
+
/** Subtrahend scenario slot, e.g. `"pp1"`. */
|
|
1000
|
+
delta) {
|
|
1001
|
+
this.type = type;
|
|
1002
|
+
this.base = base;
|
|
1003
|
+
this.delta = delta;
|
|
1004
|
+
}
|
|
1005
|
+
/** Parses a variance token; returns `null` when the token doesn't match the grammar. */
|
|
1006
|
+
static parse(token) {
|
|
1007
|
+
const match = VARIANCE_MEASURE_REGEX.exec(token);
|
|
1008
|
+
if (match === null) {
|
|
1009
|
+
return null;
|
|
1010
|
+
}
|
|
1011
|
+
return new VarianceMeasure(match[1], match[2], match[3]);
|
|
1012
|
+
}
|
|
1013
|
+
/**
|
|
1014
|
+
* Computes the variance value, mirroring the null-safe math of the
|
|
1015
|
+
* existing charts: absolute = `base - delta`, relative =
|
|
1016
|
+
* `(base - delta) / |delta|`. Returns `null` when either operand is
|
|
1017
|
+
* missing or a relative variance would divide by zero.
|
|
1018
|
+
*/
|
|
1019
|
+
compute(base, delta) {
|
|
1020
|
+
var _a;
|
|
1021
|
+
if (base == null || delta == null) {
|
|
1022
|
+
return null;
|
|
1023
|
+
}
|
|
1024
|
+
if (this.type === "dr") {
|
|
1025
|
+
if (delta === 0) {
|
|
1026
|
+
return null;
|
|
1027
|
+
}
|
|
1028
|
+
return (_a = relativeVariance(base - delta, delta)) !== null && _a !== void 0 ? _a : null;
|
|
1029
|
+
}
|
|
1030
|
+
return base - delta;
|
|
1031
|
+
}
|
|
1032
|
+
}
|
|
1033
|
+
/**
|
|
1034
|
+
* Resolves a measure token to a scenario slot or a variance measure.
|
|
1035
|
+
* Returns `null` for tokens matching neither vocabulary.
|
|
1036
|
+
*/
|
|
1037
|
+
function resolveMeasure(token) {
|
|
1038
|
+
const trimmed = token.trim();
|
|
1039
|
+
if (Object.values(exports.Scenarios).includes(trimmed)) {
|
|
1040
|
+
return { kind: "scenario", slot: trimmed };
|
|
1041
|
+
}
|
|
1042
|
+
const variance = VarianceMeasure.parse(trimmed);
|
|
1043
|
+
if (variance !== null) {
|
|
1044
|
+
return { kind: "variance", measure: variance };
|
|
1045
|
+
}
|
|
1046
|
+
return null;
|
|
1047
|
+
}
|
|
1048
|
+
/**
|
|
1049
|
+
* Scenario family (`ac` | `pp` | `fc` | `pl`) of a plain scenario slot.
|
|
1050
|
+
*/
|
|
1051
|
+
function scenarioFamily(slot) {
|
|
1052
|
+
return slot.replace(/\d+$/, "");
|
|
1053
|
+
}
|
|
1054
|
+
/** Slot number (`1`-`4`) of a plain scenario slot. */
|
|
1055
|
+
function scenarioSlotNumber(slot) {
|
|
1056
|
+
return slot.replace(/^[a-z]+/, "");
|
|
1057
|
+
}
|
|
1058
|
+
/** True for a relative variance token (`dr…`): its values are fractions and are shown in percent. */
|
|
1059
|
+
function isRelativeMeasure(token) {
|
|
1060
|
+
var _a;
|
|
1061
|
+
return ((_a = VarianceMeasure.parse(token.trim())) === null || _a === void 0 ? void 0 : _a.type) === "dr";
|
|
1062
|
+
}
|
|
1063
|
+
/**
|
|
1064
|
+
* The axis config in the unit of the axis values. A relative variance axis is written
|
|
1065
|
+
* in percent (`min: -40`, `refLine: 20`), while its values are fractions (0.2 for 20 %).
|
|
1066
|
+
*/
|
|
1067
|
+
function axisInValueUnits(axis) {
|
|
1068
|
+
if (!isRelativeMeasure(axis.measure)) {
|
|
1069
|
+
return axis;
|
|
1070
|
+
}
|
|
1071
|
+
const fraction = (percent) => percent === undefined ? undefined : percent / 100;
|
|
1072
|
+
return Object.assign(Object.assign({}, axis), { min: fraction(axis.min), max: fraction(axis.max), refLine: fraction(axis.refLine), highlight: axis.highlight && { from: fraction(axis.highlight.from), to: fraction(axis.highlight.to) } });
|
|
1073
|
+
}
|
|
1074
|
+
|
|
602
1075
|
/**
|
|
603
1076
|
* Prop validators for Stencil @Watch handlers.
|
|
604
1077
|
*
|
|
@@ -627,7 +1100,7 @@ function validateScenarioList(value) {
|
|
|
627
1100
|
if (value.trim().toLowerCase() === "auto") {
|
|
628
1101
|
return [];
|
|
629
1102
|
}
|
|
630
|
-
const invalidScenarios = value === null || value === void 0 ? void 0 : value.split(",").filter((element) => !(element.toUpperCase().trim() in
|
|
1103
|
+
const invalidScenarios = value === null || value === void 0 ? void 0 : value.split(",").filter((element) => !(element.toUpperCase().trim() in exports.Scenarios));
|
|
631
1104
|
return validateVariancesList(invalidScenarios.toString());
|
|
632
1105
|
}
|
|
633
1106
|
/**
|
|
@@ -649,9 +1122,9 @@ function validateVariancesList(value) {
|
|
|
649
1122
|
const scenarioMinuend = (_b = splittedElement[1]) === null || _b === void 0 ? void 0 : _b.toUpperCase().trim();
|
|
650
1123
|
const scenarioSentiment = (_c = splittedElement[2]) === null || _c === void 0 ? void 0 : _c.toUpperCase().trim();
|
|
651
1124
|
return (splittedElement.length !== 3 ||
|
|
652
|
-
!(scenarioSubtrahend in
|
|
653
|
-
!(scenarioMinuend in
|
|
654
|
-
!(scenarioSentiment in
|
|
1125
|
+
!(scenarioSubtrahend in exports.Scenarios) ||
|
|
1126
|
+
!(scenarioMinuend in exports.Scenarios) ||
|
|
1127
|
+
!(scenarioSentiment in Sentiments));
|
|
655
1128
|
});
|
|
656
1129
|
return invalidScenarios;
|
|
657
1130
|
}
|
|
@@ -664,7 +1137,7 @@ function validateBarColumnsList(value) {
|
|
|
664
1137
|
if (isBlankInput(value)) {
|
|
665
1138
|
return [];
|
|
666
1139
|
}
|
|
667
|
-
const invalidScenarios = value.split(",").filter((element) => !(element.toUpperCase().trim() in
|
|
1140
|
+
const invalidScenarios = value.split(",").filter((element) => !(element.toUpperCase().trim() in exports.Scenarios));
|
|
668
1141
|
return validateVariancesList(invalidScenarios.toString());
|
|
669
1142
|
}
|
|
670
1143
|
function validateOrderList(value) {
|
|
@@ -674,7 +1147,7 @@ function validateOrderList(value) {
|
|
|
674
1147
|
if (value.trim().toLowerCase() === "auto") {
|
|
675
1148
|
return [];
|
|
676
1149
|
}
|
|
677
|
-
const invalidScenarios = value.split(",").filter((element) => !(element.toUpperCase() in
|
|
1150
|
+
const invalidScenarios = value.split(",").filter((element) => !(element.toUpperCase() in exports.OrderColumn));
|
|
678
1151
|
return validateVariancesList(invalidScenarios.toString());
|
|
679
1152
|
}
|
|
680
1153
|
function isValidInteger(value) {
|
|
@@ -693,13 +1166,13 @@ function isValidDirection(value) {
|
|
|
693
1166
|
if (isBlankInput(value)) {
|
|
694
1167
|
return false;
|
|
695
1168
|
}
|
|
696
|
-
return (value === null || value === void 0 ? void 0 : value.toUpperCase()) in
|
|
1169
|
+
return (value === null || value === void 0 ? void 0 : value.toUpperCase()) in exports.OrderDirection;
|
|
697
1170
|
}
|
|
698
1171
|
function isValidLevel(value) {
|
|
699
1172
|
if ((value === null || value === void 0 ? void 0 : value.toLowerCase()) === "auto") {
|
|
700
1173
|
return true;
|
|
701
1174
|
}
|
|
702
|
-
return (value === null || value === void 0 ? void 0 : value.toUpperCase()) in
|
|
1175
|
+
return (value === null || value === void 0 ? void 0 : value.toUpperCase()) in exports.AggregationLevel;
|
|
703
1176
|
}
|
|
704
1177
|
function validateMeasureList(value) {
|
|
705
1178
|
if (isBlankInput(value)) {
|
|
@@ -727,13 +1200,13 @@ function isValidDateFormat(value) {
|
|
|
727
1200
|
return (value === null || value === void 0 ? void 0 : value.toUpperCase()) in exports.DateDistance;
|
|
728
1201
|
}
|
|
729
1202
|
function isValidAxisLabelsMode(value) {
|
|
730
|
-
return (value === null || value === void 0 ? void 0 : value.toUpperCase()) in
|
|
1203
|
+
return (value === null || value === void 0 ? void 0 : value.toUpperCase()) in exports.AxisLabelsMode;
|
|
731
1204
|
}
|
|
732
1205
|
function isValidDataFormat(value) {
|
|
733
1206
|
if (isBlankInput(value)) {
|
|
734
1207
|
return false;
|
|
735
1208
|
}
|
|
736
|
-
return (value === null || value === void 0 ? void 0 : value.toUpperCase()) in
|
|
1209
|
+
return (value === null || value === void 0 ? void 0 : value.toUpperCase()) in exports.DataFormat;
|
|
737
1210
|
}
|
|
738
1211
|
function isValidBoolean(value) {
|
|
739
1212
|
if (isBlankInput(value)) {
|
|
@@ -746,7 +1219,7 @@ function isValidTableType(value) {
|
|
|
746
1219
|
if (isBlankInput(value)) {
|
|
747
1220
|
return false;
|
|
748
1221
|
}
|
|
749
|
-
return (value === null || value === void 0 ? void 0 : value.toUpperCase()) in
|
|
1222
|
+
return (value === null || value === void 0 ? void 0 : value.toUpperCase()) in TableType;
|
|
750
1223
|
}
|
|
751
1224
|
function validateThereOfJsonStr(value) {
|
|
752
1225
|
if (isBlankInput(value)) {
|
|
@@ -803,7 +1276,7 @@ function validatePartOfJsonStr(value) {
|
|
|
803
1276
|
return ["Invalid JSON structure"];
|
|
804
1277
|
}
|
|
805
1278
|
function isValidMeasureType(value) {
|
|
806
|
-
return (value === null || value === void 0 ? void 0 : value.trim().toUpperCase()) in
|
|
1279
|
+
return (value === null || value === void 0 ? void 0 : value.trim().toUpperCase()) in exports.MeasureType;
|
|
807
1280
|
}
|
|
808
1281
|
/**
|
|
809
1282
|
* Validates a measure-scale attribute value.
|
|
@@ -814,10 +1287,10 @@ function isValidMeasureScale(value) {
|
|
|
814
1287
|
return (["_", "k", "M", "G", "T", "P", "E", "Z", "Y", "m", "my", "μ", "n", "p", "f", "a", "z", "y"].includes(value === null || value === void 0 ? void 0 : value.trim()) || ["GREATEST", "LEAST"].includes(value === null || value === void 0 ? void 0 : value.trim().toUpperCase()));
|
|
815
1288
|
}
|
|
816
1289
|
function isTableCategoryWidth(value) {
|
|
817
|
-
return (value === null || value === void 0 ? void 0 : value.toUpperCase().trim()) in
|
|
1290
|
+
return (value === null || value === void 0 ? void 0 : value.toUpperCase().trim()) in exports.TableCategoryWidth;
|
|
818
1291
|
}
|
|
819
1292
|
function isTableBarColumnWidth(value) {
|
|
820
|
-
return (value === null || value === void 0 ? void 0 : value.toUpperCase().trim()) in
|
|
1293
|
+
return (value === null || value === void 0 ? void 0 : value.toUpperCase().trim()) in exports.TableBarColumnWidth;
|
|
821
1294
|
}
|
|
822
1295
|
function validateColumnThereOfJsonStr(value) {
|
|
823
1296
|
if (isBlankInput(value)) {
|
|
@@ -872,13 +1345,13 @@ function validateStackConfig(value) {
|
|
|
872
1345
|
/**
|
|
873
1346
|
* Checks whether a value is a valid XY chart measure token: a scenario
|
|
874
1347
|
* column (`ac1`…`pl4`) or a variance token (`d…`/`dr…`, sentiment suffix
|
|
875
|
-
* optional
|
|
1348
|
+
* optional - spec §4.4 of the scatter/bubble charts).
|
|
876
1349
|
*/
|
|
877
1350
|
function isValidMeasureToken(value) {
|
|
878
1351
|
if (isBlankInput(value)) {
|
|
879
1352
|
return false;
|
|
880
1353
|
}
|
|
881
|
-
return
|
|
1354
|
+
return resolveMeasure(value) !== null;
|
|
882
1355
|
}
|
|
883
1356
|
|
|
884
1357
|
class StyleSheet {
|
|
@@ -896,7 +1369,7 @@ class StyleSheet {
|
|
|
896
1369
|
}
|
|
897
1370
|
apply(data) {
|
|
898
1371
|
data.forEach((value) => this.cache.set(value.className, value.style));
|
|
899
|
-
this.tag.
|
|
1372
|
+
this.tag.textContent = Array.from(this.cache.values())
|
|
900
1373
|
.map((value) => value)
|
|
901
1374
|
.join("\n");
|
|
902
1375
|
}
|
|
@@ -1043,9 +1516,19 @@ function getStyle(attr, className, value) {
|
|
|
1043
1516
|
return `.${className} {${attr.cssName}: ${value};}`;
|
|
1044
1517
|
}
|
|
1045
1518
|
function getCSS(attr, value) {
|
|
1519
|
+
// The rule is written as stylesheet text. Only what the browser parsed and serialized as one value
|
|
1520
|
+
// of this property goes in: the attribute text itself could close the rule and add its own.
|
|
1521
|
+
const probe = document.createElement("div").style;
|
|
1522
|
+
probe.setProperty(attr.cssName, value);
|
|
1523
|
+
const parsed = probe.getPropertyValue(attr.cssName);
|
|
1524
|
+
// A var() value is kept as written and may end inside an open string or bracket, which would swallow
|
|
1525
|
+
// the rules after it. A declaration placed behind the value only arrives if the value is closed.
|
|
1526
|
+
probe.cssText = `${attr.cssName}:${parsed};--bn-end:1`;
|
|
1527
|
+
if (!parsed || parsed.includes("<") || probe.getPropertyValue("--bn-end") !== "1") {
|
|
1528
|
+
return undefined;
|
|
1529
|
+
}
|
|
1046
1530
|
const className = getClassName(attr, value);
|
|
1047
|
-
|
|
1048
|
-
return { className, style };
|
|
1531
|
+
return { className, style: getStyle(attr, className, parsed) };
|
|
1049
1532
|
}
|
|
1050
1533
|
const apply = (el) => {
|
|
1051
1534
|
const map = new Map();
|
|
@@ -1060,7 +1543,10 @@ const apply = (el) => {
|
|
|
1060
1543
|
function (v) {
|
|
1061
1544
|
return v;
|
|
1062
1545
|
};
|
|
1063
|
-
|
|
1546
|
+
const css = getCSS(attributes[name], transform(value));
|
|
1547
|
+
if (css) {
|
|
1548
|
+
map.set(name, css);
|
|
1549
|
+
}
|
|
1064
1550
|
}
|
|
1065
1551
|
});
|
|
1066
1552
|
return map;
|
|
@@ -1128,14 +1614,24 @@ const withStyled = (component) => {
|
|
|
1128
1614
|
withHasError.runIfExisits(cstrConnectedCallback, component);
|
|
1129
1615
|
};
|
|
1130
1616
|
component["disconnectedCallback"] = () => {
|
|
1131
|
-
// MutationObserver has no per-element unobserve
|
|
1617
|
+
// MutationObserver has no per-element unobserve - the shared observer
|
|
1132
1618
|
// automatically stops firing for elements removed from the DOM.
|
|
1133
1619
|
withHasError.runIfExisits(cstrDisconnectedCallback, component);
|
|
1134
1620
|
};
|
|
1135
1621
|
};
|
|
1136
1622
|
|
|
1623
|
+
exports.AdapterUtils = AdapterUtils;
|
|
1624
|
+
exports.BAR_COLUMN_WIDTH_EM = BAR_COLUMN_WIDTH_EM;
|
|
1625
|
+
exports.CompareUtil = CompareUtil;
|
|
1137
1626
|
exports.DateStringFactory = DateStringFactory;
|
|
1627
|
+
exports.FIELD_IDENTIFIER_REGEX = FIELD_IDENTIFIER_REGEX;
|
|
1628
|
+
exports.NOT_AVAILABLE = NOT_AVAILABLE;
|
|
1629
|
+
exports.Order = Order;
|
|
1630
|
+
exports.OrderAdapter = OrderAdapter;
|
|
1631
|
+
exports.RELATIVE_STACK_UNITS = RELATIVE_STACK_UNITS;
|
|
1632
|
+
exports.axisInValueUnits = axisInValueUnits;
|
|
1138
1633
|
exports.isBlankInput = isBlankInput;
|
|
1634
|
+
exports.isRelativeMeasure = isRelativeMeasure;
|
|
1139
1635
|
exports.isTableBarColumnWidth = isTableBarColumnWidth;
|
|
1140
1636
|
exports.isTableCategoryWidth = isTableCategoryWidth;
|
|
1141
1637
|
exports.isValidAxisLabelsMode = isValidAxisLabelsMode;
|
|
@@ -1152,8 +1648,13 @@ exports.isValidMeasureToken = isValidMeasureToken;
|
|
|
1152
1648
|
exports.isValidMeasureType = isValidMeasureType;
|
|
1153
1649
|
exports.isValidNumber = isValidNumber;
|
|
1154
1650
|
exports.isValidTableType = isValidTableType;
|
|
1651
|
+
exports.merge = merge;
|
|
1155
1652
|
exports.murmur2 = murmur2;
|
|
1156
1653
|
exports.parseTableAttributeExpression = parseTableAttributeExpression;
|
|
1654
|
+
exports.relativeVariance = relativeVariance;
|
|
1655
|
+
exports.resolveMeasure = resolveMeasure;
|
|
1656
|
+
exports.scenarioFamily = scenarioFamily;
|
|
1657
|
+
exports.scenarioSlotNumber = scenarioSlotNumber;
|
|
1157
1658
|
exports.validateAttributesJsonStr = validateAttributesJsonStr;
|
|
1158
1659
|
exports.validateBarColumnsList = validateBarColumnsList;
|
|
1159
1660
|
exports.validateColumnThereOfJsonStr = validateColumnThereOfJsonStr;
|