@platforma-sdk/model 1.65.10 → 1.67.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.cjs +8 -11
- package/dist/block_model.cjs.map +1 -1
- package/dist/block_model.d.ts.map +1 -1
- package/dist/block_model.js +8 -10
- package/dist/block_model.js.map +1 -1
- package/dist/block_state_util.cjs +2 -1
- package/dist/block_state_util.cjs.map +1 -1
- package/dist/block_state_util.js +2 -1
- package/dist/block_state_util.js.map +1 -1
- package/dist/columns/column_collection_builder.cjs +62 -75
- package/dist/columns/column_collection_builder.cjs.map +1 -1
- package/dist/columns/column_collection_builder.d.ts +17 -23
- package/dist/columns/column_collection_builder.d.ts.map +1 -1
- package/dist/columns/column_collection_builder.js +63 -76
- package/dist/columns/column_collection_builder.js.map +1 -1
- package/dist/columns/column_selector.cjs.map +1 -1
- package/dist/columns/column_selector.d.ts +1 -1
- package/dist/columns/column_selector.js.map +1 -1
- package/dist/columns/column_snapshot.cjs.map +1 -1
- package/dist/columns/column_snapshot.d.ts +4 -4
- package/dist/columns/column_snapshot.d.ts.map +1 -1
- package/dist/columns/column_snapshot.js.map +1 -1
- package/dist/columns/ctx_column_sources.cjs.map +1 -1
- package/dist/columns/ctx_column_sources.d.ts +1 -1
- package/dist/columns/ctx_column_sources.d.ts.map +1 -1
- package/dist/columns/ctx_column_sources.js.map +1 -1
- package/dist/columns/index.cjs +2 -2
- package/dist/columns/index.d.ts +1 -1
- package/dist/columns/index.js +2 -2
- package/dist/components/PlDataTable/createPlDataTable/createPTableDefV2.cjs +2 -2
- package/dist/components/PlDataTable/createPlDataTable/createPTableDefV2.cjs.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/createPTableDefV2.js +2 -2
- package/dist/components/PlDataTable/createPlDataTable/createPTableDefV2.js.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/createPTableDefV3.cjs +17 -18
- package/dist/components/PlDataTable/createPlDataTable/createPTableDefV3.cjs.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/createPTableDefV3.js +17 -18
- package/dist/components/PlDataTable/createPlDataTable/createPTableDefV3.js.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/createPlDataTableV3.cjs +99 -91
- package/dist/components/PlDataTable/createPlDataTable/createPlDataTableV3.cjs.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/createPlDataTableV3.d.ts +17 -17
- package/dist/components/PlDataTable/createPlDataTable/createPlDataTableV3.d.ts.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/createPlDataTableV3.js +102 -94
- package/dist/components/PlDataTable/createPlDataTable/createPlDataTableV3.js.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/discoverColumns.cjs +32 -23
- package/dist/components/PlDataTable/createPlDataTable/discoverColumns.cjs.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/discoverColumns.d.ts +6 -6
- package/dist/components/PlDataTable/createPlDataTable/discoverColumns.d.ts.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/discoverColumns.js +33 -24
- package/dist/components/PlDataTable/createPlDataTable/discoverColumns.js.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/index.cjs.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/index.d.ts +2 -3
- package/dist/components/PlDataTable/createPlDataTable/index.d.ts.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/index.js.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/utils.cjs +133 -16
- package/dist/components/PlDataTable/createPlDataTable/utils.cjs.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/utils.d.ts +8 -6
- package/dist/components/PlDataTable/createPlDataTable/utils.d.ts.map +1 -1
- package/dist/components/PlDataTable/createPlDataTable/utils.js +130 -17
- package/dist/components/PlDataTable/createPlDataTable/utils.js.map +1 -1
- package/dist/components/PlDataTable/labels.cjs +1 -2
- package/dist/components/PlDataTable/labels.cjs.map +1 -1
- package/dist/components/PlDataTable/labels.js +1 -2
- package/dist/components/PlDataTable/labels.js.map +1 -1
- package/dist/components/PlDatasetSelector/build_dataset_options.cjs +41 -0
- package/dist/components/PlDatasetSelector/build_dataset_options.cjs.map +1 -0
- package/dist/components/PlDatasetSelector/build_dataset_options.d.ts +19 -0
- package/dist/components/PlDatasetSelector/build_dataset_options.d.ts.map +1 -0
- package/dist/components/PlDatasetSelector/build_dataset_options.js +41 -0
- package/dist/components/PlDatasetSelector/build_dataset_options.js.map +1 -0
- package/dist/components/PlDatasetSelector/filter_discovery.cjs +60 -0
- package/dist/components/PlDatasetSelector/filter_discovery.cjs.map +1 -0
- package/dist/components/PlDatasetSelector/filter_discovery.d.ts +31 -0
- package/dist/components/PlDatasetSelector/filter_discovery.d.ts.map +1 -0
- package/dist/components/PlDatasetSelector/filter_discovery.js +56 -0
- package/dist/components/PlDatasetSelector/filter_discovery.js.map +1 -0
- package/dist/components/PlDatasetSelector/index.cjs +2 -0
- package/dist/components/PlDatasetSelector/index.d.ts +2 -0
- package/dist/components/PlDatasetSelector/index.js +2 -0
- package/dist/components/index.cjs +3 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +3 -0
- package/dist/filters/distill.cjs +73 -30
- package/dist/filters/distill.cjs.map +1 -1
- package/dist/filters/distill.d.ts.map +1 -1
- package/dist/filters/distill.js +73 -30
- package/dist/filters/distill.js.map +1 -1
- package/dist/index.cjs +29 -19
- package/dist/index.d.ts +10 -6
- package/dist/index.js +12 -8
- package/dist/labels/derive_distinct_tooltips.cjs +85 -0
- package/dist/labels/derive_distinct_tooltips.cjs.map +1 -0
- package/dist/labels/derive_distinct_tooltips.d.ts +17 -0
- package/dist/labels/derive_distinct_tooltips.d.ts.map +1 -0
- package/dist/labels/derive_distinct_tooltips.js +84 -0
- package/dist/labels/derive_distinct_tooltips.js.map +1 -0
- package/dist/labels/index.cjs +1 -0
- package/dist/labels/index.d.ts +2 -1
- package/dist/labels/index.js +1 -0
- package/dist/package.cjs +1 -1
- package/dist/package.js +1 -1
- package/dist/render/api.cjs +8 -13
- package/dist/render/api.cjs.map +1 -1
- package/dist/render/api.d.ts +8 -11
- package/dist/render/api.d.ts.map +1 -1
- package/dist/render/api.js +8 -13
- package/dist/render/api.js.map +1 -1
- package/dist/services/get_services.cjs +19 -0
- package/dist/services/get_services.cjs.map +1 -0
- package/dist/services/get_services.d.ts +7 -0
- package/dist/services/get_services.d.ts.map +1 -0
- package/dist/services/get_services.js +19 -0
- package/dist/services/get_services.js.map +1 -0
- package/dist/services/index.cjs +1 -0
- package/dist/services/index.d.ts +2 -1
- package/dist/services/index.js +1 -0
- package/dist/services/service_bridge.cjs +4 -4
- package/dist/services/service_bridge.cjs.map +1 -1
- package/dist/services/service_bridge.d.ts +4 -4
- package/dist/services/service_bridge.d.ts.map +1 -1
- package/dist/services/service_bridge.js +4 -4
- package/dist/services/service_bridge.js.map +1 -1
- package/package.json +6 -6
- package/src/block_model.ts +8 -11
- package/src/block_state_util.ts +2 -1
- package/src/columns/column_collection_builder.test.ts +75 -30
- package/src/columns/column_collection_builder.ts +96 -133
- package/src/columns/column_selector.ts +1 -1
- package/src/columns/column_snapshot.ts +7 -4
- package/src/columns/ctx_column_sources.ts +1 -3
- package/src/components/PlDataTable/createPlDataTable/createPTableDefV2.ts +2 -2
- package/src/components/PlDataTable/createPlDataTable/createPTableDefV3.ts +44 -21
- package/src/components/PlDataTable/createPlDataTable/createPlDataTableV3.ts +202 -218
- package/src/components/PlDataTable/createPlDataTable/discoverColumns.ts +69 -56
- package/src/components/PlDataTable/createPlDataTable/index.ts +6 -7
- package/src/components/PlDataTable/createPlDataTable/utils.test.ts +97 -1
- package/src/components/PlDataTable/createPlDataTable/utils.ts +190 -35
- package/src/components/PlDataTable/labels.ts +3 -7
- package/src/components/PlDatasetSelector/build_dataset_options.ts +56 -0
- package/src/components/PlDatasetSelector/filter_discovery.test.ts +156 -0
- package/src/components/PlDatasetSelector/filter_discovery.ts +77 -0
- package/src/components/PlDatasetSelector/index.ts +2 -0
- package/src/components/index.ts +1 -0
- package/src/filters/distill.test.ts +91 -0
- package/src/filters/distill.ts +102 -46
- package/src/labels/derive_distinct_tooltips.test.ts +233 -0
- package/src/labels/derive_distinct_tooltips.ts +130 -0
- package/src/labels/index.ts +1 -0
- package/src/render/api.ts +15 -50
- package/src/services/get_services.ts +28 -0
- package/src/services/index.ts +1 -0
- package/src/services/service_bridge.ts +5 -5
package/dist/index.d.ts
CHANGED
|
@@ -44,14 +44,16 @@ import { distillFilterSpec } from "./filters/distill.js";
|
|
|
44
44
|
import { AnnotationSpec, AnnotationSpecUi, ExpressionSpec, FilterSpecUi } from "./annotations/types.js";
|
|
45
45
|
import { convertFilterSpecsToExpressionSpecs } from "./annotations/converter.js";
|
|
46
46
|
import { AnnotationScriptUi, AnnotationStepUi, AnyForm, FilterUi, FilterUiOfType, FilterUiType, FormField, TypeField, TypeFieldRecord, TypeForm, TypeToLiteral, compileAnnotationScript, compileFilter, compileFilters, unreachable } from "./components/PlAnnotations/filters_ui.js";
|
|
47
|
+
import { ColumnSelector, RelaxedAxisSelector, RelaxedColumnSelector, RelaxedRecord, RelaxedStringMatchers, StringMatcher, convertColumnSelectorToMultiColumnSelector, convertRelaxedAxisSelectorToMultiAxisSelector, convertRelaxedColumnSelectorToMultiColumnSelector } from "./columns/column_selector.js";
|
|
48
|
+
import { ColumnData, ColumnDataStatus, ColumnSnapshot, createColumnSnapshot, createReadyColumnData } from "./columns/column_snapshot.js";
|
|
49
|
+
import { ArrayColumnProvider, ColumnSnapshotProvider, ColumnSource, OutputColumnProvider, OutputColumnProviderOpts, SnapshotColumnProvider, isColumnSnapshotProvider, toColumnSnapshotProvider } from "./columns/column_snapshot_provider.js";
|
|
50
|
+
import { AnchorEntry, AnchoredBuildOptions, AnchoredColumnCollection, AnchoredFindColumnsOptions, BuildOptions, ColumnCollection, ColumnCollectionBuilder, ColumnMatch, FindColumnsOptions, MatchQualifications, MatchVariant, MatchingMode } from "./columns/column_collection_builder.js";
|
|
51
|
+
import { buildRefMap, filterMatchesToOptions, findFilterColumns } from "./components/PlDatasetSelector/filter_discovery.js";
|
|
52
|
+
import { BuildDatasetOptions, buildDatasetOptions } from "./components/PlDatasetSelector/build_dataset_options.js";
|
|
47
53
|
import { PTableParamsV2, PlDataTableFilterMeta, PlDataTableFilterSpecLeaf, PlDataTableFilters, PlDataTableFiltersWithMeta, PlDataTableGridStateCore, PlDataTableModel, PlDataTableSheet, PlDataTableSheetState, PlDataTableStateV2CacheEntry, PlDataTableStateV2Normalized, PlTableColumnId, PlTableColumnIdJson } from "./components/PlDataTable/typesV5.js";
|
|
48
54
|
import { PlDataTableStateV2, createDefaultPTableParams, createPlDataTableStateV2, upgradePlDataTableStateV2 } from "./components/PlDataTable/state-migration.js";
|
|
49
55
|
import { createPlDataTableSheet } from "./components/PlDataTable/createPlDataTableSheet.js";
|
|
50
56
|
import { createPlDataTableV2 } from "./components/PlDataTable/createPlDataTable/createPlDataTableV2.js";
|
|
51
|
-
import { ColumnData, ColumnDataStatus, ColumnSnapshot, createColumnSnapshot, createReadyColumnData } from "./columns/column_snapshot.js";
|
|
52
|
-
import { ArrayColumnProvider, ColumnSnapshotProvider, ColumnSource, OutputColumnProvider, OutputColumnProviderOpts, SnapshotColumnProvider, isColumnSnapshotProvider, toColumnSnapshotProvider } from "./columns/column_snapshot_provider.js";
|
|
53
|
-
import { ColumnSelector, RelaxedAxisSelector, RelaxedColumnSelector, RelaxedRecord, RelaxedStringMatchers, StringMatcher, convertColumnSelectorToMultiColumnSelector, convertRelaxedAxisSelectorToMultiAxisSelector, convertRelaxedColumnSelectorToMultiColumnSelector } from "./columns/column_selector.js";
|
|
54
|
-
import { AnchorEntry, AnchoredBuildOptions, AnchoredColumnCollection, AnchoredFindColumnsOptions, BuildOptions, ColumnCollection, ColumnCollectionBuilder, ColumnMatch, FindColumnsOptions, MatchQualifications, MatchVariant, MatchingMode } from "./columns/column_collection_builder.js";
|
|
55
57
|
import { ResultPoolColumnSnapshotProvider, collectCtxColumnSnapshotProviders } from "./columns/ctx_column_sources.js";
|
|
56
58
|
import { ExpandByPartitionOpts, ExpandByPartitionResult, SplitAxis, expandByPartition } from "./columns/expand_by_partition.js";
|
|
57
59
|
import { discoverTableColumnSnaphots } from "./components/PlDataTable/createPlDataTable/discoverColumns.js";
|
|
@@ -61,12 +63,14 @@ import { getEffectiveVisibility, getOrderPriority, isColumnHidden, isColumnOptio
|
|
|
61
63
|
import { PTableKey, PlSelectionModel, createPlSelectionModel } from "./components/PlSelectionModel.js";
|
|
62
64
|
import { PColumnPredicate, PlMultiSequenceAlignmentColorSchemeOption, PlMultiSequenceAlignmentModel, PlMultiSequenceAlignmentSettings, PlMultiSequenceAlignmentWidget, createRowSelectionColumn } from "./components/PlMultiSequenceAlignment.js";
|
|
63
65
|
import { PFrameImpl } from "./pframe.js";
|
|
66
|
+
import { TooltipEntry, deriveDistinctTooltips } from "./labels/derive_distinct_tooltips.js";
|
|
64
67
|
import { fromPlOption, fromPlRef } from "./ref_util.js";
|
|
65
68
|
import { getPlatformaApiVersion, getRawPlatformaInstance } from "./raw_globals.js";
|
|
66
69
|
import { getAllRelatedColumns, getRelatedColumns } from "./pframe_utils/columns.js";
|
|
67
70
|
import { getAxisUniqueValues, getColumnOrAxisValueLabelsId, getColumnSpecById, getColumnUniqueValues, getColumnsFull, getRequestColumnsFromSelectedSources, getSingleColumnData, getUniqueSourceValuesWithLabels } from "./pframe_utils/index.js";
|
|
68
|
-
import {
|
|
71
|
+
import { ServiceProxy, buildServices, createServiceProxy } from "./services/service_bridge.js";
|
|
72
|
+
import { getService } from "./services/get_services.js";
|
|
69
73
|
import { getEnvironmentValue } from "./env_value.js";
|
|
70
74
|
export * from "@milaboratories/pl-model-common";
|
|
71
75
|
export * from "@milaboratories/pl-error-like";
|
|
72
|
-
export { ActAnd, ActExtractArchiveAndGetURL, ActFlatten, ActGetBlobContent, ActGetBlobContentAsJson, ActGetBlobContentAsString, ActGetDownloadedBlobContent, ActGetField, ActGetFromCtx, ActGetImmediate, ActGetLastLogs, ActGetLogHandle, ActGetOnDemandBlobContent, ActGetProgressLog, ActGetProgressLogWithInfo, ActGetResourceField, ActGetResourceValueAsJson, ActImportProgress, ActIsEmpty, ActIsolate, ActMakeArray, ActMakeObject, ActMapArrayValues, ActMapRecordValues, ActMapResourceFields, ActNot, ActOr, ActionResult, AnchorEntry, AnchoredBuildOptions, AnchoredColumnCollection, AnchoredFindColumnsOptions, AndFilter, AnnotationFilter, AnnotationMode, AnnotationScript, AnnotationScript2, AnnotationScriptUi, AnnotationSpec, AnnotationSpecUi, AnnotationStep, AnnotationStepUi, AnyForm, Args, ArrayColumnProvider, AxesVault, AxisLabelProvider, BLOCK_SERVICE_FLAGS, BLOCK_STORAGE_FACADE_VERSION, BlockApiV1, BlockApiV2, BlockConfig, BlockConfigV3, BlockConfigV4, BlockDefaultModelServices, BlockDefaultUiServices, BlockModel, BlockModelInfo, BlockModelV3, BlockRenderCtx, BlockServiceFlags, BlockStatePatch, type BlockStorage, BlockStorageFacade, BlockStorageFacadeCallbacks, BlockStorageFacadeHandles, type BlockStorageSchemaVersion, BuildOptions, CancelSubscription, Cfg, CfgAnd, CfgBlobContent, CfgBlobContentAsJson, CfgBlobContentAsString, CfgDownloadedBlobContent, CfgExtractArchiveAndGetURL, CfgFlatten, CfgGetFromCtx, CfgGetJsonField, CfgGetResourceField, CfgImmediate, CfgImportProgress, CfgIsEmpty, CfgIsolate, CfgLastLogs, CfgLogHandle, CfgMakeArray, CfgMakeObject, CfgMapArrayValues, CfgMapRecordValues, CfgMapResourceFields, CfgNot, CfgOnDemandBlobContent, CfgOr, CfgProgressLog, CfgProgressLogWithInfo, CfgRenderingMode, CfgResourceValueAsJson, Checked, ColumnCollection, ColumnCollectionBuilder, ColumnData, ColumnDataStatus, ColumnMatch, ColumnMatcher, ColumnOrderRule, ColumnProvider, ColumnSelector, ColumnSnapshot, ColumnSnapshotProvider, ColumnSource, ColumnVisibilityRule, ColumnsDisplayOptions, ColumnsSelectorConfig, CommonFieldTraverseOps, CommonTraversalOps, ConfAction, ConfigRenderLambda, ConfigRenderLambdaFlags, ConfigResult, CurrentSdkInfo, DataModel, DataModelBuilder, DeriveHref, DeriveLabelsOptions, Entry, ExpandByPartitionOpts, ExpandByPartitionResult, ExpressionSpec, ExtractAction, ExtractFunctionHandleReturn, ExtractFutureRefType, FieldTraversalStep, FieldType, FilterSpec, FilterSpecLeaf, FilterSpecNode, FilterSpecOfType, FilterSpecType, FilterSpecUi, FilterUi, FilterUiOfType, FilterUiType, FindColumnsOptions, FormField, FutureRef, GetFieldStep, InferArgsType, InferBlockState, InferBlockStatePatch, InferDataType, InferFactoryData, InferFactoryModelServices, InferFactoryOutputs, InferFactoryParams, InferFactoryUiServices, InferHrefType, InferOutputType, InferOutputsFromConfigs, InferOutputsFromLambdas, InferOutputsType, InferPluginData, InferPluginHandle, InferPluginHandles, InferPluginNames, InferRenderFunctionReturn, InferUiState, InferVarTypeSafe, IsNA, It, internal_d_exports as JsRenderInternal, DeriveLabelsOptions as LabelDerivationOps, Log10, MainOutputs, MatchQualifications, MatchVariant, MatchingMode, type MigrateBlockStorageConfig, type MigrationFailure, type MigrationResult, type MigrationSuccess, ModelServices, type MutateStoragePayload,
|
|
76
|
+
export { ActAnd, ActExtractArchiveAndGetURL, ActFlatten, ActGetBlobContent, ActGetBlobContentAsJson, ActGetBlobContentAsString, ActGetDownloadedBlobContent, ActGetField, ActGetFromCtx, ActGetImmediate, ActGetLastLogs, ActGetLogHandle, ActGetOnDemandBlobContent, ActGetProgressLog, ActGetProgressLogWithInfo, ActGetResourceField, ActGetResourceValueAsJson, ActImportProgress, ActIsEmpty, ActIsolate, ActMakeArray, ActMakeObject, ActMapArrayValues, ActMapRecordValues, ActMapResourceFields, ActNot, ActOr, ActionResult, AnchorEntry, AnchoredBuildOptions, AnchoredColumnCollection, AnchoredFindColumnsOptions, AndFilter, AnnotationFilter, AnnotationMode, AnnotationScript, AnnotationScript2, AnnotationScriptUi, AnnotationSpec, AnnotationSpecUi, AnnotationStep, AnnotationStepUi, AnyForm, Args, ArrayColumnProvider, AxesVault, AxisLabelProvider, BLOCK_SERVICE_FLAGS, BLOCK_STORAGE_FACADE_VERSION, BlockApiV1, BlockApiV2, BlockConfig, BlockConfigV3, BlockConfigV4, BlockDefaultModelServices, BlockDefaultUiServices, BlockModel, BlockModelInfo, BlockModelV3, BlockRenderCtx, BlockServiceFlags, BlockStatePatch, type BlockStorage, BlockStorageFacade, BlockStorageFacadeCallbacks, BlockStorageFacadeHandles, type BlockStorageSchemaVersion, BuildDatasetOptions, BuildOptions, CancelSubscription, Cfg, CfgAnd, CfgBlobContent, CfgBlobContentAsJson, CfgBlobContentAsString, CfgDownloadedBlobContent, CfgExtractArchiveAndGetURL, CfgFlatten, CfgGetFromCtx, CfgGetJsonField, CfgGetResourceField, CfgImmediate, CfgImportProgress, CfgIsEmpty, CfgIsolate, CfgLastLogs, CfgLogHandle, CfgMakeArray, CfgMakeObject, CfgMapArrayValues, CfgMapRecordValues, CfgMapResourceFields, CfgNot, CfgOnDemandBlobContent, CfgOr, CfgProgressLog, CfgProgressLogWithInfo, CfgRenderingMode, CfgResourceValueAsJson, Checked, ColumnCollection, ColumnCollectionBuilder, ColumnData, ColumnDataStatus, ColumnMatch, ColumnMatcher, ColumnOrderRule, ColumnProvider, ColumnSelector, ColumnSnapshot, ColumnSnapshotProvider, ColumnSource, ColumnVisibilityRule, ColumnsDisplayOptions, ColumnsSelectorConfig, CommonFieldTraverseOps, CommonTraversalOps, ConfAction, ConfigRenderLambda, ConfigRenderLambdaFlags, ConfigResult, CurrentSdkInfo, DataModel, DataModelBuilder, DeriveHref, DeriveLabelsOptions, Entry, ExpandByPartitionOpts, ExpandByPartitionResult, ExpressionSpec, ExtractAction, ExtractFunctionHandleReturn, ExtractFutureRefType, FieldTraversalStep, FieldType, FilterSpec, FilterSpecLeaf, FilterSpecNode, FilterSpecOfType, FilterSpecType, FilterSpecUi, FilterUi, FilterUiOfType, FilterUiType, FindColumnsOptions, FormField, FutureRef, GetFieldStep, InferArgsType, InferBlockState, InferBlockStatePatch, InferDataType, InferFactoryData, InferFactoryModelServices, InferFactoryOutputs, InferFactoryParams, InferFactoryUiServices, InferHrefType, InferOutputType, InferOutputsFromConfigs, InferOutputsFromLambdas, InferOutputsType, InferPluginData, InferPluginHandle, InferPluginHandles, InferPluginNames, InferRenderFunctionReturn, InferUiState, InferVarTypeSafe, IsNA, It, internal_d_exports as JsRenderInternal, DeriveLabelsOptions as LabelDerivationOps, Log10, MainOutputs, MatchQualifications, MatchVariant, MatchingMode, type MigrateBlockStorageConfig, type MigrationFailure, type MigrationResult, type MigrationSuccess, ModelServices, type MutateStoragePayload, NotFilter, NumericalComparisonFilter, OptionalPlResourceEntry, OrFilter, OutputColumnProvider, OutputColumnProviderOpts, OutputError, PColumnCollection, PColumnDataUniversal, PColumnEntryUniversal, PColumnEntryWithLabel, PColumnKeyList, PColumnLazyUniversal, PColumnLazyWithLabel, PColumnPredicate, PColumnResourceMapData, PColumnResourceMapEntry, PFrameImpl, POCExtractAction, PTableKey, PTableParamsV2, type ParamsInput, Patch, PatternFilter, PatternPredicate, PatternPredicateContainSubsequence, PatternPredicateEquals, PlDataTableFilterMeta, PlDataTableFilterSpecLeaf, PlDataTableFilters, PlDataTableFiltersWithMeta, PlDataTableGridStateCore, PlDataTableModel, PlDataTableSheet, PlDataTableSheetState, PlDataTableStateV2, PlDataTableStateV2CacheEntry, PlDataTableStateV2Normalized, PlMultiSequenceAlignmentColorSchemeOption, PlMultiSequenceAlignmentModel, PlMultiSequenceAlignmentSettings, PlMultiSequenceAlignmentWidget, PlResourceEntry, PlSelectionModel, PlTableColumnId, PlTableColumnIdJson, Platforma, PlatformaApiVersion, PlatformaExtended, PlatformaFactory, PlatformaSDKVersion, PlatformaV1, PlatformaV2, PlatformaV3, type PluginConfig, type PluginData, PluginDataModel, PluginDataModelBuilder, type PluginDataModelVersions, type PluginFactory, PluginFactoryLike, PluginHandle, PluginInstance, PluginModel, type PluginName, type PluginOutputs, type PluginParams, type PluginRecord, type PluginRegistry, PluginRenderCtx, PrimitiveOrConfig, PrimitiveToCfg, RT_BINARY_PARTITIONED, RT_BINARY_SUPER_PARTITIONED, RT_JSON_PARTITIONED, RT_JSON_SUPER_PARTITIONED, RT_PARQUET_PARTITIONED, RT_PARQUET_SUPER_PARTITIONED, RT_RESOURCE_MAP, RT_RESOURCE_MAP_PARTITIONED, RelaxedAxisSelector, RelaxedColumnSelector, RelaxedRecord, RelaxedStringMatchers, RenderCtx, RenderCtxBase, RenderCtxLegacy, RenderFunction, RenderFunctionLegacy, ResolveCfgType, ResolveModelServices, ResolveUiServices, ResourceTraversalOps, ResourceType, ResultPool, ResultPoolColumnSnapshotProvider, SdkInfo, ServiceProxy, SimplifiedPColumnSpec, SimplifiedUniversalPColumnEntry, SnapshotColumnProvider, SortedCumulativeSum, Entry as SpecExtractorResult, SplitAxis, StagingOutputs, StdCtx, StdCtxArgsOnly, StringMatcher, TooltipEntry, Trace, TraceEntry, TransformedColumn, TreeNodeAccessor, TypeField, TypeFieldRecord, TypeForm, TypeToLiteral, TypedConfig, TypedConfigOrConfigLambda, TypedConfigOrString, UiServices, UiState, Unionize, UniversalColumnOption, UnwrapFutureRef, ValueRank, type VersionedData, allPColumnsReady, and, blockServiceNames, buildDatasetOptions, buildRefMap, buildServices, collectCtxColumnSnapshotProviders, compileAnnotationScript, compileFilter, compileFilters, convertColumnSelectorToMultiColumnSelector, convertFilterSpecsToExpressionSpecs, convertFilterUiToExpressionImpl, convertFilterUiToExpressions, convertOrParsePColumnData, convertRelaxedAxisSelectorToMultiAxisSelector, convertRelaxedColumnSelectorToMultiColumnSelector, createBlockStorage, createColumnSnapshot, createDefaultPTableParams, createPFrameForGraphs, createPlDataTable, createPlDataTableOptionsV3, createPlDataTableSheet, createPlDataTableStateV2, createPlDataTableV2, createPlDataTableV3, createPlSelectionModel, createReadyColumnData, createRowSelectionColumn, createServiceProxy, deriveDataFromStorage, deriveDistinctLabels, deriveDistinctTooltips, deriveLabels, discoverTableColumnSnaphots, distillFilterSpec, downgradeCfgOrLambda, enrichCompatible, expandByPartition, extractArchiveAndGetURL, extractConfig, filterDataInfoEntries, filterMatchesToOptions, filterSpecToSpecQueryExpr, findFilterColumns, flatten, fromPlOption, fromPlRef, getAllRelatedColumns, getAvailableWithLinkersAxes, getAxisUniqueValues, getBlobContent, getBlobContentAsJson, getBlobContentAsString, getColumnOrAxisValueLabelsId, getColumnSpecById, getColumnUniqueValues, getColumnsFull, getDownloadedBlobContent, getEffectiveVisibility, getEnvironmentValue, getFromCfg, getImmediate, getImportProgress, getJsonField, getLastLogs, getLogHandle, getOnDemandBlobContent, getOrderPriority, getPartitionKeysList, getPlatformaApiVersion, getPluginData, getProgressLog, getProgressLogWithInfo, getRawPlatformaInstance, getRelatedColumns, getRequestColumnsFromSelectedSources, getResourceField, getResourceValueAsJson, getService, getSingleColumnData, getStorageData, getUniquePartitionKeys, getUniqueSourceValuesWithLabels, ifDef, isBlockStorage, isColumnHidden, isColumnOptional, isColumnSnapshotProvider, isConfigLambda, isEmpty, isHiddenFromGraphColumn, isHiddenFromUIColumn, isPColumnReady, isPluginOutputKey, isolate, makeArray, makeObject, mapArrayValues, mapRecordValues, mapResourceFields, migrateBlockStorage, normalizeBlockStorage, not, or, parsePColumnData, parseResourceMap, pluginOutputKey, pluginOutputPrefix, readOutput, registerFacadeCallbacks, toColumnSnapshotProvider, unreachable, updateStorageData, upgradePlDataTableStateV2, wrapOutputs };
|
package/dist/index.js
CHANGED
|
@@ -13,6 +13,10 @@ import { deriveDistinctLabels } from "./labels/derive_distinct_labels.js";
|
|
|
13
13
|
import { deriveLabels } from "./render/util/label.js";
|
|
14
14
|
import { RT_BINARY_PARTITIONED, RT_BINARY_SUPER_PARTITIONED, RT_JSON_PARTITIONED, RT_JSON_SUPER_PARTITIONED, RT_PARQUET_PARTITIONED, RT_PARQUET_SUPER_PARTITIONED, RT_RESOURCE_MAP, RT_RESOURCE_MAP_PARTITIONED, allPColumnsReady, convertOrParsePColumnData, getPartitionKeysList, getUniquePartitionKeys, isPColumnReady, parsePColumnData, parseResourceMap } from "./render/util/pcolumn_data.js";
|
|
15
15
|
import { PColumnCollection } from "./render/util/column_collection.js";
|
|
16
|
+
import { BLOCK_SERVICE_FLAGS, blockServiceNames } from "./services/block_services.js";
|
|
17
|
+
import { buildServices, createServiceProxy } from "./services/service_bridge.js";
|
|
18
|
+
import { getService } from "./services/get_services.js";
|
|
19
|
+
import "./services/index.js";
|
|
16
20
|
import { BlockRenderCtx, PluginRenderCtx, RenderCtxBase, RenderCtxLegacy, ResultPool } from "./render/api.js";
|
|
17
21
|
import "./render/index.js";
|
|
18
22
|
import { CurrentSdkInfo, PlatformaSDKVersion } from "./version.js";
|
|
@@ -20,13 +24,18 @@ import { isConfigLambda } from "./bconfig/types.js";
|
|
|
20
24
|
import { downgradeCfgOrLambda, extractConfig } from "./bconfig/normalization.js";
|
|
21
25
|
import "./bconfig/index.js";
|
|
22
26
|
import { BlockModel } from "./block_model_legacy.js";
|
|
23
|
-
import { BLOCK_SERVICE_FLAGS, blockServiceNames } from "./services/block_services.js";
|
|
24
27
|
import { PluginDataModel, PluginDataModelBuilder, PluginInstance, PluginModel } from "./plugin_model.js";
|
|
25
28
|
import { BlockModelV3 } from "./block_model.js";
|
|
26
29
|
import { enrichCompatible, getAvailableWithLinkersAxes } from "./pframe_utils/axes.js";
|
|
27
30
|
import { getAllRelatedColumns, getRelatedColumns } from "./pframe_utils/columns.js";
|
|
28
31
|
import { createPFrameForGraphs, isHiddenFromGraphColumn, isHiddenFromUIColumn } from "./components/PFrameForGraphs.js";
|
|
29
32
|
import { compileAnnotationScript, compileFilter, compileFilters, unreachable } from "./components/PlAnnotations/filters_ui.js";
|
|
33
|
+
import { buildRefMap, filterMatchesToOptions, findFilterColumns } from "./components/PlDatasetSelector/filter_discovery.js";
|
|
34
|
+
import { convertColumnSelectorToMultiColumnSelector, convertRelaxedAxisSelectorToMultiAxisSelector, convertRelaxedColumnSelectorToMultiColumnSelector } from "./columns/column_selector.js";
|
|
35
|
+
import { ArrayColumnProvider, OutputColumnProvider, SnapshotColumnProvider, isColumnSnapshotProvider, toColumnSnapshotProvider } from "./columns/column_snapshot_provider.js";
|
|
36
|
+
import { ColumnCollectionBuilder } from "./columns/column_collection_builder.js";
|
|
37
|
+
import { ResultPoolColumnSnapshotProvider, collectCtxColumnSnapshotProviders } from "./columns/ctx_column_sources.js";
|
|
38
|
+
import { buildDatasetOptions } from "./components/PlDatasetSelector/build_dataset_options.js";
|
|
30
39
|
import { filterSpecToSpecQueryExpr } from "./filters/converters/filterToQuery.js";
|
|
31
40
|
import { convertFilterUiToExpressionImpl, convertFilterUiToExpressions } from "./filters/converters/filterUiToExpressionImpl.js";
|
|
32
41
|
import { distillFilterSpec } from "./filters/distill.js";
|
|
@@ -34,12 +43,9 @@ import "./filters/index.js";
|
|
|
34
43
|
import { createDefaultPTableParams, createPlDataTableStateV2, upgradePlDataTableStateV2 } from "./components/PlDataTable/state-migration.js";
|
|
35
44
|
import { createPlDataTableSheet } from "./components/PlDataTable/createPlDataTableSheet.js";
|
|
36
45
|
import { createColumnSnapshot, createReadyColumnData } from "./columns/column_snapshot.js";
|
|
37
|
-
import { ArrayColumnProvider, OutputColumnProvider, SnapshotColumnProvider, isColumnSnapshotProvider, toColumnSnapshotProvider } from "./columns/column_snapshot_provider.js";
|
|
38
|
-
import { convertColumnSelectorToMultiColumnSelector, convertRelaxedAxisSelectorToMultiAxisSelector, convertRelaxedColumnSelectorToMultiColumnSelector } from "./columns/column_selector.js";
|
|
39
|
-
import { ColumnCollectionBuilder } from "./columns/column_collection_builder.js";
|
|
40
|
-
import { ResultPoolColumnSnapshotProvider, collectCtxColumnSnapshotProviders } from "./columns/ctx_column_sources.js";
|
|
41
46
|
import { expandByPartition } from "./columns/expand_by_partition.js";
|
|
42
47
|
import "./columns/index.js";
|
|
48
|
+
import { deriveDistinctTooltips } from "./labels/derive_distinct_tooltips.js";
|
|
43
49
|
import { getEffectiveVisibility, getOrderPriority, isColumnHidden, isColumnOptional } from "./components/PlDataTable/createPlDataTable/utils.js";
|
|
44
50
|
import { createPlDataTableV2 } from "./components/PlDataTable/createPlDataTable/createPlDataTableV2.js";
|
|
45
51
|
import { discoverTableColumnSnaphots } from "./components/PlDataTable/createPlDataTable/discoverColumns.js";
|
|
@@ -55,9 +61,7 @@ import { getPlatformaApiVersion, getRawPlatformaInstance } from "./raw_globals.j
|
|
|
55
61
|
import { convertFilterSpecsToExpressionSpecs } from "./annotations/converter.js";
|
|
56
62
|
import "./annotations/index.js";
|
|
57
63
|
import { getAxisUniqueValues, getColumnOrAxisValueLabelsId, getColumnSpecById, getColumnUniqueValues, getColumnsFull, getRequestColumnsFromSelectedSources, getSingleColumnData, getUniqueSourceValuesWithLabels } from "./pframe_utils/index.js";
|
|
58
|
-
import { buildServices, createNodeServiceProxy } from "./services/service_bridge.js";
|
|
59
|
-
import "./services/index.js";
|
|
60
64
|
import { getEnvironmentValue } from "./env_value.js";
|
|
61
65
|
export * from "@milaboratories/pl-model-common";
|
|
62
66
|
export * from "@milaboratories/pl-error-like";
|
|
63
|
-
export { Args, ArrayColumnProvider, BLOCK_SERVICE_FLAGS, BLOCK_STORAGE_FACADE_VERSION, BlockModel, BlockModelV3, BlockRenderCtx, BlockStorageFacadeCallbacks, BlockStorageFacadeHandles, ColumnCollectionBuilder, CurrentSdkInfo, DataModel, DataModelBuilder, FutureRef, It, internal_exports as JsRenderInternal, MainOutputs, OutputColumnProvider, OutputError, PColumnCollection, PFrameImpl, PlatformaSDKVersion, PluginDataModel, PluginDataModelBuilder, PluginInstance, PluginModel, PluginRenderCtx, RT_BINARY_PARTITIONED, RT_BINARY_SUPER_PARTITIONED, RT_JSON_PARTITIONED, RT_JSON_SUPER_PARTITIONED, RT_PARQUET_PARTITIONED, RT_PARQUET_SUPER_PARTITIONED, RT_RESOURCE_MAP, RT_RESOURCE_MAP_PARTITIONED, RenderCtxBase, RenderCtxLegacy, ResultPool, ResultPoolColumnSnapshotProvider, SnapshotColumnProvider, StagingOutputs, TreeNodeAccessor, UiState, allPColumnsReady, and, blockServiceNames, buildServices, collectCtxColumnSnapshotProviders, compileAnnotationScript, compileFilter, compileFilters, convertColumnSelectorToMultiColumnSelector, convertFilterSpecsToExpressionSpecs, convertFilterUiToExpressionImpl, convertFilterUiToExpressions, convertOrParsePColumnData, convertRelaxedAxisSelectorToMultiAxisSelector, convertRelaxedColumnSelectorToMultiColumnSelector, createBlockStorage, createColumnSnapshot, createDefaultPTableParams,
|
|
67
|
+
export { Args, ArrayColumnProvider, BLOCK_SERVICE_FLAGS, BLOCK_STORAGE_FACADE_VERSION, BlockModel, BlockModelV3, BlockRenderCtx, BlockStorageFacadeCallbacks, BlockStorageFacadeHandles, ColumnCollectionBuilder, CurrentSdkInfo, DataModel, DataModelBuilder, FutureRef, It, internal_exports as JsRenderInternal, MainOutputs, OutputColumnProvider, OutputError, PColumnCollection, PFrameImpl, PlatformaSDKVersion, PluginDataModel, PluginDataModelBuilder, PluginInstance, PluginModel, PluginRenderCtx, RT_BINARY_PARTITIONED, RT_BINARY_SUPER_PARTITIONED, RT_JSON_PARTITIONED, RT_JSON_SUPER_PARTITIONED, RT_PARQUET_PARTITIONED, RT_PARQUET_SUPER_PARTITIONED, RT_RESOURCE_MAP, RT_RESOURCE_MAP_PARTITIONED, RenderCtxBase, RenderCtxLegacy, ResultPool, ResultPoolColumnSnapshotProvider, SnapshotColumnProvider, StagingOutputs, TreeNodeAccessor, UiState, allPColumnsReady, and, blockServiceNames, buildDatasetOptions, buildRefMap, buildServices, collectCtxColumnSnapshotProviders, compileAnnotationScript, compileFilter, compileFilters, convertColumnSelectorToMultiColumnSelector, convertFilterSpecsToExpressionSpecs, convertFilterUiToExpressionImpl, convertFilterUiToExpressions, convertOrParsePColumnData, convertRelaxedAxisSelectorToMultiAxisSelector, convertRelaxedColumnSelectorToMultiColumnSelector, createBlockStorage, createColumnSnapshot, createDefaultPTableParams, createPFrameForGraphs, createPlDataTable, createPlDataTableSheet, createPlDataTableStateV2, createPlDataTableV2, createPlDataTableV3, createPlSelectionModel, createReadyColumnData, createRowSelectionColumn, createServiceProxy, deriveDataFromStorage, deriveDistinctLabels, deriveDistinctTooltips, deriveLabels, discoverTableColumnSnaphots, distillFilterSpec, downgradeCfgOrLambda, enrichCompatible, expandByPartition, extractArchiveAndGetURL, extractConfig, filterDataInfoEntries, filterMatchesToOptions, filterSpecToSpecQueryExpr, findFilterColumns, flatten, fromPlOption, fromPlRef, getAllRelatedColumns, getAvailableWithLinkersAxes, getAxisUniqueValues, getBlobContent, getBlobContentAsJson, getBlobContentAsString, getColumnOrAxisValueLabelsId, getColumnSpecById, getColumnUniqueValues, getColumnsFull, getDownloadedBlobContent, getEffectiveVisibility, getEnvironmentValue, getFromCfg, getImmediate, getImportProgress, getJsonField, getLastLogs, getLogHandle, getOnDemandBlobContent, getOrderPriority, getPartitionKeysList, getPlatformaApiVersion, getPluginData, getProgressLog, getProgressLogWithInfo, getRawPlatformaInstance, getRelatedColumns, getRequestColumnsFromSelectedSources, getResourceField, getResourceValueAsJson, getService, getSingleColumnData, getStorageData, getUniquePartitionKeys, getUniqueSourceValuesWithLabels, ifDef, isBlockStorage, isColumnHidden, isColumnOptional, isColumnSnapshotProvider, isConfigLambda, isEmpty, isHiddenFromGraphColumn, isHiddenFromUIColumn, isPColumnReady, isPluginOutputKey, isolate, makeArray, makeObject, mapArrayValues, mapRecordValues, mapResourceFields, migrateBlockStorage, normalizeBlockStorage, not, or, parsePColumnData, parseResourceMap, pluginOutputKey, pluginOutputPrefix, readOutput, registerFacadeCallbacks, toColumnSnapshotProvider, unreachable, updateStorageData, upgradePlDataTableStateV2, wrapOutputs };
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
require("../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
let _milaboratories_pl_model_common = require("@milaboratories/pl-model-common");
|
|
3
|
+
let es_toolkit = require("es-toolkit");
|
|
4
|
+
//#region src/labels/derive_distinct_tooltips.ts
|
|
5
|
+
/** Format tooltip strings for each entry. Returns `undefined` when nothing useful. */
|
|
6
|
+
function deriveDistinctTooltips(entries) {
|
|
7
|
+
return entries.map(formatTooltip);
|
|
8
|
+
}
|
|
9
|
+
function formatTooltip(entry) {
|
|
10
|
+
const sections = [];
|
|
11
|
+
const header = formatHeader(entry);
|
|
12
|
+
if (header !== void 0) sections.push(header);
|
|
13
|
+
const origin = formatOriginPath(entry);
|
|
14
|
+
if (origin !== void 0) sections.push(origin);
|
|
15
|
+
const anchors = formatAnchors(entry.qualifications);
|
|
16
|
+
if (anchors !== void 0) sections.push(anchors);
|
|
17
|
+
const hit = formatHit(entry.qualifications);
|
|
18
|
+
if (hit !== void 0) sections.push(hit);
|
|
19
|
+
const distinctive = formatDistinctive(entry.distinctiveQualifications);
|
|
20
|
+
if (distinctive !== void 0) sections.push(distinctive);
|
|
21
|
+
if (sections.length <= 1) return void 0;
|
|
22
|
+
return sections.join("\n\n");
|
|
23
|
+
}
|
|
24
|
+
const BULLET_1 = " • ";
|
|
25
|
+
const SUB_BULLET = " ";
|
|
26
|
+
function formatHeader(entry) {
|
|
27
|
+
const lines = [];
|
|
28
|
+
if (entry.variantCount !== void 0 && entry.variantCount > 1) lines.push(`Variant: ${entry.variantIndex ?? "?"} of ${entry.variantCount}`);
|
|
29
|
+
return lines.join("\n");
|
|
30
|
+
}
|
|
31
|
+
function formatOriginPath(entry) {
|
|
32
|
+
const path = entry.linkerPath ?? [];
|
|
33
|
+
if (path.length === 0) return void 0;
|
|
34
|
+
const lines = ["Origin path"];
|
|
35
|
+
path.forEach((step, i) => {
|
|
36
|
+
const label = (0, _milaboratories_pl_model_common.readAnnotation)(step.linker.spec, _milaboratories_pl_model_common.Annotation.LinkLabel) ?? (0, _milaboratories_pl_model_common.readAnnotation)(step.linker.spec, _milaboratories_pl_model_common.Annotation.Label) ?? step.linker.spec.name;
|
|
37
|
+
lines.push(`${BULLET_1}linker ${i + 1}: ${label}`);
|
|
38
|
+
const qs = formatAxisQualifications(step.qualifications);
|
|
39
|
+
if (qs !== void 0) lines.push(`${SUB_BULLET}qualifies: ${qs}`);
|
|
40
|
+
});
|
|
41
|
+
const hitName = (0, _milaboratories_pl_model_common.readAnnotation)(entry.spec, _milaboratories_pl_model_common.Annotation.Label) ?? entry.spec.name;
|
|
42
|
+
lines.push(`${BULLET_1}hit column: ${hitName}`);
|
|
43
|
+
return lines.join("\n");
|
|
44
|
+
}
|
|
45
|
+
function formatAnchors(q) {
|
|
46
|
+
if ((0, es_toolkit.isNil)(q)) return void 0;
|
|
47
|
+
const ids = Object.keys(q.forQueries);
|
|
48
|
+
if (ids.length === 0) return void 0;
|
|
49
|
+
const lines = [];
|
|
50
|
+
for (const id of ids) {
|
|
51
|
+
const item = q.forQueries[id];
|
|
52
|
+
if (item.length === 0) continue;
|
|
53
|
+
const rendered = formatAxisQualifications(item);
|
|
54
|
+
lines.push(`${BULLET_1}${id}${rendered !== void 0 ? ` ${rendered}` : ""}`);
|
|
55
|
+
}
|
|
56
|
+
return lines.length > 0 ? ["Anchors (bound via this variant)"].concat(lines).join("\n") : void 0;
|
|
57
|
+
}
|
|
58
|
+
function formatHit(q) {
|
|
59
|
+
if ((0, es_toolkit.isNil)(q) || q.forHit.length === 0) return void 0;
|
|
60
|
+
const rendered = formatAxisQualifications(q.forHit);
|
|
61
|
+
if (rendered === void 0) return void 0;
|
|
62
|
+
return ["Hit column qualifications", `${BULLET_1}${rendered}`].join("\n");
|
|
63
|
+
}
|
|
64
|
+
function formatDistinctive(q) {
|
|
65
|
+
if ((0, es_toolkit.isNil)(q)) return void 0;
|
|
66
|
+
const bullets = [];
|
|
67
|
+
for (const id of Object.keys(q.forQueries)) for (const item of q.forQueries[id]) bullets.push(`${BULLET_1}${id}: ${formatQualification(item)}`);
|
|
68
|
+
for (const item of q.forHit) bullets.push(`${BULLET_1}hit: ${formatQualification(item)}`);
|
|
69
|
+
if (bullets.length === 0) return void 0;
|
|
70
|
+
return ["Distinctive (what separates this variant)", ...bullets].join("\n");
|
|
71
|
+
}
|
|
72
|
+
function formatAxisQualifications(qs) {
|
|
73
|
+
if (qs.length === 0) return void 0;
|
|
74
|
+
return qs.map(formatQualification).join("; ");
|
|
75
|
+
}
|
|
76
|
+
function formatQualification(q) {
|
|
77
|
+
const axisName = typeof q.axis === "string" ? q.axis : q.axis.name ?? JSON.stringify(q.axis);
|
|
78
|
+
const entries = Object.entries(q.contextDomain);
|
|
79
|
+
if (entries.length === 0) return axisName;
|
|
80
|
+
return `${axisName} context: ${entries.map(([k, v]) => `${k}=${v}`).join(", ")}`;
|
|
81
|
+
}
|
|
82
|
+
//#endregion
|
|
83
|
+
exports.deriveDistinctTooltips = deriveDistinctTooltips;
|
|
84
|
+
|
|
85
|
+
//# sourceMappingURL=derive_distinct_tooltips.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"derive_distinct_tooltips.cjs","names":["Annotation"],"sources":["../../src/labels/derive_distinct_tooltips.ts"],"sourcesContent":["import {\n Annotation,\n PObjectId,\n readAnnotation,\n type AxisQualification,\n type PColumnSpec,\n} from \"@milaboratories/pl-model-common\";\nimport { isNil } from \"es-toolkit\";\nimport type { MatchQualifications, MatchVariant } from \"../columns\";\n\nexport type TooltipEntry = {\n /** Main column spec — used for column-name fallback when no label. */\n spec: PColumnSpec;\n /** Full qualifications carried by this variant. */\n qualifications?: MatchQualifications;\n /** Minimal qualifications that separate this variant from its siblings. */\n distinctiveQualifications?: MatchQualifications;\n /** Linker steps traversed to reach the hit column. */\n linkerPath?: MatchVariant[\"path\"];\n /** Position of this variant within the same physical column (1-based). */\n variantIndex?: number;\n /** Total variants for the same physical column. */\n variantCount?: number;\n};\n\n/** Format tooltip strings for each entry. Returns `undefined` when nothing useful. */\nexport function deriveDistinctTooltips(entries: TooltipEntry[]): (undefined | string)[] {\n return entries.map(formatTooltip);\n}\n\nfunction formatTooltip(entry: TooltipEntry): undefined | string {\n const sections: string[] = [];\n\n const header = formatHeader(entry);\n if (header !== undefined) sections.push(header);\n\n const origin = formatOriginPath(entry);\n if (origin !== undefined) sections.push(origin);\n\n const anchors = formatAnchors(entry.qualifications);\n if (anchors !== undefined) sections.push(anchors);\n\n const hit = formatHit(entry.qualifications);\n if (hit !== undefined) sections.push(hit);\n\n const distinctive = formatDistinctive(entry.distinctiveQualifications);\n if (distinctive !== undefined) sections.push(distinctive);\n\n if (sections.length <= 1) return undefined;\n return sections.join(\"\\n\\n\");\n}\n\nconst BULLET_1 = \" • \";\nconst SUB_BULLET = \" \";\n\nfunction formatHeader(entry: TooltipEntry): undefined | string {\n const lines: string[] = [];\n if (entry.variantCount !== undefined && entry.variantCount > 1) {\n lines.push(`Variant: ${entry.variantIndex ?? \"?\"} of ${entry.variantCount}`);\n }\n return lines.join(\"\\n\");\n}\n\nfunction formatOriginPath(entry: TooltipEntry): undefined | string {\n const path = entry.linkerPath ?? [];\n if (path.length === 0) return undefined;\n\n const lines = [\"Origin path\"];\n path.forEach((step, i) => {\n const label =\n readAnnotation(step.linker.spec, Annotation.LinkLabel) ??\n readAnnotation(step.linker.spec, Annotation.Label) ??\n step.linker.spec.name;\n lines.push(`${BULLET_1}linker ${i + 1}: ${label}`);\n const qs = formatAxisQualifications(step.qualifications);\n if (qs !== undefined) lines.push(`${SUB_BULLET}qualifies: ${qs}`);\n });\n const hitName = readAnnotation(entry.spec, Annotation.Label) ?? entry.spec.name;\n lines.push(`${BULLET_1}hit column: ${hitName}`);\n return lines.join(\"\\n\");\n}\n\nfunction formatAnchors(q: undefined | MatchQualifications): undefined | string {\n if (isNil(q)) return undefined;\n const ids = Object.keys(q.forQueries);\n if (ids.length === 0) return undefined;\n\n const lines = [];\n for (const id of ids) {\n const item = q.forQueries[id as PObjectId];\n if (item.length === 0) continue;\n const rendered = formatAxisQualifications(item);\n lines.push(`${BULLET_1}${id}${rendered !== undefined ? ` ${rendered}` : \"\"}`);\n }\n return lines.length > 0\n ? [\"Anchors (bound via this variant)\"].concat(lines).join(\"\\n\")\n : undefined;\n}\n\nfunction formatHit(q: undefined | MatchQualifications): undefined | string {\n if (isNil(q) || q.forHit.length === 0) return undefined;\n const rendered = formatAxisQualifications(q.forHit);\n if (rendered === undefined) return undefined;\n return [\"Hit column qualifications\", `${BULLET_1}${rendered}`].join(\"\\n\");\n}\n\nfunction formatDistinctive(q: undefined | MatchQualifications): undefined | string {\n if (isNil(q)) return undefined;\n const bullets: string[] = [];\n for (const id of Object.keys(q.forQueries)) {\n for (const item of q.forQueries[id as PObjectId])\n bullets.push(`${BULLET_1}${id}: ${formatQualification(item)}`);\n }\n for (const item of q.forHit) bullets.push(`${BULLET_1}hit: ${formatQualification(item)}`);\n if (bullets.length === 0) return undefined;\n return [\"Distinctive (what separates this variant)\", ...bullets].join(\"\\n\");\n}\n\nfunction formatAxisQualifications(qs: AxisQualification[]): undefined | string {\n if (qs.length === 0) return undefined;\n return qs.map(formatQualification).join(\"; \");\n}\n\nfunction formatQualification(q: AxisQualification): string {\n const axisName = typeof q.axis === \"string\" ? q.axis : (q.axis.name ?? JSON.stringify(q.axis));\n const entries = Object.entries(q.contextDomain);\n if (entries.length === 0) return axisName;\n const kv = entries.map(([k, v]) => `${k}=${v}`).join(\", \");\n return `${axisName} context: ${kv}`;\n}\n"],"mappings":";;;;;AA0BA,SAAgB,uBAAuB,SAAiD;AACtF,QAAO,QAAQ,IAAI,cAAc;;AAGnC,SAAS,cAAc,OAAyC;CAC9D,MAAM,WAAqB,EAAE;CAE7B,MAAM,SAAS,aAAa,MAAM;AAClC,KAAI,WAAW,KAAA,EAAW,UAAS,KAAK,OAAO;CAE/C,MAAM,SAAS,iBAAiB,MAAM;AACtC,KAAI,WAAW,KAAA,EAAW,UAAS,KAAK,OAAO;CAE/C,MAAM,UAAU,cAAc,MAAM,eAAe;AACnD,KAAI,YAAY,KAAA,EAAW,UAAS,KAAK,QAAQ;CAEjD,MAAM,MAAM,UAAU,MAAM,eAAe;AAC3C,KAAI,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zD,MAAM,WAAW,OAAO,EAAE,SAAS,WAAW,EAAE,OAAQ,EAAE,KAAK,QAAQ,KAAK,UAAU,EAAE,KAAK;CAC7F,MAAM,UAAU,OAAO,QAAQ,EAAE,cAAc;AAC/C,KAAI,QAAQ,WAAW,EAAG,QAAO;AAEjC,QAAO,GAAG,SAAS,YADR,QAAQ,KAAK,CAAC,GAAG,OAAO,GAAG,EAAE,GAAG,IAAI,CAAC,KAAK,KAAK"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { MatchQualifications, MatchVariant } from "../columns/column_collection_builder.js";
|
|
2
|
+
import { PColumnSpec } from "@milaboratories/pl-model-common";
|
|
3
|
+
|
|
4
|
+
//#region src/labels/derive_distinct_tooltips.d.ts
|
|
5
|
+
type TooltipEntry = {
|
|
6
|
+
/** Main column spec — used for column-name fallback when no label. */spec: PColumnSpec; /** Full qualifications carried by this variant. */
|
|
7
|
+
qualifications?: MatchQualifications; /** Minimal qualifications that separate this variant from its siblings. */
|
|
8
|
+
distinctiveQualifications?: MatchQualifications; /** Linker steps traversed to reach the hit column. */
|
|
9
|
+
linkerPath?: MatchVariant["path"]; /** Position of this variant within the same physical column (1-based). */
|
|
10
|
+
variantIndex?: number; /** Total variants for the same physical column. */
|
|
11
|
+
variantCount?: number;
|
|
12
|
+
};
|
|
13
|
+
/** Format tooltip strings for each entry. Returns `undefined` when nothing useful. */
|
|
14
|
+
declare function deriveDistinctTooltips(entries: TooltipEntry[]): (undefined | string)[];
|
|
15
|
+
//#endregion
|
|
16
|
+
export { TooltipEntry, deriveDistinctTooltips };
|
|
17
|
+
//# sourceMappingURL=derive_distinct_tooltips.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"derive_distinct_tooltips.d.ts","names":[],"sources":["../../src/labels/derive_distinct_tooltips.ts"],"mappings":";;;;KAUY,YAAA;wEAEV,IAAA,EAAM,WAAA,EAFI;EAIV,cAAA,GAAiB,mBAAA;EAEjB,yBAAA,GAA4B,mBAAA,EAFX;EAIjB,UAAA,GAAa,YAAA,UAAA;EAEb,YAAA,WAFyB;EAIzB,YAAA;AAAA;;iBAIc,sBAAA,CAAuB,OAAA,EAAS,YAAA"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { Annotation, readAnnotation } from "@milaboratories/pl-model-common";
|
|
2
|
+
import { isNil } from "es-toolkit";
|
|
3
|
+
//#region src/labels/derive_distinct_tooltips.ts
|
|
4
|
+
/** Format tooltip strings for each entry. Returns `undefined` when nothing useful. */
|
|
5
|
+
function deriveDistinctTooltips(entries) {
|
|
6
|
+
return entries.map(formatTooltip);
|
|
7
|
+
}
|
|
8
|
+
function formatTooltip(entry) {
|
|
9
|
+
const sections = [];
|
|
10
|
+
const header = formatHeader(entry);
|
|
11
|
+
if (header !== void 0) sections.push(header);
|
|
12
|
+
const origin = formatOriginPath(entry);
|
|
13
|
+
if (origin !== void 0) sections.push(origin);
|
|
14
|
+
const anchors = formatAnchors(entry.qualifications);
|
|
15
|
+
if (anchors !== void 0) sections.push(anchors);
|
|
16
|
+
const hit = formatHit(entry.qualifications);
|
|
17
|
+
if (hit !== void 0) sections.push(hit);
|
|
18
|
+
const distinctive = formatDistinctive(entry.distinctiveQualifications);
|
|
19
|
+
if (distinctive !== void 0) sections.push(distinctive);
|
|
20
|
+
if (sections.length <= 1) return void 0;
|
|
21
|
+
return sections.join("\n\n");
|
|
22
|
+
}
|
|
23
|
+
const BULLET_1 = " • ";
|
|
24
|
+
const SUB_BULLET = " ";
|
|
25
|
+
function formatHeader(entry) {
|
|
26
|
+
const lines = [];
|
|
27
|
+
if (entry.variantCount !== void 0 && entry.variantCount > 1) lines.push(`Variant: ${entry.variantIndex ?? "?"} of ${entry.variantCount}`);
|
|
28
|
+
return lines.join("\n");
|
|
29
|
+
}
|
|
30
|
+
function formatOriginPath(entry) {
|
|
31
|
+
const path = entry.linkerPath ?? [];
|
|
32
|
+
if (path.length === 0) return void 0;
|
|
33
|
+
const lines = ["Origin path"];
|
|
34
|
+
path.forEach((step, i) => {
|
|
35
|
+
const label = readAnnotation(step.linker.spec, Annotation.LinkLabel) ?? readAnnotation(step.linker.spec, Annotation.Label) ?? step.linker.spec.name;
|
|
36
|
+
lines.push(`${BULLET_1}linker ${i + 1}: ${label}`);
|
|
37
|
+
const qs = formatAxisQualifications(step.qualifications);
|
|
38
|
+
if (qs !== void 0) lines.push(`${SUB_BULLET}qualifies: ${qs}`);
|
|
39
|
+
});
|
|
40
|
+
const hitName = readAnnotation(entry.spec, Annotation.Label) ?? entry.spec.name;
|
|
41
|
+
lines.push(`${BULLET_1}hit column: ${hitName}`);
|
|
42
|
+
return lines.join("\n");
|
|
43
|
+
}
|
|
44
|
+
function formatAnchors(q) {
|
|
45
|
+
if (isNil(q)) return void 0;
|
|
46
|
+
const ids = Object.keys(q.forQueries);
|
|
47
|
+
if (ids.length === 0) return void 0;
|
|
48
|
+
const lines = [];
|
|
49
|
+
for (const id of ids) {
|
|
50
|
+
const item = q.forQueries[id];
|
|
51
|
+
if (item.length === 0) continue;
|
|
52
|
+
const rendered = formatAxisQualifications(item);
|
|
53
|
+
lines.push(`${BULLET_1}${id}${rendered !== void 0 ? ` ${rendered}` : ""}`);
|
|
54
|
+
}
|
|
55
|
+
return lines.length > 0 ? ["Anchors (bound via this variant)"].concat(lines).join("\n") : void 0;
|
|
56
|
+
}
|
|
57
|
+
function formatHit(q) {
|
|
58
|
+
if (isNil(q) || q.forHit.length === 0) return void 0;
|
|
59
|
+
const rendered = formatAxisQualifications(q.forHit);
|
|
60
|
+
if (rendered === void 0) return void 0;
|
|
61
|
+
return ["Hit column qualifications", `${BULLET_1}${rendered}`].join("\n");
|
|
62
|
+
}
|
|
63
|
+
function formatDistinctive(q) {
|
|
64
|
+
if (isNil(q)) return void 0;
|
|
65
|
+
const bullets = [];
|
|
66
|
+
for (const id of Object.keys(q.forQueries)) for (const item of q.forQueries[id]) bullets.push(`${BULLET_1}${id}: ${formatQualification(item)}`);
|
|
67
|
+
for (const item of q.forHit) bullets.push(`${BULLET_1}hit: ${formatQualification(item)}`);
|
|
68
|
+
if (bullets.length === 0) return void 0;
|
|
69
|
+
return ["Distinctive (what separates this variant)", ...bullets].join("\n");
|
|
70
|
+
}
|
|
71
|
+
function formatAxisQualifications(qs) {
|
|
72
|
+
if (qs.length === 0) return void 0;
|
|
73
|
+
return qs.map(formatQualification).join("; ");
|
|
74
|
+
}
|
|
75
|
+
function formatQualification(q) {
|
|
76
|
+
const axisName = typeof q.axis === "string" ? q.axis : q.axis.name ?? JSON.stringify(q.axis);
|
|
77
|
+
const entries = Object.entries(q.contextDomain);
|
|
78
|
+
if (entries.length === 0) return axisName;
|
|
79
|
+
return `${axisName} context: ${entries.map(([k, v]) => `${k}=${v}`).join(", ")}`;
|
|
80
|
+
}
|
|
81
|
+
//#endregion
|
|
82
|
+
export { deriveDistinctTooltips };
|
|
83
|
+
|
|
84
|
+
//# sourceMappingURL=derive_distinct_tooltips.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"derive_distinct_tooltips.js","names":[],"sources":["../../src/labels/derive_distinct_tooltips.ts"],"sourcesContent":["import {\n Annotation,\n PObjectId,\n readAnnotation,\n type AxisQualification,\n type PColumnSpec,\n} from \"@milaboratories/pl-model-common\";\nimport { isNil } from \"es-toolkit\";\nimport type { MatchQualifications, MatchVariant } from \"../columns\";\n\nexport type TooltipEntry = {\n /** Main column spec — used for column-name fallback when no label. */\n spec: PColumnSpec;\n /** Full qualifications carried by this variant. */\n qualifications?: MatchQualifications;\n /** Minimal qualifications that separate this variant from its siblings. */\n distinctiveQualifications?: MatchQualifications;\n /** Linker steps traversed to reach the hit column. */\n linkerPath?: MatchVariant[\"path\"];\n /** Position of this variant within the same physical column (1-based). */\n variantIndex?: number;\n /** Total variants for the same physical column. */\n variantCount?: number;\n};\n\n/** Format tooltip strings for each entry. Returns `undefined` when nothing useful. */\nexport function deriveDistinctTooltips(entries: TooltipEntry[]): (undefined | string)[] {\n return entries.map(formatTooltip);\n}\n\nfunction formatTooltip(entry: TooltipEntry): undefined | string {\n const sections: string[] = [];\n\n const header = formatHeader(entry);\n if (header !== undefined) sections.push(header);\n\n const origin = formatOriginPath(entry);\n if (origin !== undefined) sections.push(origin);\n\n const anchors = formatAnchors(entry.qualifications);\n if (anchors !== undefined) sections.push(anchors);\n\n const hit = formatHit(entry.qualifications);\n if (hit !== undefined) sections.push(hit);\n\n const distinctive = formatDistinctive(entry.distinctiveQualifications);\n if (distinctive !== undefined) sections.push(distinctive);\n\n if (sections.length <= 1) return undefined;\n return sections.join(\"\\n\\n\");\n}\n\nconst BULLET_1 = \" • \";\nconst SUB_BULLET = \" \";\n\nfunction formatHeader(entry: TooltipEntry): undefined | string {\n const lines: string[] = [];\n if (entry.variantCount !== undefined && entry.variantCount > 1) {\n lines.push(`Variant: ${entry.variantIndex ?? \"?\"} of ${entry.variantCount}`);\n }\n return lines.join(\"\\n\");\n}\n\nfunction formatOriginPath(entry: TooltipEntry): undefined | string {\n const path = entry.linkerPath ?? [];\n if (path.length === 0) return undefined;\n\n const lines = [\"Origin path\"];\n path.forEach((step, i) => {\n const label =\n readAnnotation(step.linker.spec, Annotation.LinkLabel) ??\n readAnnotation(step.linker.spec, Annotation.Label) ??\n step.linker.spec.name;\n lines.push(`${BULLET_1}linker ${i + 1}: ${label}`);\n const qs = formatAxisQualifications(step.qualifications);\n if (qs !== undefined) lines.push(`${SUB_BULLET}qualifies: ${qs}`);\n });\n const hitName = readAnnotation(entry.spec, Annotation.Label) ?? entry.spec.name;\n lines.push(`${BULLET_1}hit column: ${hitName}`);\n return lines.join(\"\\n\");\n}\n\nfunction formatAnchors(q: undefined | MatchQualifications): undefined | string {\n if (isNil(q)) return undefined;\n const ids = Object.keys(q.forQueries);\n if (ids.length === 0) return undefined;\n\n const lines = [];\n for (const id of ids) {\n const item = q.forQueries[id as PObjectId];\n if (item.length === 0) continue;\n const rendered = formatAxisQualifications(item);\n lines.push(`${BULLET_1}${id}${rendered !== undefined ? ` ${rendered}` : \"\"}`);\n }\n return lines.length > 0\n ? [\"Anchors (bound via this variant)\"].concat(lines).join(\"\\n\")\n : undefined;\n}\n\nfunction formatHit(q: undefined | MatchQualifications): undefined | string {\n if (isNil(q) || q.forHit.length === 0) return undefined;\n const rendered = formatAxisQualifications(q.forHit);\n if (rendered === undefined) return undefined;\n return [\"Hit column qualifications\", `${BULLET_1}${rendered}`].join(\"\\n\");\n}\n\nfunction formatDistinctive(q: undefined | MatchQualifications): undefined | string {\n if (isNil(q)) return undefined;\n const bullets: string[] = [];\n for (const id of Object.keys(q.forQueries)) {\n for (const item of q.forQueries[id as PObjectId])\n bullets.push(`${BULLET_1}${id}: ${formatQualification(item)}`);\n }\n for (const item of q.forHit) bullets.push(`${BULLET_1}hit: ${formatQualification(item)}`);\n if (bullets.length === 0) return undefined;\n return [\"Distinctive (what separates this variant)\", ...bullets].join(\"\\n\");\n}\n\nfunction formatAxisQualifications(qs: AxisQualification[]): undefined | string {\n if (qs.length === 0) return undefined;\n return qs.map(formatQualification).join(\"; \");\n}\n\nfunction formatQualification(q: AxisQualification): string {\n const axisName = typeof q.axis === \"string\" ? q.axis : (q.axis.name ?? JSON.stringify(q.axis));\n const entries = Object.entries(q.contextDomain);\n if (entries.length === 0) return axisName;\n const kv = entries.map(([k, v]) => `${k}=${v}`).join(\", \");\n return `${axisName} context: ${kv}`;\n}\n"],"mappings":";;;;AA0BA,SAAgB,uBAAuB,SAAiD;AACtF,QAAO,QAAQ,IAAI,cAAc;;AAGnC,SAAS,cAAc,OAAyC;CAC9D,MAAM,WAAqB,EAAE;CAE7B,MAAM,SAAS,aAAa,MAAM;AAClC,KAAI,WAAW,KAAA,EAAW,UAAS,KAAK,OAAO;CAE/C,MAAM,SAAS,iBAAiB,MAAM;AACtC,KAAI,WAAW,KAAA,EAAW,UAAS,KAAK,OAAO;CAE/C,MAAM,UAAU,cAAc,MAAM,eAAe;AACnD,KAAI,YAAY,KAAA,EAAW,UAAS,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,OAAQ,EAAE,KAAK,QAAQ,KAAK,UAAU,EAAE,KAAK;CAC7F,MAAM,UAAU,OAAO,QAAQ,EAAE,cAAc;AAC/C,KAAI,QAAQ,WAAW,EAAG,QAAO;AAEjC,QAAO,GAAG,SAAS,YADR,QAAQ,KAAK,CAAC,GAAG,OAAO,GAAG,EAAE,GAAG,IAAI,CAAC,KAAK,KAAK"}
|
package/dist/labels/index.cjs
CHANGED
package/dist/labels/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import { DeriveLabelsOptions, Entry, Trace, TraceEntry, deriveDistinctLabels } from "./derive_distinct_labels.js";
|
|
1
|
+
import { DeriveLabelsOptions, Entry, Trace, TraceEntry, deriveDistinctLabels } from "./derive_distinct_labels.js";
|
|
2
|
+
import { TooltipEntry, deriveDistinctTooltips } from "./derive_distinct_tooltips.js";
|
package/dist/labels/index.js
CHANGED
package/dist/package.cjs
CHANGED
package/dist/package.js
CHANGED
package/dist/render/api.cjs
CHANGED
|
@@ -7,6 +7,8 @@ const require_label = require("./util/label.cjs");
|
|
|
7
7
|
const require_pcolumn_data = require("./util/pcolumn_data.cjs");
|
|
8
8
|
const require_column_collection = require("./util/column_collection.cjs");
|
|
9
9
|
const require_pframe_upgraders = require("./util/pframe_upgraders.cjs");
|
|
10
|
+
const require_get_services = require("../services/get_services.cjs");
|
|
11
|
+
require("../services/index.cjs");
|
|
10
12
|
let _milaboratories_pl_model_common = require("@milaboratories/pl-model-common");
|
|
11
13
|
let canonicalize = require("canonicalize");
|
|
12
14
|
canonicalize = require_runtime.__toESM(canonicalize);
|
|
@@ -307,18 +309,8 @@ var ResultPool = class {
|
|
|
307
309
|
/** Main entry point to the API available within model lambdas (like outputs, sections, etc..) */
|
|
308
310
|
var RenderCtxBase = class {
|
|
309
311
|
ctx;
|
|
310
|
-
|
|
311
|
-
cachedServices;
|
|
312
|
-
constructor(requiredServiceNames = []) {
|
|
312
|
+
constructor() {
|
|
313
313
|
this.ctx = require_internal.getCfgRenderCtx();
|
|
314
|
-
this.requiredServiceNames = requiredServiceNames;
|
|
315
|
-
}
|
|
316
|
-
get services() {
|
|
317
|
-
if (this.cachedServices) return this.cachedServices;
|
|
318
|
-
const ctx = this.ctx;
|
|
319
|
-
const services = Object.freeze(Object.fromEntries(this.requiredServiceNames.map((id) => [id, Object.freeze(Object.fromEntries(ctx.getServiceMethods(id).map((method) => [method, (...args) => ctx.callServiceMethod(id, method, ...args)])))])));
|
|
320
|
-
this.cachedServices = services;
|
|
321
|
-
return services;
|
|
322
314
|
}
|
|
323
315
|
dataCache;
|
|
324
316
|
get data() {
|
|
@@ -342,6 +334,9 @@ var RenderCtxBase = class {
|
|
|
342
334
|
}
|
|
343
335
|
return this.activeArgsCache.v;
|
|
344
336
|
}
|
|
337
|
+
getService(name) {
|
|
338
|
+
return require_get_services.getService(name);
|
|
339
|
+
}
|
|
345
340
|
getNamedAccessor(name) {
|
|
346
341
|
return require_accessor.ifDef(this.ctx.getAccessorHandleByName(name), (accessor) => new require_accessor.TreeNodeAccessor(accessor, [name]));
|
|
347
342
|
}
|
|
@@ -478,8 +473,8 @@ var RenderCtxLegacy = class extends RenderCtxBase {
|
|
|
478
473
|
var PluginRenderCtx = class extends RenderCtxBase {
|
|
479
474
|
handle;
|
|
480
475
|
wrappedInputs;
|
|
481
|
-
constructor(handle, wrappedInputs
|
|
482
|
-
super(
|
|
476
|
+
constructor(handle, wrappedInputs) {
|
|
477
|
+
super();
|
|
483
478
|
this.handle = handle;
|
|
484
479
|
this.wrappedInputs = wrappedInputs;
|
|
485
480
|
}
|