@bino-bi/bn-template-engine 1.0.0-next.28 → 1.0.0-next.30
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-132ad556.entry.js +1 -0
- package/dist/bn-template-engine/p-17d71782.entry.js +1 -0
- package/dist/bn-template-engine/p-40ba7f43.entry.js +1 -0
- package/dist/bn-template-engine/p-467871f3.entry.js +1 -0
- package/dist/bn-template-engine/p-64803a42.entry.js +1 -0
- package/dist/bn-template-engine/p-B8AjeKja.js +1 -0
- package/dist/bn-template-engine/p-CCZcKl0Q.js +2 -0
- package/dist/bn-template-engine/p-CrT83eO4.js +1 -0
- package/dist/bn-template-engine/p-D_DzKxRV.js +1 -0
- package/dist/bn-template-engine/p-Z2rUaSh_.js +1 -0
- package/dist/bn-template-engine/p-c41c0a1b.entry.js +1 -0
- package/dist/bn-template-engine/p-yc69rwuH.js +1 -0
- package/dist/cjs/{bn-asset_28.cjs.entry.js → bn-annotation-layer_30.cjs.entry.js} +27566 -26774
- package/dist/cjs/bn-grid.cjs.entry.js +11 -63
- package/dist/cjs/bn-image.cjs.entry.js +5 -6
- package/dist/cjs/bn-internationalization.cjs.entry.js +11 -7
- package/dist/cjs/bn-ruleset.cjs.entry.js +7 -8
- package/dist/cjs/bn-template-engine.cjs.js +2 -2
- package/dist/cjs/bn-text.cjs.entry.js +18 -18
- package/dist/cjs/{diagnostics-Cq-qDtXq.js → diagnostics-C4Ggts3w.js} +50 -2
- package/dist/cjs/{index-C1Z9vO7z.js → index-DGis1BzT.js} +0 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{withBodyObserver-CaPUjuC5.js → withBodyObserver-BK4idxqG.js} +2 -2
- package/dist/cjs/{context-protocol-C0rKepqu.js → withHasError-CqvcS23z.js} +462 -14
- package/dist/cjs/{withStyled-vSfogp9J.js → withStyled-70D4Isgt.js} +22 -35
- package/dist/cjs/{sanitizeHtml-Yx1xn6i_.js → withTranslation-C6Pye2CM.js} +148 -129
- package/dist/collection/collection-manifest.json +11 -11
- package/dist/collection/components/bn-annotation-layer/bn-annotation-layer.css +24 -0
- package/dist/collection/components/bn-annotation-layer/bn-annotation-layer.js +430 -0
- package/dist/collection/components/bn-annotation-layer/utils/marks.js +161 -0
- package/dist/collection/components/bn-annotation-layer/utils/matchPoint.js +25 -0
- package/dist/collection/components/bn-annotation-list/bn-annotation-list.css +46 -0
- package/dist/collection/components/bn-annotation-list/bn-annotation-list.js +112 -0
- package/dist/collection/components/bn-asset/bn-asset.js +1 -1
- package/dist/collection/components/bn-body/bn-body.js +24 -1
- package/dist/collection/components/bn-card/bn-card.js +24 -1
- package/dist/collection/components/bn-chart-bubble/{ibcs-chart-bubble.js → bn-chart-bubble-renderer/bn-chart-bubble-renderer.js} +153 -59
- package/dist/collection/components/bn-chart-bubble/bn-chart-bubble.js +70 -13
- package/dist/collection/components/bn-chart-bubble/utils/BubbleChart.js +29 -21
- package/dist/collection/components/bn-chart-bullet/{ibcs-chart-bullet.js → bn-chart-bullet-renderer/bn-chart-bullet-renderer.js} +127 -53
- package/dist/collection/components/bn-chart-bullet/bn-chart-bullet.js +83 -20
- package/dist/collection/components/bn-chart-bullet/utils/BulletChart.js +26 -17
- package/dist/collection/components/bn-chart-bullet/utils/model/BulletChartStyle.js +4 -4
- package/dist/collection/components/bn-chart-scatter/{ibcs-chart-scatter.js → bn-chart-scatter-renderer/bn-chart-scatter-renderer.js} +132 -53
- package/dist/collection/components/bn-chart-scatter/bn-chart-scatter.js +69 -12
- package/dist/collection/components/bn-chart-scatter/utils/ScatterChart.js +26 -14
- package/dist/collection/components/bn-chart-structure/{ibcs-chart-structure.js → bn-chart-structure-renderer/bn-chart-structure-renderer.js} +159 -66
- package/dist/collection/components/bn-chart-structure/bn-chart-structure.js +115 -95
- package/dist/collection/components/bn-chart-structure/utils/StructureChart.js +44 -15
- package/dist/collection/components/bn-chart-structure/utils/elements/Axis.js +1 -1
- package/dist/collection/components/bn-chart-structure/utils/elements/Bar.js +6 -2
- package/dist/collection/components/bn-chart-structure/utils/elements/Label.js +11 -0
- package/dist/collection/components/bn-chart-structure/utils/elements/Marker.js +5 -1
- package/dist/collection/components/bn-chart-structure/utils/elements/Needle.js +4 -1
- package/dist/collection/components/bn-chart-structure/utils/elements/StackedBar.js +6 -2
- package/dist/collection/components/bn-chart-time/{ibcs-chart-time.js → bn-chart-time-renderer/bn-chart-time-renderer.js} +188 -150
- package/dist/collection/components/bn-chart-time/bn-chart-time.js +140 -405
- package/dist/collection/components/bn-chart-time/utils/TimeChart.js +55 -15
- package/dist/collection/components/bn-chart-time/utils/elements/Column.js +5 -1
- package/dist/collection/components/bn-chart-time/utils/elements/Label.js +14 -0
- package/dist/collection/components/bn-chart-time/utils/elements/LineSeries.js +18 -12
- package/dist/collection/components/bn-chart-time/utils/elements/Marker.js +5 -1
- package/dist/collection/components/bn-chart-time/utils/elements/Needle.js +4 -1
- package/dist/collection/components/bn-chart-time/utils/elements/StackedColumn.js +6 -2
- package/dist/collection/components/bn-chart-time/utils/factories/ScenarioFactory.js +2 -2
- package/dist/collection/components/bn-chart-time/utils/model/TimeChartComponentConfig.js +2 -18
- package/dist/collection/components/bn-component-style/bn-component-style.js +3 -3
- package/dist/collection/components/bn-context/bn-context.js +24 -5
- package/dist/collection/components/bn-dataset/bn-dataset.js +8 -8
- package/dist/collection/components/bn-datasource/bn-datasource.js +8 -8
- package/dist/collection/components/bn-footer/bn-footer.css +1 -15
- package/dist/collection/components/bn-footer/bn-footer.js +17 -34
- package/dist/collection/components/bn-grid/bn-grid.js +38 -71
- package/dist/collection/components/bn-image/bn-image.js +21 -2
- package/dist/collection/components/bn-internationalization/bn-internationalization.js +7 -1
- package/dist/collection/components/bn-layout-card/bn-layout-card.js +3 -32
- package/dist/collection/components/bn-layout-page/bn-layout-page.js +3 -32
- package/dist/collection/components/bn-message/bn-message.js +20 -2
- package/dist/collection/components/bn-page/bn-page.js +22 -3
- package/dist/collection/components/bn-ruleset/bn-ruleset.js +3 -3
- package/dist/collection/components/bn-scaling-group/bn-scaling-group.js +9 -9
- package/dist/collection/components/bn-table/{ibcs-table.js → bn-table-renderer/bn-table-renderer.js} +230 -83
- package/dist/collection/components/bn-table/bn-table.js +134 -157
- package/dist/collection/components/bn-table/utils/Table.js +3 -3
- package/dist/collection/components/bn-table/utils/elements/TableRow.js +1 -1
- package/dist/collection/components/bn-table/utils/factories/tableDataSetFactory.js +38 -4
- package/dist/collection/components/bn-table/utils/helper/DataQuery.js +3 -1
- package/dist/collection/components/bn-table/utils/helper/barColumnGeometry.js +2 -2
- package/dist/collection/components/bn-text/bn-text.js +66 -8
- package/dist/collection/components/bn-title/{ibcs-title/ibcs-title.js → bn-title-renderer/bn-title-renderer.js} +59 -83
- package/dist/collection/components/bn-title/{ibcs-title → bn-title-renderer}/utils/Title.js +2 -2
- package/dist/collection/components/bn-title/{ibcs-title → bn-title-renderer}/utils/factories/TitleDataSetFactory.js +1 -1
- package/dist/collection/components/bn-title/bn-title.js +58 -14
- package/dist/collection/components/bn-tree/bn-tree.js +30 -28
- package/dist/collection/index.js +0 -1
- package/dist/collection/schemas.js +1 -0
- package/dist/collection/stores/componentStyles.js +10 -6
- package/dist/collection/stores/createScopedStores.js +3 -1
- package/dist/collection/stores/internationalization.js +10 -6
- package/dist/collection/utils/annotations.js +66 -0
- package/dist/collection/utils/autoFit.js +2 -2
- package/dist/collection/utils/emptyState.js +1 -1
- package/dist/collection/utils/ibcsRuleSet.js +42 -0
- package/dist/collection/utils/layoutState/dataPoint.js +59 -0
- package/dist/collection/utils/layoutState/geometry.js +46 -0
- package/dist/collection/utils/layoutState/index.js +1 -0
- package/dist/collection/utils/layoutState/svgChartElements.js +113 -11
- package/dist/collection/utils/layoutTemplate.js +0 -2
- package/dist/collection/utils/scaling.js +9 -0
- package/dist/collection/utils/validate.js +0 -7
- package/dist/collection/utils/withComponentStyle.js +14 -18
- package/dist/collection/utils/withDataset.js +22 -11
- package/dist/collection/utils/withHasError.js +17 -2
- package/dist/collection/utils/withRuleSet.js +7 -7
- package/dist/collection/utils/withTranslation.js +14 -14
- package/dist/collection/utils/xy/XYFrame.js +13 -3
- package/dist/collection/utils/xy/model/ScaleFactorsXYChart.js +8 -9
- package/dist/collection/utils/xy/pointKey.js +10 -0
- package/dist/components/{ibcs-chart-bullet.d.ts → bn-annotation-layer.d.ts} +4 -4
- package/dist/components/bn-annotation-layer.js +1 -0
- package/dist/components/{ibcs-chart-scatter.d.ts → bn-annotation-list.d.ts} +4 -4
- package/dist/components/bn-annotation-list.js +1 -0
- package/dist/components/bn-asset.js +1 -1
- package/dist/components/bn-body.js +1 -1
- package/dist/components/bn-card.js +1 -1
- package/dist/components/bn-chart-bubble-renderer.d.ts +11 -0
- package/dist/components/bn-chart-bubble-renderer.js +1 -0
- package/dist/components/bn-chart-bubble.js +1 -1
- package/dist/components/bn-chart-bullet-renderer.d.ts +11 -0
- package/dist/components/bn-chart-bullet-renderer.js +1 -0
- package/dist/components/bn-chart-bullet.js +1 -1
- package/dist/components/bn-chart-scatter-renderer.d.ts +11 -0
- package/dist/components/bn-chart-scatter-renderer.js +1 -0
- package/dist/components/bn-chart-scatter.js +1 -1
- package/dist/components/bn-chart-structure-renderer.d.ts +11 -0
- package/dist/components/bn-chart-structure-renderer.js +1 -0
- package/dist/components/bn-chart-structure.js +1 -1
- package/dist/components/{bn-template.d.ts → bn-chart-time-renderer.d.ts} +4 -4
- package/dist/components/bn-chart-time-renderer.js +1 -0
- 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-footer.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-message.js +1 -1
- package/dist/components/bn-page.js +1 -1
- package/dist/components/bn-ruleset.js +1 -1
- package/dist/components/bn-scaling-group.js +1 -1
- package/dist/components/{ibcs-chart-bubble.d.ts → bn-table-renderer.d.ts} +4 -4
- package/dist/components/bn-table-renderer.js +1 -0
- package/dist/components/bn-table.js +1 -1
- package/dist/components/bn-text.js +1 -1
- package/dist/components/{editor-companion.d.ts → bn-title-renderer.d.ts} +4 -4
- package/dist/components/bn-title-renderer.js +1 -0
- package/dist/components/bn-title.js +1 -1
- package/dist/components/bn-tree.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/p-B1nL0yOa.js +1 -0
- package/dist/components/p-B7uwck1J.js +1 -0
- package/dist/components/p-BDS_jiow.js +1 -0
- package/dist/components/p-BIIDTtcR.js +1 -0
- package/dist/components/p-BQMKgvEC.js +1 -0
- package/dist/components/p-BSV_vyqs.js +1 -0
- package/dist/components/p-BVKLCz2k.js +1 -0
- package/dist/components/p-BWBHlztH.js +1 -0
- package/dist/components/p-BXrPfAvP.js +1 -0
- package/dist/components/p-Ba9PUiBp.js +1 -0
- package/dist/components/p-BpCL2bfw.js +1 -0
- package/dist/components/p-BpsXOtoW.js +1 -0
- package/dist/components/p-Bs-YxJEt.js +1 -0
- package/dist/components/p-CGI6XIaK.js +1 -0
- package/dist/components/p-CMM8vtHW.js +1 -0
- package/dist/components/p-COqIkH1M.js +1 -0
- package/dist/components/p-CYwd_ZNM.js +1 -0
- package/dist/components/p-CkW23yp2.js +1 -0
- package/dist/components/p-CtBM3KFY.js +1 -0
- package/dist/{bn-template-engine/p-DFmSrSnf.js → components/p-CurWSJkH.js} +1 -1
- package/dist/components/p-CxPSvrcF.js +1 -0
- package/dist/components/p-D2Epww9R.js +1 -0
- package/dist/components/p-D5-dYgK_.js +1 -0
- package/dist/components/p-D6YGOYV1.js +2 -0
- package/dist/components/p-DEHnizot.js +1 -0
- package/dist/components/p-DIyUaSBg.js +1 -0
- package/dist/components/p-DPLcGhVt.js +1 -0
- package/dist/components/p-DUHp_9X-.js +1 -0
- package/dist/components/p-DYG9FH_u.js +1 -0
- package/dist/components/p-DdGnuNtc.js +1 -0
- package/dist/components/p-Dlb4ncGF.js +1 -0
- package/dist/components/p-Dm55bMs2.js +1 -0
- package/dist/components/p-Dq1AzGKX.js +1 -0
- package/dist/components/p-Dq4KMCDU.js +1 -0
- package/dist/components/p-DsOaqeTN.js +1 -0
- package/dist/components/p-Ds_BSK8v.js +1 -0
- package/dist/components/p-LZ9lAY8T.js +1 -0
- package/dist/components/p-U3zkcEJZ.js +1 -0
- package/dist/components/p-WzaayhTX.js +1 -0
- package/dist/components/p-X9hpquOX.js +1 -0
- package/dist/components/p-Xb6Ilq8u.js +1 -0
- package/dist/components/p-ey23VlID.js +1 -0
- package/dist/components/p-jbp6YiHf.js +1 -0
- package/dist/components/p-oJjMz8JF.js +1 -0
- package/dist/components/p-xhiPDAZa.js +1 -0
- package/dist/components/p-xpguaboj.js +1 -0
- package/dist/esm/{bn-asset_28.entry.js → bn-annotation-layer_30.entry.js} +24689 -23899
- package/dist/esm/bn-grid.entry.js +11 -63
- package/dist/esm/bn-image.entry.js +4 -5
- package/dist/esm/bn-internationalization.entry.js +9 -5
- package/dist/esm/bn-ruleset.entry.js +6 -7
- package/dist/esm/bn-template-engine.js +3 -3
- package/dist/esm/bn-text.entry.js +12 -12
- package/dist/esm/{diagnostics-vw6TKMiT.js → diagnostics-Cyqy1zDT.js} +48 -2
- package/dist/esm/{index-C5UYpZUU.js → index-CCZcKl0Q.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{withBodyObserver-DD_-r04o.js → withBodyObserver-JcRB9OPQ.js} +2 -2
- package/dist/esm/{context-protocol-CdTp19uA.js → withHasError-l3cMN-oP.js} +458 -14
- package/dist/esm/{withStyled-BDEyKd_H.js → withStyled-DGOiR00Q.js} +17 -29
- package/dist/esm/{sanitizeHtml-C5bFtARM.js → withTranslation-BpO8BC5B.js} +144 -126
- package/dist/schemas/axis.schema.json +52 -0
- package/dist/schemas/i18n.schema.json +31 -0
- package/dist/schemas/partof.schema.json +33 -0
- package/dist/schemas/ruleset.schema.json +59 -0
- package/dist/schemas/stack.schema.json +51 -0
- package/dist/schemas/theme.schema.json +604 -0
- package/dist/schemas/thereof.schema.json +34 -0
- package/dist/types/components/bn-annotation-layer/bn-annotation-layer.d.ts +81 -0
- package/dist/types/components/bn-annotation-layer/utils/marks.d.ts +69 -0
- package/dist/types/components/bn-annotation-layer/utils/matchPoint.d.ts +17 -0
- package/dist/types/components/bn-annotation-list/bn-annotation-list.d.ts +35 -0
- package/dist/types/components/bn-body/bn-body.d.ts +5 -0
- package/dist/types/components/bn-card/bn-card.d.ts +5 -0
- package/dist/types/components/bn-chart-bubble/bn-chart-bubble-renderer/bn-chart-bubble-renderer.d.ts +97 -0
- package/dist/types/components/bn-chart-bubble/bn-chart-bubble.d.ts +20 -2
- package/dist/types/components/bn-chart-bullet/bn-chart-bullet-renderer/bn-chart-bullet-renderer.d.ts +81 -0
- package/dist/types/components/bn-chart-bullet/bn-chart-bullet.d.ts +21 -3
- package/dist/types/components/bn-chart-bullet/utils/BulletChart.d.ts +2 -0
- package/dist/types/components/bn-chart-bullet/utils/model/BulletChartStyle.d.ts +2 -2
- package/dist/types/components/bn-chart-scatter/bn-chart-scatter-renderer/bn-chart-scatter-renderer.d.ts +85 -0
- package/dist/types/components/bn-chart-scatter/bn-chart-scatter.d.ts +20 -2
- package/dist/types/components/bn-chart-structure/{ibcs-chart-structure.d.ts → bn-chart-structure-renderer/bn-chart-structure-renderer.d.ts} +43 -13
- package/dist/types/components/bn-chart-structure/bn-chart-structure.d.ts +29 -17
- package/dist/types/components/bn-chart-structure/utils/StructureChart.d.ts +7 -0
- package/dist/types/components/bn-chart-structure/utils/elements/Label.d.ts +5 -0
- package/dist/types/components/bn-chart-structure/utils/elements/Marker.d.ts +1 -0
- package/dist/types/components/bn-chart-structure/utils/elements/StackedBar.d.ts +2 -1
- package/dist/types/components/bn-chart-structure/utils/model/DataPoint.d.ts +3 -0
- package/dist/types/components/bn-chart-time/{ibcs-chart-time.d.ts → bn-chart-time-renderer/bn-chart-time-renderer.d.ts} +50 -17
- package/dist/types/components/bn-chart-time/bn-chart-time.d.ts +36 -66
- package/dist/types/components/bn-chart-time/utils/TimeChart.d.ts +7 -0
- package/dist/types/components/bn-chart-time/utils/elements/Label.d.ts +5 -0
- package/dist/types/components/bn-chart-time/utils/elements/LineSeries.d.ts +5 -1
- package/dist/types/components/bn-chart-time/utils/elements/Marker.d.ts +1 -0
- package/dist/types/components/bn-chart-time/utils/elements/StackedColumn.d.ts +2 -1
- package/dist/types/components/bn-chart-time/utils/factories/ScenarioFactory.d.ts +1 -1
- package/dist/types/components/bn-chart-time/utils/model/DataPoint.d.ts +3 -0
- package/dist/types/components/bn-chart-time/utils/model/TimeChartComponentConfig.d.ts +2 -8
- package/dist/types/components/bn-context/bn-context.d.ts +7 -1
- package/dist/types/components/bn-dataset/bn-dataset.d.ts +2 -2
- package/dist/types/components/bn-datasource/bn-datasource.d.ts +2 -2
- package/dist/types/components/bn-footer/bn-footer.d.ts +5 -7
- package/dist/types/components/bn-grid/bn-grid.d.ts +8 -6
- package/dist/types/components/bn-image/bn-image.d.ts +4 -0
- package/dist/types/components/bn-layout-card/bn-layout-card.d.ts +0 -1
- package/dist/types/components/bn-layout-page/bn-layout-page.d.ts +0 -1
- package/dist/types/components/bn-message/bn-message.d.ts +5 -0
- package/dist/types/components/bn-page/bn-page.d.ts +5 -0
- package/dist/types/components/bn-table/{ibcs-table.d.ts → bn-table-renderer/bn-table-renderer.d.ts} +49 -12
- package/dist/types/components/bn-table/bn-table.d.ts +48 -49
- package/dist/types/components/bn-table/utils/elements/Cell.d.ts +2 -0
- package/dist/types/components/bn-table/utils/elements/CellBarChart.d.ts +2 -1
- package/dist/types/components/bn-table/utils/elements/TableRow.d.ts +3 -0
- package/dist/types/components/bn-table/utils/factories/tableDataSetFactory.d.ts +9 -2
- package/dist/types/components/bn-text/bn-text.d.ts +19 -1
- package/dist/types/components/bn-title/{ibcs-title/ibcs-title.d.ts → bn-title-renderer/bn-title-renderer.d.ts} +15 -4
- package/dist/types/components/bn-title/bn-title.d.ts +15 -3
- package/dist/types/components/bn-tree/bn-tree.d.ts +6 -2
- package/dist/types/components.d.ts +2070 -2406
- package/dist/types/context/context-protocol.d.ts +2 -0
- package/dist/types/context/scopedDb.d.ts +9 -12
- package/dist/types/index.d.ts +0 -1
- package/dist/types/schemas.d.ts +50 -0
- package/dist/types/stores/componentStyles.d.ts +8 -0
- package/dist/types/stores/createScopedStores.d.ts +1 -0
- package/dist/types/stores/internationalization.d.ts +3 -2
- package/dist/types/stores/ruleSets.d.ts +15 -3
- package/dist/types/utils/annotations.d.ts +45 -0
- package/dist/types/utils/autoFit.d.ts +2 -2
- package/dist/types/utils/emptyState.d.ts +1 -1
- package/dist/types/utils/ibcsRuleSet.d.ts +16 -0
- package/dist/types/utils/layoutState/dataPoint.d.ts +13 -0
- package/dist/types/utils/layoutState/geometry.d.ts +12 -0
- package/dist/types/utils/layoutState/index.d.ts +1 -0
- package/dist/types/utils/layoutState/svgChartElements.d.ts +9 -6
- package/dist/types/utils/layoutState/types.d.ts +29 -0
- package/dist/types/utils/model/ChartStyles.d.ts +2 -1
- package/dist/types/utils/scaling.d.ts +2 -0
- package/dist/types/utils/validate.d.ts +0 -1
- package/dist/types/utils/withComponentStyle.d.ts +4 -4
- package/dist/types/utils/withDataset.d.ts +3 -3
- package/dist/types/utils/withHasError.d.ts +22 -1
- package/dist/types/utils/withRuleSet.d.ts +3 -2
- package/dist/types/utils/withTranslation.d.ts +1 -2
- package/dist/types/utils/xy/model/ScaleFactorsXYChart.d.ts +6 -7
- package/dist/types/utils/xy/pointKey.d.ts +9 -0
- package/package.json +24 -8
- package/readme.md +14 -8
- package/dist/bn-template-engine/assets/bar.png +0 -0
- package/dist/bn-template-engine/assets/matrix.png +0 -0
- package/dist/bn-template-engine/p-5075771a.entry.js +0 -1
- package/dist/bn-template-engine/p-5d516435.entry.js +0 -1
- package/dist/bn-template-engine/p-5e90e728.entry.js +0 -1
- package/dist/bn-template-engine/p-9ef7e132.entry.js +0 -1
- package/dist/bn-template-engine/p-9f7a1980.entry.js +0 -1
- package/dist/bn-template-engine/p-BeXgxHkW.js +0 -1
- package/dist/bn-template-engine/p-C5UYpZUU.js +0 -2
- package/dist/bn-template-engine/p-CH0bpt_k.js +0 -1
- package/dist/bn-template-engine/p-DI3efDSV.js +0 -1
- package/dist/bn-template-engine/p-DXLTTILG.js +0 -1
- package/dist/bn-template-engine/p-DtP4jqG5.js +0 -1
- package/dist/bn-template-engine/p-a8281b71.entry.js +0 -1
- package/dist/bn-template-engine/p-b31277e7.entry.js +0 -1
- package/dist/bn-template-engine/p-b396ac84.entry.js +0 -1
- package/dist/cjs/bn-template.cjs.entry.js +0 -18
- package/dist/cjs/editor-companion.cjs.entry.js +0 -56
- package/dist/cjs/withHasError-qGW_yqIv.js +0 -426
- package/dist/collection/components/bn-footer/assets/bar.png +0 -0
- package/dist/collection/components/bn-footer/assets/matrix.png +0 -0
- package/dist/collection/components/bn-message/assets/bar.png +0 -0
- package/dist/collection/components/bn-message/assets/matrix.png +0 -0
- package/dist/collection/components/bn-template/bn-template.js +0 -38
- package/dist/collection/components/editor-companion/editor-companion.css +0 -3
- package/dist/collection/components/editor-companion/editor-companion.js +0 -137
- package/dist/collection/utils/templateId.js +0 -12
- package/dist/collection/utils/testing/fakeGroup.js +0 -21
- package/dist/collection/utils/testing/hostFont.js +0 -20
- package/dist/collection/utils/testing/mutationObserver.js +0 -44
- package/dist/collection/utils/testing/structureChart.js +0 -26
- package/dist/collection/utils/testing/timeChart.js +0 -28
- package/dist/components/AxisConfig.js +0 -1
- package/dist/components/CompareUtil.js +0 -1
- package/dist/components/DataFormatDigits.js +0 -1
- package/dist/components/DateStringFactory.js +0 -1
- package/dist/components/LabelCollisionManager.js +0 -1
- package/dist/components/Order.js +0 -1
- package/dist/components/SVGStyle.js +0 -1
- package/dist/components/SVGVariancesStyleGroup.js +0 -1
- package/dist/components/StringAdapter.js +0 -1
- package/dist/components/VarianceMeasure.js +0 -1
- package/dist/components/XYChartDataRow.js +0 -1
- package/dist/components/bn-body2.js +0 -1
- package/dist/components/bn-card2.js +0 -1
- package/dist/components/bn-footer2.js +0 -1
- package/dist/components/bn-message2.js +0 -1
- package/dist/components/bn-page2.js +0 -1
- package/dist/components/bn-template.js +0 -1
- package/dist/components/bn-title2.js +0 -1
- package/dist/components/checkXYOverflow.js +0 -1
- package/dist/components/contentDecoder.js +0 -1
- package/dist/components/context-protocol.js +0 -1
- package/dist/components/editor-companion.js +0 -1
- package/dist/components/formatter.js +0 -1
- package/dist/components/geometry.js +0 -1
- package/dist/components/ibcs-chart-bubble.js +0 -1
- package/dist/components/ibcs-chart-bubble2.js +0 -1
- package/dist/components/ibcs-chart-bullet.js +0 -1
- package/dist/components/ibcs-chart-bullet2.js +0 -1
- package/dist/components/ibcs-chart-scatter.js +0 -1
- package/dist/components/ibcs-chart-scatter2.js +0 -1
- package/dist/components/ibcs-chart-structure.d.ts +0 -11
- package/dist/components/ibcs-chart-structure.js +0 -1
- package/dist/components/ibcs-chart-structure2.js +0 -1
- package/dist/components/ibcs-chart-time.d.ts +0 -11
- package/dist/components/ibcs-chart-time.js +0 -1
- package/dist/components/ibcs-chart-time2.js +0 -1
- package/dist/components/ibcs-table.d.ts +0 -11
- package/dist/components/ibcs-table.js +0 -1
- package/dist/components/ibcs-table2.js +0 -1
- package/dist/components/ibcs-title.d.ts +0 -11
- package/dist/components/ibcs-title.js +0 -1
- package/dist/components/ibcs-title2.js +0 -1
- package/dist/components/layoutTemplate.js +0 -1
- package/dist/components/luxon.js +0 -1
- package/dist/components/scaling.js +0 -1
- package/dist/components/svg.esm.js +0 -1
- package/dist/components/svgChartElements.js +0 -1
- package/dist/components/types.js +0 -1
- package/dist/components/validate.js +0 -1
- package/dist/components/withBodyObserver.js +0 -1
- package/dist/components/withComponentStatus.js +0 -1
- package/dist/components/withComponentStyle.js +0 -1
- package/dist/components/withDataset.js +0 -1
- package/dist/components/withHasError.js +0 -1
- package/dist/components/withRuleSet.js +0 -1
- package/dist/components/withScalingGroup.js +0 -1
- package/dist/components/withStyled.js +0 -1
- package/dist/components/withTranslation.js +0 -1
- package/dist/esm/bn-template.entry.js +0 -16
- package/dist/esm/editor-companion.entry.js +0 -54
- package/dist/esm/withHasError-73WV2SP5.js +0 -422
- package/dist/types/components/bn-chart-bubble/ibcs-chart-bubble.d.ts +0 -59
- package/dist/types/components/bn-chart-bullet/ibcs-chart-bullet.d.ts +0 -53
- package/dist/types/components/bn-chart-scatter/ibcs-chart-scatter.d.ts +0 -54
- package/dist/types/components/bn-template/bn-template.d.ts +0 -10
- package/dist/types/components/editor-companion/editor-companion.d.ts +0 -20
- package/dist/types/utils/templateId.d.ts +0 -9
- package/dist/types/utils/testing/fakeGroup.d.ts +0 -8
- package/dist/types/utils/testing/hostFont.d.ts +0 -16
- package/dist/types/utils/testing/mutationObserver.d.ts +0 -5
- package/dist/types/utils/testing/structureChart.d.ts +0 -5
- package/dist/types/utils/testing/timeChart.d.ts +0 -5
- /package/dist/collection/components/bn-chart-bubble/{ibcs-chart-bubble.css → bn-chart-bubble-renderer/bn-chart-bubble-renderer.css} +0 -0
- /package/dist/collection/components/bn-chart-bullet/{ibcs-chart-bullet.css → bn-chart-bullet-renderer/bn-chart-bullet-renderer.css} +0 -0
- /package/dist/collection/components/bn-chart-scatter/{ibcs-chart-scatter.css → bn-chart-scatter-renderer/bn-chart-scatter-renderer.css} +0 -0
- /package/dist/collection/components/bn-chart-time/{ibcs-chart-time.css → bn-chart-time-renderer/bn-chart-time-renderer.css} +0 -0
- /package/dist/collection/components/bn-table/{ibcs-table.css → bn-table-renderer/bn-table-renderer.css} +0 -0
- /package/dist/collection/components/bn-title/{ibcs-title/ibcs-title.css → bn-title-renderer/bn-title-renderer.css} +0 -0
- /package/dist/collection/components/bn-title/{ibcs-title → bn-title-renderer}/utils/factories/index.js +0 -0
- /package/dist/collection/components/bn-title/{ibcs-title → bn-title-renderer}/utils/model/MeasureEntriy.js +0 -0
- /package/dist/collection/components/bn-title/{ibcs-title → bn-title-renderer}/utils/model/TimePeriod.js +0 -0
- /package/dist/collection/components/bn-title/{ibcs-title → bn-title-renderer}/utils/model/TitleConfig.js +0 -0
- /package/dist/collection/components/bn-title/{ibcs-title → bn-title-renderer}/utils/model/index.js +0 -0
- /package/dist/components/{stackColors.js → p-4q8nRcWC.js} +0 -0
- /package/dist/components/{merge.js → p-B2NXsfMz.js} +0 -0
- /package/dist/components/{layoutObserver.js → p-B6kka9sT.js} +0 -0
- /package/dist/components/{NumericScale.js → p-BJmwHV0a.js} +0 -0
- /package/dist/components/{stackLayout.js → p-BTnRaHPb.js} +0 -0
- /package/dist/components/{emotion-hash.esm.js → p-BYBpC0EO.js} +0 -0
- /package/dist/components/{diagnostics.js → p-CckAR27O.js} +0 -0
- /package/dist/components/{SiPrefix.js → p-CeE4_3wQ.js} +0 -0
- /package/dist/components/{queryError.js → p-ClruFZD_.js} +0 -0
- /package/dist/components/{sanitizeHtml.js → p-CyUmrWfW.js} +0 -0
- /package/dist/components/{TableAttribute.js → p-DCPLGEs_.js} +0 -0
- /package/dist/components/{parentDimensions.js → p-DD1zlev_.js} +0 -0
- /package/dist/components/{pageFormats.js → p-DM7fwmH4.js} +0 -0
- /package/dist/components/{emptyState.js → p-DakXa7Dp.js} +0 -0
- /package/dist/components/{relativeVariance.js → p-fCjsrD7I.js} +0 -0
- /package/dist/types/components/bn-title/{ibcs-title → bn-title-renderer}/utils/Title.d.ts +0 -0
- /package/dist/types/components/bn-title/{ibcs-title → bn-title-renderer}/utils/factories/TitleDataSetFactory.d.ts +0 -0
- /package/dist/types/components/bn-title/{ibcs-title → bn-title-renderer}/utils/factories/index.d.ts +0 -0
- /package/dist/types/components/bn-title/{ibcs-title → bn-title-renderer}/utils/model/MeasureEntriy.d.ts +0 -0
- /package/dist/types/components/bn-title/{ibcs-title → bn-title-renderer}/utils/model/TimePeriod.d.ts +0 -0
- /package/dist/types/components/bn-title/{ibcs-title → bn-title-renderer}/utils/model/TitleConfig.d.ts +0 -0
- /package/dist/types/components/bn-title/{ibcs-title → bn-title-renderer}/utils/model/index.d.ts +0 -0
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var
|
|
5
|
-
var withHasError = require('./withHasError-qGW_yqIv.js');
|
|
3
|
+
var index = require('./index-DGis1BzT.js');
|
|
4
|
+
var withHasError = require('./withHasError-CqvcS23z.js');
|
|
6
5
|
|
|
7
6
|
const isObject = (obj) => {
|
|
8
7
|
if (typeof obj === 'object' && obj !== null) {
|
|
@@ -62,11 +61,11 @@ const merge = (objects, options) => {
|
|
|
62
61
|
* The effective style is computed by deep-merging three layers in order:
|
|
63
62
|
* 1. `_system` -- built-in defaults (lowest priority)
|
|
64
63
|
* 2. `_default` -- user-defined global overrides
|
|
65
|
-
* 3. The
|
|
64
|
+
* 3. The style named by the `selectedStyle` prop of the component (highest priority)
|
|
66
65
|
*
|
|
67
|
-
*
|
|
68
|
-
* reacts to updates in the componentStyles store, triggering a
|
|
69
|
-
* and forced re-render on changes.
|
|
66
|
+
* The prop is read again each time the style is used, and the store
|
|
67
|
+
* subscription reacts to updates in the componentStyles store, triggering a
|
|
68
|
+
* re-merge and forced re-render on changes.
|
|
70
69
|
*
|
|
71
70
|
* @param component - The Stencil component instance
|
|
72
71
|
* @returns A query function `componentStyle(<selector>)` that provides type-safe
|
|
@@ -84,26 +83,17 @@ const withComponentStyle = (component) => {
|
|
|
84
83
|
// seriesColors/stackColors must be replaced wholesale by an override.
|
|
85
84
|
style = merge([state["_system"] || {}, state["_default"] || {}, state[selectedStyle] || {}], { arrayMergeType: "overwrite" });
|
|
86
85
|
};
|
|
87
|
-
const observer = new MutationObserver((mutations) => {
|
|
88
|
-
mutations.forEach((mutation) => {
|
|
89
|
-
if (mutation.attributeName === "selected-style") {
|
|
90
|
-
selectedStyle = index.getElement(component).getAttribute("selected-style");
|
|
91
|
-
updateStyle();
|
|
92
|
-
index.forceUpdate(component);
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
});
|
|
96
86
|
const connectedCallback = component["connectedCallback"];
|
|
97
87
|
component["connectedCallback"] = () => {
|
|
98
88
|
const element = index.getElement(component);
|
|
99
|
-
stores =
|
|
89
|
+
stores = withHasError.getStores(element);
|
|
100
90
|
style = stores.componentStyles.state["_system"];
|
|
101
|
-
|
|
102
|
-
selectedStyle = index.getElement(component).getAttribute("selected-style");
|
|
91
|
+
selectedStyle = component.selectedStyle;
|
|
103
92
|
updateStyle();
|
|
104
93
|
subscription = stores.componentStyles.on("set", (key) => {
|
|
105
|
-
|
|
106
|
-
|
|
94
|
+
// `_default` is a layer of every style, and it can be registered after this component
|
|
95
|
+
if (key === selectedStyle || key === "_default") {
|
|
96
|
+
selectedStyle = component.selectedStyle;
|
|
107
97
|
updateStyle();
|
|
108
98
|
index.forceUpdate(index.getElement(component));
|
|
109
99
|
}
|
|
@@ -112,12 +102,17 @@ const withComponentStyle = (component) => {
|
|
|
112
102
|
};
|
|
113
103
|
const disconnectedCallback = component["disconnectedCallback"];
|
|
114
104
|
component["disconnectedCallback"] = () => {
|
|
115
|
-
observer.disconnect();
|
|
116
105
|
withHasError.runIfExisits(subscription);
|
|
117
|
-
|
|
106
|
+
withHasError.clearStoresCache(index.getElement(component));
|
|
118
107
|
withHasError.runIfExisits(disconnectedCallback, component);
|
|
119
108
|
};
|
|
120
109
|
const componentStyle = (q) => {
|
|
110
|
+
// A change of the prop renders the component, and the style is read while it renders.
|
|
111
|
+
// So the prop is compared here: no observer, and a property write counts like an attribute.
|
|
112
|
+
if (stores !== undefined && component.selectedStyle !== selectedStyle) {
|
|
113
|
+
selectedStyle = component.selectedStyle;
|
|
114
|
+
updateStyle();
|
|
115
|
+
}
|
|
121
116
|
return q(style);
|
|
122
117
|
};
|
|
123
118
|
return componentStyle;
|
|
@@ -531,8 +526,8 @@ class DateStringFactory {
|
|
|
531
526
|
if (end == null) {
|
|
532
527
|
return exports.DateDistance.DAY;
|
|
533
528
|
}
|
|
534
|
-
const mStart = typeof start == "number" ?
|
|
535
|
-
const mEnd = typeof end == "number" ?
|
|
529
|
+
const mStart = typeof start == "number" ? withHasError.DateTime.fromMillis(start) : start;
|
|
530
|
+
const mEnd = typeof end == "number" ? withHasError.DateTime.fromMillis(end) : end;
|
|
536
531
|
if (mEnd.diff(mStart).as("milliseconds") === 0) {
|
|
537
532
|
return exports.DateDistance.DAY;
|
|
538
533
|
}
|
|
@@ -619,7 +614,7 @@ class DateStringFactory {
|
|
|
619
614
|
// BinoSystem.warn('NO END N SELECTED');
|
|
620
615
|
return "";
|
|
621
616
|
}
|
|
622
|
-
const date1 = startDateTime ||
|
|
617
|
+
const date1 = startDateTime || withHasError.DateTime.now();
|
|
623
618
|
const date2 = endDateTime;
|
|
624
619
|
// calculate type value aka. auto-mode
|
|
625
620
|
if (type === exports.DateDistance.AUTO) {
|
|
@@ -880,7 +875,7 @@ class CompareUtil {
|
|
|
880
875
|
* Returns false for invalid DateTime objects (e.g. parsed from malformed strings).
|
|
881
876
|
*/
|
|
882
877
|
static isDate(data) {
|
|
883
|
-
return data instanceof
|
|
878
|
+
return data instanceof withHasError.DateTime && data.isValid;
|
|
884
879
|
}
|
|
885
880
|
}
|
|
886
881
|
|
|
@@ -1208,13 +1203,6 @@ function isValidDataFormat(value) {
|
|
|
1208
1203
|
}
|
|
1209
1204
|
return (value === null || value === void 0 ? void 0 : value.toUpperCase()) in exports.DataFormat;
|
|
1210
1205
|
}
|
|
1211
|
-
function isValidBoolean(value) {
|
|
1212
|
-
if (isBlankInput(value)) {
|
|
1213
|
-
return false;
|
|
1214
|
-
}
|
|
1215
|
-
const validValues = ["true", "false", true, false];
|
|
1216
|
-
return validValues.some((elem) => elem === value);
|
|
1217
|
-
}
|
|
1218
1206
|
function isValidTableType(value) {
|
|
1219
1207
|
if (isBlankInput(value)) {
|
|
1220
1208
|
return false;
|
|
@@ -1635,7 +1623,6 @@ exports.isRelativeMeasure = isRelativeMeasure;
|
|
|
1635
1623
|
exports.isTableBarColumnWidth = isTableBarColumnWidth;
|
|
1636
1624
|
exports.isTableCategoryWidth = isTableCategoryWidth;
|
|
1637
1625
|
exports.isValidAxisLabelsMode = isValidAxisLabelsMode;
|
|
1638
|
-
exports.isValidBoolean = isValidBoolean;
|
|
1639
1626
|
exports.isValidDataFormat = isValidDataFormat;
|
|
1640
1627
|
exports.isValidDate = isValidDate;
|
|
1641
1628
|
exports.isValidDateFormat = isValidDateFormat;
|
|
@@ -1,9 +1,104 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
|
|
3
|
+
var withHasError = require('./withHasError-CqvcS23z.js');
|
|
4
|
+
var index = require('./index-DGis1BzT.js');
|
|
5
|
+
var withStyled = require('./withStyled-70D4Isgt.js');
|
|
6
|
+
|
|
7
|
+
const ALLOWED_TAGS = new Set([
|
|
8
|
+
"br",
|
|
9
|
+
"b",
|
|
10
|
+
"i",
|
|
11
|
+
"strong",
|
|
12
|
+
"em",
|
|
13
|
+
"span",
|
|
14
|
+
"p",
|
|
15
|
+
"div",
|
|
16
|
+
"table",
|
|
17
|
+
"tr",
|
|
18
|
+
"td",
|
|
19
|
+
"th",
|
|
20
|
+
"thead",
|
|
21
|
+
"tbody",
|
|
22
|
+
"tfoot",
|
|
23
|
+
"ul",
|
|
24
|
+
"ol",
|
|
25
|
+
"li",
|
|
26
|
+
"h1",
|
|
27
|
+
"h2",
|
|
28
|
+
"h3",
|
|
29
|
+
"h4",
|
|
30
|
+
"h5",
|
|
31
|
+
"h6",
|
|
32
|
+
"sub",
|
|
33
|
+
"sup",
|
|
34
|
+
"small",
|
|
35
|
+
"hr",
|
|
36
|
+
"a",
|
|
37
|
+
"img",
|
|
38
|
+
"code",
|
|
39
|
+
"pre",
|
|
40
|
+
"blockquote",
|
|
41
|
+
"del",
|
|
42
|
+
]);
|
|
43
|
+
const ALLOWED_ATTRS = new Set([
|
|
44
|
+
"class",
|
|
45
|
+
"style",
|
|
46
|
+
"colspan",
|
|
47
|
+
"rowspan",
|
|
48
|
+
"href",
|
|
49
|
+
"title",
|
|
50
|
+
"src",
|
|
51
|
+
"alt",
|
|
52
|
+
"width",
|
|
53
|
+
"height",
|
|
54
|
+
]);
|
|
55
|
+
const ALLOWED_PROTOCOLS = new Set(["http:", "https:", "mailto:"]);
|
|
56
|
+
const ALLOWED_STYLE = /^\s*text-align:\s*(left|center|right)\s*;?\s*$/i;
|
|
57
|
+
/**
|
|
58
|
+
* Strips everything but the allowed tags and attributes from an HTML string.
|
|
59
|
+
* The string is parsed into a separate inert document, so nothing in it loads
|
|
60
|
+
* or runs. Disallowed elements are removed together with their content.
|
|
61
|
+
*/
|
|
62
|
+
function sanitizeHtml(html) {
|
|
63
|
+
if (!html)
|
|
64
|
+
return "";
|
|
65
|
+
const body = new DOMParser().parseFromString(html, "text/html").body;
|
|
66
|
+
sanitizeNode(body);
|
|
67
|
+
return body.innerHTML;
|
|
68
|
+
}
|
|
69
|
+
function sanitizeNode(node) {
|
|
70
|
+
for (const child of Array.from(node.childNodes)) {
|
|
71
|
+
if (child.nodeType === Node.TEXT_NODE)
|
|
72
|
+
continue;
|
|
73
|
+
const el = child;
|
|
74
|
+
// localName, not tagName: a form control named "tagName" shadows that property on its form.
|
|
75
|
+
if (child.nodeType !== Node.ELEMENT_NODE || !ALLOWED_TAGS.has(el.localName)) {
|
|
76
|
+
node.removeChild(child);
|
|
77
|
+
continue;
|
|
78
|
+
}
|
|
79
|
+
for (const attr of Array.from(el.attributes)) {
|
|
80
|
+
const name = attr.name.toLowerCase();
|
|
81
|
+
if (!ALLOWED_ATTRS.has(name) || ((name === "href" || name === "src") && !isAllowedUrl(name, attr.value))) {
|
|
82
|
+
el.removeAttribute(attr.name);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
// Read through getAttribute: Stencil's mock-doc keeps style out of el.attributes.
|
|
86
|
+
const style = el.getAttribute("style");
|
|
87
|
+
if (style !== null && !ALLOWED_STYLE.test(style))
|
|
88
|
+
el.removeAttribute("style");
|
|
89
|
+
sanitizeNode(el);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
function isAllowedUrl(name, value) {
|
|
93
|
+
try {
|
|
94
|
+
// A fixed base lets relative URLs pass whatever the URL of the embedding page is.
|
|
95
|
+
const { protocol } = new URL(value, "http://a");
|
|
96
|
+
return ALLOWED_PROTOCOLS.has(protocol) || (name === "src" && protocol === "data:");
|
|
97
|
+
}
|
|
98
|
+
catch (_a) {
|
|
99
|
+
return false;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
7
102
|
|
|
8
103
|
/**
|
|
9
104
|
* Returns the available dimensions for a component.
|
|
@@ -170,6 +265,15 @@ function getClippedHeight(element, contentHeight) {
|
|
|
170
265
|
return clipped / scale;
|
|
171
266
|
}
|
|
172
267
|
|
|
268
|
+
/**
|
|
269
|
+
* The four scaling modes a component's `scale` attribute can resolve to:
|
|
270
|
+
* - `"empty"`: attribute absent or blank -- component decides (typically auto)
|
|
271
|
+
* - `"none"`: scaling explicitly disabled (show raw values)
|
|
272
|
+
* - `"auto"`: auto-detect SI prefix from data magnitude
|
|
273
|
+
* - `"factor"`: explicit numeric divisor (e.g. `"1000"` to show values in thousands)
|
|
274
|
+
*/
|
|
275
|
+
/** A stroke width given as a multiple of the font size, in px. Rounded: 0.075 at 13.3333 px is 1, not 0.9999975. */
|
|
276
|
+
const strokeWidthPx = (factor, fontSizePx) => Math.round(factor * fontSizePx * 100) / 100;
|
|
173
277
|
/**
|
|
174
278
|
* Parses the raw `scale` attribute string into a typed {@link ScalingConfig}.
|
|
175
279
|
* Handles null/empty (-> empty), literal `"none"` / `"auto"`, or a positive
|
|
@@ -280,7 +384,7 @@ const partition = (predicate, arr) => {
|
|
|
280
384
|
}
|
|
281
385
|
return [matches, nonMatches];
|
|
282
386
|
};
|
|
283
|
-
const WARN_DATASOURCE_ID = "
|
|
387
|
+
const WARN_DATASOURCE_ID = "WARN_datasets";
|
|
284
388
|
/**
|
|
285
389
|
* Emits a warning via the component's ErrorDispatcher when datasource refs
|
|
286
390
|
* (`$name`) are used directly, nudging consumers toward bn-dataset wrappers
|
|
@@ -306,7 +410,7 @@ const warnIfDatasource = (component, datasources) => {
|
|
|
306
410
|
/**
|
|
307
411
|
* Mixin that subscribes a Stencil component to one or more datasets/datasources.
|
|
308
412
|
*
|
|
309
|
-
* **Naming convention:** The `datasets`
|
|
413
|
+
* **Naming convention:** The `datasets` prop of the component accepts a comma-separated list of names.
|
|
310
414
|
* Names prefixed with `$` (e.g. `$revenue`) read directly from the raw datasource tables;
|
|
311
415
|
* unprefixed names read from datasets (registered as tables/views by `<bn-dataset>`).
|
|
312
416
|
*
|
|
@@ -314,8 +418,8 @@ const warnIfDatasource = (component, datasources) => {
|
|
|
314
418
|
* name is registered with `stores.db.subscribe(...)` and the rows are materialized
|
|
315
419
|
* via `db.exec("SELECT * FROM <name>")` whenever the producer fires `notify(name)`.
|
|
316
420
|
*
|
|
317
|
-
* The
|
|
318
|
-
* bindings
|
|
421
|
+
* The prop reflects to the `datasets` attribute. The mixin watches that attribute with a
|
|
422
|
+
* MutationObserver, so bindings follow a change of the attribute or the property.
|
|
319
423
|
*
|
|
320
424
|
* @param component - The Stencil component instance (must expose a host element via `@Element()`)
|
|
321
425
|
* @param onUpdate - Callback invoked with `(name, data)` whenever a subscribed dataset or datasource changes
|
|
@@ -330,6 +434,20 @@ component, onUpdate, onMetaUpdate) => {
|
|
|
330
434
|
let datasets = [];
|
|
331
435
|
let datasources = [];
|
|
332
436
|
let stores;
|
|
437
|
+
/** The `datasets` value the subscriptions were made for. */
|
|
438
|
+
let bound = "";
|
|
439
|
+
// the prop, not the attribute: a property set before the first render is not reflected yet
|
|
440
|
+
const bind = () => {
|
|
441
|
+
const previous = bound;
|
|
442
|
+
bound = component.datasets || "";
|
|
443
|
+
if (previous !== "" && previous !== bound) {
|
|
444
|
+
// the names changed: start empty, or the component keeps the data of a name that is gone
|
|
445
|
+
onUpdate("", []);
|
|
446
|
+
}
|
|
447
|
+
[datasources, datasets] = partition((s) => s.startsWith("$"), bound.split(","));
|
|
448
|
+
warnIfDatasource(component, datasources);
|
|
449
|
+
rebind();
|
|
450
|
+
};
|
|
333
451
|
/** Materialize the current rows for a subscribed name via the shared db, then deliver. */
|
|
334
452
|
const deliver = (name, isDatasource) => {
|
|
335
453
|
const tableName = isDatasource ? name.substring(1) : name;
|
|
@@ -371,20 +489,17 @@ component, onUpdate, onMetaUpdate) => {
|
|
|
371
489
|
};
|
|
372
490
|
const observer = new MutationObserver((mutations) => {
|
|
373
491
|
mutations.forEach((mutation) => {
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
rebind();
|
|
492
|
+
// Stencil writes a reflected attribute again with the same value in the first render
|
|
493
|
+
if (mutation.attributeName === "datasets" && (component.datasets || "") !== bound) {
|
|
494
|
+
bind();
|
|
378
495
|
}
|
|
379
496
|
});
|
|
380
497
|
});
|
|
381
498
|
const connectedCallback = component["connectedCallback"];
|
|
382
499
|
component["connectedCallback"] = () => {
|
|
383
500
|
const element = index.getElement(component);
|
|
384
|
-
stores =
|
|
385
|
-
|
|
386
|
-
warnIfDatasource(component, datasources);
|
|
387
|
-
rebind();
|
|
501
|
+
stores = withHasError.getStores(element);
|
|
502
|
+
bind();
|
|
388
503
|
observer.observe(element, { attributes: true, attributeFilter: ["datasets"] });
|
|
389
504
|
if (onMetaUpdate) {
|
|
390
505
|
subscriptionMeta = stores.datasetsMeta.on("set", (key, newValue) => {
|
|
@@ -401,7 +516,7 @@ component, onUpdate, onMetaUpdate) => {
|
|
|
401
516
|
dbUnsubs.forEach((fn) => fn());
|
|
402
517
|
dbUnsubs = [];
|
|
403
518
|
withHasError.runIfExisits(subscriptionMeta);
|
|
404
|
-
|
|
519
|
+
withHasError.clearStoresCache(index.getElement(component));
|
|
405
520
|
withHasError.runIfExisits(disconnectedCallback, component);
|
|
406
521
|
};
|
|
407
522
|
return (names) => {
|
|
@@ -640,8 +755,7 @@ component, mappings, errors) => {
|
|
|
640
755
|
*
|
|
641
756
|
* **Namespace resolution** (mirrors the ancestor inheritance of `withRuleSet`,
|
|
642
757
|
* but on by default):
|
|
643
|
-
* 1. The
|
|
644
|
-
* `namespace` attribute is honored as a fallback).
|
|
758
|
+
* 1. The component's own `i18nNamespace` prop (attribute `i18n-namespace`).
|
|
645
759
|
* 2. Otherwise the `i18n-namespace` attribute of the nearest ancestor that
|
|
646
760
|
* carries one - a layout card, layout page, tree, grid, or the
|
|
647
761
|
* `bn-context` itself - crossing shadow boundaries. The resolved ancestor
|
|
@@ -667,16 +781,18 @@ component, mappings, errors) => {
|
|
|
667
781
|
const withTranslation = (component) => {
|
|
668
782
|
let subscription;
|
|
669
783
|
let namespace = undefined;
|
|
784
|
+
/** The `i18nNamespace` prop value that `namespace` was resolved for. */
|
|
785
|
+
let ownNamespace = undefined;
|
|
670
786
|
let stores;
|
|
671
787
|
let ancestorObserver = null;
|
|
672
788
|
const resolveNamespace = () => {
|
|
673
|
-
var _a;
|
|
674
789
|
const element = index.getElement(component);
|
|
675
790
|
if (ancestorObserver) {
|
|
676
791
|
ancestorObserver.disconnect();
|
|
677
792
|
ancestorObserver = null;
|
|
678
793
|
}
|
|
679
|
-
|
|
794
|
+
ownNamespace = component.i18nNamespace;
|
|
795
|
+
namespace = ownNamespace;
|
|
680
796
|
if (namespace != null) {
|
|
681
797
|
return;
|
|
682
798
|
}
|
|
@@ -690,19 +806,10 @@ const withTranslation = (component) => {
|
|
|
690
806
|
ancestorObserver.observe(ancestor, { attributes: true, attributeFilter: ["i18n-namespace"] });
|
|
691
807
|
}
|
|
692
808
|
};
|
|
693
|
-
const observer = new MutationObserver((mutations) => {
|
|
694
|
-
mutations.forEach((mutation) => {
|
|
695
|
-
if (mutation.attributeName === "i18n-namespace" || mutation.attributeName === "namespace") {
|
|
696
|
-
resolveNamespace();
|
|
697
|
-
index.forceUpdate(component);
|
|
698
|
-
}
|
|
699
|
-
});
|
|
700
|
-
});
|
|
701
809
|
const connectedCallback = component["connectedCallback"];
|
|
702
810
|
component["connectedCallback"] = () => {
|
|
703
811
|
const element = index.getElement(component);
|
|
704
|
-
stores =
|
|
705
|
-
observer.observe(element, { attributes: true, attributeFilter: ["i18n-namespace", "namespace"] });
|
|
812
|
+
stores = withHasError.getStores(element);
|
|
706
813
|
resolveNamespace();
|
|
707
814
|
subscription = stores.internationalization.on("set", (key, _value) => {
|
|
708
815
|
if (key === namespace || key === "_system") {
|
|
@@ -713,20 +820,27 @@ const withTranslation = (component) => {
|
|
|
713
820
|
};
|
|
714
821
|
const disconnectedCallback = component["disconnectedCallback"];
|
|
715
822
|
component["disconnectedCallback"] = () => {
|
|
716
|
-
observer.disconnect();
|
|
717
823
|
if (ancestorObserver) {
|
|
718
824
|
ancestorObserver.disconnect();
|
|
719
825
|
ancestorObserver = null;
|
|
720
826
|
}
|
|
721
827
|
withHasError.runIfExisits(subscription);
|
|
722
|
-
|
|
828
|
+
withHasError.clearStoresCache(index.getElement(component));
|
|
723
829
|
withHasError.runIfExisits(disconnectedCallback, component);
|
|
724
830
|
};
|
|
725
831
|
const t = (key, data) => {
|
|
726
832
|
var _a, _b, _c, _d, _e;
|
|
833
|
+
// A change of the prop renders the component, and texts are looked up while it renders:
|
|
834
|
+
// compared here, a property write counts like an attribute.
|
|
835
|
+
if (stores !== undefined && component.i18nNamespace !== ownNamespace) {
|
|
836
|
+
resolveNamespace();
|
|
837
|
+
}
|
|
727
838
|
if (key.startsWith(".")) {
|
|
728
839
|
key = index.getElement(component).localName + key;
|
|
729
840
|
}
|
|
841
|
+
if (Object.prototype.hasOwnProperty.call(withHasError.RENAMED_I18N_KEYS, key)) {
|
|
842
|
+
key = withHasError.RENAMED_I18N_KEYS[key];
|
|
843
|
+
}
|
|
730
844
|
const locales = stores.internationalization.state;
|
|
731
845
|
const locale = stores.context.state.locale;
|
|
732
846
|
// Per-key fallback chain: resolved namespace → _system → the key itself.
|
|
@@ -740,102 +854,6 @@ const withTranslation = (component) => {
|
|
|
740
854
|
return { t };
|
|
741
855
|
};
|
|
742
856
|
|
|
743
|
-
const ALLOWED_TAGS = new Set([
|
|
744
|
-
"br",
|
|
745
|
-
"b",
|
|
746
|
-
"i",
|
|
747
|
-
"strong",
|
|
748
|
-
"em",
|
|
749
|
-
"span",
|
|
750
|
-
"p",
|
|
751
|
-
"div",
|
|
752
|
-
"table",
|
|
753
|
-
"tr",
|
|
754
|
-
"td",
|
|
755
|
-
"th",
|
|
756
|
-
"thead",
|
|
757
|
-
"tbody",
|
|
758
|
-
"tfoot",
|
|
759
|
-
"ul",
|
|
760
|
-
"ol",
|
|
761
|
-
"li",
|
|
762
|
-
"h1",
|
|
763
|
-
"h2",
|
|
764
|
-
"h3",
|
|
765
|
-
"h4",
|
|
766
|
-
"h5",
|
|
767
|
-
"h6",
|
|
768
|
-
"sub",
|
|
769
|
-
"sup",
|
|
770
|
-
"small",
|
|
771
|
-
"hr",
|
|
772
|
-
"a",
|
|
773
|
-
"img",
|
|
774
|
-
"code",
|
|
775
|
-
"pre",
|
|
776
|
-
"blockquote",
|
|
777
|
-
"del",
|
|
778
|
-
]);
|
|
779
|
-
const ALLOWED_ATTRS = new Set([
|
|
780
|
-
"class",
|
|
781
|
-
"style",
|
|
782
|
-
"colspan",
|
|
783
|
-
"rowspan",
|
|
784
|
-
"href",
|
|
785
|
-
"title",
|
|
786
|
-
"src",
|
|
787
|
-
"alt",
|
|
788
|
-
"width",
|
|
789
|
-
"height",
|
|
790
|
-
]);
|
|
791
|
-
const ALLOWED_PROTOCOLS = new Set(["http:", "https:", "mailto:"]);
|
|
792
|
-
const ALLOWED_STYLE = /^\s*text-align:\s*(left|center|right)\s*;?\s*$/i;
|
|
793
|
-
/**
|
|
794
|
-
* Strips everything but the allowed tags and attributes from an HTML string.
|
|
795
|
-
* The string is parsed into a separate inert document, so nothing in it loads
|
|
796
|
-
* or runs. Disallowed elements are removed together with their content.
|
|
797
|
-
*/
|
|
798
|
-
function sanitizeHtml(html) {
|
|
799
|
-
if (!html)
|
|
800
|
-
return "";
|
|
801
|
-
const body = new DOMParser().parseFromString(html, "text/html").body;
|
|
802
|
-
sanitizeNode(body);
|
|
803
|
-
return body.innerHTML;
|
|
804
|
-
}
|
|
805
|
-
function sanitizeNode(node) {
|
|
806
|
-
for (const child of Array.from(node.childNodes)) {
|
|
807
|
-
if (child.nodeType === Node.TEXT_NODE)
|
|
808
|
-
continue;
|
|
809
|
-
const el = child;
|
|
810
|
-
// localName, not tagName: a form control named "tagName" shadows that property on its form.
|
|
811
|
-
if (child.nodeType !== Node.ELEMENT_NODE || !ALLOWED_TAGS.has(el.localName)) {
|
|
812
|
-
node.removeChild(child);
|
|
813
|
-
continue;
|
|
814
|
-
}
|
|
815
|
-
for (const attr of Array.from(el.attributes)) {
|
|
816
|
-
const name = attr.name.toLowerCase();
|
|
817
|
-
if (!ALLOWED_ATTRS.has(name) || ((name === "href" || name === "src") && !isAllowedUrl(name, attr.value))) {
|
|
818
|
-
el.removeAttribute(attr.name);
|
|
819
|
-
}
|
|
820
|
-
}
|
|
821
|
-
// Read through getAttribute: Stencil's mock-doc keeps style out of el.attributes.
|
|
822
|
-
const style = el.getAttribute("style");
|
|
823
|
-
if (style !== null && !ALLOWED_STYLE.test(style))
|
|
824
|
-
el.removeAttribute("style");
|
|
825
|
-
sanitizeNode(el);
|
|
826
|
-
}
|
|
827
|
-
}
|
|
828
|
-
function isAllowedUrl(name, value) {
|
|
829
|
-
try {
|
|
830
|
-
// A fixed base lets relative URLs pass whatever the URL of the embedding page is.
|
|
831
|
-
const { protocol } = new URL(value, "http://a");
|
|
832
|
-
return ALLOWED_PROTOCOLS.has(protocol) || (name === "src" && protocol === "data:");
|
|
833
|
-
}
|
|
834
|
-
catch (_a) {
|
|
835
|
-
return false;
|
|
836
|
-
}
|
|
837
|
-
}
|
|
838
|
-
|
|
839
857
|
exports.findLayoutAncestors = findLayoutAncestors;
|
|
840
858
|
exports.formatScalingValue = formatScalingValue;
|
|
841
859
|
exports.getClippedHeight = getClippedHeight;
|
|
@@ -846,6 +864,7 @@ exports.parseScalingValue = parseScalingValue;
|
|
|
846
864
|
exports.readInherited = readInherited;
|
|
847
865
|
exports.resolveScalingValue = resolveScalingValue;
|
|
848
866
|
exports.sanitizeHtml = sanitizeHtml;
|
|
867
|
+
exports.strokeWidthPx = strokeWidthPx;
|
|
849
868
|
exports.withDataset = withDataset;
|
|
850
869
|
exports.withInheritedProps = withInheritedProps;
|
|
851
870
|
exports.withTranslation = withTranslation;
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"entries": [
|
|
3
|
-
"components/bn-table/
|
|
3
|
+
"components/bn-table/bn-table-renderer/bn-table-renderer.js",
|
|
4
|
+
"components/bn-annotation-layer/bn-annotation-layer.js",
|
|
5
|
+
"components/bn-annotation-list/bn-annotation-list.js",
|
|
4
6
|
"components/bn-asset/bn-asset.js",
|
|
5
7
|
"components/bn-body/bn-body.js",
|
|
6
8
|
"components/bn-card/bn-card.js",
|
|
7
9
|
"components/bn-chart-bubble/bn-chart-bubble.js",
|
|
8
|
-
"components/bn-chart-bubble/
|
|
10
|
+
"components/bn-chart-bubble/bn-chart-bubble-renderer/bn-chart-bubble-renderer.js",
|
|
9
11
|
"components/bn-chart-bullet/bn-chart-bullet.js",
|
|
10
|
-
"components/bn-chart-bullet/
|
|
12
|
+
"components/bn-chart-bullet/bn-chart-bullet-renderer/bn-chart-bullet-renderer.js",
|
|
11
13
|
"components/bn-chart-scatter/bn-chart-scatter.js",
|
|
12
|
-
"components/bn-chart-scatter/
|
|
14
|
+
"components/bn-chart-scatter/bn-chart-scatter-renderer/bn-chart-scatter-renderer.js",
|
|
13
15
|
"components/bn-chart-structure/bn-chart-structure.js",
|
|
14
|
-
"components/bn-chart-structure/
|
|
16
|
+
"components/bn-chart-structure/bn-chart-structure-renderer/bn-chart-structure-renderer.js",
|
|
15
17
|
"components/bn-chart-time/bn-chart-time.js",
|
|
16
|
-
"components/bn-chart-time/
|
|
18
|
+
"components/bn-chart-time/bn-chart-time-renderer/bn-chart-time-renderer.js",
|
|
17
19
|
"components/bn-component-style/bn-component-style.js",
|
|
18
20
|
"components/bn-context/bn-context.js",
|
|
19
21
|
"components/bn-dataset/bn-dataset.js",
|
|
@@ -22,7 +24,6 @@
|
|
|
22
24
|
"components/bn-grid/bn-grid.js",
|
|
23
25
|
"components/bn-image/bn-image.js",
|
|
24
26
|
"components/bn-internationalization/bn-internationalization.js",
|
|
25
|
-
"components/bn-text/bn-text.js",
|
|
26
27
|
"components/bn-layout-card/bn-layout-card.js",
|
|
27
28
|
"components/bn-layout-page/bn-layout-page.js",
|
|
28
29
|
"components/bn-message/bn-message.js",
|
|
@@ -30,11 +31,10 @@
|
|
|
30
31
|
"components/bn-ruleset/bn-ruleset.js",
|
|
31
32
|
"components/bn-scaling-group/bn-scaling-group.js",
|
|
32
33
|
"components/bn-table/bn-table.js",
|
|
33
|
-
"components/bn-
|
|
34
|
+
"components/bn-text/bn-text.js",
|
|
34
35
|
"components/bn-title/bn-title.js",
|
|
35
|
-
"components/bn-title/
|
|
36
|
-
"components/bn-tree/bn-tree.js"
|
|
37
|
-
"components/editor-companion/editor-companion.js"
|
|
36
|
+
"components/bn-title/bn-title-renderer/bn-title-renderer.js",
|
|
37
|
+
"components/bn-tree/bn-tree.js"
|
|
38
38
|
],
|
|
39
39
|
"mixins": [],
|
|
40
40
|
"compiler": {
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
:host {
|
|
2
|
+
position: absolute;
|
|
3
|
+
inset: 0;
|
|
4
|
+
z-index: 1;
|
|
5
|
+
display: block;
|
|
6
|
+
pointer-events: none;
|
|
7
|
+
font-family: var(--bn-font-family, "Noto Sans", sans-serif);
|
|
8
|
+
font-size: var(--bn-font-size, 13.3333px);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
svg {
|
|
12
|
+
position: absolute;
|
|
13
|
+
inset: 0;
|
|
14
|
+
width: 100%;
|
|
15
|
+
height: 100%;
|
|
16
|
+
overflow: visible;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.badge-text {
|
|
20
|
+
fill: #ffffff;
|
|
21
|
+
font-weight: bold;
|
|
22
|
+
text-anchor: middle;
|
|
23
|
+
dominant-baseline: central;
|
|
24
|
+
}
|