@bino-bi/bn-template-engine 1.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/bn-template-engine/assets/bar.png +0 -0
- package/dist/bn-template-engine/assets/gpx/Chasing_Legends.gpx +195076 -0
- package/dist/bn-template-engine/assets/gpx/Fahrt_am_Nachmittag.gpx +142007 -0
- package/dist/bn-template-engine/assets/icons/gpx-finish.png +0 -0
- package/dist/bn-template-engine/assets/icons/gpx-shadow.png +0 -0
- package/dist/bn-template-engine/assets/icons/gpx-start.png +0 -0
- package/dist/bn-template-engine/assets/icons/marker-example.png +0 -0
- package/dist/bn-template-engine/assets/icons/pin-icon-end.png +0 -0
- package/dist/bn-template-engine/assets/icons/pin-icon-start.png +0 -0
- package/dist/bn-template-engine/assets/icons/pin-icon-wpt.png +0 -0
- package/dist/bn-template-engine/assets/icons/pin-shadow.png +0 -0
- package/dist/bn-template-engine/assets/icons/pin.png +0 -0
- package/dist/bn-template-engine/assets/matrix.png +0 -0
- package/dist/bn-template-engine/bn-template-engine.esm.js +1 -0
- package/dist/bn-template-engine/index.esm.js +0 -0
- package/dist/bn-template-engine/p--TeDldm8.js +1 -0
- package/dist/bn-template-engine/p-0e7dc113.entry.js +1 -0
- package/dist/bn-template-engine/p-1jFf17Vj.js +1 -0
- package/dist/bn-template-engine/p-264c6bad.entry.js +1 -0
- package/dist/bn-template-engine/p-326a0902.entry.js +1 -0
- package/dist/bn-template-engine/p-38a8bde3.entry.js +1 -0
- package/dist/bn-template-engine/p-577eafcd.entry.js +1 -0
- package/dist/bn-template-engine/p-5905cc43.entry.js +1 -0
- package/dist/bn-template-engine/p-5d155a72.entry.js +1 -0
- package/dist/bn-template-engine/p-65f8962a.entry.js +1 -0
- package/dist/bn-template-engine/p-6b8d1ebf.entry.js +1 -0
- package/dist/bn-template-engine/p-7995acb2.entry.js +1 -0
- package/dist/bn-template-engine/p-7afe431e.entry.js +1 -0
- package/dist/bn-template-engine/p-8014b1ac.entry.js +1 -0
- package/dist/bn-template-engine/p-80423fc8.entry.js +1 -0
- package/dist/bn-template-engine/p-91e74d42.entry.js +1 -0
- package/dist/bn-template-engine/p-930a9e29.entry.js +1 -0
- package/dist/bn-template-engine/p-93C9jL8R.js +1 -0
- package/dist/bn-template-engine/p-93ff8584.entry.js +1 -0
- package/dist/bn-template-engine/p-B0m0U4wJ.js +1 -0
- package/dist/bn-template-engine/p-B27Ax6P_.js +2 -0
- package/dist/bn-template-engine/p-B79VcHiT.js +1 -0
- package/dist/bn-template-engine/p-BBd0ZVLL.js +1 -0
- package/dist/bn-template-engine/p-BFTU3MAI.js +1 -0
- package/dist/bn-template-engine/p-BFatTBqh.js +1 -0
- package/dist/bn-template-engine/p-BQp6ZPYW.js +1 -0
- package/dist/bn-template-engine/p-BYmPQYxx.js +1 -0
- package/dist/bn-template-engine/p-BhEQy-2D.js +1 -0
- package/dist/bn-template-engine/p-BtVfu16B.js +1 -0
- package/dist/bn-template-engine/p-CY1RzLjU.js +1 -0
- package/dist/bn-template-engine/p-CfWnag33.js +1 -0
- package/dist/bn-template-engine/p-CnI71OA9.js +1 -0
- package/dist/bn-template-engine/p-Cp4MVxCu.js +1 -0
- package/dist/bn-template-engine/p-DQuL1Twl.js +1 -0
- package/dist/bn-template-engine/p-DbyXf6dF.js +1 -0
- package/dist/bn-template-engine/p-TdL-LRR9.js +1 -0
- package/dist/bn-template-engine/p-_LBTIfNN.js +1 -0
- package/dist/bn-template-engine/p-a342cd3c.entry.js +1 -0
- package/dist/bn-template-engine/p-ad94cf63.entry.js +1 -0
- package/dist/bn-template-engine/p-bc37d750.entry.js +1 -0
- package/dist/bn-template-engine/p-c9f050bf.entry.js +1 -0
- package/dist/bn-template-engine/p-d07a0ca3.entry.js +1 -0
- package/dist/bn-template-engine/p-e5f372af.entry.js +1 -0
- package/dist/bn-template-engine/p-e620028c.entry.js +1 -0
- package/dist/bn-template-engine/p-e81e116a.entry.js +1 -0
- package/dist/bn-template-engine/p-eca98070.entry.js +1 -0
- package/dist/bn-template-engine/p-ee6de950.entry.js +1 -0
- package/dist/bn-template-engine/p-efe0ef1e.entry.js +1 -0
- package/dist/bn-template-engine/p-f034f1b8.entry.js +1 -0
- package/dist/bn-template-engine/p-f1c1a8a3.entry.js +1 -0
- package/dist/bn-template-engine/p-fe573a1a.entry.js +1 -0
- package/dist/bn-template-engine/p-kMyLevYy.js +1 -0
- package/dist/cjs/DataFormatDigits-DmTbhF8q.js +142 -0
- package/dist/cjs/DateStringFactory-Dn0aRj2Y.js +453 -0
- package/dist/cjs/Order-B4NIqQWe.js +129 -0
- package/dist/cjs/SVGVariancesStyleGroup-Czizhngt.js +7973 -0
- package/dist/cjs/StringAdapter-0EbYMkR0.js +136 -0
- package/dist/cjs/_commonjsHelpers-BJu3ubxk.js +10 -0
- package/dist/cjs/alasql.min-C_nHTuEQ.js +306 -0
- package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
- package/dist/cjs/bn-asset.cjs.entry.js +42 -0
- package/dist/cjs/bn-body_3.cjs.entry.js +413 -0
- package/dist/cjs/bn-card.cjs.entry.js +37 -0
- package/dist/cjs/bn-chart-structure.cjs.entry.js +705 -0
- package/dist/cjs/bn-chart-time.cjs.entry.js +987 -0
- package/dist/cjs/bn-component-style.cjs.entry.js +44 -0
- package/dist/cjs/bn-context_5.cjs.entry.js +3380 -0
- package/dist/cjs/bn-dataset.cjs.entry.js +278 -0
- package/dist/cjs/bn-grid.cjs.entry.js +407 -0
- package/dist/cjs/bn-image.cjs.entry.js +57 -0
- package/dist/cjs/bn-internationalization.cjs.entry.js +40 -0
- package/dist/cjs/bn-layout-card.cjs.entry.js +128 -0
- package/dist/cjs/bn-layout-page.cjs.entry.js +142 -0
- package/dist/cjs/bn-map.cjs.entry.js +425 -0
- package/dist/cjs/bn-message.cjs.entry.js +52 -0
- package/dist/cjs/bn-template-engine.cjs.js +52 -0
- package/dist/cjs/bn-template.cjs.entry.js +20 -0
- package/dist/cjs/bn-text.cjs.entry.js +286 -0
- package/dist/cjs/bn-tree.cjs.entry.js +969 -0
- package/dist/cjs/componentRegister-C17UFNPh.js +72 -0
- package/dist/cjs/constants-DHqQXSSd.js +158 -0
- package/dist/cjs/context-protocol-BkYHFkXE.js +661 -0
- package/dist/cjs/editor-companion.cjs.entry.js +49 -0
- package/dist/cjs/formatter-DIJL_crx.js +215 -0
- package/dist/cjs/ibcs-chart-structure.cjs.entry.js +2906 -0
- package/dist/cjs/ibcs-chart-time.cjs.entry.js +4140 -0
- package/dist/cjs/ibcs-map.cjs.entry.js +1075 -0
- package/dist/cjs/ibcs-title.cjs.entry.js +352 -0
- package/dist/cjs/index-CScBFiS1.js +4653 -0
- package/dist/cjs/index.cjs.js +2 -0
- package/dist/cjs/loader.cjs.js +13 -0
- package/dist/cjs/luxon-8hyy5YD7.js +8132 -0
- package/dist/cjs/scaling-B23eOtsC.js +67 -0
- package/dist/cjs/test-runner-card.cjs.entry.js +27 -0
- package/dist/cjs/test-runner-chart-time.cjs.entry.js +230 -0
- package/dist/cjs/test-runner-chart.cjs.entry.js +326 -0
- package/dist/cjs/test-runner-map.cjs.entry.js +1862 -0
- package/dist/cjs/test-runner-table.cjs.entry.js +477 -0
- package/dist/cjs/test-runner-time.cjs.entry.js +381 -0
- package/dist/cjs/test-runner-title.cjs.entry.js +115 -0
- package/dist/cjs/withBodyObserver-B0_W1VOf.js +39 -0
- package/dist/cjs/withComponentStatus-BrxL7usr.js +39 -0
- package/dist/cjs/withComponentStyle-C6KHnZHt.js +128 -0
- package/dist/cjs/withDataset-ZdN-RRTx.js +146 -0
- package/dist/cjs/withHasError-Dspb3lIV.js +154 -0
- package/dist/cjs/withStyled-Bf-stJTR.js +567 -0
- package/dist/cjs/withTranslation-Cz0M5maV.js +77 -0
- package/dist/collection/collection-manifest.json +48 -0
- package/dist/collection/components/bn-asset/bn-asset.css +3 -0
- package/dist/collection/components/bn-asset/bn-asset.js +67 -0
- package/dist/collection/components/bn-body/bn-body.css +9 -0
- package/dist/collection/components/bn-body/bn-body.js +38 -0
- package/dist/collection/components/bn-card/bn-card.css +21 -0
- package/dist/collection/components/bn-card/bn-card.js +38 -0
- package/dist/collection/components/bn-chart-structure/bn-chart-structure.css +105 -0
- package/dist/collection/components/bn-chart-structure/bn-chart-structure.js +1047 -0
- package/dist/collection/components/bn-chart-structure/ibcs-chart-structure.js +594 -0
- package/dist/collection/components/bn-chart-structure/utils/StructureChart.js +979 -0
- package/dist/collection/components/bn-chart-structure/utils/elements/Axis.js +39 -0
- package/dist/collection/components/bn-chart-structure/utils/elements/Bar.js +293 -0
- package/dist/collection/components/bn-chart-structure/utils/elements/Label.js +136 -0
- package/dist/collection/components/bn-chart-structure/utils/elements/Marker.js +118 -0
- package/dist/collection/components/bn-chart-structure/utils/elements/Needle.js +151 -0
- package/dist/collection/components/bn-chart-structure/utils/elements/StackedBar.js +83 -0
- package/dist/collection/components/bn-chart-structure/utils/elements/index.js +6 -0
- package/dist/collection/components/bn-chart-structure/utils/factories/ScenarioFactory.js +119 -0
- package/dist/collection/components/bn-chart-structure/utils/factories/index.js +1 -0
- package/dist/collection/components/bn-chart-structure/utils/helper/CustomPattern.js +45 -0
- package/dist/collection/components/bn-chart-structure/utils/helper/ElementPositions.js +210 -0
- package/dist/collection/components/bn-chart-structure/utils/helper/MarkerPattern.js +46 -0
- package/dist/collection/components/bn-chart-structure/utils/helper/Padding.js +13 -0
- package/dist/collection/components/bn-chart-structure/utils/helper/index.js +15 -0
- package/dist/collection/components/bn-chart-structure/utils/model/DataPoint.js +101 -0
- package/dist/collection/components/bn-chart-structure/utils/model/OverflowConfig.js +1 -0
- package/dist/collection/components/bn-chart-structure/utils/model/StructureChartComponentConfig.js +106 -0
- package/dist/collection/components/bn-chart-structure/utils/model/StructureChartDataRow.js +127 -0
- package/dist/collection/components/bn-chart-structure/utils/model/index.js +45 -0
- package/dist/collection/components/bn-chart-structure/utils/model/styles/ScaleFactorsStructureChart.js +99 -0
- package/dist/collection/components/bn-chart-structure/utils/model/styles/StructureChartStyle.js +58 -0
- package/dist/collection/components/bn-chart-time/bn-chart-time.css +17 -0
- package/dist/collection/components/bn-chart-time/bn-chart-time.js +1510 -0
- package/dist/collection/components/bn-chart-time/ibcs-chart-time.css +96 -0
- package/dist/collection/components/bn-chart-time/ibcs-chart-time.js +829 -0
- package/dist/collection/components/bn-chart-time/utils/TimeChart.js +1388 -0
- package/dist/collection/components/bn-chart-time/utils/elements/AreaFill.js +83 -0
- package/dist/collection/components/bn-chart-time/utils/elements/Axis.js +42 -0
- package/dist/collection/components/bn-chart-time/utils/elements/Column.js +266 -0
- package/dist/collection/components/bn-chart-time/utils/elements/Label.js +174 -0
- package/dist/collection/components/bn-chart-time/utils/elements/Line.js +150 -0
- package/dist/collection/components/bn-chart-time/utils/elements/LineSeries.js +267 -0
- package/dist/collection/components/bn-chart-time/utils/elements/Marker.js +121 -0
- package/dist/collection/components/bn-chart-time/utils/elements/Needle.js +148 -0
- package/dist/collection/components/bn-chart-time/utils/elements/StackedColumn.js +107 -0
- package/dist/collection/components/bn-chart-time/utils/elements/index.js +8 -0
- package/dist/collection/components/bn-chart-time/utils/factories/ScenarioFactory.js +146 -0
- package/dist/collection/components/bn-chart-time/utils/factories/index.js +1 -0
- package/dist/collection/components/bn-chart-time/utils/helper/CustomPattern.js +46 -0
- package/dist/collection/components/bn-chart-time/utils/helper/ElementPositions.js +178 -0
- package/dist/collection/components/bn-chart-time/utils/helper/LabelCollisionManager.js +199 -0
- package/dist/collection/components/bn-chart-time/utils/helper/MarkerPattern.js +84 -0
- package/dist/collection/components/bn-chart-time/utils/helper/Padding.js +13 -0
- package/dist/collection/components/bn-chart-time/utils/helper/index.js +5 -0
- package/dist/collection/components/bn-chart-time/utils/model/DataPoint.js +93 -0
- package/dist/collection/components/bn-chart-time/utils/model/OverflowConfig.js +1 -0
- package/dist/collection/components/bn-chart-time/utils/model/TimeChartComponentConfig.js +150 -0
- package/dist/collection/components/bn-chart-time/utils/model/TimeChartDataRow.js +146 -0
- package/dist/collection/components/bn-chart-time/utils/model/index.js +45 -0
- package/dist/collection/components/bn-chart-time/utils/model/styles/ScaleFactorsTimeChart.js +99 -0
- package/dist/collection/components/bn-chart-time/utils/model/styles/TimeChartStyle.js +54 -0
- package/dist/collection/components/bn-component-style/bn-component-style.css +3 -0
- package/dist/collection/components/bn-component-style/bn-component-style.js +69 -0
- package/dist/collection/components/bn-context/bn-context.css +3 -0
- package/dist/collection/components/bn-context/bn-context.js +96 -0
- package/dist/collection/components/bn-dataset/bn-dataset.css +3 -0
- package/dist/collection/components/bn-dataset/bn-dataset.js +159 -0
- package/dist/collection/components/bn-datasource/bn-datasource.css +3 -0
- package/dist/collection/components/bn-datasource/bn-datasource.js +70 -0
- 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-footer/bn-footer.css +40 -0
- package/dist/collection/components/bn-footer/bn-footer.js +146 -0
- package/dist/collection/components/bn-grid/bn-grid.css +37 -0
- package/dist/collection/components/bn-grid/bn-grid.js +467 -0
- package/dist/collection/components/bn-grid/utils/GridConfig.js +114 -0
- package/dist/collection/components/bn-image/bn-image.css +10 -0
- package/dist/collection/components/bn-image/bn-image.js +78 -0
- package/dist/collection/components/bn-internationalization/bn-internationalization.css +3 -0
- package/dist/collection/components/bn-internationalization/bn-internationalization.js +84 -0
- package/dist/collection/components/bn-layout-card/bn-layout-card.css +25 -0
- package/dist/collection/components/bn-layout-card/bn-layout-card.js +534 -0
- package/dist/collection/components/bn-layout-page/bn-layout-page.css +10 -0
- package/dist/collection/components/bn-layout-page/bn-layout-page.js +624 -0
- package/dist/collection/components/bn-map/bn-map.css +4 -0
- package/dist/collection/components/bn-map/bn-map.js +725 -0
- package/dist/collection/components/bn-map/ibcs-map/assets/gpx/Chasing_Legends.gpx +195076 -0
- package/dist/collection/components/bn-map/ibcs-map/assets/gpx/Fahrt_am_Nachmittag.gpx +142007 -0
- package/dist/collection/components/bn-map/ibcs-map/assets/icons/gpx-finish.png +0 -0
- package/dist/collection/components/bn-map/ibcs-map/assets/icons/gpx-shadow.png +0 -0
- package/dist/collection/components/bn-map/ibcs-map/assets/icons/gpx-start.png +0 -0
- package/dist/collection/components/bn-map/ibcs-map/assets/icons/marker-example.png +0 -0
- package/dist/collection/components/bn-map/ibcs-map/assets/icons/pin-icon-end.png +0 -0
- package/dist/collection/components/bn-map/ibcs-map/assets/icons/pin-icon-start.png +0 -0
- package/dist/collection/components/bn-map/ibcs-map/assets/icons/pin-icon-wpt.png +0 -0
- package/dist/collection/components/bn-map/ibcs-map/assets/icons/pin-shadow.png +0 -0
- package/dist/collection/components/bn-map/ibcs-map/assets/icons/pin.png +0 -0
- package/dist/collection/components/bn-map/ibcs-map/ibcs-map.css +674 -0
- package/dist/collection/components/bn-map/ibcs-map/ibcs-map.js +744 -0
- package/dist/collection/components/bn-map/ibcs-map/utils/model/GeoJsonLayer.js +9 -0
- package/dist/collection/components/bn-map/ibcs-map/utils/model/GpxLayer.js +13 -0
- package/dist/collection/components/bn-map/ibcs-map/utils/model/Marker.js +11 -0
- package/dist/collection/components/bn-map/ibcs-map/utils/model/index.js +2 -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-message/bn-message.css +31 -0
- package/dist/collection/components/bn-message/bn-message.js +96 -0
- package/dist/collection/components/bn-page/bn-page.css +252 -0
- package/dist/collection/components/bn-page/bn-page.js +118 -0
- package/dist/collection/components/bn-table/bn-table.css +5 -0
- package/dist/collection/components/bn-table/bn-table.js +1475 -0
- package/dist/collection/components/bn-table/ibcs-table.css +322 -0
- package/dist/collection/components/bn-table/ibcs-table.js +757 -0
- package/dist/collection/components/bn-table/utils/Table.js +182 -0
- package/dist/collection/components/bn-table/utils/elements/Cell.js +66 -0
- package/dist/collection/components/bn-table/utils/elements/CellBarChart.js +251 -0
- package/dist/collection/components/bn-table/utils/elements/TableRow.js +88 -0
- package/dist/collection/components/bn-table/utils/elements/index.js +3 -0
- package/dist/collection/components/bn-table/utils/factories/tableDataSetFactory.js +380 -0
- package/dist/collection/components/bn-table/utils/helper/ColumnStatistics.js +62 -0
- package/dist/collection/components/bn-table/utils/helper/DataQuery.js +750 -0
- package/dist/collection/components/bn-table/utils/helper/QueryGroup.js +38 -0
- package/dist/collection/components/bn-table/utils/helper/index.js +1 -0
- package/dist/collection/components/bn-table/utils/model/TableComponentConfig.js +136 -0
- package/dist/collection/components/bn-table/utils/model/TableDataRow.js +134 -0
- package/dist/collection/components/bn-table/utils/model/TableDrillGroup.js +42 -0
- package/dist/collection/components/bn-table/utils/model/index.js +63 -0
- package/dist/collection/components/bn-template/bn-template.js +38 -0
- package/dist/collection/components/bn-text/bn-text.css +14 -0
- package/dist/collection/components/bn-text/bn-text.js +343 -0
- package/dist/collection/components/bn-title/bn-title.css +11 -0
- package/dist/collection/components/bn-title/bn-title.js +541 -0
- package/dist/collection/components/bn-title/ibcs-title/ibcs-title.css +15 -0
- package/dist/collection/components/bn-title/ibcs-title/ibcs-title.js +321 -0
- package/dist/collection/components/bn-title/ibcs-title/utils/Title.js +91 -0
- package/dist/collection/components/bn-title/ibcs-title/utils/factories/TitleDataSetFactory.js +86 -0
- package/dist/collection/components/bn-title/ibcs-title/utils/factories/index.js +1 -0
- package/dist/collection/components/bn-title/ibcs-title/utils/model/MeasureEntriy.js +25 -0
- package/dist/collection/components/bn-title/ibcs-title/utils/model/TimePeriod.js +33 -0
- package/dist/collection/components/bn-title/ibcs-title/utils/model/TitleConfig.js +48 -0
- package/dist/collection/components/bn-title/ibcs-title/utils/model/index.js +6 -0
- package/dist/collection/components/bn-tree/bn-tree.css +40 -0
- package/dist/collection/components/bn-tree/bn-tree.js +520 -0
- package/dist/collection/components/bn-tree/utils/EdgeRenderer.js +196 -0
- package/dist/collection/components/bn-tree/utils/TreeLayout.js +225 -0
- package/dist/collection/components/bn-tree/utils/TreeParser.js +180 -0
- package/dist/collection/components/editor-companion/editor-companion.css +3 -0
- package/dist/collection/components/editor-companion/editor-companion.js +130 -0
- package/dist/collection/context/context-protocol.js +84 -0
- package/dist/collection/declarations.js +1 -0
- package/dist/collection/index.js +2 -0
- package/dist/collection/stores/assets.js +12 -0
- package/dist/collection/stores/componentStyles.js +106 -0
- package/dist/collection/stores/context.js +1 -0
- package/dist/collection/stores/createScopedStores.js +31 -0
- package/dist/collection/stores/datasets.js +14 -0
- package/dist/collection/stores/datasetsMeta.js +14 -0
- package/dist/collection/stores/datasources.js +14 -0
- package/dist/collection/stores/internationalization.js +128 -0
- package/dist/collection/test-runner/test-runner-card.js +36 -0
- package/dist/collection/test-runner/test-runner-chart-time.js +234 -0
- package/dist/collection/test-runner/test-runner-chart.js +364 -0
- package/dist/collection/test-runner/test-runner-map.js +1901 -0
- package/dist/collection/test-runner/test-runner-table.js +469 -0
- package/dist/collection/test-runner/test-runner-time.js +399 -0
- package/dist/collection/test-runner/test-runner-title.js +108 -0
- package/dist/collection/utils/DataUriUtil.js +19 -0
- package/dist/collection/utils/DateStringFactory.js +448 -0
- package/dist/collection/utils/componentRegister.js +70 -0
- package/dist/collection/utils/constants.js +156 -0
- package/dist/collection/utils/dataAnalyzer.js +103 -0
- package/dist/collection/utils/datasetMetaCalculator.js +137 -0
- package/dist/collection/utils/flattenObject.js +28 -0
- package/dist/collection/utils/formatter.js +86 -0
- package/dist/collection/utils/helper/AdapterUtils.js +24 -0
- package/dist/collection/utils/helper/CompareUtil.js +42 -0
- package/dist/collection/utils/helper/IAdapter.js +1 -0
- package/dist/collection/utils/helper/StringAdapter.js +9 -0
- package/dist/collection/utils/ibcsRuleSet.js +120 -0
- package/dist/collection/utils/index.js +2 -0
- package/dist/collection/utils/model/ChartStyles.js +1 -0
- package/dist/collection/utils/model/DataFormatDigits.js +23 -0
- package/dist/collection/utils/model/DataQueryResultRow.js +1 -0
- package/dist/collection/utils/model/DatasetMeta.js +1 -0
- package/dist/collection/utils/model/DateFormat.js +1 -0
- package/dist/collection/utils/model/Order.js +56 -0
- package/dist/collection/utils/model/SiPrefix.js +23 -0
- package/dist/collection/utils/model/TextStyles.js +1 -0
- package/dist/collection/utils/model/VarianceScenario.js +33 -0
- package/dist/collection/utils/model/index.js +38 -0
- package/dist/collection/utils/model/styles/FontStyle.js +34 -0
- package/dist/collection/utils/model/styles/Padding.js +30 -0
- package/dist/collection/utils/model/styles/SVGStyle.js +47 -0
- package/dist/collection/utils/model/styles/SVGStyleGroup.js +48 -0
- package/dist/collection/utils/model/styles/SVGVariancesStyleGroup.js +45 -0
- package/dist/collection/utils/parentDimensions.js +44 -0
- package/dist/collection/utils/scaling.js +17 -0
- package/dist/collection/utils/stackColors.js +31 -0
- package/dist/collection/utils/styled/attributes.js +110 -0
- package/dist/collection/utils/styled/style-sheet.js +21 -0
- package/dist/collection/utils/styled/withStyled.js +71 -0
- package/dist/collection/utils/templateId.js +12 -0
- package/dist/collection/utils/utils.js +83 -0
- package/dist/collection/utils/validate.js +372 -0
- package/dist/collection/utils/withBodyObserver.js +35 -0
- package/dist/collection/utils/withComponentStatus.js +35 -0
- package/dist/collection/utils/withComponentStyle.js +74 -0
- package/dist/collection/utils/withDataset.js +142 -0
- package/dist/collection/utils/withDatasource.js +59 -0
- package/dist/collection/utils/withHasError.js +56 -0
- package/dist/collection/utils/withTranslation.js +73 -0
- package/dist/components/DataFormatDigits.js +1 -0
- package/dist/components/DateStringFactory.js +1 -0
- package/dist/components/Order.js +1 -0
- package/dist/components/SVGVariancesStyleGroup.js +1 -0
- package/dist/components/_commonjsHelpers.js +1 -0
- package/dist/components/alasql.min.js +1 -0
- package/dist/components/bn-asset.d.ts +11 -0
- package/dist/components/bn-asset.js +1 -0
- package/dist/components/bn-body.d.ts +11 -0
- package/dist/components/bn-body.js +1 -0
- package/dist/components/bn-body2.js +1 -0
- package/dist/components/bn-card.d.ts +11 -0
- package/dist/components/bn-card.js +1 -0
- package/dist/components/bn-card2.js +1 -0
- package/dist/components/bn-chart-structure.d.ts +11 -0
- package/dist/components/bn-chart-structure.js +1 -0
- package/dist/components/bn-chart-time.d.ts +11 -0
- package/dist/components/bn-chart-time.js +1 -0
- package/dist/components/bn-component-style.d.ts +11 -0
- package/dist/components/bn-component-style.js +1 -0
- package/dist/components/bn-context.d.ts +11 -0
- package/dist/components/bn-context.js +1 -0
- package/dist/components/bn-dataset.d.ts +11 -0
- package/dist/components/bn-dataset.js +1 -0
- package/dist/components/bn-datasource.d.ts +11 -0
- package/dist/components/bn-datasource.js +1 -0
- package/dist/components/bn-footer.d.ts +11 -0
- package/dist/components/bn-footer.js +1 -0
- package/dist/components/bn-footer2.js +1 -0
- package/dist/components/bn-grid.d.ts +11 -0
- package/dist/components/bn-grid.js +1 -0
- package/dist/components/bn-image.d.ts +11 -0
- package/dist/components/bn-image.js +1 -0
- package/dist/components/bn-internationalization.d.ts +11 -0
- package/dist/components/bn-internationalization.js +1 -0
- package/dist/components/bn-layout-card.d.ts +11 -0
- package/dist/components/bn-layout-card.js +1 -0
- package/dist/components/bn-layout-page.d.ts +11 -0
- package/dist/components/bn-layout-page.js +1 -0
- package/dist/components/bn-map.d.ts +11 -0
- package/dist/components/bn-map.js +1 -0
- package/dist/components/bn-message.d.ts +11 -0
- package/dist/components/bn-message.js +1 -0
- package/dist/components/bn-message2.js +1 -0
- package/dist/components/bn-page.d.ts +11 -0
- package/dist/components/bn-page.js +1 -0
- package/dist/components/bn-page2.js +1 -0
- package/dist/components/bn-table.d.ts +11 -0
- package/dist/components/bn-table.js +1 -0
- package/dist/components/bn-template.d.ts +11 -0
- package/dist/components/bn-template.js +1 -0
- package/dist/components/bn-text.d.ts +11 -0
- package/dist/components/bn-text.js +1 -0
- package/dist/components/bn-title.d.ts +11 -0
- package/dist/components/bn-title.js +1 -0
- package/dist/components/bn-title2.js +1 -0
- package/dist/components/bn-tree.d.ts +11 -0
- package/dist/components/bn-tree.js +1 -0
- package/dist/components/componentRegister.js +1 -0
- package/dist/components/context-protocol.js +1 -0
- package/dist/components/editor-companion.d.ts +11 -0
- package/dist/components/editor-companion.js +1 -0
- package/dist/components/ibcs-chart-structure.d.ts +11 -0
- package/dist/components/ibcs-chart-structure.js +1 -0
- package/dist/components/ibcs-chart-structure2.js +1 -0
- package/dist/components/ibcs-chart-time.d.ts +11 -0
- package/dist/components/ibcs-chart-time.js +1 -0
- package/dist/components/ibcs-chart-time2.js +1 -0
- package/dist/components/ibcs-map.d.ts +11 -0
- package/dist/components/ibcs-map.js +1 -0
- package/dist/components/ibcs-map2.js +1 -0
- package/dist/components/ibcs-table.d.ts +11 -0
- package/dist/components/ibcs-table.js +1 -0
- package/dist/components/ibcs-table2.js +1 -0
- package/dist/components/ibcs-title.d.ts +11 -0
- package/dist/components/ibcs-title.js +1 -0
- package/dist/components/ibcs-title2.js +1 -0
- package/dist/components/ibcsRuleSet.js +1 -0
- package/dist/components/index.d.ts +35 -0
- package/dist/components/index.js +1 -0
- package/dist/components/scaling.js +1 -0
- package/dist/components/test-runner-card.d.ts +11 -0
- package/dist/components/test-runner-card.js +1 -0
- package/dist/components/test-runner-chart-time.d.ts +11 -0
- package/dist/components/test-runner-chart-time.js +1 -0
- package/dist/components/test-runner-chart.d.ts +11 -0
- package/dist/components/test-runner-chart.js +1 -0
- package/dist/components/test-runner-map.d.ts +11 -0
- package/dist/components/test-runner-map.js +1 -0
- package/dist/components/test-runner-table.d.ts +11 -0
- package/dist/components/test-runner-table.js +1 -0
- package/dist/components/test-runner-time.d.ts +11 -0
- package/dist/components/test-runner-time.js +1 -0
- package/dist/components/test-runner-title.d.ts +11 -0
- package/dist/components/test-runner-title.js +1 -0
- package/dist/components/utils.js +1 -0
- package/dist/components/validate.js +1 -0
- package/dist/components/withBodyObserver.js +1 -0
- package/dist/components/withComponentStyle.js +1 -0
- package/dist/components/withDataset.js +1 -0
- package/dist/components/withHasError.js +1 -0
- package/dist/components/withStyled.js +1 -0
- package/dist/components/withTranslation.js +1 -0
- package/dist/esm/DataFormatDigits-Dt6gpIiZ.js +137 -0
- package/dist/esm/DateStringFactory-_Qiv0IvF.js +451 -0
- package/dist/esm/Order-B4fpLe_f.js +125 -0
- package/dist/esm/SVGVariancesStyleGroup-DlWgvpzs.js +7961 -0
- package/dist/esm/StringAdapter-BLvo1Krl.js +133 -0
- package/dist/esm/_commonjsHelpers-BFTU3MAI.js +7 -0
- package/dist/esm/alasql.min-CWu4NkIt.js +304 -0
- package/dist/esm/app-globals-DQuL1Twl.js +3 -0
- package/dist/esm/bn-asset.entry.js +40 -0
- package/dist/esm/bn-body_3.entry.js +409 -0
- package/dist/esm/bn-card.entry.js +35 -0
- package/dist/esm/bn-chart-structure.entry.js +703 -0
- package/dist/esm/bn-chart-time.entry.js +985 -0
- package/dist/esm/bn-component-style.entry.js +42 -0
- package/dist/esm/bn-context_5.entry.js +3374 -0
- package/dist/esm/bn-dataset.entry.js +276 -0
- package/dist/esm/bn-grid.entry.js +405 -0
- package/dist/esm/bn-image.entry.js +55 -0
- package/dist/esm/bn-internationalization.entry.js +38 -0
- package/dist/esm/bn-layout-card.entry.js +126 -0
- package/dist/esm/bn-layout-page.entry.js +140 -0
- package/dist/esm/bn-map.entry.js +423 -0
- package/dist/esm/bn-message.entry.js +50 -0
- package/dist/esm/bn-template-engine.js +48 -0
- package/dist/esm/bn-template.entry.js +18 -0
- package/dist/esm/bn-text.entry.js +284 -0
- package/dist/esm/bn-tree.entry.js +967 -0
- package/dist/esm/componentRegister-BtVfu16B.js +72 -0
- package/dist/esm/constants-kMyLevYy.js +158 -0
- package/dist/esm/context-protocol-DzeqZxg6.js +654 -0
- package/dist/esm/editor-companion.entry.js +47 -0
- package/dist/esm/formatter-DTMEZ6d8.js +211 -0
- package/dist/esm/ibcs-chart-structure.entry.js +2904 -0
- package/dist/esm/ibcs-chart-time.entry.js +4138 -0
- package/dist/esm/ibcs-map.entry.js +1073 -0
- package/dist/esm/ibcs-title.entry.js +350 -0
- package/dist/esm/index-B27Ax6P_.js +4635 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/loader.js +11 -0
- package/dist/esm/luxon-DbyXf6dF.js +8130 -0
- package/dist/esm/scaling-BBd0ZVLL.js +64 -0
- package/dist/esm/test-runner-card.entry.js +25 -0
- package/dist/esm/test-runner-chart-time.entry.js +228 -0
- package/dist/esm/test-runner-chart.entry.js +324 -0
- package/dist/esm/test-runner-map.entry.js +1860 -0
- package/dist/esm/test-runner-table.entry.js +475 -0
- package/dist/esm/test-runner-time.entry.js +379 -0
- package/dist/esm/test-runner-title.entry.js +113 -0
- package/dist/esm/withBodyObserver-gZpZiEIK.js +37 -0
- package/dist/esm/withComponentStatus-elELReKt.js +37 -0
- package/dist/esm/withComponentStyle-NaxfakAG.js +126 -0
- package/dist/esm/withDataset-BT2VQCsG.js +144 -0
- package/dist/esm/withHasError-C48fTE2k.js +150 -0
- package/dist/esm/withStyled-CpUTv74m.js +539 -0
- package/dist/esm/withTranslation-Do4GhleK.js +75 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/types/components/bn-asset/bn-asset.d.ts +11 -0
- package/dist/types/components/bn-body/bn-body.d.ts +8 -0
- package/dist/types/components/bn-card/bn-card.d.ts +8 -0
- package/dist/types/components/bn-chart-structure/bn-chart-structure.d.ts +234 -0
- package/dist/types/components/bn-chart-structure/ibcs-chart-structure.d.ts +47 -0
- package/dist/types/components/bn-chart-structure/utils/StructureChart.d.ts +137 -0
- package/dist/types/components/bn-chart-structure/utils/elements/Axis.d.ts +29 -0
- package/dist/types/components/bn-chart-structure/utils/elements/Bar.d.ts +58 -0
- package/dist/types/components/bn-chart-structure/utils/elements/Label.d.ts +47 -0
- package/dist/types/components/bn-chart-structure/utils/elements/Marker.d.ts +33 -0
- package/dist/types/components/bn-chart-structure/utils/elements/Needle.d.ts +37 -0
- package/dist/types/components/bn-chart-structure/utils/elements/StackedBar.d.ts +25 -0
- package/dist/types/components/bn-chart-structure/utils/elements/index.d.ts +6 -0
- package/dist/types/components/bn-chart-structure/utils/factories/ScenarioFactory.d.ts +46 -0
- package/dist/types/components/bn-chart-structure/utils/factories/index.d.ts +1 -0
- package/dist/types/components/bn-chart-structure/utils/helper/CustomPattern.d.ts +20 -0
- package/dist/types/components/bn-chart-structure/utils/helper/ElementPositions.d.ts +60 -0
- package/dist/types/components/bn-chart-structure/utils/helper/MarkerPattern.d.ts +28 -0
- package/dist/types/components/bn-chart-structure/utils/helper/Padding.d.ts +14 -0
- package/dist/types/components/bn-chart-structure/utils/helper/index.d.ts +13 -0
- package/dist/types/components/bn-chart-structure/utils/model/DataPoint.d.ts +44 -0
- package/dist/types/components/bn-chart-structure/utils/model/OverflowConfig.d.ts +7 -0
- package/dist/types/components/bn-chart-structure/utils/model/StructureChartComponentConfig.d.ts +60 -0
- package/dist/types/components/bn-chart-structure/utils/model/StructureChartDataRow.d.ts +61 -0
- package/dist/types/components/bn-chart-structure/utils/model/index.d.ts +108 -0
- package/dist/types/components/bn-chart-structure/utils/model/styles/ScaleFactorsStructureChart.d.ts +46 -0
- package/dist/types/components/bn-chart-structure/utils/model/styles/StructureChartStyle.d.ts +29 -0
- package/dist/types/components/bn-chart-time/bn-chart-time.d.ts +325 -0
- package/dist/types/components/bn-chart-time/ibcs-chart-time.d.ts +59 -0
- package/dist/types/components/bn-chart-time/utils/TimeChart.d.ts +154 -0
- package/dist/types/components/bn-chart-time/utils/elements/AreaFill.d.ts +23 -0
- package/dist/types/components/bn-chart-time/utils/elements/Axis.d.ts +28 -0
- package/dist/types/components/bn-chart-time/utils/elements/Column.d.ts +68 -0
- package/dist/types/components/bn-chart-time/utils/elements/Label.d.ts +55 -0
- package/dist/types/components/bn-chart-time/utils/elements/Line.d.ts +48 -0
- package/dist/types/components/bn-chart-time/utils/elements/LineSeries.d.ts +74 -0
- package/dist/types/components/bn-chart-time/utils/elements/Marker.d.ts +37 -0
- package/dist/types/components/bn-chart-time/utils/elements/Needle.d.ts +41 -0
- package/dist/types/components/bn-chart-time/utils/elements/StackedColumn.d.ts +40 -0
- package/dist/types/components/bn-chart-time/utils/elements/index.d.ts +8 -0
- package/dist/types/components/bn-chart-time/utils/factories/ScenarioFactory.d.ts +65 -0
- package/dist/types/components/bn-chart-time/utils/factories/index.d.ts +1 -0
- package/dist/types/components/bn-chart-time/utils/helper/CustomPattern.d.ts +22 -0
- package/dist/types/components/bn-chart-time/utils/helper/ElementPositions.d.ts +60 -0
- package/dist/types/components/bn-chart-time/utils/helper/LabelCollisionManager.d.ts +101 -0
- package/dist/types/components/bn-chart-time/utils/helper/MarkerPattern.d.ts +42 -0
- package/dist/types/components/bn-chart-time/utils/helper/Padding.d.ts +14 -0
- package/dist/types/components/bn-chart-time/utils/helper/index.d.ts +5 -0
- package/dist/types/components/bn-chart-time/utils/model/DataPoint.d.ts +44 -0
- package/dist/types/components/bn-chart-time/utils/model/OverflowConfig.d.ts +7 -0
- package/dist/types/components/bn-chart-time/utils/model/TimeChartComponentConfig.d.ts +73 -0
- package/dist/types/components/bn-chart-time/utils/model/TimeChartDataRow.d.ts +62 -0
- package/dist/types/components/bn-chart-time/utils/model/index.d.ts +109 -0
- package/dist/types/components/bn-chart-time/utils/model/styles/ScaleFactorsTimeChart.d.ts +46 -0
- package/dist/types/components/bn-chart-time/utils/model/styles/TimeChartStyle.d.ts +29 -0
- package/dist/types/components/bn-component-style/bn-component-style.d.ts +8 -0
- package/dist/types/components/bn-context/bn-context.d.ts +19 -0
- package/dist/types/components/bn-dataset/bn-dataset.d.ts +38 -0
- package/dist/types/components/bn-datasource/bn-datasource.d.ts +18 -0
- package/dist/types/components/bn-footer/bn-footer.d.ts +29 -0
- package/dist/types/components/bn-grid/bn-grid.d.ts +70 -0
- package/dist/types/components/bn-grid/utils/GridConfig.d.ts +47 -0
- package/dist/types/components/bn-image/bn-image.d.ts +22 -0
- package/dist/types/components/bn-internationalization/bn-internationalization.d.ts +9 -0
- package/dist/types/components/bn-layout-card/bn-layout-card.d.ts +38 -0
- package/dist/types/components/bn-layout-page/bn-layout-page.d.ts +40 -0
- package/dist/types/components/bn-map/bn-map.d.ts +122 -0
- package/dist/types/components/bn-map/ibcs-map/ibcs-map.d.ts +73 -0
- package/dist/types/components/bn-map/ibcs-map/utils/model/GeoJsonLayer.d.ts +8 -0
- package/dist/types/components/bn-map/ibcs-map/utils/model/GpxLayer.d.ts +11 -0
- package/dist/types/components/bn-map/ibcs-map/utils/model/Marker.d.ts +9 -0
- package/dist/types/components/bn-map/ibcs-map/utils/model/index.d.ts +2 -0
- package/dist/types/components/bn-message/bn-message.d.ts +27 -0
- package/dist/types/components/bn-page/bn-page.d.ts +29 -0
- package/dist/types/components/bn-table/bn-table.d.ts +373 -0
- package/dist/types/components/bn-table/ibcs-table.d.ts +59 -0
- package/dist/types/components/bn-table/utils/Table.d.ts +61 -0
- package/dist/types/components/bn-table/utils/elements/Cell.d.ts +36 -0
- package/dist/types/components/bn-table/utils/elements/CellBarChart.d.ts +45 -0
- package/dist/types/components/bn-table/utils/elements/TableRow.d.ts +30 -0
- package/dist/types/components/bn-table/utils/elements/index.d.ts +3 -0
- package/dist/types/components/bn-table/utils/factories/tableDataSetFactory.d.ts +114 -0
- package/dist/types/components/bn-table/utils/helper/ColumnStatistics.d.ts +21 -0
- package/dist/types/components/bn-table/utils/helper/DataQuery.d.ts +139 -0
- package/dist/types/components/bn-table/utils/helper/QueryGroup.d.ts +19 -0
- package/dist/types/components/bn-table/utils/helper/index.d.ts +1 -0
- package/dist/types/components/bn-table/utils/model/TableComponentConfig.d.ts +72 -0
- package/dist/types/components/bn-table/utils/model/TableDataRow.d.ts +70 -0
- package/dist/types/components/bn-table/utils/model/TableDrillGroup.d.ts +22 -0
- package/dist/types/components/bn-table/utils/model/index.d.ts +130 -0
- package/dist/types/components/bn-template/bn-template.d.ts +10 -0
- package/dist/types/components/bn-text/bn-text.d.ts +63 -0
- package/dist/types/components/bn-title/bn-title.d.ts +128 -0
- package/dist/types/components/bn-title/ibcs-title/ibcs-title.d.ts +23 -0
- package/dist/types/components/bn-title/ibcs-title/utils/Title.d.ts +28 -0
- package/dist/types/components/bn-title/ibcs-title/utils/factories/TitleDataSetFactory.d.ts +26 -0
- package/dist/types/components/bn-title/ibcs-title/utils/factories/index.d.ts +1 -0
- package/dist/types/components/bn-title/ibcs-title/utils/model/MeasureEntriy.d.ts +11 -0
- package/dist/types/components/bn-title/ibcs-title/utils/model/TimePeriod.d.ts +15 -0
- package/dist/types/components/bn-title/ibcs-title/utils/model/TitleConfig.d.ts +25 -0
- package/dist/types/components/bn-title/ibcs-title/utils/model/index.d.ts +35 -0
- package/dist/types/components/bn-tree/bn-tree.d.ts +84 -0
- package/dist/types/components/bn-tree/utils/EdgeRenderer.d.ts +57 -0
- package/dist/types/components/bn-tree/utils/TreeLayout.d.ts +37 -0
- package/dist/types/components/bn-tree/utils/TreeParser.d.ts +42 -0
- package/dist/types/components/editor-companion/editor-companion.d.ts +18 -0
- package/dist/types/components.d.ts +3311 -0
- package/dist/types/context/context-protocol.d.ts +53 -0
- package/dist/types/declarations.d.ts +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/stencil-public-runtime.d.ts +1860 -0
- package/dist/types/stores/assets.d.ts +12 -0
- package/dist/types/stores/componentStyles.d.ts +82 -0
- package/dist/types/stores/context.d.ts +12 -0
- package/dist/types/stores/createScopedStores.d.ts +12 -0
- package/dist/types/stores/datasets.d.ts +14 -0
- package/dist/types/stores/datasetsMeta.d.ts +14 -0
- package/dist/types/stores/datasources.d.ts +14 -0
- package/dist/types/stores/internationalization.d.ts +9 -0
- package/dist/types/test-runner/test-runner-card.d.ts +3 -0
- package/dist/types/test-runner/test-runner-chart-time.d.ts +3 -0
- package/dist/types/test-runner/test-runner-chart.d.ts +3 -0
- package/dist/types/test-runner/test-runner-map.d.ts +3 -0
- package/dist/types/test-runner/test-runner-table.d.ts +3 -0
- package/dist/types/test-runner/test-runner-time.d.ts +3 -0
- package/dist/types/test-runner/test-runner-title.d.ts +3 -0
- package/dist/types/utils/DataUriUtil.d.ts +5 -0
- package/dist/types/utils/DateStringFactory.d.ts +123 -0
- package/dist/types/utils/componentRegister.d.ts +38 -0
- package/dist/types/utils/constants.d.ts +142 -0
- package/dist/types/utils/dataAnalyzer.d.ts +56 -0
- package/dist/types/utils/datasetMetaCalculator.d.ts +16 -0
- package/dist/types/utils/flattenObject.d.ts +13 -0
- package/dist/types/utils/formatter.d.ts +34 -0
- package/dist/types/utils/helper/AdapterUtils.d.ts +11 -0
- package/dist/types/utils/helper/CompareUtil.d.ts +26 -0
- package/dist/types/utils/helper/IAdapter.d.ts +16 -0
- package/dist/types/utils/helper/StringAdapter.d.ts +5 -0
- package/dist/types/utils/ibcsRuleSet.d.ts +47 -0
- package/dist/types/utils/index.d.ts +2 -0
- package/dist/types/utils/model/ChartStyles.d.ts +58 -0
- package/dist/types/utils/model/DataFormatDigits.d.ts +11 -0
- package/dist/types/utils/model/DataQueryResultRow.d.ts +29 -0
- package/dist/types/utils/model/DatasetMeta.d.ts +43 -0
- package/dist/types/utils/model/DateFormat.d.ts +38 -0
- package/dist/types/utils/model/Order.d.ts +46 -0
- package/dist/types/utils/model/SiPrefix.d.ts +11 -0
- package/dist/types/utils/model/TextStyles.d.ts +10 -0
- package/dist/types/utils/model/VarianceScenario.d.ts +20 -0
- package/dist/types/utils/model/index.d.ts +37 -0
- package/dist/types/utils/model/styles/FontStyle.d.ts +13 -0
- package/dist/types/utils/model/styles/Padding.d.ts +11 -0
- package/dist/types/utils/model/styles/SVGStyle.d.ts +20 -0
- package/dist/types/utils/model/styles/SVGStyleGroup.d.ts +16 -0
- package/dist/types/utils/model/styles/SVGVariancesStyleGroup.d.ts +16 -0
- package/dist/types/utils/parentDimensions.d.ts +13 -0
- package/dist/types/utils/scaling.d.ts +22 -0
- package/dist/types/utils/stackColors.d.ts +20 -0
- package/dist/types/utils/styled/attributes.d.ts +6 -0
- package/dist/types/utils/styled/style-sheet.d.ts +10 -0
- package/dist/types/utils/styled/withStyled.d.ts +12 -0
- package/dist/types/utils/templateId.d.ts +9 -0
- package/dist/types/utils/utils.d.ts +36 -0
- package/dist/types/utils/validate.d.ts +55 -0
- package/dist/types/utils/withBodyObserver.d.ts +14 -0
- package/dist/types/utils/withComponentStatus.d.ts +15 -0
- package/dist/types/utils/withComponentStyle.d.ts +20 -0
- package/dist/types/utils/withDataset.d.ts +18 -0
- package/dist/types/utils/withDatasource.d.ts +16 -0
- package/dist/types/utils/withHasError.d.ts +35 -0
- package/dist/types/utils/withTranslation.d.ts +24 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/package.json +68 -0
- package/readme.md +164 -0
|
@@ -0,0 +1,969 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-CScBFiS1.js');
|
|
4
|
+
var withStyled = require('./withStyled-Bf-stJTR.js');
|
|
5
|
+
var withComponentStatus = require('./withComponentStatus-BrxL7usr.js');
|
|
6
|
+
var withComponentStyle = require('./withComponentStyle-C6KHnZHt.js');
|
|
7
|
+
var withHasError = require('./withHasError-Dspb3lIV.js');
|
|
8
|
+
require('./constants-DHqQXSSd.js');
|
|
9
|
+
require('./DateStringFactory-Dn0aRj2Y.js');
|
|
10
|
+
require('./luxon-8hyy5YD7.js');
|
|
11
|
+
require('./Order-B4NIqQWe.js');
|
|
12
|
+
require('./componentRegister-C17UFNPh.js');
|
|
13
|
+
require('./context-protocol-BkYHFkXE.js');
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Tree Parser utility for bn-tree component
|
|
17
|
+
* Handles JSON parsing and validation for tree edge configurations
|
|
18
|
+
*/
|
|
19
|
+
const VALID_OPERATORS = ["*", "/", "+", "-", "x", "÷", "none"];
|
|
20
|
+
/**
|
|
21
|
+
* Parse the JSON edges configuration string into a TreeConfig object
|
|
22
|
+
* @param json - JSON string containing array of TreeEdge objects
|
|
23
|
+
* @returns TreeConfig object or null if parsing fails
|
|
24
|
+
*/
|
|
25
|
+
function parseTreeConfig(json) {
|
|
26
|
+
if (!json || json.trim() === "") {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
try {
|
|
30
|
+
const parsed = JSON.parse(json);
|
|
31
|
+
if (!Array.isArray(parsed)) {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
const edges = parsed;
|
|
35
|
+
const adjacencyList = buildAdjacencyList(edges);
|
|
36
|
+
const allNodes = collectAllNodes(edges);
|
|
37
|
+
const rootNode = findRootNode(edges, allNodes);
|
|
38
|
+
return {
|
|
39
|
+
edges,
|
|
40
|
+
adjacencyList,
|
|
41
|
+
rootNode,
|
|
42
|
+
allNodes,
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
catch (e) {
|
|
46
|
+
console.error("parseTreeConfig: failed to parse tree configuration", e);
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Validate the edges JSON configuration and return validation errors
|
|
52
|
+
* @param json - JSON string to validate
|
|
53
|
+
* @returns Array of error messages (empty if valid)
|
|
54
|
+
*/
|
|
55
|
+
function validateEdges(json) {
|
|
56
|
+
const errors = [];
|
|
57
|
+
if (!json || json.trim() === "") {
|
|
58
|
+
errors.push("edges: value is required");
|
|
59
|
+
return errors;
|
|
60
|
+
}
|
|
61
|
+
let parsed;
|
|
62
|
+
try {
|
|
63
|
+
parsed = JSON.parse(json);
|
|
64
|
+
}
|
|
65
|
+
catch (_a) {
|
|
66
|
+
errors.push("edges: invalid JSON structure");
|
|
67
|
+
return errors;
|
|
68
|
+
}
|
|
69
|
+
if (!Array.isArray(parsed)) {
|
|
70
|
+
errors.push("edges: must be an array");
|
|
71
|
+
return errors;
|
|
72
|
+
}
|
|
73
|
+
if (parsed.length === 0) {
|
|
74
|
+
errors.push("edges: array must not be empty");
|
|
75
|
+
return errors;
|
|
76
|
+
}
|
|
77
|
+
const allNodes = new Set();
|
|
78
|
+
const targetNodes = new Set();
|
|
79
|
+
parsed.forEach((edge, index) => {
|
|
80
|
+
if (typeof edge !== "object" || edge === null) {
|
|
81
|
+
errors.push(`edges[${index}]: must be an object`);
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
const typedEdge = edge;
|
|
85
|
+
if (typeof typedEdge.from !== "string" || typedEdge.from.trim() === "") {
|
|
86
|
+
errors.push(`edges[${index}]: 'from' is required and must be a non-empty string`);
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
allNodes.add(typedEdge.from);
|
|
90
|
+
}
|
|
91
|
+
if (typeof typedEdge.to !== "string" || typedEdge.to.trim() === "") {
|
|
92
|
+
errors.push(`edges[${index}]: 'to' is required and must be a non-empty string`);
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
allNodes.add(typedEdge.to);
|
|
96
|
+
targetNodes.add(typedEdge.to);
|
|
97
|
+
}
|
|
98
|
+
if (typedEdge.operator !== undefined) {
|
|
99
|
+
if (typeof typedEdge.operator !== "string" || !VALID_OPERATORS.includes(typedEdge.operator)) {
|
|
100
|
+
errors.push(`edges[${index}]: 'operator' must be one of: ${VALID_OPERATORS.join(", ")}`);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
if (typedEdge.label !== undefined && typeof typedEdge.label !== "string") {
|
|
104
|
+
errors.push(`edges[${index}]: 'label' must be a string`);
|
|
105
|
+
}
|
|
106
|
+
if (typedEdge.style !== undefined) {
|
|
107
|
+
if (typeof typedEdge.style !== "object" || typedEdge.style === null) {
|
|
108
|
+
errors.push(`edges[${index}]: 'style' must be an object`);
|
|
109
|
+
}
|
|
110
|
+
else {
|
|
111
|
+
const style = typedEdge.style;
|
|
112
|
+
if (style.color !== undefined && typeof style.color !== "string") {
|
|
113
|
+
errors.push(`edges[${index}]: 'style.color' must be a string`);
|
|
114
|
+
}
|
|
115
|
+
if (style.width !== undefined && typeof style.width !== "number") {
|
|
116
|
+
errors.push(`edges[${index}]: 'style.width' must be a number`);
|
|
117
|
+
}
|
|
118
|
+
if (style.dasharray !== undefined && typeof style.dasharray !== "string") {
|
|
119
|
+
errors.push(`edges[${index}]: 'style.dasharray' must be a string`);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
// Check for multiple roots (nodes that are not targets of any edge)
|
|
125
|
+
const rootNodes = Array.from(allNodes).filter((node) => !targetNodes.has(node));
|
|
126
|
+
if (rootNodes.length === 0) {
|
|
127
|
+
errors.push("edges: tree has no root node (circular reference detected)");
|
|
128
|
+
}
|
|
129
|
+
else if (rootNodes.length > 1) {
|
|
130
|
+
errors.push(`edges: tree has multiple root nodes: ${rootNodes.join(", ")}`);
|
|
131
|
+
}
|
|
132
|
+
return errors;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Build an adjacency list from edges (parent -> children mapping)
|
|
136
|
+
*/
|
|
137
|
+
function buildAdjacencyList(edges) {
|
|
138
|
+
const adjacencyList = new Map();
|
|
139
|
+
for (const edge of edges) {
|
|
140
|
+
const children = adjacencyList.get(edge.from) || [];
|
|
141
|
+
children.push(edge.to);
|
|
142
|
+
adjacencyList.set(edge.from, children);
|
|
143
|
+
}
|
|
144
|
+
return adjacencyList;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Collect all unique node IDs from edges
|
|
148
|
+
*/
|
|
149
|
+
function collectAllNodes(edges) {
|
|
150
|
+
const nodes = new Set();
|
|
151
|
+
for (const edge of edges) {
|
|
152
|
+
nodes.add(edge.from);
|
|
153
|
+
nodes.add(edge.to);
|
|
154
|
+
}
|
|
155
|
+
return nodes;
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Find the root node (node with no incoming edges)
|
|
159
|
+
*/
|
|
160
|
+
function findRootNode(edges, allNodes) {
|
|
161
|
+
const targetNodes = new Set();
|
|
162
|
+
for (const edge of edges) {
|
|
163
|
+
targetNodes.add(edge.to);
|
|
164
|
+
}
|
|
165
|
+
const rootNodes = Array.from(allNodes).filter((node) => !targetNodes.has(node));
|
|
166
|
+
return rootNodes.length === 1 ? rootNodes[0] : null;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Get the operator symbol to display between sibling nodes
|
|
170
|
+
*/
|
|
171
|
+
function getOperatorSymbol(operator) {
|
|
172
|
+
switch (operator) {
|
|
173
|
+
case "*":
|
|
174
|
+
case "x":
|
|
175
|
+
return "×";
|
|
176
|
+
case "/":
|
|
177
|
+
case "÷":
|
|
178
|
+
return "÷";
|
|
179
|
+
case "+":
|
|
180
|
+
return "+";
|
|
181
|
+
case "-":
|
|
182
|
+
return "−";
|
|
183
|
+
case "none":
|
|
184
|
+
return "";
|
|
185
|
+
default:
|
|
186
|
+
return "";
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Get the edge connecting a parent to a specific child
|
|
191
|
+
*/
|
|
192
|
+
function getEdgeForChild(edges, parent, child) {
|
|
193
|
+
return edges.find((edge) => edge.from === parent && edge.to === child);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* Tree Layout utility for bn-tree component
|
|
198
|
+
* Handles level assignment and grid positioning for tree nodes
|
|
199
|
+
*/
|
|
200
|
+
/**
|
|
201
|
+
* Calculate the layout positions for all nodes in the tree
|
|
202
|
+
*/
|
|
203
|
+
function calculateLayout(config, direction, levelSpacing, nodeSpacing) {
|
|
204
|
+
if (!config.rootNode) {
|
|
205
|
+
return {
|
|
206
|
+
positions: new Map(),
|
|
207
|
+
gridTemplateColumns: "",
|
|
208
|
+
gridTemplateRows: "",
|
|
209
|
+
maxLevel: 0,
|
|
210
|
+
maxIndex: 0,
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
// Step 1: Assign levels using BFS
|
|
214
|
+
const nodeLevels = assignLevels(config);
|
|
215
|
+
// Step 2: Calculate vertical positions (row indices) for each node
|
|
216
|
+
const nodeIndices = calculateNodeIndices(config);
|
|
217
|
+
// Step 3: Calculate grid positions based on direction
|
|
218
|
+
const positions = calculateGridPositions(config, nodeLevels, nodeIndices, direction);
|
|
219
|
+
// Step 4: Generate CSS grid templates
|
|
220
|
+
const maxLevel = Math.max(...Array.from(nodeLevels.values()));
|
|
221
|
+
const maxIndex = Math.max(...Array.from(nodeIndices.values()).map((ni) => ni.endIndex));
|
|
222
|
+
const { gridTemplateColumns, gridTemplateRows } = generateGridTemplates(maxLevel, maxIndex, direction, levelSpacing, nodeSpacing);
|
|
223
|
+
return {
|
|
224
|
+
positions,
|
|
225
|
+
gridTemplateColumns,
|
|
226
|
+
gridTemplateRows,
|
|
227
|
+
maxLevel,
|
|
228
|
+
maxIndex,
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* Assign levels to each node using BFS from root
|
|
233
|
+
*/
|
|
234
|
+
function assignLevels(config) {
|
|
235
|
+
const levels = new Map();
|
|
236
|
+
if (!config.rootNode) {
|
|
237
|
+
return levels;
|
|
238
|
+
}
|
|
239
|
+
const queue = [{ node: config.rootNode, level: 0 }];
|
|
240
|
+
const visited = new Set();
|
|
241
|
+
while (queue.length > 0) {
|
|
242
|
+
const { node, level } = queue.shift();
|
|
243
|
+
if (visited.has(node)) {
|
|
244
|
+
continue;
|
|
245
|
+
}
|
|
246
|
+
visited.add(node);
|
|
247
|
+
levels.set(node, level);
|
|
248
|
+
const children = config.adjacencyList.get(node) || [];
|
|
249
|
+
for (const child of children) {
|
|
250
|
+
if (!visited.has(child)) {
|
|
251
|
+
queue.push({ node: child, level: level + 1 });
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
return levels;
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Calculate vertical indices for nodes, ensuring parent nodes span their children.
|
|
259
|
+
* Handles DAG structures where a node may have multiple parents.
|
|
260
|
+
*/
|
|
261
|
+
function calculateNodeIndices(config) {
|
|
262
|
+
const indices = new Map();
|
|
263
|
+
if (!config.rootNode) {
|
|
264
|
+
return indices;
|
|
265
|
+
}
|
|
266
|
+
// Assign indices using DFS, tracking visited nodes for DAG support
|
|
267
|
+
let currentIndex = 0;
|
|
268
|
+
function assignIndex(node) {
|
|
269
|
+
// If already visited (node has multiple parents), return existing index
|
|
270
|
+
const existing = indices.get(node);
|
|
271
|
+
if (existing) {
|
|
272
|
+
return existing;
|
|
273
|
+
}
|
|
274
|
+
const children = config.adjacencyList.get(node) || [];
|
|
275
|
+
if (children.length === 0) {
|
|
276
|
+
// Leaf node
|
|
277
|
+
const info = { startIndex: currentIndex, endIndex: currentIndex };
|
|
278
|
+
indices.set(node, info);
|
|
279
|
+
currentIndex++;
|
|
280
|
+
return info;
|
|
281
|
+
}
|
|
282
|
+
// Parent node: process children first
|
|
283
|
+
let startIndex = Infinity;
|
|
284
|
+
let endIndex = -Infinity;
|
|
285
|
+
for (const child of children) {
|
|
286
|
+
const childInfo = assignIndex(child);
|
|
287
|
+
startIndex = Math.min(startIndex, childInfo.startIndex);
|
|
288
|
+
endIndex = Math.max(endIndex, childInfo.endIndex);
|
|
289
|
+
}
|
|
290
|
+
const info = { startIndex, endIndex };
|
|
291
|
+
indices.set(node, info);
|
|
292
|
+
return info;
|
|
293
|
+
}
|
|
294
|
+
assignIndex(config.rootNode);
|
|
295
|
+
return indices;
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* Convert levels and indices to CSS grid positions based on direction
|
|
299
|
+
*/
|
|
300
|
+
function calculateGridPositions(config, levels, indices, direction) {
|
|
301
|
+
var _a, _b;
|
|
302
|
+
const positions = new Map();
|
|
303
|
+
const maxLevel = Math.max(...Array.from(levels.values()));
|
|
304
|
+
for (const nodeId of config.allNodes) {
|
|
305
|
+
const level = (_a = levels.get(nodeId)) !== null && _a !== void 0 ? _a : 0;
|
|
306
|
+
const indexInfo = (_b = indices.get(nodeId)) !== null && _b !== void 0 ? _b : { startIndex: 0, endIndex: 0 };
|
|
307
|
+
let gridColumn;
|
|
308
|
+
let gridRow;
|
|
309
|
+
let gridRowSpan;
|
|
310
|
+
switch (direction) {
|
|
311
|
+
case "ltr":
|
|
312
|
+
// Left to right: levels are columns, indices are rows
|
|
313
|
+
gridColumn = level + 1; // CSS grid is 1-indexed
|
|
314
|
+
gridRow = indexInfo.startIndex + 1;
|
|
315
|
+
gridRowSpan = indexInfo.endIndex - indexInfo.startIndex + 1;
|
|
316
|
+
break;
|
|
317
|
+
case "rtl":
|
|
318
|
+
// Right to left: levels are reversed columns
|
|
319
|
+
gridColumn = maxLevel - level + 1;
|
|
320
|
+
gridRow = indexInfo.startIndex + 1;
|
|
321
|
+
gridRowSpan = indexInfo.endIndex - indexInfo.startIndex + 1;
|
|
322
|
+
break;
|
|
323
|
+
case "ttb":
|
|
324
|
+
// Top to bottom: levels are rows, indices are columns
|
|
325
|
+
gridRow = level + 1;
|
|
326
|
+
gridColumn = indexInfo.startIndex + 1;
|
|
327
|
+
gridRowSpan = 1;
|
|
328
|
+
break;
|
|
329
|
+
case "btt":
|
|
330
|
+
// Bottom to top: levels are reversed rows
|
|
331
|
+
gridRow = maxLevel - level + 1;
|
|
332
|
+
gridColumn = indexInfo.startIndex + 1;
|
|
333
|
+
gridRowSpan = 1;
|
|
334
|
+
break;
|
|
335
|
+
}
|
|
336
|
+
positions.set(nodeId, {
|
|
337
|
+
nodeId,
|
|
338
|
+
level,
|
|
339
|
+
index: indexInfo.startIndex,
|
|
340
|
+
gridColumn,
|
|
341
|
+
gridRow,
|
|
342
|
+
gridRowSpan,
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
return positions;
|
|
346
|
+
}
|
|
347
|
+
/**
|
|
348
|
+
* Generate CSS grid template strings
|
|
349
|
+
*/
|
|
350
|
+
function generateGridTemplates(maxLevel, maxIndex, direction, levelSpacing, nodeSpacing) {
|
|
351
|
+
const isHorizontal = direction === "ltr" || direction === "rtl";
|
|
352
|
+
const numLevels = maxLevel + 1;
|
|
353
|
+
const numNodes = maxIndex + 1;
|
|
354
|
+
if (isHorizontal) {
|
|
355
|
+
// For horizontal layouts, columns represent levels, rows represent nodes
|
|
356
|
+
const columns = [];
|
|
357
|
+
for (let i = 0; i < numLevels; i++) {
|
|
358
|
+
columns.push("auto");
|
|
359
|
+
if (i < numLevels - 1) {
|
|
360
|
+
columns.push(`${levelSpacing}px`); // Spacer column
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
const rows = [];
|
|
364
|
+
for (let i = 0; i < numNodes; i++) {
|
|
365
|
+
rows.push("auto");
|
|
366
|
+
if (i < numNodes - 1) {
|
|
367
|
+
rows.push(`${nodeSpacing}px`); // Spacer row
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
return {
|
|
371
|
+
gridTemplateColumns: columns.join(" "),
|
|
372
|
+
gridTemplateRows: rows.join(" "),
|
|
373
|
+
};
|
|
374
|
+
}
|
|
375
|
+
else {
|
|
376
|
+
// For vertical layouts, rows represent levels, columns represent nodes
|
|
377
|
+
const rows = [];
|
|
378
|
+
for (let i = 0; i < numLevels; i++) {
|
|
379
|
+
rows.push("auto");
|
|
380
|
+
if (i < numLevels - 1) {
|
|
381
|
+
rows.push(`${levelSpacing}px`); // Spacer row
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
const columns = [];
|
|
385
|
+
for (let i = 0; i < numNodes; i++) {
|
|
386
|
+
columns.push("auto");
|
|
387
|
+
if (i < numNodes - 1) {
|
|
388
|
+
columns.push(`${nodeSpacing}px`); // Spacer column
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
return {
|
|
392
|
+
gridTemplateColumns: columns.join(" "),
|
|
393
|
+
gridTemplateRows: rows.join(" "),
|
|
394
|
+
};
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
/**
|
|
398
|
+
* Get the actual grid column accounting for spacer columns
|
|
399
|
+
*/
|
|
400
|
+
function getActualGridColumn(baseColumn) {
|
|
401
|
+
// Account for spacer columns between levels
|
|
402
|
+
return (baseColumn - 1) * 2 + 1;
|
|
403
|
+
}
|
|
404
|
+
/**
|
|
405
|
+
* Get the actual grid row accounting for spacer rows
|
|
406
|
+
*/
|
|
407
|
+
function getActualGridRow(baseRow) {
|
|
408
|
+
// Account for spacer rows between nodes
|
|
409
|
+
return (baseRow - 1) * 2 + 1;
|
|
410
|
+
}
|
|
411
|
+
/**
|
|
412
|
+
* Get the actual grid row span accounting for spacer rows
|
|
413
|
+
*/
|
|
414
|
+
function getActualGridRowSpan(baseRowSpan) {
|
|
415
|
+
if (baseRowSpan <= 1) {
|
|
416
|
+
return 1;
|
|
417
|
+
}
|
|
418
|
+
// Span includes the spacer rows between nodes
|
|
419
|
+
return (baseRowSpan - 1) * 2 + 1;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* Edge Renderer utility for bn-tree component
|
|
424
|
+
* Handles SVG path generation for connecting tree nodes
|
|
425
|
+
*/
|
|
426
|
+
/**
|
|
427
|
+
* Calculate the bounding rectangle of a node element
|
|
428
|
+
*/
|
|
429
|
+
function getNodeRect(element, containerRect) {
|
|
430
|
+
const rect = element.getBoundingClientRect();
|
|
431
|
+
const left = rect.left - containerRect.left;
|
|
432
|
+
const top = rect.top - containerRect.top;
|
|
433
|
+
return {
|
|
434
|
+
left,
|
|
435
|
+
top,
|
|
436
|
+
width: rect.width,
|
|
437
|
+
height: rect.height,
|
|
438
|
+
centerX: left + rect.width / 2,
|
|
439
|
+
centerY: top + rect.height / 2,
|
|
440
|
+
};
|
|
441
|
+
}
|
|
442
|
+
/**
|
|
443
|
+
* Get the connection point on a node based on layout direction
|
|
444
|
+
*/
|
|
445
|
+
function getConnectionPoint(rect, isSource, direction) {
|
|
446
|
+
switch (direction) {
|
|
447
|
+
case "ltr":
|
|
448
|
+
// Left to right: source connects from right, target from left
|
|
449
|
+
return isSource ? { x: rect.left + rect.width, y: rect.centerY } : { x: rect.left, y: rect.centerY };
|
|
450
|
+
case "rtl":
|
|
451
|
+
// Right to left: source connects from left, target from right
|
|
452
|
+
return isSource ? { x: rect.left, y: rect.centerY } : { x: rect.left + rect.width, y: rect.centerY };
|
|
453
|
+
case "ttb":
|
|
454
|
+
// Top to bottom: source connects from bottom, target from top
|
|
455
|
+
return isSource ? { x: rect.centerX, y: rect.top + rect.height } : { x: rect.centerX, y: rect.top };
|
|
456
|
+
case "btt":
|
|
457
|
+
// Bottom to top: source connects from top, target from bottom
|
|
458
|
+
return isSource ? { x: rect.centerX, y: rect.top } : { x: rect.centerX, y: rect.top + rect.height };
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
/**
|
|
462
|
+
* Get the connection point on a node for multi-parent scenarios.
|
|
463
|
+
* When a node has multiple parents, each parent connects at a different
|
|
464
|
+
* vertical position on the target node's edge, spread around the center.
|
|
465
|
+
* @param parentIndex - Index of this parent (0-based)
|
|
466
|
+
* @param totalParents - Total number of parents for this node
|
|
467
|
+
* @param spacing - Spacing between connection points in pixels
|
|
468
|
+
*/
|
|
469
|
+
function getMultiParentConnectionPoint(rect, direction, parentIndex, totalParents, spacing = 8) {
|
|
470
|
+
// Calculate offset from center for this parent
|
|
471
|
+
// Parents are spread evenly around center with given spacing
|
|
472
|
+
const totalSpread = (totalParents - 1) * spacing;
|
|
473
|
+
const offset = -totalSpread / 2 + parentIndex * spacing;
|
|
474
|
+
switch (direction) {
|
|
475
|
+
case "ltr":
|
|
476
|
+
// Left to right: target connects from left, offset vertically
|
|
477
|
+
return { x: rect.left, y: rect.centerY + offset };
|
|
478
|
+
case "rtl":
|
|
479
|
+
// Right to left: target connects from right, offset vertically
|
|
480
|
+
return { x: rect.left + rect.width, y: rect.centerY + offset };
|
|
481
|
+
case "ttb":
|
|
482
|
+
// Top to bottom: target connects from top, offset horizontally
|
|
483
|
+
return { x: rect.centerX + offset, y: rect.top };
|
|
484
|
+
case "btt":
|
|
485
|
+
// Bottom to top: target connects from bottom, offset horizontally
|
|
486
|
+
return { x: rect.centerX + offset, y: rect.top + rect.height };
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
/**
|
|
490
|
+
* Generate an SVG path connecting two points with the specified style
|
|
491
|
+
*/
|
|
492
|
+
function generateEdgePath(start, end, style, direction) {
|
|
493
|
+
switch (style) {
|
|
494
|
+
case "straight":
|
|
495
|
+
return generateStraightPath(start, end);
|
|
496
|
+
case "curved":
|
|
497
|
+
return generateCurvedPath(start, end, direction);
|
|
498
|
+
case "orthogonal":
|
|
499
|
+
default:
|
|
500
|
+
return generateOrthogonalPath(start, end, direction);
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
/**
|
|
504
|
+
* Generate a straight line path
|
|
505
|
+
*/
|
|
506
|
+
function generateStraightPath(start, end) {
|
|
507
|
+
const path = `M ${start.x} ${start.y} L ${end.x} ${end.y}`;
|
|
508
|
+
const midpoint = {
|
|
509
|
+
x: (start.x + end.x) / 2,
|
|
510
|
+
y: (start.y + end.y) / 2,
|
|
511
|
+
};
|
|
512
|
+
return { path, midpoint };
|
|
513
|
+
}
|
|
514
|
+
/**
|
|
515
|
+
* Generate a curved bezier path
|
|
516
|
+
*/
|
|
517
|
+
function generateCurvedPath(start, end, direction) {
|
|
518
|
+
const isHorizontal = direction === "ltr" || direction === "rtl";
|
|
519
|
+
let controlPoint1;
|
|
520
|
+
let controlPoint2;
|
|
521
|
+
if (isHorizontal) {
|
|
522
|
+
const midX = (start.x + end.x) / 2;
|
|
523
|
+
controlPoint1 = { x: midX, y: start.y };
|
|
524
|
+
controlPoint2 = { x: midX, y: end.y };
|
|
525
|
+
}
|
|
526
|
+
else {
|
|
527
|
+
const midY = (start.y + end.y) / 2;
|
|
528
|
+
controlPoint1 = { x: start.x, y: midY };
|
|
529
|
+
controlPoint2 = { x: end.x, y: midY };
|
|
530
|
+
}
|
|
531
|
+
const path = `M ${start.x} ${start.y} C ${controlPoint1.x} ${controlPoint1.y}, ${controlPoint2.x} ${controlPoint2.y}, ${end.x} ${end.y}`;
|
|
532
|
+
// Midpoint of a cubic bezier at t=0.5
|
|
533
|
+
const midpoint = {
|
|
534
|
+
x: 0.125 * start.x + 0.375 * controlPoint1.x + 0.375 * controlPoint2.x + 0.125 * end.x,
|
|
535
|
+
y: 0.125 * start.y + 0.375 * controlPoint1.y + 0.375 * controlPoint2.y + 0.125 * end.y,
|
|
536
|
+
};
|
|
537
|
+
return { path, midpoint };
|
|
538
|
+
}
|
|
539
|
+
/**
|
|
540
|
+
* Generate an orthogonal (right-angle) path
|
|
541
|
+
* The bend point is positioned closer to the children (70% of the way) for better visual balance
|
|
542
|
+
*/
|
|
543
|
+
function generateOrthogonalPath(start, end, direction) {
|
|
544
|
+
const isHorizontal = direction === "ltr" || direction === "rtl";
|
|
545
|
+
let path;
|
|
546
|
+
let midpoint;
|
|
547
|
+
const bendRatio = 0.7; // Position bend point 70% towards the end
|
|
548
|
+
if (isHorizontal) {
|
|
549
|
+
// For horizontal layouts, go horizontally first, then vertically
|
|
550
|
+
const midX = start.x + (end.x - start.x) * bendRatio;
|
|
551
|
+
path = `M ${start.x} ${start.y} L ${midX} ${start.y} L ${midX} ${end.y} L ${end.x} ${end.y}`;
|
|
552
|
+
midpoint = { x: midX, y: (start.y + end.y) / 2 };
|
|
553
|
+
}
|
|
554
|
+
else {
|
|
555
|
+
// For vertical layouts, go vertically first, then horizontally
|
|
556
|
+
const midY = start.y + (end.y - start.y) * bendRatio;
|
|
557
|
+
path = `M ${start.x} ${start.y} L ${start.x} ${midY} L ${end.x} ${midY} L ${end.x} ${end.y}`;
|
|
558
|
+
midpoint = { x: (start.x + end.x) / 2, y: midY };
|
|
559
|
+
}
|
|
560
|
+
return { path, midpoint };
|
|
561
|
+
}
|
|
562
|
+
/**
|
|
563
|
+
* Calculate the position for an operator label between sibling nodes.
|
|
564
|
+
* The operator is placed at the T-junction where the parent's line meets the vertical/horizontal split.
|
|
565
|
+
*/
|
|
566
|
+
function calculateOperatorPosition(parentRect, sibling1Rect, sibling2Rect, direction) {
|
|
567
|
+
const bendRatio = 0.7; // Must match the bendRatio in generateOrthogonalPath
|
|
568
|
+
switch (direction) {
|
|
569
|
+
case "ltr": {
|
|
570
|
+
// T-junction: where parent's horizontal line meets the vertical split
|
|
571
|
+
const parentRight = parentRect.left + parentRect.width;
|
|
572
|
+
const childrenLeft = Math.min(sibling1Rect.left, sibling2Rect.left);
|
|
573
|
+
const midX = parentRight + (childrenLeft - parentRight) * bendRatio;
|
|
574
|
+
return {
|
|
575
|
+
x: midX,
|
|
576
|
+
y: parentRect.centerY, // At parent's Y level (the T-junction)
|
|
577
|
+
};
|
|
578
|
+
}
|
|
579
|
+
case "rtl": {
|
|
580
|
+
// T-junction for RTL
|
|
581
|
+
const parentLeft = parentRect.left;
|
|
582
|
+
const childrenRight = Math.max(sibling1Rect.left + sibling1Rect.width, sibling2Rect.left + sibling2Rect.width);
|
|
583
|
+
const midX = childrenRight + (parentLeft - childrenRight) * bendRatio;
|
|
584
|
+
return {
|
|
585
|
+
x: midX,
|
|
586
|
+
y: parentRect.centerY,
|
|
587
|
+
};
|
|
588
|
+
}
|
|
589
|
+
case "ttb": {
|
|
590
|
+
// T-junction for top-to-bottom
|
|
591
|
+
const parentBottom = parentRect.top + parentRect.height;
|
|
592
|
+
const childrenTop = Math.min(sibling1Rect.top, sibling2Rect.top);
|
|
593
|
+
const midY = parentBottom + (childrenTop - parentBottom) * bendRatio;
|
|
594
|
+
return {
|
|
595
|
+
x: parentRect.centerX, // At parent's X level (the T-junction)
|
|
596
|
+
y: midY,
|
|
597
|
+
};
|
|
598
|
+
}
|
|
599
|
+
case "btt": {
|
|
600
|
+
// T-junction for bottom-to-top
|
|
601
|
+
const parentTop = parentRect.top;
|
|
602
|
+
const childrenBottom = Math.max(sibling1Rect.top + sibling1Rect.height, sibling2Rect.top + sibling2Rect.height);
|
|
603
|
+
const midY = childrenBottom + (parentTop - childrenBottom) * bendRatio;
|
|
604
|
+
return {
|
|
605
|
+
x: parentRect.centerX,
|
|
606
|
+
y: midY,
|
|
607
|
+
};
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
/**
|
|
612
|
+
* Get SVG style attributes for an edge
|
|
613
|
+
*/
|
|
614
|
+
function getEdgeSvgStyle(defaultColor, defaultWidth, edgeStyle) {
|
|
615
|
+
var _a, _b;
|
|
616
|
+
return Object.assign({ stroke: (_a = edgeStyle === null || edgeStyle === void 0 ? void 0 : edgeStyle.color) !== null && _a !== void 0 ? _a : defaultColor, strokeWidth: (_b = edgeStyle === null || edgeStyle === void 0 ? void 0 : edgeStyle.width) !== null && _b !== void 0 ? _b : defaultWidth }, ((edgeStyle === null || edgeStyle === void 0 ? void 0 : edgeStyle.dasharray) ? { strokeDasharray: edgeStyle.dasharray } : {}));
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
const bnTreeCss = () => `:host{display:inline-block;position:relative;font-family:var(--bn-font-family, "Noto Sans", sans-serif);font-size:var(--bn-font-size, 13.3333px);color:var(--bn-font-color, #000000)}.tree-container{position:relative;display:inline-block}.tree-grid{position:relative;display:grid;align-items:center}.tree-node{position:relative;z-index:1;border:1px solid #404040;background:var(--bn-font-background, white)}.edge-layer{position:absolute;top:0;left:0;z-index:0;pointer-events:none;overflow:visible}.tree-error{display:flex;flex-wrap:wrap;gap:20px}`;
|
|
620
|
+
|
|
621
|
+
const ChartTree = class {
|
|
622
|
+
validateEdgesProp(newValue) {
|
|
623
|
+
const errId = "ERR_edges";
|
|
624
|
+
const validationErrors = validateEdges(newValue);
|
|
625
|
+
if (validationErrors.length > 0) {
|
|
626
|
+
this.errors.addOrReplace({
|
|
627
|
+
id: errId,
|
|
628
|
+
type: "error",
|
|
629
|
+
message: `edges: ${validationErrors.join("; ")}`,
|
|
630
|
+
});
|
|
631
|
+
this.treeConfig = null;
|
|
632
|
+
}
|
|
633
|
+
else {
|
|
634
|
+
this.errors.remove(errId);
|
|
635
|
+
this.treeConfig = parseTreeConfig(newValue);
|
|
636
|
+
}
|
|
637
|
+
this.recalculateLayout();
|
|
638
|
+
}
|
|
639
|
+
validateDirection(newValue) {
|
|
640
|
+
const errId = "ERR_direction";
|
|
641
|
+
const validValues = ["ltr", "rtl", "ttb", "btt"];
|
|
642
|
+
if (!validValues.includes(newValue)) {
|
|
643
|
+
this.errors.addOrReplace({
|
|
644
|
+
id: errId,
|
|
645
|
+
type: "warning",
|
|
646
|
+
message: `direction: invalid value '${newValue}', must be one of: ${validValues.join(", ")}`,
|
|
647
|
+
});
|
|
648
|
+
}
|
|
649
|
+
else {
|
|
650
|
+
this.errors.remove(errId);
|
|
651
|
+
}
|
|
652
|
+
this.recalculateLayout();
|
|
653
|
+
}
|
|
654
|
+
validateLevelSpacing(newValue) {
|
|
655
|
+
const errId = "ERR_levelSpacing";
|
|
656
|
+
if (!withStyled.isValidNumber(newValue) || newValue < 0) {
|
|
657
|
+
this.errors.addOrReplace({
|
|
658
|
+
id: errId,
|
|
659
|
+
type: "warning",
|
|
660
|
+
message: `level-spacing: invalid value '${newValue}', must be a non-negative number`,
|
|
661
|
+
});
|
|
662
|
+
}
|
|
663
|
+
else {
|
|
664
|
+
this.errors.remove(errId);
|
|
665
|
+
}
|
|
666
|
+
this.recalculateLayout();
|
|
667
|
+
}
|
|
668
|
+
validateNodeSpacing(newValue) {
|
|
669
|
+
const errId = "ERR_nodeSpacing";
|
|
670
|
+
if (!withStyled.isValidNumber(newValue) || newValue < 0) {
|
|
671
|
+
this.errors.addOrReplace({
|
|
672
|
+
id: errId,
|
|
673
|
+
type: "warning",
|
|
674
|
+
message: `node-spacing: invalid value '${newValue}', must be a non-negative number`,
|
|
675
|
+
});
|
|
676
|
+
}
|
|
677
|
+
else {
|
|
678
|
+
this.errors.remove(errId);
|
|
679
|
+
}
|
|
680
|
+
this.recalculateLayout();
|
|
681
|
+
}
|
|
682
|
+
validateEdgeStyle(newValue) {
|
|
683
|
+
const errId = "ERR_edgeStyle";
|
|
684
|
+
const validValues = ["straight", "orthogonal", "curved"];
|
|
685
|
+
if (!validValues.includes(newValue)) {
|
|
686
|
+
this.errors.addOrReplace({
|
|
687
|
+
id: errId,
|
|
688
|
+
type: "warning",
|
|
689
|
+
message: `edge-style: invalid value '${newValue}', must be one of: ${validValues.join(", ")}`,
|
|
690
|
+
});
|
|
691
|
+
}
|
|
692
|
+
else {
|
|
693
|
+
this.errors.remove(errId);
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
validateShowOperators(newValue) {
|
|
697
|
+
const errId = "ERR_showOperators";
|
|
698
|
+
if (!withStyled.isValidBoolean(newValue)) {
|
|
699
|
+
this.errors.addOrReplace({
|
|
700
|
+
id: errId,
|
|
701
|
+
type: "warning",
|
|
702
|
+
message: `show-operators: invalid value '${newValue}', must be 'true' or 'false'`,
|
|
703
|
+
});
|
|
704
|
+
}
|
|
705
|
+
else {
|
|
706
|
+
this.errors.remove(errId);
|
|
707
|
+
}
|
|
708
|
+
}
|
|
709
|
+
constructor(hostRef) {
|
|
710
|
+
index.registerInstance(this, hostRef);
|
|
711
|
+
this.treeConfig = null;
|
|
712
|
+
this.layout = null;
|
|
713
|
+
this.nodeRects = new Map();
|
|
714
|
+
this.svgWidth = 0;
|
|
715
|
+
this.svgHeight = 0;
|
|
716
|
+
this.resizeObserver = null;
|
|
717
|
+
this.gridContainer = null;
|
|
718
|
+
/**
|
|
719
|
+
* Layout direction of the tree.
|
|
720
|
+
* - 'ltr': left to right (root on left)
|
|
721
|
+
* - 'rtl': right to left (root on right)
|
|
722
|
+
* - 'ttb': top to bottom (root on top)
|
|
723
|
+
* - 'btt': bottom to top (root on bottom)
|
|
724
|
+
*/
|
|
725
|
+
this.direction = "ltr";
|
|
726
|
+
/**
|
|
727
|
+
* Spacing between hierarchy levels in pixels.
|
|
728
|
+
*/
|
|
729
|
+
this.levelSpacing = 60;
|
|
730
|
+
/**
|
|
731
|
+
* Spacing between sibling nodes in pixels.
|
|
732
|
+
*/
|
|
733
|
+
this.nodeSpacing = 20;
|
|
734
|
+
/**
|
|
735
|
+
* Edge line style.
|
|
736
|
+
* - 'straight': direct line between nodes
|
|
737
|
+
* - 'orthogonal': right-angle lines (default)
|
|
738
|
+
* - 'curved': smooth bezier curves
|
|
739
|
+
*/
|
|
740
|
+
this.edgeStyle = "orthogonal";
|
|
741
|
+
/**
|
|
742
|
+
* Show operator labels between sibling nodes.
|
|
743
|
+
*/
|
|
744
|
+
this.showOperators = "true";
|
|
745
|
+
withStyled.withStyled(this);
|
|
746
|
+
withComponentStatus.withComponentStatus(this);
|
|
747
|
+
this.errors = withHasError.withHasError(this);
|
|
748
|
+
this.componentStyle = withComponentStyle.withComponentStyle(this);
|
|
749
|
+
}
|
|
750
|
+
/**
|
|
751
|
+
* Get tree chart styles from component style store
|
|
752
|
+
*/
|
|
753
|
+
getTreeStyle() {
|
|
754
|
+
return this.componentStyle(($) => {
|
|
755
|
+
const baseFontSize = $["global"].fontSizePx;
|
|
756
|
+
return {
|
|
757
|
+
edgeColor: $["bn-tree"].edgeColor,
|
|
758
|
+
edgeWidth: $["bn-tree"].edgeWidth,
|
|
759
|
+
operatorCircleRadius: $["bn-tree"].operatorCircleRadius,
|
|
760
|
+
operatorFontSize: baseFontSize * $["bn-tree"].operatorFontSizeScale,
|
|
761
|
+
operatorColor: $["bn-tree"].operatorColor,
|
|
762
|
+
};
|
|
763
|
+
});
|
|
764
|
+
}
|
|
765
|
+
componentWillLoad() {
|
|
766
|
+
this.validateEdgesProp(this.edges);
|
|
767
|
+
this.validateDirection(this.direction);
|
|
768
|
+
this.validateLevelSpacing(this.levelSpacing);
|
|
769
|
+
this.validateNodeSpacing(this.nodeSpacing);
|
|
770
|
+
this.validateEdgeStyle(this.edgeStyle);
|
|
771
|
+
this.validateShowOperators(this.showOperators);
|
|
772
|
+
}
|
|
773
|
+
componentDidLoad() {
|
|
774
|
+
this.setupResizeObserver();
|
|
775
|
+
this.updateNodeRects();
|
|
776
|
+
}
|
|
777
|
+
disconnectedCallback() {
|
|
778
|
+
if (this.resizeObserver) {
|
|
779
|
+
this.resizeObserver.disconnect();
|
|
780
|
+
this.resizeObserver = null;
|
|
781
|
+
}
|
|
782
|
+
}
|
|
783
|
+
setupResizeObserver() {
|
|
784
|
+
var _a;
|
|
785
|
+
this.gridContainer = (_a = this.element.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(".tree-grid");
|
|
786
|
+
if (!this.gridContainer) {
|
|
787
|
+
return;
|
|
788
|
+
}
|
|
789
|
+
this.resizeObserver = new ResizeObserver(() => {
|
|
790
|
+
this.updateNodeRects();
|
|
791
|
+
});
|
|
792
|
+
// Observe the grid container
|
|
793
|
+
this.resizeObserver.observe(this.gridContainer);
|
|
794
|
+
// Observe all slotted elements
|
|
795
|
+
const slots = this.element.querySelectorAll("[slot]");
|
|
796
|
+
slots.forEach((slot) => {
|
|
797
|
+
this.resizeObserver.observe(slot);
|
|
798
|
+
});
|
|
799
|
+
}
|
|
800
|
+
recalculateLayout() {
|
|
801
|
+
if (!this.treeConfig) {
|
|
802
|
+
this.layout = null;
|
|
803
|
+
return;
|
|
804
|
+
}
|
|
805
|
+
this.layout = calculateLayout(this.treeConfig, this.direction, this.levelSpacing, this.nodeSpacing);
|
|
806
|
+
}
|
|
807
|
+
updateNodeRects() {
|
|
808
|
+
if (!this.treeConfig || !this.gridContainer) {
|
|
809
|
+
return;
|
|
810
|
+
}
|
|
811
|
+
const containerRect = this.gridContainer.getBoundingClientRect();
|
|
812
|
+
const newRects = new Map();
|
|
813
|
+
for (const nodeId of this.treeConfig.allNodes) {
|
|
814
|
+
const slotElement = this.element.querySelector(`[slot="${nodeId}"]`);
|
|
815
|
+
if (slotElement) {
|
|
816
|
+
newRects.set(nodeId, getNodeRect(slotElement, containerRect));
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
this.nodeRects = newRects;
|
|
820
|
+
this.svgWidth = containerRect.width;
|
|
821
|
+
this.svgHeight = containerRect.height;
|
|
822
|
+
}
|
|
823
|
+
getSlotStyle(nodeId) {
|
|
824
|
+
if (!this.layout) {
|
|
825
|
+
return {};
|
|
826
|
+
}
|
|
827
|
+
const position = this.layout.positions.get(nodeId);
|
|
828
|
+
if (!position) {
|
|
829
|
+
return {};
|
|
830
|
+
}
|
|
831
|
+
const isHorizontal = this.direction === "ltr" || this.direction === "rtl";
|
|
832
|
+
if (isHorizontal) {
|
|
833
|
+
return {
|
|
834
|
+
"grid-column": String(getActualGridColumn(position.gridColumn)),
|
|
835
|
+
"grid-row": `${getActualGridRow(position.gridRow)} / span ${getActualGridRowSpan(position.gridRowSpan)}`,
|
|
836
|
+
"align-self": "center",
|
|
837
|
+
};
|
|
838
|
+
}
|
|
839
|
+
else {
|
|
840
|
+
return {
|
|
841
|
+
"grid-row": String(getActualGridRow(position.gridRow)),
|
|
842
|
+
"grid-column": String(getActualGridColumn(position.gridColumn)),
|
|
843
|
+
"justify-self": "center",
|
|
844
|
+
};
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
renderEdges() {
|
|
848
|
+
var _a;
|
|
849
|
+
if (!this.treeConfig || this.nodeRects.size === 0) {
|
|
850
|
+
return null;
|
|
851
|
+
}
|
|
852
|
+
const treeStyle = this.getTreeStyle();
|
|
853
|
+
const paths = [];
|
|
854
|
+
const operators = [];
|
|
855
|
+
// Build a map of child -> list of parents (to detect nodes with multiple parents)
|
|
856
|
+
const childToParents = new Map();
|
|
857
|
+
for (const edge of this.treeConfig.edges) {
|
|
858
|
+
const parents = childToParents.get(edge.to) || [];
|
|
859
|
+
parents.push(edge.from);
|
|
860
|
+
childToParents.set(edge.to, parents);
|
|
861
|
+
}
|
|
862
|
+
// Render edges connecting parents to children
|
|
863
|
+
for (const edge of this.treeConfig.edges) {
|
|
864
|
+
const fromRect = this.nodeRects.get(edge.from);
|
|
865
|
+
const toRect = this.nodeRects.get(edge.to);
|
|
866
|
+
if (!fromRect || !toRect) {
|
|
867
|
+
continue;
|
|
868
|
+
}
|
|
869
|
+
const start = getConnectionPoint(fromRect, true, this.direction);
|
|
870
|
+
// For nodes with multiple parents, use offset connection points
|
|
871
|
+
const parents = childToParents.get(edge.to) || [];
|
|
872
|
+
let end;
|
|
873
|
+
if (parents.length > 1) {
|
|
874
|
+
const parentIndex = parents.indexOf(edge.from);
|
|
875
|
+
end = getMultiParentConnectionPoint(toRect, this.direction, parentIndex, parents.length);
|
|
876
|
+
}
|
|
877
|
+
else {
|
|
878
|
+
end = getConnectionPoint(toRect, false, this.direction);
|
|
879
|
+
}
|
|
880
|
+
const { path } = generateEdgePath(start, end, this.edgeStyle, this.direction);
|
|
881
|
+
const svgStyle = getEdgeSvgStyle(treeStyle.edgeColor, treeStyle.edgeWidth, edge.style);
|
|
882
|
+
paths.push(index.h("path", { key: `edge-${edge.from}-${edge.to}`, d: path, fill: "none", stroke: svgStyle.stroke, "stroke-width": svgStyle.strokeWidth, "stroke-dasharray": svgStyle.strokeDasharray }));
|
|
883
|
+
}
|
|
884
|
+
// Render operators between siblings
|
|
885
|
+
if (this.showOperators === "true") {
|
|
886
|
+
for (const [parent, children] of this.treeConfig.adjacencyList.entries()) {
|
|
887
|
+
const parentRect = this.nodeRects.get(parent);
|
|
888
|
+
if (!parentRect) {
|
|
889
|
+
continue;
|
|
890
|
+
}
|
|
891
|
+
for (let i = 0; i < children.length - 1; i++) {
|
|
892
|
+
const child = children[i];
|
|
893
|
+
const nextChild = children[i + 1];
|
|
894
|
+
const edge = getEdgeForChild(this.treeConfig.edges, parent, child);
|
|
895
|
+
if (!(edge === null || edge === void 0 ? void 0 : edge.operator) || edge.operator === "none") {
|
|
896
|
+
continue;
|
|
897
|
+
}
|
|
898
|
+
const childRect = this.nodeRects.get(child);
|
|
899
|
+
const nextChildRect = this.nodeRects.get(nextChild);
|
|
900
|
+
if (!childRect || !nextChildRect) {
|
|
901
|
+
continue;
|
|
902
|
+
}
|
|
903
|
+
const operatorSymbol = (_a = edge.label) !== null && _a !== void 0 ? _a : getOperatorSymbol(edge.operator);
|
|
904
|
+
const position = calculateOperatorPosition(parentRect, childRect, nextChildRect, this.direction);
|
|
905
|
+
operators.push(index.h("g", { key: `operator-${parent}-${child}`, class: "operator-group" }, index.h("circle", { cx: position.x, cy: position.y, r: treeStyle.operatorCircleRadius, fill: "white", stroke: treeStyle.edgeColor, "stroke-width": treeStyle.edgeWidth }), index.h("text", { x: position.x, y: position.y, "text-anchor": "middle", "dominant-baseline": "central", style: {
|
|
906
|
+
fontSize: `${treeStyle.operatorFontSize}px`,
|
|
907
|
+
fill: treeStyle.operatorColor,
|
|
908
|
+
fontWeight: "bold",
|
|
909
|
+
} }, operatorSymbol)));
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
return (index.h("svg", { class: "edge-layer", width: this.svgWidth, height: this.svgHeight, style: { position: "absolute", top: "0", left: "0", pointerEvents: "none" } }, paths, operators));
|
|
914
|
+
}
|
|
915
|
+
renderSlots() {
|
|
916
|
+
if (!this.treeConfig || !this.layout) {
|
|
917
|
+
return null;
|
|
918
|
+
}
|
|
919
|
+
return Array.from(this.treeConfig.allNodes).map((nodeId) => (index.h("div", { key: nodeId, class: "tree-node", style: this.getSlotStyle(nodeId) }, index.h("slot", { name: nodeId }))));
|
|
920
|
+
}
|
|
921
|
+
getFontStyles() {
|
|
922
|
+
return this.componentStyle(($) => {
|
|
923
|
+
var _a, _b, _c, _d;
|
|
924
|
+
return ({
|
|
925
|
+
"--bn-font-family": ((_a = $["global"]) === null || _a === void 0 ? void 0 : _a["fontFamily"]) || "'Noto Sans', sans-serif",
|
|
926
|
+
"--bn-font-size": `${((_b = $["global"]) === null || _b === void 0 ? void 0 : _b["fontSizePx"]) || 13.3333}px`,
|
|
927
|
+
"--bn-font-color": ((_c = $["global"]) === null || _c === void 0 ? void 0 : _c["fontColor"]) || "#000000",
|
|
928
|
+
"--bn-font-background": ((_d = $["global"]) === null || _d === void 0 ? void 0 : _d["fontBackgroundColor"]) || "#ffffff",
|
|
929
|
+
});
|
|
930
|
+
});
|
|
931
|
+
}
|
|
932
|
+
render() {
|
|
933
|
+
const fontStyles = this.getFontStyles();
|
|
934
|
+
if (!this.treeConfig || !this.layout) {
|
|
935
|
+
return (index.h(index.Host, { style: fontStyles }, index.h("div", { class: "tree-container tree-error" }, index.h("slot", null))));
|
|
936
|
+
}
|
|
937
|
+
const gridStyle = {
|
|
938
|
+
display: "grid",
|
|
939
|
+
"grid-template-columns": this.layout.gridTemplateColumns,
|
|
940
|
+
"grid-template-rows": this.layout.gridTemplateRows,
|
|
941
|
+
position: "relative",
|
|
942
|
+
};
|
|
943
|
+
return (index.h(index.Host, { style: fontStyles }, index.h("div", { class: "tree-container" }, index.h("div", { class: "tree-grid", style: gridStyle }, this.renderEdges(), this.renderSlots()))));
|
|
944
|
+
}
|
|
945
|
+
get element() { return index.getElement(this); }
|
|
946
|
+
static get watchers() { return {
|
|
947
|
+
"edges": [{
|
|
948
|
+
"validateEdgesProp": 0
|
|
949
|
+
}],
|
|
950
|
+
"direction": [{
|
|
951
|
+
"validateDirection": 0
|
|
952
|
+
}],
|
|
953
|
+
"levelSpacing": [{
|
|
954
|
+
"validateLevelSpacing": 0
|
|
955
|
+
}],
|
|
956
|
+
"nodeSpacing": [{
|
|
957
|
+
"validateNodeSpacing": 0
|
|
958
|
+
}],
|
|
959
|
+
"edgeStyle": [{
|
|
960
|
+
"validateEdgeStyle": 0
|
|
961
|
+
}],
|
|
962
|
+
"showOperators": [{
|
|
963
|
+
"validateShowOperators": 0
|
|
964
|
+
}]
|
|
965
|
+
}; }
|
|
966
|
+
};
|
|
967
|
+
ChartTree.style = bnTreeCss();
|
|
968
|
+
|
|
969
|
+
exports.bn_tree = ChartTree;
|