@platforma-sdk/model 1.79.27 → 1.80.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/dist/block_model.d.ts +2 -0
- package/dist/block_model.d.ts.map +1 -1
- package/dist/columns/column.cjs +28 -0
- package/dist/columns/column.cjs.map +1 -0
- package/dist/columns/column.d.ts +30 -0
- package/dist/columns/column.d.ts.map +1 -0
- package/dist/columns/column.js +27 -0
- package/dist/columns/column.js.map +1 -0
- package/dist/columns/column_lazy.cjs +248 -0
- package/dist/columns/column_lazy.cjs.map +1 -0
- package/dist/columns/column_lazy.d.ts +137 -0
- package/dist/columns/column_lazy.d.ts.map +1 -0
- package/dist/columns/column_lazy.js +245 -0
- package/dist/columns/column_lazy.js.map +1 -0
- package/dist/columns/column_providers/index.cjs +62 -0
- package/dist/columns/column_providers/index.cjs.map +1 -0
- package/dist/columns/column_providers/index.d.ts +30 -0
- package/dist/columns/column_providers/index.d.ts.map +1 -0
- package/dist/columns/column_providers/index.js +53 -0
- package/dist/columns/column_providers/index.js.map +1 -0
- package/dist/columns/column_providers/providers.cjs +123 -0
- package/dist/columns/column_providers/providers.cjs.map +1 -0
- package/dist/columns/column_providers/providers.d.ts +75 -0
- package/dist/columns/column_providers/providers.d.ts.map +1 -0
- package/dist/columns/column_providers/providers.js +118 -0
- package/dist/columns/column_providers/providers.js.map +1 -0
- package/dist/columns/column_providers/types.d.ts +23 -0
- package/dist/columns/column_providers/types.d.ts.map +1 -0
- package/dist/columns/column_recipes/column_discovered_recipe.cjs +180 -0
- package/dist/columns/column_recipes/column_discovered_recipe.cjs.map +1 -0
- package/dist/columns/column_recipes/column_discovered_recipe.d.ts +120 -0
- package/dist/columns/column_recipes/column_discovered_recipe.d.ts.map +1 -0
- package/dist/columns/column_recipes/column_discovered_recipe.js +180 -0
- package/dist/columns/column_recipes/column_discovered_recipe.js.map +1 -0
- package/dist/columns/column_recipes/column_filtered_recipe.cjs +133 -0
- package/dist/columns/column_recipes/column_filtered_recipe.cjs.map +1 -0
- package/dist/columns/column_recipes/column_filtered_recipe.d.ts +75 -0
- package/dist/columns/column_recipes/column_filtered_recipe.d.ts.map +1 -0
- package/dist/columns/column_recipes/column_filtered_recipe.js +133 -0
- package/dist/columns/column_recipes/column_filtered_recipe.js.map +1 -0
- package/dist/columns/column_recipes/column_overrided_recipe.cjs +101 -0
- package/dist/columns/column_recipes/column_overrided_recipe.cjs.map +1 -0
- package/dist/columns/column_recipes/column_overrided_recipe.d.ts +73 -0
- package/dist/columns/column_recipes/column_overrided_recipe.d.ts.map +1 -0
- package/dist/columns/column_recipes/column_overrided_recipe.js +101 -0
- package/dist/columns/column_recipes/column_overrided_recipe.js.map +1 -0
- package/dist/columns/column_recipes/index.cjs +72 -0
- package/dist/columns/column_recipes/index.cjs.map +1 -0
- package/dist/columns/column_recipes/index.d.ts +52 -0
- package/dist/columns/column_recipes/index.d.ts.map +1 -0
- package/dist/columns/column_recipes/index.js +68 -0
- package/dist/columns/column_recipes/index.js.map +1 -0
- package/dist/columns/column_recipes/leaf_rebrand.cjs +22 -0
- package/dist/columns/column_recipes/leaf_rebrand.cjs.map +1 -0
- package/dist/columns/column_recipes/leaf_rebrand.js +22 -0
- package/dist/columns/column_recipes/leaf_rebrand.js.map +1 -0
- package/dist/columns/column_recipes/types.d.ts +101 -0
- package/dist/columns/column_recipes/types.d.ts.map +1 -0
- package/dist/columns/columns_collection.cjs +124 -0
- package/dist/columns/columns_collection.cjs.map +1 -0
- package/dist/columns/columns_collection.d.ts +64 -0
- package/dist/columns/columns_collection.d.ts.map +1 -0
- package/dist/columns/columns_collection.js +122 -0
- package/dist/columns/columns_collection.js.map +1 -0
- package/dist/columns/derive_axis_values_labels.cjs +76 -0
- package/dist/columns/derive_axis_values_labels.cjs.map +1 -0
- package/dist/columns/derive_axis_values_labels.d.ts +30 -0
- package/dist/columns/derive_axis_values_labels.d.ts.map +1 -0
- package/dist/columns/derive_axis_values_labels.js +76 -0
- package/dist/columns/derive_axis_values_labels.js.map +1 -0
- package/dist/columns/expand_by_partition.cjs +53 -56
- package/dist/columns/expand_by_partition.cjs.map +1 -1
- package/dist/columns/expand_by_partition.d.ts +22 -18
- package/dist/columns/expand_by_partition.d.ts.map +1 -1
- package/dist/columns/expand_by_partition.js +55 -58
- package/dist/columns/expand_by_partition.js.map +1 -1
- package/dist/columns/index.cjs +44 -18
- package/dist/columns/index.d.ts +15 -7
- package/dist/columns/index.js +12 -6
- package/dist/columns/utils.cjs +186 -0
- package/dist/columns/utils.cjs.map +1 -0
- package/dist/columns/utils.d.ts +96 -0
- package/dist/columns/utils.d.ts.map +1 -0
- package/dist/columns/utils.js +179 -0
- package/dist/columns/utils.js.map +1 -0
- package/dist/components/PFrameForGraphs.cjs +1 -0
- package/dist/components/PFrameForGraphs.cjs.map +1 -1
- package/dist/components/PFrameForGraphs.d.ts +1 -1
- package/dist/components/PFrameForGraphs.d.ts.map +1 -1
- package/dist/components/PFrameForGraphs.js +1 -0
- package/dist/components/PFrameForGraphs.js.map +1 -1
- package/dist/components/PlDataTable/columnResolver.cjs +28 -0
- package/dist/components/PlDataTable/columnResolver.cjs.map +1 -0
- package/dist/components/PlDataTable/columnResolver.js +28 -0
- package/dist/components/PlDataTable/columnResolver.js.map +1 -0
- package/dist/components/PlDataTable/createPlDataTable/createPTableDefV2.cjs +4 -2
- package/dist/components/PlDataTable/createPlDataTable/createPTableDefV2.cjs.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/createPTableDefV2.js +4 -2
- package/dist/components/PlDataTable/createPlDataTable/createPTableDefV2.js.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/createPTableDefV3.cjs +20 -25
- package/dist/components/PlDataTable/createPlDataTable/createPTableDefV3.cjs.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/createPTableDefV3.js +20 -25
- package/dist/components/PlDataTable/createPlDataTable/createPTableDefV3.js.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/createPlDataTableV2.cjs +58 -26
- package/dist/components/PlDataTable/createPlDataTable/createPlDataTableV2.cjs.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/createPlDataTableV2.d.ts +1 -1
- package/dist/components/PlDataTable/createPlDataTable/createPlDataTableV2.d.ts.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/createPlDataTableV2.js +60 -28
- package/dist/components/PlDataTable/createPlDataTable/createPlDataTableV2.js.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/createPlDataTableV3.cjs +224 -194
- package/dist/components/PlDataTable/createPlDataTable/createPlDataTableV3.cjs.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/createPlDataTableV3.d.ts +13 -16
- package/dist/components/PlDataTable/createPlDataTable/createPlDataTableV3.d.ts.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/createPlDataTableV3.js +228 -198
- package/dist/components/PlDataTable/createPlDataTable/createPlDataTableV3.js.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/discoverColumns.cjs +40 -98
- package/dist/components/PlDataTable/createPlDataTable/discoverColumns.cjs.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/discoverColumns.d.ts +17 -8
- package/dist/components/PlDataTable/createPlDataTable/discoverColumns.d.ts.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/discoverColumns.js +40 -98
- package/dist/components/PlDataTable/createPlDataTable/discoverColumns.js.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/index.cjs +1 -1
- package/dist/components/PlDataTable/createPlDataTable/index.cjs.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/index.d.ts +2 -2
- package/dist/components/PlDataTable/createPlDataTable/index.js +2 -2
- package/dist/components/PlDataTable/createPlDataTable/index.js.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/utils.cjs +51 -169
- package/dist/components/PlDataTable/createPlDataTable/utils.cjs.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/utils.d.ts +1 -1
- package/dist/components/PlDataTable/createPlDataTable/utils.d.ts.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/utils.js +52 -166
- package/dist/components/PlDataTable/createPlDataTable/utils.js.map +1 -1
- package/dist/components/PlDataTable/createPlDataTableSheet.cjs.map +1 -1
- package/dist/components/PlDataTable/createPlDataTableSheet.d.ts +1 -1
- package/dist/components/PlDataTable/createPlDataTableSheet.js.map +1 -1
- package/dist/components/PlDataTable/index.cjs +1 -1
- package/dist/components/PlDataTable/index.d.ts +4 -4
- package/dist/components/PlDataTable/index.js +2 -2
- package/dist/components/PlDataTable/labels.cjs +0 -1
- package/dist/components/PlDataTable/labels.cjs.map +1 -1
- package/dist/components/PlDataTable/labels.js +0 -1
- package/dist/components/PlDataTable/labels.js.map +1 -1
- package/dist/components/PlDataTable/state-migration.cjs +107 -10
- package/dist/components/PlDataTable/state-migration.cjs.map +1 -1
- package/dist/components/PlDataTable/state-migration.d.ts +5 -4
- package/dist/components/PlDataTable/state-migration.d.ts.map +1 -1
- package/dist/components/PlDataTable/state-migration.js +107 -10
- package/dist/components/PlDataTable/state-migration.js.map +1 -1
- package/dist/components/PlDataTable/typesV7.d.ts +1 -36
- package/dist/components/PlDataTable/typesV7.d.ts.map +1 -1
- package/dist/components/PlDataTable/typesV8.d.ts +123 -0
- package/dist/components/PlDataTable/typesV8.d.ts.map +1 -0
- package/dist/components/PlDatasetSelector/build_dataset_options.cjs +27 -34
- package/dist/components/PlDatasetSelector/build_dataset_options.cjs.map +1 -1
- package/dist/components/PlDatasetSelector/build_dataset_options.d.ts.map +1 -1
- package/dist/components/PlDatasetSelector/build_dataset_options.js +27 -34
- package/dist/components/PlDatasetSelector/build_dataset_options.js.map +1 -1
- package/dist/components/PlDatasetSelector/enrichment_discovery.cjs +28 -33
- package/dist/components/PlDatasetSelector/enrichment_discovery.cjs.map +1 -1
- package/dist/components/PlDatasetSelector/enrichment_discovery.js +29 -34
- package/dist/components/PlDatasetSelector/enrichment_discovery.js.map +1 -1
- package/dist/components/PlDatasetSelector/filter_discovery.cjs +27 -17
- package/dist/components/PlDatasetSelector/filter_discovery.cjs.map +1 -1
- package/dist/components/PlDatasetSelector/filter_discovery.d.ts +24 -10
- package/dist/components/PlDatasetSelector/filter_discovery.d.ts.map +1 -1
- package/dist/components/PlDatasetSelector/filter_discovery.js +28 -18
- package/dist/components/PlDatasetSelector/filter_discovery.js.map +1 -1
- package/dist/components/PlDatasetSelector/index.d.ts +2 -2
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.d.ts +5 -5
- package/dist/components/index.js +2 -2
- package/dist/filters/converters/filterToQuery.cjs +5 -6
- package/dist/filters/converters/filterToQuery.cjs.map +1 -1
- package/dist/filters/converters/filterToQuery.d.ts +12 -3
- package/dist/filters/converters/filterToQuery.d.ts.map +1 -1
- package/dist/filters/converters/filterToQuery.js +5 -6
- package/dist/filters/converters/filterToQuery.js.map +1 -1
- package/dist/filters/converters/index.d.ts +2 -2
- package/dist/filters/index.d.ts +2 -2
- package/dist/index.cjs +64 -35
- package/dist/index.d.ts +23 -15
- package/dist/index.js +15 -9
- package/dist/labels/derive_distinct_labels.cjs.map +1 -1
- package/dist/labels/derive_distinct_labels.d.ts +1 -2
- package/dist/labels/derive_distinct_labels.d.ts.map +1 -1
- package/dist/labels/derive_distinct_labels.js.map +1 -1
- package/dist/labels/derive_distinct_tooltips.cjs +1 -1
- package/dist/labels/derive_distinct_tooltips.cjs.map +1 -1
- package/dist/labels/derive_distinct_tooltips.d.ts +6 -3
- package/dist/labels/derive_distinct_tooltips.d.ts.map +1 -1
- package/dist/labels/derive_distinct_tooltips.js +1 -1
- package/dist/labels/derive_distinct_tooltips.js.map +1 -1
- package/dist/package.cjs +1 -1
- package/dist/package.js +1 -1
- package/dist/pframe_utils/axes.cjs.map +1 -1
- package/dist/pframe_utils/axes.d.ts +2 -2
- package/dist/pframe_utils/axes.d.ts.map +1 -1
- package/dist/pframe_utils/axes.js.map +1 -1
- package/dist/pframe_utils/columns.cjs +6 -10
- package/dist/pframe_utils/columns.cjs.map +1 -1
- package/dist/pframe_utils/columns.d.ts +4 -4
- package/dist/pframe_utils/columns.d.ts.map +1 -1
- package/dist/pframe_utils/columns.js +7 -11
- package/dist/pframe_utils/columns.js.map +1 -1
- package/dist/pframe_utils/index.cjs.map +1 -1
- package/dist/pframe_utils/index.d.ts +1 -1
- package/dist/pframe_utils/index.d.ts.map +1 -1
- package/dist/pframe_utils/index.js.map +1 -1
- package/dist/render/accessor.cjs +15 -16
- package/dist/render/accessor.cjs.map +1 -1
- package/dist/render/accessor.d.ts +7 -10
- package/dist/render/accessor.d.ts.map +1 -1
- package/dist/render/accessor.js +15 -16
- package/dist/render/accessor.js.map +1 -1
- package/dist/render/api.cjs +34 -36
- package/dist/render/api.cjs.map +1 -1
- package/dist/render/api.d.ts +30 -20
- package/dist/render/api.d.ts.map +1 -1
- package/dist/render/api.js +35 -38
- package/dist/render/api.js.map +1 -1
- package/dist/render/index.cjs +4 -0
- package/dist/render/index.d.ts +4 -4
- package/dist/render/index.js +3 -2
- package/dist/render/internal.cjs +3 -2
- package/dist/render/internal.cjs.map +1 -1
- package/dist/render/internal.d.ts +17 -9
- package/dist/render/internal.d.ts.map +1 -1
- package/dist/render/internal.js +3 -2
- package/dist/render/internal.js.map +1 -1
- package/dist/render/util/axis_filtering.cjs.map +1 -1
- package/dist/render/util/axis_filtering.js.map +1 -1
- package/dist/render/util/column_collection.cjs +6 -4
- package/dist/render/util/column_collection.cjs.map +1 -1
- package/dist/render/util/column_collection.d.ts +9 -9
- package/dist/render/util/column_collection.d.ts.map +1 -1
- package/dist/render/util/column_collection.js +6 -4
- package/dist/render/util/column_collection.js.map +1 -1
- package/dist/render/util/index.d.ts +2 -2
- package/dist/render/util/pcolumn_data.cjs +1 -1
- package/dist/render/util/pcolumn_data.cjs.map +1 -1
- package/dist/render/util/pcolumn_data.d.ts +3 -3
- package/dist/render/util/pcolumn_data.d.ts.map +1 -1
- package/dist/render/util/pcolumn_data.js +1 -1
- package/dist/render/util/pcolumn_data.js.map +1 -1
- package/dist/services/block_services.cjs +2 -1
- package/dist/services/block_services.cjs.map +1 -1
- package/dist/services/block_services.d.ts +1 -0
- package/dist/services/block_services.d.ts.map +1 -1
- package/dist/services/block_services.js +2 -1
- package/dist/services/block_services.js.map +1 -1
- package/dist/services/get_services.cjs +2 -2
- package/dist/services/get_services.cjs.map +1 -1
- package/dist/services/get_services.d.ts +4 -1
- package/dist/services/get_services.d.ts.map +1 -1
- package/dist/services/get_services.js +2 -2
- package/dist/services/get_services.js.map +1 -1
- package/package.json +10 -8
- package/src/columns/__test_helpers__/collection_driver.ts +197 -0
- package/src/columns/__test_helpers__/stub_registry.ts +134 -0
- package/src/columns/column.ts +46 -0
- package/src/columns/column_lazy.test.ts +201 -0
- package/src/columns/column_lazy.ts +311 -0
- package/src/columns/column_providers/index.ts +78 -0
- package/src/columns/column_providers/providers.ts +193 -0
- package/src/columns/column_providers/types.ts +24 -0
- package/src/columns/column_recipes/column_discovered_recipe.ts +231 -0
- package/src/columns/column_recipes/column_filtered_recipe.ts +184 -0
- package/src/columns/column_recipes/column_overrided_recipe.ts +146 -0
- package/src/columns/column_recipes/column_recipes.test.ts +681 -0
- package/src/columns/column_recipes/index.ts +127 -0
- package/src/columns/column_recipes/leaf_rebrand.ts +28 -0
- package/src/columns/column_recipes/types.ts +113 -0
- package/src/columns/columns_collection.test.ts +164 -0
- package/src/columns/columns_collection.ts +170 -0
- package/src/columns/derive_axis_values_labels.ts +98 -0
- package/src/columns/expand_by_partition.test.ts +146 -110
- package/src/columns/expand_by_partition.ts +72 -84
- package/src/columns/index.ts +7 -5
- package/src/columns/utils.test.ts +249 -0
- package/src/columns/utils.ts +226 -0
- package/src/components/PFrameForGraphs.ts +3 -1
- package/src/components/PlAnnotations/filters_ui.test.ts +46 -47
- package/src/components/PlDataTable/columnResolver.test.ts +122 -0
- package/src/components/PlDataTable/columnResolver.ts +57 -0
- package/src/components/PlDataTable/createPlDataTable/createPTableDefV2.ts +9 -9
- package/src/components/PlDataTable/createPlDataTable/createPTableDefV3.ts +31 -63
- package/src/components/PlDataTable/createPlDataTable/createPlDataTableV2.ts +85 -58
- package/src/components/PlDataTable/createPlDataTable/createPlDataTableV3.ts +316 -354
- package/src/components/PlDataTable/createPlDataTable/discoverColumns.ts +48 -144
- package/src/components/PlDataTable/createPlDataTable/index.ts +2 -2
- package/src/components/PlDataTable/createPlDataTable/utils.test.ts +60 -69
- package/src/components/PlDataTable/createPlDataTable/utils.ts +65 -173
- package/src/components/PlDataTable/createPlDataTableSheet.ts +1 -1
- package/src/components/PlDataTable/index.ts +4 -2
- package/src/components/PlDataTable/labels.ts +4 -33
- package/src/components/PlDataTable/state-migration.ts +151 -22
- package/src/components/PlDataTable/typesV8.ts +188 -0
- package/src/components/PlDatasetSelector/build_dataset_options.ts +35 -60
- package/src/components/PlDatasetSelector/enrichment_discovery.ts +65 -61
- package/src/components/PlDatasetSelector/filter_discovery.test.ts +110 -72
- package/src/components/PlDatasetSelector/filter_discovery.ts +51 -31
- package/src/filters/converters/filterToQuery.test.ts +15 -8
- package/src/filters/converters/filterToQuery.ts +22 -9
- package/src/filters/converters/filterUiToExpressionImpl.test.ts +35 -36
- package/src/labels/derive_distinct_labels.ts +1 -1
- package/src/labels/derive_distinct_tooltips.test.ts +7 -4
- package/src/labels/derive_distinct_tooltips.ts +3 -3
- package/src/pframe_utils/axes.ts +2 -2
- package/src/pframe_utils/columns.ts +14 -23
- package/src/pframe_utils/index.ts +1 -1
- package/src/render/accessor.ts +35 -38
- package/src/render/api.ts +45 -61
- package/src/render/index.ts +2 -1
- package/src/render/internal.ts +43 -10
- package/src/render/util/axis_filtering.ts +0 -1
- package/src/render/util/column_collection.ts +17 -17
- package/src/render/util/pcolumn_data.ts +5 -9
- package/src/services/block_services.ts +1 -0
- package/src/services/get_services.ts +5 -2
- package/dist/columns/column_collection_builder.cjs +0 -241
- package/dist/columns/column_collection_builder.cjs.map +0 -1
- package/dist/columns/column_collection_builder.d.ts +0 -119
- package/dist/columns/column_collection_builder.d.ts.map +0 -1
- package/dist/columns/column_collection_builder.js +0 -241
- package/dist/columns/column_collection_builder.js.map +0 -1
- package/dist/columns/column_selector.cjs +0 -49
- package/dist/columns/column_selector.cjs.map +0 -1
- package/dist/columns/column_selector.d.ts +0 -33
- package/dist/columns/column_selector.d.ts.map +0 -1
- package/dist/columns/column_selector.js +0 -47
- package/dist/columns/column_selector.js.map +0 -1
- package/dist/columns/column_snapshot.cjs +0 -19
- package/dist/columns/column_snapshot.cjs.map +0 -1
- package/dist/columns/column_snapshot.d.ts +0 -39
- package/dist/columns/column_snapshot.d.ts.map +0 -1
- package/dist/columns/column_snapshot.js +0 -18
- package/dist/columns/column_snapshot.js.map +0 -1
- package/dist/columns/column_snapshot_provider.cjs +0 -137
- package/dist/columns/column_snapshot_provider.cjs.map +0 -1
- package/dist/columns/column_snapshot_provider.d.ts +0 -74
- package/dist/columns/column_snapshot_provider.d.ts.map +0 -1
- package/dist/columns/column_snapshot_provider.js +0 -133
- package/dist/columns/column_snapshot_provider.js.map +0 -1
- package/dist/columns/ctx_column_sources.cjs +0 -80
- package/dist/columns/ctx_column_sources.cjs.map +0 -1
- package/dist/columns/ctx_column_sources.d.ts +0 -30
- package/dist/columns/ctx_column_sources.d.ts.map +0 -1
- package/dist/columns/ctx_column_sources.js +0 -79
- package/dist/columns/ctx_column_sources.js.map +0 -1
- package/src/columns/column_collection_builder.test.ts +0 -484
- package/src/columns/column_collection_builder.ts +0 -485
- package/src/columns/column_selector.test.ts +0 -90
- package/src/columns/column_selector.ts +0 -100
- package/src/columns/column_snapshot.ts +0 -58
- package/src/columns/column_snapshot_provider.ts +0 -194
- package/src/columns/ctx_column_sources.ts +0 -99
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { SUniversalPColumnId } from "@milaboratories/pl-model-common";
|
|
2
1
|
import { describe, expect, it } from "vitest";
|
|
3
2
|
import { convertFilterUiToExpressions } from "./filterUiToExpressionImpl";
|
|
4
3
|
import { FilterSpec } from "../types";
|
|
@@ -8,8 +7,8 @@ describe("convertFilterUiToExpressions", () => {
|
|
|
8
7
|
const uiFilter: FilterSpec = {
|
|
9
8
|
type: "or",
|
|
10
9
|
filters: [
|
|
11
|
-
{ type: "isNA", column: "colA"
|
|
12
|
-
{ type: "patternEquals", column: "colB"
|
|
10
|
+
{ type: "isNA", column: "colA" },
|
|
11
|
+
{ type: "patternEquals", column: "colB", value: "test" },
|
|
13
12
|
],
|
|
14
13
|
};
|
|
15
14
|
const result = convertFilterUiToExpressions(uiFilter);
|
|
@@ -23,8 +22,8 @@ describe("convertFilterUiToExpressions", () => {
|
|
|
23
22
|
const uiFilter: FilterSpec = {
|
|
24
23
|
type: "and",
|
|
25
24
|
filters: [
|
|
26
|
-
{ type: "isNA", column: "colA"
|
|
27
|
-
{ type: "greaterThan", column: "colNum"
|
|
25
|
+
{ type: "isNA", column: "colA" },
|
|
26
|
+
{ type: "greaterThan", column: "colNum", x: 10 },
|
|
28
27
|
],
|
|
29
28
|
};
|
|
30
29
|
const result = convertFilterUiToExpressions(uiFilter);
|
|
@@ -37,7 +36,7 @@ describe("convertFilterUiToExpressions", () => {
|
|
|
37
36
|
it('should compile "not" filter to ptabler expression', () => {
|
|
38
37
|
const uiFilter: FilterSpec = {
|
|
39
38
|
type: "not",
|
|
40
|
-
filter: { type: "isNA", column: "colA"
|
|
39
|
+
filter: { type: "isNA", column: "colA" },
|
|
41
40
|
};
|
|
42
41
|
const result = convertFilterUiToExpressions(uiFilter);
|
|
43
42
|
expect(result.type).toBe("not");
|
|
@@ -47,7 +46,7 @@ describe("convertFilterUiToExpressions", () => {
|
|
|
47
46
|
});
|
|
48
47
|
|
|
49
48
|
it('should compile "isNA" filter to ptabler expression', () => {
|
|
50
|
-
const uiFilter: FilterSpec = { type: "isNA", column: "colA"
|
|
49
|
+
const uiFilter: FilterSpec = { type: "isNA", column: "colA" };
|
|
51
50
|
const result = convertFilterUiToExpressions(uiFilter);
|
|
52
51
|
expect(result as any).toEqual({
|
|
53
52
|
type: "is_na",
|
|
@@ -58,7 +57,7 @@ describe("convertFilterUiToExpressions", () => {
|
|
|
58
57
|
it('should compile "isNotNA" filter to ptabler expression', () => {
|
|
59
58
|
const uiFilter: FilterSpec = {
|
|
60
59
|
type: "isNotNA",
|
|
61
|
-
column: "colA"
|
|
60
|
+
column: "colA",
|
|
62
61
|
};
|
|
63
62
|
const result = convertFilterUiToExpressions(uiFilter);
|
|
64
63
|
expect(result as any).toEqual({
|
|
@@ -70,7 +69,7 @@ describe("convertFilterUiToExpressions", () => {
|
|
|
70
69
|
it('should compile "patternEquals" filter to ptabler expression', () => {
|
|
71
70
|
const uiFilter: FilterSpec = {
|
|
72
71
|
type: "patternEquals",
|
|
73
|
-
column: "colB"
|
|
72
|
+
column: "colB",
|
|
74
73
|
value: "abc",
|
|
75
74
|
};
|
|
76
75
|
const result = convertFilterUiToExpressions(uiFilter);
|
|
@@ -84,7 +83,7 @@ describe("convertFilterUiToExpressions", () => {
|
|
|
84
83
|
it('should compile "patternNotEquals" filter to ptabler expression', () => {
|
|
85
84
|
const uiFilter: FilterSpec = {
|
|
86
85
|
type: "patternNotEquals",
|
|
87
|
-
column: "colB"
|
|
86
|
+
column: "colB",
|
|
88
87
|
value: "abc",
|
|
89
88
|
};
|
|
90
89
|
const result = convertFilterUiToExpressions(uiFilter);
|
|
@@ -98,7 +97,7 @@ describe("convertFilterUiToExpressions", () => {
|
|
|
98
97
|
it('should compile "patternContainSubsequence" filter to ptabler expression', () => {
|
|
99
98
|
const uiFilter: FilterSpec = {
|
|
100
99
|
type: "patternContainSubsequence",
|
|
101
|
-
column: "colC"
|
|
100
|
+
column: "colC",
|
|
102
101
|
value: "sub",
|
|
103
102
|
};
|
|
104
103
|
const result = convertFilterUiToExpressions(uiFilter);
|
|
@@ -110,7 +109,7 @@ describe("convertFilterUiToExpressions", () => {
|
|
|
110
109
|
it('should compile "patternNotContainSubsequence" filter to ptabler expression', () => {
|
|
111
110
|
const uiFilter: FilterSpec = {
|
|
112
111
|
type: "patternNotContainSubsequence",
|
|
113
|
-
column: "colC"
|
|
112
|
+
column: "colC",
|
|
114
113
|
value: "sub",
|
|
115
114
|
};
|
|
116
115
|
const result = convertFilterUiToExpressions(uiFilter);
|
|
@@ -132,7 +131,7 @@ describe("convertFilterUiToExpressions", () => {
|
|
|
132
131
|
testCases.forEach(({ type, expected }) => {
|
|
133
132
|
const uiFilter: FilterSpec = {
|
|
134
133
|
type,
|
|
135
|
-
column: "colNum"
|
|
134
|
+
column: "colNum",
|
|
136
135
|
x: 10,
|
|
137
136
|
};
|
|
138
137
|
const result = convertFilterUiToExpressions(uiFilter);
|
|
@@ -147,8 +146,8 @@ describe("convertFilterUiToExpressions", () => {
|
|
|
147
146
|
it('should compile "lessThanColumn" filter to ptabler expression', () => {
|
|
148
147
|
const uiFilter: FilterSpec = {
|
|
149
148
|
type: "lessThanColumn",
|
|
150
|
-
column: "colNum1"
|
|
151
|
-
rhs: "colNum2"
|
|
149
|
+
column: "colNum1",
|
|
150
|
+
rhs: "colNum2",
|
|
152
151
|
};
|
|
153
152
|
const result = convertFilterUiToExpressions(uiFilter);
|
|
154
153
|
expect(result as any).toEqual({
|
|
@@ -161,8 +160,8 @@ describe("convertFilterUiToExpressions", () => {
|
|
|
161
160
|
it('should compile "lessThanColumn" filter with minDiff to ptabler expression', () => {
|
|
162
161
|
const uiFilter: FilterSpec = {
|
|
163
162
|
type: "lessThanColumn",
|
|
164
|
-
column: "colNum1"
|
|
165
|
-
rhs: "colNum2"
|
|
163
|
+
column: "colNum1",
|
|
164
|
+
rhs: "colNum2",
|
|
166
165
|
minDiff: 5,
|
|
167
166
|
};
|
|
168
167
|
const result = convertFilterUiToExpressions(uiFilter);
|
|
@@ -180,8 +179,8 @@ describe("convertFilterUiToExpressions", () => {
|
|
|
180
179
|
it('should compile "greaterThanColumn" filter to ptabler expression', () => {
|
|
181
180
|
const uiFilter: FilterSpec = {
|
|
182
181
|
type: "greaterThanColumn",
|
|
183
|
-
column: "colNum1"
|
|
184
|
-
rhs: "colNum2"
|
|
182
|
+
column: "colNum1",
|
|
183
|
+
rhs: "colNum2",
|
|
185
184
|
};
|
|
186
185
|
const result = convertFilterUiToExpressions(uiFilter);
|
|
187
186
|
expect(result as any).toEqual({
|
|
@@ -194,8 +193,8 @@ describe("convertFilterUiToExpressions", () => {
|
|
|
194
193
|
it('should compile "greaterThanColumn" filter with minDiff to ptabler expression', () => {
|
|
195
194
|
const uiFilter: FilterSpec = {
|
|
196
195
|
type: "greaterThanColumn",
|
|
197
|
-
column: "colNum1"
|
|
198
|
-
rhs: "colNum2"
|
|
196
|
+
column: "colNum1",
|
|
197
|
+
rhs: "colNum2",
|
|
199
198
|
minDiff: 7,
|
|
200
199
|
};
|
|
201
200
|
const result = convertFilterUiToExpressions(uiFilter);
|
|
@@ -213,8 +212,8 @@ describe("convertFilterUiToExpressions", () => {
|
|
|
213
212
|
it('should compile "equalToColumn" filter to ptabler expression', () => {
|
|
214
213
|
const uiFilter: FilterSpec = {
|
|
215
214
|
type: "equalToColumn",
|
|
216
|
-
column: "colNum1"
|
|
217
|
-
rhs: "colNum2"
|
|
215
|
+
column: "colNum1",
|
|
216
|
+
rhs: "colNum2",
|
|
218
217
|
};
|
|
219
218
|
const result = convertFilterUiToExpressions(uiFilter);
|
|
220
219
|
expect(result as any).toEqual({
|
|
@@ -227,8 +226,8 @@ describe("convertFilterUiToExpressions", () => {
|
|
|
227
226
|
it('should compile "greaterThanColumnOrEqual" filter to ptabler expression', () => {
|
|
228
227
|
const uiFilter: FilterSpec = {
|
|
229
228
|
type: "greaterThanColumnOrEqual",
|
|
230
|
-
column: "colNum1"
|
|
231
|
-
rhs: "colNum2"
|
|
229
|
+
column: "colNum1",
|
|
230
|
+
rhs: "colNum2",
|
|
232
231
|
};
|
|
233
232
|
const result = convertFilterUiToExpressions(uiFilter);
|
|
234
233
|
expect(result as any).toEqual({
|
|
@@ -241,8 +240,8 @@ describe("convertFilterUiToExpressions", () => {
|
|
|
241
240
|
it('should compile "greaterThanColumnOrEqual" filter with minDiff to ptabler expression', () => {
|
|
242
241
|
const uiFilter: FilterSpec = {
|
|
243
242
|
type: "greaterThanColumnOrEqual",
|
|
244
|
-
column: "colNum1"
|
|
245
|
-
rhs: "colNum2"
|
|
243
|
+
column: "colNum1",
|
|
244
|
+
rhs: "colNum2",
|
|
246
245
|
minDiff: 2,
|
|
247
246
|
};
|
|
248
247
|
const result = convertFilterUiToExpressions(uiFilter);
|
|
@@ -260,8 +259,8 @@ describe("convertFilterUiToExpressions", () => {
|
|
|
260
259
|
it('should compile "lessThanColumnOrEqual" filter to ptabler expression', () => {
|
|
261
260
|
const uiFilter: FilterSpec = {
|
|
262
261
|
type: "lessThanColumnOrEqual",
|
|
263
|
-
column: "colNum1"
|
|
264
|
-
rhs: "colNum2"
|
|
262
|
+
column: "colNum1",
|
|
263
|
+
rhs: "colNum2",
|
|
265
264
|
};
|
|
266
265
|
const result = convertFilterUiToExpressions(uiFilter);
|
|
267
266
|
expect(result as any).toEqual({
|
|
@@ -274,8 +273,8 @@ describe("convertFilterUiToExpressions", () => {
|
|
|
274
273
|
it('should compile "lessThanColumnOrEqual" filter with minDiff to ptabler expression', () => {
|
|
275
274
|
const uiFilter: FilterSpec = {
|
|
276
275
|
type: "lessThanColumnOrEqual",
|
|
277
|
-
column: "colNum1"
|
|
278
|
-
rhs: "colNum2"
|
|
276
|
+
column: "colNum1",
|
|
277
|
+
rhs: "colNum2",
|
|
279
278
|
minDiff: 3,
|
|
280
279
|
};
|
|
281
280
|
const result = convertFilterUiToExpressions(uiFilter);
|
|
@@ -293,7 +292,7 @@ describe("convertFilterUiToExpressions", () => {
|
|
|
293
292
|
it('should compile "topN" filter to ptabler expression', () => {
|
|
294
293
|
const uiFilter: FilterSpec = {
|
|
295
294
|
type: "topN",
|
|
296
|
-
column: "colNum"
|
|
295
|
+
column: "colNum",
|
|
297
296
|
n: 5,
|
|
298
297
|
};
|
|
299
298
|
const result = convertFilterUiToExpressions(uiFilter);
|
|
@@ -312,7 +311,7 @@ describe("convertFilterUiToExpressions", () => {
|
|
|
312
311
|
it('should compile "bottomN" filter to ptabler expression', () => {
|
|
313
312
|
const uiFilter: FilterSpec = {
|
|
314
313
|
type: "bottomN",
|
|
315
|
-
column: "colNum"
|
|
314
|
+
column: "colNum",
|
|
316
315
|
n: 3,
|
|
317
316
|
};
|
|
318
317
|
const result = convertFilterUiToExpressions(uiFilter);
|
|
@@ -335,15 +334,15 @@ describe("convertFilterUiToExpressions", () => {
|
|
|
335
334
|
{
|
|
336
335
|
type: "or",
|
|
337
336
|
filters: [
|
|
338
|
-
{ type: "isNA", column: "colA"
|
|
337
|
+
{ type: "isNA", column: "colA" },
|
|
339
338
|
{
|
|
340
339
|
type: "patternEquals",
|
|
341
|
-
column: "colB"
|
|
340
|
+
column: "colB",
|
|
342
341
|
value: "test",
|
|
343
342
|
},
|
|
344
343
|
],
|
|
345
344
|
},
|
|
346
|
-
{ type: "greaterThan", column: "colNum"
|
|
345
|
+
{ type: "greaterThan", column: "colNum", x: 10 },
|
|
347
346
|
],
|
|
348
347
|
};
|
|
349
348
|
const result = convertFilterUiToExpressions(uiFilter);
|
|
@@ -3,6 +3,7 @@ import {
|
|
|
3
3
|
parseJson,
|
|
4
4
|
readAnnotation,
|
|
5
5
|
type AxisQualification,
|
|
6
|
+
type MatchQualifications,
|
|
6
7
|
type PObjectId,
|
|
7
8
|
type PObjectSpec,
|
|
8
9
|
type StringifiedJson,
|
|
@@ -10,7 +11,6 @@ import {
|
|
|
10
11
|
} from "@milaboratories/pl-model-common";
|
|
11
12
|
import { throwError } from "@milaboratories/helpers";
|
|
12
13
|
import { isFunction, isNil } from "es-toolkit";
|
|
13
|
-
import type { MatchQualifications } from "../columns/column_collection_builder";
|
|
14
14
|
|
|
15
15
|
export type { Trace, TraceEntry } from "@milaboratories/pl-model-common";
|
|
16
16
|
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Annotation,
|
|
3
3
|
type AxisQualification,
|
|
4
|
+
type PColumn,
|
|
4
5
|
type PColumnSpec,
|
|
5
6
|
type PObjectId,
|
|
6
7
|
} from "@milaboratories/pl-model-common";
|
|
7
8
|
import { describe, expect, test } from "vitest";
|
|
8
9
|
import { deriveDistinctTooltips, type TooltipEntry } from "./derive_distinct_tooltips";
|
|
9
|
-
import type {
|
|
10
|
+
import type { PColumnDataUniversal } from "../render/internal";
|
|
10
11
|
|
|
11
12
|
function createSpec(name: string, label?: string): PColumnSpec {
|
|
12
13
|
return {
|
|
@@ -25,16 +26,18 @@ function axisQualification(
|
|
|
25
26
|
return { axis: { name: axisName }, contextDomain };
|
|
26
27
|
}
|
|
27
28
|
|
|
28
|
-
function linkerSnapshot(name: string, label?: string):
|
|
29
|
+
function linkerSnapshot(name: string, label?: string): PColumn<PColumnDataUniversal | undefined> {
|
|
29
30
|
return {
|
|
30
31
|
id: `linker-${name}` as PObjectId,
|
|
31
32
|
spec: createSpec(name, label),
|
|
32
|
-
dataStatus: "ready",
|
|
33
33
|
data: undefined,
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
36
|
|
|
37
|
-
function pathStep(
|
|
37
|
+
function pathStep(
|
|
38
|
+
linkerName: string,
|
|
39
|
+
label?: string,
|
|
40
|
+
): NonNullable<TooltipEntry["linkerPath"]>[number] {
|
|
38
41
|
return { linker: linkerSnapshot(linkerName, label) };
|
|
39
42
|
}
|
|
40
43
|
|
|
@@ -3,10 +3,10 @@ import {
|
|
|
3
3
|
PObjectId,
|
|
4
4
|
readAnnotation,
|
|
5
5
|
type AxisQualification,
|
|
6
|
+
type MatchQualifications,
|
|
6
7
|
type PColumnSpec,
|
|
7
8
|
} from "@milaboratories/pl-model-common";
|
|
8
9
|
import { isNil } from "es-toolkit";
|
|
9
|
-
import type { MatchQualifications, MatchVariant } from "../columns";
|
|
10
10
|
|
|
11
11
|
export type TooltipEntry = {
|
|
12
12
|
/** Main column spec — used for column-name fallback when no label. */
|
|
@@ -14,7 +14,7 @@ export type TooltipEntry = {
|
|
|
14
14
|
/** Qualifications carried by this variant. */
|
|
15
15
|
qualifications?: MatchQualifications;
|
|
16
16
|
/** Linker steps traversed to reach the hit column. */
|
|
17
|
-
linkerPath?:
|
|
17
|
+
linkerPath?: ReadonlyArray<{ readonly linker: { readonly spec: PColumnSpec } }>;
|
|
18
18
|
/** Position of this variant within the same physical column (1-based). */
|
|
19
19
|
variantIndex?: number;
|
|
20
20
|
/** Total variants for the same physical column. */
|
|
@@ -42,7 +42,7 @@ function formatTooltip(entry: TooltipEntry): undefined | string {
|
|
|
42
42
|
if (hit !== undefined) sections.push(hit);
|
|
43
43
|
|
|
44
44
|
if (sections.length <= 1) return undefined;
|
|
45
|
-
return sections.join("\n\n");
|
|
45
|
+
return sections.filter((s) => s.length > 0).join("\n\n");
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
const BULLET_1 = " • ";
|
package/src/pframe_utils/axes.ts
CHANGED
|
@@ -71,7 +71,7 @@ function getKeysCombinations(idsLists: AxisId[][]) {
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
export function getAvailableWithLinkersAxes(
|
|
74
|
-
linkerColumns: PColumn<PColumnDataUniversal>[],
|
|
74
|
+
linkerColumns: PColumn<undefined | PColumnDataUniversal>[],
|
|
75
75
|
blockAxes: AxesVault,
|
|
76
76
|
): AxesVault {
|
|
77
77
|
const linkerMap = LinkerMap.fromColumns(linkerColumns.map(getColumnIdAndSpec));
|
|
@@ -89,7 +89,7 @@ export function getAvailableWithLinkersAxes(
|
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
/** Add columns with fully compatible axes created from partial compatible ones */
|
|
92
|
-
export function enrichCompatible<T extends Omit<PColumn<PColumnDataUniversal>, "data">>(
|
|
92
|
+
export function enrichCompatible<T extends Omit<PColumn<undefined | PColumnDataUniversal>, "data">>(
|
|
93
93
|
blockAxes: AxesVault,
|
|
94
94
|
columns: T[],
|
|
95
95
|
): T[] {
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
PColumn,
|
|
3
|
-
PColumnSpec,
|
|
4
|
-
PColumnLazy,
|
|
5
|
-
PFrameDef,
|
|
6
|
-
PObjectId,
|
|
7
|
-
} from "@milaboratories/pl-model-common";
|
|
1
|
+
import type { PColumn, PColumnSpec, PFrameDef, PObjectId } from "@milaboratories/pl-model-common";
|
|
8
2
|
import {
|
|
9
3
|
getNormalizedAxesList,
|
|
10
4
|
getAxisId,
|
|
@@ -12,18 +6,18 @@ import {
|
|
|
12
6
|
isLinkerColumn,
|
|
13
7
|
matchAxisId,
|
|
14
8
|
isLabelColumn,
|
|
9
|
+
extractPObjectId,
|
|
15
10
|
} from "@milaboratories/pl-model-common";
|
|
16
11
|
import type { AxesVault } from "./axes";
|
|
17
12
|
import { enrichCompatible, getAvailableWithLinkersAxes } from "./axes";
|
|
18
13
|
import type { RenderCtxBase, PColumnDataUniversal } from "../render";
|
|
19
14
|
import { PColumnCollection } from "../render";
|
|
20
|
-
import {
|
|
21
|
-
import { collectCtxColumnSnapshotProviders } from "../columns/ctx_column_sources";
|
|
15
|
+
import { ColumnsCollection } from "../columns";
|
|
22
16
|
|
|
23
17
|
export function getAllRelatedColumns<A, U>(
|
|
24
18
|
ctx: RenderCtxBase<A, U>,
|
|
25
19
|
predicate: (spec: PColumnSpec) => boolean,
|
|
26
|
-
): PFrameDef<PColumn<
|
|
20
|
+
): PFrameDef<PColumn<undefined | PColumnDataUniversal>> {
|
|
27
21
|
// if current block doesn't produce own columns then use all columns from result pool
|
|
28
22
|
const columns = new PColumnCollection();
|
|
29
23
|
columns.addColumnProvider(ctx.resultPool);
|
|
@@ -54,10 +48,10 @@ export function getRelatedColumns<A, U>(
|
|
|
54
48
|
columns: rootColumns,
|
|
55
49
|
predicate,
|
|
56
50
|
}: {
|
|
57
|
-
columns: PColumn<PColumnDataUniversal>[];
|
|
51
|
+
columns: PColumn<undefined | PColumnDataUniversal>[];
|
|
58
52
|
predicate: (spec: PColumnSpec) => boolean;
|
|
59
53
|
},
|
|
60
|
-
): PFrameDef<PColumn<
|
|
54
|
+
): PFrameDef<PColumn<undefined | PColumnDataUniversal>> {
|
|
61
55
|
// if current block has its own columns then take from result pool only compatible with them
|
|
62
56
|
const columns = new PColumnCollection();
|
|
63
57
|
columns.addColumnProvider(ctx.resultPool);
|
|
@@ -161,7 +155,7 @@ export function getRelatedColumns<A, U>(
|
|
|
161
155
|
/** Column ids that discovery confirms integrate with the block, or `undefined` when it can't decide. */
|
|
162
156
|
function discoverIntegrableColumnIds<A, U>(
|
|
163
157
|
ctx: RenderCtxBase<A, U>,
|
|
164
|
-
rootColumns: PColumn<PColumnDataUniversal>[],
|
|
158
|
+
rootColumns: PColumn<undefined | PColumnDataUniversal>[],
|
|
165
159
|
): Set<PObjectId> | undefined {
|
|
166
160
|
const anchorSpecs = Array.from(
|
|
167
161
|
new Map(rootColumns.map((c) => [canonicalizeJson(c.spec), c.spec])).values(),
|
|
@@ -169,17 +163,14 @@ function discoverIntegrableColumnIds<A, U>(
|
|
|
169
163
|
if (anchorSpecs.length === 0) return undefined;
|
|
170
164
|
|
|
171
165
|
try {
|
|
172
|
-
const
|
|
173
|
-
.
|
|
174
|
-
|
|
175
|
-
|
|
166
|
+
const columns = ColumnsCollection(undefined, { ctx: ctx.ctx })
|
|
167
|
+
.discover({
|
|
168
|
+
mode: "enrichment",
|
|
169
|
+
maxHops: 4,
|
|
176
170
|
anchors: Object.fromEntries(anchorSpecs.map((spec, i) => [`anchor_${i}`, spec])),
|
|
177
|
-
})
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
} finally {
|
|
181
|
-
collection.dispose();
|
|
182
|
-
}
|
|
171
|
+
})
|
|
172
|
+
.getColumns();
|
|
173
|
+
return new Set(columns.map((c) => extractPObjectId(c.id)));
|
|
183
174
|
} catch {
|
|
184
175
|
return undefined;
|
|
185
176
|
}
|
|
@@ -310,7 +310,7 @@ export async function getColumnsFull(
|
|
|
310
310
|
export async function getColumnOrAxisValueLabelsId(
|
|
311
311
|
handle: PFrameHandle,
|
|
312
312
|
strAxisId: CanonicalizedJson<AxisId>,
|
|
313
|
-
): Promise<
|
|
313
|
+
): Promise<undefined | PObjectId> {
|
|
314
314
|
const labelColumns = await getColumnsFull(handle, {
|
|
315
315
|
selectedSources: [],
|
|
316
316
|
strictlyCompatible: false,
|
package/src/render/accessor.ts
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
AnyLogHandle,
|
|
3
|
-
ImportProgress,
|
|
4
|
-
LocalBlobHandleAndSize,
|
|
1
|
+
import {
|
|
2
|
+
type AnyLogHandle,
|
|
3
|
+
type ImportProgress,
|
|
4
|
+
type LocalBlobHandleAndSize,
|
|
5
|
+
type RemoteBlobHandleAndSize,
|
|
6
|
+
type FolderURL,
|
|
7
|
+
type ArchiveFormat,
|
|
8
|
+
type ProgressLogWithInfo,
|
|
9
|
+
type RangeBytes,
|
|
10
|
+
isPColumn,
|
|
11
|
+
mapPObjectData,
|
|
5
12
|
PColumn,
|
|
6
13
|
PObject,
|
|
7
|
-
RemoteBlobHandleAndSize,
|
|
8
|
-
FolderURL,
|
|
9
|
-
ArchiveFormat,
|
|
10
|
-
ProgressLogWithInfo,
|
|
11
|
-
RangeBytes,
|
|
12
14
|
} from "@milaboratories/pl-model-common";
|
|
13
|
-
import { isPColumn, mapPObjectData } from "@milaboratories/pl-model-common";
|
|
14
15
|
import { getCfgRenderCtx } from "../internal";
|
|
15
16
|
import { FutureRef } from "./future";
|
|
16
17
|
import type { AccessorHandle } from "./internal";
|
|
@@ -124,15 +125,11 @@ export class TreeNodeAccessor {
|
|
|
124
125
|
return this.resolveWithCommon({}, ...transformedSteps);
|
|
125
126
|
}
|
|
126
127
|
|
|
127
|
-
public
|
|
128
|
-
...steps: [
|
|
129
|
-
Omit<FieldTraversalStep, "errorIfFieldNotSet"> & {
|
|
130
|
-
errorIfFieldNotAssigned: true;
|
|
131
|
-
},
|
|
132
|
-
]
|
|
128
|
+
public traverse(
|
|
129
|
+
...steps: [Omit<FieldTraversalStep, "errorIfFieldNotSet"> & { errorIfFieldNotAssigned: true }]
|
|
133
130
|
): TreeNodeAccessor;
|
|
134
|
-
public
|
|
135
|
-
public
|
|
131
|
+
public traverse(...steps: (FieldTraversalStep | string)[]): TreeNodeAccessor | undefined;
|
|
132
|
+
public traverse(...steps: (FieldTraversalStep | string)[]): TreeNodeAccessor | undefined {
|
|
136
133
|
return this.resolveWithCommon({}, ...steps);
|
|
137
134
|
}
|
|
138
135
|
|
|
@@ -204,6 +201,10 @@ export class TreeNodeAccessor {
|
|
|
204
201
|
return JSON.parse(content);
|
|
205
202
|
}
|
|
206
203
|
|
|
204
|
+
public hasData(): boolean {
|
|
205
|
+
return getCfgRenderCtx().hasData(this.handle);
|
|
206
|
+
}
|
|
207
|
+
|
|
207
208
|
public getDataBase64(): string | undefined {
|
|
208
209
|
return getCfgRenderCtx().getDataBase64(this.handle);
|
|
209
210
|
}
|
|
@@ -250,9 +251,21 @@ export class TreeNodeAccessor {
|
|
|
250
251
|
return this.getDataAsJson<T>();
|
|
251
252
|
}
|
|
252
253
|
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
254
|
+
public getFileContentAsBase64(range?: RangeBytes): FutureRef<string | undefined> {
|
|
255
|
+
return new FutureRef(getCfgRenderCtx().getBlobContentAsBase64(this.handle, range));
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
public getFileContentAsString(range?: RangeBytes): FutureRef<string | undefined> {
|
|
259
|
+
return new FutureRef(getCfgRenderCtx().getBlobContentAsString(this.handle, range));
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
public getFileContentAsJson<T>(range?: RangeBytes): FutureRef<T | undefined> {
|
|
263
|
+
return new FutureRef<string | undefined>(
|
|
264
|
+
getCfgRenderCtx().getBlobContentAsString(this.handle, range),
|
|
265
|
+
).mapDefined((v) => JSON.parse(v) as T);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/** @deprecated */
|
|
256
269
|
public getPColumns(
|
|
257
270
|
errorOnUnknownField: boolean = false,
|
|
258
271
|
prefix: string = "",
|
|
@@ -268,9 +281,7 @@ export class TreeNodeAccessor {
|
|
|
268
281
|
return pf;
|
|
269
282
|
}
|
|
270
283
|
|
|
271
|
-
/**
|
|
272
|
-
*
|
|
273
|
-
*/
|
|
284
|
+
/** @deprecated */
|
|
274
285
|
public parsePObjectCollection(
|
|
275
286
|
errorOnUnknownField: boolean = false,
|
|
276
287
|
prefix: string = "",
|
|
@@ -290,20 +301,6 @@ export class TreeNodeAccessor {
|
|
|
290
301
|
return result;
|
|
291
302
|
}
|
|
292
303
|
|
|
293
|
-
public getFileContentAsBase64(range?: RangeBytes): FutureRef<string | undefined> {
|
|
294
|
-
return new FutureRef(getCfgRenderCtx().getBlobContentAsBase64(this.handle, range));
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
public getFileContentAsString(range?: RangeBytes): FutureRef<string | undefined> {
|
|
298
|
-
return new FutureRef(getCfgRenderCtx().getBlobContentAsString(this.handle, range));
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
public getFileContentAsJson<T>(range?: RangeBytes): FutureRef<T | undefined> {
|
|
302
|
-
return new FutureRef<string | undefined>(
|
|
303
|
-
getCfgRenderCtx().getBlobContentAsString(this.handle, range),
|
|
304
|
-
).mapDefined((v) => JSON.parse(v) as T);
|
|
305
|
-
}
|
|
306
|
-
|
|
307
304
|
/**
|
|
308
305
|
* @deprecated use getFileContentAsBase64
|
|
309
306
|
*/
|