@milaboratories/pl-model-common 1.42.0 → 1.43.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/drivers/index.d.ts +2 -2
- package/dist/drivers/ls.d.ts +1 -1
- package/dist/drivers/pframe/driver.d.ts +2 -2
- package/dist/drivers/pframe/index.d.ts +2 -2
- package/dist/drivers/pframe/pframe.d.ts +1 -1
- package/dist/drivers/pframe/spec_driver.d.ts +11 -1
- package/dist/drivers/pframe/spec_driver.d.ts.map +1 -1
- package/dist/drivers/pframe/table_calculate.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/services/service_declarations.cjs +4 -2
- package/dist/services/service_declarations.cjs.map +1 -1
- package/dist/services/service_declarations.js +4 -2
- package/dist/services/service_declarations.js.map +1 -1
- package/package.json +6 -6
- package/src/drivers/pframe/spec_driver.ts +12 -1
- package/src/services/service_declarations.ts +2 -0
package/dist/drivers/index.d.ts
CHANGED
|
@@ -5,8 +5,10 @@ import { Annotation, AnnotationDataStatus, AnnotationJson, AxesId, AxesSpec, Axi
|
|
|
5
5
|
import { AnchoredIdDeriver, ResolveAnchorsOptions, resolveAnchors } from "./pframe/spec/anchored.js";
|
|
6
6
|
import { NativePObjectId, deriveNativeId } from "./pframe/spec/native_id.js";
|
|
7
7
|
import { PTableColumnId, PTableColumnIdAxis, PTableColumnIdColumn, PTableColumnSpec, PTableColumnSpecAxis, PTableColumnSpecColumn, getPTableColumnId } from "./pframe/table_common.js";
|
|
8
|
+
import { PTableDownloadCompression, PTableDownloadFormat, PTableNA, PTableShape, PTableValue, PTableValueAxis, PTableValueBranded, PTableValueData, PTableValueDataBranded, PTableValueDouble, PTableValueFloat, PTableValueInt, PTableValueLong, PTableValueString, PTableVector, PTableVectorTyped, PVectorData, PVectorDataBytes, PVectorDataDouble, PVectorDataFloat, PVectorDataInt, PVectorDataLong, PVectorDataString, PVectorDataTyped, TableRange, ValueTypeSupported, WritePTableToFsOptions, WritePTableToFsResult, isPTableNA, isValueNA, pTableValue, pTableValueBranded } from "./pframe/data_types.js";
|
|
8
9
|
import { BinaryChunk, BinaryPartitionedDataInfo, BinaryPartitionedDataInfoEntries, DataInfo, DataInfoEntries, JsonDataInfo, JsonDataInfoEntries, JsonPartitionedDataInfo, JsonPartitionedDataInfoEntries, PColumnDataEntry, PColumnKey, PColumnValue, PColumnValues, PColumnValuesEntry, ParquetChunk, ParquetChunkMapping, ParquetChunkMappingAxis, ParquetChunkMappingColumn, ParquetChunkMetadata, ParquetChunkStats, ParquetPartitionedDataInfo, ParquetPartitionedDataInfoEntries, PartitionedDataInfoEntries, dataInfoToEntries, entriesToDataInfo, isDataInfo, isDataInfoEntries, isPartitionedDataInfoEntries, mapDataInfo, mapDataInfoEntries, visitDataInfo } from "./pframe/data_info.js";
|
|
9
10
|
import { SpecExprAxisRef, SpecExprColumnRef, SpecQuery, SpecQueryBooleanExpression, SpecQueryColumn, SpecQueryExpression, SpecQueryFilter, SpecQueryInlineColumn, SpecQueryJoinEntry, SpecQueryLinkerJoin, SpecQueryLinkerJoinLinker, SpecQueryOuterJoin, SpecQuerySliceAxes, SpecQuerySort, SpecQuerySparseToDenseColumn, SpecQuerySymmetricJoin, SpecQueryTransformColumns } from "./pframe/query/query_spec.js";
|
|
11
|
+
import { ArtificialColumnJoinEntry, CalculateTableDataRequest, CalculateTableDataResponse, ColumnJoinEntry, ConstantAxisFilter, FullJoin, FullPTableColumnData, InlineColumnJoinEntry, InnerJoin, JoinEntry, OuterJoin, PTableDef, PTableDefV2, PTableRecordFilter, PTableRecordSingleValueFilterV2, PTableSorting, SingleValueAndPredicateV2, SingleValueEqualPredicate, SingleValueGreaterOrEqualPredicate, SingleValueGreaterPredicate, SingleValueIEqualPredicate, SingleValueInSetPredicate, SingleValueIsNAPredicate, SingleValueLessOrEqualPredicate, SingleValueLessPredicate, SingleValueMatchesPredicate, SingleValueNotPredicateV2, SingleValueOrPredicateV2, SingleValuePredicateV2, SingleValueStringContainsFuzzyPredicate, SingleValueStringContainsPredicate, SingleValueStringIContainsFuzzyPredicate, SingleValueStringIContainsPredicate, SlicedColumnJoinEntry, mapJoinEntry, mapPTableDef, mapPTableDefV2, sortJoinEntry, sortPTableDef } from "./pframe/table_calculate.js";
|
|
10
12
|
import { DataExprAxisRef, DataExprColumnRef, DataQuery, DataQueryBooleanExpression, DataQueryColumn, DataQueryExpression, DataQueryFilter, DataQueryInlineColumn, DataQueryJoinEntry, DataQueryLinkerJoin, DataQueryLinkerJoinLinker, DataQueryOuterJoin, DataQuerySliceAxes, DataQuerySort, DataQuerySparseToDenseColumn, DataQuerySymmetricJoin, DataQueryTransformColumns } from "./pframe/query/query_data.js";
|
|
11
13
|
import { collectSpecQueryColumns, isBooleanExpression, mapSpecQueryColumns, sortSpecQuery, traverseQuerySpec } from "./pframe/query/utils.js";
|
|
12
14
|
import { BuildQueryInput, ColumnAxesWithQualifications, DeleteColumnRequest, DeleteColumnResponse, DiscoverColumnsConstraints, DiscoverColumnsFilterStep, DiscoverColumnsLinkerStep, DiscoverColumnsMappingVariant, DiscoverColumnsRequest, DiscoverColumnsResponse, DiscoverColumnsResponseHit, DiscoverColumnsResponseQualifications, DiscoverColumnsStepInfo, EvaluateQueryResponse, MatcherMap, MultiAxisSelector, MultiColumnSelector, PFrameSpecDriver, SpecFrameHandle, StringMatcher } from "./pframe/spec_driver.js";
|
|
@@ -18,10 +20,8 @@ import { ImportProgress, ImportStatus } from "./upload.js";
|
|
|
18
20
|
import { AnyLogHandle, LiveLogHandle, LogsDriver, ProgressLogWithInfo, ReadyLogHandle, StreamingApiResponse, StreamingApiResponseHandleOutdated, StreamingApiResponseOk, isAnyLogHandle, isLiveLog } from "./log.js";
|
|
19
21
|
import { ColumnFilter } from "./pframe/column_filter.js";
|
|
20
22
|
import { FilterSpec, FilterSpecLeaf, FilterSpecNode, FilterSpecOfType, FilterSpecType, InferFilterSpecCommonLeaf, InferFilterSpecCommonNode, InferFilterSpecLeaf, InferFilterSpecLeafColumn, RootFilterSpec } from "./pframe/filter_spec.js";
|
|
21
|
-
import { PTableDownloadCompression, PTableDownloadFormat, PTableNA, PTableShape, PTableValue, PTableValueAxis, PTableValueBranded, PTableValueData, PTableValueDataBranded, PTableValueDouble, PTableValueFloat, PTableValueInt, PTableValueLong, PTableValueString, PTableVector, PTableVectorTyped, PVectorData, PVectorDataBytes, PVectorDataDouble, PVectorDataFloat, PVectorDataInt, PVectorDataLong, PVectorDataString, PVectorDataTyped, TableRange, ValueTypeSupported, WritePTableToFsOptions, WritePTableToFsResult, isPTableNA, isValueNA, pTableValue, pTableValueBranded } from "./pframe/data_types.js";
|
|
22
23
|
import { FindColumnsRequest, FindColumnsResponse } from "./pframe/find_columns.js";
|
|
23
24
|
import { PTable } from "./pframe/table.js";
|
|
24
|
-
import { ArtificialColumnJoinEntry, CalculateTableDataRequest, CalculateTableDataResponse, ColumnJoinEntry, ConstantAxisFilter, FullJoin, FullPTableColumnData, InlineColumnJoinEntry, InnerJoin, JoinEntry, OuterJoin, PTableDef, PTableDefV2, PTableRecordFilter, PTableRecordSingleValueFilterV2, PTableSorting, SingleValueAndPredicateV2, SingleValueEqualPredicate, SingleValueGreaterOrEqualPredicate, SingleValueGreaterPredicate, SingleValueIEqualPredicate, SingleValueInSetPredicate, SingleValueIsNAPredicate, SingleValueLessOrEqualPredicate, SingleValueLessPredicate, SingleValueMatchesPredicate, SingleValueNotPredicateV2, SingleValueOrPredicateV2, SingleValuePredicateV2, SingleValueStringContainsFuzzyPredicate, SingleValueStringContainsPredicate, SingleValueStringIContainsFuzzyPredicate, SingleValueStringIContainsPredicate, SlicedColumnJoinEntry, mapJoinEntry, mapPTableDef, mapPTableDefV2, sortJoinEntry, sortPTableDef } from "./pframe/table_calculate.js";
|
|
25
25
|
import { UniqueValuesRequest, UniqueValuesResponse } from "./pframe/unique_values.js";
|
|
26
26
|
import { CompositeLinkerMap, LinkerMap } from "./pframe/linker_columns.js";
|
|
27
27
|
import { FileRange, ImportFileHandle, ImportFileHandleIndex, ImportFileHandleUpload, ListFilesResult, LocalImportFileHandle, LsDriver, LsEntry, OpenDialogFilter, OpenDialogOps, OpenMultipleFilesResponse, OpenSingleFileResponse, StorageEntry, StorageHandle, StorageHandleLocal, StorageHandleRemote, getFileNameFromHandle, getFilePathFromHandle, isImportFileHandleIndex, isImportFileHandleUpload } from "./ls.js";
|
package/dist/drivers/ls.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Branded } from "../branding.js";
|
|
2
|
-
import { FileLike } from "./interfaces.js";
|
|
3
2
|
import { TableRange } from "./pframe/data_types.js";
|
|
3
|
+
import { FileLike } from "./interfaces.js";
|
|
4
4
|
//#region src/drivers/ls.d.ts
|
|
5
5
|
type ImportFileHandleUpload = `upload://upload/${string}`;
|
|
6
6
|
type ImportFileHandleIndex = `index://index/${string}`;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Branded } from "../../branding.js";
|
|
2
2
|
import { PColumn, PColumnIdAndSpec, PColumnSpec } from "./spec/spec.js";
|
|
3
3
|
import { PTableColumnSpec } from "./table_common.js";
|
|
4
|
-
import { DataInfo, PColumnValues } from "./data_info.js";
|
|
5
4
|
import { PTableShape, PTableVector, TableRange, WritePTableToFsOptions, WritePTableToFsResult } from "./data_types.js";
|
|
6
|
-
import {
|
|
5
|
+
import { DataInfo, PColumnValues } from "./data_info.js";
|
|
7
6
|
import { CalculateTableDataRequest, CalculateTableDataResponse, PTableDef, PTableDefV2 } from "./table_calculate.js";
|
|
7
|
+
import { FindColumnsRequest, FindColumnsResponse } from "./find_columns.js";
|
|
8
8
|
import { UniqueValuesRequest, UniqueValuesResponse } from "./unique_values.js";
|
|
9
9
|
import { PObjectId } from "../../pool/spec.js";
|
|
10
10
|
import { PFrameDef } from "./pframe.js";
|
|
@@ -5,18 +5,18 @@ import { Annotation, AnnotationDataStatus, AnnotationJson, AxesId, AxesSpec, Axi
|
|
|
5
5
|
import { AnchoredIdDeriver, ResolveAnchorsOptions, resolveAnchors } from "./spec/anchored.js";
|
|
6
6
|
import { NativePObjectId, deriveNativeId } from "./spec/native_id.js";
|
|
7
7
|
import { PTableColumnId, PTableColumnIdAxis, PTableColumnIdColumn, PTableColumnSpec, PTableColumnSpecAxis, PTableColumnSpecColumn, getPTableColumnId } from "./table_common.js";
|
|
8
|
+
import { PTableDownloadCompression, PTableDownloadFormat, PTableNA, PTableShape, PTableValue, PTableValueAxis, PTableValueBranded, PTableValueData, PTableValueDataBranded, PTableValueDouble, PTableValueFloat, PTableValueInt, PTableValueLong, PTableValueString, PTableVector, PTableVectorTyped, PVectorData, PVectorDataBytes, PVectorDataDouble, PVectorDataFloat, PVectorDataInt, PVectorDataLong, PVectorDataString, PVectorDataTyped, TableRange, ValueTypeSupported, WritePTableToFsOptions, WritePTableToFsResult, isPTableNA, isValueNA, pTableValue, pTableValueBranded } from "./data_types.js";
|
|
8
9
|
import { BinaryChunk, BinaryPartitionedDataInfo, BinaryPartitionedDataInfoEntries, DataInfo, DataInfoEntries, JsonDataInfo, JsonDataInfoEntries, JsonPartitionedDataInfo, JsonPartitionedDataInfoEntries, PColumnDataEntry, PColumnKey, PColumnValue, PColumnValues, PColumnValuesEntry, ParquetChunk, ParquetChunkMapping, ParquetChunkMappingAxis, ParquetChunkMappingColumn, ParquetChunkMetadata, ParquetChunkStats, ParquetPartitionedDataInfo, ParquetPartitionedDataInfoEntries, PartitionedDataInfoEntries, dataInfoToEntries, entriesToDataInfo, isDataInfo, isDataInfoEntries, isPartitionedDataInfoEntries, mapDataInfo, mapDataInfoEntries, visitDataInfo } from "./data_info.js";
|
|
9
10
|
import { SpecExprAxisRef, SpecExprColumnRef, SpecQuery, SpecQueryBooleanExpression, SpecQueryColumn, SpecQueryExpression, SpecQueryFilter, SpecQueryInlineColumn, SpecQueryJoinEntry, SpecQueryLinkerJoin, SpecQueryLinkerJoinLinker, SpecQueryOuterJoin, SpecQuerySliceAxes, SpecQuerySort, SpecQuerySparseToDenseColumn, SpecQuerySymmetricJoin, SpecQueryTransformColumns } from "./query/query_spec.js";
|
|
11
|
+
import { ArtificialColumnJoinEntry, CalculateTableDataRequest, CalculateTableDataResponse, ColumnJoinEntry, ConstantAxisFilter, FullJoin, FullPTableColumnData, InlineColumnJoinEntry, InnerJoin, JoinEntry, OuterJoin, PTableDef, PTableDefV2, PTableRecordFilter, PTableRecordSingleValueFilterV2, PTableSorting, SingleValueAndPredicateV2, SingleValueEqualPredicate, SingleValueGreaterOrEqualPredicate, SingleValueGreaterPredicate, SingleValueIEqualPredicate, SingleValueInSetPredicate, SingleValueIsNAPredicate, SingleValueLessOrEqualPredicate, SingleValueLessPredicate, SingleValueMatchesPredicate, SingleValueNotPredicateV2, SingleValueOrPredicateV2, SingleValuePredicateV2, SingleValueStringContainsFuzzyPredicate, SingleValueStringContainsPredicate, SingleValueStringIContainsFuzzyPredicate, SingleValueStringIContainsPredicate, SlicedColumnJoinEntry, mapJoinEntry, mapPTableDef, mapPTableDefV2, sortJoinEntry, sortPTableDef } from "./table_calculate.js";
|
|
10
12
|
import { DataExprAxisRef, DataExprColumnRef, DataQuery, DataQueryBooleanExpression, DataQueryColumn, DataQueryExpression, DataQueryFilter, DataQueryInlineColumn, DataQueryJoinEntry, DataQueryLinkerJoin, DataQueryLinkerJoinLinker, DataQueryOuterJoin, DataQuerySliceAxes, DataQuerySort, DataQuerySparseToDenseColumn, DataQuerySymmetricJoin, DataQueryTransformColumns } from "./query/query_data.js";
|
|
11
13
|
import { collectSpecQueryColumns, isBooleanExpression, mapSpecQueryColumns, sortSpecQuery, traverseQuerySpec } from "./query/utils.js";
|
|
12
14
|
import { BuildQueryInput, ColumnAxesWithQualifications, DeleteColumnRequest, DeleteColumnResponse, DiscoverColumnsConstraints, DiscoverColumnsFilterStep, DiscoverColumnsLinkerStep, DiscoverColumnsMappingVariant, DiscoverColumnsRequest, DiscoverColumnsResponse, DiscoverColumnsResponseHit, DiscoverColumnsResponseQualifications, DiscoverColumnsStepInfo, EvaluateQueryResponse, MatcherMap, MultiAxisSelector, MultiColumnSelector, PFrameSpecDriver, SpecFrameHandle, StringMatcher } from "./spec_driver.js";
|
|
13
15
|
import { AAxisSelector, ADomain, AnchorAxisIdOrRefBasic, AnchorAxisRef, AnchorAxisRefByIdx, AnchorAxisRefByMatcher, AnchorAxisRefByName, AnchorDomainRef, AnchoredColumnMatchStrategy, AnchoredPColumnId, AnchoredPColumnSelector, AxisQualification, LegacyAxisSelector, PColumnSelector, SingleAxisSelector, isAnchoredPColumnId, legacyColumnSelectorsToPredicate, matchAxis, matchMultiColumnSelector, matchPColumn, multiColumnSelectorsToPredicate } from "./spec/selectors.js";
|
|
14
16
|
import { ColumnFilter } from "./column_filter.js";
|
|
15
17
|
import { FilterSpec, FilterSpecLeaf, FilterSpecNode, FilterSpecOfType, FilterSpecType, InferFilterSpecCommonLeaf, InferFilterSpecCommonNode, InferFilterSpecLeaf, InferFilterSpecLeafColumn, RootFilterSpec } from "./filter_spec.js";
|
|
16
|
-
import { PTableDownloadCompression, PTableDownloadFormat, PTableNA, PTableShape, PTableValue, PTableValueAxis, PTableValueBranded, PTableValueData, PTableValueDataBranded, PTableValueDouble, PTableValueFloat, PTableValueInt, PTableValueLong, PTableValueString, PTableVector, PTableVectorTyped, PVectorData, PVectorDataBytes, PVectorDataDouble, PVectorDataFloat, PVectorDataInt, PVectorDataLong, PVectorDataString, PVectorDataTyped, TableRange, ValueTypeSupported, WritePTableToFsOptions, WritePTableToFsResult, isPTableNA, isValueNA, pTableValue, pTableValueBranded } from "./data_types.js";
|
|
17
18
|
import { FindColumnsRequest, FindColumnsResponse } from "./find_columns.js";
|
|
18
19
|
import { PTable } from "./table.js";
|
|
19
|
-
import { ArtificialColumnJoinEntry, CalculateTableDataRequest, CalculateTableDataResponse, ColumnJoinEntry, ConstantAxisFilter, FullJoin, FullPTableColumnData, InlineColumnJoinEntry, InnerJoin, JoinEntry, OuterJoin, PTableDef, PTableDefV2, PTableRecordFilter, PTableRecordSingleValueFilterV2, PTableSorting, SingleValueAndPredicateV2, SingleValueEqualPredicate, SingleValueGreaterOrEqualPredicate, SingleValueGreaterPredicate, SingleValueIEqualPredicate, SingleValueInSetPredicate, SingleValueIsNAPredicate, SingleValueLessOrEqualPredicate, SingleValueLessPredicate, SingleValueMatchesPredicate, SingleValueNotPredicateV2, SingleValueOrPredicateV2, SingleValuePredicateV2, SingleValueStringContainsFuzzyPredicate, SingleValueStringContainsPredicate, SingleValueStringIContainsFuzzyPredicate, SingleValueStringIContainsPredicate, SlicedColumnJoinEntry, mapJoinEntry, mapPTableDef, mapPTableDefV2, sortJoinEntry, sortPTableDef } from "./table_calculate.js";
|
|
20
20
|
import { UniqueValuesRequest, UniqueValuesResponse } from "./unique_values.js";
|
|
21
21
|
import { CompositeLinkerMap, LinkerMap } from "./linker_columns.js";
|
|
22
22
|
import { PFrame, PFrameDef } from "./pframe.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PColumnIdAndSpec, PColumnSpec } from "./spec/spec.js";
|
|
2
2
|
import { TableRange } from "./data_types.js";
|
|
3
|
-
import { FindColumnsRequest, FindColumnsResponse } from "./find_columns.js";
|
|
4
3
|
import { CalculateTableDataRequest, CalculateTableDataResponse } from "./table_calculate.js";
|
|
4
|
+
import { FindColumnsRequest, FindColumnsResponse } from "./find_columns.js";
|
|
5
5
|
import { UniqueValuesRequest, UniqueValuesResponse } from "./unique_values.js";
|
|
6
6
|
import { PObjectId } from "../../pool/spec.js";
|
|
7
7
|
//#region src/drivers/pframe/pframe.d.ts
|
|
@@ -2,7 +2,8 @@ import { PoolEntry } from "../../pool_entry.js";
|
|
|
2
2
|
import { AxesId, AxesSpec, AxisSpec, AxisValueType, ColumnValueType, PColumnIdAndSpec, PColumnInfo, PColumnSpec } from "./spec/spec.js";
|
|
3
3
|
import { PTableColumnId, PTableColumnSpec } from "./table_common.js";
|
|
4
4
|
import { SpecQuery, SpecQueryJoinEntry } from "./query/query_spec.js";
|
|
5
|
-
import {
|
|
5
|
+
import { PTableRecordFilter } from "./table_calculate.js";
|
|
6
|
+
import { DataQuery, DataQueryBooleanExpression } from "./query/query_data.js";
|
|
6
7
|
import { AxisQualification, SingleAxisSelector } from "./spec/selectors.js";
|
|
7
8
|
import { PObjectId } from "../../pool/spec.js";
|
|
8
9
|
import { Branded } from "@milaboratories/helpers";
|
|
@@ -210,6 +211,15 @@ interface PFrameSpecDriver {
|
|
|
210
211
|
findAxis(spec: AxesSpec, selector: SingleAxisSelector): number;
|
|
211
212
|
/** Find the flat index of a table column matching the given selector. Returns -1 if not found. */
|
|
212
213
|
findTableColumn(tableSpec: PTableColumnSpec[], selector: PTableColumnId): number;
|
|
214
|
+
/**
|
|
215
|
+
* Upgrades selector-based legacy record filters into index-based data-layer
|
|
216
|
+
* boolean expressions, resolved against the provided unified table spec
|
|
217
|
+
* (axes first, then columns).
|
|
218
|
+
*/
|
|
219
|
+
rewriteLegacyFilters(request: {
|
|
220
|
+
tableSpec: PTableColumnSpec[];
|
|
221
|
+
filters: PTableRecordFilter[];
|
|
222
|
+
}): DataQueryBooleanExpression[];
|
|
213
223
|
}
|
|
214
224
|
//#endregion
|
|
215
225
|
export { BuildQueryInput, ColumnAxesWithQualifications, DeleteColumnRequest, DeleteColumnResponse, DiscoverColumnsConstraints, DiscoverColumnsFilterStep, DiscoverColumnsLinkerStep, DiscoverColumnsMappingVariant, DiscoverColumnsRequest, DiscoverColumnsResponse, DiscoverColumnsResponseHit, DiscoverColumnsResponseQualifications, DiscoverColumnsStepInfo, EvaluateQueryResponse, MatcherMap, MultiAxisSelector, MultiColumnSelector, PFrameSpecDriver, SpecFrameHandle, StringMatcher };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spec_driver.d.ts","names":[],"sources":["../../../src/drivers/pframe/spec_driver.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"spec_driver.d.ts","names":[],"sources":["../../../src/drivers/pframe/spec_driver.ts"],"mappings":"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"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { PColumn } from "./spec/spec.js";
|
|
2
2
|
import { PTableColumnId, PTableColumnSpec } from "./table_common.js";
|
|
3
|
+
import { PTableVector } from "./data_types.js";
|
|
3
4
|
import { PColumnValues } from "./data_info.js";
|
|
4
5
|
import { SpecQuery } from "./query/query_spec.js";
|
|
5
|
-
import { PTableVector } from "./data_types.js";
|
|
6
6
|
import { PObjectId } from "../../pool/spec.js";
|
|
7
7
|
//#region src/drivers/pframe/table_calculate.d.ts
|
|
8
8
|
/** Defines a terminal column node in the join request tree */
|
package/dist/index.d.ts
CHANGED
|
@@ -13,8 +13,10 @@ import { Annotation, AnnotationDataStatus, AnnotationJson, AxesId, AxesSpec, Axi
|
|
|
13
13
|
import { AnchoredIdDeriver, ResolveAnchorsOptions, resolveAnchors } from "./drivers/pframe/spec/anchored.js";
|
|
14
14
|
import { NativePObjectId, deriveNativeId } from "./drivers/pframe/spec/native_id.js";
|
|
15
15
|
import { PTableColumnId, PTableColumnIdAxis, PTableColumnIdColumn, PTableColumnSpec, PTableColumnSpecAxis, PTableColumnSpecColumn, getPTableColumnId } from "./drivers/pframe/table_common.js";
|
|
16
|
+
import { PTableDownloadCompression, PTableDownloadFormat, PTableNA, PTableShape, PTableValue, PTableValueAxis, PTableValueBranded, PTableValueData, PTableValueDataBranded, PTableValueDouble, PTableValueFloat, PTableValueInt, PTableValueLong, PTableValueString, PTableVector, PTableVectorTyped, PVectorData, PVectorDataBytes, PVectorDataDouble, PVectorDataFloat, PVectorDataInt, PVectorDataLong, PVectorDataString, PVectorDataTyped, TableRange, ValueTypeSupported, WritePTableToFsOptions, WritePTableToFsResult, isPTableNA, isValueNA, pTableValue, pTableValueBranded } from "./drivers/pframe/data_types.js";
|
|
16
17
|
import { BinaryChunk, BinaryPartitionedDataInfo, BinaryPartitionedDataInfoEntries, DataInfo, DataInfoEntries, JsonDataInfo, JsonDataInfoEntries, JsonPartitionedDataInfo, JsonPartitionedDataInfoEntries, PColumnDataEntry, PColumnKey, PColumnValue, PColumnValues, PColumnValuesEntry, ParquetChunk, ParquetChunkMapping, ParquetChunkMappingAxis, ParquetChunkMappingColumn, ParquetChunkMetadata, ParquetChunkStats, ParquetPartitionedDataInfo, ParquetPartitionedDataInfoEntries, PartitionedDataInfoEntries, dataInfoToEntries, entriesToDataInfo, isDataInfo, isDataInfoEntries, isPartitionedDataInfoEntries, mapDataInfo, mapDataInfoEntries, visitDataInfo } from "./drivers/pframe/data_info.js";
|
|
17
18
|
import { SpecExprAxisRef, SpecExprColumnRef, SpecQuery, SpecQueryBooleanExpression, SpecQueryColumn, SpecQueryExpression, SpecQueryFilter, SpecQueryInlineColumn, SpecQueryJoinEntry, SpecQueryLinkerJoin, SpecQueryLinkerJoinLinker, SpecQueryOuterJoin, SpecQuerySliceAxes, SpecQuerySort, SpecQuerySparseToDenseColumn, SpecQuerySymmetricJoin, SpecQueryTransformColumns } from "./drivers/pframe/query/query_spec.js";
|
|
19
|
+
import { ArtificialColumnJoinEntry, CalculateTableDataRequest, CalculateTableDataResponse, ColumnJoinEntry, ConstantAxisFilter, FullJoin, FullPTableColumnData, InlineColumnJoinEntry, InnerJoin, JoinEntry, OuterJoin, PTableDef, PTableDefV2, PTableRecordFilter, PTableRecordSingleValueFilterV2, PTableSorting, SingleValueAndPredicateV2, SingleValueEqualPredicate, SingleValueGreaterOrEqualPredicate, SingleValueGreaterPredicate, SingleValueIEqualPredicate, SingleValueInSetPredicate, SingleValueIsNAPredicate, SingleValueLessOrEqualPredicate, SingleValueLessPredicate, SingleValueMatchesPredicate, SingleValueNotPredicateV2, SingleValueOrPredicateV2, SingleValuePredicateV2, SingleValueStringContainsFuzzyPredicate, SingleValueStringContainsPredicate, SingleValueStringIContainsFuzzyPredicate, SingleValueStringIContainsPredicate, SlicedColumnJoinEntry, mapJoinEntry, mapPTableDef, mapPTableDefV2, sortJoinEntry, sortPTableDef } from "./drivers/pframe/table_calculate.js";
|
|
18
20
|
import { DataExprAxisRef, DataExprColumnRef, DataQuery, DataQueryBooleanExpression, DataQueryColumn, DataQueryExpression, DataQueryFilter, DataQueryInlineColumn, DataQueryJoinEntry, DataQueryLinkerJoin, DataQueryLinkerJoinLinker, DataQueryOuterJoin, DataQuerySliceAxes, DataQuerySort, DataQuerySparseToDenseColumn, DataQuerySymmetricJoin, DataQueryTransformColumns } from "./drivers/pframe/query/query_data.js";
|
|
19
21
|
import { collectSpecQueryColumns, isBooleanExpression, mapSpecQueryColumns, sortSpecQuery, traverseQuerySpec } from "./drivers/pframe/query/utils.js";
|
|
20
22
|
import { BuildQueryInput, ColumnAxesWithQualifications, DeleteColumnRequest, DeleteColumnResponse, DiscoverColumnsConstraints, DiscoverColumnsFilterStep, DiscoverColumnsLinkerStep, DiscoverColumnsMappingVariant, DiscoverColumnsRequest, DiscoverColumnsResponse, DiscoverColumnsResponseHit, DiscoverColumnsResponseQualifications, DiscoverColumnsStepInfo, EvaluateQueryResponse, MatcherMap, MultiAxisSelector, MultiColumnSelector, PFrameSpecDriver, SpecFrameHandle, StringMatcher } from "./drivers/pframe/spec_driver.js";
|
|
@@ -26,10 +28,8 @@ import { ImportProgress, ImportStatus } from "./drivers/upload.js";
|
|
|
26
28
|
import { AnyLogHandle, LiveLogHandle, LogsDriver, ProgressLogWithInfo, ReadyLogHandle, StreamingApiResponse, StreamingApiResponseHandleOutdated, StreamingApiResponseOk, isAnyLogHandle, isLiveLog } from "./drivers/log.js";
|
|
27
29
|
import { ColumnFilter } from "./drivers/pframe/column_filter.js";
|
|
28
30
|
import { FilterSpec, FilterSpecLeaf, FilterSpecNode, FilterSpecOfType, FilterSpecType, InferFilterSpecCommonLeaf, InferFilterSpecCommonNode, InferFilterSpecLeaf, InferFilterSpecLeafColumn, RootFilterSpec } from "./drivers/pframe/filter_spec.js";
|
|
29
|
-
import { PTableDownloadCompression, PTableDownloadFormat, PTableNA, PTableShape, PTableValue, PTableValueAxis, PTableValueBranded, PTableValueData, PTableValueDataBranded, PTableValueDouble, PTableValueFloat, PTableValueInt, PTableValueLong, PTableValueString, PTableVector, PTableVectorTyped, PVectorData, PVectorDataBytes, PVectorDataDouble, PVectorDataFloat, PVectorDataInt, PVectorDataLong, PVectorDataString, PVectorDataTyped, TableRange, ValueTypeSupported, WritePTableToFsOptions, WritePTableToFsResult, isPTableNA, isValueNA, pTableValue, pTableValueBranded } from "./drivers/pframe/data_types.js";
|
|
30
31
|
import { FindColumnsRequest, FindColumnsResponse } from "./drivers/pframe/find_columns.js";
|
|
31
32
|
import { PTable } from "./drivers/pframe/table.js";
|
|
32
|
-
import { ArtificialColumnJoinEntry, CalculateTableDataRequest, CalculateTableDataResponse, ColumnJoinEntry, ConstantAxisFilter, FullJoin, FullPTableColumnData, InlineColumnJoinEntry, InnerJoin, JoinEntry, OuterJoin, PTableDef, PTableDefV2, PTableRecordFilter, PTableRecordSingleValueFilterV2, PTableSorting, SingleValueAndPredicateV2, SingleValueEqualPredicate, SingleValueGreaterOrEqualPredicate, SingleValueGreaterPredicate, SingleValueIEqualPredicate, SingleValueInSetPredicate, SingleValueIsNAPredicate, SingleValueLessOrEqualPredicate, SingleValueLessPredicate, SingleValueMatchesPredicate, SingleValueNotPredicateV2, SingleValueOrPredicateV2, SingleValuePredicateV2, SingleValueStringContainsFuzzyPredicate, SingleValueStringContainsPredicate, SingleValueStringIContainsFuzzyPredicate, SingleValueStringIContainsPredicate, SlicedColumnJoinEntry, mapJoinEntry, mapPTableDef, mapPTableDefV2, sortJoinEntry, sortPTableDef } from "./drivers/pframe/table_calculate.js";
|
|
33
33
|
import { UniqueValuesRequest, UniqueValuesResponse } from "./drivers/pframe/unique_values.js";
|
|
34
34
|
import { CompositeLinkerMap, LinkerMap } from "./drivers/pframe/linker_columns.js";
|
|
35
35
|
import { FileRange, ImportFileHandle, ImportFileHandleIndex, ImportFileHandleUpload, ListFilesResult, LocalImportFileHandle, LsDriver, LsEntry, OpenDialogFilter, OpenDialogOps, OpenMultipleFilesResponse, OpenSingleFileResponse, StorageEntry, StorageHandle, StorageHandleLocal, StorageHandleRemote, getFileNameFromHandle, getFilePathFromHandle, isImportFileHandleIndex, isImportFileHandleUpload } from "./drivers/ls.js";
|
|
@@ -14,7 +14,8 @@ const Services = {
|
|
|
14
14
|
"expandAxes",
|
|
15
15
|
"collapseAxes",
|
|
16
16
|
"findAxis",
|
|
17
|
-
"findTableColumn"
|
|
17
|
+
"findTableColumn",
|
|
18
|
+
"rewriteLegacyFilters"
|
|
18
19
|
],
|
|
19
20
|
uiMethods: [
|
|
20
21
|
"createSpecFrame",
|
|
@@ -26,7 +27,8 @@ const Services = {
|
|
|
26
27
|
"expandAxes",
|
|
27
28
|
"collapseAxes",
|
|
28
29
|
"findAxis",
|
|
29
|
-
"findTableColumn"
|
|
30
|
+
"findTableColumn",
|
|
31
|
+
"rewriteLegacyFilters"
|
|
30
32
|
]
|
|
31
33
|
}),
|
|
32
34
|
PFrame: require_service_types.service()({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service_declarations.cjs","names":["service"],"sources":["../../src/services/service_declarations.ts"],"sourcesContent":["/**\n * Service declarations — add new services here.\n *\n * `modelMethods` / `uiMethods` lists are the single source of truth for\n * method names exposed on each side. They drive SERVICE_METHOD_MAP (UI\n * ServiceProxy forwarders) and MODEL_SERVICE_METHOD_MAP (workflow VM\n * bridge), so node/main/wasm split no longer needs introspection stubs.\n *\n * After adding a service, fix type errors in these files:\n *\n * Model side:\n * - lib/node/pl-middle-layer/src/js_render/service_injectors.ts — VM bridge for workflow scripts\n * - lib/node/pl-middle-layer/src/middle_layer/middle_layer.ts — ModelServiceRegistry factory\n *\n * UI side:\n * - lib/model/common/src/services/node_service_handlers.ts — driver method wrappers (node services only)\n * - sdk/ui-vue/src/internal/createAppV3.ts — UiServiceRegistry factory\n *\n * Electron main side (only for `main` services):\n * - platforma-desktop-app/packages/main/src/services/mainServices.ts — main-process dispatcher\n *\n * Optional:\n * - sdk/model/src/services/block_service_flags.ts — only if default-required by all blocks\n */\n\nimport type { DialogService } from \"../dialog\";\nimport type { PFrameDriver, PFrameModelDriver } from \"../drivers/pframe/driver\";\nimport type { PFrameSpecDriver } from \"../drivers/pframe/spec_driver\";\nimport { service } from \"./service_types\";\n\nexport const Services = {\n PFrameSpec: service<PFrameSpecDriver, PFrameSpecDriver>()({\n type: \"wasm\",\n name: \"pframeSpec\",\n modelMethods: [\n \"createSpecFrame\",\n \"listColumns\",\n \"discoverColumns\",\n \"deleteColumn\",\n \"evaluateQuery\",\n \"buildQuery\",\n \"expandAxes\",\n \"collapseAxes\",\n \"findAxis\",\n \"findTableColumn\",\n ] as const,\n uiMethods: [\n \"createSpecFrame\",\n \"listColumns\",\n \"discoverColumns\",\n \"deleteColumn\",\n \"evaluateQuery\",\n \"buildQuery\",\n \"expandAxes\",\n \"collapseAxes\",\n \"findAxis\",\n \"findTableColumn\",\n ] as const,\n }),\n PFrame: service<PFrameModelDriver, PFrameDriver>()({\n type: \"node\",\n name: \"pframe\",\n modelMethods: [\"createPFrame\", \"createPTable\", \"createPTableV2\"] as const,\n uiMethods: [\n \"findColumns\",\n \"getColumnSpec\",\n \"listColumns\",\n \"calculateTableData\",\n \"getUniqueValues\",\n \"getShape\",\n \"getSpec\",\n \"getData\",\n \"writePTableToFs\",\n ] as const,\n }),\n Dialog: service<Record<string, never>, DialogService>()({\n type: \"main\",\n name: \"dialog\",\n modelMethods: [] as const,\n uiMethods: [\"showSaveDialog\"] as const,\n }),\n};\n"],"mappings":";;AA8BA,MAAa,WAAW;CACtB,YAAYA,sBAAAA,SAA6C,CAAC;EACxD,MAAM;EACN,MAAM;EACN,cAAc;GACZ;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD;EACD,WAAW;GACT;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD;EACF,CAAC;CACF,QAAQA,sBAAAA,SAA0C,CAAC;EACjD,MAAM;EACN,MAAM;EACN,cAAc;GAAC;GAAgB;GAAgB;GAAiB;EAChE,WAAW;GACT;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD;EACF,CAAC;CACF,QAAQA,sBAAAA,SAA+C,CAAC;EACtD,MAAM;EACN,MAAM;EACN,cAAc,EAAE;EAChB,WAAW,CAAC,iBAAiB;EAC9B,CAAC;CACH"}
|
|
1
|
+
{"version":3,"file":"service_declarations.cjs","names":["service"],"sources":["../../src/services/service_declarations.ts"],"sourcesContent":["/**\n * Service declarations — add new services here.\n *\n * `modelMethods` / `uiMethods` lists are the single source of truth for\n * method names exposed on each side. They drive SERVICE_METHOD_MAP (UI\n * ServiceProxy forwarders) and MODEL_SERVICE_METHOD_MAP (workflow VM\n * bridge), so node/main/wasm split no longer needs introspection stubs.\n *\n * After adding a service, fix type errors in these files:\n *\n * Model side:\n * - lib/node/pl-middle-layer/src/js_render/service_injectors.ts — VM bridge for workflow scripts\n * - lib/node/pl-middle-layer/src/middle_layer/middle_layer.ts — ModelServiceRegistry factory\n *\n * UI side:\n * - lib/model/common/src/services/node_service_handlers.ts — driver method wrappers (node services only)\n * - sdk/ui-vue/src/internal/createAppV3.ts — UiServiceRegistry factory\n *\n * Electron main side (only for `main` services):\n * - platforma-desktop-app/packages/main/src/services/mainServices.ts — main-process dispatcher\n *\n * Optional:\n * - sdk/model/src/services/block_service_flags.ts — only if default-required by all blocks\n */\n\nimport type { DialogService } from \"../dialog\";\nimport type { PFrameDriver, PFrameModelDriver } from \"../drivers/pframe/driver\";\nimport type { PFrameSpecDriver } from \"../drivers/pframe/spec_driver\";\nimport { service } from \"./service_types\";\n\nexport const Services = {\n PFrameSpec: service<PFrameSpecDriver, PFrameSpecDriver>()({\n type: \"wasm\",\n name: \"pframeSpec\",\n modelMethods: [\n \"createSpecFrame\",\n \"listColumns\",\n \"discoverColumns\",\n \"deleteColumn\",\n \"evaluateQuery\",\n \"buildQuery\",\n \"expandAxes\",\n \"collapseAxes\",\n \"findAxis\",\n \"findTableColumn\",\n \"rewriteLegacyFilters\",\n ] as const,\n uiMethods: [\n \"createSpecFrame\",\n \"listColumns\",\n \"discoverColumns\",\n \"deleteColumn\",\n \"evaluateQuery\",\n \"buildQuery\",\n \"expandAxes\",\n \"collapseAxes\",\n \"findAxis\",\n \"findTableColumn\",\n \"rewriteLegacyFilters\",\n ] as const,\n }),\n PFrame: service<PFrameModelDriver, PFrameDriver>()({\n type: \"node\",\n name: \"pframe\",\n modelMethods: [\"createPFrame\", \"createPTable\", \"createPTableV2\"] as const,\n uiMethods: [\n \"findColumns\",\n \"getColumnSpec\",\n \"listColumns\",\n \"calculateTableData\",\n \"getUniqueValues\",\n \"getShape\",\n \"getSpec\",\n \"getData\",\n \"writePTableToFs\",\n ] as const,\n }),\n Dialog: service<Record<string, never>, DialogService>()({\n type: \"main\",\n name: \"dialog\",\n modelMethods: [] as const,\n uiMethods: [\"showSaveDialog\"] as const,\n }),\n};\n"],"mappings":";;AA8BA,MAAa,WAAW;CACtB,YAAYA,sBAAAA,SAA6C,CAAC;EACxD,MAAM;EACN,MAAM;EACN,cAAc;GACZ;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD;EACD,WAAW;GACT;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD;EACF,CAAC;CACF,QAAQA,sBAAAA,SAA0C,CAAC;EACjD,MAAM;EACN,MAAM;EACN,cAAc;GAAC;GAAgB;GAAgB;GAAiB;EAChE,WAAW;GACT;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD;EACF,CAAC;CACF,QAAQA,sBAAAA,SAA+C,CAAC;EACtD,MAAM;EACN,MAAM;EACN,cAAc,EAAE;EAChB,WAAW,CAAC,iBAAiB;EAC9B,CAAC;CACH"}
|
|
@@ -14,7 +14,8 @@ const Services = {
|
|
|
14
14
|
"expandAxes",
|
|
15
15
|
"collapseAxes",
|
|
16
16
|
"findAxis",
|
|
17
|
-
"findTableColumn"
|
|
17
|
+
"findTableColumn",
|
|
18
|
+
"rewriteLegacyFilters"
|
|
18
19
|
],
|
|
19
20
|
uiMethods: [
|
|
20
21
|
"createSpecFrame",
|
|
@@ -26,7 +27,8 @@ const Services = {
|
|
|
26
27
|
"expandAxes",
|
|
27
28
|
"collapseAxes",
|
|
28
29
|
"findAxis",
|
|
29
|
-
"findTableColumn"
|
|
30
|
+
"findTableColumn",
|
|
31
|
+
"rewriteLegacyFilters"
|
|
30
32
|
]
|
|
31
33
|
}),
|
|
32
34
|
PFrame: service()({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service_declarations.js","names":[],"sources":["../../src/services/service_declarations.ts"],"sourcesContent":["/**\n * Service declarations — add new services here.\n *\n * `modelMethods` / `uiMethods` lists are the single source of truth for\n * method names exposed on each side. They drive SERVICE_METHOD_MAP (UI\n * ServiceProxy forwarders) and MODEL_SERVICE_METHOD_MAP (workflow VM\n * bridge), so node/main/wasm split no longer needs introspection stubs.\n *\n * After adding a service, fix type errors in these files:\n *\n * Model side:\n * - lib/node/pl-middle-layer/src/js_render/service_injectors.ts — VM bridge for workflow scripts\n * - lib/node/pl-middle-layer/src/middle_layer/middle_layer.ts — ModelServiceRegistry factory\n *\n * UI side:\n * - lib/model/common/src/services/node_service_handlers.ts — driver method wrappers (node services only)\n * - sdk/ui-vue/src/internal/createAppV3.ts — UiServiceRegistry factory\n *\n * Electron main side (only for `main` services):\n * - platforma-desktop-app/packages/main/src/services/mainServices.ts — main-process dispatcher\n *\n * Optional:\n * - sdk/model/src/services/block_service_flags.ts — only if default-required by all blocks\n */\n\nimport type { DialogService } from \"../dialog\";\nimport type { PFrameDriver, PFrameModelDriver } from \"../drivers/pframe/driver\";\nimport type { PFrameSpecDriver } from \"../drivers/pframe/spec_driver\";\nimport { service } from \"./service_types\";\n\nexport const Services = {\n PFrameSpec: service<PFrameSpecDriver, PFrameSpecDriver>()({\n type: \"wasm\",\n name: \"pframeSpec\",\n modelMethods: [\n \"createSpecFrame\",\n \"listColumns\",\n \"discoverColumns\",\n \"deleteColumn\",\n \"evaluateQuery\",\n \"buildQuery\",\n \"expandAxes\",\n \"collapseAxes\",\n \"findAxis\",\n \"findTableColumn\",\n ] as const,\n uiMethods: [\n \"createSpecFrame\",\n \"listColumns\",\n \"discoverColumns\",\n \"deleteColumn\",\n \"evaluateQuery\",\n \"buildQuery\",\n \"expandAxes\",\n \"collapseAxes\",\n \"findAxis\",\n \"findTableColumn\",\n ] as const,\n }),\n PFrame: service<PFrameModelDriver, PFrameDriver>()({\n type: \"node\",\n name: \"pframe\",\n modelMethods: [\"createPFrame\", \"createPTable\", \"createPTableV2\"] as const,\n uiMethods: [\n \"findColumns\",\n \"getColumnSpec\",\n \"listColumns\",\n \"calculateTableData\",\n \"getUniqueValues\",\n \"getShape\",\n \"getSpec\",\n \"getData\",\n \"writePTableToFs\",\n ] as const,\n }),\n Dialog: service<Record<string, never>, DialogService>()({\n type: \"main\",\n name: \"dialog\",\n modelMethods: [] as const,\n uiMethods: [\"showSaveDialog\"] as const,\n }),\n};\n"],"mappings":";;AA8BA,MAAa,WAAW;CACtB,YAAY,SAA6C,CAAC;EACxD,MAAM;EACN,MAAM;EACN,cAAc;GACZ;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD;EACD,WAAW;GACT;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD;EACF,CAAC;CACF,QAAQ,SAA0C,CAAC;EACjD,MAAM;EACN,MAAM;EACN,cAAc;GAAC;GAAgB;GAAgB;GAAiB;EAChE,WAAW;GACT;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD;EACF,CAAC;CACF,QAAQ,SAA+C,CAAC;EACtD,MAAM;EACN,MAAM;EACN,cAAc,EAAE;EAChB,WAAW,CAAC,iBAAiB;EAC9B,CAAC;CACH"}
|
|
1
|
+
{"version":3,"file":"service_declarations.js","names":[],"sources":["../../src/services/service_declarations.ts"],"sourcesContent":["/**\n * Service declarations — add new services here.\n *\n * `modelMethods` / `uiMethods` lists are the single source of truth for\n * method names exposed on each side. They drive SERVICE_METHOD_MAP (UI\n * ServiceProxy forwarders) and MODEL_SERVICE_METHOD_MAP (workflow VM\n * bridge), so node/main/wasm split no longer needs introspection stubs.\n *\n * After adding a service, fix type errors in these files:\n *\n * Model side:\n * - lib/node/pl-middle-layer/src/js_render/service_injectors.ts — VM bridge for workflow scripts\n * - lib/node/pl-middle-layer/src/middle_layer/middle_layer.ts — ModelServiceRegistry factory\n *\n * UI side:\n * - lib/model/common/src/services/node_service_handlers.ts — driver method wrappers (node services only)\n * - sdk/ui-vue/src/internal/createAppV3.ts — UiServiceRegistry factory\n *\n * Electron main side (only for `main` services):\n * - platforma-desktop-app/packages/main/src/services/mainServices.ts — main-process dispatcher\n *\n * Optional:\n * - sdk/model/src/services/block_service_flags.ts — only if default-required by all blocks\n */\n\nimport type { DialogService } from \"../dialog\";\nimport type { PFrameDriver, PFrameModelDriver } from \"../drivers/pframe/driver\";\nimport type { PFrameSpecDriver } from \"../drivers/pframe/spec_driver\";\nimport { service } from \"./service_types\";\n\nexport const Services = {\n PFrameSpec: service<PFrameSpecDriver, PFrameSpecDriver>()({\n type: \"wasm\",\n name: \"pframeSpec\",\n modelMethods: [\n \"createSpecFrame\",\n \"listColumns\",\n \"discoverColumns\",\n \"deleteColumn\",\n \"evaluateQuery\",\n \"buildQuery\",\n \"expandAxes\",\n \"collapseAxes\",\n \"findAxis\",\n \"findTableColumn\",\n \"rewriteLegacyFilters\",\n ] as const,\n uiMethods: [\n \"createSpecFrame\",\n \"listColumns\",\n \"discoverColumns\",\n \"deleteColumn\",\n \"evaluateQuery\",\n \"buildQuery\",\n \"expandAxes\",\n \"collapseAxes\",\n \"findAxis\",\n \"findTableColumn\",\n \"rewriteLegacyFilters\",\n ] as const,\n }),\n PFrame: service<PFrameModelDriver, PFrameDriver>()({\n type: \"node\",\n name: \"pframe\",\n modelMethods: [\"createPFrame\", \"createPTable\", \"createPTableV2\"] as const,\n uiMethods: [\n \"findColumns\",\n \"getColumnSpec\",\n \"listColumns\",\n \"calculateTableData\",\n \"getUniqueValues\",\n \"getShape\",\n \"getSpec\",\n \"getData\",\n \"writePTableToFs\",\n ] as const,\n }),\n Dialog: service<Record<string, never>, DialogService>()({\n type: \"main\",\n name: \"dialog\",\n modelMethods: [] as const,\n uiMethods: [\"showSaveDialog\"] as const,\n }),\n};\n"],"mappings":";;AA8BA,MAAa,WAAW;CACtB,YAAY,SAA6C,CAAC;EACxD,MAAM;EACN,MAAM;EACN,cAAc;GACZ;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD;EACD,WAAW;GACT;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD;EACF,CAAC;CACF,QAAQ,SAA0C,CAAC;EACjD,MAAM;EACN,MAAM;EACN,cAAc;GAAC;GAAgB;GAAgB;GAAiB;EAChE,WAAW;GACT;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD;EACF,CAAC;CACF,QAAQ,SAA+C,CAAC;EACtD,MAAM;EACN,MAAM;EACN,cAAc,EAAE;EAChB,WAAW,CAAC,iBAAiB;EAC9B,CAAC;CACH"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@milaboratories/pl-model-common",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.43.0",
|
|
4
4
|
"description": "Platforma SDK Model",
|
|
5
5
|
"files": [
|
|
6
6
|
"./dist/**/*",
|
|
@@ -19,16 +19,16 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"canonicalize": "~2.1.0",
|
|
21
21
|
"zod": "~3.25.76",
|
|
22
|
-
"@milaboratories/
|
|
23
|
-
"@milaboratories/
|
|
22
|
+
"@milaboratories/helpers": "1.14.2",
|
|
23
|
+
"@milaboratories/pl-error-like": "1.12.10"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@vitest/coverage-istanbul": "^4.1.3",
|
|
27
27
|
"typescript": "~5.9.3",
|
|
28
28
|
"vitest": "^4.1.3",
|
|
29
|
-
"@milaboratories/ts-
|
|
30
|
-
"@milaboratories/
|
|
31
|
-
"@milaboratories/
|
|
29
|
+
"@milaboratories/ts-configs": "1.2.3",
|
|
30
|
+
"@milaboratories/ts-builder": "1.5.0",
|
|
31
|
+
"@milaboratories/build-configs": "2.0.0"
|
|
32
32
|
},
|
|
33
33
|
"scripts": {
|
|
34
34
|
"build": "ts-builder build --target node",
|
|
@@ -14,7 +14,8 @@ import type {
|
|
|
14
14
|
ColumnValueType,
|
|
15
15
|
} from "./spec";
|
|
16
16
|
import type { PTableColumnId, PTableColumnSpec } from "./table_common";
|
|
17
|
-
import {
|
|
17
|
+
import type { PTableRecordFilter } from "./table_calculate";
|
|
18
|
+
import { DataQuery, DataQueryBooleanExpression, SpecQuery, SpecQueryJoinEntry } from "./query";
|
|
18
19
|
|
|
19
20
|
/** Matches a string value either exactly or by regex pattern */
|
|
20
21
|
export type StringMatcher =
|
|
@@ -255,4 +256,14 @@ export interface PFrameSpecDriver {
|
|
|
255
256
|
|
|
256
257
|
/** Find the flat index of a table column matching the given selector. Returns -1 if not found. */
|
|
257
258
|
findTableColumn(tableSpec: PTableColumnSpec[], selector: PTableColumnId): number;
|
|
259
|
+
|
|
260
|
+
/**
|
|
261
|
+
* Upgrades selector-based legacy record filters into index-based data-layer
|
|
262
|
+
* boolean expressions, resolved against the provided unified table spec
|
|
263
|
+
* (axes first, then columns).
|
|
264
|
+
*/
|
|
265
|
+
rewriteLegacyFilters(request: {
|
|
266
|
+
tableSpec: PTableColumnSpec[];
|
|
267
|
+
filters: PTableRecordFilter[];
|
|
268
|
+
}): DataQueryBooleanExpression[];
|
|
258
269
|
}
|
|
@@ -43,6 +43,7 @@ export const Services = {
|
|
|
43
43
|
"collapseAxes",
|
|
44
44
|
"findAxis",
|
|
45
45
|
"findTableColumn",
|
|
46
|
+
"rewriteLegacyFilters",
|
|
46
47
|
] as const,
|
|
47
48
|
uiMethods: [
|
|
48
49
|
"createSpecFrame",
|
|
@@ -55,6 +56,7 @@ export const Services = {
|
|
|
55
56
|
"collapseAxes",
|
|
56
57
|
"findAxis",
|
|
57
58
|
"findTableColumn",
|
|
59
|
+
"rewriteLegacyFilters",
|
|
58
60
|
] as const,
|
|
59
61
|
}),
|
|
60
62
|
PFrame: service<PFrameModelDriver, PFrameDriver>()({
|